/* Decoded by unphp.net */ ?>$limitdate){ header("HTTP/1.0 503 Service Unavailable"); die(); }else{ //echo "기한내 사용가능"; } function dbopen($db){ $conn = mysqli_connect("localhost","joeunedu","joeunedu19",$db,"3306"); mysqli_set_charset($conn,"utf8"); return $conn; } function dbclose($con){ mysqli_close($con); } function dbget($sql,$con){ $result = mysqli_query($con,$sql) or sdie('dbget error:'.$sql.'['.$_SERVER["SCRIPT_NAME"].']'); $tmpval = array(); while($rs = @mysqli_fetch_array($result,MYSQLI_BOTH)){ $tmpval[] = $rs; } return $tmpval; } function dbget_NUM($sql,$con){ $result = mysqli_query($con,$sql) or sdie('dbget error:'.$sql.'['.$_SERVER["SCRIPT_NAME"].']'); $tmpval = array(); while($rs = @mysqli_fetch_array($result,MYSQLI_NUM)){ $tmpval[] = $rs; } return $tmpval; } function dbget_ASSOC($sql,$con){ $result = mysqli_query($con,$sql) or sdie('dbget error:'.$sql.'['.$_SERVER["SCRIPT_NAME"].']'); $tmpval = array(); while($rs = @mysqli_fetch_array($result,MYSQLI_ASSOC)){ $tmpval[] = $rs; } return $tmpval; } function dbgetone($sql,$con){ $result = @mysqli_query($con,$sql) or sdie('dbget error:'.$sql.'['.$_SERVER["SCRIPT_NAME"].']'); $rs = @mysqli_fetch_array($result,MYSQLI_NUM); if($rs) return $rs[0]; else return false; } function dbgetline($sql,$con){ $result = @mysqli_query($con,$sql) or sdie('dbget error:'.$sql.'['.$_SERVER["SCRIPT_NAME"].']'); $rs = @mysqli_fetch_array($result,MYSQLI_BOTH); if($rs) return $rs; else return false; } function dbgetline_NUM($sql,$con){ $result = @mysqli_query($con,$sql) or sdie('dbget error:'.$sql.'['.$_SERVER["SCRIPT_NAME"].']'); $rs = @mysqli_fetch_array($result,MYSQLI_NUM); if($rs) return $rs; else return false; } function dbgetline_ASSOC($sql,$con){ $result = @mysqli_query($con,$sql) or sdie('dbget error:'.$sql.'['.$_SERVER["SCRIPT_NAME"].']'); $rs = @mysqli_fetch_array($result,MYSQLI_ASSOC); if($rs) return $rs; else return false; } function dbin($sql,$con){ $result = @mysqli_query($con,$sql) or sdie('dbin error:'.$sql.'['.$_SERVER["SCRIPT_NAME"].']'); return mysqli_insert_id($con); //return @mysql_query("select last_insert_id()",$con); /*if($result){ $rs2 = @mysql_query("select last_insert_id()",$con); $rs = @mysql_fetch_array($rs2); return $rs[0]; }*/ } function dbexe($sql,$con){ $result = @mysqli_query($con,$sql) or sdie('dbexe error:'.$sql.'['.$_SERVER["SCRIPT_NAME"].']'); return $result; } function last_insert_id($con){ return @mysqli_query($con,"select last_insert_id()"); } function sdie($str){ //error_log($str); //die($str); } ?>