<?php

require_once dirname(dirname(dirname(__FILE__))) . '/class/core/ActionBase.class.php';

class Xoonips_SystemMenuAction extends Xoonips_ActionBase {

	protected function doInit(&$request, &$response) {

		// breadcrumbs
		$breadcrumbs = array(
		array(
		    'name' => _AM_XOONIPS_TITLE,
		    'url' => XOOPS_URL.'/modules/'.$this->dirname.'/admin/index.php',
		),
		array(
		    'name' => _AM_XOONIPS_SYSTEM_TITLE,
		),
		);

		// menu
		$menu = array(
		array(
		    'label' => _AM_XOONIPS_SYSTEM_BASIC_TITLE,
		    'url' => XOOPS_URL.'/modules/'.$this->dirname.'/admin/system_basic.php',
		),
		array(
		    'label' => _AM_XOONIPS_SYSTEM_OAIPMH_TITLE,
		    'url' => XOOPS_URL.'/modules/'.$this->dirname.'/admin/system_oaipmh.php',
		),
		array(
		    'label' => _AM_XOONIPS_SYSTEM_PROXY_TITLE,
		    'url' => XOOPS_URL.'/modules/'.$this->dirname.'/admin/system_proxy.php',
		),
		array(
		    'label' => _AM_XOONIPS_SYSTEM_AMAZON_TITLE,
		    'url' => XOOPS_URL.'/modules/'.$this->dirname.'/admin/system_amazon.php',
		),
		array(
		    'label' => _AM_XOONIPS_SYSTEM_MODULE_TITLE,
		    'url' => XOOPS_URL.'/modules/'.$this->dirname.'/admin/system_notification.php',
		),
		array(
		    'label' => _AM_XOONIPS_SYSTEM_MSGSIGN_TITLE,
		    'url' => XOOPS_URL.'/modules/'.$this->dirname.'/admin/system_message_sign.php',
		),
		array(
		   'label' => _AM_XOONIPS_SYSTEM_VALUE_TITLE,		 
		  'url' => XOOPS_URL.'/modules/'.$this->dirname.'/admin/system_itemfield_select.php',
		),		
		);

		// get common viewdata
		$viewData = array();

		$viewData['menu'] = $menu;
		$viewData['breadcrumbs'] = $breadcrumbs;
		
		$response->setViewData($viewData);
		$response->setForward('init_success');
		return true;
	}
}

