Exemplo n.º 1
0
function writeContent()
{
    global $sUser;
    addField(makeInput('Email Address', 'use_email', $sUser));
    addField(makePassword('Password', 'use_password'));
    addField(makeSubmit('Log In', 'login'));
    writeDataForm($_SERVER['REQUEST_URI'], 'login', 'login');
}
Exemplo n.º 2
0
function writeContent()
{
    global $aStates, $isPost, $sFirstName, $sLastName, $sEmail, $nPhone, $sAddress, $sAddress2, $sCity, $sState, $nZip, $sComments, $bSent;
    if ($bSent) {
        echo '<p>Thank you for contacting us.</p>';
    } else {
        addField(makeInput('First Name', 'con_firstname', $sFirstName), true);
        addField(makeInput('Last Name', 'con_lastname', $sLastName), true);
        addField(makeEmail('Email Address', 'con_email', $sEmail), true);
        addField(makeInput('Telephone', 'con_phone', $nPhone, 'size="13"'));
        addField(makeInput('Address', 'con_address', $sAddress, 'size="30"'));
        addField(makeInput('Address 2', 'con_address2', $sAddress2, 'size="30"'));
        addField(makeInput('City', 'con_city', $sCity));
        addField(makeSelect('State', 'con_state', $aStates, $sState));
        addField(makeInput('Zip', 'con_zip', $nZip, 'size="10" maxlength="5"'));
        addField(makeTextArea('Message', 'con_comments', $sComments, 'rows="5" cols="60"'));
        addField(makeSubmit('Send', 'send') . ' ' . makeCancel('Cancel', 'cancel'));
        writeDataForm('/contact.php', 'contact');
    }
}
Exemplo n.º 3
0
function writeContent()
{
    global $sId, $aStates, $isPost, $sName, $sEmail, $nPhone, $sAddress, $sAddress2, $sCity, $sState, $nZip, $bAdmin, $bActive;
    if (!empty($sId)) {
        addHidden('use_id', $sId);
    }
    addField(makeInput('Name', 'use_name', $sName), true);
    addField(makeEmail('Email Address', 'use_email', $sEmail), true);
    addField(makePassword('Password', 'use_password'));
    addField(makeInput('Phone', 'use_phone', $nPhone, 'size="13"'));
    addField(makeInput('Address', 'use_address', $sAddress, 'size="30"'));
    addField(makeInput('Address 2', 'use_address2', $sAddress2, 'size="30"'));
    addField(makeInput('City', 'use_city', $sCity));
    addField(makeSelect('State', 'use_state', $aStates, $sState));
    addField(makeInput('Zip', 'use_zip', $nZip, 'size="10"'));
    addField(makeCheckbox('Admin', 'use_admin', $bAdmin));
    addField(makeCheckbox('Active', 'use_active', $bActive));
    addField(makeSubmit('Save', 'save') . ' ' . makeCancel('Cancel', 'cancel'));
    writeDataForm($_SERVER['PHP_SELF'], 'user');
}
Exemplo n.º 4
0
function writeContent()
{
    global $results;
    ?>

<h2>User Management</h2>

<form action="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
" method="post">
<table class="grid">
	<thead>
		<tr>
			<th></td>
			<th>Name</th>
			<th>Email</th>
			<th>Address</th>
			<th>Phone</th>
			<th>Admin</th>
		</tr>
	</thead>
	<tbody>
	<?php 
    while ($rs = mysql_fetch_array($results, MYSQL_ASSOC)) {
        ?>
		<tr<?php 
        echo !$rs['use_active'] ? ' class="inactive"' : '';
        ?>
>
			<td><?php 
        echo makeCheckbox('', $rs['use_id']);
        ?>
</td>
			<td><a href="user-edit.php?id=<?php 
        echo $rs['use_id'];
        ?>
" alt="<?php 
        echo $rs['use_image_path'];
        ?>
" rel="tooltip"><?php 
        echo $rs['use_name'];
        ?>
</a></td>
			<td><?php 
        echo '<a href="mailto:' . $rs['use_email'] . '">' . $rs['use_email'] . '</a>';
        ?>
</td>
			<td><?php 
        echo $rs['use_address'] . ' ' . $rs['use_address2'] . '<br />' . $rs['use_city'] . ' ' . $rs['use_state'] . ' ' . $rs['use_zip'];
        ?>
</td>
			<td><?php 
        echo formatPhone($rs['use_phone']);
        ?>
</td>
			<td><?php 
        echo $rs['use_admin'] ? 'Yes' : 'No';
        ?>
</td>
		</tr>
	<?php 
    }
    ?>
	</tbody>
</table>
<?php 
    echo makeButton('Add User', 'add') . ' ' . makeSubmit('Delete User(s)', 'delete') . ' ' . makeButton('Download Data', 'csv');
    ?>
</form>

<?php 
}
Exemplo n.º 5
0
function writeContent()
{
    global $results;
    ?>

<h2>Visitor Submissions</h2>

<form action="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
" method="post">
<table class="grid">
	<thead>
		<tr>
			<th title="Check All Messages"><?php 
    echo makeCheckbox('', 'all');
    ?>
</td>
			<th>Name</th>
			<th>Email</th>
			<th>Address</th>
			<th>Phone</th>
			<th>Comments</th>
			<th>Date</th>
		</tr>
	</thead>
	<tbody>
	<?php 
    while ($rs = mysql_fetch_array($results, MYSQL_ASSOC)) {
        ?>
		<tr>
			<td><?php 
        echo makeCheckbox('', $rs['con_id']);
        ?>
</td>
			<td><?php 
        echo $rs['con_firstname'] . ' ' . $rs['con_lastname'];
        ?>
</td>
			<td><?php 
        echo '<a href="mailto:' . $rs['con_email'] . '">' . $rs['con_email'] . '</a>';
        ?>
</td>
			<td><?php 
        echo $rs['con_address'] . ' ' . $rs['con_address2'] . '<br />' . $rs['con_city'] . ' ' . $rs['con_state'] . ' ' . $rs['con_zip'];
        ?>
</td>
			<td><?php 
        echo formatPhone($rs['con_phone']);
        ?>
</td>
			<td><?php 
        echo $rs['con_comments'];
        ?>
</td>
			<td><?php 
        echo formatDate($rs['con_date'], false);
        ?>
</td>
		</tr>
	<?php 
    }
    ?>
	</tbody>
</table>
<?php 
    echo makeSubmit('Delete Message(s)', 'delete');
    echo makeButton('Download Data', 'csv');
    ?>
</form>

<?php 
}