connect($dbhost, $dbuser, $dbpw, $dbname); unset($dbhost, $dbuser, $dbpw, $dbname); session_start(); // set timeout period in seconds $inactive = 60000000000; // check to see if $_SESSION['timeout'] is set if(isset($_SESSION['timeout']) ) { $session_life = time() - $_SESSION['timeout']; if($session_life > $inactive){ session_destroy(); } } $_SESSION['timeout'] = time(); getget(); getpost(); function getpost() { if(count($_POST)) { foreach($_POST as $key => $value) { global ${$key}; if (is_array($value) == true) { ${$key} = $value; } else { ${$key} = trim($value); } } } } function getget() { if(count($_GET)) { foreach($_GET as $key => $value) { global ${$key}; if (is_array($value) == true) { ${$key} = $value; } else { ${$key} = trim($value); } } } } $page_field = ""; include("config.php"); getget(); //file define $num_of_files = 0; $attachment_text=array( "-----", ' 圖片', ); $col_name=array( "-----", "photo" ); //initial if (empty($id)) { $id = ""; $temp_id = md5(uniqid(time())); } if (empty($page)) { $page = "1"; } //Load data if ($id != "") { $sql = "SELECT * FROM `".$page_tbname."` WHERE `id` = '$id'"; $row = $db->getrow($sql); foreach($row as $_key=>$_item){ ${$_key} = $_item; } if ($display == 1) { $displayd = 'checked'; $displayh = ''; } else { $displayd = ''; $displayh = 'checked'; } } else { $displayd = 'checked'; $displayh = ''; } $levelone_list = ''; $sql = "SELECT id, name FROM `printing_levelone` WHERE 1 "; if ($result = $db->query($sql)) { while ($row = mysql_fetch_assoc($result)) { $selected = ($row['id'] != $levelone)?'':' selected'; $levelone_list .= ' '; } mysql_free_result($result); } $files_content = ""; //upload file for ($i=1;$i<=$num_of_files;$i++) { if ($id != "") { $sql = "SELECT * FROM `attachment` WHERE `table_name` = '".$page_tbname."' AND `table_id` = '".$id."' AND `col_name` = '".$col_name[$i]."'"; $rs = $db->query($sql); if (mysql_num_rows($rs) > 0) { $rowfile = $db->fetch_array($rs); ${"file".$i} = 'File name: '.$rowfile["real_name"].' Delete
Preview: 
'; } } $files_content .= ' '.$attachment_text[$i].' '; if ($id != "") { $files_content .= ${"file".$i}; } $files_content .= ' '; } ?> <?=$contact_name?> - Back-end
> >
';?>

常用資料
 排序  *排序由小至大.
 顯示 > 顯示      > 隱藏
 分類

服務資料
 文字內容
 表格內容


 用分行設定行數
 用,設定列數
 

圖片
 相簿