File "html_5850a918fa450e668c3102763a18fcfc.php"
Full path: /home/argothem/www/cache/skel/html_5850a918fa450e668c3102763a18fcfc.php
File size: 4.38 KB
MIME-type: text/x-php
Charset: utf-8
<?php
/*
* Squelette : ../plugins-dist/mots/prive/objets/liste/mots_associer-select.html
* Date : Fri, 07 Jul 2023 11:03:28 GMT
* Compile : Sun, 25 Feb 2024 13:45:15 GMT
* Boucles : _mots
*/
function BOUCLE_motshtml_5850a918fa450e668c3102763a18fcfc(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
static $command = array();
static $connect;
$command['connect'] = $connect = '';
$in = array();
if (!(is_array($a = (interdire_scripts(entites_html(table_valeur($Pile[0]??[], (string)'exclus', null),true))))))
$in[]= $a;
else $in = array_merge($in, $a);
if (!isset($command['table'])) {
$command['table'] = 'mots';
$command['id'] = '_mots';
$command['from'] = array('mots' => 'spip_mots');
$command['type'] = array();
$command['groupby'] = array();
$command['orderby'] = array('sinum, num', 'multi');
$command['join'] = array();
$command['limit'] = '';
$command['having'] =
array();
}
$command['select'] = array("0+mots.titre AS num",
"CASE ( 0+mots.titre ) WHEN 0 THEN 1 ELSE 0 END AS sinum",
"".sql_multi('mots.titre', $GLOBALS['spip_lang'])."",
"mots.id_mot",
"mots.id_groupe",
"mots.titre AS titre_rang",
"mots.titre");
$command['where'] =
array(
array('=', 'mots.id_groupe', sql_quote(($Pile[0]['id_groupe'] ?? null), '','bigint(21) NOT NULL DEFAULT \'0\'')), sql_in('mots.id_mot', $in,'NOT'));
if (defined("_BOUCLE_PROFILER")) $timer = time()+(float)microtime();
$t0 = "";
// REQUETE
$iter = Spip\Compilateur\Iterateur\Factory::create(
"SQL",
$command,
array('../plugins-dist/mots/prive/objets/liste/mots_associer-select.html','html_5850a918fa450e668c3102763a18fcfc','_mots',8,$GLOBALS['spip_lang'])
);
if (!$iter->err()) {
$SP++;
// RESULTATS
while ($Pile[$SP]=$iter->fetch()) {
$t0 .= (
'
' .
vide($Pile['vars'][$_zzz=(string)'value'] = ( 'mot-' .
$Pile[$SP]['id_mot'] .
'-' .
interdire_scripts(($Pile[0]['objet'] ?? null)) .
'-' .
($Pile[0]['id_objet'] ?? null))) .
'<option value="' .
table_valeur($Pile["vars"]??[], (string)'value', null) .
'"' .
(($t1 = strval((((table_valeur($Pile["vars"]??[], (string)'value', null) == interdire_scripts(entites_html(table_valeur($Pile[0]??[], (string)( 'ajouter_lien/groupe' .
$Pile[$SP]['id_groupe']), null),true)))) ?' ' :'')))!=='' ?
($t1 . ( 'selected="selected"' .
vide($Pile['vars'][$_zzz=(string)'selected'] = ' '))) :
'') .
'>' .
(($t1 = strval(calculer_rang_smart($Pile[$SP]['titre_rang'], 'mot', $Pile[$SP]['id_mot'], $Pile[0])))!=='' ?
($t1 . '. ') :
'') .
interdire_scripts(supprimer_numero(typo($Pile[$SP]['titre'], "TYPO", $connect, $Pile[0]))) .
'</option>
');
}
$iter->free();
}
if (defined("_BOUCLE_PROFILER")
AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
spip_log(intval(1000*$timer)."ms BOUCLE_mots @ ../plugins-dist/mots/prive/objets/liste/mots_associer-select.html","profiler"._LOG_AVERTISSEMENT);
return $t0;
}
//
// Fonction principale du squelette ../plugins-dist/mots/prive/objets/liste/mots_associer-select.html
// Temps de compilation total: 15.191 ms
//
function html_5850a918fa450e668c3102763a18fcfc($Cache, $Pile, $doublons = array(), $Numrows = array(), $SP = 0) {
if (isset($Pile[0]["doublons"]) AND is_array($Pile[0]["doublons"]))
$doublons = nettoyer_env_doublons($Pile[0]["doublons"]);
$connect = '';
$page = (
vide($Pile['vars'][$_zzz=(string)'selected'] = '') .
(($t1 = BOUCLE_motshtml_5850a918fa450e668c3102763a18fcfc($Cache, $Pile, $doublons, $Numrows, $SP))!=='' ?
(( '
<div class="bouton-inline">
<select name="ajouter_lien[groupe' .
($Pile[0]['id_groupe'] ?? null) .
']" id="ajouter_lien-groupe' .
($Pile[0]['id_groupe'] ?? null) .
'"
onchange="jQuery(this).addClass(\'avec-bouton\').siblings(\'button.submit\').css(\'visibility\',\'visible\');"
>
<option value="x"> </option>
') . $t1 . ( '
</select>
<button type="submit" class="btn submit btn_secondaire" name="groupe' .
($Pile[0]['id_groupe'] ?? null) .
'" value="+"' .
(!(table_valeur($Pile["vars"]??[], (string)'selected', null)) ?
(' ' . 'style="visibility:hidden;"') :
'') .
'>' .
_T('public|spip|ecrire:bouton_ajouter') .
(($t3 = strval(filtre_balise_img_dist(chemin_image((string)'add-12.svg'))))!=='' ?
(' ' . $t3) :
'') .
'</button>
</div>
')) :
'') .
'
');
return analyse_resultat_skel('html_5850a918fa450e668c3102763a18fcfc', $Cache, $page, '../plugins-dist/mots/prive/objets/liste/mots_associer-select.html');
}