/asterisk-stats/trunk/index.php |
---|
31,7 → 31,7 |
add_summary('CS_YEAR', 'CS_YEAR_DUR', 'year'); |
add_summary('CS_TOTAL', 'CS_TOTAL_DUR', null); |
$g_display->add_template('index'); |
$g_display->add_template('summary'); |
Epilog(); |
/asterisk-stats/trunk/telbook_categories_details.php |
---|
26,7 → 26,7 |
} |
$g_display->add_variables($category); |
$g_display->add_template('telbook_category_details'); |
$g_display->add_template('telbook_category_edit'); |
Epilog(); |
/asterisk-stats/trunk/template/index.tpl |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/asterisk-stats/trunk/template/telbook_category_details.tpl |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/asterisk-stats/trunk/template/cdr_list_end.tpl |
---|
File deleted |
/asterisk-stats/trunk/template/summary.tpl |
---|
0,0 → 1,43 |
<table class="calls stat"> |
<tr> |
<th> </th> |
<th>Calls</th> |
<th>Duration</th> |
</tr> |
<tr> |
<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?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?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?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?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?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?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/telbook_category_edit.tpl |
---|
0,0 → 1,25 |
<form method="POST" action="telbook_categories_update.php"> |
<input type=hidden name=id value="${CATEGORY_ID}"> |
<table class="telbook edit"> |
<tr> |
<th>Name</th> |
<td><input type=text name=category_name value="${CATEGORY_NAME}"></td> |
</tr> |
<tr> |
<th>Comment</th> |
<td><textarea name=category_comment>${CATEGORY_COMMENT}</textarea></td> |
</tr> |
<tr> |
<th>Export Key</th> |
<td><input type=text name=category_export_key value="${CATEGORY_EXPORT_KEY}"></td> |
</tr> |
<tr class="buttons"> |
<td colspan=2> |
<input type=reset name="reset" value="Reset"> |
<input type=submit name=update value="Update"> |
<input type=submit name=delete value="Delete"> |
</td> |
</tr> |
</table> |
</form> |
/asterisk-stats/trunk/cdr_list.php |
---|
3,8 → 3,7 |
include_once('includes/common.php'); |
Prolog(); |
function do_field($sql, &$params, $fld) |
{ |
function do_field($sql, &$params, $fld) { |
if($fld && $_GET[$fld]) { |
$sql .= " and $fld"; |
if(array_key_exists($fld.'type', $_GET)) { |
141,14 → 140,18 |
} |
$result = $db->query_params($sum_query, $params); |
$line = $db->fetch_row(); |
$cdr = new Table(); |
$cdr->set_table_class('stat cdr sum'); |
$cdr->addcell(array('tag' => 'th', 'text' => 'Calls')); |
$cdr->addcell($calls_number); |
$cdr->newrow(); |
$cdr->addcell(array('tag' => 'th', 'text' => 'Call Seconds')); |
$cdr->addcell(FormatDuration($line['dur'])); |
$cdr->newrow(); |
$cdr->addcell(array('tag' => 'th', 'text' => 'Bill Seconds')); |
$cdr->addcell(FormatDuration($line['bill'])); |
$g_display->add_html_text($cdr->build()); |
$g_display->add_variables(array( |
"CDR_CALLS" => $calls_number, |
"CDR_DURATION_F" => FormatDuration($line['dur']), |
"CDR_BILLSEC_F" => FormatDuration($line['bill']))); |
$g_display->add_template('cdr_list_end'); |
Epilog(); |
?> |