/[corp_html]/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.3 by dpavlin, Thu Mar 1 09:02:05 2001 UTC revision 1.8 by dpavlin, Tue Sep 18 10:26:46 2001 UTC
# Line 3  Line 3 
3          $db="corp";          $db="corp";
4          $dbh = new DBI("dbi:pg:$db","dpavlin","");          $dbh = new DBI("dbi:pg:$db","dpavlin","");
5    
6          if (!$WAP && strstr(strtolower($HTTP_ACCEPT), "text/vnd.wap.wml")) {          if (!$WAP && ( strstr($accept,"text/vnd.wap.wml") || strstr($accept,"hdml;version=3.0") ) ) {
7                  Header("Location: wap.php");                  Header("Location: wap.php");
8                  header("Content-type: text/vnd.wap.wml");                  header("Content-type: text/vnd.wap.wml");
9                  exit;                  exit;
10          }          }
11    
12            $sql_section="";
13    
14            $url=basename($PHP_SELF);
15            if ($QUERY_STRING) $url.="?$QUERY_STRING";
16    
17            if ($section) $sql_section=" and section='$section'";
18    
19            $sth = $dbh->prepare("select item from menu where url = '$url' $sql_section limit 1");
20            $sth->execute();
21            global $menu_item;
22            if ($row=$sth->fetchrow_hash()) {
23                    $menu_item=$row[0];
24            }
25    
26            // parse /preview URL
27            
28            $preview_url="/preview";
29            if (substr($GLOBALS[REQUEST_URI],0,strlen($preview_url)) == $preview_url) {
30                    $is_preview=1;
31                    $visible_is_true = "visible is true";
32            } else {
33                    $visible_is_true = "true";      // visible can be true or false
34            }
35    
36    
37  ?>  ?>

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.26