当前位置: 首页>>代码示例>>PHP>>正文


PHP field函数代码示例

本文整理汇总了PHP中field函数的典型用法代码示例。如果您正苦于以下问题:PHP field函数的具体用法?PHP field怎么用?PHP field使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了field函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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) + '&amp;database=' + encodeURI(database.options[database.selectedIndex].value) + '&amp;'\"";
    $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}&amp;nohistory=t&amp;subject=history&amp;", 'vars' => array('queryid' => 'queryid', 'paginate' => 'paginate'), 'target' => 'detail'), 'remove' => array('title' => $lang['strdelete'], 'url' => "history.php?{$misc->href}&amp;action=confdelhistory&amp;", '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&amp;{$misc->href}\">{$lang['strclearhistory']}</a></li>\n";
    }
    echo "\t<li><a href=\"history.php?action=history&amp;{$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


注:本文中的field函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。