<?php
if( !defined('ISDVBBS') ){
	header('HTTP/1.0 404 Not Found');
	exit;
}
global $imgurl;
$jumplist = boardjumplist($boardid);
?>
<script>
	function BlurCheck(){
			var formobject=document.appform;
			if (formobject.GroupName.value==''){
				document.getElementById('groupnamestr').innerHTML="<font color=\"#FF0000\"><?=$lang['tpl.str33']?></font>";
				document.getElementById('groupnamestr').className = "";
				formobject.GroupName.focus();
			}else{
				if (formobject.GroupName.value.length > 50){
					document.getElementById('groupnamestr').innerHTML="<font color=\"#FF0000\"><?=$lang['tpl.str34']?></font>";
					document.getElementById('groupnamestr').className = "";
					formobject.GroupName.focus();
				}else{
					document.checkform.GroupName_c.value = formobject.GroupName.value;
					document.getElementById('groupnamestr').innerHTML = '请稍等，检测中......';
					document.getElementById('groupnamestr').className = "";
					document.checkform.submit();	
				}
			}
	}

	function showinfo(info){
		if(info == ''){
			document.getElementById('groupnamestr').innerHTML= '　　';
			document.getElementById('groupnamestr').className = "regcheckok";
		}
		else{
			document.getElementById('groupnamestr').innerHTML = "<font color=\"#FF0000\">←"+info+"</font>";
			document.getElementById('groupnamestr').className = "";
		}
	}

	function submitappform(){
		var formobject=document.appform;
		if (formobject.GroupName.value==''){
			document.getElementById('groupnamestr').innerHTML="<font color=\"#FF0000\"><?=$lang['tpl.str33']?></font>";
			document.getElementById('groupnamestr').className = "";
			formobject.GroupName.focus();
		}else{
			if (formobject.GroupName.value.length > 50){
				document.getElementById('groupnamestr').innerHTML="<font color=\"#FF0000\"><?=$lang['tpl.str34']?></font>";
				document.getElementById('groupnamestr').className = "";
				formobject.GroupName.focus();
			}else{
				return true;
			}
		}
		return false;
	}
	function sub()
	{
		if(submitappform())
			document.appform.submit();
	}
</script>
<div class="mainbox">
<!---##########################右边样式部分##########################--->
	<div class="page_right">
	<div>
		<form method="post" action="indivgroup_list.php" name="searchfrm">
		<input type="text" name="keyword" title="<?=$lang['searchinfo']?>" value="<?=$keyword?>" onmouseover="this.className='TextBoxFocus'" onmouseout="this.className='TextBox'" /> <a href="javascript:document.searchfrm.submit();"><img src="<?=$imgurl?>search.gif" /></a>
		</form>
	</div>
	<ul class="border">
		<h1 class="font14"><?=$lang['tpl.str47']?></h1><br />
		<table width="96%">
		<tr>
			<td>
			<?=$lang['tpl.str48']?><br />
			<?=$lang['tpl.str49']?><br />
			<?=$lang['tpl.str50']?>
			</td>
		</tr>
		</table><br />
	</ul>
	<ul><br />
	<div class="padding  border">
	<h1 class="font14"><?=$lang['tpl.str51']?></h1>
<?
	if(!empty($Forum_group['topnew'])){
		if(is_array($Forum_group['topnew'])){
			$ForumTopicArr= $Forum_group['topnew'];
			foreach($ForumTopicArr as $k => $arrdb){
				$_titlelength = $objenc->StrLength($arrdb['groupname']);
				if ( $_titlelength > 4){
					$arrdb['groupname']= $objenc->SubString(strip_tags($arrdb['groupname']), 0, 3).'...';
				}
?>
			<div class="photoroom"><img src="<?=$arrdb['grouppic']?>" width="42" height="42" /><br /><a href="indivgroup_index.php?groupid=<?=$arrdb['groupid']?>"><?=$arrdb['groupname']?></a></div>
<?
			}
		}
	}
?>
		<div style="clear:both"></div><br />
	</div>
	</ul>
	</div>
<!---########################## end 右边样式部分##########################--->
<!---##########################左边样式部分##########################--->

<iframe id="checkframe" name="checkframe" width="0" height="0"></iframe>
<form name="checkform" action="indivgroup_new.php?action=appgroupcheck" method="post" target="checkframe">
<input type="hidden" name="GroupName_c">
</form>
<form method="post" action="?action=appgroup" name="appform" id="appform" onsubmit="javascript:return submitappform();" enctype="multipart/form-data">
<ul class="tableborder heightd page_left">
<h3 class="titlebig"><?=$lang['tpl.str52']?></h3>
  <li><p class="font14"><?=$lang['tpl.str5']?></p><input type="text" name="GroupName" size="40" onclick="this.className='TextBoxFocus';" onBlur="this.className='TextBox';BlurCheck();" /><?=$lang['tpl.str53']?><span id="groupnamestr" ></span></li>
  <li>
	<p class="font14"><?=$lang['tpl.str54']?></p>
	<input type="file" name="groupface" onclick="this.className='TextBoxFocus'" size="40" onBlur="this.className='TextBox'" /><?=$lang['tpl.str55']?>
  </li>
  <li>
	<p class="font14"><?=$lang['tpl.str14']?></p>
	<input type="radio" class="checkbox" name="Locked" value="0" checked><?=$lang['tpl.str15']?>
	<input type="radio" class="checkbox" name="Locked" value="1"><?=$lang['tpl.str16']?>
  </li>
  <li>
	<p class="font14"><?=$lang['tpl.str17']?></p>
	<input type="radio" class="checkbox" name="ViewFlag" value="0" checked><?=$lang['tpl.str18']?>
	<input type="radio" class="checkbox" name="ViewFlag" value="1"><?=$lang['tpl.str19']?>
  </li>
  <li style="height:170px;">
	<p class="font14"><?=$lang['tpl.str56']?></p><textarea name="GroupInfo" onclick="this.className='TextBoxFocus'" onBlur="this.className='TextBox'" cols="60" rows="10"></textarea>
  </li>
  <li>
	<p class="font14"></p>
	<button onMousemove="button_move(this)" onMouseout="button_out(this)" onclick="sub();"> <?=$lang['tpl.str57']?> </button>&nbsp;
	<button onMousemove="button_move(this)" onMouseout="button_out(this)" onclick="document.appform.reset();"><?=$lang['tpl.str58']?></button>
  </li><br /><br />
</ul>
</form>
<div style="clear:both"></div>
<!---########################## end 左边样式部分##########################--->
</div>