本文整理汇总了PHP中Contacts::setFname方法的典型用法代码示例。如果您正苦于以下问题:PHP Contacts::setFname方法的具体用法?PHP Contacts::setFname怎么用?PHP Contacts::setFname使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Contacts
的用法示例。
在下文中一共展示了Contacts::setFname方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
// 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) {
?>
<div class="panel panel-success">
示例2: array
include "/srv/athenace/lib/shared/functions_form.php";
$fields = array("fname", "sname", "co_name", "role", "notes", "custid", "suppid");
foreach ($fields as $field) {
if (!isset($_POST[$field])) {
$_POST[$field] = '';
}
}
if (isset($_GET['go']) && $_GET['go'] == "y") {
$logContent = "\n";
$pw = generatePassword();
// Add to Address table
$addsid = db_addAddress($_POST);
$logon = generateContactlogon($_POST['fname'], $_POST['sname']);
// Insert into DB
$contactsNew = new Contacts();
$contactsNew->setFname($_POST['fname']);
$contactsNew->setSname($_POST['sname']);
$contactsNew->setCo_name($_POST['co_name']);
$contactsNew->setRole($_POST['role']);
$contactsNew->setCustid($_POST['custid']);
$contactsNew->setSuppid($_POST['suppid']);
$contactsNew->setAddsid($addsid);
$contactsNew->setNotes($_POST['notes']);
$contactId = $contactsNew->insertIntoDB();
// Insert into DB
$pwdNew = new Pwd();
$pwdNew->setUsr($logon);
$pwdNew->setContactsid($contactId);
$pwdNew->setSeclev(100);
$pwdNew->setPw(mkPwd($pw));
file_put_contents('/etc/athenace/pwd', "{$_POST['custid']}\t{$_POST['suppid']}\t{$logon}\t{$pw}\n", FILE_APPEND);