أهلا وسهلا بك زائرنا الكريم في منتدى دعم PBBoard الرسمي، لكي تتمكن من المشاركة ومشاهدة جميع أقسام المنتدى وكافة الميزات ، يجب عليك إنشاء حساب جديد بالتسجيل بالضغط هنا أو تسجيل الدخول اضغط هنا إذا كنت عضواً .

طلب .زيادة المدة الزمنية لاعادة التوجيه للأعلانات التجارية واضافة اعلان ادسنس


مشاهدة المشاركة في الموضوع بالعرض العادي
look/images/icons/i1.gif طلب .زيادة المدة الزمنية لاعادة التوجيه للأعلانات التجارية واضافة اعلان ادسنس
  20-02-2014 12:17 مساءً  
حسام العلي
معلومات الكاتب
اخى هذا محتوى الملف وانا عدلت عليه

هل يوجد خطأ بتعديله ؟



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_location'] . $AdsRows['sitename']."".$AdSense);
        echo "<META HTTP-**="refresh" CONTENT="$Wait_time; URL=$AdsRows[site]">n";
    }
}

?>










او ان تكرمت تعملى التعديل بايدك الكريمه .. لانى جربت فى اكثر من طريقه


تم تحرير المشاركة بواسطة :حسام العلي بتاريخ:20-02-2014 12:25 مساءً



الساعة الآن 05:37 PM