示例#1
0
 function GalleryPlugin()
 {
     $this->db =& AdoNewConnection($this->db_type);
     $host = $this->db_port != '' ? $this->db_host . ':' . $this->db_port : $this->db_host;
     $this->db->Connect($host, $this->db_user, $this->db_pass, $this->db_name);
 }
示例#2
0
error_reporting(E_ALL);
# Define all application paths
define('ROOT_PATH', realpath(dirname(__FILE__) . '/..'));
define('CORE_PATH', ROOT_PATH . '/core/');
define('LIB_PATH', ROOT_PATH . '/libraries/');
# Load the user configuration
require_once CORE_PATH . 'config.php';
# Load adodb library w/xmlschema
require_once LIB_PATH . 'adodb.493a/adodb.inc.php';
require_once LIB_PATH . 'adodb.493a/adodb-xmlschema.inc.php';
# Load the upgrader class
require_once 'upgrade.class.php';
# Establish the database connection
# Connections to MSSQL via ODBC require a special connection string!
# Always return recordsets as associative arrays
$db =& AdoNewConnection($g_db_type);
if ($g_db_type == 'odbc_mssql') {
    $dsn = 'Driver={SQL Server};Server=' . $g_db_host . ';Database=' . $g_db_name . ';';
    $db->Connect($dsn, $g_db_user, $g_db_pass);
} else {
    $host = $g_db_port ? $g_db_host : $g_db_host . ':' . $g_db_port;
    $db->Connect($host, $g_db_user, $g_db_pass, $g_db_name);
}
$db->SetFetchMode(ADODB_FETCH_ASSOC);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Retrospect-GDS - Installation</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
示例#3
0
<?php

/**
 * To Authenticate the user
 * Id: Login-2.php
 *
 * Developed By: Chandrashekar Venkatesh
 */
require_once "./include/Vars.php";
require_once "./include/Utils-Misc.php";
require_once "./include/adodb/adodb.inc.php";
$userName = $_POST['userName'];
$password = $_POST['password'];
$con =& AdoNewConnection($system_db_dbtype);
$con->Connect($system_db_server, $system_db_username, $system_db_password, $system_db_dbname);
/*$con->debug = 1;*/
session_start();
session_unset();
session_destroy();
session_start();
$userId = "";
$groupId = "";
$sqlLoginCheck = "SELECT\r\n\t\t\t\t\t\t\tid,\r\n\t\t\t\t\t\t\tuserName,\r\n\t\t\t\t\t\t\tpassword,\r\n\t\t\t\t\t\t\tgroupId\r\n\t\t\t\t\t\tFROM\r\n\t\t\t\t\t\t\tmaster\r\n\t\t\t\t\t\tWHERE\r\n\t\t\t\t\t\t\tuserName = "******"\r\n\t\t\t\t\t\tAND\r\n\t\t\t\t\t\t\tpassword = "******"\r\n\t\t\t\t\t\tAND\r\n\t\t\t\t\t\t\tisLoginActive = 'y'\r\n\t\t\t\t\t\tAND\r\n\t\t\t\t\t\t\trecordStatus = 'a'";
$rstLoginCheck = $con->Execute($sqlLoginCheck);
if ($rstLoginCheck && !$rstLoginCheck->EOF) {
    $_SESSION['userName'] = $rstLoginCheck->fields['userName'];
    $_SESSION['userId'] = $rstLoginCheck->fields['id'];
    $_SESSION['groupId'] = $rstLoginCheck->fields['groupId'];
    $_SESSION['password'] = $rstLoginCheck->fields['password'];
    echo $rstLoginCheck->fields['password'];
    $userId = $rstLoginCheck->fields['id'];
示例#4
0
define('TBL_MEDIA', $g_db_prefix . 'media');
define('TBL_COMMENT', $g_db_prefix . 'comment');
# Load all other functions, classes, and libraries
require_once CORE_PATH . 'f_misc.php';
require_once CORE_PATH . 'options.class.php';
require_once CORE_PATH . 'f_language.php';
require_once CORE_PATH . 'genealogy.class.php';
require_once CORE_PATH . 'theme.class.php';
require_once CORE_PATH . 'date.class.php';
require_once CORE_PATH . 'auth.class.php';
require_once LIB_PATH . 'adodb.493a/adodb.inc.php';
require_once LIB_PATH . 'smarty-2.6.14/libs/Smarty.class.php';
# Establish the database connection
# Connections to MSSQL via ODBC require a special connection string!
# Always return recordsets as associative arrays
$db =& AdoNewConnection(RGDS_DB_TYPE);
if (RGDS_DB_TYPE == 'odbc_mssql') {
    $dsn = 'Driver={SQL Server};Server=' . RGDS_DB_HOST . ';Database=' . RGDS_DB_NAME . ';';
    $db->Connect($dsn, RGDS_DB_USER, RGDS_DB_PASS);
} else {
    $host = RGDS_DB_PORT ? RGDS_DB_HOST : RGDS_DB_HOST . ':' . RGDS_DB_PORT;
    $db->Connect($host, RGDS_DB_USER, RGDS_DB_PASS, RGDS_DB_NAME);
}
$db->SetFetchMode(ADODB_FETCH_ASSOC);
# Create options object
$options =& new Options();
# Catch any directory permission problems before starting Smarty
$theme = defined('_RGDS_ADMIN') ? $g_admin_theme : $g_theme;
if (!is_writable(THEME_PATH . $theme . '/templates_c/')) {
    die(THEME_PATH . $theme . '/templates_c/ is not writable!');
}
示例#5
0
<?php

$cnn =& AdoNewConnection('Mysql');
$cnn->PConnect('192.168.20.5', 'usgi2015', 'cnx5gi2015', 'ctrlusuarios');
示例#6
0
<?php

define('_RGDS_VALID', 1);
define('ROOT_PATH', dirname('../../index.php'));
require_once './config.php';
require_once '../../libraries/adodb.493a/adodb.inc.php';
require_once '../../libraries/phpunit/phpunit.php';
require_once '../../core/options.class.php';
require_once '../../core/f_misc.php';
require_once '../../core/f_language.php';
# Define all database table names
define('TBL_INDIV', 'rgds_indiv');
define('TBL_FACT', 'rgds_fact');
define('TBL_FAMILY', 'rgds_family');
define('TBL_CITATION', 'rgds_citation');
define('TBL_SOURCE', 'rgds_source');
define('TBL_NOTE', 'rgds_note');
define('TBL_CHILD', 'rgds_children');
define('TBL_USER', 'rgds_user');
define('TBL_USERTYPE', 'rgds_usertype');
define('TBL_LANG', 'rgds_language');
define('TBL_OPTION', 'rgds_options');
define('TBL_MEDIA', 'rgds_media');
define('TBL_COMMENT', 'rgds_comment');
$db =& AdoNewConnection('mysql');
$db->Connect('localhost', 'root', '', 'retrospect');
$db->SetFetchMode(ADODB_FETCH_ASSOC);
$options = new Options();
lang_init();
lang_init_arrays();