예제 #1
0
파일: login.php 프로젝트: kaz6120/Loggix
 */
$pathToIndex = '..';
require_once $pathToIndex . '/lib/Loggix/Application.php';
$app = new Loggix_Application();
$sessionState = $app->getSessionState();
$config = $app->getConfigArray();
$item = $app->setMenuItems($sessionState);
// Logout
if (isset($_REQUEST['status']) == 'logout') {
    $sessionState = $app->getOutOfSession();
    if ($sessionState == 'off') {
        header('Location: ' . $pathToIndex . '/index.php');
    }
}
// Session
if ($sessionState == 'on') {
    header('Location: ' . $pathToIndex . '/index.php');
} else {
    // When session is off...
    $contents = new Loggix_View($pathToIndex . '/theme/admin/login.html');
    $contents->assign('lang', $lang);
    $item['contents'] = $contents->render();
}
// Pager
//--------------------------
$item['pager'] = '';
$item['result'] = '';
// Title
//--------------------------
$item['title'] = $app->setTitle(array());
$app->display($item, $sessionState);
예제 #2
0
 /**
  * @uses   Loggix_Application
  * @uses   Loggix_View
  * @return array $item
  */
 public function getFileNotFoundMessage()
 {
     global $pathToIndex;
     $errorView = new Loggix_View($pathToIndex . Loggix_Core::LOGGIX_THEME_DIR . 'errors/file-not-found.html');
     return array('contents' => $errorView->render(), 'pager' => '', 'result' => '', 'title' => Loggix_Application::setTitle('404 Not Found'));
 }
예제 #3
0
파일: index.php 프로젝트: kaz6120/Loggix
<?php

/**
 * LOGGiX Expander Module
 *
 * @package LOGGiX
 * @author  LOGGiX Project
 * @since   5.5.16
 * @version 8.1.6 
 */
