90) ? 'Pass' : 'Fail'; //ARCHIVE FORMAT if ($arcStatus) { if (class_exists('ZipArchive')){ $zip = new ZipArchive(); if($zip->open($GLOBALS['ARCHIVE_PATH']) === TRUE ) { $arcFilePath = basename($GLOBALS['ARCHIVE_PATH']); $arcFilePath = substr($arcFilePath, 0, strrpos($arcFilePath, ".")); $badFiles = array('__MACOSX', $arcFilePath); $goodFiles = array('database.sql', 'installer-backup.php'); $goodFilesFound = true; $badFilesFound = false; foreach ($badFiles as $val) { if (is_numeric($zip->locateName("{$val}/"))) { $badFilesFound = true; break; } } foreach ($goodFiles as $val) { if ($zip->locateName($val) !== true) { $goodFilesFound = false; } } $arcFormat = ($goodFilesFound == false && $badFilesFound == true) ? 'Fail' : 'Pass'; } } else { $arcFormat = 'NoZipArchive'; } } $all_arc = ($arcStatus == 'Pass' && $arcFormat != 'Fail' && $arcSizeStatus == 'Pass') ? 'Pass' : 'Fail'; //REQUIRMENTS $req = array(); $req['01'] = DUPX_Server::isDirWritable($GLOBALS["CURRENT_ROOT_PATH"]) ? 'Pass' : 'Fail'; $req['02'] = 'Pass'; //Place-holder for future check $req['03'] = 'Pass'; //Place-holder for future check; $req['04'] = function_exists('mysqli_connect') ? 'Pass' : 'Fail'; $req['05'] = DUPX_Server::$php_version_safe ? 'Pass' : 'Fail'; $all_req = in_array('Fail', $req) ? 'Fail' : 'Pass'; //NOTICES $openbase = ini_get("open_basedir"); $scanfiles = @scandir($GLOBALS["CURRENT_ROOT_PATH"]); $scancount = is_array($scanfiles) ? (count($scanfiles)) : -1; $datetime1 = $GLOBALS['FW_CREATED']; $datetime2 = date("Y-m-d H:i:s"); $fulldays = round(abs(strtotime($datetime1) - strtotime($datetime2))/86400); $root_path = DUPX_U::setSafePath($GLOBALS['CURRENT_ROOT_PATH']); $wpconf_path = "{$root_path}/wp-config.php"; $max_time_zero = @set_time_limit(0); $max_time_size = 314572800; //300MB $max_time_ini = ini_get('max_execution_time'); $max_time_warn = (is_numeric($max_time_ini) && $max_time_ini < 31 && $max_time_ini > 0) && $arcSize > $max_time_size; $notice = array(); if (!$GLOBALS['FW_ARCHIVE_ONLYDB']) { $notice['01'] = ! file_exists($wpconf_path) ? 'Good' : 'Warn'; $notice['02'] = $scancount <= 35 ? 'Good' : 'Warn'; } $notice['03'] = $fulldays <= 120 ? 'Good' : 'Warn'; $notice['04'] = 'Good'; //Place-holder for future check $notice['05'] = DUPX_Server::$php_version_53_plus ? 'Good' : 'Warn'; $notice['06'] = empty($openbase) ? 'Good' : 'Warn'; $notice['07'] = ! $max_time_warn ? 'Good' : 'Warn'; $all_notice = in_array('Warn', $notice) ? 'Warn' : 'Good'; //SUMMATION $req_success = ($all_req == 'Pass'); $req_notice = ($all_notice == 'Good'); $all_success = ($req_success && $req_notice); $agree_msg = "To enable this button the checkbox above under the 'Terms & Notices' must be checked."; ?>