⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 runwizard.inc.php

📁 极限网络智能办公系统 Office Automation V3.0官方100%源代码.
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<?php

/*
	[Discuz!] (C)2001-2007 Comsenz Inc.
	This is NOT a freeware, use is subject to license terms

	$RCSfile: runwizard.inc.php,v $
	$Revision: 1.21.2.3 $
	$Date: 2007/03/21 15:52:03 $
*/


if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
        exit('Access Denied');
}


$step = in_array($step, array(1, 2, 3, 4)) ? $step : 1;
$runwizardhistory = array();
$runwizardfile = DISCUZ_ROOT.'./forumdata/logs/runwizardlog.php';
if($fp = @fopen($runwizardfile, 'r')) {
	$runwizardhistory = @unserialize(fread($fp, 99999));
	fclose($fp);
}

cpheader();
$runwizardwarnning = empty($runwizard) ? '<li>'.$lang['runwizard_cover_old'].'</li>' : '';
$listchecked[$step] = ' style="font-weight: 800"';

shownav('menu_runwizard');

?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableborder">
<tr class="header"><td><?=$lang['tips']?></td></tr>
<tr class="altbg1"><td><ul><li><?=$lang['runwizard_help']?></li></ul><ul>
<li><?=$lang['runwizard_step_guide']?></li>
<ul>
<li<?=$listchecked[1]?>><?=$lang['runwizard_step_1']?></li>
<li<?=$listchecked[2]?>><?=$lang['runwizard_step_2']?></li>
<li<?=$listchecked[3]?>><?=$lang['runwizard_step_3']?></li>
<li<?=$listchecked[4]?>><?=$lang['runwizard_step_4']?></li></ul>
<?=$runwizardwarnning?>
</ul>
</td></tr></table>
<?

