當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Vote::setServerId方法代碼示例

本文整理匯總了PHP中Vote::setServerId方法的典型用法代碼示例。如果您正苦於以下問題:PHP Vote::setServerId方法的具體用法?PHP Vote::setServerId怎麽用?PHP Vote::setServerId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Vote的用法示例。


在下文中一共展示了Vote::setServerId方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: elseif

        } elseif (isset($_GET['donate']) && $GLOBALS['CONFIG_SHOP_DONATE_ENABLED']) {
            $shop = new Shop('donate', $GLOBALS['CONFIG_SHOP_DONATE'], Donate::getDonatePoints($acc->account_username), $acc->account_username);
            $shop_page_vars = $shop->load();
            $template_vars['acc_page'] = Template::load('shop_page.html', $shop_page_vars, 0);
        } elseif (isset($_GET['forum']) && $GLOBALS['CONFIG_SHOP_FORUM_ENABLED']) {
            $shop = new Shop('forum', $GLOBALS['CONFIG_SHOP_FORUM'], 0, $acc->account_username);
            $shop_page_vars = $shop->load();
            $template_vars['acc_page'] = Template::load('shop_page.html', $shop_page_vars, 0);
        } else {
            $template_vars['acc_page'] = Template::load('shop.html', array(), 0);
        }
    } elseif (isset($_GET['vote']) && $GLOBALS['CONFIG_VOTE_ENABLED']) {
        @(require_once sep_path(CMS_DIR . '/libraries/vote.class.inc'));
        $vote = new Vote($acc->account_username);
        if ($vote->setBannerId($_GET['banner'])) {
            $vote->setServerId();
            $vote->setBannerName();
            $vote->setBannerLink();
            $vote->setBannerImage();
            $vote->setPointsPerVote();
            $vote->vote_points = Vote::getVotePoints($acc->account_username);
            $acc_page_vars['the_system'] = $vote->showBannerData();
        } else {
            $acc_page_vars['the_system'] = $vote->showBanners();
        }
        $template_vars['acc_page'] = Template::load('vote_system.html', $acc_page_vars, 0);
    } else {
        $template_vars['acc_page'] = Template::load('account_welcome.html', array('username' => $acc->account_username), 0);
    }
} elseif (isset($_GET['register'])) {
    $template_vars['val_user'] = isset($_POST['register_username']) ? $_POST['register_username'] : '';
開發者ID:Ziex0,項目名稱:L-CMS-old,代碼行數:31,代碼來源:account.php


注:本文中的Vote::setServerId方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。