Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
57f4b48e2e
|
|||
|
a6059d5831
|
|||
|
0481dc380e
|
|||
|
|
506b49f11d |
@@ -7,7 +7,7 @@ if(!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true){
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
require_once "../assets/php/config.php";
|
require_once "../assets/php/config.php";
|
||||||
if(isset( $_POST ['sysID'], $_POST ['ServiceTag'], $_POST ['location'], $_POST ['WinKey'], $_POST ['EthMac'])){
|
if(isset( $_POST ['sysID'],$_POST['sysType'], $_POST ['ServiceTag'], $_POST ['location'], $_POST ['WinKey'], $_POST ['EthMac'])){
|
||||||
// Escape user inputs for security
|
// Escape user inputs for security
|
||||||
$sysID = mysqli_real_escape_string($link, $_POST['sysTypeID'].$_POST['sysID']);
|
$sysID = mysqli_real_escape_string($link, $_POST['sysTypeID'].$_POST['sysID']);
|
||||||
$sysType = mysqli_real_escape_string($link, $_POST['sysType']);
|
$sysType = mysqli_real_escape_string($link, $_POST['sysType']);
|
||||||
@@ -180,81 +180,80 @@ mysqli_close($link);
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-wrapper md-elevation-8 p-4">
|
<div class="form-wrapper md-elevation-8 p-4">
|
||||||
<form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="post">
|
<form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="post">
|
||||||
<!-- Prepended text-->
|
<!-- Prepended text-->
|
||||||
|
<div class='control-group'>
|
||||||
<div class='control-group'>
|
<label class="col-md-8 control-label" >System ID <span style="color:red">*</span></label>
|
||||||
<label class="col-md-8 control-label" >System ID <span style="color:red">*</span></label>
|
<div class='controls'>
|
||||||
<div class='controls'>
|
<div class="col-md-4">
|
||||||
<div class="col-md-4">
|
<div class='input-prepend dropdown' id="sysType" name="sysType" data-select='true'>
|
||||||
<div class='input-prepend dropdown' id="sysType" name="sysType" data-select='true'>
|
<!-- there must not be a space between the prepend toggle and the input field -->
|
||||||
<!-- there must not be a space between the prepend toggle and the input field -->
|
<a class='add-on dropdown-toggle' data-toggle='dropdown' href='#'>
|
||||||
<a class='add-on dropdown-toggle' data-toggle='dropdown' href='#'>
|
<!-- span.dropdown-display will be updated with the text from the selected option -->
|
||||||
<!-- span.dropdown-display will be updated with the text from the selected option -->
|
<span class='dropdown-display'>DT</span>
|
||||||
<span class='dropdown-display'>DT</span>
|
<i class='caret'></i>
|
||||||
<i class='caret'></i>
|
</a>
|
||||||
</a>
|
<input type='text' placeholder='000' id="sysID" required="" minlength="3" maxlength="3" name="sysID" class='col-md-4 control-label' />
|
||||||
<input type='text' placeholder='000' id="sysID" required="" minlength="3" maxlength="3" name="sysID" class='col-md-4 control-label' />
|
<!-- this hidden field is used to contain the selected option from the dropdown -->
|
||||||
<!-- this hidden field is used to contain the selected option from the dropdown -->
|
<input type='hidden' id="sysTypeID" name="sysTypeID" value='DT' class='dropdown-field' />
|
||||||
<input type='hidden' id="sysTypeID" name="sysTypeID" value='DT' class='dropdown-field' />
|
<!-- unordered list of options -->
|
||||||
<!-- unordered list of options -->
|
<ul class='dropdown-menu'>
|
||||||
<ul class='dropdown-menu'>
|
<li>
|
||||||
<li>
|
<a href="#" class="idlist" id="sysType" name="sysTypeID" data-value="DT">DT</a>
|
||||||
<a href="#" class="idlist" id="sysType" name="sysTypeID" data-value="DT">DT</a>
|
</li>
|
||||||
</li>
|
<li>
|
||||||
<li>
|
<a href="#" class="idlist" id="sysType" name="sysTypeID" data-value="LT">LT</a>
|
||||||
<a href="#" class="idlist" id="sysType" name="sysTypeID" data-value="LT">LT</a>
|
</li>
|
||||||
</li>
|
<li>
|
||||||
<li>
|
<a href="#" class="idlist" id="sysType" name="sysTypeID" data-value="TC">TC</a>
|
||||||
<a href="#" class="idlist" id="sysType" name="sysTypeID" data-value="TC">TC</a>
|
</li>
|
||||||
</li>
|
</ul>
|
||||||
</ul>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- Text input-->
|
||||||
<!-- /PREPEND EXAMPLE -->
|
<div class="form-group">
|
||||||
|
<label class="col-md-4 control-label" for="sysType">System type <span style="color:red">*</span></label>
|
||||||
<!-- Text input-->
|
<div class="col-md-4">
|
||||||
<div class="form-group">
|
<input id="ServiceTag" name="ServiceTag" type="text" placeholder="" class="form-control input-md" required="">
|
||||||
<label class="col-md-4 control-label" for="ServiceTag">System type <span style="color:red">*</span></label>
|
</div>
|
||||||
<div class="col-md-4">
|
</div>
|
||||||
<input id="ServiceTag" name="ServiceTag" type="text" placeholder="" class="form-control input-md" required="">
|
<!-- Select Basic -->
|
||||||
</div>
|
<div class="form-group">
|
||||||
</div>
|
<label class="col-md-4 control-label" for="location">Location <span style="color:red">*</span></label>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<select id="location" name="location" class="form-control">
|
||||||
<!-- Select Basic -->
|
<option value="Arnhem">Arnhem</option>
|
||||||
<div class="form-group">
|
<option value="Doetinchem">Doetinchem</option>
|
||||||
<label class="col-md-4 control-label" for="location">Location <span style="color:red">*</span></label>
|
<option value="Nijmegen">Nijmegen</option>
|
||||||
<div class="col-md-4">
|
</select>
|
||||||
<select id="location" name="location" class="form-control">
|
</div>
|
||||||
<option value="Arnhem">Arnhem</option>
|
</div>
|
||||||
<option value="Doetinchem">Doetinchem</option>
|
<!-- Text input-->
|
||||||
<option value="Nijmegen">Nijmegen</option>
|
<div class="form-group">
|
||||||
</select>
|
<label class="col-md-4 control-label" for="EthMac">Mac addres <span style="color:red">*</span></label>
|
||||||
</div>
|
<div class="col-md-4">
|
||||||
</div>
|
<input id="EthMac" name="EthMac" type="text" placeholder="" class="form-control input-md" required="">
|
||||||
|
</div>
|
||||||
<!-- Text input-->
|
</div>
|
||||||
<div class="form-group">
|
<!-- Text input-->
|
||||||
<label class="col-md-4 control-label" for="WinKey">Windows key <span style="color:red">*</span></label>
|
<div class="form-group">
|
||||||
<div class="col-md-4">
|
<label class="col-md-4 control-label" for="WinKey">Windows key <span style="color:red">*</span></label>
|
||||||
<input id="WinKey" name="WinKey" type="WinKey" placeholder="" class="form-control input-md" required="">
|
<div class="col-md-4">
|
||||||
</div>
|
<input id="WinKey" name="WinKey" type="WinKey" placeholder="" class="form-control input-md" required="">
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<!-- Text input-->
|
<!-- Text input-->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-4 control-label" for="EthMac">Mac addres <span style="color:red">*</span></label>
|
<label class="col-md-4 control-label" for="sysType">Service Tag/Serial nr<span style="color:red">*</span></label>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<input id="EthMac" name="EthMac" type="text" placeholder="" class="form-control input-md" required="">
|
<input id="sysType" name="sysType" type="text" placeholder="" class="form-control input-md" required="">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<input type="submit" class="btn btn-secondary" value="Add">
|
<input type="submit" class="btn btn-secondary" value="Add">
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
<!-- / CONTENT -->
|
<!-- / CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ if(isset($_POST["id"]) && !empty($_POST["id"])){
|
|||||||
|
|
||||||
$input_ServiceTag = trim($_POST["ServiceTag"]);
|
$input_ServiceTag = trim($_POST["ServiceTag"]);
|
||||||
if(empty($input_ServiceTag)){
|
if(empty($input_ServiceTag)){
|
||||||
$ServiceTag_err = "Please enter a Windows Key";
|
$ServiceTag_err = "Please enter a Servicetag/Serial nr";
|
||||||
} else{
|
} else{
|
||||||
$ServiceTag = $input_ServiceTag;
|
$ServiceTag = $input_ServiceTag;
|
||||||
}
|
}
|
||||||
@@ -367,7 +367,7 @@ $lines = explode("\n", $trimmedString);
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-4 <?php echo (!empty($ServiceTag_err)) ? 'has-error' : ''; ?>">
|
<div class="form-group col-md-4 <?php echo (!empty($ServiceTag_err)) ? 'has-error' : ''; ?>">
|
||||||
<label>Service Tag</label>
|
<label>Service Tag/Serial nr</label>
|
||||||
<input type="text" name="ServiceTag" class="form-control" value="<?php echo $ServiceTag; ?>">
|
<input type="text" name="ServiceTag" class="form-control" value="<?php echo $ServiceTag; ?>">
|
||||||
<span class="help-block"><?php echo $ServiceTag_err;?></span>
|
<span class="help-block"><?php echo $ServiceTag_err;?></span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ require_once "../assets/php/cuttext.php";
|
|||||||
<div class="clearfix" style="padding:20px;">
|
<div class="clearfix" style="padding:20px;">
|
||||||
<h2 class="pull-right">Users</h2>
|
<h2 class="pull-right">Users</h2>
|
||||||
<div class="toolbar crud pull-left">
|
<div class="toolbar crud pull-left">
|
||||||
<a href="create-system.php" class="btn btn-secondary btn-fab"><i class="icon-plus"></i></a>
|
<a href="create-user.php" class="btn btn-secondary btn-fab"><i class="icon-plus"></i></a>
|
||||||
<button type="button" class="btn btn-secondary btn-fab" id="SearchButton"><i class="icon-magnify"></i></button>
|
<button type="button" class="btn btn-secondary btn-fab" id="SearchButton"><i class="icon-magnify"></i></button>
|
||||||
<input type="search" id="SearchInput" style="display:none;" placeholder="Search">
|
<input type="search" id="SearchInput" style="display:none;" placeholder="Search">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user