mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 13:28:55 +00:00
Returned to instantiation of ucp object ... perhaps this approach is better? Altered basic info for ucp_modules, updated editor to allow alternative form and textarea names ... still lots of fudginess, hhhmmmm fudge, uuuuugggghhh
git-svn-id: file:///svn/phpbb/trunk@4003 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
db56a55808
commit
549537b9d5
16 changed files with 612 additions and 399 deletions
|
@ -384,7 +384,7 @@ function tz_select($default = '')
|
|||
{
|
||||
if (is_numeric($offset))
|
||||
{
|
||||
$selected = ($offset === $default) ? ' selected="selected"' : '';
|
||||
$selected = ($offset == $default) ? ' selected="selected"' : '';
|
||||
$tz_select .= '<option value="' . $offset . '"' . $selected . '>' . $zone . '</option>';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -209,12 +209,12 @@ class userdata extends user
|
|||
|
||||
if ($config['require_activation'] == USER_ACTIVATION_NONE)
|
||||
{
|
||||
set_config('newest_user_id', $userdata['user_id']);
|
||||
set_config('newest_user_id', $user_id);
|
||||
set_config('newest_username', $userdata['username']);
|
||||
set_config('num_users', $config['num_users'] + 1, TRUE);
|
||||
}
|
||||
unset($userdata);
|
||||
|
||||
|
||||
return $message;
|
||||
}
|
||||
|
||||
|
|
|
@ -337,8 +337,12 @@ INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, disp
|
|||
INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/exclaim.gif', 19, 19, 7, 1);
|
||||
|
||||
# -- ucp modules
|
||||
INSERT INTO phpbb_ucp_modules (module_id, module_name, module_filename, module_order) VALUES (1, 'Profile Settings', 'ucp/usercp_profile', 1);
|
||||
INSERT INTO phpbb_ucp_modules (module_id, module_name, module_filename, module_order) VALUES (2, 'Black/While Lists', 'ucp/usercp_lists', 2);
|
||||
INSERT INTO phpbb_ucp_modules (module_id, module_name, module_filename, module_order) VALUES (1, 'MAIN', 'main', 1);
|
||||
INSERT INTO phpbb_ucp_modules (module_id, module_name, module_filename, module_order) VALUES (2, 'PROFILE', 'profile', 2);
|
||||
INSERT INTO phpbb_ucp_modules (module_id, module_name, module_filename, module_order) VALUES (3, 'PREFERENCES', 'prefs', 3);
|
||||
INSERT INTO phpbb_ucp_modules (module_id, module_name, module_filename, module_order) VALUES (4, 'MESSAGING', 'pm', 4);
|
||||
INSERT INTO phpbb_ucp_modules (module_id, module_name, module_filename, module_order) VALUES (5, 'LISTS', 'zebra', 5);
|
||||
|
||||
|
||||
# -- wordlist
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 1, 'example', 0 );
|
||||
|
|
|
@ -95,11 +95,13 @@ $lang = array(
|
|||
'VIEW_LATEST_POST' => 'View latest post',
|
||||
'VIEW_NEWEST_POST' => 'View newest post',
|
||||
'PAGE_OF' => 'Page <b>%1$d</b> of <b>%2$d</b>',
|
||||
'ICQ' => 'ICQ Number',
|
||||
'AIM' => 'AIM Address',
|
||||
'MSNM' => 'MSN Messenger',
|
||||
'YIM' => 'Yahoo Messenger',
|
||||
|
||||
'ICQ' => 'ICQ',
|
||||
'AIM' => 'AIM',
|
||||
'MSNM' => 'MSNM',
|
||||
'YIM' => 'YIM',
|
||||
'RANK' => 'Rank',
|
||||
|
||||
'FORUM_INDEX' => 'Board Index',
|
||||
|
||||
'ALL_TIMES' => 'All times are %s %s',
|
||||
|
@ -624,10 +626,9 @@ $lang = array(
|
|||
'DOWNLOAD_COUNT' => '%d Time', // replace %d with count
|
||||
'DOWNLOAD_COUNTS' => '%d Times', // replace %d with count
|
||||
|
||||
|
||||
'UCP' => 'User Control Panel',
|
||||
'UCP_Main' => 'Control Panel',
|
||||
'UCP_Profile' => 'Profile Settings',
|
||||
'UCP_Lists' => 'Black/White Lists',
|
||||
|
||||
'UCP_Priv_messages' => 'Private Messages',
|
||||
'SUBSCRIBED_TOPICS' => 'Subscribed Topics',
|
||||
'SUBSCRIBED_FORUMS' => 'Subscribed Forums',
|
||||
|
@ -642,12 +643,16 @@ $lang = array(
|
|||
'Avatar_settings' => 'Avatar Settings',
|
||||
'Signature_settings' => 'Signature Settings',
|
||||
|
||||
'UCP_MAIN' => 'Overview',
|
||||
|
||||
'UCP_PREFERENCES' => 'Preferences',
|
||||
'UCP_PERSONAL' => 'Personal Settings',
|
||||
'UCP_VIEW' => 'Viewing Posts',
|
||||
'UCP_POST' => 'Posting Messages',
|
||||
|
||||
|
||||
'UCP_MESSAGING' => 'Private Messaging',
|
||||
|
||||
|
||||
'UCP_LISTS' => 'Buddy/Ignore Lists',
|
||||
|
||||
|
@ -656,16 +661,19 @@ $lang = array(
|
|||
'UCP_REG_DETAILS' => 'Registration details',
|
||||
'UCP_AVATAR' => 'Your avatar',
|
||||
|
||||
'PROFILE_INFO_NOTICE' => 'Please note that this information will be viewable to other members. Be careful when including any personal details.',
|
||||
'PROFILE_INFO_NOTICE' => 'Please note that this information will be viewable to other members. Be careful when including any personal details. Any fields marked with a * must be completed.',
|
||||
'WEBSITE' => 'Website',
|
||||
'LOCATION' => 'Location',
|
||||
'CONTACT' => 'Contact',
|
||||
'JABBER' => 'Jabber',
|
||||
'EMAIL_ADDRESS' => 'Email address',
|
||||
'INTERESTS' => 'Interests',
|
||||
'OCCUPATION' => 'Occupation',
|
||||
'BIRTHDAY' => 'Birthday',
|
||||
|
||||
'UCP_ICQ' => 'ICQ Number',
|
||||
'UCP_AIM' => 'AOL Instant Messenger',
|
||||
'UCP_MSNM' => 'MSN Messenger',
|
||||
'UCP_YIM' => 'Yahoo Messenger',
|
||||
'JABBER' => 'Jabber Address',
|
||||
|
||||
'UCP_SIGNATURE' => 'Your signature',
|
||||
'SIGNATURE_NOTICE' => 'Please note that some forums limit the size and content of your signature. Be sure to read any forum or board rules to ensure you comply with them.',
|
||||
|
|
|
@ -20,7 +20,7 @@ var is_mac = (clientPC.indexOf("mac")!=-1);
|
|||
|
||||
// Shows the help messages in the helpline window
|
||||
function helpline(help) {
|
||||
document.post.helpbox.value = eval(help + "_help");
|
||||
document.forms[form_name].helpbox.value = eval(help + "_help");
|
||||
}
|
||||
|
||||
// Replacement for arrayname.length property
|
||||
|
@ -49,13 +49,13 @@ function arraypop(thearray) {
|
|||
|
||||
function emoticon(text) {
|
||||
text = ' ' + text + ' ';
|
||||
if (document.post.message.createTextRange && document.post.message.caretPos) {
|
||||
var caretPos = document.post.message.caretPos;
|
||||
if (document.forms[form_name].elements[text_name].createTextRange && document.forms[form_name].elements[text_name].caretPos) {
|
||||
var caretPos = document.forms[form_name].elements[text_name].caretPos;
|
||||
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
|
||||
document.post.message.focus();
|
||||
document.forms[form_name].elements[text_name].focus();
|
||||
} else {
|
||||
document.post.message.value += text;
|
||||
document.post.message.focus();
|
||||
document.forms[form_name].elements[text_name].value += text;
|
||||
document.forms[form_name].elements[text_name].focus();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,19 +63,19 @@ function bbfontstyle(bbopen, bbclose) {
|
|||
if ((clientVer >= 4) && is_ie && is_win) {
|
||||
theSelection = document.selection.createRange().text;
|
||||
if (!theSelection) {
|
||||
document.post.message.value += bbopen + bbclose;
|
||||
document.post.message.focus();
|
||||
document.forms[form_name].elements[text_name].value += bbopen + bbclose;
|
||||
document.forms[form_name].elements[text_name].focus();
|
||||
return;
|
||||
}
|
||||
document.selection.createRange().text = bbopen + theSelection + bbclose;
|
||||
document.post.message.focus();
|
||||
document.forms[form_name].elements[text_name].focus();
|
||||
return;
|
||||
} else {
|
||||
document.post.message.value += bbopen + bbclose;
|
||||
document.post.message.focus();
|
||||
document.forms[form_name].elements[text_name].value += bbopen + bbclose;
|
||||
document.forms[form_name].elements[text_name].focus();
|
||||
return;
|
||||
}
|
||||
storeCaret(document.post.message);
|
||||
storeCaret(document.forms[form_name].message);
|
||||
}
|
||||
|
||||
|
||||
|
@ -88,19 +88,19 @@ function bbstyle(bbnumber) {
|
|||
if (bbnumber == -1) { // Close all open tags & default button names
|
||||
while (bbcode[0]) {
|
||||
butnumber = arraypop(bbcode) - 1;
|
||||
document.post.message.value += bbtags[butnumber + 1];
|
||||
buttext = eval('document.post.addbbcode' + butnumber + '.value');
|
||||
document.forms[form_name].elements[text_name].value += bbtags[butnumber + 1];
|
||||
buttext = eval('document.forms[form_name].addbbcode' + butnumber + '.value');
|
||||
if (buttext != "[*]")
|
||||
{
|
||||
eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
|
||||
eval('document.forms[form_name].addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
|
||||
}
|
||||
}
|
||||
document.post.addbbcode10.value = "List";
|
||||
document.forms[form_name].addbbcode10.value = "List";
|
||||
bbtags[10] = "[list]";
|
||||
document.post.addbbcode12.value = "List=";
|
||||
document.forms[form_name].addbbcode12.value = "List=";
|
||||
bbtags[12] = "[list=]";
|
||||
imageTag = false; // All tags are closed including image tags :D
|
||||
document.post.message.focus();
|
||||
document.forms[form_name].elements[text_name].focus();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ function bbstyle(bbnumber) {
|
|||
if (theSelection) {
|
||||
// Add tags around selection
|
||||
document.selection.createRange().text = bbtags[bbnumber] + theSelection + bbtags[bbnumber+1];
|
||||
document.post.message.focus();
|
||||
document.forms[form_name].elements[text_name].focus();
|
||||
theSelection = '';
|
||||
return;
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ function bbstyle(bbnumber) {
|
|||
{
|
||||
if (donotinsert)
|
||||
{
|
||||
document.post.addbbcode12.value = "List=";
|
||||
document.forms[form_name].addbbcode12.value = "List=";
|
||||
tmp_help = o_help;
|
||||
o_help = e_help;
|
||||
e_help = tmp_help;
|
||||
|
@ -135,7 +135,7 @@ function bbstyle(bbnumber) {
|
|||
}
|
||||
else
|
||||
{
|
||||
document.post.addbbcode12.value = "[*]";
|
||||
document.forms[form_name].addbbcode12.value = "[*]";
|
||||
tmp_help = o_help;
|
||||
o_help = e_help;
|
||||
e_help = tmp_help;
|
||||
|
@ -147,7 +147,7 @@ function bbstyle(bbnumber) {
|
|||
{
|
||||
if (donotinsert)
|
||||
{
|
||||
document.post.addbbcode10.value = "List";
|
||||
document.forms[form_name].addbbcode10.value = "List";
|
||||
tmp_help = l_help;
|
||||
l_help = e_help;
|
||||
e_help = tmp_help;
|
||||
|
@ -155,7 +155,7 @@ function bbstyle(bbnumber) {
|
|||
}
|
||||
else
|
||||
{
|
||||
document.post.addbbcode10.value = "[*]";
|
||||
document.forms[form_name].addbbcode10.value = "[*]";
|
||||
tmp_help = l_help;
|
||||
l_help = e_help;
|
||||
e_help = tmp_help;
|
||||
|
@ -168,43 +168,43 @@ function bbstyle(bbnumber) {
|
|||
butnumber = arraypop(bbcode) - 1;
|
||||
if (bbtags[butnumber] != "[*]")
|
||||
{
|
||||
document.post.message.value += bbtags[butnumber + 1];
|
||||
document.forms[form_name].elements[text_name].value += bbtags[butnumber + 1];
|
||||
}
|
||||
else
|
||||
{
|
||||
document.post.message.value += bbtags[butnumber];
|
||||
document.forms[form_name].elements[text_name].value += bbtags[butnumber];
|
||||
}
|
||||
buttext = eval('document.post.addbbcode' + butnumber + '.value');
|
||||
buttext = eval('document.forms[form_name].addbbcode' + butnumber + '.value');
|
||||
if (bbtags[butnumber] != "[*]")
|
||||
{
|
||||
eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
|
||||
eval('document.forms[form_name].addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
|
||||
}
|
||||
imageTag = false;
|
||||
}
|
||||
document.post.message.focus();
|
||||
document.forms[form_name].elements[text_name].focus();
|
||||
return;
|
||||
} else { // Open tags
|
||||
|
||||
if (imageTag && (bbnumber != 14)) { // Close image tag before adding another
|
||||
document.post.message.value += bbtags[15];
|
||||
document.forms[form_name].elements[text_name].value += bbtags[15];
|
||||
lastValue = arraypop(bbcode) - 1; // Remove the close image tag from the list
|
||||
document.post.addbbcode14.value = "Img"; // Return button back to normal state
|
||||
document.forms[form_name].addbbcode14.value = "Img"; // Return button back to normal state
|
||||
imageTag = false;
|
||||
}
|
||||
|
||||
// Open tag
|
||||
document.post.message.value += bbtags[bbnumber];
|
||||
document.forms[form_name].elements[text_name].value += bbtags[bbnumber];
|
||||
if ((bbnumber == 14) && (imageTag == false)) imageTag = 1; // Check to stop additional tags after an unclosed image tag
|
||||
if (bbtags[bbnumber] != "[*]")
|
||||
{
|
||||
arraypush(bbcode,bbnumber+1);
|
||||
eval('document.post.addbbcode'+bbnumber+'.value += "*"');
|
||||
eval('document.forms[form_name].addbbcode'+bbnumber+'.value += "*"');
|
||||
}
|
||||
document.post.message.focus();
|
||||
document.forms[form_name].elements[text_name].focus();
|
||||
return;
|
||||
}
|
||||
|
||||
storeCaret(document.post.message);
|
||||
storeCaret(document.forms[form_name].message);
|
||||
}
|
||||
|
||||
// Insert at Claret position. Code from
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
|
||||
var form_name = 'post';
|
||||
var text_name = 'message';
|
||||
|
||||
// Define the bbCode tags
|
||||
bbcode = new Array();
|
||||
bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[flash]','[/flash]','[url]','[/url]');
|
||||
|
|
|
@ -1,7 +1,38 @@
|
|||
<!-- $Id$ -->
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<form method="post" name="ucp" action="{S_UCP_ACTION}" {S_FORM_ENCTYPE}><table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
|
||||
|
||||
var form_name = 'ucp';
|
||||
var text_name = 'signature';
|
||||
|
||||
// Define the bbCode tags
|
||||
bbcode = new Array();
|
||||
bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[flash]','[/flash]','[url]','[/url]');
|
||||
imageTag = false;
|
||||
|
||||
// Helpline messages
|
||||
b_help = "{L_BBCODE_B_HELP}";
|
||||
i_help = "{L_BBCODE_I_HELP}";
|
||||
u_help = "{L_BBCODE_U_HELP}";
|
||||
q_help = "{L_BBCODE_Q_HELP}";
|
||||
c_help = "{L_BBCODE_C_HELP}";
|
||||
l_help = "{L_BBCODE_L_HELP}";
|
||||
o_help = "{L_BBCODE_O_HELP}";
|
||||
p_help = "{L_BBCODE_P_HELP}";
|
||||
w_help = "{L_BBCODE_W_HELP}";
|
||||
a_help = "{L_BBCODE_A_HELP}";
|
||||
s_help = "{L_BBCODE_S_HELP}";
|
||||
f_help = "{L_BBCODE_F_HELP}";
|
||||
e_help = "{L_BBCODE_E_HELP}";
|
||||
|
||||
//-->
|
||||
</script>
|
||||
<script language="javascript" type="text/javascript" src="templates/subSilver/editor.js"></script>
|
||||
|
||||
<form method="post" name="ucp" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}><table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
||||
<tr>
|
||||
<td class="nav" colspan="2" align="left" valign="middle"><a href="{U_INDEX}">{L_INDEX}</a></td>
|
||||
</tr>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<!-- INCLUDE ucp_header.html -->
|
||||
|
||||
<tr>
|
||||
<td width="20%" valign="top"><table width="100%" cellspacing="1" cellpadding="4" border="0">
|
||||
<td width="20%" height="100%"><table width="100%" height="100%" cellspacing="1" cellpadding="4" border="0">
|
||||
<tr>
|
||||
<th>Options</th>
|
||||
</tr>
|
||||
|
@ -12,13 +12,19 @@
|
|||
<!-- IF ucp_subsection.S_SELECTED -->
|
||||
<td class="row1" height="25" nowrap="nowrap"><span class="nav"><b>{ucp_subsection.L_TITLE}</b>
|
||||
<!-- ELSE -->
|
||||
<td class="row2" height="25" nowrap="nowrap"><a class="nav" href="{ucp_subsection.U_TITLE}">{ucp_subsection.L_TITLE}</a>
|
||||
<td class="row2" height="25" nowrap="nowrap" onmouseover="this.className='row1'" onmouseout="this.className='row2'"><a class="nav" href="{ucp_subsection.U_TITLE}">{ucp_subsection.L_TITLE}</a>
|
||||
<!-- ENDIF -->
|
||||
</td>
|
||||
</tr>
|
||||
<!-- END ucp_subsection -->
|
||||
<tr>
|
||||
<td class="row2" height="100%"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="cat" height="28"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
<td width="80%" valign="top"><table width="100%" cellspacing="1" cellpadding="4" border="0">
|
||||
<td class="row3"><img src="images/spacer.gif" width="1" alt="" /></td> <td width="80%" valign="top"><table width="100%" cellspacing="1" cellpadding="4" border="0">
|
||||
<tr>
|
||||
<th colspan="2" height="25" valign="middle">{L_TITLE}</th>
|
||||
</tr>
|
||||
|
@ -31,60 +37,60 @@
|
|||
|
||||
<!-- IF S_DISPLAY_PERSONAL -->
|
||||
<tr>
|
||||
<td class="row1"><span class="gen">{L_PUBLIC_VIEW_EMAIL}:</span></td>
|
||||
<td class="row1"><b class="genmed">{L_PUBLIC_VIEW_EMAIL}:</b></td>
|
||||
<td class="row2">
|
||||
<input type="radio" name="viewemail" value="1" {VIEW_EMAIL_YES} />
|
||||
<input type="radio" name="viewemail" value="1"{VIEW_EMAIL_YES} />
|
||||
<span class="gen">{L_YES}</span>
|
||||
<input type="radio" name="viewemail" value="0" {VIEW_EMAIL_NO} />
|
||||
<input type="radio" name="viewemail" value="0"{VIEW_EMAIL_NO} />
|
||||
<span class="gen">{L_NO}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><span class="gen">{L_HIDE_USER}:</span></td>
|
||||
<td class="row1"><b class="genmed">{L_HIDE_USER}:</b></td>
|
||||
<td class="row2">
|
||||
<input type="radio" name="hideonline" value="1" {HIDE_USER_YES} />
|
||||
<input type="radio" name="hideonline" value="1"{HIDE_USER_YES} />
|
||||
<span class="gen">{L_YES}</span>
|
||||
<input type="radio" name="hideonline" value="0" {HIDE_USER_NO} />
|
||||
<input type="radio" name="hideonline" value="0"{HIDE_USER_NO} />
|
||||
<span class="gen">{L_NO}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><span class="gen">{L_NOTIFY_ON_REPLY}:</span><br />
|
||||
<td class="row1"><b class="genmed">{L_NOTIFY_ON_REPLY}:</b><br />
|
||||
<span class="gensmall">{L_NOTIFY_ON_REPLY_EXPLAIN}</span></td>
|
||||
<td class="row2">
|
||||
<input type="radio" name="notifyreply" value="1" {NOTIFY_REPLY_YES} />
|
||||
<input type="radio" name="notifyreply" value="1"{NOTIFY_REPLY_YES} />
|
||||
<span class="gen">{L_YES}</span>
|
||||
<input type="radio" name="notifyreply" value="0" {NOTIFY_REPLY_NO} />
|
||||
<input type="radio" name="notifyreply" value="0"{NOTIFY_REPLY_NO} />
|
||||
<span class="gen">{L_NO}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><span class="gen">{L_NOTIFY_ON_PRIVMSG}:</span></td>
|
||||
<td class="row1"><b class="genmed">{L_NOTIFY_ON_PRIVMSG}:</b></td>
|
||||
<td class="row2">
|
||||
<input type="radio" name="notifypm" value="1" {NOTIFY_PM_YES} />
|
||||
<input type="radio" name="notifypm" value="1"{NOTIFY_PM_YES} />
|
||||
<span class="gen">{L_YES}</span>
|
||||
<input type="radio" name="notifypm" value="0" {NOTIFY_PM_NO} />
|
||||
<input type="radio" name="notifypm" value="0"{NOTIFY_PM_NO} />
|
||||
<span class="gen">{L_NO}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><span class="gen">{L_POPUP_ON_PRIVMSG}:</span><br /><span class="gensmall">{L_POPUP_ON_PRIVMSG_EXPLAIN}</span></td>
|
||||
<td class="row1"><b class="genmed">{L_POPUP_ON_PRIVMSG}:</b><br /><span class="gensmall">{L_POPUP_ON_PRIVMSG_EXPLAIN}</span></td>
|
||||
<td class="row2">
|
||||
<input type="radio" name="popup_pm" value="1" {POPUP_PM_YES} />
|
||||
<input type="radio" name="popup_pm" value="1"{POPUP_PM_YES} />
|
||||
<span class="gen">{L_YES}</span>
|
||||
<input type="radio" name="popup_pm" value="0" {POPUP_PM_NO} />
|
||||
<input type="radio" name="popup_pm" value="0"{POPUP_PM_NO} />
|
||||
<span class="gen">{L_NO}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><span class="gen">{L_BOARD_LANGUAGE}:</span></td>
|
||||
<td class="row2"><select name="language">{LANGUAGE_SELECT}</select></td>
|
||||
<td class="row1"><b class="genmed">{L_BOARD_LANGUAGE}:</b></td>
|
||||
<td class="row2"><select name="lang">{S_LANG_OPTIONS}</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><span class="gen">{L_BOARD_STYLE}:</span></td>
|
||||
<td class="row2"><select name="style">{STYLE_SELECT}</select></td>
|
||||
<td class="row1"><b class="genmed">{L_BOARD_STYLE}:</b></td>
|
||||
<td class="row2"><select name="style">{S_STYLE_OPTIONS}</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><span class="gen">{L_TIMEZONE}:</span></td>
|
||||
<td class="row2"><select name="timezone">{TIMEZONE_SELECT}</select></td>
|
||||
<td class="row1"><b class="genmed">{L_TIMEZONE}:</b></td>
|
||||
<td class="row2"><select name="tz">{S_TZ_OPTIONS}</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><span class="gen">{L_DATE_FORMAT}:</span><br />
|
||||
<td class="row1"><b class="genmed">{L_DATE_FORMAT}:</b><br />
|
||||
<span class="gensmall">{L_DATE_FORMAT_EXPLAIN}</span></td>
|
||||
<td class="row2">
|
||||
<input type="text" name="dateformat" value="{DATE_FORMAT}" maxlength="14" class="post" />
|
||||
|
@ -95,35 +101,35 @@
|
|||
|
||||
<!-- IF S_DISPLAY_POST -->
|
||||
<tr>
|
||||
<td class="row1"><span class="gen">{L_ALWAYS_ADD_SIGNATURE}:</span></td>
|
||||
<td class="row1"><b class="genmed">{L_ALWAYS_ADD_SIGNATURE}:</b></td>
|
||||
<td class="row2">
|
||||
<input type="radio" name="attachsig" value="1" {ALWAYS_ADD_SIGNATURE_YES} />
|
||||
<input type="radio" name="attachsig" value="1"{ALWAYS_ADD_SIGNATURE_YES} />
|
||||
<span class="gen">{L_YES}</span>
|
||||
<input type="radio" name="attachsig" value="0" {ALWAYS_ADD_SIGNATURE_NO} />
|
||||
<input type="radio" name="attachsig" value="0"{ALWAYS_ADD_SIGNATURE_NO} />
|
||||
<span class="gen">{L_NO}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><span class="gen">{L_ALWAYS_ALLOW_BBCODE}:</span></td>
|
||||
<td class="row1"><b class="genmed">{L_ALWAYS_ALLOW_BBCODE}:</b></td>
|
||||
<td class="row2">
|
||||
<input type="radio" name="allowbbcode" value="1" {ALWAYS_ALLOW_BBCODE_YES} />
|
||||
<input type="radio" name="allowbbcode" value="1"{ALWAYS_ALLOW_BBCODE_YES} />
|
||||
<span class="gen">{L_YES}</span>
|
||||
<input type="radio" name="allowbbcode" value="0" {ALWAYS_ALLOW_BBCODE_NO} />
|
||||
<input type="radio" name="allowbbcode" value="0"{ALWAYS_ALLOW_BBCODE_NO} />
|
||||
<span class="gen">{L_NO}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><span class="gen">{L_ALWAYS_ALLOW_HTML}:</span></td>
|
||||
<td class="row1"><b class="genmed">{L_ALWAYS_ALLOW_HTML}:</b></td>
|
||||
<td class="row2">
|
||||
<input type="radio" name="allowhtml" value="1" {ALWAYS_ALLOW_HTML_YES} />
|
||||
<input type="radio" name="allowhtml" value="1"{ALWAYS_ALLOW_HTML_YES} />
|
||||
<span class="gen">{L_YES}</span>
|
||||
<input type="radio" name="allowhtml" value="0" {ALWAYS_ALLOW_HTML_NO} />
|
||||
<input type="radio" name="allowhtml" value="0"{ALWAYS_ALLOW_HTML_NO} />
|
||||
<span class="gen">{L_NO}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><span class="gen">{L_ALWAYS_ALLOW_SMILIES}:</span></td>
|
||||
<td class="row1"><b class="genmed">{L_ALWAYS_ALLOW_SMILIES}:</b></td>
|
||||
<td class="row2">
|
||||
<input type="radio" name="allowsmilies" value="1" {ALWAYS_ALLOW_SMILIES_YES} />
|
||||
<input type="radio" name="allowsmilies" value="1"{ALWAYS_ALLOW_SMILIES_YES} />
|
||||
<span class="gen">{L_YES}</span>
|
||||
<input type="radio" name="allowsmilies" value="0" {ALWAYS_ALLOW_SMILIES_NO} />
|
||||
<input type="radio" name="allowsmilies" value="0"{ALWAYS_ALLOW_SMILIES_NO} />
|
||||
<span class="gen">{L_NO}</span></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
|
|
|
@ -1,41 +1,4 @@
|
|||
<!-- $Id$ -->
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
|
||||
// Define the bbCode tags
|
||||
bbcode = new Array();
|
||||
bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[flash]','[/flash]','[url]','[/url]');
|
||||
imageTag = false;
|
||||
|
||||
// Helpline messages
|
||||
b_help = "{L_BBCODE_B_HELP}";
|
||||
i_help = "{L_BBCODE_I_HELP}";
|
||||
u_help = "{L_BBCODE_U_HELP}";
|
||||
q_help = "{L_BBCODE_Q_HELP}";
|
||||
c_help = "{L_BBCODE_C_HELP}";
|
||||
l_help = "{L_BBCODE_L_HELP}";
|
||||
o_help = "{L_BBCODE_O_HELP}";
|
||||
p_help = "{L_BBCODE_P_HELP}";
|
||||
w_help = "{L_BBCODE_W_HELP}";
|
||||
a_help = "{L_BBCODE_A_HELP}";
|
||||
s_help = "{L_BBCODE_S_HELP}";
|
||||
f_help = "{L_BBCODE_F_HELP}";
|
||||
e_help = "{L_BBCODE_E_HELP}";
|
||||
|
||||
function checkForm()
|
||||
{
|
||||
if (document.post.message.value.length < 2) {
|
||||
alert('{L_EMPTY_MESSAGE}');
|
||||
return false;
|
||||
} else {
|
||||
// document.post.post.disabled = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<script language="javascript" type="text/javascript" src="templates/subSilver/editor.js"></script>
|
||||
<!-- INCLUDE ucp_header.html -->
|
||||
|
||||
<tr>
|
||||
|
@ -99,22 +62,22 @@ function checkForm()
|
|||
|
||||
<!-- IF S_DISPLAY_PROFILE -->
|
||||
<tr>
|
||||
<td class="row2" colspan="2"><span class="gensmall">{L_PROFILE_INFO_NOTICE}</span></td>
|
||||
<td class="row3" colspan="2"><span class="gensmall">{L_PROFILE_INFO_NOTICE}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><b class="genmed">{L_ICQ}: </b></td>
|
||||
<td class="row1"><b class="genmed">{L_UCP_ICQ}: </b></td>
|
||||
<td class="row2"><input class="post" type="text" name="icq" size="30" maxlength="15" value="{ICQ}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><b class="genmed">{L_AIM}: </b></td>
|
||||
<td class="row1"><b class="genmed">{L_UCP_AIM}: </b></td>
|
||||
<td class="row2"><input class="post" type="text" name="aim" size="30" maxlength="255" value="{AIM}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><b class="genmed">{L_MSNM}: </b></td>
|
||||
<td class="row1"><b class="genmed">{L_UCP_MSNM}: </b></td>
|
||||
<td class="row2"><input class="post" type="text" name="msn" size="30" maxlength="255" value="{MSN}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><b class="genmed">{L_YIM}: </b></td>
|
||||
<td class="row1"><b class="genmed">{L_UCP_YIM}: </b></td>
|
||||
<td class="row2"><input class="post" type="text" name="yim" size="30" maxlength="255" value="{YIM}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -175,7 +138,7 @@ function checkForm()
|
|||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="10" width="450"><input type="text" name="helpbox" size="45" maxlength="100" style="width:450px; font-size:10px" class="helpline" value="{L_STYLES_TIP}" /></td>
|
||||
<td colspan="10" width="450"><input class="helpline" type="text" name="helpbox" size="45" maxlength="100" style="width:450px;font-size:10px" value="{L_STYLES_TIP}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="10" align="center"><textarea class="post" name="signature" rows="6" cols="60" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{SIGNATURE}</textarea></td>
|
||||
|
|
317
phpBB/ucp.php
317
phpBB/ucp.php
|
@ -8,7 +8,6 @@
|
|||
*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
|
@ -70,58 +69,60 @@ $user->setup();
|
|||
$auth->acl($user->data);
|
||||
|
||||
|
||||
// -----------------------
|
||||
// Page specific functions
|
||||
//
|
||||
if (!empty($_REQUEST['mode']))
|
||||
$mode = (!empty($_REQUEST['mode'])) ? htmlspecialchars($_REQUEST['mode']) : '';
|
||||
$module = (!empty($_REQUEST['i'])) ? $_REQUEST['i'] : 1;
|
||||
|
||||
|
||||
//
|
||||
$ucp = new ucp();
|
||||
|
||||
|
||||
//
|
||||
switch ($mode)
|
||||
{
|
||||
$mode = $_REQUEST['mode'];
|
||||
case 'activate':
|
||||
$ucp->module('activate');
|
||||
$ucp->modules['activate']->main();
|
||||
break;
|
||||
|
||||
switch ($mode)
|
||||
{
|
||||
case 'activate':
|
||||
include($phpbb_root_path . 'ucp/ucp_activate.'.$phpEx);
|
||||
ucp_activate::main();
|
||||
break;
|
||||
|
||||
case 'register':
|
||||
if ($user->data['user_id'] != ANONYMOUS)
|
||||
{
|
||||
redirect("index.$phpEx$SID");
|
||||
}
|
||||
|
||||
include($phpbb_root_path . 'ucp/ucp_register.'.$phpEx);
|
||||
ucp_register::main();
|
||||
break;
|
||||
|
||||
case 'login':
|
||||
if ($user->data['user_id'] != ANONYMOUS)
|
||||
{
|
||||
redirect("index.$phpEx$SID");
|
||||
}
|
||||
|
||||
define('IN_LOGIN', true);
|
||||
login_box("ucp.$phpEx$SID&mode=login");
|
||||
case 'register':
|
||||
if ($user->data['user_id'] != ANONYMOUS)
|
||||
{
|
||||
redirect("index.$phpEx$SID");
|
||||
break;
|
||||
}
|
||||
|
||||
case 'logout':
|
||||
if ($user->data['user_id'] != ANONYMOUS)
|
||||
{
|
||||
$user->destroy();
|
||||
}
|
||||
$ucp->module('register');
|
||||
$ucp->modules['register']->main();
|
||||
break;
|
||||
|
||||
case 'login':
|
||||
if ($user->data['user_id'] != ANONYMOUS)
|
||||
{
|
||||
redirect("index.$phpEx$SID");
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
define('IN_LOGIN', true);
|
||||
login_box("ucp.$phpEx$SID&mode=login");
|
||||
redirect("index.$phpEx$SID");
|
||||
break;
|
||||
|
||||
case 'logout':
|
||||
if ($user->data['user_id'] != ANONYMOUS)
|
||||
{
|
||||
$user->destroy();
|
||||
}
|
||||
|
||||
redirect("index.$phpEx$SID");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// Some basic template vars
|
||||
$template->assign_vars(array(
|
||||
'UCP_WELCOME_MSG' => $user->lang['UCP_WELCOME_MESSAGE'])
|
||||
);
|
||||
// Only registered users can go beyond this point
|
||||
if ($user->data['user_id'] == ANONYMOUS)
|
||||
{
|
||||
redirect("index.$phpEx");
|
||||
}
|
||||
|
||||
|
||||
// Word censors $censors['match'] & $censors['replace']
|
||||
|
@ -129,234 +130,66 @@ $censors = array();
|
|||
obtain_word_list($censors);
|
||||
|
||||
|
||||
$selected_module = (!empty($_REQUEST['module_id'])) ? $_REQUEST['module_id'] : '';
|
||||
|
||||
// "Home" module
|
||||
$template->assign_block_vars('ucp_sections', array(
|
||||
'U_SECTION' => "ucp.$phpEx$SID",
|
||||
'SECTION' => $user->lang['UCP_Main'],
|
||||
'S_IS_TAB' => (!$selected_module) ? true : false)
|
||||
);
|
||||
|
||||
|
||||
|
||||
// Grab the other enabled UCP modules
|
||||
$sql = "SELECT module_id, module_name, module_filename
|
||||
FROM " . UCP_MODULES_TABLE . "
|
||||
ORDER BY module_order ASC";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$selected_module_name = '';
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$template->assign_block_vars('ucp_sections', array(
|
||||
'SECTION' => $user->lang['UCP_' . $row['module_name']],
|
||||
|
||||
'U_SECTION' => "ucp.$phpEx$SID&module_id=" . $row['module_id'],
|
||||
'U_SECTION' => "ucp.$phpEx$SID&i=" . $row['module_id'],
|
||||
|
||||
'S_IS_TAB' => ($row['module_id'] == $selected_module) ? true : false)
|
||||
'S_IS_TAB' => ($row['module_id'] == $module) ? true : false)
|
||||
);
|
||||
|
||||
if ($row['module_id'] == $selected_module)
|
||||
if ($row['module_id'] == $module)
|
||||
{
|
||||
$selected_module_name = $row['module_filename'];
|
||||
$selected_module_id = $row['module_id'];
|
||||
$selected_module = $row['module_filename'];
|
||||
$selected_id = $row['module_id'];
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($selected_module_name)
|
||||
if ($selected_module)
|
||||
{
|
||||
include($phpbb_root_path . 'ucp/' . $selected_module_name . '.' . $phpEx);
|
||||
eval($selected_module_name . '::main(' . $selected_module_id . ');');
|
||||
$ucp->module($selected_module);
|
||||
$ucp->modules[$selected_module]->main($selected_id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Subscribed Topics
|
||||
$sql = "SELECT tw.topic_id, t.topic_title, t.topic_last_post_time, t.poll_start, t.topic_replies, t.topic_type, t.forum_id
|
||||
FROM " . TOPICS_TABLE . " t, " . TOPICS_WATCH_TABLE . " tw
|
||||
WHERE t.topic_id = tw.topic_id
|
||||
AND tw.user_id = " . $user->data['user_id'] . "
|
||||
ORDER BY t.topic_last_post_time DESC";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$topic_count = 0;
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$replies = $row['topic_replies'];
|
||||
$topic_id = $row['topic_id'];
|
||||
$forum_id = $row['forum_id'];
|
||||
|
||||
switch ($row['topic_type'])
|
||||
{
|
||||
case POST_ANNOUNCE:
|
||||
$topic_type = $user->lang['Topic_Announcement'] . ' ';
|
||||
$folder = 'folder_announce';
|
||||
$folder_new = 'folder_announce_new';
|
||||
break;
|
||||
|
||||
case POST_STICKY:
|
||||
$topic_type = $user->lang['Topic_Sticky'] . ' ';
|
||||
$folder = 'folder_sticky';
|
||||
$folder_new = 'folder_sticky_new';
|
||||
break;
|
||||
|
||||
case ITEM_LOCKED:
|
||||
$folder = 'folder_locked';
|
||||
$folder_new = 'folder_locked_new';
|
||||
break;
|
||||
|
||||
default:
|
||||
if ($replies >= intval($config['hot_threshold']))
|
||||
{
|
||||
$folder = 'folder_hot';
|
||||
$folder_new = 'folder_hot_new';
|
||||
}
|
||||
else
|
||||
{
|
||||
$folder = 'folder';
|
||||
$folder_new = 'folder_new';
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
$unread_topic = false;
|
||||
if ($user->data['user_id'] && $row['topic_last_post_time'] > $user->data['session_last_visit'])
|
||||
{
|
||||
$unread_topic = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$newest_post_img = ($unread_topic) ? '<a href="viewtopic.' . $phpEx . $SID . '&t=' . $topic_id . '&view=newest#newest">' . $user->img('goto_post_newest', 'View_newest_post') . '</a> ' : '';
|
||||
$folder_img = ($unread_topic) ? $folder_new : $folder;
|
||||
$folder_alt = ($unread_topic) ? 'New_posts' : (($row['topic_status'] == ITEM_LOCKED) ? 'Topic_locked' : 'No_new_posts');
|
||||
|
||||
$view_topic_url = 'viewtopic.' . $phpEx . $SID . '&f=' . $forum_id . '&t=' . $topic_id;
|
||||
|
||||
$template->assign_block_vars('subscribed_topics', array(
|
||||
'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
|
||||
'NEWEST_POST_IMG' => $newest_post_img,
|
||||
|
||||
'TOPIC_TITLE' => (!empty($censors)) ? preg_replace($censors['match'], $censors['replace'], $row['topic_title']) : $row['topic_title'],
|
||||
|
||||
'U_TOPIC' => $view_topic_url)
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
// End Subscribed Topics
|
||||
|
||||
|
||||
// Subscribed Forums
|
||||
$sql = "SELECT f.forum_id, f.forum_last_post_time, f.forum_last_post_id, f.left_id, f.right_id, f.forum_status, f.forum_name, f.forum_desc
|
||||
FROM " . FORUMS_TABLE . " f, " . FORUMS_WATCH_TABLE . " fw
|
||||
WHERE f.forum_id = fw.forum_id
|
||||
AND fw.user_id = " . $user->data['user_id'] . "
|
||||
ORDER BY f.forum_last_post_time DESC";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$forum_id = $row['forum_id'];
|
||||
|
||||
$unread_topics = ($user->data['user_id'] && $row['forum_last_post_time'] > $user->data['user_lastvisit']) ? TRUE : FALSE;
|
||||
|
||||
$folder_image = ($unread_topics) ? 'forum_new' : 'forum';
|
||||
$folder_alt = ($unread_topics) ? 'New_posts' : 'No_new_posts';
|
||||
|
||||
if ($row['left_id'] + 1 < $row['right_id'])
|
||||
{
|
||||
$folder_image = ($unread_topics) ? 'sub_forum_new' : 'sub_forum';
|
||||
$folder_alt = ($unread_topics) ? 'New_posts' : 'No_new_posts';
|
||||
}
|
||||
elseif ($row['forum_status'] == ITEM_LOCKED)
|
||||
{
|
||||
$folder_image = 'forum_locked';
|
||||
$folder_alt = 'Forum_locked';
|
||||
}
|
||||
else
|
||||
{
|
||||
$folder_image = ($unread_topics) ? 'forum_new' : 'forum';
|
||||
$folder_alt = ($unread_topics) ? 'New_posts' : 'No_new_posts';
|
||||
}
|
||||
|
||||
$last_post = '<a href="viewtopic.' . $phpEx . $SID . '&f=' . $row['forum_id'] . '&p=' . $row['forum_last_post_id'] . '#' . $row['forum_last_post_id'] . '">' . $user->img('goto_post_latest', 'View_latest_post') . '</a>';
|
||||
|
||||
|
||||
$template->assign_block_vars('subscribed_forums', array(
|
||||
'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt),
|
||||
'NEWEST_FORUM_POST_IMG' => $last_post,
|
||||
|
||||
'FORUM_NAME' => $row['forum_name'],
|
||||
|
||||
'U_FORUM' => 'viewforum.' . $phpEx . $SID . '&f=' . $row['forum_id'])
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
// End Subscribed forums
|
||||
|
||||
|
||||
// Buddy List
|
||||
|
||||
// End Buddy List
|
||||
|
||||
|
||||
// Private Messages
|
||||
|
||||
// End Private Messages
|
||||
|
||||
|
||||
// Output the page
|
||||
page_header($user->lang['UCP'] . ' - ' . $this_section);
|
||||
|
||||
$template->set_filenames(array(
|
||||
'body' => 'ucp_main.html')
|
||||
);
|
||||
make_jumpbox('viewforum.'.$phpEx);
|
||||
|
||||
page_footer();
|
||||
|
||||
|
||||
// A wrapper class for ucp modules?
|
||||
class ucp
|
||||
{
|
||||
function main($module_id)
|
||||
var $modules = array();
|
||||
|
||||
function module($module_name)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
function extra_fields($page)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
function gen_rand_string($num_chars)
|
||||
{
|
||||
$chars = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9');
|
||||
|
||||
list($usec, $sec) = explode(' ', microtime());
|
||||
mt_srand($sec * $usec);
|
||||
|
||||
$max_chars = count($chars) - 1;
|
||||
$rand_str = '';
|
||||
for ($i = 0; $i < $num_chars; $i++)
|
||||
if (!class_exists('ucp_' . $module_name))
|
||||
{
|
||||
$rand_str .= $chars[mt_rand(0, $max_chars)];
|
||||
$this->loadfile('ucp/ucp_' . $module_name);
|
||||
eval('$this->modules[' . $module_name . '] = new ucp_' . $module_name . '();');
|
||||
}
|
||||
|
||||
return $rand_str;
|
||||
}
|
||||
|
||||
function load($filename)
|
||||
function loadfile($filename)
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
require($phpbb_root_path . $filename . '.' . $phpEx);
|
||||
return require($phpbb_root_path . $filename . '.' . $phpEx);
|
||||
}
|
||||
|
||||
function main($module_id = false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
function subsection(&$module_ary, &$selected_module)
|
||||
|
@ -388,6 +221,28 @@ class ucp
|
|||
|
||||
page_footer();
|
||||
}
|
||||
|
||||
function extra_fields($page)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
function gen_rand_string($num_chars)
|
||||
{
|
||||
$chars = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9');
|
||||
|
||||
list($usec, $sec) = explode(' ', microtime());
|
||||
mt_srand($sec * $usec);
|
||||
|
||||
$max_chars = count($chars) - 1;
|
||||
$rand_str = '';
|
||||
for ($i = 0; $i < $num_chars; $i++)
|
||||
{
|
||||
$rand_str .= $chars[mt_rand(0, $max_chars)];
|
||||
}
|
||||
|
||||
return $rand_str;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
95
phpBB/ucp/ucp_activate.php
Normal file
95
phpBB/ucp/ucp_activate.php
Normal file
|
@ -0,0 +1,95 @@
|
|||
<?php
|
||||
/***************************************************************************
|
||||
* usercp_activate.php
|
||||
* -------------------
|
||||
* begin : Saturday, Feb 13, 2001
|
||||
* copyright : (C) 2001 The phpBB Group
|
||||
* email : support@phpbb.com
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
class ucp_activate extends ucp
|
||||
{
|
||||
function main($module_id)
|
||||
{
|
||||
global $config, $db, $user, $auth, $SID, $template, $phpEx;
|
||||
|
||||
$sql = "SELECT user_active, user_id, user_email, user_newpasswd, user_lang, user_actkey, username
|
||||
FROM " . USERS_TABLE . "
|
||||
WHERE user_id = " . intval($_GET['u']);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if ($row['user_active'] && $row['user_actkey'] == '')
|
||||
{
|
||||
meta_refresh(3, "index.$phpEx$SID");
|
||||
trigger_error($user->lang['Already_activated']);
|
||||
}
|
||||
else if ($row['user_actkey'] == $_GET['key'])
|
||||
{
|
||||
$sql_update_pass = ($row['user_newpasswd'] != '') ? ", user_password = '" . $db->sql_escape($row['user_newpasswd']) . "', user_newpasswd = ''" : '';
|
||||
|
||||
$sql = "UPDATE " . USERS_TABLE . "
|
||||
SET user_active = 1, user_actkey = ''" . $sql_update_pass . "
|
||||
WHERE user_id = " . $row['user_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ($config['require_activation'] == USER_ACTIVATION_ADMIN && $sql_update_pass == '')
|
||||
{
|
||||
ucp::load('includes/emailer');
|
||||
$emailer = new emailer($config['smtp_delivery']);
|
||||
|
||||
$emailer->use_template('admin_welcome_activated', $row['user_lang']);
|
||||
$emailer->to($row['user_email']);
|
||||
|
||||
$emailer->assign_vars(array(
|
||||
'SITENAME' => $config['sitename'],
|
||||
'USERNAME' => $row['username'],
|
||||
'PASSWORD' => $password_confirm,
|
||||
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $config['board_email_sig']))
|
||||
);
|
||||
$emailer->send();
|
||||
$emailer->reset();
|
||||
|
||||
meta_refresh(3, "index.$phpEx$SID");
|
||||
trigger_error($user->lang['Account_active_admin']);
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_refresh(3, "index.$phpEx$SID");
|
||||
$message = ($sql_update_pass == '') ? $user->lang['Account_active'] : $user->lang['Password_activated'];
|
||||
trigger_error($message);
|
||||
}
|
||||
|
||||
set_config('newest_user_id', $row['user_id']);
|
||||
set_config('newest_username', $row['username']);
|
||||
set_config('num_users', $config['num_users'] + 1, TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger_error($user->lang['Wrong_activation']);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger_error($user->lang['No_such_user']);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
198
phpBB/ucp/ucp_main.php
Normal file
198
phpBB/ucp/ucp_main.php
Normal file
|
@ -0,0 +1,198 @@
|
|||
<?php
|
||||
/***************************************************************************
|
||||
* ucp_main.php
|
||||
* -------------------
|
||||
* begin : Saturday, Feb 21, 2003
|
||||
* copyright : (C) 2001 The phpBB Group
|
||||
* email : support@phpbb.com
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
class ucp_main extends ucp
|
||||
{
|
||||
function main($id)
|
||||
{
|
||||
global $config, $db, $user, $SID, $template, $phpEx;
|
||||
|
||||
$submode = ($_REQUEST['mode']) ? htmlspecialchars($_REQUEST['mode']) : 'personal';
|
||||
|
||||
// Setup internal subsection display
|
||||
$submodules['PERSONAL'] = "i=$id&mode=personal";
|
||||
$submodules['VIEW'] = "i=$id&mode=view";
|
||||
$submodules['POST'] = "i=$id&mode=post";
|
||||
|
||||
|
||||
$this->subsection($submodules, $submode);
|
||||
unset($submodules);
|
||||
|
||||
switch($submode)
|
||||
{
|
||||
case 'view':
|
||||
break;
|
||||
|
||||
case 'post':
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// Subscribed Topics
|
||||
$sql = "SELECT tw.topic_id, t.topic_title, t.topic_last_post_time, t.poll_start, t.topic_replies, t.topic_type, t.forum_id
|
||||
FROM " . TOPICS_TABLE . " t, " . TOPICS_WATCH_TABLE . " tw
|
||||
WHERE t.topic_id = tw.topic_id
|
||||
AND tw.user_id = " . $user->data['user_id'] . "
|
||||
ORDER BY t.topic_last_post_time DESC";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$topic_count = 0;
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$replies = $row['topic_replies'];
|
||||
$topic_id = $row['topic_id'];
|
||||
$forum_id = $row['forum_id'];
|
||||
|
||||
switch ($row['topic_type'])
|
||||
{
|
||||
case POST_ANNOUNCE:
|
||||
$topic_type = $user->lang['Topic_Announcement'] . ' ';
|
||||
$folder = 'folder_announce';
|
||||
$folder_new = 'folder_announce_new';
|
||||
break;
|
||||
|
||||
case POST_STICKY:
|
||||
$topic_type = $user->lang['Topic_Sticky'] . ' ';
|
||||
$folder = 'folder_sticky';
|
||||
$folder_new = 'folder_sticky_new';
|
||||
break;
|
||||
|
||||
case ITEM_LOCKED:
|
||||
$folder = 'folder_locked';
|
||||
$folder_new = 'folder_locked_new';
|
||||
break;
|
||||
|
||||
default:
|
||||
if ($replies >= intval($config['hot_threshold']))
|
||||
{
|
||||
$folder = 'folder_hot';
|
||||
$folder_new = 'folder_hot_new';
|
||||
}
|
||||
else
|
||||
{
|
||||
$folder = 'folder';
|
||||
$folder_new = 'folder_new';
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
$unread_topic = false;
|
||||
if ($user->data['user_id'] && $row['topic_last_post_time'] > $user->data['session_last_visit'])
|
||||
{
|
||||
$unread_topic = true;
|
||||
}
|
||||
|
||||
$newest_post_img = ($unread_topic) ? '<a href="viewtopic.' . $phpEx . $SID . '&t=' . $topic_id . '&view=newest#newest">' . $user->img('goto_post_newest', 'View_newest_post') . '</a> ' : '';
|
||||
$folder_img = ($unread_topic) ? $folder_new : $folder;
|
||||
$folder_alt = ($unread_topic) ? 'New_posts' : (($row['topic_status'] == ITEM_LOCKED) ? 'Topic_locked' : 'No_new_posts');
|
||||
|
||||
$view_topic_url = 'viewtopic.' . $phpEx . $SID . '&f=' . $forum_id . '&t=' . $topic_id;
|
||||
|
||||
$template->assign_block_vars('subscribed_topics', array(
|
||||
'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
|
||||
'NEWEST_POST_IMG' => $newest_post_img,
|
||||
|
||||
'TOPIC_TITLE' => (!empty($censors)) ? preg_replace($censors['match'], $censors['replace'], $row['topic_title']) : $row['topic_title'],
|
||||
|
||||
'U_TOPIC' => $view_topic_url)
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
// End Subscribed Topics
|
||||
|
||||
|
||||
// Subscribed Forums
|
||||
$sql = "SELECT f.forum_id, f.forum_last_post_time, f.forum_last_post_id, f.left_id, f.right_id, f.forum_status, f.forum_name, f.forum_desc
|
||||
FROM " . FORUMS_TABLE . " f, " . FORUMS_WATCH_TABLE . " fw
|
||||
WHERE f.forum_id = fw.forum_id
|
||||
AND fw.user_id = " . $user->data['user_id'] . "
|
||||
ORDER BY f.forum_last_post_time DESC";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$forum_id = $row['forum_id'];
|
||||
|
||||
$unread_topics = ($user->data['user_id'] && $row['forum_last_post_time'] > $user->data['user_lastvisit']) ? TRUE : FALSE;
|
||||
|
||||
$folder_image = ($unread_topics) ? 'forum_new' : 'forum';
|
||||
$folder_alt = ($unread_topics) ? 'New_posts' : 'No_new_posts';
|
||||
|
||||
if ($row['left_id'] + 1 < $row['right_id'])
|
||||
{
|
||||
$folder_image = ($unread_topics) ? 'sub_forum_new' : 'sub_forum';
|
||||
$folder_alt = ($unread_topics) ? 'New_posts' : 'No_new_posts';
|
||||
}
|
||||
elseif ($row['forum_status'] == ITEM_LOCKED)
|
||||
{
|
||||
$folder_image = 'forum_locked';
|
||||
$folder_alt = 'Forum_locked';
|
||||
}
|
||||
else
|
||||
{
|
||||
$folder_image = ($unread_topics) ? 'forum_new' : 'forum';
|
||||
$folder_alt = ($unread_topics) ? 'New_posts' : 'No_new_posts';
|
||||
}
|
||||
|
||||
$last_post = '<a href="viewtopic.' . $phpEx . $SID . '&f=' . $row['forum_id'] . '&p=' . $row['forum_last_post_id'] . '#' . $row['forum_last_post_id'] . '">' . $user->img('goto_post_latest', 'View_latest_post') . '</a>';
|
||||
|
||||
|
||||
$template->assign_block_vars('subscribed_forums', array(
|
||||
'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt),
|
||||
'NEWEST_FORUM_POST_IMG' => $last_post,
|
||||
|
||||
'FORUM_NAME' => $row['forum_name'],
|
||||
|
||||
'U_FORUM' => 'viewforum.' . $phpEx . $SID . '&f=' . $row['forum_id'])
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
// End Subscribed forums
|
||||
|
||||
|
||||
// Buddy List
|
||||
|
||||
// End Buddy List
|
||||
|
||||
|
||||
// Private Messages
|
||||
|
||||
// End Private Messages
|
||||
|
||||
|
||||
|
||||
|
||||
$template->assign_vars(array(
|
||||
'L_TITLE' => $user->lang['UCP_' . strtoupper($submode)],
|
||||
|
||||
'S_DISPLAY_' . strtoupper($submode) => true,
|
||||
'S_HIDDEN_FIELDS' => $s_hidden_fields,
|
||||
'S_UCP_ACTION' => "ucp.$phpEx$SID&i=$id&mode=$submode")
|
||||
);
|
||||
|
||||
$this->output($user->lang['UCP_MAIN'], 'ucp_main.html');
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
33
phpBB/ucp/ucp_pm.php
Normal file
33
phpBB/ucp/ucp_pm.php
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
/***************************************************************************
|
||||
* usercp_profile.php
|
||||
* -------------------
|
||||
* begin : Saturday, Feb 21, 2003
|
||||
* copyright : (C) 2001 The phpBB Group
|
||||
* email : support@phpbb.com
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
class ucp_pm extends ucp
|
||||
{
|
||||
function main($module_id)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/***************************************************************************
|
||||
* usercp_profile.php
|
||||
* ucp_prefs.php
|
||||
* -------------------
|
||||
* begin : Saturday, Feb 21, 2003
|
||||
* copyright : (C) 2001 The phpBB Group
|
||||
|
@ -8,7 +8,6 @@
|
|||
*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
|
@ -18,27 +17,38 @@
|
|||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
class ucp_prefs extends ucp
|
||||
{
|
||||
function main($module_id)
|
||||
function main($id)
|
||||
{
|
||||
global $config, $db, $user, $SID, $template, $phpEx;
|
||||
|
||||
$submode = ($_REQUEST['mode']) ? htmlspecialchars($_REQUEST['mode']) : 'personal';
|
||||
|
||||
// Setup internal subsection display
|
||||
$submodules['PERSONAL'] = "module_id=$module_id&mode=personal";
|
||||
$submodules['VIEW'] = "module_id=$module_id&mode=view";
|
||||
$submodules['POST'] = "module_id=$module_id&mode=post";
|
||||
$submodules['PERSONAL'] = "i=$id&mode=personal";
|
||||
$submodules['VIEW'] = "i=$id&mode=view";
|
||||
$submodules['POST'] = "i=$id&mode=post";
|
||||
|
||||
ucp::subsection($submodules, $submode);
|
||||
$this->subsection($submodules, $submode);
|
||||
unset($submodules);
|
||||
|
||||
switch($submode)
|
||||
{
|
||||
case 'personal':
|
||||
$template->assign_vars(array(
|
||||
'VIEW_EMAIL_YES' => ($user->data['user_viewemail ']) ? ' checked="checked"' : '',
|
||||
'VIEW_EMAIL_NO' => (!$user->data['user_viewemail ']) ? ' checked="checked"' : '',
|
||||
'DATE_FORMAT' => $user->data['user_dateformat'],
|
||||
|
||||
'S_LANG_OPTIONS' => language_select($user->data['user_lang']),
|
||||
'S_STYLE_OPTIONS' => style_select($user->data['user_style']),
|
||||
'S_TZ_OPTIONS' => tz_select($user->data['user_timezone']),)
|
||||
);
|
||||
break;
|
||||
|
||||
case 'view':
|
||||
break;
|
||||
|
||||
|
@ -54,10 +64,10 @@ class ucp_prefs extends ucp
|
|||
|
||||
'S_DISPLAY_' . strtoupper($submode) => true,
|
||||
'S_HIDDEN_FIELDS' => $s_hidden_fields,
|
||||
'S_UCP_ACTION' => "ucp.$phpEx$SID&module_id=$module_id&mode=$submode")
|
||||
'S_UCP_ACTION' => "ucp.$phpEx$SID&i=$id&mode=$submode")
|
||||
);
|
||||
|
||||
ucp::output($user->lang['UCP_PROFILE'], 'ucp_prefs.html');
|
||||
$this->output($user->lang['UCP_PROFILE'], 'ucp_prefs.html');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/***************************************************************************
|
||||
* usercp_profile.php
|
||||
* ucp_profile.php
|
||||
* -------------------
|
||||
* begin : Saturday, Feb 21, 2003
|
||||
* copyright : (C) 2001 The phpBB Group
|
||||
|
@ -8,7 +8,6 @@
|
|||
*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
|
@ -18,29 +17,29 @@
|
|||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
class ucp_profile extends ucp
|
||||
{
|
||||
function main($module_id)
|
||||
function main($id)
|
||||
{
|
||||
global $config, $db, $user, $auth, $SID, $template, $phpEx;
|
||||
|
||||
$submode = ($_REQUEST['mode']) ? htmlspecialchars($_REQUEST['mode']) : 'reg_details';
|
||||
|
||||
$submodules['REG_DETAILS'] = "module_id=$module_id&mode=reg_details";
|
||||
$submodules['PROFILE'] = "module_id=$module_id&mode=profile";
|
||||
$submodules['SIGNATURE'] = "module_id=$module_id&mode=signature";
|
||||
$submodules['AVATAR'] = "module_id=$module_id&mode=avatar";
|
||||
$submodules['REG_DETAILS'] = "i=$id&mode=reg_details";
|
||||
$submodules['PROFILE'] = "i=$id&mode=profile";
|
||||
$submodules['SIGNATURE'] = "i=$id&mode=signature";
|
||||
$submodules['AVATAR'] = "i=$id&mode=avatar";
|
||||
|
||||
ucp::subsection($submodules, $submode);
|
||||
$this->subsection($submodules, $submode);
|
||||
unset($submodules);
|
||||
|
||||
switch ($submode)
|
||||
{
|
||||
case 'reg_details':
|
||||
|
||||
$template->assign_vars(array(
|
||||
'USERNAME' => $user->data['username'],
|
||||
'EMAIL' => $user->data['user_email'],
|
||||
|
@ -53,24 +52,30 @@ class ucp_profile extends ucp
|
|||
|
||||
case 'profile':
|
||||
|
||||
list($day, $month, $year) = explode('-', $user->data['user_birthday']);
|
||||
|
||||
$s_birthday_day_options = '';
|
||||
for ($i = 1; $i < 32; $i++)
|
||||
{
|
||||
$selected = '';
|
||||
$s_birthday_day_options .= "<option value=\"$i\">$i</option>";
|
||||
$selected = ($i == $day) ? ' selected="selected"' : '';
|
||||
$s_birthday_day_options .= "<option value=\"$i\"$selected>$i</option>";
|
||||
}
|
||||
|
||||
$s_birthday_month_options = '';
|
||||
for ($i = 1; $i < 13; $i++)
|
||||
{
|
||||
$selected = '';
|
||||
$s_birthday_month_options .= "<option value=\"$i\">$i</option>";
|
||||
$selected = ($i == $month) ? ' selected="selected"' : '';
|
||||
$s_birthday_month_options .= "<option value=\"$i\"$selected>$i</option>";
|
||||
}
|
||||
$s_birthday_year_options = '';
|
||||
for ($i = 1900; $i < 2004; $i++)
|
||||
|
||||
$now = getdate();
|
||||
for ($i = $now['year'] - 100; $i < $now['year']; $i++)
|
||||
{
|
||||
$selected = '';
|
||||
$s_birthday_year_options .= "<option value=\"$i\">$i</option>";
|
||||
$selected = ($i == $year) ? ' selected="selected"' : '';
|
||||
$s_birthday_year_options .= "<option value=\"$i\"$selected>$i</option>";
|
||||
}
|
||||
unset($now);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'ICQ' => $user->data['user_icq'],
|
||||
|
@ -90,7 +95,8 @@ class ucp_profile extends ucp
|
|||
break;
|
||||
|
||||
case 'signature':
|
||||
ucp::load('includes/functions_posting');
|
||||
|
||||
$this->loadfile('includes/functions_posting');
|
||||
|
||||
$html_status = ($config['allow_html']) ? true : false;
|
||||
$bbcode_status = ($config['allow_bbcode']) ? true : false;
|
||||
|
@ -116,7 +122,7 @@ class ucp_profile extends ucp
|
|||
|
||||
if (!sizeof($error))
|
||||
{
|
||||
ucp::load('includes/message_parser');
|
||||
$this->loadfile('includes/message_parser');
|
||||
|
||||
$message_parser = new parse_message();
|
||||
$message_parser->message = trim(stripslashes($signature));
|
||||
|
@ -134,7 +140,7 @@ class ucp_profile extends ucp
|
|||
WHERE user_id = ' . $user->data['user_id'];
|
||||
$db->sql_query($sql);
|
||||
|
||||
meta_refresh(3, "ucp.$phpEx$SID&module_id=$module_id&mode=$submode");
|
||||
meta_refresh(3, "ucp.$phpEx$SID&i=$id&mode=$submode");
|
||||
trigger_error('');
|
||||
}
|
||||
}
|
||||
|
@ -146,7 +152,7 @@ class ucp_profile extends ucp
|
|||
|
||||
global $phpbb_root_path;
|
||||
|
||||
ucp::load('includes/message_parser');
|
||||
$this->loadfile('includes/message_parser');
|
||||
|
||||
$signature_preview = $signature;
|
||||
|
||||
|
@ -157,7 +163,7 @@ class ucp_profile extends ucp
|
|||
|
||||
if ($enable_bbcode)
|
||||
{
|
||||
ucp::load('includes/bbcode');
|
||||
$this->loadfile('includes/bbcode');
|
||||
$bbcode = new bbcode($message_parser->bbcode_bitfield);
|
||||
|
||||
// Second parse bbcode here
|
||||
|
@ -207,6 +213,7 @@ class ucp_profile extends ucp
|
|||
|
||||
$template->assign_vars(array(
|
||||
'AVATAR' => '<img src="images/avatars/upload/' . $user->data['user_avatar'] . '" />',
|
||||
|
||||
'S_UPLOAD_AVATAR_FILE' => true,
|
||||
'S_UPLOAD_AVATAR_URL' => true,
|
||||
'S_LINK_AVATAR' => true,
|
||||
|
@ -224,10 +231,10 @@ class ucp_profile extends ucp
|
|||
|
||||
'S_DISPLAY_' . strtoupper($submode) => true,
|
||||
'S_HIDDEN_FIELDS' => $s_hidden_fields,
|
||||
'S_UCP_ACTION' => "ucp.$phpEx$SID&module_id=$module_id&mode=$submode")
|
||||
'S_UCP_ACTION' => "ucp.$phpEx$SID&i=$id&mode=$submode")
|
||||
);
|
||||
|
||||
ucp::output($user->lang['UCP_PROFILE'], 'ucp_profile.html');
|
||||
$this->output($user->lang['UCP_PROFILE'], 'ucp_profile.html');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
class ucp_register extends ucp
|
||||
{
|
||||
function main()
|
||||
function main($id)
|
||||
{
|
||||
global $config, $db, $user, $SID, $template, $phpEx;
|
||||
|
||||
|
@ -64,7 +64,7 @@ class ucp_register extends ucp
|
|||
);
|
||||
}
|
||||
|
||||
ucp::output($user->lang['REGISTER'], 'ucp_agreement.html');
|
||||
$this->output($user->lang['REGISTER'], 'ucp_agreement.html');
|
||||
}
|
||||
|
||||
// Check and initialize some variables if needed
|
||||
|
@ -72,7 +72,7 @@ class ucp_register extends ucp
|
|||
if (isset($_POST['submit']))
|
||||
{
|
||||
// Load the userdata manipulation methods
|
||||
ucp::load('includes/functions_user');
|
||||
$this->loadfile('includes/functions_user');
|
||||
$userdata = new userdata();
|
||||
|
||||
if ($message = $userdata->add_user($coppa))
|
||||
|
@ -130,7 +130,7 @@ class ucp_register extends ucp
|
|||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$code = ucp::gen_rand_string(6);
|
||||
$code = $this->gen_rand_string(6);
|
||||
$confirm_id = md5(uniqid($user_ip));
|
||||
|
||||
$sql = "INSERT INTO " . CONFIRM_TABLE . " (confirm_id, session_id, code)
|
||||
|
@ -176,7 +176,7 @@ class ucp_register extends ucp
|
|||
);
|
||||
|
||||
//
|
||||
ucp::output($user->lang['REGISTER'], 'ucp_register.html');
|
||||
$this->output($user->lang['REGISTER'], 'ucp_register.html');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue