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

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