コード例 #1
0
 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 {
     }
 }
コード例 #2
0
    /**
     * 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 
    }