Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/sosprz/nettemp
Browse files Browse the repository at this point in the history
qwe
  • Loading branch information
root committed Dec 8, 2013
2 parents a79f11d + 3242d91 commit 36ad2db
Showing 1 changed file with 5 additions and 46 deletions.
51 changes: 5 additions & 46 deletions modules/mail/html/mail_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,12 @@
$password = $_POST["password"]; //sql
?>

<?php // SQLite
if ($_POST['change_user1'] == "change_user2") {
$db = new PDO('sqlite:dbf/nettemp.db');
$db->exec("UPDATE mail_settings SET user='$user'") or die ($db->lastErrorMsg());
header("location: " . $_SERVER['REQUEST_URI']);
exit();
}
?>
<?php // SQLite
if ($_POST['change_host1'] == "change_host2") {
$db = new PDO('sqlite:dbf/nettemp.db');
$db->exec("UPDATE mail_settings SET host='$host'") or die ($db->lastErrorMsg());
header("location: " . $_SERVER['REQUEST_URI']);
exit();
}
?>
<?php // SQLite
if ($_POST['change_port1'] == "change_port2") {
$db = new PDO('sqlite:dbf/nettemp.db');
$db->exec("UPDATE mail_settings SET port='$port'") or die ($db->lastErrorMsg());
header("location: " . $_SERVER['REQUEST_URI']);
exit();
}
?>
<?php // SQLite
if ($_POST['change_password1'] == "change_password2") {
$db = new PDO('sqlite:dbf/nettemp.db');
$db->exec("UPDATE mail_settings SET port='$port'") or die ($db->lastErrorMsg());
$db->exec("UPDATE mail_settings SET host='$host'") or die ($db->lastErrorMsg());
$db->exec("UPDATE mail_settings SET user='$user'") or die ($db->lastErrorMsg());
$db->exec("UPDATE mail_settings SET password='$password'") or die ($db->lastErrorMsg());
header("location: " . $_SERVER['REQUEST_URI']);
exit();
Expand All @@ -49,40 +28,19 @@
?>

<table>
<!--<tr>
<form action="mail" method="post">
<td>Mail address</td>
<td><input type="text" name="address" size="25" value="<?php echo $a["address"]; ?>" /></td>
<input type="hidden" name="change_address1" value="change_address2" />
<td><input type="image" src="media/ico/Actions-edit-redo-icon.png" /></td>
</form>
</tr> -->
<tr>
<form action="mail" method="post">
<tr> <form action="mail" method="post">
<td>Username</td>
<td><input type="text" name="user" size="25" value="<?php echo $a["user"]; ?>" /></td>
<input type="hidden" name="change_user1" value="change_user2" />
<td><input type="image" src="media/ico/Actions-edit-redo-icon.png" /></td>
</form>
</tr>
<tr>
<form action="mail" method="post">
<td>Server smtp</td>
<td><input type="text" name="host" size="25" value="<?php echo $a["host"]; ?>" /></td>
<input type="hidden" name="change_host1" value="change_host2" />
<td><input type="image" src="media/ico/Actions-edit-redo-icon.png" /></td>
</form>
</tr>
<tr>
<form action="mail" method="post">
<td>Port</td>
<td><input type="text" name="port" size="25" value="<?php echo $a["port"]; ?>" /></td>
<input type="hidden" name="change_port1" value="change_port2" />
<td><input type="image" src="media/ico/Actions-edit-redo-icon.png" /></td>
</form>
</tr>
<tr>
<form action="mail" method="post">
<td>Password</td>
<td><input type="password" name="password" size="25" value="<?php echo $a["password"]; ?>" /></td>
<input type="hidden" name="change_password1" value="change_password2" />
Expand All @@ -91,5 +49,6 @@
</tr>



</table>
<?php } ?>

0 comments on commit 36ad2db

Please sign in to comment.