Exemplo n.º 1
0
	public function init() {
		$total = $this->db->count();
		$page = isset($_GET['page']) && intval($_GET['page']) ? intval($_GET['page']) : 1;
		$pagesize = 20;
		$offset = ($page - 1) * $pagesize;
		$list = $this->db->select('', '*', $offset.','.$pagesize);
		pc_base::load_sys_class('format', '', 0);
		foreach ($list as $key=> $v) {
			$list[$key]['lastlogin'] = format::date($v['lastlogin'], 1);
		}
		$pages = pages($total, $page, $pagesize);
		include $this->admin_tpl('administrator_list');
	}
Exemplo n.º 2
0
Arquivo: check.php Projeto: hxzyzz/ddc
	public function public_get_one() {
		$total = $this->comment_check_db->count(array('siteid'=>$this->get_siteid()));
		$comment_check_data = $this->comment_check_db->select(array('siteid'=>$this->get_siteid()), '*', '19,1', 'id desc');
		$comment_check_data = $comment_check_data[0];
		$r = array();
		if (is_array($comment_check_data) && !empty($comment_check_data)) {
			$this->comment_data_db->table_name($comment_check_data['tableid']);
			$r = $this->comment_data_db->get_one(array('id'=>$comment_check_data['comment_data_id'], 'siteid'=>$this->get_siteid()));
			pc_base::load_sys_class('format','', 0);
			$r['creat_at'] = format::date($r['creat_at'], 1);
			if (pc_base::load_config('system','charset')=='gbk') {
				foreach ($r as $k=>$v) {
					$r[$k] = iconv('gbk', 'utf-8', $v);
				}
			}
		}
		echo json_encode(array('total'=>$total, 'data'=>$r));
	}
Exemplo n.º 3
0
"><?php 
        echo $hits_r['views'];
        ?>
</td>
		<td align='center'>
		<?php 
        if ($r['sysadd'] == 0) {
            echo "<a href='?m=member&c=member&a=memberinfo&username="******"&pc_hash=" . $_SESSION['pc_hash'] . "' >" . $r['username'] . "</a>";
            echo '<img src="' . IMG_PATH . 'icon/contribute.png" title="' . L('member_contribute') . '">';
        } else {
            echo $r['username'];
        }
        ?>
</td>
		<td align='center'><?php 
        echo format::date($r['updatetime'], 1);
        ?>
</td>
		<td align='center'><a href="javascript:;" onclick="javascript:openwinx('?m=content&c=content&a=edit&catid=<?php 
        echo $catid;
        ?>
&id=<?php 
        echo $r['id'];
        ?>
','')"><?php 
        echo L('edit');
        ?>
</a> | <a href="javascript:view_comment('<?php 
        echo id_encode('content_' . $catid, $r['id'], $this->siteid);
        ?>
','<?php 
Exemplo n.º 4
0
?>
&nbsp;&nbsp; <?php 
echo L('keyword');
?>
:<input type='text' name="key" id="key" value="<?php 
echo $_GET['key'];
?>
" size="25"> <div class="bk10"></div>
<span id="catids"></span>&nbsp;&nbsp; 
				<?php 
echo L('input_time');
?>
:
				<?php 
$start_f = $_GET['start_time'] ? $_GET['start_time'] : format::date(SYS_TIME - 2592000);
$end_f = $_GET['end_time'] ? $_GET['end_time'] : format::date(SYS_TIME + 86400);
?>
				<?php 
echo form::date('start_time');
?>
 - <?php 
echo form::date('end_time');
?>
				 <input type="submit" name="search" class="button" value="<?php 
echo L('search');
?>
" />
	</div>
		</td>
		</tr>
    </tbody>
Exemplo n.º 5
0
			<th width="33%">&nbsp;</th><th width="33%">&nbsp;</th><th width="33%">&nbsp;</th>
            </tr>
        </thead>
        <tbody>
 <?php 
if(is_array($infos)){
	$n = 0;
	foreach($infos as $info){
		$n++;
?>   
	<?php if($n%3==1){?><tr><?php }?>
	<td><div class="col-left mr10" style="width:146px; height:112px"><img src="<?php echo format_url($info['video']['picPath'])?>" width="146" height="112" style="border:1px solid #eee" align="left" title="<?php echo $info['video']['title'];?>"></div>
	<div class="col-auto">  
		<h2 class="title-1 f14 lh28 mb6 blue" title="<?php echo $info['video']['title'];?>"><?php echo str_cut($info['video']['title'], 26)?></h2>
		<div class="lh22"><?php echo $info['video']['desc']?></div>
	<p class="gray4">上传时间:<?php echo format::date(substr(trim($info['video']['uploadTime']), 0, 10), 1)?></p>
	<p class="gray4">播放次数:<?php echo $info['video']['videoTime']?></p>
	</div>
	</td>
	<?php if($n%3==0){?></tr><?php }?>
<?php 
	}
}
?>
</tbody>
    </table>
  
    <div class="btn"></div>
 <div id="pages"><?php echo $pages;?></div><script>window.top.$("#display_center_id").css("display","none");</script>
