/[pliva-si]/inc/conn.inc
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /inc/conn.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by dpavlin, Thu Jun 28 13:15:34 2001 UTC revision 1.6 by dpavlin, Thu Nov 8 12:00:44 2001 UTC
# Line 1  Line 1 
1  <?  <?
2          require('class.DBI');          require('class.DBI');
3          $db="pliva-si";          $db="plivasi";
4          $dbh = new DBI("dbi:pg:$db","dpavlin","");          $dbh = new DBI("dbi:pg:$db","dpavlin","");
5    
6          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") ) ) {
# Line 20  Line 20 
20          $sth->execute();          $sth->execute();
21          global $menu_item;          global $menu_item;
22          if ($row=$sth->fetchrow_hash()) {          if ($row=$sth->fetchrow_hash()) {
23                  $menu_item=$row[0];                  $menu_item=str_replace("\\n"," ",$row[0]);
24          }          }
25    
26            // generate random numbers of pictures on top-right corner
27            $rnd=range(1,5);
28            srand(time());
29            shuffle($rnd);
30    
31            // parse /preview url
32    
33            global $visible_is_true;
34    
35            $preview_url="/preview";
36            if (substr($GLOBALS[REQUEST_URI],0,strlen($preview_url)) == $preview_url) {
37                    $is_preview=1;
38                    $visible_is_true = "true";      // visible can be true or false
39            } else {
40                    $visible_is_true = "visible is true"; // limit output just to visible
41            }
42  ?>  ?>

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.26