Example #1
0
/**
 * @version        $Id: install.inc.php 1 13:41 2010年7月26日Z tianya $
 * @package        DedeCMS.Install
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
function RunMagicQuotes(&$str)
{
    if (!get_magic_quotes_gpc()) {
        if (is_array($str)) {
            foreach ($str as $key => $val) {
                $str[$key] = RunMagicQuotes($val);
            }
        } else {
            $str = addslashes($str);
        }
    }
    return $str;
}
function RunMagicQuotes(&$str)
{
	global $needFilter,$cfg_notallowstr,$cfg_replacestr;
	if(!get_magic_quotes_gpc())
	{
		 if( is_array($str) ) {
			  foreach($str as $key => $val) $str[$key] = RunMagicQuotes($val);
		 }else{
			  if($needFilter) FilterNotSafeString($str);
			  $str = addslashes($str);
		 }
	}
	else
	{
		 if($needFilter) {
		 	  $str = stripslashes($str);
		 	  FilterNotSafeString($str);
		 	  $str = addslashes($str);
		 }
	}
	return $str;
}
Example #3
0
$verMsg = ' V5.7 GBKSP1';
$s_lang = 'gb2312';
$dfDbname = 'dedecmsv57gbksp1';
$errmsg = '';
$install_demo_name = 'dedev57demo.txt';
$insLockfile = dirname(__FILE__) . '/install_lock.txt';
$moduleCacheFile = dirname(__FILE__) . '/modules.tmp.inc';
define('DEDEINC', dirname(__FILE__) . '/../include');
define('DEDEDATA', dirname(__FILE__) . '/../data');
define('DEDEROOT', preg_replace("#[\\\\\\/]install#", '', dirname(__FILE__)));
header("Content-Type: text/html; charset={$s_lang}");
require_once DEDEROOT . '/install/install.inc.php';
require_once DEDEINC . '/zip.class.php';
foreach (array('_GET', '_POST', '_COOKIE') as $_request) {
    foreach (${$_request} as $_k => $_v) {
        ${$_k} = RunMagicQuotes($_v);
    }
}
require_once DEDEINC . '/common.func.php';
if (file_exists($insLockfile)) {
    exit(" 程序已运行安装,如果你确定要重新安装,请先从FTP中删除 install/install_lock.txt!");
}
if (empty($step)) {
    $step = 1;
}
/*------------------------
使用协议书
function _1_Agreement()
------------------------*/
if ($step == 1) {
    include './templates/step-1.html';