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


PHP select类代码示例

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


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

示例1: initialize

 /**
  * Initialize the products form
  */
 public function initialize($entity = null, $options = array())
 {
     $f = new text("url_base");
     $f->setLabel('URL BASE');
     $f->setAttribute('class', 'form-control');
     $this->add($f);
     $f = new select("ativo", array('1' => 'Sim', '0' => 'Não'));
     $f->setAttribute('class', 'form-control');
     $this->add($f);
     $f = new select("manutencao", array('1' => 'Sim', '0' => 'Não'));
     $f->setAttribute('class', 'form-control');
     $this->add($f);
     $f = new select("orcamento", array('1' => 'Sim', '0' => 'Não'));
     $f->setAttribute('class', 'form-control');
     $this->add($f);
     $f = new select("adicionar_carrinho", array('1' => 'Sim', '0' => 'Não'));
     $f->setLabel('Adicionar Carrinho');
     $f->setAttribute('class', 'form-control');
     $this->add($f);
     $f = new text("plano");
     $f->setAttribute('class', 'form-control');
     $this->add($f);
     $f = new numeric("limite_produtos");
     $f->setLabel('Limite de Produtos');
     $f->setAttribute('class', 'form-control');
     $this->add($f);
     $f = new select("certificado", array('certising' => 'Certising', 'comodo' => 'Comodo', 'norton' => 'Norton', 'rapidssl' => 'Rapid SSL', 'site_blindado' => 'Site Blindado'));
     $f->setAttribute('class', 'form-control');
     $this->add($f);
 }
开发者ID:denners777,项目名称:phalcon_ecommerce,代码行数:33,代码来源:LojaGeralConfigForm.php

示例2: fetchAll

 public function fetchAll()
 {
     $select = new select();
     $select->from('categories');
     $select->join('master_categories', 'master_categories.id = categories.master_category', array('master_category_name' => 'name'));
     $resultSet = $this->tableGateway->selectWith($select);
     $resultSet->buffer();
     return $resultSet ? $resultSet : false;
 }
开发者ID:kalelc,项目名称:inventory,代码行数:9,代码来源:CategoryTable.php

示例3: getUtilisateurByID

 public function getUtilisateurByID($clientid)
 {
     $select = new select();
     $select->from('user');
     $select->where(array('user_id' => $clientid));
     $rowset = $this->tableGateway->selectwith($select);
     $rowset->buffer();
     return $rowset;
 }
开发者ID:JohannesGirard,项目名称:WebCashRegister-zf2,代码行数:9,代码来源:UserTable.php

示例4: all

 public function all($option = "")
 {
     global $database;
     $option["column_array"] = ["*"];
     $select = new select();
     $sql = $select->build_select_all_sql(self::get_table(), $option);
     $row = $database->fetch($sql);
     return $row;
 }
开发者ID:hscale,项目名称:BlastPad,代码行数:9,代码来源:model_class.php

示例5: initialize

 public function initialize($entity = null, $option = array())
 {
     if (!isset($option['edit'])) {
         $element = new Text("id");
         $this->add($element->setLabel("id"));
     } else {
         $this->add(new Hidden("id"));
     }
     $name = new Text("name");
     $name->addValidator(new PresenceOf(array('message' => 'The name is required')));
     $name->setLabel("分类名称");
     $this->add($name);
     $isParent = new select('isParent', array("0" => "否", '1' => '是'), array("value" => 1));
     $isParent->setLabel("是");
     $this->add($isParent);
     $parentId = new select("parentId", Category::find("isParent=1 and status=1"), array("using" => array("id", "name"), 'useEmpty' => true, 'emptyText' => '...', 'emptyValue' => '0', "value" => 0));
     $parentId->setlabel("父类名称:");
     $this->add($parentId);
 }
开发者ID:sayi21cn,项目名称:haitao,代码行数:19,代码来源:CategoryForm.php

