GIF89a
<?php
error_reporting(0);
include("include/admin-main.php");
include("include/header.php");
$obj=new admin();
$menu_details=$obj->select_objData("pin_code","order by menu_id DESC");
if(isset($_POST['addGuestUser']))
{
$insert_menu=$obj->insert_guest_user("regis","marketingBoy");
if($insert_menu=="ok")
{
?>
<script type="text/javascript">
alert("Data Inserted Successfully");
window.location.href="<?php echo $_SERVER['HTTP_REFERER'];?>";
</script>
<?php
}
else
{ ?>
<script type="text/javascript">
alert("Error! Data Not Inserted");
window.location.href="<?php echo $_SERVER['HTTP_REFERER'];?>";
</script>
<?php echo mysqli_error();
}
}
//active deactive category
error_reporting(0);
if($_GET['permission']=='show'){
$del_msg=mysqli_query($con,"update regis set Inactive='1' WHERE id='$_GET[id]' ") or die(mysqli_error());
if($del_msg){
echo "<script>alert('Permission granted')</script>";
echo "<script>window.location='$_SERVER[HTTP_REFERER]'</script>";
}
}
//category is inactive
if($_GET['permission']=='notshow'){
$del_msg=mysqli_query($con,"update regis set Inactive='0' WHERE id='$_GET[id]' ") or die(mysqli_error());
if($del_msg){
echo "<script>alert('Permission not granted')</script>";
echo "<script>window.location='$_SERVER[HTTP_REFERER]'</script>";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="shortcut icon" href="img/favicon.png">
<title><?php include("include/title.php")?> | Add Marketing Member</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-reset.css" rel="stylesheet">
<!--external css-->
<link href="assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
<!-- Custom styles for this template -->
<link href="css/style.css" rel="stylesheet">
<link href="css/style-responsive.css" rel="stylesheet" />
<script src="css1/js/jquery.min.js" type="text/javascript"></script>
<script src="css1/js/ddsmoothmenu.js" type="text/javascript"></script>
<script type="text/javascript" src="css1/js/menu.js"></script>
<script src="css1/js/jquery-1.7.2.min.js" type="text/javascript"></script>
<script type="text/javascript" src="css1/js/ckeditor/ckeditor.js"></script>
<link href="../css/pro_dropdown_2.css" rel="stylesheet" type="text/css">
</head>
<body>
<?php include 'popup.php';?>
<!--header end-->
<!--sidebar start-->
<?php include 'menu.php' ?>
<!--sidebar end-->
<!--main content start-->
<section id="main-content">
<section class="wrapper">
<!-- page start-->
<div class="row">
<div class="inbox-body"> <a class="btn btn-compose" data-toggle="modal" href="#myModal3"> Add Marketing Member </a>
<!-- Modal -->
<div class="modal fade" id="myModal3" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title"> Add Marketing Member</h4>
</div>
<div class="modal-body">
<form method="post" class="form-horizontal" role="form" enctype="multipart/form-data">
<div class="form-group">
<label class="col-lg-4 control-label">Name</label>
<div class="col-lg-8">
<input type="text" class="form-control" placeholder="Enter Name" name="c_name">
</div>
</div>
<div class="form-group">
<label class="col-lg-4 control-label">E-mail</label>
<div class="col-lg-8">
<input type="text" class="form-control" placeholder="Enter E-mail" name="c_email">
</div>
</div>
<div class="form-group">
<label class="col-lg-4 control-label">Mobile No</label>
<div class="col-lg-8">
<input type="text" class="form-control" placeholder="Enter Mobile No" name="c_mobile" maxlength="10">
</div>
</div>
<div class="form-group">
<label class="col-lg-4 control-label">Address<small> (Optional)</small></label>
<div class="col-lg-8">
<input type="text" class="form-control" placeholder="Address.." name="address">
</div>
</div>
<div class="form-group">
<label class="col-lg-4 control-label">Password</label>
<div class="col-lg-8">
<input type="password" class="form-control" placeholder="Password" name="c_password">
</div>
</div>
<div class="form-group">
<label class="col-lg-4 control-label">Upload Profile Pic <small> (Optional)</small></label>
<div class="col-lg-8">
<input type="file" name="pro_pic" class="form-control">
</div>
</div>
<div class="form-group">
<div class="col-lg-offset-2 col-lg-10">
<input type="submit" name="addGuestUser" value="Submit" class="btn btn-send">
</div>
</div>
</form>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
</div>
<div class="col-lg-12">
<section class="panel">
<header class="panel-heading"> <b> Marketing Member Details</b> </header>
<table class="table table-striped table-advance table-hover">
<thead>
<tr>
<th>S. No.</th>
<th>Marketing ID</th>
<th>Date</th>
<th>View Sell Products</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
if(isset($_GET['delete_cat']))
{
$delete_cat_id=$_GET['delete_cat'];
$delete_query="delete from regis where id={$delete_cat_id}";
$delete_cat=mysqli_query($con,$delete_query);
if($delete_cat){
echo "<script>window.location='$_SERVER[HTTP_REFERER]'</script>";
}
}
$query = "SELECT * FROM regis where utype='marketingBoy' order by id desc";
$select_user = mysqli_query($con,$query);
$count=0;
while($row = mysqli_fetch_assoc($select_user)){
$count=$count+1;
$reg_id = $row['id'];
$name= $row['name'];
$email = $row['email'];
$mobile= $row['mobile'];
$created = $row['reg_date'];
$password = $row['pass'];
$imgNameIs = $row['pro_pic'];
$address = $row['address'];
$marketID = $row['reg_id'];
?>
<tr>
<td><?php echo $count; ?></td>
<td><?php echo $marketID; ?></td>
<td><?php echo $created; ?></td>
<td><a href="sell-products.php?regid=<?php echo $marketID?>">View</a></td>
<td><?php if($row['Inactive']==0){
echo '<a href="guest-user.php?source=user_permit&id='.$row['id'].'&permission=show"><font color="#FF0000">Block</font></a>'; } else{
echo '<a href="guest-user.php?source=user_permit&id='.$row['id'].'&permission=notshow"><font color="#028430">Active</font></a>';
}
?></td>
<td colspan="2"><a href="guest-user.php?delete_cat=<?php echo $reg_id;?>" onClick="return confirm('Are you want to delete?')"><small>Delete</small></a></td>
</tr>
<tr>
<td colspan="7"><table class="table table-striped table-bordered table-hover dataTables-example" style="box-shadow: 0 0 10px #ccc; padding-bottom:15px">
<tr>
<td rowspan="5" align="center"><img src="../image/<?php echo $imgNameIs?>" style="height:80px; width:100px" /><br />
<b><?php echo ucfirst($name)?></b></td>
</tr>
<tr>
<td><strong>Email Id:</strong> <?php echo $email?></td>
</tr>
<tr>
<td><strong>Mobile No:</strong> <?php echo $mobile?></td>
</tr>
<tr>
<td><strong>Address:</strong> <?php echo $address?></td>
</tr>
<tr>
<td><strong>Password:</strong> <?php echo $password?></td>
</tr>
</table></td>
</tr>
<?php } ?>
</tbody>
</table>
</section>
</div>
<!----popup ---->
<!----end popup ----->
</div>
<!-- page end-->
</section>
</section>
<!--main content end-->
</section>
<!-- js placed at the end of the document so the pages load faster -->
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<script class="include" type="text/javascript" src="js/jquery.dcjqaccordion.2.7.js"></script>
<script src="js/jquery.scrollTo.min.js"></script>
<script src="js/jquery.nicescroll.js" type="text/javascript"></script>
<script src="js/respond.min.js" ></script>
<!--common script for all pages-->
<script src="js/common-scripts.js"></script>
</body>
</html>