本文整理汇总了PHP中getUserEmail函数的典型用法代码示例。如果您正苦于以下问题:PHP getUserEmail函数的具体用法?PHP getUserEmail怎么用?PHP getUserEmail使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getUserEmail函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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 . " " . $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 . " " . 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
示例16: openid_login
/**
* Performs the actual openid login once the authentication has been confirmed
* from the Provider.
* Basically deals with four cases:
* 1. The user has used this OpenID before:
* This means that this OpenID entry is there in the _openid_users table
* and thus the user has previously used this OpenID before.
* In such case, the authentication is done and the user logs in.
* 2. When the OpenID provider didn't returned the user's email address:
* We currently do not support such OpenID provider, and thus an
* error message is recieved by the user.
* 3. When OpenID provider returns an Email which is already there in our records:
* This means that the user of this OpenID is already being registered also
* as a normal Pragyan User (or other OpenID user). The main thing is that
* the there is an entry for this particular EmailID in _users table.
* When this happens, user is asked to give the password of the pre-existing
* account at the PragyanCMS so that it can be linked to this OpenID
* @todo Check what happen if the entry in _users is because of another OpenID entry
* and not because of a Pragyan user. I suspect that the code will still ask
* for the password (which it shouldn't). The code shouldn't check Pre-existing
* email ID for those entries which have login_method as openid.
* 4. When OpenID proovider returns an Email which is not there in our records:
* In this case, the system demands the user to give their full name and thus
* it registers themselves as a dummy openid user in _users (with login_method
* = openid) and create entries in _openid_users too. After this, the user
* can start using his account.
*
* @param $userdata user information returned by the OpenID provider. Can be fetched
* by the ->filteruserinfo() function in DopeOpenID class
*/
function openid_login($userdata)
{
$userdata['openid_url'] = escape($_GET['openid_identity']);
/// Build a query to check if the OpenID already exits in openid_users table
$query = "SELECT * FROM `" . MYSQL_DATABASE_PREFIX . "openid_users` WHERE `openid_url` = '" . $userdata['openid_url'] . "';";
$result = mysql_query($query) or die(mysql_error() . " in openid_login() inside login.lib.php while executing query for openid_row");
$openid_row = mysql_fetch_array($result);
if ($openid_row) {
///the record exists, this user has already used his OpenID before
//print_r($row);
///Fetch the user_id that corresponds to user_id in the _users table
$userid = $openid_row['user_id'];
///the OpenID provider did sent us the email of the user. Check if it exists in our database and is activated
$userdetails = getUserInfo(getUserEmail($userid));
if (!$userdetails) {
displayerror("Your openid registration is corrupted. Please contact site administrator.");
return;
}
/// ASSUMPTION : the `user_activated' column in _users table is 1 if and only if his email is verified.
if ($userdetails && $userdetails['user_activated'] == 0) {
displayerror("Your account is not activated. Please verify your account using the email sent to you during registration or contact site administrator.");
return;
}
///Assign the value to $_SESSION['last_to_last_login_datetime']
$query = "SELECT `user_lastlogin` FROM `" . MYSQL_DATABASE_PREFIX . "users` WHERE `user_id`='" . $openid_row['user_id'] . "';";
$result = mysql_query($query) or die(mysql_error() . " in openid_login() inside login.lib.php while trying to fetch last login");
$last_login_row = mysql_fetch_array($result);
$_SESSION['last_to_last_login_datetime'] = $last_login_row['user_lastlogin'];
///update the last login
$query = "UPDATE `" . MYSQL_DATABASE_PREFIX . "users` SET `user_lastlogin`=NOW() WHERE `" . MYSQL_DATABASE_PREFIX . "users`.`user_id` ='" . $openid_row['user_id'] . "';";
mysql_query($query) or die(mysql_error() . " in openid_login() inside login.lib.php while trying to update the last login");
///logging in the user
setAuth($openid_row['user_id']);
return $openid_row['user_id'];
} else {
/**This user is first time using the OpenID
* display a small form to input User's Details
* System should now check if the email ID is provided by the openID provider is already there in Our records.
* If yes, the current account should be lin
|
请发表评论