当前位置: 首页>>代码示例>>PHP>>正文


PHP Contacts::setContactsid方法代码示例

本文整理汇总了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) {
开发者ID:athenasystems,项目名称:athena,代码行数:31,代码来源:delete.php

示例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) {
    ?>
开发者ID:athenasystems,项目名称:athena,代码行数:31,代码来源:edit.php

示例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");
}
开发者ID:athenasystems,项目名称:athena,代码行数:31,代码来源:pass.php


注:本文中的Contacts::setContactsid方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。