Beispiel #1
0
<?php

// VORC :: NEWS JP :: CTL
header('Content-Type: text/html; charset=utf-8');
session_start();
require __DIR__ . "/../../vendor/autoload.php";
$VORC = new VORC\Vorc();
switch ($_POST['do']) {
    case 'search':
        //print_r($_POST);
        $WHERE = [];
        $WHERE[] = '1=1';
        $WHERE[] = 'newsbody<>""';
        if ($_POST['search']) {
            $WHERE[] = '(title LIKE ' . $VORC->db()->quote($_POST['search']) . ' OR newsbody LIKE ' . $VORC->db()->quote($_POST['search']) . ')';
        }
        if ($_POST['flag_wiki']) {
            $WHERE[] = 'flag_wiki LIKE "%' . $_POST['flag_wiki'] . '%" ';
        }
        if ($_POST['user']) {
            $WHERE[] = 'user_modified LIKE "' . $_POST['user'] . '" ';
        }
        $WHERE = implode(' AND ', $WHERE);
        // FIND //
        $sql = "SELECT * FROM news_jp WHERE {$WHERE} ORDER BY user_modified DESC;";
        //echo "<pre>$sql</pre>";
        $q = $VORC->db()->query($sql) or die("Error:" . print_r($VORC->db()->errorInfo(), true) . "<hr />{$sql}");
        $htm = [];
        $htm[] = "<table class='table table-condensed table-hover'>";
        $htm[] = "<thead>";
        //$htm[]= "<th>Date</th>";
<?php

// VORC :: NEWS EN
header('Content-Type: text/html; charset=utf-8');
session_start();
require __DIR__ . "/../../vendor/autoload.php";
$admin = new LTE\AdminLte2();
echo $admin;
$VORC = new VORC\Vorc();
$id = $_GET['id'];
$sql = "SELECT * FROM vorc.news_en WHERE nid={$id} LIMIT 1;";
$q = $VORC->db()->query($sql) or die("Error");
$r = $q->fetch(PDO::FETCH_ASSOC);
if (!$r) {
    die("Error");
}
?>
<section class="content-header">
  <h1><i class='fa fa-newspaper-o'></i> NEWS - EN 
  <small>#<?php 
echo $r['nid'];
?>
</small>
  </h1>
</section>

<section class="content">
<?php 
$htm = [];
$htm[] = $VORC->process_en($r['newsbody']);
//$htm[]="<i class='text-muted'>".$r['newsbody']."</i>";
<?php

// VORC :: NEWS INDEX
header('Content-Type: text/html; charset=utf-8');
session_start();
require __DIR__ . "/../../vendor/autoload.php";
$admin = new LTE\AdminLte2();
echo $admin;
$VORC = new VORC\Vorc();
?>
<section class="content-header">
  <h1><i class='fa fa-wikipedia-w'></i> VORC NEWS
  <small>Index</small>
  </h1>
</section>

<section class="content">
<?php 
// Search //
$sql = "SELECT * FROM news_index WHERE 1 ORDER BY nid DESC LIMIT 30;";
$q = $VORC->db()->query($sql) or die("Error:{$sql}");
while ($r = $q->fetch(PDO::FETCH_ASSOC)) {
    echo "<pre>";
    print_r($r);
    exit;
}
$box = new LTE\Box();
$box->id("boxResult");
$box->title("Result");
$box->icon("fa fa-list");
$box->body("...");
<?php

// VORC :: WIKI EN
header('Content-Type: text/html; charset=utf-8');
session_start();
require __DIR__ . "/../../vendor/autoload.php";
$admin = new LTE\AdminLte2();
//$admin->title("news");
echo $admin;
$VORC = new VORC\Vorc();
?>
<section class="content-header">
  <h1><i class='fa fa-wikipedia-w'></i> WIKI - EN 
  <small><?php 
echo $VORC->wikiEnCount();
?>
 pages in VORC wiki EN</small>
  </h1>
</section>


<section class="content">
<?php 
// Search //
include "box_search.php";
$box = new LTE\Box();
$box->id("boxResult");
$box->title("Result");
$box->icon("fa fa-list");
$box->body("...");
echo $box;
<?php

// VORC :: WIKI PAGE EN
header('Content-Type: text/html; charset=utf-8');
session_start();
require __DIR__ . "/../../vendor/autoload.php";
$admin = new LTE\AdminLte2();
//$admin->title("news");
echo $admin;
$VORC = new VORC\Vorc();
$id = $_GET['id'] * 1;
$sql = "SELECT * FROM wiki_jp WHERE id={$id};";
$q = $VORC->db()->query($sql) or die("Error: {$sql}");
$r = $q->fetch(PDO::FETCH_ASSOC);
if (!$r) {
    die("Error : Wiki page not found");
}
?>
<section class="content-header">
  <h1><i class='fa fa-font'></i> <?php 
echo $r['name_wikipage'];
?>
</h1>
</section>


<section class="content">
<?php 
/*
id	varchar(14)
name_wikipage	text	
<?php

// VORC :: TUNES
header('Content-Type: application/json');
session_start();
require __DIR__ . "/../../vendor/autoload.php";
$VORC = new VORC\Vorc();
$dat = [];
switch ($_POST['do']) {
    case 'search':
        //print_r($_POST);
        $dat['POST'] = $_POST;
        $WHERE = [];
        $WHERE[] = '1=1';
        if ($_POST['platform']) {
            $WHERE[] = 'flag_platform LIKE "%' . $_POST['platform'] . '%" ';
        }
        if ($_POST['extension']) {
            $WHERE[] = 'flag_extension LIKE "%' . $_POST['extension'] . '%" ';
        }
        if ($_POST['url']) {
            $WHERE[] = '( url_tune1 LIKE "%' . $_POST['url'] . '%" OR url_tune2 LIKE "%' . $_POST['url'] . '%" )';
        }
        //if($_POST['user'])$WHERE[]='user_modified LIKE "'.$_POST['user'].'" ';
        $WHERE = implode(' AND ', $WHERE);
        $LIMIT = 1000;
        // FIND //
        $sql = "SELECT * FROM tune_index WHERE {$WHERE} ORDER BY tid DESC LIMIT {$LIMIT};";
        $q = $VORC->db()->query($sql) or die("Error:" . print_r($VORC->db()->errorInfo(), true) . "<hr />{$sql}");
        //echo "<pre>$sql</pre>";
        $rows = [];
<?php

// VORC :: WIKI EN
header('Content-Type: text/html; charset=utf-8');
session_start();
require __DIR__ . "/../../vendor/autoload.php";
$admin = new LTE\AdminLte2();
//$admin->title("news");
echo $admin;
$VORC = new VORC\Vorc();
?>
<section class="content-header">
  <h1><i class='fa fa-wikipedia-w'></i> WIKI - JAP
  <small><?php 
echo $VORC->wikiJpCount();
?>
 pages in VORC wiki JAP</small>
  </h1>
</section>


<section class="content">
<?php 
// Search //
include "box_search.php";
$box = new LTE\Box();
$box->id("boxResult");
$box->title("Result");
$box->icon("fa fa-list");
$box->body("...");
echo $box;