function t_formfield($field) { switch ($field['type']) { case Form_Field::CHECKBOX: return '<input type="checkbox" ' . 'value="1" ' . 'name="' . $field['name'] . '" ' . ($_REQUEST[$field['name']] ? ' checked="checked"' : '') . $field['tag_attributes'] . ' />'; case Form_Field::SELECT: return '<select name="' . $field['name'] . '" ' . $field['tag_attributes'] . '>' . Form_Field::OptionsSimple($field['options'], $_REQUEST[$field['name']]) . '</select>'; case Form_Field::TEXT: return '<input type="text" ' . 'name="' . $field['name'] . '" ' . 'value="' . htmlspecialchars($_REQUEST[$field['name']], ENT_QUOTES) . '" ' . $field['tag_attributes'] . ' />'; case Form_Field::TEXTAREA: return '<textarea name="' . $field['name'] . '" ' . $field['tag_attributes'] . '>' . htmlspecialchars($_REQUEST[$field['name']]) . '</textarea>'; } }
<option value="">-- None --</option> <?php $sponsors = $DB->FetchAll('SELECT `sponsor_id`,`name` FROM `tbx_sponsor` ORDER BY `name`'); echo Form_Field::Options($sponsors, Request::Get('sponsor_id'), 'sponsor_id', 'name'); ?> </select> </span> </div> <div class="field"> <label>Comments Allowed:</label> <span class="field-container"> <select name="allow_comments"> <?php $opts = array('No', 'Yes - Add Immediately', 'Yes - Require Approval'); echo Form_Field::OptionsSimple($opts, Request::Get('allow_comments')); ?> </select> </span> </div> <div class="field"> <label></label> <span class="field-container"> <div class="checkbox"> <input type="hidden" name="is_private" value="<?php echo Request::Get('is_private'); ?> " /> Private </div>
<div class="field"> <label>Name:</label> <span class="field-container"><input type="text" size="40" name="name" value="<?php echo Request::Get('name'); ?> " /></span> </div> <div class="field"> <label>Account Type:</label> <span class="field-container"> <select name="type" id="account_type"> <?php $opts = array('Superuser', 'Editor'); echo Form_Field::OptionsSimple($opts, Request::Get('type')); ?> </select> </span> </div> </div> <div class="fieldset"> <div class="legend">Privileges</div> <div class="overlay" id="privileges_overlay">PRIVILEGES ARE ONLY SET FOR EDITOR ACCOUNTS</div> <table width="700" align="center" id="privileges_checkboxes"> <tr>
</div> <form method="post" action="ajax.php"> <div id="dialog-panel"> <div style="padding: 8px;"> <div class="field"> <label class="short">Templates:</label> <span class="field-container"> <?php $templates = Dir::ReadFiles(TEMPLATES_DIR, '~^email~'); asort($templates); ?> <select name="templates[]" id="templates" multiple="multiple" size="10"> <?php echo Form_Field::OptionsSimple($templates); ?> </select> </span> </div> <div class="field"> <label class="short">Search For:</label> <span class="field-container"><textarea name="search" id="search" rows="5" cols="110"></textarea></span> </div> <div class="field"> <label class="short">Replace With:</label> <span class="field-container"><textarea name="replace" id="replace" rows="5" cols="110"></textarea></span> </div>
foreach (glob(LANGUAGE_DIR . '/*.ini') as $ini) { $languages[] = preg_replace('~\\.ini$~', '', basename($ini)); } echo Form_Field::OptionsSimple($languages, Config::Get('language')); ?> </select> </span> </div> <div class="field"> <label>Timezone:</label> <span class="field-container"> <select name="timezone"> <?php $timezones = GetTimezones(); echo Form_Field::OptionsSimple($timezones, Config::Get('timezone')); ?> </select> </span> </div> <div class="field"> <label>Date Format:</label> <span class="field-container"> <input type="text" name="date_format" size="10" value="<?php echo Config::Get('date_format'); ?> " /> </span> </div>
<?php } ?> </ul> </div> <?php } ?> <div class="field"> <label>Source:</label> <span class="field-container"> <select name="source"> <?php $sources = array(Video_Import::SOURCE_CLIPBOARD, Video_Import::SOURCE_UPLOAD, Video_Import::SOURCE_URL); echo Form_Field::OptionsSimple($sources, Request::Get('source')); ?> </select> </span> </div> <div class="field"> <label>Delimiter:</label> <span class="field-container"><input type="text" name="delimiter" style="width: 18px;" value="|" /></span> </div> <div class="field source source-Upload"> <label>File:</label> <span class="field-container"> <input type="file" name="<?php
<div style="position: relative;"> <div class="legend">Database Restore</div> Use this function to restore data from a previously generated dump of your MySQL data. Note that this will overwrite all of your existing MySQL database tables! <br /> <br /> <?php $files = Dir::ReadFiles(BASE_DIR . '/data', '~\\.sql$~'); if (count($files)) { ?> <b>Restore Filename:</b> <form method="post" action="ajax.php" id="restore-form"> <select name="filename"> <?php echo Form_Field::OptionsSimple($files); ?> </select> <input type="submit" value="Run Database Restore" /> <input type="hidden" name="r" value="tbxDatabaseRestore" /> <img src="images/activity-22x22.gif" border="0" title="Working..." class="activity" style="position: absolute; display: inline;" /> </form> <?php } else { ?> <div class="message-warning"> No dump files could be located! Please upload the dump file (with a .sql extension) to this directory:<br /> <?php echo BASE_DIR . '/data'; ?> </div>
<select name="gender"> <?php $opts = array('Male', 'Female'); echo Form_Field::OptionsSimple($opts, Request::Get('gender')); ?> </select> </span> </div> <div class="field"> <label>Relationship:</label> <span class="field-container"> <select name="relationship"> <?php $opts = array('Single', 'Taken', 'Open'); echo Form_Field::OptionsSimple($opts, Request::Get('relationship')); ?> </select> </span> </div> <div class="field"> <label>About Me:</label> <span class="field-container"><textarea name="about" rows="3" cols="60"><?php echo Request::Get('about'); ?> </textarea></span> </div> <div class="field"> <label>Website URL:</label>