korsygfhrtzangaiide
Elepffwdsff
/
home3
/
nmslyumy
/
public_html
/
odishaexpress
/
oe-admin
/
view
/
Upload FileeE
HOME
<?php if(isset($_POST["save"])){ $target = "../org_gallery/"; $target_path = "org_gallery/"; $rand =rand(); $temp_file = $_FILES["gl"]["tmp_name"]; $target_file = $target.$rand.$_FILES["gl"]["name"]; $target_file_path = $target_path.$rand.$_FILES["gl"]["name"]; move_uploaded_file($temp_file,$target_file); $eid= $_GET["eid"]; $in = $conn->query("insert into its_org_gallery values('','$eid','$target_file_path')"); $msg = "File Uploaded Successfully"; } if(!empty($_GET["did"])){ $conn->query("delete from its_org_gallery where its_id='".$_GET["did"]."'"); } ?> <div id="content" class="col-lg-10 col-sm-10"> <!-- content starts --> <div> <ul class="breadcrumb"> <li> <a href="home.php?page=dash-board">Home</a> </li> <li> <a href="#">Organization Image Gallery</a> </li> </ul> </div> <div class="row"> <div style="text-align:center"><?php include("controller/msg.php"); ?></div> <div class="box col-md-12"> <div class="box-inner"> <div class="box-header well" data-original-title=""> <h2> Org Name : <?php echo ucwords($_GET["nm"]);?></h2> <div class="box-icon"> </div> </div> <div class="box-content" style="min-height:500px;"> <form role="form" method="post" enctype="multipart/form-data"> <div class="form-group"> <label for="exampleInputEmail1">upload Image</label> <input type="file" name="gl" class="form-control"required style="width:20%;"> </div> <button type="submit" class="btn btn-primary" name="save">Upload</button><span style="color:green;"> <a href="home.php?page=org-dt">Back</a> <?php echo $msg;?></span> </form> <br> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script> <div class="row"> <?php $i=1; $rs=$conn->query("select * from its_org_gallery where its_org_id='".$_GET["eid"]."'"); while($row=$rs->fetch_array()){ ?> <div class="col-lg-3 col-sm-4 col-xs-6"> <a title="Image 1" href="#" data-toggle="modal" data-target="#myModal<?php echo $i++;?>"> <img class="thumbnail img-responsive" style="margin-bottom:0px !important;margin-top:10px;width:250px;height:200px !important;" src="../<?php echo $row["its_image"]; ?>"> </a> <a href="home.php?page=gallery&eid=<?php echo $_GET["eid"];?>&nm=<?php echo $_GET["nm"];?>&did=<?php echo $row["its_id"];?>">Delete</a> </div> <?php } ?> </div> <?php $ik=1; $rs=$conn->query("select * from its_org_gallery where its_org_id='".$_GET["eid"]."'"); while($row=$rs->fetch_array()){ ?> <!-- Modal --> <div id="myModal<?php echo $ik++; ?>" class="modal fade" role="dialog"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-body"> <img class="thumbnail img-responsive" src="../<?php echo $row["its_image"]; ?>"> </div> </div> </div> </div> <?php } ?> </div> </div> </div> <!--/span--> </div>