本文整理汇总了PHP中get_domain函数的典型用法代码示例。如果您正苦于以下问题:PHP get_domain函数的具体用法?PHP get_domain怎么用?PHP get_domain使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_domain函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: get_server
/**
* Returns the current server URI including protocol, domain and protocol as a
* string.
*
* @return string
*/
function get_server()
{
$server = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != '' ? 'https://' : 'http://';
$server .= get_domain();
$server .= isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] != 80 ? ':' . $_SERVER['SERVER_PORT'] : '';
return $server;
}
开发者ID:pvorb,项目名称:genitis,代码行数:13,代码来源:functions.php
示例2: index
public function index()
{
$user_id = intval($GLOBALS['user_info']['id']);
if (!$user_id) {
app_redirect(url("index"));
}
//返利列表
$page = intval($_REQUEST['p']) > 0 ? intval($_REQUEST['p']) : 1;
$referrals_count = $GLOBALS['db']->getRow("select count(*) as count,sum(score) as total_score from " . DB_PREFIX . "referrals where user_id= " . $user_id . " ");
if ($referrals_count) {
$page_size = ACCOUNT_PAGE_SIZE;
$limit = ($page - 1) * $page_size . "," . $page_size;
$sql = "select r.*,u.create_time as register_time from " . DB_PREFIX . "referrals as r " . " left join " . DB_PREFIX . "user as u on u.id=r.user_id " . " where user_id=" . $user_id . " order by id desc limit " . $limit;
$referrals_list = $GLOBALS['db']->getAll($sql);
$page = new Page($referrals_count['count'], $page_size);
//初始化分页类
$p = $page->show();
$GLOBALS['tmpl']->assign("pages", $p);
}
//邀请连接
$referrals_url = get_domain() . APP_ROOT . "/";
if ($GLOBALS['user_info']) {
$referrals_url .= "?ref=" . base64_encode(intval($user_id));
}
$GLOBALS['tmpl']->assign("referrals_url", $referrals_url);
$GLOBALS['tmpl']->assign('referrals_list', $referrals_list);
$GLOBALS['tmpl']->assign('referrals_count', $referrals_count);
$GLOBALS['tmpl']->assign("page_title", "我的邀请");
$GLOBALS['tmpl']->display("referrals_index.html");
}
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:30,代码来源:referralModule.class.php
示例3: index
public function index()
{
$page = intval($_REQUEST['p']);
if ($page == 0) {
$page = 1;
}
$limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE");
$result = get_invite_list($limit, $GLOBALS['user_info']['id']);
$GLOBALS['tmpl']->assign("list", $result['list']);
$page = new Page($result['count'], app_conf("PAGE_SIZE"));
//初始化分页对象
$p = $page->show();
$GLOBALS['tmpl']->assign('pages', $p);
$total_referral_money = $GLOBALS['db']->getOne("select sum(money) from " . DB_PREFIX . "referrals where user_id = " . $GLOBALS['user_info']['id'] . " and pay_time > 0");
$total_referral_score = $GLOBALS['db']->getOne("select sum(score) from " . DB_PREFIX . "referrals where user_id = " . $GLOBALS['user_info']['id'] . " and pay_time > 0");
$GLOBALS['tmpl']->assign("total_referral_money", $total_referral_money);
$GLOBALS['tmpl']->assign("total_referral_score", $total_referral_score);
$GLOBALS['tmpl']->assign("page_title", $GLOBALS['lang']['UC_INVITE']);
$GLOBALS['tmpl']->assign("inc_file", "inc/uc/uc_invite_index.html");
$share_url = get_domain() . APP_ROOT . "/";
if ($GLOBALS['user_info']) {
$share_url .= "?r=" . base64_encode(intval($GLOBALS['user_info']['id']));
}
$GLOBALS['tmpl']->assign("share_url", $share_url);
$GLOBALS['tmpl']->display("uc.html");
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:26,代码来源:uc_inviteModule.class.php
示例4: get_self_url_easy
/**
* Get a well formed URL equivalent to the current URL. Reads direct from the environment and does no clever mapping at all. This function should rarely be used.
*
* @return URLPATH The URL
*/
function get_self_url_easy()
{
$protocol = tacit_https() ? 'https' : 'http';
if (!isset($_SERVER['HTTP_HOST'])) {
$domain = get_domain();
} else {
$domain = $_SERVER['HTTP_HOST'];
}
$colon_pos = strpos($domain, ':');
if ($colon_pos !== false) {
$domain = substr($domain, 0, $colon_pos);
}
$self_url = $protocol . '://' . $domain;
$port = ocp_srv('SERVER_PORT');
if ($port != '' && $port != '80') {
$self_url .= ':' . $port;
}
$s = ocp_srv('PHP_SELF');
if (substr($s, 0, 1) != '/') {
$self_url .= '/';
}
$self_url .= $s;
if (array_key_exists('QUERY_STRING', $_SERVER) && $_SERVER['QUERY_STRING'] != '') {
$self_url .= '?' . $_SERVER['QUERY_STRING'];
}
return $self_url;
}
开发者ID:erico-deh,项目名称:ocPortal,代码行数:32,代码来源:urls.php
示例5: get_payment_code
public function get_payment_code($payment_notice_id)
{
$payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where id = " . $payment_notice_id);
$order_sn = $GLOBALS['db']->getOne("select order_sn from " . DB_PREFIX . "deal_order where id = " . $payment_notice['order_id']);
$money = round($payment_notice['money'], 2);
$payment_info = $GLOBALS['db']->getRow("select id,config,logo from " . DB_PREFIX . "payment where id=" . intval($payment_notice['payment_id']));
$payment_info['config'] = unserialize($payment_info['config']);
$data_vid = trim($payment_info['config']['chinabank_account']);
$data_orderid = $payment_notice['notice_sn'];
$data_vamount = $money;
$data_vmoneytype = 'CNY';
$data_vpaykey = trim($payment_info['config']['chinabank_key']);
$data_vreturnurl = get_domain() . APP_ROOT . '/index.php?ctl=payment&act=response&class_name=Chinabank';
$data_notify_url = get_domain() . APP_ROOT . '/index.php?ctl=payment&act=notify&class_name=Chinabank';
$MD5KEY = $data_vamount . $data_vmoneytype . $data_orderid . $data_vid . $data_vreturnurl . $data_vpaykey;
$MD5KEY = strtoupper(md5($MD5KEY));
$payLinks = '<form style="text-align:center;" method=post action="https://pay3.chinabank.com.cn/PayGate" id="jumplink">';
$payLinks .= "<input type=HIDDEN name='v_mid' value='" . $data_vid . "'>";
$payLinks .= "<input type=HIDDEN name='v_oid' value='" . $data_orderid . "'>";
$payLinks .= "<input type=HIDDEN name='v_amount' value='" . $data_vamount . "'>";
$payLinks .= "<input type=HIDDEN name='v_moneytype' value='" . $data_vmoneytype . "'>";
$payLinks .= "<input type=HIDDEN name='v_url' value='" . $data_vreturnurl . "'>";
$payLinks .= "<input type=HIDDEN name='v_md5info' value='" . $MD5KEY . "'>";
$payLinks .= "<input type=HIDDEN name='remark1' value=''>";
$payLinks .= "<input type=HIDDEN name='remark2' value='[url:=" . $data_notify_url . "]'>";
$payLinks .= "正在连接支付接口...</form>";
$payLinks .= '<script type="text/javascript">document.getElementById("jumplink").submit();</script>';
return $payLinks;
}
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:29,代码来源:Chinabank_payment.php
示例6: show
public function show()
{
$item_id = I("item_id");
$login_user = session("login_user");
$uid = $login_user['uid'] ? $login_user['uid'] : 0;
$this->checkItemVisit($uid, $item_id);
$item = D("Item")->where("item_id = '{$item_id}' ")->find();
//获取所有父目录id为0的页面
$pages = D("Page")->where("cat_id = '0' and item_id = '{$item_id}' ")->order(" `order` asc ")->select();
//获取所有目录
$catalogs = D("Catalog")->where("item_id = '{$item_id}' ")->order(" `order` asc ")->select();
if ($catalogs) {
foreach ($catalogs as $key => &$catalog) {
$temp = D("Page")->where("cat_id = '{$catalog['cat_id']}' ")->order(" `order` asc ")->select();
$catalog['pages'] = $temp ? $temp : array();
}
}
$share_url = get_domain() . __APP__ . '/' . $item_id;
$ItemPermn = $this->checkItemPermn($uid, $item_id);
$ItemCreator = $this->checkItemCreator($uid, $item_id);
$this->assign("ItemPermn", $ItemPermn);
$this->assign("ItemCreator", $ItemCreator);
$this->assign("share_url", $share_url);
$this->assign("catalogs", $catalogs);
$this->assign("pages", $pages);
$this->assign("item", $item);
$this->assign("login_user", $login_user);
$this->display();
}
开发者ID:skylei,项目名称:showdoc,代码行数:29,代码来源:ItemController.class.php
示例7: execute
function execute(&$request)
{
/* Set the Breadcrumbs bit */
k4_bread_crumbs($request['template'], $request['dba'], 'L_MARKFORUMREAD');
if (isset($_REQUEST['id']) && intval($_REQUEST['id']) > 0) {
$forums = $request['dba']->executeQuery("SELECT * FROM " . K4FORUMS . " WHERE forum_id = " . intval($_REQUEST['id']));
if ($forums->numrows() == 0) {
$action = new K4InformationAction(new K4LanguageElement('L_FORUMDOESNTEXIST'), 'content', FALSE);
return $action->execute($request);
}
} else {
$forums = $request['dba']->executeQuery("SELECT * FROM " . K4FORUMS);
}
$cookiestr = '';
$cookieinfo = get_forum_cookies();
while ($forums->next()) {
$forum = $forums->current();
$cookieinfo[$forum['forum_id']] = time();
}
foreach ($cookieinfo as $key => $val) {
$cookiestr .= ',' . $key . ',' . $val;
}
setcookie(K4FORUMINFO, trim($cookiestr, ','), time() + 2592000, get_domain());
$action = new K4InformationAction(new K4LanguageElement('L_MARKEDFORUMREAD', $forum['name']), 'content', TRUE, referer(), 3);
return $action->execute($request);
}
开发者ID:BackupTheBerlios,项目名称:k4bb-svn,代码行数:26,代码来源:forums.class.php
示例8: get_payment_code
public function get_payment_code($payment_notice_id)
{
define('REAL_APP_ROOT', str_replace('/mapi', "", APP_ROOT));
$payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where id = " . $payment_notice_id);
$order_sn = $payment_notice['notice_sn'];
$money = round($payment_notice['money'], 2);
$payment_info = $GLOBALS['db']->getRow("select id,config,logo from " . DB_PREFIX . "payment where id=" . intval($payment_notice['payment_id']));
$payment_info['config'] = unserialize($payment_info['config']);
$sql = "select name " . "from " . DB_PREFIX . "deal " . "where id =" . intval($payment_notice['deal_id']);
$title_name = $GLOBALS['db']->getOne($sql);
$subject = $order_sn;
//$data_return_url = get_domain().APP_ROOT.'/../shop.php?ctl=payment&act=response&class_name=Walipay';
//$notify_url = get_domain().APP_ROOT.'/../shop.php?ctl=payment&act=notify&class_name=Walipay';
$notify_url = get_domain() . REAL_APP_ROOT . "/alipay_web/alipayapi.php?order_id=" . intval($payment_notice['order_id']) . "&out_trade_no=" . $order_sn;
//."&out_trade_no={$data.walipay.out_trade_no}";
$pay = array();
$pay['subject'] = $title_name;
$pay['body'] = $subject;
$pay['total_fee'] = $money;
$pay['total_fee_format'] = format_price($money);
$pay['out_trade_no'] = $payment_notice['notice_sn'];
$pay['notify_url'] = $notify_url;
$pay['partner'] = $payment_info['config']['alipay_partner'];
//合作商户ID
$pay['seller'] = $payment_info['config']['alipay_account'];
//账户ID
$pay['key'] = $payment_info['config']['alipay_key'];
//支付宝(RSA)公钥
$pay['is_wap'] = 1;
$pay['pay_code'] = 'walipay';
//,支付宝;mtenpay,财付通;mcod,货到付款
return $pay;
}
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:33,代码来源:Walipay_payment.php
示例9: index
public function index()
{
global $tmpl;
$directory = APP_ROOT_PATH . "dh/";
$read_api = true;
$dir = @opendir($directory);
$apis = array();
while (false !== ($file = @readdir($dir))) {
if (preg_match("/^.*?\\.php\$/", $file)) {
$tmp = (require_once $directory . $file);
if ($tmp) {
$apis[] = $tmp;
}
}
}
@closedir($dir);
unset($read_api);
$contents_html = '<table>';
foreach ($apis as $k => $v) {
foreach ($v['info'] as $kk => $vv) {
$contents_html .= "<tr><td style='padding:10px 25px 10px 5px;'>";
$contents_html .= $vv['name'] . ":</td><td style='padding:10px 5px 10px 5px;'><input type='text' style='width:350px;' class='f-input' value='" . get_domain() . APP_ROOT . "/dh/" . $vv['url'] . "' /></td>";
$contents_html .= "</tr>";
}
}
$contents_html .= '</table>';
$GLOBALS['tmpl']->assign("page_title", $GLOBALS['lang']['API_LIST']);
$GLOBALS['tmpl']->assign("page_keyword", $GLOBALS['lang']['API_LIST']);
$GLOBALS['tmpl']->assign("page_description", $GLOBALS['lang']['API_LIST']);
$article['title'] = $GLOBALS['lang']['API_LIST'];
$article['content'] = $contents_html;
$GLOBALS['tmpl']->assign("article", $article);
$GLOBALS['tmpl']->display("article.html");
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:34,代码来源:dhapiModule.class.php
示例10: index
public function index()
{
$root = array();
$email = strim($GLOBALS['request']['email']);
//用户名或邮箱
$pwd = strim($GLOBALS['request']['pwd']);
//密码
//检查用户,用户密码
$user = user_check($email, $pwd);
$user_id = intval($user['id']);
if ($user_id > 0) {
$root['user_login_status'] = 1;
$root['response_code'] = 1;
//$root['show_err'] = get_domain();
//输出支付方式
$payment_list = $GLOBALS['db']->getAll("select id,class_name,name,description,logo,total_amount,config from " . DB_PREFIX . "payment order by sort desc");
foreach ($payment_list as $k => $v) {
$payment_list[$k]['logo'] = get_domain() . $v['logo'];
}
$root['payment_list'] = $payment_list;
} else {
$root['response_code'] = 0;
$root['show_err'] = "未登录";
$root['user_login_status'] = 0;
}
output($root);
}
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:27,代码来源:uc_incharge.action.php
示例11: get_payment_code
public function get_payment_code($payment_notice_id)
{
$payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where id = " . $payment_notice_id);
$order_sn = $GLOBALS['db']->getOne("select order_sn from " . DB_PREFIX . "deal_order where id = " . $payment_notice['order_id']);
$money = round($payment_notice['money'], 2);
$payment_info = $GLOBALS['db']->getRow("select id,config,logo from " . DB_PREFIX . "payment where id=" . intval($payment_notice['payment_id']));
$payment_info['config'] = unserialize($payment_info['config']);
$data_vid = trim($payment_info['config']['chinabank_account']);
$data_orderid = $payment_notice['notice_sn'];
$data_vamount = $money;
$data_vmoneytype = 'CNY';
$data_vpaykey = trim($payment_info['config']['chinabank_key']);
$data_vreturnurl = get_domain() . APP_ROOT . '/shop.php?ctl=payment&act=response&class_name=Chinabank';
$data_notify_url = get_domain() . APP_ROOT . '/shop.php?ctl=payment&act=notify&class_name=Chinabank';
$MD5KEY = $data_vamount . $data_vmoneytype . $data_orderid . $data_vid . $data_vreturnurl . $data_vpaykey;
$MD5KEY = strtoupper(md5($MD5KEY));
$payLinks = '<form style="text-align:center;" method=post action="https://pay3.chinabank.com.cn/PayGate" target="_blank">';
$payLinks .= "<input type=HIDDEN name='v_mid' value='" . $data_vid . "'>";
$payLinks .= "<input type=HIDDEN name='v_oid' value='" . $data_orderid . "'>";
$payLinks .= "<input type=HIDDEN name='v_amount' value='" . $data_vamount . "'>";
$payLinks .= "<input type=HIDDEN name='v_moneytype' value='" . $data_vmoneytype . "'>";
$payLinks .= "<input type=HIDDEN name='v_url' value='" . $data_vreturnurl . "'>";
$payLinks .= "<input type=HIDDEN name='v_md5info' value='" . $MD5KEY . "'>";
$payLinks .= "<input type=HIDDEN name='remark1' value=''>";
$payLinks .= "<input type=HIDDEN name='remark2' value='[url:=" . $data_notify_url . "]'>";
if (!empty($payment_info['logo'])) {
$payLinks .= "<input type='image' src='" . APP_ROOT . $payment_info['logo'] . "' style='border:solid 1px #ccc;'><div class='blank'></div>";
}
$payLinks .= "<input type='submit' class='paybutton' value='前往网银在线支付'>";
$payLinks .= "</form>";
$code = '<div style="text-align:center">' . $payLinks . '</div>';
$code .= "<br /><div style='text-align:center' class='red'>" . $GLOBALS['lang']['PAY_TOTAL_PRICE'] . ":" . format_price($money) . "</div>";
return $code;
}
开发者ID:dalinhuang,项目名称:zsh_business,代码行数:34,代码来源:Chinabank_payment.php
示例12: __construct
public function __construct($api)
{
$api['config'] = unserialize($api['config']);
$this->api = $api;
//回调地址要用urlencode编码
$this->redirback = urlencode(get_domain() . APP_ROOT . "/api_callback.php?c=Qq");
}
开发者ID:dalinhuang,项目名称:zsh_business,代码行数:7,代码来源:Qq_api.php
示例13: index
public function index()
{
$filenamezip = APP_ROOT_PATH . "public/mobile_goods_down_region_conf.zip";
if (!file_exists($filenamezip)) {
$sql = "select id,pid,name,'' as postcode,'' as py from " . DB_PREFIX . "delivery_region";
$list = $GLOBALS['db']->getAll($sql);
$root = array();
$root['return'] = 1;
$region_list = "";
foreach ($list as $item) {
$sql = "insert into region_conf(id,pid,name,postcode,py) values('{$item['id']}','{$item['pid']}','{$item['name']}','{$item['postcode']}','{$item['py']}');";
if ($region_list == "") {
$region_list = $sql;
} else {
$region_list = $region_list . "\n" . $sql;
}
}
$ziper = new zipfile();
$ziper->addFile($region_list, "region_conf.txt");
$ziper->output($filenamezip);
}
$root = array();
$root['return'] = 1;
if (file_exists($filenamezip)) {
$root['file_exists'] = 1;
} else {
$root['file_exists'] = 0;
}
$sql = "select count(*) as num from " . DB_PREFIX . "delivery_region";
$root['region_num'] = $GLOBALS['db']->getOne($sql);
//配置地区数量
$root['file_url'] = get_domain() . APP_ROOT . "/../public/mobile_goods_down_region_conf.zip";
$root['file_size'] = abs(filesize($filenamezip));
output($root);
}
开发者ID:macall,项目名称:jsd,代码行数:35,代码来源:down_region_conf.action.php
示例14: check_image_url
function check_image_url($url = false, $facebook_id = false, $google_picture_link = false, $twitter_picture_link = false, $imgur_img_type = false)
{
if ($url != false) {
// ถ้าลิ้งค์รูปเป็นลิ้งค์ของ imgur.com
if (get_domain($url) == "imgur.com") {
if ($imgur_img_type == "original") {
return $url;
// รูปดั้งเดิม
} else {
// หาไอดีรูป เพื่อทำ thumbnail
$array = parse_url($url);
$imgThumb = substr($array['path'], 1, -4) . 'b';
$imgType = substr($url, strrpos($url, ".") + 1);
return "http://i.imgur.com/" . $imgThumb . "." . $imgType;
}
} else {
return $url;
}
// return site_url("media/timthumb/timthumb.php?src=".$url."&zc=1&w=120&h=120");
} elseif ($facebook_id != false) {
return "https://graph.facebook.com/" . $facebook_id . "/picture?type=large";
// return site_url("media/timthumb/timthumb.php?src=https://graph.facebook.com/".$facebook_id."/picture?type=large&zc=1&w=120&h=120");
} elseif ($google_picture_link != false) {
return "{$google_picture_link}";
} elseif ($twitter_picture_link != false) {
return $twitter_picture_link;
}
}
开发者ID:unisexx,项目名称:adf16,代码行数:28,代码来源:MY_html_helper.php
示例15: Tencent
function Tencent()
{
require_once APP_ROOT_PATH . 'system/api_login/Tencent/Tencent.php';
OAuth::init($GLOBALS['m_config']['tencent_app_key'], $GLOBALS['m_config']['tencent_app_secret']);
$openid = trim($GLOBALS['request']['openid']);
$openkey = trim($GLOBALS['request']['openkey']);
if ($GLOBALS['m_config']['tencent_bind_url'] == "") {
$app_url = get_domain() . APP_ROOT . "/api_callback.php?c=Tencent";
} else {
$app_url = $GLOBALS['m_config']['tencent_bind_url'];
}
$access_token = trim($GLOBALS['request']['access_token']);
es_session::set("t_access_token", $access_token);
es_session::set("t_openid", $openid);
es_session::set("t_openkey", $openkey);
if (es_session::get("t_access_token") || es_session::get("t_openid") && es_session::get("t_openkey")) {
$r = Tencent::api('user/info');
$r = json_decode($r, true);
$name = $r['data']['name'];
if ($GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "user where tencent_id = '" . $name . "'") == 0) {
$GLOBALS['db']->query("update " . DB_PREFIX . "user set t_access_token ='" . $access_token . "',t_openkey = '" . $openkey . "',t_openid = '" . $openid . "', tencent_id = '" . $name . "' where id =" . intval($GLOBALS['user_info']['id']));
} elseif (intval($GLOBALS['db']->getOne("select id from " . DB_PREFIX . "user where tencent_id = '" . $name . "'")) == intval($GLOBALS['user_info']['id'])) {
$GLOBALS['db']->query("update " . DB_PREFIX . "user set t_access_token ='" . $access_token . "',t_openkey = '" . $openkey . "',t_openid = '" . $openid . "', tencent_id = '" . $name . "' where id =" . intval($GLOBALS['user_info']['id']));
} else {
$root['return'] = 0;
$root['info'] = "该微博帐号已被其他会员绑定";
output($root);
}
}
$root['return'] = 1;
$root['info'] = "绑定成功";
$root['login_type'] = "Tencent";
output($root);
}
开发者ID:macall,项目名称:jsd,代码行数:34,代码来源:syncbind.action.php
示例16: index
public function index()
{
$root = array();
$root['return'] = 1;
$page = intval($GLOBALS['request']['page']);
//分页
$city_name = strim($GLOBALS['request']['city_name']);
//城市名称
$page = $page == 0 ? 1 : $page;
$page_size = PAGE_SIZE;
$limit = ($page - 1) * $page_size . "," . $page_size;
//检查用户,用户密码
$user = $GLOBALS['user_info'];
$user_id = intval($user['id']);
$url = get_domain() . APP_ROOT;
$share_url = str_replace("sjmapi", "wap", $url);
if ($user_id) {
$share_url .= "?r=" . base64_encode(intval($user_id));
}
$root['share_url'] = $share_url;
$root['city_name'] = $city_name;
$root['page_title'] = "邀请链接";
//fwb 2014-08-27
output($root);
}
开发者ID:macall,项目名称:jsd,代码行数:25,代码来源:uc_invite.action.php
示例17: get_payment_code
public function get_payment_code($payment_notice_id)
{
$payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where id = " . $payment_notice_id);
$money = round($payment_notice['money'], 2);
$payment_info = $GLOBALS['db']->getRow("select id,config,logo from " . DB_PREFIX . "payment where id=" . intval($payment_notice['payment_id']));
$payment_info['config'] = unserialize($payment_info['config']);
$sql = "select name " . "from " . DB_PREFIX . "deal_order_item " . "where order_id =" . intval($payment_notice['order_id']);
$title_name = $GLOBALS['db']->getOne($sql);
$subject = msubstr($title_name, 0, 40);
//$data_return_url = get_domain().APP_ROOT.'/../payment.php?act=return&class_name=Malipay';
$notify_url = get_domain() . APP_ROOT . '/../shop.php?ctl=payment&act=response&class_name=Malipay';
$pay = array();
$pay['subject'] = $subject;
$pay['body'] = $title_name;
$pay['total_fee'] = $money;
$pay['total_fee_format'] = format_price($money);
$pay['out_trade_no'] = $payment_notice['notice_sn'];
$pay['notify_url'] = $notify_url;
$pay['partner'] = $payment_info['config']['alipay_partner'];
//合作商户ID
$pay['seller'] = $payment_info['config']['alipay_account'];
//账户ID
$pay['rsa_alipay_public'] = $payment_info['config']['alipay_rsa_public'];
//支付宝(RSA)公钥
$pay['pay_code'] = 'malipay';
//,支付宝;mtenpay,财付通;mcod,货到付款
$order_spec = '';
$order_spec .= 'partner="' . $pay['partner'] . '"';
//合作商户ID
$order_spec .= '&seller="' . $pay['seller'] . '"';
//账户ID
$order_spec .= '&out_trade_no="' . $pay['out_trade_no'] . '"';
$order_spec .= '&subject="' . $pay['subject'] . '"';
$order_spec .= '&body="' . $pay['body'] . '"';
$order_spec .= '&total_fee="' . $pay['total_fee'] . '"';
$order_spec .= '¬ify_url="' . $pay['notify_url'] . '"';
$pay['order_spec'] = $order_spec;
$sign = $this->sign($order_spec);
$pay['sign'] = urlencode($sign);
$pay['sign_type'] = 'RSA';
/*
$pubkey = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC6IQ/HH06GbTIhKNN/YSQXxllnP7cNERMuN16GgZDfuf9NrY/Bw2ZINkq1RMNlbP66Vu5y0gwYPC/7PbO5l6pbnl3N4rw5VY3U6rtIC0f8ADDLrIZwShYUitaFq+Ao7rhk/GbpfSD7vgnugQz74fVewi17S3Apujq4U4LAxFmVowIDAQAB';
$pubkey = $this->getPublicKeyFromX509($pubkey);
$res = openssl_pkey_get_public($pubkey);
$sign = base64_decode($sign);
$verify = openssl_verify($order_spec, $sign, $res);
if ($verify == 1)
{
$pay['openssl_verify'] = 'ok';
}else{
$pay['openssl_verify'] = 'error';
}
*/
//
// print_r($payment_info['config']);
// print_r($pay);exit;
return $pay;
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:59,代码来源:Malipay_payment.php
示例18: __construct
function __construct($id = 1)
{
// Get the Quest (Skill) based on the id
if (is_numeric($id)) {
$domain_row = get_domain($id);
$this->build($domain_row);
}
}
开发者ID:Trying-On-The-Trades,项目名称:panomanager,代码行数:8,代码来源:domain.php
示例19: get_default
/**
* Gets the default value for the config option.
*
* @return ?string The default value (NULL: option is disabled)
*/
function get_default()
{
$staff_address = get_option('staff_address');
$website_email = 'website@' . get_domain();
if (substr($staff_address, -strlen(get_domain()) - 1) == '@' . get_domain()) {
$website_email = $staff_address;
}
return $website_email;
}
开发者ID:erico-deh,项目名称:ocPortal,代码行数:14,代码来源:website_email.php
示例20: index
public function index()
{
$root = array();
$ajax = intval($_REQUEST['ajax']);
$root['ajax'] = $ajax;
$email = strim($GLOBALS['request']['email']);
//用户名或邮箱
$pwd = strim($GLOBALS['request']['pwd']);
//密码
//检查用户,用户密码
$user = user_check($email, $pwd);
$user_id = intval($user['id']);
if ($user_id > 0) {
$comment['deal_id'] = intval($_REQUEST['id']);
$deal_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "deal where id = " . $comment['deal_id'] . " and is_delete = 0 and is_effect = 1 ");
if (!$deal_info) {
$root['info'] = "该项目暂时不能评论";
output($root);
}
if (!check_ipop_limit(get_client_ip(), "deal_savedealcomment", 3)) {
$root['info'] = "提交太快";
}
output($root);
$comment['content'] = strim($_REQUEST['content']);
$comment['user_id'] = intval($GLOBALS['user_info']['id']);
$comment['create_time'] = NOW_TIME;
$comment['user_name'] = $GLOBALS['user_info']['user_name'];
$comment['pid'] = intval($_REQUEST['pid']);
$comment['deal_user_id'] = intval($GLOBALS['db']->getOne("select user_id from " . DB_PREFIX . "deal where id = " . $comment['deal_id']));
$comment['reply_user_id'] = intval($GLOBALS['db']->getOne("select user_id from " . DB_PREFIX . "deal_comment where id = " . $comment['pid']));
$comment['deal_user_name'] = $GLOBALS['db']->getOne("select user_name from " . DB_PREFIX . "user where id = " . intval($comment['deal_user_id']));
$comment['reply_user_name'] = $GLOBALS['db']->getOne("select user_name from " . DB_PREFIX . "user where id = " . intval($comment['reply_user_id']));
$GLOBALS['db']->autoExecute(DB_PREFIX . "deal_comment", $comment);
$comment['id'] = $GLOBALS['db']->insert_id();
$GLOBALS['db']->query("update " . DB_PREFIX . "deal set comment_count = comment_count+1 where id = " . $comment['deal_id']);
if (intval($_REQUEST['syn_weibo']) == 1) {
$weibo_info = array();
$weibo_info['content'] = $comment['content'] . " " . get_domain() . url("deal#show", array("id" => $comment['deal_id']));
$img = $GLOBALS['db']->getOne("select image from " . DB_PREFIX . "deal where id = " . intval($comment['deal_id']));
if ($img) {
$weibo_info['img'] = APP_ROOT_PATH . "/" . $img;
}
syn_weibo($weibo_info);
}
if ($ajax == 1) {
$data['status'] = 1;
ajax_return($data);
} else {
showSuccess("发表成功");
}
} else {
$root['user_login_status'] = 0;
output($root);
}
}
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:55,代码来源:deal_savedealcomment.action.php
注:本文中的get_domain函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论