nction dl_r($filename, $remote_url = 'http://www.ramiismail.com/kit/press/' ) { $remote_url .= $filename; $local_file = $filename; if( ini_get('allow_url_fopen') ) { copy($remote_url, $local_file); return true; } $fp = fopen($local_file, 'w+'); $cp = curl_init(); curl_setopt($cp, CURLOPT_URL, $remote_url); curl_setopt($cp, CURLOPT_RETURNTRANSFER, 1); curl_setopt($cp, CURLOPT_CONNECTTIMEOUT, 5); $buffer = curl_exec($cp); curl_close($cp); fwrite($fp, $buffer); fclose($fp); return true; } if( ini_get('safe_mode') ) { echo('

Server Environment Check Failed: PHP Safe Mode Enabled

Sadly, you or your host seem to have enabled PHP Safe Mode. PHP Safe Mode results in unexpected behaviour with user-installed scripts on your server and might cause presskit() to not function correctly. Please upgrade to PHP 5.4.0 or later or disable Safe Mode to continue.

If you cannot disable Safe Mode nor upgrade and are comfortable installing scripts, please download the manual installation package.

'); die(); } $upgrade = 0; $file_needed = 0; if( count( glob( "*.*" ) ) > 3 ) { if( file_exists('validation.js') ) { if( file_exists('data.xml') ) { $upgrade = 1; } if( file_exists('_data.xml') ) { rename('_data.xml', '_data.bak'); } } } // We'll first need to grab the CSS files. Otherwise, this'll look like crap. if( file_exists('style.css') ) { unlink('style.css'); } dl_r('style.css'); if( !file_exists('style.css') ) { dl_r('style.css', 'https://vlambeer.com/kit/presskit/'); } if ($upgrade == 0) { $title = 'Installation'; } else { $title = 'Upgrade'; } dl_r('archive.zip'); if( !file_exists('archive.zip') ) { dl_r('archive.zip', 'https://vlambeer.com/kit/presskit/'); } if( !class_exists("ZipArchive") ) { dl_r('pclzip.lib'); rename('pclzip.lib','pclzip.lib.php'); require_once('pclzip.lib.php'); $archive = new PclZip('archive.zip'); if ($archive->extract() == 0) { die("Error : ".$archive->errorInfo(true)); } unlink('pclzip.lib.php'); } else { $zip = new ZipArchive; $res = $zip->open('archive.zip'); if( $res === TRUE ) { $zip->extractTo('.'); $zip->close(); } } if( file_exists('_data.bak') ) { rename('_data.bak', '_data.xml'); } if( !is_dir('images') ) { $directoriesText = '
  • Creating folders...
  • '; mkdir('images'); } else { $directoriesText = ''; } if( !is_dir('trailers') ) { mkdir('trailers'); } unlink('archive.zip'); if( $upgrade == 0 ) { $doneText = '

    Now comes the fun part!

    This was rather easy & painless, wasn\'t it? Well, this is where the automated part ends and where you come in. There\'s about thirty to sixty minutes of work left and said work includes some XML-editing and FTP. By all means take a break and think of what you want to say about your company. I\'ll be right here!

    '; } else { if( file_exists('_data.xml') ) { unlink('_data.xml'); } $doneText = '

    That was all!

    Your scripts have been updated! There are a few more things that you need to do before we continue. The next steps should only take a few seconds to complete & as you\'d probably want to minimize the time your press page is unavailable, it\'d be best if you do everything right away.

    '; } echo ' ' . $title . '

    Progress

    Don\'t worry, this should be over before you really notice anything has happened.

    • Downloading files...
    • Installing files...
    • ' . $directoriesText . '
    • Deleting residue and temporary files...
    ' . $doneText . '
    ';

    "Call me back as soon as you can okay?... please?"

    download

    © 2019 Naraven Games. I really suffered dealing with this. Webdesign is pain.