• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_email函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: add_student

function add_student($db, $argv)
{
    if (sizeof($argv) == 3) {
        $login = $argv[2];
        if (preg_match("/^[a-zA-Z]{2,6}_[a-zA-Z0-9]\$/", $login) == 1) {
            $collection = $db->createCollection("students");
            $document = array("login" => $login, "name" => get_name(), "age" => intval(get_age()), "email" => get_email(), "phone" => get_number(), "rented_movies" => array());
            $collection->insert($document);
            echo "[32mUser registered ![0m\n";
        } else {
            echo "[31mError: Login invalide.\n[0m";
        }
    } else {
        echo "[31mInvalid arg number!\nUsage: ./etna_movies.php login.[0m\n";
    }
}
开发者ID:amira-s,项目名称:etna-projects,代码行数:16,代码来源:students.php


示例2: get_result_student

function get_result_student($dataSDD, $teacherResults)
{
    $STUDENT_NAME_ROW = 13;
    $STUDENT_NAME_MAX = 42;
    $results = array();
    for ($num = 0; $num <= 100; $num++) {
        if (isset($dataSDD->sheets[$num])) {
            //File SDD
            $sheet_num = $num;
            $sheet = $dataSDD->sheets[$sheet_num]['cells'];
            $class = $sheet[3][7];
            $course = $sheet[4][7];
            $room = $sheet[5][7];
            for ($i = $STUDENT_NAME_ROW; $i <= $STUDENT_NAME_MAX; $i++) {
                if (!isset($sheet[$i][2]) || $sheet[$i][2] == "") {
                    break;
                }
                $person = array();
                $person["Code"] = $sheet[$i][2];
                $person["Name"] = $sheet[$i][3];
                $person["Email"] = get_email($sheet[$i][3], $sheet[$i][2]);
                $person["Role"] = "student";
                $result = array();
                $result["Person"] = $person;
                $result["Room"] = $room;
                $result["Class"] = $class;
                $result["Course"] = $course;
                $student_results = get_result($class, $course, $teacherResults);
                //print_r($student_results);
                //return;
                foreach ($student_results as &$student_result) {
                    $result["Date"] = $student_result["Date"];
                    $result["Slot"] = $student_result["Slot"];
                    array_push($results, $result);
                }
            }
        }
    }
    //print_r($results);
    return $results;
}
开发者ID:CocDamCode,项目名称:fu-where-are-you,代码行数:41,代码来源:parserStudent.php


示例3: success

 /**
  * 订单支付成功
  * @param type $money
  * @param type $param
  */
 public function success($money, $param)
 {
     if (session("pay_verify") == true) {
         session("pay_verify", null);
         //处理订单
         $data = array('status' => '1', 'ispay' => '2');
         //订单已经支付,状态为已提交
         M('order')->where(array('tag' => $param['order_id']))->setField($data);
         // 发送邮件
         $uid = M("pay")->where(array('out_trade_no' => $param['order_id']))->getField('uid');
         $mail = get_email($uid);
         //获取会员邮箱
         $title = "支付提醒";
         $content = "您在<a href=\"" . C('DAMAIN') . "\" target='_blank'>" . C('SITENAME') . '</a>支付了订单,交易号' . $param['order_id'];
         if (C('MAIL_PASSWORD')) {
             SendMail($mail, $title, $content);
         }
     } else {
         E("Access Denied");
     }
 }
开发者ID:gitchenze,项目名称:soloshop,代码行数:26,代码来源:PayController.class.php


示例4: submit_profile_settings

 function submit_profile_settings($username)
 {
     $fullname = $this->input->post('fullname');
     $bio = $this->input->post('bio');
     $website = $this->input->post('website');
     $avatar = $this->input->post('avatar');
     $message = $this->validate('profile', $username, '', '', $fullname, $bio, $website);
     if (!empty($message)) {
         $this->session->set_flashdata('message', $message);
     } else {
         if ($avatar !== '') {
             $avatardata = array('avatar' => $this->avatar($avatar, get_twitter($username, FALSE, FALSE), get_email($username)));
             manipulate_database('update', 'user', $avatardata, array('username' => $username));
         }
         if ($website == 'http://') {
             $website = '';
         }
         $data = array('fullname' => make_it_safe($fullname), 'bio' => make_it_safe($bio), 'website' => $website);
         manipulate_database('update', 'user', $data, array('username' => $username));
         $this->session->set_flashdata('message', array('Awesome! Your profile settings had been saved.'));
     }
 }
