function showMainPage() { $full_name = $_SESSION['full_name']; include "feed/index.php"; include "header/header.php"; //showMenu($full_name); echo "<div class='new_entry'><form id='new_entry_form' action='modules/home/show.php' method='POST'><input placeholder='Word:' type='text' name='new_word' id='new_word'/></br><textarea rows='4' cols='30' placeholder='Definition:' name='new_definition' id='new_definition'></textarea></br><textarea rows='4' cols='30' placeholder='Example:' name='new_example' type='text' id='new_example'></textarea></br><input placeholder='Source: (URL)' type='text' name='new_source' id='new_source'/><input type='submit' value='Sumbit!' onclick=''/></form></div>"; ?> <div id='word_feed'> <?php showFeed(); ?> </div> <?php }
* modified by brian & rob * Joomla! is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * See COPYRIGHT.php for copyright notices and details. */ // no direct access defined('_VALID_MOS') or die('Restricted access'); // load the html drawing class require_once $mainframe->getPath('front_html'); $feedid = intval(mosGetParam($_REQUEST, 'feedid', 0)); $catid = intval(mosGetParam($_REQUEST, 'catid', 0)); switch ($task) { case 'view': showFeed($feedid); break; default: listFeeds($catid); break; } function listFeeds($catid) { global $mainframe, $database, $my; global $mosConfig_live_site; global $Itemid; /* Query to retrieve all categories that belong under the contacts section and that are published. */ $query = "SELECT cc.*, a.catid, COUNT(a.id) AS numlinks" . "\n FROM #__categories AS cc" . "\n LEFT JOIN #__newsfeeds AS a ON a.catid = cc.id" . "\n WHERE a.published = 1" . "\n AND cc.section = 'com_newsfeeds'" . "\n AND cc.published = 1" . "\n AND cc.access <= " . (int) $my->gid . "\n GROUP BY cc.id" . "\n ORDER BY cc.ordering"; $database->setQuery($query); $categories = $database->loadObjectList(); $rows = array();
* @copyright Mambo Foundation Inc. * See COPYRIGHT.php for copyright notices and details. * @license GNU/GPL Version 2, see LICENSE.php * Mambo is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 of the License. */ /** ensure this file is being included by a parent file */ defined('_VALID_MOS') or die('Direct Access to this location is not allowed.'); // load the html drawing class require_once $mainframe->getPath('front_html'); $feedid = intval(mosGetParam($_REQUEST, 'feedid', 0)); $catid = intval(mosGetParam($_REQUEST, 'catid', 0)); switch ($task) { case 'view': showFeed($option, $feedid); break; default: listFeeds($option, $catid); break; } function listFeeds($option, $catid) { global $mainframe, $database, $my; global $mosConfig_shownoauth, $mosConfig_live_site, $mosConfig_absolute_path; global $cur_template, $Itemid; /* Query to retrieve all categories that belong under the contacts section and that are published. */ $query = "SELECT cc.*, a.catid, COUNT(a.id) AS numlinks" . "\n FROM #__categories AS cc" . "\n LEFT JOIN #__newsfeeds AS a ON a.catid = cc.id" . "\n WHERE a.published='1'" . "\n AND cc.section='com_newsfeeds'" . "\n AND cc.published='1'" . "\n AND cc.access <= '" . $my->gid . "'" . "\n GROUP BY cc.id" . "\n ORDER BY cc.ordering"; $database->setQuery($query); $categories = $database->loadObjectList(); $rows = array();
<?php include_once "header.php"; $feedid = $_GET['feedid']; $feedid = mysql_real_escape_string($feedid); $action = $_GET['action']; $action = mysql_real_escape_string($action); $catid = $_GET['catid']; $catid = mysql_real_escape_string($catid); if (checkCookie()) { printFeedbar($feedid, $action, $catid); showFeed($feedid, $action, $catid); printFeedbar($feedid, $action, $catid); } include_once "footer.php"; ?>