File: [Platon] / mylist / mylist.config.php (download)
Revision 1.3, Mon Mar 28 09:45:16 2005 UTC (19 years ago) by nepto
Changes since 1.2: +9 -2
lines
Database connection/disconnection moved into the init/config file.
Other changes related to database handling.
|
<?php
// $Platon: mylist/mylist.config.php,v 1.2 2005/03/25 23:35:19 nepto Exp $
// data source name and options for PHP PEAR DB
$db_user = "mylist";
$db_password = "mailinglist";
$db_hostname = "localhost";
$db_name = "mylist";
$db_type = "mysql";
$dsn = "$db_type://$db_user:$db_password@$db_hostname/$db_name";
$options = array (
'debug' => 2,
'portability' => DB_PORTABILITY_ALL
);
// email domains (suffixes of accepted mailing lists);
$email_domains = Array("lists.platon.sk", "mylist.platon.sk", "platon.sk");
// local table and column names of specific tables
// db (database), tb (table), cl(column)
// TABLE OF ALL LOCAL USERS
$db_users = "";
$tb_users = "users";
$cl_users_id = "id";
$cl_users_username = "name";
$cl_users_email = "reg_email";
// TABLE OF ALL LOCAL PROJECTS
$db_projects = "";
$tb_projects = "projects";
$cl_projects_id = "id";
$cl_projects_name = "name";
// LOCAL SIGN-IN FILE
$fl_sign_in = "sign-in.php"; // e.g. sign-in.php
require_once 'DB.php';
$dbh = DB::connect($dsn, $options);
if (DB::isError($dbh)) {
die($db->getMessage());
}
$dbh->setFetchMode(DB_FETCHMODE_ASSOC);
?>
Platon Group <platon@platon.org> http://platon.org/
|