예제 #1
0
파일: search.php 프로젝트: jwest00724/mambo
function viewSearch()
{
    global $mainframe, $mosConfig_absolute_path, $mosConfig_lang, $my;
    global $Itemid, $database, $_MAMBOTS;
    $gid = $my->gid;
    // Adds parameter handling
    if ($Itemid > 0) {
        $menu =& new mosMenu($database);
        $menu->load($Itemid);
        $params =& new mosParameters($menu->params);
        $params->def('page_title', 1);
        $params->def('pageclass_sfx', '');
        $params->def('header', $menu->name, T_('Search'));
        $params->def('back_button', $mainframe->getCfg('back_button'));
    } else {
        $params =& new mosParameters('');
        $params->def('page_title', 1);
        $params->def('pageclass_sfx', '');
        $params->def('header', T_('Search'));
        $params->def('back_button', $mainframe->getCfg('back_button'));
    }
    // html output
    search_html::openhtml($params);
    $searchword = mosGetParam($_REQUEST, 'searchword', '');
    $searchword = $database->getEscaped(trim($searchword));
    $search_ignore = array();
    @(include "{$mosConfig_absolute_path}/language/{$mosConfig_lang}.ignore.php");
    $orders = array();
    $orders[] = mosHTML::makeOption('newest', T_('Newest first'));
    $orders[] = mosHTML::makeOption('oldest', T_('Oldest first'));
    $orders[] = mosHTML::makeOption('popular', T_('Most popular'));
    $orders[] = mosHTML::makeOption('alpha', T_('Alphabetical'));
    $orders[] = mosHTML::makeOption('category', T_('Section/Category'));
    $ordering = mosGetParam($_REQUEST, 'ordering', 'newest');
    if (!in_array($ordering, array('newest', 'oldest', 'popular', 'alpha', 'category'))) {
        $ordering = 'newest';
    }
    $lists = array();
    $lists['ordering'] = mosHTML::selectList($orders, 'ordering', 'class="inputbox"', 'value', 'text', $ordering);
    $searchphrase = mosGetParam($_REQUEST, 'searchphrase', 'any');
    if (!in_array($searchphrase, array('any', 'all', 'exact'))) {
        $searchphrase = 'any';
    }
    $searchphrases = array();
    $phrase = new stdClass();
    $phrase->value = 'any';
    $phrase->text = T_('Any words');
    $searchphrases[] = $phrase;
    $phrase = new stdClass();
    $phrase->value = 'all';
    $phrase->text = T_('All words');
    $searchphrases[] = $phrase;
    $phrase = new stdClass();
    $phrase->value = 'exact';
    $phrase->text = T_('Exact phrase');
    $searchphrases[] = $phrase;
    $lists['searchphrase'] = mosHTML::radioList($searchphrases, 'searchphrase', '', $searchphrase);
    // html output
    search_html::searchbox(htmlspecialchars($searchword), $lists, $params);
    if (!$searchword) {
        if (count($_POST)) {
            // html output
            // no matches found
            search_html::message(T_('No results were found'), $params);
        }
    } else {
        foreach ($search_ignore as $ignore_word) {
            $searchword = preg_replace("/(^|\\W){$ignore_word}(\$|\\W)/i", '$1$2', $searchword);
        }
        $searchword = trim($searchword);
        if (!$searchword) {
            search_html::message(T_('One or more common words were ignored in the search'), $params);
        }
    }
    if ($searchword) {
        // html output
        search_html::searchintro(htmlspecialchars($searchword), $params);
        mosLogSearch($searchword);
        $phrase = mosGetParam($_REQUEST, 'searchphrase', '');
        if (!in_array($phrase, array('any', 'all', 'exact'))) {
            $phrase = 'any';
        }
        $ordering = mosGetParam($_REQUEST, 'ordering', '');
        if (!in_array($ordering, array('newest', 'oldest', 'popular', 'alpha', 'category'))) {
            $ordering = 'newest';
        }
        $_MAMBOTS->loadBotGroup('search');
        $results = $_MAMBOTS->trigger('onSearch', array($searchword, $phrase, $ordering));
        $rows = array();
        foreach ($results as $result) {
            if ($result) {
                $rows = array_merge($rows, $result);
            }
        }
        $totalRows = count($rows);
        for ($i = 0; $i < $totalRows; $i++) {
            $row =& $rows[$i]->text;
            if ($phrase == 'exact') {
                $searchwords = array($searchword);
                $needle = $searchword;
            } else {
                $searchwords = explode(' ', $searchword);
                $needle = $searchwords[0];
            }
            $row = mosPrepareSearchContent($row, 200, $needle);
            foreach ($searchwords as $hlword) {
                $row = preg_replace('/' . preg_quote($hlword, '/') . '/i', "<span class=\"highlight\">\\0</span>", $row);
            }
            if (!eregi('^http', $rows[$i]->href)) {
                // determines Itemid for Content items
                if (strstr($rows[$i]->href, 'view')) {
                    // tests to see if itemid has already been included - this occurs for typed content items
                    if (!strstr($rows[$i]->href, 'Itemid')) {
                        $temp = explode('id=', $rows[$i]->href);
                        $rows[$i]->href = $rows[$i]->href . '&amp;Itemid=' . $mainframe->getItemid($temp[1]);
                    }
                }
            }
        }
        $mainframe->setPageTitle(T_('Search'));
        if ($totalRows) {
            // html output
            search_html::display($rows, $params);
        } else {
            // html output
            search_html::displaynoresult();
        }
        // html output
        search_html::conclusion($totalRows, htmlspecialchars($searchword));
    }
    // displays back button
    echo '<br />';
    mosHTML::BackButton($params, 0);
}
예제 #2
0
파일: poll.html.php 프로젝트: cwcw/cms
    function showResults(&$poll, &$votes, $first_vote, $last_vote, $pollist, $params)
    {
        global $mosConfig_live_site;
        ?>
		<script type = "text/javascript">
		<!--
		var link = document.createElement('link');
		link.setAttribute('href', 'components/com_poll/poll_bars.css');
		link.setAttribute('rel', 'stylesheet');
		link.setAttribute('type', 'text/css');
		var head = document.getElementsByTagName('head').item(0);
		head.appendChild(link);
		//-->
		</script>
		<form action="index.php" method="post" name="poll" id="poll"> 
		<?php 
        if ($params->get('page_title')) {
            ?>
			<div class="componentheading<?php 
            echo $params->get('pageclass_sfx');
            ?>
">
				<?php 
            echo _POLL_TITLE;
            ?>
			</div> 
			<?php 
        }
        ?>
		<table width="100%" class="contentpane<?php 
        echo $params->get('pageclass_sfx');
        ?>
"> 
		<tr> 
			<td align="center"> 
				<table class="contentpane<?php 
        echo $params->get('pageclass_sfx');
        ?>
"> 
				<tr> 
					<td align="left">
					<?php 
        echo _SEL_POLL;
        ?>
&nbsp;
					</td> 
					<td align="left">
					<?php 
        echo $pollist;
        ?>
					</td> 
				</tr> 
				</table> 

				<table cellpadding="0" cellspacing="0" border="0" class="contentpane<?php 
        echo $params->get('pageclass_sfx');
        ?>
"> 
				<?php 
        if ($votes) {
            $j = 0;
            $data_arr["text"] = null;
            $data_arr["hits"] = null;
            foreach ($votes as $vote) {
                $data_arr["text"][$j] = trim($vote->text);
                $data_arr["hits"][$j] = $vote->hits;
                $j++;
            }
            ?>
					<tr> 
						<td> 
						<?php 
            poll_html::graphit($data_arr, $poll->title, $first_vote, $last_vote);
            ?>
						</td> 
					</tr> 
					<?php 
        } else {
            ?>
					<tr> 
						<td valign="bottom">
						<?php 
            echo _NO_RESULTS;
            ?>
						</td> 
					</tr> 
					<?php 
        }
        ?>
 
				</table> 
			</td>	
		</tr> 
		</table> 
		<?php 
        // displays back button
        mosHTML::BackButton($params);
        ?>
		</form> 
		<?php 
    }
