本文整理汇总了PHP中eixt函数的典型用法代码示例。如果您正苦于以下问题:PHP eixt函数的具体用法?PHP eixt怎么用?PHP eixt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了eixt函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: notify_url
public function notify_url()
{
echo "success";
eixt();
}
示例2: approvalRequired
function approvalRequired($guid, $gibbonPersonID, $gibbonFinanceExpenseID, $gibbonFinanceBudgetCycleID, $connection2, $locking = TRUE)
{
//Lock tables
$lock = true;
if ($locking) {
try {
$sqlLock = "LOCK TABLE gibbonFinanceExpense WRITE, gibbonFinanceExpenseApprover WRITE, gibbonFinanceExpenseLog WRITE, gibbonFinanceBudget WRITE, gibbonFinanceBudgetPerson WRITE, gibbonSetting WRITE, gibbonNotification WRITE, gibbonPerson READ, gibbonModule READ";
$resultLock = $connection2->query($sqlLock);
} catch (PDOException $e) {
$lock = FALSE;
return FALSE;
}
}
if ($lock) {
try {
$data = array("gibbonFinanceExpenseID" => $gibbonFinanceExpenseID);
$sql = "SELECT gibbonFinanceExpense.*, gibbonFinanceBudget.name AS budget FROM gibbonFinanceExpense JOIN gibbonFinanceBudget ON (gibbonFinanceExpense.gibbonFinanceBudgetID=gibbonFinanceBudget.gibbonFinanceBudgetID) WHERE gibbonFinanceExpense.gibbonFinanceExpenseID=:gibbonFinanceExpenseID";
$result = $connection2->prepare($sql);
$result->execute($data);
} catch (PDOException $e) {
return FALSE;
}
if ($result->rowCount() != 1) {
print $result->rowCount();
eixt();
return FALSE;
} else {
$row = $result->fetch();
//Get settings for budget-level and school-level approval
$expenseApprovalType = getSettingByScope($connection2, "Finance", "expenseApprovalType");
$budgetLevelExpenseApproval = getSettingByScope($connection2, "Finance", "budgetLevelExpenseApproval");
if ($expenseApprovalType == "" or $budgetLevelExpenseApproval == "") {
return FALSE;
} else {
if ($row["status"] != "Requested") {
//Finished? Return
return FALSE;
} else {
//Not finished
if ($row["statusApprovalBudgetCleared"] == "N") {
//Get Full budget people
try {
$dataBudget = array("gibbonFinanceBudgetID" => $row["gibbonFinanceBudgetID"], "gibbonPersonID" => $gibbonPersonID);
$sqlBudget = "SELECT gibbonPersonID FROM gibbonFinanceBudget JOIN gibbonFinanceBudgetPerson ON (gibbonFinanceBudgetPerson.gibbonFinanceBudgetID=gibbonFinanceBudget.gibbonFinanceBudgetID) WHERE access='Full' AND gibbonFinanceBudget.gibbonFinanceBudgetID=:gibbonFinanceBudgetID AND gibbonFinanceBudgetPerson.gibbonPersonID=:gibbonPersonID";
$resultBudget = $connection2->prepare($sqlBudget);
$resultBudget->execute($dataBudget);
} catch (PDOException $e) {
return FALSE;
}
if ($resultBudget->rowCount() != 1) {
return FALSE;
} else {
return TRUE;
}
} else {
//School-level approval, what type is it?
if ($expenseApprovalType == "One Of" or $expenseApprovalType == "Two Of") {
//One Of or Two Of, so alert all approvers
try {
$dataApprovers = array("gibbonPersonID" => $gibbonPersonID);
$sqlApprovers = "SELECT gibbonPerson.gibbonPersonID FROM gibbonFinanceExpenseApprover JOIN gibbonPerson ON (gibbonFinanceExpenseApprover.gibbonPersonID=gibbonPerson.gibbonPersonID) WHERE gibbonPerson.status='Full' AND gibbonFinanceExpenseApprover.gibbonPersonID=:gibbonPersonID ORDER BY surname, preferredName";
$resultApprovers = $connection2->prepare($sqlApprovers);
$resultApprovers->execute($dataApprovers);
} catch (PDOException $e) {
return FALSE;
}
if ($resultApprovers->rowCount() != 1) {
return FALSE;
} else {
//Check of already approved at school-level
try {
$dataApproval = array("gibbonFinanceExpenseID" => $gibbonFinanceExpenseID, "gibbonPersonID" => $gibbonPersonID);
$sqlApproval = "SELECT * FROM gibbonFinanceExpenseLog WHERE gibbonFinanceExpenseID=:gibbonFinanceExpenseID AND gibbonPersonID=:gibbonPersonID AND action='Approval - Partial - School'";
$resultApproval = $connection2->prepare($sqlApproval);
$resultApproval->execute($dataApproval);
} catch (PDOException $e) {
return FALSE;
}
if ($resultApproval->rowCount() > 0) {
return FALSE;
} else {
return TRUE;
}
}
} else {
if ($expenseApprovalType == "Chain Of All") {
//Chain of all
//Get notifiers in sequence
try {
$dataApprovers = array("gibbonFinanceExpenseID" => $gibbonFinanceExpenseID);
$sqlApprovers = "SELECT gibbonPerson.gibbonPersonID AS g1, gibbonFinanceExpenseLog.gibbonPersonID AS g2 FROM gibbonFinanceExpenseApprover JOIN gibbonPerson ON (gibbonFinanceExpenseApprover.gibbonPersonID=gibbonPerson.gibbonPersonID) LEFT JOIN gibbonFinanceExpenseLog ON (gibbonFinanceExpenseLog.gibbonPersonID=gibbonFinanceExpenseApprover.gibbonPersonID AND gibbonFinanceExpenseLog.action='Approval - Partial - School' AND gibbonFinanceExpenseLog.gibbonFinanceExpenseID=:gibbonFinanceExpenseID) WHERE gibbonPerson.status='Full' ORDER BY sequenceNumber, surname, preferredName";
$resultApprovers = $connection2->prepare($sqlApprovers);
$resultApprovers->execute($dataApprovers);
} catch (PDOException $e) {
return FALSE;
}
if ($resultApprovers->rowCount() < 1) {
return FALSE;
} else {
$approvers = $resultApprovers->fetchAll();
//.........这里部分代码省略.........
示例3: tenpayshare_notify_url
public function tenpayshare_notify_url()
{
echo "success";
eixt();
}
示例4: pay
public function pay()
{
$totalprice = $_GET['totalprice'];
//$cart_names = $_GET['cart_name'];
//$openid = $_GET['uid'];
$openid = $_SESSION['uid'];
$orderid = $_GET['orderid'];
$agent = $_SERVER['HTTP_USER_AGENT'];
if (!strpos($agent, "Android")) {
$this->assign("tbtspic", "ios.png");
} else {
$this->assign("tbtspic", "android.png");
}
if (!strpos($agent, "icroMessenger")) {
$alipay = M("Alipay")->find();
$url = 'http://' . $_SERVER['SERVER_NAME'] . __ROOT__ . '/api/wapalipay/alipayapi.php?WIDseller_email=' . $alipay['alipayname'] . '&WIDout_trade_no=' . $orderid . '&WIDsubject=' . $orderid . '&WIDtotal_fee=' . $totalprice;
header("Location: {$url}");
exit;
}
import('Wechat', APP_PATH . 'Common/Wechat', '.class.php');
$config = M("Wxconfig")->where(array("id" => "1"))->find();
$options = array('token' => $config["token"], 'encodingaeskey' => $config["encodingaeskey"], 'appid' => $config["appid"], 'appsecret' => $config["appsecret"], 'partnerid' => $config["partnerid"], 'partnerkey' => $config["partnerkey"], 'paysignkey' => $config["paysignkey"]);
$weObj = new Wechat($options);
if (strlen($openid) <= 10) {
$info = $weObj->getOauthAccessToken();
if (!$info) {
$callback = 'http://' . $_SERVER['SERVER_NAME'] . U("App/Index/pay", $_GET);
$url = $weObj->getOauthRedirect($callback, '', 'snsapi_base');
header("Location: {$url}");
exit;
} else {
$openid = $info['openid'];
}
}
$order_info = M('Order')->where(array('orderid' => $orderid))->find();
if (empty($order_info)) {
exit('订单信息错误');
}
$cartdata = json_decode($order_info['cartdata'], true);
$cart_name = $cartdata[0]['name'];
$cart_num = $cartdata[0]['num'];
$cart_price = $cartdata[0]['price'];
$cart_goods_id = $cartdata[0]['id'];
$goodsdata = M("Good")->where(array("id" => $cart_goods_id))->find();
$userdata = M("User")->where(array("uid" => $_SESSION['uid']))->find();
if (empty($userdata)) {
exit('用户信息错误');
}
$username = $userdata['username'];
$phone = $userdata['phone'];
$address = $userdata['address'];
$this->assign("goodsdata", $goodsdata);
$this->assign("username", $username);
$this->assign("phone", $phone);
$this->assign("address", $address);
$this->assign("cart_name", $cart_name);
$this->assign("cart_num", $cart_num);
$this->assign("cart_price", $cart_price);
$coptions = array('token' => $config["token"], 'encodingaeskey' => $config["encodingaeskey"], 'appid' => $config["cappid"], 'appsecret' => $config["cappsecret"], 'partnerid' => $config["partnerid"], 'partnerkey' => $config["partnerkey"], 'paysignkey' => $config["paysignkey"]);
$cweObj = new Wechat($coptions);
$cinfo = $cweObj->getOauthAccessToken();
if (!$cinfo) {
$callback = 'http://' . $_SERVER['SERVER_NAME'] . U("App/Index/pay", $_GET);
$url = $cweObj->getOauthRedirect($callback, '', 'snsapi_base');
header("Location: {$url}");
exit;
}
$appid = $coptions['appid'];
$mch_id = $coptions['partnerid'];
$out_trade_no = $orderid;
$body = $cart_name;
$total_fee = $cart_price * $cart_num * 100;
$notify_url = 'http://' . $_SERVER['SERVER_NAME'];
$spbill_create_ip = $_SERVER["REMOTE_ADDR"];
$nonce_str = $cweObj->generateNonceStr();
$copenid = $cinfo['openid'];
$pay_xml = $cweObj->createPackageXml($appid, $mch_id, $nonce_str, $body, $out_trade_no, $total_fee, $spbill_create_ip, $notify_url, $copenid);
$pay_xml = $cweObj->get_pay_id($pay_xml);
if ($pay_xml['err_code'] == "ORDERPAID") {
$this->redirect('App/Index/payover', array('out_trade_no' => $out_trade_no, 'uid' => $_SESSION['uid']));
eixt();
}
$prepay_id = $pay_xml['prepay_id'];
$jsApiObj["appId"] = $appid;
$timeStamp = time();
$jsApiObj["timeStamp"] = "{$timeStamp}";
$jsApiObj["nonceStr"] = $nonce_str;
$jsApiObj["package"] = "prepay_id={$prepay_id}";
$jsApiObj["signType"] = "MD5";
$jsApiObj["paySign"] = $cweObj->getPaySignature($jsApiObj);
$url = json_encode($jsApiObj);
$returnUrl = 'http://' . $_SERVER['SERVER_NAME'] . U('App/Index/payover', array('out_trade_no' => $out_trade_no, 'uid' => $_SESSION['uid']));
$info = R("Api/Api/gettheme");
C("DEFAULT_THEME", $info["theme"]);
$this->assign("price", $cart_price * $cart_num);
$this->assign("info", $info);
$this->assign("url", $url);
$this->assign("returnUrl", $returnUrl);
$this->display();
}
示例5: db_error
if (!$res) {
echo 'Error deleting dependencies: ' . db_error();
db_rollback();
exit;
}
$res = db_query("DELETE FROM project_history WHERE project_task_id='" . $task_id . "'");
if (!$res) {
echo 'Error deleting history: ' . db_error();
db_rollback();
exit;
}
$res = db_query("DELETE FROM project_messages WHERE project_task_id='" . $task_id . "'");
if (!$res) {
echo 'Error deleting messages: ' . db_error();
db_rollback();
eixt();
}
$res = db_query("DELETE FROM project_task_artifact\tWHERE project_task_id='" . $task_id . "'");
if (!$res) {
echo 'Error deleting artifacts: ' . db_error();
db_rollback();
exit;
}
$res = db_query("DELETE FROM rep_time_tracking\tWHERE project_task_id='" . $task_id . "'");
if (!$res) {
echo 'Error deleting time tracking report: ' . db_error();
db_rollback();
exit;
}
$res = db_query("DELETE FROM project_task WHERE project_task_id='" . $task_id . "'");
if (!$res) {
示例6: define
<?php
define('HELP_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
include HELP_PATH . 'core.php';
$op = isset($_GET['op']) && trim($_GET['op']) ? trim($_GET['op']) : eixt('operation can not be empty');
if (!preg_match('/([^a-z_]+)/i', $op) && file_exists(HELP_PATH . 'helper/' . $op . '.php')) {
include HELP_PATH . 'helper/' . $op . '.php';
} else {
exit('Helper handler does not exist');
}
示例8: wxpayapi
public function wxpayapi()
{
$this->checkUser();
if (!$_GET['payid']) {
$this->error("没有找到相关支付订单");
}
$payment_info = M('Payment')->where(array('id' => $_GET['payid']))->find();
$alipay_config = $this->alipay_config(2);
$price = $payment_info['discount'] + $payment_info['paymoney'];
import('Wechat', APP_PATH . 'Common/Wechat', '.class.php');
$options = array('appid' => 'wx0d502aa5ef3e60b0', 'appsecret' => '08844e4bafaf557818c520598dc7a029', 'partnerid' => '1280963601', 'partnerkey' => 'tianshiweishang8tianshimama8zhou', 'paysignkey' => '08844e4bafaf557818c520598dc7a029');
$weObj = new Wechat($options);
$appid = $options['appid'];
$mch_id = $options['partnerid'];
$out_trade_no = $payment_info['payno'];
$body = '积分充值';
$total_fee = $price * 100;
$notify_url = 'http://' . $_SERVER['SERVER_NAME'] . U('Member/wxNotify_url', array('out_trade_no' => $out_trade_no));
$spbill_create_ip = $_SERVER['REMOTE_ADDR'];
$nonce_str = $weObj->generateNonceStr();
$pay_xml = $weObj->createNativePackageXml($appid, $mch_id, $nonce_str, $body, $out_trade_no, $total_fee, $notify_url, $spbill_create_ip);
$pay_xml = $weObj->get_pay_id($pay_xml);
if ($pay_xml['err_code'] == "ORDERPAID") {
$this->error('商品已支付');
eixt();
}
$this->assign('pay_id', $_GET['payid']);
$this->assign('paymoney', $price);
$this->assign('paytypename', $alipay_config['payname']);
$this->assign('code_url', $pay_xml['code_url']);
$this->seo('支付确认', '', '', 'pay');
C('TOKEN_ON', false);
//关闭表单令牌
$this->display('alipayapi');
}