<?php

class UnlockPagesView extends Slot {

	var $ModuleID = 4;
	var $SectionID = 4;

	function __construct($pquery) {
		parent::__construct($pquery);
	}

	function init() {
		$this->TempFillEls['addBut'] = 'visible';
		if(!empty($this->Request)) {
			if($this->server_type!='pro') {
				switch($this->getRequestField('step')) {
					case 'subdomains':
						$this->Action->processEvent($this->SectionID,'unlock_objects',array('type' => 18),$this)
						and header('Location: '.$this->Home.'/Registar/UnlockPages'.$this->SID);
					break;
					case 'pages':
						$this->Action->processEvent($this->SectionID,'unlock_objects',array('type' => 6),$this)
						and header('Location: '.$this->Home.'/Registar/UnlockPages'.$this->SID);
					break;
					case 'layouts':
						$this->Action->processEvent($this->SectionID,'unlock_objects',array('type' => 8),$this)
						and header('Location: '.$this->Home.'/Registar/UnlockPages'.$this->SID);
					break;
					case 'templates':
						$this->Action->processEvent($this->SectionID,'unlock_objects',array('type' => 9),$this)
						and header('Location: '.$this->Home.'/Registar/UnlockPages'.$this->SID);
					break;
					case 'products':
						$this->Action->processEvent($this->SectionID,'unlock_objects',array('type' => 22),$this)
						and header('Location: '.$this->Home.'/Registar/UnlockPages'.$this->SID);
					break;

					case 'menus':
						$this->Action->processEvent($this->SectionID,'unlock_objects',array('type' => 10),$this)
						and header('Location: '.$this->Home.'/Registar/UnlockPages'.$this->SID);
					break;
					case 'presets':
						$this->Action->processEvent($this->SectionID,'unlock_objects',array('type' => 5),$this)
						and header('Location: '.$this->Home.'/Registar/UnlockPages'.$this->SID);
					break;
					case 'presetgroups':
						$this->Action->processEvent($this->SectionID,'unlock_objects',array('type' => 13),$this)
						and header('Location: '.$this->Home.'/Registar/UnlockPages'.$this->SID);
					break;
					case 'packages':
						$this->Action->processEvent($this->SectionID,'unlock_objects',array('type' => 14),$this)
						and header('Location: '.$this->Home.'/Registar/UnlockPages'.$this->SID);
					break;
					case 'enginepackets':
						$this->Action->processEvent($this->SectionID,'unlock_objects',array('type' => 17),$this)
						and header('Location: '.$this->Home.'/Registar/UnlockPages'.$this->SID);
					break;
					case 'importedfeeds':
						$this->Action->processEvent($this->SectionID,'unlock_objects',array('type' => 19),$this)
						and header('Location: '.$this->Home.'/Registar/UnlockPages'.$this->SID);
					break;
					case 'cities':
						$this->Action->processEvent($this->SectionID,'unlock_objects',array('type' => 20),$this)
						and header('Location: '.$this->Home.'/Registar/UnlockPages'.$this->SID);
					break;
					case 'feeds':
						$this->Action->processEvent($this->SectionID,'unlock_objects',array('type' => 21),$this)
						and header('Location: '.$this->Home.'/Registar/UnlockPages'.$this->SID);
					break;
				}
			}
		}
	}
}
?>