ws DB config
[busui.git] / include / common-db.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
  if ($isDebugServer) $conn = pg_connect("dbname=transitdata user=postgres password=snmc");
  else $conn = pg_connect("dbname=transitdata user=transitdata password=transitdata ");
  if (php_uname('n') == "actbus-www") $conn = pg_connect("dbname=transitdata user=transitdata password=transitdata host=db.actbus.dotcloud.com port=2242");
  if (!$conn) {
      echo "An error occured.\n";
      exit;
  }
  
  function databaseError($errMsg) {
    die($errMsg);
  }
 
  include('db/route-dao.inc.php');
  include('db/trip-dao.inc.php');
  include('db/stop-dao.inc.php');  
  ?>