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


PHP mosHTML::monthSelectList方法代碼示例

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


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

示例1: BlogOutput

function BlogOutput(&$rows, &$params, $gid, &$access, $pop, &$menu, $archive = NULL)
{
    global $mainframe, $Itemid, $task, $id, $option, $database, $mosConfig_live_site;
    // parameters
    if ($params->get('page_title', 1)) {
        $header = $params->def('header', $menu->name);
    } else {
        $header = '';
    }
    $columns = $params->def('columns', 2);
    if ($columns == 0) {
        $columns = 1;
    }
    $intro = $params->def('intro', 4);
    $leading = $params->def('leading', 1);
    $links = $params->def('link', 4);
    $pagination = $params->def('pagination', 2);
    $pagination_results = $params->def('pagination_results', 1);
    $pagination_results = $params->def('pagination_results', 1);
    $descrip = $params->def('description', 1);
    $descrip_image = $params->def('description_image', 1);
    // needed for back button for page
    $back = $params->get('back_button', $mainframe->getCfg('back_button'));
    // needed to disable back button for item
    $params->set('back_button', 0);
    $params->def('pageclass_sfx', '');
    $params->set('intro_only', 1);
    $total = count($rows);
    // pagination support
    $limitstart = intval(mosGetParam($_REQUEST, 'limitstart', 0));
    $limit = $intro + $leading + $links;
    if ($total <= $limit) {
        $limitstart = 0;
    }
    $i = $limitstart;
    // needed to reduce queries used by getItemid
    $ItemidCount['bs'] = $mainframe->getBlogSectionCount();
    $ItemidCount['bc'] = $mainframe->getBlogCategoryCount();
    $ItemidCount['gbs'] = $mainframe->getGlobalBlogSectionCount();
    // used to display section/catagory description text and images
    // currently not supported in Archives
    if ($menu->componentid && ($descrip || $descrip_image)) {
        switch ($menu->type) {
            case 'content_blog_section':
                $description = new mosSection($database);
                $description->load($menu->componentid);
                break;
            case 'content_blog_category':
                $description = new mosCategory($database);
                $description->load($menu->componentid);
                break;
            case 'content_blog_category':
            case 'components':
            default:
                $menu->componentid = 0;
                break;
        }
    }
    // Page Output
    // page header
    if ($header) {
        echo '<div class="componentheading' . $params->get('pageclass_sfx') . '">' . $header . '</div>';
    }
    if ($archive) {
        echo '<br />';
        echo mosHTML::monthSelectList('month', 'size="1" class="inputbox"', $params->get('month'));
        echo mosHTML::integerSelectList(2000, 2010, 1, 'year', 'size="1" class="inputbox"', $params->get('year'), "%04d");
        echo '<input type="submit" class="button" />';
    }
    // checks to see if there are there any items to display
    if ($total) {
        $col_with = 100 / $columns;
        // width of each column
        $width = 'width="' . $col_with . '%"';
        if ($archive) {
            // Search Success message
            $msg = sprintf(_ARCHIVE_SEARCH_SUCCESS, $params->get('month'), $params->get('year'));
            echo "<br /><br /><div align='center'>" . $msg . "</div><br /><br />";
        }
        echo '<table class="' . $params->get('pageclass_sfx') . '" cellpadding="0" cellspacing="0">';
        // Secrion/Category Description & Image
        if ($menu->componentid && ($descrip || $descrip_image)) {
            $link = $mosConfig_live_site . '/images/stories/' . $description->image;
            echo '<tr>';
            echo '<td valign="top">';
            if ($descrip_image) {
                echo '<img src="' . $link . '" align="' . $description->image_position . '" hspace="6" alt="" />';
            }
            if ($descrip) {
                echo $description->description;
            }
            echo '<br/><br/>';
            echo '</td>';
            echo '</tr>';
        }
        // Leading story output
        if ($leading) {
            echo '<tr>';
            echo '<td valign="top">';
            for ($z = 0; $z < $leading; $z++) {
//.........這裏部分代碼省略.........
開發者ID:cwcw,項目名稱:cms,代碼行數:101,代碼來源:content.php


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