window.alert("ระบบได้บันทึกประกาศและแสดงหน้าบริการสมาชิกเรียบร้อยแล้ว") '; echo ""; exit(); }else{ echo ' '; echo ""; exit(); } }else{ echo ' '; echo ""; exit(); } } if($_POST["actions"] == "Delete"){ $status = delete_value_sql($_POST["table"],$_POST["id"]); if($status){ $action_page = $_POST["table"]; $action_id = $_POST["id"]; $table = "weblog_action"; $condition = "(action_do,action_desc,action_id,user,ipconnect,date_log,connectby)"; $value = "('".$action_page."','Delete','".$action_id."','".$member_no."','".$ipconnect."','".$date_log."','".$connectby."')"; $status = insert_value_sql($table,$condition,$value); if($status){ echo ' '; echo ""; }else{ echo ' '; echo ""; } }else{ echo ' '; echo ""; } }elseif($_POST["actions"] == "Update"){ $table = "webnews"; $count_edit = get_single_value_sql("select count_edit as count_edit from webnews where id = '".$_POST["id"]."' ","count_edit"); $count_edit = $count_edit+1; $condition = "where id = '".$_POST["id"]."' "; $value = "n_topic = '".$_POST["n_topic"]."', n_details = '".addslashes($_POST["n_details"])."', n_date = '".$date_log."', count_edit = '".$count_edit."', who_edit = '".$member_no."' "; if(update_value_sql($table,$condition,$value)){ $action_page = $table; $table = "weblog_action"; $condition = "(action_do,action_desc,action_id,user,ipconnect,date_log,connectby)"; $value = "('".$action_page."','update','".$_POST["id"]."','".$member_no."','".$ipconnect."','".$date_log."','".$connectby."')"; $status = insert_value_sql($table,$condition,$value); if($status){ echo ' '; echo ""; exit(); }else{ echo ' '; echo ""; exit(); } }else{ echo ' '; echo ""; exit(); } } ?>