<!--
<?php
print <<<EOT
-->
<div class="mb10">評價控件管理</div>
<div class="nav3 mb10 ta">
    <ul class="cc">
      <li {$currentClass[thread]}><a href="{$default_handler_url}1">帖子</a></li>
      <li {$currentClass[blog]}><a href="{$default_handler_url}2">日志</a></li>
      <li {$currentClass[picture]}><a href="{$default_handler_url}3">照片</a></li>
      <li {$currentClass[power]}><a href="{$default_handler_url}100">評價權限設置</a></li>
    </ul>
 </div>
<!--
EOT;
//評價權限設置部分
if($typeId == 100){
print <<<EOT
-->
<form action="{$default_handler_url}100" method="post">
<input type="hidden" value="power" name="action">
<h2 class="h1">全局權限設置</h2>
<div class="admin_table mb10">
  <table width="100%" cellspacing="0" cellpadding="0">
  <tr class="tr1 vt">
    <td class="td1">開啟評價相應控件</td>
    <td class="td2">
     <ul class="list_A">
        <li><input type="checkbox" value="1" name="power[type][1]" {$currentPower[1]}/>帖子評價</li>
        <li> <input type="checkbox" value="1" name="power[type][2]" {$currentPower[2]}/>日志評價</li>
        <li><input type="checkbox" value="1" name="power[type][3]" {$currentPower[3]}/>照片評價</li>
     </ul>
    </td>
  </tr>
  </table>
  </div>
  <h2 class="h1">用戶組權限設置[每天最多可允許評價次數]</h2>
  <div class="admin_table mb10">
  <table width="100%" cellspacing="0" cellpadding="0">
  <!--
EOT;
foreach($userGroups as $gptype=>$groups){
print <<<EOT
-->
  <tr class="tr2 vt td_bgB">
    <td width="100">{$userGroupTitles[$gptype]}</td>
    <td width="160">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <!--
EOT;
foreach($groups as $group){
print <<<EOT
-->
  <tr class="tr1 vt">
    <td class="td2">{$group[grouptitle]}</td>
    <td class="td2"><img src="{$imageUrl}{$group[groupimg]}.gif" /></td>
    <td class="td2"><input type="text" value="{$groupSets[$group[gid]]}" name="power[group][$group[gid]]"  class="input input_wc mr5" />次</td>
  </tr>
<!--
EOT;
}
}
print <<<EOT
-->
</table>
</div>
<div class="mb10 tac">
<span class="btn"><span><button type="submit">提 交</button></span></span>
</div>
<!--
EOT;
}else{
//評價後台配置部分
print <<<EOT
-->
<h2 class="h1"><span class="fl mr10">如果需要自定義上傳圖標，請上傳至目錄[/hack/rate/images/]</span><a href="javascript:;"  class="btn_add fl" onclick="sendmsg('{$default_ajax_url}&job=ajax&typeid={$typeId}','',this.id);"><i>添加自定義評價</i></a></h2>
<form action="{$default_handler_url}{$typeId}" method="post">
<input type="hidden" value="modify" name="action">
<div class="admin_table mb10">
	<table cellpadding="0" cellspacing="0" width="100%">
    <tr class="tr2">
      <td width="24">啟用</td>
      <td width="80">名稱</td>
      <td>所屬類別</td>
      <td width="140">調用圖標名</td>
      <td>積分設置</td>
      <td>評價者</td>
      <td>作者</td>
      <td>操作</td>
    </tr>
    <!--
EOT;
foreach($rateConfigs as $config){
if($config[isdefault]){
print <<<EOT
-->
    <tr class="tr1 vt">
      <td class="td2"><input name="rateconfig[$config[id]][isopen]" type="checkbox" value="1" {$config[isopen]}/></td>
      <td class="td2">{$config[title]}</td>
      <td class="td2">{$config[typename]}</td>
      <td class="td2"><input name="rateconfig[$config[id]][icon]" type="text" class="input input_wc" value="$config[icon]" />
        <img src="{$imageUrl}{$config[icon]}" align="absmiddle" width="32" /></td>
      <td class="td2">{$config[creditset]} </td>
      <td class="td2">{$config[voternum]} </td>
      <td class="td2">{$config[authornum]}</td>
      <td class="td2">&nbsp;</td>
    </tr>
    <!--
EOT;
}else{
print <<<EOT
-->
    <tr class="tr1 vt">
      <td class="td2"><input name="rateconfig[$config[id]][isopen]" type="checkbox" value="1" {$config[isopen]}/></td>
      <td class="td2"><input name="rateconfig[$config[id]][title]" type="text" class="input input_wc" value="$config[title]" size="10" /></td>
      <td class="td2">{$config[typename]}</td>
      <td class="td2"><input name="rateconfig[$config[id]][icon]" type="text" class="input input_wc" value="$config[icon]" size="10" />
        <img src="{$imageUrl}{$config[icon]}" align="absmiddle" width="32" /></td>
      <td class="td2">{$config[creditset]} </td>
      <td class="td2">{$config[voternum]} </td>
      <td class="td2">{$config[authornum]} </td>
      <td class="td2"><a href="javascript:;" class="mr20" onclick="sendmsg('{$default_ajax_url}&show=update&job=ajax&id={$config[id]}&typeid={$config[typeid]}','',this.id);">[編輯]</a>&nbsp;&nbsp;&nbsp;<a href="{$default_handler_url}{$typeId}&action=delete&id={$config[id]}">[刪除]</a></td>
    </tr>
<!--
EOT;
}
}
print <<<EOT
-->
  </table>
</div>
<div class="mb10 tac">
<span class="btn"><span><button type="submit">提 交</button></span></span>
</div>
</form>
<!--
EOT;
}
?>
-->
