StationMessageMsgListAction.class.php 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Fanwe 方维直播系统
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2011 http://www.fanwe.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Author: 云淡风轻(1956838968@qq.com)
  8. // +----------------------------------------------------------------------
  9. class StationMessageMsgListAction extends CommonAction{
  10. private $navs;
  11. public function __construct()
  12. {
  13. parent::__construct();
  14. $nav = array(
  15. 'index' => array(
  16. 'name' => '首页', //首页
  17. ),
  18. 'deals' => array(
  19. 'name' => '项目列表',
  20. 'acts' => array(
  21. 'index' => '产品众筹列表',
  22. 'selfless' => '公益众筹列表',
  23. 'stock' => '股权众筹列表',
  24. ),
  25. ),
  26. 'finance' => array(
  27. 'name' => '融资模块',
  28. 'acts' => array(
  29. 'index' => '融资公司列表',
  30. 'company_show' => '融资公司详情',
  31. 'company_finance' => '融资详情',
  32. ),
  33. ),
  34. 'investor' => array(
  35. 'name' => '天使投资人',
  36. 'acts' => array(
  37. 'invester_list' => '列表',
  38. ),
  39. ),
  40. 'deal' => array(
  41. 'name' => '项目详情',
  42. 'acts' => array(
  43. 'show' => '详情',
  44. 'update' => '动态',
  45. 'support' => '支持',
  46. 'comment' => '评论',
  47. ),
  48. ),
  49. 'news' => array(
  50. 'name' => '动态',
  51. 'acts' => array(
  52. 'index' => '最新',
  53. 'fav' => '关注',
  54. ),
  55. ),
  56. 'article_cate' => array(
  57. 'name' => '文章列表',
  58. ),
  59. 'article' => array(
  60. 'name' => '文章内容',
  61. 'acts' => array(
  62. 'index' => '详情',
  63. ),
  64. ),
  65. 'score_mall' => array(
  66. 'name' => '积分商城',
  67. ),
  68. 'score_good_show' => array(
  69. 'name' => '积分详情',
  70. 'acts' => array(
  71. 'index' => '详情',
  72. ),
  73. ),
  74. 'faq' => array(
  75. 'name' => '新手帮助',
  76. ),
  77. );
  78. if(LICAI_TYPE){
  79. $nav['licai'] = array(
  80. 'name' => '理财模块',
  81. 'acts' => array(
  82. 'index' => '理财首页',
  83. 'deals' => '理财列表页',
  84. 'deal' => '理财详情页',
  85. ),
  86. );
  87. }
  88. if(HOUSE_TYPE ==1)
  89. {
  90. $nav['deals']['acts']['house']="房产众筹";
  91. }
  92. if(STOCK_TRANSFER_TYPE ==1)
  93. {
  94. $nav['stock_transfer']['name']="股权交易";
  95. }
  96. $this->navs = $nav;
  97. }
  98. public function msg_list()
  99. {
  100. if(intval($_REQUEST['action_id'])!='')
  101. {
  102. $action_id= intval($_REQUEST['action_id']);
  103. }
  104. $this->assign('action_id',$action_id);
  105. $condition['type'] = 1;
  106. if(trim($_REQUEST['dest'])!='')
  107. $condition['user_id'] = array('like','%'.trim($_REQUEST['dest']).'%');
  108. if(trim($_REQUEST['content'])!='')
  109. $condition['log_info'] = array('like','%'.trim($_REQUEST['content']).'%');
  110. $this->assign("default_map",$condition);
  111. $map = $this->_search ();
  112. //追加默认参数
  113. if($this->get("default_map"))
  114. $map = array_merge($map,$this->get("default_map"));
  115. if (method_exists ( $this, '_filter' )) {
  116. $this->_filter ( $map );
  117. }
  118. $name='UserNotify';
  119. $model = D ($name);
  120. if (! empty ( $model )) {
  121. $this->_list ( $model, $map );
  122. }
  123. $this->display ();
  124. }
  125. public function foreverdelete() {
  126. //彻底删除指定记录
  127. $ajax = intval($_REQUEST['ajax']);
  128. $id = $_REQUEST ['id'];
  129. if (isset ( $id )) {
  130. //$MODULE_NAME='PromoteMsg';
  131. $condition = array ('id' => array ('in', explode ( ',', $id ) ) );
  132. $rel_data = M("PromoteMsg")->where($condition)->findAll();
  133. foreach($rel_data as $data)
  134. {
  135. $info[] = $data['id'];
  136. }
  137. if($info) $info = implode(",",$info);
  138. $list = M("PromoteMsg")->where ( $condition )->delete();
  139. if ($list!==false) {
  140. save_log($info.l("FOREVER_DELETE_SUCCESS"),1);
  141. $this->success (l("FOREVER_DELETE_SUCCESS"),$ajax);
  142. } else {
  143. save_log($info.l("FOREVER_DELETE_FAILED"),0);
  144. $this->error (l("FOREVER_DELETE_FAILED"),$ajax);
  145. }
  146. } else {
  147. $this->error (l("INVALID_OPERATION"),$ajax);
  148. }
  149. }
  150. public function show_content()
  151. {
  152. $id = intval($_REQUEST['id']);
  153. header("Content-Type:text/html; charset=utf-8");
  154. echo M("UserNotify")->where("id=".$id)->getField("log_info");
  155. }
  156. }
  157. ?>