本文整理汇总了PHP中MemberModel::delete_member方法的典型用法代码示例。如果您正苦于以下问题:PHP MemberModel::delete_member方法的具体用法?PHP MemberModel::delete_member怎么用?PHP MemberModel::delete_member使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MemberModel
的用法示例。
在下文中一共展示了MemberModel::delete_member方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: screen_delete
public function screen_delete()
{
// データベースを操作します。
$MemberModel = new MemberModel();
if ($this->action == "confirm") {
if ($this->is_system) {
$_SESSION[_MEMBER_AUTHINFO] = $MemberModel->get_member_data_id($_GET['id']);
$this->message = "[削除する]をクリックすると ";
$this->message .= htmlspecialchars($_SESSION[_MEMBER_AUTHINFO]['last_name'], ENT_QUOTES);
$this->message .= htmlspecialchars($_SESSION[_MEMBER_AUTHINFO]['first_name'], ENT_QUOTES);
$this->message .= "さん の会員情報を削除します。";
$this->form->addElement('submit', 'submit', "削除する");
} else {
$this->message = "[退会する]をクリックすると会員情報を削除して退会します。";
$this->form->addElement('submit', 'submit', "退会する");
}
$this->next_type = 'delete';
$this->next_action = 'complete';
$this->title = '削除確認画面';
$this->file = 'delete_form.tpl';
} else {
if ($this->action == "complete") {
$MemberModel->delete_member($_SESSION[_MEMBER_AUTHINFO]['id']);
if ($this->is_system) {
unset($_SESSION[_MEMBER_AUTHINFO]);
} else {
$this->auth->logout();
}
$this->message = "会員情報を削除しました。";
$this->title = '削除完了画面';
$this->file = 'message.tpl';
}
}
$this->view_display();
}
示例2: screen_delete
public function screen_delete()
{
$btn = "";
$MemberModel = new MemberModel();
if (isset($_POST['system_delete']) && ($_POST['system_delete'] = 'on')) {
$this->action = "confirm";
}
if ($this->action == "confirm") {
if ($this->is_system) {
$this->title = "会員情報削除";
$this->message = "[削除]ボタンをクリックすると<br><br>";
$this->message .= "会員番号 <font color='red'>";
$this->message .= htmlspecialchars($_SESSION[_MEMBER_AUTHINFO]['id'], ENT_QUOTES);
$this->message .= "</font>番<br><br><font color='red'>";
$this->message .= htmlspecialchars($_SESSION[_MEMBER_AUTHINFO]['last_name'], ENT_QUOTES);
$this->message .= htmlspecialchars($_SESSION[_MEMBER_AUTHINFO]['first_name'], ENT_QUOTES);
$this->message .= "</font>さん<br><br>の情報を削除します。";
$btn = "削除";
} else {
$this->title = "退会画面";
$this->message = "下記、退会ボタンをクリックすると<br><br>すべての情報が削除され<br><br>";
$this->message .= "退会となります。";
$btn = "退会";
}
$this->file = "member_delete.tpl";
$this->next_type = "delete";
$this->next_action = "complete";
} else {
if ($this->action == "complete") {
$MemberModel->delete_member($_SESSION[_MEMBER_AUTHINFO]['id']);
if ($this->is_system) {
$this->title = "削除完了";
$this->message = "会員情報を削除しました";
$this->URL = "system.php?type=member_list";
$this->URL .= $this->add_pageID();
$this->file = "message.tpl";
} else {
$this->title = "退会完了";
$this->message = "また宜しければご利用ください";
$this->auth->logout();
$this->file = "member_delete.tpl";
}
}
}
$this->form->addElement('submit', 'submit1', $btn);
$this->view_display();
}