| Current Path : /home/etiennec/www/oldsite/tmp/cache/skel/ |
| Current File : /home/etiennec/www/oldsite/tmp/cache/skel/html_dfca29c98753cda9a027e7e8cfe5cf4e.php |
<?php
/*
* Squelette : plugins/auto/zpip/extra/mot.html
* Date : Tue, 29 Mar 2011 12:00:04 GMT
* Compile : Sun, 20 May 2012 12:03:36 GMT
* Boucles : _mots_freres, _mot_cousin, _groupes_freres, _principale
*/
/* BOUCLE mots */
function BOUCLE_mots_frereshtml_dfca29c98753cda9a027e7e8cfe5cf4e(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
static $connect = '';
static $table = 'mots';
static $id = '_mots_freres';
static $from = array('mots' => 'spip_mots');
static $type = array();
static $groupby = array();
static $select = array("mots.titre",
"mots.id_mot",
"mots.id_groupe");
static $orderby = array('mots.titre');
$where =
array(
array('=', 'mots.type', sql_quote($Pile[$SP]['type'])));
static $join = array();
static $limit = '';
static $having =
array();
$t0 = "";
// REQUETE
$result = calculer_select($select, $from, $type, $where, $join, $groupby, $orderby, $limit, $having, $table, $id, $connect,
array('plugins/auto/zpip/extra/mot.html','html_dfca29c98753cda9a027e7e8cfe5cf4e','_mots_freres',3,$GLOBALS['spip_lang']));
if ($result) {
// COMPTEUR
$Numrows['_mots_freres']['compteur_boucle'] = 0;
$Numrows['_mots_freres']['total'] = @intval(sql_count($result));
$debut_boucle = isset($Pile[0]['debut_mots_freres']) ? $Pile[0]['debut_mots_freres'] : _request('debut_mots_freres');
if(substr($debut_boucle,0,1)=='@'){
$debut_boucle = $Pile[0]['debut_mots_freres'] = quete_debut_pagination('id_mot',$Pile[0]['@id_mot'] = substr($debut_boucle,1),20,$result,'');
if (!sql_seek($result,0,'')){
@sql_free($result,'');
$result = calculer_select($select, $from, $type, $where, $join, $groupby, $orderby, $limit, $having, $table, $id, $connect);
}
}
$debut_boucle = intval($debut_boucle);
$debut_boucle = (($tout=($debut_boucle == -1))?0:($debut_boucle));
$debut_boucle = max(0,min($debut_boucle,floor(($Numrows['_mots_freres']['total']-1)/(20))*(20)));
$fin_boucle = min(($tout ? $Numrows['_mots_freres']['total'] : $debut_boucle + 19), $Numrows['_mots_freres']['total'] - 1);
$Numrows['_mots_freres']['grand_total'] = $Numrows['_mots_freres']['total'];
$Numrows['_mots_freres']["total"] = max(0,$fin_boucle - $debut_boucle + 1);
if ($debut_boucle>0 AND $debut_boucle < $Numrows['_mots_freres']['grand_total'] AND sql_seek($result,$debut_boucle,'','continue'))
$Numrows['_mots_freres']['compteur_boucle'] = $debut_boucle;
$SP++;
// RESULTATS
while ($Pile[$SP] = @sql_fetch($result)) {
$Numrows['_mots_freres']['compteur_boucle']++;
if ($Numrows['_mots_freres']['compteur_boucle'] <= $debut_boucle) continue;
if ($Numrows['_mots_freres']['compteur_boucle']-1 > $fin_boucle) break;
$t0 .= (
'
<li class="item"><a href="' .
vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_mot'], 'mot', '', '', true))) .
'"' .
(calcul_exposer($Pile[$SP]['id_mot'], 'id_mot', $Pile[0], $Pile[$SP]['id_groupe'], 'id_mot', '') ?
(' class="' . 'on' . '"') :
'') .
'>' .
interdire_scripts(typo(supprimer_numero($Pile[$SP]['titre']),"TYPO",$connect)) .
'</a></li>
');
}
@sql_free($result);
}
return $t0;
}
/* BOUCLE mots */
function BOUCLE_mot_cousinhtml_dfca29c98753cda9a027e7e8cfe5cf4e(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
static $connect = '';
static $table = 'mots';
static $id = '_mot_cousin';
static $from = array('mots' => 'spip_mots');
static $type = array();
static $groupby = array();
static $select = array("mots.titre",
"mots.id_mot",
"mots.type");
static $orderby = array('mots.titre');
$where =
array(
array('=', 'mots.id_groupe', sql_quote($Pile[$SP]['id_groupe'],'','int')));
static $join = array();
static $limit = '0,1';
static $having =
array();
$t0 = "";
// REQUETE
$result = calculer_select($select, $from, $type, $where, $join, $groupby, $orderby, $limit, $having, $table, $id, $connect,
array('plugins/auto/zpip/extra/mot.html','html_dfca29c98753cda9a027e7e8cfe5cf4e','_mot_cousin',22,$GLOBALS['spip_lang']));
if ($result) {
$SP++;
// RESULTATS
while ($Pile[$SP] = @sql_fetch($result)) {
$t0 .= (
'
<li class="item"><a href="' .
vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_mot'], 'mot', '', '', true))) .
'">' .
interdire_scripts(typo(supprimer_numero($Pile[$SP]['type']),"TYPO",$connect)) .
'</a></li>
');
}
@sql_free($result);
}
return $t0;
}
/* BOUCLE groupes_mots */
function BOUCLE_groupes_frereshtml_dfca29c98753cda9a027e7e8cfe5cf4e(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
static $connect = '';
$doublons_index = array();
static $table = 'groupes_mots';
static $id = '_groupes_freres';
static $from = array('groupes_mots' => 'spip_groupes_mots');
static $type = array();
static $groupby = array();
static $select = array("groupes_mots.id_groupe",
"groupes_mots.titre");
static $orderby = array('groupes_mots.titre');
$where =
array(
array('NOT',
array('=', 'groupes_mots.id_groupe', sql_quote($Pile[$SP]['id_groupe'],'','int'))),
array(sql_in('groupes_mots.id_groupe', $doublons[$doublons_index[]= ('groupes_mots')], 'NOT')));
static $join = array();
static $limit = '';
static $having =
array();
$t0 = "";
// REQUETE
$result = calculer_select($select, $from, $type, $where, $join, $groupby, $orderby, $limit, $having, $table, $id, $connect,
array('plugins/auto/zpip/extra/mot.html','html_dfca29c98753cda9a027e7e8cfe5cf4e','_groupes_freres',17,$GLOBALS['spip_lang']));
if ($result) {
$SP++;
// RESULTATS
while ($Pile[$SP] = @sql_fetch($result)) {
foreach($doublons_index as $k) $doublons[$k] .= "," . $Pile[$SP]['id_groupe']; // doublons
$t0 .= (
'
' .
BOUCLE_mot_cousinhtml_dfca29c98753cda9a027e7e8cfe5cf4e($Cache, $Pile, $doublons, $Numrows, $SP) .
'
');
}
@sql_free($result);
}
return $t0;
}
/* BOUCLE mots */
function BOUCLE_principalehtml_dfca29c98753cda9a027e7e8cfe5cf4e(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
static $connect = '';
$doublons_index = array();
static $table = 'mots';
static $id = '_principale';
static $from = array('mots' => 'spip_mots');
static $type = array();
static $groupby = array();
static $select = array("mots.type",
"mots.id_groupe",
"mots.id_mot");
static $orderby = array();
$where =
array(
array('=', 'mots.id_mot', sql_quote($Pile[0]['id_mot'],'','int')),
array(sql_in('mots.id_mot', $doublons[$doublons_index[]= ('mots')], 'NOT')));
static $join = array();
static $limit = '';
static $having =
array();
$t0 = "";
// REQUETE
$result = calculer_select($select, $from, $type, $where, $join, $groupby, $orderby, $limit, $having, $table, $id, $connect,
array('plugins/auto/zpip/extra/mot.html','html_dfca29c98753cda9a027e7e8cfe5cf4e','_principale',1,$GLOBALS['spip_lang']));
if ($result) {
$l1 = _T('public/spip/ecrire:mots_clefs_meme_groupe');
$l2 = _T('public/spip/ecrire:autres_groupes_mots_clefs');$SP++;
// RESULTATS
while ($Pile[$SP] = @sql_fetch($result)) {
foreach($doublons_index as $k) $doublons[$k] .= "," . $Pile[$SP]['id_mot']; // doublons
$t0 .= (
'
' .
(($t1 = BOUCLE_mots_frereshtml_dfca29c98753cda9a027e7e8cfe5cf4e($Cache, $Pile, $doublons, $Numrows, $SP))!=='' ?
(( '
<div class="liste mots">
' .
filtre_pagination_dist($Numrows["_mots_freres"]["grand_total"],
'_mots_freres',
isset($Pile[0]['debut_mots_freres'])?$Pile[0]['debut_mots_freres']:intval(_request('debut_mots_freres')),
20, false, '', '', array()) .
'
<h2 class="h2">' .
$l1 .
'</h2>
<ul class="liste-items">
') . $t1 . ( '
</ul>
' .
(($t3 = strval(filtre_pagination_dist($Numrows["_mots_freres"]["grand_total"],
'_mots_freres',
isset($Pile[0]['debut_mots_freres'])?$Pile[0]['debut_mots_freres']:intval(_request('debut_mots_freres')),
20, true, '', '', array())))!=='' ?
('<p class="pagination">' . $t3 . '</p>') :
'') .
'
</div>
')) :
'') .
'
' .
(($t1 = BOUCLE_groupes_frereshtml_dfca29c98753cda9a027e7e8cfe5cf4e($Cache, $Pile, $doublons, $Numrows, $SP))!=='' ?
(( '
<div class="liste groupes_mots">
<h2 class="h2">' .
$l2 .
'</h2>
<ul class="liste-items">
') . $t1 . '
</ul>
</div>
') :
'') .
'
');
}
@sql_free($result);
}
return $t0;
}
//
// Fonction principale du squelette plugins/auto/zpip/extra/mot.html
// Temps de compilation total: 4.512 ms
//
function html_dfca29c98753cda9a027e7e8cfe5cf4e($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 = BOUCLE_principalehtml_dfca29c98753cda9a027e7e8cfe5cf4e($Cache, $Pile, $doublons, $Numrows, $SP);
return analyse_resultat_skel('html_dfca29c98753cda9a027e7e8cfe5cf4e', $Cache, $page, 'plugins/auto/zpip/extra/mot.html');
}
?>