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 (21 lines) | stat: -rw-r--r-- 1,219 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
<?/* 
+-------------------------------------------------------------------------+
| raXnet Authentication Scripts                                           |
+-------------------------------------------------------------------------+
| This code is currently maintained and debugged by Ian Berry, any        |
| questions or comments regarding this code should be directed to:        |
| - iberry@raxnet.net                                                     |
+-------------------------------------------------------------------------+
| - raXnet - http://www.raxnet.net/                                       |
+-------------------------------------------------------------------------+
*/?>
<?
$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_to_use = $database_default; }else{ $database_to_use = $database; }

$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_to_use, $cnn_id) or die ("Cannot find the database $database");

?>