本文整理匯總了PHP中Contacts::setContactsid方法的典型用法代碼示例。如果您正苦於以下問題:PHP Contacts::setContactsid方法的具體用法?PHP Contacts::setContactsid怎麽用?PHP Contacts::setContactsid使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Contacts
的用法示例。
在下文中一共展示了Contacts::setContactsid方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: header
include "/srv/athenace/lib/shared/functions_form.php";
if (!is_numeric($_GET['id'])) {
header("Location: /staff/?id=notFound");
exit;
}
if (isset($_GET['go']) && $_GET['go'] == "y") {
$contactsDelete = new Contacts();
$contactsDelete->setContactsid($_GET['id']);
$contactsDelete->deleteFromDB();
header("Location: /contacts/?ItemDeleted=y");
exit;
}
include "../tmpl/header.php";
$contacts = new Contacts();
// Load DB data into object
$contacts->setContactsid($_GET['id']);
$contacts->loadContacts();
$all = $contacts->getAll();
if (isset($all)) {
?>
<div class="panel panel-info">
<div class="panel-heading">
<strong>Viewing <?php
echo $contacts->getContactsid();
?>
</strong>
</div>
<div class="panel-body">
<?php
foreach ($all as $key => $value) {
示例2: array
$sqltext = "SELECT * FROM contacts,address WHERE contacts.addsid=address.addsid AND contactsid=?";
// print "<br>$sqltext";
$q = $db->select($sqltext, array($_GET['id']), 'i');
$r = $q[0];
$addsid = $r->addsid;
if (isset($_GET['remove']) && $_GET['remove'] == "y" && isset($_GET['id']) && is_numeric($_GET['id'])) {
db_delete("contacts", $_GET['id'], 'contactsid');
header("Location: /contacts/");
exit;
}
if (isset($_GET['go']) && $_GET['go'] == "y") {
// Add to Address table
$addsid = db_updateAddress($_POST, $addsid);
$contactsUpdate = new Contacts();
// Update DB
$contactsUpdate->setContactsid($_GET['id']);
$contactsUpdate->setFname($_POST['fname']);
$contactsUpdate->setSname($_POST['sname']);
$contactsUpdate->setCo_name($_POST['co_name']);
$contactsUpdate->setRole($_POST['role']);
$contactsUpdate->setCustid($_POST['custid']);
$contactsUpdate->setSuppid($_POST['suppid']);
$contactsUpdate->setNotes($_POST['notes']);
$contactsUpdate->updateDB();
header("Location: /contacts/?Updated=" . $result['id']);
exit;
}
$pagetitle = "Edit contact";
include "../tmpl/header.php";
if (isset($_GET['SentAccessEmail']) && $_GET['SentAccessEmail'] == 1) {
?>
示例3: decrypt
$parts = preg_split('/\\|/', decrypt($token));
$usr = $parts[0];
$pw = $parts[1];
if (!isset($_POST['pt']) || $_POST['pt'] == '') {
$contid = pass($usr, $pw, 'contacts');
} else {
$cke = base64_decode($_POST['pt']);
$keywords = preg_split("/\\./", $cke);
if ($keywords[4] == 'ATHENASECCHK') {
$cid = $keywords[0];
$contid = $keywords[1];
$usr = $keywords[2];
$pw = $keywords[3];
#echo "$stfid, $usr, $pw";exit;
}
}
#echo "$contid,$usr,$pw";exit;
if ($contid) {
dropCookie($contid, $usr, $pw);
// logEvent("26",$staffid,"Username:".$user);
# Update DB
$contactsUpdate = new Contacts();
$contactsUpdate->setContactsid($contid);
$contactsUpdate->setLastlogin(time());
$contactsUpdate->updateDB();
header("Location: {$cust_url}");
} else {
killCookie();
// logEvent("31",0,"Username:".$user);
header("Location: {$login_url}/?pf=y");
}