🚀 Advanced Web Server Manager
Complete File Manager & Terminal - Standalone Version
By Sid Gifari | Gifari Industries
Current path:
/
/
home
/
users
/
2
/
fujibow
/
web
/
@180914
/
solution
/
fujibow
/
public
✏️
Editing: Daily_index.cgi
#!/usr/bin/perl -- #********************************************************** # ����ץ�ץ���ࡡ�ģ¤��ͤ��ɤ߹���Ǥ��Τޤ�ɽ�� #********************************************************** #=====�������============================================== use dbAccess1; # DB����⥸�塼�� require './cgi-lib.pl'; # http�ѥ⥸�塼�� #=====�ѿ���============================================== # DB�ǡ������Ǽ�������� my (@mData,$sql,$user_name,$user_id_mask); # ���ѥ����� my ($i,$j); # ���ѥե饰 my $flag; # �Ǹ������ꥹ���� my $Listvalue; # �ե�����ǡ�����Ǽ my %form_data; #=====�����============================================== my $homeURL="/solution/fujibow/public"; my $imageURL="$homeURL/images"; my $mContentType = '<META http-equiv="Content-Type" content="text/html; charset=EUC-JP">'; #=====�ե�����ǡ�����Ǽ���================================ &ReadParse(\%form_data); #=====main���============================================== { my $sql = "select * from T_M_STORE WHERE VALID_FLAG='1'"; @mData = dbAccess1::getSelect_data($sql); if ($mData[0] == 0){ &errorOut("notfound"); }else{ &getCookie(); if($Listvalue eq ""){ $Listvalue="???"; } $Listvalue = $COOKIE{'STORE_CODE'}; $Date_Y = $COOKIE{'OBJECT_DATE_Y'}; $Date_M = $COOKIE{'OBJECT_DATE_M'}; $Date_D = $COOKIE{'OBJECT_DATE_D'}; &outHTML(); } } #=========================================================== #=====Error���============================================== sub errorOut { my $flag = $_[0]; print "Content-type:text/html\n\n"; print <<EOF; <html> <head> <meta http-equiv="Content-Language" content="ja"> $mContentType <META http-equiv="Content-Style-Type" content="text/css"> <title>���顼����</title> </head> <body> <center> <h3>���顼����</h3> <P>Ź������Ͽ����Ƥ��ޤ��������ƥ����Ԥˤ���ǧ�ꤤ�ޤ�</p> <hr> <a href="JavaScript:history.back()"><IMG src="$imageURL/button2.gif" width="67" height="52" border="0" alt="�������"></a> </center> </body> </html> EOF } #=====HTML����============================================== sub outHTML { print "Content-type:text/html\n\n"; print <<EOF; <HTML> <meta http-equiv="Content-Language" content="ja"> $mContentType <HEAD> <title>�ٻ��ɿ幩�ȡ�������Web�����ƥࡡ��˥塼����</title> <link rel="stylesheet" type="text/css" href="default.css"/> <script language="JavaScript"> function goNext(inFlag){ //�����̵���������å� for(i=0; i<document.frmMain.length; i++){ if(document.frmMain.elements[i].type=="text"){ if(document.frmMain.elements[i].value==""){ alert("���٤Ƥι��ܤ���Ϥ��Ƥ�������"); document.frmMain.elements[i].focus(); document.frmMain.elements[i].select(); return false; } } } //Ⱦ�ѿ��ͤ���Ϥ���Ƥ��뤫�����å� for(i=0; i<document.frmMain.length; i++){ if(document.frmMain.elements[i].type=="text"){ if(isNaN(document.frmMain.elements[i].value)==true){ alert("Ⱦ�Ѥο��ͤ���Ϥ��Ƥ�������"); document.frmMain.elements[i].focus(); document.frmMain.elements[i].select(); return false; } } } setCookie("STORE_CODE", document.frmMain.T_STORE_CODE.value); setCookie("OBJECT_DATE_Y", document.frmMain.OBJECT_DATE_Y.value); setCookie("OBJECT_DATE_M", document.frmMain.OBJECT_DATE_M.value); setCookie("OBJECT_DATE_D", document.frmMain.OBJECT_DATE_D.value); if (inFlag == 1){ document.frmMain.action = "dailyInput.cgi"; }else if (inFlag == 2){ document.frmMain.action = "dailyInputCard.cgi"; }else if (inFlag == 3){ document.frmMain.action = "dailyInputSiire.cgi"; } document.frmMain.submit(); } function setCookie(key, val, tmp) { tmp = key + "=" + escape(val) + "; "; tmp = tmp + "expires=Tue, 31-Dec-2030 23:59:59; "; document.cookie = tmp; } </script> </HEAD> <BODY> <CENTER> <form name="frmMain" method="POST"> <DIV> <TABLE border="1" width="40%"> <TR><TD width="20%" bgcolor="#99CCFF"><FONT color="#FFFFFF">Ź��̾</FONT></TD> <TD width="50%"> <select size="1" name="T_STORE_CODE"> EOF # ���ʸ�롼��(����ǡ����������ܤʤΤ�$i+4) for ($i=0; $i<scalar(@mData); $i=$i+4){ if($Listvalue eq $mData[$i]){ print <<EOF; <option value="$mData[$i]" selected>$mData[$i+1]</option> EOF }else{ print <<EOF; <option value="$mData[$i]">$mData[$i+1]</option> EOF } } print <<EOF; </TR> <TR> <TD width="20%" bgcolor="#99CCFF"><FONT color="#FFFFFF">�о�ǯ���</FONT></TD> <TD width="60%"> <INPUT type="text" value="$Date_Y" name="OBJECT_DATE_Y" size="14" maxlength="4"/>ǯ <INPUT type="text" value="$Date_M" name="OBJECT_DATE_M" size="7" maxlength="2"/>�� <INPUT type="text" value="$Date_D" name="OBJECT_DATE_D" size="7" maxlength="2"/>� </TD> </TR> </TABLE> </DIV> <HR> </select></p> </form> <TABLE border="1" width="60%"> <TR> <TD width="2%" height="27"><img border="0" src="$imageURL/point.gif" width="13" height="13"></a></td> <TD width="98%" height="27"><a href="JavaScript:goNext(1)"><img border="0" src="$imageURL/dailyInput.gif"></a></td> </TR> <TR> <TD width="2%" height="27"><img border="0" src="$imageURL/point.gif" width="13" height="13"></a></td> <TD width="98%" height="27"><a href="JavaScript:goNext(2)"><img border="0" src="$imageURL/dailyInputCard.gif"></a></td> </TR> <TR> <TD width="2%" height="27"><img border="0" src="$imageURL/point.gif" width="13" height="13"></a></td> <TD width="98%" height="27"><a href="JavaScript:goNext(3)"><img border="0" src="$imageURL/dailyInputSiire.gif"></a></td> </TR> </TABLE> </CENTER> </BODY> </HTML> EOF } #sub getCookie{ # local($CookieValue, $xx, $name, $value); # $Cookievalue = $ENV{'HTTP_COOKIE'}; # ($name, $value) = split(/=/, $Cookievalue); # $Listvalue = $value; #} sub getCookie { local($xx, $name, $value); foreach $xx (split(/; */, $ENV{'HTTP_COOKIE'})) { ($name, $value) = split(/=/, $xx); $value =~ s/%([0-9A-Fa-f][0-9A-Fa-f])/pack("C", hex($1))/eg; $COOKIE{$name} = $value; } }
💾 Save Changes
❌ Cancel