$t"; if (!$table) { $th |= $nom ? 1 : 0; $head .= "\n$nom"; } } $table .= "\n$res"; } } if (!$th) $head= ''; $tranches .= "$head$table
"; } else { foreach ($result as $r) { if ($prim) $prims[]= $r[$prim]; if ($t = $fonc($r, $own)) { $tranches = '
  • ' . join('
  • ', $t) . '
  • '; $tranches = "\n"; } } } } $id = 't'.substr(md5(join('',$requete)),0,8); $bouton = !$icone ? '' : bouton_block_depliable($title, true, $id); return debut_cadre('liste', $icone, "", $bouton, "", "", false) . debut_block_depliable(true, $id) . $tranches . fin_block() . fin_cadre('liste'); } // http://doc.spip.org/@afficher_tranches_requete function afficher_tranches_requete($num_rows, $idom, $url='', $nb_aff = 10, $old_arg=NULL) { static $ancre = 0; global $browser_name, $spip_lang_right, $spip_display; if ($old_arg!==NULL){ // eviter de casser la compat des vieux appels $cols_span ayant disparu ... $idom = $url; $url = $nb_aff; $nb_aff=$old_arg; } $ancre++; $self = self(); $ie_style = ($browser_name == "MSIE") ? "height:1%" : ''; $style = "style='visibility: hidden; float: $spip_lang_right'"; $nav= navigation_pagination($num_rows, $nb_aff, $url, _request($idom), $idom, true); $script = parametre_url($self, $idom, -1); $l = htmlentities(_T('lien_tout_afficher')); return http_img_pack("searching.gif", "*", "$style id='img_$idom'") . "\n
    " . $nav . "\"$l\"\nsrc=\""
    \n"; } // http://doc.spip.org/@affiche_tranche_bandeau function affiche_tranche_bandeau(&$requete, $idom, $url='', $cpt=NULL, $pas=10) { if (!isset($requete['GROUP BY'])) $requete['GROUP BY'] = ''; if ($cpt === NULL) $cpt = sql_countsel($requete['FROM'], $requete['WHERE'], $requete['GROUP BY']); $deb_aff = intval(_request($idom)); $nb_aff = $pas + ($pas>>1); if (isset($requete['LIMIT'])) $cpt = min($requete['LIMIT'], $cpt); if ($cpt > $nb_aff) { $nb_aff = $pas; $res = afficher_tranches_requete($cpt, $idom, $url, $nb_aff); } else $res = ''; if (!isset($requete['LIMIT']) AND $deb_aff <> -1) $requete['LIMIT'] = "$deb_aff, $nb_aff"; return $res; } ?>