} } else { getHttp404($lnc[186]); } //Load plugins $section_body_main[0] = plugin_get('entrybegin') . $section_body_main[0]; $section_body_main[] = plugin_get('commentbegin'); if ($records[0]['replies'] != 0 || $records[0]['tbs'] != 0) { if ($mbcon['avatar'] == 1 || $mbcon['usergravatar'] == 1 || $mbcon['visitorgravatar'] == 1) { $replyarray = $m_b->getgroupbyquery("SELECT t1.*, t2.userid, t2.avatar FROM `{$db_prefix}replies` t1 LEFT JOIN `{$db_prefix}user` t2 ON t1.replierid=t2.userid WHERE t1.blogid='{$itemid}' AND (t1.reproperty<2 OR t1.reproperty=4) ORDER BY t1.reptime {$order} LIMIT {$start_id}, {$mbcon['replyperpage']}"); } else { $replyarray = $m_b->getgroupbyquery("SELECT * FROM `{$db_prefix}replies` WHERE blogid='{$itemid}' AND (reproperty<2 OR reproperty=4) ORDER BY reptime {$order} LIMIT {$start_id}, {$mbcon['replyperpage']}"); } if ($replyarray[0]['repid'] != '') { $section_body_main[] = $m_b->make_replies($replyarray); $outurl = getlink_entry($itemid, $records[0]['blogalias'], '%s', $part); $pageway = 1; $innerpages = $m_b->make_pagebar($page, $mbcon['pagebaritems'], $outurl, $records[0]['replies'] + $records[0]['tbs'], $mbcon['replyperpage'], $pageway); } else { checkPageValidity($page, 1); } } else { checkPageValidity($page, 1); } if ($records[0]['property'] != '1' && $permission['Reply'] == 1) { $form_reply = $m_b->make_visit_form($lnc[187], $records[0]['blogid'], "visit.php?job=addreply"); } $section_body_main[] = $t->set('endviewentry', array('form_reply' => $form_reply, 'innerpages' => $innerpages)); if (!$is_preview) { //Read counter $allreads = $_COOKIE['readentry'];
<tr><td colspan=6 height=20></td></tr> <tr class="adminoption"><td colspan=7>{$lna[249]}<input type=radio name='job' value='delreply'>{$lna[78]} <input type=radio name='job' value='{$address}'>{$titles} <input type=submit value="{$lna[64]}" class='formbutton'>{$censorclearall} </td></tr> </table> </form> eot; } if ($job == 'tb' || $job == 'tbcensor') { $start_id = ($page - 1) * $adminitemperpage; $tbproperty = $job == 'tb' ? 4 : 5; $tbactdel = $job == 'tb' ? 'deltb' : 'tbnopass'; $detail_array = $blog->getgroupbyquery("SELECT * FROM `{$db_prefix}replies` WHERE `reproperty`={$tbproperty} ORDER BY `reptime` DESC LIMIT {$start_id}, {$adminitemperpage}"); for ($i = 0; $i < count($detail_array); $i++) { $tmp_tm = gmdate('Y/m/d H:i', $detail_array[$i]['reptime'] + 3600 * $config['timezone']); $detail_array[$i]['repcontent'] = msubstr($detail_array[$i]['repcontent'], 0, 120); $tablebody .= "<tr class='visibleitem'><td align='center'><input type='checkbox' name='selid[]' id='selid[]' value='{$detail_array[$i]['repid']}-{$detail_array[$i]['blogid']}'></td><td><a href='{$detail_array[$i]['repurl']}' target='_blank' title='{$lna[358]}'>{$detail_array[$i]['replier']}</a><br>{$detail_array[$i]['repip']}</td><td>{$tmp_tm}</td><td align='left' width=50%><a href='" . getlink_entry($detail_array[$i]['blogid'], '') . "' target='_blank' title='{$lna[356]}'>{$detail_array[$i]['repcontent']}</a></td><td align='center'><a href='javascript: redirectcomfirm(\"admin.php?go=reply_{$tbactdel}_{$detail_array[$i]['repid']}-{$detail_array[$i]['blogid']}\");'><img src='admin/theme/{$themename}/del.gif' alt='{$lna[78]}' title='{$lna[78]}' border='0'></a></td>"; if ($job == 'tbcensor') { $tablebody .= "<td align='center'><a href='admin.php?go=reply_tbpass_{$detail_array[$i]['repid']}-{$detail_array[$i]['blogid']}'><img src='admin/theme/{$themename}/yes.gif' alt='{$lna[259]}' title='{$lna[259]}' border='0'></a></td>"; } $tablebody .= "</tr>"; } if ($job == 'tbcensor') { $censorplus1 = "<td width=35>{$lna[259]}</td>"; $censorplus2 = " <input type=radio name='job' value='tbpass'>{$lna[259]}"; $censorclearall = "<br><br>[<a href=\"javascript: redirectcomfirm('admin.php?go=reply_tbclearall');\">{$lna[1021]}</a>]"; $titlem = $lna[947]; $titler = $lna[948]; $actionurl = "admin.php?go=reply_tbcensor"; $countnum = $blog->countbyquery("SELECT COUNT(repid) FROM `{$db_prefix}replies` WHERE `reproperty`=5"); } else { $censorplus1 = $censorplus2 = '';
function rss_entry($entry) { global $mbcon, $adminlist, $userdetail, $config, $categories, $t, $admin_email, $lnc; if (!@is_a($t, 'template')) { $t = new template(); } $entrytitle = $entry['title']; $entrytitle = preg_replace("/&(.+?);/is", "", $entrytitle); $entrytime = gmdate('r', $entry['pubtime']); $entrytime = str_replace(' ', ' ', $entrytime); //PHP outputs two spaces between weekday and time $tmp = $entry['authorid']; $entryauthor = $adminlist[$tmp]; $entryemail = $admin_email[$tmp]; $tmp = $entry['category']; $entrycate = $categories[$tmp]['catename']; if ($entry['blogpsw']) { $entrycontent = $lnc[295]; } else { if ($entry['entrysummary']) { $entry['content'] = $entry['entrysummary']; $notfinish = 1; } else { $entry['content'] = @str_replace('[newpage]', '[separator]', $entry['content']); if ($mbcon['wholerss'] != 1 && strstr($entry['content'], '[separator]')) { @(list($entry['content']) = @explode('[separator]', $entry['content'])); $notfinish = 1; } else { $entry['content'] = @str_replace('[separator]', '', $entry['content']); } } $entrycontent = $this->getrsscontent($entry['content'], $entry['htmlstat'], $entry['ubbstat'], $entry['emotstat']); if ($notfinish == 1) { $entrycontent .= "<br/>............<br/>"; } } if ($entry['tags'] && $entry['tags'] != '>') { $entry['tags'] = trim($entry['tags'], '>'); $taginfo = @explode('>', $entry['tags']); foreach ($taginfo as $eachtag) { $eachtag_encoded = urlencode(urlencode($eachtag)); if ($mbcon['tagunderlinetospace'] == 1) { $eachtag = str_replace('_', ' ', $eachtag); } $urlref = getlink_tags($eachtag_encoded); $taginfos[] = "<a href=\"{$config['blogurl']}/{$urlref}\" rel=\"tag\">{$eachtag}</a>"; } $alltags = @implode(' , ', $taginfos); $tags = "<br/>Tags - " . $alltags; } else { $tags = ''; } $entrycontent .= $tags; $entryurl = "{$config['blogurl']}/" . getlink_entry($entry['blogid'], $entry['blogalias']); //Start Template $section = $t->set('rss', array('entrytitle' => $entrytitle, 'entrytime' => $entrytime, 'entryauthor' => $entryauthor, 'entrycontent' => $entrycontent, 'entryurl' => $entryurl, 'entrycate' => $entrycate, 'entryid' => $entry['blogid'], 'entryemail' => $entryemail)); return $section; }
function rss_replies($entry) { global $mbcon, $adminlist, $userdetail, $config, $categories, $t, $lnc; if (!@is_a($t, 'template')) { $t = new template(); } $entrytitle = '[' . $lnc[38] . '] ' . $entry['title']; $entrytitle = preg_replace("/&(.+?);/is", "", $entrytitle); $entrytime = gmdate('r', $entry['reptime']); $entrytime = str_replace(' ', ' ', $entrytime); //PHP outputs two spaces between weekday and time $entryauthor = $entry['replier']; $entryemail = strstr($entry['repemail'], '@') ? $entry['repemail'] : "*****@*****.**"; $entrycate = $lnc[38]; $entrycontent = $this->getrsscontent($entry['repcontent'], $entry['html'], $entry['ubb'], $entry['emot']); $entryurl = "{$config['blogurl']}/" . getlink_entry($entry['blogid'], $entry['blogalias']) . "#blogcomment{$entry['repid']}"; //Start Template $section = $t->set('rss', array('entrytitle' => $entrytitle, 'entrytime' => $entrytime, 'entryauthor' => $entryauthor, 'entrycontent' => $entrycontent, 'entryurl' => $entryurl, 'entrycate' => $entrycate, 'entryid' => 'reply' . $entry['repid'], 'entryemail' => $entryemail)); return $section; }
} $result = @implode(',', $tmp_results3); $start_id = ($page - 1) * $mbcon['listitemperpage']; $counter_now = substr_count($result, ',') + 1; $m_b = new getblogs(); $urlref = "visit.php?job=viewresult&sid={$sid}"; if ($searchmethod == 1 || $searchmethod == 2) { $records = $blog->getgroupbyquery("SELECT * FROM `{$db_prefix}blogs` WHERE `blogid` in ({$result}) ORDER BY `sticky` DESC LIMIT {$start_id},{$mbcon['listitemperpage']}"); $pagebar = $m_b->make_pagebar($page, $mbcon['pagebaritems'], $urlref, $counter_now, $mbcon['listitemperpage']); $listbody = $m_b->make_excerption($records, 'list'); $section_body_main[] = $m_b->make_list(@implode('', $listbody)); } if ($searchmethod == 3) { $records = $blog->getgroupbyquery("SELECT t1.*, t2.title, t2.blogalias FROM `{$db_prefix}replies` t1 INNER JOIN `{$db_prefix}blogs` t2 ON t2.blogid=t1.blogid WHERE t1.repid in ({$result}) ORDER BY t1.reptime DESC LIMIT {$start_id}, {$mbcon['listitemperpage']}"); for ($i = 0; $i < count($records); $i++) { $records[$i]['repcontent'] = "<strong>{$lnc[71]}</strong><a href=\"" . getlink_entry($records[$i]['blogid'], $records[$i]['blogalias']) . "\">{$records[$i]['title']}</a><br/><strong>{$lnc[76]}</strong>" . $records[$i]['repcontent']; } $section_body_main[] = $m_b->make_replies($records); $pagebar = $m_b->make_pagebar($page, $mbcon['pagebaritems'], $urlref, $counter_now, $mbcon['listitemperpage']); } if ($searchmethod == 4) { $records = $blog->getgroupbyquery("SELECT * FROM `{$db_prefix}messages` WHERE `repid` in ({$result}) ORDER BY `reptime` DESC LIMIT {$start_id}, {$mbcon['listitemperpage']}"); $section_body_main[] = $m_b->make_messages($records); $pagebar = $m_b->make_pagebar($page, $mbcon['pagebaritems'], $urlref, $counter_now, $mbcon['listitemperpage']); } if ($searchmethod == 5) { $alltags = $blog->getarraybyquery("SELECT * FROM `{$db_prefix}tags` WHERE `tagname` in ({$result})"); for ($i = 0; $i < count($alltags['tagname']); $i++) { $eachtag_encoded = urlencode(urlencode($alltags['tagname'][$i])); $urlref = getlink_tags($eachtag_encoded); if ($mbcon['tagunderlinetospace'] == 1) {
$m_b = new getblogs(); if (is_array($records)) { $section_body_main[] = $m_b->make_replies($records); $innerpages = $m_b->make_pagebar($page, $mbcon['pagebaritems'], "view.php?go=comment", $statistics['replies'], $mbcon['replyperpage']); } $iftoppage = $mbcon['pagebarposition'] == 'down' ? 'none' : 'block'; $ifbottompage = $mbcon['pagebarposition'] == 'up' ? 'none' : 'block'; announcebar(); $bodymenu = $t->set('mainpage', array('pagebar' => $innerpages, 'iftoppage' => $iftoppage, 'ifbottompage' => $ifbottompage, 'ifannouncement' => $ifannouncement, 'topannounce' => $topannounce, 'mainpart' => @implode('', $section_body_main), 'currentpage' => $pageitems['currentpage'], 'previouspageurl' => $pageitems['previouspageurl'], 'nextpageurl' => $pageitems['nextpageurl'], 'turningpages' => $pageitems['turningpages'], 'totalpages' => $pageitems['totalpages'], 'previouspageexists' => $pageitems['previouspageexists'], 'nextpageexists' => $pageitems['nextpageexists'])); $pagetitle = "{$lnc[196]} × "; } if ($job == 'tb') { $start_id = ($page - 1) * $mbcon['replyperpage']; $records = $blog->getgroupbyquery("SELECT t1.*, t2.title, t2.blogalias FROM `{$db_prefix}replies` t1 INNER JOIN `{$db_prefix}blogs` t2 ON t2.blogid=t1.blogid WHERE t1.reproperty='4' ORDER BY t1.reptime DESC LIMIT {$start_id}, {$mbcon['replyperpage']}"); for ($i = 0; $i < count($records); $i++) { $records[$i]['repemail'] = "{$lnc[197]} <a href=\"" . getlink_entry($records[$i]['blogid'], $records[$i]['blogalias']) . "\">{$records[$i]['title']}</a>"; } $m_b = new getblogs(); if (is_array($records)) { $section_body_main[] = $m_b->make_replies($records); $innerpages = $m_b->make_pagebar($page, $mbcon['pagebaritems'], "view.php?go=tb", $statistics['tb'], $mbcon['replyperpage']); } $iftoppage = $mbcon['pagebarposition'] == 'down' ? 'none' : 'block'; $ifbottompage = $mbcon['pagebarposition'] == 'up' ? 'none' : 'block'; announcebar(); $bodymenu = $t->set('mainpage', array('pagebar' => $innerpages, 'iftoppage' => $iftoppage, 'ifbottompage' => $ifbottompage, 'ifannouncement' => $ifannouncement, 'topannounce' => $topannounce, 'mainpart' => @implode('', $section_body_main), 'currentpage' => $pageitems['currentpage'], 'previouspageurl' => $pageitems['previouspageurl'], 'nextpageurl' => $pageitems['nextpageurl'], 'turningpages' => $pageitems['turningpages'], 'totalpages' => $pageitems['totalpages'], 'previouspageexists' => $pageitems['previouspageexists'], 'nextpageexists' => $pageitems['nextpageexists'])); $pagetitle = "{$lnc[198]} × "; } if ($job == 'userlist') { checkpermission('ViewUserList'); acceptrequest('usergroup,ordered');
} $replyarrayasigned = array('blogid' => $tmpsinglereplyarray[2], 'repcontent' => stripslashes($tmpsinglereplyarray[3]), 'replier' => $tmpsinglereplyarray[4], 'repid' => $tmpsinglereplyarray[5], 'title' => $tmpsinglereplyarray[6], 'blogalias' => $tmpsinglereplyarray[7]); if ($tmpsinglereplyarray[1] == 'limit') { $cache_replies_limit[] = $replyarrayasigned; } elseif ($tmpsinglereplyarray[1] == 'all') { $cache_replies_all[] = $replyarrayasigned; } } } $listrepliesitem = $permission['SeeHiddenReply'] == 1 ? $cache_replies_all : $cache_replies_limit; if ($listrepliesitem) { $replies_list = "<ul>"; for ($i = 0; $i < count($listrepliesitem); $i++) { $addintionalcssclass = $i % 2 == 0 ? 'rowcouple' : 'rowodd'; $listrepliesitems = $listrepliesitem[$i]; $replies_list .= "<li class='{$addintionalcssclass}'><a href=\"" . getlink_entry($listrepliesitems['blogid'], $listrepliesitems['blogalias']) . "#blogcomment{$listrepliesitems['repid']}\" title=\"[{$listrepliesitems['replier']}] - {$listrepliesitems['title']}\">{$listrepliesitems['repcontent']}</a></li>"; } $replies_list .= "</ul>"; } plugin_runphp('sidebarreplies'); $blogitem['replies'] += array('type' => 'block', 'name' => 'replies', 'title' => $lnc[114], 'content' => $replies_list, 'extend' => 1); } //[End]replies //[Start]calendar if (in_array('calendar', $allopenmods)) { if (file_exists("data/cache_currentmonthentries.php")) { include "data/cache_currentmonthentries.php"; } acceptrequest('cm,cy'); $cm = floor($cm); $cy = floor($cy);
<?php /* Sitemap generator for Bo-Blog 2.0.x Written by Bob Updated on 2006-11-26 */ //How many items are included? $entrynumber = 500; //No need to change anything below error_reporting(0); define("noCounter", 1); include_once "function.php"; $smentries = GetNewPosts($entrynumber, 'blogid,pubtime,edittime,blogalias'); $outputxml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n"; $outputxml .= "<url>\n<loc>{$config['blogurl']}/index.php</loc>\n<lastmod>" . gmdate("Y-m-d\\TH:i:s+00:00") . "</lastmod>\n<changefreq>always</changefreq>\n<priority>1.0</priority>\n</url>\n"; if (is_array($smentries)) { foreach ($smentries as $entry) { $entryurl = "{$config['blogurl']}/" . getlink_entry($entry['blogid'], $entry['blogalias']); $entrytime = $entry['edittime'] ? $entry['edittime'] : $entry['pubtime']; $entrytime = gmdate("Y-m-d\\TH:i:s+00:00", $entrytime); $outputxml .= "<url>\n<loc>{$entryurl}</loc>\n<lastmod>{$entrytime}</lastmod>\n<changefreq>always</changefreq>\n<priority>1.0</priority>\n</url>\n"; } } $outputxml .= "</urlset>"; @header("Content-Type: application/xml; charset=utf-8"); die($outputxml);
function get_entry_url($id, $blogalias) { //To be discard return getlink_entry($id, $blogalias); }
<?php //Some changes //Time format $timeformat = "<b>n</b> 月 <b>j</b> 日"; require "function.php"; $newvolume = $_GET['n']; $target = $_GET['target']; $category = $_GET['category']; $time = $_GET['time']; $targets = $target == '' ? '' : " target='{$target}'"; $number = $newvolume == '' ? 5 : floor($newvolume); $category = $category == '' ? '' : floor($category); $news = GetNewPosts($number, 'blogid,title,pubtime,blogalias', 0, $category); if (!is_array($news)) { exit; } else { foreach ($news as $entry) { $times = $time == 1 ? "" . gmdate($timeformat, $entry['pubtime'] + $config['timezone'] * 3600) . "" : ''; $show .= "<li><a href='{$config['blogurl']}/" . getlink_entry($entry['blogid'], $entry['blogalias']) . "'{$targets}><span class='blog-post-title'>{$entry['title']}</span> </a><span class='blog-post-date'> {$times}</span></li>"; } } @header("Content-Type: text/javascript; charset=utf-8"); die("document.write(\"<ul>{$show}</ul>\");");
if (!defined('VALIDREQUEST')) { die('Access Denied.'); } global $records, $blog, $db_prefix; if ($records[0]['tags'] && $records[0]['tags'] != '>') { $records[0]['tags'] = trim($records[0]['tags'], '>'); $taginfo = @explode('>', $records[0]['tags']); } $plugin_return = ''; if (is_array($taginfo)) { $tagforsearch = makeaquery($taginfo, "`tagname`='%s'", 'OR'); $allrelates = $blog->getarraybyquery("SELECT tagentry FROM `{$db_prefix}tags` WHERE {$tagforsearch}"); $alllse = @implode(',', $allrelates['tagentry']); $allsingle = array_unique(@explode(',', $alllse)); if (is_array($allsingle)) { $tagforsearch = makeaquery($allsingle, "`blogid`='%s'", 'OR'); $allrelates = $blog->getgroupbyquery("SELECT blogid,title,views,blogalias,pubtime,category FROM `{$db_prefix}blogs` WHERE ({$tagforsearch}) AND `property`<2 ORDER BY `pubtime`DESC LIMIT 0,{$relatednum}"); if (is_array($allrelates)) { foreach ($allrelates as $relateditem) { if ($relateditem['blogid'] == 0 || $relateditem['blogid'] == $records[0]['blogid']) { continue; } $times = $time == 1 ? "" . gmdate($timeformat, $relateditem['pubtime'] + $config['timezone'] * 3600) . "" : ''; $showrelate .= "<a href=\"" . getlink_entry($relateditem['blogid'], $relateditem['blogalias']) . "\" class=\"related-item\">{$relateditem['title']} <span class=\"related-date\"><i class=\"font-icon icon-time\"></i> {$times}</span></a><br/>"; } if ($showrelate) { $plugin_return = "\r\n<br/><br/>\r\n\r\n<div class='textbox-extra'>\n\t<div class='textbox-share'>\r\n\t\t<div class='textbox-extra-title'><i class=\"font-icon icon-asterisk blue\"></i> 分享博文</div>\n\t\t\n\t\t<hr>\n\t\t\n\t\t<div class='bdsharebuttonbox'>\n\t\t\t<a href='#' class='bds_more' data-cmd='more'></a><a href='#' class='bds_weixin' data-cmd='weixin' title='分享到微信'><i class=\"font-icon icon-qrcode blue\"></i> <span class='mobile-hide'>分享到</span>微信</a>\n\t\t\t<a href='#' class='bds_tsina' data-cmd='tsina' title='分享到新浪微博'><i class=\"font-icon icon-facebook blue\"></i> <span class='mobile-hide'>分享到</span>微博</a>\n\t\t\t<a href='#' class='bds_linkedin' data-cmd='linkedin' title='分享到 Linkedin'><i class=\"font-icon icon-linkedin blue\"></i> <span class='mobile-hide'>分享到 </span>Linkedin</a>\n\t\t</div>\n\t\t\n\t\t<script>window._bd_share_config={'common':{'bdSnsKey':{},'bdText':'','bdMini':'1','bdMiniList':false,'bdPic':'','bdStyle':'1','bdSize':'24'},'share':{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>\n\t\t\r\n\t</div>\r\n</div><br /><br />\n\n<div class='textbox-extra'>\n\t<div class='textbox-related'>\n\t<div class='textbox-extra-title'><i class=\"font-icon icon-asterisk blue\"></i> 相关博文</div>\n\t<hr>\n\t{$showrelate}</div>\n</div>\r\n\r\n\r\n\r\n\t<div class='clear'></div>\r\n"; } } } }