File: database.php

package info (click to toggle)
cacti 0.6.7-2.2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,000 kB
  • ctags: 1,120
  • sloc: php: 5,059; sql: 922; sh: 302; perl: 81; makefile: 56
file content (22 lines) | stat: -rw-r--r-- 1,097 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?/* 
+-------------------------------------------------------------------------+
| raXnet Database Wrappers                                                |
+-------------------------------------------------------------------------+
| This code was crafted by Ian Berry, make sure any questions             |
| about the structure or integrity of this code be directed to:           |
| - rax@kuhncom.net                                                       |
| - iberry@onion.dyndns.org                                                 |
+-------------------------------------------------------------------------+
*/?>
<?

$current_path = dirname(__FILE__);
$do_not_read_config = true; include ("$current_path/config.php");

/* if no database name is specified; used default */
if ($database == "") { $database = $database_default; }

$cnn_id = mysql_connect($database_hostname,$database_username,$database_password) or die ("Cannot connect to MySQL server on $database_hostname");
$db = mysql_select_db($database, $cnn_id) or die ("Cannot find the database $database");

?>