Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Help
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / General / General Chat

2022-10-27 08:13:52
strange in account.php
find
if ($do == "save_settings"){


about 7 lines up you should have
	<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>


to make sure i have right place you can try
	</table><input type="submit" value="Submit" /></form>
2022-10-27 09:34:52
that line is in the code yes, but not showing on site hmmmm weird eh
2022-11-01 03:08:55
Assign a z-index value to the input and send it to front. Also, apply position: relative to the forms container.

If the containing markup does not have a display: none property, then there is no reason the button shouldn’t show up. I see no element class or id so we can rule out CSS overriding the style properties.

2022-11-01 12:17:56
@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' />&nbsp;" .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>&nbsp;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' />&nbsp;<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"' : '')." />&nbsp;<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
account.php
Download



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
2022-11-01 16:18:23


seems you got a few more mods on your account.php than me lol
Last edited by Lucifer on 2022-11-01 16:35:56
2022-11-01 16:42:30
also when downloading a torrent i am getting

Tracker: [Could not parse bencoded data: Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, null given in /var/www/vhos]


using rutorrent 3.10
2022-11-01 19:32:48
you page is down, blank page for me


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
2022-11-01 19:36:41
yes and we can't figure out why

but this error keeps coming back

[Tue Nov 01 19:33:17.139222 2022] [proxy_fcgi:error] [pid 7008:tid 139911806035712] [client ip:0] AH01071: Got error 'PHP message: PHP Warning:  mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, null given in /var/www/vhosts/3evils.biz/httpdocs/announce.php on line 252'


the line on that is;
$res = SQL_Query_exec("SELECT $peerfields FROM peers WHERE $selfwhere");
$row = mysqli_fetch_assoc($res);
if ($row){
       $self = $row;
}
}
2022-11-01 21:18:26
I don't think announce.php is causing this problem

check what you have done recently with index.php or similar


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
2022-11-01 21:34:17
site is fixed now, was an issue with cleanup file

however would love to find the issue behind the announce.php problems and get them fixed, especially this one:

Tracker: [Could not parse bencoded data: Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, null given in /var/www/vhos]
2022-11-03 15:54:16

<?
$self = null;
if (!$res) return;
$res = SQL_Query_exec("SELECT $peerfields FROM peers WHERE $selfwhere");
$row = mysqli_fetch_assoc($res);
if (!empty($row)) {
   $self = $row;
}


But it all needs a lot of validation across the full code lol
2022-11-07 18:00:56
STILL NO SUBMIT BUTTON ON EDIT ACCOUNT PAGE, EVEN USING YOUR ONE THERE - ANY SUGGESTIONS OR HELP WOULD BE GRATEFUL

p.s sorry just noticed my caps lock was on
2022-11-07 20:14:25
can you take a screenshot of the page you are referring to?
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2022-11-07 20:28:04
@MicroMonkey

There is something else wrong with his website, I suspect it is account.php that has misconfiguration




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
2022-11-07 21:30:30
I used your account.php you posted to me to try, it never worked - all i was missing before was submit button - however if there is a fix for the current issue and i get submit button back then i will be happy lol
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728