Вход Регистрация
Файл: upload/module/core/include/component/controller/admincp/country/child/index.class.php
Строк: 81
<?php
/**
 * [PHPFOX_HEADER]
 */

defined('PHPFOX') or exit('NO DICE!');

/**
 * 
 * 
 * @copyright        [PHPFOX_COPYRIGHT]
 * @author          Raymond Benc
 * @package         Phpfox_Component
 * @version         $Id: index.class.php 2846 2011-08-18 09:30:49Z Raymond_Benc $
 */
class Core_Component_Controller_Admincp_Country_Child_Index extends Phpfox_Component
{
    
/**
     * Class process method wnich is used to execute this component.
     */
    
public function process()
    {
        
$mCountry Phpfox::getService('core.country')->getCountry($this->request()->get('id'));
        
        if (
$mCountry === false)
        {
            return 
Phpfox_Error::display(Phpfox::getPhrase('admincp.not_a_valid_country'));
        }
        
        if ((
$iId $this->request()->getInt('delete')))
        {
            if (
Phpfox::getService('core.country.child.process')->delete($iId))
            {
                
$this->url()->send('admincp.core.country.child', array('id' => $this->request()->get('id')), Phpfox::getPhrase('admincp.state_province_successfully_deleted'));
            }
        }        
        
        if (
$this->request()->getInt('deleteall'))
        {
            if (
Phpfox::getService('core.country.child.process')->deleteAll($this->request()->get('id')))
            {
                
$this->url()->send('admincp.core.country'nullPhpfox::getPhrase('admincp.country_child_entries_successfully_deleted'));
            }
        }        
        
        
$this->template()->setTitle(Phpfox::getPhrase('admincp.country_manager'))
            ->
setBreadcrumb(Phpfox::getPhrase('admincp.country_manager'), $this->url()->makeUrl('admincp.core.country'))
            ->
setBreadcrumb(Phpfox::getPhrase('admincp.states_provinces') . ': ' $mCountrynulltrue)
            ->
setHeader('cache', array(
                    
'drag.js' => 'static_script',
                    
'<script type="text/javascript">Core_drag.init({table: '#js_drag_drop', ajax: 'core.countryChildOrdering'});</script>'        
                
)
            )            
            ->
assign(array(
                    
'aChildren' => Phpfox::getService('core.country')->getChildForEdit($this->request()->get('id')),
                    
'sParentId' => $this->request()->get('id')
                )
            );            
    }
    
    
/**
     * Garbage collector. Is executed after this class has completed
     * its job and the template has also been displayed.
     */
    
public function clean()
    {
        ((
$sPlugin Phpfox_Plugin::get('core.component_controller_admincp_country_child_clean')) ? eval($sPlugin) : false);
    }
}

?>
Онлайн: 0
Реклама