/var/www/muaythai.com.hk/race.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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<?php require("webadmin/configure.php"); 
$catid = (int)$_GET['catid'];
$galleryid         $_GET['galleryid'];
$offset            $_GET["offset"];
$where            $_GET["where"];
$gallerytype     $_GET['gallerytype'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Po Cheong Thai Boxing Club</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/javascript" src="js/mlddmenu.js"></script>
<link rel="stylesheet" type="text/css" href="css/mlddmenu.css" />
</head>
<body bgcolor="#F0F0F0" leftmargin="0" topmargin="0">
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td><a href="index.php"><img src="images/po01.jpg" border="0" /></a></td>
  </tr>
  <tr>
    <td bgcolor="#000000">
    <ul class="mlddm">
    <?
        load
(00);

        function 
load($p$space)
        {
            
$sql "SELECT * ";
            
$sql .= "FROM template left outer join categories ";
            
$sql .= "ON template.templateid = categories.templateid ";
            
$sql .= "where parentid = $p ";
            
$sql .= "order by sortby";

            
$result1 mysql_query($sql);
            
$n=1;
            
$count mysql_num_rows($result1); 

            while (
$row mysql_fetch_array($result1,MYSQL_ASSOC))
            {
                if (
$space <> && $n == 1)
                    echo 
"<ul>";
                        echo 
"<li><a href='"$row{'templatepage'} ."?catid="$row{'catid'} ."' class='menulink'>"$row{'catname'} . "</a>";

                
$n++;
                
load($row{'catid'}, $space+1);
                echo 
"</li>";
                if (
$space <> && $count $n)
                    echo 
"</ul>";

            }

        }
?>
</ul>
    </td>
  </tr>
  <tr>
    <td><img src="images/banner01.jpg" width="1000" height="200" /></td>
  </tr>
  <tr>
    <td align="left" valign="top" background="images/contentbg.jpg" bgcolor="#FFFFFF" style="background-repeat:repeat-x"><table width="850" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="30" height="35" align="left" valign="top"><img src="images/img_welcometopleft.jpg" width="30" height="35" /></td>
        <td width="790" align="left" valign="top" background="images/img_welcometopmiddle.jpg"><img src="images/img_welcometopmiddle.jpg" width="461" height="35" /></td>
        <td align="left" valign="top"><img src="images/img_welcometopright.jpg" width="30" height="35" /></td>
      </tr>
      <tr>
        <td align="left" valign="top"><img src="images/img_welcomeleft.jpg" width="30" height="200" /></td>
        <td align="left" valign="top" bgcolor="#FFFFFF"><table width="790" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td class="titlename26">比賽精華</td>
          </tr>
          <tr>
            <td><table width="200" border="0" cellpadding="0" cellspacing="0">
            <?                        
            $limit
=12
            if (!
$offset$offset=0;

            if (
strlen($where)==0)
            {
                if (
strlen($galleryid)<>0)
                {
                    
$query_where .= "and gallery.galleryid = '1' ";
                }                                        
            }
            else
            {
                
$query_where $where;
            }
            if (!
$where) {
                if (empty(
$one) || empty($two)) {
                }
                
$where=$query_where;
            }

            
$sqlx "select count(*) ";
            
$sqlx .= "FROM gallery ";
            
$sqlx .= "WHERE gallerytype = '1' ";
            
$sqlx .= "$query_where ";
            
$sqlx .= "order by gallery.gallerysort ASC, gallery.galleryid DESC ";
            
$sqlx str_replace('\\','',$sqlx);
            
$result=mysql_query($sqlx);

            list(
$numrec)=mysql_fetch_row($result);

            
$numpage=intval($numrec/$limit);

            if (
$numrec%$limit) {
                
$numpage++; // add one page if remainder
            
}
            
//echo $numcnt;
?>
                  <!--start here-->
                  <?
                    $sqly 
"SELECT * ";
                    
$sqly .= "FROM gallery ";
                    
$sqly .= "WHERE gallery.gallerytype = '1' ";
                    
$sqly .= "$query_where ";
                    
$sqly .= "order by gallery.gallerysort ASC, gallery.galleryid DESC ";
                    
$sqly .= "limit $offset,$limit";

                    
$x 1;
                    
$y 1;

                    echo 
"<tr>";
                    
$result1 mysql_query($sqly);

                    while (
$row mysql_fetch_array($result1,MYSQL_ASSOC))
                    {
                        if (
$y == 1)
                        {
                        }
                        elseif (
$y == 4)
                            echo 
"<tr>";
                        elseif (
$y == 7)
                            echo 
"<tr>";
                        elseif (
$y == 10)
                            echo 
"<tr>";
                
?>
                <td width="230" valign="top" align="center"><table width="250" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="200" align="center" valign="top"><a href="webadmin/galleryimage/<?=$row{'galleryfile'}?>" target="_blank"><img src="webadmin/galleryimage/<?=$row{'galleryfile'}?>" border='0' width='200' /></a></td>
                  </tr>
                  <tr>
                    <td width="200" height="5" align="center" valign="top"></td>
                  </tr>
                  <tr>
                    <td width="200" align="center" valign="top"><? echo $row{'galleryfilename'}?><br /><br /></td>
                  </tr>
                </table></td>
                  <?
                            
if ($y == 3)
                                echo 
"</tr>";
                            elseif (
$y == 6)
                                echo 
"</tr>";
                            elseif (
$y == 9)
                                echo 
"</tr>";
                            elseif (
$y == 12)
                                echo 
"</tr>";
                            
$y $y 1;
                        }
                        
?>
                  <!--end here-->
                </table></td>
          </tr>
          <tr><td><? include("gallerypagenav.php"); ?></td></tr>
          

        </table></td>
        <td align="left" valign="top"><img src="images/img_welcomeright.jpg" width="30" height="200" /></td>
      </tr>
    </table></td>
  </tr>
  <!-- Content End -->
  <!-- Footer -->
  <tr>
    <td align="left" valign="top" bgcolor="#FFFFFF">&nbsp;</td>
  </tr>
  <tr>
    <td align="center" valign="top" bgcolor="#FFFFFF" class="footerspan"><span class="footertxt">Copyright © 2010 Po Cheong Thai Boxing Club. All Rights Reserved &nbsp; | &nbsp; Powered by <a href="http://www.onesolution.com.hk" target="_blank">One Solution Limited</a>.<br />
      <a href="http://www.onesolution.com.hk" target="_blank"><img src="images/webicon137w23h.jpg" width="137" height="23" border="0" /></a></span></td>
  </tr>
  <!-- Footer End -->
</table>
</body>

</html>