本文整理汇总了PHP中Messages::del方法的典型用法代码示例。如果您正苦于以下问题:PHP Messages::del方法的具体用法?PHP Messages::del怎么用?PHP Messages::del使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Messages
的用法示例。
在下文中一共展示了Messages::del方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: intval
if (is_int($_POST['to'])) {
$to_memberid = intval($_POST['to']);
$member_info = $pdb->GetRow("SELECT id,username FROM {$tb_prefix}members WHERE id='" . $to_memberid . "'");
} else {
$member_info = $pdb->GetRow("SELECT id,username FROM {$tb_prefix}members WHERE username='" . $_POST['to'] . "'");
}
if (!$member_info || empty($member_info) || $member_info['id'] == $the_memberid) {
flash();
}
$result = $pms->SendToUser($the_membername, $member_info['username'], $vals);
if (!$result) {
flash();
}
}
if (isset($_POST['del'])) {
$result = $pms->del($_POST['id'], "to_member_id=" . $the_memberid);
if ($result) {
pheader("location:pms.php");
} else {
flash();
}
}
$tpl_file = "pms";
$page->displaypg = 15;
$amount = $pms->findCount(null, $conditions);
$page->setPagenav($amount);
$result = $pms->findAll("id,from_member_id,cache_from_username,title,content,status,created", null, $conditions, "id DESC", $page->firstcount, $page->displaypg);
setvar("MessageStatus", $pms->getReadStatus());
if (!empty($result)) {
for ($i = 0; $i < count($result); $i++) {
$result[$i]['senddate'] = df($result[$i]['created']);
示例2: intval
if (is_int($_POST['to'])) {
$to_memberid = intval($_POST['to']);
$member_info = $pdb->GetRow("SELECT id,username FROM {$tb_prefix}members WHERE id='" . $to_memberid . "'");
} else {
$member_info = $pdb->GetRow("SELECT id,username FROM {$tb_prefix}members WHERE username='" . $_POST['to'] . "'");
}
if (!$member_info || empty($member_info) || $member_info['id'] == $_SESSION['MemberID']) {
flash();
}
$result = $pms->SendToUser($_SESSION['MemberName'], $member_info['username'], $vals);
if (!$result) {
flash();
}
}
if (isset($_POST['del'])) {
$result = $pms->del($_POST['id'], "to_member_id=" . $_SESSION['MemberID']);
if ($result) {
pheader("location:pms.php");
} else {
flash();
}
}
$tpl_file = "pms";
$page->displaypg = 15;
$amount = $pms->findCount(null, $conditions);
$page->setPagenav($amount);
$result = $pms->findAll("id,from_member_id,cache_from_username,title,content,status,created", null, $conditions, "id DESC", $page->firstcount, $page->displaypg);
setvar("MessageStatus", $pms->getReadStatus());
if (!empty($result)) {
for ($i = 0; $i < count($result); $i++) {
$result[$i]['senddate'] = date("Y-m-d", $result[$i]['created']);
示例3: Messages
/**
* [PHPB2B] Copyright (C) 2007-2099, Ualink Inc. All Rights Reserved.
* The contents of this file are subject to the License; you may not use this file except in compliance with the License.
*
* @version $Revision: 2075 $
*/
require "../libraries/common.inc.php";
uses("message");
require PHPB2B_ROOT . 'libraries/page.class.php';
require "session_cp.inc.php";
$message = new Messages();
$page = new Pages();
$conditions = array();
$tpl_file = "message";
if (isset($_POST['del']) && is_array($_POST['id'])) {
$deleted = $message->del($_POST['id']);
if (!$deleted) {
flash();
}
}
if (isset($_POST['save'])) {
$sended = $message->SendToUser($current_adminer, $_POST['to_username'], $_POST['data']['message']);
if (!$sended) {
flash(null, null, 0);
} else {
pheader("location:message.php");
}
}
if (isset($_GET['do'])) {
$do = trim($_GET['do']);
if (!empty($_GET['id'])) {