¿©±â¼ ±¸ÇöÇÒ °æ¸Å °Ô½ÃÆÇÀº ¾î¶² ¹°°ÇÀ̵ç ÀÚÀ¯·Ó°Ô °æ¸Å¸¦ µî·ÏÇÒ ¼ö ÀÖ°í °æ¸Å µî·ÏÀÚ Áß½ÉÀ¸·Î °æ¸Å°¡ ÁøÇàµË´Ï´Ù. µî·ÏÀÚ´Â °æ¸ÅÀÇ ÁøÇà ¿©ºÎ¸¦ ¼öÁ¤ÇÒ ¼ö ÀÖÀ¸¸ç »èÁ¦±îÁö ÇÒ ¼ö ÀÖ½À´Ï´Ù. ´Ù¸¸ ÀÔÂûÀÚÀÇ »èÁ¦´Â ÇØ´ç °æ¸Å¸¦ »èÁ¦ ÇؾßÁö¸¸ ¸ðµÎ »èÁ¦µË´Ï´Ù. °æ¸Å ÀÔÂûÀº ±âº» °æ¸Å °¡°Ýº¸´Ù Ä¿¾ßÇϸç Çѹø¸¸ ÀÔÂûÀÌ °¡´ÉÇÕ´Ï´Ù. °æ¸Å°¡ Á¾·áµÉ °æ¿ì ¸ÅµµÀÚ¿Í ³«ÂûÀÚ¿¡°Ô ¸ÞÀÏÀ» Àü¼ÛÇÏ¸ç ¸¶°¨À» °Ô½ÃÆÇ¿¡ Ç¥½ÃÇÕ´Ï´Ù.
°æ¸Å °Ô½ÃÆÇÀÇ Å×ÀÌºí ¿ª½Ã µÎ°³·Î ÀÌ·ç¾îÁý´Ï´Ù. °Ô½ÃÆÇÀÇ ÁÖ¿ä ȸéÀÇ Á¤º¸¸¦ ÀúÀåÇÏ´Â Å×À̺í°ú ÀÔÂûÀÚÀÇ Á¤º¸¸¦ ÀúÀåÇÏ´Â Å×À̺íÀÔ´Ï´Ù. ¿©±â¼ ¸¸µé Å×ÀÌºí ¿ª½Ã ¸¸µå´Â °úÁ¤¸¸ ÀÍÈ÷±â ¹Ù¶ø´Ï´Ù. Admin ¿µ¿ª¿¡¼ °Ô½ÃÆÇ Å×À̺íÀ» »ý¼ºÇÏ´Â ¹æ¹ýÀÌ ÀÖÀ¸¹Ç·Î ÀÌ°ÍÀ» ÀÌ¿ëÇؼ Å×À̺íÀ» ¸¸µé¾î¾ß ÇÕ´Ï´Ù. ¼öÀÛ¾÷À¸·Î Å×À̺í À̸§À» Á¤ÇÏ°í ¸¸µé °æ¿ì´Â ´ÜÁö °æ¸Å °Ô½ÃÆǸ¸À» ¸¸µé °æ¿ì¿¡ »ç¿ëÇÕ´Ï´Ù. Áï, °æ¸Å½ºÅ©¸³Æ®ÀÇ °æ¸Å Å×À̺í À̸§À» Áö±Ý ¸¸µç Å×À̺í À̸§À¸·Î ¸ðµÎ ¼öÁ¤Çؼ »ç¿ëÇØ¾ß ÇÕ´Ï´Ù. »çÀÌÆ®ÀÇ ±âº» ±¸¼ºÀ» ´ÙÁß °Ô½ÃÆÇ ¸ðµå·Î Ç߱⠶§¹®¿¡ admin ¿µ¿ª¿¡¼ °Ô½ÃÆÇÀ» »ý¼ºÇØ¾ß ÇÕ´Ï´Ù. ¹°·Ð °æ¸Å ½ºÅ©¸³Æ®¸¦ ½ÇÇàÇϱâ À§Çؼ °æ¸Å Å×À̺í À̸§À» ¸µÅ©·Î Àü´ÞÇÏ´Â ¹æ¹ýÀ» »ç¿ëÇÒ ¼öµµ ÀÖ½À´Ï´Ù.
mysql>create databases libchal ; À§ libchal µ¥ÀÌÅͺ£À̽º´Â ÀÚ·á½Ç µ¥ÀÌÅͺ£À̽º¿Í °°½À´Ï´Ù. ¸¸¾à °æ¸Å °Ô½ÃÆÇ°ú ÀÚ·á½Ç °Ô½ÃÆÇ Áß Çϳª¸¸ »ç¿ëÇÏ´õ¶óµµ libchal µ¥ÀÌÅͺ£À̽º´Â ¸¸µé¾î¾ß ÇÕ´Ï´Ù. ÀÚ·á½Ç °Ô½ÃÆÇ¿¡¼ µ¥ÀÌÅͺ£À̽º¸¦ ¸¸µé¾ú´Ù¸é ´Ù½Ã ¸¸µéÁö ¾Ê¾Æµµ µË´Ï´Ù.
./mysql -u root -p libchal < libchaltest.sql CDÀÇ libchaltest.sql ÆÄÀÏÀ» ÀÌ¿ëÇؼ Çѹø¿¡ °æ¸Å °Ô½ÃÆÇ µÎ°³ÀÇ Å×À̺íÀ» »ý¼ºÇÕ´Ï´Ù. ¹°·Ð °¢ Å×À̺íÀÇ ¼Ó¼ºÀ» º¯°æÇÒ °æ¿ì ÀÌ ÆÄÀÏÀ» ¼öÁ¤Çؼ »ç¿ëÇÏ¸é µË´Ï´Ù. ±×¸®°í, ¿©±â¼ »ý¼ºÇÏ´Â Å×À̺íÀº »çÀÌÆ® ¸ÞÀΠȸ鿡 ³ªÅ¸³ªÁö ¾Ê½À´Ï´Ù. ¿ÀÁ÷ admin ¿µ¿ª¿¡¼ ¸¸µç Å×ÀÌºí¸¸ »çÀÌÆ® ¸ÞÀΠȸ鿡 ³ªÅ¸³³´Ï´Ù. ¸¸¾à ¿©±â¼ Å×À̺íÀ» »ý¼ºÇÑ ÈÄ ÀÌ Å×À̺íÀ» ÀÌ¿ëÇؼ °æ¸Å ½ºÅ©¸³Æ®¸¦ Å×½ºÆ®ÇÏ·Á¸é ¾Æ·¡¿Í °°Àº ¸µÅ©·Î »ç¿ëÇØ¾ß ÇÕ´Ï´Ù. <a href ='main_view.php?chanl=main_view&f=°æ¸Å ¸ÞÀÎ Å×À̺í¸í &f2=°æ¸Å ÀÔÂûÀÚ Å×ÀÌºí ¸í&ssid=$username' > ÀÌ°ÍÀº ÀÚ·á½ÇÀÇ °æ¿ìµµ ¸¶Âù°¡ÁöÀÔ´Ï´Ù.
°æ¸Å Å×À̺íÀÇ °æ¿ìµµ µÎ°³ÀÇ Å×À̺í·Î ±¸¼ºµÇ¾î ÀÖÀ¸¸ç ½ºÅ©¸³Æ® ¿ª½Ã µÎ°³·Î ÀÌ·ç¾îÁ® ÀÖ½À´Ï´Ù. °¢°¢ÀÇ ±¸¼ºÀÎÀÚ´Â °æ¸Å ¸ÞÀÎ Å×À̺íÀÇ °æ¿ì °æ¸Å µî·ÏÀÚÀÇ Á¤º¸¸¦ ÀúÀåÇÏ°í ÀÔÂû Å×À̺íÀÇ °æ¿ì ÇØ´ç °æ¸Å ÀÔÂûÀÚÀÇ Á¤º¸¸¦ ÀúÀåÇÕ´Ï´Ù.
°æ¸Å µî·ÏÀÚÀÇ Á¤º¸¸¦ ÀúÀåÇÕ´Ï´Ù. no - °æ¸ÅÀÇ °íÀ¯ ¹øÈ£¸¦ ÀúÀåÇÕ´Ï´Ù. name - °æ¸Å µî·ÏÀÚ À̸§À» ÀúÀåÇÕ´Ï´Ù. email - °æ¸Å µî·ÏÀÚ ¸ÞÀÏ ÁÖ¼Ò¸¦ ÀúÀåÇÕ´Ï´Ù. tel - °æ¸Å µî·ÏÀÚÀÇ ÀüȹøÈ£¸¦ ÀúÀåÇÕ´Ï´Ù. title - °æ¸Å Á¦¸ñÀ» ÀúÀåÇÕ´Ï´Ù. content - °æ¸ÅÀÇ ³»¿ëÀ» ÀúÀåÇÕ´Ï´Ù. edate - °æ¸ÅÀÇ ¸¶°¨ ³¯Â¥¸¦ ÀúÀåÇÕ´Ï´Ù. smoney - °æ¸ÅÀÇ ±âº» ±Ý¾×À» ÀúÀåÇÕ´Ï´Ù. wdate - °æ¸Å µî·Ï ³¯Â¥¸¦ ÀúÀåÇÕ´Ï´Ù. sise - ÇØ´ç °æ¸ÅÀÇ ÀÔÂû ȸ¼ö¸¦ ÀúÀåÇÕ´Ï´Ù. hit - °æ¸Å Á¶È¸ ¼ö¸¦ ÀúÀåÇÕ´Ï´Ù. noÀÇ °æ¿ì ÀÚµ¿ Áõ°¡ÇÕ´Ï´Ù.
ÀÔÂûÀÚ Á¤º¸¸¦ ÀúÀåÇÏ´Â Ç׸ñÀÔ´Ï´Ù. no - ÀÔÂûÀÚÀÇ °íÀ¯ ¹øÈ£¸¦ ÀúÀåÇÕ´Ï´Ù. name - ÀÔÂûÀÚÀÇ À̸§À» ÀúÀåÇÕ´Ï´Ù. email - ÀÔÂûÀÚÀÇ ¸ÞÀÏ ÁÖ¼Ò¸¦ ÀúÀåÇÕ´Ï´Ù. tel - ÀÔÂûÀÚÀÇ ÀüÈ ¹øÈ£¸¦ ÀúÀåÇÕ´Ï´Ù. bmoney - ÀÔÂûÀÚÀÇ ÀÔÂû ±Ý¾×À» ÀúÀåÇÕ´Ï´Ù. tnum - ÇØ´ç °æ¸ÅÀÇ °íÀ¯ ¹øÈ£¸¦ ÀúÀåÇÕ´Ï´Ù. noÀÇ °æ¿ì ÀÚµ¿ Áõ°¡ÇÕ´Ï´Ù.
°æ¸Å °Ô½ÃÆÇÀÇ ¼Ò½º ¿ª½Ã ÃÑ µÎ°³·Î ÀÌ·ç¾îÁý´Ï´Ù. °¢ ȸéÀ» Ç¥ÇöÇÏ´Â ÇÔ¼ö·Î ±¸¼ºµÇ´Â ÆÄÀÏ(func_all.php)°ú ÇÔ¼öÀÇ ´Ù¾çÇÑ È¸é Ãâ·ÂÀ» À§ÇÑ ·çƾÀÌ ÀÖ´Â ÆÄÀÏ·Î(main_view.php)·Î ±¸¼ºµË´Ï´Ù.
<?php ////////////////////////////////////////////////// // // ÀÏÀÚ : 2000.2.15 am 5 // ÀÛ¼ºÀÚ: skycry (hong il) // // // method : °æ¸Å °Ô½ÃÆÇ functions // ////////////////////////////////////////////////// ?> <?php $connect = mysql_connect('localhost','root','gksmf444'); mysql_select_db('libchal',$connect); if($findtype == name) { $ally = mysql_query("select no,sise,title,hit,edate,wdate,name,email from $f where name like '%$findname%' order by no ",$connect); } if($findtype == title) { $ally = mysql_query("select no,sise,title,hit,edate,wdate,name,email from $f where title like '%$findname%' order by no ",$connect); } if($findtype == content) { $ally = mysql_query("select no,sise,title,hit,edate,wdate,name,email from $f where content like '%$findname%' order by no ",$connect); } if($findtype == t_c) { $ally = mysql_query("select no,sise,title,hit,edate,wdate,name,email from $f where title like '%$findname%' or content like '%$findname%' order by no ",$connect); } if(!$findtype) { $ally = mysql_query("select no,sise,title,hit,edate,wdate,name,email from $f order by no ",$connect);//$connection »ý·« ÇßÀ½ } $ally4 = mysql_query("select hit,sise from $f where no='$no'",$connect ); $ally3 = mysql_query("select tnum,no,bmoney,name,tel,email from $f2 where tnum ='$no' order by bmoney desc",$connect ); $ally2 = mysql_query("select smoney,title,edate,content,wdate,name,email,tel from $f where no='$no'",$connect ); $allylib = mysql_query("select tnum,no,name from $f2 where tnum ='$no' order by bmoney desc",$connect ); $t_num=mysql_num_rows($ally); $putup = mysql_fetch_array($ally4); $putup2 = mysql_fetch_array($allylib); $putally2=mysql_fetch_array($ally2); mysql_select_db('selectuser',$connect); $allyuser = mysql_query("select id,name,tel1,email,passwd from userin where id='$username' ",$connect); $putuser = mysql_fetch_array($allyuser); ?> <?php function main_view($s_mail,$t_num,$ally,$page,$findtype,$findname,$f,$f2,$root,$username) { $p_dip = 4 ; $p_page =4 ; $p_pagex = ceil($p_page / 2) ; $t_page = ceil($t_num / $p_dip) ; if(!$page) { $page = 1; } if( $page <= $p_pagex ) { $p_start = $p_pagex + 1 ; } else { $p_start = $page + 1; } $pt_page = ceil($p_start - $p_pagex) ; $next_p = $page + 1 ; $pre_p = $page - 1 ; $start_num = ($t_num - ($page * $p_dip))+($p_dip-1) ; if(!$root) { $admin = "User " ; } else { $admin = "Admin ÀÔ´Ï´Ù."; } echo(" <html> <title> main_view html </title> <body bgcolor=black> <center> <img src=skyt1.jpg border=0> <br> <table border=0 cellspacing=2 cellpadding=2 width=700 > <tr> <th bgcolor=white colspan=7 align=left> <font style='font-size:12px;font-style:italic;color:#blue'> <b>$t_page / $page : $admin </b></font></th> </tr> <tr> <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>No</b></font></td> <td bgcolor=#808080 width=370> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>Title</b></font></td> <td bgcolor=#808080 width=50 align=center> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>Name</b></font></td> <td bgcolor=#808080 width=50 align=center> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>Sise</b></font></td> <td bgcolor=#808080 align=center> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>Cnt</b></font></td> <td bgcolor=#808080 width=50 align=center> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>ÇöÀç</b></font></td> <td bgcolor=#808080 width=125 align=center> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>¸¶°¨</b></font></td> </tr> "); if(!$t_num) { echo (" <tr> <th bgcolor=black colspan=6><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>µî·ÏµÈ ±ÛÀÌ ¾ö½º¿ä... ^^;</b></font></th> </tr> </center> </table> </html> "); } else { for($pd=$start_num ; $pd > $start_num-$p_dip ; $pd--) { if($pd >= 0 ) { mysql_data_seek($ally,$pd); $put=mysql_fetch_array($ally); $wdate = date('Y-m-d H:i:s'); $title_link1 = "<a href ='main_view.php?chanl=title&no=$put[no]&f=$f&f2=$f2'>"; $title_link2 = "<a href ='main_view.php?chanl=title_end&no=$put[no]&f=$f&f2=$f2'>"; if($put[edate] > $wdate) { $h = "ÁøÇàÁß"; $title_link = $title_link1; } if($put[edate] < $wdate) { $h = "¸¶°¨"; $title_link = $title_link2; $s_mail; } echo(" <tr> <td bgcolor=black> <font style='font-size:13px;font-style:italic;color:white'> $put[no]</font></td> <td bgcolor=black> $title_link <font style='font-size:13px;font-style:italic;color:white'> <b>$put[title]</b></font></a></td> <td bgcolor=black align=center> <a href = mailto:$put[email] > <font style='font-size:13px;font-style:italic;color:white'> <b>$put[name]</b></font></a></td> <td bgcolor=black align=center> <font style='font-size:13px;font-style:italic;color:#ff1493'> <b>$put[sise]</b></font></td> <td bgcolor=black align=center> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>$put[hit]</b></font></td> <td bgcolor=black align=center> <font style='font-size:13px;font-style:italic;color:#008000'> <b>$h</b></font></td> <td bgcolor=black align=center> <font style='font-size:13px;font-style:italic;color:#9400d3'> <b>$put[edate]</b></font></td> </tr> "); } } echo(" <tr> <td bgcolor=black colspan=7> </td> </tr> <tr> <td bgcolor=black colspan=7 align=center> "); if($page == 1) { echo (" <font style='font-size:12px;font-style:italic;color:#fffff0'>first </font> "); } else { echo (" <a href =main_view.php?chanl=main_view&page=$pre_p&f=$f&f2=$f2> <font style='font-size:12px;font-style:italic;color:#fffff0'><< </font></a>"); } for($pp=$pt_page ; $pp < $p_page+$pt_page ; $pp++) { if($pp == $page ) { echo (" <font style='font-size:13px;font-style:italic;color:red'> $pp</font> "); } else { if($pp > 0 && $pp <= $t_page) { echo(" <a href =main_view.php?chanl=main_view&page=$pp&f=$f&f2=$f2> <font style='font-size:12px;font-style:italic;color:#808080'>[$pp]</font></a>"); } } } if($page == $t_page) { echo (" <font style='font-size:12px;font-style:italic;color:#fffff0'> last^^ </font>"); } else { echo (" <a href =main_view.php?chanl=main_view&page=$next_p&f=$f&f2=$f2> <font style='font-size:12px;font-style:italic;color:#fffff0'>pre>></font></a>"); } } echo(" </td> </tr> </center> </table> <br> <center> <table border=0 cellspacing=2 cellpadding=2 width=700 > <tr> <td bgcolor=black width=100> <a href =main_view.php?chanl=new_libchal&f=$f&f2=$f2> <img src=write.gif border=0> </a></td> <td bgcolor=black width=100> <a href =userin.php?chanl=main_view&username=$username> <img src=home.gif border=0> </a></td> <td bgcolor=black width=100> <a href =db_view.php?chanl=rootin> <img src=admin.gif border=0></a></td> <td bgcolor=black align=right width=150> <form method=post action=main_view.php> <input type=hidden name=chanl size=14 value=main_view> <input type=hidden name=f value=$f> <input type=hidden name=f2 value=$f2> <select name=findtype> <option value=name selected>Name <option value=title>Title <option value=content>Content <option value=t_c>Titl+Cont </select> </font></td> <td bgcolor=black width=150> <input type=text name=findname size=14> </td> <td bgcolor=black width=100> <input type=submit value=Find> </td> </tr> </table> </center> </html> "); } function edit_libchal($putally2,$no,$f,$f2,$putuser) { echo(" <html> <title> input_view html </title> <body bgcolor=black> <center> <img src=skyt1.jpg border=0> <br> <form method=post action=main_view.php> <input type=hidden name=chanl value=edit_libchal_in> <input type=hidden name=f value=$f> <input type=hidden name=f2 value=$f2> <input type=hidden name=no value=$no> <table border=0 cellspacing=2 cellpadding=2 width=700 > <tr> <td bgcolor=#808080 scrolling=no> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~Title</b></font></td> <td bgcolor=black align=left> <font style='font-size:13px;font-style:italic;color:#fffff0'> <input type=text name=title size=50 value='$putally2[title]'></font></td> </tr> <tr> <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~Name</b></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'> $putally2[name]</font></td> </tr> <tr> <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~Passwd</b></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#ff1493'> <input type=password name=passwd size=9></font></td> </tr> <tr> <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~E-mail</b></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'> $putally2[email]</font></td> </tr> <tr> <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~Tel</b></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'> $putally2[tel]</font></td> </tr> <tr> <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~¸¶°¨½Ã°£</b></font></td> <td bgcolor=black> <font style='font-size:13px;font-style:italic;color:#fffff0'> <select name=edata1> <option value=2000 selected>Y2K <option value=2001>Y21 </select> <select name=edata2> <option value=1>1mon <option value=2>2mon <option value=3>3mon <option value=4 selected>4mon <option value=5>5mon <option value=6>6mon <option value=7>7mon <option value=8>8mon <option value=9>9mon <option value=10>10mon <option value=11>11mon <option value=12>12mon </select> <select name=edata3> <option value=1>1day <option value=2>2day <option value=3>3day <option value=4>4day <option value=5>5day <option value=6>6day <option value=7>7day <option value=8>8day <option value=9>9day <option value=10>10day <option value=11>11day <option value=12>12day <option value=13>13day <option value=14 selected>14day <option value=15>15day <option value=16>16day <option value=17>17day <option value=18>18day <option value=19>19day <option value=20>20day <option value=21>21day <option value=22>22day <option value=23>23day <option value=24>24day <option value=25>25day <option value=26>26day <option value=27>27day <option value=28>28day <option value=29>29day <option value=30>30day <option value=31>31day </select> <select name=edata4> <option value=am>A.m <option value=pm selected>P.m </select> <select name=edata5> <option value=1>1si <option value=2>2si <option value=3 selected>3si <option value=4>4si <option value=5>5si <option value=6>6si <option value=7>7si <option value=8>8si <option value=9>9si <option value=10>10si <option value=11>11si </select> <select name=edata6> <option value=10>10 <option value=20>20 <option value=30>30 <option value=40 selected>40 <option value=50>50 <option value=00>00 </select> </font></td> </tr> <tr> <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~±âº»±Ý¾×</b></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#ff1493'> <input type=int name=smoney size=10 value='$putally2[smoney]'> <b>Won</b></font></td> </tr> <tr> <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~Content</b></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'> <textarea name=content rows=10 cols=70 > $putally2[content]</textarea></font></td> </tr> <tr> <td bgcolor=black align=center colspan=4> <font style='font-size:13px;font-style:italic;color:#fffff0'> <input type=submit value=¼öÁ¤Çϱâ> </font></td> </tr> </table> </form> </center> </body> </html> "); } function view_title($putally2,$ally3,$no,$f,$f2,$putuser) { $content=nl2br($putally2[content]) ; echo(" <html> <title> view_title html </title> <body bgcolor=black> <center> <img src=skyt1.jpg border=0> <br> <table border=0 cellspacing=2 cellpadding=2 width=700 > <tr> <td bgcolor=white align=center width=120> <font style='font-size:13px;font-style:italic;color:#blue'><b>$no No</b></font></td> <td bgcolor=white align=center width=580> <font style='font-size:13px;font-style:italic;color:#black'> <b>$putally2[title]</b></font></td> </tr> </table> <table border=0 cellspacing=2 cellpadding=2 width=700 > <tr> <td bgcolor=#808080 align=center width=100> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>$putally2[edate]:¸¶°¨</b></font></td> <td bgcolor=#808080 align=center width=200> <a href = mailto:$putally2[email] > <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>name:$putally2[name]</b></font></a></td> <td bgcolor=#808080 align=center width=280> <font style='font-size:13px;font-style:italic;color:red'> <b>±âº»money:$putally2[smoney]</b></font></td> </tr> <tr> <table border=0 cellspacing=2 cellpadding=2 width=700 height=250> <td bgcolor=black valign=top colspan=3 width=700 height=250> <font style='font-size:13px;font-style:italic;color:blue'><b>$content</b></font></td> </tr> </table> <table border=0 width=700 > <tr> <td bgcolor=#808080 align=center> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>ÀϼøÀ§</b></font></td> <td bgcolor=#808080 align=center> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>Name</b></font></td> <td bgcolor=#808080 align=center> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>Tel</b></font></td> <td bgcolor=#808080 align=center> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>Money</b></font></td> </tr> "); for($a=1 ; $a < 5 ; $a++) { $put2=mysql_fetch_array($ally3); if($put[smoney]<$put2[bmoney]) { echo(" <tr> <td bgcolor=black align=center width=150> <font style='font-size:13px;font-style:italic;color:#fffff0'><b>$a</b></td> <td bgcolor=black align=center width=150> <a href = mailto:$put2[email] > <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>$put2[name]</b></font></a></td> <td bgcolor=black align=center width=200> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>$put2[tel]</b></font></td> <td bgcolor=black align=center > <font style='font-size:13px;font-style:italic;color:red'> <b>$put2[bmoney]</b></font></td> </tr> "); } } echo(" </table> <table border=0 width=700 > <tr> <td bgcolor=black >   </td> </tr> <tr> <td bgcolor=black > <a href =main_view.php?chanl=input_newlibchal&tnum=$no&f=$f&f2=$f2> <img src=write.gif border=0></a></td> <td bgcolor=black ><a href =main_view.php?chanl=main_view&f=$f&f2=$f2> <img src=list.gif border=0></a></td> <td bgcolor=black ><a href =main_view.php?chanl=edit_libchal&no=$no&f=$f&f2=$f2> <img src=rewrite.gif border=0></a></td> <td bgcolor=black ><a href =main_view.php?chanl=del&no=$no&f=$f&f2=$f2> <img src=delete1.gif border=0></a></td> <td bgcolor=black ><a href =main_view.php?chanl=del_lib&no=$no&f=$f&f2=$f2> <img src=delete2.gif border=0></a></td> </tr> </table> </center> </html> "); } function error_view($title,$smoney,$edate,$content,$f,$f2) { if(!$title) { echo(" <script> window.alert('ÁÖÁ¦°¡ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä') history.go(-1) </script> "); exit; } if(!$smoney) { echo(" <script> window.alert('±âº» ±Ý¾×ÀÌ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä') history.go(-1) </script> "); exit; } if(!$content) { echo(" <script> window.alert('³»¿ëÀÌ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä') history.go(-1) </script> "); exit; } if(!$edate) { echo(" <script> window.alert('¸¶°¨ÀÏÀÌ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä') history.go(-1) </script> "); exit; } } function input_newlibchal($tnum,$f,$f2,$putuser) { echo(" <html> <title> input_newlibchal html </title> <body bgcolor=black> <center> <img src=skyt1.jpg border=0> <br> <form method=post action=main_view.php> <input type=hidden name=chanl value=input_newlibchal> <input type=hidden name=chanl2 value=input_newlibchal2> <input type=hidden name=tnum value=$tnum> <input type=hidden name=no value=$tnum> <input type=hidden name=f value=$f> <input type=hidden name=f2 value=$f2> <table border=0 cellspacing=2 cellpadding=2 width=700 > </table> <table border=0 cellspacing=2 cellpadding=2 width=700 > <tr> <td width=50 bgcolor=#808080> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~Name</b></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'> $putuser[name]</font></td> <td width=100 bgcolor=#808080> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~E-mail</b></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'> $putuser[email]</font></td> </tr> <tr> <td width=100 bgcolor=#808080> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~Tel</b></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'> $putuser[tel1]</font></td> <td width=100 bgcolor=#808080> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~ÀÔÂû±Ý¾×</b></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'> <input type=text name=bmoney size=10>won</font></td> </tr> </table> <br><br> <table border=0 cellspacing=2 cellpadding=2 width=71% > <tr> <td bgcolor=black align=center colspan=4> <font style='font-size:13px;font-style:italic;color:#fffff0'> <input type=submit value=ÀÔÂûµî·Ï> <input type=reset value=Áö¿ì±â></font></td> </tr> </table> </form> </center> </body> </html> "); } function input_view($f,$f2,$connect,$putuser) { echo(" <html> <title> input_view html </title> <body bgcolor=black> <center> <img src=skyt1.jpg border=0> <br> <form method=post action=main_view.php> <input type=hidden name=chanl value=input_new> <input type=hidden name=f value=$f> <input type=hidden name=f2 value=$f2> <table border=0 cellspacing=2 cellpadding=2 width=700 > <tr> <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~Title</b></font></td> <td bgcolor=black align=left><font style='font-size:13px;font-style:italic;color:#fffff0'> <input type=text name=title size=44> </font></td> </tr> <tr> <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~Name</b></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'> $putuser[name]</font></td> </tr> <tr> <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~E-mail</b></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'> $putuser[email] </font></td> </tr> <tr> <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~Tel</b></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'> $putuser[tel1]</font></td> </tr> <tr> <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~¸¶°¨½Ã°£</b></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'> <select name=edata1> <option value=2000 selected>Y2K <option value=2001>Y21 </select> <select name=edata2> <option value=1>1mon <option value=2>2mon <option value=3>3mon <option value=4 selected>4mon <option value=5>5mon <option value=6>6mon <option value=7>7mon <option value=8>8mon <option value=9>9mon <option value=10>10mon <option value=11>11mon <option value=12>12mon </select> <select name=edata3> <option value=1>1day <option value=2>2day <option value=3>3day <option value=4>4day <option value=5>5day <option value=6>6day <option value=7>7day <option value=8>8day <option value=9>9day <option value=10>10day <option value=11>11day <option value=12>12day <option value=13>13day <option value=14 selected>14day <option value=15>15day <option value=16>16day <option value=17>17day <option value=18>18day <option value=19>19day <option value=20>20day <option value=21>21day <option value=22>22day <option value=23>23day <option value=24>24day <option value=25>25day <option value=26>26day <option value=27>27day <option value=28>28day <option value=29>29day <option value=30>30day <option value=31>31day </select> <select name=edata4> <option value=am>A.m <option value=pm selected>P.m </select> <select name=edata5> <option value=1>1si <option value=2>2si <option value=3 selected>3si <option value=4>4si <option value=5>5si <option value=6>6si <option value=7>7si <option value=8>8si <option value=9>9si <option value=10>10si <option value=11>11si <option value=12>12si </select> <select name=edata6> <option value=10>10 <option value=20>20 <option value=30>30 <option value=40 selected>40 <option value=50>50 <option value=00>00 </select> </font></td> </tr> <tr> <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~±âº»±Ý¾×</b></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#ff1493'> <input type=int name=smoney size=10><b>Won</b></font></td> </tr> <tr> <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~Content</b></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'> <textarea name=content rows=10 cols=70></textarea></font></td> </tr> <tr> <td bgcolor=black align=center colspan=4> <font style='font-size:13px;font-style:italic;color:#fffff0'> <input type=submit value=°æ¸Åµî·Ï> <input type=reset value=Áö¿ì±â></font></td> </tr> </table> </form> </center> </body> </html> "); } function del($no,$tnum,$f,$f2,$root,$putuser) { echo(" <html> <title> Del html </title> <body bgcolor=black> <center> <img src=skyt1.jpg border=0> <br> <form method=post action=main_view.php> <input type=hidden name=chanl value=del_no> <input type=hidden name=tnum value=$no> <input type=hidden name=no value=$no> <input type=hidden name=f value=$f> <input type=hidden name=f2 value=$f2> <table border=0 cellspacing=2 cellpadding=2 width=700 > <tr> <td bgcolor=#808080 width=74> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~passw</b></font></td> <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'> <input type=password name=passwd size=10></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'> <input type=submit value=Áö¿ì±â> </font></td> </tr> <tr> <td bgcolor=#808080 width=74> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~Name</b></font></td> <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'> $putuser[name]</font></td> </tr> </table> </form> </center> </body> </html> "); } function del_lib($no,$tnum,$f,$f2,$root,$putuser) { echo(" <html> <title> Del_lib html </title> <body bgcolor=black> <center> <img src=skyt1.jpg border=0> <br> <form method=post action=main_view.php> <input type=hidden name=chanl value=del_lib2> <input type=hidden name=tnum value=$no> <input type=hidden name=no value=$no> <input type=hidden name=f value=$f> <input type=hidden name=f2 value=$f2> <table border=0 cellspacing=2 cellpadding=2 width=700 > <tr> <td bgcolor=#808080 width=74> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~Name</b></font></td> <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'> $putuser[name]</font></td> </tr> <tr> <td bgcolor=#808080 width=74> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~passw</b></font></td> <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'> <input type=password name=passwd size=9></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'> <input type=submit value=Áö¿ì±â> </font></td> </tr> </table> </form> </center> </body> </html> "); } function title_end($putally2,$ally3,$no,$f,$f2) { echo(" <html> <title> end html </title> <body bgcolor=black> <center> <img src=skyt1.jpg border=0> <br> <table border=0 cellspacing=2 cellpadding=2 width=700 > <tr> <td bgcolor=white align=center width=120> <font style='font-size:13px;font-style:italic;color:#blue'><b>$no No</b></font></td> <td bgcolor=white align=center width=580> <font style='font-size:13px;font-style:italic;color:#black'> <b>$putally2[title]</b></font></td> </tr> </table> <table border=0 cellspacing=2 cellpadding=2 width=700 > <tr> <td bgcolor=#808080 align=center width=135> <font style='font-size:13px;font-style:italic;color:#fffff0'><b>³«ÂûÀÚ</b></font></td> <td bgcolor=#808080 align=center width=250> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>¸¶°¨½Ã°£</b></font></td> <td bgcolor=#808080 align=center width=250> <font style='font-size:13px;font-style:italic;color:#fffff0'><b>Tel</b></font></td> <td bgcolor=#808080 align=center width=150> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>³«ÂûMoney</b></font></td> </tr> "); for($a=1 ; $a < 2 ; $a++) { $put2=mysql_fetch_array($ally3); if($putally2[smoney]<$put2[bmoney]) { echo(" <tr> <td bgcolor=black align=center><a href = mailto:$put2[email] > <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>$put2[name]</b></font></a></td> <td bgcolor=black align=center> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>$putally2[edate]</b></font></td> <td bgcolor=black align=center> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>$put2[tel]</b></font></td> <td bgcolor=black align=center> <font style='font-size:13px;font-style:italic;color:red'> <b>$put2[bmoney]</b></font></td> </tr> "); } } echo(" <tr> <td bgcolor=#808080 align=center width=135> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>¸ÅµµÀÚ</b></font></td> <td bgcolor=#808080 align=center width=250> <font style='font-size:13px;font-style:italic;color:#fffff0'><b>¸ÅµµÀÏ</b></font></td> <td bgcolor=#808080 align=center width=250> <font style='font-size:13px;font-style:italic;color:#fffff0'><b>Tel</b></font></td> <td bgcolor=#808080 align=center width=150> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>±âº»Money</b></font></td> </tr> <tr> <td bgcolor=black align=center><a href = mailto:$putally2[email] > <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>$putally2[name]</b></font></a></td> <td bgcolor=black align=center> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>$putally2[wdate]</b></font></td> <td bgcolor=black align=center> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>$putally2[tel]</b></font></td> <td bgcolor=black align=center> <font style='font-size:13px;font-style:italic;color:red'> <b>$putally2[smoney]</b></font></td> </tr> <tr> <td bgcolor=black >   </td> </tr> <tr> <td bgcolor=black colspan=4> <font style='font-size:15px;font-style:italic;color:#fffff0'> ''' °æ¸Å °Ô½ÃÀÚ´Â Á÷Á¢ »èÁ¦ ÇØ¾ß ¸ÞÀÏÀÌ °è¼Ó ¹ß¼Û ¾ÊµË´Ï´Ù.~! </font></td> </tr> <tr> <td bgcolor=black colspan=4> <font style='font-size:15px;font-style:italic;color:#fffff0'> ''' °è¼Ó ÁøÇàÇÏ·Á¸é ³¯Â¥¸¦ º¯°æ Çϼ¼¿ä.~! </font></td> </tr> <tr> <td bgcolor=black ><a href =main_view.php?chanl=main_view&f=$f&f2=$f2> <img src=list.gif border=0></a></td> <td bgcolor=black ><a href =main_view.php?chanl=edit_libchal&no=$no&f=$f&f2=$f2> <img src=rewrite.gif border=0></a></td> <td bgcolor=black ><a href =main_view.php?chanl=del&no=$no&f=$f&f2=$f2> <img src=delete2.gif border=0></a></td> </tr> </table> </center> </html> "); } function s_mail($putally2,$ally3,$no,$f,$f2) { for($a=1 ; $a < 2 ; $a++) { $put2=mysql_fetch_array($ally3); if($putally2[smoney]<$put2[bmoney]) { $message = " <b>No</b> $no title : $putally2[title] <br> <b>³«ÂûÀÚ</b> $put2[name] <b>¸¶°¨½Ã°£</b> $putally2[edate] <b>Tel</b> $put2[tel] <b>³«Âû±Ý¾×</b> $put2[bmoney] <br><br> <b>¸ÅµµÀÚ</b> $putally2[name] <b>¸ÅµµÀÏ</b> $putally2[wdate] <b>Tel</b> $putally2[tel] <b>±âº»±Ý¾×</b> $putally2[smoney] <br><br> <b>°øÁö</b></br> ³«Âû ¸ÅÀÏ È®ÀÎ ÈÄ °æ¸Å °Ô½ÃÆÇÀÇ °æ¸Å ±ÛÀ» Á÷Á¢ »èÁ¦Çϼ¼¿ä~! "; } } $su = " <b>No $no</b> ³«Âû "; $rp = "$put2[email]"; $rp1 = "$putally2[email]"; mail($rp , $su ,$message); mail($rp1 , $su ,$message); } ?>
ÇÔ¼ö Çü½ÄÀ¸·Î µÇ¾î ÀÖÀ¸¸ç °æ¸ÅÀÇ »õ·Î¿î ±â´ÉÀ» Ãß°¡ÇÒ ¼ö ÀÖÀ¸¸ç °¢ È¸é º°·Î ÇÔ¼ö´Â ºÐ¸®µÇ¾î ÀÖ½À´Ï´Ù.
¼Ò½ºÀÇ Ã³À½ ºÎºÐÀ̸ç mysqlÀÇ Á¢¼Ó queryµéÀÌ ³ª¿µË´Ï´Ù. ÀÌ°ÍÀº °æ¸Å ±ÛÀÇ °Ë»öÀ» À§ÇÑ µ¥ÀÌÅͺ£À̽º queryµµ ÀÖÀ¸¸ç °æ¸Å ¸ÞÀΠȸéÀ» Ãâ·ÂÇÏ´Â queryµµ ÀÖ½À´Ï´Ù. <?php $connect = mysql_connect('localhost','root','gksmf444'); mysql_select_db('libchal',$connect); /* mysql Á¢¼ÓÀ» À§ÇÑ È£½ºÆ®, À¯Àú, Æнº¿öµå¸¦ ³ª¿ÇÏ°í µ¥ÀÌÅͺ£À̽º¸¦ ¼±Åà ÇÕ´Ï´Ù.*/ if($findtype == name) { $ally = mysql_query("select no,sise,title,hit,edate,wdate,name,email from $f where name like '%$findname%' order by no ",$connect); } /* $findtypeÀÌ nameÀÏ ¶§ ÇØ´ç Å×ÀÌºí¿¡¼ °æ¸Å µî·ÏÀÚ¸¦ °Ë»öÇÕ´Ï´Ù. ÀÚ·á½Ç¿¡¼¿Í °°Àº ·çƾÀ̸ç $f´Â °æ¸Å ¸ÞÎ Å×À̺íÀ» Àü´Þ¹Þ°í, $f2´Â ÀÔÂûÀÚ Å×À̺í À̸§À» Àü´Þ¹Þ½À´Ï´Ù. */ if($findtype == title) { $ally = mysql_query("select no,sise,title,hit,edate,wdate,name,email from $f where title like '%$findname%' order by no ",$connect); } /* $findtype°¡ titleÀÏ ¶§ °æ¸Å ¸ÞÀÎ Å×ÀÌºí¿¡¼ Á¦¸ñ¿¡ °üÇØ °Ë»öÇÕ´Ï´Ù. */ if($findtype == content) { $ally = mysql_query("select no,sise,title,hit,edate,wdate,name,email from $f where content like '%$findname%' order by no ",$connect); } /* $findtypeÀÌ contentÀÏ ¶§ °æ¸Å ¸ÞÀÎ Å×ÀÌºí¿¡¼ °æ¸Å ³»¿ë¿¡ °üÇؼ °Ë»öÇÕ´Ï´Ù. */ if($findtype == t_c) { $ally = mysql_query("select no,sise,title,hit,edate,wdate,name,email from $f where title like '%$findname%' or content like '%$findname%' order by no ",$connect); } /* $findtypeÀÌ t_cÀÏ ¶§ °æ¸Å ¸ÞÀÎ Å×ÀÌºí¿¡¼ °æ¸Å Á¦¸ñ°ú ³»¿ë¿¡¼ Àü´Þ ¹ÞÀº °Ë»ö ´Ü¾î¸¦ °Ë»öÇÕ´Ï´Ù. */ if(!$findtype) { $ally = mysql_query("select no,sise,title,hit,edate,wdate,name,email from $f order by no ",$connect);//$connection »ý·« ÇßÀ½ } /* $findtypeÀÌ ¾øÀ» °æ¿ì °æ¸Å ¸ÞÀÎ Å×ÀÌºí¿¡¼ µî·ÏµÈ °æ¸Å ±ÛÀ» ¸ðµÎ query ÇÕ´Ï´Ù. */ $ally4 = mysql_query("select hit,sise from $f where no='$no'",$connect ); /* ƯÁ¤ ¹øÈ£¿¡ ÇØ´çÇÏ´Â °æ¸Å hit, sise¸¦ °Ë»öÇÕ´Ï´Ù. */ $ally3 = mysql_query("select tnum,no,bmoney,name,tel,email from $f2 where tnum ='$no' order by bmoney desc",$connect ); /* ƯÁ¤ ¹øÈ£¿¡ ÇØ´çÇÏ´Â ÀÔÂûÀÚÀÇ Á¤º¸¸¦ °Ë»öÇÕ´Ï´Ù. */ $ally2 = mysql_query("select smoney,title,edate,content,wdate,name,email,tel from $f where no='$no'",$connect ); /* ƯÁ¤ ¹øÈ£¿¡ ÇØ´çÇÏ´Â °æ¸ÅÀÇ Á¤º¸¸¦ °Ë»öÇÕ´Ï´Ù. */ $allylib = mysql_query("select tnum,no,name from $f2 where tnum ='$no' order by bmoney desc",$connect ); /* ƯÁ¤ ¹øÈ£¿¡ ÇØ´çÇÏ´Â ÀÔÂûÀÚ Á¤º¸¸¦ ÀÔÂû ±Ý¾× ¿ª¼øÀ¸·Î Á¤·ÄÇÕ´Ï´Ù. */ $t_num=mysql_num_rows($ally); /* °æ¸Å ¸ÞÀÎ Å×ÀÌºí¿¡ µî·ÏµÈ °æ¸Å ¼ö¸¦ ÇØ´ç º¯¼ö¿¡ ÀúÀåÇÕ´Ï´Ù. */ $putup = mysql_fetch_array($ally4); /* ƯÁ¤ ¹øÈ£¿¡ ÇØ´çÇÏ´Â °æ¸Å ½Ã¼¼¿Í Á¶È¸ ¼ö¸¦ ÇØ´ç º¯¼ö¿¡ ÀúÀåÇÕ´Ï´Ù. */ $putup2 = mysql_fetch_array($allylib); /* ƯÁ¤ °æ¸Å ÀÔÂûÀÚÀÇ Á¤º¸ ÇØ´ç º¯¼ö¿¡ ¹è¿·Î ÀúÀåÇÕ´Ï´Ù. */ $putally2=mysql_fetch_array($ally2); mysql_select_db('selectuser',$connect); /* ȸ¿ø Á¤º¸ µ¥ÀÌÅͺ£À̽ºÀÎ selectuser µ¥ÀÌÅͺ£À̽º¸¦ ¼±ÅÃÇÕ´Ï´Ù. ±¸Áö ȸ¿ø µ¥ÀÌÅͺ£À̽º¸¦ µû·Î ¸¸µéÁö ¾È°í libchal µ¥ÀÌÅͺ£À̽º¿¡ ȸ¿ø Á¤º¸ Å×À̺íÀ» »ý¼ºÇؼ »ç¿ëÇÏ¸é ½ºÅ©¸³Æ®ÀÇ ¼Óµµ Çâ»óÀÌ ÀÖÀ» °ÍÀÔ´Ï´Ù. */ $allyuser = mysql_query("select id,name,tel1,email,passwd from userin where id='$username' ",$connect); /* Á¢¼ÓÇÑ ¼¼¼Ç¿¡ ÇØ´çÇÏ´Â ID¸¦ ÀÌ¿ëÇؼ userin Å×ÀÌºí¿¡¼ ÇØ´ç ID Á¤º¸¸¦ °Ë»öÇÕ´Ï´Ù.*/ $putuser = mysql_fetch_array($allyuser); /* ƯÁ¤ ȸ¿øÀÇ Á¤º¸¸¦ ¹è¿·Î ÀúÀåÇÕ´Ï´Ù. */ ?>
°æ¸Å °Ô½ÃÆÇÀÇ ¸ÞÀΠȸéÀ» Ãâ·ÂÇÏ´Â ÇÔ¼öÀÔ´Ï´Ù. °æ¸Å °Ô½ÃÆÇ ¸ÞÀΠȸéÀ» Âü°íÇϼ¼¿ä.
main_view($s_mail,$t_num,$ally,$page,$findtype,$findname,$f,$f2,$root,$username); /* °æ¸Å °Ô½ÃÆÇÀÇ ¸ÞÀΠȸéÀ» Ãâ·ÂÇϱâ À§ÇÑ ÇÔ¼öÀÇ ÀÎÀÚµé ÀÔ´Ï´Ù. */ $s_mail - °æ¸Å°¡ ¸¶°¨ µÇ¾úÀ» °æ¿ì ÇØ´ç °æ¸ÅÀÇ ³»¿ëÀ» Àü´ÞÇÕ´Ï´Ù. $t_num - ÃÑ °æ¸Å ±ÛÀÇ ¼ö¸¦ Àü´ÞÇÕ´Ï´Ù. $ally - °æ¸Å ¸ÞÀÎ Å×À̺íÀÇ °æ¸Å Á¤º¸¸¦ Àü´ÞÇÕ´Ï´Ù. $page - °æ¸Å ¸ÞÀΠȸéÀÇ ÆäÀÌÁö¸¦ Àü´ÞÇÕ´Ï´Ù. $findtype - °æ¸ÅÀÇ °Ë»ö Á¶°ÇÀ» Àü´ÞÇÕ´Ï´Ù. Áï, °æ¸Å Á¦¸ñ, µî·ÏÀÚ, ³»¿ë, Á¦¸ñ°ú ³»¿ëÀ» Àü´ÞÇÕ´Ï´Ù. $findname - °æ¸Å¿¡¼ °Ë»öÇÒ ´Ü¾î¸¦ Àü´ÞÇÕ´Ï´Ù. $f - °æ¸Å °Ô½ÃÆÇÀÇ ¸ÞÀÎ Å×À̺í À̸§À» Àü´ÞÇÕ´Ï´Ù. $f2 - °æ¸Å °Ô½ÃÆÇÀÇ ÀÔÂûÀÚ Å×À̺í À̸§À» Àü´ÞÇÕ´Ï´Ù. $root - admin ·Î±×ÀÎ ¶§ »ý¼ºµÈ ÄíÅ°¸¦ Àü´ÞÇÕ´Ï´Ù. $username - »çÀÌÆ® Á¢¼Ó ¶§ »ç¿ëÇÑ ID ¼¼¼ÇÀ» Àü´ÞÇÕ´Ï´Ù.
µî·ÏÇÑ °æ¸Å ±ÛÀ» ÆäÀ̺°·Î Ãâ·ÂÇÏ¸ç °æ¸ÅÀÇ ÁøÇà°ú ¸¶°¨À» ¾Ë·Á ÁÝ´Ï´Ù. for($pd=$start_num ; $pd > $start_num-$p_dip ; $pd--) { /* ÆäÀÌÁö´ç ±Û°ú ÆäÀÌÁö ¸µÅ©, ½ÃÀÛ ÆäÀÌÁö °ªÀ» ÀÌ¿ëÇؼ °æ¸Å ±ÛÀ» Ãâ·ÂÇÕ´Ï´Ù. */ if($pd >= 0 ) { mysql_data_seek($ally,$pd); $put=mysql_fetch_array($ally); /* °æ¸Å ±ÛÀ» ¼øÂ÷ÀûÀ¸·Î ¹è¿·Î ÀúÀåÇؼ Ãâ·ÂÇÕ´Ï´Ù. */ $wdate = date('Y-m-d H:i:s'); /* ÇöÀç ³¯Â¥¿Í ½Ã°£À» ÀúÀåÇÕ´Ï´Ù. ÀÌ°ÍÀº °æ¸ÅÀÇ ¸¶°¨ ³¯Â¥¸¦ °¡·Á³»±â À§ÇØ »ç¿ëÇÕ´Ï´Ù. */ $title_link1 = "<a href ='main_view.php?chanl=title&no=$put[no]&f=$f&f2=$f2'>"; /* ÇØ´ç °æ¸ÅÀÇ ³»¿ëÀ» ¸µÅ©ÇÕ´Ï´Ù. */ $title_link2 = "<a href ='main_view.php?chanl=title_end&no=$put[no]&f=$f&f2=$f2'>"; /* ÇØ´ç °æ¸ÅÀÇ ¸¶°¨ Ç׸ñÀ» ¸µÅ©ÇÕ´Ï´Ù. */ if($put[edate] > $wdate) { $h = "ÁøÇàÁß"; $title_link = $title_link1; } /* °æ¸Å µî·Ï ¶§ ¼³Á¤ÇÑ ¸¶°¨ ³¯Â¥°¡ ÇöÀç ³¯Â¥º¸´Ù Ŭ °æ¿ì °æ¸Å ³»¿ëÀ» ¸µÅ©ÇÏ°í "ÁøÇàÁß" º¯¼ö¸¦ ¼³Á¤ÇÕ´Ï´Ù. */ if($put[edate] < $wdate) { $h = "¸¶°¨"; $title_link = $title_link2; $s_mail; } /* °æ¸Å ¸¶°¨ ³¯Â¥°¡ ÇöÀç ³¯Â¥ º¸´Ù ÀÛÀ» °æ¿ì °æ¸Å ¸¶°¨ ȸéÀ» ¸µÅ©ÇÏ°í, "¸¶°¨" º¯¼ö¸¦ ¼³Á¤ÇÏ¸ç ¸ÅµµÀÚ¿Í ³«ÂûÀÚ¿"Ô ¸ÞÀÏÀ»($s_mail) ¹ß¼ÛÇÕ´Ï´Ù. */ echo(" <tr> <td bgcolor=black> <font style='font-size:13px;font-style:italic;color:white'> $put[no]</font></td> <td bgcolor=black> /* °æ¸ÅÀÇ °íÀ¯ ¹øÈ£¸¦ Ãâ·ÂÇÕ´Ï´Ù. */ $title_link <font style='font-size:13px;font-style:italic;color:white'> <b>$put[title]</b></font></a></td> /* °æ¸Å Á¦¸ñÀ» Ãâ·ÂÇÕ´Ï´Ù. */ <td bgcolor=black align=center> <a href = mailto:$put[email] > <font style='font-size:13px;font-style:italic;color:white'> <b>$put[name]</b></font></a></td> /* °æ¸Å µî·ÏÀÚ À̸§°ú ¸ÞÀÏ ÁÖ¼Ò¸¦ ¸µÅ©ÇÕ´Ï´Ù. */ <td bgcolor=black align=center> <font style='font-size:13px;font-style:italic;color:#ff1493'> <b>$put[sise]</b></font></td> /* ÇØ´ç °æ¸ÅÀÇ ÀÔÂûÀÚ ¼ö¸¦ Ãâ·ÂÇÕ´Ï´Ù. */ <td bgcolor=black align=center> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>$put[hit]</b></font></td> /* ÇØ´ç °æ¸ÅÀÇ Á¶È¸ ¼ö¸¦ Ãâ·ÂÇÕ´Ï´Ù. */ <td bgcolor=black align=center> <font style='font-size:13px;font-style:italic;color:#008000'> <b>$h</b></font></td> /* ÇØ´ç °æ¸ÅÀÇ ÁøÇà ¿©ºÎ¸¦ Ãâ·ÂÇÕ´Ï´Ù. ÀÌ ºÎºÐÀº ÀÔÂû °¡´É ±Ý¾×À» Ç¥½ÃÇÏ´Â ¹æ¹ýµµ ÀÖ½À´Ï´Ù. */ <td bgcolor=black align=center> <font style='font-size:13px;font-style:italic;color:#9400d3'> <b>$put[edate]</b></font></td> /* ÇØ´ç °æ¸ÅÀÇ ¸¶°¨ ³¯Â¥¸¦ Ãâ·ÂÇÕ´Ï´Ù. */ </tr> "); } }
°æ¸Å °Ô½ÃÆÇ ¸¶Áö¸· ºÎºÐ¿¡ °æ¸Å ±Û µî·Ï°ú Ȩ, admin °"â ¸µÅ©¸¦ ¸¸µå´Â ºÎºÐÀÔ´Ï´Ù. echo(" </td> </tr> </center> </table> <br> <center> <table border=0 cellspacing=2 cellpadding=2 width=700 > <tr> <td bgcolor=black width=100> <a href =main_view.php?chanl=new_libchal&f=$f&f2=$f2> <img src=write.gif border=0> </a></td> /* »õ·Î¿î °æ¸Å ±ÛÀ» µî·ÏÇϴ ȸéÀ» À̹ÌÁö·Î ¸µÅ©ÇÕ´Ï´Ù. */ <td bgcolor=black width=100> <a href =userin.php?chanl=main_view&username=$username> <img src=home.gif border=0> </a></td> /* »çÀÌÆ® ¸ÞÀÎ ÆäÀÌÁö À̵¿ ¸µÅ©¸¦ ¸¸µì´Ï´Ù. */ <td bgcolor=black width=100> <a href =db_view.php?chanl=rootin> <img src=admin.gif border=0></a></td> /* admin ¿µ¿ª ·Î±×ÀÎ È¸é ¸µÅ©¸¦ ¸¸µì´Ï´Ù. */ <td bgcolor=black align=right width=150> <form method=post action=main_view.php> <input type=hidden name=chanl size=14 value=main_view> <input type=hidden name=f value=$f> <input type=hidden name=f2 value=$f2> <select name=findtype> <option value=name selected>Name <option value=title>Title <option value=content>Content <option value=t_c>Titl+Cont </select> /* formÀÇ select¹®À» ÀÌ¿ëÇؼ °Ë»ö ¸ðµå¸¦ ¸¸µì´Ï´Ù. °Ë»ö Ç׸ñÀº $findtype·Î Àü´ÞÇÕ´Ï´Ù. */ </font></td> <td bgcolor=black width=150> <input type=text name=findname size=14> /* °Ë»öÇÒ ´Ü¾î¸¦ $findname º¯¼ö·Î Àü´ÞÇÕ´Ï´Ù. */ </td> <td bgcolor=black width=100> <input type=submit value=Find> /* °Ë»ö Ç׸ñ($findtype)°ú °Ë»ö ´Ü¾î($findname)À» Àü´ÞÇϱâ À§ÇØ submit ¹öÆ°À» »ý¼ºÇÕ´Ï´Ù. */ </td> </tr> </table> </center> </html> ");
µî·ÏµÈ °æ¸Å ±ÛÀÇ ³»¿ëÀ» ¼öÁ¤ÇÕ´Ï´Ù. $putally2 - ƯÁ¤ °æ¸ÅÀÇ Á¤º¸¸¦ ¹è¿·Î ÀúÀåÇؼ Àü´ÞÇÕ´Ï´Ù. $no - ƯÁ¤ °æ¸ÅÀÇ ¹øÈ£¸¦ Àü´ÞÇÕ´Ï´Ù. $putuser - ƯÁ¤ IDÀÇ Á¤º¸¸¦ ¹è¿·Î ÀúÀåÇؼ Àü´ÞÇÕ´Ï´Ù.
ÇØ´ç °æ¸ÅÀÇ ¼öÁ¤ Ç׸ñÀ» µ¥ÀÌÅͺ£À̽º¿¡ ÀúÀåÇϱâ À§ÇØ ÀÎÀÚ¸¦ Àü´ÞÇÏ´Â form¹®À» ¸¸µì´Ï´Ù. <form method=post action=main_view.php> <input type=hidden name=chanl value=edit_libchal_in> /* main_view.php ÆÄÀÏÀÇ $chanl=edit_libchal_in Ç׸ñÀ» ½ÇÇàÇÕ´Ï´Ù. */ <input type=hidden name=f value=$f> <input type=hidden name=f2 value=$f2> /* ÇØ´ç °æ¸ÅÀÇ ¸ÞÀÎ Å×À̺í À̸§°ú ÀÔÂûÀÚ Å×À̺í À̸§À» Àü´ÞÇÕ´Ï´Ù. */ <input type=hidden name=no value=$no> /* ÇØ´ç °æ¸ÅÀÇ °íÀ¯ ¹øÈ£¸¦ Àü´Þ ÇÕ´Ï´Ù. */
ƯÁ¤ °æ¸Å ±ÛÀ» Ŭ¸¯ÇÏ¸é º¸¿©ÁÖ´Â Ç׸ñÀÔ´Ï´Ù. ¿©±â¿¡´Â °æ¸ÅÀÇ ¼¼ºÎÀûÀÎ ³»¿ë°ú ÀÔÂûÀÚ ¼øÀ§, °æ¸Å »èÁ¦, ÀÔÂû µîÀÇ ±â´ÉÀÌ ÀÖ½À´Ï´Ù. $putally2 - ƯÁ¤ °æ¸ÅÀÇ Á¤º¸¸¦ ¹è¿·Î ÀúÀåÇؼ Àü´ÞÇÕ´Ï´Ù. $ally3 - ƯÁ¤ °æ¸ÅÀÇ ÀÔÂûÀÚ Á¤º¸(ÀÔÂû±Ý¾×À» ³»¸²Â÷¼øÀ¸·Î Á¤·Ä)¸¦ ¹è¿·Î ÀúÀåÇؼ Àü´Þ ÇÕ´Ï´Ù. $no - ƯÁ¤ °æ¸ÅÀÇ °íÀ¯ ¹øÈ£¸¦ Àü´ÞÇÕ´Ï´Ù. ÀÌÈÄ º¯¼ö´Â ¾ÕÀÇ ÇÔ¼ö¿Í µ¿ÀÏÇÕ´Ï´Ù.
°æ¸ÅÀÇ ¼¼ºÎ Á¤º¸ ȸ鿡¼ ÇØ´ç °æ¸Å¿¡ ´ëÇÑ ¼¼ºÎÀûÀÎ Á¤º¸¸¦ º¸¿© ÁÖ±â À§ÇØ ¸¸µì´Ï´Ù. $content=nl2br($putally2[content]) ; /* ÇØ´ç °æ¸ÅÀÇ ¼³¸í ºÎºÐ¿¡¼ nl ºÎºÐÀ» <br>·Î º¯È¯Çؼ $content º¯¼ö¿¡ ÀúÀåÇÕ´Ï´Ù.*/ <tr> <td bgcolor=#808080 align=center width=100> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>$putally2[edate]:¸¶°¨</b></font></td> /* ÇØ´ç °æ¸ÅÀÇ ¸¶°¨ ½Ã°£À» Ãâ·ÂÇÕ´Ï´Ù. */ <td bgcolor=#808080 align=center width=200><a href = mailto:$putally2[email] > <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>name:$putally2[name]</b></font></a></td> /* ÇØ´ç °æ¸ÅÀÇ µî·ÏÀÚ¸¦ Ãâ·ÂÇÏ°í ¸ÞÀÏ ÁÖ¼Ò¸¦ ¸µÅ©ÇÕ´Ï´Ù. */ <td bgcolor=#808080 align=center width=280> <font style='font-size:13px;font-style:italic;color:red'> <b>±âº»money:$putally2[smoney]</b></font></td> /* ÇØ´ç °æ¸ÅÀÇ ±âº» ±Ý¾×À» Ãâ·ÂÇÕ´Ï´Ù. */ </tr> <tr> <table border=0 cellspacing=2 cellpadding=2 width=700 height=250> <td bgcolor=black valign=top colspan=3 width=700 height=250> <font style='font-size:13px;font-style:italic;color:blue'><b>$content</b></font></td> /* ÇØ´ç °æ¸ÅÀÇ ¼³¸íÀ» Ãâ·ÂÇÕ´Ï´Ù. */ </tr>
°æ¸Å ¼¼ºÎ ȸé ÇÏ´Ü¿¡ ÇØ´ç °æ¸Å¿¡ ÀÔÂûÇÑ ÀÔÂûÀÚÀÇ ¼øÀ§¸¦ º¸¿© ÁÝ´Ï´Ù. for($a=1 ; $a < 5 ; $a++) { $put2=mysql_fetch_array($ally3); /* ÇØ´ç °æ¸Å ÀÔÂûÀÚÀÇ Á¤º¸¸¦ ¹è¿·Î ÀúÀåÇÕ´Ï´Ù.*/ if($put[smoney]<$put2[bmoney]) { /* ÇØ´ç °æ¸ÅÀÇ ±âº» ±Ý¾×ÀÌ ÀÔÂû ±Ý¾×º¸´Ù ÀÛÀ» ¶§ ½ÇÇàÇÕ´Ï´Ù.*/ echo(" <tr> <td bgcolor=black align=center width=150> <font style='font-size:13px;font-style:italic;color:#fffff0'><b>$a</b></td> /* for¹®¿¡ ÀÇÇØ $a´Â Â÷·Ê·Î 5º¸´Ù ÀÛÀ» ¶§±îÁö ¼ýÀÚ¸¦ Ãâ·ÂÇÕ´Ï´Ù. */ <td bgcolor=black align=center width=150><a href = mailto:$put2[email] > <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>$put2[name]</b></font></a></td> /* ÀÔÂûÀÚÀÇ À̸§À» Ãâ·ÂÇÏ°í ¸ÞÀÏ ÁÖ¼Ò¸¦ ¸µÅ©ÇÕ´Ï´Ù. */ <td bgcolor=black align=center width=200> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>$put2[tel]</b></font></td> /* ÀÔÂûÀÚÀÇ ÀüÈ ¹øÈ£¸¦ Ãâ·ÂÇÕ´Ï´Ù. */ <td bgcolor=black align=center ><font style='font-size:13px;font-style:italic;color:red'> <b>$put2[bmoney]</b></font></td> /* ÀÔÂûÀÚÀÇ ÀÔÂû±Ý¾×À» Ãâ·ÂÇÕ´Ï´Ù. ÀÌ ºÎºÐÀº ÀÔÂû ±Ý¾×ÀÌ Á¦ÀÏ ³ôÀº »ç¶÷ÀÇ °"ݸ¸ Ãâ·ÂÇÏ°í ÀÔÂûÀÚÀÇ À̸§Àº ȸ鿡 Ãâ·ÂÇÏÁö ¾Ê´Â ¹æ¹ýµµ ÀÖÁö¸¸ ¿©±â¼´Â ÀÔÂûÀÚÀÇ Á¤º¸¸¦ ¸ðµÎ °ø°³ Çß½À´Ï´Ù. */ </tr> "); } }
°æ¸Å ¼¼ºÎ Ç׸ñ¿¡¼ ÀÔÂû, °æ¸Å ¸ÞÀΠȸé, °æ¸Å ¼öÁ¤Çϱâ, °æ¸Å Áö¿ì±â, ÀÔÂû »èÁ¦·Î À̵¿ÇÏ´Â ¹öÆ°À» ¸¸µì´Ï´Ù. °¢ ¹öÆ°Àº ¾Õ¿¡ ³ª¿ÇÑ ¼øÀ¸·Î Á¤·ÄµÇ¾î ÀÖ½À´Ï´Ù. <tr> <td bgcolor=black > <a href =main_view.php?chanl=input_newlibchal&tnum=$no&f=$f&f2=$f2> <img src=write.gif border=0></a></td> /* ÇØ´ç °æ¸Å ÀÔÂû ȸéÀ¸·Î ¸µÅ© ÇÕ´Ï´Ù. */ <td bgcolor=black ><a href =main_view.php?chanl=main_view&f=$f&f2=$f2> <img src=list.gif border=0></a></td> /* °æ¸Å ¸ÞÀΠȸéÀ¸·Î ¸µÅ© ÇÕ´Ï´Ù. */ <td bgcolor=black ><a href =main_view.php?chanl=edit_libchal&no=$no&f=$f&f2=$f2> <img src=rewrite.gif border=0></a></td> /* ÇØ´ç °æ¸Å ¼öÁ¤ ȸéÀ¸·Î ¸µÅ© ÇÕ´Ï´Ù. */ <td bgcolor=black ><a href =main_view.php?chanl=del&no=$no&f=$f&f2=$f2> <img src=delete1.gif border=0></a></td> /* ÇØ´ç °æ¸Å Áö¿ì±â ȸéÀ¸·Î ¸µÅ© ÇÕ´Ï´Ù. */ <td bgcolor=black ><a href =main_view.php?chanl=del_lib&no=$no&f=$f&f2=$f2> <img src=delete2.gif border=0></a></td> </tr> /* ÇØ´ç °æ¸Å ÀÔÂû »èÁ¦ ȸéÀ¸·Î ¸µÅ© ÇÕ´Ï´Ù. */
ÇØ´ç °æ¸Å¿¡ ÀÔÂûÀ» Çϴ ȸéÀÔ´Ï´Ù. $putuser º¯¼öÀÇ Á¤º¸¸¦ ÀÌ¿ëÇؼ ÀÔÂûÀÚÀÇ Á¤º¸¸¦ º¸¿© ÁÖ¸ç ÀÔÂû ±Ý¾× ºÎºÐ¸¸ ÀÔ·ÂÇÏ¸é µË´Ï´Ù. $tnum - ÇØ´ç °æ¸ÅÀÇ °íÀ¯ ¹øÈ£¸¦ Àü´ÞÇÕ´Ï´Ù.
ÀÔÂû ȸ鿡¼ ÀÔÂû ±Ý¾×À» Àü´ÞÇÏ°í ³ª¸ÓÁö Å×À̺í Á¤º¸¸¦ Àü´ÞÇÕ´Ï´Ù. <form method=post action=main_view.php> <input type=hidden name=chanl value=input_newlibchal> <input type=hidden name=chanl2 value=input_newlibchal2> /* main_view.php ÆÄÀÏÀÇ $chanl= input_newlibchal , $chanl2= input_newlibchal2ÀÎ Ç׸ñÀ» ½ÇÇàÇÕ´Ï´Ù. */ <input type=hidden name=tnum value=$tnum> /* ÇØ´ç °æ¸ÅÀÇ °íÀ¯ ¹øÈ£¸¦ ÀÔÂû ¹øÈ£ º¯¼ö·Î($tnum) Àü´ÞÇÕ´Ï´Ù. */ <input type=hidden name=no value=$tnum> /* ÇØ´ç °æ¸ÅÀÇ °íÀ¯ ¹øÈ£¸¦ Àü´ÞÇÕ´Ï´Ù. */ <input type=hidden name=f value=$f> <input type=hidden name=f2 value=$f2> /* °æ¸ÅÀÇ ¸ÞÀÎ Å×À̺í À̸§°ú ÀÔÂûÀÚ Å×À̺í À̸§À» Àü´ÞÇÕ´Ï´Ù. */
·Î±×ÀÎÇÑ ID ¼¼¼ÇÀ» ÀÌ¿ëÇؼ ÀÔÂûÀÚÀÇ Á¤º¸¸¦ Ãâ·ÂÇÏ°í ÀÔÂû ±Ý¾× ÀԷ¶õÀ» ¸¸µì´Ï´Ù. <tr> <td width=50 bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~Name</b></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'> $putuser[name]</font></td> /* ÀÔÂûÀÚÀÇ À̸§À» Ãâ·ÂÇÕ´Ï´Ù. */ <td width=100 bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~E-mail</b></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'> $putuser[email]</font></td> </tr> /* ÀÔÂûÀÚÀÇ ¸ÞÀÏ ÁÖ¼Ò¸¦ Ãâ·ÂÇÕ´Ï´Ù. */ <tr> <td width=100 bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~Tel</b></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'> $putuser[tel1]</font></td> /* ÀÔÂûÀÚÀÇ ÀüÈ ¹øÈ£¸¦ Ãâ·ÂÇÕ´Ï´Ù. */ <td width=100 bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~ÀÔÂû±Ý¾×</b></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'> <input type=text name=bmoney size=10>won</font></td> </tr> /* ÀÔÂûÀÚÀÇ ÀÔÂû ±Ý¾× ÀԷ¶õÀ» ¸¸µì´Ï´Ù. */
»õ·Î¿î °æ¸Å¸¦ µî·ÏÇϴ ȸéÀÔ´Ï´Ù. ÇÔ¼öÀÇ Àü´Þ ÀÎÀÚ´Â ¾ÕÀÇ ÇÔ¼öµé°ú °°½À´Ï´Ù.
°æ¸ÅÀÇ ÀÔ·Â Ç׸ñµéÀ» Àü´ÞÇϱâ À§ÇØ form¹®À» »ç¿ëÇÕ´Ï´Ù. <form method=post action=main_view.php> <input type=hidden name=chanl value=input_new> /* main_view.php ÆÄÀÏÀÇ $chanl=input_newÀÎ Ç׸ñÀ» ½ÇÇàÇÕ´Ï´Ù. */ <input type=hidden name=f value=$f> <input type=hidden name=f2 value=$f2> /* ÇØ´ç °æ¸ÅÀÇ ¸ÞÀÎ Å×À̺í À̸§°ú ÀÔÂûÀÚ Å×À̺í À̸§À» Àü´ÞÇÕ´Ï´Ù. */
»çÀÌÆ® Á¢¼Ó ¶§ »ç¿ëÇÑ IDÀÇ ¼¼¼ÇÀ» ÀÌ¿ëÇؼ °æ¸Å µî·ÏÀÚÀÇ Á¤º¸¸¦ Ãâ·ÂÇÏ°Ô ÇÏ°í ³ª¸ÓÁö °æ¸Å ÀԷ¶õÀ» ¸¸µì´Ï´Ù. <table border=0 cellspacing=2 cellpadding=2 width=700 > <tr> <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~Title</b></font></td> <td bgcolor=black align=left><font style='font-size:13px;font-style:italic;color:#fffff0'> <input type=text name=title size=44> </font></td> </tr> /* °æ¸ÅÀÇ Á¦¸ñÀ» ÀÔ·ÂÇÏ´Â Ç׸ñÀÔ´Ï´Ù. $title·Î Àü´ÞÇÕ´Ï´Ù. */ <tr> <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~Name</b></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'> $putuser[name]</font></td> </tr> /* °æ¸Å µî·ÏÀÚÀÇ À̸§À» ȸ鿡 Ãâ·ÂÇÕ´Ï´Ù. */ <tr> <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~E-mail</b></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'> $putuser[email]</font></td> </tr> /* °æ¸Å µî·ÏÀÚÀÇ ¸ÞÀÏ ÁÖ¼Ò¸¦ ȸ鿡 Ãâ·ÂÇÕ´Ï´Ù. */ <tr> <td bgcolor=#808080> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~Tel</b></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'> $putuser[tel1]</font></td> </tr> /* °æ¸Å µî·ÏÀÚÀÇ ÀüȹøÈ£¸¦ ȸ鿡 Ãâ·ÂÇÕ´Ï´Ù. ¸¶°¨½Ã°£ ÀÔ·ÂÀÇ °æ¿ì select¹®À» ³ª¿ÇÏ´Â ¹æ¹ýÀ» »ç¿ëÇß½À´Ï´Ù. */ <tr> <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~±âº»±Ý¾×</b></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#ff1493'> <input type=int name=smoney size=10><b>Won</b></font></td> </tr> /* °æ¸ÅÀÇ ±âº» ±Ý¾×À» ÀÔ·ÂÇÏ´Â Ç׸ñÀÔ´Ï´Ù. $smoney·Î Àü´ÞÇÕ´Ï´Ù. */ <tr> <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~Content</b></font></td> <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'> <textarea name=content rows=10 cols=70></textarea></font></td> </tr> /* °æ¸ÅÀÇ ¼¼ºÎÀûÀÎ ³»¿ëÀ» Àû´Â Ç׸ñÀÔ´Ï´Ù. $content·Î Àü´ÞÇÕ´Ï´Ù. */ <tr> <td bgcolor=black align=center colspan=4> <font style='font-size:13px;font-style:italic;color:#fffff0'> <input type=submit value=°æ¸Åµî·Ï> <input type=reset value=Áö¿ì±â></font></td> </tr> /* ÀÔ·Â Ç׸ñµéÀ» Àü´ÞÇϱâ À§ÇÑ "°æ¸Åµî·Ï" ¹öÆ°À» »ý¼ºÇÏ°í, »õ·ÎÀÌ ÀÔ·ÂÇϱâ À§ÇÑ "Áö¿ì±â" ¹öÆ°À» »ý¼ºÇÕ´Ï´Ù. */
µî·ÏÇÑ °æ¸Å¸¦ Áö¿ì±â À§ÇØ Æнº¿öµå ÀԷ ȸéÀ» Ãâ·ÂÇÏ´Â ÇÔ¼öÀÔ´Ï´Ù. $no - ÇØ´ç °æ¸ÅÀÇ °íÀ¯ ¹øÈ£¸¦ Àü´ÞÇÕ´Ï´Ù. $tnum - °æ¸Å °íÀ¯ ¹øÈ£¿¡ ÀÔÂûÇÑ ÀÔÂû ¹øÈ£¸¦ Àü´ÞÇÕ´Ï´Ù.
ÇØ´ç °æ¸Å¿Í ÀÔÂûÀÚ¸¦ Áö¿ì±â À§ÇØ ¿©·¯ Á¤º¸¸¦ Àü´ÞÇÕ´Ï´Ù. <form method=post action=main_view.php> <input type=hidden name=chanl value=del_no> /* main_view.php ÆÄÀÏÀÇ $chanl= del_noÀÎ Ç׸ñÀ» ½ÇÇàÇÕ´Ï´Ù. */ <input type=hidden name=tnum value=$no> /* ÇØ´ç °æ¸Å ¹øÈ£¸¦ ÀÔÂûÀÚ ¹øÈ£¿¡ »ç¿ëÇÕ´Ï´Ù. ÀÌ°ÍÀº ÇØ´ç °æ¸Å¿¡ ÀÔÂûÇÑ ÀÔÂûÀÚ¸¸À» »èÁ¦Çϱâ À§ÇÔÀÔ´Ï´Ù. */ <input type=hidden name=no value=$no> /* ÇØ´ç °æ¸Å ¹øÈ£¸¦ Àü´ÞÇÕ´Ï´Ù. */ <input type=hidden name=f value=$f> <input type=hidden name=f2 value=$f2> /* °æ¸Å ¸ÞÀÎ Å×À̺í À̸§°ú ÀÔÂûÀÚ Å×À̺í À̸§À» Àü´ÞÇÕ´Ï´Ù. */
<tr> <td bgcolor=#808080 width=74><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~passw</b></font></td> <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'> <input type=password name=passwd size=10></font></td> /* ÇØ´ç °æ¸Å µî·ÏÀÚÀÇ Æнº¿öµå ÀÔ·Â Ç׸ñÀÔ´Ï´Ù. Type´Â passwordÀÔ´Ï´Ù. */ <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'> <input type=submit value=Áö¿ì±â> /* Æнº¿öµå¿Í ³ª¸ÓÁö Ç׸ñµéÀ» Àü´ÞÇÏ´Â "Áö¿ì±â" ¹öÆ°À» »ý¼ºÇÕ´Ï´Ù. */ </font></td> </tr> <tr> <td bgcolor=#808080 width=74><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~Name</b></font></td> <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'> $putuser[name]</font></td> </tr> /* »çÀÌÆ®¸¦ ·Î±×ÀÎÇÑ IDÀÇ »ç¿ëÀÚ À̸§À» Ãâ·ÂÇÕ´Ï´Ù. */
ƯÁ¤ °æ¸Å¿¡ ÀÔÂûÇÑ ÀÔÂûÀÚ°¡ ÀÔÂûÀ» »èÁ¦Çϱâ À§ÇÑ È¸éÀÔ´Ï´Ù. ÇÔ¼öÀÇ Àü´Þ ÀÎÀÚ´Â °æ¸Å »èÁ¦ ȸéÀ» Ãâ·ÂÇÏ´Â ÇÔ¼ö¿Í °°½À´Ï´Ù.
ÀÔÂûÀ» »èÁ¦Çϱâ À§ÇØ ÀÔÂû µî·ÏÀÚÀÇ Æнº¿öµå¿Í ³ª¸ÓÁö Á¤º¸¸¦ Àü´ÞÇÏ´Â form¹®À» ¸¸µì´Ï´Ù. <form method=post action=main_view.php> <input type=hidden name=chanl value=del_lib2> /* main_view.php ÆÄÀÏÀÇ $chanl= del_lib2ÀÎ Ç׸ñÀ» ½ÇÇàÇÕ´Ï´Ù. */ <input type=hidden name=tnum value=$no> <input type=hidden name=no value=$no> /* ÀÔÂûÀÚÀÇ ¹øÈ£¿Í ÇØ´ç °æ¸ÅÀÇ °íÀ¯ ¹øÈ£¸¦ Àü´ÞÇÕ´Ï´Ù. */ <input type=hidden name=f value=$f> <input type=hidden name=f2 value=$f2> /* °æ¸Å ¸ÞÀÎ Å×À̺í À̸§°ú ÀÔÂûÀÚ Å×À̺í À̸§À» Àü´ÞÇÕ´Ï´Ù. */
ÀÔÂû »èÁ¦¸¦ À§ÇÑ Æнº¿öµå ÀԷ¶õÀ» ¸¸µé°í ÇöÀç ÀÌ Ç׸ñÀ» Ŭ¸¯ÇÑ »ç¿ëÀÚ¸¦ Ãâ·ÂÇÕ´Ï´Ù. <td bgcolor=#808080 width=74><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~Name</b></font></td> <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'> $putuser[name]</font></td> </tr> /* »çÀÌÆ®¿¡ Á¢¼ÓÇÑ ID ¼¼¼Ç¿¡ ÇØ´çÇÏ´Â »ç¿ëÀÚ À̸§À» Ãâ·ÂÇÕ´Ï´Ù. */ <tr> <td bgcolor=#808080 width=74><font style='font-size:13px;font-style:italic;color:#fffff0'> <b>~passw</b></font></td> <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'> <input type=password name=passwd size=9></font></td> /* ÀÔÂû »èÁ¦¸¦ À§ÇÑ Æнº¿öµå ÀÔ·Â Ç׸ñÀÔ´Ï´Ù. */ <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'> <input type=submit value=Áö¿ì±â> </font></td> /* Æнº¿öµå¿Í ³ª¸ÓÁö Á¤º¸¸¦ Àü´ÞÇÏ´Â "Áö¿ì±â" ¹öÆ°À» »ý¼ºÇÕ´Ï´Ù. */
°æ¸Å°¡ ¸¶°¨ÇßÀ» °æ¿ì ÇØ´ç °æ¸ÅÀÇ Á¦¸ñÀ» Ŭ¸¯ÇÏ¸é º¸¿©Áִ ȸéÀÔ´Ï´Ù. $putally2 - ÇØ´ç °æ¸ÅÀÇ Á¤º¸¸¦ ¹è¿·Î ÀúÀåÇؼ Àü´ÞÇÕ´Ï´Ù. $ally3 - ÇØ´ç °æ¸Å ÀÔÂûÀÚÀÇ Á¤º¸¸¦ ¹è¿·Î ÀúÀåÇؼ Àü´ÞÇÕ´Ï´Ù.
°æ¸Å°¡ ¸¶°¨ÇßÀ» °æ¿ì ³«ÂûÀÚÀÇ Ãâ·ÂÀ» º¸¿© ÁÖ´Â ºÎºÐÀÔ´Ï´Ù. for($a=1 ; $a < 2 ; $a++) { /* ÀÌ for¹®Àº ¾ÕÀÇ °æ¸Å ¼¼ºÎ Á¤º¸ º¸±â¿¡¼ »ç¿ëÇÑ ±¸¹®ÀÌÁö¸¸ $a°¡ 2º¸´Ù ÀÛÀ» ¶§±îÁö¸¸ ¼öÇàÇÕ´Ï´Ù. ÀÌ°ÍÀº ¿ÀÁ÷ ÀÔÂûÀÚÁß ÇÑ »ç¶÷¸¸ Ãâ·ÂÇÏ°Ô ÇÏ·Á´Â °ÍÀÔ´Ï´Ù. */ $put2=mysql_fetch_array($ally3); if($putally2[smoney]<$put2[bmoney]) { echo(" <tr> <td bgcolor=black align=center><a href = mailto:$put2[email] > <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>$put2[name]</b></font></a></td> /* ±âº» ±Ý¾×ÀÌ ÀÔÂû ±Ý¾× º¸´Ù ÀÛÀ» °æ¿ì ÀÔÂûÀÚÀÇ À̸§À» Ãâ·ÂÇÕ´Ï´Ù. */ <td bgcolor=black align=center> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>$putally2[edate]</b></font></td> /* ¸¶°¨ ³¯Â¥¸¦ Ãâ·ÂÇÕ´Ï´Ù. */ <td bgcolor=black align=center> <font style='font-size:13px;font-style:italic;color:#fffff0'> <b>$put2[tel]</b></font></td> /* ÀÔÂûÀÚÀÇ ÀüȹøÈ£¸¦ Ãâ·ÂÇÕ´Ï´Ù. */ <td bgcolor=black align=center> <font style='font-size:13px;font-style:italic;color:red'> <b>$put2[bmoney]</b></font></td> </tr> /* ÀÔÂûÀÚÀÇ ÀÔÂû ±Ý¾×À» Ãâ·ÂÇÕ´Ï´Ù. */ "); } }
ÇØ´ç °æ¸Å°¡ ¸¶°¨µÇ¸é ¸ÅµµÀÚ¿Í ³«ÂûÀÚ¿"Ô ¸ÞÀÏÀ» º¸³»´Â ÇÔ¼öÀÔ´Ï´Ù.
for($a=1 ; $a < 2 ; $a++) { $put2=mysql_fetch_array($ally3); if($putally2[smoney]<$put2[bmoney]) { $message = " <b>No</b> $no <b>title</b> : $putally2[title]<br> <b>³«ÂûÀÚ</b> $put2[name] <b>¸¶°¨½Ã°£</b> $putally2[edate]<br> <b>Tel</b> $put2[tel] <b>³«Âû±Ý¾×</b> $put2[bmoney]<br> <b>¸ÅµµÀÚ</b> $putally2[name] <b>¸ÅµµÀÏ</b> $putally2[wdate]<br> <b>Tel</b> $putally2[tel] <b>±âº»±Ý¾×</b> $putally2[smoney] <br><br> <b>°øÁö</b><br> ³«Âû ¸ÅÀÏ È®ÀÎ ÈÄ °æ¸Å °Ô½ÃÆÇÀÇ °æ¸Å ±ÛÀ» Á÷Á¢ »èÁ¦ Çϼ¼¿ä~!"; } } /* ÀÔÂûÀÚ Áß Á¦ÀÏ ³ôÀº ±Ý¾×ÀÇ ÀÔÂûÀÚ 1¸íÀÇ Á¤º¸¸¦ $message º¯¼ö¿¡ ÀúÀåÇÕ´Ï´Ù. */
³«ÂûÀÚ¿Í ¸ÅµµÀÚÀÇ Á¤º¸¸¦ ¸ÞÀÏ·Î °¢°¢ º¸³À´Ï´Ù. $su = " No $no ³«Âû "; /* ³«Âû ¹øÈ£¸¦ ¸ÞÀÏ Á¦¸ñ($su)¿¡ ÀúÀåÇÕ´Ï´Ù. */ $rp = "$put2[email]"; /* ³«ÂûÀÚÀÇ ¸ÞÀÏ ÁÖ¼Ò¸¦ ÇØ´ç º¯¼ö¿¡ ÀúÀåÇÕ´Ï´Ù. */ $rp1 = "$putally2[email]"; /* ¸ÅµµÀÚÀÇ ¸ÞÀÏ ÁÖ¼Ò¸¦ ÇØ´ç º¯¼ö¿¡ ÀúÀåÇÕ´Ï´Ù. */ mail($rp , $su ,$message); mail($rp1 , $su ,$message); /* ¸ÅµµÀÚ¿Í ³«ÂûÀÚ¿"Ô ¸ÞÀÏÀ» º¸³À´Ï´Ù. */
<?php session_start(); ////////////////////////////////////////////////// // // ÀÏÀÚ : 2000.2.15 am 5 // ÀÛ¼ºÀÚ: skycry (hong il) // // // method : main_view // ////////////////////////////////////////////////// ?> <?php if($username) { include('func_all.php'); if($chanl == new_libchal && $username != guest) { input_view($f,$f2,$connect,$putuser) ; mysql_close($connect); } if($chanl == input_new && $username != guest) { if($edata4 == am && $edata5 == 12) { $ap = "00" ; } if($edata4 == pm && $edata5 == 12) { $ap = "12" ; } if($edata4 == am) { $ap = $edata5 ; } if($edata4 == pm) { $ap = $edata5 +"12" ; } $edate = "$edata1-$edata2-$edata3-$ap-$edata6"; error_view($title,$smoney,$edate,$content,$f,$f2); mysql_select_db('libchal',$connect);//function $max = mysql_query("select max(no) from $f ",$connect ); $new_no = mysql_result($max,0,0); $no = $new_no + "1" ; if(!(int)$smoney) { echo(" <script> window.alert('±Ý¾×À» ´Ù½Ã ÀÔ·Â Çϼ¼¿ä..') history.go(-1) </script> "); exit; } $wdate = date("y-m-d"); mysql_query("insert into $f(no,title,name,email,tel,smoney,content,edate,wdate) values('$no','$title','$putuser[name]','$putuser[email]','$putuser[tel1]', '$smoney','$content','$edate','$wdate')",$connect); echo(" <html> <body> <center> <form method=post action=main_view.php> <font style='font-size:13px;font-style:italic;color:#808080'> <b>±ÛÀÌ µî·Ï µÇ¾ú½À´Ï´Ù</b></font> <input type=hidden name=chanl value=main_view> <input type=hidden name=f value=$f> <input type=hidden name=f2 value=$f2> <input type=submit value=È®ÀÎ> </form> </center> </body> </html> "); mysql_close($connect); } if($chanl == input_newlibchal && $username != guest) { if($chanl2 == input_newlibchal2 && $username != guest) { if(!(int)$bmoney || !$bmoney) { echo(" <script> window.alert('±Ý¾×À» ´Ù½Ã ÀÔ·Â Çϼ¼¿ä..') history.go(-1) </script> "); exit; } if($putup2[name] == $putuser[name]) { echo(" <script> window.alert('ÀÔÂûÀº Çѹø¸¸ °¡´É ÇÕ´Ï´Ù.') history.go(-1) </script> "); exit; } if($putally2[smoney] >= $bmoney) { echo(" <script> window.alert('ÀÔÂûÀº ±âº» ±Ý¾× º¸´Ù ³ô¾Æ¾ß ÇÕ´Ï´Ù..') history.go(-1) </script> "); exit; } mysql_select_db('libchal',$connect); $sise = $putup[sise] + "1" ; mysql_query("insert into $f2(name,bmoney,tel,email,tnum) values('$putuser[name]','$bmoney','$putuser[tel1]','$putuser[email]','$tnum')",$connect); mysql_query("update $f set sise='$sise' where no='$tnum'",$connect); echo(" <html> <body> <center> <form method=post action=main_view.php> <font style='font-size:13px;font-style:italic;color:#808080'> <b>±ÛÀÌ µî·Ï µÇ¾ú½À´Ï´Ù</b></font> <input type=hidden name=chanl value=main_view> <input type=hidden name=f value=$f> <input type=hidden name=f2 value=$f2> <input type=submit value=È®ÀÎ> </form> </center> </body> </html> "); } else { input_newlibchal($tnum,$f,$f2,$putuser) ; } mysql_close($connect); } if($chanl == edit_libchal && $username != guest) { edit_libchal($putally2,$no,$f,$f2,$putuser) ; mysql_close($connect); } if($chanl == edit_libchal_in && $username != guest) { if($edata4 == am && $edata5 == 12) { $ap = "00" ; } if($edata4 == pm && $edata5 == 12) { $ap = "12" ; } if($edata4 == am) { $ap = $edata5 ; } if($edata4 == pm) { $ap = $edata5 +"12" ; } $edate = "$edata1-$edata2-$edata3-$ap-$edata6"; error_view($title,$smoney,$edate,$content,$f,$f2); $input=mysql_query("select password('$passwd') ",$connect ); $inputpassw = mysql_result($input,0,0); if($putuser[passwd] == $inputpassw) { if(!(int)$smoney) { echo(" <script> window.alert('±Ý¾×À» ´Ù½Ã ÀÔ·Â Çϼ¼¿ä..') history.go(-1) </script> "); exit; } mysql_select_db('libchal',$connect);//function mysql_query("update $f set title='$title', smoney='$smoney' , edate='$edate' , content='$content' where no = '$no'",$connect); mysql_close; } else { echo(" <script> window.alert('passw°¡ Ʋ·È½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä') history.go(-1) </script> "); exit; } echo(" <html> <body> <center> <form method=post action=main_view.php> <font style='font-size:13px;font-style:italic;color:#808080'> <b>±ÛÀÌ ¼öÁ¤ µÇ¾ú½À´Ï´Ù</b></font> <input type=hidden name=no value=$no> <input type=hidden name=chanl value=main_view> <input type=hidden name=f value=$f> <input type=hidden name=f2 value=$f2> <input type=submit value=È®ÀÎ> </form> </center> </body> </html> "); mysql_close($connect); } if($chanl == title) { mysql_select_db('libchal',$connect);//function mysql_query("update $f set hit = '$putup[hit]'+1 where no = '$no'",$connect) ; view_title($putally2,$ally3,$no,$f,$f2,$putuser) ; } if($chanl == main_view) { $s_mail = s_mail($putally2,$ally3,$no,$f,$f2); mysql_select_db('adminp',$connect); mysql_query("update admin set sum='$t_num' where mview = '$f'",$connect); main_view($s_mail,$t_num,$ally,$page,$findtype,$findname,$f,$f2,$root,$username, $putuser); mysql_close($connect); } if($chanl == del) { del($no,$tnum,$f,$f2,$root,$putuser); } if($chanl == del_no && $username != guest) { $input=mysql_query("select password('$passwd') ",$connect ); $inputpassw = mysql_result($input,0,0); if($putuser[passwd] == $inputpassw || $root) { mysql_select_db('libchal',$connect);//function $mldel = "delete from $f where no=$no && name='$putuser[name]'"; $rsult = mysql_query($mldel,$connect); $ml2del = "delete from $f2 where tnum=$tnum && name='$putuser[name]'"; $rsult2 = mysql_query($ml2del,$connect); } else { echo(" <script> window.alert('passw°¡ Ʋ¸³´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä') history.go(-1) </script> "); exit; } echo(" <html> <body> <center> <form method=post action=main_view.php> <font style='font-size:13px;font-style:italic;color:#808080'> <b>°æ¸Å°¡ »èÁ¦ µÇ¾ú½À´Ï´Ù</b></font> <input type=hidden name=no value=$no> <input type=hidden name=chanl value=main_view> <input type=hidden name=f value=$f> <input type=hidden name=f2 value=$f2> <input type=submit value=È®ÀÎ> </form> </center> </body> </html> "); mysql_close($connect); } if($chanl == del_lib) { del_lib($no,$tnum,$f,$f2,$root,$putuser); } if($chanl == del_lib2 && $username != guest) { $input=mysql_query("select password('$passwd') ",$connect ); $inputpassw = mysql_result($input,0,0); if($putuser[passwd] == $inputpassw || $root) { mysql_select_db('libchal',$connect);//function $ml2del = "delete from $f2 where name='$putuser[name]' && tnum='$no' "; $rsult2 = mysql_query($ml2del,$connect); } else { echo(" <script> window.alert('passw°¡ Ʋ·È½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä') history.go(-1) </script> "); exit; } echo(" <html> <body> <center> <form method=post action=main_view.php> <font style='font-size:13px;font-style:italic;color:#808080'> <b>ÀÔÂûÀÌ »èÁ¦ µÇ¾ú½À´Ï´Ù</b></font> <input type=hidden name=no value=$no> <input type=hidden name=chanl value=main_view> <input type=hidden name=f value=$f> <input type=hidden name=f2 value=$f2> <input type=submit value=È®ÀÎ> </form> </center> </body> </html> "); mysql_close($connect); } if($chanl == title_end) { title_end($putally2,$ally3,$no,$f,$f2); mysql_close($connect); } if($chanl == new_libchal && $username == guest || $chanl == input_newlibchal && $username == guest || $chanl == edit_libchal && $username == guest || $chanl == del && $username == guest || $chanl == del_lib && $username == guest) { echo(" <script> window.alert('guest´Â ÀÌ¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.') history.go(-1) </script> "); exit; } } else { echo(" <script> window.alert('Login Çϼ¼¿ä.') history.go(-1) </script> "); exit; } ?>
func_all.phpÀÇ ÇÔ¼ö¸¦ ´Ù¾çÇÑ ¹æ¹ýÀ¸·Î ºê¶ó¿ìÀú¿¡ Ãâ·ÂÇÏ°í ¿©·¯ ÀÔ·Â Ç׸ñ µîÀ» µ¥ÀÌÅͺ£À̽º¿¡ ÀúÀåÇÕ´Ï´Ù.
»çÀÌÆ®¿¡ µî·ÏµÈ ID³ª guest·Î ·Î±×ÀÎ ÇßÀ» °æ¿ì »ý¼ºµÈ ¼¼¼ÇÀ» ÀÌ¿ëÇؼ °æ¸Å °Ô½ÃÆÇÀÇ ±â´ÉÀ» ¼öÇàÇÒ ¼ö ÀÖ°Ô ÇÏ´Â ºÎºÐÀÔ´Ï´Ù. session_start(); /* ¼¼¼ÇÀ» ½ÃÀÛÇÕ´Ï´Ù. */ if($username) { /* ¼¼¼ÇÀÌ ÀÖÀ» °æ¿ì ÇØ´ç if¹® ³»¿ëÀ» ¼öÇàÇÕ´Ï´Ù. if($username){ ¿Í else{ »çÀÌ¿¡ °¢È¸éÀ» Ãâ·ÂÇÏ´Â ÇÔ¼ö¸¦ »ç¿ëÇÕ´Ï´Ù. ÀÌ°°Àº ¹æ¹ýÀº °æ¸Å °Ô½ÃÆÇÀÇ ÀÌ¿ëÀ» µî·ÏµÈ ID¿Í guest¸¸ÀÌ Á¢¼Ó °¡´É Çϵµ·Ï ÇÏ´Â °ÍÀÔ´Ï´Ù. */ include('func_all.php'); /* ÇÔ¼ö ÆÄÀÏÀ» Æ÷ÇÔÇÕ´Ï´Ù. */ } else { echo(" <script> window.alert('LoginÇϼ¼¿ä.') history.go(-1) </script> "); exit; } /* main_view.phpÀÇ ¸¶Áö¸· ºÎºÐ¿¡ Á¸ÀçÇÏ¸ç ¼¼¼ÇÀÌ ¾øÀ» °æ¿ì Ãâ·ÂÇÏ´Â ºÎºÐÀÔ´Ï´Ù. */
»õ·Î¿î °æ¸Å¸¦ µî·ÏÇϴ ȸéÀ» Ãâ·ÂÇÕ´Ï´Ù. if($chanl == new_libchal && $username != guest) { /* $chanlÀÌ new_libchalÀÌ°í ¼¼¼ÇÀÌ guest°¡ ¾Æ´Ò °æ¿ì »õ·Î¿î °æ¸Å µî·Ï ȸéÀ» ½ÇÇàÇÕ´Ï´Ù. */ input_view($f,$f2,$connect,$putuser) ; mysql_close($connect); }
»õ·Î¿î °æ¸Å ÀԷ ȸ鿡¼ ÀÔ·ÂÇÑ Ç׸ñÀ» µ¥ÀÌÅͺ£À̽º¿¡ ÀúÀåÇÏ´Â ºÎºÐÀÔ´Ï´Ù. if($chanl == input_new && $username != guest) { /* $chanlÀÌ input_newÀÌ°í ¼¼¼ÇÀÌ guest°¡ ¾Æ´Ò °æ¿ì ½ÇÇàÇÕ´Ï´Ù. */ if($edata4 == am && $edata5 == 12) { $ap = "00" ; } if($edata4 == pm && $edata5 == 12) { $ap = "12" ; } if($edata4 == am) { $ap = $edata5 ; } if($edata4 == pm) { $ap = $edata5 +"12" ; } /* À§ Á¶°Ç ¹®Àº °æ¸Å ¸¶°¨ ³¯Â¥¸¦ ¼³Á¤ÇÏ´Â ºÎºÐÀ̸ç Am°ú PmÀ» ±¸ºÐÇÕ´Ï´Ù. */ $edate = "$edata1-$edata2-$edata3-$ap-$edata6"; /* $edate º¯¼ö¿¡ ³¯Â¥ Á¤º¸¸¦ Çϳª·Î ÀúÀåÇÕ´Ï´Ù. */ error_view($title,$smoney,$edate,$content,$f,$f2); /* °æ¸Å ÀÔ·Â Ç׸ñ Áß °ø¹é Ç׸ñÀÌ ÀÖÀ¸¸é ¿¡·¯¸¦ Ãâ·ÂÇÕ´Ï´Ù. */ mysql_select_db('libchal',$connect); $max = mysql_query("select max(no) from $f ",$connect ); $new_no = mysql_result($max,0,0); $no = $new_no + "1" ; /* °æ¸Å ¸ÞÀÎ Å×ÀÌºí¿¡¼ ¸¶Áö¸· °æ¸Å °íÀ¯¹øÈ£¸¦ °Ë»öÇÏ°í +1Çؼ »õ·Î¿î °æ¸Å °íÀ¯¹øÈ£¸¦ ¸¸µì´Ï´Ù. */ if(!(int)$smoney) { echo(" <script> window.alert('±Ý¾×À» ´Ù½Ã ÀÔ·ÂÇϼ¼¿ä..') history.go(-1) </script> "); exit; } /* °æ¸Å ±âº» ±Ý¾×ÀÌ Á¤¼ö°¡ ¾Æ´Ò °æ¿ì ¿¡·¯ ȸéÀ» Ãâ·ÂÇÕ´Ï´Ù. */ $wdate = date("y-m-d"); /* ÇöÀç ³¯Â¥¸¦ ÇØ´ç º¯¼ö¿¡ ÀúÀåÇÕ´Ï´Ù. */ mysql_query("insert into $f(no,title,name,email,tel,smoney,content,edate,wdate) values('$no','$title','$putuser[name]','$putuser[email]','$putuser[tel1]', '$smoney','$content','$edate','$wdate')",$connect); /* °æ¸Å ¸ÞÀÎ Å×ÀÌºí¿¡ »õ °æ¸Å ÀÔ·Â »çÇ×À» ÀúÀåÇÕ´Ï´Ù. */ echo(" <html> <body> <center> <form method=post action=main_view.php> <font style='font-size:13px;font-style:italic;color:#808080'> <b>±ÛÀÌ µî·ÏµÇ¾ú½À´Ï´Ù</b></font> <input type=hidden name=chanl value=main_view> <input type=hidden name=f value=$f> <input type=hidden name=f2 value=$f2> <input type=submit value=È®ÀÎ> </form> </center> </body> </html> "); /* »õ °æ¸Å Ç׸ñÀ» ÀúÀåÇÏ°í È®ÀΠȸéÀ» Ãâ·ÂÇÕ´Ï´Ù. */ mysql_close($connect); }
ÇØ´ç °æ¸Å¿¡ ÀÔÂûÀ» ÇÒ °æ¿ì ÀÔÂû ±Ý¾×À» ÀÔ·ÂÇϴ ȸéÀ» Ãâ·ÂÇÏ°í , ´Ù½Ã ÇØ´ç Á¤º¸¸¦ µ¥ÀÌÅͺ£À̽º¿¡ ÀúÀåÇÏ´Â ºÎºÐÀ» ¸¸µì´Ï´Ù. if($chanl == input_newlibchal && $username != guest) { /* $chanlÀÌ input_newlibchalÀÌ°í ¼¼¼ÇÀÌ guest°¡ ¾Æ´Ò °æ¿ì ÀÔÂû µî·Ï ȸéÀ» Ãâ·ÂÇÕ´Ï´Ù. */ if($chanl2 == input_newlibchal2 && $username != guest) { /* $chanl=input_newlibchal , $chanl= input_newlibchal2ÀÌ°í ¼¼¼ÇÀÌ guest°¡ ¾Æ´Ò ¶§ ¾Æ·¡ Ç׸ñÀ» ½ÇÇàÇÕ´Ï´Ù. */ if(!(int)$bmoney || !$bmoney) { echo(" <script> window.alert('±Ý¾×À» ´Ù½Ã ÀÔ·ÂÇϼ¼¿ä..') history.go(-1) </script> "); exit; } if($putup2[name] == $putuser[name]) { echo(" <script> window.alert('ÀÔÂûÀº Çѹø¸¸ °¡´ÉÇÕ´Ï´Ù.') history.go(-1) </script> "); exit; } /* ÀÔÂûÀÚ¿Í ±âÁ¸¿¡ µî·ÏµÈ ÀÔÂûÀÚ¿Í °°À» °æ¿ì ¿¡·¯ ȸéÀ» Ãâ·ÂÇÕ´Ï´Ù. */ if($putally2[smoney] >= $bmoney) { echo(" <script> window.alert('ÀÔÂûÀº ±âº» ±Ý¾×º¸´Ù ³ô¾Æ¾ß ÇÕ´Ï´Ù..') history.go(-1) </script> "); exit; } /* ÀÔÂû ±Ý¾×ÀÌ ±âº» ±Ý¾×º¸´Ù ÀÛÀ» °æ¿ì Ãâ·ÂÇÕ´Ï´Ù. */ mysql_select_db('libchal',$connect);//function $sise = $putup[sise] + "1" ; /* ÀÔÂûµî·Ï ȸ¼ö¸¦ $sise¿¡ ÀúÀåÇÕ´Ï´Ù. */ mysql_query("insert into $f2(name,bmoney,tel,email,tnum) values('$putuser[name]','$bmoney','$putuser[tel1]','$putuser[email]','$tnum')",$connect); /* ÀÔÂûÀÚ Å×ÀÌºí¿¡ Àü´Þ ¹ÞÀº ÀÔÂû Ç׸ñµéÀ» ÀúÀåÇÕ´Ï´Ù. */ mysql_query("update $f set sise='$sise' where no='$tnum'",$connect); /* $siseÀÇ °ªÀ» ÀúÀåÇÕ´Ï´Ù. */ echo(" <html> <body> <center> <form method=post action=main_view.php> <font style='font-size:13px;font-style:italic;color:#808080'> <b>±ÛÀÌ µî·Ï µÇ¾ú½À´Ï´Ù</b></font> <input type=hidden name=chanl value=main_view> <input type=hidden name=f value=$f> <input type=hidden name=f2 value=$f2> <input type=submit value=È®ÀÎ> </form> </center> </body> </html> "); } /* ÀÔÂû µî·ÏÀ» ¸¶Ä"í È®ÀΠȸéÀ» Ãâ·ÂÇÕ´Ï´Ù. */ else { input_newlibchal($tnum,$f,$f2,$putuser) ; } /* ÀÔÂû µî·Ï ȸéÀÔ´Ï´Ù. */ mysql_close($connect); }
µî·ÏµÈ °æ¸Å¸¦ ¼öÁ¤Çϴ ȸéÀ» Ãâ·ÂÇÏ°í ÇØ´ç Å×À̺íÀÇ ³»¿ëÀ» ¼öÁ¤ÇÏ´Â ·çƾÀÔ´Ï´Ù. if($chanl == edit_libchal_in && $username != guest) { /* $chanl=edit_libchal_inÀÌ°í ¼¼¼ÇÀÌ guest°¡ ¾Æ´Ò °æ¿ì ½ÇÇàÇÕ´Ï´Ù. */ $input=mysql_query("select password('$passwd') ",$connect ); $inputpassw = mysql_result($input,0,0); /* Àü´Þ ¹ÞÀº Æнº¿öµå¸¦ ¾ÏÈ£ÈÇÕ´Ï´Ù. */ if($putuser[passwd] == $inputpassw) { /* Àü´Þ ¹ÞÀº Æнº¿öµå¿Í ÇØ´ç °æ¸Å µî·ÏÀÚÀÇ Æнº¿öµå°¡ °°À» °æ¿ì ½ÇÇàÇÕ´Ï´Ù. */ if(!(int)$smoney) { echo(" <script> window.alert('±Ý¾×À» ´Ù½Ã ÀÔ·Â Çϼ¼¿ä..') history.go(-1) </script> "); exit; } mysql_select_db('libchal',$connect); mysql_query("update $f set title='$title', smoney='$smoney' , edate='$edate' , content='$content' where no = '$no'",$connect); /* ÇØ´ç °æ¸Å Å×ÀÌºí¿¡¼ Àü´Þ ¹ÞÀº ¼öÁ¤ Ç׸ñµéÀ» ÀÔ·ÂÇÕ´Ï´Ù. */ mysql_close; } else { echo(" <script> window.alert('passw°¡ Ʋ·È½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä') history.go(-1) </script> "); exit; } /* Àü´Þ ¹ÞÀº Æнº¿öµå¿Í µî·ÏÀÚ Æнº¿öµå°¡ °°Áö ¾ÈÀ¸¸é À§ ȸéÀ» Ãâ·ÂÇÕ´Ï´Ù. */
°æ¸Å ¸ÞÀΠȸ鿡¼ ƯÁ¤ °æ¸ÅÀÇ Á¦¸ñÀ» Ŭ¸¯ÇÏ¸é º¸¿©Áִ ȸéÀ» ¸¸µì´Ï´Ù. if($chanl == title) { /* $chanlÀÌ titleÀÏ °æ¿ì ½ÇÇàÇÕ´Ï´Ù. */ mysql_select_db('libchal',$connect); mysql_query("update $f set hit = '$putup[hit]'+1 where no = '$no'",$connect) ; /* °æ¸Å ¸ÞÀÎ Å×ÀÌºí¿¡¼ ÇØ´ç °æ¸ÅÀÇ Á¶ ȸ¼ö¸¦ +1 Çؼ ÀúÀåÇÕ´Ï´Ù. */ view_title($putally2,$ally3,$no,$f,$f2,$putuser) ; /* °æ¸Å ¼¼ºÎ ȸéÀ» Ãâ·ÂÇÕ´Ï´Ù. */ }
if($chanl == main_view) { /* $chanl ÀÌ main_view ÀÏ °æ¿ì ½ÇÇàÇÕ´Ï´Ù. */ $s_mail = s_mail($putally2,$ally3,$no,$f,$f2); /* ¸ÞÀÏ ÇÔ¼ö¸¦ $s_mail º¯¼ö¿¡ ÀúÀåÇÕ´Ï´Ù. */ mysql_select_db('adminp',$connect); mysql_query("update admin set sum='$t_num' where mview = '$f'",$connect); /* admin ¿µ¿ªÀÇ ÇØ´ç °æ¸Å °Ô½ÃÆÇÀÇ ÃÑ ±Û ¼ö¸¦ ÀúÀåÇÕ´Ï´Ù. */ main_view($s_mail,$t_num,$ally,$page,$findtype,$findname,$f,$f2,$root, $username,$putuser); /* ¸ÞÀΠȸéÀ» Ãâ·ÂÇÕ´Ï´Ù. */ mysql_close($connect); }
ÇØ´ç °æ¸Å¿¡ µî·ÏÇÑ ÀÔÂûÀÚÀÇ ÀÔÂûÀ» »èÁ¦ÇÏ´Â ·çƾÀÔ´Ï´Ù. if($chanl == del_lib2 && $username != guest) { /* $chanlÀÌ del_lib2ÀÌ°í ¼¼¼ÇÀÌ guest°¡ ¾Æ´Ò °æ¿ì ½ÇÇàÇÕ´Ï´Ù. */ $input=mysql_query("select password('$passwd') ",$connect ); $inputpassw = mysql_result($input,0,0); /* Àü´Þ ¹ÞÀº Æнº¿öµå¸¦ ¾ÏÈ£ÈÇÕ´Ï´Ù. */ if($putuser[passwd] == $inputpassw || $root) { /* Àü´Þ ¹ÞÀº Æнº¿öµå¿Í µî·ÏµÈ Æнº¿öµå°¡ °°°Å³ª admin ÄíÅ°°¡ ÀÖÀ» °æ¿ì ½ÇÇàÇÕ´Ï´Ù.*/ mysql_select_db('libchal',$connect); $ml2del = "delete from $f2 where name='$putuser[name]' && tnum='$no' "; $rsult2 = mysql_query($ml2del,$connect); /* ÀÔÂûÀÚ Å×ÀÌºí¿¡¼ ÇØ´ç À¯ÀúÀÇ ÀÔÂûÀ» »èÁ¦ÇÕ´Ï´Ù. */ } else { echo(" <script> window.alert('passw°¡ Ʋ·È½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä') history.go(-1) </script> "); exit; } /* Àü´Þ µÇ¾î¿Â Æнº¿öµå¿Í µî·ÏµÈ Æнº¿öµå°¡ ´Ù¸¦ °æ¿ì Ãâ·ÂÇϴ ȸéÀÔ´Ï´Ù. */
guest·Î ·Î±×ÀÎ ÇßÀ» °æ¿ì °æ¸Å °Ô½ÃÆÇÀÇ ±â´É Áß »ç¿ë ÇÏÁö ¸øÇÏ´Â ºÎºÐÀ» ¼³Á¤ÇÕ´Ï´Ù. if($chanl == new_libchal && $username == guest || $chanl == input_newlibchal && $username == guest || $chanl == edit_libchal && $username == guest || $chanl == del && $username == guest || $chanl == del_lib && $username == guest) { /* ¼¼¼ÇÀÌ guestÀÌ°í $chanlÀÌ »õ·Î¿î °æ¸Å µî·Ï , ÀÔÂû , ¼öÁ¤ , °æ¸Å »èÁ¦ , ÀÔÂû »èÁ¦ ºÎºÐ¿¡ ÇØ´ç ÇÒ °æ¿ì ½ÇÇàÇÕ´Ï´Ù. */ echo(" <script> window.alert('guest´Â ÀÌ¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.') history.go(-1) </script> "); exit; } ´ÙÀ½Àå¿¡´Â ¼îÇÎ ¸ôÀ» ±¸ÇöÇØ º¸°Ú½À´Ï´Ù.