Location: PHPKode > projects > Uchome and Discuz > admin/tpl/block.htm
<!--{template admin/tpl/header}-->

<div class="mainarea">
<div class="maininner">

	<div class="tabs_header">
		<ul class="tabs">
			<li$actives[view]><a href="admincp.php?ac=block"><span>ä¯ÀÀÈ«²¿Ä£¿é</span></a></li>
			<li class="null"><a href="admincp.php?ac=block&op=add">Ìí¼ÓÐÂÄ£¿é</a></li>
		</ul>
	</div>
	
<!--{if empty($_GET['op'])}-->

	<div class="bdrcontent">
		<p>Êý¾Ýµ÷Ó㬻ὫվÄÚµÄÊý¾Ý£¬Í¨¹ýÄã±àдµÄ²éѯSQLÓï¾ä£¬½øÐвéѯ²¢¶ÁÈ¡³öÀ´£¬Éú³ÉÒ»¶Îµ÷ÓôúÂë¡£
		Ä㽫µ÷ÓôúÂë(Ä£°åÄÚǶ£¬»òÕßJSµ÷Óö¼¿ÉÒÔ)·ÅÖõ½Õ¾µãÒ³ÃæÉϱã¿ÉÒÔ½«ÏàÓ¦µÄ²éѯ½á¹ûչʾ¸ø·Ã¿ÍÁË£¬
		´Ó¶ø¿ÉÒÔʵÏÖÕ¾ÄÚÈÎÒâÊý¾ÝµÄÏÔʾµ÷Óá£</p>
	</div>
	<br />
	<div class="bdrcontent">

		<table cellspacing="0" cellpadding="0" class="formtable">
		<tr>
			<th>Ãû³Æ</th>
			<th width="220">µ÷ÓôúÂë</th>
			<th width="180">²Ù×÷</th>
		</tr>
		<!--{loop $list $value}-->
		<tr>
			<td>$value[blockname]</td>
			<td><a href="$turl&op=tpl&id=$value[bid]">Ä£¿éÄÚǶ´úÂë</a> | <a href="$turl&op=js&id=$value[bid]">Javascriptµ÷ÓôúÂë</a></td>
			<td><a href="$turl&op=blocksql&id=$value[bid]">±à¼­SQL</a> | 
			<a href="$turl&op=code&id=$value[bid]">²ÎÊýÉèÖÃ</a> | 
			<a href="$turl&op=delete&id=$value[bid]">ɾ³ý</a></td>
		</tr>
		<!--{/loop}-->
		<tr><td colspan="3"><div class="pages">$multi</div></td></tr>
		</table>
	</div>

