public function showBodyContent()
 {
     $linkCookieManually = "index.php?web&action=" . ViewFavouritePageAction::getActionName() . "&PHPSESID=" . session_id();
     echo '<h3>Bookmarks List</h3>' . "\n";
     echo '<table class="playlistTable">' . "\n";
     echo '  <thead>' . "\n";
     echo '      <tr>' . "\n";
     echo '          <th></th>' . "\n";
     echo '          <th>Name</th>' . "\n";
     echo '          <th>Description</th>' . "\n";
     echo '          <th>Link</th>' . "\n";
     echo '          <th></th>' . "\n";
     echo '      </tr>' . "\n";
     echo '  </thead>' . "\n";
     echo '  <tbody>' . "\n";
     foreach ($this->favourites as $favourite) {
         $deleteLink = "index.php?web&action=" . ViewFavouritePageAction::getActionName() . "&subaction=" . ViewFavouritePageAction::SUBACTION_FAVOURITE_DELETE . "&id=" . $favourite->getId() . "&PHPSEDID=" . session_id();
         echo '          <tr>' . "\n";
         echo '              <td align="center" width="84px"><img src="' . $favourite->getImage() . '" alt="Image" title="Image" width="42px" height="56px" onmouseover="this.width=\'84\';this.height=\'112\'" onmouseout="this.width=\'42\';this.height=\'56\'" /></td>' . "\n";
         echo '              <td>' . $favourite->getName() . '</td>' . "\n";
         echo '              <td>' . $favourite->getDescription() . '</td>' . "\n";
         echo '              <td width="45px"><a target="_blank" href="../' . $favourite->getLink() . '">LINK</a></td>' . "\n";
         echo '              <td width="24px"><a href="' . $deleteLink . '"><img width="22px" height="22px" src="../resources/img/remove.png" style="border:0px;" alt="Remove Scraper" title="Remove Favourite" onclick="return confirm(\'WARNING!! Are you sure to delete favorite ' . $favourite->getName() . '?\');" /></a></td>' . "\n";
         echo '          </tr>' . "\n";
     }
     echo '      </tbody>' . "\n";
     echo '      <tfoot>' . "\n";
     echo '          <tr><th colspan="5" align="right">' . count($this->favourites) . ' elements found.</th></tr>' . "\n";
     echo '      </tfoot>' . "\n";
     echo '</table>' . "\n";
 }
 public function dispatchAction($action)
 {
     $this->action = $action;
     //----------------------------------------------------------------
     //------  VIEW RSS ACTIONS
     if ($action == ViewAboutPageAction::getActionName()) {
         $implAction = new ViewAboutPageAction();
         //
     } else {
         if ($action == ViewBookmarksPageAction::getActionName()) {
             $implAction = new ViewBookmarksPageAction();
             //
         } else {
             if ($action == ViewHomePageAction::getActionName()) {
                 $implAction = new ViewHomePageAction();
                 //
             } else {
                 if ($action == ViewPlaylistPageAction::getActionName()) {
                     $implAction = new ViewPlaylistPageAction();
                     //
                 } else {
                     if ($action == ViewSetupPageAction::getActionName()) {
                         $implAction = new ViewSetupPageAction();
                         //
                     } else {
                         if ($action == ViewWebsitesPageAction::getActionName()) {
                             $implAction = new ViewWebsitesPageAction();
                             //
                             //
                             //----- VIEW WEB ACTIONS --------------------------------------
                         } else {
                             if ($action == ViewWebHomePageAction::getActionName()) {
                                 $implAction = new ViewWebHomePageAction();
                                 //
                             } else {
                                 if ($action == ViewPlaylistWebPageAction::getActionName()) {
                                     $implAction = new ViewPlaylistWebPageAction();
                                     //
                                 } else {
                                     if ($action == ViewScraperMegavideoPageAction::getActionName()) {
                                         $implAction = new ViewScraperMegavideoPageAction();
                                         //
                                     } else {
                                         if ($action == SetupXvodPageAction::getActionName()) {
                                             $implAction = new SetupXvodPageAction();
                                             //
                                         } else {
                                             if ($action == ViewScraperPageAction::getActionName()) {
                                                 $implAction = new ViewScraperPageAction();
                                                 //
                                             } else {
                                                 if ($action == ViewCookiePageAction::getActionName()) {
                                                     $implAction = new ViewCookiePageAction();
                                                     //
                                                 } else {
                                                     if ($action == ViewFavouritePageAction::getActionName()) {
                                                         $implAction = new ViewFavouritePageAction();
                                                         //
                                                     } else {
                                                         if ($action == ViewInformationPageAction::getActionName()) {
                                                             $implAction = new ViewInformationPageAction();
                                                         }
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     //----------------------------------------------------------------
     //------  NON VIEW RSS ACTIONS
     if (!$implAction) {
         if ($action == SaveBookmarkAction::getActionName()) {
             $implAction = new SaveBookmarkAction();
             //
         } else {
             if ($action == DeleteBookmarkAction::getActionName()) {
                 $implAction = new DeleteBookmarkAction();
                 //
             } else {
                 if ($action == SaveFavouriteWebsiteAction::getActionName()) {
                     $implAction = new SaveFavouriteWebsiteAction();
                     //
                 }
             }
         }
     }
     //----------------------------------------------------------------
     //Execute action
     if ($implAction) {
         $implAction->dispatch();
     } else {
     }
 }
    /**
     * Show page left menu.
     */
    private function showBodyLeftMenu()
    {
        $explorePlaylist = "index.php?web&action=" . ViewPlaylistWebPageAction::getActionName() . "&PHPSEDID=" . session_id();
        $addPlaylist = "index.php?web&action=" . ViewPlaylistWebPageAction::getActionName() . "&subaction=" . ViewPlaylistWebPageAction::SUBACTION_PLAYLIST_ADD . "&PHPSEDID=" . session_id();
        $megavideoScraper = "index.php?web&action=" . ViewScraperMegavideoPageAction::getActionName() . "&PHPSEDID=" . session_id();
        $megavideoScraperAdd = "index.php?web&action=" . ViewScraperMegavideoPageAction::getActionName() . "&subaction=" . ViewScraperMegavideoPageAction::SUBACTION_VIEW_ADD_LINK . "&PHPSEDID=" . session_id();
        $scrapers = "index.php?web&action=" . ViewScraperPageAction::getActionName() . "&PHPSEDID=" . session_id();
        $cookieSetup = "index.php?web&action=" . ViewCookiePageAction::getActionName() . "&PHPSEDID=" . session_id();
        $information = "index.php?web&action=" . ViewInformationPageAction::getActionName() . "&PHPSEDID=" . session_id();
        $favourites = "index.php?web&action=" . ViewFavouritePageAction::getActionName() . "&PHPSEDID=" . session_id();
        ?>
        <p style="text-align:left; color: #FFFFFF; font-size: 18px; margin-bottom: 12px; text-indent: 18px;">xVoD Menu</p>
        <div id="square-box">
            <div id="square-box-head">Playlist</div>
            <ul class="menu">
                <li><a href="<?php 
        echo $explorePlaylist;
        ?>
">Explore System</a></li>
                <li><a href="<?php 
        echo $addPlaylist;
        ?>
">Add Playlist</a></li>
            </ul>
        </div>

        <div id="square-box">
            <div id="square-box-head">xVoD Setup</div>
            <ul class="menu">
                <li><a href="<?php 
        echo $information;
        ?>
">Information</a></li>
                <li><a href="<?php 
        echo $cookieSetup;
        ?>
">Cookie MU/MV</a></li>
                <li><a href="<?php 
        echo $favourites;
        ?>
">Favourites</a></li>
                <li><a href="<?php 
        echo $scrapers;
        ?>
">Scrapers</a></li>
            </ul>
        </div>

        <div id="square-box">
            <div id="square-box-head">Megavideo Scraper</div>
            <ul class="menu">
		<li><a href="<?php 
        echo $megavideoScraperAdd;
        ?>
">Add link</a></li>
                <li><a href="<?php 
        echo $megavideoScraper;
        ?>
">Link list</a></li>
            </ul>
        </div>
        <?php 
    }