Location: PHPKode > projects > CoreAsset > coreasset/templates/initial.tpl
{include file="pre_head.tpl"}
  
  <tr>
    <td valign="TOP" class="header" style="PADDING-LEFT: 6px" bgColor="#000000" height="31">
    <b><font color="#FFFFFF" face="Verdana"> Core Asset Setup : Step 1</font></b></td>
  </tr>
  <!--<tr>
    <td bgColor="#ffffff">
    <img title alt src="images/blank.gif" width="1" height="1"></td>
  </tr>
  <tr>-->
    <td style="PADDING-TOP: 50px" vAlign="top" bgColor="" height="356">
    <form action="?sub=1" name="f1" method="post" onsubmit="return validate();">
  <table width="78%" border="0" align="center" cellpadding="0" cellspacing="0" id="tbl_border">
    <tr>
      <td>
	
  <fieldset  id="db_info" class="altfieldset_bgcolor"  style="border:groove"><legend align="center">Database Information</legend>
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" id="connection" class="altfieldset_bgcolor">
  <tr>
    <td width="26%" >&nbsp;</td>
    <td width="28%" >&nbsp;</td>
    <td width="23%" >&nbsp;</td>
    <td width="23%" >&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><font color="#FF0000">*</font>Host Name/IP </td>
    <td><input name="db_host" class="text" type="text" id="db_host"  {if $val.db_host==""} value="localhost" {else} value="{$val.db_host}" {/if}></td>
    <td>&nbsp;</td>
  </tr>
  
  <tr>
    <td>&nbsp;</td>
    <td><font color="#FF0000">*</font>Database User Id</td>
    <td width="15"><input name="db_userid" class="text" type="text" id="db_userid"  {if $val.db_userid==""} value="root" {else} value="{$val.db_userid}" {/if}></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;&nbsp;Database Password</td>
    <td><input name="db_pwd"  class="text" type="password" id="db_pwd" value="{$val.db_pwd}"></td>
    <td>&nbsp;</td>
  </tr>
  
  <tr>
    <td>&nbsp;</td>
    <td><font color="#FF0000">*</font>Database Name</td>
    <td>
	<input name="db_name" type="text"  class="text" id="db_name" {if $val.db_name==""} value="coreasset" {else} value="{$val.db_name}" {/if} >	</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td></td>
  <td height="10"></td></tr>
  </table>
  </fieldset>
  <br />
    <fieldset id="admin_info" class="altfieldset_bgcolor" style="border:groove"><legend align="center">Admin Information</legend>
	<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" id="login" class="altfieldset_bgcolor">
  
  <tr>
    <td width="26%" >&nbsp;</td>
    <td width="28%" >&nbsp;</td>
    <td width="23%" >&nbsp;</td>
    <td width="23%" >&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><font color="#FF0000">*</font>Adminstrator User Id </td>
    <td><input name="admin_id" class="text" type="text" id="admin_id" value="{$val.admin_id}"></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><font color="#FF0000">*</font>Adminstrator Password</td>
    <td><input name="admin_pwd" class="text" type="password" id="admin_pwd" value="{$val.admin_pwd}"></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><font color="#FF0000">*</font>Confirm Password</td>
    <td><input name="conf_pwd" class="text" type="password" id="conf_pwd" value="{$val.conf_pwd}"></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><font color="#FF0000">*</font>Adminstrator Name</td>
    <td><input name="admin_name" class="text" type="text" id="admin_name" value="{$val.admin_name}"></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><font color="#FF0000">*</font>Adminstrator Email</td>
    <td><input name="admin_email" class="text" type="text" id="admin_email" value="{$val.admin_email}"></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="4" align="center" height="10"></td>
  </tr>
  <tr>
    <td colspan="4" align="center" height="10"><font color="#FF0000">*</font> Denotes a Mandetory Field </td>
  </tr>
  <tr>
    <td colspan="4" align="center" height="10"></td>
  </tr>
</table>
 </fieldset>

	<table id="btn" align="center">
	<tr><td>  
	  <input type="image" src="images/submit.gif" />
    </td></tr></table>
	  </td>
    </tr>
  </table>
</form>

    </td>
  </tr>
  <tr>
 <td>
{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.db_host.value=="")
 {
  alert("Please Enter Host Name !");
  document.f1.db_host.focus();
  return false;
 }
 if(document.f1.db_userid.value=="")
 {
  alert("Please Enter User Id !");
  document.f1.db_userid.focus();
  return false;
 }

 if(document.f1.db_name.value=="")
 {
  alert("Please Enter Database Name !");
  document.f1.db_name.focus();
  return false;
 }
 if(document.f1.admin_id.value=="")
 {
  alert("Please Enter Adminstrator Id !");
  document.f1.admin_id.focus();
  return false;
 }
 if(document.f1.admin_pwd.value=="")
 {
  alert("Please Enter Adminstrator Password !");
  document.f1.admin_pwd.focus();
  return false;
 }
 if(document.f1.conf_pwd.value=="")
 {
  alert("Please Enter Confirm Password !");
  document.f1.conf_pwd.focus();
  return false;
 }
 if(document.f1.admin_pwd.value != document.f1.conf_pwd.value)
{
 alert("Confirm Password Does Not Match !");
 document.f1.conf_pwd.value="";
 document.f1.conf_pwd.select();
 return false;
 
}
 if(document.f1.admin_name.value=="")
 {
  alert("Please Enter Adminstrator Name !");
  document.f1.admin_name.focus();
  return false;
 }
 if(!checkEmail(document.f1.admin_email.value))
{
 alert("Email address is blank or it is invalid !");
 document.f1.admin_email.select();
 return false;
 }

 return confirm("Proceed With Given Details ?");
}
</script>
{/literal}
Return current item: CoreAsset