<?php
// +----------------------------------------------------------------------
// | Fanwe 方维p2p借贷系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011 http://www.fanwe.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: 云淡风轻(88522820@qq.com)
// +----------------------------------------------------------------------
//前后台加载的函数库
require_once 'system_init.php';
//获取真实路径
function get_real_path()
{
return APP_ROOT_PATH;
}
//获取GMTime
function get_gmtime()
{
return (time() - date('Z'));
}
function to_date($utc_time, $format = 'Y-m-d H:i:s') {
if (empty ( $utc_time )) {
return '';
}
$timezone = intval(app_conf('TIME_ZONE'));
$time = $utc_time + $timezone * 3600;
return date ($format, $time );
}
function to_timespan($str, $format = 'Y-m-d H:i:s')
{
$timezone = intval(app_conf('TIME_ZONE'));
//$timezone = 8;
$time = intval(strtotime($str));
if($time!=0)
$time = $time - $timezone * 3600;
return $time;
}
function valid_tag($str)
{
return preg_replace("/<(?!div|ol|ul|li|sup|sub|span|br|img|p|h1|h2|h3|h4|h5|h6|\/div|\/ol|\/ul|\/li|\/sup|\/sub|\/span|\/br|\/img|\/p|\/h1|\/h2|\/h3|\/h4|\/h5|\/h6|blockquote|\/blockquote|strike|\/strike|b|\/b|i|\/i|u|\/u)[^>]*>/i","",$str);
}
/**
* 获取指定时间与当前时间的时间间隔
*
* @access public
* @param integer $time
*
* @return string
*/
function getBeforeTimelag($time)
{
if($time == 0)
return "";
static $today_time = NULL,
$before_lang = NULL,
$beforeday_lang = NULL,
$today_lang = NULL,
$yesterday_lang = NULL,
$hours_lang = NULL,
$minutes_lang = NULL,
$months_lang = NULL,
$date_lang = NULL,
$sdate = 86400;
if($today_time === NULL)
{
$today_time = TIME_UTC;
$before_lang = '前';
$beforeday_lang = '前天';
$today_lang = '今天';
$yesterday_lang = '昨天';
$hours_lang = '小时';
$minutes_lang = '分钟';
$months_lang = '月';
$date_lang = '日';
}
$now_day = to_timespan(to_date($today_time,"Y-m-d")); //今天零点时间
$pub_day = to_timespan(to_date($time,"Y-m-d")); //发布期零点时间
$timelag = $now_day - $pub_day;
$year_time = to_date($time,'Y');
$today_year = to_date($today_time,'Y');
if($year_time < $today_year)
return to_date($time,'Y:m:d H:i');
$timelag_str = to_date($time,' H:i');
$day_time = 0;
if($timelag / $sdate >= 1)
{
$day_time = floor($timelag / $sdate);
$timelag = $timelag % $sdate;
}
switch($day_time)
{
case '0':
$timelag_str = $today_lang.$timelag_str;
break;
case '1':
$timelag_str = $yesterday_lang.$timelag_str;
break;
case '2':
$timelag_str = $beforeday_lang.$timelag_str;
break;
default:
$timelag_str = to_date($time,'m'.$months_lang.'d'.$date_lang.' H:i');
break;
}
return $timelag_str;
}
//获取客户端IP
function get_client_ip() {
//使用wap时,是通过中转方式,所以要在wap/index.php获取客户ip,转入到:sjmapi上 chenfq by add 2014-12-17
if (isset($GLOBALS['request']['client_ip']) && !empty($GLOBALS['request']['client_ip']))
$ip = $GLOBALS['request']['client_ip'];
else if (getenv ( "HTTP_CLIENT_IP" ) && strcasecmp ( getenv ( "HTTP_CLIENT_IP" ), "unknown" ))
$ip = getenv ( "HTTP_CLIENT_IP" );
else if (getenv ( "HTTP_X_FORWARDED_FOR" ) && strcasecmp ( getenv ( "HTTP_X_FORWARDED_FOR" ), "unknown" ))
$ip = getenv ( "HTTP_X_FORWARDED_FOR" );
else if (getenv ( "REMOTE_ADDR" ) && strcasecmp ( getenv ( "REMOTE_ADDR" ), "unknown" ))
$ip = getenv ( "REMOTE_ADDR" );
else if (isset ( $_SERVER ['REMOTE_ADDR'] ) && $_SERVER ['REMOTE_ADDR'] && strcasecmp ( $_SERVER ['REMOTE_ADDR'], "unknown" ))
$ip = $_SERVER ['REMOTE_ADDR'];
else
$ip = "unknown";
return strim($ip);
}
//过滤注入
function filter_injection(&$request)
{
$pattern = "/(select[\s])|(insert[\s])|(update[\s])|(delete[\s])|(from[\s])|(where[\s])/i";
foreach($request as $k=>$v)
{
if(preg_match($pattern,$k,$match))
{
die("SQL Injection denied!");
}
if(is_array($v))
{
filter_injection($v);
}
else
{
if(preg_match($pattern,$v,$match))
{
die("SQL Injection denied!");
}
}
}
}
//过滤请求
function filter_request(&$request)
{
if(MAGIC_QUOTES_GPC)
{
foreach($request as $k=>$v)
{
if(is_array($v))
{
filter_request($request[$k]);
}
else
{
$request[$k] = stripslashes(trim($v));
}
}
}
}
function adddeepslashes(&$request)
{
foreach($request as $k=>$v)
{
if(is_array($v))
{
adddeepslashes($request[$k]);
}
else
{
$request[$k] = addslashes(trim($v));
}
}
}
//request转码
function convert_req(&$req)
{
foreach($req as $k=>$v)
{
if(is_array($v))
{
convert_req($req[$k]);
}
else
{
if(!is_u8($v))
{
$req[$k] = iconv("gbk","utf-8",$v);
}
}
}
}
function stripdeepslashes(&$request)
{
if(is_array($request))
{
foreach($request as $k=>$v)
{
if(is_array($v))
{
stripdeepslashes($request[$k]);
}
else
{
$request[$k] = stripslashes(trim($v));
}
}
}
else
$request = stripslashes($request);
}
function quotes($content)
{
//if $content is an array
if (is_array($content))
{
foreach ($content as $key=>$value)
{
//$content[$key] = mysql_real_escape_string($value);
$content[$key] = addslashes($value);
}
} else
{
//if $content is not an array
$content = addslashes($content);
//mysql_real_escape_string($content);
}
return $content;
}
function strim($str)
{
return quotes(htmlspecialchars(trim($str)));
}
function btrim($str)
{
return quotes(trim($str));
}
function is_u8($string)
{
return preg_match('%^(?:
[\x09\x0A\x0D\x20-\x7E] # ASCII
| [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte
| \xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs
| [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2} # straight 3-byte
| \xED[\x80-\x9F][\x80-\xBF] # excluding surrogates
| \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3
| [\xF1-\xF3][\x80-\xBF]{3} # planes 4-15
| \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16
)*$%xs', $string);
}
//清除缓存
function clear_cache()
{
//系统后台缓存
syn_dealing();
clear_dir_file(get_real_path()."public/runtime/admin/Cache/");
clear_dir_file(get_real_path()."public/runtime/admin/Data/_fields/");
clear_dir_file(get_real_path()."public/runtime/admin/Temp/");
clear_dir_file(get_real_path()."public/runtime/admin/Logs/");
@unlink(get_real_path()."public/runtime/admin/~app.php");
@unlink(get_real_path()."public/runtime/admin/~runtime.php");
@unlink(get_real_path()."public/runtime/admin/lang.js");
@unlink(get_real_path()."public/runtime/app/config_cache.php");
//数据缓存
clear_dir_file(get_real_path()."public/runtime/app/data_caches/");
clear_dir_file(get_real_path()."public/runtime/app/db_caches/");
$GLOBALS['cache']->clear();
clear_dir_file(get_real_path()."public/runtime/data/");
//模板页面缓存
clear_dir_file(get_real_path()."public/runtime/app/tpl_caches/");
clear_dir_file(get_real_path()."public/runtime/app/tpl_compiled/");
@unlink(get_real_path()."public/runtime/app/lang.js");
//脚本缓存
clear_dir_file(get_real_path()."public/runtime/statics/");
}
function clear_dir_file($path)
{
if ( $dir = opendir( $path ) )
{
while ( $file = readdir( $dir ) )
{
$check = is_
没有合适的资源?快使用搜索试试~ 我知道了~
股票配资商业系统开源无限制旗舰版
共5846个文件
html:1480个
php:1017个
gif:891个
3星 · 超过75%的资源 需积分: 45 89 下载量 174 浏览量
2018-04-02
22:36:51
上传
评论 8
收藏 59.7MB ZIP 举报
温馨提示
经典股票配资平台, 环境lamp即可搭建,部署后,打开地址即可安装,M.PHP,直接访问到达后台, 账号密码都是admin
资源推荐
资源详情
资源评论
收起资源包目录
股票配资商业系统开源无限制旗舰版 (5846个子文件)
.tmp_add.html.17861~ 4KB
.tmp_edit.html.29495~ 4KB
all-wcprops 4KB
all-wcprops 2KB
all-wcprops 672B
all-wcprops 562B
all-wcprops 527B
all-wcprops 464B
all-wcprops 462B
all-wcprops 444B
all-wcprops 444B
all-wcprops 369B
all-wcprops 367B
all-wcprops 345B
all-wcprops 336B
all-wcprops 333B
all-wcprops 238B
all-wcprops 206B
URI.as 75KB
Tweener.as 41KB
Equations.as 29KB
main.as 25KB
Round3D.as 22KB
Dome.as 20KB
JPGEncoder.as 19KB
RoundGlass.as 17KB
DateUtil.as 17KB
SpecialPropertiesDefault.as 16KB
PlasticFlat.as 15KB
JSON.as 15KB
JSONTokenizer.as 14KB
PieSliceContainer.as 14KB
JSON.as 14KB
Round.as 13KB
Plastic.as 12KB
XAxis.as 11KB
printf.as 11KB
ScreenCoords.as 11KB
CylinderOutline.as 11KB
Pie.as 10KB
TweenListObj.as 10KB
Base.as 10KB
MD5.as 9KB
JSONEncoder.as 9KB
XAxisLabels.as 9KB
SHA256.as 9KB
scat.as 9KB
YAxisBase.as 9KB
SHA224.as 9KB
DateUtils.as 9KB
Tooltip.as 9KB
SHA1.as 8KB
Line.as 8KB
Css.as 8KB
Cylinder.as 8KB
RFC2817Socket.as 7KB
PointDotBase.as 7KB
StringUtil.as 7KB
YAxisLabelsBase.as 7KB
PieSlice.as 7KB
JSONDecoder.as 7KB
Base.as 7KB
Tag.as 6KB
LineBase.as 6KB
ObjectCollection.as 6KB
ArrayUtil.as 6KB
ScatterLine.as 6KB
PNGEncoder.as 5KB
Parser.as 5KB
ECandle.as 5KB
XMLUtil.as 5KB
tr.as 5KB
BarBase.as 5KB
URIEncodingBitmap.as 5KB
Element.as 4KB
StackCollection.as 4KB
Factory.as 4KB
WSSEUsernameToken.as 4KB
Bar3D.as 4KB
bow.as 4KB
RadarSpokeLabels.as 4KB
URLLoaderBase.as 4KB
Menu.as 4KB
anchor.as 3KB
Glass.as 3KB
star.as 3KB
JSONToken.as 3KB
IURIResolver.as 3KB
RadarAxisLabels.as 3KB
RadarAxis.as 3KB
menuItem.as 3KB
JSONParseError.as 3KB
ScatterBase.as 3KB
Horizontal.as 3KB
BarStack.as 3KB
DictionaryUtil.as 3KB
NumberFormat.as 3KB
PropertyInfoObj.as 3KB
AuxFunctions.as 3KB
Keys.as 3KB
共 5846 条
- 1
- 2
- 3
- 4
- 5
- 6
- 59
资源评论
- wangyu5212019-10-19骗人的,不要下载
- tindy20022018-09-26很老的源码,居然是方维P2P借贷的,不是什么股票配资,压缩包里文件还是2015年的代码,这个系统源码包已经升级到2017年的,安装后各种报错,哎,浪费积分了
- stoneonline2018-05-23可以下载,谢谢分享
weixin_41673892
- 粉丝: 1
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功