开发者ID:stephenou,项目名称:OneExtraLap,代码行数:22,代码来源:account_model.php


示例5: parent_list

function parent_list()
{
    $parent_set = get_all_parents();
    $output = "";
    while ($parent = mysql_fetch_array($parent_set)) {
        $output .= "<tr id=\"{$parent['hash']}\">\n\t\t\t\t<td><input type=\"checkbox\"></td>";
        $output .= "<td>" . $parent['full_name'] . "</td>";
        $output .= "<td>" . get_phone($parent['id'], "contacts");
        $output .= "</td>";
        $output .= "<td>" . get_email($parent['id'], "contacts");
        $output . -"</td>";
        $output .= "<td>{$parent['addedon']}</td></tr>";
    }
    return $output;
}
开发者ID:mtuchi,项目名称:Kinu-Kids-website,代码行数:15,代码来源:functions.php


示例6: get_email

} else {
    ?>
			<input type="hidden" value="<?php 
    echo $username;
    ?>
" id="hiddenusername"/>
			<input type="hidden" value="<?php 
    echo $fullname;
    ?>
" id="hiddenfullname"/>
<?php 
}
if ($content_type == 'settings') {
    ?>
			<input type="hidden" value="<?php 
    echo get_email($username);
    ?>
" id="hiddenemail"/>
			<input type="hidden" value="<?php 
    echo get_twitter($username, FALSE, FALSE);
    ?>
" id="hiddentwitter"/>
<?php 
}
if (isset($userid)) {
    ?>
			<input type="hidden" value="<?php 
    echo $userid;
    ?>
" id="hiddenuserid"/>
<?php 
开发者ID:stephenou,项目名称:OneExtraLap,代码行数:31,代码来源:this_is_header.php


示例7: SupportEmail

function SupportEmail($TicketNo, $OldStatus = "")
{
    global $UserName, $Name, $Company, $StreetAddress, $Town, $State, $PostCode, $CO, $OtherDetail;
    global $Quantity, $ProductCode, $PartNo, $Description, $Price, $Duration, $Rate, $Details, $Email, $Comment, $ByContact;
    global $HomePhone, $WorkPhone, $Mobile, $Status, $ShortDesc, $EngineerEmail, $Created, $EnteredBy, $SequenceNo;
    global $AssignedTo, $ByUser;
    if ($TicketNo < 1) {
        return false;
    }
    $Level = 0;
    $db = new DB_hotspot();
    $stf = new SupportTicketsform();
    $stf->find_values($TicketNo);
    $mf = new userinfoform();
    $mf->find_values(UserID($UserName));
    $EngineerEmail = get_email($AssignedTo);
    if ($OldStatus) {
        $Status = $OldStatus . "->" . $Status;
    }
    $subj = "Ticket: {$TicketNo}, {$Status}, {$ShortDesc}";
    $Msg = "Job for: <b>{$UserName}, {$Name}</b><br>\n";
    if ($StreetAddress . $Town . $State . $PostCode) {
        $Msg .= "at: <b>";
        if ($StreetAddress) {
            $Msg .= "{$StreetAddress}, ";
        }
        if ($Town) {
            $Msg .= "{$Town}, ";
        }
        if ($State) {
            $Msg .= "{$State}, ";
        }
        if ($PostCode) {
            $Msg .= "{$PostCode}";
        }
        $Msg .= "</b><br>\n";
    }
    if (isset($HomePhone)) {
        $Msg .= "HomePhone: <b>{$HomePhone}</b><br>\n";
    }
    if (isset($WorkPhone)) {
        $Msg .= "WorkPhone: <b>{$WorkPhone}</b><br>\n";
    }
    if (isset($Mobile)) {
        $Msg .= "Mob: <b>{$Mobile}</b><br>\n";
    }
    if (isset($Mail)) {
        $Msg .= "Email: <b>{$Mail}</b><br>\n";
    }
    $Msg .= "------------------------------------------------------------<br>\n";
    $Msg .= "Entered By: <b>{$EnteredBy}</b><br>\n";
    $Msg .= "Date: <b>{$Created}</b><br>\n";
    if (isset($Location)) {
        $Msg .= "Location: <b>{$Location}</b><br>\n";
    }
    if (isset($RoomNo)) {
        $Msg .= "Room No: <b>{$RoomNo}</b><br>\n";
    }
    if (isset($Severity)) {
        $Msg .= "Severity: <b>{$Severity}</b><br>\n";
    }
    if ($Level > 0) {
        $Msg .= "Level: <b>{$Level}</b><br>\n";
    }
    $Msg .= "Description: <b>{$ShortDesc}</b> {$OtherDetail}<br>\n";
    $Msg .= "------------------------------------------------------------<br>\n";
    /*
    	$db->query("select id from SupportParts where TicketNo='".$TicketNo."'");
    	$sp = new SupportPartsform;
    	while ($db->next_record()) {
    		$sp->find_values($db->f(0));
    		$Msg .= "Part: <b>$Quantity x $ProductCode, $PartNo, $Description @ $Price</b><br>\n";
    	}
    	$db->query("select id from SupportDetails where TicketNo='".$TicketNo."'");
    	$sd = new SupportDetailsform;
    	while ($db->next_record()) {
    		$sd->find_values($db->f(0));
    		$Msg .= "Work: <b>$Duration minutes @ $Rate /hour, $Details</b><br>\n";
    	}
    */
    $db->query("select distinct FileName from SupportFiles where TicketNo='" . $TicketNo . "'");
    while ($db->next_record()) {
        $Msg .= "Attachment: http://os.{$CO}.com.au/files/{$TicketNo}/" . $db->f(0) . "<br>\n";
    }
    $db->query("select id from SupportComments where TicketNo='" . $TicketNo . "'");
    $sc = new SupportCommentsform();
    while ($db->next_record()) {
        $sc->find_values($db->f(0));
        $mf->find_values($ByContact);
        $Msg .= "Comment by <b>{$ByUser}:</b> ";
        $Msg .= str_replace('" src="/candy/', '" src="http://os.' . $CO . '.com.au/candy/', $Comment);
        $Msg .= "<br>\n";
    }
    $url = "https://os.{$CO}.com.au/SupportTickets.php?cmd=View&id=" . $TicketNo;
    $Msg .= "<a href='{$url}'>{$url}</a><br>\n";
    $hdrs = "From: ticket+{$TicketNo}@{$CO}.net.au";
    if ($EngineerEmail) {
        $hdrs .= "\r\nTo: {$EngineerEmail}";
    }
    htmlMail("info@{$CO}.com.au", $subj, $Msg, $hdrs);
//.........这里部分代码省略.........
开发者ID:TaylorMonacelli,项目名称:phplib,代码行数:101,代码来源:SupportEmail.php


示例8: array

     $params = array($report_id, $file_path);
     Util::execute_command("/usr/bin/php /usr/share/ossim/scripts/vulnmeter/respdf.php ? > ?", $params);
     if (file_exists($file_path) && filesize($file_path) <= 5242880) {
         $attachments[] = array("path" => $file_path, "name" => $file_name);
     }
 }
 if (!valid_hex32($username)) {
     $body = get_timestamps($dbconn, $username, $result->fields['scan_START'], $result->fields['scan_SUBMIT'], $body);
     $email = get_email($dbconn, $username);
     Util::send_email($dbconn, $email, $subject, $body, $attachments);
 } else {
     // username is a entity
     $entity_data = Acl::get_entity($dbconn, $username, FALSE, FALSE);
     if ($entity_data["admin_user"] != "") {
         $body = get_timestamps($dbconn, $entity_data["admin_user"], $result->fields['scan_START'], $result->fields['scan_SUBMIT'], $body);
         $email = get_email($dbconn, $entity_data["admin_user"]);
         Util::send_email($dbconn, $email, $subject, $body, $attachments);
     } else {
         // doesn't exit pro admin
         $users_list = Acl::get_users_by_entity($dbconn, $username);
         foreach ($users_list as $k => $user_data) {
             if ($user_data['email'] != "") {
                 $body = get_timestamps($dbconn, $user_data['login'], $result->fields['scan_START'], $result->fields['scan_SUBMIT'], $body);
                 if ($user_data['email'] != '') {
                     Util::send_email($dbconn, $user_data['email'], $subject, $body, $attachments);
                 }
             }
         }
     }
 }
 if (file_exists($file_path)) {
开发者ID:jackpf,项目名称:ossim-arc,代码行数:31,代码来源:send_notification.php


示例9: file_get_contents

if (!isset($HTTP_RAW_POST_DATA)) {
    $HTTP_RAW_POST_DATA = file_get_contents('php://input');
}
$data = json_decode($HTTP_RAW_POST_DATA);
$time = time();
$complaint_simulator_email = '[email protected]';
//Confirm SNS subscription
if ($data->Type == 'SubscriptionConfirmation') {
    file_get_contents_curl($data->SubscribeURL);
} else {
    //detect complaints
    $obj = json_decode($data->Message);
    $notificationType = $obj->{'notificationType'};
    $problem_email = $obj->{'complaint'}->{'complainedRecipients'};
    $problem_email = $problem_email[0]->{'emailAddress'};
    $from_email = get_email($obj->{'mail'}->{'source'});
    $messageId = $obj->{'mail'}->{'messageId'};
    $from_email = $from_email[0];
    //check if email is valid, if not, exit
    if (!filter_var($problem_email, FILTER_VALIDATE_EMAIL)) {
        exit;
    }
    if ($notificationType == 'Complaint') {
        //Update complaint status
        if ($problem_email == $complaint_simulator_email) {
            if (filter_var($from_email, FILTER_VALIDATE_EMAIL)) {
                mysqli_query($mysqli, 'UPDATE apps SET complaint_setup=1 WHERE from_email = "' . $from_email . '"');
                mysqli_query($mysqli, 'UPDATE campaigns SET complaint_setup=1 WHERE from_email = "' . $from_email . '"');
            }
        }
        //Get app ID of this complaint email
开发者ID:ariestiyansyah,项目名称:nggadu,代码行数:31,代码来源:complaints.php


示例10: makeorder

 public function makeorder()
 {
     /* 菜单调用*/
     $menu = R('index/menulist');
     $this->assign('categoryq', $menu);
     /* 购物车调用*/
     $cart = R("shopcart/usercart");
     $this->assign('usercart', $cart);
     if (!session('user_auth')) {
         $usercart = $_SESSION['cart'];
         $this->assign('usercart', $usercart);
     }
     /* 热词调用*/
     $hotsearch = R("Index/getHotsearch");
     $this->assign('hotsearch', $hotsearch);
     $id = $_POST["orderid"];
     $order = D("order");
     //计算提交的订单的商品总额
     $total = $this->getPricetotal($id);
     //计算提交的订单的商品运费
     if ($total < C('LOWWEST')) {
         $trans = C('SHIPMONEY');
     } else {
         $trans = 0;
     }
     //计算提交的积分兑换
     if ($_POST["score"]) {
         $score = $_POST["score"];
         //读取配置,1000积分兑换1元
         $ratio = $score / C('RATIO');
         $data['score'] = $score;
         $user = session('user_auth');
         $uid = $user["uid"];
         M("member")->where("uid='{$uid}'")->setField('score', 0);
     } else {
         $ratio = 0;
     }
     $del = M("order")->where("total='0'")->delete();
     //计算提交的优惠券
     if ($_POST["couponcode"]) {
         $code = $_POST["couponcode"];
         $codeid = M("fcoupon")->where("code='{$code}' and status='1'")->getField('id');
         //获取优惠券主键id
         $deccode = get_coupon_price($codeid);
         //获取优惠券等值金额
         $usercouponid = M("usercoupon")->where("couponid='{$codeid}' and status='1'")->getField('id');
         //获取用户可用优惠券主键id
         if ($usercouponid) {
             $data['codeid'] = $codeid;
             M("usercoupon")->where("couponid='{$codeid}'")->setField('status', 2);
             //设置优惠券已用
         } else {
             $deccode = 0;
         }
     } else {
         $deccode = 0;
     }
     $senderid = $_POST["sender"];
     $data['addressid'] = $senderid;
     $data['total'] = $total;
     $data['ptime'] = NOW_TIME;
     $data['shipprice'] = $trans;
     //计算提交的订单的总费用
     $all = $total + $trans - $ratio - $deccode;
     $data['pricetotal'] = $all;
     //修改订单状态为用户已提交
     if ($_POST["PayType"] == "1") {
         $data['status'] = "1";
         $data['backinfo'] = "已提交等待发货";
         //增加取消订单
         //根据订单id保存对应的费用数据
         $order->where("id='{$id}'")->save($data);
         //根据订单id获取购物清单
         $del = M("shoplist")->where("orderid='{$id}'")->select();
         //获取会员uid
         $member = D("member");
         $uid = $member->uid();
         //遍历购物清单,删除登录用户购物车中的货物id
         foreach ($del as $k => $val) {
             //获取购物清单数据表产品id,字段goodid
             $delbyid = $val["goodid"];
             //删除购物车中用户的产品id
             M("shopcart")->where("goodid='{$delbyid}'and uid='{$uid}'")->delete();
         }
         $ordercode = $order->where("id='{$id}'")->getField('orderid');
         $this->assign('codeid', $ordercode);
         $mail = get_email($ordercode);
         //获取会员邮箱
         $title = "交易提醒";
         $content = "您在<a href=\"" . C('DAMAIN') . "\" target='_blank'>" . C('SITENAME') . '</a>提交了订单,订单号' . $param['order_id'];
         if (C('MAIL_PASSWORD')) {
             SendMail($mail, $title, $content);
         }
         $this->display('success');
     } else {
         //设置订单状态为用户为未能完成,不删除数据
         $data['backinfo'] = "等待支付";
         $data['ispay'] = "1";
         $data['status'] = "13";
         //根据订单id保存对应的费用数据
//.........这里部分代码省略.........
开发者ID:stonegithubs,项目名称:yershop,代码行数:101,代码来源:ShopcartController.class.php


示例11: elseif

} else {
    $user['userage'] = (int) $user['userage'];
}
if ($user['usericq'] == 0) {
    $user['usericq'] = "";
}
if ($config['showpostslevel'] == 0) {
    $user['userposts'] = "- (Vom Administrator deaktiviert)";
} elseif ($config['showpostslevel'] == 1 && $g_user['userid'] != $user['userid']) {
    if ($g_user['userisadmin']) {
        $user['userposts'] = '- (Versteckt)' . $style['smallfont'] . ' [Admin: Postcount = ' . $user['userposts'] . ' ]' . $style['smallfontend'];
    } else {
        $user['userposts'] = '- (Versteckt)';
    }
}
$user['useremail'] = get_email($user);
$user['username'] = parse_code($user['username']);
$user['userip'] = '';
if ($g_user['userisadmin']) {
    $r_online = thwb_query("SELECT onlineip FROM {$pref}" . "online WHERE userid='{$user['userid']}' AND onlinetime > " . (time() - $config['session_timeout']));
    if (mysql_num_rows($r_online) > 0) {
        $online = mysql_fetch_array($r_online);
        $user['userip'] = $style['smallfont'] . ' [Admin: IP = ' . $online['onlineip'] . ', Hostname = ' . gethostbyaddr($online['onlineip']) . ' ]' . $style['smallfontend'];
    }
}
$user['useraim'] = parse_code($user['useraim']);
$user['usermsn'] = parse_code($user['usermsn']);
$userurlname = rawurlencode($user['username']);
$navpath .= 'Profilansicht';
eval($Tprofile->GetTemplate("CONTENT"));
eval($Tframe->GetTemplate());
开发者ID:adrianbroher,项目名称:thwboard,代码行数:31,代码来源:v_profile.php


示例12: require_lib

<?php

require "settings.php";
require_lib("mail.smtp");
if (isset($_POST["key"])) {
    if ($_POST["key"] == "group") {
        $OUTPUT = get_data($_POST);
    } elseif ($_POST["key"] == "process") {
        $OUTPUT = process_data($_POST);
    } elseif ($_POST["key"] == "modify") {
        if (isset($_POST["done"])) {
            $OUTPUT = get_email($_POST);
        } else {
            $OUTPUT = process_data($_POST);
        }
    } elseif ($_POST["key"] == "send_mail") {
        $OUTPUT = send_emails($_POST);
    }
} else {
    $OUTPUT = select_group();
}
$OUTPUT .= "<p>" . mkQuickLinks(ql("email-queue-manage.php", "Send Emails In Queue"), ql("email-queue-failures.php", "Resend Failed Emails In Queue"), ql("email-groups.php", "Send Email To Group"), ql("email-group-new.php", "Add Email Group"), ql("email-group-view.php", "View Email Groups"));
require "template.php";
function select_group()
{
    db_connect();
    $groups = "";
    #get list of groups
    $get_groups = "SELECT * from egroups ORDER BY groupname";
    $run_egroups = db_exec($get_groups) or errDie("Unable to get group information.");
    if (pg_numrows($run_egroups) > 0) {
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:31,代码来源:email-groups.php


示例13: confirm_email

 /** 激活邮箱 **/
 public function confirm_email()
 {
     $type = I("get.type");
     $type = safe_replace($type);
     //过滤
     $regid = I("get.regid", 0, 'intval');
     if ($type && $regid) {
         $verification = M("verification");
         $mail = get_email($uid);
         $data['email'] = $mail;
         $data['create_time'] = NOW_TIME;
         $data['status'] = 1;
         $data['tag'] = 1;
         $data['uid'] = $regid;
         $verification->create();
         $verification->add($data);
         $this->display("success");
     } else {
         $this->redirect("index/index");
     }
 }
开发者ID:gitchenze,项目名称:soloshop,代码行数:22,代码来源:AccountController.class.php


示例14: get_email

       
        <h3>Subject: </h3>
        <textarea rows="1" cols="60" name="subject" id="subject" type="text" style="display:block-inline;"></textarea>
       
       <br/><br/>
       <h3>Body: </h3>
		Salutation: 
       <select name="salutation">
       <option value="none">None</option>
       <option value="dear">Dear [first name], </option>
       
       </select>
       
       <!-- <textarea rows="1" cols="10" name="greeting" type="text" style="display:block-inline;"></textarea> -->
        <!-- Dear [Person's First Name],</br> -->
        <textarea rows="20" cols="80" name="body" id="body" type="text" style="display:block-inline;background-color:#FFF;"></textarea>
        <input type="submit" value="Send Email" style="vertical-align:top;"/>
      </form>
      <br /> 
      <?php 
get_email();
?>
   </div><!--end grid_16 -->
        <div class="grid_1"><p></p></div>
    </div><!--end grid_20 -->
  </div><!--end grid_24 -->
</div><!--end container__24 -->

</body>
</html>
开发者ID:bradleytrager,项目名称:bais-mordechai-legacy,代码行数:29,代码来源:write_email.php


示例15: get_email

?>
<!DOCTYPE html>
<html>
	<head>
    	<style>
			body{
				background-color:#efefef;
				text-align:center;
			}
		</style>
    </head>
    <body>
    	<div style = "margin:0 auto;margin-top:32px;margin-bottom:32px;width:100%;">
    	<?php 
require_once '../scripts/functions.php';
$un = $_SESSION['username'];
$em = get_email($_SESSION['username']);
$op = $_POST['oldpass1'];
$np = $_POST['newpass1'];
error_reporting(0);
if (!is_valid_login($em, $op)) {
    echo "Your information could not be validated.";
} else {
    change_password($em, $np);
    echo "Password successfully changed.";
}
?>
        </div>
        <a href="javascript: self.close()">[x] close this window</a>
    </body>
</html>
开发者ID:postoakt,项目名称:feelr,代码行数:31,代码来源:result.php


示例16: save


//.........这里部分代码省略.........
     }
     $data['score'] = $score;
     $data['score_money'] = $ratio;
     $title = '消耗积分' . $score . '抵消金额' . $ratio;
     addUserLog($title, $uid);
     //日志
     //计算优惠券
     $code = I('post.couponcode');
     $code = safe_replace($code);
     //过滤
     //判断优惠券是否可用
     $xfee = $total + $trans - $ratio;
     //计算优惠券可使用的金额,home/common/function
     $decfee = get_fcoupon_fee($code, $xfee);
     $data['coupon'] = $code;
     //优惠券代码
     $data['coupon_money'] = $decfee;
     //优惠券金额
     //计算使用地址id
     $senderid = I('post.sender');
     $senderid = safe_replace($senderid);
     //过滤
     $data['addressid'] = $senderid;
     //计算应付金额
     $all = $total + $trans - $ratio - $decfee;
     $data['total_money'] = $all;
     //应付金额
     $data['create_time'] = NOW_TIME;
     //创建时间
     //支付类型PayType,1-货到付款
     if ($_POST["PayType"] == "1") {
         //创建订单
         $data['status'] = 1;
         $data['ispay'] = -1;
         //货到付款
         $orderid = $order->add($data);
         M("shoplist")->where("tag='{$tag}'")->setField('orderid', $orderid);
         //保存货到付款支付数据
         $pay = M("pay");
         $pay->create();
         $pay->money = $all;
         $pay->ratio = $ratio;
         $pay->total = $total;
         $pay->out_trade_no = $tag;
         $pay->yunfee = $trans;
         $pay->coupon = $defee;
         $pay->uid = $uid;
         $pay->addressid = $senderid;
         $pay->create_time = NOW_TIME;
         $pay->type = 2;
         //货到付款
         $pay->status = 2;
         $pay->add();
         //发送邮件
         $mail = get_email($uid);
         //获取会员邮箱
         $title = "交易提醒";
         $content = "您在<a href=\"" . C('DAMAIN') . "\" target='_blank'>" . C('SITENAME') . '</a>提交了订单,订单号' . $tag;
         if (C('MAIL_PASSWORD')) {
             SendMail($mail, $title, $content);
         }
         //保存日志
         addUserLog('货到付款订单已提交', $uid);
         $this->meta_title = '提交成功';
         $this->display('Shopcart/success');
     }
     //支付类型PayType,2-在线支付
     if ($_POST["PayType"] == "2") {
         //创建订单
         $data['ispay'] = "1";
         $data['status'] = "-1";
         //待支付
         //根据订单id保存对应的费用数据
         $orderid = $order->add($data);
         M("shoplist")->where("tag='{$tag}'")->setField('orderid', $orderid);
         //发起支付时thinkpay会自动创建
         //      $pay=M("pay");
         //      $pay->create();
         //      $pay->money=$all;
         //      $pay->ratio=$ratio;
         //      $pay->total=$total;
         //      $pay->out_trade_no=$tag;
         //      $pay->yunfee=$trans;
         //      $pay->coupon=$deccode;
         //      $pay->uid=$uid;
         //      $pay->addressid=$senderid;
         //        $pay->create_time=NOW_TIME;
         //        $pay->type=1;//在线支付
         //      $pay->status=-1;//待支付
         //      $pay->add();
         //记录日志
         addUserLog('在线支付订单已提交', $uid);
         $this->meta_title = '订单支付';
         //输出支付订单号和支付金额
         $this->assign('codeid', $tag);
         $this->assign('goodprice', $all);
         //支付页
         $this->display('Pay/index');
     }
 }
开发者ID:gitchenze,项目名称:soloshop,代码行数:101,代码来源:OrderController.class.php


示例17: get_code_block

                $body .= "Line: {$line0}\n";
                $body .= "Type: {$type}\nError: {$details}\nCode:\n\n";
                $body .= get_code_block($file, $line0, $char0, $line1, $char1);
                $emails[$blame] = $body;
                echo ".";
            } else {
                echo "x";
            }
        }
    }
    echo "\n";
}
if (!$Command) {
    foreach ($emails as $blame => $body) {
        echo "sending mail to {$blame}...\n";
        mail(get_email($blame), "[nemo] A bug's life ends here", "Hi, there,\n\n" . "HipHop compiler might have found some bugs with PHP code you " . "were working on. Would you take a quick look to see if they are " . "real problems? Please do not ask me to review your change. " . "Ask someone who's familiar with the code :-) If it is not your bug, " . "please try to find the right person/group to fix the problem.\n\n" . "Also, this tool is still under development. If you think this is " . "something we shouldn't be warning about, please let me know\n\n" . "Thanks!\n" . $body, "From: {$CurEmail}");
    }
} else {
    if ($Command == "--dry-run") {
        foreach ($emails as $blame => $body) {
            var_dump($blame, $body);
        }
    }
}
///////////////////////////////////////////////////////////////////////////////
function get_code_block($file, $line0, $char0, $line1, $char1)
{
    global $SourceRoot;
    $ret = '';
    $start = $line0 - 4;
    if ($start < 1) {
开发者ID:nsant,项目名称:hiphop-php,代码行数:31,代码来源:code_error.php


示例18: sign_in

function sign_in($email, $password)
{
    if ($GLOBALS['$connected'] == False) {
        connect_to_db();
    }
    // Searching the email address in the database
    $result = get_email($email);
    $row = mysql_fetch_array($result);
    $hash = $row["password"];
    //Unhashing the password to see if it matches what was entered.
    if (password_verify($password, $hash)) {
        $id = $row["id"];
        $_SESSION['login_user'] = "{$id}";
        // Initializing Session
        $privilege = get_privilege();
        setcookie("user_id", $id);
        setcookie("user_priv", $privilege);
        //session_id('$id');
        session_start();
        header('Location:index.html');
    } else {
        echo '<script>';
        echo 'alert("Password is invalid");';
        echo 'location.href="index.html"';
        echo '</script>';
    }
}
开发者ID:patthickey,项目名称:software_engineering,代码行数:27,代码来源:sql_calls.php


示例19: while

    while ($user = mysql_fetch_array($r_user)) {
        $i % 2 == 0 ? $user['bgcolor'] = $style['CellA'] : ($user['bgcolor'] = $style['CellB']);
        $user['userjoin'] = form_date($user['userjoin']);
        $user['userlastpost'] = form_date($user['userlastpost']);
        $user['userlocation'] = chopstring(parse_code($user['userlocation']), 50);
        if ($user['userhomepage'] == "http://") {
            $user['userhomepage'] = '';
        }
        $user['userhomepage'] = parse_code($user['userhomepage']);
        $user['username'] = parse_code($user['username']);
        if ($config['showpostslevel'] != 2) {
            if (!$g_user['userisadmin']) {
                $user['userposts'] = 'n/a';
            }
        }
        $user['useremail'] = get_email($user, true);
        if ($user['userhomepage']) {
            $user['userhomepage'] = '<a href="' . str_replace('"', '', $user['userhomepage']) . '" target="_blank">' . chopstring($user['userhomepage'], 35) . "</a>";
        } else {
            $user['userhomepage'] = "&nbsp;";
        }
        if (!$user['usericq']) {
            $user['usericq'] = "&nbsp;";
        }
        if (!$user['userlocation']) {
            $user['userlocation'] = "&nbsp;";
        }
        eval($TMemberrow->GetTemplate("MEMBER_ROWS"));
        $i++;
    }
}
开发者ID:adrianbroher,项目名称:thwboard,代码行数:31,代码来源:memberlist.php


示例20: doit

function doit($input)
{
    global $fp;
    if (!($fp = popen($input, 'r'))) {
        die("Cannot open pipe");
    }
    $lines = 1;
    while ($line = fgets($fp, 2096)) {
        $parsed = new syslog_parser($line);
        $_timestamp = mysql_real_escape_string($parsed->timestamp);
        $_host = mysql_real_escape_string($parsed->host);
        $_dsn = "";
        $_delay = "";
        $_relay = "";
        // Sendmail
        if ($parsed->process == 'sendmail' && class_exists('sendmail_parser')) {
            $sendmail = new sendmail_parser($parsed->entry);
            if (DEBUG) {
                print_r($sendmail);
            }
            $_msg_id = mysql_real_escape_string($sendmail->id);
            // Rulesets
            if (isset($sendmail->entries['ruleset'])) {
                if ($sendmail->entries['ruleset'] == 'check_relay') {
                    // Listed in RBL(s)
                    $_type = mysql_real_escape_string('rbl');
                    $_relay = mysql_real_escape_string($sendmail->entries['arg2']);
                    $_status = mysql_real_escape_string($sendmail->entries['reject']);
                }
                if ($sendmail->entries['ruleset'] == 'check_mail') {
                    // Domain does not resolve
                    $_type = mysql_real_escape_string('unresolveable');
                    $_status = mysql_real_escape_string(get_email($sendmail->entries['reject']));
                }
            }
            // Milter-ahead rejections
            if (preg_match('/Milter: /i', $sendmail->raw) && preg_match('/(rejected recipient|user unknown)/i', $sendmail->entries['reject'])) {
                $_type = mysql_real_escape_string('unknown_user');
                $_status = mysql_real_escape_string(get_email($sendmail->entries['to']));
            }
            // Unknown users
            if (preg_match('/user unknown/i', $sendmail->entry)) {
                // Unknown users
                $_type = mysql_real_escape_string('unknown_user');
                $_status = mysql_real_escape_string($sendmail->raw);
            }
            // Relay lines
            if (isset($sendmail->entries['relay']) && isset($sendmail->entries['stat'])) {
                $_type = mysql_real_escape_string('relay');
                $_delay = mysql_real_escape_string($sendmail->entries['xdelay']);
                $_relay = mysql_real_escape_string(get_ip($sendmail->entries['relay']));
                $_dsn = mysql_real_escape_string($sendmail->entries['dsn']);
                $_status = mysql_real_escape_string($sendmail->entries['stat']);
            }
        }
        if (isset($_type)) {
            dbquery("REPLACE INTO mtalog VALUES (FROM_UNIXTIME('{$_timestamp}'),'{$_host}','{$_type}','{$_msg_id}','{$_relay}','{$_dsn}','{$_status}','{$_delay}')");
        }
        $lines++;
        // Reset variables
        unset($line, $parsed, $sendmail, $_timestamp, $_host, $_type, $_msg_id, $_relay, $_dsn, $_status, $_delay);
    }
    pclose($fp);
}
开发者ID:rafaelbsd,项目名称:1.2.0,代码行数:64,代码来源:sendmail_relay.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_email_address函数代码示例发布时间:2022-05-15
下一篇:
PHP get_elapsed_time函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap