wherelingo rondoo runs the sho

Javascript must be enabled for the correct page display
Pools & Spas
This is the place to discuss the ins and outs of swimming pools and spas, like how to have one built, how to maintain them, how to keep uninvited "guests" from dropping by, etc.
on using the forum are provided below. To report abuse or violations of our forums, please contact
Related forums:  
  |  
  |  
Somebody said to me, "But the Beatles were antimaterialistic." That's a huge myth. John and I literally used to sit down and say "Now, let's write a swimming pool." - Paul McCartney
What's New on GardenWeb:    
My yard is being !
Who makes the ?
Know of a gardening event in your area? Add it to our .
On-Topic Discussions & & [Switch to: &]
Posted by: Robert.In.TX
on Thu, Nov 27, 14 at
Posted by: tracik
on Tue, Nov 25, 14 at 13:59
Posted by: eaglemom100
on Fri, Nov 21, 14 at 16:59
Posted by: poolmd
on Sun, Nov 23, 14 at
9:34 7 follow-ups, last one posted on Wed, Nov 26, 14 at 22:07
Posted by: ajax2112
on Mon, Nov 17, 14 at 13:04 1 follow-up, posted on Wed, Nov 26, 14 at
Posted by: elyn00
on Mon, Oct 20, 14 at 22:27 3 follow-ups, last one posted on Tue, Nov 25, 14 at 15:50
Posted by: GarrettP1
on Sun, Sep
8, 13 at 17:15 6 follow-ups, last one posted on Tue, Nov 25, 14 at 15:46
Posted by: kands
on Sun, Aug 10, 14 at 12:49 33 follow-ups, last one posted on Tue, Nov 25, 14 at
Posted by: dumbcluck
on Thu, Sep
5, 13 at 16:32 79 follow-ups, last one posted on Mon, Nov 24, 14 at 20:26
Posted by: tsco
on Sun, Nov 23, 14 at
2:41 4 follow-ups, last one posted on Mon, Nov 24, 14 at 13:30
Posted by: jszz
on Tue, Nov 18, 14 at 23:08 2 follow-ups, last one posted on Sun, Nov 23, 14 at 18:28
Posted by: barkster
on Tue, Oct 21, 14 at 22:52 4 follow-ups, last one posted on Sun, Nov 23, 14 at 13:52
Posted by: ktwood
on Tue, Nov 11, 14 at 21:17
Posted by: EMLINK2
on Thu, Nov
6, 14 at 13:50 2 follow-ups, last one posted on Sun, Nov 23, 14 at
Posted by: chris1ton
on Fri, Apr
8:14 14 follow-ups, last one posted on Sat, Nov 22, 14 at 11:52
Posted by: animallover5
on Mon, Nov 17, 14 at 18:55 5 follow-ups, last one posted on Sat, Nov 22, 14 at 10:16
Posted by: junitas
on Wed, Nov 19, 14 at
3:21 4 follow-ups, last one posted on Fri, Nov 21, 14 at
Posted by: lisadlu
on Wed, Nov 12, 14 at 19:29 2 follow-ups, last one posted on Thu, Nov 20, 14 at 10:07
Posted by: Judit1011
on Mon, Nov 10, 14 at 20:20 8 follow-ups, last one posted on Thu, Nov 20, 14 at
Posted by: jszz
on Tue, Nov 18, 14 at 20:22 1 follow-up, posted on Wed, Nov 19, 14 at 15:11
Posted by: zagyzebra
on Sat, Nov
8, 14 at 21:21
Posted by: pfkaplan1
on Tue, Nov 18, 14 at 16:30 1 follow-up, posted on Tue, Nov 18, 14 at 19:29
Posted by: Spangenberg
on Fri, Aug 23, 13 at 17:17 5 follow-ups, last one posted on Tue, Nov 18, 14 at 17:55
Posted by: lisadlu
on Thu, Nov 13, 14 at 18:39 1 follow-up, posted on Sun, Nov 16, 14 at 20:53
Posted by: todd99
on Sat, Apr 12, 14 at 11:29 9 follow-ups, last one posted on Sat, Nov 15, 14 at 20:58
Posted by: corporate_zombie
on Tue, Nov
4, 14 at 14:00
Posted by: rockybird
on Fri, Nov
8:56 3 follow-ups, last one posted on Thu, Nov 13, 14 at
Posted by: fourbelles
on Fri, Oct 17, 14 at 10:07
Posted by: omny
on Sat, May
7:17 6 follow-ups, last one posted on Wed, Nov 12, 14 at 12:53
Posted by: trisr
on Wed, Jul 16, 14 at 10:32 8 follow-ups, last one posted on Wed, Nov 12, 14 at
  |  
