Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/eula.html *
|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/eula.html *
|
* $Id$
| * $Id: functions.php 966 2005-12-12 23:33:28Z chris $
|
*/
/* Do not change the following line if you wish to receive technical support */
|
*/
/* Do not change the following line if you wish to receive technical support */
|
$mybboard['internalver'] = "1.00"; $mybboard['vercode'] = "100.07";
| $mybboard['internalver'] = "1.1.3"; $mybboard['vercode'] = "113";
|
// // Outputs the contents of a page rendering variables
| // // Outputs the contents of a page rendering variables
|
Zeile 37 | Zeile 37 |
---|
$serverload = serverload(); if(strstr(getenv("REQUEST_URI"), "?")) {
|
$serverload = serverload(); if(strstr(getenv("REQUEST_URI"), "?")) {
|
$debuglink = getenv("REQUEST_URI") . "&debug=1";
| $debuglink = htmlspecialchars(getenv("REQUEST_URI")) . "&debug=1";
|
} else {
|
} else {
|
$debuglink = getenv("REQUEST_URI") . "?debug=1";
| $debuglink = htmlspecialchars(getenv("REQUEST_URI")) . "?debug=1";
|
} if($mybb->settings['gzipoutput'] != "no") {
| } if($mybb->settings['gzipoutput'] != "no") {
|
Zeile 315 | Zeile 315 |
---|
$title = $mybb->settings['bbname']; } if($mybb->settings['redirects'] == "on")
|
$title = $mybb->settings['bbname']; } if($mybb->settings['redirects'] == "on")
|
{
| {
|
eval("\$redirectpage = \"".$templates->get("redirect")."\";"); outputpage($redirectpage); }
| eval("\$redirectpage = \"".$templates->get("redirect")."\";"); outputpage($redirectpage); }
|
Zeile 323 | Zeile 323 |
---|
{ $url = str_replace("#", "&#", $url); $url = str_replace("&", "&", $url);
|
{ $url = str_replace("#", "&#", $url); $url = str_replace("&", "&", $url);
|
| $url = str_replace(array("\n","\r",";"), "", $url);
|
header("Location: $url"); } exit;
| header("Location: $url"); } exit;
|
Zeile 380 | Zeile 381 |
---|
eval("\$end = \"".$templates->get("multipage_end")."\";"); eval("\$multipage = \"".$templates->get("multipage")."\";"); return $multipage;
|
eval("\$end = \"".$templates->get("multipage_end")."\";"); eval("\$multipage = \"".$templates->get("multipage")."\";"); return $multipage;
|
} }
//
| } }
//
|
// Check if a certain forum by id exists // function validateforum($fid)
| // Check if a certain forum by id exists // function validateforum($fid)
|
Zeile 392 | Zeile 393 |
---|
$query = $db->query("SELECT fid FROM ".TABLE_PREFIX."forums WHERE fid='$fid'"); $validforum = $db->fetch_array($query); return (($fid=$validforum['fid'])? true:false);
|
$query = $db->query("SELECT fid FROM ".TABLE_PREFIX."forums WHERE fid='$fid'"); $validforum = $db->fetch_array($query); return (($fid=$validforum['fid'])? true:false);
|
| }
// Build the usergroup permissions for a specific user // function user_permissions($uid=0) { global $mybb, $cache, $groupscache, $usercache;
if($uid == 0) { $uid = $mybb->user['uid']; }
if($uid != $mybb->user['uid']) { if($usercache[$uid]) { $query = $db->query("SELECT * FROM ".TABLE_PREFIX."users WHERE uid='$uid'"); $usercache[$uid] = $db->fetch_array($query); } $gid = $usercache[$uid]['usergroup'].",".$usercache[$uid]['additionalgroups']; $groupperms = usergroup_permissions($gid); } else { $groupperms = $mybb->usergroup; } return $groupperms;
|
}
//
| }
//
|
Zeile 400 | Zeile 429 |
---|
function usergroup_permissions($gid=0) { global $cache, $groupscache, $grouppermignore, $groupzerogreater;
|
function usergroup_permissions($gid=0) { global $cache, $groupscache, $grouppermignore, $groupzerogreater;
|
if(!is_array($groupscache)) {
| if(!is_array($groupscache)) {
|
$groupscache = $cache->read("usergroups"); } $groups = explode(",", $gid);
| $groupscache = $cache->read("usergroups"); } $groups = explode(",", $gid);
|
Zeile 432 | Zeile 461 |
---|
if($access == 0) { $usergroup[$perm] = 0;
|
if($access == 0) { $usergroup[$perm] = 0;
|
| $zerogreater = 1;
|
} }
|
} }
|
elseif($access > $permbit || ($access == "yes" && $permbit == "no") || !$permbit)
| if(($access > $permbit || ($access == "yes" && $permbit == "no") || !$permbit) && $zerogreater != 1)
|
{ $usergroup[$perm] = $access; }
|
{ $usergroup[$perm] = $access; }
|
| $zerogreater = 0;
|
} } } return $usergroup;
|
} } } return $usergroup;
|
}
//
| }
//
|
// Build the display group details for the given group // function usergroup_displaygroup($gid)
| // Build the display group details for the given group // function usergroup_displaygroup($gid)
|
Zeile 488 | Zeile 518 |
---|
} else {
|
} else {
|
$gid = $mybb->user['usergroup'].",".$mybbuser['additionalgroups'];
| $gid = $mybb->user['usergroup'].",".$mybb->user['additionalgroups'];
|
$groupperms = $mybbgroup;
|
$groupperms = $mybbgroup;
|
} } if(!is_array($forumcache)) { cacheforums(); } if(!is_array($forumcache)) {
| } } if(!is_array($forumcache)) { cacheforums(); } if(!is_array($forumcache)) {
|
return false; } if(!is_array($fpermcache))
|
return false; } if(!is_array($fpermcache))
|
{
| {
|
$fpermcache = $cache->read("forumpermissions"); } if($fid) // Fetch the permissions for a single forum { $permissions = fetch_forum_permissions($fid, $gid, $groupperms);
|
$fpermcache = $cache->read("forumpermissions"); } if($fid) // Fetch the permissions for a single forum { $permissions = fetch_forum_permissions($fid, $gid, $groupperms);
|
}
| }
|
else { foreach($forumcache as $forum)
| else { foreach($forumcache as $forum)
|
Zeile 522 | Zeile 552 |
---|
// Perform inheritance scheme for forum permissions // function fetch_forum_permissions($fid, $gid, $groupperms)
|
// Perform inheritance scheme for forum permissions // function fetch_forum_permissions($fid, $gid, $groupperms)
|
{ global $groupscache, $forumcache, $fpermcache;
| { global $groupscache, $forumcache, $fpermcache, $mybb;
|
$groups = explode(",", $gid); if(!$fpermcache[$fid]) // This forum has no custom or inherited permisssions so lets just return the group permissions
|
$groups = explode(",", $gid); if(!$fpermcache[$fid]) // This forum has no custom or inherited permisssions so lets just return the group permissions
|
{
| {
|
return $groupperms; } else // Okay, we'll do it the hard way because this forum must have some custom or inherited permissions
| return $groupperms; } else // Okay, we'll do it the hard way because this forum must have some custom or inherited permissions
|
Zeile 538 | Zeile 568 |
---|
if(!is_array($fpermcache[$fid][$gid])) { continue;
|
if(!is_array($fpermcache[$fid][$gid])) { continue;
|
}
| }
|
foreach($fpermcache[$fid][$gid] as $perm => $access) { if($perm != "fid" && $perm != "gid" && $perm != "pid")
| foreach($fpermcache[$fid][$gid] as $perm => $access) { if($perm != "fid" && $perm != "gid" && $perm != "pid")
|
Zeile 558 | Zeile 588 |
---|
$forumpermissions = $groupperms; } return $forumpermissions;
|
$forumpermissions = $groupperms; } return $forumpermissions;
|
}
// // REDUNDANT CODE - TO BE REMOVED // function getpermissions($fid=0, $uid=0, $gid="", $parentslist="") { die("USING OLD CODE - getpmerissions"); global $db, $mybb, $mybbuser, $usercache, $permscache, $usergroups, $mybbgroup, $groupscache, $cache; if(!$groupscache) { $groupscache = $cache->read("usergroups"); } $uid = (!$uid) ? $mybb->user['uid'] : $uid; if(!$gid) { if($uid == 0) { $gid = 1; } else { $usercache[$uid]=($uid==$mybb->user['uid'])?$mybbuser:$uid; $usercache[$uid]=($uid==$mybb->user['uid'])?$mybb:$uid; if(!$usercache[$uid]) { $query = $db->query("SELECT * FROM ".TABLE_PREFIX."users WHERE uid='$uid'"); $user = $db->fetch_array($query); $usercache[$user['uid']] = $user; $gid = $user['usergroup']; } $gid = ($usercache[$uid]) ? $usercache[$uid]['usergroup'] : $gid; } } if(!$permissioncache[$gid][$fid]) { if(!$fid) { if(!$usergroups[$gid]) { if($mybb->user['uid'] && $gid == $mybbuser['usergroup']) { $usergroups[$gid] = $mybbgroup; } else { $usergroups[$gid] = $groupscache[$gid]; } } return $usergroups[$gid]; } else { $parentslist=(!$parentslist)?getparentlist($fid):$parentslist; $sql = buildparentlist($fid, "fid", "OR", $parentslist); $query = $db->query("SELECT *, INSTR(',$parentslist,', CONCAT(',', fid, ',') ) AS useperm FROM ".TABLE_PREFIX."forumpermissions WHERE gid='$gid' AND $sql ORDER BY useperm LIMIT 1"); $perms = $db->fetch_array($query); if(!$perms['pid']) { if(!$usergroups[$gid]) { if($gid == $mybbuser['usergroup']) { $usergroups[$gid] = $mybbgroup; } else { //$perms=$db->fetch_array($db->query("SELECT * FROM usergroups WHERE gid='$gid'")); $usergroups[$gid] = $groupscache[$gid]; } $perms = $usergroups[$gid];
} else { $perms = $usergroups[$gid]; } } } $permscache[$gid][$fid] = $perms; } else { return $permscache[$gid][$fid]; } return $perms;
| |
}
//
| }
//
|
Zeile 682 | Zeile 626 |
---|
{ global $mybb, $mybbuser, $toplinks, $header, $settings, $footer, $css, $headerinclude, $theme, $_SERVER, $breadcrumb, $templates, $lang; $showform = 1;
|
{ global $mybb, $mybbuser, $toplinks, $header, $settings, $footer, $css, $headerinclude, $theme, $_SERVER, $breadcrumb, $templates, $lang; $showform = 1;
|
|
|
if($password) { if($mybb->input['pwverify']) { if($password == $mybb->input['pwverify'])
|
if($password) { if($mybb->input['pwverify']) { if($password == $mybb->input['pwverify'])
|
{
| {
|
mysetcookie("forumpass[$fid]", md5($mybb->user['uid'].$mybb->input['pwverify']));
|
mysetcookie("forumpass[$fid]", md5($mybb->user['uid'].$mybb->input['pwverify']));
|
$showform = 0; }
| $showform = 0; }
|
else { eval("\$pwnote = \"".$templates->get("forumdisplay_password_wrongpass")."\";");
| else { eval("\$pwnote = \"".$templates->get("forumdisplay_password_wrongpass")."\";");
|
Zeile 703 | Zeile 647 |
---|
if(!$_COOKIE['forumpass'][$fid] || ($_COOKIE['forumpass'][$fid] && md5($mybb->user['uid'].$password) != $_COOKIE['forumpass'][$fid])) { $showform = 1;
|
if(!$_COOKIE['forumpass'][$fid] || ($_COOKIE['forumpass'][$fid] && md5($mybb->user['uid'].$password) != $_COOKIE['forumpass'][$fid])) { $showform = 1;
|
}
| }
|
else { $showform = 0;
|
else { $showform = 0;
|
}
| }
|
}
|
}
|
}
| }
|
else { $showform = 0; } if($showform)
|
else { $showform = 0; } if($showform)
|
{
| {
|
eval("\$pwform = \"".$templates->get("forumdisplay_password")."\";"); outputpage($pwform); exit;
| eval("\$pwform = \"".$templates->get("forumdisplay_password")."\";"); outputpage($pwform); exit;
|
Zeile 731 | Zeile 675 |
---|
static $modpermscache; $uid=(!$uid)?$mybb->user[$uid]:$uid; if(!$modpermscache[$uid][$fid])
|
static $modpermscache; $uid=(!$uid)?$mybb->user[$uid]:$uid; if(!$modpermscache[$uid][$fid])
|
{
| {
|
$parentslist=(!$parentslist)?getparentlist($fid):$parentslist; $sql = buildparentlist($fid, "fid", "OR", $parentslist); $query = $db->query("SELECT * FROM ".TABLE_PREFIX."moderators WHERE uid='$uid' AND $sql");
| $parentslist=(!$parentslist)?getparentlist($fid):$parentslist; $sql = buildparentlist($fid, "fid", "OR", $parentslist); $query = $db->query("SELECT * FROM ".TABLE_PREFIX."moderators WHERE uid='$uid' AND $sql");
|
Zeile 780 | Zeile 724 |
---|
if(!$action && $modperms) { return "yes";
|
if(!$action && $modperms) { return "yes";
|
}
| }
|
else { if($modperms[$action] == "yes") { return "yes"; }
|
else { if($modperms[$action] == "yes") { return "yes"; }
|
else
| else
|
{ return "no"; } }
|
{ return "no"; } }
|
}
| }
|
} }
| } }
|
Zeile 801 | Zeile 745 |
---|
// function getposticons() {
|
// function getposticons() {
|
global $db, $icon, $settings, $theme, $templates, $lang; $listed = 0; $query = $db->query("SELECT * FROM ".TABLE_PREFIX."icons ORDER BY name DESC"); while($dbicon = $db->fetch_array($query)) { if($icon == $dbicon['iid'])
| global $mybb, $db, $icon, $settings, $theme, $templates, $lang; $listed = 0; $query = $db->query("SELECT * FROM ".TABLE_PREFIX."icons ORDER BY name DESC"); while($dbicon = $db->fetch_array($query)) { if($mybb->input['icon'] == $dbicon['iid'])
|
{ $iconlist .= "<input type=\"radio\" name=\"icon\" value=\"".$dbicon['iid']."\" checked> <img src=\"".$dbicon['path']."\" alt=\"".$dbicon['name']."\">";
|
{ $iconlist .= "<input type=\"radio\" name=\"icon\" value=\"".$dbicon['iid']."\" checked> <img src=\"".$dbicon['path']."\" alt=\"".$dbicon['name']."\">";
|
} else {
| } else {
|
$iconlist .= "<input type=\"radio\" name=\"icon\" value=\"".$dbicon['iid']."\"> <img src=\"".$dbicon['path']."\" alt=\"".$dbicon['name']."\">"; } $listed++;
| $iconlist .= "<input type=\"radio\" name=\"icon\" value=\"".$dbicon['iid']."\"> <img src=\"".$dbicon['path']."\" alt=\"".$dbicon['name']."\">"; } $listed++;
|
Zeile 841 | Zeile 785 |
---|
} else {
|
} else {
|
if($mybb->user['rememberme'] == "no") { $expires = ""; } else { $expires = time() + (60*60*24*365); // Make the cookie expire in a years time }
| if($mybb->user['rememberme'] == "no") { $expires = 0; } else { $expires = time() + (60*60*24*365); // Make the cookie expire in a years time }
|
} if($mybb->settings['cookiedomain'])
|
} if($mybb->settings['cookiedomain'])
|
{
| {
|
setcookie($name, $value, $expires, $mybb->settings['cookiepath'], $mybb->settings['cookiedomain']);
|
setcookie($name, $value, $expires, $mybb->settings['cookiepath'], $mybb->settings['cookiedomain']);
|
}
| }
|
else { setcookie($name, $value, $expires, $mybb->settings['cookiepath']);
| else { setcookie($name, $value, $expires, $mybb->settings['cookiepath']);
|
Zeile 867 | Zeile 811 |
---|
if(!$mybb->settings['cookiepath']) { $mybb->settings['cookiepath'] = "/";
|
if(!$mybb->settings['cookiepath']) { $mybb->settings['cookiepath'] = "/";
|
}
| }
|
if($mybb->settings['cookiedomain']) { @setcookie($name, "", $expires, $mybb->settings['cookiepath'], $mybb->settings['cookiedomain']);
| if($mybb->settings['cookiedomain']) { @setcookie($name, "", $expires, $mybb->settings['cookiepath'], $mybb->settings['cookiedomain']);
|
Zeile 965 | Zeile 909 |
---|
$lp['lastposter'] = addslashes($lp['lastposter']); $lpadd = ",lastpost='".$lp['lastpost']."', lastposter='".$lp['lastposter']."', lastposttid='".$lp['tid']."'"; }
|
$lp['lastposter'] = addslashes($lp['lastposter']); $lpadd = ",lastpost='".$lp['lastpost']."', lastposter='".$lp['lastposter']."', lastposttid='".$lp['tid']."'"; }
|
|
|
// Get the post counters for this forum and its children $query = $db->query("SELECT COUNT(*) AS totthreads, SUM(replies) AS totreplies FROM ".TABLE_PREFIX."threads WHERE fid='$fid' AND visible='1' AND closed NOT LIKE 'moved|%'"); $posts2 = $db->fetch_array($query);
| // Get the post counters for this forum and its children $query = $db->query("SELECT COUNT(*) AS totthreads, SUM(replies) AS totreplies FROM ".TABLE_PREFIX."threads WHERE fid='$fid' AND visible='1' AND closed NOT LIKE 'moved|%'"); $posts2 = $db->fetch_array($query);
|
Zeile 988 | Zeile 932 |
---|
if($val && $val != $fid) { updateforumcount($val);
|
if($val && $val != $fid) { updateforumcount($val);
|
} } }
| } } }
|
}
function updatethreadcount($tid)
| }
function updatethreadcount($tid)
|
Zeile 1000 | Zeile 944 |
---|
$replies = $db->fetch_array($query); $treplies = $replies['replies'] - 1; if($treplies < 0)
|
$replies = $db->fetch_array($query); $treplies = $replies['replies'] - 1; if($treplies < 0)
|
{
| {
|
$treplies = 0; } $query = $db->query("SELECT u.uid, u.username, p.username AS postusername, p.dateline FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid) WHERE p.tid='$tid' AND p.visible='1' ORDER BY p.dateline DESC LIMIT 1");
| $treplies = 0; } $query = $db->query("SELECT u.uid, u.username, p.username AS postusername, p.dateline FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid) WHERE p.tid='$tid' AND p.visible='1' ORDER BY p.dateline DESC LIMIT 1");
|
Zeile 1009 | Zeile 953 |
---|
$query = $db->query("SELECT u.uid, u.username, p.username AS postusername, p.dateline FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid) WHERE p.tid='$tid' AND p.visible='1' ORDER BY p.dateline ASC LIMIT 0,1"); $firstpost = $db->fetch_array($query); if(!$firstpost['username'])
|
$query = $db->query("SELECT u.uid, u.username, p.username AS postusername, p.dateline FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid) WHERE p.tid='$tid' AND p.visible='1' ORDER BY p.dateline ASC LIMIT 0,1"); $firstpost = $db->fetch_array($query); if(!$firstpost['username'])
|
{
| {
|
$firstpost['username'] = $firstpost['postusername']; } if(!$lastpost['username']) { $lastpost['username'] = $lastpost['postusername'];
|
$firstpost['username'] = $firstpost['postusername']; } if(!$lastpost['username']) { $lastpost['username'] = $lastpost['postusername'];
|
}
| }
|
if(!$lastpost['postusername'] || !$lastpost['dateline']) {
| if(!$lastpost['postusername'] || !$lastpost['dateline']) {
|
Zeile 1035 | Zeile 979 |
---|
while($post = $db->fetch_array($query)) { if($userposts[$post['uid']])
|
while($post = $db->fetch_array($query)) { if($userposts[$post['uid']])
|
{
| {
|
$userposts[$post['uid']]--; } else
|
$userposts[$post['uid']]--; } else
|
{
| {
|
$userposts[$post['uid']] = -1; } $pids .= $post['pid'].","; $usepostcounts = $post['usepostcounts']; remove_attachments($post['pid']);
|
$userposts[$post['uid']] = -1; } $pids .= $post['pid'].","; $usepostcounts = $post['usepostcounts']; remove_attachments($post['pid']);
|
}
| }
|
if($usepostcounts != "no") { if(is_array($userposts))
| if($usepostcounts != "no") { if(is_array($userposts))
|
Zeile 1064 | Zeile 1008 |
---|
} $query = $db->query("SELECT * FROM ".TABLE_PREFIX."threads WHERE tid='$tid'"); $thread = $db->fetch_array($query);
|
} $query = $db->query("SELECT * FROM ".TABLE_PREFIX."threads WHERE tid='$tid'"); $thread = $db->fetch_array($query);
|
|
|
$db->query("DELETE FROM ".TABLE_PREFIX."threads WHERE tid='$tid'"); $db->query("DELETE FROM ".TABLE_PREFIX."threads WHERE closed='moved|$tid'"); $db->query("DELETE FROM ".TABLE_PREFIX."favorites WHERE tid='$tid'");
| $db->query("DELETE FROM ".TABLE_PREFIX."threads WHERE tid='$tid'"); $db->query("DELETE FROM ".TABLE_PREFIX."threads WHERE closed='moved|$tid'"); $db->query("DELETE FROM ".TABLE_PREFIX."favorites WHERE tid='$tid'");
|
Zeile 1072 | Zeile 1016 |
---|
$db->query("DELETE FROM ".TABLE_PREFIX."pollvotes WHERE pid='".$thread['poll']."'"); $cache->updatestats(); $plugins->run_hooks("delete_thread", $tid);
|
$db->query("DELETE FROM ".TABLE_PREFIX."pollvotes WHERE pid='".$thread['poll']."'"); $cache->updatestats(); $plugins->run_hooks("delete_thread", $tid);
|
}
| }
|
function deletepost($pid, $tid="") {
| function deletepost($pid, $tid="") {
|
Zeile 1087 | Zeile 1031 |
---|
remove_attachments($pid); $plugins->run_hooks("delete_post", $tid); $cache->updatestats();
|
remove_attachments($pid); $plugins->run_hooks("delete_post", $tid); $cache->updatestats();
|
}
| }
|
function makeforumjump($pid="0", $selitem="", $addselect="1", $depth="", $showextras="1", $permissions="", $name="fid") { global $db, $forumcache, $fjumpcache, $permissioncache, $settings, $mybb, $mybbuser, $selecteddone, $forumjump, $forumjumpbits, $gobutton, $theme, $templates, $lang, $mybbgroup; $pid = intval($pid); if($permissions)
|
function makeforumjump($pid="0", $selitem="", $addselect="1", $depth="", $showextras="1", $permissions="", $name="fid") { global $db, $forumcache, $fjumpcache, $permissioncache, $settings, $mybb, $mybbuser, $selecteddone, $forumjump, $forumjumpbits, $gobutton, $theme, $templates, $lang, $mybbgroup; $pid = intval($pid); if($permissions)
|
{
| {
|
$permissions = $mybbgroup; } if(!is_array($jumpfcache)) { if(!is_array($forumcache))
|
$permissions = $mybbgroup; } if(!is_array($jumpfcache)) { if(!is_array($forumcache))
|
{
| {
|
cacheforums(); } reset($forumcache);
| cacheforums(); } reset($forumcache);
|
Zeile 1113 | Zeile 1057 |
---|
if(!is_array($permissioncache)) { $permissioncache = forum_permissions();
|
if(!is_array($permissioncache)) { $permissioncache = forum_permissions();
|
}
| }
|
if(is_array($jumpfcache[$pid])) { while(list($key, $main) = each($jumpfcache[$pid]))
| if(is_array($jumpfcache[$pid])) { while(list($key, $main) = each($jumpfcache[$pid]))
|
Zeile 1136 | Zeile 1080 |
---|
} } }
|
} } }
|
} }
| } }
|
if($addselect) { if(!$selecteddone)
| if($addselect) { if(!$selecteddone)
|
Zeile 1186 | Zeile 1130 |
---|
if($userin == 0) { $format = "{username}";
|
if($userin == 0) { $format = "{username}";
|
}
| }
|
$format = stripslashes($format); return str_replace("{username}", $username, $format); }
function makebbcodeinsert()
|
$format = stripslashes($format); return str_replace("{username}", $username, $format); }
function makebbcodeinsert()
|
{
| {
|
global $db, $mybb, $settings, $theme, $templates, $lang; if($mybb->settings['bbcodeinserter'] != "off") {
| global $db, $mybb, $settings, $theme, $templates, $lang; if($mybb->settings['bbcodeinserter'] != "off") {
|
Zeile 1201 | Zeile 1145 |
---|
return $codeinsert; } function makesmilieinsert()
|
return $codeinsert; } function makesmilieinsert()
|
{
| {
|
global $db, $smiliecache, $settings, $theme, $templates, $lang, $mybb; if($mybb->settings['smilieinserter'] != "off" && $mybb->settings['smilieinsertercols'] && $mybb->settings['smilieinsertertot']) {
| global $db, $smiliecache, $settings, $theme, $templates, $lang, $mybb; if($mybb->settings['smilieinserter'] != "off" && $mybb->settings['smilieinsertercols'] && $mybb->settings['smilieinsertertot']) {
|
Zeile 1261 | Zeile 1205 |
---|
else { $clickablesmilies = "";
|
else { $clickablesmilies = "";
|
} }
| } }
|
else { $clickablesmilies = "";
| else { $clickablesmilies = "";
|
Zeile 1308 | Zeile 1252 |
---|
function logmod($data, $action="") { global $mybb, $mybbuser, $db, $session;
|
function logmod($data, $action="") { global $mybb, $mybbuser, $db, $session;
|
|
|
$time = time(); $db->query("INSERT INTO ".TABLE_PREFIX."moderatorlog (uid,dateline,fid,tid,action,ipaddress) VALUES ('".$mybb->user['uid']."','$time','".$data['fid']."','".$data['tid']."','$action','".$session->ipaddress."')"); }
| $time = time(); $db->query("INSERT INTO ".TABLE_PREFIX."moderatorlog (uid,dateline,fid,tid,action,ipaddress) VALUES ('".$mybb->user['uid']."','$time','".$data['fid']."','".$data['tid']."','$action','".$session->ipaddress."')"); }
|
Zeile 1451 | Zeile 1395 |
---|
$pwverified = 1; if($forum['password'] != "") {
|
$pwverified = 1; if($forum['password'] != "") {
|
if($forumpass[$forum['fid']] != md5($mybbuser['uid'].$forum['password']))
| if($_COOKIE['forumpass'][$forum['fid']] != md5($mybbuser['uid'].$forum['password']))
|
{ $pwverified = 0; }
| { $pwverified = 0; }
|
Zeile 1655 | Zeile 1599 |
---|
}
function pageheaders() {
|
}
function pageheaders() {
|
global $settings;
| global $mybb;
|
if($mybb->settings['nocacheheaders'] == "yes" && $mybb->settings['standardheaders'] != "yes") { header("Expires: Sat, 1 Jan 2000 01:00:00 GMT");
| if($mybb->settings['nocacheheaders'] == "yes" && $mybb->settings['standardheaders'] != "yes") { header("Expires: Sat, 1 Jan 2000 01:00:00 GMT");
|
Zeile 1970 | Zeile 1914 |
---|
$location = "?".$_ENV['QUERY_STRING']; } }
|
$location = "?".$_ENV['QUERY_STRING']; } }
|
|
|
if($_SERVER['REQUEST_METHOD'] == "POST" || $_ENV['REQUEST_METHOD'] == "POST") { if($_POST['action'])
| if($_SERVER['REQUEST_METHOD'] == "POST" || $_ENV['REQUEST_METHOD'] == "POST") { if($_POST['action'])
|