/**
  * 
  * @see Zend_Controller_Action::init()
  */
 public function init()
 {
     $this->_setParam('allowedGameTypes', array());
     try {
         $user = new ZtChart_Model_User($this->_getParam('uname', ''));
         if ($user->isActive() && $user->getTokenring() == $this->_getParam('token')) {
             $this->_setParam('allowedGameTypes', array_intersect(explode(',', $this->_getParam('gametype')), $user->getRole()->getGameTypes(true)));
         }
     } catch (ZtChart_Model_User_Exception $e) {
     }
 }
 /**
  * 
  * @deprecated
  */
 public function gamedataAction()
 {
     $data = array();
     $user = new ZtChart_Model_User($this->_getParam('uname'));
     if ($user->isActive() && $user->getTokenring() == $this->_getParam('token')) {
         $allowedGameTypes = $user->getRole()->getGameTypes(true);
         if (in_array($this->_getParam('gametype'), $allowedGameTypes)) {
             $data = Zend_Json::decode(file_get_contents('http://192.168.102.203:6989/?getnumber&gametype=' . $this->_getParam('gametype') . '&zoneid=' . $this->_getParam('zoneid') . '&first=' . $this->_getParam('first')));
         }
     }
     $this->_helper->json($data);
 }