forked from ferchang/reg8log
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode_fetch_site_vars.php
More file actions
36 lines (28 loc) · 939 Bytes
/
Copy pathcode_fetch_site_vars.php
File metadata and controls
36 lines (28 loc) · 939 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
<?php
if(ini_get('register_globals')) exit("<center><h3>Error: Turn that damned register globals off!</h3></center>");
if(!isset($parent_page)) exit("<center><h3>Error: Direct access denied!</h3></center>");
require_once $index_dir.'include/code/code_db_object.php';
$query='select * from `site_vars`';
$reg8log_db->auto_abort=false;
$reg8log_db->query($query);
$reg8log_db->auto_abort=true;
if($reg8log_db->err_msg) {
if(!isset($setup_page)) {
$failure_msg='site_vars fetch query failed!';
require $index_dir.'include/page/page_failure.php';
exit;
}
return;
}
$num_recs=6;
if($reg8log_db->result_num()!==$num_recs) {
if(!isset($setup_page)) {
$failure_msg='<h3>Number of records in site_vars table is incorrect! <small>(Failed setup?)</small></h3>';
$no_specialchars=true;
require $index_dir.'include/page/page_failure.php';
exit;
}
return;
}
while($rec=$reg8log_db->fetch_row()) $$rec['name']=$rec['value'];
?>