/** * Generate XML for the browser tree. */ function doTree() { global $misc, $data; $casts = $data->getCasts(); $proto = concat(field('castsource'), ' AS ', field('casttarget')); $attrs = array('text' => $proto, 'icon' => 'Cast'); $misc->printTree($casts, $attrs, 'casts'); exit; }
/** * Get an offset if already set or traverse Pod and then set plus reutrn. * * @since 0.1.0 * * @param mixed $offset Offset to get * * @return mixed */ public function offsetGet($offset) { if ($this->offsetExists($offset)) { return parent::offsetGet($offset); } else { if ('id' == $offset || 'ID' == $offset) { $_value = $this->pod->id(); } else { $_value = $this->pod->field($offset); } if ($_value) { parent::offsetSet($offset, $_value); return $_value; } } }
function doTree() { global $misc, $conf; $nodes = array(); $group_id = isset($_GET['group']) ? $_GET['group'] : false; /* root with srv_groups */ if (isset($conf['srv_groups']) and count($conf['srv_groups']) > 0 and $group_id === false) { $nodes = $misc->getServersGroups(true); } else { if (isset($conf['srv_groups']) and $group_id !== false) { if ($group_id !== 'all') { $nodes = $misc->getServersGroups(false, $group_id); } $nodes = array_merge($nodes, $misc->getServers(false, $group_id)); include_once './classes/ArrayRecordSet.php'; $nodes = new ArrayRecordSet($nodes); } else { $nodes = $misc->getServers(true, false); } } $reqvars = $misc->getRequestVars('server'); $attrs = array('text' => field('desc'), 'icon' => field('icon'), 'toolTip' => field('id'), 'action' => field('action'), 'branch' => field('branch')); $misc->printTree($nodes, $attrs, 'servers'); exit; }
function doDefault() { global $misc, $lang; $onchange = "onchange=\"location.href='history.php?server=' + encodeURI(server.options[server.selectedIndex].value) + '&database=' + encodeURI(database.options[database.selectedIndex].value) + '&'\""; $misc->printHeader($lang['strhistory']); // Bring to the front always echo "<body onload=\"window.focus();\">\n"; echo "<form action=\"history.php\" method=\"post\">\n"; $misc->printConnection($onchange); echo "</form><br />"; if (!isset($_REQUEST['database'])) { echo "<p>{$lang['strnodatabaseselected']}</p>\n"; return; } if (isset($_SESSION['history'][$_REQUEST['server']][$_REQUEST['database']])) { include_once 'classes/ArrayRecordSet.php'; $history = new ArrayRecordSet($_SESSION['history'][$_REQUEST['server']][$_REQUEST['database']]); $columns = array('query' => array('title' => $lang['strsql'], 'field' => field('query')), 'paginate' => array('title' => $lang['strpaginate'], 'field' => field('paginate'), 'type' => 'yesno'), 'actions' => array('title' => $lang['stractions'])); $actions = array('run' => array('content' => $lang['strexecute'], 'attr' => array('href' => array('url' => 'sql.php', 'urlvars' => array('subject' => 'history', 'nohistory' => 't', 'queryid' => field('queryid'), 'paginate' => field('paginate'))), 'target' => 'detail')), 'remove' => array('content' => $lang['strdelete'], 'attr' => array('href' => array('url' => 'history.php', 'urlvars' => array('action' => 'confdelhistory', 'queryid' => field('queryid')))))); $misc->printTable($history, $columns, $actions, 'history-history', $lang['strnohistory']); } else { echo "<p>{$lang['strnohistory']}</p>\n"; } $navlinks = array('refresh' => array('attr' => array('href' => array('url' => 'history.php', 'urlvars' => array('action' => 'history', 'server' => $_REQUEST['server'], 'database' => $_REQUEST['database']))), 'content' => $lang['strrefresh'])); if (isset($_SESSION['history'][$_REQUEST['server']][$_REQUEST['database']]) && count($_SESSION['history'][$_REQUEST['server']][$_REQUEST['database']])) { $navlinks['download'] = array('attr' => array('href' => array('url' => 'history.php', 'urlvars' => array('action' => 'download', 'server' => $_REQUEST['server'], 'database' => $_REQUEST['database']))), 'content' => $lang['strdownload']); $navlinks['clear'] = array('attr' => array('href' => array('url' => 'history.php', 'urlvars' => array('action' => 'confclearhistory', 'server' => $_REQUEST['server'], 'database' => $_REQUEST['database']))), 'content' => $lang['strclearhistory']); } $misc->printNavLinks($navlinks, 'history-history', get_defined_vars()); }
function doDefault() { global $misc, $lang; $onchange = "onchange=\"location.href='history.php?server=' + encodeURI(server.options[server.selectedIndex].value) + '&database=' + encodeURI(database.options[database.selectedIndex].value) + '&'\""; $misc->printHeader($lang['strhistory']); // Bring to the front always echo "<body onload=\"window.focus();\">\n"; echo "<form action=\"history.php\" method=\"post\">\n"; $misc->printConnection($onchange); echo "</form><br />"; if (!isset($_REQUEST['database'])) { echo "<p>{$lang['strnodatabaseselected']}</p>\n"; return; } if (isset($_SESSION['history'][$_REQUEST['server']][$_REQUEST['database']])) { include_once 'classes/ArrayRecordSet.php'; $history = new ArrayRecordSet($_SESSION['history'][$_REQUEST['server']][$_REQUEST['database']]); $columns = array('query' => array('title' => $lang['strsql'], 'field' => field('query')), 'paginate' => array('title' => $lang['strpaginate'], 'field' => field('paginate'), 'type' => 'yesno'), 'actions' => array('title' => $lang['stractions'])); $actions = array('run' => array('title' => $lang['strexecute'], 'url' => "sql.php?{$misc->href}&nohistory=t&subject=history&", 'vars' => array('queryid' => 'queryid', 'paginate' => 'paginate'), 'target' => 'detail'), 'remove' => array('title' => $lang['strdelete'], 'url' => "history.php?{$misc->href}&action=confdelhistory&", 'vars' => array('queryid' => 'queryid'))); $misc->printTable($history, $columns, $actions, $lang['strnohistory']); } else { echo "<p>{$lang['strnohistory']}</p>\n"; } echo "<ul class=\"navlink\">\n"; if (isset($_SESSION['history'][$_REQUEST['server']][$_REQUEST['database']]) && count($_SESSION['history'][$_REQUEST['server']][$_REQUEST['database']])) { echo "\t<li><a href=\"history.php?action=confclearhistory&{$misc->href}\">{$lang['strclearhistory']}</a></li>\n"; } echo "\t<li><a href=\"history.php?action=history&{$misc->href}\">{$lang['strrefresh']}</a></li>\n</ul>\n"; }
/** * Generate XML for the browser tree. */ function doTree() { global $misc, $data; $conversions = $data->getconversions(); $attrs = array('text' => field('conname'), 'icon' => 'Conversion', 'toolTip' => field('concomment')); $misc->printTree($conversions, $attrs, 'conversions'); exit; }
/** * Generate XML for the browser tree. */ function doTree() { global $misc, $data; $languages = $data->getLanguages(); $attrs = array('text' => field('lanname'), 'icon' => 'Language'); $misc->printTreeXML($languages, $attrs); exit; }
/** * Generate XML for the browser tree. */ function doTree() { global $misc, $data; $sequences = $data->getSequences(); $reqvars = $misc->getRequestVars('sequence'); $attrs = array('text' => field('seqname'), 'icon' => 'Sequence', 'toolTip' => field('seqcomment'), 'action' => url('sequences.php', $reqvars, array('action' => 'properties', 'sequence' => field('seqname')))); $misc->printTreeXML($sequences, $attrs); exit; }
function escape($fields) { global $lang; if ($fields['id'] === 'all') { return $lang['strallservers']; } else { return value(field('desc'), $fields, 'xml'); } }
/** * Generate XML for the browser tree. */ function doTree() { global $misc, $data; $opclasses = $data->getOpClasses(); // OpClass prototype: "op_class/access_method" $proto = concat(field('opcname'), '/', field('amname')); $attrs = array('text' => $proto, 'icon' => 'OperatorClass', 'toolTip' => field('opccomment')); $misc->printTree($opclasses, $attrs, 'opclasses'); exit; }
function doTree() { global $misc, $data, $lang; $databases = $data->getDatabases(); $reqvars = $misc->getRequestVars('database'); $attrs = array('text' => field('datname'), 'icon' => 'Database', 'toolTip' => field('datcomment'), 'action' => url('redirect.php', $reqvars, array('database' => field('datname'))), 'branch' => url('database.php', $reqvars, array('action' => 'tree', 'database' => field('datname')))); $misc->printTree($databases, $attrs, 'databases'); exit; }
function doTree() { global $misc, $data; $triggers = $data->getTriggers($_REQUEST['table']); $reqvars = $misc->getRequestVars('table'); $attrs = array('text' => field('tgname'), 'icon' => 'Trigger'); $misc->printTree($triggers, $attrs, 'triggers'); exit; }
<?php echo validation_errors('<p class="error">'); echo form_open('admin/comment/save'); ?> <?php $comment_id = @field($this->validation->comment_id, $comment->comment_id); echo form_input(array('name' => 'comment_id', 'id' => 'comment_id', 'size' => '20', 'maxlength' => '50', 'value' => $comment_id, 'type' => 'hidden')); ?> <legend accesskey="D" tabindex="1">Comment Information</legend> <div class="control-group"> <label for='comment'>Comment : </label> <div class="controls"> <?php $comm = @field($this->validation->comment, $comment->comment); ?> <textarea placeholder="Comment" rows="3" id="textarea" class="input-xlarge" name="comm" ><?php echo $comm; ?> </textarea><BR> </div> </div> <div class="form-actions"> <?php echo form_submit('submit', 'Save'); ?> <?php echo anchor('admin/comment', 'Cancel'); ?>
function format_describe_methods_result($response) { global $xi_type_hash; $unknown = "???"; $method_hash = array(); $xi_type_hash = array(); $typeList = $response[typeList]; $methodList = $response[methodList]; usort($typeList, "name_cmp"); usort($methodList, "name_cmp"); if ($methodList) { $buf .= "<big>Methods\n<ul>"; foreach ($methodList as $method) { $name = $method[name]; $buf .= "<li><a href='#{$name}'>{$name}()</a>\n"; $method_hash[$name] = $method; } $buf .= "</ul></big>"; } if ($typeList) { $buf .= "<big>Types\n<ul>"; foreach ($typeList as $type) { $name = $type[name]; $buf .= "<li><a href='#{$name}'>{$name}</a>\n"; $xi_type_hash[$name] = $type; } $buf .= "</ul></big>"; } $buf .= "<h2>Methods</h2><table bgcolor='#dddddd' align='center' border=1 width=100%>"; foreach ($methodList as $method) { $name = $method[name]; $author = $method[author] ? $method[author] : $unknown; $version = $method[version] ? $method[version] : $unknown; $desc = $method[purpose] ? $method[purpose] : $unknown; $sigs = $method[signatures]; $buf .= "<tr bgcolor='#444444'><td align='center' class='title' colspan=3><font color='#EEEEEE'><a name='{$name}'><b><big>{$name}</big></b></a></font></td></tr>"; $buf .= "<tr>" . field("Signature(s)", get_sigs($method), 3) . "</tr>"; $buf .= "<tr>" . field("Author", $author, 2) . field("Version", $version) . "</tr>"; $buf .= "<tr>" . field("Purpose", $desc, 3) . "</tr>"; $exclude_list = array("see", "signatures", "purpose", "version", "author", "name"); foreach ($method as $key => $val) { if (!in_array($key, $exclude_list)) { if (is_array($val)) { $buf .= "<tr bgcolor='#aaaaaa'><td colspan=3>" . ucfirst($key) . "</td></tr>"; foreach ($val as $key2 => $desc) { if (gettype($desc) === "string") { if (gettype($key2) !== "string") { $key2 = false; } $buf .= "<tr>" . field(ucfirst($key2), $desc, 3) . "</tr>"; } } } else { $buf .= "<tr>" . field(ucfirst($key), $val, 3) . "</tr>"; } } } if ($sigs) { $bmultiple = count($sigs) > 1; foreach ($sigs as $sig) { if ($bmultiple) { $count++; $buf .= "<tr bgcolor='#888888'><td colspan=3><font color='white'><b>Signature {$count}:</b> " . get_sig($name, $sig) . "</font></td></tr>"; } if ($sig[params]) { $buf .= "<tr bgcolor='#aaaaaa'><td colspan=3>Parameters</td></tr>"; $buf .= "<tr><td colspan=3>"; $buf .= do_params($sig[params], false, false); $buf .= "</td></tr>"; } if ($sig[returns]) { $buf .= "<tr bgcolor='#aaaaaa'><td colspan=3>Return Value(s)</td></tr>"; $buf .= "<tr><td colspan=3>"; $buf .= do_params($sig[returns], false, false); $buf .= "</td></tr>"; } } } if ($method[see]) { $buf .= "<tr bgcolor='#aaaaaa'><td colspan=3>See Also</td></tr>"; foreach ($method[see] as $name => $desc) { if ($method_hash[$name]) { $name = "<a href='#{$name}'>{$name}</a>"; } $buf .= "<tr>" . field($name, $desc, 3) . "</tr>"; } } } $buf .= "</table><H2>Types</H2><TABLE><table bgcolor='#dddddd' align='center' border=1 width=100%>"; $buf .= "<tr><td colspan=3>"; $buf .= do_params($typeList, true); $buf .= "</td></tr>"; $buf .= "</TABLE>"; return $buf; }
) ); echo '<label for="day'.$day_num.'" class="ni">'.$day_name.'</label><br/>'; }*/ ?> </select> </p> <?php echo @field($this->validation->days_error); ?> <p> <label for="bookable">Can be booked</label> <?php #$photo = @field($this->validation->name, $room->name); $bookable = @field($this->validation->bookable, $period->bookable); echo form_checkbox(array('name' => 'bookable', 'id' => 'bookable', 'value' => '1', 'tabindex' => $t, 'checked' => $bookable)); $t++; ?> <p class="hint">Tick this box to allow bookings for this period</p> </p> </fieldset> <?php $submit['submit'] = array('Save', $t); $submit['cancel'] = array('Cancel', $t + 1, 'periods'); $this->load->view('partials/submit', $submit); echo form_close();
/** * Show default list of reports in the database */ function default_action($msg = '') { global $data, $misc, $lang; $reportsdb = $this->get_reportsdb(); $misc->printHeader($this->lang['strreports']); $misc->printBody(); $misc->printTrail('server'); $misc->printTabs('server', 'report_plugin'); $misc->printMsg($msg); $reports = $reportsdb->getReports(); $columns = array('report' => array('title' => $this->lang['strreport'], 'field' => field('report_name'), 'url' => "plugin.php?plugin={$this->name}&action=properties&{$misc->href}&", 'vars' => array('report_id' => 'report_id', 'report' => 'report_name')), 'database' => array('title' => $lang['strdatabase'], 'field' => field('db_name')), 'created' => array('title' => $lang['strcreated'], 'field' => field('date_created')), 'paginate' => array('title' => $lang['strpaginate'], 'field' => field('paginate'), 'type' => 'yesno'), 'actions' => array('title' => $lang['stractions']), 'comment' => array('title' => $lang['strcomment'], 'field' => field('descr'))); //$return_url = urlencode("plugin.php?plugin={$this->name}&{$misc->href}"); $urlvars = $misc->getRequestVars(); $actions = array('run' => array('content' => $lang['strexecute'], 'attr' => array('href' => array('url' => 'plugin.php', 'urlvars' => array_merge($urlvars, array('plugin' => $this->name, 'action' => 'execute', 'report' => field('report_name'), 'database' => field('db_name'), 'report_id' => field('report_id'), 'paginate' => field('paginate'), 'nohistory' => 't', 'return' => 'plugin', 'back' => 'default_action'))))), 'edit' => array('content' => $lang['stredit'], 'attr' => array('href' => array('url' => 'plugin.php', 'urlvars' => array_merge($urlvars, array('plugin' => $this->name, 'action' => 'edit', 'report_id' => field('report_id')))))), 'drop' => array('content' => $lang['strdrop'], 'attr' => array('href' => array('url' => 'plugin.php', 'urlvars' => array_merge($urlvars, array('plugin' => $this->name, 'action' => 'drop', 'confirm' => 'true', 'report_id' => field('report_id'))))))); $misc->printTable($reports, $columns, $actions, 'reports-reports', $this->lang['strnoreports']); $navlinks = array(array('attr' => array('href' => array('url' => 'plugin.php', 'urlvars' => array('plugin' => $this->name, 'server' => field('server'), 'action' => 'create'))), 'content' => $this->lang['strcreatereport'])); $misc->printNavLinks($navlinks, 'reports-reports'); $misc->printFooter(); }
<td colspan="3"> <input type="text" size="40" maxlength="40" name="in[email]" value="<?php echo isset($_POST['in']) && isset($_POST['in']['email']) ? htmlspecialchars($_POST['in']['email']) : ''; ?> "> </td> </tr> <tr> <th class="details">PHP Version:</th> <td><input type="text" size="20" maxlength="100" name="in[php_version]" value="<?php echo field('php_version'); ?> "></td> <th class="details">OS:</th> <td><input type="text" size="20" maxlength="32" name="in[php_os]" value="<?php echo field('php_os'); ?> "></td> </tr> </table> <p style="margin-bottom: 0em;"> <label for="ncomment" accesskey="m"><b>New<?php if ($edit == 1) { echo "/Additional"; } ?> Co<span class="accesskey">m</span>ment:</b></label> </p> <?php if ($bug['block_user_comment'] == 'Y' && $logged_in != 'developer') {
function doTree() { global $misc, $data, $lang, $slony; $reqvars = $misc->getRequestVars('database'); $tabs = $misc->getNavTabs('database'); $items = $misc->adjustTabsForTree($tabs); $attrs = array('text' => noEscape(field('title')), 'icon' => field('icon'), 'action' => url(field('url'), $reqvars, field('urlvars', array())), 'branch' => url(field('url'), $reqvars, field('urlvars'), array('action' => 'tree'))); $misc->printTreeXML($items, $attrs); exit; }
function show_login($message = '') { global $_SERVER; print body(form($_SERVER['PHP_SELF'], $message . table(row2("Username:"******"username")) . row2("Password:"******"password")) . row2('', submit('Log In'))))); }
function doTree() { global $misc, $data; $rules = $data->getRules($_REQUEST[$_REQUEST['subject']]); $reqvars = $misc->getRequestVars($_REQUEST['subject']); $attrs = array('text' => field('rulename'), 'icon' => 'Rule'); $misc->printTreeXML($rules, $attrs); exit; }
<?php use yii\helpers\Html; use yii\widgets\ActiveForm; use mihaildev\elfinder\InputFile; use yii\bootstrap\Modal; /* @var $this yii\web\View */ /* @var $model app\models\Photos */ /* @var $form yii\widgets\ActiveForm */ Modal::begin(['header' => '<h2>Hello world</h2>', 'size' => 'modal-lg', 'toggleButton' => ['label' => 'click me'], 'footer' => Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary'])]); ActiveForm::begin(); ActiveForm::field($model, 'id')->textInput(); field($model, 'photo_path')->widget(InputFile::className(), ['language' => 'ru', 'controller' => 'elfinder', 'path' => 'eventphoto', 'filter' => 'image', 'template' => '<div class="input-group">{input}<span class="input-group-btn">{button}</span></div>', 'options' => ['class' => 'form-control'], 'buttonOptions' => ['class' => 'btn btn-default'], 'multiple' => false]); ActiveForm::end(); Modal::end();
/** * Get list of servers * @param $recordset return as RecordSet suitable for printTable if true, * otherwise just return an array. * @param $group a group name to filter the returned servers using $conf[srv_groups] */ function getServers($recordset = false, $group = false) { global $conf; $logins = isset($_SESSION['webdbLogin']) && is_array($_SESSION['webdbLogin']) ? $_SESSION['webdbLogin'] : array(); $srvs = array(); if ($group !== false and $group !== 'all') { if (isset($conf['srv_groups'][$group]['servers'])) { $group = array_fill_keys(explode(',', preg_replace('/\\s/', '', $conf['srv_groups'][$group]['servers'])), 1); } else { $group = ''; } } foreach ($conf['servers'] as $idx => $info) { $server_id = $info['host'] . ':' . $info['port'] . ':' . $info['sslmode']; if ($group === false or isset($group[$idx]) or $group === 'all') { $server_id = $info['host'] . ':' . $info['port'] . ':' . $info['sslmode']; if (isset($logins[$server_id])) { $srvs[$server_id] = $logins[$server_id]; } else { $srvs[$server_id] = $info; } $srvs[$server_id]['id'] = $server_id; $srvs[$server_id]['action'] = url('redirect.php', array('subject' => 'server', 'server' => field('id'))); if (isset($srvs[$server_id]['username'])) { $srvs[$server_id]['icon'] = 'Server'; $srvs[$server_id]['branch'] = url('all_db.php', array('action' => 'tree', 'subject' => 'server', 'server' => field('id'))); } else { $srvs[$server_id]['icon'] = 'DisconnectedServer'; $srvs[$server_id]['branch'] = false; } } } function _cmp_desc($a, $b) { return strcmp($a['desc'], $b['desc']); } uasort($srvs, '_cmp_desc'); if ($recordset) { include_once './classes/ArrayRecordSet.php'; return new ArrayRecordSet($srvs); } return $srvs; }
/** * Generate XML for the browser tree. */ function doTree() { global $misc, $data; $domains = $data->getDomains(); $reqvars = $misc->getRequestVars('domain'); $attrs = array('text' => field('domname'), 'icon' => 'Domain', 'toolTip' => field('domcomment'), 'action' => url('domains.php', $reqvars, array('action' => 'properties', 'domain' => field('domname')))); $misc->printTree($domains, $attrs, 'domains'); exit; }
include 'fxns.php'; include 'sql.php'; if (!getset('return')) { header('Location: ' . $_SERVER['HTTP_REFERER']); } $didsomething = 0; if (getset('del')) { $didsomething = 1; $del = get('del'); for ($i = 0; $i < strlen($del); $i++) { $field1 = field($del, $i, ','); $i += strlen($field1) + 1; $field2 = field($del, $i, ','); $i += strlen($field2) + 1; $field3 = field($del, $i, ';'); $i += strlen($field3); sql($field1, 0, "delete from {$field2} where id={$field3}"); } } $returnLocation = get('return'); echo "<script>var returnlocation=\"{$returnLocation}\";</script>"; ?> <form style="display:none" id='form' method='post' action=<?php echo "'{$returnLocation}'"; ?> > <input name='confirm' value='1'/> </form>
/** * Generate XML for the browser tree. */ function doTree() { global $misc, $data; $funcs = $data->getFunctions(); $proto = concat(field('proname'), ' (', field('proarguments'), ')'); $reqvars = $misc->getRequestVars('function'); $attrs = array('text' => $proto, 'icon' => 'Function', 'toolTip' => field('procomment'), 'action' => url('redirect.php', $reqvars, array('action' => 'properties', 'function' => $proto, 'function_oid' => field('prooid')))); $misc->printTree($funcs, $attrs, 'functions'); exit; }
function doTree() { global $misc, $data; $constraints = $data->getConstraints($_REQUEST['table']); $reqvars = $misc->getRequestVars('schema'); function getIcon($f) { switch ($f['contype']) { case 'u': return 'UniqueConstraint'; case 'c': return 'CheckConstraint'; case 'f': return 'ForeignKey'; case 'p': return 'PrimaryKey'; } } $attrs = array('text' => field('conname'), 'icon' => callback('getIcon')); $misc->printTree($constraints, $attrs, 'constraints'); exit; }
<?php $date_start = @field($this->validation->date_start, date("d/m/Y", strtotime($academicyear->date_start))); #echo $date_start; echo form_input(array('name' => 'date_start', 'id' => 'date_start', 'size' => '10', 'maxlength' => '10', 'tabindex' => '2', 'value' => $date_start)); ?> <img style="cursor:pointer" align="top" src="webroot/images/ui/cal_day.gif" width="16" height="16" title="Choose date" onclick="displayDatePicker('date_start', false);" /> </p> <?php echo @field($this->validation->date_start_error); ?> <p> <label for="date_end" class="required">End date:</label> <?php $date_end = @field($this->validation->date_end, date("d/m/Y", strtotime($academicyear->date_end))); echo form_input(array('name' => 'date_end', 'id' => 'date_end', 'size' => '10', 'maxlength' => '10', 'tabindex' => '2', 'value' => $date_end)); ?> <img style="cursor:pointer" align="top" src="webroot/images/ui/cal_day.gif" width="16" height="16" title="Choose date" onclick="displayDatePicker('date_end', false);" /> </p> <?php echo @field($this->validation->date_end_error); ?> </fieldset> <?php $submit['submit'] = array('Save', '5'); $submit['cancel'] = array('Cancel', '6', 'weeks'); $this->load->view('partials/submit', $submit); echo form_close();
/** * database/table administration and tuning tasks * * $Id: admin.php */ function doAdmin($type, $msg = '') { global $script, $data, $misc, $lang; $misc->printTrail($type); $misc->printTabs($type, 'admin'); $misc->printMsg($msg); if ($type == 'database') { printf("<p>{$lang['stradminondatabase']}</p>\n", $misc->printVal($_REQUEST['object'])); } else { printf("<p>{$lang['stradminontable']}</p>\n", $misc->printVal($_REQUEST['object'])); } echo "<table style=\"width: 50%\">\n"; echo "<tr>\n"; echo "<th class=\"data\">"; $misc->printHelp($lang['strvacuum'], 'pg.admin.vacuum') . "</th>\n"; echo "</th>"; echo "<th class=\"data\">"; $misc->printHelp($lang['stranalyze'], 'pg.admin.analyze'); echo "</th>"; if ($data->hasRecluster()) { echo "<th class=\"data\">"; $misc->printHelp($lang['strclusterindex'], 'pg.index.cluster'); echo "</th>"; } echo "<th class=\"data\">"; $misc->printHelp($lang['strreindex'], 'pg.index.reindex'); echo "</th>"; echo "</tr>"; // Vacuum echo "<tr class=\"row1\">\n"; echo "<td style=\"text-align: center; vertical-align: bottom\">\n"; echo "<form action=\"{$script}\" method=\"post\">\n"; echo "<p><input type=\"hidden\" name=\"action\" value=\"confirm_vacuum\" />\n"; echo $misc->form; if ($type == 'table') { echo "<input type=\"hidden\" name=\"table\" value=\"", htmlspecialchars($_REQUEST['object']), "\" />\n"; echo "<input type=\"hidden\" name=\"subject\" value=\"table\" />\n"; } echo "<input type=\"submit\" value=\"{$lang['strvacuum']}\" /></p>\n"; echo "</form>\n"; echo "</td>\n"; // Analyze echo "<td style=\"text-align: center; vertical-align: bottom\">\n"; echo "<form action=\"{$script}\" method=\"post\">\n"; echo "<p><input type=\"hidden\" name=\"action\" value=\"confirm_analyze\" />\n"; echo $misc->form; if ($type == 'table') { echo "<input type=\"hidden\" name=\"table\" value=\"", htmlspecialchars($_REQUEST['object']), "\" />\n"; echo "<input type=\"hidden\" name=\"subject\" value=\"table\" />\n"; } echo "<input type=\"submit\" value=\"{$lang['stranalyze']}\" /></p>\n"; echo "</form>\n"; echo "</td>\n"; // Cluster if ($data->hasRecluster()) { $disabled = ''; echo "<td style=\"text-align: center; vertical-align: bottom\">\n"; echo "<form action=\"{$script}\" method=\"post\">\n"; echo $misc->form; if ($type == 'table') { echo "<input type=\"hidden\" name=\"table\" value=\"", htmlspecialchars($_REQUEST['object']), "\" />\n"; echo "<input type=\"hidden\" name=\"subject\" value=\"table\" />\n"; if (!$data->alreadyClustered($_REQUEST['object'])) { $disabled = 'disabled="disabled" '; echo "{$lang['strnoclusteravailable']}<br />"; } } echo "<p><input type=\"hidden\" name=\"action\" value=\"confirm_cluster\" />\n"; echo "<input type=\"submit\" value=\"{$lang['strclusterindex']}\" {$disabled}/></p>\n"; echo "</form>\n"; echo "</td>\n"; } // Reindex echo "<td style=\"text-align: center; vertical-align: bottom\">\n"; echo "<form action=\"{$script}\" method=\"post\">\n"; echo "<p><input type=\"hidden\" name=\"action\" value=\"confirm_reindex\" />\n"; echo $misc->form; if ($type == 'table') { echo "<input type=\"hidden\" name=\"table\" value=\"", htmlspecialchars($_REQUEST['object']), "\" />\n"; echo "<input type=\"hidden\" name=\"subject\" value=\"table\" />\n"; } echo "<input type=\"submit\" value=\"{$lang['strreindex']}\" /></p>\n"; echo "</form>\n"; echo "</td>\n"; echo "</tr>\n"; echo "</table>\n"; // Autovacuum if ($data->hasAutovacuum()) { // get defaults values for autovacuum $defaults = $data->getAutovacuum(); // Fetch the autovacuum properties from the database or table if != '' if ($type == 'table') { $autovac = $data->getTableAutovacuum($_REQUEST['table']); } else { $autovac = $data->getTableAutovacuum(); } echo "<br /><br /><h2>{$lang['strvacuumpertable']}</h2>"; echo '<p>' . ($defaults['autovacuum'] == 'on' ? $lang['strturnedon'] : $lang['strturnedoff']) . '</p>'; echo "<p class=\"message\">{$lang['strnotdefaultinred']}</p>"; function enlight($f, $p) { if (isset($f[$p[0]]) and $f[$p[0]] != $p[1]) { return "<span style=\"color:#F33;font-weight:bold\">" . htmlspecialchars($f[$p[0]]) . "</span>"; } return htmlspecialchars($p[1]); } $columns = array('namespace' => array('title' => $lang['strschema'], 'field' => field('nspname'), 'url' => "redirect.php?subject=schema&{$misc->href}&", 'vars' => array('schema' => 'nspname')), 'relname' => array('title' => $lang['strtable'], 'field' => field('relname'), 'url' => "redirect.php?subject=table&{$misc->href}&", 'vars' => array('table' => 'relname', 'schema' => 'nspname')), 'autovacuum_enabled' => array('title' => $lang['strenabled'], 'field' => callback('enlight', array('autovacuum_enabled', $defaults['autovacuum'])), 'type' => 'verbatim'), 'autovacuum_vacuum_threshold' => array('title' => $lang['strvacuumbasethreshold'], 'field' => callback('enlight', array('autovacuum_vacuum_threshold', $defaults['autovacuum_vacuum_threshold'])), 'type' => 'verbatim'), 'autovacuum_vacuum_scale_factor' => array('title' => $lang['strvacuumscalefactor'], 'field' => callback('enlight', array('autovacuum_vacuum_scale_factor', $defaults['autovacuum_vacuum_scale_factor'])), 'type' => 'verbatim'), 'autovacuum_analyze_threshold' => array('title' => $lang['stranalybasethreshold'], 'field' => callback('enlight', array('autovacuum_analyze_threshold', $defaults['autovacuum_analyze_threshold'])), 'type' => 'verbatim'), 'autovacuum_analyze_scale_factor' => array('title' => $lang['stranalyzescalefactor'], 'field' => callback('enlight', array('autovacuum_analyze_scale_factor', $defaults['autovacuum_analyze_scale_factor'])), 'type' => 'verbatim'), 'autovacuum_vacuum_cost_delay' => array('title' => $lang['strvacuumcostdelay'], 'field' => concat(callback('enlight', array('autovacuum_vacuum_cost_delay', $defaults['autovacuum_vacuum_cost_delay'])), 'ms'), 'type' => 'verbatim'), 'autovacuum_vacuum_cost_limit' => array('title' => $lang['strvacuumcostlimit'], 'field' => callback('enlight', array('autovacuum_vacuum_cost_limit', $defaults['autovacuum_vacuum_cost_limit'])), 'type' => 'verbatim')); // Maybe we need to check permissions here? $columns['actions'] = array('title' => $lang['stractions']); $actions = array('edit' => array('title' => $lang['stredit'], 'url' => "{$script}?action=confeditautovac&{$misc->href}&subject={$type}&", 'vars' => array('schema' => 'nspname', 'table' => 'relname')), 'delete' => array('title' => $lang['strdelete'], 'url' => "{$script}?action=confdelautovac&{$misc->href}&subject={$type}&", 'vars' => array('schema' => 'nspname', 'table' => 'relname'))); if ($type == 'table') { unset($actions['edit']['vars']['schema'], $actions['delete']['vars']['schema'], $columns['namespace'], $columns['relname']); } $misc->printTable($autovac, $columns, $actions, $lang['strnovacuumconf']); if ($type == 'table' and $autovac->recordCount() == 0) { echo "<br />"; echo "<a href=\"tables.php?action=confeditautovac&{$misc->href}&table=", htmlspecialchars($_REQUEST['table']), "\">{$lang['straddvacuumtable']}</a>"; } } }
<form action="<?php echo site_url('bookings/load'); ?> " method="POST" name="bookings_book"> <table> <tr> <td valign="middle"><label for="chosen_date"><strong>Date:</strong></label></td> <td valign="middle"> <input type="text" name="chosen_date" id="chosen_date" size="10" maxlength="10" value="<?php echo date("d/m/Y", $chosen_date); ?> " onchange="this.form.submit()" onblur="this.form.submit()" /> </td> <td valign="middle"> <img style="cursor:pointer" align="top" src="webroot/images/ui/cal_day.gif" width="16" height="16" title="Choose date" onclick="displayDatePicker('chosen_date', false);" /> </td> <td> <input type="submit" value=" Load " /></td> </tr> </table> </form> <br /> <?php echo @field($this->validation->chosen_date_error);
<?php if ($REQUEST_METHOD == 'POST' and (authorized($USERNAME, 'postcomment') or JOURNAL_ANONYMOUSPOSTS)) { if ($un = is_logged_in() or JOURNAL_ANONYMOUSPOSTS) { if (JOURNAL_ANONYMOUSPOSTS) { $un = "Anonymous ({$poster})"; } $id = insert_message($un, $subject, $body); if ($id) { $q = "insert into entrymessages (entrydate, entryuser, messageid) values\n\t\t\t\t('{$date} {$time}', '" . JOURNAL_USERNAME . "', '{$id}');"; if (mysql_query($q)) { print 'Posted.'; } else { print 'Error: ' . mysql_error(); } } else { print 'Error: ' . mysql_error(); } } else { print "You must be logged in. <a href='{$SCRIPT_URI}/Login'>Go here</a>."; } } else { // Show Form print "<form action='{$PHP_SELF}' method='POST'>" . ((JOURNAL_ANONYMOUSPOSTS and !is_logged_in()) ? "Your name: " . field('poster') : "") . ($journal ? hidden('journal', $journal) : "") . ($replyto ? hidden('replyto', $replyto) : "") . "<table>" . "<tr><td>Subject:</td><td><input type='text' name='subject' size='40' /></td></tr>" . "<tr><td>Message:</td><td><textarea name='body' cols='40' rows='10'></textarea></td></tr>" . "<tr><td><input type='submit' value='Post'></td></tr>" . "</table>" . "</form>"; }