Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 1387 → Rev 1388

/asterisk-stats/trunk/includes/db.php
12,12 → 12,13
# more information. #
####################################################
 
switch($db_type) {
switch($g_config['db_type']) {
case 'PGSQL':
include('includes/db/postgresql.php');
break;
}
 
$db = new db_obj($db_host, $db_user, $db_password, $db_database);
$db = new db_obj($g_config['db_host'], $g_config['db_user'],
$g_config['db_password'], $g_config['db_database']);
 
?>
/asterisk-stats/trunk/includes/config.php-dist
1,22 → 1,24
<?php
 
$db_type = 'PGSQL';
$db_host = 'localhost';
$db_user = 'astweb';
$db_password = 'password';
$db_database = 'asterisk';
$g_config['db_type'] = 'PGSQL';
$g_config['db_host'] = 'localhost';
$g_config['db_user'] = 'astweb';
$g_config['db_password'] = 'password1';
$g_config['db_database'] = 'asterisk';
 
$mgr_host = 'localhost';
$mgr_port = 5038;
$mgr_user = 'originator';
$mgr_password = 'password2';
$mgr_channel = 'SIP';
$mgr_context = 'default';
$g_config['mgr_host'] = 'localhost';
$g_config['mgr_port'] = 5038;
$g_config['mgr_user'] = 'originator';
$g_config['mgr_password'] = 'password2';
$g_config['mgr_channel'] = 'SIP';
$g_config['mgr_context'] = 'default';
 
// any local specific query
function BaseQuery()
$g_config['originate_src'] = 'I'; // which 'entry_title' may originate a call
 
// any local specific query for list of calls
function CdrBaseQueryWhere()
{
return " (dstchannel is null or dstchannel != '')";
return " (dcontext is null or dcontext != 'incoming_fix_callerid' and dcontext != 'incoming_delayed')";
}
 
?>
/asterisk-stats/trunk/includes/defaults.php
1,12 → 1,14
<?php
 
$g_site_title = 'Asterisk Web Interface';
$g_site_style = 'style.css';
$g_config = array(
'site_title' => 'Asterisk Web Interface',
'site_style' => 'style.css',
 
$db_type = 'PGSQL';
$db_host = 'localhost';
$db_user = 'astweb';
$db_password = 'password';
$db_database = 'asterisk';
'db_type' => 'PGSQL',
'db_host' => 'localhost',
'db_user' => 'astweb',
'db_password' => 'password',
'db_database' => 'asterisk',
);
 
?>
/asterisk-stats/trunk/includes/common.php
19,14 → 19,14
 
function ShowMenu($display)
{
global $g_site_style, $g_site_title;
global $g_config;
 
$display->add_template('menu');
 
$display->add_variables(array(
'AST_STYLESHEET' => $g_site_style,
'AST_SITETITLE' => $g_site_title,
'AST_DATETIME' => date('Y-m-d H:i:s'),
'AST_STYLESHEET' => $g_config['site_style'],
'AST_SITETITLE' => $g_config['site_title'],
'AST_DATETIME' => date('Y-m-d H:i:s'),
));
}