| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/rsdgroup/adminPanel/ |
Upload File : |
<?php
include_once("session.php");
include_once("settings.php");
include_once("functions.php");
if ($_REQUEST["mode"] == "Edit") {
$mode = "Edit";
$mode2 = "EDIT";
$mode1 = "Update";
$id = $_REQUEST['id'];
$rs_tblsite = mysql_query("select * from tbl_store_locator where `id`='$id'");
$array_tblsite = mysql_fetch_array($rs_tblsite);
$brand_id = $array_tblsite['brand_id'];
$state_id = $array_tblsite['state_id'];
$city_id = $array_tblsite['city_id'];
$location = $array_tblsite['location'];
$store_code = $array_tblsite['store_code'];
$store_model = $array_tblsite['store_model'];
$contact_person = $array_tblsite['contact_person'];
$mobile_no_1 = $array_tblsite['mobile_no_1'];
$mobile_no_2 = $array_tblsite['mobile_no_2'];
$address = $array_tblsite['address'];
$pincode = $array_tblsite['pincode'];
$latitude = $array_tblsite['latitude'];
$longitude = $array_tblsite['longitude'];
$status = $array_tblsite['status'];
} else {
$mode = "Add";
$mode2 = "ADD";
$mode1 = "Add";
}
?>
<link href="mel.css" type=text/css rel=stylesheet>
<link href="sdmenu.css" type=text/css rel=stylesheet>
<?php if ($_REQUEST["mode"] != "Edit") { ?>
<script type="text/javascript">
</script>
<?php } else { ?>
<script type="text/javascript">
</script>
<?php } ?>
<script language="JavaScript" src="../js/jquery-1.4.4.min.js"></script>
<script type="text/javascript">
function getCity(val) {
$.ajax({
type: "POST",
url: "ajax/cityList.php",
data: "State_Id=" + val,
success: function (res) {
$("#city_id").html(res);
}
});
}
function isNumber(evt) {
evt = (evt) ? evt : window.event;
var charCode = (evt.which) ? evt.which : evt.keyCode;
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
return false;
}
return true;
}
</script>
<table width="94%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><form action="write_location.php" method="post" enctype="multipart/form-data" name="form" >
<fieldset>
<legend> Location Manager
<?= $mode2 ?>
FORM</legend>
<table width="97%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td height="26" class="general" required>Brand Name* : </td>
<td height="26" >
<select name="brand_id" class="textfield" id="brand_id" required/>
<option value="">--Select--</option>
<?php
$restult = mysql_query("select * from `tblSpecies` WHERE `isDeleted`='no'");
while ($row = mysql_fetch_assoc($restult)) {
?>
<option value="<?php echo $row['Species_Id']; ?>" <?php if ($brand_id == $row['Species_Id']) {
echo "selected"; } ?>><?php echo $row['Species_Name']; ?></option>
<?php } ?>
</select>
</td>
</tr>
<tr>
<td height="26" class="general" required>State Name* : </td>
<td height="26" >
<select name="state_id" class="textfield" id="state_id" onchange="getCity(this.value);" required/>
<option value="">--Select--</option>
<?php
$restult = mysql_query("select * from tbl_states where status='Activate' ");
while ($row = mysql_fetch_assoc($restult)) {
?>
<option value="<?php echo $row['id']; ?>" <?php if ($state_id == $row['id']) {
echo "selected";
} ?>><?php echo $row['state_name']; ?></option>
<?php } ?>
</select>
</td>
</tr>
<tr>
<td height="26" class="general" required>City Name* : </td>
<td height="26" >
<select name="city_id" class="textfield" id="city_id" required/>
<option value="">--Select--</option>
<?php
$restult = mysql_query("select * from tbl_city where status='Activate' ");
while ($row = mysql_fetch_assoc($restult)) {
?>
<option value="<?php echo $row['id']; ?>" <?php if ($city_id == $row['id']) {
echo "selected";
} ?>><?php echo $row['city_name']; ?></option>
<?php } ?>
</select>
</td>
</tr>
<tr>
<td height="26" class="general" required>location* : </td>
<td height="26" >
<input name="location" type="text" class="textfield" id="location" value="<?= $location; ?>" size="35" maxlength="100" required/>
</td>
</tr>
<tr>
<td height="26" class="general" required>store_code : </td>
<td height="26" >
<input name="store_code" type="text" class="textfield" id="store_code" value="<?= $store_code; ?>" size="35" maxlength="100" />
</td>
</tr>
<tr>
<td height="26" class="general" required>store_model : </td>
<td height="26" >
<input name="store_model" type="text" class="textfield" id="store_model" value="<?= $store_model; ?>" size="35" maxlength="100" />
</td>
</tr>
<tr>
<td height="26" class="general" required>contact_person : </td>
<td height="26" >
<input name="contact_person" type="text" class="textfield" id="contact_person" value="<?= $contact_person; ?>" size="35" maxlength="100"/>
</td>
</tr>
<tr>
<td height="26" class="general" required>mobile_no_1 : </td>
<td height="26" >
<input name="mobile_no_1" type="tel" pattern="\d{10}" placeholder="Please enter a ten digit mobile number" class="textfield" id="mobile_no_1" value="<?= $mobile_no_1; ?>" size="35" onKeyPress="return isNumber(event);" maxlength="10" />
</td>
</tr>
<tr>
<td height="26" class="general" required>mobile_no_2 : </td>
<td height="26" >
<input name="mobile_no_2" type="tel" pattern="\d{10}" placeholder="Please enter a ten digit mobile number" class="textfield" id="mobile_no_2" value="<?= $mobile_no_2; ?>" size="35" onKeyPress="return isNumber(event);" maxlength="10" />
</td>
</tr>
<tr>
<td height="26" class="general" required>address* : </td>
<td height="26" >
<textarea name="address" id="address" rows="5" cols="27" required><?= $address; ?></textarea>
</td>
</tr>
<tr>
<td height="26" class="general" required>pincode : </td>
<td height="26" >
<input name="pincode" type="text" class="textfield" id="pincode" value="<?= $pincode; ?>" size="35" maxlength="100" />
</td>
</tr>
<tr>
<td height="26" class="general" required>latitude : </td>
<td height="26" >
<input name="latitude" type="text" class="textfield" id="latitude" value="<?= $latitude; ?>" size="35" maxlength="100" />
</td>
</tr>
<tr>
<td height="26" class="general" required>longitude : </td>
<td height="26" >
<input name="longitude" type="text" class="textfield" id="longitude" value="<?= $longitude; ?>" size="35" maxlength="100" />
</td>
</tr>
<tr>
<td width="29%" height="26" class="general">status* :</td>
<td>
<select name="status" class="textfield" id="status" required/>
<option value="">--Select--</option>
<option value="Active" <?php if ($status == "Active") {
echo "selected";
} ?>>Active</option>
<option value="Deactive" <?php if ($status == "Deactive") {
echo "selected";
} ?>>Deactive</option>
</select>
</td>
</tr>
<tr align="center">
<td height="26" colspan="2"><label for="label">
<input type="hidden" name="id" value="<?= $_REQUEST['id'] ?>" />
<input type="submit" name="Submit" value=" Save " class="button" />
<input type="reset" name="Submit" value="Reset" class="button" />
<input name="mode" type="hidden" id="mode" value="<?= $_REQUEST['mode'] ?>" />
</label></td>
</tr>
</table>
</fieldset>
</form></td>
</tr>
</table>