###############################################################################################
#
# ÀÌ Ä¥ÆÇÇü °Ô½ÃÆÇÀÇ ÃÖÃÊ ¹öÀüÀº ±¹¸³°æ»ó´ëÇб³ ÄÄÇ»Å͵¿¾Æ¸® ÄÄÇ»ÅäÇÇ¾Æ ÀÌÁ¾Èñ´Ô²²¼ ¸¸µå½Å °ÍÀÔ´Ï´Ù.
# ¾à°£ÀÇ ¹ö±×¿Í ±Û¾²±âÀÇ ÀÎÅÍÆäÀ̽º¸¦ º¯°æÇÏ¿´À¸¸ç ¼³Á¤ÆÄÀÏÀ» ¼¼ºÐÈ ÇÏ¿´½À´Ï´Ù.
# PHP4 ¹öÀü¿¡¼ Å×½ºÆ® µÇ¾ú½À´Ï´Ù.
# ÀÌ °Ô½ÃÆÇÀ¸·Î ÀÎÇÑ ¾î¶°ÇÑ ¹®Á¦¿¡µµ º»ÀÎÀº Ã¥ÀÓÀ» ÁöÁö ¾Ê½À´Ï´Ù.
# ÀÌ °Ô½ÃÆÇÀÇ ¿À·ù¿¡ ´ëÇؼ´Â °³¼±ÇؾßÇÒ Àǹ«¸¦ °¡ÁöÁö ¾Ê½À´Ï´Ù.
# IE 5.5 À̻󿡼 Å×½ºÆ® µÇ¾ú½À´Ï´Ù.
# Á¦ ȨÆäÀÌÁö¿¡ ¸Â°Ô ÃÖÀûÈ µÇ¾ú½À´Ï´Ù. ¾Ë¸Â°Ô ¼öÁ¤ÇÏ¿© »ç¿ëÇϼ¼¿ä.
# ¼öÁ¤ 2004.7.19 http://mr.sarang.cc
#
#`Ãß°¡»çÇ× by Zino¢â
# ÆÄÀ̾îÆø½º 2.0¿¡¼µµ ÀÛµ¿ÇÏ°Ô²û ¼Ò½º¸¦ ¼öÁ¤Çß½À´Ï´Ù.
# ¸¶Áö¸· ¼öÁ¤ 2007.8.12 http://zino.kr
#
###############################################################################################
session_start();
include ("bboard_conf.php");
if ($_POST[name]) {
$bboard_name=$_POST[name];
setcookie("bboard_name","$bboard_name",time()+1296000,"/"); //ÄíÅ° »ý¼º
}elseif($_COOKIE[bboard_name]) {
$bboard_name=$_COOKIE[bboard_name];
}else {
$bboard_name="";
}
?>
ÝèìÑÁý > ¹æ¸í·Ï
###############################################################################
#register_globals = Off »óÅ¿¡¼ ÄÚµùÀ» Á¤»óÈÇÏ´Â »ç¿ëÀÚ ÇÔ¼ö
#2002.6.12
###############################################################################
function parse_query_str() {
foreach($_POST as $key => $value) {
global ${$key};
${$key} = $value;
}
foreach($_GET as $key => $value) {
global ${$key};
${$key} = $value;
}
}
parse_query_str();
###############################################################################
$connect=mysql_connect("$blboard_dbhost","$blboard_dbuser","$blboard_dbpass") or die("µ¥ÀÌŸº£À̽º¿¡ ¿¬°áÇÒ¼ö ¾ø½À´Ï´Ù.");
mysql_select_db("$blboard_dbname",$connect);
$result = mysql_query("select IFNULL(max(board_number),0) as number from $user",$connect);
$row = mysql_fetch_array($result);
$max_page = $row[number];
if($code=="writemode"){
// ȨÆäÀÌÁö ÁÖ¼ÒÀÇ °æ¿ì http:// °¡ ¾øÀ¸¸é ºÙÀÓ
if((!eregi("http://",$homepage))&&$homepage) $homepage="http://".$homepage;
mysql_query("insert into $user (name,comment,x,y,date,color,board_number,pword,homepage) values('$name','$comment',$x,$y,now(),'$fontcolor',$max_page,'$pword','$homepage')",$connect);
}
if($cls==1){
$row = mysql_fetch_array(mysql_query("select count(*) as count from $user where board_number = $max_page"));
if($row[count]>=14){
$max_page++;
$pagen = $max_page+1;
mysql_query("insert into $user (board_number,x,y,date,comment,color) values($max_page, 42,40,now(),'$pagen ¹ø° Ä¥ÆÇ','#777777')");
}
}
if($board_number=="")$board_number=$max_page;
$result = mysql_query("select id,name,comment,x,y,date,color,homepage,DATE_FORMAT(date,'%m.%d') as date from $user where board_number=$board_number order by date DESC",$connect);
if(mysql_affected_rows()>14)$delete = 1; else $delete = 0;
$total = mysql_affected_rows();
$modsel='";
//ÆäÀÌÁö ºÐ¸®ÇÔ¼ö
function board_page($board_number,$maxdata,$pagecount,$screencount,$linkfile,$temp)
{
$maxpage = floor($maxdata / $pagecount);
$nowpage = floor($board_number / $pagecount);
$nowscreen = floor($nowpage / $screencount);
if(($nowscreen+1)*$screencount<$maxpage){
$next = ($nowscreen+1)*$pagecount*$screencount;
print " ´ÙÀ½ ³«¼ÆÇ¢·";
}
for($i=$screencount ; $i>=1;$i--){
$page = $nowscreen * $screencount + $i;
$board_number = ($page-1)*$pagecount;
if($maxdata+$pagecount>$page*$pagecount)
if($nowpage+1==$page){
$p="[".$page."]";
print $p;
}else{
$p="[".$page."]";
print $p;
}
}
if($nowscreen>0){
$pre = ($nowscreen-1)*$pagecount*$screencount;
print "¢¹ ÀÌÀü ³«¼ÆÇ ";
}
}
//¹®ÀÚÁ¤¸® ÇÔ¼ö
function ch_set($str)
{
$flag = false; // true = ÇѱÛÀÇ ½ÃÀÛ¹®ÀÚ
$count = 0;
$enter_count = 0;
$enter_flag = false;
for($i=0; $i 127) {
if( $flag ) $flag = false; else $flag = true;
}else{
$flag = false; // 127 º¸´Ù ÀÛÀ¸¸é ¹«Á¶°Ç Çѱ۽ÃÀÛÀÌ ¾Æ´Ô
}
if(($count > 26 and !$flag) or ($enter_flag and $enter_count < 3)){
$return_str = $return_str.$str[$i]."
";
$count = 0;
}else{
$return_str = $return_str.$str[$i];
}
}
return($return_str);
}
?>
¼öÁ¤ - echo $modsel;?>
|
|
|
|
mysql_query("select * from $user group by board_number");
board_page($board_number,mysql_affected_rows(),1,10,"bboard.php","user=$user");
?> | ºÐÇÊÀ» Ŭ¸¯ - Ä¥ÆÇ À§ÀÇ ¿øÇÏ´Â À§Ä¡·Î À̵¿ ÈÄ Å¬¸¯À¸·Î °íÁ¤ - ±Û¾²±â
|