本文整理汇总了PHP中get_global_setting函数的典型用法代码示例。如果您正苦于以下问题:PHP get_global_setting函数的具体用法?PHP get_global_setting怎么用?PHP get_global_setting使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_global_setting函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doEdit
public function doEdit()
{
$data = $_POST;
//都 变更后台访问路径,自动生成后台路径的Action 开始 2014-04-04
$datag = get_global_setting();
$url = $datag['admin_url'];
$dir = 'App/Lib/Action/Home/';
if (is_dir($dir)) {
$path = $dir . 'SdjufengActionAction.class.php';
if ($data[100] && $data[100] != $url) {
unlink($path);
$url = $data[100];
$file = fopen($path, 'wb');
}
if (isset($file)) {
$text = "<?php class rongtianxiaAction extends HCommonAction {\n\t\t\t\t\t\tpublic function " . $url . "(){\n\t\t\t\t\t\t\trequire('App/Tpl/Admin/default/Index/login.html');\n\t\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t?>";
fwrite($file, $text);
fclose($file);
}
}
//都 变更后台访问路径,自动生成后台路径的Action 结束 2014-04-04
foreach ($data as $key => $v) {
if (is_numeric($key)) {
M('global')->where("id = '{$key}'")->setField('text', EnHtml($v));
}
}
$this->success('更新成功');
}
示例2: promotion
public function promotion()
{
$_P_fee = get_global_setting();
$this->assign("reward", $_P_fee);
$data['html'] = $this->fetch();
exit(json_encode($data));
}
示例3: postdata
public function postdata()
{
$this->glob = get_global_setting();
$user_money = M("member_money")->where("uid = {$this->uid}")->find();
//判断是否满足免费体验资格
$quota_map['status'] = array("not in", "1,4");
$quota_map['uid'] = $this->uid;
$quata_num = D("shares_apply")->where("(status not in(1,4) AND uid = {$this->uid}) OR (status = 1 AND type_id = 4 AND uid = {$this->uid})")->count();
//$quata_num = D("shares_apply")->where(" uid = {$this->uid}")->count();
//dump($quata_num);die;
if ($quata_num != 0) {
echo jsonmsg('很抱歉,您不具备免费体验配资资格!', 0);
exit;
}
//当天范围
$today_start = strtotime(date("Y-m-d 00:00:00", time()));
$today_end = strtotime(date("Y-m-d 23:59:59", time()));
$free_map = array();
$free_map['type_id'] = 4;
$free_map['status'] = array("in", "1,2,3");
$free_map['add_time'] = array("between", array($today_start, $today_end));
$free_num = D("shares_apply")->where($free_map)->count();
//判断是否满足免费体验名额
if ($free_num >= $this->glob['free_num']) {
echo jsonmsg('今日免费体验名额已满,请明天再来!', 0);
exit;
}
//判断用户是否登录
if (session('u_id') == null) {
echo jsonmsg('您还没有登录,请先登录!', 2);
exit;
}
//判断是否实名认证
/*$ids = M('members_status')->getFieldByUid($this->uid,'id_status');
if($ids!=1){
echo jsonmsg('您还未完成身份验证,请先进行实名认证!',2);exit;
}*/
//判断是否手机认证
/*$phones = M('members_status')->getFieldByUid($this->uid,'phone_status');
if($phones!=1){
echo jsonmsg('您还未手机认证,请先进行手机认证!',3);exit;
}*/
$uid = $this->uid;
$count = getMoneylimit($this->uid);
$all_money = $count + 1;
if ($all_money > $user_money['account_money'] + $user_money['back_money']) {
echo jsonmsg('您的可用余额不足以支付您所有的配资申请费用,请等待审核完成或进行充值!', 4);
exit;
}
//执行添加
$_POST['uid'] = $this->uid;
$ret = D("SharesApply")->addFreeStock();
if ($ret) {
echo jsonmsg('恭喜配资成功!', 1);
exit;
} else {
echo jsonmsg('恭喜配资失败!', 0);
exit;
}
}
示例4: _initialize
function _initialize()
{
$this->pre = C('DB_PREFIX');
$query_string = explode("/", $_SERVER['REQUEST_URI']);
$code = strtolower(MODULE_NAME);
!isset($this->justlogin) ? $this->justlogin = false : ($this->justlogin = $this->justlogin);
if (session('admin')) {
//dump(session('adminname'));exit;
$this->admin_id = session("admin");
$this->assign('adminname', session('adminname'));
} elseif (strtolower(ACTION_NAME) != 'verify' && strtolower(ACTION_NAME) != 'login' && strtolower(ACTION_NAME) != 'logincheck') {
// redirect(__ROOT__."/index.php/admin/index/logincheck?code=".$query_string[2]);
redirect(__ROOT__ . "/index.php/admin/index/logincheck?code=" . $code);
exit;
}
if (!get_user_acl(session('admin')) && !$this->justlogin) {
$this->error('对不起,权限不足');
exit;
}
if (method_exists($this, '_MyInit')) {
$this->_MyInit();
}
$datag = get_global_setting();
$this->glo = $datag;
//供PHP里面使用
$this->assign("glo", $datag);
$bconf = get_bconf_setting();
$this->gloconf = $bconf;
//供PHP里面使用
$this->assign("gloconf", $bconf);
}
示例5: _initialize
public function _initialize()
{
//赋值UID
if (session("u_user_name")) {
$this->uid = session("u_id");
}
$this->glob = get_global_setting();
$this->assign("glo", $this->glob);
}
示例6: dowithdraw
public function dowithdraw()
{
var_dump($_POST);
die;
$blackPhone = M('blacklist')->field('telephone')->select();
foreach ($blackPhone as $v) {
$blackData[] = $v['telephone'];
}
if (in_array($_SESSION['u_user_name'], $blackData)) {
echo '该账号暂时禁止提现,详情请联系财来网';
exit;
}
$transamt = $_POST['money'];
//提现金额
$cashChl = $_POST['cashChl'];
//提现方式zh&hgq
$totalinvestor = M("borrow_investor")->where("investor_uid=" . $this->uid)->sum("investor_capital");
//充值资金池的投资金额
$borrow_cap = M("borrow_info")->where("borrow_uid=" . $this->uid)->sum("borrow_money");
//累计借款金额
$totalpay = M("member_paylog")->where("uid=" . $this->uid)->sum("transamt");
//累计充值金额
$totalwithdraw = M("member_withdrawlog")->where("uid=" . $this->uid)->sum("transamt");
$account = M("member_money")->field("account_money,back_money")->where("uid=" . $this->uid)->find();
$accountmoney = $account['account_money'] + $account['back_money'];
//充值资金池可用余额+回款资金池可用余额
if ($transamt > $accountmoney) {
echo "余额不足,不允许提现!";
exit;
} else {
if ($totalinvestor + $borrow_cap < $totalwithdraw) {
$datag = get_global_setting();
$fee_tqtx = $datag['fee_tqtx'];
$feerate = explode('|', $fee_tqtx);
$fee = $transamt * $feerate[0] / 100;
} else {
$datag = get_global_setting();
$fee_tqtx = $datag['fee_tqtx'];
$feerate = explode('|', $fee_tqtx);
$cae = $totalinvestor + $borrow_cap - $totalwithdraw;
if ($cae >= $transamt) {
$fee = $transamt * $feerate[1] / 100;
} else {
$fee = ($cae * $feerate[1] + ($transamt - $cae) * $feerate[0]) / 100;
}
}
}
//echo $fee;exit;
$info = M("members")->field("usrid")->where("id=" . $this->uid)->find();
$usrid = intval($info['usrid']);
import("ORG.Huifu.Huifu");
$huifu = new Huifu();
$huifu->cash($usrid, $transamt, $fee, $cashChl);
//增加$cashChl参数zh&hgq
}
示例7: promotion
public function promotion()
{
$_P_fee = get_global_setting();
Vendor('Qrcode.phpqrcode');
//判断是否有二维码 有就不用在二次生成了
// $icon='http://my.cailai.com/Style/H/images/erwei/qrcodeicon'.$this->uid.'.png';
$icon = $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'] . '/Style/H/images/erwei/qrcodeicon' . $this->uid . '.png';
// dump($icon);
$is_exists = get_headers($icon);
//dump($is_exists);
if ($is_exists[0] != 'HTTP/1.1 200 OK') {
//设置二维码的内容 查询电话号码
$res = M('members')->getFieldById($this->uid, 'user_name');
$value = "http://m.cailai.com/index/register?p=" . $res;
$pos = 'Style/H/images/erwei/qrcode' . $this->uid . '.png';
//dump(get_headers($pos));
$errorCorrectionLevel = 'L';
//容错级别
$matrixPointSize = 6;
//生成图片大小
//生成二维码图片
QRcode::png($value, $pos, $errorCorrectionLevel, $matrixPointSize, 2);
$logo = 'Style/H/img/cutlogo.png';
//准备好的logo图片
$QR = $pos;
//已经生成的原始二维码图
if ($logo) {
$QR = imagecreatefromstring(file_get_contents($QR));
$logo = imagecreatefromstring(file_get_contents($logo));
$QR_width = imagesx($QR);
//二维码图片宽度
$QR_height = imagesy($QR);
//二维码图片高度
$logo_width = imagesx($logo);
//logo图片宽度
$logo_height = imagesy($logo);
//logo图片高度
$logo_qr_width = $QR_width / 5;
$scale = $logo_width / $logo_qr_width;
$logo_qr_height = $logo_height / $scale;
$from_width = ($QR_width - $logo_qr_width) / 2;
//重新组合图片并调整大小
imagecopyresampled($QR, $logo, $from_width, $from_width, 0, 0, $logo_qr_width, $logo_qr_height, $logo_width, $logo_height);
//$logo_qr_width, $logo_qr_height,
//bool imagecopyresampled ( resource $dst_image , resource $src_image , int $dst_x , int $dst_y , int $src_x , int $src_y , int $dst_w , int $dst_h , int $src_w , int $src_h )
}
//输出图片
$newicon = "Style/H/images/erwei/qrcodeicon" . $this->uid . '.png';
imagepng($QR, $newicon);
}
//exists 结束
$this->myid = $this->uid;
$this->assign("reward", $_P_fee);
$this->display();
}
示例8: logincheck
public function logincheck()
{
$code = $_GET["code"];
$datag = get_global_setting();
$codecheck = $datag['admin_url'];
if ($code != $codecheck) {
$this->assign('jumpUrl', '/');
$this->error("非法请求");
} else {
$this->redirect('login');
}
}
示例9: promotion
public function promotion()
{
//自动生成推广码
$expand_num = getExpandCode($this->uid);
$this->assign("expand_num", $expand_num);
$_P_fee = get_global_setting();
$this->assign("reward", $_P_fee);
$active = active_flag(2);
$this->assign("active", $active);
$data['html'] = $this->fetch();
exit(json_encode($data));
}
示例10: cellphone
public function cellphone()
{
$isid = M('members_status')->getFieldByUid($this->uid, 'phone_status');
$phone = M('members')->getFieldById($this->uid, 'user_phone');
$this->assign("phone", $phone);
$sq = M('member_safequestion')->find($this->uid);
$this->assign("sq", $sq);
$this->assign("phone_status", $isid);
$datag = get_global_setting();
$is_manual = $datag['is_manual'];
$this->assign("is_manual", $is_manual);
$this->display();
}
示例11: doEdit
public function doEdit()
{
$data = $_POST;
//都 变更后台访问路径,自动生成后台路径的Action 开始 2014-04-04
$datag = get_global_setting();
$url = $datag['admin_url'];
foreach ($data as $key => $v) {
if (is_numeric($key)) {
M('global')->where("id = '{$key}'")->setField('text', EnHtml($v));
}
}
$this->success('更新成功');
}
示例12: sellhtml
public function sellhtml()
{
$invest_id = isset($_GET['id']) ? intval($_GET['id']) : 0;
!$invest_id && ajaxmsg(L('parameter_error'), 0);
$info = $this->Debt->countDebt($invest_id);
$this->assign('info', $info);
$datag = get_global_setting();
$this->assign('debt_fee', $datag['debt_fee']);
$this->assign('invest_id', $invest_id);
$borrow = M('borrow_investor i')->join(C('DB_PREFIX') . "borrow_info b ON i.borrow_id = b.id")->field("borrow_name")->where("i.id=" . $invest_id)->find();
$this->assign("borrow_name", $borrow['borrow_name']);
$d['content'] = $this->fetch();
echo json_encode($d);
}
示例13: _initialize
function _initialize()
{
if (session('u_id')) {
$this->uid = session('u_id');
$this->uname = session('u_user_name');
$this->assign('uname', $this->uname);
$datag = get_global_setting();
$this->glo = $datag;
//供PHP里面使用
$this->assign("glo", $datag);
//公共参数
} else {
$this->redirect('M/Pub/login');
}
}
示例14: _initialize
function _initialize()
{
if (session('u_id')) {
$this->uid = session('u_id');
$this->uname = session('u_user_name');
$this->assign('uname', $this->uname);
$datag = get_global_setting();
$this->glo = $datag;
//供PHP里面使用
$this->assign("glo", $datag);
//公共参数
} else {
$this->redirect('M/Pub/login');
}
$hetong = M('hetong')->field('name,dizhi,tel')->find();
$this->assign("web", $hetong);
}
示例15: _initialize
function _initialize()
{
//友情链接
$parm['is_show'] = 1;
$yqList = M('friend')->where($map)->order('link_order')->select();
$this->assign("yqList", $yqList);
judgeHttps($this->isAjax());
$datag = get_global_setting();
$this->glo = $datag;
//供PHP里面使用
$this->assign("glo", $datag);
//分站
$this->assign("subsite", getSubSite());
$this->siteInfo = getLocalhost();
$this->assign("siteInfo", $this->siteInfo);
//分站
if (session("u_user_name")) {
$this->uid = session("u_id");
$unread = M("inner_msg")->where("uid={$this->uid} AND status=0")->count('id');
$this->assign('unread', $unread);
$this->assign('UID', $this->uid);
} else {
$loginconfig = FS("Webconfig/loginconfig");
$de_val = $this->_authcode(cookie('UKey'), 'DECODE', $loginconfig['cookie']['key']);
if (substr(md5($loginconfig['cookie']['key'] . $de_val), 14, 10) == cookie('Ukey2')) {
$vo = M('members')->field("id,user_name")->find($de_val);
if (is_array($vo)) {
foreach ($vo as $key => $v) {
session("u_{$key}", $v);
}
$this->uid = session("u_id");
$this->assign('UID', $this->uid);
$unread = M("inner_msg")->where("uid={$this->uid} AND status=0")->count('id');
$this->assign('unread', $unread);
} else {
cookie("Ukey", NULL);
cookie("Ukey2", NULL);
}
}
}
if (method_exists($this, '_MyInit')) {
$this->_MyInit();
}
}