英语作文(asts clean projectup project in dangbin park)短一点的

湖北省部分重点中学2010届高三第二次联考英语参考答案
湖北省部分重点中学2010届高三第二次联考
&ABCAA&& 6---10
AABAB&& 11---15
CABCA&& &16---20
21—25 DCBBC& 26---30
ADDAC&&&&&
31—35 BAABD& 36---40 CDCCA&
41---45 ADDBA&&&
BCCAB&&&&&
CBBD&&& 55—58
DCBC&& 59---63
67---70 DABB
71. twice as many medals
72. trapped underground
73. who has won
74. Whenever the meeting will be held
75. (should) turn off
76. as has our way of life
77. when they reached&
78. is being operated
79. will have left
80. must have gone home
My fellow students,
As head of the group, I would like to report to you on the event.
Last Friday, the Students’ Union organized a clean-up project in Zhongshan park, for the purpose of raising the environmental awareness of the public. At around 4pm, 35 students went to the park to pick up the litter.
Actually, we did a wonderful job. When we were collecting the litter, many people came to our help, showing considerable appreciation and support. But our work still left something to be desired. For one thing, since we started late in the afternoon, it was not long enough to attract enough people. For another, some people passed by because they even didn’t know what we were doing. Otherwise, our project could have been much better and more effective.
Next time if we have similar activities, I think we should try to start earlier.
And also, we can put up some posters to tell people what we are doing and call their attention to environmental protection. Thank you.
附:作文评分细则;
1.本题总分为25分,按5个档次给分。&
2.评分时,先根据文章的内容和语言初步确定其所属档次,然后以该档次的要求来衡量,确定或调整档次,最后给分。&
3.词数少于80的,从总分中减去2分。
4.评分时,应注意的主要内容为:内容要点、应用词汇和语法结构的数量和准确性、上下文的连贯性及语言的得体性。&
5.拼写与标点符号是语言准确性的一个方面,评分时,应视其对交际的影响程度予以考虑。英、美拼写汉词汇用法均可接受。
6.如书写较差,以至影响交际,将分数降低一个档次。&
7.内容要点可用不同方式表达,对紧扣主题的适当发挥不予扣分。&
【各档次的给分范围和要求】&
第五档(很好);(21-25分)&
1.完全完成了试题规定的任务。
2.覆盖所有内容要点。&
3.应用了较多的语法结构和词汇。&
4.语法结构或词汇方面有些许错误,但为尽力使用较复杂结构或较高级词汇所致;具备较强的语言运用能力。&
5.有效地使用了语句间的连接成分,使全文结构紧凑。&
6.完全达到了预期的写作目的。&
第四档(好):(16-20分)&
1.完全完成了试题规定的任务。&
2.虽漏掉1、2个次重点,但覆盖所有主要内容。&
3.应用的语法结构和词汇能满足任务的要求。&
4.语法结构或词汇方面应用基本准确,些许错误主要是因尝试较复杂语法结构或词汇所致。&
5.应用简单的语句间的连接成分,使全文结构紧凑。&
6.达到了预期的写作目的。
第三档(适当):(11-15分)&
1.基本完成了试题规定的任务。&
2.虽漏掉一些内容,但覆盖所有主要内容。&
3.应用的语法结构和词汇能满足任务的要求。&
4.有一些语法结构或词汇方面的错误,但不影响理解。&
5.应用简单的语句间的连接成分,使全文内容连贯。&
6.整体而言,基本达到了预期的写作目的。&
第二档(较差):(6-10分)&
1.未恰当完成试题规定的任务。
2.漏掉或未描述清楚一些主要内容,写了一些无关内容。
3.语法结构单调、词汇项目有限。&
4.有一些语法结构或词汇方面的错误,影响了对写作内容的理解。&
5.较少使用语句间的连接成分,内容缺少连贯性。&
6.信息未能清楚地传达给读者。&
第一档(差):(1-5分)&
1.未完成试题规定的任务。
2.明显遗漏主要内容,写了一些无关内容,原因可能是未理解试题要求。&
3.语法结构单调、词汇项目有限。&
4.较多语法结构或词汇方面的错误,影响对写作内容的理解。&
5.缺乏语句间的连接成分,内容不连贯。
6.信息未能传达给读者。&
不得分:(0分)&
未能传达给读者任何信息:内容太少,无法评判;写的内容均与所要求内容无关或所写内容无法看清。&
听力录音稿:
(Text 1)
W: I’m interested in the advertising job that you have open.
M: Oh, yes. First, fill out this form, and then someone will be
with you in a few minutes.
W: How much more time will it take for the train to arrive in
M: Let’s see. It’s a ten-hour trip from where we begin. We have
been on the train for 8 hours and it is now 5 p.m.
W: Have you bought your Christmas presents yet?
M: Almost. I got a watch for my mother. And I’m going to find a
book or a recorder for my dad.
W: This is the third time you’ve been late this week. You have
to do better than that, or I might let you go.
M: It won’t happen again.
W: Look at the price of meat. It’s gone up again.
M: I know. That’s why I’m buying some fish. And it’s the same in
other shops.
M: How did you get into modeling, Stacy?
W: well, when I graduated from art school, I moved to Los
Angeles to look for work as an art director in a movie, but I never
got any luck. And I was running out of money.
M: So what did you do?
W: I got a job as a waitress in a seafood restaurant. While I
was working there, a customer offered me some work as a model.
Within a few weeks, I was modeling full time.
M: Wow, what a lucky break!
W: What do you think?
M: Well, it has just as many bedrooms as the last apartment. And
the living room is huge.
W: But the bedrooms are too small. And there isn’t enough closet
space for my clothes.
M: And it’s not as cheap as the last apartment we saw.
W: But the apartment was dark and it was in a dangerous
neighborhood.
M: Let’s see if the manager of the sales department has
something else to show us.
W: Hi, Albert. This is Helen.
M: Oh, Hi. How are things?
W: Just fine, thanks. Uh, are you doing anything on Saturday
M: Hmm. Saturday night? Let me think. Oh, yes. My cousin just
called up to say he was flying in that night. I told him I would
pick him up.
W: Oh, that’s too bad! It’s my birthday. I’m having dinner with
Daniel, and I thought I’d invite more people and make it a
M: I’m really sorry, but I won’t be able to make it.
W: I’m sorry, too. But that’s OK.
W: Nice to see you here! When did you arrive in this
M: Actually I’m traveling with a group. We have a very tight
timetable, but as I happen to be here, I thought I might take a
couple of hours off and see an old friend.
W: I am glad you did. I must apologize for sounding so rude just
now for I was completely taken by surprise. You should have warned
me that you were coming. Well, the most important thing is that you
are here. What have you been doing so far?
M: As I just mentioned, I’m with a tourist group of old
classmates, one of whom happens to be working for the tourist
company. As most of us have already been to the southeastern Asia
countries and some have never been to Europe, our tourist friend
arranged this trip for us at special reduced rates.
W: How lucky for you! Is it your first trip here? How have you
M: Actually I’ve been here before, some years ago on a business
trip, working for a government organization, so I’ve already done
most of my sight-seeing in London and that’s why I have some free
time to myself this time.
W: Good. Now, tell me, what would you most like to see or
M: Well, I don’t know really. I’ve already seen the most famous
historical sites and scenic spots, and most impressive as they are,
they don’t tell me much about the real ordinary English people and
the country.
W: I see what you mean. I’ll drive you to the countryside to eat
at a local pub tomorrow and perhaps you’ll see something of the old
England, though I must admit there is not much old England left by
now. Many old village shops are closed and the village schools too.
But you’ll find the people in the countryside more friendly and
I have been weak in hearing all my life. By the time I was five
years old, putting on hearing aids in the morning was just as
normal as brushing my teeth. However, I never believe that it
should limit my success in any way.
&& I have been looked down
upon during my 17 years. My head teacher told my parents I belonged
to a school for the deaf. My classmates told me something was wrong
with my brain. People speak louder than usual when they see my
hearing aids in my ears. However, my hearing disability has made me
a stronger person. I have to work harder and earn top grades in
school to earn the respect of my teacher. In sports, I have had to
run faster, hit harder, catch better and score more points to prove
I’m not physically limited. I consider myself no different from
anyone else. In my struggle to prove I’m equal to my non-disabled
classmates, I have made myself better than the average
&& I truly believe I would not
be the strong person I am today if I did not have a hearing
disability.
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。#!/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";}

我要回帖

更多关于 英语四级作文 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信