<!--<?php
include_once PrintEot('left');
if(!$action){print <<<EOT
-->
<ul class="nav3">
<li><a href="#" class="two">风格列表</a></li>
<li><a href="$basename&action=add">添加风格</a></li>
</ul>
<div class="c"></div>

<h3>css设置</h3>
<form action="$basename" method="post">
<input type="hidden" name="action" value="setcss" />
<table cellspacing="0" cellpadding="0" width="100%">
	<tr class="tr3">
		<td width="30%">css显示方式设置</td>
		<td>
			<input type="radio" value="0" name="showcss" $showcss_N>直接 html 显示
			<input type="radio" value="1" name="showcss" $showcss_Y>以 link 方式外部引用样式
		</td>
	</tr>
</table>
<center style="margin-top:10px">
<input type="submit" class="btn" value="提 交"></center></form><br />
<form action="$basename" method="post">
<input type="hidden" name="action" value="listedit" />
<h2>风格列表</h2>
<table cellspacing="0" cellpadding="0" width="100%">
<tr class="tr3 tac">
	<td width="10%">ID</td>
	<td width="*">风格文件名</td>
	<td width="*">自定义风格名</td>
	<td width="10%">开启</td>
	<td width="10%">默认</td>
	<td width="10%" class="tal">编辑</td>
	<td width="10%" class="tal">删除</td>
</tr>
<!--
EOT;
$i=0;
foreach($allstyles as $key => $value){
$i++;
$checked = $value[1] == '1' ? "checked=CHECKED" : "";
$disabled = ($value[1] == '1' || $key == 'wind') ? '' : "disabled=true";
$rdchecked = $db_defaultstyle == $key ? "checked=CHECKED" : "";
$j_url = EncodeUrl("$basename&action=del&sid=$key");
print <<<EOT
-->
<tr class="tr3" align="center">
	<td>$i</td>
	<td>$key</td>
	<td><input type="text" class="input" name="customname[$key]" value="$value[0]"></td>
	<td>
<!--
EOT;
if($key == 'wind'){print<<<EOT
-->
<input type="hidden" name="ifopen[$key]" value="1">
<!--
EOT;
}else{print<<<EOT
-->
<input type="checkbox" $checked name="ifopen[$key]" value="1">
<!--
EOT;
}print<<<EOT
-->
	</td>
	<td><input type="radio" name="defaultstyle" value="$key" $disabled $rdchecked></td>
	<td><a class="fourm-two" href="$basename&action=edit&sid=$key" title="编辑"><span class="edit"></span></a></td>
	<td>
<!--
EOT;
if($key!='wind'){print <<<EOT
-->
	<a class="fourm-two" title="删除" href="$j_url"><span class="del"></span></a>
<!--
EOT;
}print <<<EOT
-->
	</td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table><center style="margin-top:10px">
<input type="submit" class="btn" value="提 交"></center></form><br />
<!--
EOT;
}elseif($action=='edit' || $action=='add'){print <<<EOT
-->
<style>
.menu{position:absolute;background:#fff url($imgpath/$stylepath/menubg.gif) center top repeat-x;border:1px solid $headborder;}
.menu .bor{padding-bottom:8px;*padding-bottom:0px;_padding-bottom:0px;border:5px solid $headborder;}
.menu li,.menu ul{padding:0; margin:0;}
.menu td{line-height:20px;}
.menu li{list-style:none;}
.menu a{display:block;padding:3px 15px;}
.menu ul.ul1 li a{display:inline;padding:0;}
.pad{padding-bottom:8px;*padding-bottom:0px;}
.menu .ul2{width:170px;padding:8px;}
.menu .ul2 li{float: left; width: 7em;line-height: 24px;height: 24px; overflow: hidden;border-bottom: 1px solid $tdcolor;}
.menu .ul2 li:hover{border-bottom: 1px solid $tablecolor;}
.menu .ul2 li a{padding:3px 5px;}
.menu .ul2 li a:hover{text-decoration:none;background:$forumcolorone;}
.menu h2 a{font-size:1.0em;color:#008ef1;height:20px;line-height:20px;width:550px;}
.menu .ul3{width:600px;padding:6px;clear:both;}
.menu .ul3 li{float:left;line-height:20px;*word-wrap:normal;*white-space:nowrap;display:inline;}
.menu .ul3 a{float:left;}
.menu .ul3 li a:hover{color:$tablecolor;}

.color_input{float:left;border:1px solid #fff;height:19px;width:111px;}
.color_image{float:left;padding-right:1px;padding-top:1px}
</style>
<script type="text/javascript" language="JavaScript">
function findPosX(obj) {
	var curleft = 0;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	} else if (obj.x) {
		curleft += obj.x;
	}
	return curleft - getLeft();
}
function findPosY(obj) {
	var curtop = 0;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	} else if (obj.y) {
		curtop += obj.y;
	}
	return curtop - getTop();
}
function pickReback(obj,color){
	if (typeof obj == 'string') {
		obj = getObj(obj);
	}
	obj.style.color = color;
}
</script>
<script type="text/javascript" language="JavaScript" src="js/global.js"></script>
<script type="text/javascript" language="JavaScript" src="js/color_picker.js"></script>
<ul class="nav3">
<li><a href="$basename">风格列表</a></li>
<!--
EOT;
if($action=='add'){ print <<<EOT
-->
<li><a href="#" class="two">添加风格</a></li>
<!--
EOT;
}else{ print <<<EOT
-->
<li><a href="$basename&action=add">添加风格</a></li>
<li><a href="#" class="two">编辑风格</a></li>
<!--
EOT;
}print <<<EOT
-->
</ul>
<div class="c"></div>

<form action="$basename" method="post">
<input type="hidden" name="action" value="$action" />
<input type="hidden" name="step" value="3" />
<h2><b>风格核心文件编辑</b></h2>
<table cellspacing="0" cellpadding="0" width="100%">
<input type="hidden" name="sid" value="$sid" />
<tr class="tr3"><td width="50%">编辑的风格名称</td><td>$sid</td></tr>
<tr class="tr3">
<td>此风格在image目录下的文件夹名称:<br ／>(请不要任意修改,如果需要请先手动修改image下的目录名)</td>
<td><input value="$stylepath" class="input" name="setting[0]" /></td>
</tr>
<tr class="tr3"><td>此风格在template目录下的风格文件夹名称:</td>
<td><input value="$tplpath" class="input" name="setting[1]" /></td>
</tr>
<tr><td class="tr4" colspan="2">整体风格设置</td></tr>
<tr class="tr3">
<td>表格内部样式:</td>
<td><input type="radio" value="1" name="setting[2]" $yes_Y /> 竖线风格
<input type="radio" value="0" name="setting[2]" $yes_N /> 横线风格</td>
</tr>
<tr class="tr3"><td>表格宽度：(例: 98% 或 920px)</td>
<td><input value="$tablewidth" class="input" name="setting[7]" /></td>
</tr>
<tr class="tr3"><td>头部和尾部表格宽度：(例: 98% 或 920px)</td>
<td><input value="$mtablewidth" class="input" name="setting[8]" /></td>
</tr>
<tr class="tr3"><td>全局背景颜色：</td>
<td><div class="input fl" style="padding:0px;"><input id="bgcolor" value="$bgcolor" name="setting[3]" class="color_input" /><img  class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'bgcolor',function(){pickReback('bgcolor_s',color_picker)})"></div> <span id='bgcolor_s' style="color:$bgcolor">■■■■</span></td>
</tr>
<tr class="tr3"><td>全局链接颜色：</td>
<td><div class="input fl" style="padding:0px;"><input id="linkcolor" value="$linkcolor" name="setting[4]"  class="color_input" /><img class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'linkcolor',function(){pickReback('linkcolor_s',color_picker)})"></div> <span id="linkcolor_s" style="color:$linkcolor">■■■■</span></td>
</tr>
<tr class="tr3"><td>表格外边框颜色：</td>
<td><div class="input fl" style="padding:0px;"><input id="tablecolor" value="$tablecolor" name="setting[5]" class="color_input" /><img class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'tablecolor',function(){pickReback('tablecolor_s',color_picker)})"></div> <span id="tablecolor_s" style="color:$tablecolor">■■■■</span></td>
</tr>
<tr class="tr3"><td>表格内边框颜色：</td>
<td><div class="input fl" style="padding:0px;"><input id="tdcolor" value="$tdcolor" name="setting[6]" class="color_input" /><img class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'tdcolor',function(){pickReback('tdcolor_s',color_picker)})"></div> <span id="tdcolor_s" style="color:$tdcolor">■■■■</span></td>
</tr>
<tr><td class="tr4" colspan="2">表格样式颜色设置</td></tr>
<tr class="tr3">
<td>表格标题栏颜色：</td>
<td><div class="input fl" style="padding:0px;"><input id="headcolor" value="$headcolor" name="setting[9]" class="color_input" /><img class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'headcolor',function(){pickReback('headcolor_s',color_picker)})"></div> <span id="headcolor_s" style="color:$headcolor">■■■■</span></td>
</tr>
<tr class="tr3">
<td>表格标题栏下边框颜色：</td>
<td><div class="input fl" style="padding:0px;"><input id="headborder" value="$headborder" name="setting[10]" class="color_input" /><img class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'headborder',function(){pickReback('headborder_s',color_picker)})"></div> <span id="headborder_s" style="color:$headborder">■■■■</span></td>
</tr>
<tr class="tr3">
<td>标题栏主要字体链接颜色：</td>
<td><div class="input fl" style="padding:0px;"><input id="headfontone" value="$headfontone" name="setting[11]" class="color_input" /><img class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'headfontone',function(){pickReback('headfontone_s',color_picker)})"></div> <span id="headfontone_s" style="color:$headfontone">■■■■</span></td>
</tr>
<tr class="tr3">
<td>标题栏次要字体链接颜色：</td>
<td><div class="input fl" style="padding:0px;"><input id="headfonttwo" value="$headfonttwo" name="setting[12]" class="color_input" /><img class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'headfonttwo',function(){pickReback('headfonttwo_s',color_picker)})"></div> <span id="headfonttwo_s" style="color:$headfonttwo">■■■■</span></td>
</tr>
<tr class="tr3">
<td>表格副标题栏颜色：</td>
<td><div class="input fl" style="padding:0px;"><input id="cbgcolor" value="$cbgcolor" name="setting[13]" class="color_input" /><img class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'cbgcolor',function(){pickReback('cbgcolor_s',color_picker)})"></div> <span id="cbgcolor_s" style="color:$cbgcolor">■■■■</span></td>
</tr>
<tr class="tr3">
<td>表格副标题栏下边框颜色：</td>
<td><div class="input fl" style="padding:0px;"><input id="cbgborder" value="$cbgborder" name="setting[14]" class="color_input" /><img class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'cbgborder',function(){pickReback('cbgborder_s',color_picker)})"></div> <span id="cbgborder_s" style="color:$cbgborder">■■■■</span></td>
</tr>
<tr class="tr3">
<td>表格副标题栏字体颜色：</td>
<td><div class="input fl" style="padding:0px;"><input id="cbgfont" value="$cbgfont" name="setting[15]" class="color_input" /><img class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'cbgfont',function(){pickReback('cbgfont_s',color_picker)})"></div> <span id="cbgfont_s" style="color:$cbgfont">■■■■</span></td>
</tr>
<tr class="tr3">
<td>论坛列表颜色一：</td>
<td><div class="input fl" style="padding:0px;"><input id="forumcolorone" value="$forumcolorone" name="setting[16]" class="color_input" /><img class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'forumcolorone',function(){pickReback('forumcolorone_s',color_picker)})"></div> <span id="forumcolorone_s" style="color:$forumcolorone">■■■■</span></td>
</tr>
<tr class="tr3">
<td>论坛列表颜色二：</td>
<td><div class="input fl" style="padding:0px;"><input id="forumcolortwo" value="$forumcolortwo" name="setting[17]" class="color_input" /><img class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'forumcolortwo',function(){pickReback('forumcolortwo_s',color_picker)})"></div> <span id="forumcolortwo_s" style="color:$forumcolortwo">■■■■</span></td>
</tr>
<tr class="tr3">
<td>自定义css样式：</td>
<td><textarea name="setting[18]" style="height:80px;width:280px;">$extcss</textarea></td>
</tr>
</table>
<br />
<center><input type="submit" class="btn" value="提 交" /></center><br/>
</form>
<!--
EOT;
if($action=='edit'){print <<<EOT
-->
<!--<form action="$basename&" method="post">
<h2>编辑风格($sid)的CSS样式</h2>
<table cellspacing="1" cellpadding="3" width="98%" align="center" class="i_table">
<!--
EOT;
if($css_777){print <<<EOT
-->
<tr class="tr3"><td valign="middle" align="left">
<pre>.toptool　　顶端自定义导航样式
.guide　　　导航栏样式
.t 　　　　 为表格外边框样式，
            表格外边框颜色在此设置
.h 　　　　 为表格正标题栏样式，
            设置背景颜色，边框样式，字体样式
.tr2 　　　 为副标题栏样式，即原.cbg样式，
            可使用背景图片等css样式
.f9--.f14　 为字体大小控制，不建议修改
.s1--.s5　　细节字体颜色
.gray　　　 次要文字颜色
h2　　　　　首页版块列表(index.php)版块名称样式
h3　　　　　主题列表页文章标题名称样式
h4          为帖子标题的字体大小
.tpc_content帖子内容样式
blockquote  引用内容样式
.pages      翻页模块样式，建议只修改颜色
.menu td与.menu li 下拉菜单内容背景色
.f_one,.f_two, 版块列表(首页)表格背景
.t_one,.t_two, 主题列表(thread.php)表格背景
.r_one,.r_two, 帖子页面(read.php)表格背景
.btn   按钮样式
.input,textarea 输入框样式</pre>
</td><td valign="middle" align="center" class="b">
<textarea name="style_css" rows="32" cols="65" style="background-color:#F0F0f3; border: 1 double #B4B4B4" title="请慎重,这里的一举一动将改变论坛整个风格">
{$style_css}</textarea>
</td></tr>
<!--
EOT;
}else{print <<<EOT
-->
<tr class="tr3"><td align="center" style="color:blue">CSS样式文件 (“data/style/{$tplpath}_css.htm”) 不存在或不可写，请将其设为777可写模式</td></tr>
<!--
EOT;
}print <<<EOT
-->
</table><br />
<center><input type="hidden" name="action" value="editcss" />
<input type="hidden" name="sid" value="$sid" /><input class="btn" type="submit" value="提 交" /><center>
</form>-->
<!--
EOT;
}print <<<EOT
-->
<script language="JavaScript">
var bgcolor = getObj('bgcolor').value;
if(bgcolor.search(/\#[a-fA-F0-9]{6}/) != -1){
	var color = bgcolor.substr(bgcolor.search(/\#[a-fA-F0-9]{6}/),7);
	getObj('bgcolor_s').style.color=color;
}else if(bgcolor.search(/\#[a-fA-F0-9]{3}/) != -1){
	var color = bgcolor.substr(bgcolor.search(/\#[a-fA-F0-9]{3}/),4);
	getObj('bgcolor_s').style.color=color;
}else{
	getObj('bgcolor_s').style.color='#FFFFFF';
}
</script>
<!--
EOT;
}include_once PrintEot('adminbottom');
?>-->