want to sciencedirectt fundus smile. is not easy. withou

短的英文句子
您当前位置: >>
短的英文句子
发布:&|&分类:&|&
  短的英文句子  1、Only opposed every day, will live the strong than you imagine.  每天只有逞强着,才会活得比你们想象中的。  2、Sometimes,I just need someone to talk to.  有时候,我只是需要一个可以说话的人。  3、One day someone will walk into your life, then you realize love was always worth waiting for.  有一天那个人走进了你的,你就会明白,真爱总是值得等待的。  4、I can put the past you're so natural, I think I really let go.  我可以把过往的你说得如此自然,我想我真的释怀了。  5、The numerous rivers heart surface, threads a needle the line to suture sadly.  千沟万壑的心脏表面,穿针走线般地缝合进悲伤。  6、Dreaming in the memory is not as good as waiting for the paradise in the hell.  在回忆里继续梦幻不如在地狱里等待天堂。  7、Nothing improves the memory more than trying to forget.  令记忆深刻的最好方法,就是试图去忘记。  8、When distinction disguises the smile, is the final farewell tune.  分别时假装的微笑,是最后的告别曲。  9、Time heals almost everything. Give time time.  时间几乎会愈合所有事情。请给时间一点时间。  10、Spend only half open, dream also do only half.  花只开一半,梦也只做一半就好。  11、I understand you have called content, and you don't understand is that I cherish.  我懂有你叫知足,而你却不懂有 我叫珍惜。  12、Broken petal falls in the wind, have no laws in.  碎花瓣被风吹得飘落了一地,零乱得没有一点规律。  13、A we missed the time, France.  时间一点点被我们错过,擦肩而过。  14、Happy about no one can only hold the force.  快乐没有谁可以左右,只有自己用力握紧。  15、Hand and catch you fell out of the tears, but not cut the fundus you sad!  伸手,接住你眼角垂落的泪滴,却截不住你眼底的悲伤!  16、&Trust is like an eraser. It gets smaller and smaller after every mistake.&  信任就像橡皮擦,在一次一次的错误中慢慢损耗变小。  17、I do not follow, I live is always all you want.  我不会遵循,我过的生活从来都是自己想要的  18、Life is not waiting for the storm in the past, but learning to dance in the wind and rain.  生活不是等着暴风雨过去,而是学会在风雨中跳舞。  19、We don't have any choice, only run in opposite directions.  我们没有任何选择的余地,只有背道而驰。  20、Those troubles, always linger.  那些烦恼,永远挥之不去  21、To travel, will have a place, there is no memory, not you.  去旅行吧,一定会有一个地方,那里没有回忆,没有你。  22、Those who let a person to sink in things, is a good start.  那些让人陷进去的东西,开始总是美好的。  23、Only love influence, and can realize born inspiration.  只有的熏陶,才能体会到与生俱来的灵感。  24、Tears are words the heart can't say.  眼泪是心里无法诉说的言辞。  25、If you really love me, then why do I see is to breed.  倘若你真的爱我,那么为什么我看到的只是繁衍。  26、It is not weary, as soon as under us stands forever.  不疲倦,我们下一站永远。  27、Don't corrupted themselves, life is not only an opportunity, try to get.  不要堕落了自己,人生并不只有一次机会,努力把握。  28、We look forward to, our future.  我们期待、我们的将来。  29、Waiting for the future of you appear, see the last side of life on pay a massacre.  等待未来的你出现,见上最后一面付出生命也在所不惜。  30、Memory is heel, lonesome is dent, I a person coexistence.  回忆是脚跟,寂寞是凹痕,我一个人共存。  31、Believe that god is fair.  相信上帝是公平的。  32、A I'm sorry, let our love lost time, lost to the distance.  一句对不起,让我们的爱败给了时间,输给了距离。  33、Take away love, and our earth is a tomb.  没有了爱,地球便成了坟墓。  34、If I know what love is, it is because of you.  因为你,我懂得了爱。  35、You smiled and waved with me, step by step out go farther.  你笑着跟我挥了挥手,一步跨出去走得更远  36、We are all &were&, blurred our closest happiness.  我们都是&远视眼&,模糊了离我们最近的幸福。  37、To give you a lot of freedom, may I let you have more waiting reason to leave.  给了你很多自由,可能我的守候让你更有离开的理由。  38、I have also forgotten once world, whether a peaceful piece of string sound.  我也忘记了曾经的世界,是否安静的一片弦音。  39、Time orbit we just one solitude of the subway.  时间的轨道里我们只是一班孤寂的地铁。  40、Love, from zero start.  爱,从零开始。  41、What I remember fondly has nothing unsaid.  我怀恋的是无话不说。  42、Where there is great love, there are always miracles.  哪里有真爱存在,哪里就有奇迹。  43、From now on,I will expect nothing, and just take what I get.  从现在起,我将不再期待,只珍惜我所拥有的。  44、Two people along the street up, who also don't stay.  两个人沿着街一直走,谁也不许再停留  45、Indifferent attitude, made light of expression. Comfort.  无所谓的态度,满不在乎的表情,是自己给自己的安慰  46、We are all too young, a lot of things don't yet know, don't put the wrong loves when gardeners.  我们都太年轻,很多事都还不了解,别把错爱当恩宠。  47、I need him like I need the air to breathe.  我需要他,正如我需要呼吸空气。  48、I can't afford to bear the deep feeling is the burden, sweet prattle just happened to cash lies.  深情是我担不起的重担,情话只是偶然兑现的谎言。  49、Tears flow is down and out, because you never know what I choose!  泪流的很落魄,是因为你从不懂我的选择!  50、Steps into the dream the paradise, fantasizes your my romantic plot.  踏进梦的乐园,幻想你我的浪漫情节。  51、Is who wasn't careful destroys one named not to leave not the abandoned puppet?  是谁不小心打坏了一个名为不离不弃的玩偶?  52、Gentle to have, but not compromise, I want to be in quiet, not strong.  温柔要有,但不是妥协,我要在安静中,不慌不忙的坚强。  53、The way of the time is the single car, never sell FanChengPiao.  时间的路是单程车,从来不卖返程票。  54、The pain was too silent for fear of said it will get sympathy&  太痛了就保持沉默,因为害怕说出来会换来同情&  55、There's nothing more beautiful than a smile that struggles through tears.  世上最美的,莫过于从泪水中挣脱出来的那个微笑。  56、Please allow me to small proud, because like you depend on.  请容许我小小的骄傲,因为有你这样的依靠。  57、Is heavy likely is the dark memorial speech lonely.  寂寞沉重得像是黑暗的悼词。  58、My world, you don' Your world, I was cast out.  我的世界,你不在乎;你的世界,我被驱逐。  59、Promises are often like the butterfly, which disappear after beautiful hover.  承诺常常很像蝴蝶,美丽的飞盘旋然后不见。  60、Without you, I still will smile carefree, please don't think that you have more memorable.  没有你,我依旧会笑得无忧无虑,请别以为你有多难忘。  61、Although again sweet candy, also has a bitter day.  即使再甜的糖,也有苦的一天。  62、We always want to forget the past, but in the past, but did not forget us.  我们总想着遗忘过去,但过去却并未遗忘我们。  63、You have no wrong, I am not wrong just a gust of wind, blew the commitment.  你没有错,我没有错只是一阵风,吹熄了承诺。  64、Without you, my life don't know how to describe.  没有你,我的生活不知道该怎样去形容。  65、In are the eye tears, what pain dazzling?  眼里的泪光,是什么痛的刺眼?  66、Forever cannot fill up void.  空虚永远填不满。  67、Even next second we didn't meet, on one second we will meet.  即使下一秒我们没有相遇,上一秒我们也会相见。  68、There is no remedy for love but to love more.  治疗爱的创伤唯有加倍地去爱。  69、The wind blows away the thoughts, rolled up unruly time.  被风吹散的思念,卷起不羁的时间  70、The happy blood is unable the backflow centripetal dirty.  幸福的血液无法回流向心脏。  71、A chock full pool of water, after blowing off silence.  满满当当的一池水,放空后的寂静。  72、The world with filar silk rain weather also slightly a little cool, cold the scenery.  天下着丝丝雨滴,天气也微微有点凉,寒冷了风景。  73、Stream flow, slowly away a few leaf, also taking the memory.  溪水缓慢地流动着,带走了几片落叶,也带走了记忆。  74、How many dream had, and never came into my heart.  多少梦幻的曾经,也不曾走进莪的心  75、We first met location, it was named: miss.  我们初次相遇的地点,把它取名叫:怀念  76、No matter the ending is perfect or not, you cannot disappear from my world.  我的世界不允许你的消失,不管结局是否完美。  77、Delay is the deadliest form of denial.  拖延是最彻底的拒绝。  78、The life most of the time, commitments equals to constrain, reluctantly we yearn for bound.  人生的大部份时间里,承诺同义词是束缚,奈何我们向往束缚。  79、There are 4 steps to happiness: you ,me ,our hearts,together!  通往幸福只需要四步:你、我、我们的心、在一起。  80、Think of had to meet, like very dizzy, when the mind change, such as gone.  想起当初相见,似天旋地转,当意念改变,如过往云烟。  81、Each life likely is one full and the delightful fruit.  每一个生命都像是一颗饱满而甜美的果实。  82、Thought always spent in cigarettes, total love in alcohol broken.  思念总在香烟里度过,爱情总在酒精里破碎。  83、I'm just a sunflower, waiting for belong to me only sunshine.  我只是一朵向日葵,等待属于我的唯一的阳光。  84、Important people, less and less people left more and more important.  重要的人越来越少,留下来的人越来越重要。  85、Youth, our dissolute time passage.  青春,我们放肆的年华。  86、For short, do not remember every detail, every mood.  因为短暂,不记得每一个细节,每一个情绪。  87、Not give each other a happy man, is life does not need good-bye.  给不了彼此幸福的人,是终身不需要再见的人。  88、I pass through the summer which the winter and the equator are filled with joy rush toward you to like.  我穿过冬季和赤道满心欢喜的奔向你喜欢的夏天。  89、Often TouLu you every bit of life, can you the same for me.  每每偷录你生活的点滴,你可否一样对于我。  90、Pure strong chocolate, just like the taste of love to be the first tastes good.  纯浓的巧克力,就像初尝爱情的滋味那般美好。  91、Within you I lose myself, without you I find myself wanting to be lost again.  有了你,我迷失了自我。失去你,我多么希望自己再度迷失。  92、Your weak away in my heart, but let me for you and sad.  你的脆弱藏在心里,却让我因你而难过。  93、Would a man running in the rain, also don't want to put into the arms of the false.  宁愿一个人在雨中奔跑,也不愿投入你那虚伪的怀抱。
