"; if (!ereg("^[0-9]+$", $mytid)) { echo "公告編號錯誤!"; exit; } $link = "select * from titletb where tid='$mytid'"; $sql_act = "array"; include ("inc/sql.inc.php"); if ($number == 0) { echo "沒有這篇公告!"; exit; } $tid = $row[tid]; $partname = stripslashes($row[partname]); $subject = stripslashes($row[subject]); $posttime = $row[posttime]; $firsttime = $row[firsttime]; $gpartid = $row[partid]; $hits = $row[hits]; $type = $row[type]; $mylocal = $row[local]; $hits++; $link = "update titletb set hits='$hits' where tid='$mytid'"; $sql_act = "do"; include ("inc/sql.inc.php"); $link = "select * from anntb where tid='$mytid'"; $sql_act = "array"; include ("inc/sql.inc.php"); if ($mylocal == "yes") { $issee = "no"; $islocal = strtok($local, " "); while ($islocal) { if (eregi($islocal, $myip) || ($REMOTE_HOST && eregi($islocal, $REMOTE_HOST))) $issee = "ok"; $islocal = strtok(" "); } } if ($issee == "no") { echo "沒有此公告內容!"; echo "[返回]"; exit; } if ($number == 0) { $link = "delete from titletb where tid='$mytid'"; $sql_act = "do"; include ("inc/sql.inc.php"); if ($usenuke == 1) $tmpurl = "/index.php?usenuke=1"; echo "沒有此公告內容!"; echo "[返回]"; exit; } $guserid = $row[userid]; $ip = $row[ip]; $filename = stripslashes($row[filename]); $url = stripslashes($row[url]); if (ereg("<", $row[comment])) { $hh = 1; $comment = $row[comment]; } else { if ($nl2br == "yes") $comment = nl2br($row[comment]); else $comment = ereg_replace($nl2br, "
", $row[comment]); } if ($space == "yes" && $hh != 1) $comment = ereg_replace(" ", "  ", stripslashes($comment)); else $comment = stripslashes($comment); $link = "select realname, email from usertb where userid='$guserid'"; $sql_act = "array"; include ("inc/sql.inc.php"); if ($number != 0) { $realname = stripslashes($row[realname]); $email = stripslashes($row[email]); } else $realname = "無此人"; echo "
"; include ("inc/myhost.inc.php"); echo "

"; $mybg = bg($showtable); $mytbg1 = bg($showtbg1); $mytbg2 = bg($showtbg2); $myt1 = bg($showt1); $myt2 = bg($showt2); echo "[回公告系統]"; echo ""; $mybg1 = bg($showrow2); echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; $mycbg = bg($showcbg); $myc = bg($showc); if ($hh == 1) { echo "
單位$partname發公告者"; if (empty($email)) echo "$realname"; else echo "$realname"; echo ""; if ($showip == "yes") $myip = $ip; elseif ($showip == "no") { $ip3 = explode(".", $ip); // 把 ip 切出來 $myip = $ip3[0].".?.?.".$ip3[3]; } else $myip = $showip; echo "來源$myip
標題$subject相關網址"; if (empty($url)) echo "無"; else echo ""; //elseif (ereg("://", $url)) // echo "有 <按我>"; //else // echo "有 <按我>"; echo "人氣$hits
時間"; $mydate = explode(" ",$firsttime); $mydate = explode("-",$mydate[0]); if ($database == "mysql" && $mydate[0] != "0000" || $database == "pgsql" && $mydate[0] != "0001") echo "$firsttime (最新編修時間 ".$posttime.")"; else echo "$posttime"; echo "相關附件"; if (empty($filename)) echo "無"; else echo ""; echo "管理"; if ($safe_mode == "no") { echo "刪除 "; echo "編修"; } else { echo "刪除 "; echo "編修"; } echo "

"; echo "".$comment."
 
"; echo "
"; } else { echo "
"; } $mypbg = bg($showpbg); if (!empty($url)) { $uu = strtok($url, " "); $i = 0; while ($uu) { echo ""; $uu = strtok(" "); $i++; } } if (!empty($filename)) { $ff = strtok($filename, " "); $i = 0; while ($ff) { $fp = "files"."/".$gpartid."/".$guserid."/".$ff; if (file_exists($fp)) { $fs = intval(filesize($fp) / 1024); echo ""; } else echo ""; $ff = strtok(" "); $i++; } } echo "
".$comment."
 
"; $myu = explode("!",$uu); if (empty($myu[1])) $myu[1] = $myu[0]; if (ereg("://", $myu[0])) echo "★相關網址".($i+1).":".$myu[1].""; else echo "★相關網址".($i+1).":".$myu[1].""; echo "
★相關附件".($i+1).":".$ff." (".$fs."K) [下載]
★相關附件".($i+1).":".$ff." (檔案已不存在!)

"; echo "[回公告系統]"; echo ""; include ("conf/mysite.inc.php"); if ($usenuke == 1) include("$nuke_dir/footer.php"); echo ""; ?>