/[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

Diff of /inc/banneri.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by ravilov, Tue Oct 16 13:07:03 2001 UTC revision 1.5 by ravilov, Tue Oct 23 16:13:59 2001 UTC
# Line 1  Line 1 
1  <?php  <?php
2          if ($isMed && $isReg) {          include("inc/conn.php");
3                  $banneri = array(          $sql = "SELECT ban_id, slika, alt, url FROM banneri WHERE (".($isMed && $isReg ? "" : "NOT ")."plivamed) ORDER BY ban_id";
4                          // array("slika" => "gastal.gif", "alt" => "Gastal", "url" => "http://www.gastal.com.hr/"),          $sth = $dbh->prepare($sql);
5                          array("slika" => "tonocardin.gif", "alt" => "Tonocardin", "url" => "http://www.tonocardin.com.hr/"),          if (!$sth) error("Cannot prepare query: \"$sql\"");
6                          array("slika" => "enazil.gif", "alt" => "Enazil", "url" => "http://www.enazil.com.hr/")          if (!$sth->execute()) error("Cannot execute query: \"$sql\"");
7                          // array("slika" => "plivitc.gif", "alt" => "Plivit C", "url" => "http://www.plivitc.com.hr/"),          $banneri = array();
8                          // array("slika" => "bisolex.gif", "alt" => "Bisolex", "url" => "http://www.bisolex.com.hr/"),          while ($row = $sth->fetchrow_array()) {
9                          // array("slika" => "andolc.gif", "alt" => "Andol C", "url" => "http://www.andolc.com.hr/"),                  list($id, $pic, $alt, $url) = $row;
10                  );                  $banneri[$id] = array("slika" => $pic, "alt" => $alt, "url" => $url);
11          } else {          }
12                  $banneri = array(          $sth->finish();
13                          array("slika" => "gastal.gif", "alt" => "Gastal", "url" => "http://www.gastal.com.hr/"),          $dbh->disconnect();
14                          // array("slika" => "plivitc.gif", "alt" => "Plivit C", "url" => "http://www.plivitc.com.hr/"),          function Click($id) {
15                          // array("slika" => "bisolex.gif", "alt" => "Bisolex", "url" => "http://www.bisolex.com.hr/"),                  if (!$id) return;
16                          // array("slika" => "andolc.gif", "alt" => "Andol C", "url" => "http://www.andolc.com.hr/")                  $sql = "UPDATE banneri SET klikovi = klikovi + 1 WHERE ban_id = $id";
17                          array("slika" => "viponline.gif", "alt" => "VIPonline", "url" => "http://www.vip.hr/"),                  include("inc/conn.php");
18                          array("slika" => "globalnet.gif", "alt" => "GlobalNET", "url" => "http://www.globalnet.hr/")                  $dbh->dbh_do($sql);
19                  );                  $dbh->disconnect();
20          }          }
21  ?>  ?>

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.26