<?php
if( !defined('ISDVBBS') ){
	header('HTTP/1.0 404 Not Found');
	printFooter();
	exit;
}
$bogushtml_settings = explode('|', $forum_setting[102]);	//	α HTML 
!is_numeric($bogushtml_settings[0]) AND ($bogushtml_settings[0] = 0);
$checked1 = (1 == $bogushtml_settings[0] ? '' : ' checked="checked" ');
$checked2 = (1 == $bogushtml_settings[0] ? ' checked="checked" ' : '');
for ($i=0;$i<5;$i++)$checkbogushtmldispbbs[$i]='';
$checkbogushtmldispbbs[intval($bogushtml_settings[1])]=' checked="checked" ';
for ($i=0;$i<6;$i++)$checkbogushtmlindex[$i]='';
$checkbogushtmlindex[intval($bogushtml_settings[2])]=' checked="checked" ';
$str_mod_rewrite_enable = '<font color="red">'.$lang['lang.str1'].'</font>';
//$disabled = ' disabled="disabled" ';
$disabled = '';
if (function_exists('apache_get_modules') AND ($apache_modules = apache_get_modules())) {
	$disabled = '';
	$str_mod_rewrite_enable = (in_array('mod_rewrite', $apache_modules)? '<font color="green">'.$lang['lang.str2'].'</font><font color="red">'.$lang['lang.str3'].'</font>' : $str_mod_rewrite_enable);
}

