function pcmain_hot_topics($link, $period, $color) { $topics = getHotTopicsByPeriod($link, $period, 50); for ($i = 0; $i < count($topics); $i++) { echo "<font color=\"" . $color . "\">" . ($i + 1) . "</font> <a href=\"/pc/pcdoc.php?userid=" . $topics[$i]["username"] . "&tid=" . $topics[$i][1] . "&tag=0\" title=\"" . htmlspecialchars($topics[$i]["topicname"]) . "\">" . html_format(html_format_fix_length($topics[$i]["topicname"], 32)) . "</a>" . "\n<a href=\"/pc/index.php?id=" . $topics[$i]["username"] . "\"><font class=low2>" . $topics[$i]["username"] . "</font></a><br />"; } }
function display_recommend_topic($link, $topic) { global $pcconfig, $users, $colors; $nodes = array(); if (!getRecommendNodesByTopic($link, $topic, $nodes)) { return; } ?> <tbody> <tr> <td bgcolor="#999999" height="3"> </td> </tr> <tr> <td> <table class="table2" width="100%" cellspacing="0" cellpadding="3" > <tr> <td class="td3" bgcolor="<?php echo $colors[rand(0, sizeof($colors) - 1)]; ?> " align="left"><b><a href="pcsec.php?sec=<?php echo $topic; ?> "><font color="white"><?php echo $pcconfig["SECTION"][$topic]; ?> </font></a></b></td> </tr> <tr> <td align="left" class="td3"> <table width="100%"> <?php foreach ($nodes as $node) { if (!$users[$node[uid]]) { $users[$node[uid]] = pc_load_infor($link, '', $node[uid]); } echo '<tr><td align="left">[<a href="index.php?id=' . $users[$node['uid']]['USER'] . '"><font class="low2">' . $users[$node[uid]]['NAME'] . '</font></a>] ' . '<a href="pccon.php?id=' . $node[uid] . '&nid=' . $node[nid] . '&s=all">' . html_format($node[subject]) . '</a> (<a href="/bbsqry.php?userid=' . $users[$node[uid]]['USER'] . '">' . $users[$node[uid]]['USER'] . '</a>)</td>' . '<td align="right"><a href="/bbsqry.php?userid=' . $node[recuser] . '"><font class="low">' . $node[recuser] . '</a> 推荐</font></td></tr>'; } ?> </table> <table width="100%"><tr><td align="right"><a href="pcreclist.php?topic=<?php echo $topic; ?> ">更多推荐文章</a></td></tr></table> </td> </tr> </table> </td> </tr> </tbody> <?php }
function display_section_list() { global $pcconfig; ?> <center> <table cellspacing=0 cellpadding=5 border=0 class=t1> <tr> <td class=t2>分类名</td> <td class=t2>分类主题</td> </tr> <?php $keys = array_keys($pcconfig["SECTION"]); for ($i = 0; $i < count($keys); $i++) { echo "<tr><td class=t4><a href=\"" . $_SERVER["PHP_SELF"] . "?sec=" . $keys[$i] . "\">" . html_format($pcconfig["SECTION"][$keys[$i]]) . "</a></td>" . "<td class=t8>" . $keys[$i] . "</td></tr>"; } ?> </table></center> <?php }
function pc_save_posts($subject, $body, $htmltag) { ?> <center> <table cellspacing="0" cellpadding="5" border="0" class="t1" width="90%"> <tr><td class="t2">请重新登录后再发表</td></tr> <tr><td class="t3">主题</td></tr> <tr><td class="t5"><?php echo html_format($subject); ?> </td></tr> <tr><td class="t3">内容</td></tr> <tr><td class="t5"><?php echo html_format($body, 1, $htmltag); ?> </td></tr> </table> </center> <?php }
function getRecommendBlogs($link, $pno = 1, $etemnum = 0) { global $pcconfig; if ($pno < 1) { $pno = 1; } $etemnum = intval($etemnum); if ($etemnum <= 0) { $etemnum = $pcconfig["NEWS"]; } $start = ($pno - 1) * $etemnum; $query = "SELECT recommend.uid , subject , body , htmltag , emote , hostname , created , recuser , nid , username , corpusname , description " . "FROM recommend , users " . "WHERE recommend.uid = users.uid " . "ORDER BY state DESC , rid DESC " . "LIMIT " . $start . " , " . $etemnum . " ;"; $result = mysql_query($query, $link); $num_rows = mysql_num_rows($result); $recommendBlogs = array(); $recommendBlogs["channel"] = array("siteaddr" => "http://" . $pcconfig["SITE"], "title" => $pcconfig["BBSNAME"] . "推荐Blog日志", "pcaddr" => "http://" . $pcconfig["SITE"], "desc" => $pcconfig["BBSNAME"] . "最新" . $etemnum . "个推荐日志", "email" => $pcconfig["BBSNAME"], "publisher" => $pcconfig["BBSNAME"], "creator" => $pcconfig["BBSNAME"], "rights" => $pcconfig["BBSNAME"], "date" => date("Y-m-d"), "updatePeriod" => "10分钟更新一次", "updateFrequency" => "最新的" . $etemnum . "个推荐日志", "updateBase" => date("Y-m-d H:i:s")); for ($i = 0; $i < $num_rows; $i++) { $rows = mysql_fetch_array($result); $body = "<br>\n" . "来自: " . $rows["corpusname"] . "<br>\n" . "作者: " . $rows["username"] . "<br>\n" . "发信站: " . $pcconfig["BBSNAME"] . "<br>\n" . "时间: " . time_format($rows["created"]) . "<br>\n" . "<hr size=1>\n" . html_format($rows["body"], TRUE, $rows["htmltag"]) . "<hr size=1>\n" . "(<a href=\"http://" . $pcconfig["SITE"] . "/pc/pccon.php?id=" . $rows[0] . "&nid=" . $rows["nid"] . "&s=all\">浏览全文</a>\n" . "<a href=\"http://" . $pcconfig["SITE"] . "/pc/pccom.php?act=pst&nid=" . $rows["nid"] . "\">发表评论</a>)<br>\n" . "<a href=\"http://" . $pcconfig["SITE"] . "/pc/rss.php?userid=" . $rows["username"] . "\"><img src=\"http://" . $pcconfig["SITE"] . "/pc/images/xml.gif\" border=\"0\" align=\"absmiddle\" alt=\"XML\">Blog地址:http://" . $pcconfig["SITE"] . "/pc/rss.php?userid=" . $rows["user"] . "</a>"; $recommendBlogs["useretems"][$i] = array("addr" => "http://" . $pcconfig["SITE"] . "/pc/pccon.php?id=" . $rows[0] . "&nid=" . $rows[nid], "subject" => htmlspecialchars($rows["subject"]), "desc" => $body, "tid" => 0, "nid" => $rows["nid"], "publisher" => $pcconfig["BBSNAME"], "creator" => $rows["username"], "pc" => $rows[0], "created" => time_format($rows["created"]), "rights" => $rows["username"] . ".bbs@" . $pcconfig["SITE"]); } mysql_free_result($result); return $recommendBlogs; }
if (isset($GLOBALS[org_code]) && $GLOBALS[org_code] > 0) { echo "<td class=sml nowrap>{$timesheet->abbreviation}</td>\n"; } echo "<td class=sml align=center nowrap><a href=\"{$base_url}/wr.php?request_id={$timesheet->request_id}\">{$timesheet->request_id}</a></td>\n"; echo "<td class=sml>" . substr(nice_date($timesheet->work_on), 7) . "</td>\n"; echo "<td class=sml>{$timesheet->work_quantity} {$timesheet->work_units}</td>\n"; echo "<td class=sml align=right>{$timesheet->work_rate} </td>\n"; echo "<td class=sml>{$timesheet->worker_name}</td>\n"; if ("{$timesheet->work_charged}" == "") { if ("{$uncharged}" == "") { echo "<td class=sml>uncharged</td>"; } } else { echo "<td class=sml>" . substr(nice_date($timesheet->work_charged), 7) . "</td>"; } echo "<td class=sml>" . html_format($timesheet->work_description) . "</td>"; if ("{$uncharged}" != "") { echo "<td class=\"sml\"><a href=\"{$base_url}/wr.php?request_id={$timesheet->request_id}\">{$timesheet->brief}</a></td>\n"; printf("<td class=\"sml\">%s</td>\n", $timesheet->review_needed == 't' ? '<span style="color:red;">Review</span>' : ' '); echo "<td class=sml align=right>"; printf("<input type=\"checkbox\" value=\"1\" id=\"{$timesheet->timesheet_id}\" name=\"chg_ok[{$timesheet->timesheet_id}]\"%s>", "{$timesheet->ok_to_charge}" == "t" ? " checked" : ""); printf("<input type=hidden name=\"chg_worker[{$timesheet->timesheet_id}]\" value=\"%s\">", htmlspecialchars($timesheet->worker_name)); printf("<input type=hidden name=\"chg_desc[{$timesheet->timesheet_id}]\" value=\"%s\">", htmlspecialchars($timesheet->work_description)); printf("<input type=hidden name=\"chg_request[{$timesheet->timesheet_id}]\" value=\"%s\">", htmlspecialchars($timesheet->request_id)); printf("<input type=hidden name=\"chg_requester[{$timesheet->timesheet_id}]\" value=\"%s\">", htmlspecialchars($timesheet->requester_name)); echo "</td>\n"; echo "<td class=sml><font size=2><input type=text size=6 name=\"chg_inv[{$timesheet->timesheet_id}]\" value=\"\"></font> </td>\n"; echo "<td class=sml><font size=2><input type=text size=8 name=\"chg_amt[{$timesheet->timesheet_id}]\" value=\"\"></font> </td>\n"; echo "<td class=sml><font size=2><input type=text size=10 name=\"chg_on[{$timesheet->timesheet_id}]\" value=\"" . date("d/m/Y") . "\"></font> </td>\n"; } echo "</tr>\n";
echo "</tr>\n"; } } if ($show_notes) { $subquery = "SELECT *, to_char( note_on, 'DD/MM/YYYY') AS nice_date "; $subquery .= "FROM request_note, usr "; $subquery .= "WHERE request_id = {$thisrequest->request_id} "; $subquery .= "AND usr.user_no = request_note.note_by_id "; $subquery .= "ORDER BY request_id, note_on "; $subres = awm_pgexec($dbconn, $subquery, "requestlist"); for ($j = 0; $subres && $j < pg_NumRows($subres); $j++) { $thisnote = pg_Fetch_Object($subres, $j); printf("<tr class=\"row%1d\" valign=\"top\">\n", $i % 2); echo "<td>{$thisnote->nice_date}</td>\n"; echo "<td>{$thisnote->fullname}</td>\n"; echo "<td colspan=\"5\">" . html_format($thisnote->note_detail) . "</td>\n"; echo "</tr>\n"; } } if ($show_work) { $subquery = "SELECT *, to_char( work_on, 'DD/MM/YYYY') AS nice_date "; $subquery .= "FROM request_timesheet, usr "; $subquery .= "WHERE request_id = {$thisrequest->request_id} "; $subquery .= "AND usr.user_no = request_timesheet.work_by_id "; $subquery .= "ORDER BY request_id, work_on "; $total = 0.0; $qty_total = 0.0; $subres = awm_pgexec($dbconn, $subquery, "requestlist"); for ($j = 0; $subres && $j < pg_NumRows($subres); $j++) { $thiswork = pg_Fetch_Object($subres, $j); printf("<tr class=row%1d valign=top>\n", $i % 2);
if ($categories == false) { $result = @mysql_query("SELECT id, pid, " . $db_settings['forum_table'] . ".user_id, UNIX_TIMESTAMP(time + INTERVAL " . $time_difference . " MINUTE) AS timestamp, name, user_name, subject, text \r\n FROM " . $db_settings['forum_table'] . " \r\n LEFT JOIN " . $db_settings['userdata_table'] . " ON " . $db_settings['userdata_table'] . ".user_id=" . $db_settings['forum_table'] . ".user_id\r\n WHERE spam=0" . $query_addition . " \r\n ORDER BY time DESC LIMIT " . $settings['rss_feed_max_items'], $connid) or raise_error('database_error', mysql_error()); if (!$result) { raise_error('database_error', mysql_error()); } } else { $result = @mysql_query("SELECT id, pid, " . $db_settings['forum_table'] . ".user_id, UNIX_TIMESTAMP(time + INTERVAL " . $time_difference . " MINUTE) AS timestamp, name, user_name, category, subject, text \r\n FROM " . $db_settings['forum_table'] . " \r\n LEFT JOIN " . $db_settings['userdata_table'] . " ON " . $db_settings['userdata_table'] . ".user_id=" . $db_settings['forum_table'] . ".user_id\r\n WHERE category IN (" . $category_ids_query . ") AND spam=0" . $query_addition . " \r\n ORDER BY time DESC LIMIT " . $settings['rss_feed_max_items'], $connid) or raise_error('database_error', mysql_error()); } $result_count = mysql_num_rows($result); if ($result_count > 0) { $i = 0; while ($row = mysql_fetch_array($result)) { if ($row['pid'] != 0) { $rss_items[$i]['reply'] = true; } $text = html_format(stripslashes($row['text'])); $rss_items[$i]['text'] = $text; $rss_items[$i]['title'] = htmlspecialchars(stripslashes($row['subject'])); if ($categories != false && isset($categories[$row['category']]) && $categories[$row['category']] != '') { $rss_items[$i]['category'] = $categories[$row['category']]; } if ($row['user_id'] > 0) { if (!$row['user_name']) { $rss_items[$i]['name'] = $lang['unknown_user']; } else { $rss_items[$i]['name'] = htmlspecialchars(stripslashes($row['user_name'])); } } else { $rss_items[$i]['name'] = htmlspecialchars(stripslashes($row['name'])); } $rss_items[$i]['link'] = $settings['forum_address'] . "index.php?id=" . $row['id'];
?> &nid=<?php echo $nodes[$i][nid]; ?> &s=all</link> <dc:creator><?php echo $pc["USER"]; ?> </dc:creator> <dc:date><?php echo time_format($nodes[$i][created]); ?> </dc:date> <description><![CDATA[ <?php echo html_format($nodes[$i][body], TRUE, $nodes[$i][htmltag]); ?> ]]></description> <smthBlog:node> <smthBlog:id><?php echo $nodes[$i][nid]; ?> </smthBlog:id> <smthBlog:emote><?php echo $nodes[$i][emote]; ?> </smthBlog:emote> <smthBlog:address><?php echo pc_hide_ip($nodes[$i][hostname]); ?> </smthBlog:address>
<font color=red>新</font>表示是否进行新日志(含评论,RSS)统计<br /><br /> <table cellspacing="0" cellpadding="3" class="t1"> <tr> <td class="t2">用户名</td> <td class="t2">BLOG名</td> <td class="t2">访问数</td> <td class="t2">日志数</td> <td class="t2">公</td> <td class="t2">人</td> <td class="t2">文</td> <td class="t2">新</td> <td class="t2">操作</td> </tr> <?php foreach ($pcs as $pc) { echo "<tr><td class=t4><a href=\"/bbsqry.php?userid=" . $pc[username] . "\">" . $pc[username] . "</a></td>" . "<td class=t5><a href=\"index.php?id=" . $pc[username] . "\" title=\"" . html_format($pc[description]) . "\">" . html_format($pc[corpusname]) . "</a></td>" . "<td class=t4>" . $pc[visitcount] . "</td>" . "<td class=t3>" . $pc[nodescount] . "</td><td class=t4>"; echo pc_is_groupwork(array("TYPE" => $pc[pctype])) ? "<font color=red><b>Y</b></font>" : "n"; echo "</td><td class=t4>"; echo $pc[pctype] < 2 ? "y" : "<font color=red><b>N</b></font>"; echo "</td><td class=t4>"; echo $pc[pctype] < 4 ? "y" : "<font color=red><b>N</b></font>"; echo "</td><td class=t4>"; echo $pc[pctype] < 6 ? "y" : "<font color=red><b>N</b></font>"; echo "</td><td class=t3><a href=\"" . $_SERVER["PHP_SELF"] . "?userid=" . $pc[username] . "\">操作</a></td></tr>"; } ?> </table> <br /> <form action="<?php echo $_SERVER["PHP_SELF"]; ?>
function display_blog_settings($link, $pc, $tag) { global $sec; $blog = pc_blog_menu($link, $pc); ?> <table cellspacing="0" cellpadding="5" border="0" width="99%" class="t1"> <tr> <td class="t2" width="50">序号</td> <td class="t2">Blog</td> <td class="t2" width="200">分区</td> <td class="t2" width="50">修改</td> <td class="t2" width="50">删除</td> </tr> <?php for ($i = 0; $i < count($blog); $i++) { echo "<tr>\n<td class='t3'>" . ($i + 1) . "</td>\n" . "<td class='t5'> <a href=\"pcdoc.php?userid=" . $pc["USER"] . "&tag=" . $blog[$i]["TAG"] . "&tid=" . $blog[$i]["TID"] . "\">《" . html_format($blog[$i]["NAME"]) . "》</a></td>\n" . "<td class='t3'><a href=\"pcdoc.php?userid=" . $pc["USER"] . "&tag=" . $blog[$i]["TAG"] . "\">" . $sec[$blog[$i]["TAG"]] . "</a></td>\n" . "<td class='t4'><a href=\"pcmanage.php?userid=" . $pc["USER"] . "&act=tedit&tid=" . $blog[$i]["TID"] . "\">修改</a></td>\n" . "<td class='t3'><a href=\"pcmanage.php?userid=" . $pc["USER"] . "&act=tdel&tid=" . $blog[$i]["TID"] . "\">" . "删除</a></td>\n" . "</tr>\n"; } ?> </table> <form action="pcmanage.php?userid=<?php echo $pc["USER"]; ?> &act=tadd" method="post" onsubmit="if(this.topicname.value==''){alert('请输入Blog名称!');return false;}"> <input type="hidden" name="tag" value="<?php echo $tag; ?> "> <p align="center" class="b2"> 新建Blog: 分区 <select name="access" class="b2"> <option value="0">公开区</option> <option value="1">好友区</option> <option value="2">私人区</option> </select> Blog名 <input type="text" name="topicname" maxlength="200" size="30" class="b2"> <input type="submit" value="新建Blog" class="b1"> </p> </form> <?php }
<td class="t5"><?php echo html_format($newApp[appself], TRUE); ?> </td> </tr> <tr> <td class="t3">规划</td> <td class="t5"><?php echo html_format($newApp[appdirect], TRUE); ?> </td> </tr> <tr> <td class="t3" colspan="2"> FROM: <?php echo html_format($newApp[hostname]); ?> @ <?php echo time_format($newApp[apptime]); ?> <?php if ($type == 1) { ?> [<a href="#" onclick="bbsconfirm('<?php echo $_SERVER["PHP_SELF"] . "?pno=" . $pno . "&type=" . $type . "&act=y&userid=" . rawurlencode($newApp[username]) . "&pcname=" . rawurlencode($newApp[appname]); ?> ' , '通过<?php echo $newApp[username];
break; case -21: html_error_quit("您的积分不符合当前讨论区的设定, 暂时无法在当前讨论区发表文章..."); break; } ?> <br /><br /><br /> <p align=center>转载成功!</p> <p align=center>返回<a href="pccon.php?id=<?php echo $node[uid]; ?> &nid=<?php echo $node[nid]; ?> &s=all"><?php echo html_format($node[subject]); ?> </a></p> <p align=center>进入<a href="/bbsdoc.php?board=<?php echo $brdarr["NAME"]; ?> "><?php echo $brdarr["DESC"]; ?> 讨论区</a></p> <p align=center><a href="javascript:history.go(-1)">快速返回</a></p> <?php } else { ?> <br /><br /><center> <form action="pcfwd.php?nid=<?php
<table cellpadding=5 cellspacing=0 class=t1 width=98% border=0> <tbody><tr> <td class=t2 width=20> </td> <td class=t2>文章主题</td> <td class=t2 width=160>Blog名称</td> <td class=t2 width=80>作者</td> <td class=t2 width=80>类别</td> <td class=t2 width=80>推荐人</td> </tr></tbody> <?php for ($i = 0; $i < $num; $i++) { $rows = mysql_fetch_array($result); if (!$pcuser[$rows[uid]]) { $pcuser[$rows[uid]] = pc_load_infor($link, "", $rows[uid]); } echo "<tbody><tr>\n" . "<td class=t3>" . ($i + $start + 1) . "</td>" . "<td class=t5><a href=\"pccon.php?id=" . $rows[uid] . "&nid=" . $rows[nid] . "&s=all\">" . html_format($rows[subject]) . "</a></td>" . "<td class=t3><span title=\"" . $pcuser[$rows[uid]]["DESC"] . "\"><a href=\"index.php?id=" . $pcuser[$rows[uid]]["USER"] . "\">" . $pcuser[$rows[uid]]["NAME"] . "</a></span></td>" . "<td class=t4><a href=\"/bbsqry.php?userid=" . $pcuser[$rows[uid]]["USER"] . "\">" . $pcuser[$rows[uid]]["USER"] . "</a></td>" . "<td class=t3><span title=\"点击查看该分类的其它Blog信息\"><a href=\"pcreclist.php?topic=" . $rows[topic] . "\">" . html_format($pcconfig["SECTION"][$rows[topic]]) . "</a></span></td>" . "<td class=t4><a href=\"/bbsqry.php?userid=" . $rows[recuser] . "\">" . $rows[recuser] . "</a></td>" . "</tr></tbody>\n"; } ?> </table> <p align="center"> <?php if ($pno > 1) { echo "[<a href=\"pcreclist.php?pno=" . ($pno - 1) . "\">上一页</a>]\n"; } if ($num == $pcconfig["LIST"]) { echo "[<a href=\"pcreclist.php?pno=" . ($pno + 1) . "\">下一页</a>]\n"; } ?> </p> <hr size=1> <p align="center"><?php
/** * php < 4.0.5 only: get the content of $table as a series of INSERT * statements. * After every row, a custom callback function $handler gets called. * * Last revision 13 July 2001: Patch for limiting dump size from * vinay@sanisoft.com & girish@sanisoft.com * * @param string the current database name * @param string the current table name * @param string the 'limit' clause to use with the sql query * @param string the name of the handler (function) to use at the end * of every row. This handler must accept one parameter * ($sql_insert) * * @return boolean always true * * @global boolean whether to use backquotes to allow the use of special * characters in database, table and fields names or not * * @see get_table_content() */ function get_table_content_old($db, $table, $add_query = '', $handler) { global $use_backquotes; $local_query = 'SELECT * FROM ' . backquote($db) . '.' . backquote($table) . $add_query; $result = mysql_query($local_query) or mysql_die('', $local_query); $i = 0; $isFirstRow = TRUE; while ($row = mysql_fetch_row($result)) { @set_time_limit(60); // HaRa $table_list = '('; for ($j = 0; $j < mysql_num_fields($result); $j++) { $table_list .= backquote(mysql_field_name($result, $j), $use_backquotes) . ', '; } $table_list = substr($table_list, 0, -2); $table_list .= ')'; if (isset($GLOBALS['extended_ins']) && !$isFirstRow) { $schema_insert = '('; } else { if (isset($GLOBALS['showcolumns'])) { $schema_insert = 'INSERT INTO ' . backquote(html_format($table), $use_backquotes) . ' ' . html_format($table_list) . ' VALUES ('; } else { $schema_insert = 'INSERT INTO ' . backquote(html_format($table), $use_backquotes) . ' VALUES ('; } $isFirstRow = FALSE; } for ($j = 0; $j < mysql_num_fields($result); $j++) { if (!isset($row[$j])) { $schema_insert .= ' NULL,'; } else { if ($row[$j] != '') { $dummy = ''; $srcstr = $row[$j]; for ($xx = 0; $xx < strlen($srcstr); $xx++) { $yy = strlen($dummy); if ($srcstr[$xx] == "\\") { $dummy .= "\\\\"; } if ($srcstr[$xx] == "'") { $dummy .= "\\'"; } if ($srcstr[$xx] == "\"") { $dummy .= "\\\""; } if ($srcstr[$xx] == "") { $dummy .= "\\0"; } if ($srcstr[$xx] == "\n") { $dummy .= "\\n"; } if ($srcstr[$xx] == "\r") { $dummy .= "\\r"; } if ($srcstr[$xx] == "") { $dummy .= "\\b"; } if ($srcstr[$xx] == "\t") { $dummy .= "\\t"; } if ($srcstr[$xx] == "") { $dummy .= "\\Z"; } if (strlen($dummy) == $yy) { $dummy .= $srcstr[$xx]; } } $schema_insert .= " '" . $dummy . "',"; } else { $schema_insert .= " '',"; } } // end if } // end for $schema_insert = ereg_replace(',$', '', $schema_insert); $schema_insert .= ')'; $handler(trim($schema_insert)); ++$i; } // end while // Replace last comma by a semi-column in extended inserts case if ($i > 0 && isset($GLOBALS['extended_ins'])) { $GLOBALS['tmp_buffer'] = ereg_replace(',([^,]*)$', ';\\1', $GLOBALS['tmp_buffer']); } return TRUE; }
echo "<a name=\"top\"></a><p class=date>::Blog信息::<br />名称: " . $pc["NAME"] . "<br />作者: <a href=\"http://" . $pcconfig["SITE"] . "/bbsqry.php?userid=" . $pc["USER"] . "\">" . $pc["USER"] . "</a><br />域名: <a href=\"" . pc_personal_domainname($pc["USER"]) . "\">" . pc_personal_domainname($pc["USER"]) . "</a><br />站点: <a href=\"http://" . $pcconfig["SITE"] . "\">" . $pcconfig["BBSNAME"] . "</a><br /></p>"; echo "<p class=date>档案日期:" . time_format($archDate[0]) . " ~ " . time_format($archDate[1]) . "</p><hr size=1>"; $query = "SELECT * FROM nodes WHERE uid = '" . $pc["UID"] . "' AND type = 0 AND created >= " . $archDate[0] . " AND created <= " . $archDate[1] . " "; if (pc_is_admin($currentuser, $pc) && $loginok == 1) { $query .= " AND ( access = 0 OR access = 1 OR access = 2 ) "; } elseif (pc_is_friend($currentuser["userid"], $pc["USER"]) || pc_is_manager($currentuser)) { $query .= " AND ( access = 0 OR access = 1 ) "; } else { $query .= " AND access = 0 "; } $query .= " ORDER BY nid DESC ;"; $result = mysql_query($query); while ($rows = mysql_fetch_array($result)) { echo "<p class=date>" . time_format($rows[created]) . "</p>"; echo "<p class=content><strong>主题: </strong><a href=\"http://" . $pcconfig["SITE"] . "/pc/pccon.php?id=" . $pc["UID"] . "&nid=" . $rows[nid] . "&s=all\">" . html_format($rows[subject]) . "</a><br />"; echo "<font class=content>" . html_format($rows[body], TRUE, $rows[htmltag]) . "</font><br /><br /><a href=\"#top\">[返回顶部]</a></p><hr size=1>"; } mysql_free_result($result); echo "<p align=center><a href=\"http://" . $pcconfig["SITE"] . "\">" . $pcconfig["BBSNAME"] . "</a></p>"; ?> <p align="center"> <?php /** * 水木的web代码bbslib和cgi部分是修改于NJUWWWBBS-0.9,此部分 * 代码遵循原有的nju www bbs的版权声明(GPL)。php部分的代码( * phplib以及php页面)不再遵循GPL,正在考虑使用其他开放源码的版 * 权声明(BSD或者MPL之类)。 * * 希望使用水木代码的Web站点加上powered by kbs的图标.该图标 * 位于html/images/poweredby.gif目录,链接指向http://dev.kcn.cn * 使用水木代码的站点可以通过dev.kcn.cn获得代码的最新信息.
/** Overridden method from Request, just so we display the subset of * request data we are interested in for QAMS. */ function RenderDetails($ef) { global $session, $bigboxcols, $bigboxrows; $html = ""; $html .= $ef->BreakLine("Project Details"); if (!$this->new_record) { $html .= $ef->DataEntryLine("W/R #", "{$this->request_id}" . " <b>Requested:</b> " . nice_date($this->request_on) . " <b>Status:</b> " . $this->status_desc); $html .= $ef->BreakLine("Quality Assurance Details"); } else { // QA Model // This determines which default approvals are set up initially.. $html .= $ef->DataEntryLine("QA Model", "", "lookup", "qa_model_id", array("_sql" => "SELECT * FROM qa_model", "_null" => "--- choose a model ---", "title" => "The QA model most appropriate to this project")); // PROJECT ROLES // These are specific important roles to be assigned to the project for QA // purposes. Note, we also consider that anyone who has been ALLOCATED to // this project is a valid QA Reviewer (client or internal). // Project Manager $html .= $ef->DataEntryLine("Project Mgr", "{$this->fullname}", "lookup", "project_manager", array("_sql" => SqlSelectRequesters($session->org_code), "_null" => "--- select a person ---", "title" => "The project manager in charge of this project.")); // QA Mentor $html .= $ef->DataEntryLine("QA Mentor", "{$this->fullname}", "lookup", "qa_mentor", array("_sql" => SqlSelectRequesters($session->org_code), "_null" => "--- select a person ---", "title" => "The QA mentor helping with quality assurance on this project.")); } $html .= $ef->DataEntryLine("Brief", "%s", "text", "brief", array("size" => 70, "title" => "A brief description of the project.")); // Organisation drop-down if ($session->AllowedTo("Admin") || $session->AllowedTo("Support") || $session->AllowedTo("Contractor")) { $html .= $ef->DataEntryLine("Organisation", "{$this->org_name}", "lookup", "org_code", array("_sql" => SqlSelectOrganisations($this->org_code), "_null" => "--- select an organisation ---", "onchange" => "OrganisationChanged();", "title" => "The organisation that this work will be done for.")); } else { if ($this->new_record) { $this->org_name = $session->org_name; } $html .= $ef->DataEntryLine("Organisation", "{$this->org_name}", "", ""); } // Person within Organisation drop-down $html .= $ef->DataEntryLine("Person", "{$this->fullname}", "lookup", "requester_id", array("_sql" => SqlSelectRequesters($this->org_code), "_null" => "--- select a person ---", "onchange" => "PersonChanged();", "title" => "The client who is requesting this, or who is in charge of ensuring it happens.")); // System (within Organisation) drop-down $html .= $ef->DataEntryLine("System", "{$this->system_desc}", "lookup", "system_id", array("_sql" => SqlSelectSystems($this->org_code), "_null" => "--- select a system ---", "onchange" => "SystemChanged();", "title" => "The business system that this project applies to.")); // Urgency of Request $html .= $ef->DataEntryLine("Urgency", $this->urgency_desc, "lookup", "urgency", array("_type" => "request|urgency", "title" => "The urgency of the project, separate from the long-term importance")); // Importance of Request $html .= $ef->DataEntryLine("Importance", $this->importance_desc, "lookup", "importance", array("_type" => "request|importance", "title" => "The relative long-term importance of the project, separate from the urgency")); // Requested By Date $html .= $ef->DataEntryLine("Requested By", $this->requested_by_date, "date", "requested_by_date", array("title" => "The date that you would like this project completed by", "onblur" => "this.value=CheckDate(this)")); // Agreed Due Date $html .= $ef->DataEntryLine("Agreed Due", $this->agreed_due_date, "date", "agreed_due_date", array("title" => "The date that has been agreed that the project will be completed by / on", "onblur" => "this.value=CheckDate(this)")); // Detailed description $html .= $ef->DataEntryLine("Details", str_replace('%', '%%', html_format($this->detailed)), "textarea", "detailed", array("title" => "Full details of the project", "rows" => $bigboxrows, "cols" => $bigboxcols)); return $html; }
<input type="radio" name="stylesheet" value="0" <?php if ($rows[stylesheet] == 0) { echo "checked"; } ?> >XSL样式表 <input type="radio" name="stylesheet" value="1" <?php if ($rows[stylesheet] == 1) { echo "checked"; } ?> >CSS样式表 <br /> <textarea name="userstyle" class="f1" onkeydown='if(event.keyCode==87 && event.ctrlKey) {document.postform.submit(); return false;}' onkeypress='if(event.keyCode==10) return document.postform.submit()' rows="20" cols="80" wrap="physical"> <?php echo html_format($rows[$key]); ?> </textarea></center> <input type="hidden" name="key" value="<?php echo $key; ?> "> <input type="hidden" name="type" value="<?php echo $type; ?> "> <p align="center"><input type="submit" class="f1" value="修改文件"></center> </form> <p align="center"> [<a href="index.html">Blog首页</a>] [<a href="index.php?id=<?php
function pc_file_showfiles($pc, $c_dir, $root_pid) { global $file_access; $c_files = array(); if (!$c_dir->uf_readdir($c_files)) { exit($c_dir->err); } $c_files_num = sizeof($c_files); ?> <hr width="100%"> <p class="f2"> [当前目录:<?php echo $c_dir->fid == $root_pid ? '根目录' : $c_dir->filename; ?> ]</p> <center> <table cellspacing="0" cellpadding="5" width="95%" class="t1" border="0"> <tr> <td class="t2" width="40"> </td> <td class="t2">文件名</td> <td class="t2" width="60">权限</td> <td class="t2" width="80">大小</td> <td class="t2" width="160">类型</td> <td class="t2" width="120">修改时间</td> <td class="t2" width="20">改</td> <td class="t2" width="20">删</td> <td class="t2" width="20">复</td> <td class="t2" width="20">剪</td> </tr> <?php if ($root_pid != $c_dir->fid) { echo '<tr><td colspan="10" class="t8">[<a href="' . $_SERVER["PHP_SELF"] . '?userid=' . $pc["USER"] . '&pid=' . $root_pid . '">返回根目录</a>]</td></tr>' . '<tr><td colspan="10" class="t8">[<a href="' . $_SERVER["PHP_SELF"] . '?userid=' . $pc["USER"] . '&pid=' . $c_dir->pid . '">返回上层目录</a>]</td></tr>'; } if ($c_files_num) { $start = 1; for ($i = 0; $i < $c_files_num; $i++) { if (!($file = new UserFile($c_files[$i], $c_dir->uid))) { continue; } if (!$file->fid) { continue; } if ($file->type == 1) { echo '<tr><td class="t3">目录</td>'; $link_url = '<a href="' . $_SERVER["PHP_SELF"] . '?userid=' . $pc["USER"] . '&pid=' . $file->fid . '" title="' . htmlspecialchars($file->remark) . '">'; } else { echo '<tr><td class="t3">' . $start . '</td>'; $start++; $link_url = '<a href="'; $link_url .= 'pcdownload.php?fid=' . $file->fid . '" title="' . htmlspecialchars($file->remark) . '" target="_blank">'; } echo '<td class="t5">' . $link_url . html_format($file->filename) . '</a></td>' . '<td class="t3">' . $file_access[$file->access] . '</td>' . '<td class="t4">' . sizestring($file->filesize) . '</td>' . '<td class="t3">' . html_format($file->filetype) . '</td>' . '<td class="t4">' . time_format($file->filetime) . '</td>' . '<td class="t3"><a href="' . $_SERVER['PHP_SELF'] . '?userid=' . $pc['USER'] . '&act=edit&fid=' . $file->fid . '&pid=' . $c_dir->fid . '">改</a></td>' . '<td class="t3"><a href="#" onclick="bbsconfirm(\'' . $_SERVER['PHP_SELF'] . '?userid=' . $pc['USER'] . '&act=rm&fid=' . $file->fid . '&pid=' . $c_dir->fid . '\',\'确实要删除' . addslashes(htmlspecialchars($file->filename)) . '吗?\')" >删</a></td>'; if ($_COOKIE['PCFILEFID']) { if ($file->type == 1) { echo '<td colspan="2" class="t3"><a href="' . $_SERVER['PHP_SELF'] . '?userid=' . $pc['USER'] . '&act=pt&fid=' . intval($_COOKIE['PCFILEFID']) . '&pid=' . $c_dir->fid . '&tid=' . $file->fid . '">粘</a></td>'; } else { echo '<td colspan="2" class="t3">-</td>'; } } else { echo '<td class="t3"><a href="' . $_SERVER['PHP_SELF'] . '?userid=' . $pc['USER'] . '&act=cp&fid=' . $file->fid . '&pid=' . $c_dir->fid . '">复</a></td>' . '<td class="t3"><a href="' . $_SERVER['PHP_SELF'] . '?userid=' . $pc['USER'] . '&act=mv&fid=' . $file->fid . '&pid=' . $c_dir->fid . '">剪</a></td>'; } unset($file); } } ?> </table> <?php if ($_COOKIE['PCFILEFID']) { echo '<br />[<a href="' . $_SERVER['PHP_SELF'] . '?userid=' . $pc['USER'] . '&act=pt&fid=' . intval($_COOKIE['PCFILEFID']) . '&pid=' . $root_pid . '&tid=' . $root_pid . '">粘贴到根目录</a>] ' . '[<a href="' . $_SERVER['PHP_SELF'] . '?userid=' . $pc['USER'] . '&act=cl&pid=' . $c_dir->fid . '">清空剪贴板</a>]<br/>'; } ?> </center> <hr width="100%"> <?php }
function show($db, $word) { if ($v = vdict_get($db, $word)) { # Format the output and send back to client side echo '<phonetic id="' . $word . '">[ ' . $v['phonetic'] . ' ]</phonetic>'; echo html_format($word, $v['definitions']); return true; } return false; }
} if (empty($birthday)) { $birthday = '0000-00-00'; } // check for too long words: $too_long_word = too_long_word($edit_user_name, $settings['name_word_maxlength']); if ($too_long_word) { $errors[] = 'error_word_too_long'; } if (empty($too_long_word)) { $too_long_word = too_long_word($user_location, $settings['location_word_maxlength']); if ($too_long_word) { $errors[] = 'error_word_too_long'; } } $profile_check = html_format($profile); $profile_check = strip_tags($profile_check); if (empty($too_long_word)) { $too_long_word = too_long_word($profile_check, $settings['text_word_maxlength']); if ($too_long_word) { $errors[] = 'error_word_too_long'; } } $signature_check = signature_format($signature); $signature_check = strip_tags($signature_check); if (empty($too_long_word)) { $too_long_word = too_long_word($signature_check, $settings['text_word_maxlength']); if ($too_long_word) { $errors[] = 'error_word_too_long'; } }
function pc_search_display_result($rows, $keyword) { global $pcconfig; if ($rows[htmltag]) { $rows[body] = undo_html_format(strip_tags($rows[body])); } $bodylen = strlen($rows[body]); if ($bodylen < 500) { $body = $rows[body]; } else { $keypos = array(); foreach ($keyword as $key) { $keypos[$key] = strpos($rows[body], $key) - 100; } $start = min($keypos); if ($start > 0) { $body = "... " . substr($rows[body], $start, 500) . " ..."; } else { $body = substr($rows[body], 0, 500) . " ..."; } } @($body = pc_search_special_keyword(html_format($body), $keyword)); ?> <table cellspacing="0" cellpadding="3" border="0" class="f1" width="500"> <tr><td> <font class="f5"> <a href="pccon.php?<?php echo "id=" . $rows[uid] . "&nid=" . $rows[nid] . "&tid=" . $rows[tid]; ?> "> <?php echo pc_search_special_keyword(html_format($rows[subject]), $keyword); ?> </a> </font> </td></tr> <tr><td class="f6"> <?php echo $body; ?> </td></tr> <tr><td> <font color="#336600"> http://<?php echo $pcconfig["SITE"]; ?> /pc/pccon.php?<?php echo "id=" . $rows[uid] . "&nid=" . $rows[nid] . "&tid=" . $rows[tid]; ?> -<?php echo (int) (strlen($rows[body] . $rows[subject]) / 100) / 10; ?> K- <?php echo time_format($rows[created]); ?> - </font> </td></tr> </table><br><br> <?php }
<table cellspacing="0" cellpadding="3" width="95%" class="t1"> <tr> <td class="t2" width="30">编号</td> <td class="t2" width="70">用户名</td> <td class="t2">Blog名称</td> <td class="t2" width="50">类别</td> <td class="t2" width="50">文章数</td> <td class="t2" width="50">访问量</td> <td class="t2" width="120">创建时间</td> <td class="t2" width="120">更新时间</td> </tr> <?php for ($i = 0; $i < $num_rows; $i++) { $rows = mysql_fetch_array($result); $pcThem = pc_get_theme($rows[theme]); echo "<tr>\n<td class=t3>" . ($startno + $i + 1) . "</td>\n" . "<td class=t4><a href=\"/bbsqry.php?userid=" . html_format($rows[username]) . "\">" . html_format($rows[username]) . "</a></td>\n" . "<td class=t3><span title=\"" . html_format($rows[description]) . "\"><a href=\"index.php?id=" . $rows[username] . "\">" . html_format($rows[corpusname]) . "</a></span></td>\n" . "<td class=t3><span title=\"点击查看该分类的其它Blog信息\"><a href=\"pcsec.php?sec=" . html_format($pcThem[0]) . "\">" . html_format($pcconfig["SECTION"][$pcThem[0]]) . "</a></span></td>\n" . "<td class=\"t4\">" . $rows[nodescount] . "</a>" . "<td class=\"t3\">" . $rows[visitcount] . "</a>" . "<td class=\"t4\">" . time_format($rows[createtime]) . "</a>" . "<td class=\"t3\">" . time_format($rows[modifytime]) . "</td>\n</tr>\n"; } ?> </table> </center> <p align="center"> <?php pc_main_navigation_bar(); ?> </p> <?php mysql_free_result($result); pc_db_close($link); } ?>
break; case 3: $sysVoteAdmin->svCreateVoteStepThree(); break; case 4: $sysVoteAdmin->svCreateVoteStepFour(); break; case 5: $sysVoteAdmin->svCreateVoteStepFive($link); break; default: $sysVoteAdmin->svCreateVoteStepOne(); } } elseif ($_GET["act"] == "log" && $_GET["svid"]) { $vote = sysvote_load_vote_infor($link, $_GET["svid"], TRUE); echo "主题: " . $vote[subject] . "<hr size=1><br />" . html_format($vote[logs], TRUE); ?> <p align=center> <a href="bbsmsysvote.php">返回</a> <a href="javascript:history.go(-1)">快速返回</a> </p> <?php } elseif ($_GET["act"] == "del" && $_GET["svid"]) { $sysVoteAdmin = new sysVoteAdmin(); $sysVoteAdmin->svDelVote($link, $_GET["svid"]); ?> <p align=center> <br />删除成功!<br /><br /> <a href="bbsmsysvote.php">返回</a> <a href="javascript:history.go(-1)">快速返回</a> </p>
function pcmain_section_top_view() { global $pcconfig, $link; ?> <table cellspacing=0 cellpadding=3 width="100%"> <?php $sections = array_keys($pcconfig["SECTION"]); $othersections = array(); foreach ($sections as $section) { $nodes = getSectionHotNodes($link, $section, _PCMAIN_TIME_LONG_, _PCMAIN_SECTION_NODES_); if ($nodes) { $nodesNum = sizeof($nodes); ?> <tr><td align="left"><table cellspacing="0" cellpadding="2" border="0" class="f1"><tr> <td align="left" valign="top" width="75"> [<strong><a href="/pc/pcsec.php?sec=<?php echo $section; ?> "><font class=low2><?php echo $pcconfig["SECTION"][$section]; ?> </font></a></strong>] </td><td> <?php for ($i = 0; $i < $nodesNum; $i++) { echo "<a href=\"/pc/pccon.php?id=" . $nodes[$i][0] . "&nid=" . $nodes[$i]["nid"] . "&s=all\">" . "<span title=\"" . html_format($nodes[$i]["subject"]) . "(" . $nodes[$i]["username"] . "'s BLOG:" . html_format($nodes[$i]["corpusname"]) . ")\">"; echo html_format($nodes[$i]["subject"]) . "</span></a>"; if ($i < $nodesNum - 1) { echo " | "; } } ?> </td></tr></table> </td></tr> <?php } else { $othersections[] = $section; } } ?> <tr><td> <?php foreach ($othersections as $section) { echo "[<a href=\"/pc/pcsec.php?sec=" . $section . "\"><font class=low2>" . $pcconfig["SECTION"][$section] . "</font></a>]\n"; } ?> </td></tr> </table> <?php }
<tr> <td width="30" class="t2">序号</td> <td width="40" class="t2">状态</td> <td class="t2">主题</td> <td width="120" class="t2">创建时间</td> <td width="60" class="t2">类型</td> <td width="20" class="t2">访</td> <td width="20" class="t2">回</td> <td width="20" class="t2">引</td> <td width="80" class="t2">推荐人</td> <td width="60" colspan="3" class="t2">处理</td> </tr> <?php for ($i = 0; $i < $num; $i++) { $recnode = mysql_fetch_array($result); echo "<tr>\n" . "<td class=\"t3\">" . ($i + 1 + $start) . "</td>\n" . "<td class=\"t4\">" . $recstate[$recnode[recommend]] . "</td>\n" . "<td class=\"t8\"><a href=\"pccon.php?id=" . $recnode[uid] . "&nid=" . $recnode[nid] . "&s=all\">" . html_format($recnode[subject]) . "</a></td>\n" . "<td class=\"t4\">" . time_format($recnode[created]) . "</td>\n" . "<td class=\"t3\"><a href=\"pcreco.php?topic=" . $recnode[rectopic] . "\">" . $pcconfig["SECTION"][$recnode[rectopic]] . "</a></td>\n" . "<td class=\"t3\">" . $recnode[visitcount] . "</td>\n" . "<td class=\"t4\">" . $recnode[commentcount] . "</td>\n" . "<td class=\"t3\">" . $recnode[trackbackcount] . "</td>\n" . "<td class=\"t4\"><a href=\"/bbsqry.php?userid=" . $recnode[recuser] . "\">" . $recnode[recuser] . "</a></td>\n"; if ($recnode[recommend] == 2) { echo "<td class=\"t3\" width=\"20\"><span title=\"将本文撤销为已推荐文章\"><a href=\"pcadmin_rec.php?type=" . $type . "&pno=" . $pno . "&nid=" . $recnode[nid] . "&sig=3\">撤</a></span></td>\n" . "<td class=\"t3\" width=\"20\"><span title=\"将本文撤销为未推荐文章\"><a href=\"pcadmin_rec.php?type=" . $type . "&pno=" . $pno . "&nid=" . $recnode[nid] . "&sig=0\">还</a></span></td>\n" . "<td class=\"t3\" width=\"20\"><span title=\"将本文撤销为不能推荐文章\"><a href=\"pcadmin_rec.php?type=" . $type . "&pno=" . $pno . "&nid=" . $recnode[nid] . "&sig=4\">绝</a></span></td>\n"; } elseif ($recnode[recommend] == 3) { echo "<td class=\"t3\" width=\"20\"><span title=\"将本文加入当前推荐文章\"><a href=\"pcadmin_rec.php?type=" . $type . "&pno=" . $pno . "&nid=" . $recnode[nid] . "&sig=2\">推</a></span></td>\n" . "<td class=\"t3\" width=\"20\"><span title=\"将本文撤销为未推荐文章\"><a href=\"pcadmin_rec.php?type=" . $type . "&pno=" . $pno . "&nid=" . $recnode[nid] . "&sig=0\">还</a></span></td>\n" . "<td class=\"t3\" width=\"20\"><span title=\"将本文撤销为不能推荐文章\"><a href=\"pcadmin_rec.php?type=" . $type . "&pno=" . $pno . "&nid=" . $recnode[nid] . "&sig=4\">绝</a></span></td>\n"; } else { echo "<td class=\"t3\" width=\"20\"><span title=\"将本文加入当前推荐文章中\"><a href=\"pcadmin_rec.php?type=" . $type . "&pno=" . $pno . "&nid=" . $recnode[nid] . "&sig=2\">是</a></span></td>\n" . "<td class=\"t3\" width=\"20\"><span title=\"不推荐本文,但以后可以再次推荐\"><a href=\"pcadmin_rec.php?type=" . $type . "&pno=" . $pno . "&nid=" . $recnode[nid] . "&sig=0\">否</a></span></td>\n" . "<td class=\"t3\" width=\"20\"><span title=\"不推荐本文,以后也不能推荐\"><a href=\"pcadmin_rec.php?type=" . $type . "&pno=" . $pno . "&nid=" . $recnode[nid] . "&sig=4\">绝</a></span></td>\n"; } echo "</tr>\n"; } ?> </table> <?php mysql_free_result($result); ?> <p align="right">
if ($data['user_id'] == $data['edited_by']) { $data['edited_by'] = $data['name']; } else { $edited_result = @mysql_query("SELECT user_name \r\n FROM " . $db_settings['userdata_table'] . " \r\n WHERE user_id = " . intval($data['edited_by']) . " LIMIT 1", $connid); $edited_data = mysql_fetch_array($edited_result); @mysql_free_result($edited_result); if (!$edited_data['user_name']) { $data['edited_by'] = $lang['unknown_user']; } else { $data['edited_by'] = htmlspecialchars(stripslashes($edited_data['user_name'])); } } } if ($data['cache_text'] == '') { // no cached text so parse it and cache it: $data['posting'] = html_format(stripslashes($data['text'])); // make sure not to make a double entry: @mysql_query("DELETE FROM " . $db_settings['entry_cache_table'] . " WHERE cache_id=" . intval($data['id']), $connid); @mysql_query("INSERT INTO " . $db_settings['entry_cache_table'] . " (cache_id, cache_text) VALUES (" . intval($data['id']) . ",'" . mysql_real_escape_string($data['posting']) . "')", $connid); } else { $data['posting'] = $data['cache_text']; } #if(isset($data['signature']) && $data['signature'] != '' && $data["show_signature"]==1) $data['signature'] = signature_format(stripslashes($data['signature'])); #else unset($data['signature']); if (isset($data['signature']) && $data['signature'] != '' && $data["show_signature"] == 1) { // user has a signature and wants it to be displaed in this posting. Check if it's already cached: if ($data['cache_signature'] != '') { $data['signature'] = $data['cache_signature']; } else { $s_result = @mysql_query("SELECT cache_signature FROM " . $db_settings['userdata_cache_table'] . " WHERE cache_id=" . intval($data['user_id']) . " LIMIT 1", $connid); $s_data = mysql_fetch_array($s_result);
$smarty->assign('signature_length', my_strlen(stripslashes($signature), $lang['charset'])); if (my_strlen(stripslashes($signature), $lang['charset']) > $settings['signature_maxlength']) { $errors[] = 'error_signature_too_long'; } // check for too long words: $too_long_word = too_long_word(stripslashes($user_real_name), $settings['name_word_maxlength']); if ($too_long_word) { $errors[] = 'error_word_too_long'; } if (empty($too_long_word)) { $too_long_word = too_long_word(stripslashes($user_location), $settings['location_word_maxlength']); if ($too_long_word) { $errors[] = 'error_word_too_long'; } } $profile_check = html_format(stripslashes($profile)); $profile_check = strip_tags($profile_check); if (empty($too_long_word)) { $too_long_word = too_long_word($profile_check, $settings['text_word_maxlength']); if ($too_long_word) { $errors[] = 'error_word_too_long'; } } $signature_check = signature_format(stripslashes($signature)); $signature_check = strip_tags($signature_check); if (empty($too_long_word)) { $too_long_word = too_long_word($signature_check, $settings['text_word_maxlength']); if ($too_long_word) { $errors[] = 'error_word_too_long'; } }
<table cellspacing=0 cellpadding=5 width=98% border=0 class=t1> <?php if ($type == "n") { ?> <tbody><tr> <td class=t2 width=70>用户名</td> <td class=t2 width=120>Blog名称</td> <td class=t2 width=70>Blog主题</td> <td class=t2 width=40>访问量</td> <td class=t2 width=40>文章数</td> <td class=t2>文章主题</td> <td class=t2 width=120>更新时间</td> </tr></tbody> <?php for ($i = 0; $i < $newNum; $i++) { echo "<tbody><tr>\n<td class=t4><a href='/bbsqry.php?userid=" . $newBlogs["useretems"][$i]["creator"] . "'>" . $newBlogs["useretems"][$i]["creator"] . "</a></td>\n" . "<td class=t3><span title=\"" . html_format($newBlogs["useretems"][$i]["pcdesc"]) . "\"><a href=\"index.php?id=" . $newBlogs["useretems"][$i]["creator"] . "\">" . html_format($newBlogs["useretems"][$i]["pcname"]) . "</a> </span></td>\n" . "<td class=t4><span title=\"点击查看该分类的其它Blog信息\"><a href=\"pcsec.php?sec=" . html_format($newBlogs["useretems"][$i]["theme"][0]) . "\">" . $pcconfig["SECTION"][$newBlogs["useretems"][$i]["theme"][0]] . "</a></span></td>\n" . "<td class=t3>" . $newBlogs["useretems"][$i]["pcvisit"] . "</td>\n" . "<td class=t4>" . $newBlogs["useretems"][$i]["pcnodes"] . "</td>\n" . "<td class=t8><a href='pccon.php?id=" . $newBlogs["useretems"][$i]["pc"] . "&nid=" . $newBlogs["useretems"][$i]["nid"] . "&s=all&tid=" . $newBlogs["useretems"][$i]["tid"] . "'>" . $newBlogs["useretems"][$i]["subject"] . "</a> </td>\n" . "<td class=t4>" . $newBlogs["useretems"][$i]["created"] . "</td>\n</tr></tbody>\n"; } } else { ?> <tbody><tr> <td class=t2 width=70>发布者</td> <td class=t2>评论主题</td> <td class=t2 width=125>评论发布时间</td> <td class=t2 width=200>原文主题</td> <td class=t2 width=20>访</td> <td class=t2 width=20>评</td> </tr></tbody> <?php for ($i = 0; $i < $newNum; $i++) { echo "<tbody><tr>\n<td class=t4><a href='/bbsqry.php?userid=" . $newComments[$i]["POSTER"] . "'>" . $newComments[$i]["POSTER"] . "</a></td>\n" . "<td class=t8><a href=\"pcshowcom.php?cid=" . $newComments[$i]["CID"] . "\">" . $newComments[$i]["CSUBJECT"] . "</a> </td>\n" . "<td class=t4>" . $newComments[$i]["CCREATED"] . " </td>\n" . "<td class=t8><span title=\"" . $newComments[$i]["NSUBJECT"] . "\"><a href=\"pccon.php?id=" . $newComments[$i]["UID"] . "&nid=" . $newComments[$i]["NID"] . "&s=all\">" . substr($newComments[$i]["NSUBJECT"], 0, 30) . " \n "; if (strlen($newComments[$i]["NSUBJECT"]) > 30) {
function pc_load_infor($link, $userid = FALSE, $uid = 0) { global $currentuser; if (!$userid && !$uid) { return FALSE; } if ($userid) { $query = "SELECT *,UNIX_TIMESTAMP(`createtime`) 'ts_createtime' FROM users WHERE `username`= '" . addslashes($userid) . "' LIMIT 0,1;"; } else { $query = "SELECT *,UNIX_TIMESTAMP(`createtime`) 'ts_createtime' FROM users WHERE `uid` = '" . intval($uid) . "' LIMIT 0,1;"; } $result = mysql_query($query, $link); $rows = mysql_fetch_array($result); mysql_free_result($result); if (!$rows) { return FALSE; } else { $pcThem = pc_get_theme($rows["theme"]); $pc = array("NAME" => html_format($rows["corpusname"]), "USER" => $rows["username"], "UID" => $rows["uid"], "DESC" => html_format($rows["description"]), "THEM" => $pcThem, "TIME" => $rows["createtime"], "TS_TIME" => $rows["ts_createtime"], "VISIT" => $rows["visitcount"], "CREATED" => $rows["createtime"], "MODIFY" => $rows["modifytime"], "NODES" => $rows["nodescount"], "NLIM" => $rows["nodelimit"], "DLIM" => $rows["dirlimit"], "STYLE" => pc_style_array($rows["style"]), "LOGO" => str_replace("<", "<", stripslashes($rows["logoimage"])), "BKIMG" => str_replace("<", "<", stripslashes($rows["backimage"])), "LINKS" => pc_get_links(stripslashes($rows["links"])), "EDITOR" => $rows["htmleditor"], "INDEX" => array("nodeNum" => $rows["indexnodes"], "nodeChars" => $rows["indexnodechars"]), "EMAIL" => htmlspecialchars(stripslashes($rows["useremail"])), "FAVMODE" => (int) $rows["favmode"], "UPDATE" => (int) $rows["updatetime"], "INFOR" => str_replace("<?", "<?", stripslashes($rows["userinfor"])), "TYPE" => $rows["pctype"], "DEFAULTTOPIC" => $rows["defaulttopic"], "FILELIMIT" => intval($rows["userfile"]), "FILENUMLIMIT" => intval($rows["filelimit"]), "ANONYCOMMENT" => defined("_BLOG_ANONY_COMMENT_") ? $rows["anonycomment"] : false); if ($pc["TYPE"] == 9) { if (!pc_is_manager($currentuser)) { return false; } } return $pc; } }