$domain_root = $_SERVER["DOCUMENT_ROOT"]; $LIB_PATH=$domain_root."/php-lib"; $DB_USER="brigon"; $DB_PWD ="brigon0"; $DB_NAME="brigon_db"; include("$LIB_PATH/Mysql.php"); include("$LIB_PATH/Common.php"); //------------------------------------------------------------ // connect mysql //------------------------------------------------------------ connect_mysql("localhost","$DB_USER","$DB_PWD","$DB_NAME"); //------------------------------------------------------------ $auth_cnt = GetFetch("count(idx)","authorization","idx"); if($cmd == 'write_save'){ if(!$name || !$juminNo || !$address) ErrorMsg("À̸§,ÁֹιøÈ£,ÁÖ¼Ò´Â Çʼö ÀԷ»çÇ× ÀÔ´Ï´Ù"); //Áֹεî·Ï Áߺ¹Ã¼Å© if(GetFetch("count(idx)","authorization","juminNo='$juminNo'") > 0)ErrorMsg("�̹� ������ �� �ּ̽��ϴ�."); $que = "INSERT INTO authorization VALUES('', '����ħ��������È�¶��μ���','$name', '$juminNo','$email', '$address'"; $que.= ",'$REMOTE_ADDR','$HTTP_USER_AGENT', curdate(), curtime())"; $res = mysql_query($que, $connect); //if(!$res) { $reg_date = date("Y-m-d"); $reg_time = date("H:i:s"); $data = "$name|$juminNo|$email|$address|$REMOTE_ADDR|$HTTP_USER_AGENT|$reg_date|$reg_time\n"; $fp = fopen("./authorization.dat", "a+"); fputs($fp, $data); fclose($fp); echo(""); MetaRefresh("/"); exit; } require("./include/html_head.inc.php"); //////////////////////////////////////////////////////////////////////////////// ?>
require("./include/html_foot.inc.php"); ?>