if (!defined('MAIN_DOMAIN_NAME')) {
	print <<<EOT
	<style>
	#width5501 { width: 550px; }
	</style>
	<br />
	<a name="Top"></a>
	<table border="0" cellspacing="0" cellpadding="0"  align="center" id="width550" class="tableborder">
		<tr> 
			<td height="25" align="left" class="tit1" colspan="2"><a name="setting100"></a>{$lang['lang.str24']} <span class="bfont">{$lang['lang.str4']}</span></td>
		</tr>
		<tr> 
		<td class="forumrow1" style="text-align:center;"  width="15%">
		<input type="submit" name="Submit" value="{$lang['lang.str4']}" style="color: #FF0000;width:80px;height:50px;border:1px outset;">	
		</td>
			<td class="forumrow2"><font color="green"><b><div style="word-wrap: break-word; word-break: break-all;">{$lang['lang.str5']}{$lang['lang.str25']}<a href="#Apache_Settings"><font color="red">{$lang['lang.str6']}</font></a>{$lang['lang.str26']}{$lang['lang.str28']}{$lang['lang.str25']}<a href="#IIS_Settings"><font color="red">{$lang['lang.str7']}</font></a>{$lang['lang.str26']}{$lang['lang.str27']}</div></b></font><BR>
	</td>
		</tr>
	</table>
EOT;
}
print <<<EOT
	<!-- URL Rewrite ÿʼ -->
		<table border="0" cellspacing="0" cellpadding="0"  align="center" id="width550" class="tableborder">
			<form action="" method="post" name="ft_form">
				<input type="hidden" name="doaction" value='save_settings' />
				<input type="hidden" name="ft_settings_0" value="{$ft_settings[0]}" />
			<tr> 
				<td height="25" colspan="2" align="left" class="tit1"><a name="setting100"></a>{$lang['lang.str24']} <span class="bfont">{$lang['lang.str8']}</span></td>
			</tr>
				<tr height="30"> 
				<td class="forumrow1" width="30%"><a name="SettingFullText"></a>
					<b>{$lang['lang.str9']}</b>
					<br />
				</td>
				<td class="forumrow1">  
					<input type="radio" name="bogushtml_settings[0]" value="0" {$disabled} {$checked1} />{$lang['no']}&nbsp;
					<input type="radio" name="bogushtml_settings[0]" value="1" {$disabled} {$checked2} />{$lang['yes']}&nbsp;
				</td>
			</tr>	
			
			<tr  height="30"> 
				<td class="forumrow" width="30%"><a name="SettingFullText"></a>
					<b>{$lang['lang.str30']}</b><BR>
				</td>
				<td class="forumrow">  
					<input type="radio" name="bogushtml_settings[1]" value="0" {$checkbogushtmldispbbs[0]}/>{$lang['lang.str31']}&nbsp;&nbsp;
					<input type="radio" name="bogushtml_settings[1]" value="4" {$checkbogushtmldispbbs[4]}/>{$lang['lang.str31_1']}&nbsp;&nbsp;
					<input type="radio" name="bogushtml_settings[1]" value="1" {$checkbogushtmldispbbs[1]}/>{$lang['lang.str32']}&nbsp;&nbsp;
					<input type="radio" name="bogushtml_settings[1]" value="2" {$checkbogushtmldispbbs[2]}/>{$lang['lang.str33']}&nbsp;&nbsp;
					<input type="radio" name="bogushtml_settings[1]" value="3" {$checkbogushtmldispbbs[3]}/>{$lang['lang.str34']}&nbsp;&nbsp;
					
				</td>
			</tr>
			
			
			<tr  height="30"> 
				<td class="forumrow1" width="30%">
					<b>{$lang['lang.str29']}</b>
					<BR>{$lang['lang.str29_1']}
				</td>
				
				<td class="forumrow1">
					<input type="radio" name="bogushtml_settings[2]" value="0" {$checkbogushtmlindex[0]}/>{$lang['lang.str31']}&nbsp;&nbsp;
					<input type="radio" name="bogushtml_settings[2]" value="5" {$checkbogushtmlindex[5]}/>{$lang['lang.str31_1']}&nbsp;&nbsp;
					<input type="radio" name="bogushtml_settings[2]" value="1" {$checkbogushtmlindex[1]}/>{$lang['lang.str32']}&nbsp;&nbsp;
					<input type="radio" name="bogushtml_settings[2]" value="2" {$checkbogushtmlindex[2]}/>{$lang['lang.str33']}&nbsp;&nbsp;
					<input type="radio" name="bogushtml_settings[2]" value="3" {$checkbogushtmlindex[3]}/>{$lang['lang.str34']}&nbsp;&nbsp;
					<input type="radio" name="bogushtml_settings[2]" value="4" {$checkbogushtmlindex[4]}/>{$lang['lang.str35']}&nbsp;&nbsp;

					</td>
			</tr>
			
			<tr  height="30"> 
				<td class="forumrow" width="30%">
					<b>{$lang['lang.str36']}</b>
					<BR>{$lang['lang.str37']}
				</td>
				<td class="forumrow">
					<input type="text" name="bogushtml_settings_domain" size="32" value="{$fsetting['bogushtml_settings_domain']}">
					
					</td>
			</tr>
			
			<tr>
				<td align="center" class="forumrow1" colspan="2" style="text-align:center;"><input class="button" type="submit" value="{$lang['lang.str10']}" {$disabled} /></td>
			</tr>
			</form>
		</table>
	<!-- URL Rewrite ý -->
