Beispiel #1
0
	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;
	}
Beispiel #2
0
	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;
	}	
Beispiel #3
0
	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;
	}
Beispiel #4
0
	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;
	}	
	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;
	}
Beispiel #6
0
	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;
	}	
Beispiel #7
0
	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;
	}
Beispiel #8
0
   <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>
Beispiel #9
0
     <?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>
Beispiel #10
0
            <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>
Beispiel #11
0
   		$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>
Beispiel #12
0
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>