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


PHP getUserEmail函数代码示例

本文整理汇总了PHP中getUserEmail函数的典型用法代码示例。如果您正苦于以下问题:PHP getUserEmail函数的具体用法?PHP getUserEmail怎么用?PHP getUserEmail使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: sendPrdStckMail

/**
 * This function sends a mail to the handler whenever the product reaches the reorder level.
 * Param $product_id - product id
 * Param $upd_qty - updated product quantity in no's
 * Param $prod_name - product name
 * Param $qtyinstk - quantity in stock
 * Param $qty - quantity
 * Param $module - module name
 * return type void
 */
function sendPrdStckMail($product_id, $upd_qty, $prod_name, $qtyinstk, $qty, $module)
{
    global $log;
    $log->debug("Entering sendPrdStckMail(" . $product_id . "," . $upd_qty . "," . $prod_name . "," . $qtyinstk . "," . $qty . "," . $module . ") method ...");
    global $current_user;
    global $adb;
    $reorderlevel = getPrdReOrderLevel($product_id);
    $log->debug("Inside sendPrdStckMail function, module=" . $module);
    $log->debug("Prd reorder level " . $reorderlevel);
    if ($upd_qty < $reorderlevel) {
        //send mail to the handler
        $handler = getRecordOwnerId($product_id);
        foreach ($handler as $type => $id) {
            $handler = $id;
        }
        $handler_name = getOwnerName($handler);
        if (vtws_isRecordOwnerUser($handler)) {
            $to_address = getUserEmail($handler);
        } else {
            $to_address = implode(',', getDefaultAssigneeEmailIds($handler));
        }
        //Get the email details from database;
        if ($module == 'SalesOrder') {
            $notification_table = 'SalesOrderNotification';
            $quan_name = '{SOQUANTITY}';
        }
        if ($module == 'Quotes') {
            $notification_table = 'QuoteNotification';
            $quan_name = '{QUOTEQUANTITY}';
        }
        if ($module == 'Invoice') {
            $notification_table = 'InvoiceNotification';
        }
        $query = "select * from vtiger_inventorynotification where notificationname=?";
        $result = $adb->pquery($query, array($notification_table));
        $subject = $adb->query_result($result, 0, 'notificationsubject');
        $body = $adb->query_result($result, 0, 'notificationbody');
        $status = $adb->query_result($result, 0, 'status');
        if ($status == 0 || $status == '') {
            return false;
        }
        $subject = str_replace('{PRODUCTNAME}', $prod_name, $subject);
        $body = str_replace('{HANDLER}', $handler_name, $body);
        $body = str_replace('{PRODUCTNAME}', $prod_name, $body);
        if ($module == 'Invoice') {
            $body = str_replace('{CURRENTSTOCK}', $upd_qty, $body);
            $body = str_replace('{REORDERLEVELVALUE}', $reorderlevel, $body);
        } else {
            $body = str_replace('{CURRENTSTOCK}', $qtyinstk, $body);
            $body = str_replace($quan_name, $qty, $body);
        }
        $body = str_replace('{CURRENTUSER}', $current_user->user_name, $body);
        $mail_status = send_mail($module, $to_address, $current_user->user_name, $current_user->email1, decode_html($subject), nl2br(to_html($body)));
    }
    $log->debug("Exiting sendPrdStckMail method ...");
}
开发者ID:nouphet,项目名称:vtigercrm-6.0.0-ja,代码行数:66,代码来源:InventoryUtils.php

示例2: isUserRegistered

 public static function isUserRegistered($userId, $moduleComponentId)
 {
     if (isInternalUserRegistered($userId, $moduleComponentId, false)) {
         return true;
     }
     $userEmail = getUserEmail($userId);
     if (isExternalUserRegistered($userEmail, $moduleComponentId)) {
         moveUserToInternal($userEmail, $userId);
         return true;
     }
     return false;
 }
开发者ID:nobelium,项目名称:pragyan,代码行数:12,代码来源:newsletter.lib.php