// =============== (( SETTINGS BEGIN )) ===============
$pathToIndex = '../../..';
$title = 'マニュアル';
$cascadeRootTheme = 'No';
// =============== (( SETTINGS   END )) ===============
set_include_path($pathToIndex . '/lib/Loggix/');
require_once 'Application.php';
require_once 'Expander.php';
$app = new Loggix_Application();
$exp = new Loggix_Expander();
$sessionState = $app->getSessionState();
$config = $app->getConfigArray();
$exp->getModuleLanguage();
// Title & Contents
$item = array('title' => $app->setTitle($title), 'contents' => $exp->getContent(), 'pager' => '', 'result' => '');
if ($cascadeRootTheme == 'Yes') {
    $app->display($item, $sessionState);
} else {
    $exp->display($item, $sessionState);
}
예제 #4
0
        $item['show_date_title_yes'] = ' checked="checked"';
        $item['show_date_title_no'] = '';
    } else {
        $item['show_date_title_yes'] = '';
        $item['show_date_title_no'] = ' checked="checked"';
    }
    if ($config['block_ascii_only_text'] == 'yes') {
        $item['block_status_1'] = ' checked="checked"';
        $item['block_status_2'] = '';
    } else {
        $item['block_status_1'] = '';
        $item['block_status_2'] = ' checked="checked"';
    }
    // Load system info view file
    $contents = new Loggix_View($pathToIndex . '/theme/admin/preferences.html');
    $contents->assign('config', $config);
    $contents->assign('item', $item);
    $contents->assign('lang', $lang);
    $item['contents'] = $contents->render();
    // Pager
    //--------------------------
    $item['pager'] = '';
    $item['result'] = '';
    // Title
    //--------------------------
    $item['title'] = $app->setTitle($lang['system_info']);
    $app->display($item, $sessionState);
} else {
    // When session is off...
    header('Location: ../index.php');
}
예제 #5
0
파일: drafts.php 프로젝트: kaz6120/Loggix
        $sql = 'SELECT ' . '* ' . 'FROM ' . LOG_TABLE . ' ' . 'WHERE ' . 'draft = :draft ' . 'ORDER BY ' . 'date DESC ' . 'LIMIT ' . $page . ', ' . $config['page_max'];
        $stmt = $app->db->prepare($sql);
        $res = $stmt->execute(array(':draft' => 1));
        if ($res) {
            $items = array();
            while ($item = $stmt->fetch()) {
                $item = $app->setEntryItems($item);
                $items[] = $item;
            }
            $templateFile = $pathToIndex . '/theme/admin/drafts.html';
            $contentsView = new Loggix_View($templateFile);
            $contentsVars = array('items' => $items, 'lang' => $lang);
            $contentsView->assign($contentsVars);
            //$item['contents'] = $contentsView->render();
            $item['contents'] = $app->plugin->applyFilters('permalink-view', $contentsView->render());
        } else {
            $item['contents'] = '';
        }
        // Pager
        $countSql = 'SELECT COUNT(id) FROM ' . LOG_TABLE . " WHERE draft = '1'";
        $countRes = $app->db->query($countSql);
        $totalItemsCount = $countRes->fetchColumn();
        $item['pager'] = $app->getPager($totalItemsCount, 'all', '', '1');
        $item['result'] = '';
        // Title
        $item['title'] = $app->setTitle($lang['draft']);
        $app->display($item, $sessionState);
    }
} else {
    header('Location: ../index.php');
}
예제 #6
0
        while (false !== ($file = readdir($handle))) {
            if ($file != '.' && $file != '..' && $file != 'index.php' && $file != '.DS_Store') {
                $filePath = $dir . $file;
                $item['file'] = $filePath;
                $item['file_name'] = substr($file, 0, 30) . (strlen($file) >= 30 ? '...' : '');
                $item['file_date'] = date('Y-m-d G:i:s', filectime($filePath));
                $item['file_type'] = filetype($filePath);
                $item['file_size'] = $app->toMegaByte(filesize($filePath));
                $size = getimagesize($filePath);
                $item['width_height'] = $size != null ? $size[0] . '&#215;' . $size[1] : '-';
                $items[] = $item;
            }
        }
        $contents = new Loggix_View($pathToIndex . '/theme/admin/resources.html');
        $contents->assign('items', $items);
        $contents->assign('lang', $lang);
        $item['contents'] = $contents->render();
        //closedir($dir);
    } else {
        $item['contents'] = '';
    }
    $item['pager'] = '';
    $item['result'] = '';
    $item['title'] = $app->setTitle('Resources');
    $app->display($item, $sessionState);
} else {
    header("HTTP/1.0 404 Not Found");
    header("HTTP/1.1 301 Moved Permanently");
    header('Location: ../../index.php');
    exit;
}
예제 #7
0
파일: index.php 프로젝트: kaz6120/Loggix
         $resultTemplate = 'search-result.html';
     }
     // Count the number of hit results
     $totalItemsCount = $app->getTotalItemsCount($countSql);
     if ($totalItemsCount !== '0') {
         // Archive By Date
         if (preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}/', $date) || preg_match('/^[0-9]{4}-[0-9]{2}/', $date)) {
             $result = '';
         } else {
             $item = $app->setSearchItems($totalItemsCount, $previousItemNumber, $date);
             $resultView = new Loggix_View();
             $templateVars = array('item' => $item, 'lang' => $lang);
             $resultView->assign($templateVars);
             $result = $resultView->render($pathToIndex . '/theme/' . $resultTemplate);
         }
         $title = !empty($_GET['t']) ? $app->setTitle(array('Tag', $item['keyword'])) : $app->setTitle($lang['archive']);
         // Title , Contents, Pager, and Results
         $item = array('title' => $title, 'contents' => $app->getArchives($sql), 'pager' => $app->getPager($totalItemsCount, $pageNumberToShow, $date, $expand), 'result' => $result);
         $getLastModifiedSql = $sql;
     } else {
         $e = new Loggix_Exception();
         $item = $e->getArticleNotFoundMessage();
     }
     // (2) Permalink
 } elseif (!empty($_GET['id'])) {
     $id = intval($_GET['id']);
     $getPermalinkSql = 'SELECT ' . '`id`, `title`, `comment`, `date`, `mod`, ' . '`draft`, `allow_comments`, `allow_pings` ' . 'FROM ' . LOG_TABLE . ' AS l ' . 'WHERE ' . "(l.id = '" . $id . "') AND (l.draft = '0')";
     $getPermalinkSql = $app->setDelimitedIdentifier($getPermalinkSql);
     $stmt = $app->db->prepare($getPermalinkSql);
     if ($stmt->execute() == true) {
         $itemArray = $stmt->fetch();
예제 #8
0
파일: users.php 프로젝트: kaz6120/Loggix
        if ($res) {
            header('Location : ' . $_SERVER['PHP_SELF']);
        }
    }
    // Show Tag List
    $sql = 'SELECT * FROM ' . USER_TABLE;
    $res = $app->db->query($sql);
    $tagList = '';
    if ($res) {
        $items = array();
        while ($item = $res->fetch()) {
            $sql2 = 'SELECT ' . 'COUNT(user_id) ' . 'FROM ' . USER_TABLE . ' ' . 'WHERE ' . "user_id = '" . $item['user_id'] . "'";
            $res2 = $app->db->query($sql2);
            $item['number_of_tag'] = $res2->fetchColumn();
            $item['disabled_status'] = $item['user_name'] == $_SESSION['user_name'] ? 'disabled="disabled" ' : '';
            $items[] = $item;
        }
        $contentsView = new Loggix_View($pathToIndex . '/theme/admin/users.html');
        $contentsView->assign('items', $items);
        $contentsView->assign('lang', $lang);
        $item['contents'] = $contentsView->render();
    }
    // Pager
    $item['pager'] = '';
    $item['result'] = '';
    // Title
    $item['title'] = $app->setTitle($lang['log_tag']);
    $app->display($item, $sessionState);
} else {
    header('Location: ../index.php');
}
예제 #9
0
파일: write.php 프로젝트: kaz6120/Loggix
/**
 * Display New Log Entry Form
 *
 * @since   5.5.26
 * @version 9.1.31
 */
