/**
 * Form token validation
 * @param  array $validations The array of validation rules
 * @return void
 */
function form_validate($validations = null)
{
    if (!isset($_POST['lc_formToken_' . _cfg('formTokenName')])) {
        Validation::addError('', _t('Invalid form token.'));
        return false;
    }
    $token = _decrypt(session_get(_cfg('formTokenName')));
    $postedToken = _decrypt(_post($_POST['lc_formToken_' . _cfg('formTokenName')]));
    $result = false;
    # check token first
    if ($token == $postedToken) {
        # check referer if it is requesting in the same site
        if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] && _cfg('siteDomain')) {
            $siteDomain = _cfg('siteDomain');
            $siteDomain = preg_replace('/^www\\./', '', $siteDomain);
            $parsedURL = parse_url($_SERVER['HTTP_REFERER']);
            $parsedURL['host'] = preg_replace('/^www\\./', '', $parsedURL['host']);
            if (strcasecmp($siteDomain, $parsedURL['host']) == 0) {
                $result = true;
            }
        }
    }
    if ($result == false) {
        Validation::addError('', _t('Error occured during form submission. Please refresh the page to try again.'));
        return false;
    }
    if ($validations && Validation::check($validations) === false) {
        return false;
    }
    return true;
}
Example #2
0
 public function glist()
 {
     $webname = $this->_cfg['web_name'];
     $title = "商品列表_" . _cfg("web_name");
     $key = "所有商品";
     include templates("mobile/index", "glist");
 }
Example #3
0
 public function tag()
 {
     $search = $this->segment_array();
     array_shift($search);
     array_shift($search);
     array_shift($search);
     $search = implode('/', $search);
     if (!$search) {
         _message("输入搜索关键字");
     }
     $search = urldecode($search);
     $search = safe_replace($search);
     if (!_is_utf8($search)) {
         $search = iconv("GBK", "UTF-8", $search);
     }
     $mysql_model = System::load_sys_class('model');
     $search = str_ireplace("union", '', $search);
     $search = str_ireplace("select", '', $search);
     $search = str_ireplace("delete", '', $search);
     $search = str_ireplace("update", '', $search);
     $search = str_ireplace("/**/", '', $search);
     $title = $search . ' - ' . _cfg('web_name');
     $shoplist = $mysql_model->GetList("select title,thumb,id,sid,zongrenshu,canyurenshu,shenyurenshu,money from `@#_shoplist` WHERE shenyurenshu !=0 and `title` LIKE '%" . $search . "%' order by shenyurenshu desc");
     $list = count($shoplist);
     include templates("search", "search");
 }
Example #4
0
 public function postCreate()
 {
     $model = $this->model;
     $post = new $model();
     $rules = array();
     /**
      * Retrieve inputs and rules
      */
     foreach (_cfg('fields') as $key => $field) {
         $name = isset($field['name']) ? $field['name'] : $key;
         $post->{$name} = Input::get($name, '');
         $rules[$name] = isset($field['rules']) ? $field['rules'] : array();
     }
     /**
      * Prepare redirect url
      */
     $url = Admin::url(Admin::data('section') . '/' . Admin::data('action') . (Admin::data('id') ? '/' . Admin::data('id') : ''));
     /**
      * Validate
      */
     $validator = Validator::make(Input::all(), $rules);
     if ($validator->fails()) {
         pr($validator->messages());
         return Redirect::to($url)->withInput(Input::except('_token'))->withErrors($validator);
     }
     /**
      * Save new data
      */
     if ($post->save()) {
         return Redirect::to($url . '?success=1');
     }
     return Redirect::to($url)->withInput(Input::except('_token'));
 }
Example #5
0
 /**
  * Set default image filter set and merge with user's options
  * @return object File
  */
 private function defaultImageFilterSet()
 {
     $this->imageFilterSet = array('maxDimension' => '800x600', 'resizeMode' => FILE_RESIZE_BOTH, 'jpgQuality' => 75);
     $this->imageFilterSet = array_merge($this->imageFilterSet, _cfg('imageFilterSet'));
     $this->setImageResizeMode($this->imageFilterSet['resizeMode']);
     return $this;
 }
/**
 * @internal
 * Check the default security secret to be changed
 */
function security_prerequisite()
{
    $defaultSecret = md5('lucidframe');
    $secret = trim(_cfg('securitySecret'));
    if (function_exists('mcrypt_encrypt') && (empty($secret) || strcmp($secret, $defaultSecret) === 0)) {
        $msg = 'To change your own security secret, ';
        $msg .= 'open your terminal or command line, <code class="inline">cd</code> to your project directory, ';
        $msg .= 'then run <code class="inline">php lucidframe secret:generate</span>';
        _cfg('sitewideWarnings', function_exists('_t') ? _t($msg) : $msg);
    }
}
 /**
  * Test cases for _cfg()
  */
 public function testForFunctionUnderscoreCfg()
 {
     // 1.
     _cfg('sitewideWarnings', _t('Change your own security salt hash in the file "/inc/.secret".'));
     $this->assertEqual(_cfg('sitewideWarnings'), 'Change your own security salt hash in the file "/inc/.secret".');
     // 2.
     _cfg('minifyHTML', false);
     $this->assertFalse(_cfg('minifyHTML'));
     // 3.
     _cfg('translationEnabled', false);
     $this->assertFalse(_cfg('translationEnabled'));
 }
Example #8
0
 function __construct($alias = null)
 {
     if ($alias == null) {
         if ($db = _cfg('db') != null) {
             $alias = $db[$db['default']];
         } else {
             trigger_error('Banco de dados não configurado');
         }
     }
     //carregando o driver
     $driver = $db[$alias];
     $this->driver = new $driver($db[$alias]);
 }
/**
 * Check and get the authentication configuration settings
 */
function auth_prerequisite()
{
    global $lc_siteErrors;
    db_prerequisite();
    $auth = _cfg('auth');
    if (isset($auth['table']) && $auth['table'] && isset($auth['fields']['id']) && $auth['fields']['id'] && isset($auth['fields']['role']) && $auth['fields']['role']) {
        return $auth;
    } else {
        $error = new stdClass();
        $error->message = 'Required to configure <code class="inline">$lc_auth</code> in "/inc/config.php" or "/inc/site.config.php".';
        $error->message = array(function_exists('_t') ? _t($error->message) : $error->message);
        $error->type = 'sitewide-message error';
        include _i('inc/tpl/site.error.php');
        exit;
    }
}
Example #10
0
 public function show()
 {
     $articleid = safe_replace($this->segment(4));
     $article = $this->db->GetOne("SELECT * FROM `@#_article` where `id` = '{$articleid}' LIMIT 1");
     if ($article) {
         $cateinfo = $this->db->GetOne("SELECT * FROM `@#_category` where `cateid` = '{$article['cateid']}' LIMIT 1");
     } else {
         $cateinfo = array("info" => null);
     }
     $info = unserialize($cateinfo['info']);
     $title = $article['title'] . "_" . _cfg("web_name");
     $keywords = $article['keywords'];
     $description = $article['description'];
     if (!isset($info['template_show'])) {
         $info['template_show'] = "article_show.show.html";
     }
     $template = explode('.', $info['template_show']);
     include templates($template[0], $template[1]);
 }
Example #11
0
 public function get_cityqq()
 {
     $prov = urldecode(trim($this->segment(4)));
     $cityv = urldecode(trim($this->segment(5)));
     $couv = urldecode(trim($this->segment(6)));
     $prov = safe_replace($prov);
     $cityv = safe_replace($cityv);
     $couv = safe_replace($couv);
     if (!_is_utf8($prov)) {
         $prov = iconv("GBK", "UTF-8", $prov);
     }
     if (!_is_utf8($cityv)) {
         $cityv = iconv("GBK", "UTF-8", $cityv);
     }
     if (!_is_utf8($couv)) {
         $couv = iconv("GBK", "UTF-8", $couv);
     }
     $str = '----请选择----';
     if ($prov != $str && $cityv == $str && $couv == $str) {
         $res = $this->db->GetList("SELECT * FROM `@#_qqset` where `province`='{$prov}'");
     }
     if ($prov != $str && $cityv != $str && $couv == $str) {
         $res = $this->db->GetList("SELECT * FROM `@#_qqset` where `province`='{$prov}' and `city`='{$cityv}'");
     }
     if ($prov != $str && $cityv != $str && $couv != $str) {
         $res = $this->db->GetList("SELECT * FROM `@#_qqset` where `province`='{$prov}' and `city`='{$cityv}' and `county`='{$couv}'");
     }
     if (!empty($res)) {
         $str = '<ul>';
         foreach ($res as $v) {
             $str .= '<li><dt><img border="0" alt="' . $v['name'] . '" src="' . G_TEMPLATES_IMAGE . '/logo.jpg"></dt><dt>' . $v['name'];
             if ($v['full'] == '已满') {
                 $str .= '<img src="' . G_TEMPLATES_IMAGE . '/qqhot.gif"/>';
             }
             $str .= '</dt><dd><a href="' . $v['qqurl'] . '">' . $v['qq'] . '</a></dd></li>';
         }
         $str .= '</ul>';
     } else {
         $email = System::load_sys_config('email', 'user');
         $str = "<div class='nothing'>该地区暂无QQ群加盟," . _cfg("web_name_two") . "诚邀您加盟,详情请咨询Email:<a href='mailto:" . $email . "' target='_blank' >" . $email . "</div>";
     }
     echo $str;
 }
