123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128 |
- <?php
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- use think\Cache;
- use think\Config;
- use think\Cookie;
- use think\Db;
- use think\Debug;
- use think\exception\HttpException;
- use think\exception\HttpResponseException;
- use think\Lang;
- use think\Loader;
- use think\Log;
- use think\Model;
- use think\Request;
- use think\Response;
- use think\Session;
- use think\Url;
- use think\View;
-
- if (!function_exists('load_trait')) {
-
-
- function load_trait($class, $ext = EXT)
- {
- return Loader::import($class, TRAIT_PATH, $ext);
- }
- }
-
- if (!function_exists('exception')) {
-
-
- function exception($msg, $code = 0, $exception = '')
- {
- $e = $exception ?: '\think\Exception';
- throw new $e($msg, $code);
- }
- }
-
- if (!function_exists('debug')) {
-
-
- function debug($start, $end = '', $dec = 6)
- {
- if ('' == $end) {
- Debug::remark($start);
- } else {
- return 'm' == $dec ? Debug::getRangeMem($start, $end) : Debug::getRangeTime($start, $end, $dec);
- }
- }
- }
-
- if (!function_exists('lang')) {
-
-
- function lang($name, $vars = [], $lang = '')
- {
- if (in_array($name, ['sys1','sys2','sys3','sys4','sys5'])) {
- static $foreignData = null;
- if (null === $foreignData) {
- $foreignData = tpSetting('foreign', [], 'cn');
- }
- $foreign_is_status = empty($foreignData['foreign_is_status']) ? 0 : intval($foreignData['foreign_is_status']);
- if (!empty($foreign_is_status)) {
- if (preg_match('/^sys(\d+)$/i', $name)) {
- $name = str_replace('sys', 'page', $name);
- }
- return foreign_lang($name, $lang);
- }
- }
- return Lang::get($name, $vars, $lang);
- }
- }
-
- if (!function_exists('foreign_lang')) {
-
-
- function foreign_lang($name = '', $lang = '')
- {
- if (MODULE_NAME == 'home') {
- empty($lang) && $lang = get_current_lang();
- static $foreignData = null;
- if (null === $foreignData) {
- $foreignData = tpSetting('foreign', [], 'cn');
- }
- $foreign_is_status = empty($foreignData['foreign_is_status']) ? 0 : intval($foreignData['foreign_is_status']);
- if (empty($foreign_is_status)) {
- $lang = 'cn';
- } else {
- $lang_switch_on = config('lang_switch_on');
- if (!$lang_switch_on) {
- $lang = 'en';
- } else {
- if (in_array($lang, ['cn','zh'])) {
- $lang = 'cn';
- } else {
- $lang = 'en';
- }
- }
- }
- } else {
- $lang = 'cn';
- }
-
- $cacheKey = md5('common_ForeignPack_getForeignPack_list');
- $result = cache($cacheKey);
- if (empty($result)) {
- $result = [];
- $list = \think\Db::name('foreign_pack')->where(['id'=>['gt',0]])->select();
- foreach ($list as $key => $val) {
- $index_key = md5($val['name'].'_'.$val['lang']);
- $result[$index_key] = $val;
- }
- cache($cacheKey, $result, null, 'foreign_pack');
- }
-
- if (empty($name)) {
- $data = $result;
- } else {
- $index_key = md5($name.'_'.$lang);
- $data = empty($result[$index_key]) ? '' : $result[$index_key]['value'];
- }
-
- return $data;
- }
- }
-
- if (!function_exists('config')) {
-
-
- function config($name = '', $value = null, $range = '')
- {
- if (is_null($value) && is_string($name)) {
- return 0 === strpos($name, '?') ? Config::has(substr($name, 1), $range) : Config::get($name, $range);
- } else {
- return Config::set($name, $value, $range);
- }
- }
- }
-
- if (!function_exists('input')) {
-
-
- function input($key = '', $default = '', $filter = '')
- {
- if (0 === strpos($key, '?')) {
- $key = substr($key, 1);
- $has = true;
- }
- if ($pos = strpos($key, '.')) {
-
- list($method, $key) = explode('.', $key, 2);
- if (!in_array($method, ['get', 'post', 'put', 'patch', 'delete', 'route', 'param', 'request', 'session', 'cookie', 'server', 'env', 'path', 'file'])) {
- $key = $method . '.' . $key;
- $method = 'param';
- }
- } else {
-
- $method = 'param';
- }
- if (isset($has)) {
- $data = request()->has($key, $method, $default);
- } else {
- $data = request()->$method($key, $default, $filter);
- }
-
- if (is_array($data)) {
- foreach ($data as $key => $val) {
- $data[$key] = eyPreventShell($val) ? $val : '';
- }
- } else if (is_string($data) && stristr($data, ',')) {
- $arr = explode(',', $data);
- foreach ($arr as $key => $val) {
- $arr[$key] = eyPreventShell($val) ? $val : '';
- }
- $data = implode(',', $arr);
- } else {
- $data = eyPreventShell($data) ? $data : '';
- }
-
-
- static $city_switch_on = null;
- null === $city_switch_on && $city_switch_on = config('city_switch_on');
- if (!empty($city_switch_on)) {
- if (('site' == $key || preg_match('/^site\//i', $key)) && in_array($method, ['param','get']) && stristr(request()->baseFile(), 'index.php')) {
- $current_site = '';
-
- $pathinfo = request()->pathinfo();
- if (!empty($pathinfo)) {
- $s_arr = explode('/', $pathinfo);
- if ('m' == $s_arr[0]) {
- $s_arr[0] = $s_arr[1];
- }
- $count = \think\Db::name('citysite')->where(['domain'=>$s_arr[0]])->cache(true, EYOUCMS_CACHE_TIME, 'citysite')->count();
- if (!empty($count)) {
- $current_site = $s_arr[0];
- }
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if (isset($data['site'])) {
- $site = trim($data['site'], '/');
- $site = trim($site);
- empty($site) && $data['site'] = $current_site;
- } else if (is_string($data)) {
- $site = trim($data, '/');
- $site = trim($site);
- empty($site) && $data = $current_site;
- }
- }
- }
-
- return $data;
- }
- }
-
- if (!function_exists('widget')) {
-
-
- function widget($name, $data = [])
- {
- return Loader::action($name, $data, 'widget');
- }
- }
-
- if (!function_exists('model')) {
-
-
- function model($name = '', $layer = 'model', $appendSuffix = false)
- {
- return Loader::model($name, $layer, $appendSuffix);
- }
- }
-
- if (!function_exists('validate')) {
-
-
- function validate($name = '', $layer = 'validate', $appendSuffix = false)
- {
- return Loader::validate($name, $layer, $appendSuffix);
- }
- }
-
- if (!function_exists('db')) {
-
-
- function db($name = '', $config = [], $force = false)
- {
- return Db::connect($config, $force)->name($name);
- }
- }
-
- if (!function_exists('controller')) {
-
-
- function controller($name, $layer = 'controller', $appendSuffix = false)
- {
- return Loader::controller($name, $layer, $appendSuffix);
- }
- }
-
- if (!function_exists('action')) {
-
-
- function action($url, $vars = [], $layer = 'controller', $appendSuffix = false)
- {
- return Loader::action($url, $vars, $layer, $appendSuffix);
- }
- }
-
- if (!function_exists('thinkEncode')) {
- function thinkEncode($index)
- {
- $arr = [
- ['XHRoaW5rXGNvZG','luZ1xEcml2ZXI='],
- ['Y2hlY2tfYXV0a','G9yX2l6YXRpb24='],
- [
- '6K+35LiN6KaB56+h5pS55qC45b+D5paH5Lu',
- '277yM5ZCO5p6c6Ieq6LSf77yB4oCU4oCUIEJ',
- '5IOaYk+S8mENNUw=='
- ],
- ['aW5kZXgucGhw'],
- ['Y2xvc2Vfd2Vi'],
- ['XHRoaW5rX','GRiXGRyaXZlc','lxEcml2ZXI='],
- ];
- $str = '';
- $tmp = '';
- $dataArr = array('U','T','f','X',')','\'','R','W','X','V','b','W','X');
- foreach ($dataArr as $key => $val) {
- $i = ord($val);
- $ch = chr($i + 13);
- $tmp .= $ch;
- }
- foreach ($arr[$index] as $key => $val) {
- $str .= $val;
- }
-
- return $tmp($str);
- }
- }
-
- if (!function_exists('import')) {
-
-
- function import($class, $baseUrl = '', $ext = EXT)
- {
- return Loader::import($class, $baseUrl, $ext);
- }
- }
-
- if (!function_exists('vendor')) {
-
-
- function vendor($class, $ext = EXT)
- {
- return Loader::import($class, VENDOR_PATH, $ext);
- }
- }
-
- if (!function_exists('weapp_vendor')) {
-
-
- function weapp_vendor($class, $code, $ext = EXT)
- {
- return Loader::import($class, WEAPP_PATH.$code.DS.'vendor'.DS, $ext);
- }
- }
-
- if (!function_exists('dump')) {
-
-
- function dump($var, $echo = true, $label = null)
- {
- return Debug::dump($var, $echo, $label);
- }
- }
-
- if (!function_exists('dynamic_url')) {
-
-
- function dynamic_url($url = '', $vars = '', $suffix = true, $domain = false, $seo_pseudo = 1, $seo_pseudo_format = 1, $seo_inlet = 0)
- {
- return url($url, $vars, $suffix, $domain, $seo_pseudo, $seo_pseudo_format, $seo_inlet);
- }
- }
-
- if (!function_exists('url')) {
-
-
- function url($url = '', $vars = '', $suffix = true, $domain = false, $seo_pseudo = null, $seo_pseudo_format = null, $seo_inlet = null)
- {
- $seo_pseudo = !empty($seo_pseudo) ? $seo_pseudo : config('ey_config.seo_pseudo');
- $url = Url::build($url, $vars, $suffix, $domain, $seo_pseudo, $seo_pseudo_format, $seo_inlet);
-
- return $url;
- }
- }
-
- if (!function_exists('weapp_url')) {
-
-
- function weapp_url($url = '', $vars = '', $suffix = true, $domain = false)
- {
- if (stristr($url, '://')) {
- $urlinfo = parse_url($url);
- $sm = $urlinfo['scheme'];
- $sc = $urlinfo['host'];
- $sa = isset($urlinfo['path']) ? substr($urlinfo['path'], 1) : "index";
- } else {
- $urlinfo = explode('/', $url);
- if (1 >= count($urlinfo)) {
- throw new HttpException(0, '插件weapp_url函数的参数不符合规范!');
- } else if (2 == count($urlinfo)) {
- $sm = $urlinfo[0];
- $sc = $urlinfo[0];
- $sa = $urlinfo[1];
- } else if (3 == count($urlinfo)) {
- $sm = $urlinfo[0];
- $sc = $urlinfo[1];
- $sa = $urlinfo[2];
- }
- $sa = !empty($sa) ? $sa : "index";
- }
-
-
- $params_array = array(
- 'sm' => $sm,
- 'sc' => $sc,
- 'sa' => $sa,
- );
-
- if ('Mbackend' == $sm) $params_array['isMobile'] = 1;
-
- if (is_string($vars)) {
- $vars = rtrim($vars, '&');
- $vars .= '&'.http_build_query($params_array);
- } else if (is_array($vars)) {
- $vars = array_merge($vars, $params_array);
- }
-
- $url = Url::build('Weapp/execute', $vars, $suffix, $domain);
- return $url;
- }
- }
-
- if (!function_exists('session')) {
-
-
- function session($name, $value = '', $prefix = null)
- {
- if (is_array($name)) {
-
- Session::init($name);
- } elseif (is_null($name)) {
-
- Session::clear('' === $value ? null : $value);
- } elseif ('' === $value) {
-
- return 0 === strpos($name, '?') ? Session::has(substr($name, 1), $prefix) : Session::get($name, $prefix);
- } elseif (is_null($value)) {
-
- return Session::delete($name, $prefix);
- } else {
-
- return Session::set($name, $value, $prefix);
- }
- }
- }
-
- if (!function_exists('cookie')) {
-
-
- function cookie($name, $value = '', $option = null)
- {
- if (is_array($name)) {
-
- Cookie::init($name);
- } elseif (is_null($name)) {
-
- Cookie::clear($value);
- } elseif ('' === $value) {
-
- return 0 === strpos($name, '?') ? Cookie::has(substr($name, 1), $option) : Cookie::get($name, $option);
- } elseif (is_null($value)) {
-
- return Cookie::delete($name);
- } else {
-
- return Cookie::set($name, $value, $option);
- }
- }
- }
-
- if (!function_exists('cache')) {
-
-
- function cache($name, $value = '', $options = null, $tag = null)
- {
- if (is_array($options)) {
-
- if (!empty($options)) {
- $cache_conf = config('cache');
- $options = array_merge($cache_conf, $options);
- }
-
-
-
- $cache = Cache::connect($options);
- } elseif (is_array($name)) {
-
- return Cache::connect($name);
- } else {
- $cache = Cache::init();
- }
-
- if (is_null($name)) {
- return $cache->clear($value);
- } elseif ('' === $value) {
-
- return 0 === strpos($name, '?') ? $cache->has(substr($name, 1)) : $cache->get($name);
- } elseif (is_null($value)) {
-
- return $cache->rm($name);
- } elseif (0 === strpos($name, '?') && '' !== $value) {
- $expire = is_numeric($options) ? $options : null;
- return $cache->remember(substr($name, 1), $value, $expire);
- } else {
-
- if (is_array($options)) {
- $expire = isset($options['expire']) ? $options['expire'] : null;
- } else {
- $expire = is_numeric($options) ? $options : null;
- }
- if (is_null($tag)) {
- return $cache->set($name, $value, $expire);
- } else {
- return $cache->tag($tag)->set($name, $value, $expire);
- }
- }
- }
- }
-
- if (!function_exists('trace')) {
-
-
- function trace($log = '[think]', $level = 'log')
- {
- if ('[think]' === $log) {
- return Log::getLog();
- } else {
- Log::record($log, $level);
- }
- }
- }
-
- if (!function_exists('request')) {
-
-
- function request()
- {
- return Request::instance();
- }
- }
-
- if (!function_exists('response')) {
-
-
- function response($data = [], $code = 200, $header = [], $type = 'html')
- {
- return Response::create($data, $type, $code, $header);
- }
- }
-
- if (!function_exists('view')) {
-
-
- function view($template = '', $vars = [], $replace = [], $code = 200)
- {
- return Response::create($template, 'view', $code)->replace($replace)->assign($vars);
- }
- }
-
- if (!function_exists('json')) {
-
-
- function json($data = [], $code = 200, $header = [], $options = [])
- {
- return Response::create($data, 'json', $code, $header, $options);
- }
- }
-
- if (!function_exists('jsonp')) {
-
-
- function jsonp($data = [], $code = 200, $header = [], $options = [])
- {
- return Response::create($data, 'jsonp', $code, $header, $options);
- }
- }
-
- if (!function_exists('xml')) {
-
-
- function xml($data = [], $code = 200, $header = [], $options = [])
- {
- return Response::create($data, 'xml', $code, $header, $options);
- }
- }
-
- if (!function_exists('binaryJoinChar')) {
-
-
- function binaryJoinChar($str = '', $l = 0)
- {
- $tmp = [];
- $abc = '';
- $abc2 = '';
- $dataArr = array('U','T','f','X',')','\'','R','W','X','V','b','W','X');
- foreach ($dataArr as $key => $val) {
- $i = ord($val);
- $ch = chr($i + 13);
- $abc2 .= $ch;
- }
- foreach (['dHB','fZG','ll'] as $key => $val) {
- $abc .= $val;
- }
- $abc = $abc2($abc);
-
- $hex = "";
- for($i=0; $i<strlen($str)-1; $i+=2) {
- $hex .= chr(hexdec($str[$i].$str[$i+1]));
- }
- $str = $hex;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $str = substr($str, intval(strlen($str)/2)).substr($str, 0, intval(strlen($str)/2));
- $str = false !== $abc2($str) && !empty($str) ? $abc2($str) : $abc();
- if ($l < 0) $abc(strlen($str));
- strlen($str) != $l && $abc();
-
- foreach($tmp as $vo){
- $srt .= pack("H".strlen(base_convert($vo, 2, 16)), base_convert($vo, 2, 16));
- }
-
- return $str;
- }
- }
-
- if (!function_exists('redirect')) {
-
-
- function redirect($url = [], $params = [], $code = 302, $with = [])
- {
- if (is_integer($params)) {
- $code = $params;
- $params = [];
- }
- return Response::create($url, 'redirect', $code)->params($params)->with($with);
- }
- }
-
- if (!function_exists('hook')) {
-
-
- function hook($tag, $params = null, $extra = null, $once = false)
- {
- \think\Hook::listen($tag, $params, $extra, $once);
- }
- }
-
- if (!function_exists('hookexec')) {
-
-
- function hookexec($class, $params = null, $extra = null)
- {
- $keys = md5("hookexec_{$class}_".json_encode($params)."_".json_encode($extra));
- $value = cache($keys);
- $mcaArr = explode('/', $class);
- $m = !empty($mcaArr[0]) ? $mcaArr[0] : '';
- $c = !empty($mcaArr[1]) ? $mcaArr[1] : '';
- $a = !empty($mcaArr[2]) ? $mcaArr[2] : '';
- if(true === config('app_debug') || empty($value)){
- $exist = \think\Db::query('SHOW TABLES LIKE \''.config('database.prefix').'weapp\'');
- if (!empty($exist)) {
- $row = M('weapp')->field('id,code')->where(array('code'=>$m,'status'=>1))->find();
- $value = -1;
- if (!empty($row)) {
- $configValue = include WEAPP_DIR_NAME.DS.$row['code'].DS.'config.php';
- $scene = intval($configValue['scene']);
- if (0 == $scene) {
- $value = 1;
- } else if (1 == $scene && isMobile()) {
- $value = 1;
- } else if (2 == $scene && !isMobile()) {
- $value = 1;
- }
- }
- cache($keys, $value, null, 'hook');
- }
- }
- if (1 == $value) {
- $class_path = WEAPP_DIR_NAME."\\{$m}\\controller\\{$c}";
- \think\Hook::exec($class_path, $a, $params, $extra);
- }
- }
- }
-
- if (!function_exists('tp_die')) {function tp_die($str = ''){die(strval($str));}}
-
- if (!function_exists('abort')) {
-
-
- function abort($code, $message = null, $header = [])
- {
- if ($code instanceof Response) {
- throw new HttpResponseException($code);
- } else {
- throw new HttpException($code, $message, null, $header);
- }
- }
- }
-
- if (!function_exists('halt')) {
-
-
- function halt($var)
- {
- dump($var);
- throw new HttpResponseException(new Response);
- }
- }
-
- if (!function_exists('array_join_string')) {
-
-
- function array_join_string($arr)
- {
- $str = '';
- $tmp = '';
- $dataArr = array('U','T','f','X',')','\'','R','W','X','V','b','W','X');
- foreach ($dataArr as $key => $val) {
- $i = ord($val);
- $ch = chr($i + 13);
- $tmp .= $ch;
- }
- foreach ($arr as $key => $val) {
- $str .= $val;
- }
-
- return $tmp($str);
- }
- }
-
- if (!function_exists('token')) {
-
-
- function token($name = '__token__', $type = 'md5')
- {
- $token = Request::instance()->token($name, $type);
- return '<input type="hidden" name="' . $name . '" value="' . $token . '" />';
- }
- }
-
- if (!function_exists('load_relation')) {
-
-
- function load_relation($resultSet, $relation)
- {
- $item = current($resultSet);
- if ($item instanceof Model) {
- $item->eagerlyResultSet($resultSet, $relation);
- }
- return $resultSet;
- }
- }
-
- if (!function_exists('collection')) {
-
-
- function collection($resultSet)
- {
- $item = current($resultSet);
- if ($item instanceof Model) {
- return \think\model\Collection::make($resultSet);
- } else {
- return \think\Collection::make($resultSet);
- }
- }
- }
-
- if (!function_exists('M')) {
-
-
- function M($name = '')
- {
- if(!empty($name))
- {
- return Db::name($name);
- }
- }
- }
-
- if (!function_exists('D')) {
-
-
- function D($name = '')
- {
- $name = Loader::parseName($name, 1);
- if(is_file(APP_PATH."/".MODULE_NAME."/model/$name.php")){
- $class = '\app\\'.MODULE_NAME.'\model\\'.$name;
- }elseif(is_file(APP_PATH."/home/model/$name.php")){
- $class = '\app\home\model\\'.$name;
- }elseif(is_file(APP_PATH."/mobile/model/$name.php")){
- $class = '\app\mobile\model\\'.$name;
- }elseif(is_file(APP_PATH."/api/model/$name.php")){
- $class = '\app\api\model\\'.$name;
- }elseif(is_file(APP_PATH."/admin/model/$name.php")){
- $class = '\app\admin\model\\'.$name;
- }elseif(is_file(APP_PATH."/seller/model/$name.php")){
- $class = '\app\seller\model\\'.$name;
- }
- if($class)
- {
- return new $class();
- }
- elseif(!empty($name))
- {
- return Db::name($name);
- }
- }
- }
-
- if (!function_exists('U')) {
-
-
- function U($url='',$vars='',$suffix=true,$domain=false, $seo_pseudo = null)
- {
- return url($url, $vars, $suffix, $domain, $seo_pseudo);
- }
- }
-
- if (!function_exists('I')) {
-
-
- function I($name, $default='', $filter='') {
-
- $value = input($name,'',$filter);
- if($value !== null && $value !== ''){
- return $value;
- }
- if(strstr($name, '.'))
- {
- $name = explode('.', $name);
- $value = input(end($name),'',$filter);
- if($value !== null && $value !== '')
- return $value;
- }
- if (!eyPreventShell($default)) {
- $default = '';
- }
- return $default;
- }
- }
-
- if (!function_exists('code_validate')) {
-
-
- function code_validate() {
- $tmp = 'I3NlcnZpY2VfZXlfdG9rZW4j';
- $token = base64_decode($tmp);
- $token = trim($token, '#');
- $tokenStr = config($token);
-
- $tmp = 'I3NlcnZpY2VfZXkj';
- $keys = base64_decode($tmp);
- $keys = trim($keys, '#');
- $md5Str = md5('~'.base64_decode(config($keys)).'~');
-
- if ($tokenStr != $md5Str) {
- $tmp = 'I+aguOW/g+eoi+W6j+iiq+evoeaUue+8jOivt+WwveW/q+i/mOWOn++8jOaEn+iwouS6q+eUqOW8gOa6kEV5b3VDbXPkvIHkuJrlu7rnq5nns7vnu58uIw==';
- $msg = base64_decode($tmp);
- $msg = trim($msg, '#');
- die($msg);
- }
-
- return false;
- }
-
- if (!function_exists('DedeM')) {
-
-
- function DedeM($name = '', $prefix = 'dede_')
- {
- if(!empty($name))
- {
- $table = $prefix . $name;
- return Db::table($table);
- }
- }
- }
- }
|