Esempio n. 1
0
require_once '../inc/mysql.inc.php';
require_once '../inc/soup.inc.php';
require_once '../inc/utils.inc.php';
$num = isset($_GET['num']) ? strip_tags(mysql_escape_string($_GET['num'])) : 1;
$SoupDao = new SoupDao();
$soup = $SoupDao->findById($num);
if ($soup == null) {
    echo "<script>location.href='http://soup.setin.cn/';</script>";
    exit;
}
$nextid = $SoupDao->searchNextArticleID($num);
$preid = $SoupDao->searchPreArticleID($num);
Mysql::close();
$title = substr_ext($soup['content'], 0, 30);
$title = preg_replace("/\\s/", "", $title);
$descrip = substr_ext($soup['content'], 0, 100);
$descrip = preg_replace("/\\s/", "", $descrip);
?>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <meta name="renderer" content="webkit" />
        <meta http-equiv="Cache-Control" content="no-siteapp" />
        <meta http-equiv="Cache-Control" content="no-transform " /> 
        <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta name="keywords" content="心灵鸡汤,<?php 
echo $soup['j_tag'];
?>
" />
        <meta name="description" content="<?php 
Esempio n. 2
0
<?php

require_once '../inc/mryw.inc.php';
require_once '../inc/utils.inc.php';
$mryw = new Mryw();
$cnt = $mryw->count_all();
$num = rand(0, $cnt * 2) % $cnt;
$data = $mryw->random_one($num);
$descrip = substr_ext(strip_tags($data['m_content']), 0, 80);
$descrip = preg_replace("/\\s/", "", $descrip);
$data['m_content'] = $descrip . '...';
$data['m_pic'] = 'http://pomelo-setin.stor.sinaapp.com/' . rand(1, 4751) . '.jpg';
echo json_encode($data);
Mysql::close();
Esempio n. 3
0
} else {
    $mryw = $mryw_dao->find_by_id($num);
}
if ($mryw == false) {
    echo "<script>location.href='http://www.setin.cn/';</script>";
    exit;
}
$num = $mryw['m_id'];
$nextid = $mryw_dao->search_next_article_id($num);
$preid = $mryw_dao->search_prev_article_id($num);
$total_num = $mryw_dao->count_all();
if ($total_num == false) {
    $total_num = 0;
}
Mysql::close();
$descrip = substr_ext(strip_tags($mryw['m_content']), 0, 100);
$descrip = preg_replace("/\\s/", "", $descrip);
?>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <meta name="renderer" content="webkit" />
        <meta http-equiv="Cache-Control" content="no-siteapp" />
        <meta http-equiv="Cache-Control" content="no-transform " /> 
        <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta name="keywords" content="每日一文,经典美文,每日经典美文,全网最全面的美文数据库,<?php 
echo $mryw['m_title'];
?>
,<?php 
echo $mryw['m_author'];
Esempio n. 4
0
require_once '../inc/mysql.inc.php';
require_once '../inc/joke.inc.php';
require_once '../inc/utils.inc.php';
$num = isset($_GET['num']) ? strip_tags(mysql_escape_string($_GET['num'])) : 1;
$Jokedao = new Joke();
$Joke = $Jokedao->find_by_id($num);
if ($Joke == null) {
    echo "<script>location.href='http://joke,setin.cn/';</script>";
    exit;
}
$nextid = $Jokedao->searchNextArticleID($num);
$preid = $Jokedao->searchPreArticleID($num);
Mysql::close();
$title = substr_ext($Joke['j_content'], 0, 30);
$title = preg_replace("/\\s/", "", $title);
$descrip = substr_ext($Joke['j_content'], 0, 100);
$descrip = preg_replace("/\\s/", "", $descrip);
?>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <meta name="renderer" content="webkit" />
        <meta http-equiv="Cache-Control" content="no-siteapp" />
        <meta http-equiv="Cache-Control" content="no-transform " /> 
        <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta name="keywords" content="笑话,文字笑话,笑话大全,笑话数据库,全网最全面的笑话数据库,<?php 
echo $Joke['j_tag'];
?>
" />
        <meta name="description" content="<?php 
Esempio n. 5
0
                            <?php 
    }
    ?>
                        </td>
                        <td><?php 
    echo trans_date_format($row['book_date'], "Y-m-d H:i");
    ?>
</td>
                        <?php 
    if ($row['is_show'] == 1) {
        ?>
                        <td <?php 
        echo $row['name'] ? '' : 'class="text-danger"';
        ?>
 ><?php 
        echo $row['name'] ? str_pad(substr_ext($row['name'], 0, 1), 5, '*', STR_PAD_RIGHT) : '无预约';
        ?>
</td>
                        <td <?php 
        echo $row['name'] ? '' : 'class="text-danger"';
        ?>
 ><?php 
        echo $row['phone'] ? str_pad(substr($row['phone'], -4), 11, '*', STR_PAD_LEFT) : '无预约';
        ?>
</td>
                        <?php 
    } else {
        ?>
                        <td>已看</td>
                        <td>已看</td>
                        <?php