Example #12
0
 public function login()
 {
     if (isset($_POST['ajax'])) {
         $location = WEB_PATH . '/' . ROUTE_M . '/index';
         $message = array("error" => false, 'text' => $location);
         $username = $_POST['username'];
         $password = $_POST['password'];
         $code = strtoupper($_POST['code']);
         if (empty($username)) {
             $message['error'] = true;
             $message['text'] = "请输入用户名!";
             echo json_encode($message);
             exit;
         }
         if (empty($password)) {
             $message['error'] = true;
             $message['text'] = "请输入密码!";
             echo json_encode($message);
             exit;
         }
         if (_cfg("web_off")) {
             if (empty($code)) {
                 $message['error'] = true;
                 $message['text'] = "请输入验证码!";
                 echo json_encode($message);
                 exit;
             }
             if (md5($code) != _getcookie('checkcode')) {
                 $message['error'] = true;
                 $message['text'] = "验证码输入错误";
                 echo json_encode($message);
                 exit;
             }
         }
         $info = $this->db->GetOne("SELECT * FROM `@#_admin` WHERE `username` = '{$username}' LIMIT 1");
         if (!$info) {
             $message['error'] = true;
             $message['text'] = "登录失败,请检查用户名或密码!";
             echo json_encode($message);
             exit;
         }
         if ($info['userpass'] != md5($password)) {
             $message['error'] = true;
             $message['text'] = "登陆失败!";
             echo json_encode($message);
             exit;
         }
         if (!$message['error']) {
             _setcookie("AID", _encrypt($info['uid'], 'ENCODE'));
             _setcookie("ASHELL", _encrypt(md5($info['username'] . $info['userpass']) . md5($_SERVER['HTTP_USER_AGENT'])));
             $_SESSION['token'] = md5($info['username'] . $info['userpass']);
             $this->AdminInfo = $info;
             $time = time();
             $ip = _get_ip();
             $this->db->Query("UPDATE `@#_admin` SET `logintime`='{$time}' WHERE (`uid`='{$info['uid']}')");
             $this->db->Query("UPDATE `@#_admin` SET `loginip`='{$ip}' WHERE (`uid`='{$info['uid']}')");
         }
         echo json_encode($message);
         exit;
     } else {
         include $this->tpl(ROUTE_M, 'user.login');
     }
 }
	
		<li><a href="<?php 
        echo $img['url'];
        ?>
" target="_blank"><img src="<?php 
        echo G_UPLOAD_PATH;
        ?>
/linkimg/<?php 
        echo $img['logo'];
        ?>
"/></a></li>
	<?php 
    }
}
$ln++;
unset($ln);
?>
	
	</ul>
</div>  
<div class="links_exp">
	<h3><b>联系方式</b></h3>
	<p>
		电话:<?php 
echo _cfg("cell");
?>
<br>
	</p>                 
