403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/reportservice - Copy/1/inventory/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/reportservice - Copy/1/inventory/edit_computer.php
<?php require_once('../Connections/IT.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
  $updateSQL = sprintf("UPDATE table_computer SET device_id=%s, date_pr=%s, username=%s, `position`=%s, department=%s, images=%s, ip=%s, cpu=%s, mainboard=%s, ram=%s, vga=%s, harddisk=%s, optical_drive=%s, monitor=%s, mouse=%s, keyboard=%s, network=%s, os=%s, license=%s WHERE id=%s",
                       GetSQLValueString($_POST['device_id'], "text"),
                       GetSQLValueString($_POST['date_pr'], "date"),
                       GetSQLValueString($_POST['username'], "text"),
                       GetSQLValueString($_POST['position'], "text"),
                       GetSQLValueString($_POST['department'], "text"),
                       GetSQLValueString($_POST['images'], "text"),
                       GetSQLValueString($_POST['ip'], "text"),
                       GetSQLValueString($_POST['cpu'], "text"),
                       GetSQLValueString($_POST['mainboard'], "text"),
                       GetSQLValueString($_POST['ram'], "text"),
                       GetSQLValueString($_POST['vga'], "text"),
                       GetSQLValueString($_POST['harddisk'], "text"),
                       GetSQLValueString($_POST['optical_drive'], "text"),
                       GetSQLValueString($_POST['monitor'], "text"),
                       GetSQLValueString($_POST['mouse'], "text"),
                       GetSQLValueString($_POST['keyboard'], "text"),
                       GetSQLValueString($_POST['network'], "text"),
                       GetSQLValueString($_POST['os'], "text"),
                       GetSQLValueString($_POST['license'], "text"),
                       GetSQLValueString($_POST['id'], "int"));

  mysql_select_db($database_IT, $IT);
  $Result1 = mysql_query($updateSQL, $IT) or die(mysql_error());

  $updateGoTo = "inventory_index.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
    $updateGoTo .= $_SERVER['QUERY_STRING'];
  }
  header(sprintf("Location: %s", $updateGoTo));
}

$colname_PC = "-1";
if (isset($_GET['id'])) {
  $colname_PC = $_GET['id'];
}
mysql_select_db($database_IT, $IT);
$query_PC = sprintf("SELECT * FROM table_computer WHERE id = %s ORDER BY id DESC", GetSQLValueString($colname_PC, "int"));
$PC = mysql_query($query_PC, $IT) or die(mysql_error());
$row_PC = mysql_fetch_assoc($PC);
$totalRows_PC = mysql_num_rows($PC);
?>
<?php require_once('../Connections/it.php'); ?>
<?php
$currentPage = $_SERVER["PHP_SELF"];

$queryString_PC = "";
if (!empty($_SERVER['QUERY_STRING'])) {
  $params = explode("&", $_SERVER['QUERY_STRING']);
  $newParams = array();
  foreach ($params as $param) {
    if (stristr($param, "pageNum_PC") == false && 
        stristr($param, "totalRows_PC") == false) {
      array_push($newParams, $param);
    }
  }
  if (count($newParams) != 0) {
    $queryString_PC = "&" . htmlentities(implode("&", $newParams));
  }
}
$queryString_PC = sprintf("&totalRows_PC=%d%s", $totalRows_PC, $queryString_PC);

$queryString_Printer = "";
if (!empty($_SERVER['QUERY_STRING'])) {
  $params = explode("&", $_SERVER['QUERY_STRING']);
  $newParams = array();
  foreach ($params as $param) {
    if (stristr($param, "pageNum_Printer") == false && 
        stristr($param, "totalRows_Printer") == false) {
      array_push($newParams, $param);
    }
  }
  if (count($newParams) != 0) {
    $queryString_Printer = "&" . htmlentities(implode("&", $newParams));
  }
}
$queryString_Printer = sprintf("&totalRows_Printer=%d%s", $totalRows_Printer, $queryString_Printer);

$queryString_Office = "";
if (!empty($_SERVER['QUERY_STRING'])) {
  $params = explode("&", $_SERVER['QUERY_STRING']);
  $newParams = array();
  foreach ($params as $param) {
    if (stristr($param, "pageNum_Office") == false && 
        stristr($param, "totalRows_Office") == false) {
      array_push($newParams, $param);
    }
  }
  if (count($newParams) != 0) {
    $queryString_Office = "&" . htmlentities(implode("&", $newParams));
  }
}
$queryString_Office = sprintf("&totalRows_Office=%d%s", $totalRows_Office, $queryString_Office);