예제 #3
0
    function displayWrap(&$row, &$params, &$menu)
    {
        ?>
		<script language="javascript" type="text/javascript">
		function iFrameHeight() {
			var h = 0;
			if ( !document.all ) {
				h = document.getElementById('blockrandom').contentDocument.height;
				document.getElementById('blockrandom').style.height = h + 60 + 'px';
			} else if( document.all ) {
				h = document.frames('blockrandom').document.body.scrollHeight;
				document.all.blockrandom.style.height = h + 20 + 'px';
			}
		}
		</script>
		<div class="contentpane<?php 
        echo $params->get('pageclass_sfx');
        ?>
">

		<?php 
        if ($params->get('page_title')) {
            ?>
			<div class="componentheading<?php 
            echo $params->get('pageclass_sfx');
            ?>
">
			<?php 
            echo $params->get('header');
            ?>
			</div>
			<?php 
        }
        ?>
		<iframe
		<?php 
        echo $row->load;
        ?>
		id="blockrandom"
		name="iframe"
		src="<?php 
        echo $row->url;
        ?>
"
		width="<?php 
        echo $params->get('width');
        ?>
"
		height="<?php 
        echo $params->get('height');
        ?>
"
		scrolling="<?php 
        echo $params->get('scrolling');
        ?>
"
		align="top"
		frameborder="0"
		class="wrapper<?php 
        echo $params->get('pageclass_sfx');
        ?>
">
		<?php 
        echo _CMN_IFRAMES;
        ?>
		</iframe>

		</div>
		<?php 
        // displays back button
        mosHTML::BackButton($params);
    }
예제 #4
0
    public static function showNewsfeeds(&$newsfeed, $LitePath, $cacheDir, &$params)
    {
        ?>
		<table width="100%" class="contentpane<?php 
        echo $params->get('pageclass_sfx');
        ?>
">
		<?php 
        if ($params->get('header')) {
            ?>
			<tr>
				<td class="componentheading<?php 
            echo $params->get('pageclass_sfx');
            ?>
" colspan="2">
				<?php 
            echo $params->get('header');
            ?>
				</td>
			</tr>
			<?php 
        }
        // full RSS parser used to access image information
        $rssDoc = new xml_domit_rss_document();
        $rssDoc->setRSSTimeout(5);
        $rssDoc->useCacheLite(true, $LitePath, $cacheDir, $newsfeed->cache_time);
        $success = $rssDoc->loadRSS($newsfeed->link);
        if ($success) {
            $totalChannels = $rssDoc->getChannelCount();
            for ($i = 0; $i < $totalChannels; $i++) {
                $currChannel =& $rssDoc->getChannel($i);
                $elements = $currChannel->getElementList();
                $descrip = 0;
                $iUrl = 0;
                foreach ($elements as $element) {
                    //image handling
                    if ($element == 'image') {
                        $image =& $currChannel->getElement(DOMIT_RSS_ELEMENT_IMAGE);
                        $iUrl = $image->getUrl();
                        $iTitle = $image->getTitle();
                    }
                    if ($element == 'description') {
                        $descrip = 1;
                        // hide com_rss descrip in 4.5.0 feeds
                        if ($currChannel->getDescription() == 'com_rss') {
                            $descrip = 0;
                        }
                    }
                }
                $feed_title = $currChannel->getTitle();
                $feed_title = mosCommonHTML::newsfeedEncoding($rssDoc, $feed_title);
                ?>
				<tr>
					<td class="contentheading<?php 
                echo $params->get('pageclass_sfx');
                ?>
">
						<a href="<?php 
                echo ampReplace($currChannel->getLink());
                ?>
" target="_blank">
							<?php 
                echo $feed_title;
                ?>
</a>
					</td>
				</tr>
				<?php 
                // feed description
                if ($descrip && $params->get('feed_descr')) {
                    $feed_descrip = $currChannel->getDescription();
                    $feed_descrip = mosCommonHTML::newsfeedEncoding($rssDoc, $feed_descrip);
                    ?>
					<tr>
						<td>
						<?php 
                    echo $feed_descrip;
                    ?>
						<br />
						<br />
						</td>
					</tr>
					<?php 
                }
                // feed image
                if ($iUrl && $params->get('feed_image')) {
                    ?>
					<tr>
						<td>
						<img src="<?php 
                    echo $iUrl;
                    ?>
" alt="<?php 
                    echo $iTitle;
                    ?>
" />
						</td>
					</tr>
					<?php 
                }
                $actualItems = $currChannel->getItemCount();
                $setItems = $newsfeed->numarticles;
                if ($setItems > $actualItems) {
                    $totalItems = $actualItems;
                } else {
                    $totalItems = $setItems;
                }
                ?>
				<tr>
					<td>
					<ul>
						<?php 
                for ($j = 0; $j < $totalItems; $j++) {
                    $currItem =& $currChannel->getItem($j);
                    $item_title = $currItem->getTitle();
                    $item_title = mosCommonHTML::newsfeedEncoding($rssDoc, $item_title);
                    ?>
							<li>
								<?php 
                    // START fix for RSS enclosure tag url not showing
                    if ($currItem->getLink()) {
                        ?>
									<a href="<?php 
                        echo ampReplace($currItem->getLink());
                        ?>
" target="_blank">
										<?php 
                        echo $item_title;
                        ?>
</a>
									<?php 
                    } else {
                        if ($currItem->getEnclosure()) {
                            $enclosure = $currItem->getEnclosure();
                            $eUrl = $enclosure->getUrl();
                            ?>
									<a href="<?php 
                            echo ampReplace($eUrl);
                            ?>
" target="_blank">
										<?php 
                            echo $item_title;
                            ?>
</a>
									<?php 
                        } else {
                            if ($currItem->getEnclosure() && $currItem->getLink()) {
                                $enclosure = $currItem->getEnclosure();
                                $eUrl = $enclosure->getUrl();
                                ?>
									<a href="<?php 
                                echo ampReplace($currItem->getLink());
                                ?>
" target="_blank">
										<?php 
                                echo $item_title;
                                ?>
</a>
									<br />
									Link:
									<a href="<?php 
                                echo $eUrl;
                                ?>
" target="_blank">
										<?php 
                                echo ampReplace($eUrl);
                                ?>
</a>
									<?php 
                            }
                        }
                    }
                    // END fix for RSS enclosure tag url not showing
                    // item description
                    if ($params->get('item_descr')) {
                        $text = $currItem->getDescription();
                        $text = mosCommonHTML::newsfeedEncoding($rssDoc, $text);
                        $num = $params->get('word_count');
                        // word limit check
                        if ($num) {
                            $texts = explode(' ', $text);
                            $count = count($texts);
                            if ($count > $num) {
                                $text = '';
                                for ($i = 0; $i < $num; $i++) {
                                    $text .= ' ' . $texts[$i];
                                }
                                $text .= '...';
                            }
                        }
                        ?>
									<br />
									<?php 
                        echo $text;
                        ?>
									<br />
									<br />
									<?php 
                    }
                    ?>
							</li>
							<?php 
                }
                ?>
					</ul>
					</td>
				</tr>
				<tr>
					<td>
					<br />
					</td>
				</tr>
				<?php 
            }
        }
        ?>
		</table>
		<?php 
        // displays back button
        mosHTML::BackButton($params);
    }
예제 #5
0
파일: content.php 프로젝트: cwcw/cms
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++) {
                if ($i >= $total) {
                    // stops loop if total number of items is less than the number set to display as leading
                    break;
                }
                echo '<div>';
                show($rows[$i], $params, $gid, $access, $pop, $option, $ItemidCount);
                echo '</div>';
                $i++;
            }
            echo '</td>';
            echo '</tr>';
        }
        if ($intro && $i < $total) {
            echo '<tr>';
            echo '<td valign="top">';
            echo '<table width="100%"  cellpadding="0" cellspacing="0">';
            // intro story output
            for ($z = 0; $z < $intro; $z++) {
                if ($i >= $total) {
                    // stops loop if total number of items is less than the number set to display as intro + leading
                    break;
                }
                if (!($z % $columns) || $columns == 1) {
                    echo '<tr>';
                }
                echo '<td valign="top" ' . $width . '>';
                // outputs either intro or only a link
                if ($z < $intro) {
                    show($rows[$i], $params, $gid, $access, $pop, $option, $ItemidCount);
                } else {
                    echo '</td>';
                    echo '</tr>';
                    break;
                }
                echo '</td>';
                if (!(($z + 1) % $columns) || $columns == 1) {
                    echo '</tr>';
                }
                $i++;
            }
            // this is required to output a final closing </tr> tag when the number of items does not fully
            // fill the last row of output - a blank column is left
            if ($intro % $columns) {
                echo '</tr>';
            }
            echo '</table>';
            echo '</td>';
            echo '</tr>';
        }
        // Links output
        if ($links && $i < $total) {
            echo '<tr>';
            echo '<td valign="top">';
            echo '<div class="blog_more' . $params->get('pageclass_sfx') . '">';
            HTML_content::showLinks($rows, $links, $total, $i, 1, $ItemidCount);
            echo '</div>';
            echo '</td>';
            echo '</tr>';
        }
        // Pagination output
        if ($pagination) {
            if ($pagination == 2 && $total <= $limit) {
                // not visible when they is no 'other' pages to display
            } else {
                // get the total number of records
                $limitstart = $limitstart ? $limitstart : 0;
                require_once $GLOBALS['mosConfig_absolute_path'] . '/includes/pageNavigation.php';
                $pageNav = new mosPageNav($total, $limitstart, $limit);
                if ($option == 'com_frontpage') {
                    $link = 'index.php?option=com_frontpage&amp;Itemid=' . $Itemid;
                } else {
                    if ($archive) {
                        $year = $params->get('year');
                        $month = $params->get('month');
                        $link = 'index.php?option=com_content&amp;task=' . $task . '&amp;id=' . $id . '&amp;Itemid=' . $Itemid . '&amp;year=' . $year . '&amp;month=' . $month;
                    } else {
                        $link = 'index.php?option=com_content&amp;task=' . $task . '&amp;id=' . $id . '&amp;Itemid=' . $Itemid;
                    }
                }
                echo '<tr>';
                echo '<td valign="top" align="center">';
                echo $pageNav->writePagesLinks($link);
                echo '<br /><br />';
                echo '</td>';
                echo '</tr>';
                if ($pagination_results) {
                    echo '<tr>';
                    echo '<td valign="top" align="center">';
                    echo $pageNav->writePagesCounter();
                    echo '</td>';
                    echo '</tr>';
                }
            }
        }
        echo '</table>';
    } else {
        if ($archive && !$total) {
            // Search Failure message for Archives
            $msg = sprintf(_ARCHIVE_SEARCH_FAILURE, $params->get('month'), $params->get('year'));
            echo '<br /><br /><div align="center">' . $msg . '</div><br />';
        } else {
            // Generic blog empty display
            echo _EMPTY_BLOG;
        }
    }
    // Back Button
    $params->set('back_button', $back);
    mosHTML::BackButton($params);
}
예제 #6
0
    ?>
        <div class="componentheading<?php 
    echo $params->get('pageclass_sfx');
    ?>
