foreach (C::t('portal_article_content')->fetch_all($aid) as $value) { $pushedids[] = intval($value['id']); $pushedcount++; } $pids = array_diff($pids, $pushedids); } $pushcount = count($pids); if (empty($pids)) { showmessage($pushedids ? 'all_posts_pushed_already' : 'no_posts_for_pushplus'); } } else { if ($op == 'checkhtmlname') { $htmlname = basename(trim($_GET['htmlname'])); if ($htmlstatus) { $_time = !empty($article) ? $article['dateline'] : TIMESTAMP; if (file_exists(helper_makehtml::fetch_dir($portalcategory[$catid]['fullfoldername'], $_time) . $htmlname . '.' . $_G['setting']['makehtml']['extendname'])) { showmessage('html_existed'); } else { showmessage('html_have_no_exists'); } } else { showmessage('make_html_closed'); } } else { if (empty($_G['cache']['portalcategory'])) { showmessage('portal_has_not_category'); } if (!checkperm('allowmanagearticle') && !checkperm('allowpostarticle')) { $allowcategorycache = array(); if ($allowcategory = getallowcategory($_G['uid'])) { foreach ($allowcategory as $catid => $category) {
} if (empty($metakeywords)) { $metakeywords = $article['title']; } if (empty($metadescription)) { $metadescription = $article['summary'] ? $article['summary'] : $article['title']; } list($seccodecheck, $secqaacheck) = seccheck('publish'); $catid = $article['catid']; if (!$_G['setting']['relatedlinkstatus']) { $_G['relatedlinks'] = get_related_link('article'); } else { $content['content'] = parse_related_link($content['content'], 'article'); } if (isset($_G['makehtml'])) { helper_makehtml::portal_article($cat, $article, $page); } portal_get_per_next_article($article); $tpldirectory = ''; $articleprimaltplname = $cat['articleprimaltplname']; if (strpos($articleprimaltplname, ':') !== false) { list($tpldirectory, $articleprimaltplname) = explode(':', $articleprimaltplname); } include_once template("diy:portal/view:{$catid}", NULL, $tpldirectory, NULL, $articleprimaltplname); function parseforumattach(&$post, $aids) { global $_G; if ($aids = array_unique($aids)) { require_once libfile('function/attachment'); $finds = $replaces = array(); foreach (C::t('forum_attachment_n')->fetch_all_by_id('tid:' . $post['tid'], 'aid', $aids) as $attach) {
if ($_GET['diy'] == 'yes' && $topic['uid'] != $_G['uid'] && !$_G['group']['allowmanagetopic']) { $_GET['diy'] = ''; showmessage('topic_edit_nopermission'); } if (!empty($_G['setting']['makehtml']['flag']) && $topic['htmlmade'] && !isset($_G['makehtml']) && empty($_GET['diy'])) { dheader('location:' . fetch_topic_url($topic)); } $topicid = intval($topic['topicid']); C::t('portal_topic')->increase($topicid, array('viewnum' => 1)); $navtitle = $topic['title']; $metadescription = empty($topic['summary']) ? $topic['title'] : $topic['summary']; $metakeywords = empty($topic['keyword']) ? $topic['title'] : $topic['keyword']; $attachtags = $aimgs = array(); list($seccodecheck, $secqaacheck) = seccheck('publish'); if (isset($_G['makehtml'])) { helper_makehtml::portal_topic($topic); } $file = 'portal/portal_topic_content:' . $topicid; $tpldirectory = ''; $primaltplname = $topic['primaltplname']; if (strpos($primaltplname, ':') !== false) { list($tpldirectory, $primaltplname) = explode(':', $primaltplname); } $topicurl = fetch_topic_url($topic); include template('diy:' . $file, NULL, $tpldirectory, NULL, $primaltplname); function portaltopicgetcomment($topcid, $limit = 20, $start = 0) { global $_G; $topcid = intval($topcid); $limit = intval($limit); $start = intval($start);
function output() { global $_G; if (defined('DISCUZ_OUTPUTED')) { return; } else { define('DISCUZ_OUTPUTED', 1); } if (!empty($_G['blockupdate'])) { block_updatecache($_G['blockupdate']['bid']); } if (defined('IN_MOBILE')) { mobileoutput(); } if (!defined('IN_MOBILE') && !defined('IN_ARCHIVER')) { $tipsService = Cloud::loadClass('Service_DiscuzTips'); $tipsService->show(); } $havedomain = implode('', $_G['setting']['domain']['app']); if ($_G['setting']['rewritestatus'] || !empty($havedomain)) { $content = ob_get_contents(); $content = output_replace($content); ob_end_clean(); $_G['gzipcompress'] ? ob_start('ob_gzhandler') : ob_start(); echo $content; } if (isset($_G['makehtml'])) { helper_makehtml::make_html(); } if ($_G['setting']['ftp']['connid']) { @ftp_close($_G['setting']['ftp']['connid']); } $_G['setting']['ftp'] = array(); if (defined('CACHE_FILE') && CACHE_FILE && !defined('CACHE_FORBIDDEN') && !defined('IN_MOBILE') && !checkmobile()) { if (diskfreespace(DISCUZ_ROOT . './' . $_G['setting']['cachethreaddir']) > 1000000) { if ($fp = @fopen(CACHE_FILE, 'w')) { flock($fp, LOCK_EX); fwrite($fp, empty($content) ? ob_get_contents() : $content); } @fclose($fp); chmod(CACHE_FILE, 0777); } } if (defined('DISCUZ_DEBUG') && DISCUZ_DEBUG && @(include libfile('function/debug'))) { function_exists('debugmessage') && debugmessage(); } }
$seodata = array('firstcat' => $cats[0], 'secondcat' => $cats[1], 'curcat' => $cat['catname'], 'page' => intval($_GET['page'])); list($navtitle, $metadescription, $metakeywords) = get_seosetting('articlelist', $seodata, $catseoset); if (!$navtitle) { $navtitle = helper_seo::get_title_page($cat['catname'], $_G['page']); $nobbname = false; } else { $nobbname = true; } if (!$metakeywords) { $metakeywords = $cat['catname']; } if (!$metadescription) { $metadescription = $cat['catname']; } if (isset($_G['makehtml'])) { helper_makehtml::portal_list($cat); } $file = 'portal/list:' . $catid; $tpldirectory = ''; $primaltplname = $cat['primaltplname']; if (strpos($primaltplname, ':') !== false) { list($tpldirectory, $primaltplname) = explode(':', $primaltplname); } include template('diy:' . $file, NULL, $tpldirectory, NULL, $primaltplname); function category_get_wheresql($cat) { $wheresql = ''; if (is_array($cat)) { $catid = $cat['catid']; if (!empty($cat['subs'])) { include_once libfile('function/portalcp');
public static function portal_topic($topic) { global $_G; if (!empty($_G['setting']['makehtml']['flag']) && !empty($_G['setting']['makehtml']['topichtmldir']) && $topic['name']) { $_G['dynamicurl'] = 'portal.php?mod=topic&topicid=' . $topic['topicid']; self::$callbackdata['data'] = array(); if (!$topic['htmlmade']) { self::$callbackdata['data']['htmlmade'] = 1; } if ($topic['htmldir'] != $_G['setting']['makehtml']['topichtmldir']) { self::$callbackdata['data']['htmldir'] = $_G['setting']['makehtml']['topichtmldir']; } self::$htmlfilename = $_G['setting']['makehtml']['topichtmldir'] . '/' . $topic['name']; if (self::$callbackdata['data']) { self::$callback = array(self, 'portal_topic_success'); self::$callbackdata['id'] = $topic['topicid']; } if ($topic['allowcomment']) { $_G['htmlcheckupdate'] = '1'; } } }
<?php /** * [Discuz!] (C)2001-2099 Comsenz Inc. * This is NOT a freeware, use is subject to license terms * * $Id: portal_index.php 31313 2012-08-10 03:51:03Z zhangguosheng $ */ if (!defined('IN_DISCUZ')) { exit('Access Denied'); } list($navtitle, $metadescription, $metakeywords) = get_seosetting('portal'); if (!$navtitle) { $navtitle = $_G['setting']['navs'][1]['navname']; $nobbname = false; } else { $nobbname = true; } if (!$metakeywords) { $metakeywords = $_G['setting']['navs'][1]['navname']; } if (!$metadescription) { $metadescription = $_G['setting']['navs'][1]['navname']; } if (isset($_G['makehtml'])) { helper_makehtml::portal_index(); } include_once template('diy:portal/index');