亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? gentlesource_module_tla.class.inc.php

?? This is the script which used on 10minutemail.com for temporary email.
?? PHP
字號:
<?php

/** 
 * GentleSource Guestbook Script
 * 
 * (C) Ralf Stadtaus http://www.gentlesource.com/
 * 
 * Version 1.0
 */




/**
 * Module Text Link Ads
 */
class gentlesource_module_tla extends gentlesource_module_common
{


    /**
     * Text of language file
     */
    var $text = array();

// -----------------------------------------------------------------------------




    /**
     *  Setup
     * 
     * @access public
     */
    function gentlesource_module_tla(&$settings)
    {
        $this->text = $this->load_language();
        
        // Configuration
        $this->add_property('name',         $this->text['txt_module_name']);
        $this->add_property('description',  $this->text['txt_module_description']);
        $this->add_property('trigger',  
                                array(  
                                        'module_demo',
                                        'module_call_tla',
                                        'frontend_page_footer',
                                        )
                                );
        
        // Settings to be allowed to read from and write to database
        $this->add_property('setting_names',  
                                array(  
                                        'module_tla_active',
                                        'module_tla_local_xml_file',
                                        'module_tla_local_xml_key',
                                        'module_tla_ads_per_row',
                                        'module_tla_ad_font_size',
                                        'module_tla_ad_border_color',
                                        'module_tla_ad_background_color',
                                        'module_tla_ad_link_color',
                                        )
                                );
        
        // Default values
        $this->add_property('module_tla_active',                'N');
        $this->add_property('module_tla_local_xml_file',        'local_tla.xml');
        $this->add_property('module_tla_ads_per_row',           1);
        $this->add_property('module_tla_ad_font_size',          12);
        $this->add_property('module_tla_ad_border_color',       '#CCCCCC');
        $this->add_property('module_tla_ad_background_color',   '#F4F9FF');
        $this->add_property('module_tla_ad_link_color',         '#74A0FF');
        
        // Get settings from database
        $this->get_settings();
        
        // Set module status 
        $this->status('module_tla_active', 'N');

        // Create tla local xml file if it does not exist
        if (!is_file($this->get_property('module_path') . $this->get_property('module_tla_local_xml_file'))) {
            file_put_contents($this->get_property('module_path') . $this->get_property('module_tla_local_xml_file'), '');            
        }
    }

// -----------------------------------------------------------------------------




    /**
     *  Administration
     * 
     * @access public
     */
    function administration()
    {
        $settings = array();
        
        $settings['module_tla_active'] = array(
            'type'          => 'bool',
            'label'         => $this->text['txt_enable_module'],
            'description'   => $this->text['txt_enable_module_description'],
            'required'      => true
            );
        
        $settings['module_tla_local_xml_key'] = array(
            'type'          => 'string',
            'label'         => $this->text['txt_tla_xml_key'],
            'description'   => $this->text['txt_tla_xml_key_description'],
            'required'      => false
            );
        
        $settings['module_tla_ads_per_row'] = array(
            'type'          => 'select',
            'label'         => $this->text['txt_ads_per_row'],
            'description'   => '',
            'required'      => true,
            'option'        => array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8)
            );
        
        $settings['module_tla_ad_font_size'] = array(
            'type'          => 'select',
            'label'         => $this->text['txt_ad_font_size'],
            'description'   => '',
            'required'      => true,
            'option'        => array(10 => 10, 11 => 11, 12 => 12, 13 => 13, 14 => 14, 15 => 15, 16 => 16, 17 => 17, 18 => 18)
            );
        
        $settings['module_tla_ad_border_color'] = array(
            'type'          => 'color',
            'label'         => $this->text['txt_border_color'],
            'description'   => '',
            'required'      => false
            );
        
        $settings['module_tla_ad_background_color'] = array(
            'type'          => 'color',
            'label'         => $this->text['txt_background_color'],
            'description'   => '',
            'required'      => false
            );
        
        $settings['module_tla_ad_link_color'] = array(
            'type'          => 'color',
            'label'         => $this->text['txt_link_color'],
            'description'   => '',
            'required'      => false
            );

        return $settings;
    }

