<?php
|
|
class pl_controller extends company{
|
//企业评论
|
function index_action(){
|
|
$CompanyM = $this -> MODEL('company');
|
|
$where['cuid'] = $this->uid;
|
|
$where['status'] = '1';
|
|
$urlarr = array("c" => "pl","page" => "{{page}}");
|
|
$pageurl = Url('member',$urlarr);
|
|
$pageM = $this -> MODEL('page');
|
|
$pages = $pageM -> pageList('company_msg',$where,$pageurl,$_GET['page'],$this->config['sy_listnum']);
|
|
if($pages['total'] > 0){
|
|
$where['limit'] = $pages['limit'];
|
|
$rows = $CompanyM -> getCompanyMsgList($where);
|
}
|
$this -> yunset("rows",$rows);
|
|
$this -> company_satic();
|
|
$this -> public_action();
|
|
$this -> com_tpl('pl');
|
|
}
|
|
function save_action(){
|
|
$CompanyM = $this -> MODEL('company');
|
|
if($_POST['submit']){
|
|
$data['reply'] = $_POST['reply'];
|
|
$data['reply_time'] = time();
|
|
$id = $CompanyM -> upReplyCompanymsgInfo(array('id' => $_POST['id'], 'cuid' => $this -> uid),$data);
|
|
if($id){
|
|
$this ->MODEL('log')-> addMemberLog($this -> uid, 2,"回复企业评论",18,1);//会员日志
|
|
$this->ACT_layer_msg("回复成功!",9,"index.php?c=".$_GET['c']);
|
|
}else{
|
|
$this->ACT_layer_msg("添加失败!",8,"index.php?c=".$_GET['c']);
|
|
}
|
|
}
|
|
}
|
|
}
|
?>
|