]nbmbmbnmbnmbytutytyutyutyutyumbnmjhkhjkhjkhjkhjkhjknnnnnnnn
bnmbnmbnmnbbtyutyutyutyutyutyu,nm,nmmnmm,bbbbbn
/
home
/
aaharway
/
domains
/
awards.aaharways.com
/
public_html
/
adm
/
Upload FileeE
HOME
<?php include_once('header.php'); if(isset($_GET['edit_category'])) { $edit_category=base64_decode($_GET['edit_category']); if(is_numeric($edit_category)) { $fetch_cat=mysqli_query($con,"select * from tbl_category where category_id=$edit_category and status=1"); $res_cat=mysqli_fetch_array($fetch_cat); } } ?> <div id="layoutSidenav_content"> <main> <div class="container-fluid"> <h1 class="mt-4">Add Category</h1> <ol class="breadcrumb mb-4"> <li class="breadcrumb-item"><a href="index.php">Dashboard</a></li> <li class="breadcrumb-item active">Category</li> </ol> <div class="card mb-4"> <div class="card-header"><i class="fas fa-table mr-1"></i>Add Category <a href="category_list.php" class="btn btn-warning" style="float: right;"><i class="fa fa-table"></i> Category List</a></div> <div class="card-body"> <form action="controller.php" method="post" enctype="multipart/form-data"> <?php if(isset($_GET['delete_cat'])=='success') { ?> <div class="alert alert-success"> <strong>Success!</strong>Successfully Deleted Category.. </div> <?php } if(isset($_GET['action'])=='success') { ?> <div class="alert alert-success"> <strong>Success!</strong>Successfully Added Category.. </div> <?php } if(isset($_GET['actionwrong'])=='wrong') { ?> <div class="alert alert-danger"> <strong>Warning!</strong>Something Went Wrong..! </div> <?php } ?> <div class="row"> <div class="col-md-4"> <div class="form-group"> <input type="hidden" name="update_id" value="<?=$res_cat['category_id'];?>"> <label for="exampleInputEmail1">Category Title<span style="color: red;">*</span></label> <input type="text" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter Category Name" required="" name="category_name" value="<?=@$res_cat['category_name'];?>"> </div> </div> <!--<div class="col-md-4">--> <!-- <div class="form-group">--> <!-- <label for="exampleInputEmail1"> Image (Dim :700*700 Size:200KB)</label>--> <?php // if(isset($_GET['edit_category'])) // { ?> <!--<img src="uploads/<?=$res_cat['category_image'];?>" style="width:50px;">--> <!--<input type="hidden" name="old_img" value="<?=$res_cat['category_image'];?>">--> <?php // } ?> <!--<input type="file" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter Category Name" name="category_image" accept="image/*">--> <!-- </div>--> <!--</div>--> </div> <?php if(isset($_GET['edit_category'])) { ?> <button type="submit" class="btn btn-primary" name="btn_update_category">Update</button> <?php } else { ?> <button type="submit" class="btn btn-primary" name="btn_add_category">Submit</button> <?php } ?> </form> </div> </div> <div class="card-body"> <div class="table-responsive"> <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0"> <thead> <tr> <th>Sr No</th> <th>Category</th> <!--<th>Image</th>--> <th>Action</th> </tr> </thead> <tbody> <?php $count=1; $fetch_category=mysqli_query($con,"select * from tbl_category where status=1 order by category_id desc"); while($res_cat=mysqli_fetch_array($fetch_category)) { ?> <tr> <td><?=$count;?></td> <td><?=$res_cat['category_name'];?></td> <!--<td><img src="uploads/<?=$res_cat['category_image'];?>" style="width:80px;"></td>--> <td> <!--<a href="javascript:void(0)" onclick="warning('add_category.php?edit_category=<?=base64_encode($res_cat['category_id']);?>','Do You Want to Update Category ?')" class="btn btn-success">Edit</a>--> <a href="javascript:void(0)" onclick="warning('controller.php?category=<?=base64_encode($res_cat['category_id']);?>','Do You Want to delete Category ?')" class="btn btn-danger">Remove</a> </td> </tr> <?php $count++; } ?> </tbody> </table> </div> </div> </div> </main> <?php include_once('footer.php'); ?>