</form>
</div>
Exemplo n.º 6
0
 /**
  * 专题展示
  */
 public function show()
 {
     $id = intval($_GET['id']);
     if (!$id) {
         showmessage(L('content_not_exist'), 'blank');
     }
     $page = $_GET['page'];
     $c_db = pc_base::load_model('special_content_model');
     $c_data_db = pc_base::load_model('special_c_data_model');
     $rs = $c_db->get_one(array('id' => $id));
     if (!$rs) {
         showmessage(L('content_checking'), 'blank');
     }
     extract($rs);
     if ($isdata) {
         $arr_content = $c_data_db->get_one(array('id' => $id));
         if (is_array($arr_content)) {
             extract($arr_content);
         }
     }
     $siteid = get_siteid();
     if ($paginationtype) {
         //文章使用分页时
         if ($paginationtype == 1) {
             if (strpos($content, '[/page]') !== false) {
                 $content = preg_replace("|\\[page\\](.*)\\[/page\\]|U", '', $content);
             }
             if (strpos($content, '[page]') !== false) {
                 $content = str_replace('[page]', '', $content);
             }
             $contentpage = pc_base::load_app_class('contentpage', 'content');
             //调用自动分页类
             $content = $contentpage->get_data($content, $maxcharperpage);
             //自动分页,自动添加上[page]
         }
     } else {
         if (strpos($content, '[/page]') !== false) {
             $content = preg_replace("|\\[page\\](.*)\\[/page\\]|U", '', $content);
         }
         if (strpos($content, '[page]') !== false) {
             $content = str_replace('[page]', '', $content);
         }
     }
     $template = $show_template ? $show_template : 'show';
     //调用模板
     $CONTENT_POS = strpos($content, '[page]');
     if ($CONTENT_POS !== false) {
         $contents = array_filter(explode('[page]', $content));
         $pagenumber = count($contents);
         $END_POS = strpos($content, '[/page]');
         if ($END_POS !== false && $CONTENT_POS < 7) {
             $pagenumber--;
         }
         for ($i = 1; $i <= $pagenumber; $i++) {
             $pageurls[$i] = content_url($id, $i, $inputtime, 'php');
         }
         if ($END_POS !== false) {
             if ($CONTENT_POS > 7) {
                 $content = '[page]' . $title . '[/page]' . $content;
             }
             if (preg_match_all("|\\[page\\](.*)\\[/page\\]|U", $content, $m, PREG_PATTERN_ORDER)) {
                 foreach ($m[1] as $k => $v) {
                     $p = $k + 1;
                     $titles[$p]['title'] = strip_tags($v);
                     $titles[$p]['url'] = $pageurls[$p][1];
                 }
             }
         }
         //判断[page]出现的位置是否在第一位
         if ($CONTENT_POS < 7) {
             $content = $contents[$page];
         } else {
             if ($page == 1 && !empty($titles)) {
                 $content = $title . '[/page]' . $contents[$page - 1];
             } else {
                 $content = $contents[$page - 1];
             }
         }
         if ($titles) {
             list($title, $content) = explode('[/page]', $content);
             $content = trim($content);
             if (strpos($content, '</p>') === 0) {
                 $content = '<p>' . $content;
             }
             if (stripos($content, '<p>') === 0) {
                 $content = $content . '</p>';
             }
         }
         pc_base::load_app_func('util', 'content');
         $title_pages = content_pages($pagenumber, $page, $pageurls);
     }
     $_special = $this->db->get_one(array('id' => $specialid), '`title`, `url`, `show_template`, `isvideo`');
     if ($_special['isvideo']) {
         $video_store = pc_base::load_model('video_store_model');
         $v_r = $video_store->get_one(array('videoid' => $videoid), 'vid');
         $video['vid'] = $v_r['vid'];
     }
     pc_base::load_sys_class('format', '', 0);
     $inputtime = format::date($inputtime, 1);
     $SEO = seo($siteid, '', $title);
     $template = $show_template ? $show_template : ($_special['show_template'] ? $_special['show_template'] : 'show');
     $style = $style ? $style : 'default';
     include template('special', $template, $style);
 }
Exemplo n.º 7
0
 /**
  * 添加评论
  * @param string $commentid 评论ID
  * @param integer $siteid 站点ID
  * @param array $data 内容数组应该包括array('userid'=>用户ID,'username'=>用户名,'content'=>内容,'direction'=>方向(0:没有方向 ,1:正方,2:反方,3:中立))
  * @param string $id 回复评论的内容
  * @param string $title 文章标题
  * @param string $url 文章URL地址
  */
 public function add($commentid, $siteid, $data, $id = '', $title = '', $url = '')
 {
     //开始查询评论这条评论是否存在。
     $title = new_addslashes($title);
     if (!($comment = $this->comment_db->get_one(array('commentid' => $commentid, 'siteid' => $siteid), 'tableid, commentid'))) {
         //评论不存在
         //取得当前可以使用的内容数据表
         $r = $this->comment_table_db->get_one('', 'tableid, total', 'tableid desc');
         $tableid = $r['tableid'];
         if ($r['total'] >= 1000000) {
             //当上一张数据表存的数据已经达到1000000时,创建新的数据存储表,存储数据。
             if (!($tableid = $this->comment_table_db->creat_table())) {
                 $this->msg_code = 4;
                 return false;
             }
         }
         //新建评论到评论总表中。
         $comment_data = array('commentid' => $commentid, 'siteid' => $siteid, 'tableid' => $tableid, 'display_type' => $data['direction'] > 0 ? 1 : 0);
         if (!empty($title)) {
             $comment_data['title'] = $title;
         }
         if (!empty($url)) {
             $comment_data['url'] = $url;
         }
         if (!$this->comment_db->insert($comment_data)) {
             $this->msg_code = 5;
             return false;
         }
     } else {
         //评论存在时
         $tableid = $comment['tableid'];
     }
     if (empty($tableid)) {
         $this->msg_code = 1;
         return false;
     }
     //为数据存储数据模型设置 数据表名。
     $this->comment_data_db->table_name($tableid);
     //检查数据存储表。
     if (!$this->comment_data_db->table_exists('comment_data_' . $tableid)) {
         //当存储数据表不存时,尝试创建数据表。
         if (!($tableid = $this->comment_table_db->creat_table($tableid))) {
             $this->msg_code = 2;
             return false;
         }
     }
     //向数据存储表中写入数据。
     $data['commentid'] = $commentid;
     $data['siteid'] = $siteid;
     $data['ip'] = ip();
     $data['status'] = 1;
     $data['creat_at'] = SYS_TIME;
     //对评论的内容进行关键词过滤。
     $data['content'] = strip_tags($data['content']);
     $badword = pc_base::load_model('badword_model');
     $data['content'] = $badword->replace_badword($data['content']);
     if ($id) {
         $r = $this->comment_data_db->get_one(array('id' => $id));
         if ($r) {
             pc_base::load_sys_class('format', '', 0);
             if ($r['reply']) {
                 $data['content'] = '<div class="content">' . str_replace('<span></span>', '<span class="blue f12">' . $r['username'] . ' ' . L('chez') . ' ' . format::date($r['creat_at'], 1) . L('release') . '</span>', $r['content']) . '</div><span></span>' . $data['content'];
             } else {
                 $data['content'] = '<div class="content"><span class="blue f12">' . $r['username'] . ' ' . L('chez') . ' ' . format::date($r['creat_at'], 1) . L('release') . '</span><pre>' . $r['content'] . '</pre></div><span></span>' . $data['content'];
             }
             $data['reply'] = 1;
         }
     }
     //判断当前站点是否需要审核
     $site = $this->comment_setting_db->site($siteid);
     if ($site['check']) {
         $data['status'] = 0;
     }
     if ($comment_data_id = $this->comment_data_db->insert($data, true)) {
         //需要审核,插入到审核表
         if ($data['status'] == 0) {
             $this->comment_check_db->insert(array('comment_data_id' => $comment_data_id, 'siteid' => $siteid, 'tableid' => $tableid));
         } elseif (!empty($data['userid']) && !empty($site['add_point']) && module_exists('pay')) {
             //不需要审核直接给用户添加积分
             pc_base::load_app_class('receipts', 'pay', 0);
             receipts::point($site['add_point'], $data['userid'], $data['username'], '', 'selfincome', 'Comment');
         }
         //开始更新数据存储表数据总条数
         $this->comment_table_db->edit_total($tableid, '+=1');
         //开始更新评论总表数据总数
         $sql['lastupdate'] = SYS_TIME;
         //只有在评论通过的时候才更新评论主表的评论数
         if ($data['status'] == 1) {
             $sql['total'] = '+=1';
             switch ($data['direction']) {
                 case 1:
                     //正方
                     $sql['square'] = '+=1';
                     break;
                 case 2:
                     //反方
                     $sql['anti'] = '+=1';
                     break;
                 case 3:
                     //中立方
                     $sql['neutral'] = '+=1';
                     break;
             }
         }
         $this->comment_db->update($sql, array('commentid' => $commentid));
         if ($site['check']) {
             $this->msg_code = 7;
         } else {
             $this->msg_code = 0;
         }
         return true;
     } else {
         $this->msg_code = 3;
         return false;
     }
 }
