Skip to content
Extraits de code Groupes Projets
Valider 4a052097 rédigé par JamesRezo's avatar JamesRezo :tada:
Parcourir les fichiers

des liens dates pour le suivi des petitions

parent 262d0342
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -103,17 +103,16 @@ function tronconne_signatures($script, $id_article, $debut, $where, $limit) ...@@ -103,17 +103,16 @@ function tronconne_signatures($script, $id_article, $debut, $where, $limit)
} }
else $script .= '?'; else $script .= '?';
$res = spip_query("SELECT COUNT(*) AS cnt FROM spip_signatures WHERE $where AND date_time>DATE_SUB(NOW(),INTERVAL 180 DAY)"); $res = spip_query("SELECT date_time FROM spip_signatures WHERE $where AND date_time>DATE_SUB(NOW(),INTERVAL 180 DAY)");
$total = ($row = spip_fetch_array($res)) ? $row['cnt'] : 0; while ($row = spip_fetch_array($res)) {
if($c++%10==0) {
if ($total > $limit) { if ($c > 1) echo " | ";
for ($i = 0; $i < $total; $i += $limit){ $date = entites_html(affdate_court($row['date_time']));
if ($i > 0) echo " | "; if ($c == ($debut+1))
if ($i == $debut) echo "<FONT SIZE=3><B>$c</B></FONT>";
echo "<FONT SIZE=3><B>$i</B></FONT>";
else else
echo "<A HREF='$script","debut=$i'>$i</A>"; echo "<A alt='$date' title='$date' HREF='$script","debut=".($c-1)."'>$c</A>";
} }
} }
return $where; return $where;
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter