<!-- <?php
include_once PrintEot('left');
if(!$action){print <<<EOT
-->
<table width=98% align=center cellspacing=1 cellpadding=3 class=i_table>
<tr>
	<td class=b>
		[<b>{#colonyset_set}</b>]
		[<a href="$amind_file?adminjob=hack&hackset=colony&id=colony&action=classset">{#colonyset_classset}</a>]
		[<a href="$amind_file?adminjob=hack&hackset=colony&id=colony&action=colonyset">{#colonyset_colonyset}</a>]
		[<a href="$amind_file?adminjob=hack&hackset=colony&id=colony&action=log">{#colonyset_log}</a>]
	</td>
</tr>
</table>
<br>
<form method="post" action="$basename&">
<input type="hidden" name="action" value="submit">
<table width="98%" align=center cellspacing=1 cellpadding=3 class=i_table>
<tr><td class=head align=center colspan=2>{#colonyset_set}</td></tr>
<tr class=b><td width="40%">{#colonyset_ifopen}</td><td>
<input type="radio" name="config[cn_open]" value="1" $open_Y>{#_yes}
<input type="radio" name="config[cn_open]" value="0" $open_N>{#_no}</td></tr>
<tr class=b><td>{#colonyset_ifcancel}</td><td>
<input type="radio" name="config[cn_remove]" value="1" $remove_Y>{#_yes}
<input type="radio" name="config[cn_remove]" value="0" $remove_N>{#_no}</td></tr>
<tr class=b><td>{#colonyset_ifregnew}</td><td>
<input type="radio" name="config[cn_newcolony]" value="1" $newcolony_Y>{#_yes}
<input type="radio" name="config[cn_newcolony]" value="0" $newcolony_N>{#_no}</td></tr>

<tr class=b><td>{#colonyset_currency}</td><td>
<input type="radio" name="config[cn_virement]" value="1" $virement_Y>{#_yes}
<input type="radio" name="config[cn_virement]" value="0" $virement_N>{#_no}</td></tr>
<tr class=b><td>{#colonyset_rate}</td>
<td><input type="text" name="config[cn_rate]" value="$cn_rate"></td></tr>

<tr class=b><td>{#colonyset_name}</td>
<td><input type="text" name="config[cn_name]" size=30 value="$cn_name"></td></tr>
<tr class=b><td>{#colonyset_group}</td><td>
<table cellspacing='0' cellpadding='0' border='0' width='100%' align='center'><tr class=b>$usergroup</tr></table>
</td></tr>
<tr class=b><td>{#colonyset_regmoney}</td>
<td><input type="text" name="config[cn_createmoney]" size=30 value="$cn_createmoney"></td></tr>
<tr class=b><td>{#colonyset_joinmoney}</td>
<td><input type="text" name="config[cn_joinmoney]" size=30 value="$cn_joinmoney"></td></tr>
<tr class=b><td>{#colonyset_regnum}</td>
<td><input type="text" name="config[cn_allowcreate]" size=30 value="$cn_allowcreate"></td></tr>
<tr class=b><td>{#colonyset_joinnum}</td>
<td><input type="text" name="config[cn_allowjoin]" size=30 value="$cn_allowjoin"></td></tr>
<tr class=b><td>{#colonyset_mostnum}</td>
<td><input type="text" name="config[cn_memberfull]" size=30 value="$cn_memberfull"></td></tr>
<tr class=b><td>{#colonyset_logosize}</td>
<td><input type="text" name="config[cn_imgsize]" size=30 value="$cn_imgsize"></td></tr>
<tr class=b><td>{#colonyset_width}</td>
<td><input type="text" name="config[cn_imgwidth]" size=30 value="$cn_imgwidth"></td></tr>
<tr class=b><td>{#colonyset_height}</td>
<td><input type="text" name="config[cn_imgheight]" size=30 value="$cn_imgheight"></td></tr>
</table>
<br><center><input type="reset" value="{#reset}"><input type="submit" value="{#submit}"></center></form>
<!--
EOT;
}elseif($action=='classset'){print <<<EOT
-->
<table width=98% align=center cellspacing=1 cellpadding=3 class=i_table>
<tr>
	<td class=b>
		[<a href="$amind_file?adminjob=hack&hackset=colony&id=colony">{#colonyset_set}</a>]
		[<b>{#colonyset_classset}</b>]
		[<a href="$amind_file?adminjob=hack&hackset=colony&id=colony&action=colonyset">{#colonyset_colonyset}</a>]
		[<a href="$amind_file?adminjob=hack&hackset=colony&id=colony&action=log">{#colonyset_log}</a>]
	</td>
</tr>
</table>
<br>
<table width="60%" align=center cellspacing=1 cellpadding=3 class=i_table>
<tr class=head><td colspan=3>{#colonyset_class}</td></tr>
<tr class=head_2 align=center><td>ID</td><td>{#colonyset_classname}</td><td>{#del}</td></tr>
<!--
EOT;
$id=0;
foreach($cnclass as $key => $value){
$id++;
print <<<EOT
-->
<tr class=b align=center><td>$id</td><td>$value[cname]</td><td><a href="$basename&action=delclass&id=$value[cid]">{#del}</a></td></tr>
<!--
EOT;
}print <<<EOT
-->
</table>

<form method=post action="$basename&">
<input type="hidden" name="action" value="addclass">
<table width="60%" align=center cellspacing=1 cellpadding=3 class=i_table>
<tr class=head><td colspan=2>{#colonyset_addclass}</td></tr>
<tr class=b><td width="35%">{#colonyset_classname}</td>
<td><input type="text" name="cname" size=50></td></tr></table>
<br><center><input type="submit" value="{#submit}"></center></form>
<!--
EOT;
}elseif($action=='colonyset'){print <<<EOT
-->
<table width=98% align=center cellspacing=1 cellpadding=3 class=i_table>
<tr>
	<td class=b>
		[<a href="$amind_file?adminjob=hack&hackset=colony&id=colony">{#colonyset_set}</a>]
		[<a href="$amind_file?adminjob=hack&hackset=colony&id=colony&action=classset">{#colonyset_classset}</a>]
		[<b>{#colonyset_colonyset}</b>]
		[<a href="$amind_file?adminjob=hack&hackset=colony&id=colony&action=log">{#colonyset_log}</a>]
	</td>
</tr>
</table>
<br>
<table width="60%" align=center cellspacing=1 cellpadding=3 class=i_table>
<tr class=head><td colspan=4>{#colonyset_colonyset}</td></tr>
<tr class=head_2 align=center>
	<td>ID</td>
	<td>{#colonyset_name}</td>
	<td>{#colonyset_classname}</td>
	<td>{#del}</td>
</tr>
<!--
EOT;
$num=($page-1)*$db_perpage;
foreach($colonys as $key => $value){
$num++;
print <<<EOT
-->
<tr class=b align=center>
<td>$num</td>
<td>$value[cname]</td>
<td>$value[classname]</td>
<td><a href="$basename&action=delcolony&id=$value[id]">{#del}</a></td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<center>$pages</center>
<!--
EOT;
}elseif($action=='log'){print <<<EOT
-->
<table width=98% align=center cellspacing=1 cellpadding=3 class=i_table>
<tr>
	<td class=b>
		[<a href="$amind_file?adminjob=hack&hackset=colony&id=colony">{#colonyset_set}</a>]
		[<a href="$amind_file?adminjob=hack&hackset=colony&id=colony&action=classset">{#colonyset_classset}</a>]
		[<a href="$amind_file?adminjob=hack&hackset=colony&id=colony&action=colonyset">{#colonyset_colonyset}</a>]
		[<b>{#colonyset_log}</b>]
	</td>
</tr>
</table>
<br>
<form action="$basename&" method=post>
<table width=98% align=center cellspacing=0 cellpadding=0>
<tr><td><table width=100% cellspacing=1 cellpadding=3 class=i_table>
<tr><td class=head colspan=5><b>{#log_search}</b></td></tr>
<tr align=center>
<td class=b>{#record_keyword}</td>
<td class=b><input type=text name=keyword></td>
<td class=b><input type=submit value='{#submit}'></td></tr>
</table></td></tr></table></form>
<br>
<form method=post action="$basename&">
<input type="hidden" name="job" value="del">
<table width="$tablewidth" cellspacing="1" cellpadding="5" align="center" class="i_table">
<tr class=head><td colspan="7"><b>{#colony_donatelog}</b></div></td></tr>
<tr class="head_2" align="center">
<td width="5%">ID</td>
<td width="5%">{#log_type}</td>
<td width="15%">$cn_name</td>
<td width="15%">{#username}</td>
<td width="*">{#log_descrip}</td>
<td width="15%">{#date}</td>
<td width="5%">{#del}</td>
</tr>
<!--
EOT;
$num=($page-1)*$db_perpage;
foreach($logdb as $key => $value){
$num++;
print <<<EOT
-->
<tr class="b" align="center">
	<td>$num</td>
	<td>{$logtype[$value[type]]}</td>
	<td width="5%">
		<a href="hack.php?H_name=colony&cyid=$value[field2]&job=view&id=$value[field2]" target="_blank">
			$value[field3]
		</a>
	</td>
	<td>$value[username1]</td>
	<td><div style='TABLE-LAYOUT: fixed;WORD-WRAP: break-word' align="left">$value[descrip]</div></td>
	<td>$value[date]</td>
	<td><input type="checkbox" name="selid[]" value="$value[id]"></td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</td></tr></table>
 &nbsp; $pages
<br>
<center>
<input type="button" name="chkall" value="{#sel_all}" onclick="CheckAll(this.form,'2')">
<input type="submit" value="{#submit}">
</center>
</form>
<script language=JavaScript>
function CheckAll(form,len){
	for (var i=0;i<form.elements.length-len;i++){
		var e = form.elements[i];
		e.checked == true ? e.checked = false : e.checked = true;
	}
}
</script>
<!-- 
EOT;
}include_once PrintEot('adminbottom');
?>-->