$queryString_WiFi = "";
if (!empty($_SERVER['QUERY_STRING'])) {
  $params = explode("&", $_SERVER['QUERY_STRING']);
  $newParams = array();
  foreach ($params as $param) {
    if (stristr($param, "pageNum_WiFi") == false && 
        stristr($param, "totalRows_WiFi") == false) {
      array_push($newParams, $param);
    }
  }
  if (count($newParams) != 0) {
    $queryString_WiFi = "&" . htmlentities(implode("&", $newParams));
  }
}
$queryString_WiFi = sprintf("&totalRows_WiFi=%d%s", $totalRows_WiFi, $queryString_WiFi);
?>
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="product" content="Metro UI CSS Framework">
<meta name="keywords" content="Metro, UI, CSS, Framework, jquery">
<meta name="description" content="Simple responsive css framework">
<title>Edit:: Computer</title>

<!-- CSS -->
    <link href="assets/css/bootstrap.css" rel="stylesheet">
    <style type="text/css">

      /* Sticky footer styles
      -------------------------------------------------- */

      html,
      body {
        height: 100%;
        /* The html and body elements cannot have any padding or margin. */
      }

      /* Wrapper for page content to push down footer */
      #wrap {
        min-height: 100%;
        height: auto !important;
        height: 100%;
        /* Negative indent footer by it's height */
        margin: 0 auto -60px;
      }

      /* Set the fixed height of the footer here */
      #push,
      #footer {
        height: 60px;
      }
      #footer {
        background-color: #f5f5f5;
      }

      /* Lastly, apply responsive CSS fixes as necessary */
      @media (max-width: 767px) {
        #footer {
          margin-left: -20px;
          margin-right: -20px;
          padding-left: 20px;
          padding-right: 20px;
        }
      }



      /* Custom page CSS
      -------------------------------------------------- */
      /* Not required for template or sticky footer method. */

      #wrap > .container {
        padding-top: 60px;
      }
      .container .credit {
        margin: 20px 0;
      }

      code {
        font-size: 80%;
      }

    </style>
    <link href="assets/css/bootstrap-responsive.css" rel="stylesheet">

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="../assets/js/html5shiv.js"></script>
    <![endif]-->

    <!-- Fav and touch icons -->
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png">
    <link rel="shortcut icon" href="assets/ico/favicon.png">
</head>

<body background="images/1180422460.gif">

 <!-- Part 1: Wrap all page content here -->
    <div id="wrap">

      <!-- Fixed navbar -->
<div class="navbar navbar-fixed-top">
        <div class="navbar-inner">
          <div class="container">
            <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </button>
            <a class="brand" href="#">IT HelpDesk :: Edit Inventory</a>
            <div class="nav-collapse collapse">
              <ul class="nav">
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li>
              </ul>
                </li>
              </ul>
            </div><!--/.nav-collapse -->
          </div>
        </div>
      </div>

      <p>
    <!-- Begin page content -->
      


    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="assets/js/jquery.js"></script>
    <script src="assets/js/bootstrap-transition.js"></script>
    <script src="assets/js/bootstrap-alert.js"></script>
    <script src="assets/js/bootstrap-modal.js"></script>
    <script src="assets/js/bootstrap-dropdown.js"></script>
    <script src="assets/js/bootstrap-scrollspy.js"></script>
    <script src="assets/js/bootstrap-tab.js"></script>
    <script src="assets/js/bootstrap-tooltip.js"></script>
    <script src="assets/js/bootstrap-popover.js"></script>
    <script src="assets/js/bootstrap-button.js"></script>
    <script src="assets/js/bootstrap-collapse.js"></script>
    <script src="assets/js/bootstrap-carousel.js"></script>
    <script src="assets/js/bootstrap-typeahead.js"></script>
    </p><br>      
	<?
 
    $date = date("d-m-Y");
    $time = date("H:i");
    ?>
      <p>
      <table width="100%" border="0">
      <tr>
    <td width="300" height="109" align="left"><img src="../images/helpdesk logo.png" width="300" height="72"></td>
    <td width="678" align="center"><strong><img src="http://www.ufocool.com/images/flag/thailand.gif">&nbsp;&nbsp; Update Inventory&nbsp;&nbsp;<img src="http://www.ufocool.com/images/flag/thailand.gif"></strong></td>
    <td width="361" align="center"><strong><button type="button" class="btn btn-success"><i class="icon-calendar"></i>&nbsp;Date :: Time : <?php echo $date."&nbsp;/&nbsp;".$time;?></strong></button></td>
  </tr>