EOT;
if (!defined('MAIN_DOMAIN_NAME')) {
	print <<<EOT
	<a name="Apache_Settings"></a>
	<table border="0" cellspacing="1" cellpadding="1"  align="center" id="width550" class="tableborder">
		<tr> 
			<td height="25" align="left" class="tit1"><a name="setting100"></a>{$lang['lang.str24']} <span class="bfont">{$lang['lang.str6']}&nbsp;[<a href="#Top">{$lang['lang.str11']}</a>]</span></td>
		</tr>
		<tr> 
			<td class="forumrow1" width="100%">
				<div style="width: 100%; height: 200px; overflow: auto; border: 0px solid red;">
					<ol style="margin-left:25px; font-size: 12px;">
						<li>{$lang['lang.str12']}</li>
						<li>{$lang['lang.str13']}</li>
						<li>
						{$lang['lang.str14']}<br />						
							&lt;IfModule mod_rewrite.c&gt;<br />
RewriteEngine On<br />
RewriteMap tolowercase int:tolower<br />
RewriteRule ^(.*\/)forum-([-0-9]+)\/?$ $1index.php?__is_iis_rewrite=1&amp;__rewrite_arg=$2<br />
RewriteRule ^(.*\/)board-([-0-9]+)\/?$ $1dispbbs.php?__is_iis_rewrite=1&amp;__rewrite_arg=$2<br />
RewriteRule ^(.*\/)([_a-zA-Z]+)-([-0-9]+)\/?$ $1$2.php?__is_iis_rewrite=1&amp;__rewrite_arg=$3<br />
RewriteRule ^(.*\/index|dispbbs)-([-0-9]+)\.html$ $1.php?__is_iis_rewrite=1&amp;__rewrite_arg=$2<br />
RewriteRule ^(.*\/index|dispbbs)-([^\.]*)\.html$ $1.php?$2<br />
RewriteRule ^(.*[^/]?/)rw(f.*)$ $1index.php?__is_apache_rewrite=1&amp;rewrite_url=$2 [L]<br />
RewriteRule ^(.*[^/]?/)rw(b.*)$ $1dispbbs.php?__is_apache_rewrite=1&amp;rewrite_url=$2 [L]<br />
RewriteRule ^(.*[^/]?/)rw(s.*)$ $1savvy_dispbbs.php?__is_apache_rewrite=1&amp;rewrite_url=$2 [L]<br />
RewriteRule ^(.*[^/]?/)rw(d.*)$ $1dispargue.php?__is_apache_rewrite=1&amp;rewrite_url=$2 [L]<br />
&lt;/IfModule&gt;<br />
						</li>
						<!--<li>
						{$lang['lang.str15']}<br />
							&nbsp;&nbsp;&nbsp;&nbsp;RewriteMap tolowercase int:tolower<br />
							&nbsp;&nbsp;&nbsp;&nbsp;RewriteCond %{QUERY_STRING} (?:boardid|page|id|replyid|star|skin)\=\d+ [NC]<br />				
							&nbsp;&nbsp;&nbsp;&nbsp;RewriteRule ^(.*(?:index|dispbbs))\.asp\$ \$1.php?\${tolowercase:%{QUERY_STRING}}&__is_apache_rewrite=1<br />
						</li>-->
						<li>{$lang['lang.str16']}</li>
					</ol>
				</div>
			</td>
		</tr>
	</table>
	<a name="IIS_Settings"></a>
	<table border="0" cellspacing="1" cellpadding="1"  align="center" id="width550" class="tableborder">
		<tr> 
			<td height="25" align="left" class="tit1"><a name="setting100"></a>{$lang['lang.str24']} <span class="bfont">{$lang['lang.str7']}&nbsp;[<a href="#Top">{$lang['lang.str11']}</a>]</span></td>
		</tr>
		<tr> 
			<td class="forumrow1" width="100%">
				<div style="margin: auto; border: 0px solid red;">
					<font color="red" size="4">{$lang['lang.str17']}</b></font><br />
					<img src="images/url_rewrite/iis_1.gif" alt="a" border="0" />
					<br /><br /><font color="red" size="4"><b>{$lang['lang.str18']}</b></font><br />
					<img src="images/url_rewrite/iis_2.gif" alt="a" border="0" />
					<br /><br /><br /><font color="red" size="4"><b>{$lang['lang.str19']}</b></font><br />
					<img src="images/url_rewrite/iis_3.gif" alt="a" border="0" />
					<br /><br /><br /><font color="red" size="4"><b>{$lang['lang.str20']}</b></font><br />
					<img src="images/url_rewrite/iis_4.gif" alt="a" border="0" />
					<br /><br />
					<img src="images/url_rewrite/iis_5.gif" alt="a" border="0" />
					<br /><br /><br /><font color="red" size="4"><b>{$lang['lang.str21']}</b></font><br />
					<img src="images/url_rewrite/iis_6.gif" alt="a" border="0" />
					<br /><br /><br /><font color="red" size="4"><b>{$lang['lang.str22']}</b></font><br />
					<img src="images/url_rewrite/iis_7.gif" alt="a" border="0" />
					<br /><br /><br />{$lang['lang.str23']}
				</div>
			</td>
		</tr>
	</table>
EOT;
}
?>