<?php
if( !defined('ISDVBBS') ){
	header('HTTP/1.0 404 Not Found');
	exit;
}
global $imgurl;
?>
<!--<?php
print <<<EOT
-->
<!--
EOT;
switch($action){
	case 'power':
print <<<EOT
-->
<FORM METHOD=POST ACTION="?action=power">
<table cellspacing="0" cellpadding="0" align=center class="mainbox tableborder">
  <tr> 
    <th height=21>{$lang['title']}</th>
  </tr>   
  <tr> 
    <td height=24><b>
      {$lang['act_why']}</b>  
	  <select name="title" size=1>
<option value="">{$lang['diy']}</option>
<option value="{$lang['m_article']}">{$lang['m_article']}</option>
<option value="{$lang['gongxian']}">{$lang['gongxian']}</option>
<option value="{$lang['guanshui']}">{$lang['guanshui']}</option>
<option value="{$lang['ads']}">{$lang['ads']}</option>
	  </select>
	  <input type="text" name="content" size=50>  *</td>
  </tr>   
  <tr> 
    <td height=24><b>
      {$lang['user_act']}</b>  {$lang['money']}
	<select name="dowealth" size=1>
<!--
EOT;
for($i=-50; $i<51; $i++){
if ($i == 0){$selstr = 'selected';}
print <<<EOT
-->
<option value="{$i}" {$selstr}>{$i}</option>
<!--
EOT;
$selstr = '';
}
print <<<EOT
-->
	</select>&nbsp;{$lang['meili']}
	<select name="dousercp" size=1>
<!--
EOT;
for($i=-50; $i<51; $i++){
if ($i == 0){$selstr = 'selected';}
print <<<EOT
-->
<option value="{$i}" {$selstr}>{$i}</option>
<!--
EOT;
$selstr = '';
}
print <<<EOT
-->
	</select>&nbsp;{$lang['jingyan']}
	<select name="douserep" size=1>
<!--
EOT;
for($i=-50; $i<51; $i++){
if ($i == 0){$selstr = 'selected';}
print <<<EOT
-->
<option value="{$i}" {$selstr}>{$i}</option>
<!--
EOT;
$selstr = '';
}
print <<<EOT
-->
	</select>&nbsp;{$lang['wei_w']}
	<select name="douserpower" size=1>
<!--
EOT;
for($i=-5; $i<6; $i++){
if ($i == 0){$selstr = 'selected';}
print <<<EOT
-->
<option value="{$i}" {$selstr}>{$i}</option>
<!--
EOT;
$selstr = '';
}
print <<<EOT
-->
	</select>
  *</td>
  </tr> 
<input type=hidden value="yes" name="checked">
<input type=hidden value="{$toid}" name="toid">
<input type=hidden value="{$name}" name="name">
  <tr> 
    <td height=24>
      {$lang['lang1']}&nbsp;<button type="Submit" onMousemove="button_move(this)" onMouseout="button_out(this)" name=Submit >{$lang['submit']}</button></td>
  </tr>   
</table>
</FORM>
<!--
EOT;
	break;
case 'getpermission':
	$lang['edit']=str_replace('$name',$name,$lang['edit']);
print <<<EOT
-->
<table cellspacing="0" cellpadding="0" align=center class="mainbox tableborder">
<tr><th colspan=6 height=25 align=left>{$lang['edit']}</th></tr>
<tr><td colspan=6 height=25><a href="?action=userboardpermission&boardid=0&userid={$toid}">{$lang['lang2']}</a>{$lang['lang3']}</td></tr>
<tr><td colspan=6 height=40 ><B>{$lang['lang4']}</B><BR>
<!--
EOT;
	foreach( $_bs as $val ){
	if ($val['dispboard'] !== false){
		if ($val['depth'] > 0){
			for($i=1; $i<($val['depth']+1); $i++){
				$nbspstr .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
			}
		}
		if ($val['child'] > 0){
			$nbspstr .= '&nbsp;&nbsp;<img src="'.$imgurl.'plus.gif">';
		}else{
			$nbspstr .= '&nbsp;&nbsp;<img src="'.$imgurl.'nofollow.gif">';
		}
		$nbspstr .= "&nbsp;&nbsp;<a href=\"?action=userboardpermission&boardid={$val[boardid]}&userid={$toid}&name={$name}\">";
		if ($val['isuserper'] == 1){
			$nbspstr .= '<font color=red>';
		}
		if ($val['parentid'] == 0){
			$nbspstr .= '<b>' .$val[boardtype]. '</b>';
		}else{
			$nbspstr .= $val['boardtype'];
		}
		if ($val['isuserper'] == 1){
			$nbspstr .= '</font>';
		}
		$nbspstr .= '</a><br><br>';
print <<<EOT
-->
{$nbspstr}
<!--
EOT;
		$nbspstr = '';
	}
	}
print <<<EOT
-->
</td></tr></table>
<!--
EOT;
	break;
case 'userboardpermission':
	if ($founduserpermission !== false){$checked1 = 'checked';}
	if ($foundgrouppermission !== false){$checked2 = 'checked';}
	$lang['lang5']=str_replace(array('$membername','$boardtype'),array($membername,$boardtype),$lang['lang5']);
print <<<EOT
-->
<script src="templates/lang/{$GLOBALS['fsetting']['lang']}/js/admin.js" type="text/javascript"></script>
<FORM METHOD=POST ACTION="?action=saveuserpermission">
<input type=hidden name="userid" value="{$toid}">
<input type=hidden name="boardid" value="{$boardid}">
<input type=hidden name="username" value="{$membername}">
<input type=hidden name="name" value="{$membername}">
<table cellspacing="0" cellpadding="0" align=center class="mainbox tableborder">
	<tr><th colspan=4 height=25 align=left>{$lang['lang5']}</th></tr>
	<tr><td colspan=4 height=25>{$lang['lang6']} <B>{$usertitle}</B> {$lang['lang7']}</td></tr>
	<tr> 
	<td height="25" colspan="4"><input type=radio class="radio" name="isdefault" value="1" {$checked2}><B>{$lang['lang8']}</B> {$lang['lang9']}</td>
	</tr>
	<tr> 
	<td height="25" colspan="4" ><input type=radio class="radio" name="isdefault" value="0" {$checked1}><B>{$lang['lang10']}</B> </td>
	</tr>
</table>
EOT;
grouppermission($regroupsetting);
print <<<EOT

<input type=hidden value="yes" name="groupaction">
</table>
</FORM>
<!--
EOT;
	break;
}
print <<<EOT
-->
<!--
EOT;
?>-->