} else { if (isset($_GET['weblog_id'])) { $weblog_id = intval($_GET['weblog_id']); $Weblog = new Weblog($weblog_id); if ($Weblog->weblog) { if ($Weblog->blg_uid == $p->User->usr_id) { $rt = $p->Validator->vxBlogComposeCheck(); if ($rt['errors'] == 0) { $p->Validator->vxBlogComposeInsert($p->User->usr_id, $Weblog->blg_id, $rt['bge_title_value'], $rt['bge_body_value'], $rt['bge_mode_value'], $rt['bge_comment_permission_value'], $rt['bge_status_value'], $rt['published'], $rt['bge_tags_value']); $Weblog->vxUpdateEntries(); $sql = "SELECT bge_id FROM babel_weblog_entry WHERE bge_uid = {$p->User->usr_id} ORDER BY bge_created DESC LIMIT 1"; $rs = mysql_query($sql); $entry_id = mysql_result($rs, 0, 0); mysql_free_result($rs); if ($rt['bge_status_value'] == 1) { Weblog::vxBuild($p->User->usr_id, $Weblog->blg_id); } die($p->URL->vxToRedirect($p->URL->vxGetBlogList($Weblog->blg_id))); break; } else { $rt['Weblog'] = $Weblog; $p->vxHead($msgSiteTitle = '撰写新文章'); $p->vxBodyStart(); $p->vxTop(); $p->vxContainer('blog_compose_save', $rt); break; } break; } else { $_SESSION['babel_message_weblog'] = '你没有权力对这个博客网站进行操作'; die($p->URL->vxToRedirect($p->URL->vxGetBlogAdmin()));
public function vxBlogBuild() { if (isset($_GET['weblog_id'])) { $weblog_id = intval($_GET['weblog_id']); if (Weblog::vxMatchWeblogPermission($this->User->usr_id, $weblog_id)) { Weblog::vxBuild($this->User->usr_id, $weblog_id); return $this->URL->vxToRedirect($_SERVER['HTTP_REFERER']); } else { return js_alert('你没有权力对这个博客网站进行操作', '/blog/admin.vx'); } } else { return js_alert('指定的博客网站没有找到', '/blog/admin.vx'); } }