header("location:" . $config->site_address . "news-event-admin/"); } } else { if ($_REQUEST['action'] == 'edit_e') { $id = $_REQUEST['id']; if ($ne->updateEvent($id, $_REQUEST['name'], $_REQUEST['time'], $_REQUEST['venue'], $_REQUEST['desc'])) { Message::setSuccessMessage("Event updated successfully"); header("location:" . $config->site_address . "news-event-admin/"); } else { Message::setFailMessage("Something went wrong please try again."); header("location:" . $config->site_address . "news-event-admin/edit/" . $id); } } else { if ($_REQUEST['action'] == 'edit_n') { $id = $_REQUEST['id']; $file = $ne->getNEInfo($id, 'cover'); if (!Validation::isNull($_FILES['cover']['name'])) { $fileobj->deleteFile($file); $file = uniqid() . "." . pathinfo(basename($_FILES['cover']['name']), PATHINFO_EXTENSION); $fileobj->uploadFile($file, $_FILES['cover']['tmp_name']); } if ($ne->updateNews($id, $_REQUEST['name'], $file, $_REQUEST['desc'])) { Message::setSuccessMessage("News updated successfully"); header("location:" . $config->site_address . "news-event-admin/"); } else { Message::setFailMessage("Something went wrong please try again."); header("location:" . $config->site_address . "news-event-admin/edit/" . $id); } } else { if ($_REQUEST['action'] == 'del_ne') { if ($ne->deleteNE($_REQUEST['id'])) {
$i = 0; foreach ($news as $id) { ?> <div class="item"> <article class="post clearfix maxwidth600 mb-sm-30"> <div class="entry-header"> <div class="post-thumb thumb"> <a href="<?php echo $config->site_address; ?> news/<?php echo $id; ?> "> <img src="<?php if ($ne->getNEInfo($id, 'cover') != "") { echo "images/news/" . $ne->getNEInfo($id, 'cover'); } else { echo noimage; } ?> " alt="" class="img-responsive img-fullwidth"> </a> </div> </div> <div class="entry-content border-1px p-20"> <h5 class="entry-title mt-0 pt-0"><a href="<?php echo $config->site_address; ?> news/<?php
</div> <div class="panel-body"> <table class="table table-responsive table-hover table-bordered table-stripped"> <thead> <tr> <th>Sr.No.</th> <th>Name</th> <th>Type</th> <th>Action</th> </tr> </thead> <tbody> <?php $i = 0; foreach ($item_list as $item) { $item_type = $ne->getNEInfo($item, 'type'); $item_name = $ne->getNEInfo($item, 'title'); ?> <tr> <td><?php echo ++$i; ?> </td> <td><?php echo $item_name; ?> </td> <td><?php if ($item_type == 'news') { echo "News"; } else {