-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_gps_users.php
107 lines (105 loc) · 3.5 KB
/
create_gps_users.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?php
include("includes/config.inc.php");
include("includes/crosssite.inc.php");
if ( isset ( $_GET['logout'] ) && $_GET['logout'] ==1 ) {
session_destroy();
header("location: index.php?token=".$token);
}
if (isset($_SESSION) && $_SESSION['login']=='')
{
session_destroy();
header("location: index.php?token=".$token);
}
if(isset($_POST['submit']))
{
$customerId = mysql_real_escape_string($_POST['customerId']);
$user_name = mysql_real_escape_string($_POST['user_name']);
$Password = mysql_real_escape_string($_POST['Password']);
$sql = "Insert into tbl_userloginmaster set type = '10', userDetailId = '$customerId', username = '$user_name', passsword = '$Password'";
$result = mysql_query($sql);
if($result)
{
echo "<script> alert('Customer Created Successfull') </script>";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="images/ico.png" type="image/x-icon">
<title><?=SITE_PAGE_TITLE?></title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-submenu.min.css">
<link rel="stylesheet" href="css/custom.css">
<script type="text/javascript" src="js/checkbox_validation.js"></script>
<script type="text/javascript" src="js/checkbox.js"></script>
<script src="js/ajax.js"></script>
<script type="text/javascript" src="js/sim_confirmation.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script type="text/javascript">
/* Send ajax request*/
$(document).ready(function(){
$("#company").change(function(){
$.post("ajaxrequest/create_users.php?token=<?php echo $token;?>",
{
id : $('#company').val(),
},
function( data){
/*alert(data);*/
$("#divassign").html(data);
});
});
});
</script>
</head>
<body>
<!--open of the wraper-->
<div id="wraper">
<!--include header-->
<?php include_once('includes/header.php');?>
<!--end-->
<!--open of the content-->
<div class="row" id="content">
<div class="col-md-12">
<h3>Create GPS Users</h3>
<hr>
</div>
<div class="col-md-12">
<form name='fullform' class="form-inline" method='post' onSubmit="return confirmdelete(this)">
<div class="col-md-12">
<div class="form-group">
<label for="exampleInputEmail2">Company</label>
<select name="company" id="company" class="form-control drop_down" >
<option value="">Select Company</option>
<?php $Country=mysql_query("SELECT * FROM tbl_customer_master");
while($resultCountry=mysql_fetch_assoc($Country)){
?>
<option value="<?php echo $resultCountry['callingdata_id']; ?>" ><?php echo getOraganization(stripslashes(ucfirst($resultCountry['callingdata_id']))); ?></option>
<?php } ?>
</select>
</div>
</div>
<div id="divassign" class="col-md-12 table-responsive assign_grid">
<!---- this division shows the Data of devices from Ajax request --->
</div>
</form>
</div>
</div>
<!--end of the content-->
<!--open of the footer-->
<div class="row" id="footer">
<div class="col-md-12">
<p>Copyright © 2015 INDIAN TRUCKERS, All rights reserved.</p>
</div>
</div>
<!--end footer-->
</div>
<!--end wraper-->
<!-------Javascript------->
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>