Вход Регистрация
Файл: adultscript-2.0.3-pro/files/admin/modules/grab/components/config.php
Строк: 105
<?php
defined
('_VALID') or die('Restricted Access!');
class 
VComponent_Admin_grab_config
{
    public function 
__construct()
    {
    }
    
    public function 
render()
    {
        
$db            VF::factory('database');
        
$errors        = array();
        
$messages    = array();
        
$warnings    = array();
        
$gcfg        VF::cfg('module.grab');
        
$categories    $db->get_rows("SELECT cat_id, name FROM #__video_categories ORDER BY name ASC");
        
        if (isset(
$_POST['submit_config'])) {
            
$filter        VF::factory('filter');
            
$username    $filter->get('username');
            
$category    $filter->get('category''INT');
            
$redtube    $filter->get('redtube');
            
$pornhub    $filter->get('pornhub');
            
$xvideos    $filter->get('xvideos');
            
$pornrabbit    $filter->get('pornrabbit');
            
$porn2        $filter->get('porn2');
            
$pornative    $filter->get('pornative');
            
$pron        $filter->get('pron');
            
$keezmovies    $filter->get('keezmovies');
            
$shufuni    $filter->get('shufuni');
            
$madthumbs    $filter->get('madthumbs');
            
$tube8        $filter->get('tube8');
            
$pornerbros    $filter->get('pornerbros');
            
$freeporn    $filter->get('freeporn');
            
$manhub        $filter->get('manhub');
            
$deviant    $filter->get('deviant');
            
$xhamster   $filter->get('xhamster');
            
            if (
$username == '') {
                
$errors[]    = 'Username field cannot be left blank!';
            } else {
                
$db->query("SELECT user_id FROM #__user WHERE username = '".$db->escape($username)."' LIMIT 1");
                if (
$db->affected_rows()) {
                    
$user_id = (int) $db->fetch_field('user_id');
                } else {
                    
$errors[] = 'Invalid username! Are you sure this username exists on this system!?';
                }
            }
            
            if (!
$errors) {
                
$gcfg        = array(
                    
'username'    => $username,
                    
'user_id'    => $user_id,
                    
'category'    => $category,
                    
'urls'        => array(
                        
'redtube'        => $redtube,
                        
'pornhub'        => $pornhub,
                        
'xvideos'        => $xvideos,
                        
'pornrabbit'    => $pornrabbit,
                        
'pornative'        => $pornative,
                        
'porn2'            => $porn2,
                        
'pron'            => $pron,
                        
'keezmovies'    => $keezmovies,
                        
'shufuni'        => $shufuni,
                        
'madthumbs'        => $madthumbs,
                        
'pornerbros'    => $pornerbros,
                        
'tube8'            => $tube8,
                        
'freeporn'        => $freeporn,
                        
'yobt'            => 'http://www.yobt.com',
                        
'sextube'        => 'http://www.sextube.com/categories&c=All&lo=basic&s=mr&t=a',
                        
'slutload'        => 'http://www.slutload.com/fresh/',
                        
'dojki'            => 'http://www.dojki.com',
                        
'manhub'        => $manhub,
                        
'deviant'        => $deviant,
                        
'xhamster'      => $xhamster
                    
),
                    
'sites'        => array(
                          
'pornhub.com' => 'pornhub',
                          
'redtube.com' => 'redtube',
                        
'empflix.com' => 'empflix',
                        
'tnaflix.com' => 'tnaflix',
                        
'porn2.com' => 'porn2',
                        
'pron.com' => 'pron',
                        
'pornative.com' => 'pornative',
                        
'xvideos.com' => 'xvideos',
                        
'pornrabbit.com' => 'pornrabbit',
                        
'shufuni.com' => 'shufuni',
                          
'keezmovies.com' => 'keezmovies',
                          
'madthumbs.com' => 'madthumbs',
                          
'yobt.com'    => 'yobt',
                          
'sextube.com' => 'sextube',
                          
'slutload.com' => 'slutload',
                          
'tube8.com' => 'tube8',
                          
'pornerbros.com' => 'pornerbros',
                          
'freeporn.com' => 'freeporn',
                          
'manhub.com' => 'manhub',
                          
'deviantclip.com' => 'deviantclip',
                          
'xhamster.com' => 'xhamster',
                          
'dojki.com' => 'dojki'
                    
)
                );

                
$db->query("UPDATE #__module
                            SET config_cache = '"
.$db->escape(serialize($gcfg))."',
                                config = '"
.$db->escape(serialize($gcfg))."'
                            WHERE name = 'grab'
                            LIMIT 1"
);
                
VF::cache_set('grab'$gcfg'module');
                                                                                                                                                                                           
                
$messages[] = 'Video Module Configuration Updated';
                                                                                                                                                                                                                           
            }
        }
        
        
$gcfg VF::cfg('module.grab'TRUETRUE);
            
        
$tpl VF::factory('template');
        
$tpl->menu            'video';
        
$tpl->submenu        'video_grab';
        
$tpl->meta_title    'Admin::Video::Grab::Config';
        
$tpl->errors        $errors;
        
$tpl->messages        $messages;
        
$tpl->gcfg            $gcfg;
        
$tpl->categories    $categories;
        
$tpl->load(array('header''grab_config''footer'));
        
$tpl->display();
    }
}
Онлайн: 0
Реклама