// -----------------------------------------------------------------------------




    /**
     * Processing the content
     * 
     */
    function process($trigger, &$settings, &$data, &$additional)
    {
        if ($this->get_property('module_tla_local_xml_key') == '') {
            return false;
        }
        
        if ($trigger == 'module_demo'
                and isset($data['module'])
                and trim($data['module']) == get_class($this)) {

            $tla_content = $this->tla_ads();
            $this->set_output($trigger, $tla_content);
        }
        
        if ($trigger == 'frontend_page_footer'
                or $trigger == 'module_call_tla') {

            $out = $this->get_output_object();
            $out->set_template_dir($this->get_property('module_path') . 'template/'); 
            $out->assign('text_link_ads', $this->tla_ads());
            $content = $out->fetch('tla.tpl.html');
            $this->set_output($trigger, $content);
        }
    }

// -----------------------------------------------------------------------------




    /**
     * TLA
     * 
     */
    function tla_ads() {
    
        // Number of seconds before connection to XML times out
        // (This can be left the way it is)
        $CONNECTION_TIMEOUT = 10;
    
        // Local file to store XML
        // This file MUST be writable by web server
        // You should create a blank file and CHMOD it to 666
        $LOCAL_XML_FILENAME = $this->get_property('module_path') . $this->get_property('module_tla_local_xml_file');
    
        if( !file_exists($LOCAL_XML_FILENAME) ) die("Text Link Ads script error: $LOCAL_XML_FILENAME does not exist. Please create a blank file named $LOCAL_XML_FILENAME.");
        if( !is_writable($LOCAL_XML_FILENAME) ) die("Text Link Ads script error: $LOCAL_XML_FILENAME is not writable. Please set write permissions on $LOCAL_XML_FILENAME.");
    
        if( filemtime($LOCAL_XML_FILENAME) < (time() - 3600) || filesize($LOCAL_XML_FILENAME) < 20) {
            $request_uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : "";
            $user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "";
            tla_updateLocalXML("http://www.text-link-ads.com/xml.php?inventory_key=" . $this->get_property('module_tla_local_xml_key') . "&referer=" . urlencode($request_uri) .  "&user_agent=" . urlencode($user_agent), $LOCAL_XML_FILENAME, $CONNECTION_TIMEOUT);
        }
    
        $xml = tla_getLocalXML($LOCAL_XML_FILENAME);
    
        $arr_xml = tla_decodeXML($xml);
        $width = ceil(100 / $this->get_property('module_tla_ads_per_row'));
        $content = '';        
        if ( is_array($arr_xml) ) {
            $content .= "\n<ul style=\"border: 1px solid " . $this->get_property('module_tla_ad_border_color') . "; border-spacing: 0px; background-color: " . $this->get_property('module_tla_ad_background_color') . "; width: 100%; padding: 0; overflow: hidden; list-style: none; margin: 0;\">\n";
            for ($i = 0; $i < count($arr_xml['URL']); $i++) {
                $content .= "<li style=\"margin: 0; width: " . $width . "%; float: left; clear: none; padding: 0; display: inline;\"><span style=\"display: block; color: #000000; font-size: " . $this->get_property('module_tla_ad_font_size') . "px; padding: 3px; margin: 0; width: 100%;\">".$arr_xml['BeforeText'][$i]." <a style=\"color: " . $this->get_property('module_tla_ad_link_color') . "; font-size: " . $this->get_property('module_tla_ad_font_size') . "px;\" href=\"".$arr_xml['URL'][$i]."\">".$arr_xml['Text'][$i]."</a> ".$arr_xml['AfterText'][$i]."</span></li>\n";
            }
            $content .= "</ul>";
        }
        return $content;    
    }

// -----------------------------------------------------------------------------
    



} // End of class




/**
 * TLA
 * 
 */
function tla_updateLocalXML($url, $file, $time_out)
{
    if($handle = fopen($file, "a")){
            fwrite($handle, "\n");
            fclose($handle);
    }
    if($xml = file_get_contents_tla($url, $time_out)) {
        $xml = substr($xml, strpos($xml,'<?'));

        if ($handle = fopen($file, "w")) {
            fwrite($handle, $xml);
            fclose($handle);
        }
    }
}

// -----------------------------------------------------------------------------




/**
 * TLA
 * 
 */
function tla_getLocalXML($file)
{
    $contents = "";
    if($handle = fopen($file, "r")){
        $contents = fread($handle, filesize($file)+1);
        fclose($handle);
    }
    return $contents;
}

