|
|
Ŭ¶ó¿ìµåű×
Javascript PHP asp CSS HTML mysql jquery image Mobile API slide °Ô½ÃÆÇ ¸Þ´º
|
|
ÇöÀçÁ¢¼ÓÀÚ ¸í |
|
|
|
|
|
|
164 |
| |
1,135 |
| |
2002-04-16 15:12:00 |
|
|
|
´Ð³×ÀÓ
|
Anonymous |
À̸ÞÀÏ
|
|
Á¦¸ñ
|
°í¼ö´Ô...¹æ¸í·Ï¼Ò½ºÀε¥...¿¡·¯³³´Ï´Ù..¼öÁ¤¿¡°üÇÑÁ¶¾ðÁ»¿ä.. |
³»¿ë
|
|
CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: Unrecognized character \277 at C:\iis\wwwroot\guest\list.pl line 10. ----------------------À§¿Í°°Àº ¿¡·¯°¡ ¹ß»ýÇÕ´Ï´Ù------------- ¹Ø¿¡´Â ¼Ò½ºÀε¥....¸®½ºÆ®¸¦ º¸¿©ÁÖ´Â ³»¿ëÀÇ list.plÆÄÀÏÀÔ´Ï´Ù ¹®¹ý¿¡ ÀÌ»óÀÌ Àִ°ÇÁö¿ä??? ¾Ë·ÁÁÖ¼¼¿ä.. -------------------------< ¼Ò ½º >-------------------------- #!c:/perl/bin/perl.exe require "c:\\iis\\wwwroot\\config\\cgi-lib.pl"; &ReadParse(*in); use DBI; print "Content-type: text/html\n\n"; $uname2= ¿î¿µÀÚ; ##°ü¸®ÀÚ Á¤º¸(°íÁ¤ ´äº¯ÀÎ) $email2=master\@dasanchain.com; $temple=$in{codeno2}; $anstemp1=$in{codenogo}; $anstemp2=$in{textans}; $e=$in{lastnum}; ##lastnumÀ» È®ÀÎ ÇØÁÖ´Â ÇÔ¼ö if($temple eq c){ &rewrite; } $pages=20; #ÆäÀÌÁö ÁöÁ¤ $adder=0; $pagepage=$in{gopage}; &title_form; &checkdb; &paging; $user=$in{names}; $email=$in{email}; $title=$in{title}; $text=$in{text}; $check2=$in{check}; $j=0; if ($check2 eq ok){ $j=0; if ($user eq ""){ $temp="À̸§À» ³ÖÁö ¾ÊÀ¸¼Ì±º¿ä!!"; $j=$j+1; } if ($email eq ""){ $email=space; } if ($title eq ""){ $temp1="Á¦¸ñÀ» ³Ö¾î ÁÖ¼¼¿ä!!"; $j=$j+1; } if ($text eq ""){ $temp2="³»¿ëÀ» ³Ö¾î ÁÖ¼¼¿ä!!"; $j=$j+1; } if ($j > 0 ){ &error_form; }else{ &write_form; } } if ($j eq 0){ &list_form; } exit; sub title_form{ print << "H_E_A_D"; Welcome to dasan align=center> | | | H_E_A_D } sub error_form{ print <<" B_O_X";
B_O_X1 }
sub checkdb{ ### ### µðºñ¸¦ üũÇؼ..¼ø¹ø ³Ö±â....ÀϷùøÈ£ °¡Àå ³ôÀº°Å ÃßÃâ ### $dbh = DBI-> connect('DBI:ODBC:order_id_ord','sa','') || die $DBI::errstr; $sth = $dbh->prepare( q{SELECT MAX(pno) FROM list1 }); $sth ->execute;
while(($pno) = $sth->fetchrow_array){ $pagecount=$pno; $pno=$pno+1; $pnos=$pno; } $sth->finish;
} sub checkdb1{ ### ### µðºñ¸¦ üũÇؼ..¼ø¹ø ³Ö±â....ÀϷùøÈ£ °¡Àå ³ôÀº°Å ÃßÃâ ### $dbh = DBI->connect('DBI:ODBC:order_id_ord','sa','') || die $DBI::errstr; $sth = $dbh->prepare( q{SELECT MAX(pno) FROM ans1 }); $sth ->execute;
while(($pno) = $sth->fetchrow_array){ $pagecount=$pno; $pno=$pno+1; $pnos=$pno; } $sth->finish;
}
sub write_form{ &checkdb; &get_date; $codes=$pnos-$date; #ÄÚµå º¯¼ö....
$onoff=off; $hits=0; $dbh = DBI->connect('DBI:ODBC:order_id_ord','sa','') || die $DBI::errstr; $sth = $dbh->prepare( q{SELECT hits FROM list1 WHERE code_num=?}); $sth ->execute($codeno);
while(($hit) = $sth->fetchrow_array){ $hits = $hit; } $hits =$hits + 1; $sth->finish;
$dbh = DBI->connect('DBI:ODBC:order_id_ord','sa','') || die $DBI::errstr; $intosql = $dbh -> prepare(q{INSERT into list1(pno,code_num,uname,email,titlename,textbody,ansonoff,dates,hits) values (?,?,?,?,?,?,?,?,?)}); $intosql -> execute($pnos,$codes,$user,$email,$title,$text,$onoff,$date2,$hits); $intosql->finish; }
sub get_date { local( $sec, $min, $hour, $monthofday, $month, $year, $wday, $day, $isdst ) = localtime( time );
$month = ($month+1); $year = ($year+1900); $date = $month$monthofday$hour$min$sec; $date2 = $year/$month/$monthofday; return $date,$date2; }
sub list_form {
print <<" H_E_A_D1";
| t_a_i_l } sub paging { ### ### ÆäÀÌÁö ¼ö ±¸ÇÏ´Â ÇÔ¼ö ### ### $fullpage = $pagecount / $pages; $adder = $pagecount % $pages; if ($adder eq 0){ $pagetemp=$fullpage; }else{ $pagetemp=$fullpage+1; } $page=int($pagetemp); if ($pagepage eq ""){ $nowpage=1; }else{ $nowpage=$pagepage; } } sub listoutput { ### ÆäÀÌÁö º° Ãâ·Â ÇØÁÖ´Â ºÎºÐ... &checkdb; ################################¸¶Áö¸· ¹øÈ£ if ($nowpage eq 1){ $e = $pagecount - ( $pages -1); # $s=$pagecount; }else{ $tempx = $pagecount - ($nowpage * $pages); $e= $tempx +1; # $s=$e -1; #pagecount - ($nowpage * $pages) ; # Ãâ·Â ÇØÁÖ´Â ¸¶Áö¸· ºÎºÐ... ¿¬»ê ## ¸¶Áö¸· ¹øÈ£°¡ $e°¡ µÈ´Ù...¸¶Áö¸· ¹øÈ£¿¡¼.. 1À» »©¸é.. ½ÃÀÛ ¹øÈ£ ### ¹ö±×°¡ µÇ´Â ¿øÀÎ... ½ÃÀÛ ¹øÈ£ ±¸º°½Ã.. ¸·Áö¸· ¹øÈ£·Î ¿¬»ê Çϸé.. ¾ÈµÊ.... } ############################ ################################ Ãâ·Â ÇØÁÖ´Â ½ÃÀÛ ¹øÈ£ ºÎºÐ ¿¬»ê $q=$e + ($pages - 1); if ($q < 1){ $s = 1; }else{ $s=$q; } ################################# $dbh = DBI->connect('DBI:ODBC:order_id_ord','sa','') || die $DBI::errstr; $sth = $dbh->prepare( q{SELECT pno,code_num,uname,email,titlename,textbody,ansonoff,dates FROM list1 where pno <= ? and pno >= ? order by pno DESC}); $sth ->execute($s,$e); ### ### $s ¿Í $e´Â À½....½ÃÀÛ°ú ³¡ÆäÀÌÁö.. È®ÀÎ ½ÃÄÑ Áִ°Å... ### while(($pnos,$codes,$uname,$email,$title,$text,$onoff,$dates) = $sth->fetchrow_array){ print <<" F_O_R_M"; $pnos | href=showlist.pl?codeno=$codes&reading=r&count=0>$title | $uname | $dates | F_O_R_M
############################# ´äº¯ À¯¹« Ç¥½Ã...########################
if($onoff =~ /on/){ ###~ /on/°°Àº ¹®ÀåÀÌ ÀÖÀ»¶§!!!
print ; print ; print ; $dbg = DBI->connect('DBI:ODBC:order_id_ord','sa','') || die $DBI::errstr; $stg = $dbg->prepare( q{SELECT hits FROM ans1 WHERE code_num=?}); $stg ->execute($codes); while(($hits) = $stg->fetchrow_array){ $hitz = $hits; } $stg->finish;
}else{ print $dbw = DBI->connect('DBI:ODBC:order_id_ord','sa','') || die $DBI::errstr; $stw = $dbw->prepare( q{SELECT hits FROM list1 WHERE code_num=?}); $stw ->execute($codes); while(($hits) = $stw->fetchrow_array){ $hitz = $hits; } $stw->finish; } ##############################################################
print <<"F_O_R_M1";
| $hitz | | F_O_R_M1
} ###whileÀÇ ³¡ ºÎºÐ
print ;
for ($i=1;$i <= $page;$i++){ if( $i != $nowpage){ print[; } print $i; if( $i != $nowpage){ print ]; } print }
print | ;
print <<"F_O_R_M2";
value=Write onclick="ifcheck(this.form);"> | F_O_R_M2
$sth->finish; }
sub rewrite{
### #### ### ´äº¯ÀÌ ÀÖ´Â °ÍÀ» Ç¥½Ã ÇϱâÀ§ÇØ.... #### ### ####
$dbh = DBI->connect('DBI:ODBC:order_id_ord','sa','') || die $DBI::errstr; $sth = $dbh->repare( q{SELECT pno,code_num,uname,email,titlename,textbody,ansonoff,dates,hits FROM list1 where code_num = ?}); $sth ->execute($anstemp1); while(($pnos,$codes,$uname,$email,$title,$text1,$onoff,$dates,$hits) = $sth->fetchrow_array){ $temp1=$pnos; $temp2=$codes; $temp3=$uname; $temp4=$email; $temp5=$title; $temp6=$text1; $temp7=$onoff; $temp8=$dates; $temp9=$hits; } $sth->finish;
&checkdb1;
$dbh = DBI->connect('DBI:ODBC:order_id_ord','sa','') || die $DBI::errstr; $intosql = $dbh -> prepare(q{INSERT into ans1(pno,code_num,uname,email,titlename,textbody1,textbody2,dates,hits) values (?,?,?,?,?,?,?,?,?)}); $intosql -> execute($pnos,$temp2,$uname2,$email2,$temp5,$temp6,$anstemp2,$temp8,$temp9); $intosql->finish;
###################################¿©±â±îÁö°¡.. ÀúÀå.. ÀÚ·á....#######
##### updateÇÏ´Â °÷........
$onoff=on; $dbh = DBI->connect('DBI:ODBC:order_id_ord','sa','') || die $DBI::errstr; $sth = $dbh->prepare( q{update list1 set ansonoff=? where code_num =?}); $sth ->execute($onoff,$anstemp1);
$sth->finish;
} #!c:/perl/bin/perl.exe require "c:\\iis\\wwwroot\\config\\cgi-lib.pl"; &ReadParse(*in); use DBI;
print "Content-type: text/html\n\n";
$uname2= ¿î¿µÀÚ; ##°ü¸®ÀÚ Á¤º¸(°íÁ¤ ´äº¯ÀÎ) $email2=master\@dasanchain.com;
$temple=$in{codeno2}; $anstemp1=$in{codenogo}; $anstemp2=$in{textans}; $e=$in{lastnum}; ##lastnumÀ» È®ÀÎ ÇØÁÖ´Â ÇÔ¼ö
if($temple eq c){ &rewrite; }
$pages=20; #ÆäÀÌÁö ÁöÁ¤ $adder=0;
$pagepage=$in{gopage};
&title_form; &checkdb; &paging;
$user=$in{names}; $email=$in{email}; $title=$in{title}; $text=$in{text}; $check2=$in{check};
$j=0;
if ($check2 eq ok){
$j=0; if ($user eq ""){ $temp="À̸§À» ³ÖÁö ¾ÊÀ¸¼Ì±º¿ä!!"; $j=$j+1; } if ($email eq ""){ $email=space; } if ($title eq ""){ $temp1="Á¦¸ñÀ» ³Ö¾î ÁÖ¼¼¿ä!!"; $j=$j+1; } if ($text eq ""){ $temp2="³»¿ëÀ» ³Ö¾î ÁÖ¼¼¿ä!!"; $j=$j+1; } if ($j > 0 ){ &error_form; }else{ &write_form; } }
if ($j eq 0){
&list_form; } exit;
sub title_form{ print << "H_E_A_D";
Welcome to dasan
align=center> | | | H_E_A_D } sub error_form{ print <<" B_O_X";
B_O_X1 }
sub checkdb{ ### ### µðºñ¸¦ üũÇؼ..¼ø¹ø ³Ö±â....ÀϷùøÈ£ °¡Àå ³ôÀº°Å ÃßÃâ ### $dbh = DBI-> connect('DBI:ODBC:order_id_ord','sa','') || die $DBI::errstr; $sth = $dbh->prepare( q{SELECT MAX(pno) FROM list1 }); $sth ->execute;
while(($pno) = $sth->fetchrow_array){ $pagecount=$pno; $pno=$pno+1; $pnos=$pno; } $sth->finish;
} sub checkdb1{ ### ### µðºñ¸¦ üũÇؼ..¼ø¹ø ³Ö±â....ÀϷùøÈ£ °¡Àå ³ôÀº°Å ÃßÃâ ### $dbh = DBI->connect('DBI:ODBC:order_id_ord','sa','') || die $DBI::errstr; $sth = $dbh->prepare( q{SELECT MAX(pno) FROM ans1 }); $sth ->execute;
while(($pno) = $sth->fetchrow_array){ $pagecount=$pno; $pno=$pno+1; $pnos=$pno; } $sth->finish;
}
sub write_form{ &checkdb; &get_date; $codes=$pnos-$date; #ÄÚµå º¯¼ö....
$onoff=off; $hits=0; $dbh = DBI->connect('DBI:ODBC:order_id_ord','sa','') || die $DBI::errstr; $sth = $dbh->prepare( q{SELECT hits FROM list1 WHERE code_num=?}); $sth ->execute($codeno);
while(($hit) = $sth->fetchrow_array){ $hits = $hit; } $hits =$hits + 1; $sth->finish;
$dbh = DBI->connect('DBI:ODBC:order_id_ord','sa','') || die $DBI::errstr; $intosql = $dbh -> prepare(q{INSERT into list1(pno,code_num,uname,email,titlename,textbody,ansonoff,dates,hits) values (?,?,?,?,?,?,?,?,?)}); $intosql -> execute($pnos,$codes,$user,$email,$title,$text,$onoff,$date2,$hits); $intosql->finish; }
sub get_date { local( $sec, $min, $hour, $monthofday, $month, $year, $wday, $day, $isdst ) = localtime( time );
$month = ($month+1); $year = ($year+1900); $date = $month$monthofday$hour$min$sec; $date2 = $year/$month/$monthofday; return $date,$date2; }
sub list_form {
print <<" H_E_A_D1";
| t_a_i_l }
sub paging { ### ### ÆäÀÌÁö ¼ö ±¸ÇÏ´Â ÇÔ¼ö ### ###
$fullpage = $pagecount / $pages; $adder = $pagecount % $pages;
if ($adder eq 0){ $pagetemp=$fullpage; }else{ $pagetemp=$fullpage+1; } $page=int($pagetemp);
if ($pagepage eq ""){ $nowpage=1; }else{ $nowpage=$pagepage; }
}
sub listoutput { ### ÆäÀÌÁö º° Ãâ·Â ÇØÁÖ´Â ºÎºÐ... &checkdb;
################################¸¶Áö¸· ¹øÈ£ if ($nowpage eq 1){ $e = $pagecount - ( $pages -1); # $s=$pagecount; }else{ $tempx = $pagecount - ($nowpage * $pages); $e= $tempx +1;
# $s=$e -1; #pagecount - ($nowpage * $pages) ; # Ãâ·Â ÇØÁÖ´Â ¸¶Áö¸· ºÎºÐ... ¿¬»ê ## ¸¶Áö¸· ¹øÈ£°¡ $e°¡ µÈ´Ù...¸¶Áö¸· ¹øÈ£¿¡¼.. 1À» »©¸é.. ½ÃÀÛ ¹øÈ£ ### ¹ö±×°¡ µÇ´Â ¿øÀÎ... ½ÃÀÛ ¹øÈ£ ±¸º°½Ã.. ¸·Áö¸· ¹øÈ£·Î ¿¬»ê Çϸé.. ¾ÈµÊ.... }
############################
################################ Ãâ·Â ÇØÁÖ´Â ½ÃÀÛ ¹øÈ£ ºÎºÐ ¿¬»ê $q=$e + ($pages - 1);
if ($q < 1){ $s = 1; }else{
$s=$q; } #################################
$dbh = DBI->connect('DBI:ODBC:order_id_ord','sa','') || die $DBI::errstr; $sth = $dbh->prepare( q{SELECT pno,code_num,uname,email,titlename,textbody,ansonoff,dates FROM list1 where pno <= ? and pno >= ? order by pno DESC}); $sth ->execute($s,$e); ### ### $s ¿Í $e´Â À½....½ÃÀÛ°ú ³¡ÆäÀÌÁö.. È®ÀÎ ½ÃÄÑ Áִ°Å... ###
while(($pnos,$codes,$uname,$email,$title,$text,$onoff,$dates) = $sth->fetchrow_array){
print <<" F_O_R_M";
$pnos | href=showlist.pl?codeno=$codes&reading=r&count=0>$title | $uname | $dates | F_O_R_M
############################# ´äº¯ À¯¹« Ç¥½Ã...########################
if($onoff =~ /on/){ ###~ /on/°°Àº ¹®ÀåÀÌ ÀÖÀ»¶§!!!
print ; print ; print ; $dbg = DBI->connect('DBI:ODBC:order_id_ord','sa','') || die $DBI::errstr; $stg = $dbg->prepare( q{SELECT hits FROM ans1 WHERE code_num=?}); $stg ->execute($codes); while(($hits) = $stg->fetchrow_array){ $hitz = $hits; } $stg->finish;
}else{ print $dbw = DBI->connect('DBI:ODBC:order_id_ord','sa','') || die $DBI::errstr; $stw = $dbw->prepare( q{SELECT hits FROM list1 WHERE code_num=?}); $stw ->execute($codes); while(($hits) = $stw->fetchrow_array){ $hitz = $hits; } $stw->finish; } ##############################################################
print <<"F_O_R_M1";
| $hitz | F_O_R_M1
} ###whileÀÇ ³¡ ºÎºÐ
print ;
for ($i=1;$i <= $page;$i++){ if( $i != $nowpage){ print[; } print $i; if( $i != $nowpage){ print ]; } print }
print | ;
print <<"F_O_R_M2";
value=Write onclick="ifcheck(this.form);"> | F_O_R_M2
$sth->finish; }
sub rewrite{
### #### ### ´äº¯ÀÌ ÀÖ´Â °ÍÀ» Ç¥½Ã ÇϱâÀ§ÇØ.... #### ### ####
$dbh = DBI->connect('DBI:ODBC:order_id_ord','sa','') || die $DBI::errstr; $sth = $dbh->repare( q{SELECT pno,code_num,uname,email,titlename,textbody,ansonoff,dates,hits FROM list1 where code_num = ?}); $sth ->execute($anstemp1); while(($pnos,$codes,$uname,$email,$title,$text1,$onoff,$dates,$hits) = $sth->fetchrow_array){ $temp1=$pnos; $temp2=$codes; $temp3=$uname; $temp4=$email; $temp5=$title; $temp6=$text1; $temp7=$onoff; $temp8=$dates; $temp9=$hits; } $sth->finish;
&checkdb1;
$dbh = DBI->connect('DBI:ODBC:order_id_ord','sa','') || die $DBI::errstr; $intosql = $dbh -> prepare(q{INSERT into ans1(pno,code_num,uname,email,titlename,textbody1,textbody2,dates,hits) values (?,?,?,?,?,?,?,?,?)}); $intosql -> execute($pnos,$temp2,$uname2,$email2,$temp5,$temp6,$anstemp2,$temp8,$temp9); $intosql->finish;
###################################¿©±â±îÁö°¡.. ÀúÀå.. ÀÚ·á....#######
##### updateÇÏ´Â °÷........
$onoff=on; $dbh = DBI->connect('DBI:ODBC:order_id_ord','sa','') || die $DBI::errstr; $sth = $dbh->prepare( q{update list1 set ansonoff=? where code_num =?}); $sth ->execute($onoff,$anstemp1);
$sth->finish;
}
|
|
|
|
|
|
|
|
|
|