Exemplo n.º 1
0
 function post()
 {
     $users = new UsersData();
     if ($users->checkPass() && !$users->authNeeded()) {
         $nav = new NavigationData();
         $nav->updateData($_POST);
         header('Location: /admin/nav/?updated=true');
     } else {
         include_once '401.html';
     }
 }
Exemplo n.º 2
0
<?php

include_once 'header.php';
$navigationData = new NavigationData();
$data = $navigationData->getData();
?>
<div class="container">
    <div class="row">
        <div class="col-lg-12">
            <h2 class="page-header">Content editing for navigation text</h2>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-12">
            <form action="/admin/nav/update/" method="post" class="form-horizontal">
                <?php 
foreach ($data as $key => $datum) {
    ?>
                    <div class="form-group">
                        <?php 
    $desc = $datum['description'];
    if ($desc == '') {
        $desc = 'add description';
    }
    ?>
                        <label for="<?php 
    echo $key;
    ?>
" class="col-lg-2 col-sm-2 control-label"><a id="desc-<?php 
    echo $key;
Exemplo n.º 3
0
 function post($action = null)
 {
     $users = new UsersData();
     if ($action == 'process' && $users->checkPass() && !$users->authNeeded()) {
         DashboardUtils::backupFiles($_POST['files']);
         MinimizeTools::minimizeHTMLFiles($_POST['files']);
         new AnalyticsData();
         new MediaData();
         new SettingsData();
         $rss = new RSSData();
         $rss->buildDataFile($_POST['files']);
         $nav = new NavigationData();
         $nav->buildDataFile($_POST['files']);
         $blog = new BlogData();
         $blog->buildDataFile($_POST['files']);
         $footer = new FooterData();
         $footer->buildDataFile($_POST['files']);
         $pages = new PagesData();
         $pages->buildDataFile($_POST['files']);
         DashboardUtils::renameFiles($_POST['files']);
         DashboardUtils::copyApacheConfig();
         DashboardUtils::createXMLSiteMap();
         $logsData = new LogsData();
         $logsData->addToLog('has initiated the CMS on the following files:', implode(" ", $_POST['files']));
         header('Location: /admin/');
     } else {
         include_once '401.html';
     }
 }