">
        <?php 
    echo _BOOKLIBRARY_LABEL_FETCHED_SUBCATEGORIES . " : " . $params->get('category_name');
    ?>
        </div>
        <?php 
    positions_bl($params->get('singlecategory08'));
    ?>
        <?php 
    HTML_booklibrary::listCategories($params, $categories, $catid, $tabclass, $currentcat);
    echo '<table  class="basictable bl_bl_single_category_intresting_back_button" width="100%"><tr><td width="60%"></td><td>';
    mosHTML::BackButton($params, $hide_js);
    echo '</td></tr></table>';
}
positions_bl($params->get('singlecategory09'));
?>

    <!-- Add item Begin -->
<?php 
//print_r($params->get('show_addbook'));exit;
// Add item end -->
$option = JRequest::getVar('option', 'com_booklibrary');
if ($params->get('show_input_add_suggest') && $option == 'com_booklibrary') {
    HTML_booklibrary::showSuggestion($params, 2, $catid, $Itemid);
}
positions_bl($params->get('singlecategory11'));
?>
예제 #7
0
파일: content.html.php 프로젝트: cwcw/cms
    /**
     * Show a content item
     * @param object An object with the record data
     * @param boolean If <code>false</code>, the print button links to a popup window.  If <code>true</code> then the print button invokes the browser print method.
     */
    function show($row, $params, $access, $page = 0, $option, $ItemidCount = NULL)
    {
        global $mainframe, $my, $hide_js, $database, $acl;
        global $mosConfig_absolute_path, $mosConfig_sitename, $Itemid, $mosConfig_live_site, $task;
        global $_MAMBOTS;
        //print_r( $params );
        $mainframe->appendMetaTag('description', $row->metadesc);
        $mainframe->appendMetaTag('keywords', $row->metakey);
        $gid = $my->gid;
        $template = $mainframe->getTemplate();
        $_Itemid = $Itemid;
        $link_on = '';
        $link_text = '';
        // process the new bots
        $_MAMBOTS->loadBotGroup('content');
        $results = $_MAMBOTS->trigger('onPrepareContent', array(&$row, &$params, $page), true);
        // determines the link and link text of the readmore button
        if ($params->get('intro_only')) {
            // checks if the item is a public or registered/special item
            if ($row->access <= $gid) {
                if ($task != "view") {
                    $_Itemid = $mainframe->getItemid($row->id, 0, 0, $ItemidCount['bs'], $ItemidCount['bc'], $ItemidCount['gbs']);
                }
                $link_on = sefRelToAbs("index.php?option=com_content&amp;task=view&amp;id=" . $row->id . "&amp;Itemid=" . $_Itemid);
                if (strlen(trim($row->fulltext))) {
                    $link_text = _READ_MORE;
                }
            } else {
                $link_on = sefRelToAbs("index.php?option=com_registration&amp;task=register");
                if (strlen(trim($row->fulltext))) {
                    $link_text = _READ_MORE_REGISTER;
                }
            }
        }
        $no_html = mosGetParam($_REQUEST, 'no_html', null);
        if ($params->get('popup') && $no_html == 0) {
            ?>
			<title><?php 
            echo $mosConfig_sitename . ' :: ' . $row->title;
            ?>
</title>
			<?php 
        }
        if ($params->get('item_navigation')) {
            if ($row->prev) {
                $row->prev = sefRelToAbs('index.php?option=com_content&amp;task=view&amp;id=' . $row->prev . '&amp;Itemid=' . $_Itemid);
            } else {
                $row->prev = 0;
            }
            if ($row->next) {
                $row->next = sefRelToAbs('index.php?option=com_content&amp;task=view&amp;id=' . $row->next . '&amp;Itemid=' . $_Itemid);
            } else {
                $row->next = 0;
            }
        }
        if ($params->get('item_title') || $params->get('pdf') || $params->get('print') || $params->get('email')) {
            $print_link = $mosConfig_live_site . '/index2.php?option=com_content&amp;task=view&amp;id=' . $row->id . '&amp;Itemid=' . $Itemid . '&amp;pop=1&amp;page=' . @$page;
            ?>
			<table class="contentpaneopen<?php 
            echo $params->get('pageclass_sfx');
            ?>
">
			<tr>
				<?php 
            // displays Item Title
            HTML_content::Title($row, $params, $link_on, $access);
            // displays PDF Icon
            HTML_content::PdfIcon($row, $params, $link_on, $hide_js);
            // displays Print Icon
            mosHTML::PrintIcon($row, $params, $hide_js, $print_link);
            // displays Email Icon
            HTML_content::EmailIcon($row, $params, $hide_js);
            ?>
			</tr>
			</table>
			<?php 
        }
        if (!$params->get('intro_only')) {
            $results = $_MAMBOTS->trigger('onAfterDisplayTitle', array(&$row, &$params, $page));
            echo trim(implode("\n", $results));
        }
        $results = $_MAMBOTS->trigger('onBeforeDisplayContent', array(&$row, &$params, $page));
        echo trim(implode("\n", $results));
        ?>

		<table class="contentpaneopen<?php 
        echo $params->get('pageclass_sfx');
        ?>
">
		<?php 
        // displays Section & Category
        HTML_content::Section_Category($row, $params);
        // displays Author Name
        HTML_content::Author($row, $params);
        // displays Created Date
        HTML_content::CreateDate($row, $params);
        // displays Urls
        HTML_content::URL($row, $params);
        ?>
		<tr>
			<td valign="top" colspan="2">
			<?php 
        // displays Table of Contents
        HTML_content::TOC($row, $params);
        // displays Item Text
        echo $row->text;
        ?>
			</td>
		</tr>
		<?php 
        // displays Modified Date
        HTML_content::ModifiedDate($row, $params);
        // displays Readmore button
        HTML_content::ReadMore($params, $link_on, $link_text);
        ?>
		</table>
		<?php 
        $results = $_MAMBOTS->trigger('onAfterDisplayContent', array(&$row, &$params, $page));
        echo trim(implode("\n", $results));
        // displays the next & previous buttons
        HTML_content::Navigation($row, $params);
        // displays close button in pop-up window
        mosHTML::CloseButton($params, $hide_js);
        // displays back button in pop-up window
        mosHTML::BackButton($params, $hide_js);
    }
예제 #8
0
파일: newsfeeds.html.php 프로젝트: cwcw/cms
    function showNewsfeeds(&$newsfeeds, $LitePath, $cacheDir, &$params)
    {
        global $mosConfig_live_site, $mosConfig_absolute_path;
        ?>
		<table width="100%" cellpadding="4" cellspacing="0" border="0" align="center" class="contentpane<?php 
        echo $params->get('pageclass_sfx');
        ?>
">	
		<?php 
        if ($params->get('header')) {
            ?>
			<tr>
				<td class="componentheading<?php 
            echo $params->get('pageclass_sfx');
            ?>
" colspan="2">
				<?php 
            echo $params->get('header');
            ?>
				</td>
			</tr>
			<?php 
        }
        foreach ($newsfeeds as $newsfeed) {
            $rssDoc =& new xml_domit_rss_document_lite();
            $rssDoc->useCacheLite(true, $LitePath, $cacheDir, $newsfeed->cache_time);
            $rssDoc->loadRSS($newsfeed->link);
            $totalChannels = $rssDoc->getChannelCount();
            for ($i = 0; $i < $totalChannels; $i++) {
                $currChannel =& $rssDoc->getChannel($i);
                ?>
				<tr>
					<td class="contentheading<?php 
                echo $params->get('pageclass_sfx');
                ?>
">
					<a href="<?php 
                echo $currChannel->getLink();
                ?>
" target="_child">
					<?php 
                echo $currChannel->getTitle();
                ?>
					</a>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
                echo $currChannel->getDescription();
                ?>
					<br /><br />
					</td>
				</tr>
				<?php 
                $actualItems = $currChannel->getItemCount();
                $setItems = $newsfeed->numarticles;
                if ($setItems > $actualItems) {
                    $totalItems = $actualItems;
                } else {
                    $totalItems = $setItems;
                }
                for ($j = 0; $j < $totalItems; $j++) {
                    $currItem =& $currChannel->getItem($j);
                    ?>
					<tr>
						<td>
						<ul>
						<li>
						<a href="<?php 
                    echo $currItem->getLink();
                    ?>
" target="_child">
						<?php 
                    echo $currItem->getTitle();
                    ?>
			
						</a> 
						<br />
						<?php 
                    echo $currItem->getDescription();
                    ?>
						
						</li>
						</ul>
						<br />
						</td>
					</tr>
					<?php 
                }
                ?>
				<tr>
					<td>
					<br />
					</td>
				</tr>
				<?php 
            }
        }
        ?>
		</table>
		<?php 
        // displays back button
        mosHTML::BackButton($params);
    }
예제 #9
0
    function showNewsfeeds(&$newsfeeds, &$params)
    {
        global $mosConfig_live_site, $mosConfig_absolute_path;
        ?>
		<table width="100%" class="contentpane<?php 
        echo $params->get('pageclass_sfx');
        ?>
">	
		<?php 
        if ($params->get('header')) {
            ?>
			<tr>
				<td class="componentheading<?php 
            echo $params->get('pageclass_sfx');
            ?>
" colspan="2">
				<?php 
            echo $params->get('header');
            ?>
				</td>
			</tr>
			<?php 
        }
        foreach ($newsfeeds as $newsfeed) {
            if (!defined('MAGPIE_CACHE_DIR')) {
                define('MAGPIE_CACHE_DIR', mamboCore::get('mosConfig_absolute_path') . '/includes/magpie_cache');
            }
            require_once mamboCore::get('mosConfig_absolute_path') . '/includes/magpierss/rss_fetch.php';
            $rss = fetch_rss($newsfeed->link);
            if (!is_object($rss)) {
                echo '<tr><td><span>RSS feed failed</span></td></tr>';
                break;
            }
            if (isset($rss->image['title'])) {
                $iTitle = $rss->image['title'];
            }
            if (isset($rss->image['url'])) {
                $iUrl = $rss->image['url'];
            }
            ?>
				<tr>
					<td class="contentheading<?php 
            echo $params->get('pageclass_sfx');
            ?>
">
					<a href="<?php 
            echo $rss->channel['link'];
            ?>
" target="_child">
					<?php 
            echo $rss->channel['title'];
            ?>
					</a>
					</td>
				</tr>
				<?php 
            // feed description
            if ($params->get('feed_descr')) {
                ?>
					<tr>
						<td>
						<?php 
                if (isset($rss->channel['description'])) {
                    echo $rss->channel['description'];
                }
                ?>
						<br /><br />
						</td>
					</tr>
					<?php 
            }
            // feed image
            if (isset($iUrl) && $params->get('feed_image')) {
                ?>
					<tr>
						<td>
						<img src="<?php 
                echo $iUrl;
                ?>
" alt="<?php 
                echo $iTitle;
                ?>
" />
						</td>
					</tr>
					<?php 
            }
            ?>
				<tr>
					<td>
					<ul>
					<?php 
            $itemnumber = 1;
            foreach ($rss->items as $item) {
                if ($itemnumber > $newsfeed->numarticles) {
                    break;
                }
                $itemnumber++;
                ?>
							<li>
							<a href="<?php 
                echo $item['link'];
                ?>
" target="_child">
							<?php 
                echo $item['title'];
                ?>
							</a> 
							<?php 
                // item description
                if ($params->get('item_descr')) {
                    $text = html_entity_decode($item['description']);
                    $num = $params->get('word_count');
                    // word limit check
                    if ($num) {
                        $texts = explode(' ', $text);
                        $count = count($texts);
                        if ($count > $num) {
                            $text = '';
                            for ($i = 0; $i < $num; $i++) {
                                $text .= ' ' . $texts[$i];
                            }
                            $text .= '...';
                        }
                    }
                    ?>
								<br />
								<?php 
                    echo $text;
                    ?>
						
								<br /><br />
								<?php 
                }
                ?>
							</li>
						<?php 
            }
            ?>
					</ul>
					</td>
				</tr>
				<tr>
					<td>
					<br />
					</td>
				</tr>
				<?php 
        }
        ?>
		</table>
		<?php 
        // displays back button
        mosHTML::BackButton($params);
    }
