<?php TPL::output('admin/global/header.tpl.htm'); ?>
<!--left-->
<?php TPL::output('admin/global/left.tpl.htm'); ?>
<!--left-->

<div id="main-content" style="margin:0 0 0 200px;">
	<div class="clear"></div>
	<div class="content-box">
		<div class="content-box-header">
			<h3> Site function </h3>
			<ul class="content-box-tabs">
			</ul>
			<div class="clear"></div>
		</div>
		<div class="content-box-content">
			<div id="notification_box" class="notification success png_bg" style="display:none;"> <a class="close" href="javascript:;"></a>
				<div name="notification_content"></div>
			</div>
			<div class="tab-content default-tab" id="tab1">
				<form id="_save_form" action="admin/setting/sys_save_ajax/" method="post">
					<fieldset>
					<p groupid="3" name="site_announce">
						<label>Site notice: <span style="font-weight:normal">(Support for HTML)</span></label>
						<textarea name="site_announce" cols="100" rows="3" id="site_announce"><?php echo $this->setting['site_announce']; ?></textarea>
					</p>
					<p groupid="3" name="url_rewrite_enable">
						<label>Enable Rewrite: <span style=" font-weight:normal;">(Refer to ReadMe file to about how to enable Rewrite)</span></label>
						<input type="radio" name="url_rewrite_enable" value="Y" <?php if ($this->setting['url_rewrite_enable'] == 'Y'){ ?> checked="true"<?php } ?>/>
						Yes
						<input type="radio" name="url_rewrite_enable" value="N" <?php if ($this->setting['url_rewrite_enable'] == 'N'){ ?> checked="true"<?php } ?>/>
						No </p>
					<p groupid="3" name="request_route" style="display:none;">
						<label>URL link display method:</label>
					<table name="request_route">
						<tr style="height:20px;">
							<th style="width:150px; vertical-align:middle; "> <label style="float:left;">
								<input type="radio" value="1" name="request_route" <?php if ($this->setting['request_route'] == '1'){ ?> checked="true"<?php } ?>>
								Default </label>
							</th>
							<td><span style=" font-weight:normal;">
								<?php echo get_setting('base_url'); ?>/question/123<br>
								<?php echo get_setting('base_url'); ?>/topic/123<br>
								<?php echo get_setting('base_url'); ?>/people/tanyacms<br>
								<?php echo get_setting('base_url'); ?>/category/123
							</span></td>
						</tr>
						<tr style="height:20px;">
							<th style="width:150px; vertical-align:middle; "> <label style="float:left;">
								<input type="radio" value="2" name="request_route" <?php if ($this->setting['request_route'] == '2'){ ?> checked="true"<?php } ?>>
								Short Mode </label>
							</th>
							<td><span style=" font-weight:normal;">
								<?php echo get_setting('base_url'); ?>/q_123<br>
								<?php echo get_setting('base_url'); ?>/t_topic.html<br>
								<?php echo get_setting('base_url'); ?>/p_admin.html<br>
								<?php echo get_setting('base_url'); ?>/c_123.html
								</span> </td>
						</tr>
						<tr style="height:20px;">
							<th style="width:150px; vertical-align:middle; "> <label style="float:left;">
								<input type="radio" value="99" name="request_route" <?php if ($this->setting['request_route'] == '99'){ ?> checked="true"<?php } ?>>
								Customize route </label>
							</th>
							<td><textarea name="request_route_custom" cols="100" rows="3" id="request_route_custom"><?php echo $this->setting['request_route_custom']; ?></textarea>
							</td>
						</tr>
					</table>
					<p style="color:#999;display:none;" name="request_route_custom" groupid="3">This mode is only effective after opening Rewrite, please fill out the simple regex, One rule per line, in the middle separated using === left the default URL pattern for the site right after the URL for the replacement model, links to / at the beginning, (:num) represents the number, (:any) represents any character<br />
						If replacement rules and classification rules:<br />
						/question/(:any)===/q_(:any)<br />
						/home/explore/category-(:num)===/category/(:num)<br />
						To find a replacement to the home page:<br/>
						/home/explore/===/<br />
						(!) Warning: Before using this function, please make sure that you have to grasp the replacement, rules will lead to the wrong site can not run</p>
					</p>

					<p groupid="3" name="online_count_open">
						<label>Statistics on Online members:</label>
						<input type="radio" name="online_count_open" value="Y" <?php if ($this->setting['online_count_open'] == 'Y'){ ?> checked="true"<?php } ?>/>
						Yes
						<input type="radio" name="online_count_open" value="N" <?php if ($this->setting['online_count_open'] == 'N'){ ?> checked="true"<?php } ?>/>
						No </p>
					<p groupid="3" name="online_interval">
						<label>Online members Statistics Time Range: <span style="font-weight:normal">(Unit: minutes)</span></label>
						<input name="online_interval" class="text-input small-int" type="text" value="<?php echo $this->setting['online_interval']; ?>"/>
					</p>
					<p groupid="3" name="unread_flush_interval">
						<label>Notice unread refreshing time: <span style="font-weight:normal">(Unit: second)</span></label>
						<input name="unread_flush_interval" class="text-input small-int" type="text" value="<?php echo $this->setting['unread_flush_interval']; ?>"/>
					</p>
					<p groupid="3" name="auto_question_lock_day">
						<label>Automatic locking time: <span style="font-weight:normal">(Unit:Day, more than set days without action, the system will be the problem of automatic locking, 0 off automatic locking)</span></label>
						<input name="auto_question_lock_day" class="text-input small-int" type="text" value="<?php echo $this->setting['auto_question_lock_day']; ?>"/>
					</p>
					<p groupid="3" name="statistic_code">
						<label>Site statistics code:</label>
						<textarea name="statistic_code" cols="100" rows="3" id="statistic_code"><?php echo $this->setting['statistic_code']; ?></textarea>
					</p>
					<p groupid="3" name="sensitive_words">
						<label>Question report reason option: <span style=" font-weight:normal;">(One report reason on each line)</span></label>
						<textarea name="report_reason" cols="100" rows="4" id="report_reason" style="width:200px;"><?php echo get_setting('report_reason'); ?></textarea>
					</p>
					<p groupid="3" name="report_message_uid">
						<label>A new report send private messages to remind the user ID: <span style="font-weight:normal;">(Blank is sent to the user ID 1)</span></label>
						<input name="report_message_uid" class="text-input small-int" type="text" value="<?php echo $this->setting['report_message_uid']; ?>"/>
					</p>
					<p groupid="3" name="report_message_uid">
						<label>System time display format:</label>
						<label style="font-weight:normal;"><input type="radio" name="time_style" value="Y" <?php if ($this->setting['time_style'] == 'Y'){ ?> checked="true"<?php } ?>/>XX minutes before form(Example: 5 minutes ago)</label>
						<label style="font-weight:normal;"><input type="radio" name="time_style" value="N" <?php if ($this->setting['time_style'] == 'N'){ ?> checked="true"<?php } ?>/>Complete form (An example: <?php echo date('Y-m-d H:i'); ?>)</label>

					</p>
					<p groupid="3" name="admin_login_seccode">
						<label>Whether need verification code for admin to login backstage:</label>
						<input type="radio" name="admin_login_seccode" value="Y" <?php if ($this->setting['admin_login_seccode'] == 'Y'){ ?> checked="true"<?php } ?>/>
						Yes
						<input type="radio" name="admin_login_seccode" value="N" <?php if ($this->setting['admin_login_seccode'] == 'N'){ ?> checked="true"<?php } ?>/>
						No
					</p>
					<p>
						<input class="button" type="button" onClick="ajax_post($('#_save_form'), _form_process);" value="Save" />
					</p>
					</fieldset>
					<div class="clear"></div>
				</form>
			</div>
		</div>
		<div class="clear"></div>
		<div id="notf_tip" style="display:none;" class="notification png_bg"> <a href="javascript:;" class="close"><img src="<?php echo GET_STATIC_URL;?>/admin/images/icons/cross_grey_small.png" alt="Close" /></a>
			<div id="notf_cont"></div>
		</div>
	</div>
	<!-- footer -->
	<?php TPL::output('admin/global/footer.tpl.htm'); ?>
	<!-- footer -->
</div>
<!-- main -->
</div>
</body></html>