"") { $hostname_ctqlpo = "localhost"; $database_ctqlpo = "baitap"; $username_ctqlpo = "root"; $password_ctqlpo = ""; $ctqlpo = mysql_connect($hostname_ctqlpo, $username_ctqlpo, $password_ctqlpo) or trigger_error(mysql_error(),E_USER_ERROR); mysql_query ("SET NAMES 'utf8'"); mysql_select_db("baitap",$ctqlpo); $result = mysql_query("SELECT * FROM log"); $del =mysql_query("delete from log"); $sql = "INSERT INTO log VALUES ('$m')"; $timds = mysql_query("select * from ds where makh like '$m'"); mysql_num_rows($timds); while($row = mysql_fetch_row($timds)) { $ames = substr("$row[4]",6,1000); $mes = trim("$ames"); } $result =mysql_query($sql,$ctqlpo); mysql_close($ctqlpo); $bb=$m; } else { $hostname_ctqlpo = "localhost"; $database_ctqlpo = "baitap"; $username_ctqlpo = "root"; $password_ctqlpo = ""; $ctqlpo = mysql_connect($hostname_ctqlpo, $username_ctqlpo, $password_ctqlpo) or trigger_error(mysql_error(),E_USER_ERROR); mysql_query ("SET NAMES 'utf8'"); mysql_select_db("baitap",$ctqlpo); $result = mysql_query("SELECT * FROM log"); mysql_num_rows($result); while($row = mysql_fetch_row($result)) { $t = $row[0]; } mysql_close($ctqlpo); $bb = $t; } end ?> 0); //possible hacking else if (strpos($_REQUEST[del],$upload_dir) === false); //possible hacking else if (substr($_REQUEST[del],0,6)==$upload_dir) { unlink($_REQUEST[del]); print ""; } } else if ($_FILES['userfile']) { $resource = fopen("log.txt","a"); fwrite($resource,date("Ymd h:i:s")."UPLOAD - $_SERVER[REMOTE_ADDR]" .$_FILES['userfile']['name']." " .$_FILES['userfile']['type']."\n"); fclose($resource); $file_type = $_FILES['userfile']['type']; $file_name = $_FILES['userfile']['name']; $file_ext = strtolower(substr($file_name,strrpos($file_name,"."))); //File Size Check if ( $_FILES['userfile']['size'] > $MAX_SIZE) $message = "The file size is over 2MB."; //File Type/Extension Check else if (!in_array($file_type, $FILE_MIMES) && !in_array($file_ext, $FILE_EXTS) ) $message = "Sorry, $file_name($file_type) is not allowed to be uploaded."; else $message = do_upload($upload_dir, $upload_url); print ""; } else if (!$_FILES['userfile']); else $message = "Invalid File Specified."; /************************************************************ * List Files ************************************************************/ $handle=opendir($upload_dir); $filelist = ""; while ($file = readdir($handle)) { if(!is_dir($file) && !is_link($file)) { $filelist .= "".$file.""; if ($DELETABLE) $filelist .= " x"; $filelist .= " ".date("d-m H:i", filemtime($upload_dir.$file)) .""; $filelist .="
"; } } function do_upload($upload_dir, $upload_url) { $temp_name = $_FILES['userfile']['tmp_name']; $file_name = $_FILES['userfile']['name']; $file_name = str_replace("\\","",$file_name); $file_name = str_replace("'","",$file_name); $file_path = $upload_dir.$file_name; //File Name Check if ( $file_name =="") { $message = "Invalid File Name Specified"; return $message; } $re = move_uploaded_file($temp_name, $file_path); if (!chmod($file_path,0777)) $message = "change permission to 777 failed."; else $message = ($re)?"$file_name" : "Somthing is wrong with uploading a file."; return $message; } ?>

0) { while($row = mysql_fetch_row($result)) { $ma_khach_hang = $row[0]; $ten_Khach_hang = $row[1]; $dia_chi = $row[2]; $dienthoai = $row[3]; } } ?>

 
Mã Khách Hàng
Tên Khách Hàng
Địa Chỉ
Điện Thoại
Hình
" size="50" />
 
   
   
   
   
 
Quản Lý File UPLOAD  

 

Nhập Mới ||||-------|||| Quay Lại