require_once("./common.inc.php");
getget();
getpost();
$sys_maxpage = 20;
$sys_perpage = 12;
$sys_pageoffset = 2;
if (empty($page)) {
$page = 1;
}
$sql = "SELECT * FROM `job` WHERE `display` = 1 order by `sorting` DESC";
$sql_start_pos = ($page-1) * $sys_perpage;
$sql_limit = " LIMIT ".$sql_start_pos.", ".$sys_perpage;
$list = '';
$result=mysql_query($sql.$sql_limit);
$count=mysql_num_rows($result);
$count_check = 0;
$p_exist = "";
while($row = $db->fetch_array($result)){
$sql_check = "SELECT * FROM `attachment` WHERE `table_name` = 'job' AND `table_id` = '".$row['id']."'";
$result_check = mysql_query($sql_check);
$count_check = mysql_num_rows($result_check);
$list .= '
'.$row['year'].'
'.substr($row['e_content'],0,100).((strlen($row['e_content']) > 100)?'...':'').'
'.$row['client_name'].'
'.$row['work_nature'].'
';
}
$rs = $db->query($sql);
$total = mysql_num_rows($rs);
$multipage = new MultiPage();
$multipage->total = $total;
$multipage->perpage = $sys_perpage;
$multipage->maxpage = $sys_maxpage;
$multipage->offset = $sys_pageoffset;
$multipage->curr_page = $page;
$pagelists = $multipage->getpagelist();
$myval = "";
foreach($_GET as $key => $value) {
if ($key != "page")
$myval .= "&".$key."=".urlencode($value);
}
$pagelist = "";
$page_address = 'job.php';
//page list
for ($i=0;$i 0) {
$pagelist .= " | ";
}
if ($pagelists[$i] == $page) {
$pagelist .= ''.$pagelists[$i].'';
} else {
$pagelist .= ''.$pagelists[$i].'';
}
}
//prev page
if ($multipage->getprev() != "") {
$prevpage = '< PREV';
} else {
$prevpage = '< PREV';
}
//next page
if ($multipage->getnext() != "") {
$nextpage = 'NEXT >';
} else {
$nextpage = 'NEXT >';
}
//total page
$totalpage = $multipage->gettotal();
?>
Vbond
$myBasePath =$_SERVER['PHP_SELF'];
//echo "path=".$myBasePath;
$foundpos = strrpos ($myBasePath, "/");
//echo "
found =".$foundpos;
$tmppage = "".substr($myBasePath, $foundpos+1);
$tmppage=str_replace('.php','',$tmppage);
//echo "
found =".$tmppage;
if($_SERVER['QUERY_STRING']!=""){
// $tmppage.="?".$_SERVER['QUERY_STRING'];
}
$bannertype=$tmppage;
?>
require_once("./common.inc.php");
?>
=$list?>
=$prevpage?>
=$pagelist?>
=$nextpage?>