// -----------------------------------------------------------------------------




/**
 * TLA
 * 
 */
function file_get_contents_tla($url, $time_out)
{
    $result = "";
    $url = parse_url($url);

    if ($handle = @fsockopen ($url["host"], 80)) {
        if(function_exists("socket_set_timeout")) {
            socket_set_timeout($handle,$time_out,0);
        } else if(function_exists("stream_set_timeout")) {
            stream_set_timeout($handle,$time_out,0);
        }

        fwrite ($handle, "GET $url[path]?$url[query] HTTP/1.0\r\nHost: $url[host]\r\nConnection: Close\r\n\r\n");
        while (!feof($handle)) {
            $result .= @fread($handle, 40960);
        }
        fclose($handle);
    }

    return $result;
}

// -----------------------------------------------------------------------------




/**
 * TLA
 * 
 */
function tla_decodeXML($xmlstg)
{

    if( !function_exists('html_entity_decode') ){
        function html_entity_decode($string)
        {
           // replace numeric entities
           $string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\1"))', $string);
           $string = preg_replace('~&#([0-9]+);~e', 'chr(\1)', $string);
           // replace literal entities
           $trans_tbl = get_html_translation_table(HTML_ENTITIES);
           $trans_tbl = array_flip($trans_tbl);
           return strtr($string, $trans_tbl);
        }
    }

    $out = "";
    $retarr = "";

    preg_match_all ("/<(.*?)>(.*?)</", $xmlstg, $out, PREG_SET_ORDER);
    $search_ar = array('&#60;', '&#62;', '&#34;');
    $replace_ar = array('<', '>', '"');
    $n = 0;
    while (isset($out[$n]))
    {
        $retarr[$out[$n][1]][] = str_replace($search_ar, $replace_ar,html_entity_decode(strip_tags($out[$n][0])));
        $n++;
    }
    return $retarr;
}

// -----------------------------------------------------------------------------








