本文整理汇总了PHP中field函数的典型用法代码示例。如果您正苦于以下问题:PHP field函数的具体用法?PHP field怎么用?PHP field使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了field函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: offsetGet
/**
* 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;
}
}
}
开发者ID:calderawp,项目名称:metaplate-core,代码行数:25,代码来源:access.php
示例2: doDefault
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());
}
开发者ID:yxwzaxns,项目名称:DaoCloud_phpPgAdmin,代码行数:30,代码来源:history.php
示例3: doTree
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;
}
开发者ID:netcon-source,项目名称:phppgadmin,代码行数:25,代码来源:servers.php
示例4: doDefault
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";
}
开发者ID:hardikk,项目名称:HNH,代码行数:29,代码来源:history.php
示例5: doTree
/**
* 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;
}
开发者ID:yxwzaxns,项目名称:DaoCloud_phpPgAdmin,代码行数:11,代码来源:conversions.php
示例6: doTree
/**
* 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;
}
开发者ID:hardikk,项目名称:HNH,代码行数:11,代码来源:languages.php
示例7: escape
function escape($fields)
{
global $lang;
if ($fields['id'] === 'all') {
return $lang['strallservers'];
} else {
return value(field('desc'), $fields, 'xml');
}
}
开发者ID:hardikk,项目名称:HNH,代码行数:9,代码来源:servers.php
示例8: doTree
/**
* 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;
}
开发者ID:phjeannine,项目名称:hakoopix,代码行数:12,代码来源:casts.php
示例9: doTree
/**
* 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;
}
开发者ID:hardikk,项目名称:HNH,代码行数:12,代码来源:sequences.php
示例10: doTree
/**
* 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;
}
开发者ID:yxwzaxns,项目名称:DaoCloud_phpPgAdmin,代码行数:13,代码来源:opclasses.php
示例11: doTree
/**
* 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;
}
开发者ID:phjeannine,项目名称:hakoopix,代码行数:12,代码来源:domains.php
示例12: getServers
/**
* 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;
}
开发者ID:netcon-source,项目名称:phppgadmin,代码行数:49,代码来源:Misc.php
示例13: doTree
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;
}
开发者ID:phjeannine,项目名称:hakoopix,代码行数:9,代码来源:all_db.php
示例14: doTree
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;
}
开发者ID:phjeannine,项目名称:hakoopix,代码行数:9,代码来源:triggers.php
示例15: validation_errors
<?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');
?>
开发者ID:rayyidh,项目名称:socialhealing,代码行数:31,代码来源:comment_form.php
示例16: format_describe_methods_result
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;
}
开发者ID:hugcoday,项目名称:wiki,代码行数:95,代码来源:xmlrpc-introspect.php
示例17: doAdmin
//.........这里部分代码省略.........
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>";
}
}
}
开发者ID:hardikk,项目名称:HNH,代码行数:101,代码来源:admin.php
示例18: default_action
/**
* 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();
}
开发者ID:yxwzaxns,项目名称:DaoCloud_phpPgAdmin,代码行数:22,代码来源:plugin.php
示例19: isset
<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') {
开发者ID:phpsource,项目名称:web-bugs,代码行数:31,代码来源:bug.php
示例20: doTree
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;
}
开发者ID:hardikk,项目名称:HNH,代码行数:10,代码来源:database.php
注:本文中的field函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论