?> </th> </table> <div class="select"> <strong>Other Pages: </strong> <select> <option>1</option> </select> </div> </div> <?php } if ($NewAd_View == 1) { ad_connect_db("live"); ?> <div class="table"> <img src="img/bg-th-left.gif" width="8" height="7" alt="" class="left" /> <img src="img/bg-th-right.gif" width="7" height="7" alt="" class="right" /> <form method="POST" action="<?php echo $phpself; ?> "> <table class="listing form" cellpadding="0" cellspacing="0"> <tr> <th class="full" colspan="2">Create New Ad</th> </tr> <tr> <td class="first" width="172"><strong>Ad ID</strong></td>
// Change this to reflect the location of your 'ads.lib' file /* include "/web/com/digitekdesign/www/ads/ads.lib"; */ include "ads.lib"; global $ad_logpath_default; if (isset($_GET['ad'])) { $ad = strip_tags($_GET['ad']); } // Abort if no ad ID was passed if (empty($ad)) { echo "<HTML><HEAD><TITLE>Error</TITLE></HEAD><BODY><H1>Error</H1>"; echo "<H4>This script cannot be accessed directly.</H4></BODY></HTML>"; return; } $dt = strftime("%Y-%m-%d %H:%M:%S", time()); $site = ad_getsite($p); ad_connect_db("db"); $qh = ad_query("select * from ads where adid = '{$ad}'"); $nr = ad_queryrows($qh); if ($nr > 0) { $r = ad_fetch($qh); } else { return; } // Add entry to mysql log $qh = ad_query("insert into adlog SET " . "adid = '{$r['adid']}'," . "type = 'click'," . "remotehost = '{$REMOTE_HOST}'," . "remoteaddr = '{$REMOTE_ADDR}'," . "site = '{$site['name']}'," . "entrydate = '{$dt}'"); // Update Information (unless localhost) if (!ad_is_localhost()) { // Update click count $r[clicks] = $r[clicks] + 1; $qh = ad_query("update ads SET clicks = '{$r['clicks']}' WHERE adid = '{$ad}'"); // If logfile is not empty, make an entry
} if (!empty($activate)) { toggle_active("domains", "domainid", $activate); } if (!empty($edit)) { include "edit.domain.php"; } else { show_domains(); } break; case "log": viewlog($id, $size); break; case "resetstats": $dt = strftime("%Y-%m-%d %H:%M:%S", time()); ad_connect_db(); if (!empty($id)) { ad_query("update ads set hits=0,clicks=0,statsreset='{$dt}' where adid = '{$id}'"); } else { ad_query("update ads set hits=0,clicks=0,statsreset='{$dt}'"); } if (!empty($rp)) { include "{$rp}"; } else { include "admin.editad.php"; } break; case "optdb": optdb(); break; case "buildhc":