require_once("../../common.inc.php"); $prefix="e_"; function nl2br_revert($string) { return preg_replace('`([\\n\\r])`', '$1', $string); } // page variable name $page_field = "project"; include("config.php"); getget(); //upload number of file define $num_of_files = 5; $attachment_text=array( "-----", "Detail Photo 1", "Detail Photo 2", "Detail Photo 3", "Detail Photo 4", "Detail Photo 5", "Detail Photo 6", "Detail Photo 7", "Detail Photo 8", "Detail Photo 9", "Detail Photo 10" ); $col_name=array( "-----", "detailphoto1", "detailphoto2", "detailphoto3", "detailphoto4", "detailphoto5", "detailphoto6", "detailphoto7", "detailphoto8", "detailphoto9", "detailphoto10" ); //initial if (empty($id)) { $id = ""; $temp_id = md5(uniqid(time())); } if (empty($page)) { $page = "1"; } $sorting = ""; $display = ""; $itemno = ""; $name = ""; $ebrandname =""; $e_txtareadesc = ""; //Load data if ($id != "") { $sql = "SELECT * FROM `".$page_tbname."` WHERE `id` = '$id'"; $row = $db->getrow($sql); if ($row["status"] == 1) { $displayd = 'checked'; $displayh = ''; } else { $displayd = ''; $displayh = 'checked'; } $date = $row["date"]; $cate_id = $row["cate_id"]; //en $e_name = htmlspecialchars($row["e_name"]); $e_code = $row["e_code"]; $e_industry = $row["e_industry"]; $e_background = $row["e_background"]; $e_recommend = $row["e_recommend"]; $e_spec = $row["e_spec"]; $e_ware = $row["e_ware"]; //sc $sc_name = htmlspecialchars($row["sc_name"]); $sc_code = $row["sc_code"]; $sc_industry = $row["sc_industry"]; $sc_background = $row["sc_background"]; $sc_recommend = $row["sc_recommend"]; $sc_spec = $row["sc_spec"]; $sc_ware = $row["sc_ware"]; //zh $zh_name = htmlspecialchars($row["zh_name"]); $zh_code = $row["zh_code"]; $zh_industry = $row["zh_industry"]; $zh_background = $row["zh_background"]; $zh_recommend = $row["zh_recommend"]; $zh_spec = $row["zh_spec"]; $zh_ware = $row["zh_ware"]; $project_type_list = ""; $sql = "SELECT * FROM project_categories"; $rs = $db->query($sql); while($row=$db->fetch_array($rs)){ $project_type_list .= ''; } } else { //echo "hihi"; $displayd = 'checked'; $displayh = ''; $date = date('Y-m-d'); $project_type_list = ""; $sql = "SELECT * FROM project_categories"; $rs = $db->query($sql); while($row=$db->fetch_array($rs)){ $project_type_list .= ''; } } $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'; } } $files_content .= ' '.$attachment_text[$i].' '; if ($id != "") { $files_content .= ${"file".$i}; } $files_content .= ' '; } ?> Smartinfo CMS =$section_name;?> > =$page_title;?> > if ($id != "") echo "Modify"; else echo "Add";?> Common Information Show > Show > Hidden Date Project Type Please select an option =$project_type_list;?> Project Information Name Code No. Industry Background =$e_background?> Recommendation =$e_recommend?> Special =$e_spec?> Note =$e_ware?> Project Information (繁體中文) Name (繁體中文) Code No. (繁體中文) Industry (繁體中文) Background (繁體中文) =$zh_background?> Recommendation (繁體中文) =$zh_recommend?> Special (繁體中文) =$zh_spec?> Note (繁體中文) =$zh_ware?> Project Information (簡体中文) Name (簡体中文) Code No. (簡体中文) Industry (簡体中文) Background (簡体中文) =$sc_background?> Recommendation (簡体中文) =$sc_recommend?> Special (簡体中文) =$sc_spec?> Note (簡体中文) =$sc_ware?> =$files_content?>