/asterisk-stats/trunk/telbook_export_list.php |
---|
1,7 → 1,7 |
<?php |
include_once('includes/common.php'); |
Prolog('Tel. Book Export Targets'); |
Prolog(); |
$db->query("select export_id, export_name, export_type, export_comment" |
. " from telbook_export order by upper(export_name), export_name"); |
/asterisk-stats/trunk/telbook_update.php |
---|
1,7 → 1,7 |
<?php |
include_once('includes/common.php'); |
Prolog('Tel. Book Person'); |
Prolog(); |
if(array_key_exists('delete', $_POST)) { |
$id = $_POST['id']; |
/asterisk-stats/trunk/telbook_export_update.php |
---|
1,7 → 1,7 |
<?php |
include_once('includes/common.php'); |
Prolog('Tel. Book Export Target'); |
Prolog(); |
if(array_key_exists('delete', $_POST)) { |
$id = $_POST['id']; |
/asterisk-stats/trunk/telbook_details.php |
---|
1,7 → 1,7 |
<?php |
include_once('includes/common.php'); |
Prolog('Tel. Book Person'); |
Prolog(); |
$id = $_GET['id']; |
/asterisk-stats/trunk/telbook_export_details.php |
---|
2,7 → 2,7 |
include_once('includes/common.php'); |
include_once('includes/export_types.php'); |
Prolog('Tel. Book Export Target'); |
Prolog(); |
$id = $_GET['id']; |
$export = array(); |
/asterisk-stats/trunk/includes/common.php |
---|
8,7 → 8,7 |
$g_display = NULL; |
function Prolog($page_title = NULL) |
function Prolog() |
{ |
global $g_display; |
15,7 → 15,6 |
$g_display = new template_handler('template'); |
$g_display->add_template('header'); |
ShowMenu($g_display); |
SetPageTitle($page_title); |
} |
function ShowMenu($display) |
39,11 → 38,4 |
echo $g_display; |
} |
function SetPageTitle($page_title) |
{ |
global $g_display; |
$g_display->add_variables(array('PAGE_TITLE' => $page_title)); |
} |
?> |
/asterisk-stats/trunk/template/menu.tpl |
---|
1,6 → 1,6 |
<table class="menu"> |
<tr> |
<td><a href=/>Top</a></td> |
<td><a href=..>Up</a></td> |
<td><a href="index.php">Summary</a></td> |
<td><a href="cdr_search.php">Search</a></td> |
<td><a href="telbook_list.php">Tel. Book</a></td> |
7,6 → 7,3 |
<td><a href="originate_form.php">Call</a></td> |
</tr> |
</table> |
<h1>${PAGE_TITLE}</h1> |
/asterisk-stats/trunk/template/index.tpl |
---|
5,39 → 5,39 |
<th>Duration</th> |
</tr> |
<tr> |
<td class="t"><a href=cdr_list.php?list=active>Active</a></td> |
<td class="d"><a href=cdr_list.php?list=active>${CS_ACTIVE}</a></td> |
<td class="di"><a href=cdr_list.php?list=active>${CS_ACTIVE_DUR}</a></td> |
<td class="t"><a href=cdr_list?list=active>Active</a></td> |
<td class="d"><a href=cdr_list?list=active>${CS_ACTIVE}</a></td> |
<td class="di"><a href=cdr_list?list=active>${CS_ACTIVE_DUR}</a></td> |
</tr> |
<tr> |
<td class="t"><a href=cdr_list.php?list=today>Today</a></td> |
<td class="d"><a href=cdr_list.php?list=today>${CS_TODAY}</a></td> |
<td class="di"><a href=cdr_list.php?list=today>${CS_TODAY_DUR}</a></td> |
<td class="t"><a href=cdr_list?list=today>Today</a></td> |
<td class="d"><a href=cdr_list?list=today>${CS_TODAY}</a></td> |
<td class="di"><a href=cdr_list?list=today>${CS_TODAY_DUR}</a></td> |
</tr> |
<tr> |
<td class="t"><a href=cdr_list.php?list=week>This Week</a></td> |
<td class="d"><a href=cdr_list.php?list=week>${CS_WEEK}</a></td> |
<td class="di"><a href=cdr_list.php?list=week>${CS_WEEK_DUR}</a></td> |
<td class="t"><a href=cdr_list?list=week>This Week</a></td> |
<td class="d"><a href=cdr_list?list=week>${CS_WEEK}</a></td> |
<td class="di"><a href=cdr_list?list=week>${CS_WEEK_DUR}</a></td> |
</tr> |
<tr> |
<td class="t"><a href=cdr_list.php?list=lastweek>Last Week</a></td> |
<td class="d"><a href=cdr_list.php?list=lastweek>${CS_LAST_WEEK}</a></td> |
<td class="di"><a href=cdr_list.php?list=lastweek>${CS_LAST_WEEK_DUR}</a></td> |
<td class="t"><a href=cdr_list?list=lastweek>Last Week</a></td> |
<td class="d"><a href=cdr_list?list=lastweek>${CS_LAST_WEEK}</a></td> |
<td class="di"><a href=cdr_list?list=lastweek>${CS_LAST_WEEK_DUR}</a></td> |
</tr> |
<tr> |
<td class="t"><a href=cdr_list.php?list=month>This Month</a></td> |
<td class="d"><a href=cdr_list.php?list=month>${CS_MONTH}</a></td> |
<td class="di"><a href=cdr_list.php?list=month>${CS_MONTH_DUR}</a></td> |
<td class="t"><a href=cdr_list?list=month>This Month</a></td> |
<td class="d"><a href=cdr_list?list=month>${CS_MONTH}</a></td> |
<td class="di"><a href=cdr_list?list=month>${CS_MONTH_DUR}</a></td> |
</tr> |
<tr> |
<td class="t"><a href=cdr_list.php?list=year>This Year</a></td> |
<td class="d"><a href=cdr_list.php?list=year>${CS_YEAR}</a></td> |
<td class="di"><a href=cdr_list.php?list=year>${CS_YEAR_DUR}</a></td> |
<td class="t"><a href=cdr_list?list=year>This Year</a></td> |
<td class="d"><a href=cdr_list?list=year>${CS_YEAR}</a></td> |
<td class="di"><a href=cdr_list?list=year>${CS_YEAR_DUR}</a></td> |
</tr> |
<tr class="total"> |
<td class="t"><a href=cdr_list.php?list>Total</a></td> |
<td class="d"><a href=cdr_list.php?list>${CS_TOTAL}</a></td> |
<td class="di"><a href=cdr_list.php?list>${CS_TOTAL_DUR}</a></td> |
<td class="t"><a href=cdr_list?list>Total</a></td> |
<td class="d"><a href=cdr_list?list>${CS_TOTAL}</a></td> |
<td class="di"><a href=cdr_list?list>${CS_TOTAL_DUR}</a></td> |
</tr> |
</table> |
/asterisk-stats/trunk/template/header.tpl |
---|
1,5 → 1,5 |
<html> |
<title>${PAGE_TITLE} - ${AST_SITETITLE}</title> |
<title>${AST_SITETITLE}</title> |
<link rel=stylesheet href=${AST_STYLESHEET} type=text/css> |
</head> |
<body> |
/asterisk-stats/trunk/telbook_list.php |
---|
1,7 → 1,7 |
<?php |
include_once('includes/common.php'); |
Prolog('Tel. Book Persons'); |
Prolog(); |
$db->query("select person_id, person_name, person_comment, category_name," |
. " category_comment, entry_title, entry_value, entry_comment" |
/asterisk-stats/trunk/telbook_categories_list.php |
---|
1,7 → 1,7 |
<?php |
include_once('includes/common.php'); |
Prolog('Tel. Book Categories'); |
Prolog(); |
$db->query("select category_id, category_name, category_comment" |
. " from telbook_categories order by upper(category_name), category_name"); |
/asterisk-stats/trunk/originate_form.php |
---|
1,7 → 1,7 |
<?php |
include_once('includes/common.php'); |
Prolog('Originate Call'); |
Prolog(); |
$src = $_GET['src']; |
$dst = $_GET['dst']; |
/asterisk-stats/trunk/telbook_categories_update.php |
---|
1,7 → 1,7 |
<?php |
include_once('includes/common.php'); |
Prolog('Tel. Book Category'); |
Prolog(); |
if(array_key_exists('delete', $_POST)) { |
$id = $_POST['id']; |
/asterisk-stats/trunk/telbook_categories_details.php |
---|
1,7 → 1,7 |
<?php |
include_once('includes/common.php'); |
Prolog('Tel. Book Category'); |
Prolog(); |
$id = $_GET['id']; |
$category = array(); |
/asterisk-stats/trunk/cdr_list.php |
---|
65,40 → 65,19 |
$query_limit = ''; |
if(array_key_exists('list',$_GET)) { |
switch($_GET['list']) { |
case 'year': |
SetPageTitle("This Year Calls"); |
$query .= do_date_compare('year'); |
break; |
case 'month': |
SetPageTitle("This Month Calls"); |
$query .= do_date_compare('month'); |
break; |
case 'week': |
SetPageTitle("This Week Calls"); |
$query .= do_date_compare('week'); |
break; |
case 'lastweek': |
SetPageTitle("Last Week Calls"); |
$query .= do_date_compare('week', 1); |
break; |
case 'today': |
SetPageTitle("Today Calls"); |
$query .= do_date_compare('day'); |
break; |
case 'year': $query .= do_date_compare('year'); break; |
case 'month': $query .= do_date_compare('month'); break; |
case 'week': $query .= do_date_compare('week'); break; |
case 'lastweek': $query .= do_date_compare('week', 1); break; |
case 'today': $query .= do_date_compare('day'); break; |
case 'active': |
SetPageTitle("Active Calls"); |
$active = true; |
$query .= " and duration is null"; |
break; |
default: |
SetPageTitle("Calls"); |
$query_limit .= " limit 1000"; |
default: $query_limit .= " limit 1000"; |
} |
} |
else { |
SetPageTitle("Calls Search Result"); |
} |
if($active) { |
$list_query = "select acctid,calldate,src,dst," |
/asterisk-stats/trunk/index.php |
---|
1,7 → 1,7 |
<?php |
include_once('includes/common.php'); |
Prolog('Summary'); |
Prolog(); |
function add_summary($count_name, $dur_name, $interval, $diff = NULL) |
{ |
/asterisk-stats/trunk/originate_call.php |
---|
1,7 → 1,7 |
<?php |
include_once('includes/common.php'); |
Prolog('Originate Call'); |
Prolog(); |
include_once('includes/AsteriskManager/AsteriskManager.php'); |
/asterisk-stats/trunk/style.css |
---|
9,6 → 9,7 |
table.menu { |
background-color: #6876F8; |
position: fixed; |
left: 0; |
top: 0; |
width: 100%; |
25,15 → 26,23 |
} |
div.copyright { |
color: #AAAAAA; |
font: 6pt Verdana; |
color: #FFFFFF; |
font: 8pt Verdana; |
text-align: center; |
position: fixed; |
bottom: 0; |
left: 0; |
width: 100%; |
background-color: #6876F8; |
} |
div.copyright a { |
color: #AAAAAA; |
color: #FFFFFF; |
} |
div.main { |
margin-top: 50px; |
margin-bottom: 50px; |
} |
table.calls a { |
/asterisk-stats/trunk/cdr_details.php |
---|
4,7 → 4,6 |
Prolog(); |
if(array_key_exists('active', $_GET)) { |
SetPageTitle("Active Call Details"); |
$db->query_params("select acctid, calldate, linkdate, clid, src, dst, dcontext," |
. " channel, dstchannel, lastapp, lastdata," |
. " extract(epoch from date_trunc('second',current_timestamp-calldate)) as duration," |
20,7 → 19,6 |
. " where acctid=$1 and duration is null", array($_GET['active'])); |
} |
elseif(array_key_exists('detail', $_GET)) { |
SetPageTitle("History Call Details"); |
$cdr_detail = array(); |
$db->query_params("select r.*," |
. " p1.person_name as src_name, e1.entry_title as src_title," |
/asterisk-stats/trunk/cdr_search.php |
---|
1,7 → 1,7 |
<?php |
include_once('includes/common.php'); |
Prolog('Search Calls'); |
Prolog(); |
$g_display->add_template('cdr_search'); |