示例6: init

 static function init()
 {
     self::$selects["default_style"] = array("{t}Default theme{/t}", select::themes());
     self::$selects["timezone"] = array("{t}Time zone{/t}, {t}current time{/t}: " . sys_date("{t}g:i a{/t}"), select::timezones(true));
     self::$selects["lang"] = array("{t}Default language{/t}", select::languages());
     $modules = select::modules_all();
     asort($modules);
     self::$multi_selects["disabled_modules"] = array("{t}Disabled modules{/t}", $modules);
     if (empty($_REQUEST["setup_auth_ldap_groups"])) {
         $_POST["setup_auth_ldap_groups"] = 0;
         $_REQUEST["setup_auth_ldap_groups"] = 0;
     }
 }
开发者ID:drognisep,项目名称:Simple-Groupware,代码行数:13,代码来源:sysconfig.php

示例7: command

 public static function command($msg, $user)
 {
     $returnmsg = "";
     $msg = substr($msg, 1);
     $command = explode(' ', $msg);
     commands::logm("command:" . $command[0] . "|rechte [" . $user->rights . "]\n");
     switch ($command[0]) {
         case "invite":
             break;
         case "join":
             break;
         case "leave":
             break;
         case "rights":
             break;
         case "group":
             break;
         case "eval":
             if ($user->rights >= 10000000) {
                 global $sockets, $users, $groups, $server;
                 ob_start();
                 eval($command[1] . ";");
                 $result = ob_get_clean();
                 $returnmsg = $result;
             } else {
                 $returnmsg = "Insufficient permissions!";
             }
             break;
         case "kick":
             break;
         case "ban":
             break;
         case "shout":
             if ($user->rights > 100) {
             } else {
                 $returnmsg = "Insufficient permissions!";
             }
             break;
         case "w":
             if (select::byname($command[1])) {
                 $returnmsg = "You whispert to:" . $command[1] . " " . $msg;
             } else {
                 $returnmsg = "User \"" . $command[1] . "\" not found";
             }
             break;
         default:
             $returnmsg = "Command not found";
             break;
     }
     return $returnmsg;
 }
开发者ID:Kawaeike,项目名称:LocalChat,代码行数:51,代码来源:commands.php

示例8: initialize

 /**
  * Initialize the products form
  */
 public function initialize($entity = null, $options = array())
 {
     $f = new select("template_nome", array('7store' => '7store', 'Bewear' => 'Bewear', 'Bohase' => 'Bohase', 'Classic' => 'Classic', 'Everything' => 'Everything', 'Hosoren' => 'Hosoren', 'Micra' => 'Micra', 'ShopMe' => 'ShopMe', 'Smile' => 'Smile', 'Unicase' => 'Unicase'));
     $f->setLabel('Template Nome');
     $f->setAttribute('class', 'form-control');
     $this->add($f);
     $f = new text("template_variacao");
     $f->setLabel('Template Variação');
     $f->setAttribute('class', 'form-control');
     $this->add($f);
     $f = new text("imagem_size");
     $f->setLabel('Imagem Size');
     $f->setAttribute('class', 'form-control');
     $this->add($f);
     $f = new text("thumbnail_size");
     $f->setLabel('Thumbnail Size');
     $f->setAttribute('class', 'form-control');
     $this->add($f);
     $f = new text("paginacao_tipo");
     $f->setLabel('Paginaçao Tipo');
     $f->setAttribute('class', 'form-control');
     $this->add($f);
 }
开发者ID:denners777,项目名称:phalcon_ecommerce,代码行数:26,代码来源:LojaLayoutForm.php

示例9: getBySpecification

 public function getBySpecification($specification)
 {
     $select = new select();
     $select->from('measures');
     $select->join('measures_types', 'measures_types.id = measures.measure_type', array('mt_name' => 'name'), $select::JOIN_LEFT);
     $select->join('specifications', 'specifications.id = measures.specification', array('s_name' => 'name'));
     $select->where(array($this->tableGateway->getTable() . '.specification' => $specification));
     $resultSet = $this->tableGateway->selectWith($select);
     return $resultSet ? $resultSet : false;
 }
开发者ID:kalelc,项目名称:inventory,代码行数:10,代码来源:MeasureTable.php