Exemplo n.º 8
0
					</tr>
					<?php 
$n = 1;
if (is_array($favoritelist)) {
    foreach ($favoritelist as $k => $v) {
        ?>
					<tr>
						<td><a href="<?php 
        echo $v['url'];
        ?>
" target="_blank"><?php 
        echo $v['title'];
        ?>
</a></td>
						<td><?php 
        echo format::date($v['adddate'], 1);
        ?>
</td>
						<td><a href="index.php?m=member&c=index&a=favorite&id=<?php 
        echo $v['id'];
        ?>
"><?php 
        echo L('delete');
        ?>
</a></td>
					</tr>
					<?php 
        $n++;
    }
}
unset($n);
Exemplo n.º 9
0
 public function ajax()
 {
     $reviewsid =& $this->reviewsid;
     $siteid =& $this->siteid;
     $num = isset($_GET['num']) && intval($_GET['num']) ? intval($_GET['num']) : 20;
     $star1 = isset($_GET['star1']) && intval($_GET['star1']) ? intval($_GET['star1']) : 0;
     $star2 = isset($_GET['star2']) && intval($_GET['star2']) ? intval($_GET['star2']) : 0;
     $star3 = isset($_GET['star3']) && intval($_GET['star3']) ? intval($_GET['star3']) : 0;
     $star4 = isset($_GET['star4']) && intval($_GET['star4']) ? intval($_GET['star4']) : 0;
     $star5 = isset($_GET['star5']) && intval($_GET['star5']) ? intval($_GET['star5']) : 0;
     $star6 = isset($_GET['star6']) && intval($_GET['star6']) ? intval($_GET['star6']) : 0;
     $startype = isset($_GET['startype']) && intval($_GET['startype']) ? intval($_GET['startype']) : 1;
     $starnum = isset($_GET['starnum']) && intval($_GET['starnum']) ? intval($_GET['starnum']) : 4;
     $pc_tag = pc_base::load_app_class('reviews_tag');
     $reviews = array();
     if ($reviews = $pc_tag->get_reviews(array('reviewsid' => $reviewsid))) {
         $page = isset($_GET['page']) && intval($_GET['page']) ? intval($_GET['page']) : 1;
         $offset = ($page - 1) * $num;
         $data = array('reviewsid' => $reviewsid, 'site' => $siteid, 'limit' => $offset . ',' . $num, 'star1' => $star1, 'star2' => $star2, 'star3' => $star3, 'star4' => $star4, 'star5' => $star5, 'star6' => $star6, 'startype' => $startype);
         $reviews['data'] = $pc_tag->lists($data);
         pc_base::load_sys_class('format', '', 0);
         foreach ($reviews['data'] as $k => $v) {
             $reviews['data'][$k]['format_time'] = format::date($v['creat_at'], 1);
         }
         $reviews['pages'] = pages($total, $page, $num, 'javascript:reviews_next_page({$page})');
         if (pc_base::load_config('system', 'charset') == 'gbk') {
             $reviews = array_iconv($reviews, 'gbk', 'utf-8');
         }
         echo json_encode($reviews);
     } else {
         exit('0');
     }
 }
