CHips L MINI SHELL

CHips L pro

Current Path : /proc/2/root/usr/local/rvglobalsoft/rvglobalsoft/auto/rvsitebuilderinstaller/CpHandle/
Upload File :
Current File : //proc/2/root/usr/local/rvglobalsoft/rvglobalsoft/auto/rvsitebuilderinstaller/CpHandle/CpHandle.php

<?php 
if (class_exists("Install_Constants") === false) {
	require_once dirname(__FILE__) . '/constants.php';
}

class InstallHandle
{
    var $oCp = null;

	private function InstallHandle()
	{

	}

    public function init($cpmode = INS_CPMODE) 
    {
        $cpPrefix = 'CpHandle';
        switch (strtolower($cpmode)) {
            case 'cpanel':
                $cpFile = 'Cpanel';
                $strategy = 'InstallHandle_' . $cpFile;
                
                break;
            case 'da': 
                $cpFile = 'Da'; 
                $strategy = 'InstallHandle_' . $cpFile;
                break; 
        }
            $cpPathFile = INS_REAL_PATH . '/' . $cpPrefix . '/classes/' . $cpFile . '.php';
        
            if (class_exists($strategy) === false) {
            	require_once $cpPathFile;
            }
        
        $obj = new $strategy();
        $ok = $obj->init();
        return $obj;
    }
    
    public static function singleton($autoload=false)
    {
        static $instance;

        // If the instance is not there, create one
        if (!isset($instance) || $autoload) {
            $class = __CLASS__;
            $obj =  new $class();
            $instance = $obj->init();
        }
        return $instance;
    }
    
    public static function factory()
    {
    	$obj = InstallHandle::singleton();
        return $obj;
    }
}

Copyright 2K16 - 2K18 Indonesian Hacker Rulez