$entrysummary = preg_replace("/\\[code\\](.+?)\\[\\/code\\]/ise", "phpcode('\\1')", $entrysummary); $entrysummary = safe_convert($entrysummary, 1, 1); } } else { $entrysummary = ''; } $frontpage = $summaryway == 2 ? 1 : 0; $title = safe_convert(stripslashes($title)); if ($comefrom && $originsrc) { $comefrom = safe_convert($comefrom); $originsrc = safe_convert($originsrc); } else { $comefrom = $originsrc = ''; } if ($ajax != 'on') { $blogalias = blogalias_convert($blogalias); if ($blogalias == '') { $deletealias = true; } else { if ($job == 'restore') { $findalias_plus = "AND `blogid`<>'{$records['blogid']}'"; } $findalias = $blog->getgroupbyquery("SELECT * FROM `{$db_prefix}blogs` WHERE `blogalias`='{$blogalias}' {$findalias_plus} LIMIT 1"); if ($findalias[0]['blogalias'] == $blogalias) { $blogalias .= '_' . rand(1000, 9999); } $deletealias = false; } if ($tags) { $tags_array = @explode(' ', mystrtolower(trim($tags))); $tags_array_all = array_unique($tags_array);
//Disable auto linebreak in WYSIWYG editors } if ($callaftersubmit) { $content = call_user_func($callaftersubmit, $content); } $content = preg_replace("/\\[php\\](.+?)\\[\\/php\\]/ise", "phpcode3('\\1')", $content); if ($htmlstat != 1 || $permission['Html'] != 1) { $content = preg_replace("/\\[code\\](.+?)\\[\\/code\\]/ise", "phpcode2('\\1')", $content); $content = safe_convert($content, 0, 1); } else { $content = preg_replace("/\\[code\\](.+?)\\[\\/code\\]/ise", "phpcode('\\1')", $content); $content = safe_convert($content, 1, 1); } $pagetitle = safe_convert(stripslashes($pagetitle)); $shortcutname = !$shortcutname ? $pagetitle : safe_convert(stripslashes($shortcutname)); $pagealias = blogalias_convert($pagealias); if ($pagealias == '') { $deletealias = true; } else { if ($job == 'restore') { $findalias_plus = "AND `pageid`<>'{$records['pageid']}'"; } $findalias = $blog->getgroupbyquery("SELECT * FROM `{$db_prefix}pages` WHERE `pagealias`='{$pagealias}' {$findalias_plus} LIMIT 1"); if ($findalias[0]['pagealias'] == $pagealias) { $pagealias .= '_' . rand(1000, 9999); } $deletealias = false; } $currentuserid = $userdetail['userid']; $finaltime = time(); if ($job == 'store') {
$t_day = gmdate('j', $time + 3600 * $config['timezone']); $values[] = "('{$t_Ym}', '{$t_day}', '{$item['blogid']}', '')"; } } $all_value = @implode(',', $values); if ($all_value) { $blog->query("INSERT INTO `{$db_prefix}calendar` VALUES {$all_value}"); } recache_currentmonthentries(); catchsuccess($finishok4, $backtocache); } if ($job == 'rebuildrewritefiles') { $all = $blog->getgroupbyquery("SELECT `blogid`,`blogalias` FROM `{$db_prefix}blogs` WHERE `blogalias`<>''"); if (is_array($all)) { foreach ($all as $item) { $blogalias = blogalias_convert($item['blogalias']); if ($blogalias) { $redirect_new = "<?php\nchdir('../');\n\$entryid={$item['blogid']};\ninclude('read.php');"; writetofile("post/{$blogalias}.php", $redirect_new); } } } catchsuccess($finishok5, $backtocache); } if ($job == 'adminattach') { $start_id = ($page - 1) * $adminitemperpage; acceptrequest('uploadmonth,uploadyear'); if (!empty($uploadyear) && empty($uploadmonth)) { $starttimestamp = mktime(0, 0, 0, 1, 1, $uploadyear); $finishtimestamp = mktime(23, 59, 59, 12, 31, $uploadyear); $queryplus = "WHERE `uploadtime`>={$starttimestamp} AND `uploadtime`<={$finishtimestamp} ";