<!--{elseif $_GET['op'] == 'add' || $_GET['op'] == 'blocksql'}-->

	<form method="post" action="$turl" id="sqlform">
	<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
	<div class="bdrcontent">
			<div class="tabs_header"id="sqlGuide" style="display:none;">
		<ul class="tabs">
			<li id="li_<!--{eval echo tname('blog');}-->"><a id="a_select_<!--{eval echo tname('blog');}-->" href="javascript:void(0);" onclick="javascript:showSQLDiv('<!--{eval echo tname('blog');}-->');"><span>ÈÕÖ¾</span></a></li>
			<li id="li_<!--{eval echo tname('album');}-->"><a id="a_select_<!--{eval echo tname('album');}-->" href="javascript:void(0);" onclick="javascript:showSQLDiv('<!--{eval echo tname('album');}-->');"><span>Ïà²á</span></a></li>
			<li id="li_<!--{eval echo tname('thread');}-->"><a id="a_select_<!--{eval echo tname('thread');}-->" href="javascript:void(0);" onclick="javascript:showSQLDiv('<!--{eval echo tname('thread');}-->');"><span>»°Ìâ</span></a></li>
			<li id="li_<!--{eval echo tname('feed');}-->"><a id="a_select_<!--{eval echo tname('feed');}-->" href="javascript:void(0);" onclick="javascript:showSQLDiv('<!--{eval echo tname('feed');}-->');"><span>¶¯Ì¬</span></a></li>
			<li id="li_<!--{eval echo tname('space');}-->"><a id="a_select_<!--{eval echo tname('space');}-->" href="javascript:void(0);" onclick="javascript:showSQLDiv('<!--{eval echo tname('space');}-->');"><span>Óû§</span></a></li>
			<li id="li_<!--{eval echo tname('pic');}-->"><a id="a_select_<!--{eval echo tname('pic');}-->" href="javascript:void(0);" onclick="javascript:showSQLDiv('<!--{eval echo tname('pic');}-->');"><span>ÕÕƬ</span></a></li>
			<li id="li_<!--{eval echo tname('mtag');}-->"><a id="a_select_<!--{eval echo tname('mtag');}-->" href="javascript:void(0);" onclick="javascript:showSQLDiv('<!--{eval echo tname('mtag');}-->');"><span>Ⱥ×é</span></a></li>
			<li id="li_sqlDiy"><a id="a_select_sqlDiy" href="javascript:void(0);" onclick="javascript:showSQLDiv('sqlDiy');"><span>ÊÖдSQL</span></a></li>
		</ul>
		</div>
		<table cellspacing="0" cellpadding="0" class="formtable">
		<tr><th style="width:10em;">Ä£¿éÃû³Æ</th><td><input type="text" name="blockname" value="$block[blockname]"></td></tr>
		</table>
		<table cellspacing="0" cellpadding="0" class="formtable" id="{$sqlTables['blog']}" style="display:none;">
		<tr><th style="width:10em;">¹ýÂËÉèÖÃ</th><td></td></tr>
		<tr><th>Ö¸¶¨ÈÕÖ¾blogid</th><td>
			<input type="radio" name="sqluseid_{$sqlTables['blog']}" value="0" onclick="javascript:setRadioValue('{$sqlTables['blog']}_where', '{$sqlTables['blog']}_ids');" checked />²»Ö¸¶¨
			<input type="radio" name="sqluseid_{$sqlTables['blog']}" value="1" onclick="javascript:setRadioValue('{$sqlTables['blog']}_ids', '{$sqlTables['blog']}_where');" />Ö¸¶¨
			<input type="hidden" id="{$sqlTables['blog']}_id" value="blogid" />
		</td></tr>
		<tbody id="{$sqlTables['blog']}_ids" style="display:none;">
			<tr><th>ÈÕÖ¾blogid</th><td><input type="text" id="{$sqlTables['blog']}_where_blogid" value="" /> ¶à¸öÈÕÖ¾µÄ blogid ÇëÓá°,¡±¸ñ¿ª</td></tr>
		</tbody>
		<tbody id="{$sqlTables['blog']}_where">
			<tr><th>Ö¸¶¨×÷Õßuid</th><td><input type="text" id="{$sqlTables['blog']}_where_uid" value="" /> ¶à¸öÓû§µÄ uid ÇëÓá°,¡±¸ñ¿ª</td></tr>
			<tr><th>²é¿´Êý·¶Î§</th><td><input type="text" id="{$sqlTables['blog']}_where_viewnum_min" value="" /> ~ <input type="text" id="{$sqlTables['blog']}_where_viewnum_max" value="" /></td></tr>
			<tr><th>»Ø¸´Êý·¶Î§</th><td><input type="text" id="{$sqlTables['blog']}_where_replynum_min" value="" /> ~ <input type="text" id="{$sqlTables['blog']}_where_replynum_max" value="" /></td></tr>
			<tr><th>·¢²¼Ê±¼ä</th><td><select id="{$sqlTables['blog']}_where_dateline">
				<option value="0" selected>---²»ÏÞÖÆ---</option>
				<option value="86400">Ò»ÌìÒÔÀ´</option>
				<option value="172800">Á½ÌìÒÔÀ´</option>
				<option value="604800">Ò»ÖÜÒÔÀ´</option>
				<option value="1209600">Á½ÖÜÒÔÀ´</option>
				<option value="2592000">Ò»¸öÔÂÒÔÀ´</option>
				<option value="7948800">Èý¸öÔÂÒÔÀ´</option>
				<option value="15897600">Áù¸öÔÂÒÔÀ´</option>
				<option value="31536000">Ò»ÄêÒÔÀ´</option>
				</select></td></tr>
			<tr><th>ÊÇ·ñÓÐͼƬ</th><td><select id="{$sqlTables['blog']}_where_picflag">
				<option value="null">È«²¿</option>
				<option value="1">ÓÐͼƬ</option>
				</select></td></tr>
			<tr><th>Òþ˽·¶Î§</th><td><select id="{$sqlTables['blog']}_where_friend">
				<option value="0">È«Õ¾Óû§¿É¼û</option>
				<option value="null">È«²¿</option>
				</select></td></tr>
		</tbody>
		<tr><th>ÅÅÐòÉèÖÃ</th><td></td></tr>
		<tr><th>µÚÒ»ÅÅÐò</th><td><select id="{$sqlTables['blog']}_order_key_1">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="viewnum">²é¿´Êý</option>
			<option value="replynum">»Ø¸´Êý</option>
			<option value="dateline">·¢²¼Ê±¼ä</option>
			</select>
			<select id="{$sqlTables['blog']}_order_value_1">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="ASC">µÝÔö</option>
			<option value="DESC">µÝ¼õ</option>
			</select></td></tr>
		<tr><th>µÚ¶þÅÅÐò</th><td><select id="{$sqlTables['blog']}_order_key_2">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="viewnum">²é¿´Êý</option>
			<option value="replynum">»Ø¸´Êý</option>
			<option value="dateline">·¢²¼Ê±¼ä</option>
			</select>
			<select id="{$sqlTables['blog']}_order_value_2">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="ASC">µÝÔö</option>
			<option value="DESC">µÝ¼õ</option>
			</select></td></tr>
		<tr><th>µÚÈýÅÅÐò</th><td><select id="{$sqlTables['blog']}_order_key_3">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="viewnum">²é¿´Êý</option>
			<option value="replynum">»Ø¸´Êý</option>
			<option value="dateline">·¢²¼Ê±¼ä</option>
			</select>
			<select id="{$sqlTables['blog']}_order_value_3">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="ASC">µÝÔö</option>
			<option value="DESC">µÝ¼õ</option>
			</select></td></tr></table>
		
		<table cellspacing="0" cellpadding="0" class="formtable" id="{$sqlTables['album']}" style="display:none;">
		<tr><th style="width:10em;">¹ýÂËÉèÖÃ</th><td></td></tr>
		<tr><th>Ö¸¶¨Ïà²áalbumid</th><td>
			<input type="radio" name="sqluseid_{$sqlTables['album']}" value="0" onclick="javascript:setRadioValue('{$sqlTables['album']}_where', '{$sqlTables['album']}_ids');" checked />²»Ö¸¶¨
			<input type="radio" name="sqluseid_{$sqlTables['album']}" value="1" onclick="javascript:setRadioValue('{$sqlTables['album']}_ids', '{$sqlTables['album']}_where');" />Ö¸¶¨
			<input type="hidden" id="{$sqlTables['album']}_id" value="albumid" />
		</td></tr>
		<tbody id="{$sqlTables['album']}_ids" style="display:none;">
			<tr><th>Ïà²áalbumid</th><td><input type="text" id="{$sqlTables['album']}_where_albumid" value="" /> ¶à¸öÏà²áµÄ albumid ÇëÓá°,¡±¸ñ¿ª</td></tr>
		</tbody>
		<tbody id="{$sqlTables['album']}_where">
			<tr><th>Ö¸¶¨×÷Õßuid</th><td><input type="text" id="{$sqlTables['album']}_where_uid" value="" /> ¶à¸öÓû§µÄ uid ÇëÓá°,¡±¸ñ¿ª</td></tr>
			<tr><th>ÕÕƬÊýÁ¿·¶Î§</th><td><input type="text" id="{$sqlTables['album']}_where_picnum_min" value="" /> ~ <input type="text" id="{$sqlTables['album']}_where_picnum_max" value="" /></td></tr>
			<tr><th>·¢²¼Ê±¼ä</th><td><select id="{$sqlTables['album']}_where_dateline">
				<option value="0" selected>---²»ÏÞÖÆ---</option>
				<option value="86400">Ò»ÌìÒÔÀ´</option>
				<option value="172800">Á½ÌìÒÔÀ´</option>
				<option value="604800">Ò»ÖÜÒÔÀ´</option>
				<option value="1209600">Á½ÖÜÒÔÀ´</option>
				<option value="2592000">Ò»¸öÔÂÒÔÀ´</option>
				<option value="7948800">Èý¸öÔÂÒÔÀ´</option>
				<option value="15897600">Áù¸öÔÂÒÔÀ´</option>
				<option value="31536000">Ò»ÄêÒÔÀ´</option>
				</select></td></tr>
			<tr><th>¸üÐÂʱ¼ä</th><td><select id="{$sqlTables['album']}_where_updatetime">
				<option value="0" selected>---²»ÏÞÖÆ---</option>
				<option value="86400">Ò»ÌìÒÔÀ´</option>
				<option value="172800">Á½ÌìÒÔÀ´</option>
				<option value="604800">Ò»ÖÜÒÔÀ´</option>
				<option value="1209600">Á½ÖÜÒÔÀ´</option>
				<option value="2592000">Ò»¸öÔÂÒÔÀ´</option>
				<option value="7948800">Èý¸öÔÂÒÔÀ´</option>
				<option value="15897600">Áù¸öÔÂÒÔÀ´</option>
				<option value="31536000">Ò»ÄêÒÔÀ´</option>
				</select></td></tr>
			<tr><th>ÊÇ·ñÓÐͼƬ</th><td><select id="{$sqlTables['album']}_where_picflag">
				<option value="1">ÓÐͼƬ</option>
				<option value="null">È«²¿</option>
				</select></td></tr>
			<tr><th>Òþ˽·¶Î§</th><td><select id="{$sqlTables['album']}_where_friend">
				<option value="0">È«Õ¾Óû§¿É¼û</option>
				<option value="null">ËùÓÐ</option>
				</select></td></tr>
		</tbody>
		<tr><th>ÅÅÐòÉèÖÃ</th><td></td></tr>
		<tr><th>µÚÒ»ÅÅÐò</th><td><select id="{$sqlTables['album']}_order_key_1">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="picnum">ÕÕƬÊýÁ¿</option>
			<option value="updatetime">¸üÐÂʱ¼ä</option>
			<option value="dateline">´´½¨Ê±¼ä</option>
			</select>
			<select id="{$sqlTables['album']}_order_value_1">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="ASC">µÝÔö</option>
			<option value="DESC">µÝ¼õ</option>
			</select></td></tr>
		<tr><th>µÚ¶þÅÅÐò</th><td><select id="{$sqlTables['album']}_order_key_2">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="picnum">ÕÕƬÊýÁ¿</option>
			<option value="updatetime">¸üÐÂʱ¼ä</option>
			<option value="dateline">´´½¨Ê±¼ä</option>
			</select>
			<select id="{$sqlTables['album']}_order_value_2">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="ASC">µÝÔö</option>
			<option value="DESC">µÝ¼õ</option>
			</select></td></tr>
		<tr><th>µÚÈýÅÅÐò</th><td><select id="{$sqlTables['album']}_order_key_3">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="picnum">ÕÕƬÊýÁ¿</option>
			<option value="updatetime">¸üÐÂʱ¼ä</option>
			<option value="dateline">´´½¨Ê±¼ä</option>
			</select>
			<select id="{$sqlTables['album']}_order_value_3">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="ASC">µÝÔö</option>
			<option value="DESC">µÝ¼õ</option>
			</select></td></tr></table>
		
		<table cellspacing="0" cellpadding="0" class="formtable" id="{$sqlTables['thread']}" style="display:none;">
		<tr><th style="width:10em;">¹ýÂËÉèÖÃ</th><td></td></tr>
		<tr><th>»°Ìâthreadid</th><td>
			<input type="radio" name="sqluseid_{$sqlTables['thread']}" value="0" onclick="javascript:setRadioValue('{$sqlTables['thread']}_where', '{$sqlTables['thread']}_ids');" checked />²»Ö¸¶¨
			<input type="radio" name="sqluseid_{$sqlTables['thread']}" value="1" onclick="javascript:setRadioValue('{$sqlTables['thread']}_ids', '{$sqlTables['thread']}_where');" />Ö¸¶¨
			<input type="hidden" id="{$sqlTables['thread']}_id" value="tid" />
		</td></tr>
		<tbody id="{$sqlTables['thread']}_ids" style="display:none;">
			<tr><th>»°Ìâthreadid</th><td><input type="text" id="{$sqlTables['thread']}_where_tid" value="" /> ¶à¸ö»°ÌâµÄ threadid ÇëÓá°,¡±¸ñ¿ª</td></tr>
		</tbody>
		<tbody id="{$sqlTables['thread']}_where">
			<tr><th>Ö¸¶¨×÷Õßuid</th><td><input type="text" id="{$sqlTables['thread']}_where_uid" value="" /> ¶à¸öÓû§µÄ uid ÇëÓá°,¡±¸ñ¿ª</td></tr>
			<tr><th>Ö¸¶¨Èº×étagid</th><td><input type="text" id="{$sqlTables['thread']}_where_tagid" value="" /> ¶à¸öȺ×éµÄ tagid ÇëÓá°,¡±¸ñ¿ª</td></tr>
			<tr><th>»°Ìâ²é¿´Êý·¶Î§</th><td><input type="text" id="{$sqlTables['thread']}_where_viewnum_min" value="" /> ~ <input type="text" id="{$sqlTables['thread']}_where_viewnum_max" value="" /></td></tr>
			<tr><th>»°Ìâ»Ø¸´Êý·¶Î§</th><td><input type="text" id="{$sqlTables['thread']}_where_replynum_min" value="" /> ~ <input type="text" id="{$sqlTables['thread']}_where_replynum_max" value="" /></td></tr>
			<tr><th>·¢²¼Ê±¼ä</th><td><select id="{$sqlTables['thread']}_where_dateline">
				<option value="0" selected>---²»ÏÞÖÆ---</option>
				<option value="86400">Ò»ÌìÒÔÀ´</option>
				<option value="172800">Á½ÌìÒÔÀ´</option>
				<option value="604800">Ò»ÖÜÒÔÀ´</option>
				<option value="1209600">Á½ÖÜÒÔÀ´</option>
				<option value="2592000">Ò»¸öÔÂÒÔÀ´</option>
				<option value="7948800">Èý¸öÔÂÒÔÀ´</option>
				<option value="15897600">Áù¸öÔÂÒÔÀ´</option>
				<option value="31536000">Ò»ÄêÒÔÀ´</option>
				</select></td></tr>
			<tr><th>ÊÇ·ñÖö¥</th><td><select id="{$sqlTables['thread']}_where_displayorder">
				<option value="null">È«²¿</option>
				<option value="1">Öö¥</option>
				</select></td></tr>
			<tr><th>ÊÇ·ñ¾«»ª»°Ìâ</th><td><select id="{$sqlTables['thread']}_where_digest">
				<option value="null">È«²¿</option>
				<option value="1">¾«»ª</option>
				</select></td></tr>
		</tbody>
		<tr><th>ÅÅÐòÉèÖÃ</th><td></td></tr>
		<tr><th>µÚÒ»ÅÅÐò</th><td><select id="{$sqlTables['thread']}_order_key_1">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="viewnum">²é¿´Êý</option>
			<option value="replynum">»Ø¸´Êý</option>
			<option value="dateline">·¢²¼Ê±¼ä</option>
			</select>
			<select id="{$sqlTables['thread']}_order_value_1">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="ASC">µÝÔö</option>
			<option value="DESC">µÝ¼õ</option>
			</select></td></tr>
		<tr><th>µÚ¶þÅÅÐò</th><td><select id="{$sqlTables['thread']}_order_key_2">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="viewnum">²é¿´Êý</option>
			<option value="replynum">»Ø¸´Êý</option>
			<option value="dateline">·¢²¼Ê±¼ä</option>
			</select>
			<select id="{$sqlTables['thread']}_order_value_2">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="ASC">µÝÔö</option>
			<option value="DESC">µÝ¼õ</option>
			</select></td></tr>
		<tr><th>µÚÈýÅÅÐò</th><td><select id="{$sqlTables['thread']}_order_key_3">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="viewnum">²é¿´Êý</option>
			<option value="replynum">»Ø¸´Êý</option>
			<option value="dateline">·¢²¼Ê±¼ä</option>
			</select>
			<select id="{$sqlTables['thread']}_order_value_3">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="ASC">µÝÔö</option>
			<option value="DESC">µÝ¼õ</option>
			</select></td></tr></table>
		
		<table cellspacing="0" cellpadding="0" class="formtable" id="{$sqlTables['feed']}" style="display:none;">
		<tr><th style="width:10em;">¹ýÂËÉèÖÃ</th><td></td></tr>
		<tbody id="{$sqlTables['feed']}_where">
			<tr><th>¶¯Ì¬feedid</th><td><input type="text" id="{$sqlTables['feed']}_where_feedid" value="" /> ¶à¸ö¶¯Ì¬µÄ feedid ÇëÓá°,¡±¸ñ¿ª</td></tr>
			<tr><th>¶¯Ì¬ÀàÐÍ</th><td><select id="{$sqlTables['feed']}_where_appid">
				<option value="null">È«²¿</option>
				<option value="0">Õ¾ÄÚ</option>
				<option value="1">Ó¦ÓÃ</option>
				</select></td></tr>
			<tr><th>Òþ˽·¶Î§</th><td><select id="{$sqlTables['feed']}_where_friend">
				<option value="0">È«Õ¾Óû§¿É¼û</option>
				<option value="null">È«²¿</option>
				</select></td></tr>
		</tbody>
		<tr><th>ÅÅÐòÉèÖÃ</th><td></td></tr>
		<tr><th>µÚÒ»ÅÅÐò</th><td><select id="{$sqlTables['feed']}_order_key_1">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="dateline">²úÉúʱ¼ä</option>
			</select>
			<select id="{$sqlTables['feed']}_order_value_1">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="ASC">µÝÔö</option>
			<option value="DESC">µÝ¼õ</option>
			</select></td></tr></table>
		
		<table cellspacing="0" cellpadding="0" class="formtable" id="{$sqlTables['space']}" style="display:none;">
		<tr><th style="width:10em;">¹ýÂËÉèÖÃ</th><td></td></tr>
		<tr><th>Ö¸¶¨Óû§uid</th><td>
			<input type="radio" name="sqluseid_{$sqlTables['space']}" value="0" onclick="javascript:setRadioValue('{$sqlTables['space']}_where', '{$sqlTables['space']}_ids');" checked />²»Ö¸¶¨
			<input type="radio" name="sqluseid_{$sqlTables['space']}" value="1" onclick="javascript:setRadioValue('{$sqlTables['space']}_ids', '{$sqlTables['space']}_where');" />Ö¸¶¨
			<input type="hidden" id="{$sqlTables['space']}_id" value="uid" />
		</td></tr>
		<tbody id="{$sqlTables['space']}_ids" style="display:none;">
			<tr><th>Óû§uid</th><td><input type="text" id="{$sqlTables['space']}_where_uid" value="" /> ¶à¸öÓû§µÄ uid ÇëÓá°,¡±¸ñ¿ª</td></tr>
		</tbody>
		<tbody id="{$sqlTables['space']}_where">
			<tr><th>»ý·ÖÊý·¶Î§</th><td><input type="text" id="{$sqlTables['space']}_where_credit_min" value="" /> ~ <input type="text" id="{$sqlTables['space']}_where_credit_max" value="" /></td></tr>
			<tr><th>Ö¸¶¨Óû§×é</th><td>
				<table cellpadding="0" cellspacing="0" class="formtable"><tr>
				<!--{eval $i = 0;}-->
				<!--{loop $usergrouparr $gid $value}-->
				<!--{if !empty($i) && 0 == $i % 3}--></tr><tr><!--{/if}-->
				<td><input type="checkbox" name="{$sqlTables['space']}_where_groupid_{$gid}" value="$gid" id="{$sqlTables['space']}_where_groupid_{$gid}" /> <label for="{$sqlTables['space']}_where_groupid_{$gid}" style="cursor:pointer;">$value[grouptitle]</label></td>
				<!--{eval $i ++;}-->
				<!--{/loop}-->
				</tr></table>
			</td></tr>
			<tr><th>²é¿´Êý·¶Î§</th><td><input type="text" id="{$sqlTables['space']}_where_viewnum_min" value="" /> ~ <input type="text" id="{$sqlTables['space']}_where_viewnum_max" value="" /></td></tr>
			<tr><th>ºÃÓÑÊý·¶Î§</th><td><input type="text" id="{$sqlTables['space']}_where_friendnum_min" value="" /> ~ <input type="text" id="{$sqlTables['space']}_where_friendnum_max" value="" /></td></tr>
			<tr><th>ÊÇ·ñʵÃûÈÏÖ¤</th><td><select id="{$sqlTables['space']}_where_namestatus">
				<option value="null">È«²¿</option>
				<option value="1">ÒÑÈÏÖ¤</option>
				</select></td></tr>
			<tr><th>½¨Á¢Ê±¼ä</th><td><select id="{$sqlTables['space']}_where_dateline">
				<option value="0" selected>---²»ÏÞÖÆ---</option>
				<option value="86400">Ò»ÌìÒÔÀ´</option>
				<option value="172800">Á½ÌìÒÔÀ´</option>
				<option value="604800">Ò»ÖÜÒÔÀ´</option>
				<option value="1209600">Á½ÖÜÒÔÀ´</option>
				<option value="2592000">Ò»¸öÔÂÒÔÀ´</option>
				<option value="7948800">Èý¸öÔÂÒÔÀ´</option>
				<option value="15897600">Áù¸öÔÂÒÔÀ´</option>
				<option value="31536000">Ò»ÄêÒÔÀ´</option>
				</select></td></tr>
			<tr><th>¸üÐÂʱ¼ä</th><td><select id="{$sqlTables['space']}_where_updatetime">
				<option value="0" selected>---²»ÏÞÖÆ---</option>
				<option value="86400">Ò»ÌìÒÔÀ´</option>
				<option value="172800">Á½ÌìÒÔÀ´</option>
				<option value="604800">Ò»ÖÜÒÔÀ´</option>
				<option value="1209600">Á½ÖÜÒÔÀ´</option>
				<option value="2592000">Ò»¸öÔÂÒÔÀ´</option>
				<option value="7948800">Èý¸öÔÂÒÔÀ´</option>
				<option value="15897600">Áù¸öÔÂÒÔÀ´</option>
				<option value="31536000">Ò»ÄêÒÔÀ´</option>
				</select></td></tr>
			<tr><th>ÊÇ·ñÓÐÍ·Ïñ</th><td><select id="{$sqlTables['space']}_where_avatar">
				<option value="null">È«²¿</option>
				<option value="1">ÓÐ</option>
				</select></td></tr>
			<tr><th>Óû§ÐÔ±ð</th><td><select id="{$sqlTables['space']}_where_sex">
				<option value="null">È«²¿</option>
				<option value="1">ÄÐ</option>
				<option value="2">Å®</option>
				</select></td></tr>
		</tbody>
		<tr><th>ÅÅÐòÉèÖÃ</th><td></td></tr>
		<tr><th>µÚÒ»ÅÅÐò</th><td><select id="{$sqlTables['space']}_order_key_1">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="viewnum">²é¿´Êý</option>
			<option value="friendnum">ºÃÓÑÊý</option>
			<option value="updatetime">×îºó¸üÐÂ</option>
			<option value="lastlogin">×îºóµÇ¼ʱ¼ä</option>
			<option value="credit">»ý·ÖÊý</option>
			<option value="dateline">¿ªÍ¨Ê±¼ä</option>
			</select>
			<select id="{$sqlTables['space']}_order_value_1">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="ASC">µÝÔö</option>
			<option value="DESC">µÝ¼õ</option>
			</select></td></tr>
		<tr><th>µÚ¶þÅÅÐò</th><td><select id="{$sqlTables['space']}_order_key_2">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="viewnum">²é¿´Êý</option>
			<option value="friendnum">ºÃÓÑÊý</option>
			<option value="updatetime">×îºó¸üÐÂ</option>
			<option value="lastlogin">×îºóµÇ¼ʱ¼ä</option>
			<option value="credit">»ý·ÖÊý</option>
			<option value="dateline">¿ªÍ¨Ê±¼ä</option>
			</select>
			<select id="{$sqlTables['space']}_order_value_2">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="ASC">µÝÔö</option>
			<option value="DESC">µÝ¼õ</option>
			</select></td></tr>
		<tr><th>µÚÈýÅÅÐò</th><td><select id="{$sqlTables['space']}_order_key_3">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="viewnum">²é¿´Êý</option>
			<option value="friendnum">ºÃÓÑÊý</option>
			<option value="updatetime">×îºó¸üÐÂ</option>
			<option value="lastlogin">×îºóµÇ¼ʱ¼ä</option>
			<option value="credit">»ý·ÖÊý</option>
			<option value="dateline">¿ªÍ¨Ê±¼ä</option>
			</select>
			<select id="{$sqlTables['space']}_order_value_3">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="ASC">µÝÔö</option>
			<option value="DESC">µÝ¼õ</option>
			</select></td></tr></table>
		
		<table cellspacing="0" cellpadding="0" class="formtable" id="{$sqlTables['mtag']}" style="display:none;">
		<tr><th style="width:10em;">¹ýÂËÉèÖÃ</th><td></td></tr>
		<tr><th>Ö¸¶¨Èº×étagid</th><td>
			<input type="radio" name="sqluseid_{$sqlTables['mtag']}" value="0" onclick="javascript:setRadioValue('{$sqlTables['mtag']}_where', '{$sqlTables['mtag']}_ids');" checked />²»Ö¸¶¨
			<input type="radio" name="sqluseid_{$sqlTables['mtag']}" value="1" onclick="javascript:setRadioValue('{$sqlTables['mtag']}_ids', '{$sqlTables['mtag']}_where');" />Ö¸¶¨
			<input type="hidden" id="{$sqlTables['mtag']}_id" value="tagid" />
		</td></tr>
		<tbody id="{$sqlTables['mtag']}_ids" style="display:none;">
			<tr><th>Ⱥ×étagid</th><td><input type="text" id="{$sqlTables['mtag']}_where_tagid" value="" /> ¶à¸öȺ×éµÄ tagid ÇëÓá°,¡±¸ñ¿ª</td></tr>
		</tbody>
		<tbody id="{$sqlTables['mtag']}_where">
			<tr><th>Ⱥ×éÈËÊý</th><td><input type="text" id="{$sqlTables['mtag']}_where_membernum_min" value="" /> ~ <input type="text" id="{$sqlTables['mtag']}_where_membernum_max" value="" /></td></tr>
			<tr><th>Ⱥ×é·ÖÀà</th><td>
				<table cellpadding="0" cellspacing="0" class="formtable"><tr>
				<!--{eval $i = 0;}-->
				<!--{loop $list $value}-->
				<!--{if !empty($i) && 0 == $i % 3}--></tr><tr><!--{/if}-->
				<td><input type="checkbox" name="{$sqlTables['mtag']}_where_fieldid_{$value[fieldid]}" value="{$value[fieldid]}" id="{$sqlTables['mtag']}_where_fieldid_{$value[fieldid]}" /> <label for="{$sqlTables['mtag']}_where_fieldid_{$value[fieldid]}" style="cursor:pointer;">$value[title]</label></td>
				<!--{eval $i ++;}-->
				<!--{/loop}-->
				</tr></table>
			</td></tr>
			<tr><th>Ⱥ×éȨÏÞ</th><td><select id="{$sqlTables['mtag']}_where_joinperm">
				<option value="null">È«²¿</option>
				<option value="1">ÔÊÐíËùÓÐÈ˿ɼÓÈë</option>
				</select></td></tr>
		</tbody>
		<tr><th>ÅÅÐòÉèÖÃ</th><td></td></tr>
		<tr><th>µÚÒ»ÅÅÐò</th><td><select id="{$sqlTables['mtag']}_order_key_1">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="membernum">Ⱥ×éÈËÊý</option>
			</select>
			<select id="{$sqlTables['mtag']}_order_value_1">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="ASC">µÝÔö</option>
			<option value="DESC">µÝ¼õ</option>
			</select></td></tr></table>
		
		<table cellspacing="0" cellpadding="0" class="formtable" id="{$sqlTables['pic']}" style="display:none;">
		<tr><th style="width:10em;">¹ýÂËÉèÖÃ</th><td></td></tr>
		<tbody id="{$sqlTables['pic']}_where">
			<tr><th>Ïà²áalbumid</th><td><input type="text" id="{$sqlTables['pic']}_where_albumid" value="" /> ¶à¸öÏà²áµÄ albumid ÇëÓá°,¡±¸ñ¿ª</td></tr>
			<tr><th>Óû§uid</th><td><input type="text" id="{$sqlTables['pic']}_where_uid" value="" /> ¶à¸öÓû§µÄ uid ÇëÓá°,¡±¸ñ¿ª</td></tr>
		</tbody>
		<tr><th>ÅÅÐòÉèÖÃ</th><td></td></tr>
		<tr><th>µÚÒ»ÅÅÐò</th><td><select id="{$sqlTables['pic']}_order_key_1">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="dateline">ÉÏ´«Ê±¼ä</option>
			</select>
			<select id="{$sqlTables['pic']}_order_value_1">
			<option value="null">ÇëÑ¡Ôñ</option>
			<option value="ASC">µÝÔö</option>
			<option value="DESC">µÝ¼õ</option>
			</select></td></tr></table>
		
		<table cellspacing="0" cellpadding="0" class="formtable" id="sqlDiy" style="display:none;">
		<tr><th style="width:10em;">Êý¾Ýµ÷ÓÃSQL</th><td><textarea id="blocksql" name="blocksql" style="width:98%;" rows="6">$block[blocksql]</textarea>
			<br />±¾¹¦ÄÜÐèÒªÄãÕÆÎÕÒ»¶¨µÄSQL±àд֪ʶ¡£
			<br />±¾Êý¾Ýµ÷ÓÃÖ»Ö§³Ö±àд SELECT ¿ªÍ·µÄ²éѯSQL¡£
			<br />SQLÓï¾äÖÐÐèҪʹÓÃÍêÕûµÄ±íÃû¡£Èç¹ûÏëµ÷Ó÷DZ¾³ÌÐòÊý¾Ý¿âÖÐµÄ±í£¬ÔÚ±íÃûÇ°ÃæÔö¼ÓÊý¾Ý¿âÃû¼´¿É¡£ÀýÈ磺
			<br />1. ²éѯ¶ÁÈ¡×îеÄÈÕÖ¾ (¼ÙÈç±íÃûǰ׺ΪĬÈ쵀 uchome_)
			<br />SELECT * FROM uchome_blog ORDER BY dateline DESC
			<br />2. ²éѯ¶ÁÈ¡ÂÛ̳µÄ×îÐÂÌû×Ó (¼ÙÈçÂÛ̳°²×°ÔÚdiscuzÊý¾Ý¿â£¬±íÃûǰ׺Ϊ cdb_)
			<br />SELECT * FROM discuz.cdb_threads ORDER BY dateline DESC
			</td></tr>
		</table>
	</div>
	
	<div class="footactions">
		<input type="hidden" name="bid" value="$block[bid]">
		<input type="submit" name="valuesubmit" value="Ìá½»" class="submit">
	</div>
	
	<script language="javascript" type="text/javascript">
	var curMod = '';
	var tableFields = ['uid', 'feedid', 'tagid', 'albumid'];
	var sqls = [];
	var tablePre = '{$_SC['tablepre']}';
	<!--{loop $sqls $key $value}-->
	sqls['$key'] = '$value';
	<!--{/loop}-->
	$('sqlform').onsubmit = function() {
		var frmObj = $('sqlform');
		var eLen = frmObj.elements.length;
		var whereArr = [];
		var orderKeys = [];
		var orderValues = [];
		var orderArr = [];
		var tmpArr = [];
		var groupidArr = [];
		var fieldidArr = [];
		var preReg = new RegExp(tablePre, 'ig');
		var tableName = curMod.replace(preReg, '');
		var timeFields = ['dateline', 'updatetime'];
		var str = '';
		var whereOrder = '';
		if('' == curMod || 'undefined' == typeof(sqls[tableName])) {
			return;
		}
		var tReg = new RegExp('_([a-zA-Z0-9]*)', 'ig');
		for(var i = 0; i < eLen; i ++) {
			if('' == frmObj.elements[i].value || 'null' == frmObj.elements[i].value) {
				continue;
			}
			tmpArr.length = 0;
			str = (frmObj.elements[i].id).replace(curMod, '');
			if(frmObj.elements[i].id != str) {
				str.replace(tReg, function($0, $1) {
					tmpArr[tmpArr.length] = $1;
				});
				if('where' == tmpArr[0]) {
					if('min' == tmpArr[2]) {
						minv = parseInt(frmObj.elements[i].value);
						if(isNaN(minv)) {
							continue;
						}
						whereArr.push("`" + tableName + "`.`" + tmpArr[1] + "`>'" + minv + "'");
					} else if('max' == tmpArr[2]) {
						maxv = parseInt(frmObj.elements[i].value);
						if(isNaN(maxv)) {
							continue;
						}
						whereArr.push("`" + tableName + "`.`" + tmpArr[1] + "`<'" + maxv + "'");
					} else {
						if(-1 != in_array(tmpArr[1], tableFields)) {
							whereArr.push("`" + tableName + "`.`" + tmpArr[1] + "` in ('" + ((frmObj.elements[i].value).split(',')).join("','") + "')");
						} else if('groupid' == tmpArr[1]) {
							groupid = parseInt(tmpArr[2]);
							if(isNaN(groupid) || !frmObj.elements[i].checked) {
								continue;
							}
							groupidArr.push(tmpArr[2]);
						} else if('fieldid' == tmpArr[1]) {
							fieldid = parseInt(tmpArr[2]);
							if(isNaN(fieldid) || !frmObj.elements[i].checked) {
								continue;
							}
							fieldidArr.push(tmpArr[2]);
						} else if('appid' == tmpArr[1]) {
							appid = parseInt(frmObj.elements[i].value);
							if(isNaN(appid)) {
								continue;
							}
							if(0 == appid) {
								whereArr.push("`" + tableName + "`.`" + tmpArr[1] + "`='0'");
							} else {
								whereArr.push("`" + tableName + "`.`" + tmpArr[1] + "`>'0'");
							}
						} else if('sex' == tmpArr[1]) {
							whereArr.push("`spacefield`.`sex`='" + parseInt(frmObj.elements[i].value) + "'");
						} else if(-1 != in_array(tmpArr[1], timeFields)) {
							if(0 < frmObj.elements[i].value) {
								whereArr.push("`" + tableName + "`.`" + tmpArr[1] + "`>'[" + frmObj.elements[i].value + "]'");
							}
						} else {
							whereArr.push("`" + tableName + "`.`" + tmpArr[1] + "`='" + frmObj.elements[i].value + "'");
						}
					}
				} else if('order' == tmpArr[0]) {
					if('key' == tmpArr[1]) {
						orderKeys[frmObj.elements[i].value] = tmpArr[2];
					} else if('value' == tmpArr[1]) {
						orderValues[tmpArr[2]] = frmObj.elements[i].value;
					}
				}
			}
		}
		if(0 < groupidArr.length) {
			whereArr.push("`" + tableName + "`.`groupid` in ('" + groupidArr.join("','") + "')");
		}
		if(0 < fieldidArr.length) {
			whereArr.push("`" + tableName + "`.`fieldid` in ('" + fieldidArr.join("','") + "')");
		}
		for(var i in orderKeys) {
			if(null != orderValues[orderKeys[i]]) {
				orderArr.push("`" + tableName + "`.`" + i + "` " + orderValues[orderKeys[i]]);
			}
		}
		// Èç¹ûÊÇֻʹÓÃÁËID£¬Ôò°ÑwhereÇå¿Õ
		if($(curMod + '_ids') && 'none' != $(curMod + '_ids').style.display) {
			whereArr.length = 0;
			var whereId = $(curMod + '_where_' + $(curMod + '_id').value).value;
			if('' != whereId) {
				whereArr.push("`" + tableName + "`.`" + $(curMod + '_id').value + "` in ('" + (whereId.split(",")).join("','") + "')");
			}
		}
		if(0 < whereArr.length) {
			whereOrder += ' WHERE ' + whereArr.join(' AND ');
		}
		if(0 < orderArr.length) {
			whereOrder += " ORDER BY " + orderArr.join(", ");
		}
		$('blocksql').value = sqls[tableName].replace(/WHEREORDER/g, whereOrder);
	}
	function in_array(ineedle, haystack, caseinsensitive) {
		var needle = new String(ineedle);
		if(needle.Length == 0) return -1;
		if(caseinsensitive) {
			needle = needle.toLowerCase();
			for(var i in haystack)	{
				if(haystack[i].toLowerCase() == needle) {
					return i;
				}
			}
		} else {
			for(var i in haystack)	{
				if(haystack[i] == needle) {
					return i;
				}
			}
		}
		return -1;
	}
	function setRadioValue(showid, hiddenid) {
		if($(showid)) {
			$(showid).style.display = '';
		}
		if($(hiddenid)) {
			$(hiddenid).style.display = 'none';
		}
	}
	function showSQLDiv(sid) {
		var sObj = $(sid);
		if('' != curMod) {
			$(curMod).style.display = 'none';
			$('li_' + curMod).className = '';
		}
		$('li_' + sid).className = 'active';
		sObj.style.display = '';
		curMod = sid;
	}
	<!--{if 'blocksql' == $_GET['op']}-->
	$('sqlDiy').style.display = '';
	<!--{else}-->
	$('sqlGuide').style.display = '';
	showSQLDiv('{$sqlTables['blog']}');
	<!--{/if}-->
	</script>
	</form>
	
	<br />
	<div class="bdrcontent">
		<div class="title">
			<h3>Êý¾Ý×Öµä²Î¿¼</h3>
			<p>ÒÔÏÂÊDZ¾³ÌÐòµÄÊý¾Ý¿âµÄÊý¾Ý±íÃûÒÔ¼°×Ö¶ÎÁÐ±í£¬¹©Äã±àд²éѯÓï¾äµÄʱºò²Î¿¼¡£Ã¿¸ö×ֶεľßÌ庬Ò壬Çë²Î¿¼³ÌÐò°üÖеġ¶Êý¾Ý×ֵ䡷Îĵµ</p>
		</div>
	
		<!--{loop $tables $key $value}-->
		<br />
		<ul class="listcol list4col">
			<b>$key</b>
			<!--{loop $value $subkey $subvalue}-->
			<li>$subvalue</li>
			<!--{/loop}-->
		</ul>
		<!--{/loop}-->

	</div>
	
