Changeset 65580 in spip-zone for _plugins_/formidable/trunk/formidable_options.php
- Timestamp:
- Sep 5, 2012, 5:35:07 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/formidable/trunk/formidable_options.php
r65547 r65580 1 1 <?php 2 3 /** 4 * Options globales chargées à chaque hit 5 * 6 * @package SPIP\Formidable\Options 7 **/ 2 8 3 9 // Sécurité … … 78 84 ); 79 85 80 function puce_statut_formulaires_reponse_dist($id, $statut, $id_rubrique, $type='formulaires_reponse', $ajax=false){81 global $lang_objet;82 83 static $coord = array(84 'publie' => 1,85 'prop' => 0,86 'poubelle' => 287 );88 86 89 $lang_dir = lang_dir($lang_objet); 90 $ajax_node = " id='imgstatut$type$id'"; 91 $inser_puce = puce_statut($statut, " width='9' height='9' style='margin: 1px;'$ajax_node"); 92 93 if (!autoriser('instituer', 'formulaires_reponse', $id) 94 or !_ACTIVER_PUCE_RAPIDE 95 ) 96 return $inser_puce; 97 98 $titles = array( 99 "orange" => _T('texte_statut_propose_evaluation'), 100 "verte" => _T('texte_statut_publie'), 101 "poubelle" => _T('texte_statut_poubelle') 102 ); 103 104 $clip = 1 + (11 * $coord[$statut]); 105 106 if ($ajax){ 107 return "<span class='puce_article_fixe'>" 108 . $inser_puce 109 . "</span>" 110 . "<span class='puce_article_popup' id='statutdecal$type$id' style='width:33px; margin-left: -$clip"."px;'>" 111 . afficher_script_statut($id, $type, -1, 'puce-orange.gif', 'prop', $titles['orange']) 112 . afficher_script_statut($id, $type, -12, 'puce-verte.gif', 'publie', $titles['verte']) 113 . afficher_script_statut($id, $type, -23, 'puce-poubelle.gif', 'poubelle', $titles['poubelle']) 114 . "</span>"; 115 } 116 117 $nom = "puce_statut_"; 118 119 if ((! _SPIP_AJAX) AND $type != 'formulaires_reponse') 120 $over =''; 121 else { 122 $action = generer_url_ecrire('puce_statut_formulaires',"",true); 123 $action = "if (!this.puce_loaded) { this.puce_loaded = true; prepare_selec_statut('$nom', '$type', '$id', '$action'); }"; 124 $over = "\nonmouseover=\"$action\""; 125 } 126 127 return "<span class='puce_article' id='$nom$type$id' dir='$lang_dir'$over>" 128 . $inser_puce 129 . '</span>'; 130 } 131 132 if (!function_exists('array_fill_keys')){ 87 if (!function_exists('array_fill_keys')) { 88 /** 89 * Remplit un tableau avec des valeurs, en spécifiant les clés 90 * 91 * Fonction dans PHP 5.2+ 92 * @see http://php.net/manual/fr/function.array-fill-keys.php 93 * 94 * @param array $keys 95 * Tableau de valeurs qui sera utilisé comme clés. 96 * @param mixed $value 97 * Valeur à utiliser pour remplir le tableau. 98 * @return array 99 * Le tableau rempli. 100 **/ 133 101 function array_fill_keys($keys, $value){ 134 102 array_combine($keys,array_fill(0,count($keys),$value));
Note: See TracChangeset
for help on using the changeset viewer.