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


PHP _list函数代码示例

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


在下文中一共展示了_list函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($outer, $binds = NULL, $exprs = NULL)
 {
     $this->outer = $outer;
     if ($binds) {
         if (_sequential_Q($exprs)) {
             $exprs = $exprs->getArrayCopy();
         }
         for ($i = 0; $i < count($binds); $i++) {
             if ($binds[$i]->value === "&") {
                 if ($exprs !== NULL && $i < count($exprs)) {
                     $lst = call_user_func_array('_list', array_slice($exprs, $i));
                 } else {
                     $lst = _list();
                 }
                 $this->data[$binds[$i + 1]->value] = $lst;
                 break;
             } else {
                 if ($exprs !== NULL && $i < count($exprs)) {
                     $this->data[$binds[$i]->value] = $exprs[$i];
                 } else {
                     $this->data[$binds[$i]->value] = NULL;
                 }
             }
         }
     }
 }
开发者ID:mdkarch,项目名称:mal,代码行数:26,代码来源:env.php

示例2: _list

 function _list($type = 'ul', $list, $attributes = '', $depth = 0)
 {
     if (!is_array($list)) {
         return $list;
     }
     $out = str_repeat(" ", $depth);
     if (is_array($attributes)) {
         $atts = '';
         foreach ($attributes as $key => $val) {
             $atts .= ' ' . $key . '="' . $val . '"';
         }
         $attributes = $atts;
     } elseif (is_string($attributes) and strlen($attributes) > 0) {
         $attributes = ' ' . $attributes;
     }
     $out .= "<" . $type . $attributes . ">\n";
     static $_last_list_item = '';
     foreach ($list as $key => $val) {
         $_last_list_item = $key;
         $out .= str_repeat(" ", $depth + 2);
         $out .= "<li>";
         if (!is_array($val)) {
             $out .= $val;
         } else {
             $out .= $_last_list_item . "\n";
             $out .= _list($type, $val, '', $depth + 4);
             $out .= str_repeat(" ", $depth + 2);
         }
         $out .= "</li>\n";
     }
     $out .= str_repeat(" ", $depth);
     $out .= "</" . $type . ">\n";
     return $out;
 }
开发者ID:pepegarcia,项目名称:publicidadoficialdemo-1,代码行数:34,代码来源:html_helper.php

示例3: eval_ast

function eval_ast($ast, $env)
{
    if (_symbol_Q($ast)) {
        return $env->get($ast);
    } elseif (_sequential_Q($ast)) {
        if (_list_Q($ast)) {
            $el = _list();
        } else {
            $el = _vector();
        }
        foreach ($ast as $a) {
            $el[] = MAL_EVAL($a, $env);
        }
        return $el;
    } elseif (_hash_map_Q($ast)) {
        $new_hm = _hash_map();
        foreach (array_keys($ast->getArrayCopy()) as $key) {
            $new_hm[$key] = MAL_EVAL($ast[$key], $env);
        }
        return $new_hm;
    } else {
        return $ast;
    }
}
开发者ID:joostkremers,项目名称:mal,代码行数:24,代码来源:step3_env.php

示例4: _list

 /**
  * Generates the list
  *
  * Generates an HTML ordered list from an single or multi-dimensional array.
  *
  * @param	string
  * @param	mixed
  * @param	mixed
  * @param	int
  * @return	string
  */
 function _list($type = 'ul', $list = array(), $attributes = '', $depth = 0)
 {
     // If an array wasn't submitted there's nothing to do...
     if (!is_array($list)) {
         return $list;
     }
     // Set the indentation based on the depth
     $out = str_repeat(' ', $depth) . '<' . $type . _stringify_attributes($attributes) . ">\n";
     // Cycle through the list elements.  If an array is
     // encountered we will recursively call _list()
     static $_last_list_item = '';
     foreach ($list as $key => $val) {
         $_last_list_item = $key;
         $out .= str_repeat(' ', $depth + 2) . '<li>';
         if (!is_array($val)) {
             $out .= $val;
         } else {
             $out .= $_last_list_item . "\n" . _list($type, $val, '', $depth + 4) . str_repeat(' ', $depth + 2);
         }
         $out .= "</li>\n";
     }
     // Set the indentation for the closing tag and apply it
     return $out . str_repeat(' ', $depth) . '</' . $type . ">\n";
 }
开发者ID:super99199,项目名称:oasystem,代码行数:35,代码来源:html_helper.php

示例5: _create