Exemplo n.º 10
0
Arquivo: index.php Projeto: hxzyzz/ddc
	public function ajax() {
		$commentid =& $this->commentid;
		$siteid =& $this->siteid;
		$num = isset($_GET['num']) && intval($_GET['num']) ? intval($_GET['num']) : 20;
		$direction = isset($_GET['direction']) && intval($_GET['direction']) ? intval($_GET['direction']) : 0;
		$pc_tag = pc_base::load_app_class('comment_tag');
		$comment = array();
		if ($comment = $pc_tag->get_comment(array('commentid'=>$commentid))) {
			$page = isset($_GET['page']) && intval($_GET['page']) ? intval($_GET['page']) : 1;
			$offset = ($page-1)*$num;
			$data = array('commentid'=>$commentid, 'site'=>$siteid, 'limit'=>$offset.','.$num, 'direction'=>$direction);
			$comment['data'] = $pc_tag->lists($data);
			pc_base::load_sys_class('format', '', 0);
			foreach ($comment['data'] as $k=>$v) {
				$comment['data'][$k]['format_time'] = format::date($v['creat_at'], 1);
			}
			switch ($direction) {
				case '1'://正
					$total = $comment['square'];
					break;
					
				case '2'://反
					$total = $comment['anti'];
					break;
					
				case '3'://中
					$total = $comment['neutral'];
					break;
					
				default:
					$total = $comment['total'];
					break;
			}
			$comment['pages'] = pages($total, $page, $num, 'javascript:comment_next_page({$page})');
			if (pc_base::load_config('system', 'charset') == 'gbk') {
				$comment = array_iconv($comment, 'gbk', 'utf-8');
			}
			echo json_encode($comment);
		} else {
			exit('0');
		}
	}
Exemplo n.º 11
0
<div class="pad-lr-10">
<div id="searchid" style="display:">
<form name="searchform" action="" method="get" >
<input type="hidden" value="special" name="m">
<input type="hidden" value="special" name="c">
<input type="hidden" value="import" name="a">
<input type="hidden" value="<?php echo $_GET['specialid']?>" name="specialid">
<table width="100%" cellspacing="0" class="search-form">
    <tbody>
		<tr>
		<td>
		<div class="explain-col">
 			<?php echo $model_form?>&nbsp;&nbsp; <?php echo L('keyword')?>£º<input type='text' name="key" id="key" value="<?php echo $_GET['key'];?>" size="25"> <div class="bk10"></div>
<span id="catids"></span>&nbsp;&nbsp; 
				<?php echo L('input_time')?>£º
				<?php $start_f = $_GET['start_time'] ? $_GET['start_time'] : format::date(SYS_TIME-2592000);$end_f = $_GET['end_time'] ? $_GET['end_time'] : format::date(SYS_TIME+86400);?>
				<?php echo form::date('start_time', $start_f, 1)?> - <?php echo form::date('end_time', $end_f, 1)?>
				 <input type="submit" name="search" class="button" value="<?php echo L('search')?>" />
	</div>
		</td>
		</tr>
    </tbody>
</table>
</form>
</div>
<div class="table-list">
<form name="myform" id="myform" action="?m=special&c=special&a=import&specialid=<?php echo $_GET['specialid']?>&modelid=<?php echo $_GET['modelid']?>" method="post">
    <table width="100%">
        <thead>
            <tr>
			<th width="40"><input type="checkbox" value="" id="check_box" onclick="selectall('ids[]');"></th>
Exemplo n.º 12
0
        ?>
</td>	
	<td width="15%" align="center"><?php 
        echo $info['return_id'];
        ?>
</td>
	<td width="5%" align="center"><?php 
        echo sms_status($info['status']);
        ?>
</td>
	<td width="10%" align="center"><?php 
        echo $info['ip'];
        ?>
</td>
	<td width="20%" align="center"><?php 
        echo format::date($info['posttime'], 1);
        ?>
</td>
	</tr>
<?php 
    }
}
?>
    </tbody>
    </table>
  
    <div class="btn"></div>  </div>

 <div id="pages"> <?php 
echo $pages;
?>
Exemplo n.º 13
0
        if ($r['posids']) {
            ?>
<img src="<?php 
            echo IMG_PATH;
            ?>
icon/small_elite.gif"><?php 
        }
        ?>
</h5>
								<p><?php 
        echo $r['description'];
        ?>
</p>
							</div>
							<div class="adds">发布时间:<?php 
        echo format::date($r[inputtime], 1);
        ?>
</div>
						</li>
						<?php 
        $n++;
    }
}
unset($n);
?>
						<?php 
if (empty($data)) {
    ?>
未找到结果<?php 
}
?>
Exemplo n.º 14
0
 <?php 
if(is_array($infos)){
	foreach($infos as $info){
?>   
	<tr>
	<td align="center" width="40"><input class="inputcheckbox" name="id[]" value="<?php echo $info['id'];?>" type="checkbox"></td>
	<td width="40" align="center"><?php echo $info['id']?></td>
	<td width="80" align="center"><input type='text' name='listorder[<?php echo $info['id']?>]' value="<?php echo $info['listorder']?>" class="input-text-c" size="4"></td>
	<td>
    <div class="col-left mr10" style="width:146px; height:112px"><?php if ($info['thumb']) {?>
<a href="<?php echo $info['url']?>" target="_blank"><img src="<?php echo $info['thumb']?>" width="146" height="112" style="border:1px solid #eee" align="left"></a><?php }?>
</div>
<div class="col-auto">  
    <h2 class="title-1 f14 lh28 mb6 blue"><a href="<?php echo $info['url']?>" target="_blank"><?php echo $info['title']?></a></h2>
    <div class="lh22"><?php echo $info['description']?></div>
<p class="gray4"><?php echo L('create_man')?>:<a href="#" class="blue"><?php echo $info['username']?></a>, <?php echo L('create_time')?>:<?php echo format::date($info['createtime'], 1)?></p>
</div>
	</td>
	<td align="center"><span style="height:22"><a href='?m=special&c=content&a=init&specialid=<?php echo $info['id']?>' onclick="javascript:openwinx('?m=special&c=content&a=add&specialid=<?php echo $info['id']?>&pc_hash=<?php echo $_SESSION['pc_hash']?>','')"><?php echo L('add_news')?></a></span> | 
<span style="height:22"><a href='javascript:import_c(<?php echo $info['id']?>);void(0);'><?php echo L('import_news')?></a></span><br />
<span style="height:22"><a href='?m=special&c=content&a=init&specialid=<?php echo $info['id']?>'><?php echo L('manage_news')?></a></span> | 
<span style="height:22"><a href='?m=special&c=template&specialid=<?php echo $info['id']?>' style="color:red" target="_blank"><?php echo L('template_manage')?></a></span><br/>
<span style="height:22"><a href='?m=special&c=special&a=elite&value=<?php if($info['elite']==0) {?>1<?php } elseif($info['elite']==1) { ?>0<?php }?>&id=<?php echo $info['id']?>'><?php if($info['elite']==0) { echo L('elite_special'); } else {?><font color="red"><?php echo L('remove_elite')?></font><?php }?></a></span> | 
<span style="height:22"><a href="javascript:comment('<?php echo id_encode('special', $info['id'], $this->get_siteid())?>', '<?php echo addslashes(new_html_special_chars($info['title']))?>');void(0);"><?php echo L('special_comment')?></a></span><br/>
<span style="height:22"><a href="?m=special&c=special&a=edit&specialid=<?php echo $info['id']?>&menuid=<?php echo $_GET['menuid']?>"><?php echo L('edit_special')?></a></span> | 
<span style="height:22"><a href="?m=special&c=special&a=delete&id=<?php echo $info['id']?>" onclick="return confirm('<?php echo L('confirm', array('message'=>addslashes(new_html_special_chars($info['title']))))?>')"><?php echo L('del_special')?></a></span></td>
	</tr>
<?php 
	}
}
?>
Exemplo n.º 15
0
        ?>
