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


PHP Staff::getEmail方法代码示例

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


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

示例1: assignStaff

 function assignStaff($staffId, $message, $alertstaff = true)
 {
     global $thisuser, $cfg;
     $staff = new Staff($staffId);
     if (!$staff || !$staff->isAvailable() || !$thisuser) {
         return false;
     }
     if ($this->setStaffId($staff->getId())) {
         //Reopen the ticket if cloed.
         if ($this->isClosed()) {
             //Assigned ticket Must be open.
             $this->reopen();
         }
         $this->reload();
         //
         //Send Notice + Message to assignee. (if directed)
         if ($alertstaff && ($thisuser && $staff->getId() != $thisuser->getId())) {
             //No alerts for self assigned.
             //Send Notice + Message to assignee.
             $dept = $this->getDept();
             if (!$dept || !($tplId = $dept->getTemplateId())) {
                 $tplId = $cfg->getDefaultTemplateId();
             }
             $sql = 'SELECT assigned_alert_subj,assigned_alert_body FROM ' . EMAIL_TEMPLATE_TABLE . ' WHERE cfg_id=' . db_input($cfg->getId()) . ' AND tpl_id=' . db_input($tplId);
             if (($resp = db_query($sql)) && db_num_rows($resp) && (list($subj, $body) = db_fetch_row($resp))) {
                 $body = $this->replaceTemplateVars($body);
                 $subj = $this->replaceTemplateVars($subj);
                 $body = str_replace('%note', $message, $body);
                 $body = str_replace("%message", $message, $body);
                 //Previous versions used message.
                 $body = str_replace("%assignee", $staff->getName(), $body);
                 $body = str_replace("%assigner", $thisuser ? $thisuser->getName() : 'System', $body);
                 if (!($email = $cfg->getAlertEmail())) {
                     $email = $cfg->getDefaultEmail();
                 }
                 if ($email) {
                     $email->send($staff->getEmail(), $subj, $body);
                 }
             } else {
                 Sys::log(LOG_WARNING, 'Template Fetch Error', "Unable to fetch 'assigned' alert template #{$tplId}");
             }
         }
         $message = $message ? $message : 'Ticket assigned';
         //Save the message as internal note...(record).
         $this->postNote('Ticket Assigned to ' . $staff->getName(), $message, false);
         //Notice that we are disabling note alerts!
         return true;
     }
     return false;
 }
开发者ID:supaket,项目名称:helpdesk,代码行数:50,代码来源:class.ticket.php

示例2:

    $staff->setSecName($_POST['secondname']);
    $staff->setAdress($_POST['adress']);
    $staff->setCity($_POST['city']);
    $staff->setJbg($_POST['jbg']);
    $staff->setEmail($_POST['email']);
    $staff->setPasswd($_POST['passwd']);
    $staff->setPhone($_POST['phone']);
    $staff->setMphone($_POST['mphone']);
    $staff->setIsStaff($is_staff);
    $staff->setImageUrl($image_url);
    $staff->setPhotoId($photo_id);
    $staff->setWorkPlace($_POST['work_place']);
    $staff->setSalary($_POST['salary']);
    $staff->setIsAdmin($is_admin);
    $staff->setEnabled($enabled);
    $id = $userDao->createStafs($staff->getName(), $staff->getSecName(), $staff->getAdress(), $staff->getCity(), $staff->getJbg(), $staff->getEmail(), $staff->getPasswd(), $staff->getPhone(), $staff->getMphone(), $staff->getIsStaff(), $staff->getImageUrl(), $staff->getPhotoId(), $staff->getWorkPlace(), $staff->getSalary(), $staff->getIsAdmin(), $staff->getEnabled());
}
//print_r("ID nakon createStafs iznosi: ".$id);
$resultsshow = $userDao->showUser($id);
$row = $resultsshow->fetch_assoc();
?>

<div class="main container-fluid">
    <div class="sectionShow">
        <div class="secimg">
            <img src="<?php 
echo $row['image_url'];
?>
" alt="User Photo" style="width:300px;height:200px">
        </div>
        <div class="secol">
开发者ID:GoranSubic,项目名称:smart-restoran,代码行数:31,代码来源:showUser.php

示例3: assignStaff

 function assignStaff($staffId, $message, $alertstaff = true)
 {
     global $thisuser, $cfg;
     $staff = new Staff($staffId);
     if (!$staff || !$staff->isAvailable() || !$thisuser) {
         return false;
     }
     if ($this->setStaffId($staff->getId())) {
         //Reopen the ticket if cloed.
         if ($this->isClosed()) {
             //Assigned ticket Must be open.
             $this->reopen();
         }
         //Send Notice + Message to assignee. (if directed)
         if ($alertstaff && $staff->getId() != $thisuser->getId()) {
             //No alerts for self assigned.
             //Send Notice + Message to assignee.
             $sql = 'SELECT assigned_alert_subj,assigned_alert_body FROM ' . EMAIL_TEMPLATE_TABLE . ' WHERE cfg_id=' . db_input($cfg->getId()) . ' AND tpl_id=' . db_input($cfg->getDefaultTemplateId());
             $resp = db_query($sql);
             if (db_num_rows($resp) && (list($subj, $body) = db_fetch_row($resp))) {
                 $subj = str_replace("%ticket", $this->getExtId(), $subj);
                 $body = str_replace("%ticket", $this->getExtId(), $body);
                 $body = str_replace("%assignee", $staff->getName(), $body);
                 $body = str_replace("%assigner", $thisuser->getName(), $body);
                 $body = str_replace("%message", $message, $body);
                 $body = str_replace("%url", $cfg->getBaseUrl(), $body);
                 Misc::sendmail($staff->getEmail(), $subj, $body, $cfg->getAlertEmail());
             }
         }
         //Save the message as internal note...(record).
         $this->postNote('Ticket Assigned to ' . $staff->getName(), $message);
         return true;
     }
     return false;
 }
开发者ID:googlecode-mirror,项目名称:barbos,代码行数:35,代码来源:class.ticket.php

示例4: header

#****************************************************************************
if (count($_POST) == 0) {
    header("Location: ../admin/staff_new_form.php");
    exit;
}
#****************************************************************************
#*  Validate data
#****************************************************************************
$staff = new Staff();
$staff->setLastChangeUserid($_SESSION["userid"]);
$staff->setLastName($_POST["last_name"]);
$_POST["last_name"] = $staff->getLastName();
$staff->setFirstName($_POST["first_name"]);
$_POST["first_name"] = $staff->getFirstName();
$staff->setEmail($_POST["email"]);
$_POST["email"] = $staff->getEmail();
$staff->setContactNumber($_POST["contact_number"]);
$_POST["contact_number"] = $staff->getContactNumber();
$staff->setUsername($_POST["username"]);
$_POST["username"] = $staff->getUsername();
$staff->setPwd($_POST["pwd"]);
$_POST["pwd"] = $staff->getPwd();
$staff->setPwd2($_POST["pwd2"]);
$_POST["pwd2"] = $staff->getPwd2();
$staff->setCircAuth(isset($_POST["circ_flg"]));
$staff->setCircMbrAuth(isset($_POST["circ_mbr_flg"]));
$staff->setCatalogAuth(isset($_POST["catalog_flg"]));
$staff->setAdminAuth(isset($_POST["admin_flg"]));
$staff->setReportsAuth(isset($_POST["reports_flg"]));
$validData = $staff->validateData();
$validPwd = $staff->validatePwd();
开发者ID:vishnu35,项目名称:opencitylibrary,代码行数:31,代码来源:staff_new.php


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