<?php /* Smarty version 2.6.6, created on 2006-12-21 16:32:58
         compiled from adduser.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'default', 'adduser.html', 101, false),)), $this); ?>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<script language=JavaScript1.2>
function ismail(mail)
{
	return(new RegExp(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/).test(mail));
}
function isqq(qq)
{
	return(isNaN(qq));
}
function regcheck(formct){
	if (formct.manage.value=='' || formct.password.value=='' || formct.passwordrepeat.value==''){
		alert('會員名或密碼為空,請填寫');
		return false; 
	}
	if (formct.password.value!=formct.passwordrepeat.value){
		alert('兩次輸入的密碼不一致，請檢查後重試。');
		return false; 
	}
	if (formct.password.value.length<5){
		alert('密碼太少，請用6位以上');
		return false;
	}
	if (isqq(formct.qq.value)){
		alert('QQ格式不對,請填寫');
		return false;
	}
	if (!ismail(formct.email.value)){
		alert('email格式不對,請填寫');
		return false;
	}
}
</script>
<title>註冊 - PHPStat v1.0 20060618</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body topmargin="0">
<table  width="100%" border="0" cellspacing="1" cellpadding="0" >
  <tr> 
    <td><strong>新用戶註冊</strong></td>
  </tr>
  <tr> 
    <td><form name="form1" method="post" action="adduser.php" onSubmit='return regcheck(form1)'>
        <table  style="BORDER-COLLAPSE: collapse" borderColor=#93C2DC cellPadding=2 width="100%" border=1>
          <tr > 
            <td colspan="2"><div align="center"><strong><br>
                填寫註冊資料</strong></div></td>
          </tr>
          <?php if (count($_from = (array)$this->_tpl_vars['UserData'])):
    foreach ($_from as $this->_tpl_vars['Key'] => $this->_tpl_vars['Item']):
?> 
          <tr > 
            <td width="26%"> <div align="right">用戶名:</div></td>
            <td width="74%"><input name="manage" type=<?php if ($this->_tpl_vars['action'] == 'update'): ?>hidden<?php else: ?>text<?php endif; ?> class=input id="manage" value="<?php echo $this->_tpl_vars['Item']['manager']; ?>
" maxlength="12"> 
              3-12位英文或數字字符</td>
          </tr>
		  <?php if ($this->_tpl_vars['Item']['group'] != 'strongsuperadmin'): ?>
          <tr > 
            <td> <div align="right">用戶權限:</div></td>
            <td><select name="group" id="group">
                <option value="<?php echo $this->_tpl_vars['Item']['group']; ?>
"><?php echo $this->_tpl_vars['Item']['groupname']; ?>
</option>				
                <option value="guest">僅查看報告</option>				
                <option value="admin">普通管理員</option>
                <option value="superadmin">帳戶管理員</option>
              </select> <strong>帳戶管理員</strong>擁有全部權限，<strong>普通管理員</strong>獨立網站權限，<strong>僅查看報告</strong>沒有查看報告權限</td>
          </tr>
		  <?php endif; ?>
          <tr > 
            <td> <div align="right">密碼:</div></td>
            <td><input name="password" type="password" class=input id="password" maxlength="12" value="<?php echo $this->_tpl_vars['Item']['manager']; ?>
">
              6-12位英文字符，請牢記！</td>
          </tr>
          <tr > 
            <td> <div align="right">重複密碼:</div></td>
            <td><input name="passwordrepeat" type="password" class=input id="passwordrepeat" maxlength="12" value="<?php echo $this->_tpl_vars['Item']['manager']; ?>
">
              6-12位英文字符，請牢記！</td>
          </tr>
          <tr > 
            <td> <div align="right">QQ:</div></td>
            <td><input name="qq" type="text" id="qq" class=input value="<?php echo $this->_tpl_vars['Item']['qq']; ?>
"></td>
          </tr>
          <tr > 
            <td> <div align="right">Email:</div></td>
            <td><input name="email" type="text" id="email" class=input value="<?php echo $this->_tpl_vars['Item']['email']; ?>
"></td>
          </tr>
          <tr > 
            <td> <div align="right">Msn:</div></td>
            <td><input name="msn" type="text" id="msn" class=input value="<?php echo $this->_tpl_vars['Item']['msn']; ?>
"></td>
          </tr>
          <?php endforeach; unset($_from); endif; ?> <?php if ($this->_tpl_vars['Site'] == 'true'): ?> 
          <tr > 
            <td><div align="right">分配站點:</div></td>
            <td><select name="user_site[]" size="5" multiple width=120>
                <?php if (count($_from = (array)$this->_tpl_vars['SiteData'])):
    foreach ($_from as $this->_tpl_vars['Item']):
?>
				<option value=<?php echo $this->_tpl_vars['Item']['website'];  echo $this->_tpl_vars['Item']['selected']; ?>
><?php echo $this->_tpl_vars['Item']['sitename']; ?>
</option>
			    <?php endforeach; unset($_from); endif; ?>
				
              </select></td>
          </tr>
          <?php endif; ?> 
          <tr > 
            <td colspan=2 align=center><input type="submit" name="Submit" value= <?php if ($this->_tpl_vars['action'] != ""): ?>修改<?php else: ?>註冊<?php endif; ?> class=pagebutton> 
              <input name="action" type="hidden" id="action" value="<?php echo ((is_array($_tmp=@$this->_tpl_vars['action'])) ? $this->_run_mod_handler('default', true, $_tmp, 'insert') : smarty_modifier_default($_tmp, 'insert')); ?>
">
              <input type="button" name="Submit2" value="返回" onclick="<?php if ($this->_tpl_vars['action'] != ""): ?>window.history.go(-1)<?php else: ?>window.close()<?php endif; ?>" class=pagebutton> </td>
          </tr>
        </table>
      </form></td>
  </tr>
</table>

