Example #1
0
 static function head($theme)
 {
     $session = Session::instance();
     $buf = "";
     if ($session->get("debug")) {
         $buf .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"" . url::file("modules/gallery/css/debug.css") . "\" />";
     }
     if (($theme->page_type == "album" || $theme->page_type == "photo") && access::can("edit", $theme->item())) {
         $buf .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"" . url::file("modules/gallery/css/quick.css") . "\" />";
         $buf .= html::script("modules/gallery/js/quick.js");
     }
     if ($theme->page_type == "photo" && access::can("view_full", $theme->item())) {
         $buf .= "<script type=\"text/javascript\" >" . "  var fullsize_detail = { " . "    close: \"" . url::file("modules/gallery/images/ico-close.png") . "\", " . "    url: \"" . $theme->item()->file_url() . "\", " . "    width: " . $theme->item()->width . ", " . "    height: " . $theme->item()->height . "};" . "</script>";
         $buf .= html::script("modules/gallery/js/fullsize.js");
     }
     if (module::is_active("rss")) {
         if ($item = $theme->item()) {
             $buf = rss::feed_link("gallery/album/{$item->id}");
         } else {
             if ($tag = $theme->tag()) {
                 $buf = rss::feed_link("tag/tag/{$tag->id}");
             }
         }
     }
     if ($session->get("l10n_mode", false)) {
         $buf .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"" . url::file("modules/gallery/css/l10n_client.css") . "\" />";
         $buf .= html::script("lib/jquery.cookie.js");
         $buf .= html::script("modules/gallery/js/l10n_client.js");
     }
     return $buf;
 }
Example #2
0
 static function head($theme)
 {
     $session = Session::instance();
     $buf = "";
     if ($session->get("debug")) {
         $theme->css("modules/gallery/css/debug.css");
     }
     if (($theme->page_type == "album" || $theme->page_type == "photo") && access::can("edit", $theme->item())) {
         $theme->css("modules/gallery/css/quick.css");
         $theme->script("modules/gallery/js/quick.js");
     }
     if (module::is_active("rss")) {
         if ($item = $theme->item()) {
             $buf .= rss::feed_link("gallery/album/{$item->id}");
         } else {
             if ($tag = $theme->tag()) {
                 $buf .= rss::feed_link("tag/tag/{$tag->id}");
             }
         }
     }
     if ($session->get("l10n_mode", false)) {
         $theme->css("modules/gallery/css/l10n_client.css");
         $theme->script("lib/jquery.cookie.js");
         $theme->script("modules/gallery/js/l10n_client.js");
     }
     return $buf;
 }
Example #3
0
 static function head($theme)
 {
     $session = Session::instance();
     $buf = "";
     $buf .= $theme->css("gallery.css");
     if ($session->get("debug")) {
         $buf .= $theme->css("debug.css");
     }
     if (module::is_active("rss")) {
         if ($item = $theme->item()) {
             if ($item->is_album()) {
                 $buf .= rss::feed_link("gallery/album/{$item->id}");
             } else {
                 $buf .= rss::feed_link("gallery/album/{$item->parent()->id}");
             }
         } else {
             if ($tag = $theme->tag()) {
                 $buf .= rss::feed_link("tag/tag/{$tag->id}");
             }
         }
     }
     if (count(locales::installed())) {
         // Needed by the languages block
         $buf .= $theme->script("jquery.cookie.js");
     }
     if ($session->get("l10n_mode", false)) {
         $buf .= $theme->css("l10n_client.css") . $theme->script("jquery.cookie.js") . $theme->script("l10n_client.js");
     }
     $buf .= $theme->css("uploadify/uploadify.css");
     return $buf;
 }
Example #4
0
 static function head($theme)
 {
     $session = Session::instance();
     $buf = "";
     if ($session->get("debug")) {
         $theme->css("debug.css");
     }
     if (module::is_active("rss")) {
         if ($item = $theme->item()) {
             if ($item->is_album()) {
                 $buf .= rss::feed_link("gallery/album/{$item->id}");
             } else {
                 $buf .= rss::feed_link("gallery/album/{$item->parent()->id}");
             }
         } else {
             if ($tag = $theme->tag()) {
                 $buf .= rss::feed_link("tag/tag/{$tag->id}");
             }
         }
     }
     if ($session->get("l10n_mode", false)) {
         $theme->css("l10n_client.css");
         $theme->script("jquery.cookie.js");
         $theme->script("l10n_client.js");
     }
     return $buf;
 }
Example #5
0
File: rss.php Project: ygres/sblog
 function index()
 {
     $this->smarty->setCacheID("RSS|MAINPAGE");
     if (!$this->smarty->isCached(TPL_PATH . "/rss/rssMain.tpl", "RSS|MAINPAGE")) {
         $sqlData = rss::getLastPosts();
         $items = array_slice($sqlData->fetchAll(), 0, 10);
         $this->smarty->assign("items", $items);
     }
     echo $this->smarty->fetch(TPL_PATH . "/rss/rssMain.tpl", "RSS|MAINPAGE");
 }
