Author: akara
Date: Mon Jan 12 18:24:13 2009
New Revision: 733999
URL: http://svn.apache.org/viewvc?rev=733999&view=rev
Log:
Fix for issue OLIO-21: Changed all instances of $HTTP_SESSION_VARS to $_SESSION
and removed unnecessary globals from public_html/index.php.
Modified:
incubator/olio/webapp/php/trunk/public_html/addAttendee.php
incubator/olio/webapp/php/trunk/public_html/addEvent.php
incubator/olio/webapp/php/trunk/public_html/addEventResult.php
incubator/olio/webapp/php/trunk/public_html/addPerson.php
incubator/olio/webapp/php/trunk/public_html/approveFriendship.php
incubator/olio/webapp/php/trunk/public_html/deleteAttendee.php
incubator/olio/webapp/php/trunk/public_html/events.php
incubator/olio/webapp/php/trunk/public_html/findUsers.php
incubator/olio/webapp/php/trunk/public_html/friends.php
incubator/olio/webapp/php/trunk/public_html/index.php
incubator/olio/webapp/php/trunk/public_html/login.php
incubator/olio/webapp/php/trunk/public_html/postedEvents.php
incubator/olio/webapp/php/trunk/public_html/rateit.php
incubator/olio/webapp/php/trunk/public_html/rejectInvite.php
incubator/olio/webapp/php/trunk/public_html/taggedEvents.php
incubator/olio/webapp/php/trunk/public_html/upcomingEvents.php
incubator/olio/webapp/php/trunk/public_html/yourUpcomingEvents.php
incubator/olio/webapp/php/trunk/views/commentsRating.php
incubator/olio/webapp/php/trunk/views/events.php
incubator/olio/webapp/php/trunk/views/site.php
incubator/olio/webapp/php/trunk/views/users.php
Modified: incubator/olio/webapp/php/trunk/public_html/addAttendee.php
URL:
http://svn.apache.org/viewvc/incubator/olio/webapp/php/trunk/public_html/addAttendee.php?rev=733999&r1=733998&r2=733999&view=diff
==============================================================================
--- incubator/olio/webapp/php/trunk/public_html/addAttendee.php (original)
+++ incubator/olio/webapp/php/trunk/public_html/addAttendee.php Mon Jan 12
18:24:13 2009
@@ -24,7 +24,7 @@
session_start();
require_once("../etc/config.php");
$se = $_REQUEST['id'];
-$username = $HTTP_SESSION_VARS["uname"];
+$username = $_SESSION["uname"];
if (!is_null($username)) {
$connection = DBConnection::getWriteInstance();
$checkuserIfAttending = "select count(username) as count from
PERSON_SOCIALEVENT where socialeventid = '$se' and username = '$username'";
@@ -42,13 +42,13 @@
}
$listquery = "select username from PERSON_SOCIALEVENT where socialeventid =
'$se'";
$listqueryresult = $connection->query($listquery);
-$username = $HTTP_SESSION_VARS["uname"];
+$username = $_SESSION["uname"];
while($listqueryresult->next()) {
$tmp_uname = $listqueryresult->get(1);
$attendeeList = $attendeeList." ".'<a
href="users.php?username='.$tmp_uname.'">'.$tmp_uname.'</a><br />';
}
-$numofattendees = $HTTP_SESSION_VARS["numofattendees"] + 1;
-$HTTP_SESSION_VARS["numofattendees"] = $numofattendees;
+$numofattendees = $_SESSION["numofattendees"] + 1;
+$_SESSION["numofattendees"] = $numofattendees;
echo '<h2 class="smaller_heading">'.$numofattendees.'
Attendees:</h2><br/><input name="unattend" type="button" value="Unattend"
onclick="deleteAttendee();"/><br/><div id="attendees">'.$attendeeList.'</div>';
unset($listqueryresult);
?>
Modified: incubator/olio/webapp/php/trunk/public_html/addEvent.php
URL:
http://svn.apache.org/viewvc/incubator/olio/webapp/php/trunk/public_html/addEvent.php?rev=733999&r1=733998&r2=733999&view=diff
==============================================================================
--- incubator/olio/webapp/php/trunk/public_html/addEvent.php (original)
+++ incubator/olio/webapp/php/trunk/public_html/addEvent.php Mon Jan 12
18:24:13 2009
@@ -25,7 +25,7 @@
session_start();
require_once("../etc/config.php");
$se = $_REQUEST['socialEventID'];
-$HTTP_SESSION_VARS["addEventSE"]=$se;
+$_SESSION["addEventSE"]=$se;
$connection = DBConnection::getInstance();
if(!is_null($se)){
$q = "select
title,description,summary,imageurl,literatureurl,telephone,timezone,eventtimestamp,submitterusername,street1,street2,city,state,zip,country
from SOCIALEVENT as s,ADDRESS as a where s.socialeventid='$se' and
s.ADDRESS_addressid=a.addressid";
@@ -60,7 +60,7 @@
}
unset($result1);
}
-if(!is_null($se) && (is_null($HTTP_SESSION_VARS["uname"]) ||
!($HTTP_SESSION_VARS["uname"]==$submitter) )){
+if(!is_null($se) && (is_null($_SESSION["uname"]) ||
!($_SESSION["uname"]==$submitter) )){
$fillMessage = "<font color=red>You can only edit events you
created.</font> ";
}else{
ob_start();
Modified: incubator/olio/webapp/php/trunk/public_html/addEventResult.php
URL:
http://svn.apache.org/viewvc/incubator/olio/webapp/php/trunk/public_html/addEventResult.php?rev=733999&r1=733998&r2=733999&view=diff
==============================================================================
--- incubator/olio/webapp/php/trunk/public_html/addEventResult.php (original)
+++ incubator/olio/webapp/php/trunk/public_html/addEventResult.php Mon Jan 12
18:24:13 2009
@@ -65,8 +65,8 @@
unset($idres);
// 4. Insert event and get the event id.
- $usrnm = $HTTP_SESSION_VARS["uname"];
- $evid = $HTTP_SESSION_VARS["addEventSE"];
+ $usrnm = $_SESSION["uname"];
+ $evid = $_SESSION["addEventSE"];
if (isset($_POST['addeventsubmit'])) {
$insertse = "insert into SOCIALEVENT (title, description,summary,
submitterUserName, ADDRESS_addressid,telephone, timezone, eventtimestamp,
eventdate) values ('$title', '$description','$summary', '$usrnm', '$addrid',
'$telephone', '$timezone', '$eventtime', '$eventdate')";
Modified: incubator/olio/webapp/php/trunk/public_html/addPerson.php
URL:
http://svn.apache.org/viewvc/incubator/olio/webapp/php/trunk/public_html/addPerson.php?rev=733999&r1=733998&r2=733999&view=diff
==============================================================================
--- incubator/olio/webapp/php/trunk/public_html/addPerson.php (original)
+++ incubator/olio/webapp/php/trunk/public_html/addPerson.php Mon Jan 12
18:24:13 2009
@@ -52,7 +52,7 @@
unset($result);
}
-if(!is_null($uname) && ( is_null($HTTP_SESSION_VARS["uname"]) ||
!($HTTP_SESSION_VARS["uname"]==$uname) ) ){
+if(!is_null($uname) && ( is_null($_SESSION["uname"]) ||
!($_SESSION["uname"]==$uname) ) ){
$fillMessage = "<font color=red>Failed to edit user.</font>";
}else{
ob_start();
Modified: incubator/olio/webapp/php/trunk/public_html/approveFriendship.php
URL:
http://svn.apache.org/viewvc/incubator/olio/webapp/php/trunk/public_html/approveFriendship.php?rev=733999&r1=733998&r2=733999&view=diff
==============================================================================
--- incubator/olio/webapp/php/trunk/public_html/approveFriendship.php (original)
+++ incubator/olio/webapp/php/trunk/public_html/approveFriendship.php Mon Jan
12 18:24:13 2009
@@ -29,9 +29,9 @@
$friend = $_REQUEST['friend'];
$approveSql = "update PERSON_PERSON set is_accepted=1 where
person_username='$person' and friends_username='$friend'";
$connection->exec($approveSql);
-$HTTP_SESSION_VARS["friendshipreqs"]=$friends->numFriendshipRequests($person,$connection);
+$_SESSION["friendshipreqs"]=$friends->numFriendshipRequests($person,$connection);
$incomingRequests = $friends->incomingRequests($person,$connection);
$friendCloud = $friends->getFriendCloud($person,$connection);
-echo "friendship requests (".$HTTP_SESSION_VARS["friendshipreqs"].")\n";
+echo "friendship requests (".$_SESSION["friendshipreqs"].")\n";
echo $friendCloud."\n".$incomingRequests;
?>
Modified: incubator/olio/webapp/php/trunk/public_html/deleteAttendee.php
URL:
http://svn.apache.org/viewvc/incubator/olio/webapp/php/trunk/public_html/deleteAttendee.php?rev=733999&r1=733998&r2=733999&view=diff
==============================================================================
--- incubator/olio/webapp/php/trunk/public_html/deleteAttendee.php (original)
+++ incubator/olio/webapp/php/trunk/public_html/deleteAttendee.php Mon Jan 12
18:24:13 2009
@@ -26,7 +26,7 @@
session_start();
require_once("../etc/config.php");
$se = $_REQUEST['id'];
-$username = $HTTP_SESSION_VARS["uname"];
+$username = $_SESSION["uname"];
if(!is_null($username)){
$connection = DBConnection::getWriteInstance();
$deleteuser = "delete from PERSON_SOCIALEVENT where username='$username'
and socialeventid='$se'";
@@ -38,13 +38,13 @@
}
$listquery = "select username from PERSON_SOCIALEVENT where socialeventid =
'$se'";
$listqueryresult = $connection->query($listquery);
-$username = $HTTP_SESSION_VARS["uname"];
+$username = $_SESSION["uname"];
while($listqueryresult->next()) {
$tmp_uname = $listqueryresult->get(1);
$attendeeList = $attendeeList." ".'<a
href="users.php?username='.$tmp_uname.'">'.$tmp_uname.'</a><br />';
}
-$numofattendees = $HTTP_SESSION_VARS["numofattendees"] - 1;
-$HTTP_SESSION_VARS["numofattendees"] = $numofattendees;
+$numofattendees = $_SESSION["numofattendees"] - 1;
+$_SESSION["numofattendees"] = $numofattendees;
echo '<h2 class="smaller_heading">'.$numofattendees.'
Attendees:</h2><br/><input name="attend" type="button" value="Attend"
onclick="addAttendee();"/><br/><div id="attendees">'.$attendeeList.'</div>';
unset($listqueryresult);
?>
Modified: incubator/olio/webapp/php/trunk/public_html/events.php
URL:
http://svn.apache.org/viewvc/incubator/olio/webapp/php/trunk/public_html/events.php?rev=733999&r1=733998&r2=733999&view=diff
==============================================================================
--- incubator/olio/webapp/php/trunk/public_html/events.php (original)
+++ incubator/olio/webapp/php/trunk/public_html/events.php Mon Jan 12 18:24:13
2009
@@ -36,12 +36,12 @@
}
$tagslist = Tags_Controller::getInstance();
$events = Events_Controller::getInstance();
-$username = $HTTP_SESSION_VARS["uname"];
+$username = $_SESSION["uname"];
$dateFormat = "l, F j, Y, h:i A";
$eventTaglist = $tagslist->getEventsPageTagCloud($connection,$se);
$numAttendees = $events->getNumAttendees($se,$connection);
-$HTTP_SESSION_VARS["numofattendees"] = $numAttendees;
-$rating = $HTTP_SESSION_VARS["rating"];
+$_SESSION["numofattendees"] = $numAttendees;
+$rating = $_SESSION["rating"];
$query = "select title,description,submitterUserName,imagethumburl," .
"literatureurl,telephone,timezone,eventtimestamp,street1," .
"street2,city,state,zip,country,latitude,longitude,summary " .
@@ -77,7 +77,7 @@
$listqueryresult = $connection->query($listquery);
while($listqueryresult->next()) {
$tmp_uname = $listqueryresult->get(1);
- if (!is_null($HTTP_SESSION_VARS["uname"]) && $tmp_uname == $username) {
+ if (!is_null($_SESSION["uname"]) && $tmp_uname == $username) {
$unattend = true; // show unattend button if user is already
registered.
}
$attendeeList = $attendeeList." ".'<a
href="users.php?username='.$tmp_uname.'">'.$tmp_uname.'</a><br />';
Modified: incubator/olio/webapp/php/trunk/public_html/findUsers.php
URL:
http://svn.apache.org/viewvc/incubator/olio/webapp/php/trunk/public_html/findUsers.php?rev=733999&r1=733998&r2=733999&view=diff
==============================================================================
--- incubator/olio/webapp/php/trunk/public_html/findUsers.php (original)
+++ incubator/olio/webapp/php/trunk/public_html/findUsers.php Mon Jan 12
18:24:13 2009
@@ -29,7 +29,7 @@
$user = $_REQUEST['query'];
$reqUser = $_REQUEST['reqUser'];
$flag = $_REQUEST['flag'];
-$loggedinuser = $HTTP_SESSION_VARS["uname"];
+$loggedinuser = $_SESSION["uname"];
if(!is_null($user) && !empty($user)){
$users=$isFriend->findUser($user,$loggedinuser,$connection);
}
Modified: incubator/olio/webapp/php/trunk/public_html/friends.php
URL:
http://svn.apache.org/viewvc/incubator/olio/webapp/php/trunk/public_html/friends.php?rev=733999&r1=733998&r2=733999&view=diff
==============================================================================
--- incubator/olio/webapp/php/trunk/public_html/friends.php (original)
+++ incubator/olio/webapp/php/trunk/public_html/friends.php Mon Jan 12 18:24:13
2009
@@ -30,7 +30,7 @@
$flag = $_REQUEST['flag'];
$connection = DBConnection::getInstance();
$friends = Users_Controller::getInstance();
-$loggedinuser = $HTTP_SESSION_VARS["uname"];
+$loggedinuser = $_SESSION["uname"];
$url = RequestUrl::getInstance();
$page= $_REQUEST['page'];
@@ -41,11 +41,11 @@
//Start Pagination
if(!is_null($page)){
- $numPages =$HTTP_SESSION_VARS["numPages"];
- $HTTP_SESSION_VARS["currentpage"]=$page;
- $curr_page = $HTTP_SESSION_VARS["currentpage"];
- $prev_page = $HTTP_SESSION_VARS["currentpage"] - 1;
- $next_page = $HTTP_SESSION_VARS["currentpage"] + 1;
+ $numPages =$_SESSION["numPages"];
+ $_SESSION["currentpage"]=$page;
+ $curr_page = $_SESSION["currentpage"];
+ $prev_page = $_SESSION["currentpage"] - 1;
+ $next_page = $_SESSION["currentpage"] + 1;
$offset = ($page * 10) - 10;
if($offset < 0) {
$offset = 0;
@@ -63,7 +63,7 @@
$count = $row['count'];
unset($result);
$numPages = ceil($count / 10);;
- $HTTP_SESSION_VARS["numPages"] = $numPages;
+ $_SESSION["numPages"] = $numPages;
$prev_page = 1;
$next_page = 2;
$curr_page = 1;
Modified: incubator/olio/webapp/php/trunk/public_html/index.php
URL:
http://svn.apache.org/viewvc/incubator/olio/webapp/php/trunk/public_html/index.php?rev=733999&r1=733998&r2=733999&view=diff
==============================================================================
--- incubator/olio/webapp/php/trunk/public_html/index.php (original)
+++ incubator/olio/webapp/php/trunk/public_html/index.php Mon Jan 12 18:24:13
2009
@@ -26,7 +26,7 @@
session_start();
require("../etc/config.php");
-$signedinuser = $HTTP_SESSION_VARS["uname"];
+$signedinuser = $_SESSION["uname"];
$page= $_REQUEST['page'];
$flag = $_REQUEST['flag'];
@@ -44,14 +44,14 @@
}
if(!is_null($page)){
- $eventdate=$HTTP_SESSION_VARS["eventdate"];
- $zipcode=$HTTP_SESSION_VARS["zipcode"];
- $order=$HTTP_SESSION_VARS["order"];
- $numPages =$HTTP_SESSION_VARS["numPages"];
- $HTTP_SESSION_VARS["currentpage"]=$page;
- $curr_page = $HTTP_SESSION_VARS["currentpage"];
- $prev_page = $HTTP_SESSION_VARS["currentpage"] - 1;
- $next_page = $HTTP_SESSION_VARS["currentpage"] + 1;
+ $eventdate=$_SESSION["eventdate"];
+ $zipcode=$_SESSION["zipcode"];
+ $order=$_SESSION["order"];
+ $numPages =$_SESSION["numPages"];
+ $_SESSION["currentpage"]=$page;
+ $curr_page = $_SESSION["currentpage"];
+ $prev_page = $_SESSION["currentpage"] - 1;
+ $next_page = $_SESSION["currentpage"] + 1;
$offset = ($page * 10) - 10;
if($offset < 0) {
$offset = 0;
@@ -78,21 +78,21 @@
if (is_null($zipcode) && is_null($order) &&
!isset($eventdate)) {
//if (is_null($signedinuser)) { // Get whole page if not logged in...
- if($HTTP_SESSION_VARS["uname"] == ''){
+ if($_SESSION["uname"] == ''){
$cacheType = 2;
} else { // And just the page content if logged in.
$cacheType = 1;
}
} else {
- $HTTP_SESSION_VARS["eventdate"]= $eventdate;
- $HTTP_SESSION_VARS["zipcode"] = $zipcode;
- $HTTP_SESSION_VARS["order"] = $order;
+ $_SESSION["eventdate"]= $eventdate;
+ $_SESSION["zipcode"] = $zipcode;
+ $_SESSION["order"] = $order;
$connection = DBConnection::getInstance();
$eventlist = Events_Controller::getInstance();
$numPages = $eventlist->getNumPages($zipcode,$eventdate,$connection);
$tagcloud = Tags_Controller::getInstance();
- $HTTP_SESSION_VARS["numPages"] = $numPages;
+ $_SESSION["numPages"] = $numPages;
// error_log("numPages = $numPages",0);
$cacheType = 0;
}
@@ -114,7 +114,6 @@
// error_log('fullCachePage Called',0);
global $signedinuser, $page, $flag, $url, $href, $eventdate, $zipcode;
global $order, $numPages, $curr_page, $prev_page, $next_page, $offset;
- global $HTTP_SESSION_VARS;
// error_log('Accesssing Cache subsystem to collect the page if
possible.',0);
$cache = CacheSystem::getInstance();
@@ -187,7 +186,6 @@
// error_log('ContentCachePage Called',0);
global $signedinuser, $page, $flag, $url, $href, $eventdate, $zipcode;
global $order, $numPages, $curr_page, $prev_page, $next_page, $offset;
- global $HTTP_SESSION_VARS;
$cache = CacheSystem::getInstance();
for (;;) {
@@ -209,7 +207,6 @@
// error_log('noCachePage Called',0);
global $signedinuser, $page, $flag, $url, $href, $eventdate, $zipcode;
global $order, $numPages, $curr_page, $prev_page, $next_page, $offset;
- global $HTTP_SESSION_VARS;
$connection = DBConnection::getInstance();
$eventlist = Events_Controller::getInstance();
Modified: incubator/olio/webapp/php/trunk/public_html/login.php
URL:
http://svn.apache.org/viewvc/incubator/olio/webapp/php/trunk/public_html/login.php?rev=733999&r1=733998&r2=733999&view=diff
==============================================================================
--- incubator/olio/webapp/php/trunk/public_html/login.php (original)
+++ incubator/olio/webapp/php/trunk/public_html/login.php Mon Jan 12 18:24:13
2009
@@ -39,13 +39,13 @@
session_register("uname");
$uname=$un;
$sid=session_id();
- $HTTP_SESSION_VARS["uname"]=$uname;
- $HTTP_SESSION_VARS["sid"]=$sid;
+ $_SESSION["uname"]=$uname;
+ $_SESSION["sid"]=$sid;
$success="authenticated";
}
unset($result);
$numFriendshipReq = $register->numFriendshipRequests($un,$connection);
- $HTTP_SESSION_VARS["friendshipreqs"] = $numFriendshipReq;
+ $_SESSION["friendshipreqs"] = $numFriendshipReq;
}
if(!is_null($success)){
Modified: incubator/olio/webapp/php/trunk/public_html/postedEvents.php
URL:
http://svn.apache.org/viewvc/incubator/olio/webapp/php/trunk/public_html/postedEvents.php?rev=733999&r1=733998&r2=733999&view=diff
==============================================================================
--- incubator/olio/webapp/php/trunk/public_html/postedEvents.php (original)
+++ incubator/olio/webapp/php/trunk/public_html/postedEvents.php Mon Jan 12
18:24:13 2009
@@ -37,11 +37,11 @@
//Start Pagination
if(!is_null($page)){
- $numPages =$HTTP_SESSION_VARS["numPages"];
- $HTTP_SESSION_VARS["currentpage"]=$page;
- $curr_page = $HTTP_SESSION_VARS["currentpage"];
- $prev_page = $HTTP_SESSION_VARS["currentpage"] - 1;
- $next_page = $HTTP_SESSION_VARS["currentpage"] + 1;
+ $numPages =$_SESSION["numPages"];
+ $_SESSION["currentpage"]=$page;
+ $curr_page = $_SESSION["currentpage"];
+ $prev_page = $_SESSION["currentpage"] - 1;
+ $next_page = $_SESSION["currentpage"] + 1;
$offset = ($page * 10) - 10;
if($offset < 0) {
$offset = 0;
@@ -59,7 +59,7 @@
$count = $row['count'];
unset($result);
$numPages = ceil($count / 10);;
- $HTTP_SESSION_VARS["numPages"] = $numPages;
+ $_SESSION["numPages"] = $numPages;
$prev_page = 1;
$next_page = 2;
$curr_page = 1;
Modified: incubator/olio/webapp/php/trunk/public_html/rateit.php
URL:
http://svn.apache.org/viewvc/incubator/olio/webapp/php/trunk/public_html/rateit.php?rev=733999&r1=733998&r2=733999&view=diff
==============================================================================
--- incubator/olio/webapp/php/trunk/public_html/rateit.php (original)
+++ incubator/olio/webapp/php/trunk/public_html/rateit.php Mon Jan 12 18:24:13
2009
@@ -25,7 +25,7 @@
session_start();
require_once("../etc/config.php");
$rating= $_REQUEST['rating'];
-$HTTP_SESSION_VARS["rating"] = $rating;
+$_SESSION["rating"] = $rating;
$cid= $_REQUEST['commentid'];
$divid = "editratingText".$cid;
if(isset($cid)){
Modified: incubator/olio/webapp/php/trunk/public_html/rejectInvite.php
URL:
http://svn.apache.org/viewvc/incubator/olio/webapp/php/trunk/public_html/rejectInvite.php?rev=733999&r1=733998&r2=733999&view=diff
==============================================================================
--- incubator/olio/webapp/php/trunk/public_html/rejectInvite.php (original)
+++ incubator/olio/webapp/php/trunk/public_html/rejectInvite.php Mon Jan 12
18:24:13 2009
@@ -30,9 +30,9 @@
$friend = $_REQUEST['friend'];
$rejectSql = "delete from PERSON_PERSON where person_username='$person' and
friends_username='$friend'";
$connection->exec($rejectSql);
-$HTTP_SESSION_VARS["friendshipreqs"]=$friends->numFriendshipRequests($person,$connection);
+$_SESSION["friendshipreqs"]=$friends->numFriendshipRequests($person,$connection);
$incomingRequests = $friends->incomingRequests($person,$connection);
echo "<font color=green>You rejected ". $friend."'s friendship
request.</font>\n";
-echo "friendship requests (".$HTTP_SESSION_VARS["friendshipreqs"].")\n";
+echo "friendship requests (".$_SESSION["friendshipreqs"].")\n";
echo $incomingRequests ;
?>
Modified: incubator/olio/webapp/php/trunk/public_html/taggedEvents.php
URL:
http://svn.apache.org/viewvc/incubator/olio/webapp/php/trunk/public_html/taggedEvents.php?rev=733999&r1=733998&r2=733999&view=diff
==============================================================================
--- incubator/olio/webapp/php/trunk/public_html/taggedEvents.php (original)
+++ incubator/olio/webapp/php/trunk/public_html/taggedEvents.php Mon Jan 12
18:24:13 2009
@@ -30,7 +30,7 @@
$tag=$_REQUEST['tag'];
$page= $_REQUEST['page'];
$dateFormat = "l, F j, Y, h:i A";
-$signedinuser=$HTTP_SESSION_VARS["uname"];
+$signedinuser=$_SESSION["uname"];
$href = $url->getGetRequest();
if(!is_null($page)){
@@ -38,11 +38,11 @@
}
if(!is_null($page)){
- $numPages =$HTTP_SESSION_VARS["numPages"];
- $HTTP_SESSION_VARS["currentpage"]=$page;
- $curr_page = $HTTP_SESSION_VARS["currentpage"];
- $prev_page = $HTTP_SESSION_VARS["currentpage"] - 1;
- $next_page = $HTTP_SESSION_VARS["currentpage"] + 1;
+ $numPages =$_SESSION["numPages"];
+ $_SESSION["currentpage"]=$page;
+ $curr_page = $_SESSION["currentpage"];
+ $prev_page = $_SESSION["currentpage"] - 1;
+ $next_page = $_SESSION["currentpage"] + 1;
$offset = ($page * 10) - 10;
if($offset < 0) {
$offset = 0;
@@ -64,7 +64,7 @@
unset($result);
}
$numPages = ceil($count / 10);;
- $HTTP_SESSION_VARS["numPages"] = $numPages;
+ $_SESSION["numPages"] = $numPages;
$prev_page = 1;
$next_page = 2;
$curr_page = 1;
Modified: incubator/olio/webapp/php/trunk/public_html/upcomingEvents.php
URL:
http://svn.apache.org/viewvc/incubator/olio/webapp/php/trunk/public_html/upcomingEvents.php?rev=733999&r1=733998&r2=733999&view=diff
==============================================================================
--- incubator/olio/webapp/php/trunk/public_html/upcomingEvents.php (original)
+++ incubator/olio/webapp/php/trunk/public_html/upcomingEvents.php Mon Jan 12
18:24:13 2009
@@ -24,7 +24,7 @@
session_start();
require_once("../etc/config.php");
$connection = DBConnection::getInstance();
-$un = $HTTP_SESSION_VARS["uname"];
+$un = $_SESSION["uname"];
$events = Events_Controller::getInstance();
$flag = true;
$url = RequestUrl::getInstance();
@@ -40,11 +40,11 @@
//Start Pagination
if(!is_null($page)){
- $numPages =$HTTP_SESSION_VARS["numPages"];
- $HTTP_SESSION_VARS["currentpage"]=$page;
- $curr_page = $HTTP_SESSION_VARS["currentpage"];
- $prev_page = $HTTP_SESSION_VARS["currentpage"] - 1;
- $next_page = $HTTP_SESSION_VARS["currentpage"] + 1;
+ $numPages =$_SESSION["numPages"];
+ $_SESSION["currentpage"]=$page;
+ $curr_page = $_SESSION["currentpage"];
+ $prev_page = $_SESSION["currentpage"] - 1;
+ $next_page = $_SESSION["currentpage"] + 1;
$offset = ($page * 10) - 10;
if($offset < 0) {
$offset = 0;
@@ -62,7 +62,7 @@
$count = $row['count'];
unset($result);
$numPages = ceil($count / 10);;
- $HTTP_SESSION_VARS["numPages"] = $numPages;
+ $_SESSION["numPages"] = $numPages;
$prev_page = 1;
$next_page = 2;
$curr_page = 1;
Modified: incubator/olio/webapp/php/trunk/public_html/yourUpcomingEvents.php
URL:
http://svn.apache.org/viewvc/incubator/olio/webapp/php/trunk/public_html/yourUpcomingEvents.php?rev=733999&r1=733998&r2=733999&view=diff
==============================================================================
--- incubator/olio/webapp/php/trunk/public_html/yourUpcomingEvents.php
(original)
+++ incubator/olio/webapp/php/trunk/public_html/yourUpcomingEvents.php Mon Jan
12 18:24:13 2009
@@ -24,7 +24,7 @@
session_start();
require_once("../etc/config.php");
$connection = DBConnection::getInstance();
-$un = $HTTP_SESSION_VARS["uname"];
+$un = $_SESSION["uname"];
$events = Events_Controller::getInstance();
$flag = false;
$yourUpcomingEvents =
$events->getUpcomingEventsForUser($un,$connection,$flag,null);
Modified: incubator/olio/webapp/php/trunk/views/commentsRating.php
URL:
http://svn.apache.org/viewvc/incubator/olio/webapp/php/trunk/views/commentsRating.php?rev=733999&r1=733998&r2=733999&view=diff
==============================================================================
--- incubator/olio/webapp/php/trunk/views/commentsRating.php (original)
+++ incubator/olio/webapp/php/trunk/views/commentsRating.php Mon Jan 12
18:24:13 2009
@@ -26,7 +26,7 @@
*/
?>
<li class="event_comment" id="<? echo $tmp_commentid;?>">
- <? if ($tmp_uname == $HTTP_SESSION_VARS["uname"]) { ?>
+ <? if ($tmp_uname == $_SESSION["uname"]) { ?>
You
<? }else{
echo $tmp_uname;
@@ -77,7 +77,7 @@
<p id="comment_text<?php echo $tmp_commentid;?>"><?=$tmp_uname_comments
?></p>
<div id="comment_links<?php echo $tmp_commentid;?>">
- <? if ($tmp_uname == $HTTP_SESSION_VARS["uname"]) { ?>
+ <? if ($tmp_uname == $_SESSION["uname"]) { ?>
<a href="#edit" id="edit<?php echo $tmp_commentid;?>"
class='edit_comment' style='color:#999;' onclick="return ShowHideLayer('<?php
echo "editing".$tmp_commentid;?>');">Edit</a>
or
<a href="#delete" id="delete<?php echo $tmp_commentid;?>"
onclick="deleteCR(<?php echo $tmp_commentid;?>,<?php echo $se;?>);"
class='edit_comment' style='color:#999;' >Delete</a>
Modified: incubator/olio/webapp/php/trunk/views/events.php
URL:
http://svn.apache.org/viewvc/incubator/olio/webapp/php/trunk/views/events.php?rev=733999&r1=733998&r2=733999&view=diff
==============================================================================
--- incubator/olio/webapp/php/trunk/views/events.php (original)
+++ incubator/olio/webapp/php/trunk/views/events.php Mon Jan 12 18:24:13 2009
@@ -67,7 +67,7 @@
<div id="main_event_details">
<h1 class="inline"><?=$title ?></h1>
-<? if ($submitter == $HTTP_SESSION_VARS["uname"]) { ?>
+<? if ($submitter == $_SESSION["uname"]) { ?>
<form method="post" action="addEvent.php?socialEventID=<?echo
$se;?>" class="button-to">
<div>
<input type="submit" value="Edit" />
@@ -102,7 +102,7 @@
<? if ($unattend) { ?>
<input name="unattend" type="button" value="Unattend"
onclick="deleteAttendee();"/>
<? } ?>
-<? if (!$unattend && !is_null($HTTP_SESSION_VARS["uname"])) { ?>
+<? if (!$unattend && !is_null($_SESSION["uname"])) { ?>
<input name="attend" type="button" value="Attend" onclick="addAttendee();"/>
<? } ?>
<br/>
@@ -158,7 +158,7 @@
</ol>
</div>
<div id="comment_add_link">
- <? if(!is_null($HTTP_SESSION_VARS["uname"])){ ?>
+ <? if(!is_null($_SESSION["uname"])){ ?>
<a href="#comment" id="commentsRatingToggle" onclick="return
ShowHideLayer('commentsRatingBox');">Add a comment</a>
<?} else {?>
<br />
Modified: incubator/olio/webapp/php/trunk/views/site.php
URL:
http://svn.apache.org/viewvc/incubator/olio/webapp/php/trunk/views/site.php?rev=733999&r1=733998&r2=733999&view=diff
==============================================================================
--- incubator/olio/webapp/php/trunk/views/site.php (original)
+++ incubator/olio/webapp/php/trunk/views/site.php Mon Jan 12 18:24:13 2009
@@ -40,7 +40,7 @@
<a href="http://brazilian:8080/feedFromDB.php" id="rss_icon">
<img alt="Rss-icon-large" src="/images/RSS-icon-large.gif" />
</a>
- <? if(is_null($HTTP_SESSION_VARS["uname"])){ ?>
+ <? if(is_null($_SESSION["uname"])){ ?>
<div id="inline_login">
<a name="login"></a>
<? readfile(Web20::$config['includes'] . "login.html"); ?>
@@ -48,10 +48,10 @@
<? } ?>
<ul id="main_nav">
<li ><a href="index.php" title="Home"><span>Home</span></a></li>
- <? if(!is_null($HTTP_SESSION_VARS["uname"])){ ?>
+ <? if(!is_null($_SESSION["uname"])){ ?>
<li><a href="addEvent.php" title="Add Event"><span>Add
Event</span></a></li>
<li><a href="findUsers.php" title="Find
Users"><span>Users</span></a></li>
- <li><a href="addPerson.php?username=<? echo
$HTTP_SESSION_VARS["uname"];?>" title="Edit Profile"><span>Edit
Profile</span></a></li>
+ <li><a href="addPerson.php?username=<? echo
$_SESSION["uname"];?>" title="Edit Profile"><span>Edit Profile</span></a></li>
<? } else { ?>
<li><a href="addPerson.php"
title="Register"><span>Register</span></a></li>
<? } ?>
@@ -83,8 +83,8 @@
<div class="inside">
- <? if(!is_null($HTTP_SESSION_VARS["uname"])){ ?>
- Hello, <strong><a href="users.php?username=<? echo
$HTTP_SESSION_VARS["uname"];?>"><?=$HTTP_SESSION_VARS["uname"]?></a></strong>
+ <? if(!is_null($_SESSION["uname"])){ ?>
+ Hello, <strong><a href="users.php?username=<? echo
$_SESSION["uname"];?>"><?=$_SESSION["uname"]?></a></strong>
<a href="logout.php"> (Logout)</a><br/>
<? }else{ ?>
Not logged in.
@@ -97,7 +97,7 @@
</div>
<hr />
<div id="upcoming_subset">
- <? if(!is_null($HTTP_SESSION_VARS["uname"])){
+ <? if(!is_null($_SESSION["uname"])){
require_once("yourUpcomingEvents.php");
?>
<div style="text-align: right; padding-right: 25px;">
@@ -105,9 +105,9 @@
</div>
<?}?>
</div>
- <? if(!is_null($HTTP_SESSION_VARS["uname"])){ ?>
+ <? if(!is_null($_SESSION["uname"])){ ?>
<div id="requests_link">
- <a href="users.php?username=<? echo
$HTTP_SESSION_VARS["uname"];?>#incoming_requests"><div id="rq">friendship
requests (<?=$HTTP_SESSION_VARS["friendshipreqs"]?>)</div></a>
+ <a href="users.php?username=<? echo
$_SESSION["uname"];?>#incoming_requests"><div id="rq">friendship requests
(<?=$_SESSION["friendshipreqs"]?>)</div></a>
</div>
<?}?>
<hr />
Modified: incubator/olio/webapp/php/trunk/views/users.php
URL:
http://svn.apache.org/viewvc/incubator/olio/webapp/php/trunk/views/users.php?rev=733999&r1=733998&r2=733999&view=diff
==============================================================================
--- incubator/olio/webapp/php/trunk/views/users.php (original)
+++ incubator/olio/webapp/php/trunk/views/users.php Mon Jan 12 18:24:13 2009
@@ -93,7 +93,7 @@
<div id="main_user_details">
<h1 class="inline"><?=$username;?></h1>
<?
- if ($username == $HTTP_SESSION_VARS["uname"]) {
+ if ($username == $_SESSION["uname"]) {
echo '(<a
href="addPerson.php?username='.$username.'">Edit</a>)'; }
?>
<br />
@@ -129,7 +129,7 @@
<p class="clr" />
</div>
<? echo '<a href="friends.php?username='.$username.'">more...</a>'; ?>
-<?if ($username == $HTTP_SESSION_VARS["uname"]) {?>
+<?if ($username == $_SESSION["uname"]) {?>
<a name="incoming_requests"></a>
<div id="incoming">
<fieldset id="incoming_requests">