本文整理汇总了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++) {
//.........这里部分代码省略.........