-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
47 lines (33 loc) · 701 Bytes
/
index.php
File metadata and controls
47 lines (33 loc) · 701 Bytes
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
<?php
#TODO
// Check config
// Check for DB connection
// Route to admin/install in failure
include 'settings/config.php';
if (!defined('CONFIG'))
{
header("Location: install/index.php");
}
include("header.php");
$connected = db_connect();
if (!$connected)
{
header("Location: install/index.php");
}
//$pageid = 1;
$scrap = (empty ($_GET['scrap'])) ? 1 : $_GET['scrap'];
// echo 'isset ' . isset($_GET['scrap']) . '<hr/>';
// if (isset($_GET['scrap']))
// echo 'Is set and ' . $_GET['scrap'];
// else
// echo 'Is set False';
?>
<?php
echo '<hr/>';
$products = get_products($scrap);
if ($products)
{
include 'views/products.php';
}
?>
<?php include("footer.php"); ?>