([\\n\\r])`', '$1', $string); } // page variable name $page_field = "news"; 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 = ""; $maintop = ""; $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'; } if ($row["maintop"] == 1) { $maintopd = 'checked'; $maintoph = ''; } else { $maintopd = ''; $maintoph = 'checked'; } $date = $row["date"]; $cate_id = $row["cate_id"]; //en $e_title = htmlspecialchars($row["e_title"]); $e_content = $row["e_content"]; //sc $sc_title = htmlspecialchars($row["sc_title"]); $sc_content = $row["sc_content"]; //zh $zh_title = htmlspecialchars($row["zh_title"]); $zh_content = $row["zh_content"]; $news_type_list = ""; $sql = "SELECT * FROM news_categories"; $rs = $db->query($sql); while($row=$db->fetch_array($rs)){ $news_type_list .= '