Major Refactoring: finish transforming into object . Put and into header.inc.php.
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@199 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
parent
f7ccbde310
commit
d6889066c0
68 changed files with 119 additions and 294 deletions
|
@ -20,10 +20,7 @@
|
||||||
|
|
||||||
require_once('header.inc.php');
|
require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
|
||||||
$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
|
|
||||||
|
|
||||||
$tplVars = array();
|
|
||||||
$tplVars['subtitle'] = T_('About');
|
$tplVars['subtitle'] = T_('About');
|
||||||
|
|
||||||
$templateservice->loadTemplate('about.tpl', $tplVars);
|
$templateservice->loadTemplate('about.tpl', $tplVars);
|
||||||
?>
|
?>
|
|
@ -20,14 +20,9 @@
|
||||||
require_once('header.inc.php');
|
require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$userservice = & ServiceFactory :: getServiceInstance('UserService');
|
|
||||||
$bookmark2tagservice = & ServiceFactory :: getServiceInstance('Bookmark2Tagservice');
|
$bookmark2tagservice = & ServiceFactory :: getServiceInstance('Bookmark2Tagservice');
|
||||||
$bookmarkservice = & ServiceFactory :: getServiceInstance('BookmarkService');
|
$bookmarkservice = & ServiceFactory :: getServiceInstance('BookmarkService');
|
||||||
$tag2tagservice = & ServiceFactory :: getServiceInstance('Tag2TagService');
|
$tag2tagservice = & ServiceFactory :: getServiceInstance('Tag2TagService');
|
||||||
$templateservice = & ServiceFactory :: getServiceInstance('TemplateService');
|
|
||||||
|
|
||||||
/* Managing current logged user */
|
|
||||||
$currentUser = $userservice->getCurrentObjectUser();
|
|
||||||
|
|
||||||
// Header variables
|
// Header variables
|
||||||
$tplVars['subtitle'] = T_('Manage users');
|
$tplVars['subtitle'] = T_('Manage users');
|
||||||
|
|
|
@ -26,7 +26,6 @@ require_once('../header.inc.php');
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
|
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
|
||||||
$bookmarkservice =& ServiceFactory::getServiceInstance('TagService');
|
$bookmarkservice =& ServiceFactory::getServiceInstance('TagService');
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
$tagstatservice =& ServiceFactory::getServiceInstance('TagStatService');
|
$tagstatservice =& ServiceFactory::getServiceInstance('TagStatService');
|
||||||
|
|
||||||
/* Managing all possible inputs */
|
/* Managing all possible inputs */
|
||||||
|
|
|
@ -23,23 +23,16 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
require_once('../header.inc.php');
|
require_once('../header.inc.php');
|
||||||
|
|
||||||
|
/* Service creation: only useful services are created */
|
||||||
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
|
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
|
||||||
$bookmarkservice =& ServiceFactory::getServiceInstance('TagService');
|
$bookmarkservice =& ServiceFactory::getServiceInstance('TagService');
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
|
|
||||||
if ($userservice->isLoggedOn()) {
|
|
||||||
$loggedon = true;
|
|
||||||
$currentUser = $userservice->getCurrentUser();
|
|
||||||
$currentUserID = $userservice->getCurrentUserId();
|
|
||||||
$currentUsername = $currentUser[$userservice->getFieldName('username')];
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
{identifier:"tag",
|
{identifier:"tag",
|
||||||
items: [
|
items: [
|
||||||
<?php
|
<?php
|
||||||
$listTags = $b2tservice->getPopularTags($currentUserID, 1000, $currentUserID);
|
$listTags = $b2tservice->getPopularTags($userservice->getCurrentUserId(), 1000, $userservice->getCurrentUserId());
|
||||||
foreach($listTags as $t) {
|
foreach($listTags as $t) {
|
||||||
echo "{tag: \"".$t['tag']."\"},";
|
echo "{tag: \"".$t['tag']."\"},";
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ header("Cache-Control: no-cache, must-revalidate");
|
||||||
require_once('header.inc.php');
|
require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$userservice = & ServiceFactory :: getServiceInstance('UserService');
|
//No specific services
|
||||||
|
|
||||||
/* Managing all possible inputs */
|
/* Managing all possible inputs */
|
||||||
isset($_GET['username']) ? define('GET_USERNAME', $_GET['username']): define('GET_USERNAME', '');
|
isset($_GET['username']) ? define('GET_USERNAME', $_GET['username']): define('GET_USERNAME', '');
|
||||||
|
|
|
@ -22,9 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
require_once('header.inc.php');
|
require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
|
|
||||||
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
|
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
|
$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,7 +46,6 @@ if ($usecache) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Header variables
|
// Header variables
|
||||||
$tplvars = array();
|
|
||||||
$pagetitle = T_('All Tags');
|
$pagetitle = T_('All Tags');
|
||||||
|
|
||||||
if (isset($user) && $user != '') {
|
if (isset($user) && $user != '') {
|
||||||
|
|
|
@ -12,8 +12,9 @@ if($GLOBALS['enableGoogleCustomSearch'] == false) {
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Service creation: only useful services are created */
|
||||||
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// Restrict to admins?
|
// Restrict to admins?
|
||||||
|
@ -36,8 +37,6 @@ $tag = NULL;
|
||||||
// Get the posts relevant to the passed-in variables.
|
// Get the posts relevant to the passed-in variables.
|
||||||
$bookmarks =& $bookmarkservice->getBookmarks(0, NULL, NULL, $tag, NULL, getSortOrder());
|
$bookmarks =& $bookmarkservice->getBookmarks(0, NULL, NULL, $tag, NULL, getSortOrder());
|
||||||
|
|
||||||
$currentuser = $userservice->getCurrentUser();
|
|
||||||
$currentusername = $currentuser[$userservice->getFieldName('username')];
|
|
||||||
|
|
||||||
// Set up the plain file and output all the posts.
|
// Set up the plain file and output all the posts.
|
||||||
header('Content-Type: text/plain');
|
header('Content-Type: text/plain');
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
// Force HTTP authentication first!
|
// Force HTTP authentication first!
|
||||||
require_once('httpauth.inc.php');
|
require_once('httpauth.inc.php');
|
||||||
require_once('../header.inc.php');
|
require_once('../header.inc.php');
|
||||||
|
|
||||||
|
/* Service creation: only useful services are created */
|
||||||
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
|
|
||||||
// Check to see if a tag was specified.
|
// Check to see if a tag was specified.
|
||||||
if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))
|
if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))
|
||||||
|
@ -20,8 +20,6 @@ else
|
||||||
// Get the posts relevant to the passed-in variables.
|
// Get the posts relevant to the passed-in variables.
|
||||||
$bookmarks =& $bookmarkservice->getBookmarks(0, NULL, $userservice->getCurrentUserId(), $tag, NULL, getSortOrder());
|
$bookmarks =& $bookmarkservice->getBookmarks(0, NULL, $userservice->getCurrentUserId(), $tag, NULL, getSortOrder());
|
||||||
|
|
||||||
$currentuser = $userservice->getCurrentUser();
|
|
||||||
$currentusername = $currentuser[$userservice->getFieldName('username')];
|
|
||||||
|
|
||||||
// Set up the XML file and output all the posts.
|
// Set up the XML file and output all the posts.
|
||||||
header('Content-Type: text/html');
|
header('Content-Type: text/html');
|
||||||
|
@ -29,7 +27,7 @@ echo '<!DOCTYPE NETSCAPE-Bookmark-file-1>'."\r\n";
|
||||||
echo '<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">';
|
echo '<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">';
|
||||||
echo '<!-- This is an automatically generated file. -->'."\r\n";
|
echo '<!-- This is an automatically generated file. -->'."\r\n";
|
||||||
echo '<TITLE>Bookmarks</TITLE>'."\r\n";
|
echo '<TITLE>Bookmarks</TITLE>'."\r\n";
|
||||||
echo '<H1 LAST_MODIFIED="'. date('U') .'">Bookmarks for '. htmlspecialchars($currentusername) .''. (is_null($tag) ? '' : ' tag="'. htmlspecialchars($tag) .'"') ." from " . $sitename ."</H1>\r\n";
|
echo '<H1 LAST_MODIFIED="'. date('U') .'">Bookmarks for '. htmlspecialchars($currentUser->getUsername()) .''. (is_null($tag) ? '' : ' tag="'. htmlspecialchars($tag) .'"') ." from " . $sitename ."</H1>\r\n";
|
||||||
echo '<DL><p>'."\r\n";
|
echo '<DL><p>'."\r\n";
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,37 +1,33 @@
|
||||||
<?php
|
<?php
|
||||||
require_once('../header.inc.php');
|
require_once('../header.inc.php');
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
|
|
||||||
// Provides HTTP Basic authentication of a user, and sets two variables, sId and username,
|
// Provides HTTP Basic authentication of a user, and sets two variables, sId and username,
|
||||||
// with the user's info.
|
// with the user's info.
|
||||||
|
|
||||||
function authenticate() {
|
function authenticate() {
|
||||||
header('WWW-Authenticate: Basic realm="SemanticScuttle API"');
|
header('WWW-Authenticate: Basic realm="SemanticScuttle API"');
|
||||||
header('HTTP/1.0 401 Unauthorized');
|
header('HTTP/1.0 401 Unauthorized');
|
||||||
|
|
||||||
die(T_("Use of the API calls requires authentication."));
|
die(T_("Use of the API calls requires authentication."));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$userservice->isLoggedOn()) {
|
if(!$userservice->isLoggedOn()) {
|
||||||
/* Maybe we have caught authentication data in $_SERVER['REMOTE_USER']
|
/* Maybe we have caught authentication data in $_SERVER['REMOTE_USER']
|
||||||
( Inspired by http://www.yetanothercommunitysystem.com/article-321-regle-comment-utiliser-l-authentification-http-en-php-chez-ovh ) */
|
( Inspired by http://www.yetanothercommunitysystem.com/article-321-regle-comment-utiliser-l-authentification-http-en-php-chez-ovh ) */
|
||||||
if((!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW']))
|
if((!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW']))
|
||||||
&& preg_match('/Basic\s+(.*)$/i', $_SERVER['REMOTE_USER'], $matches)) {
|
&& preg_match('/Basic\s+(.*)$/i', $_SERVER['REMOTE_USER'], $matches)) {
|
||||||
list($name, $password) = explode(':', base64_decode($matches[1]));
|
list($name, $password) = explode(':', base64_decode($matches[1]));
|
||||||
$_SERVER['PHP_AUTH_USER'] = strip_tags($name);
|
$_SERVER['PHP_AUTH_USER'] = strip_tags($name);
|
||||||
$_SERVER['PHP_AUTH_PW'] = strip_tags($password);
|
$_SERVER['PHP_AUTH_PW'] = strip_tags($password);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($_SERVER['PHP_AUTH_USER'])) {
|
if (!isset($_SERVER['PHP_AUTH_USER'])) {
|
||||||
authenticate();
|
authenticate();
|
||||||
} else {
|
} else {
|
||||||
require_once('../header.inc.php');
|
$login = $userservice->login($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']);
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
if (!$login) {
|
||||||
|
authenticate();
|
||||||
$login = $userservice->login($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']);
|
}
|
||||||
if (!$login) {
|
|
||||||
authenticate();
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
require_once('httpauth.inc.php');
|
require_once('httpauth.inc.php');
|
||||||
require_once('../header.inc.php');
|
require_once('../header.inc.php');
|
||||||
|
|
||||||
|
/* Service creation: only useful services are created */
|
||||||
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
|
|
||||||
// Get all the bookmark's passed-in information
|
// Get all the bookmark's passed-in information
|
||||||
if (isset($_REQUEST['url']) && (trim($_REQUEST['url']) != ''))
|
if (isset($_REQUEST['url']) && (trim($_REQUEST['url']) != ''))
|
||||||
|
|
|
@ -8,8 +8,9 @@
|
||||||
require_once('httpauth.inc.php');
|
require_once('httpauth.inc.php');
|
||||||
require_once('../header.inc.php');
|
require_once('../header.inc.php');
|
||||||
|
|
||||||
|
/* Service creation: only useful services are created */
|
||||||
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
|
|
||||||
// Check to see if a tag was specified.
|
// Check to see if a tag was specified.
|
||||||
if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))
|
if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))
|
||||||
|
@ -20,13 +21,10 @@ else
|
||||||
// Get the posts relevant to the passed-in variables.
|
// Get the posts relevant to the passed-in variables.
|
||||||
$bookmarks =& $bookmarkservice->getBookmarks(0, NULL, $userservice->getCurrentUserId(), $tag);
|
$bookmarks =& $bookmarkservice->getBookmarks(0, NULL, $userservice->getCurrentUserId(), $tag);
|
||||||
|
|
||||||
$currentuser = $userservice->getCurrentUser();
|
|
||||||
$currentusername = $currentuser[$userservice->getFieldName('username')];
|
|
||||||
|
|
||||||
// Set up the XML file and output all the posts.
|
// Set up the XML file and output all the posts.
|
||||||
header('Content-Type: text/xml');
|
header('Content-Type: text/xml');
|
||||||
echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
|
echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
|
||||||
echo '<posts update="'. gmdate('Y-m-d\TH:i:s\Z') .'" user="'. htmlspecialchars($currentusername) .'"'. (is_null($tag) ? '' : ' tag="'. htmlspecialchars($tag) .'"') .">\r\n";
|
echo '<posts update="'. gmdate('Y-m-d\TH:i:s\Z') .'" user="'. htmlspecialchars($currentUser->getUsername()) .'"'. (is_null($tag) ? '' : ' tag="'. htmlspecialchars($tag) .'"') .">\r\n";
|
||||||
|
|
||||||
foreach($bookmarks['bookmarks'] as $row) {
|
foreach($bookmarks['bookmarks'] as $row) {
|
||||||
if (is_null($row['bDescription']) || (trim($row['bDescription']) == ''))
|
if (is_null($row['bDescription']) || (trim($row['bDescription']) == ''))
|
||||||
|
|
|
@ -6,8 +6,9 @@
|
||||||
require_once('httpauth.inc.php');
|
require_once('httpauth.inc.php');
|
||||||
require_once('../header.inc.php');
|
require_once('../header.inc.php');
|
||||||
|
|
||||||
|
/* Service creation: only useful services are created */
|
||||||
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
|
|
||||||
// Check to see if a tag was specified.
|
// Check to see if a tag was specified.
|
||||||
if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))
|
if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))
|
||||||
|
@ -18,13 +19,10 @@ else
|
||||||
// Get the posts relevant to the passed-in variables.
|
// Get the posts relevant to the passed-in variables.
|
||||||
$bookmarks =& $bookmarkservice->getBookmarks(0, NULL, $userservice->getCurrentUserId(), $tag);
|
$bookmarks =& $bookmarkservice->getBookmarks(0, NULL, $userservice->getCurrentUserId(), $tag);
|
||||||
|
|
||||||
$currentuser = $userservice->getCurrentUser();
|
|
||||||
$currentusername = $currentuser[$userservice->getFieldName('username')];
|
|
||||||
|
|
||||||
// Set up the XML file and output all the tags.
|
// Set up the XML file and output all the tags.
|
||||||
header('Content-Type: text/xml');
|
header('Content-Type: text/xml');
|
||||||
echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
|
echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
|
||||||
echo '<dates tag="'. (is_null($tag) ? '' : filter($tag, 'xml')) .'" user="'. filter($currentusername, 'xml') ."\">\r\n";
|
echo '<dates tag="'. (is_null($tag) ? '' : filter($tag, 'xml')) .'" user="'. filter($currentUser->getUsername(), 'xml') ."\">\r\n";
|
||||||
|
|
||||||
$lastdate = NULL;
|
$lastdate = NULL;
|
||||||
foreach($bookmarks['bookmarks'] as $row) {
|
foreach($bookmarks['bookmarks'] as $row) {
|
||||||
|
|
|
@ -10,8 +10,9 @@
|
||||||
require_once('httpauth.inc.php');
|
require_once('httpauth.inc.php');
|
||||||
require_once('../header.inc.php');
|
require_once('../header.inc.php');
|
||||||
|
|
||||||
|
/* Service creation: only useful services are created */
|
||||||
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
|
|
||||||
// Note that del.icio.us only errors out if no URL was passed in; there's no error on attempting
|
// Note that del.icio.us only errors out if no URL was passed in; there's no error on attempting
|
||||||
// to delete a bookmark you don't have.
|
// to delete a bookmark you don't have.
|
||||||
|
|
|
@ -13,8 +13,9 @@
|
||||||
require_once('httpauth.inc.php');
|
require_once('httpauth.inc.php');
|
||||||
require_once('../header.inc.php');
|
require_once('../header.inc.php');
|
||||||
|
|
||||||
|
/* Service creation: only useful services are created */
|
||||||
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
|
|
||||||
// Check to see if a tag was specified.
|
// Check to see if a tag was specified.
|
||||||
if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))
|
if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))
|
||||||
|
@ -32,13 +33,11 @@ $dtend = date('Y-m-d H:i:s', strtotime($dtstart .'+1 day'));
|
||||||
// Get the posts relevant to the passed-in variables.
|
// Get the posts relevant to the passed-in variables.
|
||||||
$bookmarks =& $bookmarkservice->getBookmarks(0, NULL, $userservice->getCurrentUserId(), $tag, NULL, NULL, NULL, $dtstart, $dtend);
|
$bookmarks =& $bookmarkservice->getBookmarks(0, NULL, $userservice->getCurrentUserId(), $tag, NULL, NULL, NULL, $dtstart, $dtend);
|
||||||
|
|
||||||
$currentuser = $userservice->getCurrentUser();
|
|
||||||
$currentusername = $currentuser[$userservice->getFieldName('username')];
|
|
||||||
|
|
||||||
// Set up the XML file and output all the tags.
|
// Set up the XML file and output all the tags.
|
||||||
header('Content-Type: text/xml');
|
header('Content-Type: text/xml');
|
||||||
echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
|
echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
|
||||||
echo '<posts'. (is_null($dtstart) ? '' : ' dt="'. $dtstart .'"') .' tag="'. (is_null($tag) ? '' : filter($tag, 'xml')) .'" user="'. filter($currentusername, 'xml') ."\">\r\n";
|
echo '<posts'. (is_null($dtstart) ? '' : ' dt="'. $dtstart .'"') .' tag="'. (is_null($tag) ? '' : filter($tag, 'xml')) .'" user="'. filter($currentUser->getUsername(), 'xml') ."\">\r\n";
|
||||||
|
|
||||||
foreach($bookmarks['bookmarks'] as $row) {
|
foreach($bookmarks['bookmarks'] as $row) {
|
||||||
if (is_null($row['bDescription']) || (trim($row['bDescription']) == ''))
|
if (is_null($row['bDescription']) || (trim($row['bDescription']) == ''))
|
||||||
|
|
|
@ -10,8 +10,9 @@ $countMax = 100;
|
||||||
require_once('httpauth.inc.php');
|
require_once('httpauth.inc.php');
|
||||||
require_once('../header.inc.php');
|
require_once('../header.inc.php');
|
||||||
|
|
||||||
|
/* Service creation: only useful services are created */
|
||||||
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
|
|
||||||
// Check to see if a tag was specified.
|
// Check to see if a tag was specified.
|
||||||
if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))
|
if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))
|
||||||
|
@ -33,13 +34,11 @@ if (isset($_REQUEST['count']) && (intval($_REQUEST['count']) != 0)) {
|
||||||
// Get the posts relevant to the passed-in variables.
|
// Get the posts relevant to the passed-in variables.
|
||||||
$bookmarks =& $bookmarkservice->getBookmarks(0, $count, $userservice->getCurrentUserId(), $tag);
|
$bookmarks =& $bookmarkservice->getBookmarks(0, $count, $userservice->getCurrentUserId(), $tag);
|
||||||
|
|
||||||
$currentuser = $userservice->getCurrentUser();
|
|
||||||
$currentusername = $currentuser[$userservice->getFieldName('username')];
|
|
||||||
|
|
||||||
// Set up the XML file and output all the tags.
|
// Set up the XML file and output all the tags.
|
||||||
header('Content-Type: text/xml');
|
header('Content-Type: text/xml');
|
||||||
echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
|
echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
|
||||||
echo '<posts tag="'. (is_null($tag) ? '' : filter($tag, 'xml')) .'" user="'. filter($currentusername, 'xml') ."\">\r\n";
|
echo '<posts tag="'. (is_null($tag) ? '' : filter($tag, 'xml')) .'" user="'. filter($currentUser->getUsername(), 'xml') ."\">\r\n";
|
||||||
|
|
||||||
foreach($bookmarks['bookmarks'] as $row) {
|
foreach($bookmarks['bookmarks'] as $row) {
|
||||||
if (is_null($row['bDescription']) || (trim($row['bDescription']) == ''))
|
if (is_null($row['bDescription']) || (trim($row['bDescription']) == ''))
|
||||||
|
|
|
@ -8,14 +8,13 @@
|
||||||
require_once('httpauth.inc.php');
|
require_once('httpauth.inc.php');
|
||||||
require_once('../header.inc.php');
|
require_once('../header.inc.php');
|
||||||
|
|
||||||
|
/* Service creation: only useful services are created */
|
||||||
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
|
|
||||||
// Get the posts relevant to the passed-in variables.
|
// Get the posts relevant to the passed-in variables.
|
||||||
$bookmarks =& $bookmarkservice->getBookmarks(0, 1, $userservice->getCurrentUserId());
|
$bookmarks =& $bookmarkservice->getBookmarks(0, 1, $userservice->getCurrentUserId());
|
||||||
|
|
||||||
$currentuser = $userservice->getCurrentUser();
|
|
||||||
$currentusername = $currentuser[$userservice->getFieldName('username')];
|
|
||||||
|
|
||||||
// Set up the XML file and output all the tags.
|
// Set up the XML file and output all the tags.
|
||||||
header('Content-Type: text/xml');
|
header('Content-Type: text/xml');
|
||||||
|
|
|
@ -8,8 +8,9 @@
|
||||||
require_once('httpauth.inc.php');
|
require_once('httpauth.inc.php');
|
||||||
require_once('../header.inc.php');
|
require_once('../header.inc.php');
|
||||||
|
|
||||||
|
/* Service creation: only useful services are created */
|
||||||
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
|
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
|
|
||||||
// Get the tags relevant to the passed-in variables.
|
// Get the tags relevant to the passed-in variables.
|
||||||
$tags =& $b2tservice->getTags($userservice->getCurrentUserId());
|
$tags =& $b2tservice->getTags($userservice->getCurrentUserId());
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
require_once('httpauth.inc.php');
|
require_once('httpauth.inc.php');
|
||||||
require_once('../header.inc.php');
|
require_once('../header.inc.php');
|
||||||
|
|
||||||
|
/* Service creation: only useful services are created */
|
||||||
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
|
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
|
|
||||||
// Get the tag info.
|
// Get the tag info.
|
||||||
if (isset($_REQUEST['old']) && (trim($_REQUEST['old']) != ''))
|
if (isset($_REQUEST['old']) && (trim($_REQUEST['old']) != ''))
|
||||||
|
|
|
@ -23,8 +23,6 @@ require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$bookmarkservice = & ServiceFactory :: getServiceInstance('BookmarkService');
|
$bookmarkservice = & ServiceFactory :: getServiceInstance('BookmarkService');
|
||||||
$templateservice = & ServiceFactory :: getServiceInstance('TemplateService');
|
|
||||||
$userservice = & ServiceFactory :: getServiceInstance('UserService');
|
|
||||||
$cdservice = & ServiceFactory :: getServiceInstance('CommonDescriptionService');
|
$cdservice = & ServiceFactory :: getServiceInstance('CommonDescriptionService');
|
||||||
|
|
||||||
/* Managing all possible inputs */
|
/* Managing all possible inputs */
|
||||||
|
@ -47,11 +45,9 @@ if(!isset($_POST['referrer'])) {
|
||||||
list ($url, $hash) = explode('/', $_SERVER['PATH_INFO']);
|
list ($url, $hash) = explode('/', $_SERVER['PATH_INFO']);
|
||||||
$template = 'bookmarkcommondescriptionedit.tpl';
|
$template = 'bookmarkcommondescriptionedit.tpl';
|
||||||
|
|
||||||
//$logged_on_user = $userservice->getCurrentUser();
|
|
||||||
$currentObjectUser = $userservice->getCurrentObjectUser();
|
|
||||||
|
|
||||||
//permissions
|
//permissions
|
||||||
if(is_null($currentObjectUser)) {
|
if(is_null($currentUser)) {
|
||||||
$tplVars['error'] = T_('Permission denied.');
|
$tplVars['error'] = T_('Permission denied.');
|
||||||
$templateservice->loadTemplate('error.500.tpl', $tplVars);
|
$templateservice->loadTemplate('error.500.tpl', $tplVars);
|
||||||
exit();
|
exit();
|
||||||
|
@ -59,7 +55,7 @@ if(is_null($currentObjectUser)) {
|
||||||
|
|
||||||
if (POST_CONFIRM) {
|
if (POST_CONFIRM) {
|
||||||
if (strlen($hash)>0 &&
|
if (strlen($hash)>0 &&
|
||||||
$cdservice->addBookmarkDescription(POST_HASH, stripslashes(POST_TITLE), stripslashes(POST_DESCRIPTION), $currentObjectUser->getId(), time())
|
$cdservice->addBookmarkDescription(POST_HASH, stripslashes(POST_TITLE), stripslashes(POST_DESCRIPTION), $currentUser->getId(), time())
|
||||||
) {
|
) {
|
||||||
$tplVars['msg'] = T_('Bookmark common description updated');
|
$tplVars['msg'] = T_('Bookmark common description updated');
|
||||||
header('Location: '. POST_REFERRER);
|
header('Location: '. POST_REFERRER);
|
||||||
|
@ -68,7 +64,6 @@ if (POST_CONFIRM) {
|
||||||
$template = 'error.500.tpl';
|
$template = 'error.500.tpl';
|
||||||
}
|
}
|
||||||
} elseif (POST_CANCEL) {
|
} elseif (POST_CANCEL) {
|
||||||
$logged_on_user = $userservice->getCurrentUser();
|
|
||||||
header('Location: '. POST_REFERRER);
|
header('Location: '. POST_REFERRER);
|
||||||
} else {
|
} else {
|
||||||
$bkm = $bookmarkservice->getBookmarkByHash($hash);
|
$bkm = $bookmarkservice->getBookmarkByHash($hash);
|
||||||
|
|
|
@ -23,12 +23,8 @@ require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
||||||
$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
|
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
|
$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
|
||||||
|
|
||||||
$tplVars = array();
|
|
||||||
|
|
||||||
/* Managing all possible inputs */
|
/* Managing all possible inputs */
|
||||||
isset($_GET['action']) ? define('GET_ACTION', $_GET['action']): define('GET_ACTION', '');
|
isset($_GET['action']) ? define('GET_ACTION', $_GET['action']): define('GET_ACTION', '');
|
||||||
isset($_POST['submitted']) ? define('POST_SUBMITTED', $_POST['submitted']): define('POST_SUBMITTED', '');
|
isset($_POST['submitted']) ? define('POST_SUBMITTED', $_POST['submitted']): define('POST_SUBMITTED', '');
|
||||||
|
@ -59,12 +55,9 @@ if ((GET_ACTION == "add") && !$userservice->isLoggedOn()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($userservice->isLoggedOn()) {
|
if ($userservice->isLoggedOn()) {
|
||||||
//$currentUser = $userservice->getCurrentUser();
|
$currentUser = $userservice->getCurrentObjectUser();
|
||||||
//$currentUserID = $userservice->getCurrentUserId();
|
$currentUserID = $currentUser->getId();
|
||||||
//$currentUsername = $currentUser[$userservice->getFieldName('username')];
|
$currentUsername = $currentUser->getUsername();
|
||||||
$currentObjectUser = $userservice->getCurrentObjectUser();
|
|
||||||
$currentUserID = $currentObjectUser->getId();
|
|
||||||
$currentUsername = $currentObjectUser->getUsername();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -197,7 +190,7 @@ if ($templatename == 'editbookmark.tpl') {
|
||||||
}
|
}
|
||||||
} else if ($user && GET_POPUP == '') {
|
} else if ($user && GET_POPUP == '') {
|
||||||
|
|
||||||
$tplVars['sidebar_blocks'] = array('profile', 'watchstatus');
|
$tplVars['sidebar_blocks'] = array('watchstatus');
|
||||||
|
|
||||||
if (!$cat) {
|
if (!$cat) {
|
||||||
$cat = NULL;
|
$cat = NULL;
|
||||||
|
|
9
edit.php
9
edit.php
|
@ -23,8 +23,6 @@ require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$bookmarkservice = & ServiceFactory :: getServiceInstance('BookmarkService');
|
$bookmarkservice = & ServiceFactory :: getServiceInstance('BookmarkService');
|
||||||
$templateservice = & ServiceFactory :: getServiceInstance('TemplateService');
|
|
||||||
$userservice = & ServiceFactory :: getServiceInstance('UserService');
|
|
||||||
|
|
||||||
/* Managing all possible inputs */
|
/* Managing all possible inputs */
|
||||||
isset($_POST['submitted']) ? define('POST_SUBMITTED', $_POST['submitted']): define('POST_SUBMITTED', '');
|
isset($_POST['submitted']) ? define('POST_SUBMITTED', $_POST['submitted']): define('POST_SUBMITTED', '');
|
||||||
|
@ -40,9 +38,6 @@ isset($_GET['popup']) ? define('GET_POPUP', $_GET['popup']): define('GET_POPUP',
|
||||||
isset($_POST['popup']) ? define('POST_POPUP', $_POST['popup']): define('POST_POPUP', '');
|
isset($_POST['popup']) ? define('POST_POPUP', $_POST['popup']): define('POST_POPUP', '');
|
||||||
isset($_POST['referrer']) ? define('POST_REFERRER', $_POST['referrer']): define('POST_REFERRER', '');
|
isset($_POST['referrer']) ? define('POST_REFERRER', $_POST['referrer']): define('POST_REFERRER', '');
|
||||||
|
|
||||||
/* Managing current logged user */
|
|
||||||
$currentObjectUser = $userservice->getCurrentObjectUser();
|
|
||||||
|
|
||||||
|
|
||||||
// Header variables
|
// Header variables
|
||||||
$tplVars['subtitle'] = T_('Edit Bookmark');
|
$tplVars['subtitle'] = T_('Edit Bookmark');
|
||||||
|
@ -81,7 +76,7 @@ if (!($row = $bookmarkservice->getBookmark(intval($bookmark), true))) {
|
||||||
header('Location: '. POST_REFERRER);
|
header('Location: '. POST_REFERRER);
|
||||||
} else {
|
} else {
|
||||||
$tplVars['msg'] = T_('Bookmark saved');
|
$tplVars['msg'] = T_('Bookmark saved');
|
||||||
header('Location: '. createURL('bookmarks', $currentObjectUser->getUsername()));
|
header('Location: '. createURL('bookmarks', $currentUser->getUsername()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,7 +87,7 @@ if (!($row = $bookmarkservice->getBookmark(intval($bookmark), true))) {
|
||||||
if (POST_REFERRER != '') {
|
if (POST_REFERRER != '') {
|
||||||
header('Location: '. POST_REFERRER);
|
header('Location: '. POST_REFERRER);
|
||||||
} else {
|
} else {
|
||||||
header('Location: '. createURL('bookmarks', $currentObjectUser->getUsername()));
|
header('Location: '. createURL('bookmarks', $currentUser->getUsername()));
|
||||||
}
|
}
|
||||||
exit();
|
exit();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -5,8 +5,6 @@ if($GLOBALS['enableGoogleCustomSearch']==false) {
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
|
|
||||||
$userservice = & ServiceFactory :: getServiceInstance('UserService');
|
|
||||||
$currentUser = $userservice->getCurrentObjectUser();
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
|
|
|
@ -37,7 +37,15 @@ T_bindtextdomain($domain, dirname(__FILE__) .'/locales');
|
||||||
T_bind_textdomain_codeset($domain, 'UTF-8');
|
T_bind_textdomain_codeset($domain, 'UTF-8');
|
||||||
T_textdomain($domain);
|
T_textdomain($domain);
|
||||||
|
|
||||||
|
// 4 // Session
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
|
// 5 // Create mandatory services and objects
|
||||||
|
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
||||||
|
$currentUser = $userservice->getCurrentObjectUser();
|
||||||
|
|
||||||
|
$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
|
||||||
|
$tplVars = array();
|
||||||
|
$tplVars['currentUser'] = $currentUser;
|
||||||
|
$tplVars['userservice'] = $userservice;
|
||||||
?>
|
?>
|
||||||
|
|
15
history.php
15
history.php
|
@ -23,32 +23,21 @@ require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
||||||
$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
|
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
|
$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
|
||||||
|
|
||||||
/* Managing all possible inputs */
|
/* Managing all possible inputs */
|
||||||
isset($_GET['page']) ? define('GET_PAGE', $_GET['page']): define('GET_PAGE', 0);
|
isset($_GET['page']) ? define('GET_PAGE', $_GET['page']): define('GET_PAGE', 0);
|
||||||
isset($_GET['sort']) ? define('GET_SORT', $_GET['sort']): define('GET_SORT', '');
|
isset($_GET['sort']) ? define('GET_SORT', $_GET['sort']): define('GET_SORT', '');
|
||||||
|
|
||||||
$tplVars = array();
|
|
||||||
|
|
||||||
@list($url, $hash) = isset($_SERVER['PATH_INFO']) ? explode('/', $_SERVER['PATH_INFO']) : NULL;
|
@list($url, $hash) = isset($_SERVER['PATH_INFO']) ? explode('/', $_SERVER['PATH_INFO']) : NULL;
|
||||||
|
|
||||||
$currentObjectUser = $userservice->getCurrentObjectUser();
|
|
||||||
|
|
||||||
/*$loggedon = false;
|
|
||||||
if ($userservice->isLoggedOn()) {
|
|
||||||
$loggedon = true;
|
|
||||||
$currentUser = $userservice->getCurrentUser();
|
|
||||||
$currentUsername = $currentUser[$userservice->getFieldName('username')];
|
|
||||||
}*/
|
|
||||||
|
|
||||||
if ($usecache) {
|
if ($usecache) {
|
||||||
// Generate hash for caching on
|
// Generate hash for caching on
|
||||||
$hashtext = $_SERVER['REQUEST_URI'];
|
$hashtext = $_SERVER['REQUEST_URI'];
|
||||||
if ($userservice->isLoggedOn()) {
|
if ($userservice->isLoggedOn()) {
|
||||||
$hashtext .= $currentObjectUser->getUsername();
|
$hashtext .= $currentUser->getUsername();
|
||||||
}
|
}
|
||||||
$cachehash = md5($hashtext);
|
$cachehash = md5($hashtext);
|
||||||
|
|
||||||
|
@ -85,7 +74,7 @@ if ($bookmark =& $bookmarkservice->getBookmarkByHash($hash)) {
|
||||||
$tplVars['nav_url'] = createURL('history', $hash .'/%3$s');
|
$tplVars['nav_url'] = createURL('history', $hash .'/%3$s');
|
||||||
$tplVars['rsschannels'] = array();
|
$tplVars['rsschannels'] = array();
|
||||||
if($userservice->isLoggedOn()) {
|
if($userservice->isLoggedOn()) {
|
||||||
$tplVars['user'] = $currentObjectUser->getUsername();
|
$tplVars['user'] = $currentUser->getUsername();
|
||||||
} else {
|
} else {
|
||||||
$tplVars['user'] = '';
|
$tplVars['user'] = '';
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,9 +22,7 @@
|
||||||
require_once('header.inc.php');
|
require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
// No specific services
|
||||||
$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
|
|
||||||
|
|
||||||
|
|
||||||
/* Managing all possible inputs */
|
/* Managing all possible inputs */
|
||||||
// First input is $_FILES
|
// First input is $_FILES
|
||||||
|
@ -32,8 +30,6 @@ $templateservice =& ServiceFactory::getServiceInstance('TemplateService');
|
||||||
isset($_POST['status']) ? define('POST_STATUS', $_POST['status']): define('POST_STATUS', '');
|
isset($_POST['status']) ? define('POST_STATUS', $_POST['status']): define('POST_STATUS', '');
|
||||||
|
|
||||||
|
|
||||||
$tplVars = array();
|
|
||||||
|
|
||||||
if ($userservice->isLoggedOn() && sizeof($_FILES) > 0 && $_FILES['userfile']['size'] > 0) {
|
if ($userservice->isLoggedOn() && sizeof($_FILES) > 0 && $_FILES['userfile']['size'] > 0) {
|
||||||
$userinfo = $userservice->getCurrentObjectUser();
|
$userinfo = $userservice->getCurrentObjectUser();
|
||||||
|
|
||||||
|
@ -72,7 +68,6 @@ function startElement($parser, $name, $attrs) {
|
||||||
global $depth, $status, $tplVars, $userservice;
|
global $depth, $status, $tplVars, $userservice;
|
||||||
|
|
||||||
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
|
|
||||||
if ($name == 'POST') {
|
if ($name == 'POST') {
|
||||||
while(list($attrTitle, $attrVal) = each($attrs)) {
|
while(list($attrTitle, $attrVal) = each($attrs)) {
|
||||||
|
|
|
@ -23,8 +23,6 @@ require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
|
|
||||||
|
|
||||||
|
|
||||||
/* Managing all possible inputs */
|
/* Managing all possible inputs */
|
||||||
|
@ -32,8 +30,6 @@ $templateservice =& ServiceFactory::getServiceInstance('TemplateService');
|
||||||
// Other inputs
|
// Other inputs
|
||||||
isset($_POST['status']) ? define('POST_STATUS', $_POST['status']): define('POST_STATUS', '');
|
isset($_POST['status']) ? define('POST_STATUS', $_POST['status']): define('POST_STATUS', '');
|
||||||
|
|
||||||
|
|
||||||
$tplVars = array();
|
|
||||||
$countImportedBookmarks = 0;
|
$countImportedBookmarks = 0;
|
||||||
$tplVars['msg'] = '';
|
$tplVars['msg'] = '';
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,6 @@
|
||||||
require_once('header.inc.php');
|
require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
|
|
||||||
$tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService');
|
$tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService');
|
||||||
|
|
||||||
/* Managing current logged user */
|
/* Managing current logged user */
|
||||||
|
@ -33,8 +31,6 @@ $currentUser = $userservice->getCurrentObjectUser();
|
||||||
/* Managing all possible inputs */
|
/* Managing all possible inputs */
|
||||||
// First input is $_FILES
|
// First input is $_FILES
|
||||||
|
|
||||||
|
|
||||||
$tplVars = array();
|
|
||||||
$tplVars['msg'] = '';
|
$tplVars['msg'] = '';
|
||||||
|
|
||||||
if ($userservice->isLoggedOn() && sizeof($_FILES) > 0 && $_FILES['userfile']['size'] > 0) {
|
if ($userservice->isLoggedOn() && sizeof($_FILES) > 0 && $_FILES['userfile']['size'] > 0) {
|
||||||
|
|
|
@ -24,8 +24,6 @@ require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
||||||
$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
|
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
|
$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
|
||||||
|
|
||||||
/* Managing all possible inputs */
|
/* Managing all possible inputs */
|
||||||
|
@ -35,7 +33,6 @@ isset($_GET['sort']) ? define('GET_SORT', $_GET['sort']): define('GET_SORT', '')
|
||||||
|
|
||||||
|
|
||||||
// Logout action
|
// Logout action
|
||||||
$tplvars = array();
|
|
||||||
if (GET_ACTION == "logout") {
|
if (GET_ACTION == "logout") {
|
||||||
$userservice->logout();
|
$userservice->logout();
|
||||||
$tplvars['msg'] = T_('You have now logged out');
|
$tplvars['msg'] = T_('You have now logged out');
|
||||||
|
|
|
@ -23,8 +23,7 @@ require_once('header.inc.php');
|
||||||
|
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
// No specific services
|
||||||
$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
|
|
||||||
|
|
||||||
|
|
||||||
/* Managing all possible inputs */
|
/* Managing all possible inputs */
|
||||||
|
@ -34,9 +33,6 @@ isset($_POST['username']) ? define('POST_USERNAME', $_POST['username']): define(
|
||||||
isset($_POST['password']) ? define('POST_PASSWORD', $_POST['password']): define('POST_PASSWORD', '');
|
isset($_POST['password']) ? define('POST_PASSWORD', $_POST['password']): define('POST_PASSWORD', '');
|
||||||
isset($_POST['query']) ? define('POST_QUERY', $_POST['query']): define('POST_QUERY', '');
|
isset($_POST['query']) ? define('POST_QUERY', $_POST['query']): define('POST_QUERY', '');
|
||||||
|
|
||||||
|
|
||||||
$tplVars = array();
|
|
||||||
|
|
||||||
$keeppass = (POST_KEEPPASS=='yes')?true:false;
|
$keeppass = (POST_KEEPPASS=='yes')?true:false;
|
||||||
|
|
||||||
$login = false;
|
$login = false;
|
||||||
|
|
|
@ -21,17 +21,13 @@
|
||||||
require_once('header.inc.php');
|
require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
// No specific services
|
||||||
$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
|
|
||||||
|
|
||||||
/* Managing all possible inputs */
|
/* Managing all possible inputs */
|
||||||
isset($_POST['submitted']) ? define('POST_SUBMITTED', $_POST['submitted']): define('POST_SUBMITTED', '');
|
isset($_POST['submitted']) ? define('POST_SUBMITTED', $_POST['submitted']): define('POST_SUBMITTED', '');
|
||||||
isset($_POST['username']) ? define('POST_USERNAME', $_POST['username']): define('POST_USERNAME', '');
|
isset($_POST['username']) ? define('POST_USERNAME', $_POST['username']): define('POST_USERNAME', '');
|
||||||
isset($_POST['email']) ? define('POST_EMAIL', $_POST['email']): define('POST_EMAIL', '');
|
isset($_POST['email']) ? define('POST_EMAIL', $_POST['email']): define('POST_EMAIL', '');
|
||||||
|
|
||||||
|
|
||||||
$tplVars = array();
|
|
||||||
|
|
||||||
// IF SUBMITTED
|
// IF SUBMITTED
|
||||||
if (POST_SUBMITTED != '') {
|
if (POST_SUBMITTED != '') {
|
||||||
|
|
||||||
|
|
|
@ -22,14 +22,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
require_once('header.inc.php');
|
require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
|
|
||||||
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
|
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
|
$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
|
||||||
|
|
||||||
/* Managing current logged user */
|
|
||||||
$currentObjectUser = $userservice->getCurrentObjectUser();
|
|
||||||
|
|
||||||
|
|
||||||
list($url, $user) = explode('/', $_SERVER['PATH_INFO']);
|
list($url, $user) = explode('/', $_SERVER['PATH_INFO']);
|
||||||
|
|
||||||
|
@ -37,8 +32,8 @@ if ($usecache) {
|
||||||
// Generate hash for caching on
|
// Generate hash for caching on
|
||||||
$hashtext = $_SERVER['REQUEST_URI'];
|
$hashtext = $_SERVER['REQUEST_URI'];
|
||||||
if ($userservice->isLoggedOn()) {
|
if ($userservice->isLoggedOn()) {
|
||||||
$hashtext .= $currentObjectUser->getId();
|
$hashtext .= $currentUser->getId();
|
||||||
if ($currentObjectUser->getUsername() == $user) {
|
if ($currentUser->getUsername() == $user) {
|
||||||
$hashtext .= $user;
|
$hashtext .= $user;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,7 +44,6 @@ if ($usecache) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Header variables
|
// Header variables
|
||||||
$tplvars = array();
|
|
||||||
$pagetitle = T_('Popular Tags');
|
$pagetitle = T_('Popular Tags');
|
||||||
|
|
||||||
if (isset($user) && $user != '') {
|
if (isset($user) && $user != '') {
|
||||||
|
|
15
profile.php
15
profile.php
|
@ -22,8 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
require_once('header.inc.php');
|
require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
|
// No specific services
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
|
|
||||||
/* Managing all possible inputs */
|
/* Managing all possible inputs */
|
||||||
isset($_POST['submitted']) ? define('POST_SUBMITTED', $_POST['submitted']): define('POST_SUBMITTED', '');
|
isset($_POST['submitted']) ? define('POST_SUBMITTED', $_POST['submitted']): define('POST_SUBMITTED', '');
|
||||||
|
@ -39,12 +38,6 @@ isset($_SESSION['token']) ? define('SESSION_TOKEN', $_SESSION['token']): define(
|
||||||
isset($_SESSION['token_stamp']) ? define('SESSION_TOKENSTAMP', $_SESSION['token_stamp']): define('SESSION_TOKENSTAMP', '');
|
isset($_SESSION['token_stamp']) ? define('SESSION_TOKENSTAMP', $_SESSION['token_stamp']): define('SESSION_TOKENSTAMP', '');
|
||||||
|
|
||||||
|
|
||||||
/* Managing current logged user */
|
|
||||||
$currentObjectUser = $userservice->getCurrentObjectUser();
|
|
||||||
|
|
||||||
|
|
||||||
$tplVars = array();
|
|
||||||
|
|
||||||
@list($url, $user) = isset($_SERVER['PATH_INFO']) ? explode('/', $_SERVER['PATH_INFO']) : NULL;
|
@list($url, $user) = isset($_SERVER['PATH_INFO']) ? explode('/', $_SERVER['PATH_INFO']) : NULL;
|
||||||
|
|
||||||
if ($user) {
|
if ($user) {
|
||||||
|
@ -67,7 +60,7 @@ if ($user) {
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($userservice->isLoggedOn() && $user == $currentObjectUser->getUsername()) {
|
if ($userservice->isLoggedOn() && $user == $currentUser->getUsername()) {
|
||||||
$title = T_('My Profile');
|
$title = T_('My Profile');
|
||||||
} else {
|
} else {
|
||||||
$title = T_('Profile') .': '. $user;
|
$title = T_('Profile') .': '. $user;
|
||||||
|
@ -78,7 +71,7 @@ $tplVars['subtitle'] = $title;
|
||||||
$tplVars['user'] = $user;
|
$tplVars['user'] = $user;
|
||||||
$tplVars['userid'] = $userid;
|
$tplVars['userid'] = $userid;
|
||||||
|
|
||||||
if (POST_SUBMITTED!='' && $currentObjectUser->getId() == $userid) {
|
if (POST_SUBMITTED!='' && $currentUser->getId() == $userid) {
|
||||||
$error = false;
|
$error = false;
|
||||||
$detPass = trim(POST_PASS);
|
$detPass = trim(POST_PASS);
|
||||||
$detPassConf = trim(POST_PASSCONF);
|
$detPassConf = trim(POST_PASSCONF);
|
||||||
|
@ -117,7 +110,7 @@ if (POST_SUBMITTED!='' && $currentObjectUser->getId() == $userid) {
|
||||||
$userinfo = $userservice->getObjectUserByUsername($user);
|
$userinfo = $userservice->getObjectUserByUsername($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$userservice->isLoggedOn() || $currentObjectUser->getId() != $userid) {
|
if (!$userservice->isLoggedOn() || $currentUser->getId() != $userid) {
|
||||||
$templatename = 'profile.tpl.php';
|
$templatename = 'profile.tpl.php';
|
||||||
} else {
|
} else {
|
||||||
//Token Init
|
//Token Init
|
||||||
|
|
|
@ -22,8 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
require_once('header.inc.php');
|
require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
// No specific services
|
||||||
$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
|
|
||||||
|
|
||||||
/* Managing all possible inputs */
|
/* Managing all possible inputs */
|
||||||
isset($_POST['submitted']) ? define('POST_SUBMITTED', $_POST['submitted']): define('POST_SUBMITTED', '');
|
isset($_POST['submitted']) ? define('POST_SUBMITTED', $_POST['submitted']): define('POST_SUBMITTED', '');
|
||||||
|
@ -33,8 +32,6 @@ isset($_POST['email']) ? define('POST_MAIL', $_POST['email']): define('POST_MAIL
|
||||||
isset($_POST['antispamAnswer']) ? define('POST_ANTISPAMANSWER', $_POST['antispamAnswer']): define('POST_ANTISPAMANSWER', '');
|
isset($_POST['antispamAnswer']) ? define('POST_ANTISPAMANSWER', $_POST['antispamAnswer']): define('POST_ANTISPAMANSWER', '');
|
||||||
|
|
||||||
|
|
||||||
$tplVars = array();
|
|
||||||
|
|
||||||
if (POST_SUBMITTED != '') {
|
if (POST_SUBMITTED != '') {
|
||||||
$posteduser = trim(utf8_strtolower(POST_USERNAME));
|
$posteduser = trim(utf8_strtolower(POST_USERNAME));
|
||||||
|
|
||||||
|
|
8
rss.php
8
rss.php
|
@ -24,12 +24,8 @@ require_once('header.inc.php');
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
||||||
$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
|
$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
|
||||||
$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
|
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$tplVars = array();
|
|
||||||
header('Content-Type: application/xml');
|
header('Content-Type: application/xml');
|
||||||
if(isset($_SERVER['PATH_INFO']) && strlen($_SERVER['PATH_INFO']) >1) {
|
if(isset($_SERVER['PATH_INFO']) && strlen($_SERVER['PATH_INFO']) >1) {
|
||||||
list($url, $user, $cat) = explode('/', $_SERVER['PATH_INFO']);
|
list($url, $user, $cat) = explode('/', $_SERVER['PATH_INFO']);
|
||||||
|
@ -44,9 +40,7 @@ if ($usecache) {
|
||||||
$hashtext = $_SERVER['REQUEST_URI'];
|
$hashtext = $_SERVER['REQUEST_URI'];
|
||||||
if ($userservice->isLoggedOn()) {
|
if ($userservice->isLoggedOn()) {
|
||||||
$hashtext .= $userservice->getCurrentUserID();
|
$hashtext .= $userservice->getCurrentUserID();
|
||||||
$currentUser = $userservice->getCurrentUser();
|
if ($currentUser->getUsername() == $user) {
|
||||||
$currentUsername = $currentUser[$userservice->getFieldName('username')];
|
|
||||||
if ($currentUsername == $user) {
|
|
||||||
$hashtext .= $user;
|
$hashtext .= $user;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,8 +37,6 @@ if (POST_TERMS != '') {
|
||||||
} else {
|
} else {
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
||||||
$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
|
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
$searchhistoryservice =& ServiceFactory::getServiceInstance('SearchHistoryService');
|
$searchhistoryservice =& ServiceFactory::getServiceInstance('SearchHistoryService');
|
||||||
|
|
||||||
/* Managing current logged user */
|
/* Managing current logged user */
|
||||||
|
@ -53,7 +51,6 @@ if (POST_TERMS != '') {
|
||||||
$page= NULL;
|
$page= NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tplvars = array();
|
|
||||||
$tplVars['loadjs'] = true;
|
$tplVars['loadjs'] = true;
|
||||||
|
|
||||||
// Pagination
|
// Pagination
|
||||||
|
|
|
@ -23,8 +23,6 @@ require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$tag2tagservice = & ServiceFactory :: getServiceInstance('Tag2TagService');
|
$tag2tagservice = & ServiceFactory :: getServiceInstance('Tag2TagService');
|
||||||
$templateservice = & ServiceFactory :: getServiceInstance('TemplateService');
|
|
||||||
$userservice = & ServiceFactory :: getServiceInstance('UserService');
|
|
||||||
|
|
||||||
/* Managing all possible inputs */
|
/* Managing all possible inputs */
|
||||||
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
|
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
|
||||||
|
@ -33,8 +31,6 @@ isset($_POST['tag1']) ? define('POST_TAG1', $_POST['tag1']): define('POST_TAG1',
|
||||||
isset($_POST['linkType']) ? define('POST_LINKTYPE', $_POST['linkType']): define('POST_LINKTYPE', '');
|
isset($_POST['linkType']) ? define('POST_LINKTYPE', $_POST['linkType']): define('POST_LINKTYPE', '');
|
||||||
isset($_POST['tag2']) ? define('POST_TAG2', $_POST['tag2']): define('POST_TAG2', '');
|
isset($_POST['tag2']) ? define('POST_TAG2', $_POST['tag2']): define('POST_TAG2', '');
|
||||||
|
|
||||||
/* Managing current logged user */
|
|
||||||
$currentObjectUser = $userservice->getCurrentObjectUser();
|
|
||||||
|
|
||||||
//permissions
|
//permissions
|
||||||
if(!$userservice->isLoggedOn()) {
|
if(!$userservice->isLoggedOn()) {
|
||||||
|
@ -50,19 +46,19 @@ if (POST_CONFIRM != '') {
|
||||||
$tag1 = POST_TAG1;
|
$tag1 = POST_TAG1;
|
||||||
$linkType = POST_LINKTYPE;
|
$linkType = POST_LINKTYPE;
|
||||||
$tag2 = POST_TAG2;
|
$tag2 = POST_TAG2;
|
||||||
if ($tag2tagservice->addLinkedTags($tag1, $tag2, $linkType, $currentObjectUser->getId())) {
|
if ($tag2tagservice->addLinkedTags($tag1, $tag2, $linkType, $currentUser->getId())) {
|
||||||
$tplVars['msg'] = T_('Tag link created');
|
$tplVars['msg'] = T_('Tag link created');
|
||||||
header('Location: '. createURL('bookmarks', $currentObjectUser->getUsername()));
|
header('Location: '. createURL('bookmarks', $currentUser->getUsername()));
|
||||||
} else {
|
} else {
|
||||||
$tplVars['error'] = T_('Failed to create the link');
|
$tplVars['error'] = T_('Failed to create the link');
|
||||||
$templateservice->loadTemplate('error.500.tpl', $tplVars);
|
$templateservice->loadTemplate('error.500.tpl', $tplVars);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
} elseif (POST_CANCEL) {
|
} elseif (POST_CANCEL) {
|
||||||
header('Location: '. createURL('bookmarks', $currentObjectUser->getUsername() .'/'. $tags));
|
header('Location: '. createURL('bookmarks', $currentUser->getUsername() .'/'. $tags));
|
||||||
}
|
}
|
||||||
|
|
||||||
$tplVars['links'] = $tag2tagservice->getLinks($currentObjectUser->getId());
|
$tplVars['links'] = $tag2tagservice->getLinks($currentUser->getId());
|
||||||
|
|
||||||
$tplVars['tag1'] = $tag1;
|
$tplVars['tag1'] = $tag1;
|
||||||
$tplVars['tag2'] = '';
|
$tplVars['tag2'] = '';
|
||||||
|
|
|
@ -23,8 +23,6 @@ require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$tag2tagservice = & ServiceFactory :: getServiceInstance('Tag2TagService');
|
$tag2tagservice = & ServiceFactory :: getServiceInstance('Tag2TagService');
|
||||||
$templateservice = & ServiceFactory :: getServiceInstance('TemplateService');
|
|
||||||
$userservice = & ServiceFactory :: getServiceInstance('UserService');
|
|
||||||
|
|
||||||
/* Managing all possible inputs */
|
/* Managing all possible inputs */
|
||||||
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
|
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
|
||||||
|
|
|
@ -23,18 +23,13 @@ require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$tag2tagservice = & ServiceFactory :: getServiceInstance('Tag2TagService');
|
$tag2tagservice = & ServiceFactory :: getServiceInstance('Tag2TagService');
|
||||||
$templateservice = & ServiceFactory :: getServiceInstance('TemplateService');
|
|
||||||
$userservice = & ServiceFactory :: getServiceInstance('UserService');
|
|
||||||
|
|
||||||
/* Managing all possible inputs */
|
/* Managing all possible inputs */
|
||||||
isset($_SERVER['HTTP_REFERER']) ? define('HTTP_REFERER', $_SERVER['HTTP_REFERER']): define('HTTP_REFERER', '');
|
isset($_SERVER['HTTP_REFERER']) ? define('HTTP_REFERER', $_SERVER['HTTP_REFERER']): define('HTTP_REFERER', '');
|
||||||
|
|
||||||
/* Managing current logged user */
|
|
||||||
$logged_on_user = $userservice->getCurrentUser();
|
|
||||||
|
|
||||||
|
|
||||||
//permissions
|
//permissions
|
||||||
if($logged_on_user == null) {
|
if(!$userservice->loggedOn()) {
|
||||||
$tplVars['error'] = T_('Permission denied.');
|
$tplVars['error'] = T_('Permission denied.');
|
||||||
$templateservice->loadTemplate('error.500.tpl', $tplVars);
|
$templateservice->loadTemplate('error.500.tpl', $tplVars);
|
||||||
exit();
|
exit();
|
||||||
|
|
|
@ -23,8 +23,6 @@ require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$b2tservice = & ServiceFactory :: getServiceInstance('Bookmark2TagService');
|
$b2tservice = & ServiceFactory :: getServiceInstance('Bookmark2TagService');
|
||||||
$templateservice = & ServiceFactory :: getServiceInstance('TemplateService');
|
|
||||||
$userservice = & ServiceFactory :: getServiceInstance('UserService');
|
|
||||||
$cdservice = & ServiceFactory :: getServiceInstance('CommonDescriptionService');
|
$cdservice = & ServiceFactory :: getServiceInstance('CommonDescriptionService');
|
||||||
|
|
||||||
/* Managing all possible inputs */
|
/* Managing all possible inputs */
|
||||||
|
|
|
@ -23,8 +23,7 @@ require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$b2tservice = & ServiceFactory :: getServiceInstance('Bookmark2TagService');
|
$b2tservice = & ServiceFactory :: getServiceInstance('Bookmark2TagService');
|
||||||
$templateservice = & ServiceFactory :: getServiceInstance('TemplateService');
|
|
||||||
$userservice = & ServiceFactory :: getServiceInstance('UserService');
|
|
||||||
|
|
||||||
/* Managing all possible inputs */
|
/* Managing all possible inputs */
|
||||||
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
|
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
|
||||||
|
|
|
@ -23,8 +23,6 @@ require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$tagservice = & ServiceFactory :: getServiceInstance('TagService');
|
$tagservice = & ServiceFactory :: getServiceInstance('TagService');
|
||||||
$templateservice = & ServiceFactory :: getServiceInstance('TemplateService');
|
|
||||||
$userservice = & ServiceFactory :: getServiceInstance('UserService');
|
|
||||||
|
|
||||||
/* Managing all possible inputs */
|
/* Managing all possible inputs */
|
||||||
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
|
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
|
||||||
|
|
|
@ -25,8 +25,6 @@ require_once('header.inc.php');
|
||||||
$b2tservice = & ServiceFactory :: getServiceInstance('Bookmark2TagService');
|
$b2tservice = & ServiceFactory :: getServiceInstance('Bookmark2TagService');
|
||||||
$tagservice = & ServiceFactory :: getServiceInstance('TagService');
|
$tagservice = & ServiceFactory :: getServiceInstance('TagService');
|
||||||
$tag2tagservice = & ServiceFactory :: getServiceInstance('Tag2tagService');
|
$tag2tagservice = & ServiceFactory :: getServiceInstance('Tag2tagService');
|
||||||
$templateservice = & ServiceFactory :: getServiceInstance('TemplateService');
|
|
||||||
$userservice = & ServiceFactory :: getServiceInstance('UserService');
|
|
||||||
|
|
||||||
/* Managing all possible inputs */
|
/* Managing all possible inputs */
|
||||||
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
|
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
|
||||||
|
|
4
tags.php
4
tags.php
|
@ -23,8 +23,6 @@ require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
||||||
$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
|
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
|
$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
|
||||||
|
|
||||||
/* Managing all possible inputs */
|
/* Managing all possible inputs */
|
||||||
|
@ -37,8 +35,6 @@ $currentUser = $userservice->getCurrentObjectUser();
|
||||||
/* Managing path info */
|
/* Managing path info */
|
||||||
list($url, $cat) = explode('/', $_SERVER['PATH_INFO']);
|
list($url, $cat) = explode('/', $_SERVER['PATH_INFO']);
|
||||||
|
|
||||||
$tplVars = array();
|
|
||||||
|
|
||||||
|
|
||||||
if (!$cat) {
|
if (!$cat) {
|
||||||
header('Location: '. createURL('populartags'));
|
header('Location: '. createURL('populartags'));
|
||||||
|
|
|
@ -1,12 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
//$currentUser = $userservice->getCurrentUser();
|
|
||||||
//$currentUserId = $userservice->getCurrentUserId();
|
|
||||||
|
|
||||||
$currentObjectUser = $userservice->getCurrentObjectUser();
|
|
||||||
|
|
||||||
$this->includeTemplate($GLOBALS['top_include']);
|
$this->includeTemplate($GLOBALS['top_include']);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
|
|
||||||
$currentObjectUser = $userservice->getCurrentObjectUser();
|
|
||||||
|
|
||||||
$this->includeTemplate($GLOBALS['top_include']);
|
$this->includeTemplate($GLOBALS['top_include']);
|
||||||
|
|
||||||
|
@ -18,7 +13,7 @@ foreach($users as $user) {
|
||||||
echo '<a href="'.createURL('profile', $user->getUsername()).'">'.$user->getUsername().'</a>';
|
echo '<a href="'.createURL('profile', $user->getUsername()).'">'.$user->getUsername().'</a>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
if($user->getUsername() != $currentObjectUser->getUsername()) {
|
if($user->getUsername() != $currentUser->getUsername()) {
|
||||||
echo '<div class="meta">';
|
echo '<div class="meta">';
|
||||||
echo '<a href="'.createURL('admin','delete/'.$user->getUsername()).'" onclick="return confirm(\''.T_('Are you sure?').'\');">'.T_('Delete').'</a>';
|
echo '<a href="'.createURL('admin','delete/'.$user->getUsername()).'" onclick="return confirm(\''.T_('Are you sure?').'\');">'.T_('Delete').'</a>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
/* Service creation: only useful services are created */
|
|
||||||
$userservice = & ServiceFactory :: getServiceInstance('UserService');
|
|
||||||
|
|
||||||
$this->includeTemplate($GLOBALS['top_include']);
|
$this->includeTemplate($GLOBALS['top_include']);
|
||||||
|
|
||||||
|
@ -47,7 +45,6 @@ window.onload = function() {
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</p>
|
|
||||||
|
|
||||||
<?php if (isset($referrer)): ?>
|
<?php if (isset($referrer)): ?>
|
||||||
<div><input type="hidden" name="referrer" value="<?php echo $referrer; ?>" /></div>
|
<div><input type="hidden" name="referrer" value="<?php echo $referrer; ?>" /></div>
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
||||||
$tagservice =& ServiceFactory::getServiceInstance('TagService');
|
$tagservice =& ServiceFactory::getServiceInstance('TagService');
|
||||||
$cdservice =& ServiceFactory::getServiceInstance('CommonDescriptionService');
|
$cdservice =& ServiceFactory::getServiceInstance('CommonDescriptionService');
|
||||||
|
|
||||||
// Momentary useful to go to object code
|
|
||||||
$currentObjectUser = $userservice->getCurrentObjectUser();
|
|
||||||
|
|
||||||
$pageName = isset($pageName)?$pageName:"";
|
$pageName = isset($pageName)?$pageName:"";
|
||||||
$user = isset($user)?$user:"";
|
$user = isset($user)?$user:"";
|
||||||
|
@ -94,7 +91,7 @@ if(isset($currenttag) && $currenttag!= '') {
|
||||||
//echo T_(' for these tags');
|
//echo T_(' for these tags');
|
||||||
} else if($userservice->isLoggedOn()){
|
} else if($userservice->isLoggedOn()){
|
||||||
echo ' - ';
|
echo ' - ';
|
||||||
echo '<a href="'. createURL('bookmarks', $currentObjectUser->getUsername().'/'.$currenttag) .'">';
|
echo '<a href="'. createURL('bookmarks', $currentUser->getUsername().'/'.$currenttag) .'">';
|
||||||
echo T_('Only your bookmarks for this tag').'</a>';
|
echo T_('Only your bookmarks for this tag').'</a>';
|
||||||
//echo T_(' for these tags');
|
//echo T_(' for these tags');
|
||||||
}
|
}
|
||||||
|
@ -165,9 +162,9 @@ if(isset($currenttag) && $currenttag!= '') {
|
||||||
|
|
||||||
// Copy link
|
// Copy link
|
||||||
if ($userservice->isLoggedOn()
|
if ($userservice->isLoggedOn()
|
||||||
&& ($currentObjectUser->getId() != $row['uId'])
|
&& ($currentUser->getId() != $row['uId'])
|
||||||
&& !$bookmarkservice->bookmarkExists($row['bAddress'], $currentObjectUser->getId())) {
|
&& !$bookmarkservice->bookmarkExists($row['bAddress'], $currentUser->getId())) {
|
||||||
$copy .= ' - <a href="'. createURL('bookmarks', $currentObjectUser->getUsername() .'?action=add&address='. urlencode($row['bAddress']) .'&title='. urlencode($row['bTitle'])). '&description='.urlencode($row['bDescription']). '&tags='.$tagsForCopy .'">'. T_('Copy') .'</a>';
|
$copy .= ' - <a href="'. createURL('bookmarks', $currentUser->getUsername() .'?action=add&address='. urlencode($row['bAddress']) .'&title='. urlencode($row['bTitle'])). '&description='.urlencode($row['bDescription']). '&tags='.$tagsForCopy .'">'. T_('Copy') .'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Nofollow option
|
// Nofollow option
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* Service creation: only useful services are created */
|
||||||
$b2tservice = & ServiceFactory :: getServiceInstance('Bookmark2TagService');
|
$b2tservice = & ServiceFactory :: getServiceInstance('Bookmark2TagService');
|
||||||
$userservice = & ServiceFactory :: getServiceInstance('UserService');
|
|
||||||
|
|
||||||
$logged_on_userid = $userservice->getCurrentUserId();
|
$logged_on_userid = $userservice->getCurrentUserId();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
$this->includeTemplate($GLOBALS['top_include']);
|
$this->includeTemplate($GLOBALS['top_include']);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
/* Service creation: only useful services are created */
|
||||||
$tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService');
|
$tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService');
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
|
|
||||||
require_once('sidebar.linkedtags.inc.php');
|
require_once('sidebar.linkedtags.inc.php');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
/* Service creation: only useful services are created */
|
||||||
$tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService');
|
$tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService');
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
|
|
||||||
require_once('sidebar.linkedtags.inc.php');
|
require_once('sidebar.linkedtags.inc.php');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
/* Service creation: only useful services are created */
|
||||||
$tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService');
|
$tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService');
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
|
|
||||||
require_once('sidebar.linkedtags.inc.php');
|
require_once('sidebar.linkedtags.inc.php');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
/* Service creation: only useful services are created */
|
||||||
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
|
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
|
|
||||||
if(!isset($user)) {
|
if(!isset($user)) {
|
||||||
$user = '';
|
$user = '';
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
<?php
|
|
||||||
// Menu moved to toolbar.inc.php
|
|
||||||
|
|
||||||
/*
|
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
if (utf8_strlen($userinfo['name']) > 0) {
|
|
||||||
$name = $userinfo['name'];
|
|
||||||
} else {
|
|
||||||
$name = $userinfo['username'];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
<h2><?php echo $name; ?></h2>
|
|
||||||
<div id="profile">
|
|
||||||
<ul>
|
|
||||||
<li><a href="<?php echo $userservice->getProfileUrl($userid, $user); ?>"><?php echo T_('Profile'); ?></a> →</li>
|
|
||||||
<li><a href="<?php echo createURL('alltags', $user); ?>"><?php echo T_('Tags'); ?></a> →</li>
|
|
||||||
<li><a href="<?php echo createURL('watchlist', $user); ?>"><?php echo T_('Watchlist'); ?></a> →</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
*/
|
|
||||||
?>
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
/* Service creation: only useful services are created */
|
||||||
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
|
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
|
|
||||||
/* Manage input */
|
/* Manage input */
|
||||||
$userid = isset($userid)?$userid:NULL;
|
$userid = isset($userid)?$userid:NULL;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
/* Service creation: only useful services are created */
|
||||||
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
|
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
|
|
||||||
if(!isset($user)) $user="";
|
if(!isset($user)) $user="";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
/* Service creation: only useful services are created */
|
||||||
$searchhistoryservice =& ServiceFactory::getServiceInstance('SearchHistoryService');
|
$searchhistoryservice =& ServiceFactory::getServiceInstance('SearchHistoryService');
|
||||||
|
|
||||||
$logged_on_userid = $userservice->getCurrentUserId();
|
$logged_on_userid = $userservice->getCurrentUserId();
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
/* Service creation: only useful services are created */
|
||||||
|
//No specific services
|
||||||
|
|
||||||
if ($userservice->isLoggedOn()) {
|
if ($userservice->isLoggedOn()) {
|
||||||
$currentUser = $userservice->getCurrentUser();
|
|
||||||
$currentUsername = $currentUser[$userservice->getFieldName('username')];
|
|
||||||
|
|
||||||
if ($currentUsername == $user) {
|
if ($currentUser->getUsername() == $user) {
|
||||||
$tags = explode('+', $currenttag);
|
$tags = explode('+', $currenttag);
|
||||||
$renametext = T_ngettext('Rename Tag', 'Rename Tags', count($tags));
|
$renametext = T_ngettext('Rename Tag', 'Rename Tags', count($tags));
|
||||||
$renamelink = createURL('tagrename', $currenttag);
|
$renamelink = createURL('tagrename', $currenttag);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
/* Service creation: only useful services are created */
|
||||||
|
//No specific services
|
||||||
|
|
||||||
$logged_on_userid = $userservice->getCurrentUserId();
|
$logged_on_userid = $userservice->getCurrentUserId();
|
||||||
if ($logged_on_userid === false) {
|
if ($logged_on_userid === false) {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
/* Service creation: only useful services are created */
|
||||||
|
//No specific services
|
||||||
|
|
||||||
$watching = $userservice->getWatchNames($userid);
|
$watching = $userservice->getWatchNames($userid);
|
||||||
if ($watching) {
|
if ($watching) {
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
/* Service creation: only useful services are created */
|
||||||
if ($userservice->isLoggedOn()) {
|
//No specific services
|
||||||
$currentUser = $userservice->getCurrentUser();
|
|
||||||
$currentUsername = $currentUser[$userservice->getFieldName('username')];
|
|
||||||
|
|
||||||
if ($currentUsername != $user) {
|
|
||||||
|
if ($userservice->isLoggedOn()) {
|
||||||
|
|
||||||
|
if ($currentUser->getUsername() != $user) {
|
||||||
$result = $userservice->getWatchStatus($userid, $userservice->getCurrentUserId());
|
$result = $userservice->getWatchStatus($userid, $userservice->getCurrentUserId());
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$linkText = T_('Remove from Watchlist');
|
$linkText = T_('Remove from Watchlist');
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
$this->includeTemplate($GLOBALS['top_include']);
|
$this->includeTemplate($GLOBALS['top_include']);
|
||||||
$userservice = & ServiceFactory :: getServiceInstance('UserService');
|
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
$this->includeTemplate($GLOBALS['top_include']);
|
$this->includeTemplate($GLOBALS['top_include']);
|
||||||
$userservice = & ServiceFactory :: getServiceInstance('UserService');
|
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
if ($userservice->isLoggedOn()) {
|
if ($userservice->isLoggedOn()) {
|
||||||
$cUser = $userservice->getCurrentUser();
|
|
||||||
$cUserId = $userservice->getCurrentUserId();
|
$cUserId = $userservice->getCurrentUserId();
|
||||||
$cUsername = $cUser[$userservice->getFieldName('username')];
|
$cUsername = $currentUser->getUsername();
|
||||||
$isAdmin = $userservice->isAdmin($cUser[$userservice->getFieldname('primary')]);
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<ul id="navigation">
|
<ul id="navigation">
|
||||||
|
@ -15,7 +12,7 @@ if ($userservice->isLoggedOn()) {
|
||||||
<li><a href="<?php echo createURL('bookmarks', $cUsername . '?action=add'); ?>"><?php echo T_('Add a Bookmark'); ?></a></li>
|
<li><a href="<?php echo createURL('bookmarks', $cUsername . '?action=add'); ?>"><?php echo T_('Add a Bookmark'); ?></a></li>
|
||||||
<li class="access"><?php echo $cUsername?><a href="<?php echo ROOT ?>?action=logout">(<?php echo T_('Log Out'); ?>)</a></li>
|
<li class="access"><?php echo $cUsername?><a href="<?php echo ROOT ?>?action=logout">(<?php echo T_('Log Out'); ?>)</a></li>
|
||||||
<li><a href="<?php echo createURL('about'); ?>"><?php echo T_('About'); ?></a></li>
|
<li><a href="<?php echo createURL('about'); ?>"><?php echo T_('About'); ?></a></li>
|
||||||
<?php if($isAdmin): ?>
|
<?php if($currentUser->isAdmin()): ?>
|
||||||
<li><a href="<?php echo createURL('admin', ''); ?>"><?php echo '['.T_('Admin').']'; ?></a></li>
|
<li><a href="<?php echo createURL('admin', ''); ?>"><?php echo '['.T_('Admin').']'; ?></a></li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
@ -24,7 +21,6 @@ if ($userservice->isLoggedOn()) {
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<ul id="navigation">
|
<ul id="navigation">
|
||||||
<li><a href="<?php echo createURL('populartags'); ?>"><?php echo T_('Popular Tags'); ?></a></li>
|
<li><a href="<?php echo createURL('populartags'); ?>"><?php echo T_('Popular Tags'); ?></a></li>
|
||||||
<li><a href="<?php echo createURL('about'); ?>"><?php echo T_('About'); ?></a></li>
|
<li><a href="<?php echo createURL('about'); ?>"><?php echo T_('About'); ?></a></li>
|
||||||
|
|
|
@ -36,7 +36,6 @@ exit();
|
||||||
/////////////////
|
/////////////////
|
||||||
require_once('header.inc.php');
|
require_once('header.inc.php');
|
||||||
$tagstatservice = & ServiceFactory :: getServiceInstance('TagStatService');
|
$tagstatservice = & ServiceFactory :: getServiceInstance('TagStatService');
|
||||||
$templateservice = & ServiceFactory :: getServiceInstance('TemplateService');
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<h1>Upgrade</h1>
|
<h1>Upgrade</h1>
|
||||||
|
|
|
@ -23,8 +23,6 @@ require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
||||||
$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
|
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
|
$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
|
||||||
|
|
||||||
/* Managing current logged user */
|
/* Managing current logged user */
|
||||||
|
@ -33,7 +31,6 @@ $currentUser = $userservice->getCurrentObjectUser();
|
||||||
/* Managing path info */
|
/* Managing path info */
|
||||||
list($url, $cat) = explode('/', $_SERVER['PATH_INFO']);
|
list($url, $cat) = explode('/', $_SERVER['PATH_INFO']);
|
||||||
|
|
||||||
$tplVars = array();
|
|
||||||
|
|
||||||
$pagetitle = T_('Users');
|
$pagetitle = T_('Users');
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
require_once('header.inc.php');
|
require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
//No specific services
|
||||||
|
|
||||||
/* Managing current logged user */
|
/* Managing current logged user */
|
||||||
$currentUser = $userservice->getCurrentObjectUser();
|
$currentUser = $userservice->getCurrentObjectUser();
|
||||||
|
@ -32,7 +32,6 @@ $currentUser = $userservice->getCurrentObjectUser();
|
||||||
|
|
||||||
|
|
||||||
if ($userservice->isLoggedOn() && $user) {
|
if ($userservice->isLoggedOn() && $user) {
|
||||||
$tplVars = array();
|
|
||||||
$pagetitle = '';
|
$pagetitle = '';
|
||||||
|
|
||||||
if (is_int($user)) {
|
if (is_int($user)) {
|
||||||
|
|
|
@ -22,8 +22,6 @@ require_once('header.inc.php');
|
||||||
|
|
||||||
/* Service creation: only useful services are created */
|
/* Service creation: only useful services are created */
|
||||||
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
|
||||||
$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
|
|
||||||
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
||||||
$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
|
$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
|
||||||
|
|
||||||
/* Managing all possible inputs */
|
/* Managing all possible inputs */
|
||||||
|
@ -36,7 +34,6 @@ $currentUser = $userservice->getCurrentObjectUser();
|
||||||
/* Managing path info */
|
/* Managing path info */
|
||||||
@list($url, $user, $page) = isset($_SERVER['PATH_INFO']) ? explode('/', $_SERVER['PATH_INFO']) : NULL;
|
@list($url, $user, $page) = isset($_SERVER['PATH_INFO']) ? explode('/', $_SERVER['PATH_INFO']) : NULL;
|
||||||
|
|
||||||
$tplVars = array();
|
|
||||||
|
|
||||||
if ($usecache) {
|
if ($usecache) {
|
||||||
// Generate hash for caching on
|
// Generate hash for caching on
|
||||||
|
|
Loading…
Reference in a new issue