|
...
|
...
|
@@ -48,7 +48,7 @@ if(!empty($_GET['edit'])) {
|
|
48
|
48
|
$oldinfo = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_panels WHERE panel_id = '".$_GET['edit']."'");
|
|
49
|
49
|
$panelinfo = dbassoc($oldinfo);
|
|
50
|
50
|
$nextorder = 0;
|
|
51
|
|
- if($panelinfo['panel_hidden'] || $_GET['edit'] == "new") {
|
|
|
51
|
+ if(($panelinfo['panel_hidden'] ?? null) || $_GET['edit'] == "new") {
|
|
52
|
52
|
$order = dbquery("SELECT COUNT(panel_id) FROM ".TABLEPREFIX."fanfiction_panels WHERE panel_type = '$panel_type' AND panel_hidden = 0".($panel_type == "A" ? " AND panel_level = '$panel_level'" : ""));
|
|
53
|
53
|
list($nextorder) = dbrow($order);
|
|
54
|
54
|
$nextorder++;
|
|
...
|
...
|
@@ -72,7 +72,7 @@ if(!empty($_GET['edit'])) {
|
|
72
|
72
|
<label for='panel_title'>"._TITLE.":</label> <input type='text' class='textbox' name='panel_title' id='panel_title' value='".(isset($panelinfo['panel_title']) ? $panelinfo['panel_title'] : null)."'><br />
|
|
73
|
73
|
<label for='panel_url'>"._PANELURL.":</label> <input type='text' class='textbox' name='panel_url' id='panel_url' value='".(isset($panelinfo['panel_url']) ? $panelinfo['panel_url'] : null)."'><br />
|
|
74
|
74
|
<label for='panel_level'>"._LEVEL.":</label> <select name='panel_level' id='panel_level'>";
|
|
75
|
|
- for($x = 0; $x < 5; $x++) { $output .= "<option".(($panelinfo['panel_level'] ?? null) == $x ? " selected" : "").">$x</option>"; }
|
|
|
75
|
+ for($x = 0; $x < 5; $x++) { $output .= "<option".((isset($panelinfo['panel_level']) ? $panelinfo['panel_level'] : null) == $x ? " selected" : "").">$x</option>"; }
|
|
76
|
76
|
$output .= "</select><br />
|
|
77
|
77
|
<label for='panel_hidden'>"._HIDDEN.":</label> <input type='checkbox' class='checkbox' name='panel_hidden' id='panel_hidden' ".(($panelinfo['panel_hidden'] ?? null) ? " checked" : "")."><br />
|
|
78
|
78
|
<label for='panel_type'>"._TYPE.":</label> <input type='text' class='textbox' name='panel_type' id='panel_type' value='".(isset($panelinfo['panel_type']) ? $panelinfo['panel_type'] : null)."' size='2'><br />
|
|
...
|
...
|
@@ -100,7 +100,7 @@ else {
|
|
100
|
100
|
$output .= "<option value=\"admin.php?action=panels\">"._ALL."</option>";
|
|
101
|
101
|
$paneltypelist = dbquery("SELECT DISTINCT panel_type FROM ".TABLEPREFIX."fanfiction_panels ORDER BY panel_type");
|
|
102
|
102
|
while($t = dbrow($paneltypelist)) {
|
|
103
|
|
- $output .= "<option value='admin.php?action=panels&type=$t[0]'".($type == $t[0] ? " selected" : "").">$t[0] - ".$paneltypes[$t[0]]."</option>";
|
|
|
103
|
+ $output .= "<option value='admin.php?action=panels&type=$t[0]'".($type == $t[0] ? " selected" : "").">$t[0] - ".isset($paneltypes[$t[0]])."</option>";
|
|
104
|
104
|
}
|
|
105
|
105
|
$output .= "</select>";
|
|
106
|
106
|
if($type == "A") {
|
|
...
|
...
|
@@ -120,7 +120,7 @@ else {
|
|
120
|
120
|
if(!$panel['panel_hidden']) $count++;
|
|
121
|
121
|
else $num--;
|
|
122
|
122
|
$output .= "<tr><td class='tblborder'>".$panel['panel_title']."</td><td class='tblborder'>";
|
|
123
|
|
- if(!$type) $output .= $panel['panel_type']." - ".$paneltypes[$panel['panel_type']];
|
|
|
123
|
+ if(!$type) $output .= ($panel['panel_type'] ?? null)." - ".($paneltypes[$panel['panel_type']] ?? null);
|
|
124
|
124
|
else if($type == "A" && empty($_GET['level'])) $output .= $panel['panel_hidden'] ? _HIDDEN : _LEVEL." ".$panel['panel_level'];
|
|
125
|
125
|
else {
|
|
126
|
126
|
if($panel['panel_hidden']) $output .= _HIDDEN;
|