-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
67 lines (58 loc) · 1.43 KB
/
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
<?php
/*
* @Author: Twilight
* @Date: 2019-04-26 19:34:29
* @Last Modified by: Twilight
* @Last Modified time: 2019-05-04 10:23:53
*/
include_once('./include/init.php');
// Banner
$sql = "SELECT * FROM i_banner
WHERE b_isshow=1";
$stmt = $dbh->prepare($sql);
$stmt->execute();
$banner = $stmt->fetchAll(PDO::FETCH_ASSOC);
// Servies
$sql = "SELECT * FROM i_servies
WHERE s_isshow=1
LIMIT 3";
$stmt = $dbh->prepare($sql);
$stmt->execute();
$servies = $stmt->fetchAll(PDO::FETCH_ASSOC);
// Cases
$sql = "SELECT * FROM i_cases c
LEFT JOIN i_cases_category cc
ON c.cc_id=cc.cc_id
WHERE c_isshow=1
ORDER BY c_id ASC
LIMIT 6";
$stmt = $dbh->prepare($sql);
$stmt->execute();
$cases = $stmt->fetchAll(PDO::FETCH_ASSOC);
// News
$sql = "SELECT * FROM i_news
WHERE n_isshow=1
LIMIT 3";
$stmt = $dbh->prepare($sql);
$stmt->execute();
$news = $stmt->fetchAll(PDO::FETCH_ASSOC);
// Teames
$sql = "SELECT * FROM i_teams
WHERE t_isshow=1";
$stmt = $dbh->prepare($sql);
$stmt->execute();
$teams = $stmt->fetchAll(PDO::FETCH_ASSOC);
// Partner
$sql = "SELECT * FROM i_partner
WHERE p_isshow=1
LIMIT 6";
$stmt = $dbh->prepare($sql);
$stmt->execute();
$partner = $stmt->fetchAll(PDO::FETCH_ASSOC);
// footer article
$sql = "SELECT * FROM i_article
WHERE a_id=1";
$stmt = $dbh->prepare($sql);
$stmt->execute();
$fArticle = $stmt->fetch(PDO::FETCH_ASSOC);
include_once('./view/index.html');