<!--{elseif $_GET['op'] == 'code'}-->

	<form method="post" action="$turl">
	<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
	<div class="bdrcontent">
	
	<table cellspacing="0" cellpadding="0" class="formtable">
	<tr><th style="width:10em;">²éѯSQLÓï¾ä</th><td>
	$block[blocksql]
	<br />[<a href="$turl&op=blocksql&id=$block[bid]">±à¼­SQL</a>]
	</td></tr>
	
	<tr><th>±äÁ¿Ãû</th><td>{$phptag}_SBLOCK['<input type="text" name="cachename" id="cachename" value="$block[cachename]" style="width: 60px;">']</td></tr>
	<tr><th>»º´æʱ¼ä</th><td><input type="text" name="cachetime" value="$block[cachetime]" size="5"> Ãë
		<br />ÉèÖÃÒ»¸ö»º´æʱ¼ä¼ä¸ô£¬¸ÃÄ£¿éÊý¾Ý½«×Ô¶¯ÔÚÖ¸¶¨µÄʱ¼ä¼ä¸ôÄÚ¸üÐÂÊý¾Ý¡£
		<br />»º´æʱ¼äÉèÖÃÔ½´ó£¬¶Ô·þÎñÆ÷µÄ¸ºÔؾÍԽС£¬µ«Êý¾ÝµÄ¼°Ê±ÐԾͲ»¹»¡£
		<br />ÉèÖÃΪ0£¬Ôò²»Ê¹Óûº´æ£¬ÊµÊ±¸üУ¬ÕâÑù»áÑÏÖØÔö¼Ó·þÎñÆ÷¸ºÔØ¡£</td></tr>
	<tr><th>»ñÈ¡ÊýÄ¿</th><td>
		<input id="ra_start_num" name="num_option" type="radio" onclick="show_num_option()"<!--{if !$block[perpage]}--> checked="checked"<!--{/if}-->><label for="ra_start_num">»ñÈ¡Âú×ãÌõ¼þµÄ²¿·ÖÊý¾Ý</label>
		&nbsp;&nbsp;
		<input id="ra_perpage" name="num_option" type="radio" onclick="show_num_option()"<!--{if $block[perpage]}--> checked="checked"<!--{/if}-->><label for="ra_perpage">»ñÈ¡È«²¿Êý¾Ý£¬·ÖÒ³ÏÔʾ</label><br />
		<p id="op_start_num"<!--{if $block[perpage]}--> style="display:none"<!--{/if}-->>
			»ñÈ¡Âú×ãÌõ¼þµÄµÚ<input type="text" name="startnum" value="$block[startnum]" size="5"> ÖÁ <input type="text" name="num" value="$block[num]" size="5"> ÌõÊý¾Ý
		</p>
		<p id="op_perpage"<!--{if !$block[perpage]}--> style="display:none"<!--{/if}-->>
			ÿҳÏÔʾ <input type="text" name="perpage" value="$block[perpage]" size="5"> Ìõ
		</p>
		</td></tr>
	<tr><th>Êý¾ÝÏÔʾHTML´úÂë</th><td>
		<textarea name="htmlcode" id="htmlcode" style="width:98%;" rows="10">$block[htmlcode]</textarea>
		<br />ÓÃhtmlÓïÑÔ£¬±àдÊý¾ÝµÄÏÔʾÑùʽ¡£
		<br />»ñÈ¡µ½µÄÊý¾Ý´æ·ÅÔÚÊý×é {$phptag}_SBLOCK[±äÁ¿Ãû] ÖÐ(½«¡°±äÁ¿Ãû¡±Ì滻ΪÄãÔÚÉÏÃæÉ趨µÄ±äÁ¿Ãû)£¬¿ÉÒÔʹÓà loop Óï·¨¶Ô¸ÃÊý×é±äÁ¿½øÐÐÑ­»·Õ¹Ê¾¡£Çë²Î¿¼³ÌÐò°üÖС¶Êý¾Ýµ÷Óá·Îĵµ¡£
	</td></tr>
	
	<!--{if $colnames}-->
	<tr><th>Êý¾ÝÔ¤ÀÀ</th><td>
		<input type="button" class="submit" id="preview" name="preview" value="Ô¤ÀÀ" />
		<div id="previewBlock" style="border:1px solid #BBB;padding:2px;margin-top:3px;">Êý¾ÝÔ¤ÀÀ</div></td></tr>
	
	<tr><th>¿Éµ÷ÓÃ×Ö¶ÎʵÀý</th>
	<td>
		<table cellspacing="1" cellpadding="0" bgcolor="#CCCCCC">
		<tr bgcolor="#F3F3F3"><th>&nbsp;×Ö¶ÎÃû </th><th>&nbsp;Êý¾ÝʵÀý&nbsp;</th></tr>
		<!--{loop $colnames $key $value}-->
		<tr><td bgcolor="#F5F5F5">&nbsp;$key&nbsp;</td><td bgcolor="#FFFFFF">&nbsp;$value&nbsp;</td></tr>
		<!--{/loop}-->
		</table>
	</td></tr>
	<!--{/if}-->

	</table>
	</div>
	
	<div class="footactions">
		<input type="hidden" name="bid" value="$block[bid]">
		<input type="submit" name="codesubmit" value="Ìá½»" class="submit">
	</div>
	
	</form>
	<script language="javascript" type="text/javascript">
	$('cachename').onkeyup = function() {
		var blockReg = new RegExp('\\$\\_SBLOCK\\[(.*?)\\]', 'ig');
		var cname = $('cachename').value;
		var htmvalue = $('htmlcode').value;
		htmvalue = htmvalue.replace(blockReg, function($0, $1) {
			$1 = cname;
			return '$' + '_SBLOCK[' + $1 + ']';
		});
		$('htmlcode').value = htmvalue;
	}
	<!--{if $colnames}-->
	var colname = {};
	<!--{loop $colnames $key $value}-->
	colname['$key'] = '<!--{eval echo addcslashes($value, '\'\\');}-->';
	<!--{/loop}-->
	$('preview').onclick = function() {
		var html = $('htmlcode').value;
		var loopReg2 = /\<\!\-\-\{loop\s+(\S+)\s+\$(\S+)\}\-\-\>/ig;
		var loopReg3 = /\<\!\-\-\{loop\s+(\S+)\s+\$(\S+)\s+\$(\S+)\}\-\-\>/ig;
		var varReg = /\$(([a-zA-Z_]+)(\[[a-zA-Z0-9_\-\.\"\'\[\]\$]+\])*)/ig;
		var reg = '';
		html = html.replace(loopReg2, function($0, $1, $2) {
			reg = $2;
			return '';
		});
		if('' == reg) {
			html = html.replace(loopReg3, function($0, $1, $2, $3) {
				reg = $3;
				return '';
			})
		}
		eval(reg + ' = colname');
		html = html.replace(varReg, function($0, $1, $2, $3) {
			key = $3.match(/(\w+)/ig);
			return eval($2 + '["' + key + '"]');
		});
		$('previewBlock').innerHTML = html;
	}
	<!--{/if}-->
	
	function show_num_option(){
		if($('ra_perpage').checked) {
			var inputs = $('op_start_num').getElementsByTagName('input');
			for(var i = 0, L=inputs.length; i < L; i++) {
				inputs[i].value = '0';
			}
			$('op_perpage').style.display = "";
			$('op_start_num').style.display = "none";
		} else {
			var inputs = $('op_perpage').getElementsByTagName('input');
			for(var i = 0, L=inputs.length; i < L; i++) {
				inputs[i].value = '0';
			}
			$('op_perpage').style.display = "none";
			$('op_start_num').style.display = "";	
		}
	}
	
	</script>

<!--{elseif $_GET['op'] == 'tpl'}-->
	<div class="bdrcontent">
	<div class="title"><h3>Ä£°æµ÷ÓôúÂë</h3></div>

	<table cellspacing="0" cellpadding="0" width="100%">
	<tr><td>Ç뽫ÒÔÏ´úÂ븴ÖÆ£¬·Åµ½Õ¾µãÄ£°åµÄÈÎÒâÒ³ÃæµÄÖ¸¶¨Î»Öü´¿É¡£</td></tr>
	<tr><td><input type="text" name="blockcode" value="$code" size="80"></td></tr>
	</table>
	</div>

<!--{elseif $_GET['op'] == 'js'}-->

	<div class="bdrcontent">
	<div class="title"><h3>Javascriptµ÷ÓôúÂë</h3></div>

	<table cellspacing="0" cellpadding="0" width="100%">
	<tr><td><textarea name="blockcode" style="width:98%;" rows="5">$code</textarea></td></tr>
	</table>
	</div>
<!--{/if}-->
</div>
</div>

<div class="side">
	<!--{template admin/tpl/side}-->
</div>

<!--{template admin/tpl/footer}-->
Return current item: Uchome and Discuz