<input  class="button"  type="button" value="<?php 
        echo L('delete');
        ?>
" onclick="check(<?php 
        echo $v['id'];
        ?>
, -1, '<?php 
        echo $v['dianpingid'];
        ?>
')" />
</span><?php 
        echo $v['username'];
        ?>
 (127.0.0.1) 于 <?php 
        echo format::date($v['addtime'], 1);
        ?>
 </h5>
<?php 
        if (!empty($v['content'])) {
            ?>
    <div class="content">
    	<pre><?php 
            echo $v['content'];
            ?>
</pre>
    </div>
<?php 
        }
        ?>
        <?php 
Exemplo n.º 16
0
		<td valign="top">
		<div class="iptd"><input class="tit_ipt" value="<?php echo $r['title'];?>" type="text" id="title_<?php echo $r['id'];?>"></input>
		<textarea name="description" cols="96%" rows="3" id="description_<?php echo $r['id'];?>" max="255" class="cps_ipt"><?php echo $r['description']?></textarea>
		</div>
		</td>
		<td align='center' title="<?php echo L('today_hits');?>:<?php echo $hits_r['dayviews'];?>&#10;<?php echo L('yestoday_hits');?>:<?php echo $hits_r['yestodayviews'];?>&#10;<?php echo L('week_hits');?>:<?php echo $hits_r['weekviews'];?>&#10;<?php echo L('month_hits');?>:<?php echo $hits_r['monthviews'];?>"><?php echo $hits_r['views'];?></td>
		<td align='center'>
		<?php
		if($r['sysadd']==0) {
			echo "<a href='?m=member&c=member&a=memberinfo&username="******"&pc_hash=".$_SESSION['pc_hash']."' >".$r['username']."</a>"; 
			echo '<img src="'.IMG_PATH.'icon/contribute.png" title="'.L('member_contribute').'">';
		} else {
			echo $r['username'];
		}
		?></td>
		<td align='center'><?php echo format::date($r['updatetime'],1);?></td>
		<td align='center'><a href="javascript:;" onclick="javascript:openwinx('?m=content&c=content&a=edit&catid=<?php echo $catid;?>&id=<?php echo $r['id']?>','')"><?php echo L('edit');?></a> | <a href="javascript:view_comment('<?php echo id_encode('content_'.$catid,$r['id'],$this->siteid);?>','<?php echo safe_replace($r['title']);?>')"><?php echo L('comment');?></a></td>
	</tr>
     <?php }
	}
	?>
</tbody>
     </table>
    <div class="btn"><label for="check_box"><?php echo L('selected_all');?>/<?php echo L('cancel');?></label>
		<input type="hidden" value="<?php echo $pc_hash;?>" name="pc_hash">
    	<input type="button" class="button" value="<?php echo L('listorder');?>" onclick="myform.action='?m=content&c=content&a=listorder&dosubmit=1&catid=<?php echo $catid;?>&steps=<?php echo $steps;?>';myform.submit();"/>
		<?php if($category['content_ishtml']) {?>
		<input type="button" class="button" value="<?php echo L('createhtml');?>" onclick="myform.action='?m=content&c=create_html&a=batch_show&dosubmit=1&catid=<?php echo $catid;?>&steps=<?php echo $steps;?>';myform.submit();"/>
		<?php }
		if($status!=99) {?>
		<input type="button" class="button" value="<?php echo L('passed_checked');?>" onclick="myform.action='?m=content&c=content&a=pass&catid=<?php echo $catid;?>&steps=<?php echo $steps;?>';myform.submit();"/>
Exemplo n.º 17
0
 public function account_manage()
 {
     $memberinfo = $this->memberinfo;
     //初始化phpsso
     $phpsso_api_url = $this->_init_phpsso();
     //获取头像数组
     $avatar = $this->client->ps_getavatar($this->memberinfo['phpssouid']);
     $grouplist = getcache('grouplist');
     $member_model = getcache('member_model', 'commons');
     //获取用户模型数据
     $this->db->set_model($this->memberinfo['modelid']);
     $member_modelinfo_arr = $this->db->get_one(array('userid' => $this->memberinfo['userid']));
     $model_info = getcache('model_field_' . $this->memberinfo['modelid'], 'model');
     foreach ($model_info as $k => $v) {
         if ($v['formtype'] == 'omnipotent') {
             continue;
         }
         if ($v['formtype'] == 'image') {
             $member_modelinfo[$v['name']] = "<a href='{$member_modelinfo_arr[$k]}' target='_blank'><img src='{$member_modelinfo_arr[$k]}' height='40' widht='40' onerror=\"this.src='{$phpsso_api_url}/statics/images/member/nophoto.gif'\"></a>";
         } elseif ($v['formtype'] == 'datetime' && $v['fieldtype'] == 'int') {
             //如果为日期字段
             $member_modelinfo[$v['name']] = format::date($member_modelinfo_arr[$k], $v['format'] == 'Y-m-d H:i:s' ? 1 : 0);
         } elseif ($v['formtype'] == 'images') {
             $tmp = string2array($member_modelinfo_arr[$k]);
             $member_modelinfo[$v['name']] = '';
             if (is_array($tmp)) {
                 foreach ($tmp as $tv) {
                     $member_modelinfo[$v['name']] .= " <a href='{$tv['url']}' target='_blank'><img src='{$tv['url']}' height='40' widht='40' onerror=\"this.src='{$phpsso_api_url}/statics/images/member/nophoto.gif'\"></a>";
                 }
                 unset($tmp);
             }
         } elseif ($v['formtype'] == 'box') {
             //box字段,获取字段名称和值的数组
             $tmp = explode("\n", $v['options']);
             if (is_array($tmp)) {
                 foreach ($tmp as $boxv) {
                     $box_tmp_arr = explode('|', trim($boxv));
                     if (is_array($box_tmp_arr) && isset($box_tmp_arr[1]) && isset($box_tmp_arr[0])) {
                         $box_tmp[$box_tmp_arr[1]] = $box_tmp_arr[0];
                         $tmp_key = intval($member_modelinfo_arr[$k]);
                     }
                 }
             }
             if (isset($box_tmp[$tmp_key])) {
                 $member_modelinfo[$v['name']] = $box_tmp[$tmp_key];
             } else {
                 $member_modelinfo[$v['name']] = $member_modelinfo_arr[$k];
             }
             unset($tmp, $tmp_key, $box_tmp, $box_tmp_arr);
         } elseif ($v['formtype'] == 'linkage') {
             //如果为联动菜单
             $tmp = string2array($v['setting']);
             $tmpid = $tmp['linkageid'];
             $linkagelist = getcache($tmpid, 'linkage');
             $fullname = $this->_get_linkage_fullname($member_modelinfo_arr[$k], $linkagelist);
             $member_modelinfo[$v['name']] = substr($fullname, 0, -1);
             unset($tmp, $tmpid, $linkagelist, $fullname);
         } else {
             $member_modelinfo[$v['name']] = $member_modelinfo_arr[$k];
         }
     }
     include template('member', 'account_manage');
 }
Exemplo n.º 18
0
?>
</h6>
	 <input type="text" name="data[author]" value="" size="30"> 
	<h6> <?php 
echo L('islink');
?>
</h6>
	 <input type="text" name="linkurl" id="linkurl" value="" size="30" maxlength="255" disabled> <input name="info[islink]" type="checkbox" id="islink" value="1" onclick="ruselinkurl();" > <font color="red"><?php 
echo L('islink');
?>
</font> 
	<h6> <?php 
echo L('inputtime');
?>
</h6> <?php 
echo form::date('info[inputtime]', format::date(SYS_TIME, 1), 1);
?>
	<h6> <?php 
echo L('template_style');
?>
</h6> <?php 
echo form::select($template_list, $style, 'name="data[style]" id="style" onchange="load_file_list(this.value)"', L('please_select'));
?>
	<h6> <?php 
echo L('show_template');
?>
</h6> <span id="show_template"><script type="text/javascript">$.getJSON('?m=admin&c=category&a=public_tpl_file_list&style=<?php 
echo $style;
?>
&module=special&templates=show&id=<?php 
echo $show_template;
Exemplo n.º 19
0
        ?>
, -1, '<?php 
        echo new_html_special_chars($data['commentid']);
        ?>
')" />
</span><?php 
        echo $data['username'];
        ?>
 (<?php 
        echo $data['ip'];
        ?>
) <?php 
        echo L('chez');
        ?>
 <?php 
        echo format::date($data['creat_at'], 1);
        ?>
 <?php 
        echo L('release');
        ?>
 </h5>
    <div class="content">
    	<pre><?php 
        echo $data['content'];
        ?>
</pre>
    </div>
    <div class="bk20 hr mb8"></div>
</div>
<?php 
    }
Exemplo n.º 20
0
		<td align="center" width="16"><input class="inputcheckbox " name="ids[]" value="<?php 
        echo $v['id'];
        ?>
" type="checkbox"></td> 
		<td width="130"><?php 
        echo $v['username'];
        ?>
<br /><?php 
        echo $v['ip'];
        ?>
</td>
		<td><font color="#888888"><?php 
        echo L('chez');
        ?>
 <?php 
        echo format::date($v['creat_at'], 1);
        ?>
 <?php 
        echo L('release');
        ?>
</font><br /><?php 
        echo $v['content'];
        ?>
</td>
		<td width="230"><a href="?m=comment&c=comment_admin&a=listinfo&search=1&searchtype=0&keyword=<?php 
        echo urlencode($comment_info['title']);
        ?>
&pc_hash=<?php 
        echo $_SESSION['pc_hash'];
        ?>
&tableid=<?php 
Exemplo n.º 21
0
    ?>
</td>
		<td align="left"><?php 
    echo $v['type'];
    ?>
</td>
		<td align="left"><?php 
    echo $v['regip'];
    ?>
</td>
		<td align="left"><?php 
    echo format::date($v['regdate'], 1);
    ?>
</td>
		<td align="left"><?php 
    echo format::date($v['lastdate'], 1);
    ?>
</td>
		<td align="left"><a href="?m=admin&c=member&a=edit&uid=<?php 
    echo $v['uid'];
    ?>
">[<?php 
    echo L('edit');
    ?>
]</a></td>
	</tr>
<?php 
}
?>
   </tbody>
    </table>
Exemplo n.º 22
0
    echo $v['userid'];
    ?>
