Browse Source

错误修复

tags/6.2.1
tianya 1 year ago
parent
commit
83cb46a671
4 changed files with 3 additions and 43 deletions
  1. +1
    -0
      src/admin/api.php
  2. +0
    -42
      src/apps/qrcode.php
  3. +1
    -1
      src/system/common.inc.php
  4. +1
    -0
      src/user/api.php

+ 1
- 0
src/admin/api.php View File

@@ -10,6 +10,7 @@
*/
define('AJAXLOGIN', TRUE);
define('DEDEADMIN', str_replace("\\", '/', dirname(__FILE__)));
$cfg_NotPrintHead = 'Y';
require_once(DEDEADMIN.'/../system/common.inc.php');
require_once(DEDEINC.'/userlogin.class.php');
AjaxHead();


+ 0
- 42
src/apps/qrcode.php View File

@@ -1,42 +0,0 @@
<?php
/**
* 二维码生成
*
* @version $id:qrcode.php$
* @package DedeBIZ.Site
* @copyright Copyright (c) 2022 DedeBIZ.COM
* @license https://www.dedebiz.com/license
* @link https://www.dedebiz.com
*/
$cfg_NotPrintHead = 'Y';
require_once(dirname(__FILE__).'/../system/common.inc.php');
require_once(DEDEINC.'/libraries/qrcode.class.php');
$action = isset($action) ? $action : '';
$type = isset($type) ? RemoveXSS(HtmlReplace($type, 3)) : '';
$id = (isset($id) && is_numeric($id)) ? $id : 0;
if (!in_array($type, array('list', 'arc', 'index'))) $url = "https://www.dedebiz.com";
if ($action == 'get_qrcode') {
if ($type == 'arc') {
$url = $cfg_basehost.$cfg_plus_dir.'/view.php?aid='.$id;
} elseif ($type == 'list') {
$url = $cfg_basehost.$cfg_plus_dir.'/list.php?tid='.$id;
}
if ($id == 0) $url = "https://www.dedebiz.com";
if ($type == 'index') $url = $cfg_basehost.$cfg_plus_dir.'/index.php';
header("Content-Type: image/png");
$params = array();
$params['data'] = $url;
$params['size'] = 6;
$qrcode = new DedeQrcode;
$qrcode->generate($params);
} else {
header("charset={$cfg_soft_lang}");
$dtp = new DedeTemplate();
$tplfile = DEDETEMPLATE.'/plus/qrcode.htm';
$dtp->LoadTemplate($tplfile);
$dtp->SetVar('id', $id);
$dtp->SetVar('type', $type);
$dtp->Display();
exit();
}
?>

+ 1
- 1
src/system/common.inc.php View File

@@ -226,7 +226,7 @@ if (isset($GLOBALS['TotalResult'])) {
}
if (!isset($cfg_NotPrintHead)) {
if (PHP_SAPI != 'cli') {
header("charset={$cfg_soft_lang}");
header("Content-Type: text/html; charset={$cfg_soft_lang}");
}
}
//自动加载类库处理


+ 1
- 0
src/user/api.php View File

@@ -7,6 +7,7 @@
* @link https://www.dedebiz.com
*/
define('AJAXLOGIN', TRUE);
$cfg_NotPrintHead = 'Y';
require_once(dirname(__FILE__)."/config.php");
AjaxHead();
$action = isset($action)? $action : '';


Loading…
Cancel
Save