";} $SystemModuleKey = $section; $sql_child=get_sql_child($SystemModuleKey,$myModule_Table); include ("adminpanel/MOD_CMS/config.php"); $myModule_ConfigPageSize = 10; $sql = "SELECT %s FROM ".$myModule_Table." WHERE ((". $myModule_Table."_StartDate='0000-00-00 00:00:00' AND ". $myModule_Table."_ExpireDate='0000-00-00 00:00:00' ". " ) OR ( ". $myModule_Table."_StartDate='0000-00-00 00:00:00' AND ". " TO_DAYS(".$myModule_Table."_ExpireDate)>=TO_DAYS(NOW()) ". " ) OR ( ". " TO_DAYS(".$myModule_Table."_StartDate)<=TO_DAYS(NOW()) AND ". $myModule_Table."_ExpireDate='0000-00-00 00:00:00' ". " ) OR ( ". " TO_DAYS(".$myModule_Table."_StartDate)<=TO_DAYS(NOW()) AND ". " TO_DAYS(".$myModule_Table."_ExpireDate)>=TO_DAYS(NOW()) ". ")) AND "; if ($section=="content") { $sql .= $myModule_Table."_Status='Enable' AND ".$sql_child." ORDER BY ".$myModule_Table."_ID DESC"; } else { $sql .=$myModule_Table."_Status='Enable' AND ".$myModule_Table."_ModuleKey = '".$SystemModuleKey."' ORDER BY ".$myModule_Table."_ID DESC"; } $Query=MYSQL_DB_QUERY($System_DataBase_Name,sprintf($sql," Count(".$myModule_Table."_ID) as num ")) OR DIE("Error: ???
$sql
\n"); //$RecordCount=MYSQL_NUMROWS($Query); $RecordCount= mysql_result($Query,0,"num"); $myTotalPage = ceil($RecordCount/$myModule_ConfigPageSize); //echo $sql; if(strlen($ShowPage)==0) { $ShowPage=1; } $RecStart = ($ShowPage-1)*$myModule_ConfigPageSize; $sql .=" LIMIT $RecStart,$myModule_ConfigPageSize"; //echo $sql; $Query=MYSQL_DB_QUERY($System_DataBase_Name,sprintf($sql," * ")) OR DIE("Error: ???
$sql
\n"); $RecordCount=MYSQL_NUMROWS($Query); $index=1; if($RecordCount>0) { echo ""; while($index < $RecordCount+1) { $Row=MYSQL_FETCH_ARRAY($Query); if(strlen($Row[$myModule_Table."_Link"])>0 && $Row[$myModule_Table."_Link"]!="http://") { $Link=""; } else { $Link=""; } echo " "; $index++; } echo "
$Link
$Link ".$Row[$myModule_Table."_Subject"] ."
".$Row[$myModule_Table."_Title"] ." ?>>
"; if ($index <= 4) { echo $img_new; } echo "
"; } ?>
? 1 && $ShowPage<=$myTotalPage) { $prevpage = $ShowPage-1; print "\t<<\n"; } if($ShowPage != $myTotalPage) { $nextpage = $ShowPage+1; } // ?????? for($i=1 ; $i< $ShowPage ; $i++) { print "\t $i, \n"; } print "\t$ShowPage \n"; for($i=$ShowPage+1 ; $i<=$myTotalPage ; $i++) { print "\t, $i "; } if (($ShowPage!=$myTotalPage) && ($myTotalPage != 0 )){ $nextShowPage = $ShowPage+1; print "\t>>\n"; } echo "    "; //include ("adminpanel/lib/disconnect.php"); ?>