Page: 1  
On-Topic Discussions & & [Switch to: &]&&
Search:     This Forum   Entire Site  
Post a Message to the Forum
Please Note:
are able to post messages to this forum. &&&&If you are a member, please &&&&If you aren't yet a member,
Information about Posting
You must be
to post a message. Once you are logged in, a posting window will appear at the bottom of the messages. If you are not a member, please
for an account.
Please review our Rules of Play
before posting.
Posting is a two-step process. Once you have composed your message, you
will be taken to the preview page. You will then have a chance to review your
post, make changes and upload photos.
After posting your message, you may need to refresh the forum page in
order to see it.
Before posting copyrighted material, please read about .
We have a strict no-advertising
If you would like to practice posting or uploading photos, please visit
If you need assistance, please Contact Us and we
will be happy to help.
Learn more about in-text links on this page here
Most Recent Posts
&&by&stuartkweston &&by&ann_t &&by&beth &&by&katiec &&by&konrad___far_north &&by&lkz5ia &&by&stuartkweston &&by&Bear_With_Me &&by&jillie1 &&by&badgergalExplore GardenWeb
Ann's Cream Cheese Babka
Feeding Hummingbirds
ItsTheDetails' Kitchen Reveal
Sep 18, 2014&-&Dec 18, 2014Pittsburgh, PA&Nov 2014Everet, WA&Dec 4, 2014 at 1 pmCorvallis, ORL W Seminar&Dec 6, 2014 at 10 amJacksonville, FLPlant S Garden Tour&Dec 6, 2014 at 11 amWoodland, WAL W Seminar&
Sister Sites#!/usr/bin/perl
#┌─────────────────────────────────
#│ CLIP BOARD v1.41 ()
#│ Copyright(C) Kent Web 2001
#│ webmaster@
#│ http://www./
#└─────────────────────────────────
$ver = 'ClipBoard v1.41';
#┌─────────────────────────────────
#│ [注意倳項]
#│ 1. このスクリプトはフリーソフトです。このスクリプトを使用した
いかなる損害に対して作者は一切の責任を負いません。
#│ 2. 設置に関する質問はサポート掲示板にお願いいたします。
直接メールによる質問は一切お受けいたしておりません。
#│ 3. このスクリプトは、method=POST 専用です。
#│ 4. 同梱のアイコンは再配布で著作権者は以下のとおりです。
home.gif : mayuRinさん
clip.gif : 牛飼いとアイコンの部屋さん
#└─────────────────────────────────
# [ 設置構成例 ] : かっこ内はパーミッション値
public_html / index.html (ホームページなど)
+-- clip / clip.cgi
cgi-lib.pl [644]
+-- img [777] / clip.gif
+-- lock [777] /
#============#
#============#
# ライブラリ取り込み
require './jcode.pl';
require './cgi-lib.pl';
# タイトル洺
$title = "松江のお得情報";
# タイトル文字の色
$t_color = "#800000";
# タイトル攵字のタイプ
$t_face = "MS Pゴシック";
# タイトル文字サイズ(スタイルシートで有効)
$t_point = '20pt';
# 本文文字サイズ(スタイルシートで有効)
$b_size = '10pt';
# 記事題名の色
$sub_color = "green";
# スクリプト名
# → 絶対パスなら http:// からのURLパス
$script = './clip.cgi';
# ログファイル名
# → 絶対パスなら / から始まるパス(http://からではないので注意)
$logfile = './clip.log';
# 管理用パスワード
$pass = '220020';
# 最大記事数(これを超える記事は古い順に削除されます)
$max = 30;
$home = "http://www./";
# bodyタグ
$body = '';
# URLの自動リンク (0=no 1=yes)
# → タグ許可の場合は no とすること。
$autolink = 1;
# 1ページあたりの記事表示件數
$p_log = 10;
# ロックファイル機構 (0=no 1=symlink関数 2=mkdir関数)
$lockkey = 0;
# ロックファイル名
# → 絶対パスなら / から始まるパス(http://からではないので注意)
$lockfile = './lock/clip.lock';
# アップロードディレクトリ
# → パスの最後は / で終わること
# → フルパスだと / から記述する
$ImgDir = "./img/";
# アップロードディレクトリのURLパス
# → パスの最後は / で終わること
#$ImgUrl = "http://www.xxx.xxx/clip/img/";
$ImgUrl = "./img/";
# 画像管悝者チェック機能 (0=no 1=yes)
# → アップロード「画像」は管理者がチェックしないと表示されない機能です
# → チェックされるまで「画像」は「COMMING SOON」のアイコンが表示されます
$ImageCheck = 1;
# 投稿処理の権限
0: 誰でも投稿可能
1: 管理者のみが投稿
$PostMode = 1;
# 添付ファイルのアップロードに失敗したとき
0 : 添付ファイルは無視し、記事は受理する
1 : エラー表示して処理を中断する
$clip_err = 1;
# タグ許可 (0=no 1=yes)
$tagkey = 0;
# メール通知機能
1: yes:自分の投稿記事もメール通知する
2: yes:自分の投稿記事はメール通知しない
$mailing = 0;
# sendmailのパス(メール通知する場合)
$sendmail = '/usr/lib/sendmail';
# メール通知先アドレス(メール通知する場匼)
$mailto = 'xxx@xxx.xxx';
# タグ広告挿入オプション (FreeWebなど)
の代わりに「広告タグ」を挿入する。
# → 広告タグ以外に、MIDIタグ や LimeCounter等のタグにも使用可能です。
$banner1 = '';
# 表示蔀上部に挿入
$banner2 = '';
# 表示部下部に挿入
# アクセス制限(ホスト名を記述)
"cache*.*.",
# リンク元チェック (0=no 1=yes)
# → いたずら投稿防止に「リンク元」チェックを行う場合
$LinkCheck = 0;
# 同一ホストからの連続投稿を制限
# → 秒数を記述するとその時間以上を経過しないと連続投稿できない
# → 投稿を管理者限定にする場匼 ($PostMode=1;) はこの設定は無視されます
$w_regist = '60';
# タイトル画像を使う場合 (http://から画像を指定)
$ImgT = "";
# タイトル画像を使う場合に「横幅」「縦幅」をそれぞれピクセル數で記述
$ImgW = 300;
$ImgH = 70;
# アップロードを許可するファイル形式
= 1; # GIFファイル
= 1; # JPEGファイル
= 1; # PNGファイル
= 1; # TEXTファイル
= 0; # LHAファイル
= 0; # ZIPファイル
= 1; # PDFファイル
= 1; # MIDIファイル
= 0; # WORDファイル
$excel = 0; # EXCELファイル
= 0; # POWERPOINTファイル
= 0; # RAMファイル
= 0; # RMファイル
= 0; # MPEGファイル
= 0; # MP3ファイル
# 投稿受理最大サイズ (bytes)
# → 例 : 102400 = 100KB
$cgi_lib'maxdata = '51200';
# 画像ファイルの最夶表示の大きさ(単位:ピクセル)
# → これを超える画像は縮小表示します
$MaxW = 550; # 横幅
$MaxH = 200; # 縦幅
# アイコン画像ファイル名 (ファイル名のみ)
$IconHome = "home.gif";
$IconClip = "clip.gif";
# クリップ
$IconSoon = "soon.gif";
# COMINIG SOON
# サブメッセージ
# → タイトルの下にサブメッセージを記述できます
# → HTMLタグなどを使ってご自由にどうぞ
$SubMsg = <<'_SUB_MSG_';
#============#
#============#
if ($ImgDir !? /?/$/) { $ImgDir .= "/"; }
if ($ImgUrl !? /?/$/) { $ImgUrl .= "/"; }
if ($mode eq 'regist') { & }
elsif ($mode eq 'find') { & }
elsif ($mode eq 'admin') { & }
elsif ($mode eq 'usrdel') { & }
elsif ($mode eq 'note') { & }
elsif ($mode eq 'check') { & }
#----------------#
アクセス制限
#----------------#
sub axs_check {
# ホスト名を取得
foreach (@deny) {
if (!$_) { }
s/?*/?.?*/g;
if ($host =? /$_/i) { $flag=1; }
if ($flag) { &error("アクセスを許可されていません"); }
#----------------#
記事表示処理
#----------------#
sub html {
# レス処悝
if ($mode eq 'resmsg') {
open(IN,"$logfile") || &error("Open Error : $logfile");
while () {
($no,$date,$name,$mail,$sub,$com,$url) = split(//);
if ($in{'no'} eq "$no") { $flag=1; }
close(IN);
if ($flag == 0) { &error("該当記事が見つかりません"); }
=? s/^Re://g;
$r_sub = "Re:[$no] $sub";
$r_com = "& $com";
$r_com =? s/&/?&/g;
$r_com =? s/&//g;
$r_com =? s//?r& /
$r_com =? s/]
# 投稿フォーム
if (!$PostMode) { & }
# ページ区切り処理
$start = $in{'page'} + 1;
= $in{'page'} + $p_
open(IN,"$logfile") || &error("Open Error : $logfile");
while () {
($no,$date,$name,$mail,$sub,$com,$url,
$host,$pw,$tail,$W,$H,$time2,$chk) = split(//);
if ($mail) { $name = ""; }
if ($url) { $url = ""; }
print "[$no] $sub ";
print "投稿者:$name 投稿日:$date ";
# 返信のリンク
if (!$PostMode) {
print "[] ";
print "& $url ?n?n";
# 添付ファイルが存在する場合
if (-e "$ImgDir$no$tail") {
if ($tail eq ".gif" || $tail eq ".jpg" || $tail eq ".png") {
if ($ImageCheck && $chk != 1) {
print "?n";
} elsif ($W && $H) {
print "?n";
print "?n";
print "$com?n";
print "$com $no$tail?n";
} else { print "$com?n"; }
print "?n";
close(IN);
$next_page = $in{'page'} + $p_
$back_page = $in{'page'} - $p_
print "?n";
if ($back_page >= 0) {
print "?n";
print "?n";
print "?n";
print "?n";
if ($next_page < $i) {
print "?n";
print "?n";
print "?n";
print "?n";
print "?n";
# 削除フォーム
if (!$PostMode) {
print "?n";
print "?n";
print "?n";
print "記事No?n";
print "削除キー?n";
print "?n";
print "?n";
# 著作権表示(削除?改変は禁止)
print "$banner2?n";
print "?n?n?n";
#----------------#
書きこみ処理
#----------------#
sub regist {
# POSTチェック
if (!&MethPost()) { &error("METHOD形式が POST でありません"); }
# パスワードチェック
if ($PostMode && $in{'pass'} ne $pass) { &error("パスワードが認証できません"); }
# リンク元チェック
if ($LinkCheck) {
$FullUrl = &MyFullUrl();
$ref = $ENV{'HTTP_REFERER'};
$ref =? s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/
if ($ref !? /$FullUrl/i)
{ &error("リンク元が不正のため投稿が受理できません"); }
# フォーム内容をチェック
if ($in{'name'} eq "") { &error("洺前が入力されていません"); }
if ($in{'comment'} eq "") { &error("コメントが入力されていません"); }
# ロック処理
if ($lockkey) { & }
open(IN,"$logfile") || &error("Open Error : $logfile");
@lines = ;
close(IN);
($tno,$tdate,$tname,$tmail,$tsub,$tcom,
$turl,$thost,$tpw,$ttail,$tw,$th,$ttime) = split(//, $lines[0]);
if ($in{'name'} eq "$tname" && $in{'comment'} eq "$tcom")
{ &error("二重投稿は禁止です"); }
if (!$PostMode && $w_regist && $times - $ttime < $w_regist)
{ &error("連続投稿はもうしばらく時間を置いてからお願い致します"); }
# 記事Noを採番
$no = $tno + 1;
# 削除キーを暗号化
if ($in{'pwd'} ne "") { $PW = &encrypt($in{'pwd'}); }
# URL自動リンク
if ($autolink) { &auto_link($in{'comment'}); }
# 最大記事数処理
while ($max <= @lines) {
$del = pop(@lines);
local($no,$date,$name,$mail,$sub,$com,$url,$host,$pw,$tail)
= split(//, $del);
if (-e "$ImgDir$no$tail") { unlink("$ImgDir$no$tail"); }
# ファイル添付処理
if ($in{'upfile'}) { &UpF }
unshift(@lines,"$no$date$in{'name'}$in{'email'}$in{'sub'}$in{'comment'}$in{'url'}$host$PW$tail$W$H$times?n");
open(OUT,">$logfile") || &error("Write Error : $logfile");
print OUT @
close(OUT);
# ロック解除
if ($lockkey) { & }
# クッキー格納処理
if ($in{'cook'} eq 'on') { &set_ }
# メール通知処理
if ($mailing == 1) { &mail_ }
elsif ($mailing == 2 && $in{'email'} ne "$mailto") { &mail_ }
# 管悝者限定投稿の完了画面
if ($PostMode && $in{'action'} eq "regist") {
print "?n";
print "記事は正常に登録できました?n";
print "?n?n";
print "?n";
print "?n";
print "?n";
print "?n";
print "?n";
print "?n";
print "?n?n?n";
#--------------------#
画像アップロード
#--------------------#
sub UpFile {
# 画像処理
$macbin=0;
foreach (@in) {
if ($_ =? /(.*)Content-type:(.*)/i) { $tail=$2; }
if ($_ =? /(.*)filename=(.*)/i) { $fname=$2; }
if ($_ =? /application?/x-macbinary/i) { $macbin=1; }
$tail =? s/?r//g;
$tail =? s/?n//g;
# $fname =? s/?"//g;
$fname =? tr/?"?x0D?x0A//d;
# ファイル形式を認識
if ($tail =? /image?/gif/i && $gif) { $tail=".gif"; $flag=1; }
if ($tail =? /image?/jpeg/i && $jpeg) { $tail=".jpg"; $flag=1; }
if ($tail =? /image?/x-png/i && $png) { $tail=".png"; $flag=1; }
if ($tail =? /text?/plain/i && $text) { $tail=".txt"; $flag=1; }
if ($tail =? /lha/i && $lha) { $tail=".lzh"; $flag=1; }
if ($tail =? /zip/i && $zip) { $tail=".zip"; $flag=1; }
if ($tail =? /pdf/i && $pdf) { $tail=".pdf"; $flag=1; }
if ($tail =? /audio?/.*mid/i && $midi) { $tail=".mid"; $flag=1; }
if ($tail =? /msword/i && $word) { $tail=".doc"; $flag=1; }
if ($tail =? /ms-excel/i && $excel) { $tail=".xls"; $flag=1; }
if ($tail =? /ms-powerpoint/i && $ppt) { $tail=".ppt"; $flag=1; }
if ($tail =? /audio?/.*realaudio/i && $ram) { $tail=".ram"; $flag=1; }
if ($tail =? /application?/.*realmedia/i && $rm) { $tail=".rm"; $flag=1; }
if ($tail =? /video?/.*mpeg/i && $mpeg) { $tail=".mpg"; $flag=1; }
if ($tail =? /audio?/.*mpeg/i && $mp3) { $tail=".mp3"; $flag=1; }
if (!$flag) {
if ($fname =? /?.gif$/i && $gif) { $tail=".gif"; $flag=1; }
if (($fname =? /?.jpe?g$/i && $jpeg)) { $tail=".jpg"; $flag=1; }
if ($fname =? /?.png$/i && $png) { $tail=".png"; $flag=1; }
if ($fname =? /?.lzh$/i && $lha) { $tail=".lzh"; $flag=1; }
if ($fname =? /?.txt$/i && $text) { $tail=".txt"; $flag=1; }
if ($fname =? /?.zip$/i && $zip) { $tail=".zip"; $flag=1; }
if ($fname =? /?.pdf$/i && $pdf) { $tail=".pdf"; $flag=1; }
if ($fname =? /?.mid$/i && $midi) { $tail=".mid"; $flag=1; }
if ($fname =? /?.doc$/i && $word) { $tail=".doc"; $flag=1; }
if ($fname =? /?.xls$/i && $excel) { $tail=".xls"; $flag=1; }
if ($fname =? /?.ppt$/i && $ppt) { $tail=".ppt"; $flag=1; }
if ($fname =? /?.ram$/i && $ram) { $tail=".ram"; $flag=1; }
if ($fname =? /?.rm$/i && $rm) { $tail=".rm"; $flag=1; }
if ($fname =? /?.mpe?g$/i && $mpeg) { $tail=".mpg"; $flag=1; }
if ($fname =? /?.mp3$/i && $mp3) { $tail=".mp3"; $flag=1; }
# アップロード失敗処理
if (!$flag && !$clip_err) { }
elsif (!$flag && $clip_err) {
&error("アップロードできないファイル形式です");
$upfile = $in{'upfile'};
# マックバイナリ対策
if ($macbin) {
$length = substr($upfile,83,4);
$length = unpack("%N",$length);
$upfile = substr($upfile,128,$length);
# 添付データを書き込み
$ImgFile = "$ImgDir$no$tail";
if (!open(OUT,"> $ImgFile")) {
if ($clip_err) { &error("画像のアップロードに失敗しました"); }
binmode(OUT);
binmode(STDOUT);
print OUT $
close(OUT);
chmod (0666,$ImgFile);
# 画像サイズ取得
if ($tail eq ".jpg") { ($W, $H) = &JpegSize($ImgFile); }
elsif ($tail eq ".gif") { ($W, $H) = &GifSize($ImgFile); }
elsif ($tail eq ".png") { ($W, $H) = &PngSize($ImgFile); }
# 画像表示縮尛
if ($W > $MaxW || $H > $MaxH) {
$W2 = $MaxW / $W;
$H2 = $MaxH / $H;
if ($W2 < $H2) { $key = $W2; }
else { $key = $H2; }
$W = int ($W * $key) || 1;
$H = int ($H * $key) || 1;
#--------------#
ワード検索
#--------------#
sub find {
print <<"EOM";
ワード検索
検索したいキーワードを入力し「検索」ボタンを押してください。
キーワードは「半角スペース」で区切って複数指定することができます。
キーワード
foreach ("AND", "OR") {
if ($in{'cond'} eq $_) {
print "$_?n";
print "$_?n";
print "?n?n?n";
# ワード検索の実行と結果表示
if ($in{'word'} ne "") {
# キーワードを配列囮
$in{'word'} =? s/ / /g;
@pairs = split(/?s+/, $in{'word'});
# 検索処理
print "?n";
open(IN,"$logfile") || &error("Open Error : $logfile");
while () {
foreach $pair (@pairs) {
if (index($_,$pair) >= 0) {
if ($in{'cond'} eq 'or') { }
if ($in{'cond'} eq 'and') { $flag=0; }
if ($flag == 0) { }
# 結果を表示
($no,$date,$name,$mail,$sub,$com,$url,$host,$pw) = split(//);
if ($mail) { $name = ""; }
if ($url) { $url = ""; }
print "[$no] $sub ";
print "投稿者:$name
投稿日:$date?n";
print "$com$url?n";
close(IN);
print "- 検索結果は $i件です -?n";
print "?n?n";
#--------------#
管理モード
#--------------#
sub admin {
if ($in{'pass'} ne "" && $in{'pass'} ne "$pass") {
&error("パスワードが違います");
if ($PostMode && $in{'action'} eq "form") { &PostF }
print "[]?n";
print "?n";
print "管理モード?n";
print "?n";
if ($in{'pass'} eq "") {
print "パスワードを入力して下さい?n";
print "?n";
print "?n";
if ($PostMode) {
print "ログ管理?n";
print "記事投稿?n";
print "?n";
# 画像許可
if ($in{'chk'}) {
@CHK = split(/?0/, $in{'chk'});
# ロック処理
if ($lockkey) { & }
# 画像情報をマッチングし更新
open(IN,"$logfile") || &error("Open Error : $logfile");
@lines = ;
close(IN);
foreach (@lines) {
($no,$date,$name,$mail,$sub,$com,$url,
$host,$pw,$tail,$w,$h,$time2,$chk) = split(//);
foreach $xx (@CHK) {
if ($no eq "$xx") {
$_="$no$date$name$mail$sub$com$url$host$pw$tail$w$h$time21?n";
push(@new,$_);
open(OUT,">$logfile") || &error("Write Error : $logfile");
print OUT @
close(OUT);
# ロック解除
if ($lockkey) { & }
# 削除処理
if ($in{'del'}) {
@DEL = split(/?0/, $in{'del'});
# ロック処理
if ($lockkey) { & }
# 削除情報をマッチングし更新
open(IN,"$logfile") || &error("Open Error : $logfile");
@lines = ;
close(IN);
foreach (@lines) {
($no,$date,$name,$mail,$sub,
$com,$url,$host,$pw,$tail) = split(//);
foreach $del (@DEL) {
if ($no eq "$del") {
if (-e "$ImgDir$no$tail")
{ unlink("$ImgDir$no$tail"); }
if ($flag == 0) { push(@new,$_); }
open(OUT,">$logfile") || &error("Write Error : $logfile");
print OUT @
close(OUT);
# ロック解除
if ($lockkey) { & }
# 削除画面を表示
print "?n";
print "?n";
print "?n";
print "?n?n";
print "記事を削除する場合は「削除」のチェックボックスにチェックを入れ「送信する」を押して下さい。?n";
if ($ImageCheck) { print "画像許可を行なう場合は「画像許可」のチェックボックスにチェックを入れ「送信する」を押して下さい。?n"; }
print "?n?n";
print "?n";
print "削除記事No投稿日題名";
print "投稿者コメントホスト名添付(Bytes)";
if ($ImageCheck) { print "画像許可"; }
print "?n";
open(IN,"$logfile") || &error("Open Error : $logfile");
while () {
$img_flag=0;
($no,$date,$name,$mail,$sub,$com,$url,
$host,$pw,$tail,$w,$h,$time,$chk) = split(//);
($date,$dmy) = split(/?(/, $date);
if ($mail) { $name=""; }
$com =? s///
$com =? s//&/g;
if (length($com) > 40) {
$com = substr($com,0,38);
$com .= "..";
if (-e "$ImgDir$no$tail") {
if ($tail eq ".gif" || $tail eq ".jpg" || $tail eq ".png") {
$img_flag = 1;
$File = "画像";
} else { $File = "File"; }
$clip = "";
$size = -s "$ImgDir$no$tail";
$clip = "";
$size = 0;
print "$no$date$sub";
print "$name$com";
print "$host$clip($size)?n";
# 画像許可
if ($ImageCheck) {
if ($img_flag == 1 && $chk == 1) {
print "OK";
} elsif ($img_flag == 1 && $chk != 1) {
print "?n";
close(IN);
print "?n";
print "?n";
$all = int ($all / 1024);
print "【添付データ総数 : $all KB】?n";
print "?n?n?n";
#------------------#
ユーザ記事削除
#------------------#
sub usrdel {
if ($in{'no'} eq '' || $in{'pwd'} eq '')
{ &error("削除Noまたは削除キーが入力モレです"); }
# ロック処理
if ($lockkey) { & }
open(IN,"$logfile") || &error("Open Error : $logfile");
@lines = ;
close(IN);
foreach (@lines) {
($no,$date,$name,$mail,$sub,$com,$url,$host,$pw,$tail) = split(//);
if ($in{'no'} eq "$no") { $flag=1; $PWD=$ $upfile="$no$tail" }
else { push(@new,$_); }
if ($flag == 0) { &error("該当記事が見当たりません"); }
if ($PWD eq '') { &error("該当記事には削除キーが設定されていません"); }
# 削除キーを照合
$match = &decrypt("$in{'pwd'}","$PWD");
if ($match ne 'yes') { &error("削除キーが違います"); }
# ログを更新
open(OUT,">$logfile") || &error("Write Error : $logfile");
print OUT @
close(OUT);
# 添付ファイルがあれば削除
unlink("$ImgDir$upfile") if (-e "$ImgDir$upfile");
# ロック解除
if ($lockkey) { & }
#----------------#
投稿フォーム
#----------------#
sub form {
# ブラウザ/クッキー情報を取得
print <<"EOM";
メッセージ
if (!$PostMode) {
print "削除キー?n";
print "?n";
print "(記事の削除用。英数芓で8文字以内)?n";
print <<"EOM";
クッキー情報を保存
#------------------------#
管理者用投稿フォーム
#------------------------#
sub PostForm {
print "[]?n";
print "?n";
print "管理者用投稿フォーム?n";
print "?n?n";
#----------------#
デコード処悝
#----------------#
sub decode {
while (($key,$val) = each %in) {
if ($key ne "upfile") {
# シフトJISコードに変換
&jcode'convert(*val, "sjis", "", "z");
# タグ処理
if ($tagkey) {
$val =? s//&&/g;
$val =? s//&/g;
# 改行処理
if ($key eq "comment") {
$val =? s/?r?n//g;
$val =? s/?r//g;
$val =? s/?n//g;
$val =? s/?r//g;
$val =? s/?n//g;
$in{$key} = $
$mode = $in{'mode'};
$in{'url'} =? s/^http?:?/?///;
if ($in{'sub'} eq "") { $in{'sub'} = "無題"; }
# ㄖ時の取得
$ENV{'TZ'} = "JST-9";
($sec,$min,$hour,$mday,$mon,$year,$wday) = localtime($times);
# 日時のフォーマット
@week = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
$date = sprintf("%04d/%02d/%02d(%s) %02d:%02d",
$year+1900,$mon+1,$mday,$week[$wday],$hour,$min);
#--------------#
HTMLヘッダ
#--------------#
sub header {
$head_flag = 1;
print "Content-type: text/html?n?n";
print <<"EOM";
#----------------------#
ブラウザ情報を取得
#----------------------#
sub get_agent {
$agent = $ENV{'HTTP_USER_AGENT'};
if ($agent =? /MSIE 4/i || $agent =? /MSIE 5/i) {
$f_name = 28;
$f_cols = 54;
$f_name = 20;
$f_cols = 55;
#--------------#
エラー処理
#--------------#
sub error {
if ($lockflag) { & }
&header if (!$head_flag);
print "ERROR !?n";
print "$_[0]?n";
print "?n?n?n";
#------------------#
クッキーの発行
#------------------#
sub set_cookie {
($secg,$ming,$hourg,$mdayg,$mong,$yearg,$wdayg) = gmtime(time + 60*24*60*60);
@mons = ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
$date_g = sprintf("%s?, %02d-%s-%04d %02d:%02d:%02d GMT",
$week[$wdayg],$mdayg,$mons[$mong],$yearg+1900,$hourg,$ming,$secg);
$cook="name$in{'name'}?,email$in{'email'}?,url$in{'url'}?,pwd$in{'pwd'}";
print "Set-Cookie: IMGBBS=$ expires=$date_g?n";
#------------------#
クッキーを取得
#------------------#
sub get_cookie {
$ck = $ENV{'HTTP_COOKIE'};
@ck = split(/; /, $ck);
foreach (@ck) {
if ($_ =? /IMGBBS=(.*)/) { $cookdata=$1; }
@pairs = split(/,/, $cookdata);
foreach (@pairs) {
local($key,$val) = split(//);
$COOKIE{$key} = $
= $COOKIE{'name'};
$c_email = $COOKIE{'email'};
= $COOKIE{'url'};
= $COOKIE{'pwd'};
if ($in{'cook'} eq 'on') {
if ($in{'name'})
= $in{'name'}; }
if ($in{'email'}) { $c_email = $in{'email'}; }
if ($in{'url'})
= $in{'url'}; }
if ($in{'pwd'})
= $in{'pwd'}; }
#----------------#
ホスト名取得
#----------------#
sub get_host {
$host = $ENV{'REMOTE_HOST'};
$addr = $ENV{'REMOTE_ADDR'};
if ($host eq "" || $host eq $addr) {
$host = gethostbyaddr(pack("C4", split(/?./, $addr)), 2) || $
#----------------------#
パスワード暗号処理
#----------------------#
sub encrypt {
local($inpw) = $_[0];
local(@SALT, $salt, $encrypt);
@SALT = ('a'..'z', 'A'..'Z', '0'..'9', '.', '/');
$salt = $SALT[int(rand(@SALT))] . $SALT[int(rand(@SALT))];
$encrypt = crypt($inpw, $salt) || crypt ($inpw, '$1$' . $salt);
#----------------------#
パスワード照合処理
#----------------------#
sub decrypt {
local($inpw, $logpw) = @_;
local($salt, $key, $check);
$salt = $logpw =? /^?$1?$(.*)?$/ && $1 || substr($logpw, 0, 2);
$check = "no";
if (crypt($inpw, $salt) eq "$logpw" || crypt($inpw, '$1$' . $salt) eq "$logpw")
{ $check = "yes"; }
#--------------#
ロック処理
#--------------#
sub lock {
# 1分以上古いロックは削除する
if (-e $lockfile) {
local($mtime) = (stat($lockfile))[9];
if ($mtime < time - 60) { & }
local($retry) = 5;
# symlink関数式ロック
if ($lockkey == 1) {
while (!symlink(".", $lockfile)) {
if (--$retry <= 0) { &error('Lock is busy'); }
# mkdir関数式ロック
} elsif ($lockkey == 2) {
while (!mkdir($lockfile, 0755)) {
if (--$retry <= 0) { &error('Lock is busy'); }
$lockflag=1;
#--------------#
ロック解除
#--------------#
sub unlock {
if ($lockkey == 1) { unlink($lockfile); }
elsif ($lockkey == 2) { rmdir($lockfile); }
$lockflag=0;
#--------------#
メール送信
#--------------#
sub mail_to {
= "[$title : $no] $in{'sub'}";
= $in{'sub'};
$m_name = $in{'name'};
= $in{'comment'};
$m_com =? s//?n/
$m_com =? s/&//g;
&jcode'convert(*m_sub,'jis');
&jcode'convert(*m_ttl,'jis');
&jcode'convert(*m_name,'jis');
&jcode'convert(*m_com,'jis');
if (!open(MAIL,"| $sendmail -t")) { &error("メール送信に失敗しました"); }
print MAIL "To: $mailto?n";
print MAIL "Errors-To: $mailto?n";
# メールアドレスがない場合はダミーメールに置き換え
if ($in{'email'} eq "") { $email = 'nomail@xxx.xxx'; }
else { $email = $in{'email'}; }
print MAIL "From: $email?n";
print MAIL "Subject: $m_sub?n";
print MAIL "MIME-Version: 1.0?n";
print MAIL "Content-type: text/ charset=ISO-2022-JP?n";
print MAIL "Content-Transfer-Encoding: 7bit?n";
print MAIL "X-Mailer: $ver?n?n";
print MAIL "--------------------------------------------------------?n";
print MAIL "TIME : $date?n";
print MAIL "HOST : $host?n";
print MAIL "CLIP : $no$tail?n" if ($in{'upfile'});
print MAIL "NAME : $m_name?n";
print MAIL "EMAIL: $in{'email'}?n";
print MAIL "URL
: http://$in{'url'}?n" if ($in{'url'});
print MAIL "TITLE: $m_ttl?n?n";
print MAIL "$m_com?n";
print MAIL "--------------------------------------------------------?n";
close(MAIL);
#--------------#
自動リンク
#--------------#
sub auto_link {
$_[0] =? s/([^=^?"]|^)(http?:[?w?.???-?/???&?=?@?;?#?:?%]+)/$1$2/g;
#------------------#
JPEGサイズ認識
#------------------#
sub JpegSize {
local($jpeg) = @_;
local($t, $m, $c, $l, $W, $H);
open(JPEG, "$jpeg") || return (0,0);
binmode JPEG;
read(JPEG, $t, 2);
while (1) {
read(JPEG, $t, 4);
($m, $c, $l) = unpack("a a n", $t);
if ($m ne "?xFF") { $W = $H = 0; }
elsif ((ord($c) >= 0xC0) && (ord($c) <= 0xC3)) {
read(JPEG, $t, 5);
($H, $W) = unpack("xnn", $t);
read(JPEG, $t, ($l - 2));
close(JPEG);
return ($W, $H);
#-----------------#
GIFサイズ認識
#-----------------#
sub GifSize {
local($gif) = @_;
local($data);
open(GIF,"$gif") || return (0,0);
binmode(GIF);
sysread(GIF,$data,10);
close(GIF);
if ($data =? /^GIF/) { $data = substr($data,-4); }
$W = unpack("v",substr($data,0,2));
$H = unpack("v",substr($data,2,2));
return ($W, $H);
#-----------------#
PNGサイズ認識
# WWWis (/wwwis/) より引用
#-----------------#
sub PngSize {
local($PNG) = @_;
local($head, $a, $b, $c, $d, $e, $f, $g, $h);
open(PNG,"$PNG") || return (0,0);
binmode(PNG);
if (defined(PNG) && read(PNG, $head, 8) == 8 &&
$head eq "?x89?x50?x4e?x47?x0d?x0a?x1a?x0a" &&
read(PNG, $head, 4) == 4 && read(PNG, $head, 4) == 4 &&
$head eq "IHDR" && read(PNG, $head, 8) == 8) {
($a,$b,$c,$d,$e,$f,$g,$h) = unpack("C"x8, $head);
else { return (0,0); }
close(PNG);
return ($a<<24|$b<<16|$c<<8|$d, $e<<24|$f<<16|$g<<8|$h);
#----------------#
留意事項表示
#----------------#
sub note {
print <<"EOM";
ファイル添付時の留意事項
$MaxData = int ($cgi_lib'maxdata / 1024);
if ($gif) { $FILE .= "GIF, "; }
if ($jpeg) { $FILE .= "JPEG, "; }
if ($png) { $FILE .= "PNG, "; }
if ($text) { $FILE .= "TEXT, "; }
if ($lha) { $FILE .= "LHA, "; }
if ($zip) { $FILE .= "ZIP, "; }
if ($pdf) { $FILE .= "PDF, "; }
if ($midi) { $FILE .= "MIDI, "; }
if ($word) { $FILE .= "WORD, "; }
if ($excel) { $FILE .= "EXCEL, "; }
if ($ppt) { $FILE .= "POWERPOINT, "; }
if ($rm) { $FILE .= "RM, "; }
if ($ram) { $FILE .= "RAM, "; }
if ($mpeg) { $FILE .= "MPEG, "; }
if ($mp3) { $FILE .= "MP3, "; }
$FILE =? s/?, $//;
print "投稿時にファイルを添付する倳ができます。?n";
print "ただし、ブラウザはインターネットエクスプローラ4 またはネットスケープ4 鉯上である必要があります。?n";
print "添付可能?ファイル → $FILE?n";
print "最大投稿データ量は $MaxData KB までです。?n";
print "画像は横 $MaxWピクセル、縦 $MaxHピクセルを超えると縮小表?示されます。?n";
if ($ImageCheck) {
print "画像に限り管理者が許可するまで「COMING SOON」が仮表?示されます。?n";
print "?n?n";
print "?n?n";
#------------------#
チェックモード
#------------------#
sub check {
print "Check Mode?n";
print "?n";
# ログファイル
if (-e $logfile) { print "ログファイル:パスOK!?n"; }
else { print "ログファイルのパスが不正です: $logfile?n"; }
if (-r $logfile && -w $logfile) { print "ログパーミッション:OK!?n"; }
else { print "ログパーミッションが不正です。?n"; }
# 画像ディレクトリ
if (-d $ImgDir) { print "アップロードディレクトリ:パスOK!?n"; }
else { print "アップロードディレクトリのパスが鈈正です: $ImgDir?n"; }
if (-r $ImgDir && -w $ImgDir && -x $ImgDir)
{ print "アップロードディレクトリのパーミッション:OK!?n"; }
else { print "アップロードディレクトリのパーミッションが不正です。?n"; }
# ロックディレクトリ
print "ロック形式:";
if ($lockkey == 0) { print "ロック設定なし?n"; }
if ($lockkey == 1) { print "symlink?n"; }
else { print "mkdir?n"; }
($lockdir) = $lockfile =? /(.*)[???/].*$/;
print "ロックディレクトリ:$lockdir?n";
if (-d $lockdir) { print "ロックディレクトリのパス:OK?n"; }
else { print "ロックディレクトリのパス:NG → $lockdir?n"; }
if (-r $lockdir && -w $lockdir && -x $lockdir) {
print "ロックディレクトリのパーミッション:OK?n";
print "ロックディレクトリのパーミッション:NG → $lockdir?n";
print "?n?n?n";

我要回帖

更多关于 lingo rondo 的文章

 

随机推荐