[Feed-collector-svn] SF.net SVN: feed-collector: [75] trunk/page_add_tag.php
Status: Beta
Brought to you by:
c167
|
From: <c1...@us...> - 2006-12-20 21:43:59
|
Revision: 75
http://feed-collector.svn.sourceforge.net/feed-collector/?rev=75&view=rev
Author: c167
Date: 2006-12-20 13:43:59 -0800 (Wed, 20 Dec 2006)
Log Message:
-----------
Added Paths:
-----------
trunk/page_add_tag.php
Added: trunk/page_add_tag.php
===================================================================
--- trunk/page_add_tag.php (rev 0)
+++ trunk/page_add_tag.php 2006-12-20 21:43:59 UTC (rev 75)
@@ -0,0 +1,131 @@
+<?php
+
+
+/**
+ * Created on 30.08.2006
+ *
+ * @version 1
+ * @since 56 - 17.11.2006
+ * @author c167 <c1...@us...>
+ * @package feed-collector
+ */
+
+require_once "inc/functions.php";
+require_once "class/Feed_manager.php";
+require_once "inc/config.php";
+require_once "inc/definitions.php";
+error_reporting(E_ALL);
+
+############
+# DATABASE #
+############
+require_once "MDB2.php";
+$dsn = array (
+ 'phptype' => $db['type'],
+ 'username' => $db['user'],
+ 'password' => $db['passwd'],
+ 'hostspec' => $db['host'],
+ 'database' => $db['database']
+);
+$options = array (
+ 'debug' => 2,
+ 'result_buffering' => true,
+ 'portability' => MDB2_PORTABILITY_ALL
+);
+$db = & MDB2 :: factory($dsn, $options);
+if (PEAR :: isError($db)) {
+
+}
+$db->setFetchMode(MDB2_FETCHMODE_ASSOC);
+
+###########
+# SESSION #
+###########
+require_once "HTTP/Session.php";
+$options = array (
+ 'dsn' => & $db,
+ 'table' => $session['container']['tablename'],
+ 'autooptimize' => $session['container']['autooptimize']
+);
+HTTP_Session :: setContainer('MDB2', $options);
+HTTP_Session :: start();
+HTTP_Session :: setExpire($session['time']['expire']);
+HTTP_Session :: setIdle($session['time']['idle']);
+
+$feed = new Feed_manager($db);
+
+if (true === HTTP_Session :: isNew()) {
+ HTTP_Session :: set("logged_in", false);
+
+}
+
+##############
+# HTTP-Class #
+##############
+require_once "HTTP.php";
+
+################
+# User-Manager #
+################
+require_once "class/User_manager.php";
+$user = new User_manager($db);
+/*
+if(false === HTTP_Session :: get("logged_in", false)) {
+ HTTP :: redirect("./page_login.php");
+}
+*/
+
+
+#####################
+# BUILD THE CONTENT #
+#####################
+
+// get the design
+$design = file_get_contents("styles/default/page_add_tag.tpl", "r");
+
+# Header
+// title
+$title = "Feed-Collector";
+$design = str_replace("<!-- title -->", $title, $design);
+
+// related sites
+$related_sites = sprintf(" <span>%s</span>\n <a href=\"http://www.oswd.org\" title=\"The host of this design\">OSWD</a> |\n <a href=\"http://www.oswd.org/userinfo.phtml?user=haran\" title=\"Other designs by haran\">haran’s Designs</a>", _("Related Sites:"));
+$design = str_replace("<!-- related sites -->", $related_sites, $design);
+
+// midHeader title left
+$midHeader_title_left = sprintf(" <h1 class=\"headerTitle\">%s</h1>\n <div class=\"headerSubTitle\" title=\"Message'\">\n %s\n </div>", _("Feed-Collector"), _("{ stay up to date with all your news feeds! }"));
+$design = str_replace("<!-- midHeader title left -->", $midHeader_title_left, $design);
+
+// midHeader title right
+$midHeader_title_right = sprintf(" <span class=\"doNotDisplay\">%s</span>\n <a href=\"./index2.html\">view an alternative layout «</a>\n <span class=\"doNotDisplay\">|</span>\n <a style=\"cursor: help;\" title=\"Thanks to CSS, this page is already printer friendly!\">printer-friendly version «</a>", _("Tools:"));
+$design = str_replace("<!-- midHeader title right -->", $midHeader_title_right, $design);
+
+// navigation
+$navigation = sprintf(" <span class=\"doNotDisplay\">Navigation:</span>\n <a href=\"./page_main.php\">%s</a> |\n <a href=\"./page_show_feeds.php\">%s</a> |\n <a href=\"./page_search.php\">%s</a> |\n <a href=\"./index.html\">%s</a> |\n <a href=\"./index.html\">%s</a> |\n <a href=\"./page_login.php\" class=\"highlight\">%s</a> |\n <a href=\"./page_register.php\">%s</a>", _("Home"), _("Show Feeds"), _("Search"), _("Show TAGs"), _("About"), _("Login"), _("Register"));
+$design = str_replace("<!-- navigation -->", $navigation, $design);
+
+// main
+$design = str_replace("<!-- main -->", $main, $design);
+
+# footer
+// footer
+$footer = sprintf(" <span class=\"doNotPrint\">\n For comments or questions about this website, please\n <a href=\"mailto:c1...@us...\" title=\"the developsers email adress\">email the Webmaster</a><br />\n </span>\n\n <!-- <strong>URI »</strong> http://domain.is.invalid/prosimii/index.html -->\n • <strong>Updated »</strong> 2006-Oct-25 18:42 +1000 •");
+$design = str_replace("<!-- footer -->", $footer, $design);
+
+echo $design;
+
+function filterInput($input, $type) {
+ $inhalt = trim($inhalt);
+ $inhalt = htmlspecialchars($inhalt);
+ switch ($type) {
+ case "username" :
+
+ break;
+ case "mail" :
+
+ break;
+ }
+
+ return $inhalt;
+}
+?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|