%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
<div id="content-wrapper"> <div class="container-fluid"> <!-- Breadcrumbs--> <ol class="breadcrumb"> <li class="breadcrumb-item"> <a href="<?php echo site_url('admin/Dashboard'); ?>"><i class="fas fa-fw fa-tachometer-alt"></i> Dashboard</a> </li> <li class="breadcrumb-item active"> Custom Files</li> </ol> <!-- DataTables Example --> <div class="card mb-3 fomr-news"> <div class="card-header card-header-new"><h3> <i class="fa fa-bars"></i> Custom Files </h3> <a href="javascript:void(0);" data-toggle="modal" data-target="#add_edit_customfile_module" class="btn btn-primary btn-xs pull-right linkstylebox" style="margin-bottom:10px; float:right; margin-right:10px"><b>+</b> Add File</a> </div> <div class="clearfix"></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>#ID</th> <th>Title</th> <th>Image</th> <th>Url</th> <th>Status</th> <th class="text-center">Action</th> </tr> </thead> <?php if($customFiles) { $count= 1; foreach ($customFiles as $file) { ?> <tr> <td><?= $count++ ?></td> <td><?= $file['title'] ?></td> <td><a target="_blank" href="<?= base_url('attachments/custom_files/'.$file['file_names']) ?>"><img src="<?= base_url('attachments/custom_files/'.$file['file_names']) ?>" style="width:20%"></a></td> <td><?= base_url('attachments/custom_files/'.$file['file_names']) ?></td> <td><?= $file['status']=='1' ? 'Active' : 'Inactive' ?></td> <td class="text-center"> <div> <a href="?edit=<?= $file['id'] ?>"><span class="fa fa-edit" aria-hidden="true"></span></a> <a href="?delete=<?= $file['id'] ?>" class="confirm-delete"><span class="fa fa-trash" aria-hidden="true"></span></a> </div> </td> </tr> <?php }} else { ?> <tr><td colspan="5">No file found!</td></tr> <?php } ?> </table> </div> </div> </div> <!-- add edit users --> <div class="modal fade" id="add_edit_customfile_module" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class="modal-dialog" role="document"> <div class="modal-content"> <form action="" method="POST" 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"><?php if(isset($_GET['edit'])) { ?> Edit <?php } else { ?> Add New<?php } ?> 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">Title</label> <input type="text" name="title" placeholder = 'File Title' class="form-control" value="<?= isset($_POST['title']) ? $_POST['title'] : '' ?>" id="title" required> </div> <div class="form-group bordered-group"> <?php if (isset($_POST['file_names']) && $_POST['file_names'] != null) { $image = 'attachments/custom_files/' . $_POST['file_names']; if (!file_exists($image)) { $image = 'attachments/no-image.png'; } ?> <p>Existing File:</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['file_names'] ?>"> <?php if (isset($_GET['to_lang'])) { ?> <input type="hidden" name="file_names" id="file_names" value="<?= $_POST['file_names'] ?>"> <?php } } ?> <label for="userfile">File</label> <input type="file" id="file_names" name="file_names" /> </div> </div> <div class="modal-footer"> <input type="hidden" name="status" id="status" value="1" /> <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> </div> <script> <?php if (isset($_GET['edit'])) { ?> $(document).ready(function () { $("#add_edit_customfile_module").modal('show'); }); <?php } ?> </script>