-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
43 lines (42 loc) · 1.08 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
<?php
error_reporting(0);
$dbhost = 'localhost';
$dbuser = 'endedman';
$dbpass = '';
$dbname = 'jstore2';
$link = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname);
//1
$rows_1 = "SELECT * FROM apps WHERE id='1'";
$d_1 = mysqli_query($link, $rows_1);
$row_1 = mysqli_fetch_array($d_1, MYSQLI_ASSOC);
mysqli_free_result($d_1);
//2
$rows_2 = "SELECT * FROM apps WHERE id='2'";
$d_2 = mysqli_query($link, $rows_2);
$row_2 = mysqli_fetch_array($d_2, MYSQLI_ASSOC);
mysqli_free_result($d_2);
//3
$rows_3 = "SELECT * FROM apps WHERE id='3'";
$d_3 = mysqli_query($link, $rows_3);
$row_3 = mysqli_fetch_array($d_3, MYSQLI_ASSOC);
mysqli_free_result($d_3);
//4
$rows_4 = "SELECT * FROM apps WHERE id='4'";
$d_4 = mysqli_query($link, $rows_4);
$row_4 = mysqli_fetch_array($d_4, MYSQLI_ASSOC);
mysqli_free_result($d_4);
$dev=$_GET['dev'];
$id=$_GET['id'];
if ($id) {
include('template_app.php');
} else if ($dev) {
include('template_dev.php');
} else {
include('home.php');
}
// if ($dev) {
// include('template_dev.php');
// } else {
// include('home.php');
// }
?>