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


PHP XoopsFormElementTray::addElementNotRef方法代码示例

本文整理汇总了PHP中XoopsFormElementTray::addElementNotRef方法的典型用法代码示例。如果您正苦于以下问题:PHP XoopsFormElementTray::addElementNotRef方法的具体用法?PHP XoopsFormElementTray::addElementNotRef怎么用?PHP XoopsFormElementTray::addElementNotRef使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XoopsFormElementTray的用法示例。


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

示例1: XoopsThemeQueryForm

 function XoopsThemeQueryForm($title, $name, $action, $method = "post", $nome_pesquisa, $campos, $count = 3, $campos2 = "", $count2 = false)
 {
     $this->XoopsForm($title, $name, $action, $method);
     if (!$campos2) {
         $campos2 = $campos;
     }
     if ($count2 === false) {
         $count2 = $count;
     }
     $this->addElement(new XoopsFormLabel("Pesquisa:"));
     for ($i = 0; $i < $count; $i++) {
         $buscaRow = new XoopsFormElementTray("&nbsp;&nbsp;&nbsp&nbsp;{$i} -->");
         $checkbox = new XoopsFormCheckBox("", "where[{$i}][ativa]", "true");
         $checkbox->addOption("Ativar");
         if ($i == 0) {
             $checkbox->setValue("Ativar");
         }
         $buscaRow->addElementNotRef($checkbox);
         $campo = new XoopsFormSelect("", "where[{$i}][campo]", "url");
         foreach ($campos as $key => $value) {
             $campo->addOption($value);
         }
         $buscaRow->addElementNotRef($campo);
         $buscaRow->addElementNotRef(new XoopsFormSelectSqlMatch("", "where[{$i}][tipo]"));
         $buscaRow->addElementNotRef(new XoopsFormText("", "where[{$i}][pesquisa]", 20, 100));
         $buscaRow->addElementNotRef(new XoopsFormSelectSqlAnd("", "where[{$i}][and]"));
         $this->addElementNotRef($buscaRow);
     }
     if ($count2 > 0) {
         $this->addElement(new XoopsFormLabel("Ordenação:"));
         for ($i = 0; $i < $count2; $i++) {
             $ordemRow = new XoopsFormElementTray("&nbsp;&nbsp;&nbsp&nbsp;{$i} -->");
             $checkbox2 = new XoopsFormCheckBox("", "order[{$i}][ativa]", "true");
             $checkbox2->addOption("Ativar");
             if ($i == 0) {
                 $checkbox2->setValue("Ativar");
             }
             $ordemRow->addElementNotRef($checkbox2);
             $campo2 = new XoopsFormSelect("", "order[{$i}][campo]", "url");
             foreach ($campos2 as $key => $value) {
                 $campo2->addOption($value);
             }
             $ordemRow->addElementNotRef($campo2);
             $ordemRow->addElementNotRef(new XoopsFormSelectSqlOrder("", "order[{$i}][tipo]"));
             $this->addElementNotRef($ordemRow);
         }
     }
     $checkbox3 = new XoopsFormCheckBox("Mostrar lista detalhada", "detalhes", "");
     $checkbox3->addOption("Sim", "Sim");
     $this->addElement($checkbox3);
     $this->addElement(new XoopsFormButton(" ", "pesquisa[{$nome_pesquisa}]", "Pesquisar", "submit", true));
 }
开发者ID:mohamedbiniz,项目名称:qualityranking,代码行数:52,代码来源:formselectsqlmatch.php


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