Dotcloud OTP changes
[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
19
20
21
<?php
  if (php_uname('n') == "actbus-www") {
    $conn = pg_connect("dbname=transitdata user=transitdata password=transitdata host=db.actbus.dotcloud.com port=2242");
  } else if (isDebugServer()) {
    $conn = pg_connect("dbname=transitdata user=postgres password=snmc");
  } else {
    $conn = pg_connect("dbname=transitdata user=transitdata password=transitdata ");
  }
  if (!$conn) {
      die("A database error occurred.\n");
  }
  
  function databaseError($errMsg) {
    die($errMsg);
  }
 
  include('db/route-dao.inc.php');
  include('db/trip-dao.inc.php');
  include('db/stop-dao.inc.php');  
  ?>