Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions admin/boxprocess.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
$password2 = mysql_real_escape_string($_POST['password2']);
$sshport = mysql_real_escape_string($_POST['sshport']);
$notes = mysql_real_escape_string($_POST['notes']);
$iface = mysql_real_escape_string($_POST['iface']);
if (!isset($iface) || empty($iface))
$iface="eth0";
if (isset($_POST['verify'])) {
$verify = 'on';
} else {
Expand Down Expand Up @@ -173,7 +176,8 @@
//Addin box ip
query_basic( "INSERT INTO `".DBPREFIX."boxIp` SET
`boxid` = '".$boxid."',
`ip` = '".$ip."'" );
`ip` = '".$ip."',
`iface` = '".$iface."'" );
//Adding cache
$boxCache = array(
$boxid => array(
Expand Down Expand Up @@ -363,7 +367,7 @@

//Adding event to the database
$message = "Box Edited: ".$name;
query_basic( "INSERT INTO `".DBPREFIX."log` SET `boxid` = '".$boxid."', `message` = '".$message."', `name` = '".mysql_real_escape_string($_SESSION['adminfirstname'])." ".mysql_real_escape_string($_SESSION['adminlastname'])."', `ip` = '".$_SERVER['REMOTE_ADDR']."'" );
query_basic( "UPDATE `".DBPREFIX."boxIp` SET `ip` = '".$ip."', `iface` = '".$iface."' WHERE `boxid` = '".$boxid."' && `ip` = '".$oldIp['ip']."'" );
###
$_SESSION['msg1'] = T_('Box Updated Successfully!');
$_SESSION['msg2'] = T_('Your changes to the box have been saved.');
Expand Down Expand Up @@ -796,4 +800,4 @@
}

exit('<h1><b>403 Forbidden</b></h1>'); //If the task is incorrect or unspecified, we drop the user.
?>
?>