发布一套MT4 CRM源码,同时支持MT4进行对接使用,支持代理返佣自由进行设置,可自动实时同步manager后台分组、交易品种和客户所有信息。包括带有内部实时内转功能,支持任何第三方支付、区块链和电子钱包。 整套系统功能齐全。可节约公司大量租用成本和防止第三方公司泄露客户资料等核心数据 源码没有加密和授权,
部署简单,说明清晰
1、客户端功能明细:
出入金:入金,出金,我的赠金,待审核入金,待审核出金,赠金审核,待审核银行卡
客户管理:开户列表,账户管理,账户审核,员工列表,客户变动详情
多边对冲:对冲监控中心,对冲会员列表,客户平仓明细,客户持仓明细,客户资金明细,会员收益明细,会员资金明细。
报表:资金报表,交易报表,佣金报表,业绩报表,详情报表
系统管理:系统设置,MT设置,返佣设置,分组同步,货币同步,等级设置,赠金规则,消息管理,日志管理,同步客户,配置参数,支付管理。
2、源码语言和数据库:PHP+MYSQL
部分系统截图:
部分代码:
<?php
// 加密哈希规则
function pwdHash($text, $type = 'md5') {
return hash($type, $text);
}
//获取状态
function get_status($status) {
return '<b class="status status' . $status . '">' . $status . '</b>';
}
//格式化时间
function format_date($format, $time) {
$date = date($format, $time);
empty($time) && $date = preg_replace('/\d/', '0', $date);
return $date;
}
//数据格式转换
function toTree($data, $pid = 0, $id = 0) {
static $result = array();
empty($id) && $result = array();
foreach ($data as $key => $value) {
if ($value['pid'] == $pid) {
define('level', $value['level']);
$value['level'] -= level;
$result[] = $value;
unset($data[$key]);
toTree($data, $value['id'], $value['id']);
}
}
return $result;
}
//获取模型类型
function get_model_type($type) {
switch ($type) {
case 0:$name = '系统模型';
break;
case 1:$name = '文档模型';
break;
default:$name = '系统模型';
break;
}
return $name;
}
function get_photo_group($title, $id) {
return '<a href="">' . $title . '</a>';
}
//获取分类列表(可以缓存)
function get_cate_list() {
$data = M('cate')->cache(true, 1)->select();
return $data;
}
//获取分类信息
function get_cate_info($id) {
$data = get_cate_list();
$result = null;
foreach ($data as $value) {
if ($value['id'] == $id) {
$result = $value;
break;
}
}
return $result;
}
//获取分类父级
function get_cate_parent($id, $data = array()) {
static $result = array();
empty($data) && $result = array();
empty($data) && $data = get_cate_list();
foreach ($data as $key => $value) {
if ($value['id'] == $id) {
$result[] = $value;
return get_cate_parent($value['pid'], $data);
}
}
return $result;
}
//根据url目录获取分类信息
function get_url_cate($id, $name) {
$data = get_cate_list();
$result = null;
foreach ($name as $key => $value) {
$pid = $id;
foreach ($data as $val) {
if ($val['pid'] == $id && $val['name'] == $value) {
$result = $val;
$id = $val['id'];
break;
}
}
if ($id == $pid) {
return null;
}
}
return $result;
}
//获取文档模型列表(可以缓存)
function get_model_list() {
$result = M('model')->cache(true, 1)->where(array('type' => 1))->select();
return $result;
}
//获取模型信息
function get_model_info($id) {
$data = get_model_list();
$result = null;
foreach ($data as $value) {
if ($value['id'] == $id) {
$result = $value;
break;
}
}
return $result;
}
function get_config($name) {
$cache = loadCache("config");
return $cache[$name];
}
function convertCurrency($from, $to, $amount) {
$url = "http://www.baidu/s?wd={$from}%20{$to}&rsv_spt={$amount}";
$ch = curl_init();
if ($type == 'json') {
$header = 'Content-type: text/json'; //定义content-type为json
curl_setopt($ch, CURLOPT_HTTPHEADER, $header); //设置HTTP头
}
//设置选项,包括URL
curl_setopt($ch, CURLOPT_URL, $url);
// curl_setopt($ch, CURLOPT_SSLVERSION, 3);
curl_setopt($ch, CURLOPT_TIMEOUT, 2);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_HEADER, 0);
$handles = curl_exec($ch);
if (curl_errno($ch)) {//出错则显示错误信息
return curl_error($ch);
}
curl_close($ch);
preg_match("/<div>1\D*=(\d*\.\d*)\D*<\/div>/", $handles, $converted);
$converted = preg_replace("/[^0-9.]/", "", $converted[1]);
return number_format(round($converted, 4), 4);
}
function isMobile() {
$useragent = isset($_SERVER ['HTTP_USER_AGENT']) ? $_SERVER ['HTTP_USER_AGENT'] : '';
$useragent_commentsblock = preg_match('|\(.*?\)|', $useragent, $matches) > 0 ? $matches [0] : '';
$mobile_os_list = array(
'Google Wireless Transcoder',
'Windows CE',
'WindowsCE',
'Symbian',
'Android',
'armv6l',
'armv5',
'Mobile',
'CentOS',
'mowser',
'AvantGo',
'Opera Mobi',
'J2ME/MIDP',
'Smartphone',
'Go.Web',
'Palm',
'iPAQ'
);
$mobile_token_list = array(
'Profile/MIDP',
'Configuration/CLDC-',
'160×160',
'176×220',
'240×240',
'240×320',
'320×240',
'UP.Browser',
'UP.Link',
'SymbianOS',
'PalmOS',
'PocketPC',
'SonyEricsson',
'Nokia',
'BlackBerry',
'Vodafone',
'BenQ',
'Novarra-Vision',
'Iris',
'NetFront',
'HTC_',
'Xda_',
'SAMSUNG-SGH',
'Wapaka',
'DoCoMo',
'iPhone',
'iPod'
);
$found_mobile = CheckSubstrs($mobile_os_list, $useragent_commentsblock) || CheckSubstrs($mobile_token_list, $useragent);
if ($found_mobile) {
return true;
} else {
return false;
}
}
function CheckSubstrs($substrs, $text) {
foreach ($substrs as $substr)
if (false !== strpos($text, $substr)) {
return true;
}
return false;
}
//根据MT4ID获取头像
function getheadbylogin($loginid, $server_id = 3) {
$member_id = M("member_mtlogin")->where(array('loginid' => array('eq', $loginid), 'status' => 1, 'server_id' => $server_id))->getField('member_id');
$head = M("member")->where(array('id' => $member_id))->getField('headimg');
$img = $head ? $head : "/Public/admin/Images/default.jpeg";
return $img;
}
//根据uid获取头像
function getheadbyuid($uid) {
$head = M("member")->where(array('id' => $uid))->getField('headimg');
$img = $head ? $head : "/Public/admin/Images/default.jpeg";
return $img;
}
function valid_pass($candidate) {
$r1 = '/[A-Z]/'; //uppercase
$r2 = '/[a-z]/'; //lowercase
$r3 = '/[0-9]/'; //numbers
if (preg_match_all($r1, $candidate, $o) < 1) {
return FALSE;
}
if (preg_match_all($r2, $candidate, $o) < 1) {
return FALSE;
}
if (preg_match_all($r3, $candidate, $o) < 1) {
return FALSE;
}
if (strlen($candidate) < 8) {
return FALSE;
}
return TRUE;
}
/**
* PHP POST数据提交
* @param 提交至URL $url
* @param 提交数据 $data
* @return URL返回结果
*/
function postData($url, $data, $ssl = false) {
$ch = curl_init();
$timeout = 300;
//$header = 'Content-type: text/json';//定义content-type为json
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SAFE_UPLOAD, false);
if (!$ssl) {
curl_setopt($ch, CURLOPT_SSLVERSION, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
} else {
curl_setopt($ch, CURLOPT_SSLVERSION, 3);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
}
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //设置是否返回信息
//curl_setopt($ch, CURLOPT_HTTPHEADER, $header);//设置HTTP头
$handles = curl_exec($ch);
if (curl_errno($ch)) {//出错则显示错误信息
return curl_error($ch);
}
curl_close($ch);
return $handles;
}
/**
* 首信易推送加密
* @param type $key
* @param type $data
* @return type
*/
function hmac($key, $data) {
// 创建 md5的HMAC
$b = 64; // md5加密字节长度
if (strlen($key) > $b) {
$key = pack("H*", md5($key));
}
$key = str_pad($key, $b, chr(0x00));
$ipad = str_pad('', $b, chr(0x36));
$opad = str_pad('', $b, chr(0x5c));
$k_ipad = $key ^ $ipad;
$k_opad = $key ^ $opad;
return md5($k_opad . pack("H*", md5($k_ipad . $data)));
}
function deldir($dir) {
//先删除目录下的文件:
$dh = opendir($dir);
while ($file = readdir($dh)) {
if ($file != "." && $file != "..") {
$fullpath = $dir . "/" . $file;
if (!is_dir($fullpath)) {
unlink($fullpath);
} else {
deldir($fullpath);
}
}
}
closedir($dh);
//删除当前文件夹:
if (rmdir($dir)) {
return true;
} else {
return false;
}
}
?>
更多推荐
MT4 CRM 源码
发布评论