" name="userid[]"></td>
		<td align="left"><?php 
    echo $v['username'];
    ?>
</td>
		<td align="left"><?php 
    echo $v['email'];
    ?>
</td>
		<td align="left" title="<?php 
    echo $v['regip'];
    ?>
"><?php 
    echo format::date($v['regdate'], 1);
    ?>
</td>
		<td align="left"><a href="javascript:member_verify(<?php 
    echo $v['userid'];
    ?>
, '<?php 
    echo $v['modelid'];
    ?>
', '')"><?php 
    echo $member_model[$v['modelid']]['name'];
    ?>
<img src="<?php 
    echo IMG_PATH;
    ?>
admin_img/detail.png"></a></td>
Exemplo n.º 23
0
			<th width="160"><?php echo L('operations_manage')?></th>
            </tr>
        </thead>
        <tbody>
 <?php 
if(is_array($infos)){
	foreach($infos as $info){
?>   
	<tr>
	<td align="center" width="40"><input class="inputcheckbox" <?php if (!empty($imported) && in_array($info['id'], $imported)){?>disabled<?php }?> name="id[]" value="<?php echo $info['id'];?>" type="checkbox"></td>
	<td width="40" align="center"><?php echo $info['id']?></td>
	<td><div class="col-left mr10" style="width:146px; height:112px"><img src="<?php echo format_url($info['coverurl'])?>" width="146" height="112" style="border:1px solid #eee" align="left"></div>
	<div class="col-auto">  
		<h2 class="title-1 f14 lh28 mb6 blue"><?php echo $info['title']?></h2>
		<div class="lh22"><?php echo $info['desc']?></div>
	<p class="gray4"><?php echo L('create_time')?>:<?php echo format::date(substr(trim($info['createtime']), 0, 10), 1)?></p>
	<p class="gray4">播放次数:<?php echo $info['videocount']?></p>
	</div>
	</td>
	<td align="center"><span style="height:22"><?php if (!empty($imported) && in_array($info['id'], $imported)){?><font color="red">专辑已载入<?php } else {?><a href='?m=special&c=album&a=import&id=<?php echo $info['id']?>&page=<?php echo $_GET['page'];?>&pc_hash=<?php echo $_GET['pc_hash'];?>'>载入此专辑</a><?php }?></span><br /><span style="height:22"><a href="?m=special&c=album&a=content_list&id=<?php echo $info['id']?>&menuid=<?php echo $_GET['menuid']?>&pc_hash=<?php echo $_GET['pc_hash'];?>">查看专辑下的视频</a></span></td>
	</tr>
<?php 
	}
}
?>
</tbody>
    </table>
  
    <div class="btn"><label for="check_box"><?php echo L('selected_all')?>/<?php echo L('cancel')?></label>
        <input name='dosubmit' type='submit' class="button" value='载入'>&nbsp;
       </div>
Exemplo n.º 24
0
        echo L('restore');
        ?>
</a> | <a href="?m=template&c=template_bak&a=del&id=<?php 
        echo $v['id'];
        ?>
&style=<?php 
        echo $this->style;
        ?>
&dir=<?php 
        echo $this->dir;
        ?>
&filename=<?php 
        echo $this->filename;
        ?>
" onclick="return confirm('<?php 
        echo L('confirm', array('message' => format::date($v['creat_at'], 1)));
        ?>
')"><?php 
        echo L('delete');
        ?>
</a></td>
</tr>
<?php 
    }
}
?>
</tbody>
</table>
</from>
</div>
</div>
Exemplo n.º 25
0
</a></h2>
    <div class="lh22"><?php 
        echo $info['description'];
        ?>
</div>
<p class="gray4"><?php 
        echo L('create_man');
        ?>
:<a href="#" class="blue"><?php 
        echo $info['username'];
        ?>
</a>, <?php 
        echo L('create_time');
        ?>
:<?php 
        echo format::date($info['createtime'], 1);
        ?>
</p>
</div>
	</td>
	<td align="center"><span style="height:22"><a href='?m=special&c=content&a=init&specialid=<?php 
        echo $info['id'];
        ?>
' onclick="javascript:openwinx('?m=special&c=content&a=add&specialid=<?php 
        echo $info['id'];
        ?>
&pc_hash=<?php 
        echo $_SESSION['pc_hash'];
        ?>
','')"><?php 
        echo L('add_news');
Exemplo n.º 26
0
    echo $r['id'];
    ?>
)" class="cu" title="<?php 
    echo L('click_to_select');
    ?>
">
		<td align='left' ><?php 
    echo $r['title'];
    ?>
</td>
		<td align='center'><?php 
    echo $this->categorys[$r['catid']]['catname'];
    ?>
</td>
		<td align='center'><?php 
    echo format::date($r['inputtime']);
    ?>
</td>
	</tr>
	 <?php 
}
?>
	    </tbody>
    </table>
   <div id="pages"><?php 
