示例#1
0
/**
 * simpleblog v1.0.0
 *
 * http://www.simplecss3.com
 * Author: Oj Obasi
 *
 * Licensed under the GNU General Public License (GPL)
 * http://opensource.org/licenses/gpl-license.html
 *
 *  Date: Tues June 30 12:00:00 2015
 * Copyright 2015, simplecss3.com
 *
 */
require_once "inc/config.php";
require_once ROOT_PATH . "inc/files.php";
$all_blogs = get_all_blogs();
$pageTitle = "Simple Blog Build in PDO";
$pageDesc = "Simple Blog Build in PDO";
$section = "home";
include ROOT_PATH . 'inc/header.php';
?>

<h3>DEMO LOGIN WITH :</h3>
<strong>Username : </strong> admin <br>
<strong>password : </strong> admin <br>
<a href="<?php 
echo BASE_URL;
?>
admin/login.php">Click here to Login or register an account to test the blog system.</a><br>
<hr>
<strong><i class="fa fa-list-alt"></i> Published Blogs:</strong>
示例#2
0
 * @param file=true to save data to file / false by default
 * @return csv data
 */
require_once "./wp-load.php";
require_once "./wp-admin/admin.php";
header('Content-Type: application/json');
$inFile = $_GET['file'];
if ($inFile == 'true') {
    header("Content-Disposition: attachment; filename=\"report.csv\";");
    header("Content-Transfer-Encoding: binary");
}
$contentType = $_GET['query'];
ob_end_clean();
switch ($contentType) {
    case "blogs":
        get_all_blogs();
        break;
    case "pages":
        get_all_pages();
        break;
    case "posts":
        get_all_posts();
        break;
    case "tags":
        get_all_tags();
        break;
    case "users":
        get_all_users();
        break;
    case "administrators":
        get_all_users("administrator");