public function StartThread($module_info)
      {   
      	// Reopen database connection in child process
      	$db = Core::GetDBInstance(null, true);
      	
      	// Attach mail notifications on registy events
	Registry::AttachClassObserver(new EmailToRegistrantObserver());
      	Registry::AttachClassObserver(new OperationHistory());
      	Registry::AttachClassObserver(new ManagedDNSRegistryObserver());
	
      	$RegFactory = RegistryModuleFactory::GetInstance();        	
      	$Registry = $RegFactory->GetRegistryByName($module_info["name"], false);
      	$Extensions = $Registry->GetManifest()->GetExtensionList();
      	
          foreach ($Extensions as $ext)
          {
          	try
          	{
          		$r = false;
          		$r = $RegFactory->GetRegistryByExtension($ext, true, true);
          	}
          	catch(Exception $e)
          	{
          		$r = false;
          	}
          	
          	if ($r && $r->GetModuleName() == $Registry->GetModuleName())
          	{
           	Log::Log(sprintf("Processing %s extension with module %s", $ext, $r->GetModuleName()), E_USER_NOTICE);
  	        	$r->DispatchPendingOperations();
          	}
          }
      }
Example #2
0
<?
	session_start();
	require_once (dirname(__FILE__)."/../../../src/prepend.inc.php");
	CONTEXTS::$APPCONTEXT = APPCONTEXT::REGISTRANT_CP;
		
	// Attach notifications on registy events
	Registry::AttachClassObserver(new EmailToRegistrantObserver());
    Registry::AttachClassObserver(new OperationHistory());
    Registry::AttachClassObserver(new ManagedDNSRegistryObserver());   
    
	Core::load("Data/JSON/JSON.php");
	Core::load("UI/Paging/Paging");
	Core::load("UI/Paging/SQLPaging");
	Core::load("XMLNavigation", dirname(__FILE__));
	
	Log::Log(sprintf("Client requested: %s", $_SERVER['REQUEST_URI']), E_USER_NOTICE);
	
	define("NOW", "client/".str_replace("..","", substr(basename($_SERVER['PHP_SELF']),0, -4)));
	
	// Auth
	try
	{
		$Client = Client::Load($_SESSION['userid']);
	}
	catch(Exception $e)
	{
		
	}
	
	
	$newhash = $Crypto->Hash("{$Client->Login}:{$Client->Password}:{$_SESSION['sault']}");
Example #3
0
					);
					
					$field->Value = $val;
				}
			}
			else 
				$Config = null;
		}
		else
			$Config = null;
			
		switch($observer['interface'])
		{
			case "IInvoiceObserver":
				Invoice::AttachObserver(new $observer['name']($Config), $observer["phace"]);
				break;
				
			case "IRegistryObserver":
				Registry::AttachClassObserver(new $observer['name']($Config), $observer["phace"]);
				break;
				
			case "IPaymentObserver":
				PaymentModuleFactory::AddModuleObserver(new $observer['name']($Config), $observer["phace"]);
				break;
				
			case "IGlobalObserver":
				Application::AttachObserver(new $observer['name']($Config), $observer["phace"]);				
				break;
		}
	}
?>