$pathToIndex = '..';
require_once $pathToIndex . '/lib/Loggix/Application.php';
$app = new Loggix_Application();
$sessionState = $app->getSessionState();
$config = $app->getConfigArray();
if ($sessionState == 'on') {
    // Contents
    $item['time'] = $app->getDateArray();
    $item['attachments'] = $app->setAttachments();
    $item['tag_cloud'] = $app->getTagCloudArray();
    $smileyButton = new Loggix_View($pathToIndex . '/theme/smiley-button.html');
    $item['smiley_button'] = $smileyButton->render();
    $contents = new Loggix_View($pathToIndex . '/theme/admin/write.html');
    $contents->assign('item', $item);
    $contents->assign('lang', $lang);
    $contents->assign('config', $config);
    $item['contents'] = $contents->render();
    // Pager
    $item['pager'] = '';
    $item['result'] = '';
    $item['title'] = $app->setTitle($lang['new_log']);
    $app->display($item, $sessionState);
} else {
    header('Location: ../index.php');
}
예제 #10
0
파일: edit.php 프로젝트: kaz6120/Loggix
            switch ($item['allow_pings']) {
                case '0':
                    $item['allow_pings_status'] = '';
                    break;
                default:
                    $item['allow_pings_status'] = ' checked="checked"';
                    break;
            }
            // Contents
            $item['attachments'] = $app->setAttachments();
            $item['tag_cloud'] = $app->getTagCloudArray();
            $smileyButton = new Loggix_View($pathToIndex . '/theme/smiley-button.html');
            $smileyButton->assign('relativePath', $pathToIndex);
            $item['smiley_button'] = $smileyButton->render();
            $contents = new Loggix_View($pathToIndex . '/theme/admin/edit.html');
            $contents->assign('item', $item);
            $contents->assign('lang', $lang);
            $contents->assign('config', $config);
            $item['contents'] = $app->plugin->applyFilters('edit-entry', $contents->render());
            // Pager
            $item['pager'] = '';
            $item['result'] = '';
            $item['title'] = $app->setTitle(array($lang['edit'], $item['title']));
            $app->display($item, $sessionState);
        }
    } else {
        header('Location: ../index.php');
    }
} else {
    header('Location: ../index.php');
}