CountPending(); //if( isset($objTopicList) && is_object($objTopicList) ) $PendingTopics = (int)@$objTopicList->CountPending(); //if( isset($objTopicList) && is_object($objArticleList) ) $PendingNews = (int)@$objArticleList->CountPending(); //$PendingLinks = (int)@$objLinkList->CountPending(); //$PendingCats = (int)@$objCatList->CountPending(); $PendingTotal = 0; //$PendingUsers + $PendingCats + $PendingTopics + $PendingNews + $PendingLinks; $date_str = adodb_date("F j, Y"); print <<

Overview $date_str 
END; $template = ""; $objStats = new clsStatList(); $objStats->Query_Item("SELECT * FROM ".GetTablePrefix()."StatItem WHERE AdminSummary=1"); $ItemCount = $objStats->NumItems(); $ItemsPerCol = ceil($ItemCount / 2); $i = 0; $col = 1; $o = ""; while($i < $ItemsPerCol) { $s = $objStats->GetItemByIndex($i); $o .= $s->ParseTemplateText($template); $i++; } print $o; print <<
END; $o = ""; while($i<$ItemCount) { $s = $objStats->GetItemByIndex($i); $o .= $s->ParseTemplateText($template); $i++; } print $o; // ---- prepare pending items list based on modules installed: begin ----- $m = GetModuleArray(); foreach($m as $key => $value) { $path = $pathtoroot.$value."admin/include/parser.php"; if( file_exists($path) ) include_once($path); } $modules = $objModules->GetModuleList(); $pending_source = $objModules->ExecuteFunction('GetModuleInfo', 'summary_pending'); // get total pending item count & merge them into one array $all_pending = Array(); $pending_col_1 = ''; $pending_col_2 = ''; foreach($pending_source as $module_name => $pending_items) foreach($pending_items as $p_item) $all_pending[] = $p_item; if( count($all_pending) % 2 ) $all_pending[] = 'empty'; $ItemCount = count($all_pending); $ItemsPerCol = ceil($ItemCount / 2); // lTDi, rTDi, lTD, rTD $i = 0; while($i < $ItemCount) { // create cell content $item_count = 0; $col_type = ($i < $ItemsPerCol) ? 'l' : 'r'; $class = $col_type.'TDi'; // if last item then change class if($i+1 == $ItemsPerCol) $class = 'lTD'; elseif($i+1 == $ItemsPerCol*2) $class = 'rTD'; //print_pre($all_pending[$i]); $cell = is_array($all_pending[$i]) ? PendingCell($all_pending[$i], $class, $item_count) : ''; if($col_type == 'l') $pending_col_1 .= $cell; elseif($col_type == 'r') $pending_col_2 .= $cell; $PendingTotal += $item_count; //allocate it to row $i++; } // <- ok //if($peding_items_count % 2 != 0) $pending_html .= ''; function PendingCell($params, $class, &$pending_count) { $pending_count = $GLOBALS[ $params['list_var_name'] ]->CountPending(); $o = ''."\n"; $o .= ''."\n"; $o .= ''."\n"; return $o; } // ---- prepare pending items list based on modules installed: end ----- print <<
 
 
'."\n"; $o .= ''."\n"; $o .= ''."\n"; $o .= admin_language($params['phrase']); $o .= ' ('.$pending_count.')'."\n"; $o .= '

$lang_PendingItems  ($PendingTotal)
$pending_col_1
$pending_col_2
END; ?>