%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
<?php $banner_type_array = unserialize(BANNER_TYPE); $category = array('1'=>'SU Banner', '2'=>'Gallery', '3'=>'Placement Overview'); ?> <script src="<?= base_url('assets/ckeditor/ckeditor.js') ?>"></script> <div id="content-wrapper"> <div class="container-fluid"> <!-- Breadcrumbs--> <ol class="breadcrumb"> <li class="breadcrumb-item"> <a href="<?php echo site_url('admin/home'); ?>">Dashboard</a> </li> <li class="breadcrumb-item active">Manage Videos</li> </ol> <!-- DataTables Example --> <div class="card mb-3 fomr-news"> <div class="card-header card-header-new"><h3> <i class="fas fa-table"></i> Videos Details </h3> <a href="javascript:void(0);" data-toggle="modal" data-target="#add_edit_albums" class="btn btn-default" style="margin-bottom:10px;"> Add Video Files</a> </div> </div> <div class="card-body"> <div class="table-responsive"> <!---- Success Message ----> <?php if ($this->session->flashdata('success')) { ?> <p style="color:green; font-size:18px;"><?php echo $this->session->flashdata('success'); ?></p> </div> <?php } ?> <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0"> <thead> <tr> <th>#</th> <th>Video Title</th> <th>Video Url</th> <th>Category</th> <th>Display Order</th> <th>Status</th> <th>Action</th> </tr> </thead> <tfoot> <tr> <th>#</th> <th>Video Title</th> <th>Video Url</th> <th>Category</th> <th>Display Order</th> <th>Status</th> <th>Action</th> </tr> </tfoot> <tbody> <?php if(count($videos)) : $cnt=1; foreach ($videos as $row) : $video_id = explode("?v=",$row['youtube_url']); $video_id = $video_id[1]; $thumbnail="http://img.youtube.com/vi/".$video_id."/maxresdefault.jpg"; ?> <tr> <td><?php echo htmlentities($cnt);?></td> <td><?php echo $row['video_name']?></td> <td><img src="<?= $thumbnail ?>" width="100px" height="90px"/> </td> <td><?= $category[$row['video_type']]?> </td> <td><?= $row['display_order'] ?> </td> <td><?= $row['status']=='1' ? 'Active' : 'Inactive' ?></td> <td> <a href="?edit=<?= $row['id'] ?>"><span class="fa fa-edit"></span></a> <a href="?delete=<?= $row['id'] ?>" class="confirm-delete"><span class="fa fa-trash confirm-delete"></span></a> </td> </tr> <?php $cnt++; endforeach; else : ?> <tr> <td colspan="8">No album found</td> </tr> <?php endif; ?> </tbody> </table> </div> </div> </div> <!-- /.container-fluid --> <!-- Sticky Footer --> <!--Add /Edit menu modal--> <div class="modal fade" id="add_edit_albums" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class="modal-dialog" role="document"> <div class="modal-content"> <form action="" method="POST" name="su_video" id="su_video" enctype="multipart/form-data"> <div class="modal-header"> <button type="button" class="close" <?php if(isset($_GET['edit'])) { ?> onClick="history.go(-1)" <?php } else { ?> data-dismiss="modal" aria-label="Close" <?php } ?>><span aria-hidden="true">×</span></button> <h4 class="modal-title" id="myModalLabel">Add New Video file</h4> </div> <?php if (validation_errors()) { ?> <div class="alert alert-danger"><?= validation_errors() ?></div> <?php } ?> <div class="modal-body"> <input type="hidden" name="edit" value="<?= isset($_GET['edit']) ? $_GET['edit'] : '0' ?>"> <div class="form-group"> <label for="email">Video Name</label> <input type="text" name="video_name" placeholder = 'Video Name' class="form-control" value="<?= isset($_POST['video_name']) ? $_POST['video_name'] : '' ?>" id="video_name" maxlength="245"> </div> <div class="form-group"> <label for="assign_role">Video For</label> <select class="form-control" name="video_type" id="video_type"> <option value=""> -- Select Video For -- </option> <option value="1" <?php if(@$_POST['video_type']=='1') { echo 'selected = "selected"'; }?>>SU Banner</option> <option value="2" <?php if(@$_POST['video_type']=='2') { echo 'selected = "selected"'; }?>>Gallery</option> <option value="2" <?php if(@$_POST['video_type']=='3') { echo 'selected = "selected"'; }?>>Placement Overview</option> </select> </div> <div class="form-group bordered-group"> <?php if (isset($_POST['video_file']) && $_POST['video_file'] != null) { $image = 'attachments/video_files/' . $_POST['video_file']; if (!file_exists($image)) { $image = 'attachments/no-image.png'; } ?> <p>Existing Video Link:</p> <div> <img src="<?= base_url($image) ?>" class="img-responsive img-thumbnail" style="max-width:80px; margin-bottom: 5px;"> </div> <input type="hidden" name="old_image" value="<?= $_POST['video_file'] ?>"> <input type="hidden" name="video_file" id="video_file" value="<?= $_POST['video_file'] ?>"> <?php } ?> <label for="userfile">Video Files</label> <input type="file" id="video_file" name="video_file" /> </div> <div class="form-group"> <label for="email">Video Youtube URL</label> <input type="text" name="youtube_url" class="form-control" id="youtube_url" value="<?= isset($_POST['youtube_url']) ? $_POST['youtube_url'] : '' ?>" placeholder = "Youtube URL" maxlength="199"> </div> <div class="form-group"> <label for="email">Video Text</label> <textarea name="video_text" class="form-control" id="video_text" > <?= isset($_POST['video_text']) ? $_POST['video_text'] : '' ?></textarea> </div> <div class="form-group"> <label for="email">Slug</label> <input type="text" name="video_url" placeholder = 'Slug' class="form-control" value="<?= isset($_POST['video_url']) ? $_POST['video_url'] : '' ?>" id="video_url" maxlength="200"> </div> <div class="form-group"> <label for="password">Video Code</label> <input type="text" name="video_code" class="form-control" value="<?= isset($_POST['video_code']) ? $_POST['video_code'] : '' ?>" id="video_code" maxlength='45'> </div> <div class="form-group"> <label for="assign_role">Display Order</label> <input type="text" name="display_order" class="form-control" value="<?= isset($_POST['display_order']) ? $_POST['display_order'] : '' ?>" id="display_order" maxlength='5' > </div> <div class="form-group"> <label for="assign_role">Status</label> <select class="form-control" name="status" id="status"> <option value=""> -- Select Status -- </option> <option value="1" <?php if(@$_POST['status']=='1') { echo 'selected = "selected"'; }?>>Active</option> <option value="0" <?php if(@$_POST['status']=='0') { echo 'selected = "selected"'; }?>>Inactive</option> </select> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" <?php if(isset($_GET['edit'])) { ?> onClick="history.go(-1)" <?php } else { ?> data-dismiss="modal" <?php } ?>>Cancel</button> <input type="submit" class="btn btn-primary" value="Save"> </div> </form> </div> </div> </div> <!--Add /Edit menu modal--> <script> <?php if (isset($_GET['edit'])) { ?> $(document).ready(function () { $("#add_edit_albums").modal('show'); }); <?php } ?> </script>