Changeset 41 for banners.php


Ignore:
Timestamp:
Jan 24, 2009, 7:49:23 PM (15 years ago)
Author:
george
Message:
  • Upraveno: Zjednodušení skriptu pro zobrazení bannerů a záznam odkazujících webu na bannery.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • banners.php

    r40 r41  
    11<?php
    22
    3   include('includes/global.php');
     3include('includes/global.php');
    44 
    5   function HaveInArray($Array,$String)
    6   { // BEGIN function HaveInArray
    7     for ( $i = 0; $i < count($Array); ++$i) {
    8       if ($String == $Array[$i]) {
    9         return true;
    10       }
    11     }
    12        
    13   } // END function HaveInArray
     5$ID = $Database->SQLCommand("SELECT * FROM `banner` WHERE `Show`=1 AND `DateLast` > (NOW() - INTERVAL 3 MONTH)");
     6 
     7echo('<strong>Servery odkazující na nás:</strong> <br /><br />');
     8while($Line = mysql_fetch_array($ID))
     9{
     10  echo('<a href="'.$Line['Web'].'">'.$Line['Web'].'</a> '.$Line['Description'].' <br />');     
     11}
     12 
     13ShowFooter();     
    1414
    15   $ID = $Database->SQLCommand("SELECT * FROM `banner` WHERE `Show` =1");
    16  
    17   echo '<b>Servery odkazující na nás:</b> <br><br>';
    18   while($Line = mysql_fetch_array($ID)) {
    19     echo '<a href="'.$Line['Web'].'">'.$Line['Web'].'</a> '.$Line['Description'].' <br>';       
    20   }
    21  
    22   /*  echo '<table>';
    23   echo '<tr><th>Adresa</th><th>Popis</th><th>Datum umístění</th>';
    24   while($Line = mysql_fetch_array($ID)) {
    25     echo '<tr><td><a href="'.$Line['Web'].'">'.$Line['Web'].'</a></td>
    26     <td>'.$Line['Description'].'</td>
    27     <td>'.$Line['Date'].'</td><tr>';   
    28   }
    29   echo '</table';
    30 */
    31  
    32   ShowFooter();     
    3315?>
    3416
Note: See TracChangeset for help on using the changeset viewer.