$saved = 1; } else { $savetext .= "\$config['{$key}']='" . admin_convert(stripslashes($val)) . "';\n"; } } if ($saved != 1) { $savetext .= "\$config['urlrewritemethod']='{$urlrewritesta}';\n"; } if (writetofile("data/config.php", $savetext)) { catchsuccess($lna[1094], "{$lna[39]}|admin.php"); } else { catcherror($lna[66] . "data/config.php"); } } if ($job == 'urlrewriteguide') { acceptrequest('servertype,serverroot'); $servertype = floor($servertype); $serverroot = safe_convert(stripslashes($serverroot)); if (!$servertype || !$serverroot) { if (strstr(PHP_OS, 'WIN')) { $IIScheck = 'checked'; } else { $Apachecheck = 'checked'; } $possibleroot = pathinfo($_SERVER['PHP_SELF']); $possibleroot = $possibleroot['dirname'] . '/'; $display_overall .= highlightadminitems('urlrewrite', 'misc'); $display_overall .= <<<eot <table class='tablewidth' align=center cellpadding=4 cellspacing=0> <tr> <td width=160 class="sectstart">
</td></tr> <tr class='sect'> <td colspan=2 align=center class="sectbar"> {$lna[211]} <!--<input type=radio name='opt' value='combine'>{$lna[212]}<input type=text size=6 name='newtagname'> --> <input type=radio name='opt' value='del'>{$lna[78]} <input type=radio name='opt' value='counttags'><acronym title="{$lna[1184]}">{$lna[1183]}</acronym></a> <input type=button value="{$lna[64]}" class='formbutton' onclick="adminSubmitAjax(1);"> </td></tr> </table> </form> eot; if ($ajax == 'on') { die($display_overall_plus); } else { $display_overall .= $display_overall_plus; } } if ($job == 'batchtags') { acceptrequest('selid,opt'); if (!is_array($selid)) { catcherror($lna[213]); } if ($opt == 'del') { for ($i = 0; $i < count($selid); $i++) { $blog->query("UPDATE `{$db_prefix}blogs` SET tags=replace(tags, '>{$selid[$i]}>', '>')"); $blog->query("DELETE FROM `{$db_prefix}tags` WHERE `tagname`='{$selid[$i]}'"); } } if ($opt == 'counttags') { $all_tagentries = $blog->getarraybyquery("SELECT `tags` FROM `{$db_prefix}blogs` WHERE tags<>'' AND tags<>'>'"); $all_tag_lists = @implode('', $all_tagentries['tags']); $all_tag_lists = @explode('>', $all_tag_lists); $counted_list = array_count_values($all_tag_lists); for ($i = 0; $i < count($selid); $i++) {
$siteid = time() . rand(0, 10); if (preg_search($sitename, $forbidden['banword']) || preg_search($siteintro, $forbidden['banword']) || preg_search($siteurl, $forbidden['banword']) || preg_search($sitename, $forbidden['suspect']) || preg_search($siteintro, $forbidden['suspect']) || preg_search($siteurl, $forbidden['suspect'])) { catcherror($lnc[214]); } $addline = "<?PHP exit();?><|>{$siteid}<|>{$sitename}<|>{$siteurl}<|>{$sitelogo}<|>{$siteintro}<|>\n"; $filename = "data/cache_applylinks.php"; $oldcontent = @readfromfile($filename); $content = $addline . $oldcontent; if (!writetofile($filename, $content)) { catcherror($lnc[7] . $filename); } else { catchsuccess($lnc[180], "{$lnc[163]}|index.php"); } } if ($job == 'ajaxverify') { acceptrequest('savecookie,securitycode'); $savecookie = floor($savecookie); if ($config['loginvalidation'] == 1) { if ($db_defaultsessdir != 1) { session_save_path("./{$db_tmpdir}"); } session_cache_limiter("private, must-revalidate"); session_start(); if ($securitycode == '' || strtolower($securitycode) != strtolower($_SESSION['code'])) { catcherror($lnc[165]); } } $password = md5($_POST['password']); $username = safe_convert(mystrtolower($_POST['username'])); $try = $blog->getbyquery("SELECT * FROM `{$db_prefix}user` WHERE LOWER(username)='{$username}' AND `userpsw`='{$password}'"); if (!is_array($try)) {
$tagshow = "{$lnc[189]}"; } $m_b = new getblogs(); $returnurl = "tag.php?page=%s"; $pagebar = $m_b->make_pagebar($page, $mbcon['pagebaritems'], $returnurl, $alltagcounter, $tagperpage, 1); $t = new template(); $section_tag = $t->set('taglist', array('tagcategory' => $lnc[190], 'tagcontent' => $tagshow, 'tagextra' => "<div align='right'>{$lnc[191]}</div>")); $section_body_main = $t->set('contentpage', array('title' => 'Tags', 'contentbody' => $section_tag)); announcebar(); $iftoppage = $mbcon['pagebarposition'] == 'down' ? 'none' : 'block'; $ifbottompage = $mbcon['pagebarposition'] == 'up' ? 'none' : 'block'; $bodymenu = $t->set('mainpage', array('pagebar' => $pagebar, 'iftoppage' => $iftoppage, 'ifbottompage' => $ifbottompage, 'ifannouncement' => $ifannouncement, 'topannounce' => $topannounce, 'mainpart' => $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 = "Tags - "; } if ($job == 'show') { acceptrequest('mode'); if ($mode == 1 || $mode == 2) { $mbcon['tag_list'] = $mode - 1; } else { $mode = $mbcon['tag_list'] + 1; } $m_b = new getblogs(); if ($tag === '') { catcherror($lnc[192]); } $tag = str_replace(''', "\\'", $tag); $allentries = $blog->getgroupbyquery("SELECT * FROM `{$db_prefix}tags` WHERE `tagname`='{$tag}' LIMIT 0,1"); if (!is_array($allentries[0]) || $allentries[0]['tagentry'] == '<end>' || $allentries[0]['tagcounter'] == 0) { $section_body_main[] = "<br/><div align='center'><span style='font-size: 14px;'>{$lnc[186]}</span></div><br/>"; } else { $taginfo = $allentries[0];
die('Access Denied.'); } include_once "data/cache_adminskinlist.php"; $csslocation = "admin/theme/{$currentadminskin}/common.css"; $fonticon = "admin/theme/{$currentadminskin}/font-icon.css"; $themename = $currentadminskin; $adminitemperpage = 35; if (file_exists("lang/{$langback}/tips.php")) { include_once "lang/{$langback}/tips.php"; } else { include_once "admin/tips.php"; } $trmd = rand(0, 9); $daytip = $showtips[$trmd]; if ($act == 'edit' || $act == 'page') { acceptrequest('useeditor'); $useeditor = basename($useeditor); if ($useeditor && file_exists("editor/{$useeditor}/editordef.php")) { require "editor/{$useeditor}/editordef.php"; } else { $useeditor = $mbcon['editortype']; require "editor/{$useeditor}/editordef.php"; } $adminclassshow['new'] = '_active'; } $adminclassshow[$act] = '_active'; $shutajax = $config['closeadminajax'] == '1' ? 1 : 0; $messageblock = $flset['guestbook'] != 1 ? "<span class=\"ahb{$adminclassshow['message']}\"><li onmouseover=\"adminitemhover('message',this)\"><a href=\"admin.php?act=message\">{$lna[7]}</a></li></span>" : ''; $display_overall .= <<<eot <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="UTF-8">
</td></tr> <tr><td class="hiddenitem"> <b>{$lna[830]}</b> </td></tr> <tr><td class="visibleitem"> <ul><li><font color=red>{$lna[892]}</font></li><li>{$lna[831]}</li><li>{$lna[833]}</li></ul> </td></tr> </table> <br><br> <div align=center><input type=submit value="{$lna[64]}" class='formbutton'> <input type=reset value="{$lna[65]}" class='formbutton'></div> eot; } if ($job == 'doimport') { acceptrequest('imtype,impause,srcindex,targetcate,nonstop', 1, 'post'); if ($imtype == 'xml') { if (!file_exists("bak/{$srcindex}")) { catcherror($lna[856]); } else { $tmp = readfromfile("bak/{$srcindex}"); if (strstr($tmp, ".gz") && !function_exists('gzopen')) { catcherror($lna[857]); } } $display_overall .= highlightadminitems('import', 'carecenter'); $display_overall .= <<<eot <script type="text/javascript"> var dateObjexp= new Date(); dateObjexp.setSeconds(7200); setCookie ('endnumber', '0', dateObjexp, null, null, false);
<?php /* ----------------------------------------------------- Bo-Blog 2 : The Blog Reloaded. <<A Bluview Technology Product>> 禁止使用Windows记事本修改文件,由此造成的一切使用不正常恕不解答! PHP+MySQL blog system. Code: Bob Shen Offical site: http://www.bo-blog.com Copyright (c) Bob Shen 中国-上海 In memory of my university life ------------------------------------------------------- */ if (!defined('VALIDREQUEST')) { die('Access Denied.'); } acceptrequest('pageid,pagealias'); $itemid = $pagealias ? safe_convert($pagealias) : floor($pageid); $m_b = new getblogs(); $records = $pagealias ? $m_b->getgroupbyquery("SELECT * FROM `{$db_prefix}pages` WHERE `pagealias`='{$itemid}'") : $m_b->getgroupbyquery("SELECT * FROM `{$db_prefix}pages` WHERE `pageid`='{$itemid}'"); if (is_array($records)) { $section_body_main = $m_b->output_page($records[0]); } else { catcherror($lnc[186]); } //Load plugins $section_body_main[0] = plugin_get('custompagebegin') . $section_body_main[0]; $section_body_main[] = plugin_get('custompageend'); $plugin_closesidebar = $records[0]['closesidebar'] == 1 ? 0 : 1; if ($plugin_closesidebar == 1) { $elements['mainpage'] = str_replace("class=\"content\"", "class=\"content-wide\"", $elements['mainpage']); }
$partialquery = "SELECT * FROM `{$db_prefix}blogs` WHERE `blogid`='{$blogid}' AND `property`<'3' LIMIT 1"; } $m_b = new getblogs(); $records = $m_b->getbyquery($partialquery); if (!is_array($records) || $records['blogid'] != $blogid) { catcherror($lnc[211]); } if ($blogpsw != $records['blogpsw']) { catcherror($lnc[297]); } $return_main = $m_b->make_viewentry($records, $way, true); setcookie("entrypassword{$blogid}", $blogpsw); catchsuccess($return_main); } if ($job == 'getreplyonly') { acceptrequest('repid,reppsw,way,onetimecounter'); $repid = floor($repid); $reppsw = md5($reppsw); $tablename = $way == 'reply' ? 'replies' : 'messages'; $partialquery = "SELECT * FROM `{$db_prefix}{$tablename}` WHERE `repid`='{$repid}' LIMIT 1"; $m_b = new getblogs(); $records = $m_b->getbyquery($partialquery); if (!is_array($records) || $records['repid'] != $repid) { catcherror($lnc[305]); } if ($reppsw != $records['reppsw']) { catcherror($lnc[297]); } $records['reppsw'] = ''; $records['reproperty'] = '0'; if ($way == 'reply') {
$newcontent = "<?PHP\n\$langfront=\"{$newlangf}\";\n\$langback=\"{$newlangb}\";\n@include_once (\"lang/{$newlangf}/common.php\");"; writetofile("data/language.php", $newcontent); catchsuccess("Language set has been changed. 语言包设置完成。 語言包設置完成。"); } if ($job == 'refreshadminskinlist' || $job == 'selectadminskin') { $handle = opendir("admin/theme/"); if (!$handle) { catcherror("{$lna[155]} admin/theme/ {$lna[156]}<ul><li>{$lna[157]}</li><li>{$lna[158]}</li><li>{$lna[159]}</li></ul>"); } while (false !== ($file = readdir($handle))) { if ($file != "." && $file != ".." && is_dir("admin/theme/{$file}")) { $out .= "\$adminskin[]='{$file}';\n"; } } if ($job == 'selectadminskin') { acceptrequest('targetskin'); $targetskin = basename($targetskin); if ($targetskin) { $currentadminskin = $targetskin; } } $sleout = "<?PHP\n" . $out . "\$currentadminskin='{$currentadminskin}';"; writetofile("data/cache_adminskinlist.php", $sleout); header("Location: admin.php"); } if ($job == 'funclock') { if (sizeof($flset) < 1) { $flset = array('tags' => 0, 'weather' => 0, 'avatar' => 0, 'star' => 0, 'guestbook' => 0, 'modeselectable' => 0); } $uidesc = array('tags' => $lnc[288], 'weather' => $lna[301], 'avatar' => $lna[881], 'star' => $lnc[93], 'guestbook' => $lnc[91], 'modeselectable' => "{$lnc[183]}/{$lnc[185]}"); $pref_leftchar = "200";
<input type=hidden name=newldescs id=newldescs> <div align=center><br><input type=button value="{$lna[64]}" class='formbutton' onclick="saveldata();"> <input type=button onclick='addneweditline();' value="{$lna[1150]}" class='formbutton'> <input type=button onclick='sresetldata();' value="{$lna[65]}" class='formbutton'></div> </form> <br><br><br> <table class='tablewidth' align=center cellpadding=4 cellspacing=0> <tr><td> <b>{$lna[1106]}</b> <div style="width:100%; border: 1px solid #ccc; height: 210px; overflow: auto;">{$langstext}</div> <br><br> {$lna[1107]} </td></tr></table> eot; } if ($job == 'savelangspec') { acceptrequest('newlnums,newldescs'); if ($newlnums == '' || $newldescs == '') { catcherror($lna[241]); } $savelnum = @explode(',', $newlnums); $saveldesc = @explode(',', $newldescs); $savedata = $savedata2 = "<?php\n"; for ($i = 0; $i < count($savelnum); $i++) { if ($savelnum[$i] == '') { continue; } $savedata .= "\$lnc[{$savelnum[$i]}]='" . admin_convert($saveldesc[$i]) . "';\n"; $savedata2 .= "\$lncoverwrite[{$savelnum[$i]}]='" . admin_convert($saveldesc[$i]) . "';\n"; } if (!writetofile("data/langspec.php", $savedata)) { catcherror($lna[66] . "data/langspec.php");
/* ----------------------------------------------------- Bo-Blog 2 : The Blog Reloaded. <<A Bluview Technology Product>> 禁止使用Windows记事本修改文件,由此造成的一切使用不正常恕不解答! PHP+MySQL blog system. Code: Bob Shen Offical site: http://www.bo-blog.com Copyright (c) Bob Shen 中国-上海 In memory of my university life ------------------------------------------------------- */ define("noCounter", 1); require_once "global.php"; include_once "data/mod_config.php"; include_once "data/cache_adminlist.php"; acceptrequest('go'); if ($config['blogopen'] != 1 && $act != 'login') { exit; } if ($go) { @(list($job, $itemid) = @explode('_', basename($go))); } if (!$job) { $job = 'main'; } else { $job = basename($job); } $itemid = floor($itemid); $seed = 0; //Begin get email address $admin_ids = @implode(',', array_keys($adminlist));
define("ADMIN_LOGIN", 1); $m_b = new getblogs(); $ajaxresult = $m_b->single_message($thiscommentwithreply[0]); catchsuccess($ajaxresult); } } else { checkpermission('CP'); confirmpsw(); //Re-check password } if ($job == 'deladminreply') { $blog->query("UPDATE `{$db_prefix}messages` SET `adminrepcontent`='', `adminreplier`='', `adminrepid`='0',`adminreptime`='0', `adminrepeditorid`='0', `adminrepeditor`='', `adminrepedittime`='0' WHERE `repid`='{$repid}'"); catchsuccess($finishok2, array($backtoprevious, $backtoindex, $backtodefault)); } if ($job == 'delreply') { acceptrequest('returnurl'); if (!$returnurl) { $returnurl = "admin.php?go=message_default"; } if (!is_array($repid)) { $tmp_array[0] = $repid; $repid = $tmp_array; } for ($i = 0; $i < count($repid); $i++) { $delrange[] = "`repid`='{$repid[$i]}'"; } $querydel = @implode(' OR ', $delrange); if (count($repid) > 0) { $blog->query("DELETE FROM `{$db_prefix}messages` WHERE {$querydel}"); $countreps = $blog->countbyquery("SELECT COUNT(repid) FROM `{$db_prefix}messages` WHERE `reproperty`<>2"); $blog->query("UPDATE `{$db_prefix}counter` SET `messages`='{$countreps}'");
<?php /* ----------------------------------------------------- Bo-Blog 2 : The Blog Reloaded. <<A Bluview Technology Product>> 禁止使用Windows记事本修改文件,由此造成的一切使用不正常恕不解答! PHP+MySQL blog system. Code: Bob Shen Offical site: http://www.bo-blog.com Copyright (c) Bob Shen 中国-上海 In memory of my university life ------------------------------------------------------- */ if (!defined('VALIDADMIN')) { die('Access Denied.'); } acceptrequest('blogid,ajax'); checkpermission('CP'); if ($ajax == 'on') { $in_ajax_mode = 1; } checkpermission('AddEntry'); if ($ajax == 'on' && $cancel != '') { die($cancel); } $blogid = floor($blogid); $blog->query("UPDATE `{$db_prefix}blogs` SET `starred`=`starred`+1 WHERE `blogid`='{$blogid}'"); if ($ajax != 'on') { $urlreturn = $_SERVER['HTTP_REFERER'] == '' ? "index.php" : $_SERVER['HTTP_REFERER']; header("Location: {$urlreturn}"); } else { die('ok');
------------------------------------------------------- */ define('isIndex', 1); $begintime = getmicrotime(); $blogplugin = $section_header = $section_footer = $section_sidebar = $section_prebody = $dlstat = $blogitem = array(); require_once "global.php"; include_once "data/allmods.php"; include_once "data/weather.php"; include_once "data/cache_emot.php"; include_once "data/cache_emsel.php"; include_once "data/cache_adminlist.php"; $isSafeMode = $_REQUEST['safemode'] == 1 || $_COOKIE['safemode'] == 1 ? true : false; if (!$isSafeMode) { include_once "data/modules.php"; include_once "data/plugin_enabled.php"; } acceptrequest('act,go,page,part'); if (!isset($page) || !is_numeric($page) || $page <= 0) { $page = 1; } else { $page = floor($page); } $part = floor($part); if (empty($part)) { $part = 1; } $pageitems = ''; if ($config['blogopen'] != 1 && !defined('isLogin')) { if ($permission['CP'] == 1) { $config['message_off'] .= "<br/><ul><li><a href='admin.php'>{$lnc[107]}</a></li></ul>"; } catcherror($config['message_off']);
<hr> {$ruletemplate} <hr> </div> <br> <div align=center><input type='button' value="{$lna[64]}" class='formbutton' onclick="adminSubmitAjax(1);"> <input type=reset value="{$lna[65]}" class='formbutton'></div> </td></tr></table></form> eot; if ($ajax == 'on') { die($display_overall_plus); } else { $display_overall .= $display_overall_plus; } } if ($job == 'urlrewritesave') { acceptrequest('urlrewritesta'); $urlrewritesta = floor($urlrewritesta); $savetext = "<?PHP\n\$db_server='{$db_server}';\n\$db_username='******';\n\$db_password='******';\n\$db_name='{$db_name}';\n\$db_prefix='{$db_prefix}';\n\$db_410='{$db_410}';\n\$db_tmpdir='{$db_tmpdir}';\n\$db_defaultsessdir='{$db_defaultsessdir}';\n"; while (@(list($key, $val) = @each($config))) { if ($key == 'urlrewritemethod') { $savetext .= "\$config['{$key}']='{$urlrewritesta}';\n"; $saved = 1; } else { $savetext .= "\$config['{$key}']='" . admin_convert(stripslashes($val)) . "';\n"; } } if ($saved != 1) { $savetext .= "\$config['urlrewritemethod']='{$urlrewritesta}';\n"; } if (writetofile("data/config.php", $savetext)) { if ($ajax == 'on') {
catchsuccess($finishok2, array($backtouseradmin, $backtoaddnew)); } if ($job == 'deluser') { if ($itemid === '') { catcherror($lna[474]); } $try = $blog->getbyquery("SELECT userid FROM `{$db_prefix}user` WHERE`userid`='{$itemid}'"); if (!$try) { catcherror($lna[474]); } $blog->query("DELETE FROM `{$db_prefix}user` WHERE `userid`='{$itemid}'"); $blog->query("UPDATE `{$db_prefix}counter` SET `users`=`users`-1"); catchsuccess($finishok2, array($backtouseradmin, $backtoaddnew)); } if ($job == 'batchusers') { acceptrequest('opt,selid,tousergroup'); if (!is_array($selid)) { $cancel = $lna[498]; } if (!$opt) { $cancel = $lna[499]; } catcherror($cancel); $dels = @implode(',', $selid); if ($opt == 'del') { $blog->query("DELETE \tFROM `{$db_prefix}user` WHERE `userid` IN ({$dels})"); $delednum = db_affected_rows(); $blog->query("UPDATE `{$db_prefix}counter` SET `users`=`users`-{$delednum}"); } elseif ($opt == 'newusergroup') { $blog->query("UPDATE `{$db_prefix}user` SET `usergroup`='{$tousergroup}' WHERE `userid` IN ({$dels})"); }
if (strstr($wlink[$i], "<|>{$itemid}<|>")) { $wlink[$i] = ''; break; } } $allnow = @implode('', $wlink); if ($allnow == '') { @unlink($filename); } else { writetofile($filename, $allnow); } } catchsuccess($finishok, $backtopending); } if ($job == "batchpending") { acceptrequest('selid,opt,newlinkgptoid,newlinkgptoid2'); if ($opt == 'textonly') { $newlinkgptoid = $newlinkgptoid2; } if (!is_array($selid)) { $cancel = $lna[263]; } catcherror($cancel); $filename = "data/cache_applylinks.php"; $wlink = @file($filename); if ($opt == 'del') { for ($i = 0; $i < count($wlink); $i++) { $link = @explode('<|>', $wlink[$i]); if (@in_array($link[1], $selid)) { $wlink[$i] = ''; }
</form> </table> eot; } if ($job == 'batchtags') { acceptrequest('selid,opt'); if (!is_array($selid)) { catcherror($lna[213]); } if ($opt == 'del') { for ($i = 0; $i < count($selid); $i++) { $blog->query("UPDATE `{$db_prefix}blogs` SET tags=replace(tags, '>{$selid[$i]}>', '>')"); $blog->query("DELETE FROM `{$db_prefix}tags` WHERE `tagname`='{$selid[$i]}'"); } } recache_taglist(); catchsuccess($finishok2, $backtotag); } if ($job == 'counttags') { acceptrequest('tagname'); if (!$tagname) { catcherror($lna[213]); } $all_tagentries = $blog->getarraybyquery("SELECT `tags` FROM `{$db_prefix}blogs` WHERE tags<>'' AND tags<>'>'"); $all_tag_lists = @implode('', $all_tagentries['tags']); $all_tag_lists = @explode('>', $all_tag_lists); $counted_list = array_count_values($all_tag_lists); $to_update_value = floor($counted_list[$tagname]); $blog->query("UPDATE `{$db_prefix}tags` SET tagcounter='{$to_update_value}' WHERE `tagname`='{$tagname}'"); catchsuccess($finishok2, $backtotag); }
$comefrom = $originsrc = ''; } if ($tags) { $tags_array = @explode(' ', mystrtolower(trim($tags))); $tags_array_all = array_unique($tags_array); $tags = @implode(' ', $tags_array_all); $tags = safe_convert($tags); $tags = str_replace(' ', '', $tags); $tags_array = @explode(' ', $tags); $tags = '>' . str_replace(' ', '>', $tags) . '>'; } else { $tags = ''; } $currentuserid = $userdetail['userid']; if ($changemytime == 1) { acceptrequest('newyear,newmonth,newday,newhour,newmin,newsec'); $finaltime = gmmktime($newhour, $newmin, $newsec, $newmonth, $newday, $newyear) - $config['timezone'] * 3600; } else { $finaltime = time(); } $records = array(); $records[0] = array('blogid' => $blogid, 'title' => $title, 'pubtime' => $finaltime, 'authorid' => $currentuserid, 'replies' => 0, 'tbs' => 0, 'views' => 0, 'property' => $property, 'category' => $category, 'tags' => $tags, 'sticky' => $sticky, 'htmlstat' => $htmlstat, 'ubbstat' => $ubbstat, 'emotstat' => $emotstat, 'content' => $content, 'editorid' => 0, 'edittime' => 0, 'weather' => $sweather, 'mobile' => 0, 'pinged' => $pinged, 'permitgp' => '', 'starred' => $starred, 'blogpsw' => $blogpsw, 'frontpage' => $frontpage, 'entrysummary' => $entrysummary, 'comefrom' => $comefrom, 'originsrc' => $originsrc, 'blogalias' => $blogalias); } else { $order = $mbcon['replyorder'] == '0' ? "DESC" : "ASC"; $start_id = ($page - 1) * $mbcon['replyperpage']; $querycondition = $use_blogalias ? "`blogalias`='{$blogaliasp}'" : "`blogid`='{$itemid}'"; if ($permission['SeeHiddenEntry'] != 1) { $partialquery = "SELECT * FROM `{$db_prefix}blogs` WHERE {$querycondition} AND `property`<'2' LIMIT 0, 1"; $partialquery2 = "WHERE `property`<'2'"; } else { $partialquery = "SELECT * FROM `{$db_prefix}blogs` WHERE {$querycondition} AND `property`<'3' LIMIT 0, 1";
$showysel .= "<option value={$y}>{$y}</option>\n"; } foreach ($formonths as $m) { $showmsel .= "<option value={$m}>{$m}</option>\n"; } $showysel .= "</select>\n"; $showmsel .= "</select>\n"; $pagebar = gen_page($page, 5, "admin.php?go=upload_filedir&useeditor={$useeditor}&uploadyear={$uploadyear}&uploadmonth={$uploadmonth}", $numenries, 51); $message = "<form action='admin.php?go=upload_filedir&useeditor={$useeditor}' method=post><div align=left style=\"margin-left: 15px;\">{$showysel} / {$showmsel} <input type=submit value='{$lna[244]}'> {$pagebar}</div></form><div align=left style=\"margin-left: 15px;\"><b>{$lna[425]}</b> <input type='checkbox' id='ifautoaddubb' checked='checked'>{$lna[426]}</div><div id='uploadrow'><ul>" . @implode("\n", $inserttext) . "</ul></div>"; print_upload($message, "normal", "highlight", "normal"); } if ($job == "gallery") { $all_images = array('.gif', '.jpg', '.png', '.bmp', '.jpeg'); $constr = makeaquery($all_images, "`originalname` LIKE '%%s%'", 'OR'); $start_id = ($page - 1) * 51; acceptrequest('uploadmonth,uploadyear'); $queryplus = $showysel = $showmsel = ''; if (!empty($uploadyear) && empty($uploadmonth)) { $starttimestamp = mktime(0, 0, 0, 1, 1, $uploadyear); $finishtimestamp = mktime(23, 59, 59, 12, 31, $uploadyear); $queryplus = "AND `uploadtime`>={$starttimestamp} AND `uploadtime`<={$finishtimestamp} "; } if (!empty($uploadmonth) && !empty($uploadyear)) { $starttimestamp = mktime(0, 0, 0, $uploadmonth, 1, $uploadyear); $finishtimestamp = mktime(23, 59, 59, $uploadmonth + 1, 0, $uploadyear); $queryplus = "AND `uploadtime`>={$starttimestamp} AND `uploadtime`<={$finishtimestamp} "; } $detail_array = $blog->getgroupbyquery("SELECT * FROM `{$db_prefix}upload` WHERE {$constr} {$queryplus} ORDER BY `uploadtime` DESC LIMIT {$start_id}, 51"); $numenries = $blog->countbyquery("SELECT COUNT(*) FROM `{$db_prefix}upload` WHERE {$constr} {$queryplus}"); $inserttext = array(); for ($i = 0; $i < count($detail_array); $i++) {
} else { $excerpt = tb_no_quote($content); } $ping_show = @explode(' ', $pinged); for ($i = 0; $i < count($ping_show); $i++) { $ping_urls .= "<input type='hidden' name='pingurl[]' value='{$ping_show[$i]}'>"; } $ping_url_show = @implode('<br>', $ping_show); $form = "<div align=center><form action='admin.php?go=edit_sendtb' method='post'><input type='hidden' name='title' value=\"{$title}\"><input type='hidden' name='excerpt' value=\"{$excerpt}\"><input type='hidden' name='blog_name' value=\"{$config['blogname']}\"><input type='hidden' name='url' value='{$config['blogurl']}/" . get_entry_url($currentid, $blogalias) . "'>{$ping_urls}<input type='submit' value='{$lna[310]}' class='formbutton'> <input type='button' value='{$lna[311]}' onclick='window.location=(\"" . get_entry_url($currentid, $blogalias) . "\");' class='formbutton'></form></div>"; $t = new template(); $t->showtips($lna[312], $lna[313] . $ping_url_show . "<br><br>{$lna[314]}<br><br>" . $form, "{$backtowhere}|" . get_entry_url($currentid, $blogalias)); } } if ($job == 'sendtb') { checkpermission('EditEntry'); acceptrequest('title,excerpt,url,blog_name,pingurl'); if (!is_array($pingurl)) { catcherror($lna[315]); } plugin_runphp('trackbacksending'); @header("Content-Type: text/html; charset=utf-8"); $url = str_replace('{host}', $_SERVER['HTTP_HOST'], $url); foreach ($pingurl as $durl) { $result = sendping($durl, $title, $excerpt, $url, $blog_name); if (!$result) { $showp .= "<b>{$lna[316]}</b>{$durl} ; <b>{$lna[317]}</b>{$lna[318]}"; } elseif ($result == 'ok') { $showp .= "<b>{$lna[316]}</b>{$durl} ; <b>{$lna[317]}</b>{$lna[319]}<br>"; } elseif ($result == 'unknown') { $showp .= "<b>{$lna[316]}</b>{$durl} ; <b>{$lna[317]}</b>{$lna[949]}<br>"; } else {
$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); $cm = $cm <= 0 || $cm > 12 ? $nowtime['month'] : $cm; $cy = $cy <= 1970 || $cy > 2100 ? $nowtime['year'] : $cy; $month_calendar = array(); if ($cy == $nowtime['year'] && $cm == $nowtime['month']) { $cal_body = @readfromfile("data/cache_currentmonth.php"); if (!strstr($cal_body, "<span class=\"calendar-month\">{$cm}</span>")) { //Cache auto refresh once a month define('REPLYSPECIAL', 1); include_once "admin/cache_func.php"; recache_currentmonthentries(); $cal_body = @readfromfile("data/cache_currentmonth.php"); } $currentdate = gmdate('j', $nowtime['timestamp'] + 3600 * $config['timezone']);
$backtocensor = "{$lna[24]}|admin.php?go=reply_censor"; acceptrequest('job,selid'); if ($selid) { $repid = $selid; } else { $repid = $itemid; } if (empty($job)) { $job = 'default'; } if ($job == 'addadminreply' || $job == 'editadminreply') { if ($permission['ReplyReply'] != 1) { $cancel = $lna[345]; } catcherror($cancel); acceptrequest('adminreplycontent'); $adminreplycontent = trimplus($adminreplycontent); if ($adminreplycontent == '') { catcherror($lna[346]); } $adminreplycontent = safe_convert($adminreplycontent); $currenttime = time(); if ($logstat == 0) { $userdetail['username'] = $lna[901]; } if ($job == 'editadminreply') { $queryplus = "`adminrepeditorid`='{$userdetail['userid']}', `adminrepeditor`='{$userdetail['username']}', `adminrepedittime`='{$currenttime}'"; } else { $queryplus = "`adminreplier`='{$userdetail['username']}', `adminrepid`='{$userdetail['userid']}',`adminreptime`='{$currenttime}'"; } $blog->query("UPDATE `{$db_prefix}replies` SET `adminrepcontent`='{$adminreplycontent}' , {$queryplus} WHERE `repid`='{$repid}'");
PHP+MySQL blog system. Code: Bob Shen Offical site: http://www.bo-blog.com Copyright (c) Bob Shen 中国-上海 In memory of my university life ------------------------------------------------------- */ define('VALIDADMIN', 1); define("noCounter", 1); require_once "global.php"; include_once "lang/{$langback}/backend.php"; include_once "data/allmods.php"; include "data/cache_usergroup.php"; require_once "admin/cache_func.php"; $blogplugin = $plugin_onload = $plugin_header = null; include_once "data/plugin_enabled.php"; acceptrequest('act,go,page'); if (!isset($page) || !is_numeric($page) || $page <= 0) { $page = 1; } else { $page = floor($page); } if ($go) { @(list($act, $job, $itemid) = @explode('_', basename($go))); } if (!$act) { $act = 'main'; } else { $act = basename($act); } if ($act == 'upload') { include "admin/cp_upload.php";
<?php if (!defined('VALIDADMIN')) { die('Access Denied.'); } checkpermission('CP'); $backtoplugin = "{$lna[28]}|admin.php?go=addon_plugin"; $backtolightconfig = "dp.SyntaxHighlighter For UBB|admin.php?act={$act}"; acceptrequest('configjob'); if ($configjob == 'save') { $savetext = "<?PHP\n"; $save_config = $_POST['prefconfig']; if (count($save_config) <= 1) { catcherror($lna[1013]); } while (@(list($key, $val) = @each($save_config))) { $savetext .= "\$dp_config['{$key}']='" . admin_convert($val) . "';\n"; } if ($savetext == '') { catcherror($lna[1013]); } if (!writetofile("plugin/{$act}/config.php", $savetext)) { catcherror("{$lna[66]}" . "plugin/{$act}/config.php"); } else { catchsuccess($lanic[$select_include_n] . $lanic[9], array($backtoplugin, $backtolightconfig)); } } $pref_leftchar = "200"; $pref_variable = "dp_config"; include "plugin/{$act}/config.php"; addpref("r", "Cpp|C|{$lna[511]}|{$lna[512]}");
if ($job == 'openidaddreply' || $job == 'openidaddmessage') { if ($mbcon['enableopenid'] != '1') { catcherror($lnc[315] . $lnc[319]); } $lastpost = $_COOKIE['lastpost']; if ($nowtime['timestamp'] - $lastpost < $permission['MinPostInterval']) { catcherror($lnc[210]); } $findintable = $job == 'openidaddreply' ? 'replies' : 'messages'; $findreplies = $blog->getbyquery("SELECT * FROM `{$db_prefix}{$findintable}` WHERE `repip`='{$userdetail['ip']}' ORDER BY `reptime` DESC LIMIT 1"); if ($findreplies['repip'] == $userdetail['ip']) { if ($nowtime['timestamp'] - $findreplies['reptime'] < $permission['MinPostInterval']) { catcherror($lnc[210]); } } acceptrequest('openid_url,stat_html,stat_ubb,stat_emot,stat_property,v_content,v_id,v_security,onetimecounter'); if (!$openid_url) { catcherror($lnc[212]); } $v_id = intval(trimplus($v_id)); if ($job == 'openidaddreply') { checkpermission('Reply'); if ($permission['SeeHiddenEntry'] != 1) { $limitmore = "AND `property`<>2"; } $originblog = $blog->getbyquery("SELECT * FROM `{$db_prefix}blogs` WHERE `blogid`='{$v_id}' AND `property`<>1 AND `property`<>3 {$limitmore}"); if ($originblog['blogid'] != $v_id) { $cancel = $lnc[211]; } else { $allowedgp = @explode('|', $originblog['permitgp']); if ($originblog['permitgp'] != '' && !@in_array($userdetail['usergroup'], $allowedgp)) {
</table> </td> </tr> <tr> <td colspan=4 align=center class="sectbar"> <input type=button value="{$lna[64]}" onclick="chktitle();" class="formbutton"> <input type=reset value="{$lna[65]}" class="formbutton"> </td></tr> </table> <div style='visibility: hidden'><input type=submit value="{$lna[64]}" id='realsubmit' class='formbutton'></div> </form> eot; } if ($job == 'store' || $job == 'restore') { acceptrequest('pagetitle,closesidebar,html,ubb,emot,useeditor,pagealias,addshortcut,shortcuttarget,shortcutname', 0, 'post'); //Get content $content = $_POST['content']; //If magic quotes is on, strip the slashes automatically added if ($mqgpc_status == 1) { $content = stripslashes($content); } if ($pagetitle == '' || $content == '') { $cancel = $lna[307]; } catcherror($cancel); $closesidebar = @floor($closesidebar); $htmlstat = @floor($html); $ubbstat = @floor($ubb); $emotstat = @floor($emot); $pageid = @floor($id);
$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'); include_once "data/cache_usergroup.php"; $queryplus = $usergroup === "" ? '' : "WHERE `usergroup`='{$usergroup}'"; if ($ordered !== '') { $allorder = array('`username` ASC', '`username` ASC', '`username` DESC', '`regtime` DESC', '`regtime` ASC'); $ordernow = $allorder[$ordered]; } else { $ordernow = '`username` ASC'; } $start_id = ($page - 1) * $mbcon['listitemperpage']; $detail_array = $blog->getgroupbyquery("SELECT * FROM `{$db_prefix}user` {$queryplus} ORDER BY {$ordernow} LIMIT {$start_id}, {$mbcon['listitemperpage']}"); for ($i = 0; $i < count($detail_array); $i++) { $tmp_gp = $detail_array[$i]['usergroup']; $tmp_sgp = $usergp[$tmp_gp]; $tmp_tm = zhgmdate("{$mbcon['timeformat']} H:i", $detail_array[$i]['regtime'] + 3600 * $config['timezone']); $tablebody .= "<tr><td width='42%' class=\"listbox-entry\">{$detail_array[$i]['username']}</td><td width='10%' align='center' class=\"listbox-entry\">{$tmp_sgp}</td><td width='40%' align='center' class=\"listbox-entry\">{$tmp_tm}</td><td width='5%' align='center' class=\"listbox-entry\"><a href=\"" . getlink_user($detail_array[$i]['userid']) . "\"><img src='{$mbcon['images']}/detail.gif' alt='{$lnc[194]}' title='{$lnc[194]}' border='0'></a></td></tr>\n";
{$tablebody} <tr><td colspan=3><a href="#unexist" onclick="checkallbox('f_s', 'checked');">{$lna[247]}</a> | <a href="#unexist" onclick="checkallbox('f_s', '');">{$lna[248]}</a></td><td colspan=4 align=right>{$pagebar}</td></tr> <tr><td colspan=7 height=20></td></tr> <tr class="adminoption"><td colspan=7>{$lna[249]} <input type=radio name=opt value='del'>{$lna[78]} <input type=button value="{$lna[64]}" class='formbutton' onclick="adminSubmitAjax('f_s');"> </td></tr> </table> </form> eot; if ($ajax == 'on') { die($display_overall_plus); } else { $display_overall .= $display_overall_plus; } } if ($job == "deletepage") { acceptrequest('opt,selid'); if ($opt == 'd') { if ($itemid == '') { catcherror($lna[337]); } $itemid = floor($itemid); $blog->query("DELETE FROM `{$db_prefix}pages` WHERE `pageid`='{$itemid}'"); $blog->query("DELETE FROM `{$db_prefix}mods` WHERE `name`='pageshortcut{$itemid}' AND `position`='header'"); mod_replace('pageshortcut{$itemid}', ''); recache_mods(); if ($ajax == 'on') { catchsuccessandfetch($lna[1095], 'admin.php?go=entry_pagemanage'); } else { catchsuccess($lna[1095], "{$lna[1057]}|admin.php?go=entry_pagemanage"); } }
<?php if (!defined('VALIDADMIN')) { die('Access Denied.'); } checkpermission('CP'); if ($langback == 'zh-tw') { include_once "plugin/viewstat/lang_zh-tw.php"; } else { include_once "plugin/viewstat/lang_zh-cn.php"; } acceptrequest('cleardata'); if ($cleardata == 1) { acceptrequest('clearyear,clearmonth,clearday'); $delstr = floor($clearyear) * 10000 + floor($clearmonth) * 100 + floor($clearday); if (strlen((string) $delstr) != 8) { catcherror($langstat[19]); } else { $blog->query("DELETE FROM `{$db_prefix}history` WHERE `hisday`<'{$delstr}'"); catchsuccess($langstat[20]); } } $crtime = gmdate('Y/m/d H:i', $config['blogcreatetime'] + 3600 * $config['timezone']); $the_current_time = time(); $days = floor(($the_current_time - $config['blogcreatetime']) / (24 * 60 * 60)); if ($days == 0) { $days = 1; } $av_art = floor($statistics['entries'] / $days); if ($av_art == 0) { $av_art = "<1";