Файловый менеджер - Редактировать - /home/amitahospital/public_html/amita_master/destination.php
Назад
<?php include("include/header1.php"); if(!empty($_POST['doct'])){ $obj->consultant(); } if(!empty($_POST['mul_del'])) { foreach($_POST['mul_del'] as $code) { $id= $code; $photo_sql= "SELECT doc_image FROM consultant WHERE doc_id='".$id."'"; $rs= mysqli_query($obj->mysqli,$photo_sql); $photo= mysqli_fetch_assoc($rs); if(is_file('upload/doctor/'.$photo['doc_image'])) { unlink('upload/doctor/'.$photo['doc_image']); } } if(!empty($_POST['mul_del'])) { $col= 'doc_id'; $table= 'consultant'; $page= 'consultant.php'; $img= "dest_img"; $path= "upload/doctor/"; $obj->delete_multiple($col,$table,$page,$path); } } if(!empty($_REQUEST['edit'])) { $val= $_REQUEST['edit']; $row= $obj->getRecord('consultant','doc_id',$val); } ?> <!-- Left side column. contains the logo and sidebar --> <aside class="main-sidebar"> <!-- sidebar: style can be found in sidebar.less --> <section class="sidebar"> <!-- Sidebar user panel --> <!-- /.search form --> <!-- sidebar menu: : style can be found in sidebar.less --> <?php include ('include/sidebar.php'); ?> <?php include 'include/admin-menu.php'; ?> </section> <!-- /.sidebar --> </aside> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <?php if(!empty($obj->errorMsg)){ ?> <section class="content-header" id="error"> <div class="row"> <div class="col-md-12"> <div class="alert alert-success alert-dismissable" > <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> <h4><i class="icon fa fa-check"></i><?php echo $obj->errorMsg; ?></h4> </div> </div> </div> </section> <?php } ?> <section class="content-header"> <h1> Consultant Entry </h1> <div class="col-lg-12"> <ol class="breadcrumb"> <li><a href="admin-dashboard.php"><i class="fa fa-dashboard"></i> Dashboard</a></li> <li class="active"><a href="news.php">News Entry </a></li> <li class="active"><a href="testimonial.php">Testimonial Entry</a></li> <li class="active"> Gallery</li> </ol> </div> </section> <section class="content"> <div class="row"> <!-- left column --> <div class="col-md-12"> <div class="box box-primary"> <!-- <div class="box-header with-border"> <h3 class="box-title"></h3> </div>--> <!-- form start --> <form role="form" action="" method="post" enctype="multipart/form-data" name="news_form"> <div class="box-body"> <div class="form-group col-md-6"> <label for="exampleInputEmail1">Doctor Name</label> <input type="text" class="form-control" name="doc_name" placeholder="Enter a Doctor Name..." value="<?= isset($row)? $row['doc_name'] : ''?>" required> </div> <div class="form-group col-md-6"> <label for="exampleInputEmail1">Qualiication *</label> <input type="text" class="form-control" name="doc_quali" placeholder="Enter a Qualiication..." value="<?= isset($row)? $row['doc_quali'] : ''?>" required> </div> <div class="form-group col-md-6"> <label for="exampleInputEmail1">No. of Awards *</label> <input type="text" class="form-control" name="doc_awards" placeholder="Enter a No. of Awards..." value="<?= isset($row)? $row['doc_awards'] : ''?>" required> </div> <div class="form-group col-md-6"> <label for="exampleInputEmail1">Experience(Year) *</label> <input type="number" class="form-control" name="doc_experience" placeholder="Enter a Experience(Year)..." value="<?= isset($row)? $row['doc_experience'] : ''?>" required> </div> <div class="form-group col-md-6"> <label for="exampleInputEmail1">Department *</label> <select name="department_id" class="form-control" id="department_id"> <?php $option ="<option value=''>--Department--</option>"; $dep_rs= mysqli_query($obj->mysqli,"SELECT * FROM `department`"); while($dep_data= mysqli_fetch_assoc($dep_rs)){ $option .="<option value='$dep_data[department_id]'>$dep_data[department_name] ($dep_data[department_name])</option>"; } echo($option); ?> </select> </div> <div class="form-group col-md-6"> <label for="exampleInputEmail1">Speciality Interest *</label> <input type="text" class="form-control" name="doc_speciality" placeholder="Enter a Speciality Interest..." value="<?= isset($row)? $row['doc_speciality'] : ''?>" required> </div> <div class="form-group col-md-6"> <label for="exampleInputEmail1">Designation *</label> <input type="text" class="form-control" name="doc_designation" placeholder="Enter a Destination..." value="<?= isset($row)? $row['doc_designation'] : ''?>" required> </div> <div class="form-group col-md-6"> <label for="exampleInputEmail1">Phone No. *</label> <input type="phone" class="form-control" name="doc_phone" maxlength="10" minlength="10" placeholder="Enter a Phone No...." value="<?= isset($row)? $row['doc_phone'] : ''?>" required> </div> <div class="form-group col-md-6"> <label for="exampleInputEmail1">E-mail Id *</label> <input type="email" class="form-control" name="doc_email" placeholder="abc123@gmaol.com" value="<?= isset($row)? $row['doc_email'] : ''?>" required> </div> <div class="form-group col-md-6"> <label>Doctor Image</label> <input type="file" class="form-control" name="doc_image" required> <?php if(isset($row)){ if(is_file('upload/doctor/'.$row['doc_image'])){ echo "<br><br>"; echo "<img src='upload/doctor/$row[doc_image]' height='80'>"; } } ?> </div> <div class="form-group col-md-12"> <label>Discirption</label> <textarea class="form-control" rows="3" name="doc_descraption" id="Discirption" placeholder="Enter Discirption..." autocomplete="off" onkeyup="livesearch('Discirption','[^A-Za-z0-9(){}.*, ]')" onkeydown="livesearch('Discirption','[^A-Za-z0-9(){}.*, ]')"><?= isset($row)? $row['doc_descraption'] : ''?></textarea> </div> <div class="form-group col-md-12"> <label for="exampleInputPassword1">News Date</label> <input type="text" class="form-control" name="date" id="datepicker-example1" value="<?= isset($row)? $row['date'] : ''?>" placeholder="Enter a Date..." required> </div> <input type="hidden" name="doct" value="1"> <?php if(isset($row)== TRUE){ ?> <input type="hidden" name="doc_id" value="<?= $row['doc_id']?>" /> <input type="hidden" name="doc_image" value="<?= $row['doc_image']?>" /> <?php } ?> <button type="submit" name="submit" class="btn btn-primary"><?= isset($row)? 'Update Consultant' : 'Save Consultant'?></button> <button type="reset" name="reset" class="btn btn-primary">Reset Consultant</button> </div> </form> <!-- /.box-body --> </div> <!-- /.box --> </div> <!-- right column --> <!-- /.row --> </section> <!-- /.content --> <section class="content-header"> <h1> Consultant View <small></small> </h1> </section> <!-- Main content --> <section class="content"> <div class="row"> <div class="col-xs-12"> <div class="box"> <div class="box-header"> <h3 class="box-title"></h3> </div> <!-- /.box-header --> <?php if(!empty($_REQUEST['msg'])){ echo "<center style='margin-top:20px; color:green;'><h2>".$_REQUEST['msg']."</h2></center>"; } ?> <div class="box-body"> <form id="vnews" action="consultant.php" method="post"> <div class="table-responsive"> <table id="example1" class="table table-bordered table-striped table-responsive"> <thead> <tr> <th>#</th> <th>Sr. No.</th> <th>Doctor Name</th> <th>Qualiication</th> <th>No. of Awards</th> <th>Experience(Year)</th> <th>Department</th> <th>Speciality Interest</th> <th>Phone No.</th> <th>E-mail Id</th> <th>Doctor Image</th> <th>Date</th> <th>Action</th> </tr> </thead> <?php $res= $obj->getTable('consultant','doc_id desc'); if($res){ $i=1; foreach($res as $doc_data){ ?> <tr> <td scope="col"><input type="checkbox" name="mul_del[]" id="mul_del[]" value="<?= $doc_data['doc_id'] ?>" /></td> <td scope="col"><?= $i++ ?></td> <td scope="col"><?= $doc_data['doc_name'] ?></td> <td scope="col"><?= $doc_data['doc_quali'] ?></td> <td scope="col"><?= $doc_data['doc_awards'] ?></td> <td scope="col"><?= $doc_data['doc_experience'] ?></td> <td scope="col"><?= $doc_data['department_id'] ?></td> <td scope="col"><?= $doc_data['doc_speciality'] ?></td> <td scope="col"><?= $doc_data['doc_designation'] ?></td> <td scope="col"><?= $doc_data['doc_phone'] ?></td> <td scope="col"><?= $doc_data['doc_email'] ?></td> <td scope="col"><?= $doc_data['doc_descraption'] ?></td> <td scope="col"><?= date('d M Y',strtotime($doc_data['date'])) ?></td> <td scope="col"><img src="upload/doctor/<?= $doc_data['doc_image'] ?>" width="60" height="60"/></td> <td class="center"> <a class="btn btn-info" href="consultant.php?edit=<?= $doc_data['doc_id']?>"> <i class="glyphicon glyphicon-edit icon-white"></i> Edit </a> <a class="btn btn-danger" href="javascript:muldelete()"> <i class="glyphicon glyphicon-trash icon-white"></i> Delete </a> </td> </tr> <?php } } ?> </table> </div> </form> </div> <!-- /.box-body --> </div> <!-- /.box --> </div> <!-- /.col --> </div> <!-- /.row --> </section> <!-- /.content --> </div> <!-- /.content-wrapper --> <?php include 'include/footer.php'; ?> <div class="control-sidebar-bg"></div> </div> <!-- ./wrapper --> <script src="plugins/jQuery/jQuery-2.1.4.min.js"></script> <script type="text/javascript"> function muldelete() { element_lenght= vnews.elements.length; for(i=0;i<element_lenght;i++) { if(vnews.elements[i].name=="mul_del[]") { if(vnews.elements[i].checked==true) { if(confirm("Are you sure delete record(s)?")) { this.vnews.submit(); break; } } } } } </script> <script src="js/jquery.min.js"></script> <script type="text/javascript" src="js/jquery.mousewheel.min.js"></script> <script type="text/javascript" src="js/jquery.dateselect.js"></script> <script src="js/jquery-ui.min.js"></script> <script> $.widget.bridge('uibutton', $.ui.button); </script> <script src="bootstrap/js/bootstrap.min.js"></script> <script src="plugins/sparkline/jquery.sparkline.min.js"></script> <script src="plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script> <script src="plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script> <script src="plugins/knob/jquery.knob.js"></script> <script src="plugins/datatables/jquery.dataTables.min.js"></script> <script src="plugins/datatables/dataTables.bootstrap.min.js"></script> <script src="plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script> <script src="plugins/slimScroll/jquery.slimscroll.min.js"></script> <script src="plugins/fastclick/fastclick.min.js"></script> <script src="dist/js/app.min.js"></script> <script src="//cdn.ckeditor.com/4.5.9/full/ckeditor.js"></script> <script> CKEDITOR.replace('Discirption'); $.widget.bridge('uibutton', $.ui.button); $(function () { $("#example1").DataTable(); $('#example2').DataTable({ "paging": true, "lengthChange": false, "searching": false, "ordering": true, "info": true, "autoWidth": true }); }); $(function () { $("#example1").DataTable(); $('#example2').DataTable({ "paging": true, "lengthChange": false, "searching": false, "ordering": true, "info": true, "autoWidth": true }); }); </script> <script src="js/core.js"></script> <script src="js/zebra_datepicker.js"></script> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0.06 |
proxy
|
phpinfo
|
Настройка