Zeile 1 | Zeile 1 |
---|
<?php /** * MyBB 1.4
|
<?php /** * MyBB 1.4
|
* Copyright � 2008 MyBB Group, All Rights Reserved
| * Copyright � 2008 MyBB Group, All Rights Reserved
|
* * Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* * Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* $Id: usercp.php 4254 2008-10-29 21:52:31Z Tikitiki $
| * $Id: usercp.php 4620 2009-12-20 07:29:15Z dennis $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 73 | Zeile 73 |
---|
} else if($mybb->settings['siglength'] > 0) {
|
} else if($mybb->settings['siglength'] > 0) {
|
if($mybb->settings['sigcountmycode'] == 1)
| if($mybb->settings['sigcountmycode'] == 0)
|
{ $parsed_sig = $parser->text_parse_message($mybb->input['signature']); }
| { $parsed_sig = $parser->text_parse_message($mybb->input['signature']); }
|
Zeile 173 | Zeile 173 |
---|
$awaydate = TIME_NOW; if($mybb->input['awayday']) {
|
$awaydate = TIME_NOW; if($mybb->input['awayday']) {
|
| // If the user has indicated that they will return on a specific day, but not month or year, assume it is current month and year
|
if(!$mybb->input['awaymonth']) { $mybb->input['awaymonth'] = my_date('n', $awaydate); }
|
if(!$mybb->input['awaymonth']) { $mybb->input['awaymonth'] = my_date('n', $awaydate); }
|
| |
if(!$mybb->input['awayyear'])
|
if(!$mybb->input['awayyear'])
|
{
| {
|
$mybb->input['awayyear'] = my_date('Y', $awaydate);
|
$mybb->input['awayyear'] = my_date('Y', $awaydate);
|
}
| } $return_month = intval(substr($mybb->input['awaymonth'], 0, 2)); $return_day = intval(substr($mybb->input['awayday'], 0, 2)); $return_year = intval(substr($mybb->input['awayyear'], 0, 4));
|
|
|
$returntimestamp = gmmktime(0, 0, 0, $mybb->input['awaymonth'], $mybb->input['awayday'], $mybb->input['awayyear']);
| // Check if return date is after the away date. $returntimestamp = gmmktime(0, 0, 0, $return_month, $return_day, $return_year);
|
$awaytimestamp = gmmktime(0, 0, 0, my_date('n', $awaydate), my_date('j', $awaydate), my_date('Y', $awaydate));
|
$awaytimestamp = gmmktime(0, 0, 0, my_date('n', $awaydate), my_date('j', $awaydate), my_date('Y', $awaydate));
|
if ($returntimestamp < $awaytimestamp && $mybb->input['awayyear'] < my_date("Y"))
| if ($returntimestamp < $awaytimestamp)
|
{ error($lang->error_usercp_return_date_past); }
|
{ error($lang->error_usercp_return_date_past); }
|
$returndate = intval($mybb->input['awayday'])."-".intval($mybb->input['awaymonth'])."-".intval($mybb->input['awayyear']);
| $returndate = "{$return_day}-{$return_month}-{$return_year}";
|
} else {
| } else {
|
Zeile 199 | Zeile 205 |
---|
"away" => 1, "date" => $awaydate, "returndate" => $returndate,
|
"away" => 1, "date" => $awaydate, "returndate" => $returndate,
|
"awayreason" => $db->escape_string($mybb->input['awayreason'])
| "awayreason" => $mybb->input['awayreason']
|
); } else
| ); } else
|
Zeile 266 | Zeile 272 |
---|
if($mybb->input['action'] == "profile") { if($errors)
|
if($mybb->input['action'] == "profile") { if($errors)
|
{
| {
|
$user = $mybb->input; $bday = array(); $bday[0] = $mybb->input['bday1']; $bday[1] = $mybb->input['bday2']; $bday[2] = intval($mybb->input['bday3']);
|
$user = $mybb->input; $bday = array(); $bday[0] = $mybb->input['bday1']; $bday[1] = $mybb->input['bday2']; $bday[2] = intval($mybb->input['bday3']);
|
}
| }
|
else
|
else
|
{
| {
|
$user = $mybb->user; $bday = explode("-", $user['birthday']); }
|
$user = $mybb->user; $bday = explode("-", $user['birthday']); }
|
|
|
$plugins->run_hooks("usercp_profile_start");
$bdaysel = ''; for($i = 1; $i <= 31; ++$i)
|
$plugins->run_hooks("usercp_profile_start");
$bdaysel = ''; for($i = 1; $i <= 31; ++$i)
|
{
| {
|
if($bday[0] == $i) { $bdaydaysel .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";
| if($bday[0] == $i) { $bdaydaysel .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";
|
Zeile 299 | Zeile 305 |
---|
if($user['birthdayprivacy'] == 'all' || !$user['birthdayprivacy']) { $bdayprivacysel .= "<option value=\"all\" selected=\"selected\">{$lang->birthdayprivacyall}</option>\n";
|
if($user['birthdayprivacy'] == 'all' || !$user['birthdayprivacy']) { $bdayprivacysel .= "<option value=\"all\" selected=\"selected\">{$lang->birthdayprivacyall}</option>\n";
|
$bdayprivacysel .= "<option value=\"none\">{$lang->birthdayprivacynone}</option>\n"; $bdayprivacysel .= "<option value=\"age\">{$lang->birthdayprivacyage}</option>";
| $bdayprivacysel .= "<option value=\"none\">{$lang->birthdayprivacynone}</option>\n"; $bdayprivacysel .= "<option value=\"age\">{$lang->birthdayprivacyage}</option>";
|
} else if($user['birthdayprivacy'] == 'none')
|
} else if($user['birthdayprivacy'] == 'none')
|
{
| {
|
$bdayprivacysel .= "<option value=\"all\">{$lang->birthdayprivacyall}</option>\n"; $bdayprivacysel .= "<option value=\"none\" selected=\"selected\">{$lang->birthdayprivacynone}</option>\n"; $bdayprivacysel .= "<option value=\"age\">{$lang->birthdayprivacyage}</option>";
|
$bdayprivacysel .= "<option value=\"all\">{$lang->birthdayprivacyall}</option>\n"; $bdayprivacysel .= "<option value=\"none\" selected=\"selected\">{$lang->birthdayprivacynone}</option>\n"; $bdayprivacysel .= "<option value=\"age\">{$lang->birthdayprivacyage}</option>";
|
}
| }
|
else if($user['birthdayprivacy'] == 'age')
|
else if($user['birthdayprivacy'] == 'age')
|
{
| {
|
$bdayprivacysel .= "<option value=\"all\">{$lang->birthdayprivacyall}</option>\n"; $bdayprivacysel .= "<option value=\"none\">{$lang->birthdayprivacynone}</option>\n"; $bdayprivacysel .= "<option value=\"age\" selected=\"selected\">{$lang->birthdayprivacyage}</option>";
|
$bdayprivacysel .= "<option value=\"all\">{$lang->birthdayprivacyall}</option>\n"; $bdayprivacysel .= "<option value=\"none\">{$lang->birthdayprivacynone}</option>\n"; $bdayprivacysel .= "<option value=\"age\" selected=\"selected\">{$lang->birthdayprivacyage}</option>";
|
}
| }
|
if($user['website'] == "" || $user['website'] == "http://") { $user['website'] = "http://";
|
if($user['website'] == "" || $user['website'] == "http://") { $user['website'] = "http://";
|
} else
| } else
|
{ $user['website'] = htmlspecialchars_uni($user['website']); }
| { $user['website'] = htmlspecialchars_uni($user['website']); }
|
Zeile 527 | Zeile 533 |
---|
else { $value = htmlspecialchars_uni($userfield);
|
else { $value = htmlspecialchars_uni($userfield);
|
$code = "<input type=\"text\" name=\"profile_fields[$field]\" class=\"textbox\" size=\"{$profilefield['length']}\" maxlength=\"{$profilefield['maxlength']}\" value=\"$value\" />";
| $maxlength = ""; if($profilefield['maxlength'] > 0) { $maxlength = " maxlength=\"{$profilefield['maxlength']}\""; } $code = "<input type=\"text\" name=\"profile_fields[$field]\" class=\"textbox\" size=\"{$profilefield['length']}\"{$maxlength} value=\"$value\" />";
|
} if($profilefield['required'] == 1) {
| } if($profilefield['required'] == 1) {
|
Zeile 735 | Zeile 746 |
---|
else { $no_subscribe_selected = "selected=\"selected\"";
|
else { $no_subscribe_selected = "selected=\"selected\"";
|
}
| }
|
if($user['showsigs'] == 1) { $showsigscheck = "checked=\"checked\"";;
| if($user['showsigs'] == 1) { $showsigscheck = "checked=\"checked\"";;
|
Zeile 1012 | Zeile 1023 |
---|
}
if($mybb->input['action'] == "do_password" && $mybb->request_method == "post")
|
}
if($mybb->input['action'] == "do_password" && $mybb->request_method == "post")
|
{ // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
| { // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
$errors = array();
| $errors = array();
|
Zeile 1292 | Zeile 1303 |
---|
} }
|
} }
|
| $icon_cache = $cache->read("posticons");
|
// Now we can build our subscription list foreach($subscriptions as $thread) {
| // Now we can build our subscription list foreach($subscriptions as $thread) {
|
Zeile 2223 | Zeile 2236 |
---|
while($user = $db->fetch_array($query)) { $profile_link = build_profile_link(format_name($user['username'], $user['usergroup'], $user['displaygroup']), $user['uid']);
|
while($user = $db->fetch_array($query)) { $profile_link = build_profile_link(format_name($user['username'], $user['usergroup'], $user['displaygroup']), $user['uid']);
|
if($user['lastactive'] > $timecut && ($user['invisible'] == 0 || $mybb->user['usergroup'] == 4) && $user['lastvisit'] != $user['lastactive'])
| if($user['lastactive'] > $timecut && ($user['invisible'] == 0 || $mybb->usergroup['canviewwolinvis'] == 1) && $user['lastvisit'] != $user['lastactive'])
|
{ $status = "online"; }
| { $status = "online"; }
|
Zeile 2251 | Zeile 2264 |
---|
while($user = $db->fetch_array($query)) { $profile_link = build_profile_link(format_name($user['username'], $user['usergroup'], $user['displaygroup']), $user['uid']);
|
while($user = $db->fetch_array($query)) { $profile_link = build_profile_link(format_name($user['username'], $user['usergroup'], $user['displaygroup']), $user['uid']);
|
if($user['lastactive'] > $timecut && ($user['invisible'] == 0 || $mybb->user['usergroup'] == 4) && $user['lastvisit'] != $user['lastactive'])
| if($user['lastactive'] > $timecut && ($user['invisible'] == 0 || $mybb->usergroup['canviewwolinvis'] == 1) && $user['lastvisit'] != $user['lastactive'])
|
{ $status = "online"; }
| { $status = "online"; }
|
Zeile 2598 | Zeile 2611 |
---|
} else {
|
} else {
|
$leavelink = "<div style=\"text-align: center;\"><a href=\"usercp.php?action=usergroups&leavegroup=".$usergroup['gid']."&my_post_key={$mybb->post_code}\">".$lang->usergroup_leave."</a></div>";
| $leavelink = "<div style=\"text-align: center;\"><a href=\"usercp.php?action=usergroups&leavegroup=".$usergroup['gid']."&my_post_key={$mybb->post_code}\">".$lang->usergroup_leave."</a></div>";
|
} if($usergroup['description']) {
| } if($usergroup['description']) {
|