Vergleich inc/class_session.php - 1.2.2 - 1.2.8

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 3Zeile 3
 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html

 *

 *

 * $Id: class_session.php 2411 2006-11-13 23:29:12Z CraKteR $

 * $Id: class_session.php 3124 2007-06-06 04:56:26Z chris $

 */

class session

 */

class session

Zeile 105Zeile 105
		}

// As a token of our appreciation for getting this far, give the user a cookie

		}

// As a token of our appreciation for getting this far, give the user a cookie

		my_setcookie("sid", $this->sid, -1, true);




		if((!$_COOKIE['sid'] || $_COOKIE['sid'] != $this->sid) && $this->sid)
{
my_setcookie("sid", $this->sid, -1, true);
}

	}

/**

	}

/**

Zeile 120Zeile 123

$uid = intval($uid);
$query = $db->query("


$uid = intval($uid);
$query = $db->query("

			SELECT u.*, f.*, b.dateline AS bandate, b.lifted AS banlifted, b.oldgroup AS banoldgroup 

			SELECT u.*, f.*, b.dateline AS bandate, b.lifted AS banlifted, b.oldgroup AS banoldgroup, b.olddisplaygroup as banolddisplaygroup, b.oldadditionalgroups as banoldadditionalgroups 

			FROM ".TABLE_PREFIX."users u 
LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid)
LEFT JOIN ".TABLE_PREFIX."banned b ON (b.uid=u.uid)

			FROM ".TABLE_PREFIX."users u 
LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid)
LEFT JOIN ".TABLE_PREFIX."banned b ON (b.uid=u.uid)

Zeile 188Zeile 191
		}
else
{

		}
else
{

			$mybb->user['lastvisit'] = $mybb->user['lastvisit'];

 
			$timespent = time() - $mybb->user['lastactive'];
$db->shutdown_query("UPDATE ".TABLE_PREFIX."users SET lastactive='$time', timeonline=timeonline+$timespent $popupadd WHERE uid='".$mybb->user['uid']."'");
}

			$timespent = time() - $mybb->user['lastactive'];
$db->shutdown_query("UPDATE ".TABLE_PREFIX."users SET lastactive='$time', timeonline=timeonline+$timespent $popupadd WHERE uid='".$mybb->user['uid']."'");
}

Zeile 197Zeile 199
		if($mybb->user['language'] && $lang->language_exists($mybb->user['language']))
{
$mybb->settings['bblanguage'] = $mybb->user['language'];

		if($mybb->user['language'] && $lang->language_exists($mybb->user['language']))
{
$mybb->settings['bblanguage'] = $mybb->user['language'];

		}

		}

		if($mybb->user['dateformat'] != "0" || $mybb->user['dateformat'] != '')
{
// Choose date format.

		if($mybb->user['dateformat'] != "0" || $mybb->user['dateformat'] != '')
{
// Choose date format.

Zeile 220Zeile 222
					break;
case "6":
$mybb->settings['dateformat'] = "d-m-y";

					break;
case "6":
$mybb->settings['dateformat'] = "d-m-y";

					break;

					break;

				case "7":
$mybb->settings['dateformat'] = "d.m.Y";
break;

				case "7":
$mybb->settings['dateformat'] = "d.m.Y";
break;

Zeile 229Zeile 231
					break;
case "9":
$mybb->settings['dateformat'] = "F jS, Y";

					break;
case "9":
$mybb->settings['dateformat'] = "F jS, Y";

					break;

					break;

				case "10":
$mybb->settings['dateformat'] = "l, F jS, Y";

				case "10":
$mybb->settings['dateformat'] = "l, F jS, Y";

					break;

					break;

				case "11":
$mybb->settings['dateformat'] = "jS F Y";
break;

				case "11":
$mybb->settings['dateformat'] = "jS F Y";
break;

Zeile 240Zeile 242
					$mybb->settings['dateformat'] = "l, jS F Y";
break;
default:

					$mybb->settings['dateformat'] = "l, jS F Y";
break;
default:

					break;
}
}

					break;
}
}


// Choose time format.
if($mybb->user['timeformat'] != "0" || $mybb->user['timeformat'] != '')
{


// Choose time format.
if($mybb->user['timeformat'] != "0" || $mybb->user['timeformat'] != '')
{

			switch($mybb->user['timeformat']) {


			switch($mybb->user['timeformat'])
{

				case "1":
$mybb->settings['timeformat'] = "h:i a";
break;

				case "1":
$mybb->settings['timeformat'] = "h:i a";
break;

Zeile 279Zeile 282
			$db->shutdown_query("UPDATE ".TABLE_PREFIX."users SET usergroup='".$mybb->user['banoldgroup']."' WHERE uid='".$mybb->user['uid']."'");
$db->shutdown_query("DELETE FROM ".TABLE_PREFIX."banned WHERE uid='".$mybb->user['uid']."'");
// we better do this..otherwise they have dodgy permissions

			$db->shutdown_query("UPDATE ".TABLE_PREFIX."users SET usergroup='".$mybb->user['banoldgroup']."' WHERE uid='".$mybb->user['uid']."'");
$db->shutdown_query("DELETE FROM ".TABLE_PREFIX."banned WHERE uid='".$mybb->user['uid']."'");
// we better do this..otherwise they have dodgy permissions

			$query = $db->simple_select(TABLE_PREFIX."usergroups", "usergroup", "gid='".$mybb->user['banoldgroup']."'", array('limit' => 1)); 
$group = $db->fetch_array($query);
$mybb->user['usergroup'] = $group['usergroup'];


			$mybb->user['usergroup'] = $mybb->user['banoldgroup'];
$mybb->user['displaygroup'] = $mybb->user['banolddisplaygroup'];
$mybb->user['additionalgroups'] = $mybb->user['banoldadditionalgroups'];


			$mybbgroups = $mybb->user['usergroup'];

			$mybbgroups = $mybb->user['usergroup'];

 
			if($mybb->user['additionalgroups'])
{
$mybbgroups .= ','.$mybb->user['additionalgroups'];
}

		}
else if(!empty($mybb->user['bandate']) && (empty($mybb->user['banlifted']) || !empty($mybb->user['banlifted']) && $mybb->user['banlifted'] > $time))

		}
else if(!empty($mybb->user['bandate']) && (empty($mybb->user['banlifted']) || !empty($mybb->user['banlifted']) && $mybb->user['banlifted'] > $time))

        {

        {

            $mybbgroups = $mybb->user['usergroup'];
}
else
{
// Gather a full permission set for this user and the groups they are in.

            $mybbgroups = $mybb->user['usergroup'];
}
else
{
// Gather a full permission set for this user and the groups they are in.

            $mybbgroups = $mybb->user['usergroup'].",".$mybb->user['additionalgroups'];





			$mybbgroups = $mybb->user['usergroup'];
if($mybb->user['additionalgroups'])
{
$mybbgroups .= ','.$mybb->user['additionalgroups'];
}

        }

        }

		



		$mybb->usergroup = usergroup_permissions($mybbgroups);
if(!$mybb->user['displaygroup'])
{

		$mybb->usergroup = usergroup_permissions($mybbgroups);
if(!$mybb->user['displaygroup'])
{

Zeile 475Zeile 487
		// Else delete by ip.
else
{

		// Else delete by ip.
else
{

			$db->delete_query(TABLE_PREFIX."sessions", "ip='".$this->ipaddress."'");

			$db->delete_query(TABLE_PREFIX."sessions", "ip='".$db->escape_string($this->ipaddress)."'");

			$onlinedata['uid'] = 0;
}


			$onlinedata['uid'] = 0;
}