</div>
<?php 
include templates("index", "footer");
Example #14
0
 public function glist()
 {
     $select = $this->segment(4) ? $this->segment(4) : '0_0_0';
     $select = explode("_", $select);
     $select[] = '0';
     $select[] = '0';
     $cid = abs(intval($select[0]));
     $bid = abs(intval($select[1]));
     $order = abs(intval($select[2]));
     $orders = '';
     switch ($order) {
         case '1':
             $orders = 'order by `shenyurenshu` ASC';
             break;
         case '2':
             $orders = "and `renqi` = '1'";
             break;
         case '3':
             $orders = 'order by `shenyurenshu` ASC';
             break;
         case '4':
             $orders = 'order by `time` DESC';
             break;
         case '5':
             $orders = 'order by `money` DESC';
             break;
         case '6':
             $orders = 'order by `money` ASC';
             break;
         default:
             $orders = 'order by `order` ASC,`id` DESC';
     }
     /* 设置了查询分类ID 和品牌ID */
     if (!$cid) {
         $brand = $this->db->GetList("select id,cateid,name from `@#_brand` where 1 order by `order` DESC");
         $daohang_title = '所有分类';
     } else {
         //$brand=$this->db->GetList("select id,cateid,name from `@#_brand` where `cateid` LIKE '%$cid%' order by `order` DESC");
         //2014-11-18 lq 修复品牌错乱问题
         $brand = $this->db->GetList("select id,cateid,name from `@#_brand` where CONCAT(',',`cateid`,',') LIKE '%,{$cid},%' order by `order` DESC");
         $daohang = $this->db->GetOne("select cateid,name,parentid,info from `@#_category` where `cateid` = '{$cid}' LIMIT 1");
         $daohang['info'] = unserialize($daohang['info']);
         $daohang_title = empty($daohang['info']['meta_title']) ? $daohang['name'] : $daohang['info']['meta_title'];
         $keywords = $daohang['info']['meta_keywords'];
         $description = $daohang['info']['meta_description'];
     }
     $title = $daohang_title . "_商品列表_" . _cfg("web_name");
     //分页
     $num = 20;
     /* 设置了查询分类ID 和品牌ID */
     if ($cid && $bid) {
         $sun_id_str = "'" . $cid . "'";
         $sun_cate = $this->db->GetList("SELECT cateid from `@#_category` where `parentid` = '{$daohang['cateid']}'");
         foreach ($sun_cate as $v) {
             $sun_id_str .= "," . "'" . $v['cateid'] . "'";
         }
         $total = $this->db->GetCount("select id from `@#_shoplist` WHERE `q_uid` is null and `brandid`='{$bid}'  and `cateid` in ({$sun_id_str})");
     } else {
         if ($bid) {
             $total = $this->db->GetCount("select id from `@#_shoplist` WHERE `q_uid` is null and `brandid`='{$bid}'");
         } elseif ($cid) {
             $sun_id_str = "'" . $cid . "'";
             $sun_cate = $this->db->GetList("SELECT cateid from `@#_category` where `parentid` = '{$daohang['cateid']}'");
             foreach ($sun_cate as $v) {
                 $sun_id_str .= "," . "'" . $v['cateid'] . "'";
             }
             $total = $this->db->GetCount("select id from `@#_shoplist` WHERE `q_uid` is null and `cateid` in ({$sun_id_str})");
         } else {
             $total = $this->db->GetCount("select id from `@#_shoplist` WHERE `q_uid` is null");
         }
     }
     $page = System::load_sys_class('page');
     if (isset($_GET['p'])) {
         $pagenum = $_GET['p'];
     } else {
         $pagenum = 1;
     }
     $page->config($total, $num, $pagenum, "0");
     if ($pagenum > $page->page) {
         $pagenum = $page->page;
     }
     if ($cid && $bid) {
         $shoplist = $this->db->GetPage("select * from `@#_shoplist` where `q_uid` is null and `brandid`='{$bid}' and `cateid` in ({$sun_id_str}) {$orders}", array("num" => $num, "page" => $pagenum, "type" => 1, "cache" => 0));
     } else {
         if ($bid) {
             $shoplist = $this->db->GetPage("select * from `@#_shoplist` where `q_uid` is null and `brandid`='{$bid}' {$orders}", array("num" => $num, "page" => $pagenum, "type" => 1, "cache" => 0));
         } elseif ($cid) {
             $shoplist = $this->db->GetPage("select * from `@#_shoplist` where `q_uid` is null and `cateid` in ({$sun_id_str}) {$orders}", array("num" => $num, "page" => $pagenum, "type" => 1, "cache" => 0));
         } else {
             $shoplist = $this->db->GetPage("select * from `@#_shoplist` where `q_uid` is null {$orders}", array("num" => $num, "page" => $pagenum, "type" => 1, "cache" => 0));
         }
     }
     $this_time = time();
     include templates("index", "glist");
 }
Example #15
0
 public function nei()
 {
     $id = abs(intval($this->segment(4)));
     if (!$id) {
         _message("页面错误");
     }
     $tiezi = $this->db->GetOne("select * from `@#_quanzi_tiezi` where `id`='{$id}'");
     if (!$tiezi) {
         _message("页面错误");
     }
     $dianji = $tiezi['dianji'] + 1;
     $this->db->Query("UPDATE `@#_quanzi_tiezi` SET `dianji`='{$dianji}' where `id`='{$id}'");
     $title = $tiezi['title'] . "_" . _cfg("web_name");
     $keywords = $tiezi['title'];
     $description = _strcut($tiezi['neirong'], 0, 250);
     $member = $this->db->GetOne("select * from `@#_member` where `uid`='{$tiezi['hueiyuan']}'");
     $quanzi = $this->db->GetOne("select * from `@#_quanzi` where `id` = '{$tiezi['qzid']}'");
     $num = 10;
     $total = $this->db->GetCount("select * from `@#_quanzi_hueifu` where `tzid` = '{$tiezi['id']}'");
     $page = System::load_sys_class('page');
     if (isset($_GET['p'])) {
         $pagenum = $_GET['p'];
     } else {
         $pagenum = 1;
     }
     $page->config($total, $num, $pagenum, "0");
     if ($pagenum > $page->page) {
         $pagenum = $page->page;
     }
     $hueifu = $this->db->GetPage("select * from `@#_quanzi_hueifu` WHERE tzid='{$tiezi['id']}' order by id DESC", array("num" => $num, "page" => $pagenum, "type" => 1, "cache" => 0));
     foreach ($hueifu as $key => $val) {
         $hueifu[$key]['hueifu'] = _htmtocode($hueifu[$key]['hueifu']);
     }
     include templates("group", "nei");
 }
