topical media & game development
[] readme course(s) preface I 1 2 II 3 4 III 5 6 7 IV 8 9 10 V 11 12 afterthought(s) appendix reference(s) example(s) resource(s) _

talk show tell print

portal-classes-core.actions.php



  <?PHP

  error_reporting(E_ALL);

  

  class Actions {

  

          var core;

  

          function Actions (&core) {

                  this->core = &core;

                  this->preExecFunctions(); // Deze moet echt eerst

                  this->checkGetActions();

                  this->checkGetAjaxActions();

          }

          

          function preExecFunctions () {

                  

                  if (isset(_GET['Page'])) {

                          page = _GET['Page'];

                  } else {

                          page = "";

                  }

                  

                  switch (page) {

                          case 'CatOverview':

                                  this->core->Content->setViewCategoryVars();

                                  break;

                          case 'ArticleView':

                                  this->core->Content->setArticleView();

                                  break;        

                          case 'VideoView':

                                  this->core->Content->setVideoView();

                                  break;        

                          case 'PictureView':

                                  this->core->Content->setPictureView();

                                  

                                  break;        

                          case 'AudioView':

                                  this->core->Content->setAudioView();

                                  this->core->User->showLoginType();

                                  this->core->User->userName();

                                  break;

                          case 'Logout':

                                  this->core->User->userLogout();

                                  this->core->User->showLoginType();

                                  this->core->User->userName();

                                  break;        

                          case 'Userconfirmation':

                                  this->core->User->userLogout();

                          //        this->core->User->showLoginType();

                          //        this->core->User->userName();

                                  this->core->User->userConfirmation();

                                  break;

                          case 'Start':

                          default:

                                  this->core->Content->setTopItems();

                                  //this->core->Rss->setFeedList();

                          //        this->core->User->showLoginType();

                          //        this->core->User->userName();

                                  break;

                  }

                  

                  this->core->User->showLoginType();

                  this->core->User->userName();

          }

          

          function checkGetActions () {

          

                  if (isset(_GET['Action'])) {

                          action = _GET['Action'];

                  } else {

                          action = "";

                  }

                  

                  switch(action) {

                          case '1':

                                  this->core->User->joinUser();

                                  break;

                          case '2':

                                  this->core->Rss->putRssInDb();

                                  break;

                          case 'userLogin':

                                  this->core->User->userLogin(); 

                                  break;

                          case 'userRegistration': 

                                  this->core->User->userRegistration();

                                  break;

                          case 'editUser': 

                                  this->core->User->editUser();

                                  break;        

                          case 'forgotPass':

                                  this->core->User->forgotPass();

                                  break;

                          case 'rateFeeling':        

                                  this->core->Rating->rateFeeling();

                                  break;

                          case 'rateQuality':

                                  this->core->Rating->rateQuality();

                                  break;

                          case 'QuickSearch':

                                  //this->core->Search->doQuickSearch();

                                  break;

                  }

          }

          

          function checkGetAjaxActions () {

                  if (isset(_GET['AjaxAction'])) {

                          ajaxAction = _GET['AjaxAction'];

                  } else {

                          ajaxAction = "";

                  }        

          

                  switch(ajaxAction) {

                          case 'DispFeedItem':

                                  this->core->Rss->ajaxGetFeedItem();

                                  break;

                  }

          }

  

  }

  ?>


(C) A. Eliëns 2/9/2007

You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.