Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: functions.php 5544 2011-08-08 15:41:40Z Tomm $
| * $Id: functions.php 5829 2012-05-22 10:48:03Z Tomm $
|
*/
/**
| */
/**
|
Zeile 153 | Zeile 153 |
---|
if($from > 2) { $first = fetch_page_url($url, 1);
|
if($from > 2) { $first = fetch_page_url($url, 1);
|
$pagination .= "<a href=\"{$first}\" title=\"Page 1\" class=\"pagination_first\">1</a> ... ";
| $pagination .= "<a href=\"{$first}\" title=\"{$lang->page} 1\" class=\"pagination_first\">1</a> ... ";
|
}
for($i = $from; $i <= $to; ++$i)
| }
for($i = $from; $i <= $to; ++$i)
|
Zeile 298 | Zeile 298 |
---|
else { $ppolls = 0;
|
else { $ppolls = 0;
|
} if($canpostattachments[$usergroup['gid']] == 1) { $pattachments = 1; } else { $pattachments = 0;
| |
} if(!$preplies && !$pthreads)
| } if(!$preplies && !$pthreads)
|
Zeile 324 | Zeile 315 |
---|
"canview" => intval($pview), "canpostthreads" => intval($pthreads), "canpostreplys" => intval($preplies),
|
"canview" => intval($pview), "canpostthreads" => intval($pthreads), "canpostreplys" => intval($preplies),
|
"canpostattachments" => intval($pattachments),
| |
"canpostpolls" => intval($ppolls), );
| "canpostpolls" => intval($ppolls), );
|
Zeile 567 | Zeile 557 |
---|
else { if(!empty($page))
|
else { if(!empty($page))
|
{ if($adminoption['uid'] == 0)
| { if($adminoption['uid'] == 0)
|
{ $adminoption['permissions'][$tab][$page] = 0; }
| { $adminoption['permissions'][$tab][$page] = 0; }
|
Zeile 611 | Zeile 601 |
---|
{ $query = $db->simple_select("adminoptions", "loginattempts, loginlockoutexpiry", "uid='".intval($uid)."'", 1); $attempts = $db->fetch_array($query);
|
{ $query = $db->simple_select("adminoptions", "loginattempts, loginlockoutexpiry", "uid='".intval($uid)."'", 1); $attempts = $db->fetch_array($query);
|
}
| }
|
if($attempts['loginattempts'] <= 0) {
| if($attempts['loginattempts'] <= 0) {
|
Zeile 630 | Zeile 620 |
---|
if($return_num == true) { return $attempts;
|
if($return_num == true) { return $attempts;
|
}
| }
|
// Otherwise are we still locked out? else if($attempts['loginlockoutexpiry'] > TIME_NOW) {
| // Otherwise are we still locked out? else if($attempts['loginlockoutexpiry'] > TIME_NOW) {
|
Zeile 640 | Zeile 630 |
---|
return false; }
|
return false; }
|
|
|
/** * Checks whether there are any 'security' issues in templates via complex syntax *
| /** * Checks whether there are any 'security' issues in templates via complex syntax *
|
Zeile 651 | Zeile 641 |
---|
{ // Check to see if our database password is in the template if(preg_match("#database'?\\s*\]\\s*\[\\s*'?password#", $template))
|
{ // Check to see if our database password is in the template if(preg_match("#database'?\\s*\]\\s*\[\\s*'?password#", $template))
|
| { return true; }
// System calls via backtick if(preg_match('#\$\s*\{#', $template))
|
{ return true; }
| { return true; }
|