Example #16
0
		$("html,body").animate({scrollTop:0},1500);
	});
	$("#btnFavorite,#addSiteFavorite").click(function(){
		var ctrl=(navigator.userAgent.toLowerCase()).indexOf('mac')!=-1?'Command/Cmd': 'CTRL';
		if(document.all){
			window.external.addFavorite('<?php 
echo G_WEB_PATH;
?>
','<?php 
echo _cfg("web_name");
?>
');
		}
		else if(window.sidebar){
		   window.sidebar.addPanel('<?php 
echo _cfg("web_name");
?>
','<?php 
echo G_WEB_PATH;
?>
', "");
		}else{ 
			alert('您可以通过快捷键' + ctrl + ' + D 加入到收藏夹');
		}
    });
	$("#divRighTool a").hover(		
		function(){
			$(this).addClass("Current");
		},
		function(){
			$(this).removeClass("Current");
Example #17
0
 public function findemailcheck()
 {
     $title = "通过邮箱找回密码";
     $enname = $this->segment(4);
     $name = _encrypt($this->segment(4), "DECODE");
     $info = $this->DB()->GetOne("SELECT * FROM `@#_member` WHERE `email` = '{$name}' LIMIT 1");
     if (!$info) {
         _message("未知错误!");
     }
     $emailurl = explode("@", $info['email']);
     if ($info['passcode'] == -1) {
         $passcode = _getcode(10);
         $passcode = $passcode['code'] . '|' . $passcode['time'];
         //验证码
         $urlcheckcode = _encrypt($info['email'] . "|" . $passcode);
         $url = WEB_PATH . '/member/finduser/findok/' . $urlcheckcode;
         $this->DB()->Query("UPDATE `@#_member` SET `passcode`='{$passcode}' where `uid`='{$info['uid']}'");
         $tit = _cfg("web_name") . "邮箱找回密码";
         $content = '<span>请在24小时内激活邮件</span>,点击连接激活邮件:<a href="' . WEB_PATH . '/member/finduser/findok/' . $urlcheckcode . '">';
         $content .= $url;
         $content .= '</a>';
         _sendemail($info['email'], '', $tit, $content);
     }
     include templates("user", "findemailcheck");
 }
        ?>
</em>已参与</span><span class="gray6 fl"><em><?php 
        echo $shop['zongrenshu'];
        ?>
</em>总需人次</span><span class="blue fr"><em><?php 
        echo $shop['zongrenshu'] - $shop['canyurenshu'];
        ?>
</em>剩余</span></dd></dl></li>
							<li><a href="<?php 
        echo WEB_PATH;
        ?>
/goods/<?php 
        echo $shop['id'];
        ?>
" target="_blank" class="u-now">立即<?php 
        echo _cfg('web_name_two');
        ?>
</a><a href="javascript:;" title="加入到购物车" class="u-cart"><s></s></a></li>
							<div class="Curbor_id" style="display:none;"><?php 
        echo $shop['id'];
        ?>
</div>
							<div class="Curbor_yunjiage" style="display:none;"><?php 
        echo $shop['yunjiage'];
        ?>
</div>
							<div class="Curbor_shenyu" style="display:none;"><?php 
        echo $shop['shenyurenshu'];
        ?>
</div>
						</ul>
Example #19
0
 private function addmoney_record($money = null, $data = null)
 {
     $uid = $this->members['uid'];
     $dingdancode = pay_get_dingdan_code('C');
     //订单号
     if (!is_array($this->pay_type)) {
         return 'not_pay';
     }
     $pay_type = $this->pay_type['pay_name'];
     $time = time();
     if (!empty($data)) {
         $scookies = $data;
     } else {
         $scookies = '0';
     }
     $score = $this->fufen;
     $query = $this->db->Query("INSERT INTO `@#_member_addmoney_record` (`uid`, `code`, `money`, `pay_type`, `status`,`time`,`score`,`scookies`) VALUES ('{$uid}', '{$dingdancode}', '{$money}', '{$pay_type}','未付款', '{$time}','{$score}','{$scookies}')");
     if ($query) {
         $this->db->Autocommit_commit();
     } else {
         $this->db->Autocommit_rollback();
         return false;
     }
     $pay_type = $this->pay_type;
     $paydb = System::load_app_class($pay_type['pay_class'], 'pay');
     $pay_type['pay_key'] = unserialize($pay_type['pay_key']);
     $config = array();
     $config['id'] = $pay_type['pay_key']['id']['val'];
     //支付合作ID
     $config['key'] = $pay_type['pay_key']['key']['val'];
     //支付KEY
     $config['shouname'] = _cfg('web_name');
     //收款方
     $config['title'] = _cfg('web_name');
     //付款项目
     $config['money'] = $money;
     //付款金额$money
     $config['type'] = $pay_type['pay_type'];
     //支付方式:	即时到帐1   中介担保2
     $config['ReturnUrl'] = G_WEB_PATH . '/index.php/pay/' . $pay_type['pay_class'] . '_url/qiantai/';
     //前台回调
     $config['NotifyUrl'] = G_WEB_PATH . '/index.php/pay/' . $pay_type['pay_class'] . '_url/houtai/';
     //后台回调
     $config['pay_bank'] = $this->pay_type['pay_bank'];
     $config['code'] = $dingdancode;
     $config['pay_type_data'] = $pay_type['pay_key'];
     $paydb->config($config);
     $paydb->send_pay();
     return true;
 }
			<div class="hackbox"></div>
			<?php 
    }
}
$ln++;
unset($ln);
?>
            <?php 
if (defined('G_IN_ADMIN')) {
    echo '<div style="padding:8px;background-color:#F93; color:#fff;border:1px solid #f60;text-align:center"><b>This Tag</b></div>';
}
?>
		</div>
		<div class="help-contact">
			<p>如果不能在帮助内容中找到答案,或者您有其他建议、投诉,您还可以:</p>
			<ul>
				<li class="CustomerCon"><a href="http://wpa.qq.com/msgrd?v=3&uin=<?php 
echo _cfg('qq');
?>
&site=qq&menu=yes" target="_blank" class="Customer"><b></b>在线客服</a></li>
				<li>电话客服热线(免长途费)</li>
				<li class="tel"><span><?php 
echo _cfg('cell');
?>
</span></li>
			</ul>
		</div>
	</div>
</div>
<?php 
include templates("index", "footer");
Example #21
0
		checkcode.onclick=function(){
				this.src=src+'/'+new Date().getTime();
	}
   <?php 
}
?>
		
}

