@Lucifer
try to put in (no Putin)
</table><input type="submit" value="Submit" class="button" /></form>
if you use bootstrap
</table><input type="submit" value="Submit" class="btn btn-success" /></form>
and come back if you have problems
PS
as I see now on you testpage this part is missing in sourcecode, so it is no wrong in css....
part of
account.php?action=edit_settings&do=edit
must be
/////////////////////// EDIT SETTINGS ////////////////
if ($action=="edit_settings"){
if ($do=="edit"){
begin_frame(T_("EDIT_SETTINGS"));
navmenu();
?>
<form enctype="multipart/form-data" method="post" action="account.php">
<input type="hidden" name="action" value="edit_settings" />
<input type="hidden" name="do" value="save_settings" />
<table class="f-border" cellspacing="0" cellpadding="5" width="100%" align="center">
<?php
$ss_r = SQL_Query_exec("SELECT * from stylesheets");
$ss_sa = array();
while ($ss_a = mysqli_fetch_array($ss_r))
{
$ss_id = $ss_a["id"];
$ss_name = $ss_a["name"];
$ss_sa[$ss_name] = $ss_id;
}
ksort($ss_sa);
reset($ss_sa);
while (list($ss_name, $ss_id) = thisEach($ss_sa))
{
if ($ss_id == $CURUSER["stylesheet"]) $ss = " selected='selected'"; else $ss = "";
$stylesheets .= "<option value='$ss_id'$ss>$ss_name</option>\n";
}
$countries = "<option value='0'>----</option>\n";
$ct_r = SQL_Query_exec("SELECT id,name from countries ORDER BY name");
while ($ct_a = mysqli_fetch_array($ct_r))
$countries .= "<option value='$ct_a[id]'" . ($CURUSER["country"] == $ct_a['id'] ? " selected='selected'" : "") . ">$ct_a[name]</option>\n";
$teams = "<option value='0'>--- ".T_("NONE_SELECTED")." ----</option>\n";
$sashok = SQL_Query_exec("SELECT id,name FROM teams ORDER BY name");
while ($sasha = mysqli_fetch_array($sashok))
$teams .= "<option value='$sasha[id]'" . ($CURUSER["team"] == $sasha['id'] ? " selected='selected'" : "") . ">$sasha[name]</option>\n";
$acceptpms = $CURUSER["acceptpms"] == "yes";
print ("<tr><td align='right' class='table_col2'><b>" . T_("ACCEPT_PMS") . ":</b> </td><td class='table_col2'><input type='radio' name='acceptpms'" . ($acceptpms ? " checked='checked'" : "") .
" value='yes' /><b>".T_("FROM_ALL")."</b> <input type='radio' name='acceptpms'" .
($acceptpms ? "" : " checked='checked'") . " value='no' /><b>" . T_("FROM_STAFF_ONLY") . "</b><br /><i>".T_("ACCEPTPM_WHICH_USERS")."</i></td></tr>");
$gender = "<option value='Male'" . ($CURUSER["gender"] == "Male" ? " selected='selected'" : "") . ">" . T_("Male") . "</option>\n"
."<option value='Female'" . ($CURUSER["gender"] == "Female" ? " selected='selected'" : "") . ">" . T_("Female") . "</option>\n";
// START CAT LIST SQL
$r = SQL_Query_exec("SELECT id,name,parent_cat FROM categories ORDER BY parent_cat ASC, sort_index ASC");
if (mysqli_num_rows($r) > 0)
{
$categories .= "<table><tr>\n";
$i = 0;
while ($a = mysqli_fetch_assoc($r))
{
$categories .= ($i && $i % 2 == 0) ? "</tr><tr>" : "";
$categories .= "<td class='bottom' style='padding-right: 5px'><input name='cat$a[id]' type=\"checkbox\" " . (strpos($CURUSER['notifs'], "[cat$a[id]]") !== false ? " checked='checked'" : "") . " value='yes' /> " .htmlspecialchars($a["parent_cat"]).": " . htmlspecialchars($a["name"]) . "</td>\n";
++$i;
}
$categories .= "</tr></table>\n";
}
// END CAT LIST SQL
function priv($name, $descr) {
global $CURUSER;
if ($CURUSER["privacy"] == $name)
return "<input type=\"radio\" name=\"privacy\" value=\"$name\" checked=\"checked\" /> $descr";
return "<input type=\"radio\" name=\"privacy\" value=\"$name\" /> $descr";
}
print("<tr><td align='right' class='table_col1'><b>" . T_("ACCOUNT_PRIVACY_LVL") . ":</b> </td><td align='left' class='table_col1'>". priv("normal", "<b>" . T_("NORMAL") . "</b>") . " " . priv("low", "<b>" . T_("LOW") . "</b>") . " " . priv("strong", "<b>" . T_("STRONG") . "</b>") . "<br /><i>".T_("ACCOUNT_PRIVACY_LVL_MSG")."</i></td></tr>");
print("<tr><td align='right' class='table_col2'><b>" . T_("EMAIL_NOTIFICATION") . ":</b> </td><td align='left' class='table_col2'><input type='checkbox' name='pmnotif' " . (strpos($CURUSER['notifs'], "[pm]") !== false ? " checked='checked'" : "") .
" value='yes' /><b>" . T_("PM_NOTIFY_ME") . "</b><br /><i>".T_("EMAIL_WHEN_PM")."</i></td></tr>");
//print("<tr><td align=right class=table_col1 valign=top><b>".T_("CATEGORY_FILTER").": </b></td><td align=left class=table_col1><i>The system will only display the following categories when browsing (uncheck all to disable filter).</i><br />".$categories."</td></tr>");
print("<tr><td align='right' class='table_col1'><b>" . T_("THEME") . ":</b> </td><td align='left' class='table_col1'><select name='stylesheet'>\n$stylesheets\n</select></td></tr>");
print("<tr><td align='right' class='table_col2'><b>" . T_("PREFERRED_CLIENT") .":</b> </td><td align='left' class='table_col2'><input type='text' size='20' maxlength='20' name='client' value=\"" . htmlspecialchars($CURUSER["client"]) . "\" /></td></tr>");
print("<tr><td align='right' class='table_col1'><b>" . T_("AGE") . ":</b> </td><td align='left' class='table_col1'><input type='text' size='3' maxlength='2' name='age' value=\"" . htmlspecialchars($CURUSER["age"]) . "\" /></td></tr>");
print("<tr><td align='right' class='table_col2'><b>" . T_("GENDER") . ":</b> </td><td align='left' class='table_col2'><select size='1' name='gender'>\n$gender\n</select></td></tr>");
print("<tr><td align='right' class='table_col1'><b>" . T_("COUNTRY") . ":</b> </td><td align='left' class='table_col1'><select name='country'>\n$countries\n</select></td></tr>");
if ($CURUSER["class"] > 1)
print("<tr><td align='right' class='table_col2'><b>".T_("TEAM").":</b> </td><td align='left' class='table_col2'><select name='teams'>\n$teams\n</select></td></tr>");
/// START UPLOAD AVATAR ///
if ($site_config['AVATARUPLOAD']){
$avatar = htmlspecialchars($CURUSER["avatar"]);
if (!$avatar)
$avatar = "".$site_config["SITEURL"]."/images/default_avatar.png";
print("<tr><td align='right' class='table_col1'><b>" . T_("AVATAR") . ":</b></td><td align='left' class='table_col1'><table><tr><td><img src=$avatar height='40' width='40'></td><td ><input type='text' name='avatar' size='50' value=\"" . htmlspecialchars($CURUSER["avatar"]) . "\"><br /><i>" . T_("AVATAR_LINK") . "</i> or <a href=upavatar.php?action=upload><b>" . T_("UP_AVATAR") . "</b></a></td></tr></table></td></tr>");
}
else {
print("<tr><td align='right' class='table_col1'><b>" . T_("AVATAR_UPLOAD") . ":</b> </td><td align='left' class='table_col1'><input type='text' name='avatar' size='50' value=\"" . htmlspecialchars($CURUSER["avatar"]) .
"\" /><br />\n<i>".T_("AVATAR_LINK")."</i><br /></td></tr>");
}
///END UPLOAD AVATAR ///
print("<tr><td align='right' class='table_col2'><b>" . T_("CUSTOM_TITLE") . ":</b> </td><td align='left' class='table_col2'><input type='text' name='title' size='50' value=\"" . strip_tags($CURUSER["title"]) .
"\" /><br />\n <i>" . T_("HTML_NOT_ALLOWED") . "</i></td></tr>");
print("<tr><td align='right' class='table_col1' valign='top'><b>" . T_("SIGNATURE") . ":</b> </td><td align='left' class='table_col1'><textarea name='signature' cols='50' rows='10'>" . htmlspecialchars($CURUSER["signature"]) .
"</textarea><br />\n <i>".sprintf(T_("MAX_CHARS"), 150).", " . T_("HTML_NOT_ALLOWED") . "</i></td></tr>");
print("<tr><td align='right' class='table_col2'><b>".T_("RESET_PASSKEY").":</b> </td><td align='left' class='table_col2'><input type='checkbox' name='resetpasskey' value='1' /> <i>".T_("RESET_PASSKEY_MSG").".</i></td></tr>");
print("<tr><td align='right' class='table_col1'><b>Hide Shoutbox:</b></td><td align='left' class='table_col1'><input type='checkbox' name='hideshoutbox' value='yes' ".($CURUSER['hideshoutbox'] == 'yes' ? 'checked="checked"' : '')." /> <i>I would like to hide the shoutbox.</i></td></tr> ");
print("<tr><td align='right' class='table_col2'><b>" . T_("EMAIL") . ":</b> </td><td align='left' class='table_col2'><input type=\"text\" name=\"email\" size=\"50\" value=\"" . htmlspecialchars($CURUSER["email"]) .
"\" /><br />\n<i>".T_("REPLY_TO_CONFIRM_EMAIL")."</i><br /></td></tr>");
ksort($tzs);
reset($tzs);
while (list($key, $val) = thisEach($tzs)) {
if ($CURUSER["tzoffset"] == $key)
$tz .= "<option value=\"$key\" selected='selected'>$val[0]</option>\n";
else
$tz .= "<option value=\"$key\">$val[0]</option>\n";
}
print("<tr><td align='right' class='table_col1'><b>".T_("TIMEZONE").":</b> </td><td align='left' class='table_col1'><select name='tzoffset'>$tz</select></td></tr>");
?>
<tr><td colspan="2" align="center"><input type="submit" value="<?php echo T_("SUBMIT");?>" /> <input type="reset" value="<?php echo T_("REVERT");?>" /></td></tr>
</table></form>
<?php
end_frame();
}
if ($do == "save_settings"){
begin_frame(T_("EDIT_SETTINGS"));
navmenu();
$set = array();
$updateset = array();
$changedemail = $newsecret = 0;
$email = $_POST["email"];
if ($email != $CURUSER["email"]) {
if (!validemail($email))
$message = T_("NOT_VALID_EMAIL");
$changedemail = 1;
}
$acceptpms = $_POST["acceptpms"];
$pmnotif = $_POST["pmnotif"];
$privacy = $_POST["privacy"];
$notifs = ($pmnotif == 'yes' ? "[pm]" : "");
$r = SQL_Query_exec("SELECT id FROM categories");
$rows = mysqli_num_rows($r);
for ($i = 0; $i < $rows; ++$i) {
$a = mysqli_fetch_assoc($r);
if ($_POST["cat$a[id]"] == 'yes')
$notifs .= "[cat$a[id]]";
}
if ($_POST['resetpasskey']) $updateset[] = "passkey=''";
$avatar = strip_tags( $_POST["avatar"] );
if ( $avatar != null )
{
# Allowed Image Extenstions.
$allowed_types = &$site_config["allowed_image_types"];
# We force http://
if ( !preg_match( "#^\w+://#i", $avatar ) ) $avatar = "http://" . $avatar;
# Clean Avatar Path.
$avatar = cleanstr( $avatar );
# Validate Image.
$im = @getimagesize( $avatar );
if ( !$im[ 2 ] || !@array_key_exists( $im['mime'], $allowed_types ) )
$message = "The avatar url was determined to be of a invalid nature.";
# Save New Avatar.
$updateset[] = "avatar = " . sqlesc($avatar);
}else
$updateset[] = "avatar = " . sqlesc($avatar);
$title = strip_tags($_POST["title"]);
$signature = $_POST["signature"];
$stylesheet = $_POST["stylesheet"];
$language = $_POST["language"];
$client = strip_tags($_POST["client"]);
$age = $_POST["age"];
$gender= $_POST["gender"];
$country = $_POST["country"];
$teams = $_POST["teams"];
$privacy = $_POST["privacy"];
$timezone = (int)$_POST['tzoffset'];
if (is_valid_id($stylesheet))
$updateset[] = "stylesheet = '$stylesheet'";
if (is_valid_id($language))
$updateset[] = "language = '$language'";
if (is_valid_id($teams))
$updateset[] = "team = '$teams'";
if (is_valid_id($country))
$updateset[] = "country = $country";
if ($acceptpms == "yes")
$acceptpms = 'yes';
else
$acceptpms = 'no';
if (is_valid_id($age))
$updateset[] = "age = '$age'";
$hideshoutbox = ($_POST["hideshoutbox"] == "yes") ? "yes" : "no";
$updateset[] = "hideshoutbox = ".sqlesc($hideshoutbox);
$updateset[] = "acceptpms = ".sqlesc($acceptpms);
$updateset[] = "commentpm = " . sqlesc($pmnotif == "yes" ? "yes" : "no");
$updateset[] = "notifs = ".sqlesc($notifs);
$updateset[] = "privacy = ".sqlesc($privacy);
$updateset[] = "gender = ".sqlesc($gender);
$updateset[] = "client = ".sqlesc($client);
$updateset[] = "signature = ".sqlesc($signature);
$updateset[] = "title = ".sqlesc($title);
$updateset[] = "tzoffset = $timezone";
/* ****** */
if (!$message) {
if ($changedemail) {
$sec = mksecret();
$hash = md5($sec . $email . $sec);
$obemail = rawurlencode($email);
$updateset[] = "editsecret = " . sqlesc($sec);
$thishost = $_SERVER["HTTP_HOST"];
$thisdomain = preg_replace('/^www\./is', "", $thishost);
$body = <<<EOD
You have requested that your user profile (username {$CURUSER["username"]})
on {$site_config["SITEURL"]} should be updated with this email address ($email) as
user contact.
If you did not do this, please ignore this email. The person who entered your
email address had the IP address {$_SERVER["REMOTE_ADDR"]}. Please do not reply.
To complete the update of your user profile, please follow this link:
{$site_config["SITEURL"]}/account-ce.php?id={$CURUSER["id"]}&secret=$hash&email=$obemail
Your new email address will appear in your profile after you do this. Otherwise
your profile will remain unchanged.
EOD;
sendmail($email, "$site_config[SITENAME] profile update confirmation", $body, "From: $site_config[SITEEMAIL]", "-f$site_config[SITEEMAIL]");
$mailsent = 1;
} //changedemail
SQL_Query_exec("UPDATE users SET " . implode(",", $updateset) . " WHERE id = " . $CURUSER["id"]."");
$edited=1;
// echo "<br /><br /><center><b><font color='#ff0000'>Updated OK</font></b></center><br /><br />";
autolink("account.php", "<b><center><font color='#ff0000'>Updated OK</font></center></b>");
if ($changedemail) {
echo "<br /><center><b>".T_("EMAIL_CHANGE_SEND")."</b></center><br /><br />";
}
}else{
echo "<br /><br /><center><b><font color='#ff0000'>".T_("ERROR").": ".$message."</font></b></center><br /><br />";
}// message
end_frame();
}// end do
}//end action
www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
Last edited by Botanicar on 2022-11-01 15:56:10