20251030

20251030

You are currently viewing a revision titled "20251030", saved on 2025年10月30日 7:46 PM by Nimedi Chanchala
タイトル
20251030
コンテンツ
edit.cgi   #!/usr/bin/perl BEGIN{ $| = 1; print "Content-type: text/html\n\n"; open(STDERR, ">&STDOUT"); } use CGI; $query = new CGI; open(IN, "< save.txt"); @data=<IN>; close (IN); print <<END; <html> <head> <title>フォトデータベース edit</title> </head> <body bgcolor="#FFFFFF" text="#000000"> <div align="center"> <h1><b>フォトデータベース edit</b></h1> </div> <hr> <form action="editc.cgi" method="POST"> <table border="1" width="100%"> <tr> <td>年月日</td><td>名前</td><td>category</td><td>画像</td><td>修正ボタン</td> </tr> END for($i=0;$i<@data;$i++){ @retudata=split(/\t/,$data[$i]); for($j=0;$j<=$retudata;$j++) {print"<tr>\n"; print"<td>@retudata[0]</td><td>@retudata[1]</td><td>@retudata[2]</td> <td><img.jpg=\"images/@retudata[3]\"width=\"100px\"height=\"auto\"></td> <td><input type=\"submit\" value=\"$i\" name=\"edit\"></tr>\n"; } }; print"</table></form></body></html>";   editc.cgi #!/usr/bin/perl BEGIN{ $| = 1; print "Content-type: text/html\n\n"; open(STDERR, ">&STDOUT"); } use CGI; $query = new CGI; $edit = $query->param('edit'); open(IN, "< save.txt"); @data=<IN>; close (IN); print <<END; <html> <head> <title>フォトデータベース edit</title> <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS"> </head> <body bgcolor="#FFFFFF" text="#000000"> <div align="center"> <h1><b>フォトデータベース edit</b></h1> </div> <hr> END @cdata=@data[$edit]; ################################################### for($i=0;$i<@cdata;$i++){ @moto=split(/\t/,$cdata[$i]); }; ###################################### print"<form method=\"POST\" name=\"formin\" action=\"iedit.cgi\" enctype=\"multipart/form-data\" >\n"; print"お名前 <input type=\"text\" name=\"name\" value=\"$moto[1]\"><br>\n"; print"カテゴリー:<input type=\"text\" name=\"category\" value=\"$moto[2]\"><br>\n"; print"<input type=\"hidden\" name=\"mphoto\" value=\"$moto[3]\">\n"; print"<input type=\"hidden\" name=\"edit\" value=\"$edit\">\n"; print"<p><input type=\"file\" name=\"upload_file\" size=\"32\"></p>\n"; print"<p><input type=\"submit\" name=\"submit\" value=\"send\"><input type=\"reset\" name=\"submit2\" value=\"reset\"></p>\n"; print"</form>\n"; print"<hr>\n"; print"</body></html>\n";
抜粋
脚注


Old New Date Created Author Actions
2025年10月30日 11:11 AM Nimedi Chanchala
2025年10月30日 10:46 AM Nimedi Chanchala

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です