//=======================//
//========跳出視窗=======//
?>
//========跳出視窗=======//
//=======================//
?>
|
include "vrt_left.php";?>
|
//$sql_productcla= "Select * from productscla where Id = ". $Id;
//$rs_productcla = get_rs($conn, $sql_productcla);
//$row_productcla=mysql_fetch_object($rs_productcla);
$page_size = 2; // TODO: insert your here
if (empty($p)) $p = 1;
$limit = ($p-1) * $page_size;
$index = $limit + 1;
$sql = "select a.Id,a.Name,a.Pic4, a.Pic5 ,b.Name ProdutsclaName, date_format(a.CDate, '%Y-%m-%d') as CDate "; // TODO: insert your here
$from = "products a , productscla b"; // TODO: insert your here
$today = date("Y-m-d");
if ((empty($where))&&(!empty($Id))) $where = " (((a.StartD <= '$today') and (a.StopD > '$today')) or (a.NeverEnd='Y')) and (a.Hidden <> 'Y') and a.Pid=b.Id and a.Pid=".$Id; // TODO: insert your here
if (empty($order)) $order = "a.CDate Desc,a.Id Desc"; // TODO: insert your here
if (!empty($keyword))$where.= " and (a.name like '%$keyword%' or a.CDate like '%$keyword%')";
if (!empty($order_by)) { // manually ordered
$order = $order_by;
$order .= " " . $order_type;
$order_type = ($order_type == "asc" ? "desc" : "asc");
$curr_order = $order_by;
$order_by = "";
}
$limit = $limit . "," . $page_size;
$sql .= " from " . $from;
$sql_count = "select count(*) as total from " . $from;
$sql_count .= (empty($where) ? "" : " where " . stripslashes($where));
$sql .= (empty($where) ? "" : " where " . stripslashes($where));
$sql .= (empty($order) ? "" : " order by " . $order);
$query1=$sql;
$sql .= (empty($limit) ? "" : " limit " . $limit);
$rs = get_rs($conn, $sql_count);
$row = mysql_fetch_object($rs);
$total = $row->total;
mysql_free_result($rs);
$page_number = ceil($total/$page_size);
$rs = get_rs($conn, $sql);
$count = mysql_num_rows($rs);
$rs_productcla = get_rs($conn, $sql);
$row_productcla=mysql_fetch_object($rs_productcla);
$statusIndex=0;
?>

|
ProdutsclaName;?>
|
while($row=mysql_fetch_object($rs)){
if(($statusIndex%2)==0){
?>
|
}
?>
Pic5<>""){?> onClick=OpenFullSizeWindow('admin/upload/products/','','')}?> width="200" height="160"> |
$statusIndex=$statusIndex+1;
}
if(($statusIndex%2)==1){
?>
|
}?>
|
|
|
|