<?php
/***************************************************************************
 *                                                                          *
 * Copyright (c) 2005 ISPG Technologies (I) Pvt Ltd. All rights reserved.   *
 *                                                                          *
 * This  is  commercial  software,  only  users  who have purchased a valid *
 * license  and  accept  to the terms of the  License Agreement can install *
 * and use this program.                                                    *
 *                                                                          *
 ****************************************************************************
 * PLEASE READ THE FULL TEXT  OF THE SOFTWARE  LICENSE   AGREEMENT  IN  THE *
 * "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE.            *
 ****************************************************************************/
//
//$Id: AjaxController.php, v 1.0 2011/06/14 20:52:11
//
class AjaxController extends Controller {
    public function __construct() {
        $this->init();
    }
    ///AJAX ACTION FOR STATES
    /*public function ajaxStateAction() {
        $ObjState        = new StateModel();
        $languageIDs     = $this->ObjView->languageIDs;
        $countryID       = $_REQUEST['ajax_request'][0];
        $stateSelectedID = $_REQUEST['ajax_request'][1];
        $resListState    = $ObjState->listStates($languageIDs, $countryID, $status = "Active", $page = "");
        $this->ObjView->assign('resListState', $resListState);
        $this->ObjView->assign('stateSelectedID', $stateSelectedID);
        $this->ObjView->display('CountryState.tpl');
    } *///END OF FUNCTION
    ///AJAX ACTION FOR STATES
    public function ajaxCityAction() {
        $ObjCity        = new CityModel();
        $countryID       = $_REQUEST['ajax_request'][0];
        $citySelectedID = $_REQUEST['ajax_request'][1];
        $resListCity    = $ObjCity->listCitiesFrontend($countryID);
        $this->ObjView->assign('resListCity', $resListCity);
        $this->ObjView->assign('citySelectedID', $citySelectedID);
		if(!empty($resListCity))
        $this->ObjView->display('CountryState.tpl');
		
    } //END OF FUNCTION
}