Пример #1
0
 /**
  * 手机触屏配置
  */
 public function setting()
 {
     if (isset($GLOBALS['submit'])) {
         $setting = array_map('remove_xss', $GLOBALS['form']);
         $setting = serialize($setting);
         $this->db->update('setting', array('data' => $setting), array('m' => 'mobile', 'keyid' => 'configs'));
         load_function('admin');
         set_web_config('SUPPORT_MOBILE', intval($GLOBALS['support_mobile']));
         MSG(L('operation success'), HTTP_REFERER);
     } else {
         $show_formjs = 1;
         load_class('qrcode');
         if (is_writable(ATTACHMENT_ROOT . "qr_image/mobile.png")) {
             $iswrite = 1;
             WUZHI_qrcode::png(WEBURL . 'index.php', ATTACHMENT_ROOT . "qr_image/mobile.png", 'L', 4, 0);
         } else {
             $iswrite = 0;
         }
         $r = $this->db->get_one('setting', array('m' => 'mobile', 'keyid' => 'configs'));
         $setting = unserialize($r['data']);
         include $this->template('setting');
     }
 }
Пример #2
0
<?php

define('WWW_ROOT', substr(dirname(__FILE__), 0, -4) . '/');
require '../configs/web_config.php';
require COREFRAME_ROOT . 'core.php';
load_class('qrcode');
$str = $GLOBALS['str'];
WUZHI_qrcode::png($str, false, 'L', 4, 0);