$(document).ready(function(){$.focusblur("#input-u");$.focusblur("#input-p");$.focusblur("#input-c");});

function ajaxsubmit(){
		var name=document.getElementById('form').username.value;
		var pass=document.getElementById('form').password.value;
		<?php 
if (_cfg("web_off")) {
    ?>
		var codes=document.getElementById('form').code.value;
	    <?php 
} else {
    ?>
		var codes = '';
		<?php 
}
?>
		//document.getElementById('form').submit();
		$.ajaxSetup({
			async : false
		});				
		$.ajax({
			   "url":window.location.href,
Example #22
0
 function produce()
 {
     //carregando e renderizando cada view indicada
     $o = '';
     foreach ($this->views as $v) {
         $o .= $this->decode(file_get_contents($v));
     }
     if (_cfg('statusBar')) {
         $o .= $this->statusBar(true);
     }
     exit($o);
 }
		<div class="qqTitle">
			<span class="groupt"><?php 
echo _cfg('web_name_two');
?>
<b>QQ</b>群</span>
			<span>为打造更具公平、透明的<?php 
echo _cfg('web_name_two');
?>
平台,<?php 
echo _cfg('web_name_two');
?>
特成立各地QQ交流群(可在选择框查找本地群),欢迎广大云友加入。<br>另外,<?php 
echo _cfg('web_name_two');
?>
正在招募各地群主加盟,也可自建群,具体待遇和要求请咨询客服QQ:<?php 
echo _cfg("qq");
?>
</span>
		</div>
		<div id="listTopContents" class="qqList"><p>直属群</p>
		<ul>
		<?php 
$ln = 1;
if (is_array($lists2)) {
    foreach ($lists2 as $v) {
        ?>
		<li><dt><img border="0" alt="<?php 
        echo $v['name'];
        ?>
" src="<?php 
        echo G_TEMPLATES_IMAGE;
Example #24
0
/**
*	发送用户获奖邮箱
*	email  		@用户邮箱地址
*   uid    		@用户的ID
*	usernname	@用户名称
*	code  		@中奖号码
*   shoptitle	@商品名称
*/
function send_email_code($email = null, $username = null, $uid = null, $code = null, $shoptitle = null)
{
    $db = System::load_sys_class('model');
    $template = $db->GetOne("select * from `@#_caches` where `key` = 'template_email_shop'");
    if (!$template) {
        $template = array();
        $template['value'] = "恭喜您:{$username},你在" . _cfg("web_name") . "够买的商品{$shoptitle}已中奖,中奖码是:" . $code;
    } else {
        $template['value'] = str_ireplace("{用户名}", $username, $template['value']);
        $template['value'] = str_ireplace("{商品名称}", $shoptitle, $template['value']);
        $template['value'] = str_ireplace("{中奖码}", $code, $template['value']);
    }
    $title = "恭喜您!!! 您在" . _cfg("web_name") . "够买的商品中奖了!!!";
    return _sendemail($email, '', $title, $template['value']);
}
	<div class="u-ft-nav" id="fLoginInfo">
	    <span><a href="<?php 
echo WEB_PATH;
?>
/mobile/mobile/">首页</a><b></b></span>
		<span><a href="<?php 
echo WEB_PATH;
?>
/mobile/mobile/about">新手指南</a><b></b></span>
		<span><a href="<?php 
echo WEB_PATH;
?>
/mobile/user/login">登录</a><b></b></span>
		<span><a href="<?php 
echo WEB_PATH;
?>
/mobile/user/register">注册</a></span>
	</div>
	<p class="m-ftA"><a href="<?php 
echo WEB_PATH;
?>
/mobile/mobile">触屏版</a><a href="<?php 
echo G_WEB_PATH;
?>
" target="_blank">电脑版</a></p>
	<p class="grayc">客服热线<span class="orange">023-67898742</span><?php 
echo _cfg('web_copyright');
?>
</p>
	<a id="btnTop" href="javascript:;" class="z-top" style="display:none;"><b class="z-arrow"></b></a>
</footer>
Example #26
0
<?php

/**
 * The index.php (required) serves as the front controller for the requested page,
 * initializing the base resources needed to run the page
 */
_cfg('layoutMode', true);
# Normally this is not needed here if you configured it in /inc/config.php.
// _cfg('layoutName', 'mobile'); # particular layout file name can be given like this
echo _cfg('web_name_two');
?>
</title>
<meta name="keywords" content="<?php 
if (isset($keywords)) {
    echo $keywords;
} else {
    echo _cfg("web_key");
}
?>
" />
<meta name="description" content="<?php 
if (isset($description)) {
    echo $description;
} else {
    echo _cfg("web_des");
}
?>
" />
  
    <link rel="stylesheet" type="text/css" href="<?php 
echo G_WEB_PATH;
?>
/app/css/Comm.css?date=20140731" />
<!--[if IE 6]>
    <script type="text/javascript" src="http://skin.1yyg.com/js/iepng.js"></script>
    <script type="text/javascript">
        EvPNG.fix('span.Hicon,a.F-icon-guest s,a.F-icon-gray s,s.u-banner-close,.F-number-l,.F-number-r,.M-nav-help a s,.g-good-faith li s,a.pre,a.next,.u-topic-icon i,.u-topic-icon s,.M-security a s,.roll_close a');
    </script>
<![endif]-->
     <link rel="stylesheet" type="text/css" href="<?php 
Example #28
0
 public function jflist()
 {
     $webname = $this->_cfg['web_name'];
     $title = "夺宝币购物_" . _cfg("web_name");
     $key = "夺宝币购物";
     include templates("mobile/index", "jflist");
 }
Example #29
0
 public function detail()
 {
     $member = $this->userinfo;
     $sd_id = abs(intval($this->segment(4)));
     $shaidan = $this->db->GetOne("select * from `@#_shaidan` where `sd_id`='{$sd_id}'");
     $goods = $this->db->GetOne("select sid from `@#_shoplist` where `id` = '{$shaidan['sd_shopid']}'");
     $goods = $this->db->GetOne("select id,qishu,money,q_uid,maxqishu,thumb,title from `@#_shoplist` where `sid` = '{$goods['sid']}' order by `qishu` DESC");
     if (isset($_POST['submit'])) {
         $sdhf_syzm = _getcookie("checkcode");
         $sdhf_pyzm = isset($_POST['sdhf_code']) ? strtoupper($_POST['sdhf_code']) : '';
         $sdhf_id = $shaidan['sd_id'];
         $sdhf_userid = $member['uid'];
         $sdhf_content = $_POST['sdhf_content'];
         $sdhf_time = time();
         $sdhf_username = _htmtocode(get_user_name($member));
         $sdhf_img = _htmtocode($member['img']);
         if (empty($sdhf_content)) {
             _message("页面错误");
         }
         if (empty($sdhf_pyzm)) {
             _message("请输入验证码");
         }
         if ($sdhf_syzm != md5($sdhf_pyzm)) {
             _message("验证码不正确");
         }
         $this->db->Query("INSERT INTO `@#_shaidan_hueifu`(`sdhf_id`,`sdhf_userid`,`sdhf_content`,`sdhf_time`,`sdhf_username`,`sdhf_img`)VALUES\n\t\t\t('{$sdhf_id}','{$sdhf_userid}','{$sdhf_content}','{$sdhf_time}','{$sdhf_username}','{$sdhf_img}')");
         $sd_ping = $shaidan['sd_ping'] + 1;
         $this->db->Query("UPDATE `@#_shaidan` SET sd_ping='{$sd_ping}' where sd_id='{$shaidan['sd_id']}'");
         _message("评论成功", WEB_PATH . "/go/shaidan/detail/" . $sd_id);
     }
     $shaidannew = $this->db->GetList("select * from `@#_shaidan` order by `sd_id` DESC limit 5");
     $shaidan_hueifu = $this->db->GetList("select * from `@#_shaidan_hueifu` where `sdhf_id`='{$sd_id}' LIMIT 10");
     foreach ($shaidan_hueifu as $k => $v) {
         $shaidan_hueifu[$k]['sdhf_content'] = _htmtocode($shaidan_hueifu[$k]['sdhf_content']);
     }
     if (!$shaidan) {
         _message("页面错误");
     }
     $substr = substr($shaidan['sd_photolist'], 0, -1);
     $sd_photolist = explode(";", $substr);
     $title = $shaidan['sd_title'] . "_" . _cfg("web_name");
     $keywords = $shaidan['sd_title'];
     $description = $shaidan['sd_title'];
     include templates("index", "detail");
 }
Example #30
0
 public function mobilecheck()
 {
     $title = "手机认证 - " . _cfg("web_name");
     $check_code = _encrypt($this->segment(4), "DECODE");
     $check_code = @unserialize($check_code);
     if (!$check_code || !isset($check_code['name']) || !isset($check_code['time'])) {
         _message("参数不正确或者验证已过期!", WEB_PATH . '/register');
     }
     $name = $check_code['name'];
     $member = $this->db->GetOne("SELECT * FROM `@#_member` WHERE `reg_key` = '{$check_code['name']}' and `time` = '{$check_code['time']}' LIMIT 1");
     if (!$member) {
         _message("未知的来源!", WEB_PATH . '/register');
     }
     if ($member['mobilecode'] == '1') {
         _message("该账号验证成功", WEB_PATH . "/login");
     }
     if ($member['mobilecode'] == '-1') {
         $sendok = send_mobile_reg_code($member['reg_key'], $member['uid']);
         if ($sendok[0] != 1) {
             _message($sendok[1]);
         }
         header("location:" . WEB_PATH . "/member/user/mobilecheck/" . $this->segment(4));
         exit;
     }
     if (isset($_POST['submit'])) {
         $checkcodes = isset($_POST['checkcode']) ? $_POST['checkcode'] : _message("参数不正确!");
         if (strlen($checkcodes) != 6) {
             _message("验证码输入不正确!");
         }
         $usercode = explode("|", $member['mobilecode']);
         if ($checkcodes != $usercode[0]) {
             _message("验证码输入不正确!");
         }
         $fili_cfg = System::load_app_config("user_fufen");
         if ($member['yaoqing']) {
             $time = time();
             $yaoqinguid = $member['yaoqing'];
             //福分、经验添加
             if ($fili_cfg['f_visituser']) {
                 $this->db->Query("insert into `@#_member_account` (`uid`,`type`,`pay`,`content`,`money`,`time`) values ('{$yaoqinguid}','1','福分','邀请好友奖励','{$fili_cfg['f_visituser']}','{$time}')");
             }
             $this->db->Query("UPDATE `@#_member` SET `score`=`score`+'{$fili_cfg['f_visituser']}',`jingyan`=`jingyan`+'{$fili_cfg['z_visituser']}' where uid='{$yaoqinguid}'");
         }
         $check = $this->db->Query("UPDATE `@#_member` SET mobilecode='1',mobile='{$member['reg_key']}' where `uid`='{$member['uid']}'");
         _message("验证成功", WEB_PATH . "/login");
     }
     $enname = substr($name, 0, 3) . '****' . substr($name, 7, 10);
     $time = 120;
     $namestr = $this->segment(4);
     include templates("user", "mobilecheck");
 }