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

$options = array('Email' => 'E-mail Address',
                 'Site_URL' => 'Site URL',
                 'Title' => 'Site Title',
                 'Notes' => 'Notes',
                 'In_Weight' => 'In Hit Weight',
                 'Out_Weight' => 'Out Hit Weight',
                 'Current_Prod' => 'Productivity',
                 'Current_In' => 'Hits In',
                 'Current_Out' => 'Hits Out',
                 'Total_Prod' => 'Total Productivity',
                 'Total_In' => 'Total Hits In',
                 'Total_Out' => 'Total Hits Out',
                 'Inactive' => 'Inactivity');

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)) . '...';
        }

        $options["Field_$index"] =  $GLOBALS["NAME_FIELD_$index"];
    }
}

?>
<script type="text/javascript">
function checkFormSAR(form)
{
    if( !form.Find.value || !form.Replace.value )
    {
        alert('All form fields must be filled in');
        return false;
    }

    return confirm('Are you sure you want to do this?');
}

function checkFormSAS(form)
{
    if( !form.Find.value )
    {
        alert('All form fields must be filled in');
        return false;
    }

    return confirm('Are you sure you want to do this?');
}

function checkFormSAD(form)
{
    if( !form.Find.value )
    {
        alert('All form fields must be filled in');
        return false;
    }

    return confirm('Are you sure you want to do this?');
}


function checkFormRU(form)
{
    return confirm('Are you sure you want to do this?');
}

<?PHP
if( isset($reload) )
{
?>
window.opener.document.form.submit();
<?PHP
}
?>
</script>
<?PHP
if( isset($message) )
{
?>
<div id="message">
<?PHP echo $message; ?>
</div>
<br />
<?PHP
}
?>

<form action="newwin.php?page=quickaccounts" method="post" onSubmit="return checkFormSAR(this)">

<table>
<tr>
<td>
Search and Replace
</td>
</tr>

<tr>
<td>
<b>Find</b>
</td>
<td>
<input type="text" name="Find" size="30">

<b>in</b>

<select name="FindIn">
<?PHP

foreach($options as $field => $name)
{
    echo "<option value=\"$field\">$name</option>\n";
}

?>
</select>
</td>
</tr>

<tr>
<td>
<b>Replace With</b>
</td>
<td>
<input type="text" name="Replace" size="30">

</td>
</tr>

<tr>
<td>
<input type="submit" name="sub" value="Replace">
</td>
</tr>

</table>
</form>

<br />

<form action="newwin.php?page=quickaccounts" method="post" onSubmit="return checkFormSAS(this)">

<table>
<tr>
<td>
Search and Set
</td>
</tr>

<tr>
<td>
<b>Find</b>
</td>
<td>
<input type="text" name="Find" size="30">

<b>in</b>

<select name="FindIn">
<?PHP

foreach($options as $field => $name)
{
    echo "<option value=\"$field\">$name</option>\n";
}

?>
</select>
</td>
</tr>

<tr>
<td>
<b>Set</b>
</td>
<td>
<select name="SetIn">
<?PHP

foreach($options as $field => $name)
{
    echo "<option value=\"$field\">$name</option>\n";
}

?>
</select>

<b>to</b>

<input type="text" name="Set" size="30">
</td>
</tr>

<tr>
<td>
<input type="submit" name="sub" value="Set">
</td>
</tr>

</table>
</form>

<br />

<form action="newwin.php?page=quickaccounts" method="post" onSubmit="return checkFormSAD(this)">

<table>
<tr>
<td>
Search and Delete
</td>
</tr>

<tr>
<td>
<b>Find</b>

<input type="text" name="Find" size="30">

<b>in</b>

<select name="FindIn">
<?PHP

foreach($options as $field => $name)
{
    echo "<option value=\"$field\">$name</option>\n";
}

?>
</select>
</td>
</tr>

<tr>
<td>
<input type="submit" name="sub" value="Delete">
</td>
</tr>

</table>
</form>

<br />

<form action="newwin.php?page=quickaccounts" method="post" onSubmit="return checkFormRU(this)">

<table>
<tr>
<td>
Remove Unconfirmed Accounts
</td>
</tr>

<tr>
<td>
Click the button below to remove unconfirmed accounts older than 4 days.

<br />
<br />

<input type="submit" name="sub" value="Remove Unconfirmed Accounts">
</td>
</tr>
</table>
</form>
Return current item: DDL CMS