Example #6
0
 private static function _feed_url($theme)
 {
     if ($item = $theme->item()) {
         if (!$item->is_album()) {
             $item = $item->parent();
         }
         return rss::url("gallery/album/{$item->id}");
     } else {
         return rss::url("tag/tag/{$theme->tag()->id}");
     }
 }
Example #7
0
 static function sidebar_blocks($theme)
 {
     // @todo this needs to be data driven
     if (!$theme->item()) {
         return;
     }
     $block = new Block();
     $block->css_id = "gRss";
     $block->title = t("Available RSS Feeds");
     $block->content = new View("rss_block.html");
     $block->content->feeds = rss::get_feeds($theme->item());
     return $block;
 }
Example #8
0
 static function head($theme)
 {
     if ($theme->item()) {
         $url = rss::item_feed($theme->item());
     } else {
         if ($theme->tag()) {
             $url = rss::tag_feed($theme->tag());
         }
     }
     if (!empty($url)) {
         return "<link rel=\"alternate\" type=\"" . rest::RSS . "\" href=\"{$url}\" />";
     }
 }
 static function head($theme)
 {
     if (module::is_installed("rss") && ($theme->item() || $theme->tag())) {
         if ($item = $theme->item()) {
             $url = rss::feed_link("gallery/album/{$item->id}");
         } else {
             if ($tag = $theme->tag()) {
                 $url = rss::feed_link("tag/tag/{$tag->id}");
             }
         }
         // Polar Rose doesn't understand relative URLs.  Hack around that until they fix it.
         $url = url::abs_site(substr($url, strpos($url, "index.php") + 10));
         return "<script type=\"text/javascript\">" . "var polarroseconfig = {" . "partner: 'gallery3'," . "rss: '{$url}'," . "insert: 'g-polar-rose'," . "optin: ''," . "theme: 'dark'," . "progress: true" . "}</script>" . "<script type=\"text/javascript\" " . "src=\"http://cdn.widget.polarrose.com/polarrosewidget.js\">" . "</script>";
     }
 }
Example #10
0
 function rss()
 {
     system::$display = false;
     rss::setHTTPHeaders();
     $this->smarty->setCacheID("RSS|ARTICLES");
     if (!$this->smarty->isCached()) {
         $sqlData = rss::getLastPostsWithType("article");
         $items = $sqlData->fetchAll();
         $this->smarty->assign("items", $items);
     }
     echo $this->smarty->fetch(TPL_PATH . "/rss/rssMain.tpl", "RSS|ARTICLES");
 }