echo $pages;
?>
</div>
</div>
</div>
<style type="text/css">
Exemplo n.º 27
0
if(is_array($infos)){
	foreach($infos as $info){
		$space = $this->s_db->get_one(array('spaceid'=>$info['spaceid']), 'name');
?>   
	<tr>
	<td align="center">
	<input type="checkbox" name="id[]" value="<?php echo $info['id']?>">
	</td>
	<td align="center"><?php echo $info['id']?></td>
	<th width="70"><input type="text" size="5" name="listorder[<?php echo $info['id']?>]" value="<?php echo $info['listorder']?>" id="listorder"></th>
	<td><?php echo $info['name']?></td>
	<td align="center"><?php echo $types[$info['type']]?></td>
	<td align="center"><?php echo $space['name']?></td>
	<td align="center"><?php if($info['disabled']) { echo L('stop'); } elseif((strtotime($info['enddate'])<SYS_TIME) && (strtotime($info['enddate'])>0)) { echo L('past'); } else { echo L('start'); }?></td>
	<td align="center"><?php echo $info['clicks']?></td>
	<td align="center"><?php echo format::date($info['addtime'], 1);?></td>
	<td align="center"><a href="index.php?m=poster&c=poster&a=edit&id=<?php echo $info['id'];?>&pc_hash=<?php echo $_SESSION['pc_hash'];?>&menuid=<?php echo $_GET['menuid']?>" ><?php echo L('edit')?></a>|<a href="?m=poster&c=poster&a=stat&id=<?php echo $info['id']?>&spaceid=<?php echo $_GET['spaceid'];?>"><?php echo L('stat')?></a></td>
	</tr>
<?php 
	}
}
?>
</tbody>
    </table>
  
    <div class="btn"><label for="check_box"><?php echo L('selected_all')?>/<?php echo L('cancel')?></label>
    	<input name='submit' type='submit' class="button" value='<?php echo L('listorder')?>'>&nbsp;
        <input name='submit' type='submit' class="button" value='<?php echo L('start')?>' onClick="document.myform.action='?m=poster&c=poster&a=public_approval&passed=0'">&nbsp;
        <input name='submit' type='submit' class="button" value='<?php echo L('stop')?>' onClick="document.myform.action='?m=poster&c=poster&a=public_approval&passed=1'">&nbsp;
		<input name="submit" type="submit" class="button" value="<?php echo L('delete')?>" onClick="document.myform.action='?m=poster&c=poster&a=delete';return confirm('<?php echo L('confirm', array('message' => L('selected')))?>')">&nbsp;&nbsp;</div>  </div>
 <div id="pages"><?php echo $this->db->pages;?></div>
Exemplo n.º 28
0
            case 'del':
                echo L('delete');
                break;
        }
        ?>
</td>
<td align="center"><?php 
        echo $v['siteid'];
        ?>
</td>
<td align="center"><?php 
        echo $v['path'];
        ?>
</td>
<td align="center"><?php 
        echo format::date($v['times'], 1);
        ?>
</td>
<?php 
        $i = 1;
        foreach ($this->point as $d) {
            ?>
<td align="center"><?php 
            switch ($v['status' . $i]) {
                case -1:
                    echo '<div class="onError">' . L("failure") . '</div>';
                    break;
                case 0:
                    echo '<div class="onShow">' . L('not_upload') . '</div>';
                    break;
                case 1:
Exemplo n.º 29
0
?>
> <input name="info[islink]" type="checkbox" id="islink" value="1"<?php 
if ($info['islink']) {
    ?>
 checked<?php 
}
?>
 onclick="ruselinkurl();" > <font color="red"><?php 
echo L('islink');
?>
</font> 
	<h6> <?php 
echo L('inputtime');
?>
</h6> <?php 
echo form::date('info[inputtime]', format::date($info['inputtime'], 1), 1);
?>
	<h6> <?php 
echo L('template_style');
?>
</h6> <?php 
echo form::select($template_list, $data['style'], 'name="data[style]" id="style" onchange="load_file_list(this.value)"', L('please_select'));
?>
	<h6> <?php 
echo L('show_template');
?>
</h6> <span id="show_template"><?php 
echo '<script type="text/javascript">$.getJSON(\'?m=admin&c=category&a=public_tpl_file_list&style=' . $style . '&id=' . $data['show_template'] . '&module=special&templates=show&name=data\', function(data){$(\'#show_template\').html(data.show_template);});</script>';
?>
</span> 
          </div>
Exemplo n.º 30
0
 <div class="comment_button"><a href="?m=comment&c=comment_admin&a=lists&show_center_id=1&commentid=<?php echo $commentid?>&hot=0"<?php if (empty($hot)) {?> class="on"<?php }?>>×îÐÂ</a> <a href="?m=comment&c=comment_admin&a=lists&show_center_id=1&commentid=<?php echo $commentid?>&hot=1"<?php if ($hot==1) {?> class="on"<?php }?>>×îÈÈ</a></div> 	
 <div class="btn"><label for="check_box"><?php echo L('select_all')?>/<?php echo L('cancel')?></label></div>
 
 <form action="?" method="get">
 <input type="hidden" name="m" value="comment">
  <input type="hidden" name="c" value="check">
   <input type="hidden" name="a" value="ajax_checks">
    <input type="hidden" name="type" value="-1">
    <input type="hidden" name="form" value="1">
    <input type="hidden" name="commentid" value="<?php echo $commentid?>">
<div class="comment">
<?php if(is_array($list)) foreach($list as $v) :
?>
<div  id="tbody_<?php echo $v['id']?>">
<h5 class="title fn" ><span class="rt"><input  class="button"  type="button" value="<?php echo L('delete')?>" onclick="check(<?php echo $v['id']?>, -1, '<?php echo $v['commentid']?>')" />
</span><input type="checkbox" name="id[]" value="<?php echo $v['id']?>"><?php echo direction($v['direction'])?> <?php echo $v['username']?> (<?php echo $v['ip']?>) <?php echo L('chez')?> <?php echo format::date($v['creat_at'], 1)?> <?php echo L('release')?> <?php echo L('support')?>£º<?php echo $v['support']?></h5>
    <div class="content">
    	<pre><?php echo $v['content']?></pre>
    </div>
    <div class="bk20 hr mb8"></div>
</div>
<?php endforeach;?>
</div>
 <div class="btn"><label for="check_box"><input type="checkbox"  onclick="selectall('id[]');" id="check_box" style="width:0px;height: 0px;" /><?php echo L('select_all')?>/<?php echo L('cancel')?></label> <input type="submit" onclick="return confirm('<?php echo L('are_you_sure_you_want_to_delete')?>')" class="button" value="<?php echo L('delete')?>" /></div>
 </form>
<div id="pages"><?php echo $pages;?></div>
</div>
<script type="text/javascript">
<?php if(!isset($_GET['show_center_id'])) {?> window.top.$('#display_center_id').css('display','none');<?php }?>
function check(id, type, commentid) {
	if(type == -1 && !confirm('<?php echo L('are_you_sure_you_want_to_delete')?>')) {