/** * Function returns all the files and folder that are not writable * @return <Array> */ public static function getFailedPermissionsFiles() { $writableFilesAndFolders = self::$writableFilesAndFolders; $failedPermissions = array(); require_once 'include/utils/VtlibUtils.php'; foreach ($writableFilesAndFolders as $index => $value) { if (!vtlib_isWriteable($value)) { $failedPermissions[$index] = $value; } } return $failedPermissions; }
/** * Function returns permissions to the core files and folder * @return <Array> */ public static function getPermissionsFiles($onlyError = false) { $writableFilesAndFolders = self::$writableFilesAndFolders; $permissions = array(); require_once 'include/utils/VtlibUtils.php'; foreach ($writableFilesAndFolders as $index => $value) { $isWriteable = vtlib_isWriteable($value); if (!$isWriteable || !$onlyError) { $permissions[$index]['permission'] = 'TruePermission'; $permissions[$index]['path'] = $value; } if (!$isWriteable) { $permissions[$index]['permission'] = 'FailedPermission'; } } return $permissions; }
preg_match_all("/<tr[^>]*>\n\t\t\t\t\t\t\t\t\t\t <td[^>]*>(.*)<\\/td>\n\t\t\t\t\t\t\t\t\t\t <td[^>]*>(.*)<\\/td>/Ux", $val, $sub); preg_match_all("/<tr[^>]*>\n\t\t\t\t\t\t\t\t\t\t <td[^>]*>(.*)<\\/td>\n\t\t\t\t\t\t\t\t\t\t <td[^>]*>(.*)<\\/td>\n\t\t\t\t\t\t\t\t\t\t <td[^>]*>(.*)<\\/td>/Ux", $val, $sub_ext); foreach ($sub[0] as $key => $val) { if (preg_match("/Configuration File \\(php.ini\\) Path /", $val)) { $val = preg_replace("/Configuration File \\(php.ini\\) Path /", '', $val); $phpini = strip_tags($val); } } } if (isset($_REQUEST['filename'])) { $file_name = htmlspecialchars($_REQUEST['filename']); } $writable_files_folders = array('Configuration File' => './config.inc.php', 'Tabdata File' => './tabdata.php', 'Installation File' => './install.php', 'Parent Tabdata File' => './parent_tabdata.php', 'Cache Directory' => './cache/', 'Image Cache Directory' => './cache/images/', 'Import Cache Directory' => './cache/import/', 'Storage Directory' => './storage/', 'Install Directory' => './install/', 'User Privileges Directory' => './user_privileges/', 'Smarty Cache Directory' => './Smarty/cache/', 'Smarty Compile Directory' => './Smarty/templates_c/', 'Email Templates Directory' => './modules/Emails/templates/', 'Modules Directory' => './modules/', 'Cron Modules Directory' => './cron/modules/', 'Vtlib Test Directory' => './test/vtlib/', 'Backup Directory' => './backup/', 'Smarty Modules Directory' => './Smarty/templates/modules/', 'Mail Merge Template Directory' => './test/wordtemplatedownload/', 'Product Image Directory' => './test/product/', 'User Image Directory' => './test/user/', 'Contact Image Directory' => './test/contact/', 'Logo Directory' => './test/logo/', 'Logs Directory' => './logs/', 'Webmail Attachments Directory' => './modules/Webmails/tmp/'); require_once 'include/utils/VtlibUtils.php'; foreach ($writable_files_folders as $index => $value) { if (!vtlib_isWriteable($value)) { $failed_permissions[$index] = $value; } } $gd_info_alternate = 'function gd_info() { $array = Array( "GD Version" => "", "FreeType Support" => 0, "FreeType Support" => 0, "FreeType Linkage" => "", "T1Lib Support" => 0, "GIF Read Support" => 0, "GIF Create Support" => 0, "JPG Support" => 0, "PNG Support" => 0, "WBMP Support" => 0,