PHP Classes

File: clickhistory.php

Recommend this page to a friend!
  Classes of Bharat Parmar   Advertisement Banner Module   clickhistory.php   Download  
File: clickhistory.php
Role: Example script
Content type: text/plain
Description: Click Counter History Page
Class: Advertisement Banner Module
Manage and display advertisement banners in MySQL
Author: By
Last change:
Date: 8 years ago
Size: 1,080 bytes
 

Contents

Class file image Download
<?php
@include("config.php");
@include(
"class/Advertisement.Class.php");
$Advertisement = new Advertisement();
?>
<html>
    <meta charset="UTF-8">
    <head>
        <title>Example Script : Advertisement Clicks History</title>
    </head>
    <body>
        <h3> Advertisement Clicks History</h3>
        <?php $Advertisement->DisplayBanner("120x60","2");?>
<h3>Advertisement History</h3>
        <div>Total Clicks : <?php echo count($Advertisement->data);?></div>
        <table width="50%" border="1" cellpadding="3" cellspacing="3">
            <tr>
                <th>Sr No.</th>
                <th>IP Address</th>
                <th>Click Time</th>
            </tr>
            <?php if(!empty($Advertisement->data)) { $i=0;?>
<?php foreach ($Advertisement->data as $record) { ?>
<tr align="center">
                        <td><?php echo ++$i;?></td>
                        <td><?php echo $record['ip_address'];?></td>
                        <td><?php echo date("d-m-Y H:i:s",strtotime($record['click_time']));?></td>
                    </tr>
                <?php } ?>
<?php } else { ?>
<tr><td colspan="3" align="center">Records not available.</a></tr>
            <?php } ?>
</table>
    </body>
</html>