HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: /home/httpd/html/dowork.biz/public_html/public/webdav.php
<?php

define('PUBLIC_PATH', dirname(__FILE__));

$config_file = realpath(PUBLIC_PATH . '/../config/config.php');

 if(is_file($config_file)) {
    require_once($config_file);
    ini_set("default_charset", "UTF-8");
	ini_set("error_reporting", "");
	
    require ROOT . '/angie.php';
    require ANGIE_PATH . '/init.php';
    
    
    $application =& application();
  	$application->prepare(array(
	    'initialize_resources' => true,
	    'connect_to_database'  => true,
	    'initialize_smarty'    => true,
	    'init_modules'         => true,
	    'authenticate'         => true,
	    'init_locale'          => true,
	    'load_hooks'           => true,
  	));//array
    
    $application->init();
    include_once WEBDAV_MODULE_PATH.'/models/Authenticate.php';
    $not_installed_modules = Modules::findNotInstalled();
    foreach ($not_installed_modules as $module) {
	    if ($module->name == 'webdav') {
	    	header("HTTP/1.1 503 Service Unavailable");
	    	die('Module is not installed');
	    }
    }
    if (!ConfigOptions::getValue('webdav_enabled')) {
    	header("HTTP/1.1 503 Service Unavailable");
	    die('Module has been disabled by administrator');
    }//if
    
	$realm = 'activeCollab webdav area';
	$sapi_type = php_sapi_name();
	$phpcgi = (substr($sapi_type, 0, 3) == 'cgi') ? true : false;
	$user = AuthenticationBasicHTTP($realm,$phpcgi);
	require_once WEBDAV_MODULE_PATH . '/models/Filesystem.php';
    $server = new HTTP_WebDAV_Server_Filesystem();
    $server->ServeRequest(false,$user);
	
 } else {
    header("HTTP/1.1 503 Service Unavailable");
    die();
 } // if
?>