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


PHP CForm::get_selected方法代码示例

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


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

示例1: get_option

	static function get_option($array_title, $selectedvalue = "") {
		   $option = '<option value="">Aucun</option>';
		   foreach($array_title as $key=>$valeur) {
		   		$selected = CForm::get_selected($selectedvalue, $valeur);
		   		$option = $option . "<option value='" . $key . "'" . $selected . ">" . utf8_encode($valeur) . "</option>\n";
		   }
		   return $option;
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:8,代码来源:CFormCsv.php

示例2: get_option

	static function get_option($selectedvalue, $tablename="pays", $colvaluename="id", $colvuename="nom", $where=1) {
		   $option = "";
		   $result = CTable::select($colvaluename . " , " . $colvuename, $tablename, $where, $colvuename); 
		   while($array = mysql_fetch_array($result)) {
		   		$selected = CForm::get_selected($selectedvalue, $array[$colvaluename]);
		   		$option = $option . "<option value='" . $array[$colvaluename] . "'" . $selected . ">" . ucfirst(utf8_encode(substr($array[$colvuename], 0, 25))) . "</option>\n";
		   }
		   return $option;
	}	
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:9,代码来源:CFormPays.php

示例3: get_option

	static function get_option($selectedvalue, $idtype) {
		   $option = "";
		   $type_possible = CTableQuestion::get_enum('type');
		   foreach($type_possible as $valeur) {
		   		$selected = CForm::get_selected($selectedvalue, $valeur);
		   		$option = $option . "<option value='" . $valeur . "'" . $selected . ">" . $valeur . "</option>\n";
		   }
		   return $option;
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:9,代码来源:CFormQuestion.php

示例4: get_option

	static function get_option($selectedvalue, $tablename, $colvaluename="id", $colvuename="nom", $where=1) {
		   $option = "";
		   $sql = "SELECT " . $colvaluename . ", " . $colvuename . " FROM " . $tablename . " WHERE " . $where . " ORDER BY " . $colvuename;
		   $result = CBdd::select($sql);
		   while($array = mysql_fetch_array($result)) {
		   		$selected = CForm::get_selected($selectedvalue, $array[$colvaluename]);
		   		$option = $option . "<option value='" . $array[$colvaluename] . "'" . $selected . ">" . ucfirst(utf8_encode(substr($array[$colvuename], 0, 16))) . "</option>\n";
		   }
		   return $option;
	}	
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:10,代码来源:CForm.php

示例5: get_option

	static function get_option($selectedvalue, $idconfiguration) {
		   $option = "";
		   $sql = "SELECT choix FROM configuration WHERE id = " . $idconfiguration;
		   $result = CBdd::select_one($sql, "choix");
		   $choix_possible = explode('|', $result);
		   foreach($choix_possible as $valeur) {
		   		$selected = CForm::get_selected($selectedvalue, $valeur);
		   		$option = $option . "<option value='" . $valeur . "'" . $selected . ">" . $valeur . "</option>\n";
		   }
		   return $option;
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:11,代码来源:CFormConfiguration.php

示例6: get_option

	static function get_option($selectedvalue, $tablename, $colvaluename="id", $colvuename="nom", $where=1, $order = null) {
		   $option = "";
	 	if(!$order) {
		   		$order = $colvuename;
		   }
		   $result = CTable::select($colvaluename . " , " . $colvuename, $tablename, $where, $order); 
		   while($array = mysql_fetch_array($result)) {
		   		$selected = CForm::get_selected($selectedvalue, $array[$colvaluename]);
		   		$option = $option . "<option value='" . $array[$colvaluename] . "'" . $selected . ">" . $array[$colvuename] . "</option>\n";
		   }
		   return $option;
	}	
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:12,代码来源:CForm.php

示例7: get_option_folder

	function get_option_folder($url_folder = 'SS_ADMIN_TO_USERFILE/userfiles/file', $selected_value) {
		   $url_folder = str_replace('SS_ADMIN_TO_USERFILE', SS_ADMIN_TO_USERFILE, $url_folder);
		   $option 	 		= "";
		   $basename		= ".";
		   $arr_url1 		= array($url_folder);
		   $arr_url2 		= parent::get_folder($url_folder);
		   $arr_url_folder 	= array_merge($arr_url1, $arr_url2);
		   foreach($arr_url_folder as $url_folder) {
		   		if (!in_array($url_folder, self::get_arr_url_base())) $basename =  basename($url_folder);
		   		$selected 	= CForm::get_selected($selected_value, $url_folder);
				if($url_folder == ".") $url_folder = SS_ADMIN_TO_USERFILE . "/userfiles";
		   		$option 	= $option . "<option value='" . $url_folder . "'" . $selected . ">" . $basename . "</option>\n";
		   }
		   return $option;
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:15,代码来源:CUserFile.php

示例8:

   <input name="nom_rdv" type="text" value="<?php echo $nom_rdv ?>" />
 </p>
 <p>
   <label>Date rdv</label>
   <input name="date_rdv" id="date_rdv" type="text" value="<?php echo CDate::formate_date($date_rdv) ?>" />
 </p>
 <p>
   <label>Plage horaire</label>
   <input name="heure_rdv" type="text" value="<?php echo $heure_rdv ?>"/>
 </p>
 <p>
   <label>Type</label>
   <select name="type_rdv">
     <option value="0" <?php echo CForm::get_selected($type_rdv, 0) ?>>T&eacute;l&eacute;phone</option>
     <option value="1" <?php echo CForm::get_selected($type_rdv, 1) ?>>Soci&eacute;t&eacute;</option>
     <option value="2" <?php echo CForm::get_selected($type_rdv, 2) ?>>Domicile</option>
   </select>
 </p>
 <p>
   <label>Effectu&eacute;</label>
   <input type="radio" value="0" <?php echo CForm::get_checked($etat_rdv, 0) ?> name="etat_rdv"/>
   non
   <input type="radio" value="1" <?php echo CForm::get_checked($etat_rdv, 1) ?> name="etat_rdv"/>
   oui </p>
 <h2>Commentaires</h2>
 <p>
   <textarea id="commentaire" name="commentaire"><?php echo $toUsers['commentaire'] ?></textarea>
 </p>
 
 <p>
 	<a href="javascript:;" id="AddDefaultComment">Ajouter commentaire pr&eacute;d&eacute;fini</a>
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:31,代码来源:contact.php

示例9:

     <?php
     //----------------------------------------------------------------------------------------------
     // FILTRE
     //----------------------------------------------------------------------------------------------
     ?>
 <form id="form_filtre" name="form_filtre" method="get" action="envoi.php">
     <p> <?php echo CForm::get_hidden(6) ?> </p>
     <div class="floatleft">
         <p>
             <label>Filtrer</label>
             <select onchange="this.form.submit();" name="filtre_etat">
                 <option value="%%" <?php echo CForm::get_selected($filtre_etat, "%%") ?>>Tout</option>
                 <option value="0" <?php echo CForm::get_selected($filtre_etat, "0") ?>>Non Envoy&eacute;</option>
                 <option value="1" <?php echo CForm::get_selected($filtre_etat, "1") ?>>Envoy&eacute;</option>
                 <option value="2" <?php echo CForm::get_selected($filtre_etat, "2") ?>>Archiv&eacute;</option>
                 <option value="3" <?php echo CForm::get_selected($filtre_etat, "3") ?>>File d'attente</option>
             </select>
         </p>
     </div>
     <div class="floatleft">
         <p>
             <label>Du</label>
             <input  type="text" id="filtre_date_debut" name="filtre_date_debut" value="<?php echo CDate::date_switch(CDate::formate_date($filtre_date_debut)); ?>" onmousedown="javascript:openDate(this);"/>
         </p>
     </div>
     <div class="floatleft">
         <p>
             <label>Au</label>
             <input type="text" id="filtre_date_fin" name="filtre_date_fin" value="<?php echo CDate::date_switch(CDate::formate_date($filtre_date_fin)) ?>" onmousedown="javascript:openDate(this);"/>
         </p>
     </div>
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:31,代码来源:envoi-old.php

示例10: if

            <label>Titre </label>
            <input name="nom" type="text" value="<?php echo  $nom?>" />
            <?php echo $error_signe['nom']?>		  </p>
		  <?php if(CTableUser::is_admin($_SESSION['idmbr'])) { ?>
          <p>
            <label>R&eacute;dacteur</label>
            <select name="idreda">
              <?php echo CForm::get_option($idreda, 'user', 'id', 'login', ' type = 1 OR type = 2') ?>
            </select>
            <?php echo $error_signe['idreda']?> </p>
		  <?php } ?>
          <p>
            <label>Visiteur</label>
            <select name="idlecteur">
              <option value="all" <?php echo CForm::get_selected($idlecteur, 'all'); ?>>publics</option>
              <option value="0" <?php echo CForm::get_selected($idlecteur, '0'); ?>>tous les membres</option>
              <?php echo CForm::get_option($idlecteur, 'user', 'id', 'login', ' type = 0 OR type = 3') ?>
            </select>
            <?php echo $error_signe['idreda']?> </p>
          <p>
          <p>
            <label>Publier </label>
            <input  type="radio" name="etat" value="0" <?php echo CForm::get_checked($etat,0) ?> />
            non
            <input  type="radio" name="etat" value="1" <?php echo CForm::get_checked($etat,1) ?> />
          oui          <?php echo $error_signe['etat']?></p>
          <p>
            <input name="creer" type="submit" value="Modifier >>"/>
          </p>
          </fieldset>
        </form>
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:31,代码来源:gr_rdv.php

示例11: explode

   		$dir = $info['dirname'];
   		$_paths = explode('/', trim($dir, '/'));
   		
   		$current = array_pop($_paths);
   		$flv[$current][] = array($path,$info['basename'] );
   	}
   ?>
   <select name="video">
   	<option value="null">Choisir une video</option>	   
   	<?php 
   		foreach($flv as $dir => $item) {
   			?>
   			<optgroup label="<?php echo $dir?>">
   				<?php 
   					foreach($item as $_flv) {
   						$selected = CForm::get_selected('../../userfiles/media/'.$fichier, $_flv[0]);
   						?>
   						<option value="<?php echo $_flv[0]; ?>" <?php echo $selected; ?>><?php echo $_flv[1]; ?></option>
   						<?php 
   					}
   				?>
   			</optgroup>
   			<?php 
   		}
   	?>           	
   </select>  
   <?php echo $error_signe['video']?>           
   </p>
 <p>
   <input name="creer" type="submit" value="Valider >>"/>
 </p>
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:31,代码来源:video.php

示例12:

if(($a != 4) && ($a != 5) && ($a != 7) ) {
//----------------------------------------------------------------------------------------------
// FILTRE
//----------------------------------------------------------------------------------------------
?>
        <form id="form_filtre" name="form_filtre" method="get" action="reception.php">
          <p> <?php echo CForm::get_hidden(6) ?> </p>
          <div class="floatleft">
            <p>
              <label>Filtrer</label>
              <select onchange="this.form.submit();" name="filtre_etat">
                <option value="%%" <?php echo CForm::get_selected($filtre_etat, "%%") ?>>Tout</option>
                <option value="0" <?php echo CForm::get_selected($filtre_etat, "0") ?>>Non Lu</option>
                <option value="1" <?php echo CForm::get_selected($filtre_etat, "1") ?>>Lu</option>
                <option value="2" <?php echo CForm::get_selected($filtre_etat, "2") ?>>Archiv&eacute;</option>
              </select>
            </p>
          </div>
          <div class="floatleft">
            <p>
              <label>Du</label>
              <input  type="text" id="filtre_date_debut" name="filtre_date_debut" value="<?php echo CDate::date_switch(CDate::formate_date($filtre_date_debut)) ?>"/>
            </p>
          </div>
          <div class="floatleft">
            <p>
              <label>Au</label>
              <input type="text" id="filtre_date_fin" name="filtre_date_fin" value="<?php echo CDate::date_switch(CDate::formate_date($filtre_date_fin)) ?>"/>
            </p>
          </div>
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:30,代码来源:reception.php


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