 |
|
|
 |
 |
|
ไปดูที่ ราย 45 ที่มัน เออ เลอร์ซิครับ ว่ามันเพราะอะไร
|
 |
 |
 |
 |
Date :
15 ก.พ. 2550 22:20:44 |
By :
arsachi |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ติดตั้งตามที่เค้าบอกป่าวครับ
|
 |
 |
 |
 |
Date :
15 ก.พ. 2550 22:21:31 |
By :
ต้น |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
แก้ยังไงดีครับ ผมติดตั่งตามที่เค้าบอกหมดเยย appserv รุ่นก่อน2.4.7 ตรงนี้มันไม่เออเริ่อครับแต่คนอื่นเข้าเวปผมไม่ได้ซะงั้นแต่appserv-win32-2.4.7 ให้เพื่อนลองเข้ามันเข้าได้อะครับ
---------------------------------------------------------------------------------
<?php
/*****************************************************************************/
/* Recent.php */
/*****************************************************************************/
/* YaBB SE: Yet another Bulletin Board Splinter Edition */
/* Open-Source Project inspired by Zef Hemel ([email protected]) */
/* Software Version: YaBB SE 1.5.1 */
/* Software by: The YaBB SE Development Team */
/* ========================================================================= */
/* Software Distributed by: http://www.yabbse.org */
/* Copyright 2001-2003 by: http://www.lewismedia.com (Lewis Media) */
/* Support, News, Updates at: http://www.yabbse.org/community */
/* Inspired and Ported From: http://www.yabbforum.com */
/*****************************************************************************/
/* This program is free software; you may redistribute it and/or modify it */
/* under the terms of the provided license as published by Lewis Media. */
/* */
/* This program is distributed in the hope that it will be useful, but */
/* WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the provided */
/* license for more information. */
/* */
/* See license.txt for details of the YaBB SE license. The latest version */
/* of this license can be found at the distributor's site seen above. */
/*****************************************************************************/
$recentphpver = 'YaBB SE 1.5.1';
function LastPost()
{
global $settings, $scripturl, $txt, $censored, $recentsender, $db_prefix, $sc;
if (!isset($recentsender))
$recentsender='';
$request = mysql_query("
SELECT m.posterTime, m2.subject, m.ID_TOPIC, t.ID_BOARD, m.posterName, t.numReplies, t.ID_FIRST_MSG
FROM {$db_prefix}boards AS b, {$db_prefix}categories AS c
LEFT JOIN {$db_prefix}topics AS t ON (t.ID_TOPIC=b.ID_LAST_TOPIC)
LEFT JOIN {$db_prefix}messages AS m ON (m.ID_MSG=t.ID_LAST_MSG)
LEFT JOIN {$db_prefix}messages AS m2 ON (m2.ID_MSG=t.ID_FIRST_MSG)
WHERE c.ID_CAT=b.ID_CAT
AND (FIND_IN_SET('$settings[7]', c.memberGroups) != 0 OR c.memberGroups='' OR '$settings[7]' LIKE 'Administrator' OR '$settings[7]' LIKE 'Global Moderator')
ORDER BY m.posterTime DESC
LIMIT 1;") or database_error(__FILE__, __LINE__);
if (mysql_num_rows($request) == 0)
return;
$row = mysql_fetch_array($request);
CensorTxt($row['subject']);
if ($recentsender == 'admin')
{
$row['subject'] = ((strlen(un_html_entities($row['subject']))>25) ? (htmlspecialchars(substr(un_html_entities($row['subject']), 0, 22)) . "...") : $row['subject']);
$post = "\"<a href=\"$scripturl?board=$row[ID_BOARD];action=display;threadid=$row[ID_TOPIC];start=new\">$row[subject]</a>\" (" . timeformat($row['posterTime']) . ")\n";
}
else
{
$post = "$txt[234] \"<a href=\"$scripturl?board=$row[ID_BOARD];action=display;threadid=$row[ID_TOPIC];start=new\">$row[subject]</a>\" $txt[235] (" . timeformat($row['posterTime']) . ")<br />\n";
}
echo $post;
}
function RecentPosts()
{
global $settings, $txt, $yytitle, $censored, $scripturl, $enable_ubbc, $enable_notification, $menusep, $db_prefix;
global $cgi, $img, $color, $imagesdir, $realNames, $sc;
$display = 10;
// in order to optimize speed, this query gets the ($display * 4)
// latest messageID's. guessing that that will be enough to cover
// ($display) topics a user is allowed to see.
$request = mysql_query("
SELECT ID_MSG
FROM {$db_prefix}messages AS m
WHERE 1
ORDER BY posterTime DESC
LIMIT 0, " . ($display * 4)) or database_error(__FILE__, __LINE__);
$messages = array();
while ($row = mysql_fetch_array($request))
$messages[] = $row['ID_MSG'];
$yytitle = $txt[214];
template_header();
if (count($messages))
{
$request = mysql_query("
SELECT m.smiliesEnabled, m.posterTime, m.ID_MSG, m.subject, m.body, m.ID_TOPIC, t.ID_BOARD, b.name AS bname, c.name AS cname, t.numReplies, m.ID_MEMBER, m2.ID_MEMBER AS ID_FIRST_MEMBER, m.posterName, m2.posterName AS firstPosterName, IFNULL(mem.realName, m.posterName) AS posterDisplayName, IFNULL(mem2.realName, m2.posterName) AS firstPosterDisplayName
FROM {$db_prefix}messages AS m, {$db_prefix}messages AS m2, {$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}categories AS c
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER=m.ID_MEMBER)
LEFT JOIN {$db_prefix}members AS mem2 ON (mem2.ID_MEMBER=m2.ID_MEMBER)
WHERE m.ID_MSG IN (" . implode(',', $messages) . ")
AND m2.ID_MSG=t.ID_FIRST_MSG
AND t.ID_TOPIC=m.ID_TOPIC
AND b.ID_BOARD=t.ID_BOARD
AND c.ID_CAT=b.ID_CAT
AND (FIND_IN_SET('$settings[7]', c.memberGroups) != 0 OR c.memberGroups='' OR '$settings[7]'='Administrator' OR '$settings[7]'='Global Moderator')
ORDER BY m.posterTime DESC
LIMIT 0, $display") or database_error(__FILE__, __LINE__);
$counter = 0;
while ($row = mysql_fetch_array($request))
{
$counter ++;
if ($row['ID_MEMBER'] != '-1')
{
$euser=urlencode($row['posterName']);
$row['posterName'] = "<a href=\"$scripturl?action=viewprofile;user=$euser\">$row[posterDisplayName]</a>";
}
if ($row['ID_FIRST_MEMBER'] != '-1')
{
$euser=urlencode($row[firstPosterName]);
$row['firstPosterName'] = "<a href=\"$scripturl?action=viewprofile;user=$euser\">$row[firstPosterDisplayName]</a>";
}
$message = $row['body'];
CensorTxt($message);
CensorTxt($row['subject']);
if ($enable_ubbc)
$message = DoUBBC($message, $row['smiliesEnabled']);
if ($enable_notification)
$notify = "$menusep<a href=\"$scripturl?board=$row[ID_BOARD];action=notify;threadid=$row[ID_TOPIC];start=$row[numReplies]\">$img[notify_sm]</a>";
$row['posterTime'] = timeformat($row['posterTime']);
echo '
<table border="0" width="100%" cellspacing="1" bgcolor="' . $color['bordercolor'] . '" class="bordercolor">
<tr>
<td align="left" bgcolor="' . $color['titlebg'] . '" class="titlebg"><font class="text1" color="' . $color['titletext'] . '" size="2"> ' . $counter . ' </font></td>
<td width="75%" bgcolor="' . $color['titlebg'] . '" class="titlebg"><font class="text1" color="' . $color['titletext'] . '" size="2"><b> ' . $row['cname'] . ' / ' . $row['bname'] . ' / <a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . ';action=display;threadid=' . $row['ID_TOPIC'] . ';start=msg' . $row['ID_MSG'] . '#msg' . $row['ID_MSG'] . '" style="color: ' . $color['titletext'] . '">' . $row['subject'] . '</a></b></font></td>
<td align="right" bgcolor="' . $color['titlebg'] . '" class="titlebg" nowrap="nowrap"><font class="text1" color="' . $color['titletext'] . '" size="2"> ' . $txt[30] . ': ' . $row['posterTime'] . ' </font></td>
</tr><tr>
<td colspan="3" bgcolor="' . $color['catbg'] . '" class="catbg"><font class="catbg" size="2">' . $txt[109] . ' ' . $row['firstPosterName'] . ' | ' . $txt[22] . ' ' . $txt[525] . ' ' . $row['posterName'] . '</font></td>
</tr><tr>
<td colspan="3" bgcolor="' . $color['windowbg2'] . '" valign="top" height="40" class="windowbg2">' . $message . '</td>
</tr><tr>
<td colspan="3" bgcolor="' . $color['catbg'] . '" class="windowbg"><font size="2">
<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . ';action=post;threadid=' . $row['ID_TOPIC'] . ';start=' . $row['numReplies'] . ';title=Post+reply">' . $img['reply_sm'] . '</a>' . $menusep . '<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . ';action=post;threadid=' . $row['ID_TOPIC'] . ';quote=' . $row['ID_MSG'] . ';title=Post+reply;sesc=' . $sc . '">' . $img['replyquote'] . '</a>' . $notify . '
</font></td>
</tr>
</table><br />';
}
}
echo '<font size="1"><a href="' . $cgi . '">' . $txt[236] . '</a> ' . $txt[237] . '<br /></font>';
footer();
obExit();
}
function LastPostings()
{
global $settings, $scripturl, $txt, $censored, $recentsender, $db_prefix, $post, $dummy;
$showlatestcount = 5;
if (!isset($recentsender))
$recentsender = '';
// in order to optimize speed, this query gets the ($showlatestcount * 4)
// latest messageID's. guessing that that will be enough to cover
// ($showlatestcount) topics a user is allowed to see.
$request = mysql_query("
SELECT m.ID_MSG
FROM {$db_prefix}messages AS m
ORDER BY m.posterTime DESC
LIMIT 0, " . ($showlatestcount * 4)) or database_error(__FILE__, __LINE__);
$messages = array();
while ($row = mysql_fetch_array($request))
$messages[] = $row['ID_MSG'];
if (count($messages))
{
$request = mysql_query("
SELECT m.ID_MSG, m.posterTime, m.subject, m.ID_TOPIC, m.posterName, m.ID_MEMBER, IFNULL(mem.realName, m.posterName) AS posterDisplayName, t.numReplies, t.ID_BOARD, t.ID_FIRST_MSG, b.name AS bName
FROM {$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}categories AS c
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER=m.ID_MEMBER)
WHERE m.ID_MSG IN (" . implode(',', $messages) . ")
AND t.ID_TOPIC=m.ID_TOPIC
AND b.ID_BOARD=t.ID_BOARD
AND c.ID_CAT=b.ID_CAT
AND (FIND_IN_SET('$settings[7]', c.memberGroups) != 0 OR c.memberGroups='' OR '$settings[7]' LIKE 'Administrator' OR '$settings[7]' LIKE 'Global Moderator')
ORDER BY m.posterTime DESC
LIMIT 0, $showlatestcount;") or database_error(__FILE__, __LINE__);
if (mysql_num_rows($request) > 0)
{
$post = '<table width="100%" border="0">';
while ($row = mysql_fetch_array($request))
{
$post .= '<tr>';
if ($row['ID_MEMBER'] != -1)
{
$euser = urlencode($row['posterName']);
$dummy = "<a href=\"$scripturl?action=viewprofile;user=$euser\">$row[posterDisplayName]</a>";
}
else
$dummy = $row['posterName'];
//$row['subject'] = htmlspecialchars($row['subject']);
$post .= '
<td align="right" valign="top" nowrap="nowrap">
[<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . '">' . $row['bName'] . '</a>]
</td>
<td valign="top">
<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . ';action=display;threadid=' . $row['ID_TOPIC'] . ';start=msg' . $row['ID_MSG'] . '#msg' . $row['ID_MSG'] . '">' . $row['subject'] . '</a> ' . $txt[525] . ' ' . $dummy . '
</td>
<td align="right" nowrap="nowrap">
' . timeformat($row['posterTime']) . '
</td>
</tr>';
}
$post .= '</table>';
}
else
$post = '---';
}
else
$post = '---';
CensorTxt($post);
echo $post;
}
?>
---------------------------------------------------------------------------------------------------------------------
|
 |
 |
 |
 |
Date :
16 ก.พ. 2550 20:21:24 |
By :
วุ่น |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|