Changeset 6176 for extensions/ColorStat/cstat_aip.class.inc.php
- Timestamp:
- May 13, 2010, 10:21:05 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/ColorStat/cstat_aip.class.inc.php
r6107 r6176 221 221 dirname($this->getFileLocation()).'/admin/cstat_stat.tpl'); 222 222 223 $colorTable= $this->getColorTableWithStat();223 $colorTable=CStat_functions::getColorTableWithStat(); 224 224 225 225 226 226 $datas=Array( 227 227 //'themeconf' => Array('name' => $template->get_themeconf('name')), 228 'colorTable' => $this->htmlColorTable(228 'colorTable' => CStat_functions::htmlColorTable( 229 229 $colorTable, 230 230 ($this->config['analyze_colorTable']=='small')?19:10, 231 231 "", 232 "color0px" 232 "color0px", 233 "<br>" 233 234 ), 234 235 'urlRequest' => $this->getAdminLink(), … … 250 251 dirname($this->getFileLocation()).'/admin/cstat_search.tpl'); 251 252 252 $datas=Array( 253 'dialogBox' => $this->dialogBoxColor(), 254 'themeName' => $template->get_themeconf('name'), 255 ); 256 257 $template->assign('datas', $datas); 253 $template->assign('cstat_search_page', GPCRequestBuilder::displaySearchPage()); 258 254 259 255 $template->assign_var_from_handle('CSTAT_BODY_PAGE', 'body_page'); … … 297 293 { 298 294 global $template, $lang; 295 296 $configTabs=new GPCTabSheet('configTabsheet', $this->tabsheet->get_titlename(), 'tabsheet2 gcBorder', 'itab2'); 297 $configTabs->add('database', 298 l10n('cstat_database'), 299 '', true, "displayConfig('database');"); 300 $configTabs->add('statsearch', 301 l10n('cstat_stat_and_search'), 302 '', false, "displayConfig('statsearch');"); 303 $configTabs->add('display', 304 l10n('cstat_gallery_integration'), 305 '', false, "displayConfig('display');"); 306 $configTabs->assign(); 299 307 300 308 $template->set_filename('body_page', … … 390 398 391 399 392 protected function getGeneralStats()393 {394 $returned=Array(395 'nbImages' => 0,396 'totalTime' => 0,397 'pixelsAnalyzedMax' => 0,398 'pixelsAnalyzedMin' => 0,399 'pixelsAnalyzedAvg' => 0,400 'pixelsAnalyzedSum' => 0,401 'totalPixels' => 0,402 'ppsMax' => 0,403 'ppsMin' => 0,404 'ppsAvg' => 0,405 'qualityMax' => 0,406 'qualityMin' => 0,407 'qualityAvg' => 0,408 );409 $sql="SELECT COUNT(image_id) AS nbImages,410 SUM(time) AS totalTime,411 MAX(analyzed_pixels) AS pixelsAnalyzedMax,412 MIN(analyzed_pixels) AS pixelsAnalyzedMin,413 AVG(analyzed_pixels) AS pixelsAnalyzedAvg,414 SUM(analyzed_pixels) AS pixelsAnalyzedSum,415 SUM(num_pixels) AS totalPixels,416 MAX(pps) AS ppsMax,417 MIN(pps) AS ppsMin,418 AVG(pps) AS ppsAvg,419 MAX(quality) AS qualityMax,420 MIN(quality) AS qualityMin,421 AVG(quality) AS qualityAvg422 FROM ".$this->tables['images']."423 WHERE analyzed='y';";424 $result=pwg_query($sql);425 if($result)426 {427 while($row=pwg_db_fetch_assoc($result))428 {429 $returned=$row;430 }431 }432 return($returned);433 }434 435 436 400 /** 437 401 * make consolidation for the color_table : … … 626 590 { 627 591 $colorTable=ColorStat::getColorTable( 628 $this->colorTableSize[$this->config['analyze_colorTable']][0],629 $this->colorTableSize[$this->config['analyze_colorTable']][1]592 CStat_root::$colorTableSize[$this->config['analyze_colorTable']][0], 593 CStat_root::$colorTableSize[$this->config['analyze_colorTable']][1] 630 594 ); 631 595 … … 688 652 dirname($this->getFileLocation()).'/admin/cstat_stat_show_iListColors.tpl'); 689 653 690 $generalStats= $this->getGeneralStats();654 $generalStats=CStat_functions::getGeneralStats(); 691 655 692 656 $sql="SELECT color_id, num_images, num_pixels
Note: See TracChangeset
for help on using the changeset viewer.