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


PHP Contacts::addContact方法代码示例

本文整理汇总了PHP中Contacts::addContact方法的典型用法代码示例。如果您正苦于以下问题:PHP Contacts::addContact方法的具体用法?PHP Contacts::addContact怎么用?PHP Contacts::addContact使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Contacts的用法示例。


在下文中一共展示了Contacts::addContact方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: showRespondentSetContactStatus

 function showRespondentSetContactStatus($primkey, $type = 1)
 {
     if ($type == 1) {
         $respondent = new Respondent($primkey);
     } else {
         $respondent = new Household($primkey);
     }
     $contactcode = loadvar("csid");
     $contactts = date('Y-m-d H:i:s');
     $contacts = new Contacts();
     $errorMessage = $contacts->addContact($primkey, $contactcode, $contactts, '', '', '', '', $_SESSION['URID']);
     if ($respondent->getUrid() != $_SESSION['URID']) {
         //if assigned to other urid than this
         //add to communication!
         $communication = new Communication();
         $communication->addSQLToUser($contacts->getLastQuery(), $respondent->getUrid());
     }
     $display = new Display();
     if (sizeof($errorMessage) == 0) {
         return $this->showInterviewerRespondentInfo($primkey, $display->displayInfo(Language::messageContactAdded()), $type);
     } else {
         return $this->showInterviewerRespondentInfo($primkey, $display->displayError(implode('<br/>', $errorMessage)), $type);
     }
 }
开发者ID:nubissurveying,项目名称:nubis,代码行数:24,代码来源:supervisor.php

示例2: showAddContactRes

 function showAddContactRes($primkey)
 {
     $respondent = new Respondent($primkey);
     $contactwith = loadvar("contactwith");
     $contactperson = loadvar("contactperson");
     $contactcode = loadvar("contactcode");
     $contactts = loadvar("contactts");
     $contactappointment = loadvar("contactappointment");
     $contactremark = loadvar("contactremark");
     $contacts = new Contacts();
     $errorMessage = $contacts->addContact($primkey, $contactcode, $contactts, $contactwith, $contactperson, $contactremark, $contactappointment, $_SESSION['URID']);
     $display = new Display();
     if (sizeof($errorMessage) == 0) {
         return $this->showInfo($primkey, $display->displayInfo(Language::messageContactAdded()));
     } else {
         return $this->showAddContact($primkey, $display->displayError(implode('<br/>', $errorMessage)));
     }
 }
开发者ID:nubissurveying,项目名称:nubis,代码行数:18,代码来源:catiinterviewer.php

示例3: Contacts

        $phone = test_input($_POST["phone"]);
        $phoneErr = "";
    }
}
if (!preg_match("/^[a-zA-Z ]*\$/", $name)) {
    $nameErr = "Only letters and white space allowed. ";
}
if (!preg_match("/^[0-9]+\$/", $phone) && !empty($phone)) {
    $phoneErr = "Only numbers allowed. ";
}
if (!filter_var($email, FILTER_VALIDATE_EMAIL) && !empty($email)) {
    $emailErr = "Invalid email format";
}
if ($nameErr . $emailErr . $phoneErr . $phoneErr == '') {
    $contact = new Contacts();
    if ($contact->addContact($name, $company, $address, $phone, $email, $notes)) {
        $name = $company = $address = $phone = $email = $notes = '';
        header('Location: addContact.php?action=addContactOK');
    } else {
        header('Location: addContact.php?action=addContactFail');
    }
}
require "header.php";
?>

<div class="clearfix visible-xs-block"></div>

<?php 
switch ($_GET['action']) {
    case 'addContactOK':
        echo '</p><span><font class="addContactOK">Contact added.</font></span></p>';
开发者ID:nicolas34732,项目名称:address_book,代码行数:31,代码来源:addContact.php

示例4: showStartSurvey

 function showStartSurvey($primkey, $type = 1, $message = '')
 {
     if ($type == 1) {
         $respondent = new Respondent($primkey);
     } else {
         $respondent = new Household($primkey);
     }
     $_SESSION['SURVEYLOGIN'] = LOGIN_DIRECT;
     $respondent->setStatus(1);
     //set status to 1: started survey
     $respondent->saveChanges();
     //add contact 100
     $contactcode = Language::startInterviewCode();
     $contactts = date('Y-m-d H:i:s');
     $contacts = new Contacts();
     $errorMessage = $contacts->addContact($respondent->getPrimkey(), $contactcode, $contactts, '', '', '', '', $_SESSION['URID']);
     //end add contact
     $displayInterviewer = new DisplayInterviewer();
     return $displayInterviewer->showStartSurvey($respondent, $message);
 }
开发者ID:nubissurveying,项目名称:nubis,代码行数:20,代码来源:interviewer.php


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