Example #11
0
                array_push($conditions, "Matching '{$value}'");
                break;
            case 'type':
                $params['type'] = $value;
                $type = ucwords($value . 's');
                break;
        }
    }
} else {
    $params['1'] = '1';
}
$count = 20;
$DOCS = $POD->getContents($params);
$description = "{$scope} {$type} " . implode(" and ", $conditions) . " from " . $POD->siteName(false);
$year = date("Y");
$rss = new rss('utf-8');
$rss->channel(xmlformat($description), $POD->siteRoot(false), xmlformat($description));
$rss->language('en-us');
$rss->copyright('Copyright ' . $year . ' ' . $POD->siteName(false));
$rss->startRSS();
while ($doc = $DOCS->getNext()) {
    $rss->itemTitle(xmlformat($doc->get('headline')));
    if ($doc->get('link')) {
        $rss->itemLink($doc->get('link'));
    } else {
        $rss->itemLink($doc->get('permalink'));
    }
    $nTimestamp = strtotime($doc->get('date'));
    $sISO8601 = date('Y-m-d\\Th:i:s', $nTimestamp) . substr_replace(date('O', $nTimestamp), ':', 3, 0);
    $rss->itemPubDate($sISO8601);
    if ($doc->get('img')) {
<?php

defined("SYSPATH") or die("No direct script access.");
?>
<ul id="g-feeds">
<?php 
foreach ($feeds as $url => $title) {
    ?>
  <li style="clear: both;">
    <span class="ui-icon-left">
    <a href="<?php 
    echo rss::url($url);
    ?>
">
      <span class="ui-icon ui-icon-signal-diag">&nbsp;</span>
      <?php 
    echo html::purify($title);
    ?>
    </a>
    </span>
  </li>
<?php 
}
?>
</ul>
Example #13
0
.feeds-links
{
	text-align:left;
	padding:5px;
	border:1px solid #dedede;
}

.footer
{
	font-size:11px;
	font-weight:bold;
	font-family:Verdana, Arial, Helvetica, sans-serif;	  
}
</style>
</head>
<body>
<div>
	<?php 
include 'rssclass.php';
$feedlist = new rss('http://feeds2.feedburner.com/9lesson');
echo $feedlist->display(20, "9lessons");
$feedlist = new rss('http://feeds.feedburner.com/nettuts');
echo $feedlist->display(9, "Nettuts");
$feedlist = new rss('http://feeds.labnol.org/labnol');
echo $feedlist->display(9, "Labnol");
?>
 
</div>
</body>
</html>
Example #14
0
            case 'batch':
                return null;
                break;
        }
    }
}
new rss_admin();
require_once e_ADMIN . "auth.php";
e107::getAdminUI()->runPage();
require_once e_ADMIN . "footer.php";
exit;
/// ------------------------------- Legacy Code -------------------------------
require_once e_ADMIN . "auth.php";
$imagedir = e_IMAGE . "admin_images/";
require_once e_PLUGIN . 'rss_menu/rss_shortcodes.php';
$rss = new rss();
global $tp;
$mes = e107::getMessage();
// Delete entry
if (isset($_POST['delete'])) {
    $d_idt = array_keys($_POST['delete']);
    $message = $sql->db_Delete("rss", "rss_id=" . intval($d_idt[0])) ? LAN_DELETED : LAN_DELETED_FAILED;
    e107::getLog()->add('RSS_01', 'ID: ' . intval($d_idt[0]) . ' - ' . $message, E_LOG_INFORMATIVE, '');
    e107::getCache()->clear("rss");
}
// Create rss feed
if (isset($_POST['create_rss'])) {
    $message = $rss->dbrss("create");
}
// Update rss feed
if (isset($_POST['update_rss'])) {
Example #15
0
 function procesarEditarArticulo()
 {
     $id = $_POST['id'];
     $query = "SELECT `id_archivo` FROM `aRecurso_software` WHERE `id`='{$id}'";
     $res = mysql_query($query);
     echo mysql_error();
     $arch = mysql_result($res, 0, 'id_archivo');
     $query = "SELECT * FROM `aRecurso_archivos` WHERE `id`='{$arch}'";
     $res = mysql_query($query);
     $nomb = mysql_result($res, 0, 'nombre');
     $uid = $_SESSION['uid'];
     if ($_FILES['archivo']['error'] == 0) {
         $nomb = $_FILES['archivo']['name'];
         $query = "DELETE FROM `aRecurso_archivos` WHERE `id`='{$arch}'";
         $res = mysql_query($query);
         echo mysql_error();
         @unlink('pub/' . $arch);
         @unlink("tmp/vp/{$arch}.jpg");
         $arch = $this->obj->archivos->subir($_FILES['archivo']);
         $query = "UPDATE `aRecurso_software` SET `id_archivo`='{$arch}' WHERE `id`='{$id}'";
         $res = mysql_query($query);
         echo mysql_error();
     }
     $titu = @$_POST['titulo'];
     $url = @$_POST['url'];
     $resu = @str_replace("'", "\\'", $_POST['resumen']);
     $this->obj->archivos->vistaPrevia($arch);
     $query = "UPDATE `aRecurso_software` SET `titulo`='{$titu}', `url`='{$url}', `resumen`='{$resu}' WHERE `id`='{$id}'";
     $res = mysql_query($query);
     echo mysql_error();
     $summary = htmlspecialchars('<table border="0" cellpadding="0" cellspacing="0">' . '<tr>' . '<td width="150" align="right" valign="top">' . '<img src="http://numenor.cicese.mx/repositorio/tmp/vp/' . $arch . '.jpg" style="border: 1px solid gray; border-right-width: 2px; border-bottom-width: 2px;"/>' . '</td>' . '<td width="32">&nbsp;</td>' . '<td valign="top" align="left">' . '<table border="0" cellpadding="0" cellspacing="0">' . '<tr>' . '<th align="right" nowrap>Archivo&nbsp;&nbsp;</th>' . '<td><img src="http://numenor.cicese.mx/repositorio/tpl/simple/img/icono-' . $this->obj->archivos->tipo($nomb) . '.gif" align="absmiddle" /> <strong>' . $nomb . '</strong> (' . $this->obj->archivos->tamano($arch) . ') </td>' . '</tr>' . ($titu ? '<tr>' . '<th align="right" nowrap>Descripci&oacute;n&nbsp;&nbsp;</th>' . '<td>' . $titu . '</td>' . '</tr>' : '') . ($url ? '<tr>' . '<th align="right" nowrap>URL&nbsp;&nbsp;</th>' . '<td><a href="' . $url . '" target="_blank">' . $url . '</a></td>' . '</tr>' : '') . ($resu ? '<tr>' . '<th valign="top" align="right" nowrap>Resumen&nbsp;&nbsp;</th>' . '<td>' . str_replace("\\'", "'", $resu) . '</td>' . '</tr>' : '') . '<tr>' . '<th align="right" nowrap>Modificado por&nbsp;&nbsp;</th>' . '<td>' . $this->obj->sesion->nombre($uid, '[n1.] [a1]') . ' el ' . date('d/m/Y') . ' a las ' . date('G:i') . '</td>' . '</tr>' . '</tr>' . '</table>');
     $newURL = htmlspecialchars('http://numenor.cicese.mx/repositorio/?p=software-ver&id=' . $id);
     $newentry = utf8_encode('<entry>' . '<title>' . $titu . ' (Modificado)</title>' . '<link rel="alternate" type="text/html" href="' . $newURL . '" />' . '<issued>' . date('Y-m-d\\TH:i:s-07:00') . '</issued>' . '<modified>' . date('Y-m-d\\TH:i:s-07:00') . '</modified>' . '<author>' . '<name>' . $this->obj->sesion->nombre($uid, '[n1.] [a1]') . '</name>' . '</author>' . '<id>' . $arch . '</id>' . '<summary type="text/html" mode="escaped">' . $summary . '</summary>' . '</entry>');
     //************
     $query = "DELETE FROM `kControl_diccionario_etiquetas` WHERE `id_recurso`='{$id}' AND `tipo_recurso`='1'";
     $res = mysql_query($query);
     echo mysql_error();
     //************
     if ($_POST['etiquetas'] != "") {
         $arreglo = explode(',', $_POST['etiquetas']);
         for ($j = 0; $j < count($arreglo); $j++) {
             if (formatoTag($arreglo[$j]) != "") {
                 //buscar si la etiqueta ya existe
                 $query = "SELECT `id` FROM `kControl_etiquetas` WHERE `nombre` LIKE '" . formatoTag($arreglo[$j]) . "' LIMIT 1";
                 $res = mysql_query($query);
                 echo mysql_error();
                 $r = mysql_fetch_array($res);
                 $n = mysql_num_rows($res);
                 $id_tag = $r['id'];
                 //si no existe, guardarla en kControl_etiquetas y tomar el id
                 if ($n == 0) {
                     $query = "INSERT INTO `kControl_etiquetas` (`nombre`) VALUES('" . formatoTag($arreglo[$j]) . "')";
                     $res = mysql_query($query);
                     echo mysql_error();
                     $id_tag = mysql_insert_id();
                 }
                 //guardamos el id de la tag
                 $tags_a .= $id_tag . ",";
                 //verificar que no se dupliquen las etiquetas en el diccionario
                 $query = "SELECT * FROM `kControl_diccionario_etiquetas` WHERE `id_etiqueta` LIKE '" . $id_tag . "' AND `id_recurso` LIKE '" . $id . "' AND `tipo_recurso` LIKE '2' LIMIT 1";
                 $res = mysql_query($query);
                 echo mysql_error();
                 $r = mysql_fetch_array($res);
                 $n = mysql_num_rows($res);
                 //si no hay etiquetas duplicadas, entonces incrementamos las etiquetas del grupo de trabajo
                 if ($n == 0) {
                     //guardar los datos en el diccionario de etiquetas
                     $query = "INSERT INTO `kControl_diccionario_etiquetas` (`id_recurso`,`tipo_recurso`,`id_etiqueta`) VALUES('" . $id . "','2','" . $id_tag . "')";
                     $res = mysql_query($query);
                     echo mysql_error();
                 }
             }
             //termina validar if tag = nill
         }
         //$software_anuncio .= preg_replace('/^[0-9]+_/', '', basename($filename)) . ',';
     }
     //************
     if (!mysql_error()) {
         rss::newEntry($newentry);
         rss::newEntryMAILTO($this->obj->sesion->nombre($uid, '[n1.] [a1]'), "Se ha actualizado el software", $titu, $newURL, $tags_a, "SOFTWARE");
         $_SESSION['mensaje'] = "El archivo &laquo;{$nomb}&raquo; se ha actualizado con &eacute;xito.";
         header("Location: ?p=software&c={$carp}");
     }
     exit;
 }
Example #16
0
$result = mysql_query($query) or die("tblconfiguration: Email not found");
if (mysql_num_rows($result) == 0) {
    die("tblconfiguration: Email not found");
}
$row = mysql_fetch_assoc($result);
$tempCompanyEmail = $row['value'];
// Get SystemURL
$query = "Select * FROM tblconfiguration where setting='SystemURL' limit 0,1";
$result = mysql_query($query) or die("tblconfiguration: SystemURL not found");
if (mysql_num_rows($result) == 0) {
    die("tblconfiguration: SystemURL not found");
}
$row = mysql_fetch_assoc($result);
$tempSystemURL = $row['value'];
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
$rss = new rss('utf-8');
$rss->channel($tempCompanyName . ' Tickets', $tempSystemURL, $tempCompanyName . ' Tickets');
$rss->language('en-us');
$rss->copyright('Copyright ' . $tempCompanyName);
$rss->managingEditor($tempCompanyEmail);
$rss->category('CategoryName');
$rss->startRSS();
$query = "Select * FROM tbltickets " . $tempSQL . " order by lastreply desc limit 0," . $constTicketsToDisplay;
$result = mysql_query($query) or die("No Tickets Found");
if (mysql_num_rows($result) == 0) {
    die("No Tickets Found");
}
while ($row = mysql_fetch_assoc($result)) {
    $rss->itemTitle("<![CDATA[" . $row['title'] . "]]>");
    $rss->itemLink("<![CDATA[" . $tempSystemURL . "/admin/supporttickets.php?action=viewticket&id=" . $row['id'] . "]]>");
    $rss->itemDescription("<![CDATA[" . $row['message'] . "]]>");
Example #17
0
<?php

/* initialize database and libraries */
define(RSS_AGE_MINUTES, 60);
define(RSS_NUMBER_STORIES, 15);
/* initialize the SMT Facebook appliation class */
require_once PATH_FACEBOOK . "/classes/app.class.php";
$app = new app(NULL, true);
require_once PATH_FACEBOOK . "/classes/pages.class.php";
$page = new pages($app->db);
require_once PATH_PHP . 'classes/common.class.php';
$common = new common($app->db);
/* process request variables */
if (isset($_GET['action'])) {
    $action = $_GET['action'];
} else {
    $action = 'TopStories';
}
/* begin building the page */
$cacheName = CACHE_PREFIX . 'Rss' . '_FB_' . $action;
if ($common->checkCache($cacheName, RSS_AGE_MINUTES)) {
    // still current, get from cache (fast)
    $code = $common->fetchCache($cacheName);
} else {
    // recreate the page  (slow)
    require_once PATH_CORE . '/classes/rss.class.php';
    $rssObj = new rss($app->db, URL_CANVAS);
    $code = $rssObj->build($action);
    $common->cacheContent($cacheName, $code);
}
echo $code;
 <tr>
 <td>
  <?php 
include 'rssclass.php';
$feedlist = new rss('http://www.kompas.com/getrss/all');
echo $feedlist->display(9, "Terserah Kita Bos! - KompaS");
?>
	</td>
	</tr>
	</table>
	
	<table>
	<tr>
	<td> 
	
<?php 
$feedlist = new rss('http://rss.detik.com/');
echo $feedlist->display(9, "Terserah Kita Bis! - DetiK");
?>
 
</td>
</tr>
</table>


    </div>
	
     
	
  </body>
</html>
Example #19
0
 function procesarEditar()
 {
     $id = $_POST['id'];
     $ti = trim($_POST['titulo']);
     $co = str_replace("'", "\\'", trim($_POST['contenido']));
     $uid = $_SESSION['uid'];
     $fec = time();
     $query = "UPDATE `aRecurso_noticias` SET `titulo`='{$ti}', `contenido`='{$co}' WHERE `id`='{$id}'";
     $res = mysql_query($query);
     //************
     $query = "DELETE FROM `kControl_diccionario_etiquetas` WHERE `id_recurso`='{$id}' AND `tipo_recurso`='5'";
     $res = mysql_query($query);
     echo mysql_error();
     //************
     if ($_POST['etiquetas'] != "") {
         $arreglo = explode(',', $_POST['etiquetas']);
         for ($j = 0; $j < count($arreglo); $j++) {
             if (formatoTag($arreglo[$j]) != "") {
                 //buscar si la etiqueta ya existe
                 $query = "SELECT `id` FROM `kControl_etiquetas` WHERE `nombre` LIKE '" . formatoTag($arreglo[$j]) . "' LIMIT 1";
                 $res = mysql_query($query);
                 echo mysql_error();
                 $r = mysql_fetch_array($res);
                 $n = mysql_num_rows($res);
                 $id_tag = $r['id'];
                 //si no existe, guardarla en kControl_etiquetas y tomar el id
                 if ($n == 0) {
                     $query = "INSERT INTO `kControl_etiquetas` (`nombre`) VALUES('" . formatoTag($arreglo[$j]) . "')";
                     $res = mysql_query($query);
                     echo mysql_error();
                     $id_tag = mysql_insert_id();
                 }
                 //guardamos el id de la tag
                 $tags_a .= $id_tag . ",";
                 //verificar que no se dupliquen las etiquetas en el diccionario
                 $query = "SELECT * FROM `kControl_diccionario_etiquetas` WHERE `id_etiqueta` LIKE '" . $id_tag . "' AND `id_recurso` LIKE '" . $id . "' AND `tipo_recurso` LIKE '5' LIMIT 1";
                 $res = mysql_query($query);
                 echo mysql_error();
                 $r = mysql_fetch_array($res);
                 $n = mysql_num_rows($res);
                 //si no hay etiquetas duplicadas, entonces incrementamos las etiquetas del grupo de trabajo
                 if ($n == 0) {
                     //guardar los datos en el diccionario de etiquetas
                     $query = "INSERT INTO `kControl_diccionario_etiquetas` (`id_recurso`,`tipo_recurso`,`id_etiqueta`) VALUES('" . $id . "','5','" . $id_tag . "')";
                     $res = mysql_query($query);
                     echo mysql_error();
                 }
             }
             //termina validar if tag = nill
         }
     }
     //************
     $summary = htmlspecialchars($co);
     $newURL = htmlspecialchars('http://numenor.cicese.mx/repositorio/?p=noticias');
     $newentry = utf8_encode('<entry>' . '<title>' . $ti . ' (Modificado)</title>' . '<link rel="alternate" type="text/html" href="' . $newURL . '" />' . '<issued>' . date('Y-m-d\\TH:i:s-07:00') . '</issued>' . '<modified>' . date('Y-m-d\\TH:i:s-07:00') . '</modified>' . '<author>' . '<name>' . $this->obj->sesion->nombre($uid, '[n1.] [a1]') . '</name>' . '</author>' . '<id>' . $id . '/' . time() . '</id>' . '<summary type="text/html" mode="escaped">' . $summary . '</summary>' . '</entry>');
     if (!mysql_error()) {
         rss::newEntry($newentry);
         rss::newEntryMAILTO($this->obj->sesion->nombre($uid, '[n1.] [a1]'), "Se ha actualizado la nota", $ti, $newURL, $tags_a, "NOTICIA");
         $_SESSION['mensaje'] = "La noticia &laquo;{$ti}&raquo; se ha actualizado correctamente." . $_POST['etiquetas'];
         header("Location: .?p=noticias");
     }
     exit;
 }
Example #20
0
 public static function _loadFromString($rss)
 {
     return rss::loadFromString($rss);
 }
Example #21
0
 public static function cron15()
 {
     rss::RSSComplet();
 }
Example #22
0
}
?>
"><div><div class="cbp-so-side-center"><span><?php 
echo chiffres;
?>
</span></div><div class="col25"><div class="mainText">0</div><div class="subText"><?php 
echo f004;
?>
</div></div><div class="col25"><div class="mainText">0</div><div class="subText"><?php 
echo f001;
?>
</div></div><div class="col25"><div class="mainText">0</div><div class="subText"><?php 
echo f003;
?>
</div></div><div class="col25"><div class="mainText">0</div><div class="subText"><?php 
echo f002;
?>
</div></div></div></div></section><section id="articles-blog"><div class="wrapper"><div class="cbp-so-side-center"><span><?php 
echo actus;
?>
</span></div><?php 
$feedlist = new rss('http://www.weblib.fr/blog/feed/');
echo $feedlist->display(4, "blog");
?>
</div></section><section id="twitter"><div class="wrapper"><div id="tweets"></div></div></section><?php 
include 'footer.php';
?>
</div></div><script type="text/javascript" src="dist/js/weblib.min.js"></script><script type="text/javascript" src="dist/js/global_functions.min.js"></script><?php 
require_once 'footer_tracking.php';
?>
</body></html>
 function replace_user_action()
 {
     global $lang, $config;
     require_once $config['basepath'] . '/include/login.inc.php';
     $login = new login();
     switch ($_GET['action']) {
         case 'index':
             $_GET['PageID'] = 1;
             require_once $config['basepath'] . '/include/page_display.inc.php';
             $search = new page_display();
             $data = $search->display();
             break;
         case 'member_login':
             $data = $login->display_login('Member');
             break;
         case 'search_step_2':
             require_once $config['basepath'] . '/include/search.inc.php';
             $search = new search_page();
             $data = $search->create_searchpage();
             break;
         case 'searchpage':
             require_once $config['basepath'] . '/include/search.inc.php';
             $search = new search_page();
             $data = $search->create_search_page_logic();
             break;
         case 'searchresults':
             require_once $config['basepath'] . '/include/search.inc.php';
             $search = new search_page();
             $data = $search->search_results();
             break;
         case 'listingview':
             require_once $config['basepath'] . '/include/listing.inc.php';
             $listing = new listing_pages();
             $data = $listing->listing_view();
             break;
         case 'addtofavorites':
             require_once $config['basepath'] . '/include/members_favorites.inc.php';
             $listing = new membersfavorites();
             $data = $listing->addtofavorites();
             break;
         case 'view_favorites':
             require_once $config['basepath'] . '/include/members_favorites.inc.php';
             $listing = new membersfavorites();
             $data = $listing->view_favorites();
             break;
         case 'view_saved_searches':
             require_once $config['basepath'] . '/include/members_search.inc.php';
             $listing = new memberssearch();
             $data = $listing->view_saved_searches();
             break;
         case 'save_search':
             require_once $config['basepath'] . '/include/members_search.inc.php';
             $listing = new memberssearch();
             $data = $listing->save_search();
             break;
         case 'delete_search':
             require_once $config['basepath'] . '/include/members_search.inc.php';
             $listing = new memberssearch();
             $data = $listing->delete_search();
             break;
         case 'delete_favorites':
             require_once $config['basepath'] . '/include/members_favorites.inc.php';
             $listing = new membersfavorites();
             $data = $listing->delete_favorites();
             break;
         case 'page_display':
             require_once $config['basepath'] . '/include/page_display.inc.php';
             $search = new page_display();
             $data = $search->display();
             break;
         case 'calculator':
             require_once $config['basepath'] . '/include/calculators.inc.php';
             $calc = new calculators();
             $data = $calc->start_calc();
             break;
         case 'view_listing_image':
             require_once $config['basepath'] . '/include/images.inc.php';
             $image = new image_handler();
             $data = $image->view_image('listing');
             break;
         case 'view_user_image':
             require_once $config['basepath'] . '/include/images.inc.php';
             $image = new image_handler();
             $data = $image->view_image('userimage');
             break;
         case 'rss_featured_listings':
             require_once $config['basepath'] . '/include/rss.inc.php';
             $rss = new rss();
             $data = $rss->rss_view('featured');
             break;
         case 'rss_lastmodified_listings':
             require_once $config['basepath'] . '/include/rss.inc.php';
             $rss = new rss();
             $data = $rss->rss_view('lastmodified');
             break;
         case 'view_user':
             require_once $config['basepath'] . '/include/user.inc.php';
             $user = new user();
             $data = $user->view_user();
             break;
         case 'view_users':
             require_once $config['basepath'] . '/include/user.inc.php';
             $user = new user();
             $data = $user->view_users();
             break;
         case 'edit_profile':
             require_once $config['basepath'] . '/include/user_manager.inc.php';
             if (!isset($_GET['user_id'])) {
                 $_GET['user_id'] = 0;
             }
             $user_managment = new user_managment();
             $data = $user_managment->edit_member_profile($_GET['user_id']);
             break;
         case 'signup':
             if (isset($_GET['type'])) {
                 require_once $config['basepath'] . '/include/user_manager.inc.php';
                 $listing = new user_managment();
                 $data = $listing->user_signup($_GET['type']);
             }
             break;
         case 'show_vtour':
             if (isset($_GET['listingID'])) {
                 require_once $config['basepath'] . '/include/vtour.inc.php';
                 $vtour = new vtours();
                 $data = $vtour->show_vtour($_GET['listingID']);
             } else {
                 $data = 'No Listing ID';
             }
             break;
         case 'contact_friend':
             require_once $config['basepath'] . '/include/contact.inc.php';
             $contact = new contact();
             if (isset($_GET['listing_id'])) {
                 $data = $contact->ContactFriendForm($_GET['listing_id']);
             }
             break;
         case 'contact_agent':
             require_once $config['basepath'] . '/include/contact.inc.php';
             $contact = new contact();
             if (isset($_GET['listing_id']) && isset($_GET['agent_id'])) {
                 $data = $contact->ContactAgentForm($_GET['listing_id'], $_GET['agent_id']);
             } elseif (isset($_GET['listing_id'])) {
                 $data = $contact->ContactAgentForm($_GET['listing_id'], 0);
             } elseif (isset($_GET['agent_id'])) {
                 $data = $contact->ContactAgentForm(0, $_GET['agent_id']);
             } else {
                 $data = '';
             }
             break;
         case 'create_vcard':
             require_once $config['basepath'] . '/include/user.inc.php';
             $user = new user();
             if (isset($_GET['user'])) {
                 $data = $user->create_vcard($_GET['user']);
             }
             break;
         case 'create_download':
             require_once $config['basepath'] . '/include/files.inc.php';
             $files = new file_handler();
             if (isset($_GET['ID']) && isset($_GET['file_id']) && isset($_GET['type'])) {
                 $data = $files->create_download($_GET['ID'], $_GET['file_id'], $_GET['type']);
             } elseif (isset($_POST['ID']) && isset($_POST['file_id']) && isset($_POST['type'])) {
                 $data = $files->create_download($_POST['ID'], $_POST['file_id'], $_POST['type']);
             }
             break;
         case 'blog_index':
             require_once $config['basepath'] . '/include/blog_display.inc.php';
             $blog = new blog_display();
             $data = $blog->disply_blog_index();
             break;
         case 'blog_view_article':
             require_once $config['basepath'] . '/include/blog_display.inc.php';
             $blog = new blog_display();
             $data = $blog->display();
             break;
         case 'verify_email':
             require_once $config['basepath'] . '/include/user_manager.inc.php';
             $user_manager = new user_managment();
             $data = $user_manager->verify_email();
             break;
         default:
             $addon_name = array();
             if (preg_match("/^addon_(.\\S*?)_.*/", $_GET['action'], $addon_name)) {
                 $file = $config['basepath'] . '/addons/' . $addon_name[1] . '/addon.inc.php';
                 if (file_exists($file)) {
                     include_once $file;
                     $function_name = $addon_name[1] . '_run_action_user_template';
                     $data = $function_name();
                 } else {
                     $data = $lang['addon_doesnt_exist'];
                 }
             } else {
                 $data = '';
             }
             break;
     }
     // End switch ($_GET['action'])
     return $data;
 }
Example #24
0
	copyright 		rights
	webMaster 		-
	managingEditor 	author or contributor
	pubDate 		published (in entry) 	Atom has no feed-level equivalent
	lastBuildDate (in channel) 	updated 	RSS has no item-level equivalent
	category 		category
	generator 		generator
	docs 			-
	cloud 			-
	ttl 			- 						<ttl> is problematic, prefer HTTP 1.1 cache control
	image 			logo 					Atom recommends 2:1 aspect ratio
	- 				icon 					As in favicon.ico
	rating 			-
	textInput 		-
	skipHours 		-
	skipDays 		-
	item 			entry
	author 			author
	- 				contributor
	description 	summary and/or content 	depending on whether full content is provided
	comments 		-
	enclosure 		- 						rel="enclosure" on <link> in Atom
	guid 			id
	source 			- 						rel="via" on <link> in Atom
	- 				source 					Container for feed-level metadata to support aggregation
*/
// -----------------------------------------------------------------------------
// call the service
// -----------------------------------------------------------------------------
$service = new rss(array_merge($_GET, $_POST));
echo $service->json();
Example #25
0
    public function make_RSS($title, $description, $date, $slides, $location = '.', $filename = 'rss')
    {
        $rss = new rss('utf-8');
        $rss->channel($title, 'http://www.slideshare.net', $description);
        $rss->language('en-us');
        $rss->copyright('Copyright by SlideShare 2006');
        $rss->managingEditor('support.slideshare@gmail.com');
        $rss->startRSS($location, $filename);
        for ($i = 0; $i < count($slides); $i++) {
            $rss->itemTitle($slides[$i]['TITLE']);
            $rss->itemLink($slides[$i]['PERMALINK']);
            $rss->itemDescription('<![CDATA[
				<img style="border: 1px solid rgb(195, 230, 216);" src="' . $slides[$i]['THUMBNAIL'] . '" align="right" border="0" width="120" height="90" vspace="4" hspace="4" />
				<p>
				' . $slides[$i]['DESCRIPTION'] . '
				</p>
			]]>');
            $rss->itemGuid($slides[$i]['PERMALINK'], true);
            $rss->itemComments($slides[$i]['PERMALINK']);
            $rss->itemSource('Slideshare', 'http://www.slideshare.net');
            $rss->addItem();
        }
        $rss->RSSdone();
    }
