$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"); } } if ($opt == 'del') { if ($selid == '') { catcherror($lna[337]); } $batch_id = makeaquery($selid, "`pageid`='%s'", 'OR'); $batch_id2 = makeaquery($selid, "`name`='pageshortcut%s'", 'OR'); $blog->query("DELETE FROM `{$db_prefix}pages` WHERE {$batch_id}"); $blog->query("DELETE FROM `{$db_prefix}mods` WHERE {$batch_id2}"); foreach ($selid as $singleid) { mod_replace('pageshortcut{$singleid}', ''); } recache_mods(); if ($ajax == 'on') { catchsuccessandfetch($lna[1095], 'admin.php?go=entry_pagemanage'); } else { catchsuccess($lna[1095], "{$lna[1057]}|admin.php?go=entry_pagemanage"); } } catcherror($lna[965]); }
$relatedmods = array('tags' => 'alltags', 'star' => 'starred', 'guestbook' => 'guestbook'); $tosetinvisiblearray = $tosetvisiblearray = array(); while (@(list($key, $val) = @each($save_config))) { $savetext .= "\$flset['{$key}']='" . admin_convert($val) . "';\n"; if ($relatedmods[$key]) { if ($val == 1) { $tosetinvisiblearray[] = $relatedmods[$key]; } if ($val == 0) { $tosetvisiblearray[] = $relatedmods[$key]; } } } if ($savetext == '') { catcherror($lna[1013]); } if (writetofile("data/functionlock.php", $savetext)) { if (sizeof($tosetinvisiblearray) >= 1) { $allinvisibles = makeaquery($tosetinvisiblearray, "`name`='%s'", 'OR'); $blog->query("UPDATE `{$db_prefix}mods` SET `active`=0 WHERE {$allinvisibles}"); } if (sizeof($tosetvisiblearray) >= 1) { $allvisibles = makeaquery($tosetvisiblearray, "`name`='%s'", 'OR'); $blog->query("UPDATE `{$db_prefix}mods` SET `active`=1 WHERE {$allvisibles}"); } recache_mods(); catchsuccess($finishok, "{$lna[1194]}|admin.php?go=main_funclock"); } else { catcherror("{$lna[66]}" . "data/functionlock.php"); } }
$showmsel = "<select name=uploadmonth><option value=0>{$lna[292]}</option>"; foreach ($foryears as $y) { $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}");
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"; } } } }