/var/www/hkosl.com/chineseaaedu/tc/index.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<? include('_init.php');?>
<?
//
$sql "SELECT name_".$lang." as `name`,intro_".$lang." as `intro`,photo FROM banner WHERE type = '1' LIMIT 1";
$sth1 $dbh->prepare($sql);
$sth1->execute();
$row_index_banner $sth1->fetch(PDO::FETCH_ASSOC);
//
$sql "SELECT desc_".$lang." as `desc`,photo FROM page WHERE refid = '1' LIMIT 1";
$sth1 $dbh->prepare($sql);
$sth1->execute();
$row_page $sth1->fetch(PDO::FETCH_ASSOC);
//
$sql "SELECT * FROM video WHERE refid = '1' LIMIT 1";
$sth1 $dbh->prepare($sql);
$sth1->execute();
$row_video $sth1->fetch(PDO::FETCH_ASSOC);
//
$sql "SELECT refid,title_".$lang." as title,intro_".$lang." as intro FROM `news` where status = ? and deleted = ? and date >= ? and (display_date_from <= ? and ? <= display_date_to) order by date desc limit 3";
$sth1 $dbh->prepare($sql);
$parameter = array(1,0,date('Y-m-d'),date('Y-m-d'),date('Y-m-d'));
$sth1->execute($parameter);
while (
$row_news $sth1->fetch(PDO::FETCH_ASSOC)) {
    
$rows_news[] = $row_news;
}

?>
<!DOCTYPE html>
<html lang="<?=$lang?>">
<head>
  <? include('_head.php');?>
</head>

<body>
      <? include('_header.php');?>
    <!-- Header -->
    <div class="intro-header" style="background-image:url(../file/banner/<?=$row_index_banner['photo']?>)">
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <div class="intro-message">
                        <h1><?=$row_index_banner['name']?></h1> <br>
                        <h3 style="text-align:left;"><?=nl2br($row_index_banner['intro'])?></h3>
                        <br><br>
                    </div>
                </div>
            </div>

        </div>
    </div>


<!-- About Us -->
<div class="Section">
  <div class="row">
    <div class="col-md-6" id="AboutImg" style="background-image:url(../file/page/<?=$row_page['photo']?>)">
    </div>

    <div class="col-md-6">

      <div class="AboutUs">
        <h11>關於我們</h11> <br><br>
        <?=$row_page['desc']?>
        <br><br>
        <a href="aboutus.php" class="myButton">更多</a>
      </div>
    </div>
  </div>
</div>

<!-- Latest News -->
<? if(is_array($rows_news)){?>
<div class="LatestNews">
  <div class="container">
    <div class="row">
      <br><h13>最新消息</h13><br>
          <? foreach($rows_news as $row_news){?>
        <div class="col-md-4">
          <br><br>
          <div class="NewsCol">
            <img src="../img/homepage/newsRocket.png"><br><br>
            <h12><?=$row_news['title']?></h12><br><br>
            <?=$row_news['intro']?>
            <br><br>
            <a href="news_detail.php?refid=<?=$row_news['refid']?>" class="myButton">更多</a>            
          </div>          
        </div>
        <? }?>

        
    </div>  
  </div>
</div>
<? }?>
<!-- Video -->
<? if($row_video['youtubelink']){?>
<div class="SectionC">
  <div class="row">
    <div class="col-md-6">
      <div class="videoWrapper">
        <iframe width="560" height="349"  src="https://www.youtube.com/embed/<?=$row_video['youtubelink']?>" frameborder="0" allowfullscreen></iframe>
      </div>
    </div>

    <div class="col-md-6" >

      <div class="AboutUs">
        <h11><?=$row_video['name_'.$lang]?></h11> <br><br>
        <?=nl2br($row_video['desc_'.$lang])?>
        <br><br>
      </div>
    </div>
  </div>
</div>
<? }?>
<? 
include('_footer.php');?>
  </body>
</html>