Location: PHPKode > projects > CoreAsset > coreasset/templates/add_user.tpl
{include file="head.tpl"}
{include file="left.tpl"}

<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="21"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/corner9.gif" width="5" height="21"></td>
<td width="99%" class="header"><span class="whitetext">

Add User
</span></td>
<td><img src="images/corner10.gif" width="5" height="21"></td>
</tr>
</table></td>
</tr>
<tr>
<td class="border3side" valign="top" height="100%"><table width="100%" height="100%" border="0" cellspacing="8" cellpadding="0">
<tr>
<td valign="top">

<!-- #######################   Paste the Table to Table from here ############## -->
<table cellSpacing="0" cellPadding="0" width="98%" align="center" border="0">
         
          <!--<tr>
            <td><img title alt src="images/blank.gif" width="1" height="1"></td>
          </tr>-->
          <tr>
            <!--<td style="border-left: 1px solid #bbbbbb; border-right: 1px solid #bbbbbb" bgColor="#bbbbbb">-->
            <!--<img title height="3" alt src="images/blank.gif" width="1" valign="top">--><!--</td>-->
          </tr>
          <tr>
            <!--<td style="border-left: 1px solid #bbbbbb; border-right: 1px solid #bbbbbb; padding-left: 18px; padding-right: 23px; padding-top: 11px" vAlign="top" bgColor="#ededed" height="180">-->
             <td> 
            {if $status < 4}
            <table borderColor="#ffffff" cellSpacing="1" cellPadding="0" width="100%" border="0">
              <form name="f1" action="?act=add" method="post" onSubmit="return validate();">
                <tr>
                  <td class="txtbox_bgcolor" width="20%">
                  &nbsp;User ID</td>
                  <td class="txtbox_bgcolor" width="33%">
                  <input name="login"  type="text" size="20" class="text"></td>
                </tr>
                <tr>
                  <td class="alttxtbox_bgcolor" width="20%">
                  &nbsp;Password</td>
                  <td class="alttxtbox_bgcolor" width="33%">
                  <input id="user_password" style="DISPLAY: inline" type="password" name="password" class="text">
                  <input id="user_password_text" style="DISPLAY: none" class="text">
                  &nbsp;
                  <a onmouseover="javascript:ShowPassword(document.getElementById('user_password') , document.getElementById('user_password_text'))" onclick onmouseout="javascript: HidePassword(document.getElementById('user_password') , document.getElementById('user_password_text'))" href="javascript:void(0)">
                     <img src="images/show_hide.gif" border="0" title="View Password">
                  </a>
                  </td>
                </tr>
                <tr>
                  <td class="txtbox_bgcolor" width="20%">
                  &nbsp;Full Name</td>
                   <td class="txtbox_bgcolor" width="33%">
                  <input name="full_name" type="text" size="20" class="text"></td>
                </tr>
                <tr>
                  <td class="alttxtbox_bgcolor" width="20%">
                  &nbsp;Email ID</td>
                  <td class="alttxtbox_bgcolor" width="33%">
                  <input name="email" type="text" size="20" class="text"></td>
                </tr>
                <tr>
                  <td class="txtbox_bgcolor" width="20%">
                  &nbsp;Privillage</td>
                  <td class="txtbox_bgcolor" width="33%">
                  <select name="status">
                          <option value="">-- Select Privillage --</option>
                          <option value="1">Administrator</option>
                          <option value="2">Supervisor</option>
                         <!-- <option value="3">Write</option>-->
                          <option value="4">Reader</option>
                  </select>
                </tr>

                <tr>
                  <td class="alttxtbox_bgcolor" width="20%" valign="TOP">
                  &nbsp;Comments</td>
                  <td class="alttxtbox_bgcolor" width="33%">
		  <textarea name="comments" type="text" class="text" rows="6" cols="15"></textarea>
		  </td>
                </tr>


                <tr>
                  <td class="txtbox_bgcolor" width="20%">
                  &nbsp;Send Email</td>
                  <td class="txtbox_bgcolor" width="33%">
                  Yes &nbsp;<input name="snd_email" type="radio" value="Y">
		  No &nbsp;<input name="snd_email" type="radio" value="N" checked>
		  </td>
                </tr>
                <tr>
                  <td class="btn_bg" align="left">&nbsp;</td>
		  <td class="btn_bg" align="left"><input type="image" src="images/add_user.gif" name="add">
		  </td> <!--onclick="return conf();"-->
                </tr>
              </form>
            </table>
            
            {else}
            <table borderColor="#ffffff" cellSpacing="1" cellPadding="0" width="100%" border="0">
                <tr>
                  <td class="txt" align="center" width="20%" height="23">
                  <font color="RED">{$mes}</font>
                  </td>
                </tr>
             </table>
            {/if}
            </td>
          </tr>
          <!--<tr>
            <td style="border-left: 1px solid #bbbbbb; border-right: 1px solid #bbbbbb" bgColor="#bbbbbb">
            <img title height="4" alt src="images/blank.gif" width="1"></td>
          </tr>-->
          </table>
        </td>
      </tr>
    </table>



<!-- ########################      End Here ##########################-->

{include file="foot.tpl"}
{literal}
<script language="Javascript">
function checkEmail(str)
	{
		if(str=="")
		 testResults=false;
		else
		{ 
		var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
		if( filter.test(str) )
			testResults=true;
		else
			testResults=false;
		}	
	 return(testResults);
	}	
function validate()
{
 if(document.f1.login.value=="")
 {
  alert("Please Enter an User ID");
  document.f1.login.focus();
  return false;
 }

 if(document.f1.password.value=="")
 {
  alert("Please Enter Password");
  document.f1.password.focus();
  return false;
 }

 if(document.f1.full_name.value=="")
 {
  alert("Please Enter Full Name");
  document.f1.full_name.focus();
  return false;
 }

 if(document.f1.email.value=="")
 {
  alert("Please Enter an Email ID");
  document.f1.email.focus();
  return false;
 }
 if(!checkEmail(document.f1.email.value))
{
 alert("Email address is blank or it is invalid");
 document.f1.email.select();
 return false;
 }
   

 if(document.f1.status.value=="")
 {
  alert("Please Choose a Privillage");
  document.f1.status.focus();
  return false;
 }
 /*else
 {
 return true ;
 }*/
return confirm("Are you sure? The User will be added!");
}

function ShowPassword(pass,show) {
	show.style.display='inline';
	show.value=pass.value;
	pass.style.display='none';
	show.focus();
}
function HidePassword(pass,show) {
	show.style.display='none';
	pass.value=show.value;
	pass.style.display='inline';
	show.blur();
	pass.focus();
}

/*function conf()
{    if(return( validate) == true)
  { 
	input_box=confirm("Are you sure? The User will be added!");

	if (input_box==true)
	{
		return true;
	}

	else
	{
		return false;
	}
 }
}*/

</script>
{/literal}
Return current item: CoreAsset