changeset 557:05303d4b8344

データ消す用見る用プログラム added
author FUJIKAWA Kosuke <c111126@g.koeki-u.ac.jp>
date Wed, 23 Jul 2014 16:01:44 +0900
parents 0737d2036cef
children d197617be7b9
files delete.html delete.rb etsuran.rb minato2014/delete.html minato2014/delete.rb minato2014/etsuran.rb
diffstat 6 files changed, 206 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/delete.html	Wed Jul 23 16:01:44 2014 +0900
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title>Database delete</title>
+</style>
+<link rel="stylesheet" type="text/css" href="design.css">
+</head>
+
+<body>
+<h1>若帥若号サ</h1>
+<p>絎茵若帥若鴻ゃ障</p>
+<p>絎茵羈</p>
+<form method="POST" action="./delete.rb">
+<p>綵羔障?<br>
+<input type="radio" name="check" value="OK"> 
+<input type="radio" name="check" value="NO">
+</p>
+<input type="submit" value="">
+<input type="reset" value="祉">
+</form>
+
+<address>c111126@g.koeki-u.ac.jp</address>
+
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/delete.rb	Wed Jul 23 16:01:44 2014 +0900
@@ -0,0 +1,36 @@
+#!/usr/bin/env ruby
+# -*- coding: utf-8 -*-
+
+require 'sqlite3'
+require 'cgi'
+
+db = SQLite3::Database.new("/sql/stamp.sq3")
+
+c = CGI.new(:accept_charaset => "UTF-8")
+check = c['check']
+if check = "OK"
+  begin
+    db.execute("drop table main;")
+    db.extcute("drop table logs;")
+    text = "<p>若帥ゃ障</p>"
+  rescue
+    text = "<p>若帥障</p>"
+  end
+else
+  text = "若帥ゃ障"
+end
+
+printf("Content-type: text/html; charset=UTF-8\n\n")
+
+printf'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title>Delete table</title>
+<link rel="stylesheet" type="text/css" href="design.css">
+</head>
+</body>
+%s
+<p><a href="etsuran.rb">若翠画Η若吾</a></p>
+<p></p>
+</body></html>
+',text
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etsuran.rb	Wed Jul 23 16:01:44 2014 +0900
@@ -0,0 +1,41 @@
+#!/usr/bin/env ruby
+#coding:utf-8
+
+require'cgi'
+require'sqlite3'
+
+db = SQLite3::Database.new("../sql/stamp.sq3")
+
+c = CGI.new(:accept_charaset => "UTF-8")
+
+flag = 0
+text = "<p>脂画筝荀с茵腓冴障</p>\n"
+begin
+  result = db.execute("select * from main;")
+rescue
+  flag = 1
+  text = "<p>若帥障</p>\n"
+end
+
+printf("Content-type: text/html; charset=UTF-8\n\n")
+
+printf'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h
+tml4/strict.dtd">
+<html>
+<head>
+<title>Delete table</title>
+<link rel="stylesheet" type="text/css" href="design.css">
+</head>
+</body>
+<h1>若翠画Η若</h1>'
+puts text
+if flag == 1
+else
+  print"<table border = 1>\n"
+  result.each do |line|
+    printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n",line[0],line[1],line[2],line[3],line[4],line[8],line[9])
+  end
+ print"</table>"
+end
+
+print'</body></html>'
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/minato2014/delete.html	Wed Jul 23 16:01:44 2014 +0900
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+	"http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title>Database delete</title>
+</style>
+<link rel="stylesheet" type="text/css" href="design.css">
+</head>
+
+<body>
+<h1>若帥若号サ</h1>
+<p>絎茵若帥若鴻ゃ障</p>
+<p>絎茵羈</p>
+<form method="POST" action="./delete.rb">
+<p>綵羔障?<br>
+<input type="radio" name="check" value="OK"> 
+<input type="radio" name="check" value="NO">
+</p>
+<input type="submit" value="">
+<input type="reset" value="祉">
+</form>
+
+<address>c111126@g.koeki-u.ac.jp</address>
+
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/minato2014/delete.rb	Wed Jul 23 16:01:44 2014 +0900
@@ -0,0 +1,36 @@
+#!/usr/bin/env ruby
+# -*- coding: utf-8 -*-
+
+require 'sqlite3'
+require 'cgi'
+
+db = SQLite3::Database.new("/sql/stamp.sq3")
+
+c = CGI.new(:accept_charaset => "UTF-8")
+check = c['check']
+if check = "OK"
+  begin
+    db.execute("drop table main;")
+    db.extcute("drop table logs;")
+    text = "<p>若帥ゃ障</p>"
+  rescue
+    text = "<p>若帥障</p>"
+  end
+else
+  text = "若帥ゃ障"
+end
+
+printf("Content-type: text/html; charset=UTF-8\n\n")
+
+printf'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title>Delete table</title>
+<link rel="stylesheet" type="text/css" href="design.css">
+</head>
+</body>
+%s
+<p><a href="etsuran.rb">若翠画Η若吾</a></p>
+<p></p>
+</body></html>
+',text
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/minato2014/etsuran.rb	Wed Jul 23 16:01:44 2014 +0900
@@ -0,0 +1,41 @@
+#!/usr/bin/env ruby
+#coding:utf-8
+
+require'cgi'
+require'sqlite3'
+
+db = SQLite3::Database.new("../sql/stamp.sq3")
+
+c = CGI.new(:accept_charaset => "UTF-8")
+
+flag = 0
+text = "<p>脂画筝荀с茵腓冴障</p>\n"
+begin
+  result = db.execute("select * from main;")
+rescue
+  flag = 1
+  text = "<p>若帥障</p>\n"
+end
+
+printf("Content-type: text/html; charset=UTF-8\n\n")
+
+printf'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h
+tml4/strict.dtd">
+<html>
+<head>
+<title>Delete table</title>
+<link rel="stylesheet" type="text/css" href="design.css">
+</head>
+</body>
+<h1>若翠画Η若</h1>'
+puts text
+if flag == 1
+else
+  print"<table border = 1>\n"
+  result.each do |line|
+    printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n",line[0],line[1],line[2],line[3],line[4],line[8],line[9])
+  end
+ print"</table>"
+end
+
+print'</body></html>'

yatex.org