Fixes PHP errors, changes footer
This commit is contained in:
parent
f584604df6
commit
be1218246d
7 changed files with 24 additions and 24 deletions
|
@ -55,7 +55,7 @@
|
|||
$id = $db->escape_string($_GET['id']);
|
||||
}
|
||||
|
||||
if($mode === edit){
|
||||
if($mode === "edit"){
|
||||
//Load user data from DB
|
||||
$sql = "SELECT `".DBC_ALIASES_SOURCE."`, `".DBC_ALIASES_DESTINATION."` from `".DBT_ALIASES."` WHERE `".DBC_ALIASES_ID."` = $id LIMIT 1;";
|
||||
|
||||
|
@ -88,18 +88,18 @@ Here you can edit a redirect.
|
|||
|
||||
<tr>
|
||||
<td>
|
||||
<textarea name="source" class="textinput" placeholder="Source"><?php echo $source; ?></textarea>
|
||||
<textarea name="source" class="textinput" placeholder="Source"><?php if(isset($source)){echo $source;}?></textarea>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<textarea name="destination" class="textinput" placeholder="Destination"><?php echo $destination; ?></textarea>
|
||||
<textarea name="destination" class="textinput" placeholder="Destination"><?php if(isset($destination)){echo $destination;} ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<input name="savemode" type="hidden" value="<?php echo $mode; ?>"/>
|
||||
<input name="id" type="hidden" value="<?php echo $id; ?>"/>
|
||||
<input name="savemode" type="hidden" value="<?php if(isset($mode)){echo $mode;} ?>"/>
|
||||
<input name="id" type="hidden" value="<?php if(isset($id)){echo $id;} ?>"/>
|
||||
|
||||
<p>
|
||||
<input type="submit" class="button button-small" value="Save settings">
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
$id = $db->escape_string($_GET['id']);
|
||||
}
|
||||
|
||||
if($mode === edit){
|
||||
if($mode === "edit"){
|
||||
//Load user data from DB
|
||||
$sql = "SELECT * from `".DBT_USERS."` WHERE `".DBC_USERS_ID."` = '$id' LIMIT 1;";
|
||||
|
||||
|
@ -124,7 +124,7 @@
|
|||
|
||||
<tr>
|
||||
<td>
|
||||
<input name="username" class="textinput" type="text" value="<?php echo $username; ?>" placeholder="Username"/>
|
||||
<input name="username" class="textinput" type="text" value="<?php if(isset($username)){echo $username;} ?>" placeholder="Username"/>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
|
@ -140,7 +140,7 @@
|
|||
|
||||
while($row = $result->fetch_assoc()){
|
||||
$selected = "";
|
||||
if($row[DBC_DOMAINS_DOMAIN] === $domain){$selected = "selected=\"selected\"";}
|
||||
if(isset($domain) && $row[DBC_DOMAINS_DOMAIN] === $domain){$selected = "selected=\"selected\"";}
|
||||
echo "<option value=\"".$row[DBC_DOMAINS_DOMAIN]."\" ".$selected." >".$row[DBC_DOMAINS_DOMAIN]."</option>";
|
||||
}
|
||||
?>
|
||||
|
@ -153,14 +153,14 @@
|
|||
</td>
|
||||
|
||||
<td>
|
||||
<input name="mailbox_limit" class="textinput" type="number" value="<?php echo $mailbox_limit; ?>" placeholder="Mailbox size (MB)"/>
|
||||
<input name="mailbox_limit" class="textinput" type="number" value="<?php if(isset($mailbox_limit)){echo $mailbox_limit;} ?>" placeholder="Mailbox size (MB)"/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<input name="savemode" type="hidden" value="<?php echo $mode; ?>"/>
|
||||
<input name="id" class="sendbutton" type="hidden" value="<?php echo $id; ?>"/>
|
||||
<input name="savemode" type="hidden" value="<?php if(isset($mode)){echo $mode;} ?>"/>
|
||||
<input name="id" class="sendbutton" type="hidden" value="<?php if(isset($id)){echo $id;} ?>"/>
|
||||
|
||||
<p>
|
||||
<input type="submit" class="button button-small" value="Save settings">
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
if($_GET['deleted'] == "1"){
|
||||
if(isset($_GET['deleted']) && $_GET['deleted'] == "1"){
|
||||
add_message("success", "Domain deleted successfully.");
|
||||
}
|
||||
else if($_GET['created'] == "1"){
|
||||
else if(isset($_GET['created']) && $_GET['created'] == "1"){
|
||||
add_message("success", "Domain created successfully.");
|
||||
}
|
||||
else if($_GET['adm_del'] == "1"){
|
||||
else if(isset($_GET['adm_del']) && $_GET['adm_del'] == "1"){
|
||||
add_message("fail", "Domain could not be deleted because admin account would be affected.");
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
|
||||
if($_GET['deleted'] == "1"){
|
||||
if(isset($_GET['deleted']) && $_GET['deleted'] == "1"){
|
||||
add_message("success", "Redirect deleted successfully.");
|
||||
}
|
||||
else if($_GET['created'] == "1"){
|
||||
else if(isset($_GET['created']) && $_GET['created'] == "1"){
|
||||
add_message("success", "Redirect created successfully.");
|
||||
}
|
||||
else if($_GET['edited'] == "1"){
|
||||
else if(isset($_GET['edited']) && $_GET['edited'] == "1"){
|
||||
add_message("success", "Redirect edited successfully.");
|
||||
}
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<?php
|
||||
|
||||
if($_GET['deleted'] == "1"){
|
||||
if(isset($_GET['deleted']) && $_GET['deleted'] == "1"){
|
||||
add_message("success", "User deleted successfully.");
|
||||
}
|
||||
else if($_GET['created'] == "1"){
|
||||
else if(isset($_GET['created']) && $_GET['created'] == "1"){
|
||||
add_message("success", "User created successfully.");
|
||||
}
|
||||
else if($_GET['edited'] == "1"){
|
||||
else if(isset($_GET['edited']) && $_GET['edited'] == "1"){
|
||||
add_message("success", "User edited successfully.");
|
||||
}
|
||||
else if($_GET['adm_del'] == "1"){
|
||||
else if(isset($_GET['adm_del']) && $_GET['adm_del'] == "1"){
|
||||
add_message("fail", "Admin user cannot be deleted.");
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
</div> <!-- Closing content -->
|
||||
|
||||
<div id="footer">
|
||||
Copyright (C) 2014 Thomas Leister <br/> WebMUM on GitHub: <a href="https://github.com/ThomasLeister/webmum/">https://github.com/ThomasLeister/webmum/</a>
|
||||
Software by Thomas Leister, 2014<br/> WebMUM on GitHub: <a href="https://github.com/ThomasLeister/webmum/">https://github.com/ThomasLeister/webmum/</a> | License: GNU-GPL 3.0
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/*
|
||||
* #################### This is WebMUM Version 0.1.1 ######################
|
||||
* #################### This is WebMUM Version 0.1.2 ######################
|
||||
*
|
||||
* Project on GitHub: https://github.com/ThomasLeister/webmum
|
||||
* Author's Blog: https://thomas-leister.de
|
||||
|
@ -22,7 +22,7 @@
|
|||
*/
|
||||
|
||||
|
||||
define("BACKEND_BASE_PATH", preg_replace("index.php", "", $_SERVER['SCRIPT_FILENAME']));
|
||||
define("BACKEND_BASE_PATH", preg_replace("#index.php#", "", $_SERVER['SCRIPT_FILENAME']));
|
||||
require_once 'include/php/default.inc.php';
|
||||
|
||||
require_once 'include/php/template/header.php';
|
||||
|
|
Loading…
Add table
Reference in a new issue