本文整理汇总了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');
}
示例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');
}
}
示例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!'));
}
}
}
示例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');
}