if($step == 1) {
	$sizecheckedid = isset($runwizardhistory['step1']['size']) ?  $runwizardhistory['step1']['size'] : 1;
	$sizechecked   = array($sizecheckedid => ' checked');
	$safecheckedid = isset($runwizardhistory['step1']['safe']) ?  $runwizardhistory['step1']['safe'] : 0;
	$safechecked   = array($safecheckedid => 'checked');
	$funccheckedid = isset($runwizardhistory['step1']['func']) ?  $runwizardhistory['step1']['func'] : 1;
	$funcchecked   = array($funccheckedid => 'checked');

?>
<br><form method="post" action="admincp.php?action=runwizard&step=2">
<input type="hidden" name="formhash" value="<?=FORMHASH?>">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableborder">
<tr class="header"><td><?=$lang['menu_runwizard']?> - <?=$lang['runwizard_step_menu_1']?></td></tr>
<tr><td class="altbg1">
<ul>
<br><b><?=$lang['runwizard_forum_scope']?></b>
<ul>
<input class="radio" type="radio" name="size" value="0"<?=$sizechecked[0]?>> <?=$lang['runwizard_forum_scope_small']?><br>
<input class="radio" type="radio" name="size" value="1"<?=$sizechecked[1]?>> <?=$lang['runwizard_forum_scope_midding']?><br>
<input class="radio" type="radio" name="size" value="2"<?=$sizechecked[2]?>> <?=$lang['runwizard_forum_scope_big']?><br>
</ul><br />
<b><?=$lang['runwizard_security']?></b>
<ul>
<input class="radio" type="radio" name="safe" value="2"<?=$safechecked[2]?>> <?=$lang['runwizard_security_high']?><br>
<input class="radio" type="radio" name="safe" value="1"<?=$safechecked[1]?>> <?=$lang['runwizard_security_midding']?><br>
<input class="radio" type="radio" name="safe" value="0"<?=$safechecked[0]?>> <?=$lang['runwizard_security_low']?><br>
</ul><br />
<b><?=$lang['runwizard_hobby']?></b>
<ul>
<input class="radio" type="radio" name="func" value="0"<?=$funcchecked[0]?>> <?=$lang['runwizard_hobby_concision']?><br>
<input class="radio" type="radio" name="func" value="1"<?=$funcchecked[1]?>> <?=$lang['runwizard_hobby_commonly']?><br>
<input class="radio" type="radio" name="func" value="2"<?=$funcchecked[2]?>> <?=$lang['runwizard_hobby_abundance']?><br>
</ul></ul><br><br></td></tr></table><br>
<center><input class="button" type="submit" name="step1submit" value=" <?=$lang['next']?> "></center>
</form>
<?

	$db->query("DELETE FROM {$tablepre}settings WHERE variable='runwizard'");
	updatecache('settings');

} elseif($step == 2) {
	if(submitcheck('step1submit')) {
		$runwizardhistory['step1']['size'] = $size;
		$runwizardhistory['step1']['safe'] = $safe;
		$runwizardhistory['step1']['func'] = $func;
		saverunwizardhistory();
	}
	$settings = &$_DCACHE['settings'];
	$settings['bbname']   = empty($runwizard) && $runwizardhistory['step2']['bbname'] ? $runwizardhistory['step2']['bbname'] : $settings['bbname'];
	$settings['sitename'] = empty($runwizard) && $runwizardhistory['step2']['sitename'] ? $runwizardhistory['step2']['sitename'] : $settings['sitename'];
	$settings['siteurl']  = empty($runwizard) && $runwizardhistory['step2']['siteurl'] ? $runwizardhistory['step2']['siteurl'] : $settings['siteurl'];

?>
<br><form method="post" action="admincp.php?action=runwizard&step=3">
<input type="hidden" name="formhash" value="<?=FORMHASH?>">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableborder">
<tr class="header"><td colspan="2"><?=$lang['menu_runwizard']?> - <?=$lang['runwizard_step_menu_2']?></td></tr>
<?

	showsetting('settings_bbname', 'settingsnew[bbname]', $settings['bbname'], 'text');
	showsetting('settings_sitename', 'settingsnew[sitename]', $settings['sitename'], 'text');
	showsetting('settings_siteurl', 'settingsnew[siteurl]', $settings['siteurl'], 'text');

?>
</table><br>
<center><input class="button" type="button" name="step2submit" value=" <?=$lang['prev']?> " onclick="history.back();"> <input class="button" type="submit" name="step2submit" value=" <?=$lang['next']?> "></center>
</form>
<?

} elseif($step == 3) {
	if(submitcheck('step2submit')) {
		$runwizardhistory['step2']['bbname']   = $settingsnew['bbname'];
		$runwizardhistory['step2']['sitename'] = $settingsnew['sitename'];
		$runwizardhistory['step2']['siteurl']  = $settingsnew['siteurl'];
		saverunwizardhistory();
	}

?>
<br><form method="post" action="admincp.php?action=runwizard&step=4">
<input type="hidden" name="formhash" value="<?=FORMHASH?>">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableborder">
<tr class="header"><td colspan="2"><?=$lang['menu_runwizard']?> - <?=$lang['runwizard_step_menu_3']?></td></tr>
<tr><td class="altbg1" colspan="2"><br>
<style type="text/css">
.ulforum li{
	margin:6px;
}
</style>
<ul class="ulforum">
<li><?=$lang['runwizard_cat']?> 1: <input type="text" name="newcat[0]" size="30" value="<?=$runwizardhistory['step3']['cates'][0]?>"></li><ul>
<li><?=$lang['runwizard_forum']?> 1: <input type="text" name="newforum[0][]"" size="30" value="<?=$runwizardhistory['step3']['forums'][0][0]?>"></li>
<li><?=$lang['runwizard_forum']?> 2: <input type="text" name="newforum[0][]"" size="30" value="<?=$runwizardhistory['step3']['forums'][0][1]?>"></li>
<li><?=$lang['runwizard_forum']?> 3: <input type="text" name="newforum[0][]"" size="30" value="<?=$runwizardhistory['step3']['forums'][0][2]?>"></li>
</ul></ul>
<ul class="ulforum">
<li><?=$lang['runwizard_cat']?> 2: <input type="text" name="newcat[1]" size="30" value="<?=$runwizardhistory['step3']['cates'][1]?>"></li><ul>
<li><?=$lang['runwizard_forum']?> 4: <input type="text" name="newforum[1][]"" size="30" value="<?=$runwizardhistory['step3']['forums'][1][0]?>"></li>
<li><?=$lang['runwizard_forum']?> 5: <input type="text" name="newforum[1][]"" size="30" value="<?=$runwizardhistory['step3']['forums'][1][1]?>"></li>
<li><?=$lang['runwizard_forum']?> 6: <input type="text" name="newforum[1][]"" size="30" value="<?=$runwizardhistory['step3']['forums'][1][2]?>"></li>
</ul></ul>
<ul class="ulforum">
<li><?=$lang['runwizard_cat']?> 3: <input type="text" name="newcat[2]" size="30" value="<?=$runwizardhistory['step3']['cates'][2]?>"></li><ul>
<li><?=$lang['runwizard_forum']?> 7: <input type="text" name="newforum[2][]"" size="30" value="<?=$runwizardhistory['step3']['forums'][2][0]?>"></li>
<li><?=$lang['runwizard_forum']?> 8: <input type="text" name="newforum[2][]"" size="30" value="<?=$runwizardhistory['step3']['forums'][2][1]?>"></li>
<li><?=$lang['runwizard_forum']?> 9: <input type="text" name="newforum[2][]"" size="30" value="<?=$runwizardhistory['step3']['forums'][2][2]?>"></li>
</ul></ul><br><br>
</td></tr></table>
<br><center><input class="button" type="button" name="step2submit" value=" <?=$lang['prev']?> " onclick="history.back();"> <input class="button" type="submit" name="step3submit" value=" <?=$lang['next']?> "> </center>
</form>
<?

} elseif($step == 4) {
	if(submitcheck('step3submit')) {
		foreach($newcat as $k=>$catename) {
			if(!$catename) {
				unset($newcat[$k]);
				unset($newforum[$k]);
			} else {
				foreach($newforum[$k] as $k2=>$forumname) {
					if(!$forumname) {
						unset($newforum[$k][$k2]);
					}
				}
			}
		}

		$runwizardhistory['step3']['cates']   = $newcat ? $newcat : array();
		$runwizardhistory['step3']['forums']   = $newforum ? $newforum : array();

		saverunwizardhistory();
	}

?>
<br />
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableborder">
<tr class="header"><td colspan="2"><?=$lang['menu_runwizard']?> - <?=$lang['runwizard_step_menu_4']?></td></tr>
<tr><td class="altbg1" colspan="2">
<?

	if($confirm != 'yes') {

?>
<br /><ul>
<?=$lang['runwizard_forum_initialization']?><br />
<hr width="80%" align="left" noshade style="height:1px;"><br />
<b><?=$lang['runwizard_forum_scope']?></b> <?=$lang['runwizard_size_'.$runwizardhistory['step1']['size']]?><br /><br />
<b><?=$lang['runwizard_security']?></b> <?=$lang['runwizard_safe_'.$runwizardhistory['step1']['safe']]?><br /><br />
<b><?=$lang['runwizard_hobby']?></b> <?=$lang['runwizard_func_'.$runwizardhistory['step1']['func']]?><br /><br />
<b><?=$lang['settings_bbname']?></b> <?=$runwizardhistory['step2']['bbname']?><br /><br />
<b><?=$lang['settings_sitename']?></b> <?=$runwizardhistory['step2']['sitename']?><br /><br />
<b><?=$lang['settings_siteurl']?></b> <?=$runwizardhistory['step2']['siteurl']?><br /><br />
<b><?=$lang['runwizard_forum_add']?></b>
<?

	if($runwizardhistory['step3']['cates']) {
		echo '<br><br>';
		foreach($runwizardhistory['step3']['cates'] as $id=>$catename) {
			echo '<ul><li>'.$catename.'</li><ul>';
			foreach($runwizardhistory['step3']['forums'][$id] as $forumname) {
				echo '<li>'.$forumname.'</li>';
			}
			echo '</ul></ul>';

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -