本文整理匯總了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();
}