Execute($sql);
// Figure out the total number of results in DB:
$total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM idx_reslink WHERE category_id='$chooser'"),0);
// Figure out the total number of pages. Always round up using ceil()
$lastpage = ceil($total_results / $max_results);
global $paginated;
$paginated .= "
Select a Page
";
if ($page == 1) {
$paginated .= " FIRST PREV ";
} else {
$paginated .= " FIRST ";
$prevpage = $page-1;
$paginated .= " PREV ";
}
$paginated .= " ( Page $page of $lastpage ) ";
if ($page == $lastpage) {
$paginated .= " NEXT LAST ";
} else {
$nextpage = $page+1;
$paginated .= " NEXT ";
$paginated .= " LAST ";
}
$test = '';
for($i = 0;$i < $result->RecordCount(); $i++){
$file = $result->Fields("title");
$description = $result->Fields("description");
$date = $result->Fields("date");
$test .= '
| Title |
Description |
Date Added |
| '.$file.' |
'.$description.' |
'.$date.' |
';
$result->movenext();}
}
$files = $test;
DisplayTemplate($theme_path . "cp/data.html", "\$files,\$paginated,\$error_msg");
}
/*===================================================
main
===================================================*/
include "../application.php";
RunPreFilter(__FILE__);
ShowMyFiles();
RunPostFilter(__FILE__);
?>
//---------------------------html file---------------------------
<%include file="cp/header.html"
title="Research File Area"
meta_keywords=""
meta_description=""
%>
<%if $error_msg%>
<%$error_msg%>
<%/if%>
<%if $files%>
<%$files%>
<%else%>
No new System messages or downloads.
<%/if%><%$paginated%>
|
|
<%include file="cp/footer.html"%>
//------------------------------------datadrop html 1st file-------------------------
<%include file="cp/header.html"
title="Research File Area"
meta_keywords=""
meta_description=""
%>
<%include file="cp/footer.html"%> |