اخى هذا محتوى الملف وانا عدلت عليه
هل يوجد خطأ بتعديله ؟
CODE
<?php
(!defined('IN_PowerBB')) ? die() : '';
include('common.php');
define('CLASS_NAME','PowerBBCoreMOD');
class PowerBBCoreMOD
{
function run()
{
global $PowerBB;
/** Go to ads site **/
if ($PowerBB->_GET['goto'])
{
$this->_GoToSite();
}
/** **/
else
{
$PowerBB->functions->error($PowerBB->_CONF['template']['_CONF']['lang']['path_not_true']);
}
$PowerBB->functions->GetFooter();
}
/**
* Get the information of ads , then go to the site of ads
*/
function _GoToSite()
{
global $PowerBB;
// Show header, The parameter is the page title.
$PowerBB->functions->ShowHeader($PowerBB->_CONF['template']['_CONF']['lang']['Go_to_site']);
// Clean _GET['id'] from strings and protect ourself
$PowerBB->_GET['id'] = $PowerBB->functions->CleanVariable($PowerBB->_GET['id'],'intval');
// Show the address bar, It's make the browse easy
$PowerBB->functions->AddressBar($PowerBB->_CONF['template']['_CONF']['lang']['Go_ads']);
// No id ! stop the page
if (empty($PowerBB->_GET['id']))
{
$PowerBB->functions->error($PowerBB->_CONF['template']['_CONF']['lang']['Sorry_url_not_true']);
}
// Get Ads information
$AdsArr = array();
$AdsArr['where'] = array('id',$PowerBB->_GET['id']);
$AdsRows = $PowerBB->core->GetInfo($AdsArr,'ads');
// Clean the ads information from XSS dirty
$PowerBB->functions->CleanVariable($AdsRows,'html');
// Ads isn't here !
if (!$AdsRows)
{
$PowerBB->functions->error($PowerBB->_CONF['template']['_CONF']['lang']['The_ads_does_not_exist']);
}
// New visitor
$NewClickArr = array();
$NewClickArr['clicks'] = $AdsRows['clicks'];
$NewClickArr['where'] = array('id',$AdsRows['id']);
$PowerBB->core->NewVisit($NewClickArr,'ads');
$Wait_time="25"; // المده الزمنيه للتحويل بالثواني
$AdSense ='<p align="center">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- cars -->
<ins class="adsbygoogle"
style="display:inline-block;width:336px;height:280px"
data-ad-client="ca-pub-6482554879891759"
data-ad-slot="2320887914"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</p>';
// Go to the site
$PowerBB->functions->msg($PowerBB->_CONF['template']['_CONF']['lang']['Please_wait_will_be_taken_to_the_following_**'] . $AdsRows['sitename']."".$AdSense);
echo "<META HTTP-**="refresh" CONTENT="$Wait_time; URL=$AdsRows[site]">n";
}
}
?>
او ان تكرمت تعملى التعديل بايدك الكريمه .. لانى جربت فى اكثر من طريقه