Example #1
0
 public function updatethemeAction()
 {
     $this->_helper->layout->disableLayout();
     if ($this->getRequest()->isPost()) {
         $theme_name = $this->getRequest()->getParam('theme_name');
         $usersModel = new Default_Model_Users();
         $user_id = sapp_Global::_readSession('id');
         $where = array('id = ?' => $user_id);
         $data = array('themes' => $theme_name, 'createddate' => gmdate("Y-m-d H:i:s"), 'modifieddate' => gmdate("Y-m-d H:i:s"));
         $usersModel->addOrUpdateUserModel($data, $where);
         sapp_Global::_writeSession('themes', $theme_name);
         $this->_helper->json(array('result' => 'success'));
     }
 }