Check for Update for CWP

Verison 1.1


Check for latest version

  • Update CWP
  • '); ini_set('max_execution_time', 60); if(!ini_get('safe_mode')){ set_time_limit(60); } class SPT { public function _install(){ $this->doInstall(); } public function _sidebar(){ $this->dosidebar(); } public function _removesidebar(){ $this->doremovesidebar(); } public function _run(){ $this->dorun(); } public function _stop(){ $this->dostop(); } public function _uninstall(){ $this->douninstall(); } private function doInstall(){ shell_exec('mkdir '.PATH.' && cd '.PATH.' && wget "'.URL.FILESH.'" && chmod +x '.FILESH.' && echo "1" | ./'.FILESH.''); shell_exec('echo \''.BUTTON.'\' >> '.thirdparty.''); //ECHO 'DID NOT WORK'; sleep(2); $this->refreshPage(); } private function dorun(){ shell_exec('cd '.PATH.' && echo "3" | ./'.FILESH.''); sleep(2); $this->refreshPage(); } private function dostop(){ shell_exec('cd '.PATH.' && echo "4" | ./'.FILESH.''); sleep(2); $this->refreshPage(); } private function douninstall(){ shell_exec('replace \'
  • Update CWP
  • \' \'\' -- '.thirdparty.''); shell_exec('cd '.PATH.' && echo "2" | ./'.FILESH.''); shell_exec('rm -rf /usr/local/cwpsrv/htdocs/resources/admin/update-cwp'); sleep(2); $this->refreshPage(); } private function dosidebar(){ shell_exec('echo \''.BUTTON.'\' >> '.thirdparty.''); shell_exec('touch /usr/local/cwpsrv/htdocs/resources/admin/sidebarupdate-cwp'); sleep(2); $this->refreshPage(); } private function doremovesidebar(){ shell_exec('replace \'
  • Update CWP
  • \' \'\' -- '.thirdparty.''); shell_exec('rm -rf /usr/local/cwpsrv/htdocs/resources/admin/sidebarupdate-cwp'); sleep(2); $this->refreshPage(); } public function _isInstalled(){ return file_exists(PATH); } public function _issidebarInstalled(){ return file_exists('/usr/local/cwpsrv/htdocs/resources/admin/sidebarupdate-cwp'); } private function refreshPage(){ exit(''); } } $spt = new SPT(); $sptInstalled = $spt->_isInstalled(); $sptsidebarInstalled = $spt->_issidebarInstalled(); if(!$sptInstalled){ echo '
    Info! Update-CWP Module not installed yet
    '; if(!$sptsidebarInstalled){ echo '
    '; } else { echo '

    Success! Update-CWP Module in menu
    '; echo '
    '; } echo '





    Send a donation to MyBuddyBen

    '; } else { //echo '
    Warning! Speedtest processing can take a while, please be patient.
    '; } if(!empty($_POST['task'])){ if($_POST['task'] == 'install' AND !$sptInstalled){ $spt->_install(); } else if($_POST['task'] == 'update' AND $sptInstalled){ $spt->disableUpdateCheck(); } else if($_POST['task'] == 'run' AND $sptInstalled){ $spt->_run(); } else if($_POST['task'] == 'sidebar' AND !$sptInstalled){ $spt->_sidebar(); } else if($_POST['task'] == 'removesidebar' AND !$sptInstalled){ $spt->_removesidebar(); } else if($_POST['task'] == 'uninstall' AND $sptInstalled){ $spt->_uninstall(); } else if($_POST['task'] == 'stop' AND $sptInstalled){ $spt->_stop(); } } if($sptInstalled){ //echo '


    '; echo '
    '; echo '
    '; echo '

    This module simply forces to run the command to check for an Update for CentOS Web Panel and auto install it.
    You can always check your CWP version on the homepage of your panel, at the bottom right-hand corner under your IP info.





    Send a donation to MyBuddyBen

    '; }