示例#1
0
<?php

$config = new Config();
$ne = new NewsAndEvent();
$news = $ne->getNEList('news');
$events = $ne->getNEList('event');
$client = new Clients();
$clients = $client->getClinets();
$sponcer = new Sponcer();
$sponcers = $sponcer->getSponcer('sponcer-girl');
$pm = new PageManager();
?>
<!-- Start main-content -->
    <div class="main-content">
        <!-- Section: home -->
		<section>
            <div class="container pb-0">
                <div class="section-title text-center mb-0">
                    <div class="row">
                        <div class="col-md-12">
                            <h3 class="text-uppercase mt-0">WomenLine</h3>
                            <div class="title-icon">
                                <i class="flaticon-hand221"></i>
                            </div>
                           		<div class="col-lg-10 col-md-9 col-sm-6 text-left">
                           			<p><?php 
echo substr(strip_tags($pm->setPage('introduction')->getPageInfo('page-content')), 0, 250);
?>
...</p>
                           		</div>
                           		<div class="col-lg-2 col-md-3 col-sm-6">
示例#2
0
<?php

include '../core/includes.php';
$config = new Config();
$dir = realpath(root . DIRECTORY_SEPARATOR . "assets" . DIRECTORY_SEPARATOR . "images" . DIRECTORY_SEPARATOR . "news");
$fileobj = new File($dir);
$ne = new NewsAndEvent();
if ($_REQUEST['action'] == 'add_ne') {
    $uid = uniqid();
    if ($ne->createNE($uid, $_REQUEST['name'], $_REQUEST['type'])) {
        Message::setSuccessMessage("News/Event added successfully");
        header("location:" . $config->site_address . "news-event-admin/edit/" . $uid);
    } else {
        Message::setFailMessage("Something went wrong please try again. ");
        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'])) {
示例#3
0
<?php

$config = new Config();
$ne = new NewsAndEvent();
$news = $ne->getNEList('news');
$url = new URL();
$id = $url->getRequestedItem();
?>
<section class="inner-header divider layer-overlay overlay-dark" data-bg-img="images/bg/bg4.jpg">
    <div class="container pt-30 pb-30">
        <!-- Section Content -->
        <div class="section-content text-center">
            <div class="row">
                <div class="col-md-6 col-md-offset-3 text-center">
                    <h2 class="text-orange font-36">{{title}}</h2>
                    <ol class="breadcrumb text-center mt-10 white">
                        <li ng-repeat="crud in breadcrumb" ng-class="{active:crud.active}">
                            <a href="{{crud.link}}">{{crud.title}}</a>
                        </li>
                    </ol>
                </div>
            </div>
        </div>
    </div>
</section>
<section>
    <div class="container">
        <div class="row">
            
            <?php 
if ($url->getRequestedItem() == 'index' || !$ne->isNews($url->getRequestedItem())) {
示例#4
0
<?php

$config = new Config();
$url = new URL();
$ne = new NewsAndEvent();
$item_list = $ne->getNEList();
$id = $url->getRequestedItem();
echo Comman::loadView('admin-header');
if ($url->getRequestedFunction() != 'edit') {
    ?>
<div class="container">
	<div class="row">
		<div class="col-md-4 col-md-offset-4">
			<div class="panel">
				<div class="panel-heading">
					<div class="panel-title">Add news/event</div>
				</div>
				<div class="panel-body">
                	<form action="<?php 
    echo Comman::getController('newsandevent');
    ?>
?action=add_ne" method="post">
	                	<label for="name">Name</label>
	                    <input type="text" required name="name" id="name" placeholder="Name" class="form-control">
	                    <label for="type">Type</label>
	                    <select class="form-control" name="type" id="type">
	                    	<option value="news">News</option>
	                    	<option value="event">Event</option>
	                    </select>
	                    <button type="submit" class="btn btn-primary" style="margin-top: 10px;">Create</button>
                    </form>