|
|
|
Áú¹®°ú ´äº¯
|
|
* ¸Å´º¾ó°ú ÀÚÁÖ ¹¯´Â Áú¹®À» ¸ÕÀú È®ÀÎ ÇϽðí, Áú´ä °Ô½ÃÆÇ¿¡¼ °Ë»öÈÄ Áú¹®¹Ù¶ø´Ï´Ù.
* Áú¹®½Ã¿¡´Â ÀÚ½ÅÀÇ °èÁ¤ ¾ÆÀ̵ð¿Í ȨÁÖ¼Ò¸¦ ÇÊÈ÷ ³²°ÜÁֽñ⠹ٶø´Ï´Ù.
* ¿¡·¯·Î ÀÎÇÑ ¹®Àǽà ¿¡·¯¸Þ¼¼Áö¸¦ ÇÊÈ÷ ÇÔ²² ³²°ÜÁֽñ⠹ٶø´Ï´Ù.
* Áú´ä °Ô½ÃÆÇÀº °ø°³°Ô½ÃÆÇÀ¸·Î °èÁ¤ ºñ¹Ð¹øÈ£ Á¤º¸¸¦ ³²±â½Ã¸é ¾ÈµË´Ï´Ù.
|
Read Reply from No. 2176 article |
2002-09-26 16:53:03 |
|
|
|
|
NickName |
½Å»óÀÍ |
Subject |
ÇÑ°¡Áö´Â ÇØ°á, ±Ùµ¥ ´Ù¸¥ ¿¡·¯°¡ ¶Ç Àֳ׿ä- ¾Ë·ÁÁÖ¼¼¿ä. |
|
|
¡á Àü ÀÌ·¸°Ô ÇÏ´Ñ±î ±×ÂÊ ¿¡·¯´Â ¾ø¾îÁö´õ±º¿ä.
SetCookie("$id/cookie_pwd",$password,"0","/");
¡á ±Ùµ¥ ±Û¾²±â ¸ðµå±îÁö´Â µé¾î°¡´Âµ¥, ±ÛÀ» ¾²°í³ª¸é <jpg,gif ¸¸ Áö¿øµË´Ï
´Ù!! -> ¶ó´Â ¿¡·¯¸Þ¼¼Áö°¡ ³ª¿À´Â±º¿ä. ÷ºÎ ÆÄÀÏÀ» ¿Ã¸±°æ¿ì´Â ¹®Á¦°¡ ¾ø´Â
µ¥, ÷ºÎ ÆÄÀÏÀÌ ¾ø´Â°æ¿ì¿¡ ÀÌ·± ¿¡·¯ ¸Þ¼¼Áö°¡ ¶ß³×¿ä.
¾î¶»°Ô ÇØ°áÀ» ÇØ¾ß ÇÒÁö ³Ê¹« ³°¨ÇÕ´Ï´Ù. Á¶¾ð ºÎŹ µå¸³´Ï´Ù.
¾Æ·¡´Â ¿¡·¯³ª´Â ¼Ò½ººÎºÐÀÔ´Ï´Ù. º°Ç¥ ºÎºÐÀÌ ¿¡·¯ ¹ß»ýºÎÀ§¶ø´Ï´Ù.
//=====================================================ÀԷ¸ðµå=====================================================//
elseif($mode=="write") {
if($admin_only=="yes" || $day2==0){//°ü¸®ÀÚ¸¸ ±Û¾²±â
if($HTTP_COOKIE_VARS["$id/cookie_pwd"]!=$password){
header("location:$PHP_SELF?id=$id&mode=login&action=write&year2=$year2&month2=$month2&day2=$day2");
exit;}
}//°ü¸®ÀÚ¸¸ ±Û¾²±â
if($mode2=='write_ok')
{
$length_title2=strlen($title2);
$length_comment2=strlen($comment2);
if(!$title2){error("Á¦¸ñÀ» ÀÔ·ÂÇϼ¼¿ä");}
if(!$comment2){error("³»¿ëÀ» ÀÔ·ÂÇϼ¼¿ä");}
if(!ereg("([^[:space:]]+)",$title2)){error("Á¦¸ñ¿¡ °ø¹éÀ» ³ÖÀ»¼ö ¾ø½À´Ï´Ù!!");}
if(!ereg("([^[:space:]]+)",$comment2)){error("³»¿ë¿¡ °ø¹éÀ» ³ÖÀ»¼ö ¾ø½À´Ï´Ù!!");}
if(strlen($title2)>$max_title) {error("Á¦¸ñ¿¡ $max_title byte ÀÌ»ó ¾µ¼ö ¾ø½À´Ï´Ù!! - $length_title2 byte");}
if(strlen($comment2)>$max_comment) {error("³»¿ë¿¡ $max_comment byte ÀÌ»ó ¾µ¼ö ¾ø½À´Ï´Ù!! - $length_comment2
byte");}
// ÷ºÎÀ̹ÌÁö ÀúÀå
if($up_image!='none') {
if (!is_dir("$id/image")) {//imageµð·ºÅ丮»ý¼º
@mkdir("$id/image",0777);
@chmod("$id/image",0777);
lock("$id/image/index.htm");
@$fp=fopen("$id/image/index.htm","w") or die("$id/config.cgi ÀÇ Æ۹̼ÇÀ» È®ÀÎÇϼ¼¿ä!!");
fwrite($fp,"<script>window.alert('º¸¾È»ó Çöµð·ºÅ丮¸¦ º¼¼ö ¾ø½À´Ï´Ù.');
history.go(-1)</script>");
fclose($fp);
unlock("$id/image/index.htm");
}
// È®ÀåÀÚ °Ë»ç
$name_s=explode(".", $up_image_name); // Á¡À» ±¸ºÐÀ¸·Î ³ª´«´Ù.
$ext_s=strtolower($name_s[1]); // È®ÀåÀÚ¸¦ ¼Ò¹®ÀÚ·Î ¹Ù²Û´Ù.
¡Ú¡Ú¡Ú¡Ú¡Ú¡Úif($ext_s!=gif && $ext_s!=jpg && $ext_s!=jpeg) {error("jpg,gif ¸¸ Áö¿øµË´Ï´Ù!! - $ext_s");}
if(file_exists($id."/image/$up_image_name")) {error("µ¿ÀÏÇÑ À̸§ÀÇ À̹ÌÁö°¡ Á¸ÀçÇÕ´Ï´Ù");}
}¡Ú¡Ú¡Ú¡Ú¡Ú¡Ú
if($html != "enable") { //=======htmlÇã¿ëÇÏÁö ¾ÊÀ½
$comment2 = ereg_replace("<","<",$comment2);
$comment2 = ereg_replace(">",">",$comment2);
}
if ($autolink == "enable"){//=======ÀÚµ¿¸µÅ©Çã¿ë
$comment2 = auto_link($comment2);
}
$title2 = ereg_replace("\|","|",$title2);
$title2 = stripslashes($title2);
$title2 = chop($title2);
$comment2 = ereg_replace("\|","|",$comment2);
$comment2 = stripslashes($comment2);
//$comment2 = eregi_replace("\r\n\r\n","<p>",$comment2);
$comment2 = eregi_replace("\r\n","<br>",$comment2);
$comment2 = chop($comment2);
if($up_image!='none') {//====À̹ÌÁö ÀúÀå
copy ($up_image,$id."/image/".$up_image_name);
}
//=============¸Þ¼¼Áöó¸®=================//
@$line=file("$id/data/$year2-$month2-$day2.cgi");
$view = explode("|",$line[0]);
$no=$view[0];
if(!$no){$no=0;}
$no++;
$date=date("Y-m-d H:i:s",$time);
$newmsg="$no|$year2|$month2|$day2|$title2|$comment2|$up_image_name|0|$lock_view2|$point_view2|$date|";
lock("$id/data/$year2-$month2-$day2.cgi");
@$msg=fopen("$id/data/$year2-$month2-$day2.cgi","w") or die("$id/data/$year2-$month2-$day2.cgi ÀÇ
Æ۹̼ÇÀ» È®ÀÎÇϼ¼¿ä!!");
flock($msg,2);
fwrite ($msg,$newmsg."\n");
for ($i = 0; $i < count($line); $i++) {
@fwrite($msg, "$line[$i]");}
fclose($msg);
unlock("$id/data/$year2-$month2-$day2.cgi");
//=======================================//
if($day2==0){
$save_date="$year2-$month2";}
else {
$save_date="$year2-$month2-$day2";}
head();
echo "
<div align='center'><br><br>
<font class=ver8><b>$save_date</b></font> <font class=ver9>ÀÇ ÀÏÁ¤À» ÀÔ·ÂÇÏ¿´½À´Ï´Ù.</font><p>";
if($popup_window=="yes" && $skin_name!="diary"){echo"
<script>opener.location.reload(true); setTimeout('window.close()', 1000);</script>
<input class=button onclick=javascript:self.close() value='close' type=reset>";}
else{echo"
<meta http-equiv='refresh' content='0; url=./calendar.php3?id=$id&year=$year2&month=$month2'>
<input class=button type=button value='back'
onclick=\"window.location.href='./calendar.php3?id=$id&year=$year2&month=$month2'\">";}
echo "
</div>
</body>
</html>";
exit;
}
if(!$mode2)
{
if($day2==0){
$save_date="$year2-$month2";}
else {
$save_date="$year2-$month2-$day2";}
head();
check_submit();
echo "
<center>";
if($popup_window!="yes" || $skin_name=="diary"){echo "
<div align='$align'><br>";}
echo "
<form method=post action='' enctype='multipart/form-data'>
<input type=hidden name=id value='$id'>
<input type=hidden name=year2 value='$year2'>
<input type=hidden name=month2 value='$month2'>
<input type=hidden name=day2 value='$day2'>
<input type=hidden name=mode value='write'>
<input type=hidden name=mode2 value='write_ok'>
<table cellspacing=0 cellpadding=2 width=360 border=0>
<tr><td background=./icon/$icon/dot.gif colspan=2><p style=font-size:1pt;></p></tr>
<tr><td colspan=2> <img src=./icon/$icon/head.gif border=0 align=absmiddle><font class=ver9><b> Write
:::</b></font></td></tr>
<tr><td background=./icon/$icon/dot.gif colspan=2><p style=font-size:1pt;></p></tr>
</table>
<table cellspacing=0 cellpadding=3 width=360 border=0>
<tr>
<td align=right>
<font class=ver9>Date</font>
</td>
<td>
<font class=ver8><b>$save_date</b></font>
<input type=checkbox name=lock_view2 value='yes'><font class=ver9>Lock</font>
<input type=checkbox name=point_view2 value='yes'><font class=ver9>Point</font>
</td>
</tr>
<tr>
<td align=right>
<font class=ver9>Title</font>
</td>
<td>
<input class=input type=text name=title2 size=25 maxlength='$max_title'>
<input type=checkbox name=autolink value='enable' checked><font class=ver9>Link</font>
<input type=checkbox name=html value='enable'><font class=ver9>Html</font>
</td>
</tr>
<tr>
<td align=right>
<font class=ver9>Comment</font>
</td>
<td>
<textarea class=textarea name=comment2 rows=8 cols=40 wrap=physical></textarea>
</td>
</tr>
<tr>
<td align=right>
<font class=ver9>Image</font>
</td>
<td>
<input class=input type='file' name='up_image' size='25'>
</td>
</tr>
</table><br>
<table cellspacing=0 cellpadding=0 width=360 border=0>
<tr><td align=center>
<input class=button type=button onClick=check(this.form) value='submit'>
<input class=button type=reset name=cancel value='reset'>";
if($popup_window=="yes" && $skin_name!="diary"){echo "
<input class=button onclick=javascript:self.close() value='close' type=reset>";}
else{echo "
<input class=button type=button value='back'
onclick=\"window.location.href='./calendar.php3?id=$id&year=$year2&month=$month2'\">";}
echo "
</td></tr>
</table>
</form>";
if($popup_window!="yes"){echo "
</div>";}
echo "
</center>";//====form
}//===input
}//===mode(write)
[ °ü·Ã±Û ]
|
|
Page Loading [ 1.68 Sec ]
SQL Time [ 1.05 Sec ]
|
|
|