Protected Directories

Allard

New member
Joined
Mar 18, 2011
Messages
25
Hello,

I have a question. I use this script, but it doesn't work. He sets the name to 'None', thats good. But he does not set the 'enabled' value to 'no'. What's the problem?

PHP:
		public function DeleteDirectory($Domain, $dir)
        {
                  global $sock;
				  $sock->query('/CMD_API_FILE_MANAGER', array('action' => 'protect', 'enabled' => 'no', 'path' => '/domains/'.$Domain.'/public_html'.$dir, 'name' => 'None'));  
				  $result = $sock->fetch_parsed_body();	
				  		  
				  switch ($result)
				  {
					  case ($result['error'] == 1):
					  		 print "Something was wrong with delete the password for the directory.";
							 break;
					  case ($result['error'] == 0):
					  		 print "The pass was removed from the directory '$dir'.";
							 break;
					  default:
					  		 print "Protected services are not used.";
				  }

		}
 
Back
Top