mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-05 07:20:58 +08:00
userdetails + mybonus compatible with php8
This commit is contained in:
@@ -113,7 +113,7 @@ class Install
|
||||
|
||||
public function listRequirementTableRows()
|
||||
{
|
||||
$gdInfo = method_exists('gd_info') ? gd_info() : [];
|
||||
$gdInfo = function_exists('gd_info') ? gd_info() : [];
|
||||
$tableRows = [
|
||||
[
|
||||
'label' => 'PHP version',
|
||||
|
||||
@@ -246,9 +246,9 @@ print("</ul>");
|
||||
$torrentres = sql_query("select torrents.id, torrents.added, torrents.size, torrents.seeders from torrents LEFT JOIN peers ON peers.torrent = torrents.id WHERE peers.userid = $CURUSER[id] AND peers.seeder ='yes' GROUP BY torrents.id") or sqlerr(__FILE__, __LINE__);
|
||||
while ($torrent = mysql_fetch_array($torrentres))
|
||||
{
|
||||
$weeks_alive = ($timenow - strtotime($torrent[added])) / $sectoweek;
|
||||
$gb_size = $torrent[size] / 1073741824;
|
||||
$temp = (1 - exp($valueone * $weeks_alive)) * $gb_size * (1 + $sqrtof2 * exp($valuethree * ($torrent[seeders] - 1)));
|
||||
$weeks_alive = ($timenow - strtotime($torrent['added'])) / $sectoweek;
|
||||
$gb_size = $torrent['size'] / 1073741824;
|
||||
$temp = (1 - exp($valueone * $weeks_alive)) * $gb_size * (1 + $sqrtof2 * exp($valuethree * ($torrent['seeders'] - 1)));
|
||||
$A += $temp;
|
||||
$count++;
|
||||
}
|
||||
|
||||
@@ -210,8 +210,8 @@ tr($lang_usercp['row_school'], "<select name=school>$schools</select>", 1);
|
||||
$showtooltipsetting = false;
|
||||
if ($type == 'save') {
|
||||
$updateset = array();
|
||||
$pmnotif = $_POST["pmnotif"];
|
||||
$emailnotif = $_POST["emailnotif"];
|
||||
$pmnotif = $_POST["pmnotif"] ?? '';
|
||||
$emailnotif = $_POST["emailnotif"] ?? '';
|
||||
$notifs = ($pmnotif == 'yes' ? "[pm]" : "");
|
||||
$notifs .= ($emailnotif == 'yes' ? "[email]" : "");
|
||||
|
||||
@@ -223,7 +223,7 @@ tr($lang_usercp['row_school'], "<select name=school>$schools</select>", 1);
|
||||
for ($i = 0; $i < $rows; ++$i)
|
||||
{
|
||||
$a = mysql_fetch_assoc($r);
|
||||
if ($_POST[$cbname.$a['id']] == 'yes')
|
||||
if (isset($_POST[$cbname.$a['id']]) && $_POST[$cbname.$a['id']] == 'yes')
|
||||
$return .= "[".$cbname.$a['id']."]";
|
||||
}
|
||||
return $return;
|
||||
@@ -328,7 +328,7 @@ tr($lang_usercp['row_school'], "<select name=school>$schools</select>", 1);
|
||||
$sbrefresh = ($_POST["sbrefresh"] ? max(10, min(3600, intval($_POST["sbrefresh"] ?? 0))) : 120);
|
||||
$updateset[] = "sbrefresh = " . $sbrefresh;
|
||||
|
||||
if ($_POST["hidehb"] == 'yes')
|
||||
if (isset($_POST["hidehb"]) && $_POST["hidehb"] == 'yes')
|
||||
$hidehb = 'yes';
|
||||
else $hidehb = 'no';
|
||||
$updateset[] = "hidehb = " . sqlesc($hidehb);
|
||||
@@ -341,7 +341,7 @@ tr($lang_usercp['row_school'], "<select name=school>$schools</select>", 1);
|
||||
else $showdescription = 'no';
|
||||
$updateset[] = "showdescription = " . sqlesc($showdescription);
|
||||
if ($enablenfo_main == 'yes'){
|
||||
if ($_POST["shownfo"] == 'yes')
|
||||
if (isset($_POST["shownfo"]) && $_POST["shownfo"] == 'yes')
|
||||
$shownfo = 'yes';
|
||||
else $shownfo = 'no';
|
||||
$updateset[] = "shownfo = " . sqlesc($shownfo);
|
||||
@@ -559,10 +559,13 @@ if ($showaudiocodec) $audiocodecs = searchbox_item_list("audiocodecs");
|
||||
$categoryicons .= "<option value=".$caticon['id'].$sl.">".$caticon['name']."</option>\n";
|
||||
}
|
||||
tr_small($lang_usercp['row_stylesheet'], "<select name=stylesheet>\n$stylesheets\n</select> <font class=small>".$lang_usercp['text_stylesheet_note']."<a href=\"aboutnexus.php#stylesheet\" ><b>".$lang_usercp['text_stylesheet_link']."</b></a></font>.",1);
|
||||
tr_small($lang_usercp['row_category_icons'], "<select name=caticon>".$categoryicons."</select>",1);
|
||||
/**
|
||||
* make no sense, should no exists!
|
||||
* @since v1.6.0
|
||||
*/
|
||||
// tr_small($lang_usercp['row_category_icons'], "<select name=caticon>".$categoryicons."</select>",1);
|
||||
tr_small($lang_usercp['row_font_size'], "<select name=fontsize><option value=small ".($CURUSER['fontsize'] == 'small' ? " selected" : "").">".$lang_usercp['select_small']."</option><option value=medium ".($CURUSER['fontsize'] == 'medium' ? " selected" : "").">".$lang_usercp['select_medium']."</option><option value=large ".($CURUSER['fontsize'] == 'large' ? " selected" : "").">".$lang_usercp['select_large']."</option></select>",1);
|
||||
|
||||
|
||||
$s = "<select name=\"sitelanguage\">\n";
|
||||
|
||||
$langs = langlist("site_lang");
|
||||
|
||||
Reference in New Issue
Block a user