当前位置: 首页>>代码示例>>PHP>>正文


PHP Members::read方法代码示例

本文整理汇总了PHP中Members::read方法的典型用法代码示例。如果您正苦于以下问题:PHP Members::read方法的具体用法?PHP Members::read怎么用?PHP Members::read使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Members的用法示例。


在下文中一共展示了Members::read方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: index

 public function index()
 {
     if ($this->f3->exists('SESSION.userID')) {
         $members = new Members($this->db);
         $this->f3->set('member', $members->read(array('id=?', $this->f3->get('SESSION.userID')), [])[0]);
     }
     if ($this->f3->exists('POST.submit')) {
         $this->process();
     }
     $this->f3->set('content', 'app/views/contact.htm');
     echo Template::instance()->render('app/templates/default.htm');
 }
开发者ID:Renako,项目名称:mytcg-f3,代码行数:12,代码来源:ContactController.php

示例2: logs

 public function logs()
 {
     if ($this->f3->exists('SESSION.userID')) {
         $members = new Members($this->db);
         $this->f3->set('member', $members->read(array('id=?', $this->f3->get('SESSION.userID')), [])[0]);
         $this->f3->set('content', 'app/views/logs.htm');
         echo Template::instance()->render('app/templates/default.htm');
     } else {
         $this->f3->reroute('/members/login');
     }
 }
开发者ID:Renako,项目名称:mytcg-f3,代码行数:11,代码来源:MembersController.php

示例3: quit

 private function quit()
 {
     /***********************************
     		Process Quit Form! 
     		************************************/
     $this->f3->scrub($_POST);
     $members = new Members($this->db);
     $this->f3->set('member', $members->read(array('id=?', $this->f3->get('SESSION.userID')), [])[0]);
     $this->f3->set('SESSION.flash', array());
     // nothing to validate!
     // if there are no errors, process the form
     if (count($this->f3->get('SESSION.flash')) === 0) {
         $mailer = new Mailer();
         $message = $mailer->message()->setSubject($this->f3->get('tcgname') . ': Quit Form (' . $this->f3->get('member')->name . ')')->setFrom(array($this->f3->get('noreplyemail') => 'MyTCG'))->setTo(array($this->f3->get('tcgemail')))->setReplyTo(array($this->f3->get('member')->email))->setBody(Template::instance()->render('app/templates/emails/quit-notif.htm'), 'text/html');
         if ($mailer->send($message)) {
             $this->f3->push('SESSION.flash', array('type' => 'success', 'msg' => 'Your quit form has been sent. Sorry to see you leave - we hope you\'ll change your mind and join us again in the future!'));
         } else {
             $this->f3->push('SESSION.flash', array('type' => 'danger', 'msg' => 'There was a problem processing your request. Please try again or contact us for assistance!'));
         }
     }
 }
开发者ID:Renako,项目名称:mytcg-f3,代码行数:21,代码来源:FormsController.php

示例4: delete

 public function delete($id = '')
 {
     /***********************************
     		Delete members
     		************************************/
     $members = new Members($this->db);
     $this->f3->set('member', $members->read(array('id=?', $id), [])[0]);
     $this->f3->set('SESSION.flash', array());
     if ($_SERVER['QUERY_STRING'] == "execute") {
         $members->delete($this->f3->get('member')->id);
         $this->f3->push('SESSION.flash', array('type' => 'success', 'msg' => 'Member ' . $this->f3->get('member')->name . ' deleted!'));
         $this->f3->reroute('/mytcg/members');
     }
     $this->f3->set('content', 'app/views/mytcg/members_delete.htm');
     echo Template::instance()->render('app/templates/admin.htm');
 }
开发者ID:Renako,项目名称:mytcg-f3,代码行数:16,代码来源:MyMembersController.php


注:本文中的Members::read方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。