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