public function showImage() { $result['image'] = true; $result['topic'] = IndexPageConfig::$TOPIC; $name_id = HttpNamespace::getGET('name'); if ($name_id) { $image = DetailNamespace::getNameById($name_id); if (!$image) { HttpNamespace::redirect(UrlNamespace::categoryUrl(self::$CATEGORY['id'])); } } else { $category = self::$CATEGORY; $category['table'] = 'image'; list($page, $list) = CommonNamespace::showPage($category, self::$MAJORY, 'id', 10); foreach ($list as $key => $value) { $list[$key]['list'] = $this->getHotImage(self::$MAJORY['id'], $value['id'], 4); } $this->assign('title', self::$MAJORY['name']); $this->assign('list', $list); $this->assign('image', true); $this->assign('page', $page); $this->display('majory/list.php'); } $page = HttpNamespace::getGET('p'); list($list, $result['count']) = DBXapian::searchImageByName($name_id, $page, 16); //组合list $result['list'] = array(array('id' => $image['id'], 'majory_id' => self::$MAJORY['id'], 'name' => $image['name'], 'list' => $list)); $result['title'] = self::$MAJORY['name'] . '-' . $image['name']; $result['type_id'] = $this->typeId; $result['page'] = $this->_showPage($result['count']); $this->assign($result); $this->display('majory/list.php'); }
public function defaultAction() { self::$TYPE = (int) HttpNamespace::getGET('type', 1); if (empty(self::$CATEGORY) || empty(self::$PUID)) { $this->_error(); } self::$ARTICLE = DetailNamespace::getArticle(self::$CATEGORY, self::$PUID); if (empty(self::$ARTICLE)) { $this->_error(); } self::$ARTICLE['title'] = self::$ARTICLE['title'] . ' > ' . self::$ARTICLE['author'] . ' - 大头狗日记'; self::$URL = 'http://datougou.cn' . UrlNamespace::detailUrl(self::$MAJORY['id'], self::$PUID); $this->_bulidUrl(); DetailNamespace::increaseShareTimes(self::$CATEGORY, self::$PUID); HttpNamespace::redirect($this->_getUrl()); }
public function defaultAction() { if (HttpNamespace::isPost()) { $this->_username = HttpNamespace::getPOST('username'); $this->_password = HttpNamespace::getPOST('password'); $this->_password2 = HttpNamespace::getPOST('password2'); if ($this->_validator()) { if (UserNamespace::saveUser($this->_username, $this->_password)) { if (UserNamespace::login($this->_username, $this->_password)) { if (self::$REQUEST['url']) { HttpNamespace::redirect(self::$REQUEST['url']); } HttpNamespace::redirect(__APP__); } else { HttpNamespace::redirect(UrlNamespace::loginUrl()); } } } } $this->assign($this->error); $this->display(); }
public function defaultAction() { $content = addslashes(HttpNamespace::getPOST('content')); $puid = HttpNamespace::getPOST('puid'); $backUrl = UrlNamespace::detailUrl(self::$MAJORY['id'], $puid); if (empty(self::$CATEGORY)) { $error = ErrorConfig::EMPTY_VALUE; if (strpos($backUrl, '?') === false) { $backUrl .= '?error=' . $error; } $backUrl .= '&error=' . $error; HttpNamespace::redirect($backUrl); } if (empty($content)) { //error = 1 $error = ErrorConfig::EMPTY_VALUE; if (strpos($backUrl, '?') === false) { $backUrl .= '?error=' . $error; } $backUrl .= '&error=' . $error; HttpNamespace::redirect($backUrl); } if (isset($_SESSION['login']) && $_SESSION['login']) { $userId = $_SESSION['user']['id']; $nick_name = addslashes($_SESSION['user']['nick_name']); } else { $userId = 0; $nick_name = '匿名用户'; } $ua = 0; $sql = "INSERT INTO " . self::$CATEGORY['table'] . "_comment (`puid`,`user_id`,\n `nick_name`,`content`,`times`,`ua`)VALUES({$puid},{$userId},'" . $nick_name . "',\n '" . $content . "'," . time() . ",{$ua})"; if (DBMysqli::getInstance()->execute($sql) > 0) { $sql = "UPDATE " . self::$CATEGORY['table'] . " set comment_times=comment_times+1,weight=weight+1 WHERE puid={$puid}"; DBMysqli::getInstance()->execute($sql); } HttpNamespace::redirect($backUrl); }
<div class="switch sw-news"> <ul class="sw-nav sw-nav5 clearfix"> <li class="first"><a href="javascript:void(0);" class="cur">最新</a></li></li> </ul> <div class="sw-cont"> <div class="sw-area hover"> <ul class="list list-order"> <?php $i = 0; foreach ($this->hot as $value) { ?> <li class="li<?php echo $i++; ?> "><i></i><a href="<?php echo UrlNamespace::detailUrl($value['majory_id'], $value['puid']); ?> "><?php echo $value['title']; ?> </a><!-- <author class="author"><?php echo $value['author']; ?> </author> --></li> <?php } ?> </ul> </div> </div> </div>
public function createUrlByWord($word) { $re = array(); if (is_numeric($this->typeId) && $this->typeId != 0) { $re[] = array('word' => $this->params[$this->type]['name'] . '类', 'url' => UrlNamespace::searchUrl($this->orgWord)); } elseif ($this->typeId === 'author') { $re[] = array('word' => '作者', 'url' => UrlNamespace::searchUrl($this->orgWord)); } elseif (strtolower($this->typeId) == 'uid') { $this->typeId = 'author'; $w = ''; foreach (DBScws::cutWord($this->params['username']) as $v) { $w .= $v; } $re[] = array('word' => $this->params['username'], 'url' => UrlNamespace::searchUrl()); return $re; } elseif (strtolower($this->typeId) == 'bookid') { $this->typeId = 'bookname'; $w = ''; foreach (DBScws::cutWord($this->params['diarybook']) as $v) { $w .= $v; } $re[] = array('word' => $this->params['diarybook'], 'url' => UrlNamespace::searchUrl()); return $re; } elseif ($this->typeId === 'bookname') { $re[] = array('word' => '日记本', 'url' => UrlNamespace::searchUrl($this->orgWord)); } foreach ($word as $value) { $w = ''; foreach ($this->cutWord as $v) { if ($value != $v) { $w .= $v; } } $re[] = array('word' => $value, 'url' => UrlNamespace::searchUrl($w, $this->typeId)); } return $re; }
<?php $this->load('index/widget/header.php'); ?> <div id="headlines" class="module"> <!-- 头条 --> <?php $this->load('index/widget/one_image.php', array('image' => $this->top_image)); ?> </div> <div class="crumbs"> <a href="__APP__" class="a-blue">首页</a> > <a href="<?php echo UrlNamespace::pubrUrl(); ?> " class="a-blue"><?php echo $this->category['name']; ?> </a> > <?php echo $this->majory['name']; ?> </div> <div class="publish"> <form method="post" class="publish-send" action="" id="regForm"> <p class="red-ae user-tip" >网站完善中 ,敬请期待</p> <?php if (isset($this->diary)) { ?> <div class="pub-item radio-item">
<div class="module_goucai"> <table class="tableCol4"> <tbody> <tr> <?php $i = 0; foreach ($value['majory'] as $k => $v) { ?> <?php if ($i % 4 == 0 && $i != 0) { ?> </tr><tr><?php } ?> <td><a href="<?php echo UrlNamespace::majoryUrl($v['id']); ?> "><?php echo $v['name']; ?> </a></td> <?php $i++; } ?> </tr> </tbody> </table> </div> </div> <?php
?> </ul> </div> <aside class="article-share"> <p class="as-tit">分享此文章:</p> <p class="as-icon"> <a rel="nofollow" href="<?php echo UrlNamespace::shareUrl($this->article['majory_id'], $this->article['puid']); ?> &type=1" class="s-sina" title="新浪微博"></a> <a rel="nofollow" href="<?php echo UrlNamespace::shareUrl($this->article['majory_id'], $this->article['puid']); ?> &type=2" class="s-weblog" title="腾讯微博"></a> <a rel="nofollow" href="<?php echo UrlNamespace::shareUrl($this->article['majory_id'], $this->article['puid']); ?> &type=3" class="s-QZone" title="QQ空间"></a> </p> <p class="as-num">已有<span class="col-r"><?php echo $this->article['share_times']; ?> </span>人分享</p> </aside> </article> <section class="comment-holder" id="commentHolder"> <header class="titlebar tb-o"> <h2 class="titlebar-t"><i></i>评论</h2> <a href="" class="titlebar-r commentMore more">>>评论<b><?php
<?php $this->load('header/header2.php'); ?> <!-- 图片 --> <?php $this->load('Public/image/up.php', array('image' => $this->result['top_image'])); ?> <div class="mod_nav1"> <h2><a href="<?php echo UrlNamespace::hotArticleUrl(); ?> ">最热文章</a></h2> </div> <?php $this->load('Public/title/up.php', array('topic' => $this->result['topic'])); ?> <!-- 图片 --> <?php $this->load('Public/image/middle.php', array('image' => $this->result['mid_image'])); ?> <!-- 最热 --> <?php $this->load('Public/list/list.php', array('title' => false, 'article' => (array) $this->result['top_article'], 'type' => true, 'ad' => false, 'comment_times' => true)); $this->load('Public/list/search.php', array('type_id' => $this->majory['id'], 'type_name' => 'majory', 'type' => $this->category['majory'])); ?> <!-- 列表最新发布 --> <?php $this->load('Public/image.php', array('list' => $this->list)); if (!empty($this->result['down_image'])) { $this->load('Public/image/down.php', array('image' => $this->result['down_image']));
<div class="v3"> <ul class="common-item"> <?php foreach ($this->hospital as $value) { ?> <li> <div> <!-- <div class="pic"> <img src="" original="" alt="" style="display: inline;"> </div> --> <div class="item-name" style="padding: 12px 10px 0 13px;"> <!--<div class="item-ico"> <span class="icon-freeres"></span> </div>--> <h2><a href="<?php echo UrlNamespace::hospitalDetail($value['id']); ?> " style="width: 230px;float: left;"><?php echo $value['title']; ?> </a> <p style="color:#F08A01;"><?php if (isset(MedicalVar::$HOSPITAL_LEVEL[$value['level']])) { echo MedicalVar::$HOSPITAL_LEVEL[$value['level']]; } ?> </p></h2> <h3><?php echo $value['brief']; ?> </h3>
<?php $this->load('header/header2.php'); ?> <!-- 图片 --> <?php $this->load('Public/image/up.php', array('image' => $this->result['top_image'])); ?> <div class="mod_nav1"> <h2><a href="<?php echo UrlNamespace::hotArticleUrl($this->majory['id']); ?> ">最热文章</a></h2> </div> <?php $this->load('Public/title/up.php', array('topic' => $this->result['topic'])); ?> <!-- 图片 --> <?php $this->load('Public/image/middle.php', array('image' => $this->result['mid_image'])); ?> <!-- 最热 --> <?php $this->load('Public/list/list.php', array('title' => false, 'article' => (array) $this->result['top_article'], 'type' => true, 'ad' => false, 'comment_times' => true)); $this->load('Public/list/search.php', array('type_id' => $this->majory['id'], 'type_name' => 'majory', 'type' => $this->category['majory'])); ?> <!-- 列表最新发布 --> <?php $this->load('Public/image.php', array('list' => $this->list)); if (!empty($this->result['down_image'])) { $this->load('Public/image/down.php', array('image' => $this->result['down_image']));
<!-- 热搜词最多四个一行 --> <ul class="mod_listSub"> <li> <?php foreach ($this->result['search_word'] as $value) { ?> <a href="<?php UrlNamespace::WordUrl($value); ?> "><?php echo $value; ?> </a> <?php } ?> </li> </ul>
echo ' (需要创建日记本)'; } ?> <i class="s-arrow arrow"></i></div> <div class="cate-items" id="children<?php echo $j; ?> " style="display:none;"> <div class="cate-item"> <?php $i = 0; foreach ($value['majory'] as $k => $v) { $i++; ?> <a href="<?php echo UrlNamespace::pubTypeUrl($v['id']); ?> "><?php echo $v['name']; ?> <div></div></a> <?php if ($i % 2 == 0) { ?> </div><div class="cate-item"> <?php } ?> <?php } ?>
<?php $this->load('Public/header/list.php', array('class' => 'hm-item')); ?> <li class="hm-item"><a href="__APP_/category/more">更多</a></li> </ul> </div> </div> </header> --> <header class="header" > <div class="header-holder clearfix"> <nav class="header-link"> <a class="lg" href="__APP__"><i></i>大头狗日记</a> <a href="<?php echo UrlNamespace::majoryUrl($this->majory['id']); ?> "><?php echo $this->category['name']; ?> </a> </nav> <a href="__APP__"> <h2 class="logo"><i class="logo_bg_" style="width:105px;height:30px;"></i><i class="logo_name"><?php echo $this->majory['name']; ?> </i><i class="logo_url">datougou.cn</i></h2> </a>
} ?> <i class="channel">[<?php echo $v['majory']; ?> ]</i><?php echo $v['title']; ?> </a> </li> <?php } ?> </ul> <div class="module_button"><a href="<?php echo UrlNamespace::categoryUrl($value['category_id']); ?> ">进入<?php echo $value['category_name']; ?> 频道</a></div> </li> </ul> </div> <?php if (!empty($value['ad'])) { ?> <ul class="module_list adv"> <li><a href="">tetesttesttesttestst</a></li> <li><a href="">testtesttesttest</a>|<a href="">testtesttesttest</a></li> </ul>
if (!$this->error) { ?> style="display:none;"<?php } ?> id="username"><?php echo $this->error; ?> </p> <p class="label">用户名</p> <div class="form-item limit-input"> <input type="text" class="comn-input" value="" name="username" id="userName"> </div> <p class="label">密码</p> <div class="form-item limit-input"> <input type="password" class="comn-input" value="" name="password" id="password"> </div> <input type="submit" value="登陆" class="comn-submit over-submit"> <div class="clear lp-link"> <a href="" class="prime-a fl">忘记密码(请联系管理员)</a> <a href="<?php echo UrlNamespace::registerUrl(); ?> " class="prime-a fr">快速注册</a> </div> </form> </div> <?php $this->load('footer/footer.php'); ?> </body></html>
<?php $this->load('header/header2.php'); ?> <!-- 图片 --> <?php $this->load('Public/image/up.php', array('image' => $this->top_image)); ?> <div class="mod_nav1"> <h2><a href="<?php echo UrlNamespace::hotArticleUrl($this->category['id'], null); ?> ">最热文章</a></h2> </div> <?php $this->load('Public/title/up.php', array('topic' => $this->topic)); ?> <!-- 图片 --> <?php $this->load('Public/image/middle.php', array('image' => $this->mid_image)); ?> <!-- 最热 <?php $this->load('Public/list/list.php', array('title' => false, 'article' => (array) $this->top_article, 'type' => true, 'ad' => false, 'comment_times' => true)); ?> --> <?php $this->load('Public/list/search.php', array('type_id' => $this->category['id'], 'type_name' => 'category', 'type' => CategoryNamespace::getAllCategory(true))); ?> <!-- 列表最新发布 -->