source: trunk/client/modules/Elezioni/blocchi/bloccolink.php@ 285

Last change on this file since 285 was 265, checked in by roby, 6 years ago
File size: 651 bytes
RevLine 
[2]1<?php
2# blocco link
3
[40]4global $genere,$id_cons_gen,$id_cons,$id_comune,$prefix,$dbi;
[265]5 $sql="select mid, title, preamble, content,editimage from ".$prefix."_ele_link where id_cons='$id_cons' order by mid ";
6 $res = $dbi->prepare("$sql");
7 $res->execute();
8
9 if ($res->rowCount() == 0) {
[2]10 return;
11 } else {
12 echo "<h5>"._LINK."</h5><p>";
[265]13 while (list($mid, $title, $preamble,$content, $editimage) = $res->fetch(PDO::FETCH_NUM)) {
[2]14 if ($title != "" && $content != "") {
15 $content = stripslashes($content);
16 $content = substr($content,0,45);
[249]17 echo "<b><a href=\"$preamble\">$title</a></b><br />
18 $content";
[2]19 }
20 }
21
22 }
23
24
25?>
26
Note: See TracBrowser for help on using the repository browser.