Example #26
0
 public function date($date)
 {
     $this->set('pubDate', rss::date($date));
     return $this;
 }
Example #27
0
<?php defined("SYSPATH") or die("No direct script access.") ?>
<ul id="gFeeds">
<? foreach($feeds as $url => $title): ?>
  <li style="clear: both;">
    <span class="ui-icon-left">
    <a href="<?= rss::url($url) ?>">
      <span class="ui-icon ui-icon-signal-diag"></span>
      <?= $title ?>
    </a>
    </span>
  </li>
<? endforeach ?>
</ul>
Example #28
0
            die("Ugyldig forum: {$id}");
        }
    }
    $ids = array_map("intval", $show);
}
$forums = array(1 => "Game", 2 => "Off-topic", 3 => "Salg/søknad", 4 => "Support");
$forums_active = array();
foreach ($ids as $id) {
    $forums_active[] = $forums[$id];
}
// sett opp beskrivelse
$desc = array_map("strtolower", $forums_active);
$last = count($desc) > 1 ? array_pop($desc) : false;
$description = "Forumsvar i " . implode(", ", $desc) . ($last ? " og {$last}" : '') . ' forum' . ($last ? 'ene' : 'et') . '.';
// sett opp RSS
$rss = new rss("Forumsvar - Kofradia", "https://www.kofradia.no/", $description);
$rss->ttl(1);
// hent forumsvarene
$result = \Kofradia\DB::get()->query("\n\tSELECT fr_id, fr_text, fr_time, up_name, ft_id, ft_type, ft_title, ft_fse_id\n\tFROM forum_replies r\n\t\tLEFT JOIN users_players ON up_id = fr_up_id,\n\t\tforum_topics t\n\tWHERE fr_ft_id = ft_id AND ft_fse_id IN (" . implode(",", $ids) . ") AND ft_deleted = 0 AND fr_deleted = 0\n\tORDER BY fr_time DESC LIMIT 50");
while ($row = $result->fetch()) {
    $item = new rss_item();
    $item->title($row['up_name'] . ' svarte i &laquo;' . htmlspecialchars($row['ft_title']) . '&raquo;' . ($row['ft_type'] == 2 ? ' (sticky)' : ($row['ft_type'] == 3 ? ' (viktig)' : '')) . ' (' . $forums[$row['ft_fse_id']] . ' forum)');
    $item->description(parse_html(game::bb_to_html($row['fr_text'])));
    $item->author($row['up_name']);
    $item->pubDate($row['fr_time']);
    $item->link($__server['path'] . '/forum/topic?id=' . $row['ft_id'] . '&replyid=' . $row['fr_id']);
    $item->guid("fr{$row['fr_id']}", false);
    $rss->item($item);
}
header("Content-Type: application/rss+xml; charset=utf-8");
echo $rss->generate();
Example #29
0
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                <div class="post-preview">
                    <a href='https://uwaterloo.ca/events/events'>
                        <h1 class="post-title">
                            Upcoming Events
                        </h1>
                        <br>
                    </a>
                    <hr>
                </div>
    <?php 
include 'rss.php';
$feed_url = 'https://uwaterloo.ca/events/events/events.xml';
$feedlist = new rss($feed_url);
$feeds = $feedlist->display(10, "Upcoming Events");
echo $feeds;
?>
            </div>
        </div>
    </div>

    <hr>

    <!-- Footer -->
    <footer>
        <div class="container">
            <div class="row">
                <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                    <p class="copyright text-muted">Copyright &copy; UW Events 2016</p>
Example #30
0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>

<div>
 <table cellspacing="100" style="width:100%">
  <tr>
  <?php 
include "takefeed.php";
$feedlist = new rss('http://updates.collegespace.in/feed/');
$fullfeed = $feedlist->display(4, "updates");
$frag = explode('<class>', $fullfeed);
echo '<th>' . $frag[1] . '</th>' . '<th>' . $frag[2] . '</th>' . '<th>' . $frag[3] . '</th>' . '<th>' . $frag[4] . '</th>';
?>
 
  
  </tr>
  </table>
  </div>

</body>
</html>