示例3: index

 public function index()
 {
     $myID = getUserID();
     $name = trim(jsonInput('name'));
     $description = jsonInput('description');
     $membersPost = jsonInput('members');
     $this->np_validations();
     $newProjID = $this->mdb->project_add($myID, $name, $description);
     if ($newProjID) {
         //add yourself in project members
         $this->mdb->project_member_add(array('project_id' => $newProjID, 'user_id' => $myID, 'email_address' => getUserEmail(), 'joined_by' => 0, 'date_joined' => today(), 'last_visit' => today(), 'is_accepted' => 1, 'project_role' => 3));
         $this->mdb->add_project_settings(array('project_id' => $newProjID, 'task_approval' => 0, 'project_approval' => 1));
         //add specified members to project
         if (is_array($membersPost)) {
             foreach ($membersPost as $member) {
                 if (filter_var($member, FILTER_VALIDATE_EMAIL)) {
                     $qChkifAlreadyMember = $this->mdb->checkIfAlreadyMember($newProjID, $member);
                     if (!$qChkifAlreadyMember) {
                         $qChkUser = $this->model->getUserInfo(array('email_address' => $member));
                         if ($qChkUser->num_rows()) {
                             $pmRow = $qChkUser->row();
                             $this->mdb->project_member_add(array('project_id' => $newProjID, 'user_id' => $pmRow->id, 'email_address' => $pmRow->email_address, 'joined_by' => $myID, 'date_joined' => today(), 'last_visit' => NULL, 'is_accepted' => 0, 'project_role' => $this->siteinfo->config('project_roles_default')));
                             //notification
                             notify('project_invite', $pmRow->id, array('project_id' => $newProjID));
                             $qProj = $this->db->get_where('projects', array('id' => $newProjID));
                             if ($qProj->num_rows()) {
                                 $qProjRow = $qProj->row();
                                 $myName = $this->session->userdata('display_name');
                                 $redirectLink = base_url('#/app/projects/' . $newProjID);
                                 do_sendmail($pmRow->id, $qProjRow->project_name, "{$myName} invited you to join <a href='{$redirectLink}'>" . $qProjRow->project_name . "</a>");
                             }
                         } else {
                             $this->mdb->project_member_add(array('project_id' => $newProjID, 'user_id' => 0, 'email_address' => $member, 'joined_by' => $myID, 'date_joined' => today(), 'last_visit' => NULL, 'is_accepted' => 0, 'project_role' => $this->siteinfo->config('project_roles_default')));
                         }
                     }
                 }
             }
         }
         //add project roles
         foreach ($this->siteinfo->config('project_roles') as $roleID => $role) {
             $default = $this->siteinfo->config('project_roles_default') == $roleID ? 1 : 0;
             $this->mdb->project_roles_add($newProjID, $roleID, $default, $role);
         }
     }
     generate_json(array('status' => 1, 'message' => 'New project has been created.'));
 }
开发者ID:rodino25,项目名称:tsv2,代码行数:46,代码来源:New_project.php

示例4: index

 public function index()
 {
     $myID = getUserID();
     $myEmail = getUserEmail();
     $pID = (int) $this->input->get('id');
     $visitorType = visitor_type($pID, $myID);
     $query = $this->mdb->project_get($pID);
     if ($query->num_rows()) {
         $row = $query->row();
         switch ($visitorType) {
             case 'invited':
                 $this->mdb->project_member_remove($row->id, $myID);
                 break;
         }
         generate_json(array('status' => 1));
     } else {
         generate_json(array('status' => 0, 'message' => 'Project does not exists.'));
     }
 }
开发者ID:rodino25,项目名称:tsv2,代码行数:19,代码来源:Decline.php

