예제 #1
0
$metas = array('title' => '', 'keywords' => '', 'description' => '');
//Global Values
$meta_global = queryDB_array("select * from miscs where groupcode='global' order by sequence asc");
foreach ($meta_global as $value) {
    if (in_array($value['caption'], array_keys($metas))) {
        $metas[$value['caption']] = $value['en'];
    }
}
//Page specific values
$page = explode(".", basename($_SERVER['PHP_SELF']));
//$code_name=array('
switch ($page) {
    case 'footprints':
    case 'people':
    case 'news':
        $meta_specific = queryDB_array("select * from miscs where groupcode='{$page}' order by sequence asc");
        foreach ($meta_specific as $value) {
            if (in_array($value['caption'], array_keys($metas)) && $value['en'] != '') {
                $metas[$value['caption']] = $value['en'];
            }
        }
        break;
    case 'event':
    case 'newsitem':
        $db_name = array('event' => 'events', 'newsitem' => 'news');
        $db_code = array('event' => 'eventid', 'newsitem' => 'newsid');
        $meta_specific = queryDB_row("\n            select `meta-title`,`meta-keywords`,`meta-description` from `{$db_name[$page]}`\n            where `code`='{$argin[$db_code[$page]]}'\n        ");
        foreach ($metas as $key => $value) {
            if ($meta_specific['meta-' . $key] != '') {
                $metas[$key] = $meta_specific['meta-' . $key];
            }
예제 #2
0
파일: index_en.php 프로젝트: geminas/future
                        <div class="gdhbutton buttonblack" style="margin:0;">
                            <a href="footprints_en.php"><?php 
echo findmisc('homepage-footprint-button');
?>
</a>
                        </div>
                    </div>
                </div>

                <div style="width: 100%; padding-bottom: 4%"></div>

                <div class="row" style="margin:0">
                    <!--owl carousel start-->
                    <div id="featured-work" style="">
                        <?php 
$events = queryDB_array("select * from events");
reset($events);
while (list($number, $event) = each($events)) {
    ?>
                        <div class="item">
                            <div class="work-wrap">
                                <div>
                                    <img src="contents/eventthumb_b/<?php 
    echo $event['code'];
    ?>
.jpg" class="img-responsive" style="padding:1px">
                                </div>
                                <div class="img-overlay">
                                    <div class="inner-overlay" style="padding: 8.3%;">
                                        
                                        <div style="height:2px; background-color:#57D9EA; width:100%; margin-bottom: 8%"></div>
예제 #3
0
파일: NewsItems.php 프로젝트: geminas/na2
<?php

//20151016, V3 modified-FFW (API)
//*Initialization, Configuration, and Definition
require_once $_SERVER['DOCUMENT_ROOT'] . "/../app_config/FutureForumWWW.php";
//Include Modules
require_once 'general.php';
//Input argument processing
$argin = processRequestArguments();
//Now do stuff
//When encounter errors, use stopBecause("", optional ERROR_NUMBER default -1);
if (!isset($argin['offset'])) {
    $argin['offset'] = 0;
}
if (!isset($argin['limit'])) {
    $argin['limit'] = 15;
}
$newsRecent = queryDB_array("\r\n    select code,author,abstract,title, DATE_FORMAT(publishTime,'%Y-%c-%e %k:%i') as publishTime from news\r\n    where status <> 0\r\n    order by status desc, publishTime desc\r\n    limit {$argin['offset']} , {$argin['limit']};\r\n");
$newsCount = queryDB_row("select count(*) as total from news where status <> 0");
//*JSON encoding and return
//defaults: 'status'=0, 'data'=array(), 'message'='', 'redirection'='';
produceOutputV3(array('data' => array('newsRecent' => $newsRecent, 'newsCount' => $newsCount)));
예제 #4
0
<?php

//20151016, V3 modified-FFW (API)
//*Initialization, Configuration, and Definition
require_once $_SERVER['DOCUMENT_ROOT'] . "/../app_config/FutureForumWWW.php";
//Include Modules
require_once 'general.php';
//Input argument processing
$argin = processRequestArguments();
//Now do stuff
//When encounter errors, use stopBecause("", optional ERROR_NUMBER default -1);
if (session_status() === PHP_SESSION_NONE) {
    session_start();
}
if (!isset($_SESSION['user_id'])) {
    stopBecause("登录信息有误!", 1);
}
$people_category = queryDB_array("select * from people_category");
$people = queryDB_array("select * from people order by code asc");
$miscs = queryDB_array("select * from miscs where groupcode='people' order by sequence asc ");
//*JSON encoding and return
//defaults: 'status'=0, 'data'=array(), 'message'='', 'redirection'='';
produceOutputV3(array('data' => array('category' => $people_category, 'people' => $people, 'miscs' => $miscs)));
예제 #5
0
파일: LinksGet.php 프로젝트: geminas/future
<?php

//20151016, V3 modified-FFW (API)
//*Initialization, Configuration, and Definition
require_once $_SERVER['DOCUMENT_ROOT'] . "/../app_config/FutureForumWWW.php";
//Include Modules
require_once 'general.php';
//Input argument processing
$argin = processRequestArguments();
//Now do stuff
//When encounter errors, use stopBecause("", optional ERROR_NUMBER default -1);
if (session_status() === PHP_SESSION_NONE) {
    session_start();
}
if (!isset($_SESSION['user_id'])) {
    stopBecause("登录信息有误!", 1);
}
$links = queryDB_array("select * from links order by type asc");
//*JSON encoding and return
//defaults: 'status'=0, 'data'=array(), 'message'='', 'redirection'='';
produceOutputV3(array('data' => array('links' => $links)));
예제 #6
0
<?php

//20151016, V3 modified-FFW (API)
//*Initialization, Configuration, and Definition
require_once $_SERVER['DOCUMENT_ROOT'] . "/../app_config/FutureForumWWW.php";
//Include Modules
require_once 'general.php';
//Input argument processing
$argin = processRequestArguments();
//Now do stuff
//When encounter errors, use stopBecause("", optional ERROR_NUMBER default -1);
if (session_status() === PHP_SESSION_NONE) {
    session_start();
}
if (!isset($_SESSION['user_id'])) {
    stopBecause("登录信息有误!", 1);
}
$events_category = queryDB_array("select * from events_category");
$events = queryDB_array("select \r\n    events.id as id,\r\n    events.code as code,\r\n    category,number,\r\n    `number_zh-cn`,\r\n    number_en,\r\n    `name_zh-cn`,\r\n    `name_en`,\r\n    events.`title_zh-cn` as `title_zh-cn`,\r\n    events.title_en as title_en,\r\n    speaker_name,\r\n    speaker_name_en,\r\n    `meta-title`,\r\n    `meta-keywords`,\r\n    `meta-description`,\r\n    date_string, date_string_en, address, address_en, `text_zh-cn`, `text_en`, youkuID, sequence,\r\n    events_category.`title_zh-cn` as category_title\r\n    from events inner join events_category on events_category.value=events.category\r\n    order by sequence asc");
$miscs = queryDB_array("select * from miscs where groupcode='footprint' order by sequence asc ");
//*JSON encoding and return
//defaults: 'status'=0, 'data'=array(), 'message'='', 'redirection'='';
produceOutputV3(array('data' => array('category' => $events_category, 'events' => $events, 'miscs' => $miscs)));
예제 #7
0
<?php

require_once $_SERVER['DOCUMENT_ROOT'] . "/../app_config/FutureForumWWW.php";
//Include Modules
require_once '~backend/apis/general.php';
$people = queryDB_array("select\n    `name_zh-cn` as `chinesename`,\n    `code` as `latinized`,\n    `category` as `groupcode`,\n    `name_en` as `englishname`,\n    `desc1_en` as `title1`,\n    `desc2_en` as `title2`,\n    `note_en` as `desc`,\n    `quote_en` as `quote`\n    from `people`");
$category = queryDB_array("select * from people_category");
for ($i = 0; $i < count($people); $i++) {
    $people[$i]['group'] = "";
    for ($j = 0; $j < count($category); $j++) {
        if ($people[$i]['groupcode'] & $category[$j]['value']) {
            $people[$i]['group'] .= $category[$j]['code'];
        }
    }
    $people[$i]['group'] = trim(str_replace(".", " ", $people[$i]['group']));
}
//print_r2($people);
$i = rand(0, count($people) - 1);
$j = $i;
while (($j = rand(0, count($people) - 1)) == $i) {
}
echo json_encode(array($people[$i], $people[$j]));
예제 #8
0
파일: news.php 프로젝트: geminas/future
<!DOCTYPE html>


<html>
<head>
    <meta charset="utf-8">
    <meta id="viewport" name="viewport" content="width=device-width">
    
<?php 
include "metalinks.php";
$newsRecommended = queryDB_array("select id,code,title from news where recommendation > 0 and status <> 0 order by publishTime desc limit 10;");
$folder = "contents/news/";
?>
    
    <!-- Bootstrap -->
    <link href="bootstrap/css/bootstrap_1200.css" rel="stylesheet">
    <!-- custom css-->
    <link href="css/style.css" rel="stylesheet" type="text/css" media="screen">
    <link href="css/donghai.css" rel="stylesheet" type="text/css">


</head>

<body style="background-color:#939598; ">
<?php 
require "headermenu.php";
?>
                    
<div class="container" style="padding:30px;">
    <div class="row">
        <div class="col-sm-8">
예제 #9
0
        <link href="css/donghai.css" rel="stylesheet" type="text/css">
</head>

<body>

        
        
    <!--navigation -->
    <!-- Static navbar -->

    <?php 
require "headermenu.php";
$events = queryDB_array("select * from events order by id desc");
reset($events);
$miscs = queryDB_array("select * from miscs where groupcode='footprint' order by sequence asc ");
$events_category = queryDB_array("select * from events_category order by value asc");
?>

        <div class="container">
        <div class="row">
        <div class="GDH-topimage" style="background-image: url('contents/footprint.jpg');">
                    <h2 style="color:white"><?php 
echo findmisc('footprint-bigtitle');
?>
<br><?php 
echo findmisc('footprint-bigtitle', 'en');
?>
</h2>
                    <!-- <div class="cyanbar" style="width:90px; height:4px"></div> -->
                    <div class="divide30"></div>
                    <p style="color:white"><?php 
예제 #10
0
파일: index.php 프로젝트: geminas/future
                        <div class="gdhbutton buttonblack" style="margin:0;">
                            <a href="footprints.php"><?php 
echo findmisc('homepage-footprint-button');
?>
</a>
                        </div>
                    </div>
                </div>

                <div style="width: 100%; padding-bottom: 4%"></div>

                <div class="row" style="margin:0">
                    <!--owl carousel start-->
                    <div id="featured-work" style="">
                        <?php 
$events = queryDB_array("select * from events order by id desc");
reset($events);
while (list($number, $event) = each($events)) {
    ?>
                        <div class="item">
                            <div class="work-wrap">
                                <div>
                                    <img src="contents/eventthumb_b/<?php 
    echo $event['code'];
    ?>
.jpg" class="img-responsive" style="padding:1px">
                                </div>
                                <div class="img-overlay">
                                    <div class="inner-overlay" style="padding: 8.3%;">
                                        
                                        <div style="height:2px; background-color:#57D9EA; width:100%; margin-bottom: 8%"></div>
예제 #11
0
파일: footer.php 프로젝트: geminas/future
<?php

$links1 = queryDB_array("select * from links where type = 1");
$links2 = queryDB_array("select * from links where type = 2");
$links3 = queryDB_array("select * from links where type = 3");
$links4 = queryDB_array("select * from links where type = 4");
$links5 = queryDB_array("select * from links where type = 5");
$links6 = queryDB_array("select * from links where type = 6");
?>

<div class="section">
    <div class="hpsection container GDH-normalpadding">
        <div class="row">
            <div class="col-sm-3" style="margin-bottom:40px">
                <div class="col-xs-12 col-sm-12" style="margin-bottom:40px">
                    <a href="http://www.futureforum.org.cn/" target="_blank"><img src="contents/logo-grey.png" style="width:100%; max-width:300px;"></a>
                </div>
                <div class="col-xs-12 col-sm-12" style="margin-bottom:40px">
                    <div style="background-color:black; width:100%; height:6px"></div>
                    <h3 class="FooterHeader">官方微信订阅号<br>WeChat Subscription</h3>
                    <div style="">
                        <img style="width:100%; max-width:300px" src="contents/wechat.png">
                    </div>
                </div>
            </div>
            <!--footer col-->
            <div class="col-sm-9">
                <div class="row">
                    <div class="col-xs-6 col-sm-3">
                        <div class="row">
                            <div class="col-xs-12 col-sm-12" font-family: 'Microsoft YaHei',"微软雅黑", 'Avenir Next',Avenir,'Helvetica Neue',Helvetica,'Lantinghei SC','Hiragino Sans GB',STHeiti,'WenQuanYi Micro Hei',SimSun,sans-serif;>
예제 #12
0
파일: people.php 프로젝트: geminas/future
        <link href="css/donghai.css" rel="stylesheet" type="text/css">
</head>

<body>

        
        
    <!--navigation -->
    <!-- Static navbar -->

    <?php 
require "headermenu.php";
$people = queryDB_array("select * from people order by code asc ");
reset($people);
$miscs = queryDB_array("select * from miscs where groupcode='people' order by sequence asc ");
$people_category = queryDB_array("select * from people_category order by value asc");
?>



        <div class="container">
        <div class="row">
        <div class="GDH-topimage" style="background-image: url('contents/people.jpg');">
                    <h2 style="color:black"><?php 
echo findmisc('people-bigtitle');
?>
<br><?php 
echo findmisc('people-bigtitle', 'en');
?>
</h2>
                    <!-- <div class="cyanbar" style="width:90px; height:4px"></div> -->
예제 #13
0
파일: newsitem.php 프로젝트: geminas/future
<!DOCTYPE html>


<html>
<head>
    <meta charset="utf-8">
    <meta id="viewport" name="viewport" content="width=device-width">
    
<?php 
include "metalinks.php";
$argin = processRequestArguments();
$newsitem = queryDB_row("select `id`, `code`, `title`, DATE_FORMAT(`publishTime`,'%Y-%m-%d %H:%i:%s') as `publishTime`, `editorValue`, `abstract`, `recommendation`, `author`, `status`, `keywords`, `meta-title`, `meta-keywords`, `meta-description` from news where id='{$argin['newsid']}' and status <> 0");
$newsRecommended = queryDB_array("\r\n    select id,code,title from news\r\n    where recommendation > 0 and status <> 0\r\n    order by recommendation desc, publishTime desc\r\n    limit 10;\r\n");
if (!isset($newsitem['code'])) {
    header('Location: ./news.php');
}
$folder = "contents/news/";
?>
    
    <!-- Bootstrap -->
    <link href="bootstrap/css/bootstrap_1200.css" rel="stylesheet">
    <!-- custom css-->
    <link href="css/style.css" rel="stylesheet" type="text/css" media="screen">
    <link href="css/donghai.css" rel="stylesheet" type="text/css">


    
</head>

<body style="background-color:#939598; ">
<?php 
예제 #14
0
파일: ActionGet.php 프로젝트: geminas/na2
<?php

//20151016, V3 modified-FFW (API)
//*Initialization, Configuration, and Definition
require_once $_SERVER['DOCUMENT_ROOT'] . "/../app_config/FutureForumWWW.php";
//Include Modules
require_once 'general.php';
//Input argument processing
$argin = processRequestArguments();
//Now do stuff
//When encounter errors, use stopBecause("", optional ERROR_NUMBER default -1);
if (session_status() === PHP_SESSION_NONE) {
    session_start();
}
if (!isset($_SESSION['user_id'])) {
    stopBecause("登录信息有误!", 1);
}
//*JSON encoding and return
//defaults: 'status'=0, 'data'=array(), 'message'='', 'redirection'='';
produceOutputV3(array('data' => array('actions' => queryDB_array("select * from actions"))));
예제 #15
0
파일: rss.php 프로젝트: geminas/future
<?php

ob_start();
require_once 'general.php';
ob_end_clean();
class SimpleXMLExtended extends SimpleXMLElement
{
    public function addCData($cdata_text)
    {
        $node = dom_import_simplexml($this);
        $no = $node->ownerDocument;
        $node->appendChild($no->createCDATASection($cdata_text));
    }
}
$items = queryDB_array("\n\t    select id,code,author,abstract,title, DATE_FORMAT(publishTime,'%Y-%m-%d %H:%i:%s') as publishTime from news\n\t    where status <> 0\n\t    order by status desc, publishTime desc;\n\t");
// $xml = new SimpleXMLElement('<rss version="2.0"/>');
$rss = new SimpleXMLExtended('<rss version="2.0"/>');
$channel = $rss->addChild('channel');
$channel->addChild('title', "未来论坛");
$channel->addChild('description', "未来论坛RSS");
$channel->addChild('link', "http://www.futureforum.org.cn/");
foreach ($items as $item) {
    $itemXml = $channel->addChild('item');
    $itemXml->addChild('title', "{$item['title']}");
    $itemXml->addChild('link', "http://www.futureforum.org.cn/news/{$item['id']}.html");
    $itemXml->addChild('author', "{$item['author']}");
    $itemXml->addChild('pubDate', "{$item['publishTime']}");
}
Header('Content-type: text/xml');
$c = $channel->asXML();
print $c;