function _create(&$PDOdb, &$db, &$user, &$conf, &$langs, $df = false, $ds = false, $de = false, $amount = 0, $label = '')
{
    unset($_SESSION['SENDTOINVOICETOADHERENT_ERRORS']);
    _list($PDOdb, $db, $user, $conf, $langs, 0);
    if (!$user->rights->sendinvoicetoadherent->create) {
        accessforbidden();
    } else {
        $form = new TFormCore();
        print_fiche_titre($langs->trans("sendinvoicetoadherentTitleCreate"));
        echo '<script type="text/javascript">
			$(function() {
				displayDateCotisation();
			});
			
			function displayDateCotisation(obj) {
				if ($(obj).attr("checked") == "checked") {
					$(".cotisation_create").show()
				} else {
					$(".cotisation_create").hide()
				}
			}
		</script>';
        echo '<form style="padding-top:15px;" name="formsoc" action="' . $_SERVER["PHP_SELF"] . '" method="post" enctype="multipart/form-data">';
        echo '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
        echo '<input type="hidden" name="action" value="createConfirm">';
        echo '<table class="border" width="100%">';
        $date_fac = $df === false ? date('d/m/Y') : $df;
        $date_start = $ds === false ? date('d/m/Y') : $ds;
        $date_end = $de === false ? date('d/m/Y', strtotime('+1 year -1 day')) : $de;
        $label = empty($label) ? $langs->trans("Subscription") . ' ' . ($ds ? substr($date_start, -4, 4) : dol_print_date(time(), '%Y')) : $label;
        echo '<tr><td width="20%" class="fieldrequired">' . $langs->trans("sendinvoicetoadherentDateFacture") . '</td><td width="80%">' . $form->calendrier('', 'date_fac', $date_fac) . '</td></tr>';
        echo '<tr><td width="20%">' . $langs->trans("sendinvoicetoadherentCreateCotisation") . '</td><td width="80%"><input type="checkbox" name="create_cotisation" value="1" onclick="javascript:displayDateCotisation(this);" /></td></tr>';
        echo '<tr class="cotisation_create" style="display:none;"><td width="20%" class="fieldrequired">' . $langs->trans("sendinvoicetoadherentDateStartAdhesion") . '</td><td width="80%">' . $form->calendrier('', 'date_start', $date_start) . '</td></tr>';
        echo '<tr class="cotisation_create" style="display:none;"><td width="20%">' . $langs->trans("sendinvoicetoadherentDateEndAdhesion") . '</td><td width="80%">' . $form->calendrier('', 'date_end', $date_end) . '</td></tr>';
        echo '<tr class="cotisation_create" style="display:none;"><td width="20%" class="fieldrequired">' . $langs->trans("sendinvoicetoadherentAmountAdhesion") . '</td><td width="80%">' . $form->texte('', 'amount_cotisation', $amount, 6, 15) . ' ' . $langs->trans("Currency" . $conf->currency) . '</td></tr>';
        echo '<tr class="cotisation_create" style="display:none;"><td width="20%">' . $langs->trans("sendinvoicetoadherentLabelAdhesion") . '</td><td width="80%">' . $form->texte('', 'label', $label, 32, 255) . '</td></tr>';
        echo '</table>';
        if ($user->rights->sendinvoicetoadherent->create) {
            echo '<br /><center>';
            echo '<input type="submit" class="button" value="' . $langs->trans('sendinvoicetoadherentActionCreateConfirm') . '" />&nbsp;&nbsp;&nbsp;&nbsp;';
            echo '<a href="' . dol_buildpath('/sendinvoicetoadherent/sendinvoicetoadherent.php?action=list', 2) . '" class="button" style="text-decoration:none;font-weight:normal;cusor:pointer;height:15px;padding-top:5px;">' . $langs->trans('Cancel') . '</a>';
            echo '</center>';
        }
        echo '</form>';
    }
    $PDOdb->close();
    llxFooter('');
}
开发者ID:ATM-Consulting,项目名称:dolibarr_module_sendinvoicetoadherent,代码行数:48,代码来源:sendinvoicetoadherent.php

示例6: read_form

function read_form($reader)
{
    $token = $reader->peek();
    switch ($token) {
        case '\'':
            $reader->next();
            return _list(_symbol('quote'), read_form($reader));
        case '`':
            $reader->next();
            return _list(_symbol('quasiquote'), read_form($reader));
        case '~':
            $reader->next();
            return _list(_symbol('unquote'), read_form($reader));
        case '~@':
            $reader->next();
            return _list(_symbol('splice-unquote'), read_form($reader));
        case '^':
            $reader->next();
            $meta = read_form($reader);
            return _list(_symbol('with-meta'), read_form($reader), $meta);
        case '@':
            $reader->next();
            return _list(_symbol('deref'), read_form($reader));
        case ')':
            throw new Exception("unexpected ')'");
        case '(':
            return read_list($reader);
        case ']':
            throw new Exception("unexpected ']'");
        case '[':
            return read_list($reader, '_vector', '[', ']');
        case '}':
            throw new Exception("unexpected '}'");
        case '{':
            return read_hash_map($reader);
        default:
            return read_atom($reader);
    }
}
开发者ID:divide-et-impera,项目名称:mal,代码行数:39,代码来源:reader.php

示例7: foreach

}
### function }}}
### modes {{{
if ($mode == 'setavail') {
    //dd($form);
    $cbs = $form['cb'];
    // array
    $mode2 = $form['mode2'];
    foreach ($cbs as $cb) {
        print $cb;
        if ($mode2 == '1') {
            _set_ce_avail($cb, true);
        } else {
            _set_ce_avail($cb, false);
        }
    }
    print <<<EOS
<script>
//alert("Changed !!");
parent.document.location.reload();
</script>
EOS;
    exit;
}
### modes }}}
pagehead($page_title);
ptitle('CE List');
_style();
_list();
pagetail();
exit;
开发者ID:swkim85,项目名称:HTCaaS,代码行数:31,代码来源:ce.php

示例8: setEventMessage

        } else {
            $object->set_values($_POST);
            $object->save($PDOdb);
            setEventMessage('BDDSaved');
        }
        _list($PDOdb);
        break;
    case 'edit':
        $object->load($PDOdb, GETPOST('id'));
        _card($PDOdb, $object);
        break;
    case 'new':
        _card($PDOdb, $object);
        break;
    default:
        _list($PDOdb);
        break;
}
function _card(&$PDOdb, &$object)
{
    global $langs, $conf, $user, $db;
    if (empty($user->rights->query->bdd->use_other_db)) {
        return '';
    }
    llxHeader();
    dol_fiche_head(array(), 'bdd', 'BDD');
    $tbs = new TTemplateTBS();
    $object->connect();
    $formCore = new TFormCore('auto', 'formBDD', 'post');
    echo $formCore->hidden('action', 'save');
    echo $formCore->hidden('id', $object->getId());
开发者ID:ATM-Consulting,项目名称:dolibarr_module_query,代码行数:31,代码来源:bdd.php


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