示例5: addslashes

         echo " Gagal," . addslashes(mysql_error($conn));
     }
     break;
 case 'insert_persetujuan':
     $sql = "SELECT * FROM " . $dbname . ".`log_prapoht` WHERE `nopp`='" . $nopp . "' ";
     $query = mysql_query($sql) or die(mysql_error());
     $rest = mysql_fetch_assoc($query);
     if ($rest['close'] > 1) {
         echo "Warning: Status closed, Can't update the status";
         exit;
     } elseif ($rest['hasilpersetujuan1'] < 1) {
         $stat_cls = 1;
         $strx = "update " . $dbname . ". log_prapoht set persetujuan1='" . $user_id . "',close='" . $stat_cls . "'  where nopp='" . $nopp . "'";
         if (mysql_query($strx)) {
             #send an email to incharge person
             $to = getUserEmail($user_id);
             $namakaryawan = getNamaKaryawan($_SESSION['standard']['userid']);
             if ($_SESSION['language'] == 'EN') {
                 $subject = "[Notifikasi] PR Submission for approval, submitted by: " . $namakaryawan;
                 $body = "<html>\n\t\t\t\t\t\t\t <head>\n\t\t\t\t\t\t\t <body>\n\t\t\t\t\t\t\t   <dd>Dear Sir/Madam,</dd><br>\n\t\t\t\t\t\t\t   <br>\n\t\t\t\t\t\t\t   Today,  " . date('d-m-Y') . ",  on behalf of " . $namakaryawan . " submit a PR, requesting for your approval. To follow up, please follow the link below.\n\t\t\t\t\t\t\t   <br>\n\t\t\t\t\t\t\t   <br>\n\t\t\t\t\t\t\t   <br>\n\t\t\t\t\t\t\t   Regards,<br>\n\t\t\t\t\t\t\t   Owl-Plantation System.\n\t\t\t\t\t\t\t </body>\n\t\t\t\t\t\t\t </head>\n\t\t\t\t\t\t   </html>\n\t\t\t\t\t\t   ";
             } else {
                 $subject = "[Notifikasi]Persetujuan PP a/n " . $namakaryawan;
                 $body = "<html>\n\t\t\t\t\t\t\t <head>\n\t\t\t\t\t\t\t <body>\n\t\t\t\t\t\t\t   <dd>Dengan Hormat,</dd><br>\n\t\t\t\t\t\t\t   <br>\n\t\t\t\t\t\t\t   Pada hari ini, tanggal " . date('d-m-Y') . " karyawan a/n  " . $namakaryawan . " mengajukan Permintaan Pembelian Barang\n\t\t\t\t\t\t\t   kepada bapak/ibu. Untuk menindak-lanjuti, silahkan ikuti link dibawah.\n\t\t\t\t\t\t\t   <br>\n\t\t\t\t\t\t\t   <br>\n\t\t\t\t\t\t\t   <br>\n\t\t\t\t\t\t\t   Regards,<br>\n\t\t\t\t\t\t\t   Owl-Plantation System.\n\t\t\t\t\t\t\t </body>\n\t\t\t\t\t\t\t </head>\n\t\t\t\t\t\t   </html>\n\t\t\t\t\t\t   ";
             }
             $kirim = kirimEmail($to, '', $subject, $body);
             #this has return but disobeying;
         } else {
             echo " Gagal," . addslashes(mysql_error($conn));
         }
     } else {
         echo "Warning: Documents already in the process";
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:log_slave_save_log_pp.php

示例6: getRecipientEmails

 public function getRecipientEmails()
 {
     $recipientsInfo = $this->scheduledRecipients;
     $recipientsList = array();
     if (!empty($recipientsInfo)) {
         if (!empty($recipientsInfo['users'])) {
             $recipientsList = array_merge($recipientsList, $recipientsInfo['users']);
         }
         if (!empty($recipientsInfo['roles'])) {
             foreach ($recipientsInfo['roles'] as $roleId) {
                 $roleUsers = getRoleUsers($roleId);
                 foreach ($roleUsers as $userId => $userName) {
                     array_push($recipientsList, $userId);
                 }
             }
         }
         if (!empty($recipientsInfo['rs'])) {
             foreach ($recipientsInfo['rs'] as $roleId) {
                 $users = getRoleAndSubordinateUsers($roleId);
                 foreach ($users as $userId => $userName) {
                     array_push($recipientsList, $userId);
                 }
             }
         }
         if (!empty($recipientsInfo['groups'])) {
             require_once 'include/utils/GetGroupUsers.php';
             foreach ($recipientsInfo['groups'] as $groupId) {
                 $userGroups = new GetGroupUsers();
                 $userGroups->getAllUsersInGroup($groupId);
                 $recipientsList = array_merge($recipientsList, $userGroups->group_users);
             }
         }
     }
     $recipientsEmails = array();
     if (!empty($recipientsList) && count($recipientsList) > 0) {
         foreach ($recipientsList as $userId) {
             $userName = getUserFullName($userId);
             $userEmail = getUserEmail($userId);
             if (!in_array($userEmail, $recipientsEmails)) {
                 $recipientsEmails[$userName] = $userEmail;
             }
         }
     }
     return $recipientsEmails;
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:45,代码来源:ScheduledReports4You.php

示例7: getProfileRegistrantsList

function getProfileRegistrantsList($showEditButtons = false)
{
    global $urlRequestRoot, $cmsFolder, $moduleFolder, $templateFolder, $sourceFolder;
    require_once "{$sourceFolder}/{$moduleFolder}/form/viewregistrants.php";
    $sortField = 'useremail';
    $sortOrder = 'asc';
    if (isset($_GET['sortfield'])) {
        $sortField = escape($_GET['sortfield']);
    }
    if (isset($_GET['sortorder']) && ($_GET['sortorder'] == 'asc' || $_GET['sortorder'] == 'desc')) {
        $sortOrder = escape($_GET['sortorder']);
    }
    $action = './+admin&subaction=' . escape($_GET['subaction']);
    $columnList['useremail'] = 'User Email';
    $columnList['username'] = 'Username';
    $columnList['userfullname'] = 'User Full Name';
    $columnList['registrationdate'] = 'Registration Date';
    $columnList['lastupdated'] = 'Last Updated';
    $columnList = array_merge($columnList, getColumnList(0, false, false, false, false));
    $normalImage = "<img alt=\"Sort by this field\" height=\"12\" width=\"12\" style=\"padding:0px\" src=\"{$urlRequestRoot}/{$cmsFolder}/{$templateFolder}/common/icons/16x16/actions/view-refresh.png\" />";
    $orderedImage = "<img alt=\"Sort by this field\" height=\"12\" width=\"12\" style=\"padding:0px\" src=\"{$urlRequestRoot}/{$cmsFolder}/{$templateFolder}/common/icons/16x16/actions/go-" . ($sortOrder == 'asc' ? 'up' : 'down') . ".png\" />";
    $tableCaptions = "<tr>\n<th nowrap=\"nowrap\">S. No.</th>\n";
    if ($showEditButtons) {
        $tableCaptions .= '<th nowrap="nowrap">Edit</th><th nowrap="nowrap">Delete</th>';
    }
    foreach ($columnList as $columnName => $columnTitle) {
        $tableCaptions .= "<th nowrap=\"nowrap\">{$columnTitle}<a href=\"{$action}&sortfield={$columnName}";
        if ($sortField == $columnName) {
            $tableCaptions .= '&sortorder=' . ($sortOrder == 'asc' ? 'desc' : 'asc') . '">' . $orderedImage . '</a>';
        } else {
            $tableCaptions .= '">' . $normalImage . '</a>';
        }
        $tableCaptions .= "</th>\n";
        $columnNames[] = $columnName;
    }
    $tableCaptions .= "</tr>\n";
    $userIds = getDistinctRegistrants(0, $sortField, $sortOrder);
    $userCount = count($userIds);
    $editImage = "<img style=\"padding:0px\" src=\"{$urlRequestRoot}/{$cmsFolder}/{$templateFolder}/common/icons/16x16/apps/accessories-text-editor.png\" alt=\"Edit\" />";
    $deleteImage = "<img style=\"padding:0px\" src=\"{$urlRequestRoot}/{$cmsFolder}/{$templateFolder}/common/icons/16x16/actions/edit-delete.png\" alt=\"Delete\" />";
    $tableBody = '';
    for ($i = 0; $i < $userCount; $i++) {
        $tableBody .= '<tr><td>' . ($i + 1) . '</td>';
        if ($showEditButtons) {
            $tableBody .= '<td align="center"><a href="./+admin&subaction=editsiteregistrants&subsubaction=editregistrant&useremail=' . getUserEmail($userIds[$i]) . '" />' . $editImage . '</a></td>';
            $tableBody .= '<td align="center"><a href="./+admin&subaction=editsiteregistrants&subsubaction=deleteregistrant&useremail=' . getUserEmail($userIds[$i]) . '" />' . $deleteImage . '</a></td>';
        }
        $tableBody .= '<td>' . join(generateFormDataRow(0, $userIds[$i], $columnNames), '</td><td>') . "</td></tr>\n";
    }
    return '<br /><br /><br /><table border="1">' . $tableCaptions . $tableBody . '</table>';
}
开发者ID:nobelium,项目名称:pragyan,代码行数:51,代码来源:profile.lib.php

示例8: sendMailUserTicketClose

function sendMailUserTicketClose($mail_refno)
{
    global $conn;
    $sql = " Select * from sptbl_lookup where vLookUpName IN('MailFromName','MailFromMail',";
    $sql .= "'MailReplyName','MailReplyMail','Emailfooter','Emailheader','MailEscalation','HelpdeskTitle')";
    $result = executeSelect($sql, $conn);
    if (mysql_num_rows($result) > 0) {
        while ($row2 = mysql_fetch_array($result)) {
            switch ($row2["vLookUpName"]) {
                case "MailFromName":
                    $var_fromName = $row2["vLookUpValue"];
                    break;
                case "MailFromMail":
                    $var_fromMail = $row2["vLookUpValue"];
                    break;
                case "MailReplyName":
                    $var_replyName = $row2["vLookUpValue"];
                    break;
                case "MailReplyMail":
                    $var_replyMail = $row2["vLookUpValue"];
                    break;
                case "Emailfooter":
                    $var_emailfooter = $row2["vLookUpValue"];
                    break;
                case "Emailheader":
                    $var_emailheader = $row2["vLookUpValue"];
                    break;
                case "MailEscalation":
                    $var_emailescalation = $row2["vLookUpValue"];
                    break;
                case "HelpdeskTitle":
                    $var_helpdesktitle = $row2["vLookUpValue"];
                    break;
            }
        }
    }
    $sql = "Select u.nUserId, u.vUserName, u.vEmail, t.nTicketId   from sptbl_tickets t INNER JOIN sptbl_users u ON t.nUserId = u.nUserId WHERE t.vRefNo = '" . mysql_real_escape_string(trim($mail_refno)) . "' ORDER BY t.nTicketId  DESC LIMIT 1";
    $result_user = executeSelect($sql, $conn);
    if (mysql_num_rows($result_user) > 0) {
        $row_user = mysql_fetch_array($result_user);
        $toemail = $row_user['vEmail'];
        $var_body = $var_emailheader . "<br>" . TEXT_MAIL_START . "&nbsp; " . $row_user['vUserName'] . ",<br>";
        $var_body .= TEXT_CLOSED_BODY . " " . $mail_refno . TEXT_MAIL_BY . htmlentities($_SESSION['sess_staffname']) . "<br><br>";
        // $sql_reply    =   "SELECT nReplyId FROM sptbl_replies WHERE nTicketId='".$row_user['nTicketId']."'";
        $sql_reply = "SELECT vStaffLogin  FROM  sptbl_tickets WHERE nTicketId='" . $row_user['nTicketId'] . "' AND ( vStaffLogin  !='NULL' OR  \tvStaffLogin  !='' OR  \tvStaffLogin  !='0')";
        $res_reply = executeSelect($sql_reply, $conn);
        if (mysql_num_rows($res_reply) > 0) {
            $row_staff = mysql_fetch_array($res_reply);
            if ($row_staff['vStaffLogin'] != "") {
                $var_body .= TEXT_RATE_URL_MSG1 . "  <a href='" . SITE_URL . "rating.php?uid=" . $row_user['nUserId'] . "&ticket_id=" . $row_user['nTicketId'] . "'> " . TEXT_RATE_URL_MSG2 . " </a>  " . TEXT_RATE_URL_MSG3 . " <br><br>";
            }
        }
        $var_body .= TEXT_MAIL_THANK . "<br>" . htmlentities($var_helpdesktitle) . "<br>" . $var_emailfooter;
        $var_subject = TEXT_CLOSED_SUB . " " . $mail_refno;
        $Headers = "From: {$var_fromName} <{$var_fromMail}>\n";
        $Headers .= "Reply-To: {$var_replyName} <{$var_replyMail}>\n";
        $Headers .= "MIME-Version: 1.0\n";
        $Headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
        //  echo $var_body;exit;
        // it is for smtp mail sending
        $useremail = getUserEmail($row_user['nUserId']);
        //get user email
        if (!in_array($toemail, $useremail)) {
            $useremail[] = $toemail;
        }
        if (count($useremail) > 0) {
            foreach ($useremail as $key => $value) {
                $toemail_us = $value;
                if ($_SESSION["sess_smtpsettings"] == 1) {
                    $var_smtpserver = $_SESSION["sess_smtpserver"];
                    $var_port = $_SESSION["sess_smtpport"];
                    SMTPMail($var_fromMail, $toemail_us, $var_smtpserver, $var_port, $var_subject, $var_body);
                } else {
                    $mailstatus = @mail($toemail_us, $var_subject, $var_body, $Headers);
                }
            }
            //end of for loop user email
        }
        //end of if email count
    }
}
开发者ID:kevinsmasters,项目名称:purecatskillsmarketplace,代码行数:81,代码来源:miscfunctions.php

示例9: getUserName

<div class="inner_conainer" >
  <?php 
include "trainer_dashboard_link.php";
?>
  <div class="dashboard_right fade_anim">
    <div class="dashbox_wrap">
      <div class="dashbox blue_bg">
        <div class="title"><img src="images/icon_profile_big.png" />profile
          <div class="clear"></div>
        </div>
        <p><strong>Name :</strong> <?php 
echo getUserName($conn, $registration_id);
?>
</p>
        <p><strong>Email :</strong> <?php 
echo getUserEmail($conn, $registration_id);
?>
</p>
        <p><strong>Mobile :</strong> <?php 
echo getUserMobile($conn, $registration_id);
?>
</p>
        <a class="more" href="trainer_profile.php"></a> </div>
      <div class="dashbox green_bg">
        <div class="title"><img src="images/icon_tranings_big.png" />Trainings Courses
          <div class="clear"></div>
        </div>
        <div class="posted_job">
          <?php 
while ($row = $result->fetch_assoc()) {
    ?>
开发者ID:neelmanis,项目名称:Jobready_New,代码行数:31,代码来源:trainer_dashboard.php

示例10: mailCoy

function mailCoy($userid)
{
    #send an email to incharge person
    $to = getUserEmail($userid);
    $namakaryawan = getNamaKaryawan($_SESSION['standard']['userid']);
    if ($_SESSION['language'] == 'EN') {
        $subject = "[Notifikasi] PR Submission for approval, submitted by: " . $namakaryawan;
        $body = "<html>\r\n                             <head>\r\n                             <body>\r\n                               <dd>Dear Sir/Madam,</dd><br>\r\n                               <br>\r\n                               Today,  " . date('d-m-Y') . ",  on behalf of " . $namakaryawan . " submit a PR, requesting for your approval. To follow up, please follow the link below.\r\n                               <br>\r\n                               <br>\r\n                               <br>\r\n                               Regards,<br>\r\n                               Owl-Plantation System.\r\n                             </body>\r\n                             </head>\r\n                           </html>\r\n                           ";
    } else {
        $subject = "[Notifikasi]Persetujuan PP a/n " . $namakaryawan;
        $body = "<html>\r\n                             <head>\r\n                             <body>\r\n                               <dd>Dengan Hormat,</dd><br>\r\n                               <br>\r\n                               Pada hari ini, tanggal " . date('d-m-Y') . " karyawan a/n  " . $namakaryawan . " mengajukan Permintaan Pembelian Barang\r\n                               kepada bapak/ibu. Untuk menindak-lanjuti, silahkan ikuti link dibawah.\r\n                               <br>\r\n                               <br>\r\n                               <br>\r\n                               Regards,<br>\r\n                               Owl-Plantation System.\r\n                             </body>\r\n                             </head>\r\n                           </html>\r\n                           ";
    }
    $kirim = kirimEmail($to, '', $subject, $body);
    #this has return but disobeying;
}
开发者ID:halimc17,项目名称:magsys,代码行数:15,代码来源:log_slave_persetujuan.php

示例11: mysql_query

     $tab .= "<tr><td colspan=3 align=center><button class=mybutton onclick=saveAjukan()>" . $_SESSION['lang']['diajukan'] . "</button></td></tr></table>";
     $tab .= "</fieldset>";
     echo $tab;
     break;
 case 'appSetuju':
     $sKary = "select distinct status1 from " . $dbname . ".pta_ht where notransaksi='" . $notransaksi . "'";
     $qKary = mysql_query($sKary) or die(mysql_error($conn));
     $rKary = mysql_fetch_assoc($qKary);
     if ($rKary['status1'] == 0) {
         $sUpdate = "update " . $dbname . ".pta_ht set persetujuan1='" . $krywnId . "' \r\n             where status1='0' and notransaksi='" . $notransaksi . "'";
     }
     // exit($sUpdate." Error");
     if (!mysql_query($sUpdate)) {
         exit("DB:Error" . mysql_error($conn) . "__" . $sUpdate);
     } else {
         $to = getUserEmail($krywnId);
         $subject = "[Notifikasi] Persetujuan PTA ";
         $body = "<html>\r\n                            <head>\r\n                            <body>\r\n                            <dd>Dengan Hormat,</dd><br>\r\n                            <br>\r\n                             Pada hari ini karyawan A/n " . $_SESSION['empl']['name'] . " mengajukan persetujuan PTA \r\n                             No." . $notransaksi . " kepada bapak/ibu, untuk menindaklanjuti silahkan click link dibawah.\r\n                            <br>\r\n                            <br>\r\n                            <br>\r\n                            Regards,<br>\r\n                            Owl-Plantation System.\r\n                            </body>\r\n                            </head>\r\n                        </html>";
         $kirim = kirimEmail($to, '', $subject, $body);
         #this has return but disobeying;
     }
     break;
 case 'getKegiatan':
     $optKeg = "<option value=''>" . $_SESSION['lang']['pilihdata'] . "</option>";
     if ($_SESSION['language'] == 'EN') {
         $dd = 'namakegiatan1 as namakegiatan';
     } else {
         $dd = 'namakegiatan as namakegiatan';
     }
     $sKeg = "select distinct kodekegiatan," . $dd . " from " . $dbname . ".setup_kegiatan where noakun like '%" . $_POST['noakun'] . "%' order by kodekegiatan";
     $qKeg = mysql_query($sKeg) or die(mysql_error($conn));
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:pta_slave_buat.php

示例12: modifyDomainPerm

function modifyDomainPerm($domainId, $userId, $admin)
{
    if (!$domainId || !$userId) {
        return FALSE;
    }
    if (!isDomainAdmin()) {
        return FALSE;
    }
    if ($userId == $_SESSION['user']['user_id']) {
        return FALSE;
    }
    if (!userIsActive($userId)) {
        return FALSE;
    }
    $user = getUserEmail($userId);
    if (!$user) {
        return FALSE;
    }
    $domain = getDomain($domainId);
    if (!$domain) {
        return FALSE;
    }
    $adminDomains = getAdminDomains();
    if (!in_array($domain, $adminDomains)) {
        return FALSE;
    }
    $params = array('user_id' => $userId, 'domain_id' => $domainId);
    if ($admin) {
        return db_insert('domain_administrators', $params, 'admin_id');
    } else {
        return db_delete('domain_administrators', $params);
    }
}
开发者ID:rubixconsulting,项目名称:postfixweb,代码行数:33,代码来源:user.inc.php

示例13: mysql_insert_id

     $actionLogId = mysql_insert_id();
 }
 //send mail to user
 if ($var_ntuser == "ntuser") {
 }
 if ($var_cc != "" or $var_ntuser == "ntuser") {
     //Get department details for the ticket id here
     $sql = "Select t.vRefNo,t.vTitle,d.vDeptMail,u.vLogin,u.vEmail, u.nUserId as userid from sptbl_tickets t inner join\n\t\t\t\t\t\t\t\t\t\tsptbl_depts d on t.nDeptId=d.nDeptId inner join sptbl_users u on t.nUserId=u.nUserId\n\t\t\t\t\t\t\t\t\t\t  where  t.nTicketId='" . mysql_real_escape_string($var_tid) . "'";
     //End Get department details for the ticket id here
     //$sql="select vLogin,vEmail from sptbl_users where nUserId='$var_userid'";
     $result = executeSelect($sql, $conn);
     $row = mysql_fetch_array($result);
     $var_email = $row['vEmail'];
     $var_ulogin = $row['vLogin'];
     $user_id = $row['userid'];
     $useremail = getUserEmail($user_id);
     if (!in_array($var_email, $useremail)) {
         $useremail[] = $var_email;
     }
     if (count($useremail) > 0) {
         foreach ($useremail as $key => $value) {
             $var_email = $value;
             //Send replay mail to user ******************
             $var_mail_body = $var_emailheader . "<br>" . TEXT_MAIL_START . "&nbsp;" . htmlentities($var_ulogin) . ",<br>";
             $var_mail_body .= TEXT_MAIL_BODY . ":" . $var_refno . "<br><br>";
             $var_mail_body .= nl2br($var_replymatter) . "<br>" . $var_emailfooter;
             $var_subject = "Re:" . $row["vTitle"] . "  Id#[" . $row["vRefNo"] . "]";
             $var_body = $var_mail_body;
             //$Headers="From: " . $row["vDeptMail"] . "\n";
             //$Headers .="Reply-To: " . $row["vDeptMail"] . "\n";
             $arr_header = array("Reply-To: " . $row["vDeptMail"]);
开发者ID:kevinsmasters,项目名称:purecatskillsmarketplace,代码行数:31,代码来源:replies.php

示例14: date

                $wktu = date("Y-m-d H:i:s");
                $sUp .= ",persetujuan1='" . $atasan . "',waktupengajuan='" . $wktu . "'";
            }
            $sUp .= " where " . $where . "";
            if (mysql_query($sUp)) {
                if ($atsSblm != $atasan) {
                    #send an email to incharge person
                    $to = getUserEmail($atasan);
                    $namakaryawan = getNamaKaryawan($_SESSION['standard']['userid']);
                    $subject = "[Notifikasi]Persetujuan Ijin Keluar Kantor a/n " . $namakaryawan;
                    $body = "<html>\r\n                                                     <head>\r\n                                                     <body>\r\n                                                       <dd>Dengan Hormat,</dd><br>\r\n                                                       <br>\r\n                                                       Pada hari ini, tanggal " . date('d-m-Y') . " karyawan a/n  " . $namakaryawan . " mengajukan Ijin/" . $jnsIjin . " (" . $keperluan . ")\r\n                                                       kepada bapak/ibu. Untuk menindak-lanjuti, silahkan ikuti link dibawah.\r\n                                                       <br>\r\n                                                       <br>\r\n                                                       Note: Sisa cuti ybs periode " . $periodec . ":" . $sisa . " Hari\r\n                                                       <br>\r\n                                                       <br>\r\n                                                       Regards,<br>\r\n                                                       Owl-Plantation System.\r\n                                                     </body>\r\n                                                     </head>\r\n                                                   </html>\r\n                                                   ";
                    $kirim = kirimEmail($to, '', $subject, $body);
                    #this has return but disobeying;
                }
            }
            //mysql_query($sUp) or die(mysql_error());
        } else {
            exit("Error:Sudah ada keputusan");
        }
        if ($atsSblm != $atasan) {
            $to = getUserEmail($atsSblm);
            $namakaryawan = getNamaKaryawan($_SESSION['standard']['userid']);
            $subject = "[Notifikasi]Pembatalan Persetujuan Ijin Keluar Kantor a/n " . $namakaryawan;
            $body = "<html>\r\n                                                     <head>\r\n                                                     <body>\r\n                                                       <dd>Dengan Hormat,</dd><br>\r\n                                                       <br>\r\n                                                       Pada hari ini, tanggal " . date('d-m-Y') . " karyawan a/n  " . $namakaryawan . " mengajukan Ijin/" . $jnsIjin . " (" . $keperluan . ")\r\n                                                       kepada bapak/ibu. Untuk menindak-lanjuti, silahkan ikuti link dibawah.\r\n                                                       <br>\r\n                                                       <br>\r\n                                                       Note: Sisa cuti ybs periode " . $periodec . ":" . $sisa . " Hari\r\n                                                       <br>\r\n                                                       <br>\r\n                                                       Regards,<br>\r\n                                                       Owl-Plantation System.\r\n                                                     </body>\r\n                                                     </head>\r\n                                                   </html>\r\n                                                   ";
            $kirim = kirimEmail($to, '', $subject, $body);
            #this has return but disobeying;
        }
        break;
    default:
        break;
}
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:sdm_slave_ijin_meninggalkan_kantor.php

示例15: sendInvitationMail

function sendInvitationMail($blogid, $userid, $name, $comment, $senderName, $senderEmail)
{
    global $database, $service, $hostURL, $serviceURL;
    if (empty($blogid)) {
        $blogid = POD::queryCell("SELECT max(blogid)\n\t\t\tFROM {$database['prefix']}BlogSettings");
        // If no blogid, get the latest created blogid.
    }
    $email = getUserEmail($userid);
    $password = POD::queryCell("SELECT password\n\t\tFROM {$database['prefix']}Users\n\t\tWHERE userid = " . $userid);
    $authtoken = getAuthToken($userid);
    $blogName = getBlogName($blogid);
    if (empty($email)) {
        return 1;
    }
    if (!preg_match('/^[^@]+@([-a-zA-Z0-9]+\\.)+[-a-zA-Z0-9]+$/', $email)) {
        return 2;
    }
    if (empty($name)) {
        $name = User::getName($userid);
    }
    if (strcmp($email, UTF8::lessenAsEncoding($email, 64)) != 0) {
        return 11;
    }
    //$loginid = POD::escapeString(UTF8::lessenAsEncoding($email, 64));
    $name = POD::escapeString(UTF8::lessenAsEncoding($name, 32));
    //$headers = 'From: ' . encodeMail($senderName) . '<' . $senderEmail . ">\n" . 'X-Mailer: ' . TEXTCUBE_NAME . "\n" . "MIME-Version: 1.0\nContent-Type: text/html; charset=utf-8\n";
    if (empty($name)) {
        $subject = _textf('귀하를 %1님이 초대합니다', $senderName);
    } else {
        $subject = _textf('%1님을 %2님이 초대합니다', $name, $senderName);
    }
    $message = file_get_contents(ROOT . "/resources/style/letter/letter.html");
    $message = str_replace('[##_title_##]', _text('초대장'), $message);
    $message = str_replace('[##_content_##]', $comment, $message);
    $message = str_replace('[##_images_##]', $serviceURL . "/resources/style/letter", $message);
    $message = str_replace('[##_link_##]', getInvitationLink(getBlogURL($blogName), $email, $password, $authtoken), $message);
    $message = str_replace('[##_go_blog_##]', getBlogURL($blogName), $message);
    $message = str_replace('[##_link_title_##]', _text('블로그 바로가기'), $message);
    if (empty($name)) {
        $message = str_replace('[##_to_##]', '', $message);
    } else {
        $message = str_replace('[##_to_##]', _text('받는 사람') . ': ' . $name, $message);
    }
    $message = str_replace('[##_sender_##]', _text('보내는 사람') . ': ' . $senderName, $message);
    $ret = sendEmail($senderName, $senderEmail, $name, $email, $subject, $message);
    if ($ret !== true) {
        return array(14, $ret[1]);
    }
    return true;
}
开发者ID:hinablue,项目名称:TextCube,代码行数:50,代码来源:blog.blogSetting.php


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