/[health_html]/inc/banneri.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /inc/banneri.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations)
Tue Oct 23 16:13:59 2001 UTC (22 years, 6 months ago) by ravilov
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +18 -18 lines
Added an author's CV. Added a secondary main article. Added the Related fields to news editor, and also fixed some bugs in it. Other bugfixes and improvements.

1 ravilov 1.1 <?php
2 ravilov 1.5 include("inc/conn.php");
3     $sql = "SELECT ban_id, slika, alt, url FROM banneri WHERE (".($isMed && $isReg ? "" : "NOT ")."plivamed) ORDER BY ban_id";
4     $sth = $dbh->prepare($sql);
5     if (!$sth) error("Cannot prepare query: \"$sql\"");
6     if (!$sth->execute()) error("Cannot execute query: \"$sql\"");
7     $banneri = array();
8     while ($row = $sth->fetchrow_array()) {
9     list($id, $pic, $alt, $url) = $row;
10     $banneri[$id] = array("slika" => $pic, "alt" => $alt, "url" => $url);
11     }
12     $sth->finish();
13     $dbh->disconnect();
14     function Click($id) {
15     if (!$id) return;
16     $sql = "UPDATE banneri SET klikovi = klikovi + 1 WHERE ban_id = $id";
17     include("inc/conn.php");
18     $dbh->dbh_do($sql);
19     $dbh->disconnect();
20 ravilov 1.1 }
21     ?>

  ViewVC Help
Powered by ViewVC 1.1.26