Files
Testing/mailservices/ads/ads.php
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

34 lines
1.1 KiB
PHP

<?php header('Content-type: text/html; charset=utf-8');
if ( !defined('PATHTOINCLUDES') ) define('PATHTOINCLUDES', $_SERVER["DOCUMENT_ROOT"] . '/mailservices/includes/');
include(PATHTOINCLUDES."base.php");
include(PATHTOINCLUDES."record_set.php");
$_SESSION["user_uri"]="/mailservices/ads/ads.php";
$_SESSION["pagename"]="List Ads";
$_SESSION["the_section_location"] = "/mailservices/ads/ads.php";
$_SESSION["the_section_container"]="section_content";
$_SESSION["the_tab"]="one";
//connect to db if required
$dconn=dbconnect2();
$em="";
$sqladref="SELECT
COUNT(`bw_ad_referrer_2`.`refid`) AS `TC`, MAX(`bw_ad_referrer_2`.`refid`) AS `Maxref` FROM `bw_ad_referrer_2`";
$queryadref=mysql_query($sqladref);
$resultadref=mysql_fetch_row($queryadref);
$ar_count = $resultadref[0];
$ar_maxid = $resultadref[1];
mysql_free_result($queryadref);
if($ar_count > 150000){
$trimid=$ar_maxid-140000;
$sqldtrimadref= "DELETE FROM `bw_ad_referrer_2` WHERE `refid` < ".$trimid."";
$querytrim=mysql_query($sqldtrimadref);
}
?>
<h2>Test of Ads</h2>
<div>
<p>Clear Page Hits <?php echo $ar_count; echo "----"; echo $trimid; ?></p>
</div>