1 |
<? |
<? |
2 |
require('class.DBI'); |
// require('class.DBI'); |
3 |
|
require("dbi_pgsql.php"); |
4 |
|
|
5 |
$db="plivasi"; |
$db="plivasi"; |
6 |
$dbh = new DBI("dbi:pg:$db","dpavlin",""); |
$dbh = new DBI($db,"dpavlin",""); |
7 |
|
|
8 |
if (!$WAP && ( strstr($accept,"text/vnd.wap.wml") || strstr($accept,"hdml;version=3.0") ) ) { |
if (!$WAP && ( strstr($accept,"text/vnd.wap.wml") || strstr($accept,"hdml;version=3.0") ) ) { |
9 |
Header("Location: wap.php"); |
Header("Location: wap.php"); |
22 |
$sth->execute(); |
$sth->execute(); |
23 |
global $menu_item; |
global $menu_item; |
24 |
if ($row=$sth->fetchrow_hash()) { |
if ($row=$sth->fetchrow_hash()) { |
25 |
$menu_item=$row[0]; |
$menu_item=str_replace("\\n"," ",$row[0]); |
26 |
} |
} |
27 |
|
|
28 |
// generate random numbers of pictures on top-right corner |
// generate random numbers of pictures on top-right corner |
30 |
srand(time()); |
srand(time()); |
31 |
shuffle($rnd); |
shuffle($rnd); |
32 |
|
|
33 |
|
// parse /preview url |
34 |
|
|
35 |
|
global $visible_is_true; |
36 |
|
|
37 |
|
$preview_url="/preview"; |
38 |
|
if (substr($GLOBALS[REQUEST_URI],0,strlen($preview_url)) == $preview_url) { |
39 |
|
$is_preview=1; |
40 |
|
$visible_is_true = "true"; // visible can be true or false |
41 |
|
} else { |
42 |
|
$visible_is_true = "visible is true"; // limit output just to visible |
43 |
|
} |
44 |
?> |
?> |