?>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品aⅴ在线视频| 久久综合色一综合色88| 国产精品美女久久久久久久久久久 | 中文字幕精品在线不卡| 成人美女视频在线观看| 国产日韩视频一区二区三区| 成人性生交大片免费看在线播放| 亚洲国产岛国毛片在线| 色综合色综合色综合色综合色综合| 中文字幕中文在线不卡住| 色哦色哦哦色天天综合| 日韩精品亚洲专区| 精品福利视频一区二区三区| 国产成人免费9x9x人网站视频| 国产精品久久久久精k8| 欧美日韩一区二区三区不卡| 美女视频黄 久久| 国产精品久久久久一区| 欧美三级欧美一级| 国产一区91精品张津瑜| 1000精品久久久久久久久| 欧美午夜一区二区三区免费大片| 美女在线观看视频一区二区| 国产亚洲精品bt天堂精选| 色综合视频在线观看| 久久精品国产一区二区三区免费看| 日本一区二区成人| 欧美影视一区在线| 国产黄色91视频| 五月天一区二区| 日本一区二区免费在线| 欧美影院一区二区三区| 国产高清成人在线| 亚洲成人精品一区二区| 国产日韩欧美一区二区三区综合| 在线一区二区三区四区| 国产综合色产在线精品| 午夜欧美在线一二页| 欧美经典一区二区| 777午夜精品免费视频| 成人免费高清在线| 久久精品国产第一区二区三区| 亚洲日本乱码在线观看| 日韩精品一区二区三区三区免费 | 26uuu精品一区二区三区四区在线| www.欧美日韩国产在线| 蜜桃一区二区三区四区| 亚洲日本丝袜连裤袜办公室| 久久久亚洲高清| 4438亚洲最大| 在线观看日韩一区| 不卡一卡二卡三乱码免费网站| 另类小说综合欧美亚洲| 亚洲欧美韩国综合色| 国产三级欧美三级日产三级99| 56国语精品自产拍在线观看| 91久久国产综合久久| 国产成人精品在线看| 紧缚奴在线一区二区三区| 亚洲高清免费观看高清完整版在线观看| 欧美国产精品v| 久久久久久亚洲综合影院红桃 | 欧美天堂一区二区三区| 成人av一区二区三区| 久久电影网站中文字幕 | 日韩午夜在线观看视频| 欧美午夜精品一区| 色老汉av一区二区三区| caoporen国产精品视频| 成人动漫一区二区三区| 国产一区二区三区黄视频| 秋霞电影一区二区| 欧美a级一区二区| 免费在线观看精品| 日韩av不卡在线观看| 日日夜夜精品视频免费| 日韩精品午夜视频| 蜜芽一区二区三区| 日本不卡在线视频| 美腿丝袜亚洲综合| 久久国产视频网| 精品一区二区免费视频| 精品综合免费视频观看| 国产自产视频一区二区三区| 国产原创一区二区| 国产精品99久久久久久有的能看| 国产寡妇亲子伦一区二区| 国产精品69久久久久水密桃| 国产精品亚洲综合一区在线观看| 国产一区二区三区美女| 成人影视亚洲图片在线| av一区二区久久| 在线中文字幕不卡| 日韩欧美国产一二三区| 久久久久久久久久久久电影| 久久久综合精品| 亚洲男人的天堂网| 午夜免费久久看| 九九久久精品视频| 国产suv精品一区二区883| 99r国产精品| 欧美乱熟臀69xxxxxx| 精品乱人伦小说| 日本一区二区视频在线| 亚洲美女视频一区| 日韩高清不卡一区| 国产精品乡下勾搭老头1| 99久久免费精品高清特色大片| 91捆绑美女网站| 日韩一区二区在线观看视频| 国产欧美一区二区精品秋霞影院| 亚洲黄色av一区| 美女网站视频久久| 成人av免费观看| 91精品国产综合久久久久| 久久精品夜夜夜夜久久| 伊人婷婷欧美激情| 久久不见久久见免费视频1| eeuss鲁片一区二区三区| 欧美精品粉嫩高潮一区二区| 国产欧美日本一区视频| 视频在线观看一区二区三区| 国产福利精品一区二区| 欧美日韩高清影院| 国产精品亲子伦对白| 天天影视涩香欲综合网| 成人激情校园春色| 日韩视频一区在线观看| 亚洲欧美日韩电影| 国产一区二区电影| 欧美猛男男办公室激情| 成人欧美一区二区三区| 精品一区二区综合| 欧美日韩一区二区不卡| 国产欧美日韩视频在线观看| 久久精品国产精品青草| 欧美日韩国产美| 亚洲视频 欧洲视频| 福利一区二区在线| 日韩欧美aaaaaa| 亚洲福中文字幕伊人影院| 北岛玲一区二区三区四区| 2024国产精品| 日本视频免费一区| 欧美做爰猛烈大尺度电影无法无天| 久久综合九色综合97婷婷| 三级欧美韩日大片在线看| 日本久久精品电影| 中文在线资源观看网站视频免费不卡| 日韩高清不卡一区二区三区| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 中文字幕精品一区二区三区精品| 久久99热99| 日韩精品资源二区在线| 日本欧美久久久久免费播放网| 欧美在线免费播放| 17c精品麻豆一区二区免费| 国产福利一区二区三区| 久久久无码精品亚洲日韩按摩| 美脚の诱脚舐め脚责91| 欧美一区二区三区啪啪| 日韩国产在线观看| 欧美日韩国产首页| 日韩和的一区二区| 91麻豆精品国产91久久久使用方法 | 精品日韩欧美在线| 免费在线观看日韩欧美| 欧美电视剧免费观看| 狠狠色丁香九九婷婷综合五月| 日韩免费看的电影| 另类的小说在线视频另类成人小视频在线| 欧美日韩在线精品一区二区三区激情| 亚洲精品视频观看| 欧美亚洲动漫另类| 日日夜夜精品视频天天综合网| 欧美日韩第一区日日骚| 日韩精品1区2区3区| 日韩美女视频在线| 成人精品鲁一区一区二区| 中文字幕五月欧美| 日本韩国欧美在线| 偷偷要91色婷婷| 欧美成人艳星乳罩| 国产成人在线观看| 亚洲卡通动漫在线| 欧美色视频在线| 麻豆国产精品一区二区三区| 欧美精品一区二区久久婷婷| 高清视频一区二区| 亚洲精品免费电影| 欧美卡1卡2卡| 国产专区综合网| 中文字幕精品三区| 在线观看三级视频欧美| 麻豆精品一区二区| 日本一区二区三区在线观看| 日本高清不卡在线观看| 六月丁香综合在线视频| 1024国产精品| 日韩午夜激情视频|