require_once("../../common.inc.php"); function nl2br_revert($string) { return preg_replace('`([\\n\\r])`', '$1', $string); } // page variable name $page_field = "activities"; 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_act_date = $row["e_act_date"]; $e_act_time = $row["e_act_time"]; $e_act_loc = $row["e_act_loc"]; $e_act_fee= $row["e_act_fee"]; $e_act_intro = $row["e_act_intro"]; $e_act_spec = $row["e_act_spec"]; $e_act_content = $row["e_act_content"]; $e_act_speak= $row["e_act_speak"]; $e_act_schedule = $row["e_act_schedule"]; $e_act_ware = $row["e_act_ware"]; //sc $sc_title = htmlspecialchars($row["sc_title"]); $sc_act_date = $row["sc_act_date"]; $sc_act_time = $row["sc_act_time"]; $sc_act_loc = $row["sc_act_loc"]; $sc_act_fee= $row["sc_act_fee"]; $sc_act_intro = $row["sc_act_intro"]; $sc_act_spec = $row["sc_act_spec"]; $sc_act_content = $row["sc_act_content"]; $sc_act_speak= $row["sc_act_speak"]; $sc_act_schedule = $row["sc_act_schedule"]; $sc_act_ware = $row["sc_act_ware"]; //zh $zh_title = htmlspecialchars($row["zh_title"]); $zh_act_date = $row["zh_act_date"]; $zh_act_time = $row["zh_act_time"]; $zh_act_loc = $row["zh_act_loc"]; $zh_act_fee= $row["zh_act_fee"]; $zh_act_intro = $row["zh_act_intro"]; $zh_act_spec = $row["zh_act_spec"]; $zh_act_content = $row["zh_act_content"]; $zh_act_speak= $row["zh_act_speak"]; $zh_act_schedule = $row["zh_act_schedule"]; $zhc_act_ware = $row["zh_act_ware"]; $news_type_list = ""; $sql = "SELECT * FROM activities_categories"; $rs = $db->query($sql); while($row=$db->fetch_array($rs)){ $news_type_list .= ''; } } else { //echo "hihi"; $displayd = 'checked'; $displayh = ''; $maintopd = ''; $maintoph = 'checked'; $date = date('Y-m-d'); $news_type_list = ""; $sql = "SELECT * FROM activities_categories"; $rs = $db->query($sql); while($row=$db->fetch_array($rs)){ $news_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 Show on main page > Show > Hidden Date Activities Type Please select an option =$news_type_list;?> Activities Information Title Date Time Location Fee Introduction =$e_act_intro?> Content =$e_act_content?> Special =$e_act_spec?> Speaker =$e_act_speak?> Schedule =$e_act_schedule?> Note =$e_act_ware?> Activities Information (繁體中文) Title (繁體中文) Date (繁體中文) Time (繁體中文) Location (繁體中文) Fee (繁體中文) Introduction (繁體中文) =$zh_act_intro?> Content (繁體中文) =$zh_act_content?> Special (繁體中文) =$zh_act_spec?> Speaker (繁體中文) =$zh_act_speak?> Schedule (繁體中文) =$zh_act_schedule?> Note (繁體中文) =$zh_act_ware?> Activities Information (簡体中文) Title (簡体中文) Date (簡体中文) Time (簡体中文) Location (簡体中文) Fee (簡体中文) Introduction (簡体中文) =$sc_act_intro?> Content (簡体中文) =$sc_act_content?> Special (簡体中文) =$sc_act_spec?> Speaker (簡体中文) =$sc_act_speak?> Schedule (簡体中文) =$sc_act_schedule?> Note (簡体中文) =$sc_act_ware?> =$files_content?>