你可能感兴趣的文章:
本站为你推荐的文章:
本文标题:本文地址:
Powered By ZBlog | 鄂ICP备号-3 |#!/usr/local/bin/perl
#┌─────────────────────────────────
JOYFUL NOTE v1.6 ()
Copyright(C) Kent Web 2003
webmaster@
http://www./
#└─────────────────────────────────
$ver = 'Joyful Note v1.6';
#┌─────────────────────────────────
#│ [注意事項]
#│ 1. このスクリプトはフリーソフトです。このスクリプトを使用した
いかなる損害に対して作者は一切の責任を負いません。
#│ 2. 設置に関する質問はサポート掲示板にお願いいたします。
直接メールによる質問は一切お受けいたしておりません。
#│ 3. このスクリプトは、method=POST 専用です。
#│ 4. 同梱のアイコンで、以下のファイルの著作権者は以下のとおりです。
home.gif : mayuRinさん
clip.gif : 牛飼いとアイコンの部屋さん
#└─────────────────────────────────
# 【ファイル構成例】
***.co.jp / index.html (トップページ等)
+----- cgi-bin
+-- joyful / joyful.cgi
joyful.log
cgi-lib.pl
pastno.dat
+---- img / *.gif
+---- past / 1.dat
#【チェックモード】
#joyful.cgiの末尾に「?mode=check」と付けて呼び出す
#例 http://www.***.co.jp/cgi-bin/joyful/joyful.cgi?mode=check
#============#
#============#
# ●の個所の「***_co_jp」の部分をお客様用に修正してください。
# 「***.com」の場合は「***_com」となります。
# ●ライブラリ取込
require 'D:??users??izumito_com??Cgi-bin??sk??joyful??jcode.pl';
require 'D:??users??izumito_com??Cgi-bin??sk??joyful??cgi-lib.pl';
# タイトル名を指定
$title = "生活教育交流掲示板*みんなのひろば";
# タイトルの色
$t_color = "#804040";
# タイトルの大きさ(ポイント数:スタイルシートで有効)
$t_size = '22pt';
# タイトル/本文の文字フォント
$face = "MS Pゴシック";
# 本文の文字大きさ(ポイント数:スタイルシートで有効)
$b_size = '10pt';
# 壁紙を指定する場合(http://から指定)
# 背景色を指定
$bc = "#FFFFFF";
# 文字色を指定
$tx = "#333333";
# リンク色を指定
$lk = "#0000FF"; # 未訪問
$vl = "#800080"; # 訪問済
$al = "#FF0000"; # 訪問中
# ●戻り先のURL (index.htmlなど)「***.co.jp」の部分はご自分のドメイン。
$homepage = "/sk/";
# 最大記事数 (親記事もレス記事も含めた数)
$max = 50;
# 管理者用マスタパスワード (英数字で8文字以内)
$pass = 'kawasaki';
# 返信がつくと親記事をトップへ移動 (0=no 1=yes)
$topsort = 0;
# 返信にも添付機能を許可する (0=no 1=yes)
$res_clip = 1;
# 画像と記事の位置
1 : 画像が左。記事は右から回り込む
2 : 画像が下。記事は画像の上に表示。
$imgpoint = 1;
# タイトルにGIF画像を使用する時 (http://から記述)
$t_img = "/Cgi-bin/sk/joyful/titleboard_seikatsu.gif";
$t_w = 360; # GIF画像の幅 (ピクセル)
$t_h = 180; #
高さ (ピクセル)
# ファイルロック形式
# → 0=no 1=symlink関数 2=mkdir関数
$lockkey = 2;
# ●ロックファイル名
$lockfile = 'D:??users??izumito_com??Cgi-bin??sk??joyful??joyful.lock';
# ミニカウンタの設置
# → 0=no 1=テキスト 2=GIF画像
$counter = 1;
# ミニカウンタの桁数
$mini_fig = 6;
# テキストのとき:ミニカウンタの色
$cnt_color = "#333333";
# ●GIFカウンタのとき:画像までのディレクトリ
# → 最後は必ず ?? で閉じる
$gif_path = "D:??users??izumito_com??Cgi-bin??sk??joyful??img??";
$mini_w = 8;
# 画像の横サイズ
$mini_h = 12;
# 画像の縦サイズ
# ●カウンタファイル
$cntfile = 'D:??users??izumito_com??Cgi-bin??sk??joyful??count.dat';
# スクリプトのファイル名
= 'joyful.cgi';
# ●ログファイルを指定
$logfile = 'D:??users??izumito_com??Cgi-bin??sk??joyful??joyful.log';
# ●アップロードディレクトリ
$ImgDir = 'D:??users??izumito_com??Cgi-bin??sk??joyful??img??';
# ●アップロードディレクトリのURLパス(「***.co.jp」の部分はご自分のドメイン)
# → パスの最後は / で終わること
$ImgUrl = "/Cgi-bin/sk/joyful/img/";
# 添付ファイルのアップロードに失敗したとき
0 : 添付ファイルは無視し、記事は受理する
1 : エラー表示して処理を中断する
$clip_error = 0;
# 記事 [タイトル] 部の長さ (全角文字換算)
$sub_len = 20;
# メールアドレスの入力必須 (0=no 1=yes)
$in_email = 0;
# 記事の [タイトル] 部の色
$sub_color = "#FFA500";
# 記事表示部の下地の色
$tbl_color = "#2E8B57";
# 同一IPアドレスからの連続投稿時間(秒数)
# → 連続投稿などの荒らし対策
# → 値を 0 にするとこの機能は無効になります
$wait = 60;
# 1ページ当たりの記事表示数 (親記事)
$p_log = 10;
# 投稿があるとメール通知する (sendmail必須)
0 : 通知しない
1 : 通知するが、自分の投稿記事はメールしない。
2 : 通知する。自分の投稿記事も通知する。
$mailing = 2;
# メールアドレス(メール通知する時)
# sendmailパス(メール通知する時)
require "D:??ms-smtp??smtpmail.cfg";
require "D:??ms-smtp??smtpmail.pl";
# 他サイトから投稿排除時に指定 (http://から書く)
$base_url = "";
# 文字色の設定(半角スペースで区切る)
$colors = '#FFFFFF #FFAAAA #AAFFAA #BBBBFF #DD77DD #FFAADD #FFDD55 #333333';
# URLの自動リンク (0=no 1=yes)
$autolink = 1;
# タグ広告挿入オプション (FreeWebなど)
の代わりに「広告タグ」を挿入する。
→ 広告タグ以外に、MIDIタグ や LimeCounter等のタグにも使用可能です。
$banner1 = ''; # 掲示板上部に挿入
$banner2 = ''; # 掲示板下部に挿入
# アクセス制限(半角スペースで区切る)
→ 拒否するホスト名又はIPアドレスを記述(アスタリスク可)
→ 記述例 $deny = '*. *.denyhost.xx.jp 211.154.120.*';
$deny = '';
# アップロードを許可するファイル形式
= 1; # GIFファイル
= 1; # JPEGファイル
= 1; # PNGファイル
= 1; # TEXTファイル
= 0; # LHAファイル
= 0; # ZIPファイル
= 0; # PDFファイル
= 0; # MIDIファイル
= 0; # WORDファイル
$excel = 0; # EXCELファイル
= 0; # POWERPOINTファイル
= 0; # RAMファイル
= 0; # RMファイル
= 0; # MPEGファイル
= 0; # MP3ファイル
# 投稿受理最大サイズ (bytes)
# → 例 : 102400 = 100KB
$cgi_lib'maxdata = 102400;
# 画像ファイルの最大表示の大きさ(単位:ピクセル)
# → これを超える画像は縮小表示します
$MaxW = 300; # 横幅
$MaxH = 300; # 縦幅
# 家アイコンの使用 (0=no 1=yes)
$home_icon = 1;
# アイコン画像ファイル名 (ファイル名のみ)
$IconHome = "home.gif";
$IconClip = "clip.gif";
# クリップ
$IconSoon = "soon.gif";
# COMINIG SOON
# 画像管理者チェック機能 (0=no 1=yes)
# → アップロード「画像」は管理者がチェックしないと表示されない機能です
# → チェックされるまで「画像」は「COMMING SOON」のアイコンが表示されます
$ImageCheck = 1;
# 投稿後の処理
→ 掲示板自身のURLを記述しておくと、投稿後リロードします
→ ブラウザを再読み込みしても二重投稿されない措置。
→ Locationヘッダの使用可能なサーバのみ
$location = '/Cgi-bin/sk/joyful/joyful.cgi';
#---(以下は「過去ログ」機能を使用する場合の設定です)---#
# 過去ログ生成 (0=no 1=yes)
$pastkey = 1;
# ●過去ログ用NOファイル
= 'D:??users??izumito_com??Cgi-bin??sk??joyful??pastno.dat';
# ●過去ログのディレクトリ
$pastdir = 'D:??users??izumito_com??Cgi-bin??sk??joyful??past??';
# 過去ログ1ファイルの行数
# → この行数を超えると次ページを自動生成します
$log_line = 600;
#============#
#============#
#----------------------- これより処理開始 -----------------------#
#この行以下を書き換えられた場合、サポートの対象外となりますのでご注意下さい#
# メイン処理
if ($mode eq "howto") { & }
elsif ($mode eq "find") { & }
elsif ($mode eq "usr_del") { &usr_ }
elsif ($mode eq "usr_edt") { &usr_ }
elsif ($mode eq "regist") { & }
elsif ($mode eq "res") { &res_ }
elsif ($mode eq "admin") { & }
elsif ($mode eq "past") { & }
elsif ($mode eq "check") { & }
#----------------#
アクセス制限
#----------------#
sub axs_check {
# ホスト名を取得
local($flag)=0;
foreach (split(/?s+/, $deny)) {
s/?*/?.?*/g;
if ($host =? /$_/i) { $flag=1; }
if ($flag) { &error("アクセスを許可されていません"); }
#--------------#
記事表示部
#--------------#
sub html_log {
local($ipt,$wh,$i,$flag);
# ヘッダを出力
# カウンタ処理
if ($counter) { & }
# タイトル部
print "?n";
if ($banner1 ne "") { print "$banner1?n"; }
if ($t_img eq '') {
print "$title?n";
print "?n";
# メニュー部
print "?n";
print "[]?n";
print "[]?n";
print "[]?n";
print "[]?n" if ($pastkey);
print "[]?n";
print "?n";
# 投稿フォーム
print "?n";
# 記事を展開
open(IN,"$logfile") || &error("Open Error : $logfile");
while () {
($no,$reno,$date,$name,$mail,$sub,$comment,$url,$host,$pw,$color,$tail,$w,$h,$chk) = split(//);
if ($reno eq "") { $i++; }
$page + $p_log) { }
# 題名の長さ
if (length($sub) > $sub_len*2) {
$sub = substr($sub,0,$sub_len*2);
$sub .= "...";
if ($mail) { $name = ""; }
if ($home_icon && $url) { $url = ""; }
elsif (!$home_icon && $url) { $url = "&&"; }
if (!$reno && $flag) {
print "?n";
if (!$reno) {
print "?n";
if ($reno) { print "?n"; }
print "?n";
if ($reno) { print ""; }
print "$sub ";
if (!$reno) { print "投稿者:$name 投稿日:$date "; }
else { print "$name - $date "; }
print "No?.$no";
print " & $url ?n";
if (!$reno) {
print "?n";
print "?n";
print "?n";
print "?n";
print "?n";
print "?n";
if ($reno) { print "?n"; }
if (!$reno) { print "?n"; }
# 自動リンク
if ($autolink) { &auto_link($comment); }
if ($imgpoint == 1) { $ipt="align=left hspace=18"; }
print "$comment";
# 添付ファイルが存在する場合
if (-e "$ImgDir$no$tail") {
if ($tail eq ".gif" || $tail eq ".jpg" || $tail eq ".png") {
if ($ImageCheck && $chk != 1) {
print "?n";
if ($w && $h) { $wh="width=$w height=$h"; }
else { $wh=""; }
print "?n";
print " $no$tail?n";
print "$comment" if ($imgpoint == 1);
if (!$reno) { print "?n"; }
print "?n";
close(IN);
print "?n";
$next = $page + $p_
$back = $page - $p_
$p_flag=0;
print "?n";
if ($back >= 0) {
$p_flag=1;
print "?n";
print "?n";
print "?n";
if ($next < $i) {
$p_flag=1;
print "?n";
print "?n";
print "?n";
# ページ移動ボタン表示
if ($p_flag) {
print "[直接移動]?n";
while ($i > 0) {
if ($page == $y) { print "[$x]?n"; }
else { print "[]?n"; }
$y = $y + $p_
$i = $i - $p_
print "?n";
print "?n";
print "?n";
print "?n";
print "- 以下のフォームから自分の投稿記事を修正?削除することができます -?n";
print "処理 ?n";
print "修正?n";
print "削除?n";
print "記事No ?n";
print "パスワード ?n";
print "?n";
# 著作権表示部(削除改変不可)
print "$banner2?n";
print "?n?n?n";
#----------------#
ログ書込処理
#----------------#
sub regist {
# フォーム入力チェック
# 時間を取得
# クッキーを発行
# ファイルロック
if ($lockkey) { & }
# ログを開く
open(IN,"$logfile") || &error("Open Error : $logfile");
@lines = ;
close(IN);
# 記事NO処理
$top = shift(@lines);
($no,$ip,$time2) = split(//, $top);
# 連続投稿チェック
if ($addr eq $ip && $wait > $times - $time2)
{ &error("連続投稿はもうしばらく時間をおいて下さい"); }
# 削除キーを暗号化
if ($in{'pwd'} ne "") { $ango = &encrypt($in{'pwd'}); }
# ファイル添付処理
if ($in{'upfile'}) { &UpF }
# 親記事の場合
if ($in{'reno'} eq "") {
foreach (@lines) {
($no2,$reno2,$d,$n,$m,$s,$com,$u,$ho,$p,$c,$tail2,$w,$h,$chk) = split(//);
if ($i > $max-1 && $reno2 eq "") { $stop=1; }
if (!$stop) { push(@new,$_); }
if ($pastkey) { push(@data,$_); }
if (-e "$ImgDir$no2$tail2") { unlink("$ImgDir$no2$tail2"); }
unshift(@new,"$no$date$in{'name'}$in{'email'}$in{'sub'}$in{'comment'}$in{'url'}$host$ango$in{'color'}$tail$W$H0?n");
unshift(@new,"$no$addr$times?n");
# 過去ログ更新
if ($data[0]) { & }
open(OUT,">$logfile") || &error("Write Error : $logfile");
print OUT @
close(OUT);
# レス記事の場合:トップソートあり
} elsif ($in{'reno'} && $topsort) {
foreach (@lines) {
($no2,$reno2) = split(//);
if ($in{'reno'} eq $no2) {
if ($reno2) { $f++; }
push(@new,$_);
} elsif ($in{'reno'} eq $reno2) {
push(@new,$_);
} elsif ($match == 1 && $in{'reno'} ne $reno2) {
push(@new,"$no$in{'reno'}$date$in{'name'}$in{'email'}$in{'sub'}$in{'comment'}$in{'url'}$host$ango$in{'color'}$tail$W$H0?n");
push(@tmp,$_);
} else { push(@tmp,$_); }
if ($f) { &error("不正な返信要求です"); }
if ($match == 1) {
push(@new,"$no$in{'reno'}$date$in{'name'}$in{'email'}$in{'sub'}$in{'comment'}$in{'url'}$host$ango$in{'color'}$tail$W$H0?n");
push(@new,@tmp);
unshift(@new,"$no$addr$times?n");
open(OUT,">$logfile") || &error("Write Error : $logfile");
print OUT @
close(OUT);
# レス記事の場合:トップソートなし
foreach (@lines) {
($no2,$reno2) = split(//);
if ($match == 0 && $in{'reno'} eq $no2) {
if ($reno2) { $f++; }
} elsif ($match == 1 && $in{'reno'} ne $reno2) {
push(@new,"$no$in{'reno'}$date$in{'name'}$in{'email'}$in{'sub'}$in{'comment'}$in{'url'}$host$ango$in{'color'}$tail$W$H0?n");
push(@new,$_);
if ($f) { &error("不正な返信要求です"); }
if ($match == 1) {
push(@new,"$no$in{'reno'}$date$in{'name'}$in{'email'}$in{'sub'}$in{'comment'}$in{'url'}$host$ango$in{'color'}$tail$W$H0?n");
unshift(@new,"$no$addr$times?n");
open(OUT,">$logfile") || &error("Write Error : $logfile");
print OUT @
close(OUT);
# ロック解除
if ($lockkey) { & }
# メール処理
if ($mailing == 1 && $in{'email'} ne "$mailto") { &mail_ }
elsif ($mailing == 2) { &mail_ }
# リロード
if ($location) {
if ($ENV{'PERLXS'} eq "PerlIS") {
print "HTTP/1.0 302 Temporary Redirection?r?n";
print "Content-type: text/html?n";
print "Location: $location??n?n";
print "?n";
print "投稿は正常に処理されました?n";
print "?n";
print "?n";
print "?n?n";
#--------------------#
画像アップロード
#--------------------#
sub UpFile {
local($macbin,$fname,$flag,$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 =? 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_error) { }
elsif (!$flag && $clip_error) {
&error("アップロードできないファイル形式です");
$upfile = $in{'upfile'};
# マックバイナリ対策
if ($macbin) {
$length = substr($upfile,83,4);
$length = unpack("%N",$length);
$upfile = substr($upfile,128,$length);
# 添付データを書き込み
$ImgFile = "$ImgDir$no$tail";
open(OUT,"> $ImgFile") || &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 res_form {
local($f,$no,$reno,$date,$name,$mail,$sub,$com,$url);
# ヘッダを出力
# ログを読み込み
open(IN,"$logfile") || &error("Open Error : $logfile");
# 関連記事出力
print "[]?n";
print "- 以下は、記事NO. $in{'no'} に関する
です -?n";
while () {
($no,$reno,$date,$name,$mail,$sub,$com,$url) = split(//);
if (!$reno) { $com = "$com"; }
if ($in{'no'} == $no && $reno) { $f++; }
if ($in{'no'} == $no || $in{'no'} == $reno) {
if ($in{'no'} == $no) { $resub = $ }
if ($url) { $url = "&&"; }
if ($reno && !$flag) { print "?n"; $flag=1; }
print "$sub 投稿者:$name 投稿日:$date $url No?.$no$com?n";
close(IN);
if ($f) { &error("不正な返信要求です"); }
if ($flag) { print "?n"; }
print "?n";
# タイトル名
if ($resub !? /^Re?:/) { $resub = "Re?: $resub"; }
print "?n";
&form("res","","","","","",$resub,"","","","","");
print "?n?n";
#----------------#
デコード処理
#----------------#
sub decode {
while (($key,$val) = each %in) {
if ($key ne "upfile") {
# シフトJISコードに変換
&jcode'convert(*val, "sjis", "", "z");
# タグ処理
$val =? s/&/&/g;
$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'};
$page = $in{'page'};
$in{'url'} =? s/^http?:?/?///;
if ($in{'sub'} eq "") { $in{'sub'} = "無題"; }
#------------#
#------------#
sub howto {
if ($in_email) {
$eml_msg = "記事を投稿する上での必須入力項目は「おなまえ」「Eメール」「メッセージ」です。URL、題名、削除キーは任意です。";
$eml_msg = "記事を投稿する上での必須入力項目は「おなまえ」と「メッセージ」です。Eメール、URL、題名、削除キーは任意です。";
$maxkb = 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 <<"HTML";
掲示板の利用上の注意
この掲示板はクッキー対応です。1度記事を投稿いただくと、おなまえ、Eメール、URL、削除キーの情報は2回目以降は自動入力されます。(ただし利用者のブラウザがクッキー対応の場合)
画像などのバイナリーファイルをアップロードすることが可能?です。
添付可能?ファイル : $FILE
最大投稿データ量 : $maxkb KB
画像は横$MaxWピクセル、縦$MaxHピクセルを超えると縮小表?示されます。
投稿内容には、タグは一切使用できません。
記事には、半角カナは一切使用しないで下さい。文字化けの原因となります。
記事の投稿時に「削除キー」にパスワード(英数字で8文字以内)を入れておくと、その記事は次回削除キーによって削除することができます。
記事の保持件数は最大 $max件です。それを超えると古い順に自動削除されます。
既存の記事に「返信」をすることができます。各記事の上部にある「返信」ボタンを押すと返信用フォームが現れます。
過去の投稿記事から「キーワード」によって簡易検索ができます。トップメニューののリンクをクリックすると検索モードとなります。
管理者が著しく不利益と判断する記事や他人を誹謗中傷する記事は予?告なく削除することがあります。
#------------------#
ワード検索処理
#------------------#
sub find {
print <<"EOM";
ワード検索
検索したいキーワードを入力し、「条件」「表?示」を選択して「検索」ボタンを押して下さい。
キーワードは「半角スペース」で区切って複数指定することができます。
キーワード:
if (!$in{'cond'}) { $in{'cond'} = "AND"; }
foreach ("AND", "OR") {
if ($in{'cond'} eq "$_") {
print "$_?n";
print "$_?n";
print "?n";
print "表?示:?n";
if ($in{'view'} eq "") { $in{'view'} = $p_ }
foreach (5,10,15,20) {
if ($in{'view'} == $_) {
print "$_件?n";
print "$_件?n";
print "?n";
print "?n?n";
# ワード検索の実行と結果表示
if ($in{'word'} ne "") {
# 入力内容を整理
$in{'word'} =? s/ / /g;
@pairs = split(/?s+/, $in{'word'});
# ファイルを読み込み
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) { push(@new,$_); }
close(IN);
# 検索終了
$count = @
print "検索結果:$count件?n";
if ($page eq '') { $page = 0; }
$end_data = @new - 1;
$page_end = $page + $in{'view'} - 1;
if ($page_end >= $end_data) { $page_end = $end_ }
$next_line = $page_end + 1;
$back_line = $page - $in{'view'};
$enwd = &url_enc($in{'word'});
if ($back_line >= 0) {
print "[]?n";
if ($page_end ne "$end_data") {
print "[]?n";
print "[]?n";
foreach ($page .. $page_end) {
($no,$reno,$date,$name,$email,$sub,$com,$url)
= split(//, $new[$_]);
if ($email) { $name = ""; }
if ($url) { $url = "&&"; }
if ($reno) { $no = "$renoへのレス"; }
# 結果を表示
print "[$no] $sub";
print " 投稿者:$name 投稿日:$date $url?n";
print "$com?n";
print "?n";
print "?n";
#------------------#
クッキーの発行
#------------------#
sub set_cookie {
local($gmt, $cook, @t, @m, @w);
@t = gmtime(time + 60*24*60*60);
@m = ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
@w = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
$gmt = sprintf("%s, %02d-%s-%04d %02d:%02d:%02d GMT",
$w[$t[6]], $t[3], $m[$t[4]], $t[5]+1900, $t[2], $t[1], $t[0]);
$cook="$in{'name'}$in{'email'}$in{'url'}$in{'pwd'}$in{'icon'}$in{'color'}";
print "Set-Cookie: Joyful_Note=$ expires=$gmt?n";
#------------------#
クッキーを取得
#------------------#
sub get_cookie {
local($key, $val, *ck);
$ck = $ENV{'HTTP_COOKIE'};
foreach (split(/;/, $ck)) {
($key, $val) = split(/=/);
$key =? s/?s//g;
$ck{$key} = $
@ck = split(//, $ck{'Joyful_Note'});
return (@ck);
#--------------#
エラー処理
#--------------#
sub error {
&unlock if ($lockflag);
&header if (!$head_flag);
print "ERROR !?n";
print "$_[0]?n";
print "?n";
print "?n";
#--------------#
管理モード
#--------------#
sub admin {
if ($in{'pass'} eq "") {
print "パスワードを入力して下さい?n";
print "?n";
print "?n";
print "?n";
print "?n";
print "?n";
print "?n?n";
if ($in{'pass'} ne $pass) { &error("パスワードが違います"); }
print "[]?n";
print "?n";
print "管理モード?n";
print "?n";
# 画像許可
if ($in{'chk'}) {
@CHK = split(/?0/, $in{'chk'});
# ロック処理
if ($lockkey) { & }
# 許可情報をマッチングし更新
open(IN,"$logfile") || &error("Open Error : $logfile");
while () {
($no,$reno,$d,$n,$m,$s,$com,$u,$ho,$p,$c,$t,$w,$h,$chk)
= split(//);
foreach $xx (@CHK) {
if ($no eq $xx) {
$_ = "$no$reno$d$n$m$s$com$u$ho$p$c$t$w$h1?n";
push(@new,$_);
close(IN);
unshift(@new,$top);
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");
while () {
($no,$reno,$d,$n,$m,$s,$com,$u,$ho,$p,$c,$tail,$w,$h,$chk)
= split(//);
foreach $del (@DEL) {
if ($no eq $del || $reno eq $del) {
if (-e "$ImgDir$no$tail") {
unlink("$ImgDir$no$tail");
if ($flag == 0) { push(@new,$_); }
close(IN);
unshift(@new,$top);
open(OUT,">$logfile") || &error("Write Error : $logfile");
print OUT @
close(OUT);
# ロック解除
if ($lockkey) { & }
# 管理を表示
if ($page eq "") { $page = 0; }
print "?n?n";
print "記事を削除する場合は「削除」のチェックボックスにチェックを入れ「送信する」を押して下さい。?n";
print "画像許可を行なう場合は「画像許可」のチェックボックスにチェックを入れ「送信する」を押して下さい。?n";
print "?n?n";
print "?n";
print "?n";
print "?n";
print "?n";
print "?n";
print "?n";
print "?n";
print "削除記事NO投稿日";
print "タイトル投稿者URLコメント";
print "ホスト名画像(bytes)?n";
if ($ImageCheck) { print "画像許可"; $line=10; }
print "?n";
open(IN,"$logfile") || &error("Open Error : $logfile");
while () {
$img_flag=0;
($no,$reno,$date,$name,$mail,$sub,$com,$url,$host,$pw,$color,$tail,$w,$h,$chk) = split(//);
if ($mail) { $name=""; }
($date) = split(/?(/, $date);
if ($url) { $url = "&&"; }
else { $url = '-'; }
$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;
if ($reno eq "") { print "?n"; }
# チェックボックス
print "$no";
print "$date$sub$name";
print "$url$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";
print "?n";
#------------------#
ユーザ記事削除
#------------------#
sub usr_del {
if ($in{'no'} eq '' || $in{'pwd'} eq '')
{ &error("記事Noまたは削除キーが入力モレです"); }
# ロック処理
if ($lockkey) { & }
open(IN,"$logfile") || &error("Open Error : $logfile");
@lines = ;
close(IN);
$top = shift(@lines);
foreach (@lines) {
($no,$reno,$date,$name,$mail,$sub,$com,
$url,$host,$pw,$color,$tail,$w,$h,$chk) = split(//);
if ($flag == 0 && $in{'no'} eq "$no") {
if ($pw eq '') {
&error("該当記事には削除キーが設定されていません");
# 削除キーを照合
$match = &decrypt("$in{'pwd'}","$pw");
if ($match ne 'yes') { &error("削除キーが違います"); }
# 添付ファイル削除
if (-e "$ImgDir$no$tail") { unlink("$ImgDir$no$tail"); }
if ($reno eq "") { $flag=2; }
else { $flag=1; }
elsif ($flag == 2 && $in{'no'} eq $reno) {
if (-e "$ImgDir$no$tail") { unlink("$ImgDir$no$tail"); }
else { push(@new,$_); }
if ($flag == 0) { &error("該当記事が見当たりません"); }
unshift(@new,$top);
open(OUT,">$logfile") || &error("Write Error : $logfile");
print OUT @
close(OUT);
# ロック解除
if ($lockkey) { & }
#----------------#
記事修正処理
#----------------#
sub usr_edt {
if ($in{'no'} eq '' || $in{'pwd'} eq '') {
&error("記事Noまたはパスワードが入力モレです");
if ($in{'action'} eq "edit") {
# フォーム入力チェック
# ロック処理
&lock if ($lockkey);
open(IN,"$logfile") || &error("Open Error : $logfile");
while () {
($no,$reno,$date,$name,$mail,$sub,$com,$url,$host,$pw,$color,$tail,$w,$h,$chk) = split(//);
if ($in{'no'} == $no) {
if ($in{'action'} ne "edit") { }
$_ = "$no$reno$date$in{'name'}$in{'email'}$in{'sub'}$in{'comment'}$in{'url'}$host$pw$in{'color'}$tail$w$h$chk?n";
if ($in{'action'} eq "edit") { push(@new,$_); }
close(IN);
if (!$flag) { &error("該当の記事が見当たりません"); }
if ($pw2 eq "") { &error("パスワードが設定されていません"); }
$check = &decrypt($in{'pwd'}, $pw2);
if ($check ne "yes") { &error("パスワードが違います"); }
if ($in{'action'} eq "edit") {
unshift(@new,$top);
open(OUT,">$logfile") || &error("Write Error : $logfile");
print OUT @
close(OUT);
&unlock if ($lockkey);
if ($in{'url'}) { $in{'url'} = ""; }
if ($in{'email'}) { $in{'email'} = ""; }
print "- 以下のとおり修正が完了しました -?n";
print "?n";
print "名前: $in{'name'}?n";
print "e-mail: $in{'email'}?n";
print "題名: $in{'sub'}?n";
print "URL: $in{'url'}?n";
print "$in{'comment'}?n";
print "?n";
print "?n";
print "?n";
print "?n?n";
$com =? s//?r/g;
print "[]?n";
print "- 変更する部分のみ修正して送信ボタンを押して下さい -?n";
&form("edit",$no,$reno,$date,$name,$mail,$sub,$com,$url,$host,$pw,$color);
print "?n?n";
#------------------------#
フォーム入力チェック
#------------------------#
sub form_check {
# 他サイトからのアクセスを排除
if ($base_url) {
$ref = $ENV{'HTTP_REFERER'};
$ref =? s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/
if ($ref !? /$base_url/i) { &error("不正なアクセスです"); }
# 入力項目のチェック
if ($in{'name'} eq "") { &error("名前が入力されていません"); }
if ($in{'comment'} eq "") { &error("コメントが入力されていません"); }
if ($in_email) {
if ($in{'email'} eq "") { &error("Eメールが入力されていません"); }
elsif ($in{'email'} !? /[?w?.?-]+?@[?w?.?-]+?.[a-zA-Z]{2,5}$/) {
&error("Eメールの入力内容が不正です");
#--------------#
時間を取得
#--------------#
sub get_time {
$ENV{'TZ'} = "JST-9";
($min,$hour,$mday,$mon,$year,$wday) = (localtime($times))[1..6];
@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);
#----------------#
カウンタ処理
#----------------#
sub counter {
# 閲覧時のみカウントアップ
if ($mode eq '') { $cntup=1; } else { $cntup=0; }
# カウントファイルを読みこみ
open(IN,"$cntfile") || &error("Open Error : $cntfile");
eval "flock(IN, 1);";
close(IN);
# IPチェックとログ破損チェック
($cnt, $ip) = split(/:/, $data);
if ($addr eq "$ip" || $cnt eq "") { $cntup=0; }
# カウントアップ
if ($cntup) {
open(OUT,"+< $cntfile") || &error("Write Error : $cntfile");
eval "flock(OUT, 2);";
truncate(OUT, 0);
seek(OUT, 0, 0);
print OUT "$cnt?:$addr";
close(OUT);
# 桁数調整
while(length($cnt) < $mini_fig) { $cnt = '0' . $ }
@cnts = split(//, $cnt);
# GIFカウンタ表示
if ($counter == 2) {
foreach (0 .. $#cnts) {
# テキストカウンタ表示
print "$cnt?n";
#--------------#
ロック処理
#--------------#
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 {
local($com, $hp, $MailSub, $MailBody);
# メールタイトルを定義
$MailSub = "[$title : $no] $in{'sub'}";
$mailFrom = "$in{'email'}";
# 記事の改行を復元
= $in{'comment'};
$com =? s//?n/g;
$com =? s/&//g;
$com =? s/&/?"/g;
if ($in{'url'}) { $hp = "http://$in{'url'}"; }
else { $hp = ""; }
# メール本文を定義
$MailBody = <<"EOM";
投稿日時:$date
ホスト名:$host
ブラウザ:$ENV{'HTTP_USER_AGENT'}
投稿者名:$in{'name'}
Eメール:$in{'email'}
タイトル:$in{'sub'}
投稿記事:
# JISコード変換
&jcode'convert(*MailSub,'jis');
&jcode'convert(*MailBody,'jis');
# メールアドレスがない場合は管理者メールに置き換え
if ($in{'email'} eq "") { $email = $ }
else { $email = $in{'email'}; }
$MailBody="--------------------------------------------------------?n".$MailB
$MailBody.="--------------------------------------------------------?n";
$MailHeader ="MIME-Version: 1.0?n";
$MailHeader .= "Content-type: text/ charset=ISO-2022-JP?n";
$MailHeader .= "Content-Transfer-Encoding: 7bit?n";
$MailHeader .= "X-Mailer: $ver?n?n";
sendMail($to,$mailTo,$mail2,$mailFrom,$MailSub,$MailHeader,$MailBody,);
#----------------------#
パスワード暗号処理
#----------------------#
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, $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"; }
#------------------#
HTMLのヘッダー
#------------------#
sub header {
$head_flag=1;
print "Content-type: text/html?n?n";
print <<"EOM";
#-----------------#
自動URLリンク
#-----------------#
sub auto_link {
$_[0] =? s/([^=^?"]|^)(http?:[?w?.???-?/???&?+?=?:?@?%?;?#?%]+)/$1"; }
if ($purl) { $purl = "&&"; }
if ($preno) { $pno = "Res: $preno"; }
# 保存記事をフォーマット
push(@temp,"[$pno] $psub 投稿者:$pname 投稿日:$pdate $purl$pcom?n");
# 過去ログを更新
unshift(@past,@temp);
open(OUT,">$pastfile") || &error("Write Error : $pastfile");
print OUT @
close(OUT);
if ($past_flag) { chmod(0666,$pastfile); }
#------------#
#------------#
sub past {
open(IN,"$nofile") || &error("Open Error : $nofile");
$pastno = ;
close(IN);
if (!$in{'pastlog'}) { $in{'pastlog'} = $ }
print <<"EOM";
過去ログ[$in{'pastlog'}]
過去ログ:
$pastkey = $
while ($pastkey > 0) {
if ($in{'pastlog'} == $pastkey) {
print "$pastkey Page?n";
print "$pastkey Page?n";
$pastkey--;
print "?n?n";
print "?n";
print "?n";
print "?n";
print "?n";
print "ワード検索:?n";
print "条件:?n";
foreach ('AND', 'OR') {
if ($in{'cond'} eq "$_") {
print "$_?n";
print "$_?n";
print "?n";
print "表?示:?n";
if ($in{'view'} eq "") { $in{'view'} = $p_ }
foreach (5,10,15,20,25,30) {
if ($in{'view'} eq "$_") {
print "$_件?n";
print "$_件?n";
print "?n?n";
print "?n";
# 表示ログを定義
$in{'pastlog'} =? s/?D//g;
$file = "$pastdir$in{'pastlog'}?.dat";
# ワード検索処理
if ($in{'word'} ne "") {
$in{'word'} =? s/ / /g;
@pairs = split(/?s+/, $in{'word'});
open(IN,"$file") || &error("Open Error : $file");
while () {
foreach $pair (@pairs) {
if (index($_,$pair) >= 0) {
if ($in{'cond'} eq 'OR') { }
if ($in{'cond'} eq 'AND') { $flag=0; }
if ($flag) { push(@new,$_); }
close(IN);
$count = @
print "検索結果:$count件?n";
if ($page eq '') { $page = 0; }
$end_data = @new - 1;
$page_end = $page + $in{'view'} - 1;
if ($page_end >= $end_data) { $page_end = $end_ }
$next_line = $page_end + 1;
$back_line = $page - $in{'view'};
$enwd = &url_enc($in{'word'});
if ($back_line >= 0) {
print "[]?n";
if ($page_end ne "$end_data") {
print "[]?n";
# 表示開始
foreach ($page .. $page_end) { print $new[$_]; }
print "?n?n";
# ページ区切り処理
$start = $page + 1;
= $page + $p_
open(IN,"$file") || &error("Open Error : $file");
while () {
if ($_ =? /^??[??d+??]/) { $flag=1; $i++; }
if ($flag) { print $_; }
$_ =? s///
print "$_?n";
close(IN);
print "?n";
$next = $page + $p_
$back = $page - $p_
print "?n";
if ($back >= 0) {
print "?n";
print "?n";
print "?n";
print "?n";
print "?n";
if ($next < $i) {
print "?n";
print "?n";
print "?n";
print "?n";
print "?n";
print "?n?n?n";
#------------------#
チェックモード
#------------------#
sub check {
print "Check Mode?n";
print "?n";
# ログパス
if (-e $logfile) {
print "ログファイルのパス:OK?n";
# パーミッション
if (-r $logfile && -w $logfile) {
print "ログファイルのパーミッション:OK?n";
} else { print "ログファイルのパーミッション:NG?n"; }
} else { print "ログファイルのパス:NG → $logfile?n"; }
# カウンタログ
print "カウンタ:";
if ($counter) {
print "設定あり?n";
if (-e $cntfile) { print "カウンタログファイルのパス:OK?n"; }
else { print "カウンタログファイルのパス:NG → $cntfile?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";
if (-r $lockdir && -w $lockdir && -x $lockdir) {
print "ロックディレクトリのパーミッション:OK?n";
print "ロックディレクトリのパーミッション:NG → $lockdir?n";
} else { print "ロックディレクトリのパス:NG → $lockdir?n"; }
# 画像ディレクトリ
print "画像ディレクトリ:$ImgDir?n";
if (-d $ImgDir) {
print "画像ディレクトリのパス:OK?n";
if (-r $ImgDir && -w $ImgDir && -x $ImgDir) {
print "画像ディレクトリのパーミッション:OK?n";
print "画像ディレクトリのパーミッション:NG → $ImgDir?n";
} else { print "画像ディレクトリ:NG → $ImgDir?n"; }
# 過去ログ
print "過去ログ:";
if ($pastkey == 0) { print "設定なし?n"; }
print "設定あり?n";
# NOファイル
if (-e $nofile) {
print "NOファイルパス:OK?n";
if (-r $nofile && -w $nofile) {
print "NOファイルパーミッション:OK?n";
} else { print "NOファイルパーミッション:NG → $nofile?n"; }
} else { print "NOファイルのパス:NG → $nofile?n"; }
# ディレクトリ
if (-d $pastdir) {
print "過去ログディレクトリパス:OK?n";
if (-r $pastdir && -w $pastdir && -x $pastdir) {
print "過去ログディレクトリパーミッション:OK?n";
print "過去ログディレクトリパーミッション:NG → $pastdir?n";
} else { print "過去ログディレクトリパーミッション:NG → $pastdir?n"; }
print "?n?n";
#------------------#
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サイズ認識
#-----------------#
sub PngSize {
local($png) = @_;
local($data);
open(PNG, "$png") || return (0,0);
binmode(PNG);
read(PNG, $data, 24);
close(PNG);
$W = unpack("N", substr($data, 16, 20));
$H = unpack("N", substr($data, 20, 24));
return ($W, $H);
#-----------------#
URLエンコード
#-----------------#
sub url_enc {
local($_) = @_;
s/(?W)/'%' . unpack('H2', $1)/
#----------------#
投稿フォーム
#----------------#
sub form {
local($type,$no,$reno,$date,$name,$mail,$sub,$com,$url,$host,$pw,$color) = @_;
local($cnam,$ceml,$curl,$cpwd,$cico,$ccol);
print "?n";
## フォーム種別を判別
if ($type eq "edit") {
print "?n";
print "?n";
print "?n";
print "?n";
print "?n";
} elsif ($type eq "res") {
if ($res_clip) {
print "?n";
print "?n";
print "?n";
print "?n";
($cnam,$ceml,$curl,$cpwd,$cico,$ccol) = &get_
print "?n";
print "?n";
($cnam,$ceml,$curl,$cpwd,$cico,$ccol) = &get_
print <<"EOM";
# 添付フォーム
if ($type eq "" || ($type eq "res" && $res_clip)) {
print "添付File?n";
print "?n";
# パスワード欄
if ($type ne "edit") {
print "パスワード",
"(英数字で8文字以内)?n";
print "文字色?n";
@col = split(/?s+/, $colors);
if ($ccol eq "") { $ccol = $col[0]; }
foreach (@col) {
if ($ccol eq $_) {
print "■?n";
print "■?n";
print "?n";
if ($ImageCheck) {
print "?画像は管理者が許可するまで「COMING SOON」のアイコンが表?示されます。?n";
print "?n";

我要回帖

更多关于 sendredirect 的文章

 

随机推荐