<!--<?php
include_once PrintEot('left');print <<<EOT
-->
<div class="mb10"><a href="$admin_file?adminjob=hackcenter">插件中心</a> &raquo; <a href="#">{$db_hackdb[team][0]}</a></div>
<!--
EOT;
if(empty($action)){print <<<EOT
-->
<div class="nav3 mb10 ta">
  <ul class="cc">
    <li class="current"><a href="#">基本设置</a></li>
    <li><a href="$basename&action=sort">考核统计</a></li>
  </ul>
</div>
<div class="admin_info mb10">
    <h3 class="h1">友情提示</h3>
    <div class="legend">
    	<ol>
        	<li>综合评分 = 本月管理操作 * 权重 + 本月发帖数量 * 权重 + 本月在线时间 * 权重；</li>
            <li>该团队成员的奖励 = 该成员所属用户组的基本奖励 + 考核奖励 * 综合评分</li>
        </ol>
    </div>
 </div>
<form action="$basename&" method="post">
  <input type="hidden" name="action" value="set" />
  <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="cc list_A list_120">
<!--
EOT;
foreach($group as $key=>$value){
$ifcheck = in_array($value['gid'],$_tmconf['group']) ? 'checked' : '';
print <<<EOT
-->
            <li>
              <input type="checkbox" name="set[group][]" value="$value[gid]" $ifcheck />$value[grouptitle]
             </li>
<!--
EOT;
}print <<<EOT
-->
         </ul>
        </td><td class="td2"></td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">考核方案设置
       </td>
      <td class="td2">
     	 <div class="admin_table_b">
              <table cellpadding="0" cellspacing="0">
                  <tr>
                    <td class="s4"  >考核参数</td>
                    <td class="s4" >考核权重</td>
                  </tr>
                  <tr>
                    <td>本月管理操作</td>
                    <td><input type="text" class="input input_wc" name="set[param][opr]" value="{$_tmconf[param][opr]}" /></td>
                  </tr>
                  <tr>
                    <td>本月发帖数量</td>
                    <td><input type="text" class="input input_wc" name="set[param][post]" value="{$_tmconf[param][post]}" /></td>
                  </tr>
                  <tr>
                    <td>本月在线时间[小时]</td>
                    <td><input type="text" class="input input_wc mr5" name="set[param][oltime]" value="{$_tmconf[param][oltime]}" /></td>
                  </tr>
                </table>
           </div>
        </td><td class="td2"> <div class="help_a">本方案以综合评分为考核结果<br />综合评分 = 所有 考核参数 * 考核权重 的和<br />如果权值为0，则表示参数不参与考核统计</div></td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">基本奖励</td>
      <td class="td2">
      	<div class="admin_table_c">
     	 <table cellpadding="0" cellspacing="0">
         	 <tr>
           		 <td>&nbsp;</td>
<!--
EOT;
foreach($credit->cType as $key=>$c){print <<<EOT
-->
           		 <td>$c</td>
<!--
EOT;
}print <<<EOT
-->
         	 </tr>
<!--
EOT;
foreach($group as $key=>$value){print <<<EOT
-->
         	 <tr>
           		 <td class="s4">$value[grouptitle]</td>
<!--
EOT;
foreach($credit->cType as $k=>$c){print <<<EOT
-->
           		 <td><input type="text" class="input input_wc" name="set[wages][$value[gid]][$k]" value="{$_tmconf[wages][$value[gid]][$k]}" /></td>
<!--
EOT;
}print <<<EOT
-->
         		 </tr>
<!--
EOT;
}print <<<EOT
-->
        	</table>
        </td><td class="td2"><div class="help_a"></div> </td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">考核奖励
        </td>
      <td class="td2">
      	<div class="admin_table_c">
          <table cellpadding="0" cellspacing="0">
              <tr>
<!--
EOT;
foreach($credit->cType as $k=>$c){print <<<EOT
-->
           		 <td>$c</td>
<!--
EOT;
}print <<<EOT
-->
         		 </tr>
         		 <tr>
<!--
EOT;
foreach($credit->cType as $k=>$c){print <<<EOT
-->
           		 <td><input type="text" class="input input_wc" name="set[bonus][$k]" value="{$_tmconf[bonus][$k]}" /></td>
<!--
EOT;
}print <<<EOT
-->
                 </tr>
             </table>
         </div>
        </td><td class="td2"><div class="help_a">每单位综合评分奖励多少积分</div> </td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">考核合格分</td>
      <td class="td2"><input type="text" class="input input_wa" name="set[eligibility]" value="{$_tmconf[eligibility]}" /></td>
	  <td class="td2"><div class="help_a">当综合评分>该值时，该管理成员是合格的<br />设为0，则不启用该功能</div></td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">奖励提醒</td>
      <td class="td2">
     	 <ul class="cc list_80 list_A mr10 fl">
             <li><input type="radio" name="set[ifmsg]" value="1" $ifmsg_Y />开启</li>
             <li><input type="radio" name="set[ifmsg]" value="0" $ifmsg_N />关闭</li>
         </ul>
		</td><td class="td2"><div class="help_a">给团队成员发奖励时短消息提醒</div></td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">短消息标题</td>
      <td class="td2"><input type="text" class="input input_wb" name="set[msgtitle]" value="$_tmconf[msgtitle]" /></td>
	  <td class="td2"><div class="help_a"></div></td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">短消息内容</td>
      <td class="td2">
      	<div style="width:320px;border:1px solid #ccc;padding:5px 9px;background:#fff;" class="mb5">尊敬的 \$username：<br />
         感谢你们对 \$db_bbsname 的支持!现特发 \$credit 作为奖励.<br />
          操作日期 \$time
          </div>
        <textarea name="set[msgdata]" class="textarea">$_tmconf[msgdata]</textarea></td>
		<td class="td2"><div class="help_a">变量参数如下设置：<br />
        1、\$username => 用户名<br />
        2、\$db_bbsname => 论坛名<br />
        3、\$credit => 奖励的积分<br />
        4、\$time => 当前执行的时间<br />
        5、使用方法参考右侧</div></td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">勉励信功能
        </td>
      <td class="td2">
     	 <ul class="cc list_80 list_A mr10 fl">
             <li><input type="radio" name="set[arouse]" value="1" $arouse_Y />开启</li>
             <li> <input type="radio" name="set[arouse]" value="0" $arouse_N />关闭</li>
         </ul>
		</td><td class="td2"><div class="help_a">当设置考核合格分时，给不合格的团队成员发一封特殊的短消息，以勉励其工作</div></td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">勉励信内容
        </td>
      <td class="td2"><textarea name="set[arousemsg]"  class="textarea">$_tmconf[arousemsg]</textarea></td>
	  <td class="td2"><div class="help_a">变量参数与短消息一致</div></td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">自动发放奖励功能</td>
      <td class="td2">
      	<ul class="cc list_80 list_A mr10 fl">
             <li><input type="radio" name="ifopen" value="1" $ifopen_Y />开启</li>
             <li><input type="radio" name="ifopen" value="0" $ifopen_N />关闭</li>
         </ul>
	 </td><td class="td2"><div class="help_a">此功能需到 <a href="javascript:;" onclick="parent.PW.Dialog({id:'plantodo',url:'$admin_file?adminjob=plantodo&action=planset&id=5',name:'计划任务'});">计划任务</a> 里设置自动发放的时间</div></td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">下次执行时间</td>
      <td class="td2">$nexttime</td><td class="td2"><div class="help_a"></div></td>
    </tr>
  </table>
  </div>
  <div class="mb10 tac">
    <span class="btn"><span><button type="submit">提 交</button></span></span>
  </div>
</form>
</form>
<!--
EOT;
}elseif($action=='sort'){print <<<EOT
-->
<div class="nav3 mb10 ta">
   <ul class="cc">
        <li><a href="$basename">基本设置</a></li>
        <li class="current"><a href="#">考核统计</a></li>
    </ul>
</div>
<form action="$basename&" method="post" onsubmit="return checkForm(this);">
  <input type="hidden" name="action" value="payoff" />
  <h2 class="h1">考核统计</h2>
  <div class="admin_table mb10">
  <table width="100%" cellspacing="0" cellpadding="0">
    <tr class="tr2">
      <td>用户名</td>
      <td>头衔</td>
      <td>管理统计</td>
      <td>本月发帖</td>
      <td>本月在线</td>
      <td>综合评分</td>
<!--
EOT;
foreach($credit->cType as $k=>$t){print <<<EOT
-->
      <td>$t</td>
<!--
EOT;
}print <<<EOT
-->
    </tr>
<!--
EOT;
foreach($admindb as $key=>$value){print <<<EOT
-->
    <tr class="tr1 vt">
      <td class="td2">$key</td>
      <td class="td2">{$ltitle[$value[groupid]]}</td>
      <td class="td2">$value[total]</td>
      <td class="td2">$value[monthpost]</td>
      <td class="td2">$value[monoltime]</td>
      <td class="td2">
<!--
EOT;
if($value['assess']>$_tmconf['eligibility']){print <<<EOT
-->
        <span class="s3">$value[assess]</span>
<!--
EOT;
}else{print <<<EOT
-->
        <span class="s1">$value[assess]</span>
        <input type="hidden" name="arouse[]" value="$value[uid]" />
<!--
EOT;
}print <<<EOT
-->
      </td>
<!--
EOT;
foreach($credit->cType as $k=>$t){print <<<EOT
-->
      <td><input type="text" class="input input_wa" name="paycredit[$value[uid]][$k]" value="{$value[wages][$k]}" /></td>
<!--
EOT;
}print <<<EOT
-->
    </tr>
<!--
EOT;
}print <<<EOT
-->
  </table>
  </div>
  <div class="mb10 tac">
    <span class="btn"><span><button type="submit">给团队成员发奖励</button></span></span>
  </div>
</form>
</form>
<script language="JavaScript">
var ifopen = parseInt('$rt[ifopen]');
function checkForm(obj) {
	if (ifopen==1 && !confirm('您已经开启自动发放奖励的程序了，您确定继续吗?')) {
		return false;
	}
	return true;
}
</script>
<!--
EOT;
}include_once PrintEot('adminbottom');
?>-->
