mode_subscribeAction.php 668 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * 此文件是流程模块【subscribe.订阅】对应控制器接口文件。
  4. */
  5. class mode_subscribeClassAction extends inputAction{
  6. protected function savebefore($table, $cans, $id, $addbo=true)
  7. {
  8. $suburlpost = $cans['suburlpost'];
  9. $optid = $cans['optid'];
  10. $to = m('subscribe')->rows("`id`<>'$id' and `optid`='$optid' and `suburlpost`='$suburlpost'");
  11. if($to>0)return '已订阅过,请到我的订阅管理下操作';
  12. }
  13. //运行订阅
  14. public function yunsubscribeAjax()
  15. {
  16. $id = (int)$this->get('id');
  17. $this->flow = m('flow')->initflow('subscribeinfo');
  18. return $this->flow->subscribe($id);
  19. }
  20. }
粤ICP备19079148号