示例10: select

 static function select($path, $fields, $where, $order, $limit, $vars, $mfolder)
 {
     $rows = array();
     $modules = select::modules();
     asort($modules);
     foreach ($modules as $module => $name) {
         if ($name[0] == " ") {
             continue;
         }
         $file = sys_find_module($module);
         $row = array("id" => $file, "name" => $name, "modulename" => $module, "created" => @filectime($file), "lastmodified" => @filemtime($file), "lastmodifiedby" => "", "searchcontent" => $file, "filename" => $file, "filemtime" => @filemtime($file), "filectime" => @filectime($file), "filesize" => @filesize($file), "filecontent" => "");
         if (sys_select_where($row, $where, $vars)) {
             $rows[$file] = $row;
         }
     }
     return sys_select($rows, $order, $limit, $fields);
 }
开发者ID:drognisep,项目名称:Simple-Groupware,代码行数:17,代码来源:modules.php

示例11: select

                    $msg .= " | ";
                    $subpage = "";
                }
            } else {
                $msg .= $I18N->msg('pool_file_not_found');
                $subpage = "";
            }
            $msg .= "<br>";
        }
    } else {
        $msg = $I18N->msg('pool_selectedmedia_error');
    }
}
// *************************************** SUBPAGE: "" -> MEDIEN ANZEIGEN
if (!isset($subpage) or $subpage == '') {
    $cats_sel = new select();
    $cats_sel->set_style("width:150px;");
    $cats_sel->set_size(1);
    $cats_sel->set_name("rex_file_category");
    $cats_sel->add_option($I18N->msg('pool_kats_no'), "0");
    $mediacat_ids = array();
    $rootCat = 0;
    if ($rootCats = OOMediaCategory::getRootCategories()) {
        foreach ($rootCats as $rootCat) {
            add_mediacat_options_wperm($cats_sel, $rootCat, $mediacat_ids);
        }
    }
    $cats_sel->set_selected($rex_file_category);
    echo "<table width=100% cellpadding=5 cellspacing=1 border=0 ><tr><td class=grey><b class=head>" . $I18N->msg('pool_file_list') . "</b></td></tr><tr><td></td></tr></table>";
    echo $cat_out;
    print "<table class=rex border=0 cellpadding=5 cellspacing=1 style='width:100%'>\n";
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:medienpool.inc.php

示例12: foreach

    $myAdmin->delete_notification($deleteDone, $result);
    $myAdmin->addLogs($myAdmin->pageCurrent, "DEL", $idDel, $result);
}
// Fin suppression
// DUPLICATION /////////////////////////////////////// ????
if ($__POST["actionInList"] == "dupliquer" && (int) $__POST["actionListId"]) {
    $newID = $PDO->duplication($myTable, $__POST["actionListId"], "titre", "");
}
// Fin Duplication
// FILTRES /////////////////////////////////////// ????
if (count($datasArticle["filtre"]) > 0) {
    include DOS_INCPAGES_ADMIN . "list-prepareFiltres.php";
    foreach ($datasArticle["filtre"] as $f => $filtre) {
        if ($filtre["type"] == "select") {
            reset($filtre["items"]);
            $newfield = new select();
            $newfield->field = "F__filtre_" . $filtre["field"];
            $newfield->label = $filtre["label"];
            $newfield->widthLabel = 1;
            $newfield->multiLang = false;
            $newfield->javascript = "onChange='submitFiltres()'";
            $newfield->allItems = true;
            $newfield->items = $filtre["items"];
            $newfield->value = ${$newfield->field};
            $datasArticle["filtre"][$f]["HTML_Filtre"] = $newfield->add();
        }
        if ($filtre["type"] == "date") {
            $newfield = new date();
            $newfield->field = "F__filtre_" . $filtre["field"];
            $newfield->label = $filtre["label"];
            $newfield->widthLabel = 1;
开发者ID:wedesign-pf,项目名称:Tit,代码行数:31,代码来源:article.php

示例13: sql

     $gma = new sql();
     $gma->setQuery("select * from rex_module_action,rex_action where rex_module_action.action_id=rex_action.id and rex_module_action.module_id='{$modul_id}'");
     for ($i = 0; $i < $gma->getRows(); $i++) {
         $iaction_id = $gma->getValue("rex_module_action.id");
         $action_id = $gma->getValue("rex_module_action.action_id");
         echo "<tr>\r\n\t\t\t\t\t\t<td class=grey>&nbsp;</td>\r\n\t\t\t\t\t\t<td class=grey>";
         echo "<a href=index.php?page=module&subpage=actions&action_id={$action_id}&function=edit>" . $gma->getValue("name") . "</a>";
         echo " [";
         echo $PREPOST[$gma->getValue("prepost")] . "|";
         echo $ASTATUS[$gma->getValue("status")];
         echo "] </td>";
         echo "<td class=grey><a href=index.php?page=module&modul_id={$modul_id}&function_action=delete&function=edit&iaction_id={$iaction_id}>" . $I18N->msg("action_delete") . "</a></td>";
         echo "</tr>";
         $gma->next();
     }
     $gaa_sel = new select();
     $gaa_sel->set_name("action_id");
     $gaa_sel->set_size(1);
     $gaa_sel->set_style("' class='inp100");
     for ($i = 0; $i < $gaa->getRows(); $i++) {
         $gaa_sel->add_option($gaa->getValue("name") . " [" . $PREPOST[$gaa->getValue("prepost")] . "|" . $ASTATUS[$gaa->getValue("status")] . "]", $gaa->getValue("id"));
         $gaa->next();
     }
     echo "<form action=index.php#action method=post>";
     echo "<input type=hidden name=page value=module>";
     echo "<input type=hidden name=modul_id value={$modul_id}>";
     echo "<input type=hidden name=function value=edit>";
     echo "<input type=hidden name=function_action value=add>";
     echo "<tr><td colspan=3></td></tr><tr>\r\n\t\t\t\t\t<td class=grey>&nbsp;</td>\r\n\t\t\t\t\t<td class=grey>" . $gaa_sel->out() . "</td>\r\n\t\t\t\t\t<td class=grey><input type=submit value='" . $I18N->msg("action_add") . "'></td>\r\n\t\t\t\t\t</tr>";
     echo "</form>";
 }
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:module.modules.inc.php

示例14: select

 if ($REX_USER->isValueOf("rights", "admin[]") || $REX_USER->isValueOf("rights", "moveArticle[]") || $REX_USER->isValueOf("rights", "copyArticle[]") || $REX_USER->isValueOf("rights", "copyContent[]") && count($REX['CLANG']) > 1) {
     echo "<table border=0 cellpadding=5 cellspacing=1 width=100%>\n          <tr>\n            <td colspan=3>" . $I18N->msg("other_functions") . "</td>\n          </tr>";
     // --------------------------------------------------- INHALTE KOPIEREN START
     if (($REX_USER->isValueOf("rights", "admin[]") || $REX_USER->isValueOf("rights", "copyContent[]")) && count($REX['CLANG']) > 1) {
         echo "\n          <form action=index.php method=get>\n          <input type=hidden name=page value=content>\n          <input type=hidden name=article_id value='{$article_id}'>\n          <input type=hidden name=mode value='meta'>\n          <input type=hidden name=clang value={$clang}>\n          <input type=hidden name=ctype value={$ctype}>\n          <input type=hidden name=function value=copycontent>";
         $lang_a = new select();
         $lang_a->set_name("clang_a");
         $lang_a->set_style("width:100px;");
         $lang_a->set_size(1);
         foreach ($REX['CLANG'] as $val => $key) {
             $lang_a->add_option($key, $val);
         }
         if (isset($_REQUEST["clang_a"])) {
             $lang_a->set_selected($_REQUEST["clang_a"]);
         }
         $lang_b = new select();
         $lang_b->set_name("clang_b");
         $lang_b->set_style("width:100px;");
         $lang_b->set_size(1);
         foreach ($REX['CLANG'] as $val => $key) {
             $lang_b->add_option($key, $val);
         }
         if (isset($_REQUEST["clang_b"])) {
             $lang_b->set_selected($_REQUEST["clang_b"]);
         }
         echo "<tr><td class=grey width=150>" . $I18N->msg("content_contentoflang") . "</td><td class=grey>" . $lang_a->out() . " " . $I18N->msg("content_to") . " " . $lang_b->out() . " " . $I18N->msg("content_copy") . "</td></tr>";
         echo "<tr>\n          <td class=grey>&nbsp;</td>\n          <td class=grey><input type=submit value='" . $I18N->msg("content_submitcopycontent") . "' size=8></td>\n          </tr>";
         echo "</form>";
     }
     // --------------------------------------------------- INHALTE KOPIEREN ENDE
     // --------------------------------------------------- ARTIKEL VERSCHIEBEN START
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:content.inc.php

示例15: cargar_combo_hora

function cargar_combo_hora($combo, $hora = '')
{
    $xres = new xajaxResponse();
    require_once "../include/select.php";
    ob_start();
    ?>
			<select id='<?php 
    echo $combo;
    ?>
1' name='<?php 
    echo $combo;
    ?>
1' class="select"></select>
			<select id='<?php 
    echo $combo;
    ?>
2' name='<?php 
    echo $combo;
    ?>
2' class="select"></select>
			<select id='<?php 
    echo $combo;
    ?>
3' name='<?php 
    echo $combo;
    ?>
3' class="select"></select>
		<?php 
    $xres->addAssign($combo, "innerHTML", ob_get_clean());
    $hora = explode(':', $hora);
    $h = $hora[0];
    $m = $hora[1];
    $s = 'AM';
    if ($h > 12) {
        $h -= 12;
        $s = 'PM';
    }
    // Creando Objeto Select Hora
    $sel = new select();
    //Agregando Opciones
    $sel->agregarOpcion('1', '01');
    $sel->agregarOpcion('2', '02');
    $sel->agregarOpcion('3', '03');
    $sel->agregarOpcion('4', '04');
    $sel->agregarOpcion('5', '05');
    $sel->agregarOpcion('6', '06');
    $sel->agregarOpcion('7', '07');
    $sel->agregarOpcion('8', '08');
    $sel->agregarOpcion('9', '09');
    $sel->agregarOpcion('10', '10');
    $sel->agregarOpcion('11', '11');
    $sel->agregarOpcion('12', '12');
    // Opción seleccionada
    if ($h != '') {
        $sel->seleccionarValue($h);
    }
    // Cargo los datos en el combo
    $xres->addScript($sel->getJavaScript("{$combo}" . "1"));
    // Creando Objeto Select Minutos
    $sel = new select();
    //Agregando Opciones
    $sel->agregarOpcion('0', '00');
    $sel->agregarOpcion('5', '05');
    $sel->agregarOpcion('10', '10');
    $sel->agregarOpcion('15', '15');
    $sel->agregarOpcion('20', '20');
    $sel->agregarOpcion('25', '25');
    $sel->agregarOpcion('30', '30');
    $sel->agregarOpcion('35', '35');
    $sel->agregarOpcion('40', '40');
    $sel->agregarOpcion('45', '45');
    $sel->agregarOpcion('50', '50');
    $sel->agregarOpcion('55', '55');
    // Opción seleccionada
    if ($m != '') {
        $sel->seleccionarValue($m);
    }
    // Cargo los datos en el combo
    $xres->addScript($sel->getJavaScript("{$combo}" . "2"));
    // Creando Objeto Select AM/PM
    $sel = new select();
    //Agregando Opciones
    $sel->agregarOpcion('AM', 'AM');
    $sel->agregarOpcion('PM', 'PM');
    if ($s != '') {
        $sel->seleccionarValue($s);
    }
    // Cargo los datos en el combo
    $xres->addScript($sel->getJavaScript("{$combo}" . "3"));
    return utf8_encode($xres->getXML());
}
开发者ID:johnfelipe,项目名称:orfeo,代码行数:91,代码来源:combos_xajax.php


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