mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 12:07:23 +08:00
fix imdb in new structure
This commit is contained in:
+9
-4
@@ -300,13 +300,18 @@ if ($CURUSER && $showpolls_main == "yes")
|
||||
$os = array();
|
||||
|
||||
// Count votes
|
||||
while (($arr2 = mysql_fetch_row($res) !== null) && isset($arr2[0]) && isset($vs[$arr2[0]]))
|
||||
$vs[$arr2[0]] ++;
|
||||
while ($arr2 = mysql_fetch_row($res)) {
|
||||
if (!isset($vs[$arr2[0]])) {
|
||||
$vs[$arr2[0]] = 0;
|
||||
}
|
||||
$vs[$arr2[0]] ++;
|
||||
}
|
||||
|
||||
|
||||
reset($o);
|
||||
for ($i = 0; $i < count($o); ++$i){
|
||||
if (isset($vs[$i]) && isset($o[$i]) && $o[$i])
|
||||
$os[$i] = array($vs[$i], $o[$i], $i);
|
||||
if ($o[$i])
|
||||
$os[$i] = array($vs[$i] ?? 0, $o[$i], $i);//field 1: options vote count, field 2: option name, field 3: option index
|
||||
}
|
||||
|
||||
function srt($a,$b)
|
||||
|
||||
+15
-8
@@ -222,8 +222,8 @@ else {
|
||||
break;
|
||||
case "funbox":
|
||||
stdhead($lang_log['head_funbox']);
|
||||
$query = mysql_real_escape_string(trim($_GET["query"]));
|
||||
$search = $_GET["search"];
|
||||
$query = mysql_real_escape_string(trim($_GET["query"] ?? ''));
|
||||
$search = $_GET["search"] ?? '';
|
||||
if($query){
|
||||
switch ($search){
|
||||
case "title": $wherea=" WHERE title LIKE '%$query%' AND status != 'banned'"; break;
|
||||
@@ -237,7 +237,7 @@ else {
|
||||
$addparam = "";
|
||||
}
|
||||
logmenu("funbox");
|
||||
$opt = array (title => $lang_log['text_title'], body => $lang_log['text_body'], both => $lang_log['text_both']);
|
||||
$opt = array ('title' => $lang_log['text_title'], 'body' => $lang_log['text_body'], 'both' => $lang_log['text_both']);
|
||||
searchtable($lang_log['text_search_funbox'], 'funbox', $opt);
|
||||
$res = sql_query("SELECT COUNT(*) FROM fun ".$wherea);
|
||||
$row = mysql_fetch_array($res);
|
||||
@@ -324,7 +324,7 @@ else {
|
||||
|
||||
int_check($pollid,true);
|
||||
|
||||
$sure = $_GET["sure"];
|
||||
$sure = $_GET["sure"] ?? '';
|
||||
if (!$sure)
|
||||
stderr($lang_log['std_delete_poll'],$lang_log['std_delete_poll_confirmation'] .
|
||||
"<a href=?action=poll&do=delete&pollid=$pollid&returnto=$returnto&sure=1>".$lang_log['std_here_if_sure'],false);
|
||||
@@ -394,13 +394,20 @@ else {
|
||||
$os = array(); // votes and options: array(array(123, "Option 1"), array(45, "Option 2"))
|
||||
|
||||
// Count votes
|
||||
while ($pollanswer = mysql_fetch_row($pollanswers))
|
||||
$vs[$pollanswer[0]] += 1;
|
||||
while ($pollanswer = mysql_fetch_row($pollanswers)) {
|
||||
if (isset($pollanswer[0])) {
|
||||
if (!isset($vs[$pollanswer[0]])) {
|
||||
$vs[$pollanswer[0]] = 0;
|
||||
}
|
||||
$vs[$pollanswer[0]] += 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
reset($o);
|
||||
for ($i = 0; $i < count($o); ++$i)
|
||||
if (isset($o[$i]) && isset($vs[$i]))
|
||||
$os[$i] = array($vs[$i], $o[$i]);
|
||||
if ($o[$i])
|
||||
$os[$i] = array($vs[$i] ?? 0, $o[$i]);
|
||||
|
||||
print("<table width=100% class=main border=0 cellspacing=0 cellpadding=0>\n");
|
||||
$i = 0;
|
||||
|
||||
+2
-1
@@ -19,7 +19,8 @@ if ($action == "sendmail")
|
||||
{$lang_mailtest['mail_test_mail_content']}
|
||||
EOD;
|
||||
|
||||
sent_mail($email, $SITENAME, $SITEEMAIL, change_email_encode(get_langfolder_cookie(), $title), change_email_encode(get_langfolder_cookie(),$body), '', false, false, '', get_email_encode(get_langfolder_cookie()));
|
||||
// sent_mail($email, $SITENAME, $SITEEMAIL, change_email_encode(get_langfolder_cookie(), $title), change_email_encode(get_langfolder_cookie(),$body), '', false, false, '', get_email_encode(get_langfolder_cookie()));
|
||||
sent_mail($email, $SITENAME, $SITEEMAIL, $title, $body, '', false, false, '', get_email_encode(get_langfolder_cookie()));
|
||||
|
||||
stderr($lang_mailtest['std_success'], $lang_mailtest['std_success_note']);
|
||||
}
|
||||
|
||||
+12
-12
@@ -247,7 +247,7 @@ elseif ($action == 'savesettings_advertisement') // save advertisement
|
||||
}
|
||||
elseif ($action == 'tweaksettings') // tweak settings
|
||||
{
|
||||
$TWEAK = get_setting(null, 'tweak');
|
||||
$TWEAK = get_setting('tweak');
|
||||
stdhead($lang_settings['head_tweak_settings']);
|
||||
print ($notice);
|
||||
print ("<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='savesettings_tweak' />");
|
||||
@@ -272,7 +272,7 @@ elseif ($action == 'tweaksettings') // tweak settings
|
||||
}
|
||||
elseif ($action == 'smtpsettings') // stmp settings
|
||||
{
|
||||
$SMTP = get_setting(null, 'smtp');
|
||||
$SMTP = get_setting('smtp');
|
||||
stdhead($lang_settings['head_smtp_settings']);
|
||||
print ($notice);
|
||||
print("<tbody>");
|
||||
@@ -302,7 +302,7 @@ print("</tbody>");
|
||||
}
|
||||
elseif ($action == 'securitysettings') //security settings
|
||||
{
|
||||
$SECURITY = get_setting(null, 'security');
|
||||
$SECURITY = get_setting('security');
|
||||
stdhead($lang_settings['head_security_settings']);
|
||||
print ($notice);
|
||||
print ("<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='savesettings_security'>");
|
||||
@@ -320,7 +320,7 @@ elseif ($action == 'securitysettings') //security settings
|
||||
}
|
||||
elseif ($action == 'authoritysettings') //Authority settings
|
||||
{
|
||||
$AUTHORITY = get_setting(null, 'authority');
|
||||
$AUTHORITY = get_setting('authority');
|
||||
stdhead($lang_settings['head_authority_settings']);
|
||||
print ($notice);
|
||||
$maxclass = UC_SYSOP;
|
||||
@@ -379,7 +379,7 @@ elseif ($action == 'basicsettings') // basic settings
|
||||
{
|
||||
stdhead($lang_settings['head_basic_settings']);
|
||||
print ($notice);
|
||||
$config = get_setting(null, 'basic');
|
||||
$config = get_setting('basic');
|
||||
print ("<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='savesettings_basic'>");
|
||||
tr($lang_settings['row_site_name'],"<input type='text' style=\"width: 300px\" name=SITENAME value='".($config["SITENAME"] ? $config["SITENAME"]: "Nexus")."'> ".$lang_settings['text_site_name_note'], 1);
|
||||
tr($lang_settings['row_base_url'],"<input type='text' style=\"width: 300px\" name=BASEURL value='".($config["BASEURL"] ? $config["BASEURL"] : $_SERVER["HTTP_HOST"])."'> ".$lang_settings['text_it_should_be'] . $_SERVER["HTTP_HOST"] . $lang_settings['text_base_url_note'], 1);
|
||||
@@ -398,7 +398,7 @@ elseif ($action == 'basicsettings') // basic settings
|
||||
}
|
||||
elseif ($action == 'attachmentsettings') // basic settings
|
||||
{
|
||||
$ATTACHMENT = get_setting(null, 'attachment');
|
||||
$ATTACHMENT = get_setting('attachment');
|
||||
stdhead($lang_settings['head_attachment_settings']);
|
||||
print ($notice);
|
||||
print ("<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='savesettings_attachment'>");
|
||||
@@ -420,7 +420,7 @@ elseif ($action == 'attachmentsettings') // basic settings
|
||||
}
|
||||
elseif ($action == 'advertisementsettings')
|
||||
{
|
||||
$ADVERTISEMENT = get_setting(null, 'advertisement');
|
||||
$ADVERTISEMENT = get_setting('advertisement');
|
||||
stdhead($lang_settings['head_advertisement_settings']);
|
||||
print ($notice);
|
||||
print ("<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='savesettings_advertisement'>");
|
||||
@@ -434,7 +434,7 @@ elseif ($action == 'advertisementsettings')
|
||||
}
|
||||
elseif ($action == 'codesettings') // code settings
|
||||
{
|
||||
$CODE = get_setting(null, 'code');
|
||||
$CODE = get_setting('code');
|
||||
stdhead($lang_settings['head_code_settings']);
|
||||
print ($notice);
|
||||
print ("<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='savesettings_code'>");
|
||||
@@ -446,7 +446,7 @@ elseif ($action == 'codesettings') // code settings
|
||||
print ("</form>");
|
||||
}
|
||||
elseif ($action == 'bonussettings'){
|
||||
$BONUS = get_setting(null, 'bonus');
|
||||
$BONUS = get_setting('bonus');
|
||||
stdhead($lang_settings['head_bonus_settings']);
|
||||
print ($notice);
|
||||
print ("<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='savesettings_bonus'>");
|
||||
@@ -480,7 +480,7 @@ elseif ($action == 'bonussettings'){
|
||||
print ("</form>");
|
||||
}
|
||||
elseif ($action == 'accountsettings'){
|
||||
$ACCOUNT = get_setting(null, 'account');
|
||||
$ACCOUNT = get_setting('account');
|
||||
stdhead($lang_settings['head_account_settings']);
|
||||
print ($notice);
|
||||
$maxclass = UC_VIP;
|
||||
@@ -524,7 +524,7 @@ elseif ($action == 'accountsettings'){
|
||||
}
|
||||
elseif ($action == 'torrentsettings')
|
||||
{
|
||||
$TORRENT = get_setting(null, 'torrent');
|
||||
$TORRENT = get_setting('torrent');
|
||||
stdhead($lang_settings['head_torrent_settings']);
|
||||
print ($notice);
|
||||
print ("<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='savesettings_torrent'>");
|
||||
@@ -556,7 +556,7 @@ elseif ($action == 'torrentsettings')
|
||||
}
|
||||
elseif ($action == 'mainsettings') // main settings
|
||||
{
|
||||
$MAIN = get_setting(null, 'main');
|
||||
$MAIN = get_setting('main');
|
||||
stdhead($lang_settings['head_main_settings']);
|
||||
print ($notice);
|
||||
print ("<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='savesettings_main'>");
|
||||
|
||||
Reference in New Issue
Block a user