예제 #10
0
function viewSearch()
{
    global $mainframe, $mosConfig_absolute_path, $mosConfig_lang, $my;
    global $Itemid, $database, $_MAMBOTS;
    global $mosConfig_list_limit;
    $restriction = 0;
    // try to find search component's Itemid
    // Only search if we don't have a valid Itemid (e.g. from module)
    if (!intval($Itemid) || intval($Itemid) == 99999999) {
        $query = "SELECT id" . "\n FROM #__menu" . "\n WHERE type = 'components'" . "\n AND published = 1" . "\n AND link = 'index.php?option=com_search'";
        $database->setQuery($query);
        $_Itemid = $database->loadResult();
        if ($_Itemid != "") {
            $Itemid = $_Itemid;
        }
    }
    $gid = $my->gid;
    // Adds parameter handling
    if ($Itemid > 0 && $Itemid != 99999999) {
        $menu = $mainframe->get('menu');
        $params = new mosParameters($menu->params);
        $params->def('page_title', 1);
        $params->def('pageclass_sfx', '');
        $params->def('header', $menu->name);
        $params->def('back_button', $mainframe->getCfg('back_button'));
    } else {
        $params = new mosParameters('');
        $params->def('page_title', 1);
        $params->def('pageclass_sfx', '');
        $params->def('header', _SEARCH_TITLE);
        $params->def('back_button', $mainframe->getCfg('back_button'));
    }
    // html output
    search_html::openhtml($params);
    $searchphrase = mosGetParam($_REQUEST, 'searchphrase', 'any');
    $searchphrase = preg_replace('/[^a-z]/', '', strtolower($searchphrase));
    $searchword = strval(mosGetParam($_REQUEST, 'searchword', ''));
    $searchword = trim(stripslashes($searchword));
    // limit searchword to 20 characters
    if (strlen($searchword) > 20) {
        $searchword = substr($searchword, 0, 19);
        $restriction = 1;
    }
    // searchword must contain a minimum of 3 characters
    if ($searchword && strlen($searchword) < 3) {
        $searchword = '';
        $restriction = 1;
    }
    if ($searchphrase != 'exact') {
        $aterms = explode(' ', strtolower($searchword));
        $search_ignore = array();
        // filter out search terms that are too small
        foreach ($aterms as $aterm) {
            if (strlen($aterm) < 3) {
                $search_ignore[] = $aterm;
            }
        }
        $pruned = array_diff($aterms, $search_ignore);
        $pruned = array_unique($pruned);
        $searchword = implode(' ', $pruned);
        if (trim($searchword) == '') {
            $restriction = 1;
        }
    }
    @(include "{$mosConfig_absolute_path}/language/{$mosConfig_lang}.ignore.php");
    $orders = array();
    $orders[] = mosHTML::makeOption('newest', _SEARCH_NEWEST);
    $orders[] = mosHTML::makeOption('oldest', _SEARCH_OLDEST);
    $orders[] = mosHTML::makeOption('popular', _SEARCH_POPULAR);
    $orders[] = mosHTML::makeOption('alpha', _SEARCH_ALPHABETICAL);
    $orders[] = mosHTML::makeOption('category', _SEARCH_CATEGORY);
    $ordering = mosGetParam($_REQUEST, 'ordering', 'newest');
    $ordering = preg_replace('/[^a-z]/', '', strtolower($ordering));
    $lists = array();
    $lists['ordering'] = mosHTML::selectList($orders, 'ordering', 'id="search_ordering" class="inputbox"', 'value', 'text', $ordering);
    $searchphrases = array();
    $phrase = new stdClass();
    $phrase->value = 'any';
    $phrase->text = _SEARCH_ANYWORDS;
    $searchphrases[] = $phrase;
    $phrase = new stdClass();
    $phrase->value = 'all';
    $phrase->text = _SEARCH_ALLWORDS;
    $searchphrases[] = $phrase;
    $phrase = new stdClass();
    $phrase->value = 'exact';
    $phrase->text = _SEARCH_PHRASE;
    $searchphrases[] = $phrase;
    $lists['searchphrase'] = mosHTML::radioList($searchphrases, 'searchphrase', '', $searchphrase);
    // html output
    search_html::searchbox(htmlspecialchars($searchword), $lists, $params);
    if (!$searchword) {
        if (count($_POST)) {
            // html output
            // no matches found
            search_html::message(_NOKEYWORD, $params);
        } else {
            if ($restriction) {
                // html output
                search_html::message(_SEARCH_MESSAGE, $params);
            }
        }
    } else {
        if (in_array($searchword, $search_ignore)) {
            // html output
            search_html::message(_IGNOREKEYWORD, $params);
        } else {
            // html output
            if ($restriction) {
                // html output
                search_html::message(_SEARCH_MESSAGE, $params);
            }
            $searchword_clean = htmlspecialchars($searchword);
            search_html::searchintro($searchword_clean, $params);
            mosLogSearch($searchword);
            $_MAMBOTS->loadBotGroup('search');
            $results = $_MAMBOTS->trigger('onSearch', array($database->getEscaped($searchword, true), $searchphrase, $ordering));
            $totalRows = 0;
            $rows = array();
            for ($i = 0, $n = count($results); $i < $n; $i++) {
                $rows = array_merge((array) $rows, (array) $results[$i]);
            }
            $totalRows = count($rows);
            for ($i = 0; $i < $totalRows; $i++) {
                $text =& $rows[$i]->text;
                if ($searchphrase == 'exact') {
                    $searchwords = array($searchword);
                    $needle = $searchword;
                } else {
                    $searchwords = explode(' ', $searchword);
                    $needle = $searchwords[0];
                }
                $text = mosPrepareSearchContent($text, 200, $needle);
                foreach ($searchwords as $k => $hlword) {
                    $searchwords[$k] = htmlspecialchars(stripslashes($hlword));
                }
                $searchRegex = implode('|', $searchwords);
                $text = eregi_replace('(' . $searchRegex . ')', '<span class="highlight">\\0</span>', $text);
                if (strpos($rows[$i]->href, 'http') == false) {
                    $url = parse_url($rows[$i]->href);
                    parse_str(@$url['query'], $link);
                    // determines Itemid for Content items where itemid has not been included
                    if (isset($rows[$i]->type) && @$link['task'] == 'view' && isset($link['id']) && !isset($link['Itemid'])) {
                        $itemid = '';
                        $_itemid = $mainframe->getItemid($link['id'], 0);
                        if ($_itemid) {
                            $itemid = '&amp;Itemid=' . $_itemid;
                        }
                        $rows[$i]->href = $rows[$i]->href . $itemid;
                    }
                }
            }
            $mainframe->setPageTitle(_SEARCH_TITLE);
            $total = $totalRows;
            $limit = intval(mosGetParam($_GET, 'limit', $mosConfig_list_limit));
            $limit = $limit ? $limit : $mosConfig_list_limit;
            $limitstart = intval(mosGetParam($_GET, 'limitstart', 0));
            // prepares searchword for proper display in url
            $searchword_clean = urlencode($searchword_clean);
            if ($n) {
                // html output
                require_once $GLOBALS['mosConfig_absolute_path'] . '/includes/pageNavigation.php';
                $pageNav = new mosPageNav($total, $limitstart, $limit);
                search_html::display($rows, $params, $pageNav, $limitstart, $limit, $total, $totalRows, $searchword_clean);
            } else {
                // html output
                search_html::displaynoresult();
            }
            // html output
            search_html::conclusion($searchword_clean, $pageNav);
        }
    }
    // displays back button
    echo '<br/>';
    mosHTML::BackButton($params, 0);
}
예제 #11
0
파일: login.html.php 프로젝트: cwcw/cms
    function loginpage(&$params, $image)
    {
        global $mosConfig_lang;
        $return = mosGetParam($_SERVER, 'REQUEST_URI', null);
        ?>
		<form action="<?php 
        echo sefRelToAbs('index.php?option=login');
        ?>
" method="post" name="login" id="login">
		<table width="100%" border="0" align="center" cellpadding="4" cellspacing="0" class="contentpane<?php 
        echo $params->get('pageclass_sfx');
        ?>
">
		<tr>
			<td colspan="2">
			<?php 
        if ($params->get('page_title')) {
            ?>
				<div class="componentheading<?php 
            echo $params->get('pageclass_sfx');
            ?>
">
				<?php 
            echo $params->get('header_login');
            ?>
				</div>
				<?php 
        }
        ?>
			<div>
			<?php 
        echo $image;
        ?>
			<?php 
        if ($params->get('description_login')) {
            ?>
				<?php 
            echo $params->get('description_login_text');
            ?>
				<br/><br/>
				<?php 
        }
        ?>
			</div>
			</td>
		</tr>
		<tr>
			<td colspan="2" align="center"> 
				<br />
				<table>
				<tr>
					<td align="center">
					<?php 
        echo _USERNAME;
        ?>
					<br /> 
					</td>
					<td align="center">
					<?php 
        echo _PASSWORD;
        ?>
					<br /> 
					</td>
				</tr>
				<tr>
					<td align="center">
					<input name="username" type="text" class="inputbox" size="20" />
					</td>
					<td align="center">
					<input name="passwd" type="password" class="inputbox" size="20" />
					</td>
				</tr>
				<tr>
					<td align="center" colspan="2">
					<?php 
        echo _REMEMBER_ME;
        ?>
					<input type="checkbox" name="remember" class="inputbox" value="yes" /> 
					</td>
				</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td> 
			<noscript>
			<?php 
        echo _CMN_JAVASCRIPT;
        ?>
			</noscript>
			</td>
		</tr>
		<tr>
			<td align="center" colspan="2">
			<br />
			<input type="submit" name="submit" class="button" value="<?php 
        echo _BUTTON_LOGIN;
        ?>
" />
			</td>
		</tr>
		</table>
		<?php 
        // displays back button
        mosHTML::BackButton($params);
        ?>


		<input type="hidden" name="op2" value="login" />
		<input type="hidden" name="return" value="<?php 
        echo sefRelToAbs($params->get('login'));
        ?>
" />
		<input type="hidden" name="lang" value="<?php 
        echo $mosConfig_lang;
        ?>
" />
		<input type="hidden" name="message" value="<?php 
        echo $params->get('login_message');
        ?>
" />
		</form>
		<?php 
    }
예제 #12
0
    function nocontact(&$params)
    {
        ?>
		<br />
		<br />
			<?php 
        echo _CONTACT_NONE;
        ?>
		<br />
		<br />
		<?php 
        // displays back button
        mosHTML::BackButton($params);
    }
예제 #13
0
    function logoutpage(&$params, $image)
    {
        global $mosConfig_lang;
        $return = $params->get('logout');
        ?>
		<form action="<?php 
        echo sefRelToAbs('index.php?option=logout');
        ?>
" method="post" name="login" id="login">
			<table width="100%" border="0" align="center" cellpadding="4" cellspacing="0" class="contentpane<?php 
        echo $params->get('pageclass_sfx');
        ?>
">
		<tr>
			<td valign="top">
			<?php 
        if ($params->get('page_title')) {
            ?>
				<div class="componentheading<?php 
            echo $params->get('pageclass_sfx');
            ?>
">
				<?php 
            echo $params->get('header_logout');
            ?>
				</div>
				<?php 
        }
        ?>
			<div>
			<?php 
        echo $image;
        if ($params->get('description_logout')) {
            echo $params->get('description_logout_text');
            ?>
				<br/><br/>
				<?php 
        }
        ?>
			</div>
			</td>
		</tr>
		<tr>
			<td align="center">
			<div align="center">
			<input type="submit" name="Submit" class="button" value="<?php 
        echo _BUTTON_LOGOUT;
        ?>
" />
			</div>
			</td>
		</tr>
		</table>
		<?php 
        // displays back button
        mosHTML::BackButton($params);
        ?>

		<input type="hidden" name="op2" value="logout" />
		<input type="hidden" name="return" value="<?php 
        echo sefRelToAbs($return);
        ?>
" />
		<input type="hidden" name="lang" value="<?php 
        echo $mosConfig_lang;
        ?>
" />
		<input type="hidden" name="message" value="<?php 
        echo $params->get('logout_message');
        ?>
" />
		</form>
		<?php 
    }
예제 #14
0
    /**
     * Show a content item
     * @param object An object with the record data
     * @param boolean If <code>false</code>, the print button links to a popup window.  If <code>true</code> then the print button invokes the browser print method.
     */
    function show(&$row, &$params, &$access, $page = 0)
    {
        global $mainframe, $hide_js;
        global $mosConfig_live_site;
        global $_MAMBOTS;
        $mainframe->appendMetaTag('description', $row->metadesc);
        $mainframe->appendMetaTag('keywords', $row->metakey);
        // adds mospagebreak heading or title to <site> Title
        if (isset($row->page_title) && $row->page_title) {
            $mainframe->setPageTitle($row->title . ' ' . $row->page_title);
        }
        // calculate Itemid
        HTML_content::_Itemid($row);
        // determines the link and `link text` of the readmore button & linked title
        HTML_content::_linkInfo($row, $params);
        // link used by print button
        $print_link = $mosConfig_live_site . '/index2.php?option=com_content&amp;task=view&amp;id=' . $row->id . '&amp;pop=1&amp;page=' . $page . $row->Itemid_link;
        // process the new bots
        $_MAMBOTS->loadBotGroup('content');
        $results = $_MAMBOTS->trigger('onPrepareContent', array(&$row, &$params, $page), true);
        if ($params->get('item_title') || $params->get('pdf') || $params->get('print') || $params->get('email')) {
            ?>
			<table class="contentpaneopen<?php 
            echo $params->get('pageclass_sfx');
            ?>
">
			<tr>
				<?php 
            // displays Item Title
            HTML_content::Title($row, $params, $access);
            // displays PDF Icon
            HTML_content::PdfIcon($row, $params, $hide_js);
            // displays Print Icon
            mosHTML::PrintIcon($row, $params, $hide_js, $print_link);
            // displays Email Icon
            HTML_content::EmailIcon($row, $params, $hide_js);
            ?>
			</tr>
			</table>
			<?php 
        } else {
            if ($access->canEdit) {
                // edit icon when item title set to hide
                ?>
			<table class="contentpaneopen<?php 
                echo $params->get('pageclass_sfx');
                ?>
">
 			<tr>
 				<td>
	 				<?php 
                HTML_content::EditIcon($row, $params, $access);
                ?>
 				</td>
 			</tr>
 			</table>
 			<?php 
            }
        }
        if (!$params->get('intro_only')) {
            $results = $_MAMBOTS->trigger('onAfterDisplayTitle', array(&$row, &$params, $page));
            echo trim(implode("\n", $results));
        }
        $results = $_MAMBOTS->trigger('onBeforeDisplayContent', array(&$row, &$params, $page));
        echo trim(implode("\n", $results));
        ?>

		<table class="contentpaneopen<?php 
        echo $params->get('pageclass_sfx');
        ?>
">
		<?php 
        // displays Section & Category
        HTML_content::Section_Category($row, $params);
        // displays Author Name
        HTML_content::Author($row, $params);
        // displays Created Date
        HTML_content::CreateDate($row, $params);
        // displays Urls
        HTML_content::URL($row, $params);
        ?>
		<tr>
			<td valign="top" colspan="2">
				<?php 
        // displays Table of Contents
        HTML_content::TOC($row);
        // displays Item Text
        echo ampReplace($row->text);
        ?>
			</td>
		</tr>
		<?php 
        // displays Modified Date
        HTML_content::ModifiedDate($row, $params);
        // displays Readmore button
        HTML_content::ReadMore($row, $params);
        ?>
		</table>

		<span class="article_seperator">&nbsp;</span>

		<?php 
        $results = $_MAMBOTS->trigger('onAfterDisplayContent', array(&$row, &$params, $page));
        echo trim(implode("\n", $results));
        // displays the next & previous buttons
        HTML_content::Navigation($row, $params);
        // displays close button in pop-up window
        mosHTML::CloseButton($params, $hide_js);
        // displays back button in pop-up window
        mosHTML::BackButton($params, $hide_js);
    }
예제 #15
0
    function nocontact(&$params)
    {
        ?>
		<br /><br />
		<?php 
        echo T_('There are no Contact Details listed.');
        ?>
		<br /><br />
		<?php 
        // displays back button
        mosHTML::BackButton($params);
    }
예제 #16
0
    function displaylist(&$categories, &$rows, $catid, $currentcat = NULL, &$params, $tabclass)
    {
        global $Itemid, $mosConfig_live_site, $hide_js;
        if ($params->get('page_title')) {
            ?>
			<div class="componentheading<?php 
            echo $params->get('pageclass_sfx');
            ?>
">
			<?php 
            echo $currentcat->header;
            ?>
			</div>
			<?php 
        }
        ?>
		<form action="index.php" method="post" name="adminForm">

		<table width="100%" cellpadding="4" cellspacing="0" border="0" align="center" class="contentpane<?php 
        echo $params->get('pageclass_sfx');
        ?>
">
		<tr>
			<td width="60%" valign="top" class="contentdescription<?php 
        echo $params->get('pageclass_sfx');
        ?>
" colspan="2">
			<?php 
        // show image
        if ($currentcat->img) {
            ?>
				<img src="<?php 
            echo $currentcat->img;
            ?>
" align="<?php 
            echo $currentcat->align;
            ?>
" hspace="6" alt="<?php 
            echo T_('Web Links');
            ?>
" />
				<?php 
        }
        echo $currentcat->descrip;
        ?>
			</td>
		</tr>
		<tr>
			<td>
			<?php 
        if (count($rows)) {
            HTML_weblinks::showTable($params, $rows, $catid, $tabclass);
        }
        ?>
			</td>
		</tr>
		<tr>
			<td>&nbsp;

			</td>
		</tr>
		<tr>
			<td>
			<?php 
        // Displays listing of Categories
        if ($params->get('type') == 'category' && $params->get('other_cat')) {
            HTML_weblinks::showCategories($params, $categories, $catid);
        } else {
            if ($params->get('type') == 'section' && $params->get('other_cat_section')) {
                HTML_weblinks::showCategories($params, $categories, $catid);
            }
        }
        ?>
			</td>
		</tr>
		</table>
		</form>
		<?php 
        // displays back button
        mosHTML::BackButton($params, $hide_js);
    }
예제 #17
0
    function displayWrap(&$row, &$params, &$menu)
    {
        ?>
		<script language="javascript" type="text/javascript">
		<?php 
        echo $row->load . "\n";
        ?>
		function iFrameHeight() {
			var h = 0;
			if ( !document.all ) {
				h = document.getElementById('blockrandom').contentDocument.height;
				document.getElementById('blockrandom').style.height = h + 60 + 'px';
			} else if( document.all ) {
				h = document.frames('blockrandom').document.body.scrollHeight;
				document.all.blockrandom.style.height = h + 20 + 'px';
			}
		}
		</script>
		<div class="contentpane<?php 
        echo $params->get('pageclass_sfx');
        ?>
">

		<?php 
        if ($params->get('page_title')) {
            ?>
			<div class="componentheading<?php 
            echo $params->get('pageclass_sfx');
            ?>
">
			<?php 
            echo $params->get('header');
            ?>
			</div>
			<?php 
        }
        ?>
		<iframe   
		id="blockrandom"
		src="<?php 
        echo $row->url;
        ?>
" 
		width="<?php 
        echo $params->get('width');
        ?>
" 
		height="<?php 
        echo $params->get('height');
        ?>
" 
		scrolling="<?php 
        echo $params->get('scrolling');
        ?>
" 
		align="top"
		frameborder="0"
		class="wrapper<?php 
        echo $params->get('pageclass_sfx');
        ?>
">
		<?php 
        echo T_('This option will not work correctly.  Unfortunately, your browser does not support Inline Frames');
        ?>
		</iframe>

		</div>
		<?php 
        // displays back button
        mosHTML::BackButton($params);
    }