Location: PHPKode > projects > DDL CMS > Upload these files to your webspace/topsites/templates/admin_createaccount.tpl
<?PHP

foreach(range(1, 3) as $index)
{
    if( !IsEmptyString($GLOBALS["NAME_FIELD_$index"]) )
    {
        if( strlen($GLOBALS["NAME_FIELD_$index"]) > 23 )
        {
            $GLOBALS["NAME_FIELD_$index"] = trim(substr($GLOBALS["NAME_FIELD_$index"], 0, 20)) . '...';
        }
    }
}
?>
<script type="text/javascript">

function checkForm(form)
{
    if( form.Email.value.search(/^[\w\d][\w\d\,\.\-]*\@([\w\d\-]+\.)+([a-zA-Z]+)$/) == -1 )
    {
        alert("Invalid E-mail Address");
        return false;
    }


    if( form.Site_URL.value.search(/^http:\/\/[\w\d\-\.]+\.[\w\d\-\.]+/) == -1 )
    {
        alert("Invalid Site URL");
        return false;
    }

    if( !form.Title.value )
    {
        alert("Site title is required");
        return false;
    }

    if( !form.In_Weight.value || !form.Out_Weight.value )
    {
        alert("Both the in hit weight and out hit weight are required");
        return false;
    }


    if( !form.Password.value || !form.Username.value )
    {
        alert("Both a username and password are required");
        return false;
    }
}
</script>
<?PHP
if( isset($message) )
{
?>
<div id="message">
<?PHP echo $message; ?>
</div>
<br />
<?PHP
}
?>

<form name="form" action="admin.php" target="_self" method="post" onSubmit="return checkForm(this);">

<table>
<tr>
<td>
Create an Account<br><br>
</td>
</tr>
<tr>
<td align=right>
<b>Username: </b>
</td>
<td>
<input type="text" name="Username" size="30">
</td>
</tr>
<tr>
<td align=right>
<b>Password: </b>
</td>
<td>
<input type="text" name="Password" size="30">
</td>
</tr>
<tr>
<td align=right>
<b>E-mail Address: </b>
</td>
<td>
<input type="text" name="Email" size="30">
</td>
</tr>
<tr>
<td align=right>
<b>Site Title: </b>
</td>
<td>
<input type="text" name="Title" size="30">
</td>
</tr>
<tr>
<td align=right>
<b>Site URL: </b>
</td>
<td>
<input type="text" name="Site_URL" size="30">
</td>
</tr>
<tr>
<td>
<br />
<input type="submit" value="Create Account">
</td>
</td>
</tr>

</table>

<input type="hidden" name="Run" value="CreateAccount">
</form>
Return current item: DDL CMS