/var/www/hkosl.com/chineseaaedu/en/eventsphoto_detail.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
<? include('_init.php');?>
<?
$id 
intval($_GET['id']);
//
$sql "SELECT name_".$lang." as `name`,intro_".$lang." as `intro`,photo FROM bannerSingle WHERE refid = '4' LIMIT 1";
$sth1 $dbh->prepare($sql);
$sth1->execute();
$row_banner $sth1->fetch(PDO::FETCH_ASSOC);
//
$sql "SELECT refid,title_".$lang." as title,desc_".$lang." as `desc`,date
        FROM `event` where refid = ? order by date desc limit 1"
;
$sth1 $dbh->prepare($sql);
$parameter = array($id);
$sth1->execute($parameter);
$row_event $sth1->fetch(PDO::FETCH_ASSOC);
//
//
$sql "SELECT file_name
        FROM `upload_file` where for_table = ? and deleted = ? and for_refid = ? order by createdate desc"
;
$sth1 $dbh->prepare($sql);
$parameter = array('event',0,$id);
$sth1->execute($parameter);
while (
$row_photo $sth1->fetch(PDO::FETCH_ASSOC)) {
    
$rows_photo[] = $row_photo;
}
?>
<!DOCTYPE html>
<html lang="<?=$lang?>">
<head>
  <? include('_head.php');?>
</head>

<body>
    <!-- Static navbar -->
  <? include('_header.php')?>
  
    <!-- Header -->
    <div class="newsHeader" style="background-image:url(../file/bannerSingle/<?=$row_banner['photo']?>)">
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <div class="subPage-intro-message">
                        <h4><?=nl2br($row_banner['intro'])?></h4>
                        <h3><?=$row_banner['name']?></h3>
                        <br><br>
                    </div>
                </div>
            </div>
        </div>
    </div>
<div class="News">
  <div class="container">
      <div class="row">
        <div class="col-lg-pull-12" id="NewsConent">
          <h11><?=$row_event['title']?></h11> <br>
           <img src="../img/news/timeIcon.png" width="15px" height="15"> &nbsp;<?=$row_event['date']?>
           <br><br>
           <?=html_entity_decode($row_event['desc'])?><br><br>
           <? 
            $loop_limit
=2
            
$count=count($rows_photo); 
            
$tt=0;
            
$loop=ceil($count/$loop_limit);?>
            <table width="100%">
            <? for($i=0;$i<$loop;$i++){?>
            <tr>
            <? for($a=0;$a<$loop_limit;$a++){?>
            <? if($tt!=$count){?>
            <td><img src="../file/event_photo/<?=$rows_photo[$tt]['file_name']?>" class="col-lg-11"/></td>
            <? $tt++;}}?>
            </tr>
            <? }?>
            </table>
        </div>
      </div>
  </div>
</div>
<!-- Footer -->
<? include('_footer.php')?>
  </body>
</html>