Newer
Older
skip-web / archive / index / minato2014 / hoge.rb
#!/usr/bin/env ruby
#coding:utf-8

require 'cgi'
require 'cgi/session'
require 'nkf'

cgi = CGI.new(:accept_charset=>"UTF-8")
print("Content-type: text/html; charset=UTF-8\n\n")

name = NKF.nkf('-w',ARGV[0])
png = ARGV[1].to_s+ARGV[2].to_s
png = NKF.nkf('-w',png)
lv = 1

printf(<<_EOS_,"こ","こ","に","ス","タ","ン","プ","と","か")
<html>
<head>
<title>てすと</title>

</head>
<body>
<div class="main">
<h1>スタンプラリー</h1>
<table border="1">
<tr><td>%s</td><td>%s</td><td>%s</td></tr>
<tr><td>%s</td><td>%s</td><td>%s</td></tr>
<tr><td>%s</td><td>%s</td><td>%s</td></tr>
</table>
_EOS_

printf(<<_EOS_,name,png,lv)
<div class="gazo">
<p>%sさん</p>
<img src="%s.png">
</div>
<div class="rpg">
LV:%d
</div>
</div>
</body>
</html>
_EOS_