</table></p>
      <form method="post" name="form1" action="<?php echo $editFormAction; ?>">
        <table align="center">
          <tr valign="baseline">
            <td height="33" align="left" nowrap><span class="label label-success"><strong>Update Inventory</strong></span></td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr valign="baseline">
            <td height="33" align="left" nowrap><strong>Device : ID</strong></td>
            <td><strong>CPU</strong></td>
            <td><strong>IP</strong></td>
          </tr>
          <tr valign="baseline">
            <td nowrap align="left"><input type="text" name="device_id" value="<?php echo htmlentities($row_PC['device_id'], ENT_COMPAT, 'utf-8'); ?>" size="32"></td>
            <td><input type="text" name="cpu" value="<?php echo htmlentities($row_PC['cpu'], ENT_COMPAT, 'utf-8'); ?>" size="32"></td>
            <td><input type="text" name="ip" value="<?php echo htmlentities($row_PC['ip'], ENT_COMPAT, 'utf-8'); ?>" size="32"></td>
          </tr>
          <tr valign="baseline">
            <td height="31" align="left" nowrap><strong>Date : PR</strong></td>
            <td><strong>Mainboard</strong></td>
            <td><strong>Mouse</strong></td>
          </tr>
          <tr valign="baseline">
            <td height="25" align="left" nowrap><input type="text" name="date_pr" value="<?php echo htmlentities($row_PC['date_pr'], ENT_COMPAT, 'utf-8'); ?>" size="32"></td>
            <td><input type="text" name="mainboard" value="<?php echo htmlentities($row_PC['mainboard'], ENT_COMPAT, 'utf-8'); ?>" size="32"></td>
            <td><input type="text" name="mouse" value="<?php echo htmlentities($row_PC['mouse'], ENT_COMPAT, 'utf-8'); ?>" size="32"></td>
          </tr>
          <tr valign="baseline">
            <td height="31" align="left" nowrap><strong>Username</strong></td>
            <td><strong>Ram</strong></td>
            <td><strong>Keyboard</strong></td>
          </tr>
          <tr valign="baseline">
            <td nowrap align="left"><input type="text" name="username" value="<?php echo htmlentities($row_PC['username'], ENT_COMPAT, 'utf-8'); ?>" size="32"></td>
            <td><input type="text" name="ram" value="<?php echo htmlentities($row_PC['ram'], ENT_COMPAT, 'utf-8'); ?>" size="32"></td>
            <td><input type="text" name="keyboard" value="<?php echo htmlentities($row_PC['keyboard'], ENT_COMPAT, 'utf-8'); ?>" size="32"></td>
          </tr>
          <tr valign="baseline">
            <td height="30" align="left" nowrap><strong>            Position</strong></td>
            <td><strong>VGA</strong></td>
            <td><strong>Network</strong></td>
          </tr>
          <tr valign="baseline">
            <td nowrap align="left"><input type="text" name="position" value="<?php echo htmlentities($row_PC['position'], ENT_COMPAT, 'utf-8'); ?>" size="32"></td>
            <td><input type="text" name="vga" value="<?php echo htmlentities($row_PC['vga'], ENT_COMPAT, 'utf-8'); ?>" size="32"></td>
            <td><input type="text" name="network" value="<?php echo htmlentities($row_PC['network'], ENT_COMPAT, 'utf-8'); ?>" size="32"></td>
          </tr>
          <tr valign="baseline">
            <td height="32" align="left" nowrap><strong>Department</strong></td>
            <td><strong>Harddisk</strong></td>
            <td><strong>OS</strong></td>
          </tr>
          <tr valign="baseline">
            <td nowrap align="left"><input type="text" name="department" value="<?php echo htmlentities($row_PC['department'], ENT_COMPAT, 'utf-8'); ?>" size="32"></td>
            <td><input type="text" name="harddisk" value="<?php echo htmlentities($row_PC['harddisk'], ENT_COMPAT, 'utf-8'); ?>" size="32"></td>
            <td><input type="text" name="os" value="<?php echo htmlentities($row_PC['os'], ENT_COMPAT, 'utf-8'); ?>" size="32"></td>
          </tr>
          <tr valign="baseline">
            <td height="31" align="left" nowrap><strong>Monitor</strong></td>
            <td><strong>Optical Drive</strong></td>
            <td><strong>License</strong></td>
          </tr>
          <tr valign="baseline">
            <td nowrap align="left"><input type="text" name="monitor" value="<?php echo htmlentities($row_PC['monitor'], ENT_COMPAT, 'utf-8'); ?>" size="32"></td>
            <td><input type="text" name="optical_drive" value="<?php echo htmlentities($row_PC['optical_drive'], ENT_COMPAT, 'utf-8'); ?>" size="32"></td>
            <td><input type="text" name="license" value="<?php echo htmlentities($row_PC['license'], ENT_COMPAT, 'utf-8'); ?>" size="32"></td>
          </tr>
          <tr valign="baseline">
            <td nowrap align="right">&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr valign="baseline">
            <td colspan="3" align="left" nowrap>
            <button type="submit" class="btn btn-success"><i class="icon-upload"></i>&nbsp;Save&nbsp;</button> 
            <a href="inventory_index.php"><button type="button" class="btn btn-danger"><i class="icon-remove"></i>&nbsp;Cancel</button></a>
            </td>
          </tr>
        </table>
        <input type="hidden" name="MM_update" value="form1">
        <input type="hidden" name="id" value="<?php echo $row_PC['id']; ?>">
</form>
      <p>&nbsp;</p>
</body>
</html>
<?php
mysql_free_result($PC);
?>

Youez - 2016 - github.com/yon3zu
LinuXploit