mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-04 18:53:49 +00:00
Add Call Recordings
This commit is contained in:
87
app/call_recordings/app_config.php
Normal file
87
app/call_recordings/app_config.php
Normal file
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
//application details
|
||||
$apps[$x]['name'] = 'Call Recordings';
|
||||
$apps[$x]['uuid'] = '56165644-598d-4ed8-be01-d960bcb8ffed';
|
||||
$apps[$x]['category'] = '';
|
||||
$apps[$x]['subcategory'] = '';
|
||||
$apps[$x]['version'] = '';
|
||||
$apps[$x]['license'] = 'Mozilla Public License 1.1';
|
||||
$apps[$x]['url'] = 'http://www.fusionpbx.com';
|
||||
$apps[$x]['description']['en-us'] = '';
|
||||
|
||||
//permission details
|
||||
$y = 0;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'call_recording_view';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'admin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'call_recording_add';
|
||||
//$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'call_recording_edit';
|
||||
//$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'call_recording_delete';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'admin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'call_recording_play';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'admin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'call_recording_download';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'admin';
|
||||
|
||||
//Call Recordings
|
||||
$y = 2;
|
||||
$apps[$x]['db'][$y]['table']['name'] = 'v_call_recordings';
|
||||
$apps[$x]['db'][$y]['table']['parent'] = '';
|
||||
$z = 0;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_recording_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'primary';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'domain_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = 'v_domains';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'domain_uuid';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_recording_name';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_recording_path';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_recording_length';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_recording_date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamp';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_direction';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_recording_description';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_recording_base64';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
||||
$z++;
|
||||
|
||||
?>
|
||||
344
app/call_recordings/app_languages.php
Normal file
344
app/call_recordings/app_languages.php
Normal file
@@ -0,0 +1,344 @@
|
||||
<?php
|
||||
|
||||
//Call Recordings
|
||||
$text['title-call_recordings']['en-us'] = 'Call Recordings';
|
||||
$text['title-call_recordings']['ar-eg'] = '';
|
||||
$text['title-call_recordings']['de-at'] = '';
|
||||
$text['title-call_recordings']['de-ch'] = '';
|
||||
$text['title-call_recordings']['de-de'] = '';
|
||||
$text['title-call_recordings']['es-cl'] = '';
|
||||
$text['title-call_recordings']['es-mx'] = '';
|
||||
$text['title-call_recordings']['fr-ca'] = '';
|
||||
$text['title-call_recordings']['fr-fr'] = '';
|
||||
$text['title-call_recordings']['he-il'] = '';
|
||||
$text['title-call_recordings']['it-it'] = '';
|
||||
$text['title-call_recordings']['nl-nl'] = '';
|
||||
$text['title-call_recordings']['pl-pl'] = '';
|
||||
$text['title-call_recordings']['pt-br'] = '';
|
||||
$text['title-call_recordings']['pt-pt'] = '';
|
||||
$text['title-call_recordings']['ro-ro'] = '';
|
||||
$text['title-call_recordings']['ru-ru'] = '';
|
||||
$text['title-call_recordings']['sv-se'] = '';
|
||||
$text['title-call_recordings']['uk-ua'] = '';
|
||||
|
||||
$text['title-call_recording']['en-us'] = 'Call Recording';
|
||||
$text['title-call_recording']['ar-eg'] = '';
|
||||
$text['title-call_recording']['de-at'] = '';
|
||||
$text['title-call_recording']['de-ch'] = '';
|
||||
$text['title-call_recording']['de-de'] = '';
|
||||
$text['title-call_recording']['es-cl'] = '';
|
||||
$text['title-call_recording']['es-mx'] = '';
|
||||
$text['title-call_recording']['fr-ca'] = '';
|
||||
$text['title-call_recording']['fr-fr'] = '';
|
||||
$text['title-call_recording']['he-il'] = '';
|
||||
$text['title-call_recording']['it-it'] = '';
|
||||
$text['title-call_recording']['nl-nl'] = '';
|
||||
$text['title-call_recording']['pl-pl'] = '';
|
||||
$text['title-call_recording']['pt-br'] = '';
|
||||
$text['title-call_recording']['pt-pt'] = '';
|
||||
$text['title-call_recording']['ro-ro'] = '';
|
||||
$text['title-call_recording']['ru-ru'] = '';
|
||||
$text['title-call_recording']['sv-se'] = '';
|
||||
$text['title-call_recording']['uk-ua'] = '';
|
||||
|
||||
$text['title_description-call_recording']['en-us'] = 'Shows the call recordings with name, length, date and time, and call direction.';
|
||||
$text['title_description-call_recording']['ar-eg'] = '';
|
||||
$text['title_description-call_recording']['de-at'] = '';
|
||||
$text['title_description-call_recording']['de-ch'] = '';
|
||||
$text['title_description-call_recording']['de-de'] = '';
|
||||
$text['title_description-call_recording']['es-cl'] = '';
|
||||
$text['title_description-call_recording']['es-mx'] = '';
|
||||
$text['title_description-call_recording']['fr-ca'] = '';
|
||||
$text['title_description-call_recording']['fr-fr'] = '';
|
||||
$text['title_description-call_recording']['he-il'] = '';
|
||||
$text['title_description-call_recording']['it-it'] = '';
|
||||
$text['title_description-call_recording']['nl-nl'] = '';
|
||||
$text['title_description-call_recording']['pl-pl'] = '';
|
||||
$text['title_description-call_recording']['pt-br'] = '';
|
||||
$text['title_description-call_recording']['pt-pt'] = '';
|
||||
$text['title_description-call_recording']['ro-ro'] = '';
|
||||
$text['title_description-call_recording']['ru-ru'] = '';
|
||||
$text['title_description-call_recording']['sv-se'] = '';
|
||||
$text['title_description-call_recording']['uk-ua'] = '';
|
||||
|
||||
$text['label-call_recording_name']['en-us'] = 'Name';
|
||||
$text['label-call_recording_name']['ar-eg'] = '';
|
||||
$text['label-call_recording_name']['de-at'] = '';
|
||||
$text['label-call_recording_name']['de-ch'] = '';
|
||||
$text['label-call_recording_name']['de-de'] = '';
|
||||
$text['label-call_recording_name']['es-cl'] = '';
|
||||
$text['label-call_recording_name']['es-mx'] = '';
|
||||
$text['label-call_recording_name']['fr-ca'] = '';
|
||||
$text['label-call_recording_name']['fr-fr'] = '';
|
||||
$text['label-call_recording_name']['he-il'] = '';
|
||||
$text['label-call_recording_name']['it-it'] = '';
|
||||
$text['label-call_recording_name']['nl-nl'] = '';
|
||||
$text['label-call_recording_name']['pl-pl'] = '';
|
||||
$text['label-call_recording_name']['pt-br'] = '';
|
||||
$text['label-call_recording_name']['pt-pt'] = '';
|
||||
$text['label-call_recording_name']['ro-ro'] = '';
|
||||
$text['label-call_recording_name']['ru-ru'] = '';
|
||||
$text['label-call_recording_name']['sv-se'] = '';
|
||||
$text['label-call_recording_name']['uk-ua'] = '';
|
||||
|
||||
$text['description-call_recording_name']['en-us'] = '';
|
||||
$text['description-call_recording_name']['ar-eg'] = '';
|
||||
$text['description-call_recording_name']['de-at'] = '';
|
||||
$text['description-call_recording_name']['de-ch'] = '';
|
||||
$text['description-call_recording_name']['de-de'] = '';
|
||||
$text['description-call_recording_name']['es-cl'] = '';
|
||||
$text['description-call_recording_name']['es-mx'] = '';
|
||||
$text['description-call_recording_name']['fr-ca'] = '';
|
||||
$text['description-call_recording_name']['fr-fr'] = '';
|
||||
$text['description-call_recording_name']['he-il'] = '';
|
||||
$text['description-call_recording_name']['it-it'] = '';
|
||||
$text['description-call_recording_name']['nl-nl'] = '';
|
||||
$text['description-call_recording_name']['pl-pl'] = '';
|
||||
$text['description-call_recording_name']['pt-br'] = '';
|
||||
$text['description-call_recording_name']['pt-pt'] = '';
|
||||
$text['description-call_recording_name']['ro-ro'] = '';
|
||||
$text['description-call_recording_name']['ru-ru'] = '';
|
||||
$text['description-call_recording_name']['sv-se'] = '';
|
||||
$text['description-call_recording_name']['uk-ua'] = '';
|
||||
|
||||
$text['label-call_recording_path']['en-us'] = 'Path';
|
||||
$text['label-call_recording_path']['ar-eg'] = '';
|
||||
$text['label-call_recording_path']['de-at'] = '';
|
||||
$text['label-call_recording_path']['de-ch'] = '';
|
||||
$text['label-call_recording_path']['de-de'] = '';
|
||||
$text['label-call_recording_path']['es-cl'] = '';
|
||||
$text['label-call_recording_path']['es-mx'] = '';
|
||||
$text['label-call_recording_path']['fr-ca'] = '';
|
||||
$text['label-call_recording_path']['fr-fr'] = '';
|
||||
$text['label-call_recording_path']['he-il'] = '';
|
||||
$text['label-call_recording_path']['it-it'] = '';
|
||||
$text['label-call_recording_path']['nl-nl'] = '';
|
||||
$text['label-call_recording_path']['pl-pl'] = '';
|
||||
$text['label-call_recording_path']['pt-br'] = '';
|
||||
$text['label-call_recording_path']['pt-pt'] = '';
|
||||
$text['label-call_recording_path']['ro-ro'] = '';
|
||||
$text['label-call_recording_path']['ru-ru'] = '';
|
||||
$text['label-call_recording_path']['sv-se'] = '';
|
||||
$text['label-call_recording_path']['uk-ua'] = '';
|
||||
|
||||
$text['description-call_recording_path']['en-us'] = '';
|
||||
$text['description-call_recording_path']['ar-eg'] = '';
|
||||
$text['description-call_recording_path']['de-at'] = '';
|
||||
$text['description-call_recording_path']['de-ch'] = '';
|
||||
$text['description-call_recording_path']['de-de'] = '';
|
||||
$text['description-call_recording_path']['es-cl'] = '';
|
||||
$text['description-call_recording_path']['es-mx'] = '';
|
||||
$text['description-call_recording_path']['fr-ca'] = '';
|
||||
$text['description-call_recording_path']['fr-fr'] = '';
|
||||
$text['description-call_recording_path']['he-il'] = '';
|
||||
$text['description-call_recording_path']['it-it'] = '';
|
||||
$text['description-call_recording_path']['nl-nl'] = '';
|
||||
$text['description-call_recording_path']['pl-pl'] = '';
|
||||
$text['description-call_recording_path']['pt-br'] = '';
|
||||
$text['description-call_recording_path']['pt-pt'] = '';
|
||||
$text['description-call_recording_path']['ro-ro'] = '';
|
||||
$text['description-call_recording_path']['ru-ru'] = '';
|
||||
$text['description-call_recording_path']['sv-se'] = '';
|
||||
$text['description-call_recording_path']['uk-ua'] = '';
|
||||
|
||||
$text['label-call_recording_length']['en-us'] = 'Length';
|
||||
$text['label-call_recording_length']['ar-eg'] = '';
|
||||
$text['label-call_recording_length']['de-at'] = '';
|
||||
$text['label-call_recording_length']['de-ch'] = '';
|
||||
$text['label-call_recording_length']['de-de'] = '';
|
||||
$text['label-call_recording_length']['es-cl'] = '';
|
||||
$text['label-call_recording_length']['es-mx'] = '';
|
||||
$text['label-call_recording_length']['fr-ca'] = '';
|
||||
$text['label-call_recording_length']['fr-fr'] = '';
|
||||
$text['label-call_recording_length']['he-il'] = '';
|
||||
$text['label-call_recording_length']['it-it'] = '';
|
||||
$text['label-call_recording_length']['nl-nl'] = '';
|
||||
$text['label-call_recording_length']['pl-pl'] = '';
|
||||
$text['label-call_recording_length']['pt-br'] = '';
|
||||
$text['label-call_recording_length']['pt-pt'] = '';
|
||||
$text['label-call_recording_length']['ro-ro'] = '';
|
||||
$text['label-call_recording_length']['ru-ru'] = '';
|
||||
$text['label-call_recording_length']['sv-se'] = '';
|
||||
$text['label-call_recording_length']['uk-ua'] = '';
|
||||
|
||||
$text['description-call_recording_length']['en-us'] = '';
|
||||
$text['description-call_recording_length']['ar-eg'] = '';
|
||||
$text['description-call_recording_length']['de-at'] = '';
|
||||
$text['description-call_recording_length']['de-ch'] = '';
|
||||
$text['description-call_recording_length']['de-de'] = '';
|
||||
$text['description-call_recording_length']['es-cl'] = '';
|
||||
$text['description-call_recording_length']['es-mx'] = '';
|
||||
$text['description-call_recording_length']['fr-ca'] = '';
|
||||
$text['description-call_recording_length']['fr-fr'] = '';
|
||||
$text['description-call_recording_length']['he-il'] = '';
|
||||
$text['description-call_recording_length']['it-it'] = '';
|
||||
$text['description-call_recording_length']['nl-nl'] = '';
|
||||
$text['description-call_recording_length']['pl-pl'] = '';
|
||||
$text['description-call_recording_length']['pt-br'] = '';
|
||||
$text['description-call_recording_length']['pt-pt'] = '';
|
||||
$text['description-call_recording_length']['ro-ro'] = '';
|
||||
$text['description-call_recording_length']['ru-ru'] = '';
|
||||
$text['description-call_recording_length']['sv-se'] = '';
|
||||
$text['description-call_recording_length']['uk-ua'] = '';
|
||||
|
||||
$text['label-call_recording_date']['en-us'] = 'Date';
|
||||
$text['label-call_recording_date']['ar-eg'] = '';
|
||||
$text['label-call_recording_date']['de-at'] = '';
|
||||
$text['label-call_recording_date']['de-ch'] = '';
|
||||
$text['label-call_recording_date']['de-de'] = '';
|
||||
$text['label-call_recording_date']['es-cl'] = '';
|
||||
$text['label-call_recording_date']['es-mx'] = '';
|
||||
$text['label-call_recording_date']['fr-ca'] = '';
|
||||
$text['label-call_recording_date']['fr-fr'] = '';
|
||||
$text['label-call_recording_date']['he-il'] = '';
|
||||
$text['label-call_recording_date']['it-it'] = '';
|
||||
$text['label-call_recording_date']['nl-nl'] = '';
|
||||
$text['label-call_recording_date']['pl-pl'] = '';
|
||||
$text['label-call_recording_date']['pt-br'] = '';
|
||||
$text['label-call_recording_date']['pt-pt'] = '';
|
||||
$text['label-call_recording_date']['ro-ro'] = '';
|
||||
$text['label-call_recording_date']['ru-ru'] = '';
|
||||
$text['label-call_recording_date']['sv-se'] = '';
|
||||
$text['label-call_recording_date']['uk-ua'] = '';
|
||||
|
||||
$text['description-call_recording_date']['en-us'] = '';
|
||||
$text['description-call_recording_date']['ar-eg'] = '';
|
||||
$text['description-call_recording_date']['de-at'] = '';
|
||||
$text['description-call_recording_date']['de-ch'] = '';
|
||||
$text['description-call_recording_date']['de-de'] = '';
|
||||
$text['description-call_recording_date']['es-cl'] = '';
|
||||
$text['description-call_recording_date']['es-mx'] = '';
|
||||
$text['description-call_recording_date']['fr-ca'] = '';
|
||||
$text['description-call_recording_date']['fr-fr'] = '';
|
||||
$text['description-call_recording_date']['he-il'] = '';
|
||||
$text['description-call_recording_date']['it-it'] = '';
|
||||
$text['description-call_recording_date']['nl-nl'] = '';
|
||||
$text['description-call_recording_date']['pl-pl'] = '';
|
||||
$text['description-call_recording_date']['pt-br'] = '';
|
||||
$text['description-call_recording_date']['pt-pt'] = '';
|
||||
$text['description-call_recording_date']['ro-ro'] = '';
|
||||
$text['description-call_recording_date']['ru-ru'] = '';
|
||||
$text['description-call_recording_date']['sv-se'] = '';
|
||||
$text['description-call_recording_date']['uk-ua'] = '';
|
||||
|
||||
$text['label-call_direction']['en-us'] = 'Direction';
|
||||
$text['label-call_direction']['ar-eg'] = '';
|
||||
$text['label-call_direction']['de-at'] = '';
|
||||
$text['label-call_direction']['de-ch'] = '';
|
||||
$text['label-call_direction']['de-de'] = '';
|
||||
$text['label-call_direction']['es-cl'] = '';
|
||||
$text['label-call_direction']['es-mx'] = '';
|
||||
$text['label-call_direction']['fr-ca'] = '';
|
||||
$text['label-call_direction']['fr-fr'] = '';
|
||||
$text['label-call_direction']['he-il'] = '';
|
||||
$text['label-call_direction']['it-it'] = '';
|
||||
$text['label-call_direction']['nl-nl'] = '';
|
||||
$text['label-call_direction']['pl-pl'] = '';
|
||||
$text['label-call_direction']['pt-br'] = '';
|
||||
$text['label-call_direction']['pt-pt'] = '';
|
||||
$text['label-call_direction']['ro-ro'] = '';
|
||||
$text['label-call_direction']['ru-ru'] = '';
|
||||
$text['label-call_direction']['sv-se'] = '';
|
||||
$text['label-call_direction']['uk-ua'] = '';
|
||||
|
||||
$text['description-call_direction']['en-us'] = '';
|
||||
$text['description-call_direction']['ar-eg'] = '';
|
||||
$text['description-call_direction']['de-at'] = '';
|
||||
$text['description-call_direction']['de-ch'] = '';
|
||||
$text['description-call_direction']['de-de'] = '';
|
||||
$text['description-call_direction']['es-cl'] = '';
|
||||
$text['description-call_direction']['es-mx'] = '';
|
||||
$text['description-call_direction']['fr-ca'] = '';
|
||||
$text['description-call_direction']['fr-fr'] = '';
|
||||
$text['description-call_direction']['he-il'] = '';
|
||||
$text['description-call_direction']['it-it'] = '';
|
||||
$text['description-call_direction']['nl-nl'] = '';
|
||||
$text['description-call_direction']['pl-pl'] = '';
|
||||
$text['description-call_direction']['pt-br'] = '';
|
||||
$text['description-call_direction']['pt-pt'] = '';
|
||||
$text['description-call_direction']['ro-ro'] = '';
|
||||
$text['description-call_direction']['ru-ru'] = '';
|
||||
$text['description-call_direction']['sv-se'] = '';
|
||||
$text['description-call_direction']['uk-ua'] = '';
|
||||
|
||||
$text['label-call_recording_description']['en-us'] = 'Description';
|
||||
$text['label-call_recording_description']['ar-eg'] = '';
|
||||
$text['label-call_recording_description']['de-at'] = '';
|
||||
$text['label-call_recording_description']['de-ch'] = '';
|
||||
$text['label-call_recording_description']['de-de'] = '';
|
||||
$text['label-call_recording_description']['es-cl'] = '';
|
||||
$text['label-call_recording_description']['es-mx'] = '';
|
||||
$text['label-call_recording_description']['fr-ca'] = '';
|
||||
$text['label-call_recording_description']['fr-fr'] = '';
|
||||
$text['label-call_recording_description']['he-il'] = '';
|
||||
$text['label-call_recording_description']['it-it'] = '';
|
||||
$text['label-call_recording_description']['nl-nl'] = '';
|
||||
$text['label-call_recording_description']['pl-pl'] = '';
|
||||
$text['label-call_recording_description']['pt-br'] = '';
|
||||
$text['label-call_recording_description']['pt-pt'] = '';
|
||||
$text['label-call_recording_description']['ro-ro'] = '';
|
||||
$text['label-call_recording_description']['ru-ru'] = '';
|
||||
$text['label-call_recording_description']['sv-se'] = '';
|
||||
$text['label-call_recording_description']['uk-ua'] = '';
|
||||
|
||||
$text['description-call_recording_description']['en-us'] = '';
|
||||
$text['description-call_recording_description']['ar-eg'] = '';
|
||||
$text['description-call_recording_description']['de-at'] = '';
|
||||
$text['description-call_recording_description']['de-ch'] = '';
|
||||
$text['description-call_recording_description']['de-de'] = '';
|
||||
$text['description-call_recording_description']['es-cl'] = '';
|
||||
$text['description-call_recording_description']['es-mx'] = '';
|
||||
$text['description-call_recording_description']['fr-ca'] = '';
|
||||
$text['description-call_recording_description']['fr-fr'] = '';
|
||||
$text['description-call_recording_description']['he-il'] = '';
|
||||
$text['description-call_recording_description']['it-it'] = '';
|
||||
$text['description-call_recording_description']['nl-nl'] = '';
|
||||
$text['description-call_recording_description']['pl-pl'] = '';
|
||||
$text['description-call_recording_description']['pt-br'] = '';
|
||||
$text['description-call_recording_description']['pt-pt'] = '';
|
||||
$text['description-call_recording_description']['ro-ro'] = '';
|
||||
$text['description-call_recording_description']['ru-ru'] = '';
|
||||
$text['description-call_recording_description']['sv-se'] = '';
|
||||
$text['description-call_recording_description']['uk-ua'] = '';
|
||||
|
||||
$text['label-call_recording_base64']['en-us'] = 'Base64';
|
||||
$text['label-call_recording_base64']['ar-eg'] = '';
|
||||
$text['label-call_recording_base64']['de-at'] = '';
|
||||
$text['label-call_recording_base64']['de-ch'] = '';
|
||||
$text['label-call_recording_base64']['de-de'] = '';
|
||||
$text['label-call_recording_base64']['es-cl'] = '';
|
||||
$text['label-call_recording_base64']['es-mx'] = '';
|
||||
$text['label-call_recording_base64']['fr-ca'] = '';
|
||||
$text['label-call_recording_base64']['fr-fr'] = '';
|
||||
$text['label-call_recording_base64']['he-il'] = '';
|
||||
$text['label-call_recording_base64']['it-it'] = '';
|
||||
$text['label-call_recording_base64']['nl-nl'] = '';
|
||||
$text['label-call_recording_base64']['pl-pl'] = '';
|
||||
$text['label-call_recording_base64']['pt-br'] = '';
|
||||
$text['label-call_recording_base64']['pt-pt'] = '';
|
||||
$text['label-call_recording_base64']['ro-ro'] = '';
|
||||
$text['label-call_recording_base64']['ru-ru'] = '';
|
||||
$text['label-call_recording_base64']['sv-se'] = '';
|
||||
$text['label-call_recording_base64']['uk-ua'] = '';
|
||||
|
||||
$text['description-call_recording_base64']['en-us'] = '';
|
||||
$text['description-call_recording_base64']['ar-eg'] = '';
|
||||
$text['description-call_recording_base64']['de-at'] = '';
|
||||
$text['description-call_recording_base64']['de-ch'] = '';
|
||||
$text['description-call_recording_base64']['de-de'] = '';
|
||||
$text['description-call_recording_base64']['es-cl'] = '';
|
||||
$text['description-call_recording_base64']['es-mx'] = '';
|
||||
$text['description-call_recording_base64']['fr-ca'] = '';
|
||||
$text['description-call_recording_base64']['fr-fr'] = '';
|
||||
$text['description-call_recording_base64']['he-il'] = '';
|
||||
$text['description-call_recording_base64']['it-it'] = '';
|
||||
$text['description-call_recording_base64']['nl-nl'] = '';
|
||||
$text['description-call_recording_base64']['pl-pl'] = '';
|
||||
$text['description-call_recording_base64']['pt-br'] = '';
|
||||
$text['description-call_recording_base64']['pt-pt'] = '';
|
||||
$text['description-call_recording_base64']['ro-ro'] = '';
|
||||
$text['description-call_recording_base64']['ru-ru'] = '';
|
||||
$text['description-call_recording_base64']['sv-se'] = '';
|
||||
$text['description-call_recording_base64']['uk-ua'] = '';
|
||||
|
||||
?>
|
||||
19
app/call_recordings/app_menu.php
Normal file
19
app/call_recordings/app_menu.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
$apps[$x]['menu'][0]['title']['en-us'] = 'Call Recordings';
|
||||
$apps[$x]['menu'][0]['title']['es-cl'] = '';
|
||||
$apps[$x]['menu'][0]['title']['fr-fr'] = '';
|
||||
$apps[$x]['menu'][0]['title']['fr-ca'] = '';
|
||||
$apps[$x]['menu'][0]['title']['pl'] = '';
|
||||
$apps[$x]['menu'][0]['title']['sv-se'] = '';
|
||||
$apps[$x]['menu'][0]['title']['uk'] = '';
|
||||
$apps[$x]['menu'][0]['title']['de-at'] = '';
|
||||
$apps[$x]['menu'][0]['uuid'] = 'd5b7bd0e-5e56-4d87-b2d5-7d7b2f7307ef';
|
||||
$apps[$x]['menu'][0]['parent_uuid'] = 'fd29e39c-c936-f5fc-8e2b-611681b266b5';
|
||||
$apps[$x]['menu'][0]['category'] = 'internal';
|
||||
$apps[$x]['menu'][0]['path'] = '/app/call_recordings/call_recordings.php';
|
||||
$apps[$x]['menu'][0]['groups'][] = 'superadmin';
|
||||
//$apps[$x]['menu'][0]['groups'][] = 'admin';
|
||||
//$apps[$x]['menu'][0]['groups'][] = 'user';
|
||||
|
||||
?>
|
||||
42
app/call_recordings/call_recording_delete.php
Normal file
42
app/call_recordings/call_recording_delete.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
|
||||
//check permissions
|
||||
require_once "resources/check_auth.php";
|
||||
if (permission_exists('call_recording_delete')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//get the id
|
||||
if (count($_GET)>0) {
|
||||
$id = check_str($_GET["id"]);
|
||||
}
|
||||
|
||||
//delete the data
|
||||
if (strlen($id)>0) {
|
||||
$sql = "delete from v_call_recordings ";
|
||||
$sql .= "where call_recording_uuid = '$id' ";
|
||||
$sql .= "and domain_uuid = '$domain_uuid' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
unset($sql);
|
||||
}
|
||||
|
||||
//delete message
|
||||
messages::add($text['message-delete']);
|
||||
|
||||
//redirect the user
|
||||
header('Location: call_recordings.php');
|
||||
|
||||
?>
|
||||
240
app/call_recordings/call_recording_edit.php
Normal file
240
app/call_recordings/call_recording_edit.php
Normal file
@@ -0,0 +1,240 @@
|
||||
<?php
|
||||
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
|
||||
//check permissions
|
||||
require_once "resources/check_auth.php";
|
||||
if (permission_exists('call_recording_add') || permission_exists('call_recording_edit')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//action add or update
|
||||
if (isset($_REQUEST["id"])) {
|
||||
$action = "update";
|
||||
$call_recording_uuid = check_str($_REQUEST["id"]);
|
||||
}
|
||||
else {
|
||||
$action = "add";
|
||||
}
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
if (is_array($_POST)) {
|
||||
$call_recording_name = check_str($_POST["call_recording_name"]);
|
||||
$call_recording_path = check_str($_POST["call_recording_path"]);
|
||||
$call_recording_length = check_str($_POST["call_recording_length"]);
|
||||
$call_recording_date = check_str($_POST["call_recording_date"]);
|
||||
$call_direction = check_str($_POST["call_direction"]);
|
||||
$call_recording_description = check_str($_POST["call_recording_description"]);
|
||||
$call_recording_base64 = check_str($_POST["call_recording_base64"]);
|
||||
}
|
||||
|
||||
//process the user data and save it to the database
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//get the uuid from the POST
|
||||
if ($action == "update") {
|
||||
$call_recording_uuid = check_str($_POST["call_recording_uuid"]);
|
||||
}
|
||||
|
||||
//check for all required data
|
||||
$msg = '';
|
||||
if (strlen($call_recording_name) == 0) { $msg .= $text['message-required']." ".$text['label-call_recording_name']."<br>\n"; }
|
||||
//if (strlen($call_recording_path) == 0) { $msg .= $text['message-required']." ".$text['label-call_recording_path']."<br>\n"; }
|
||||
if (strlen($call_recording_length) == 0) { $msg .= $text['message-required']." ".$text['label-call_recording_length']."<br>\n"; }
|
||||
if (strlen($call_recording_date) == 0) { $msg .= $text['message-required']." ".$text['label-call_recording_date']."<br>\n"; }
|
||||
if (strlen($call_direction) == 0) { $msg .= $text['message-required']." ".$text['label-call_direction']."<br>\n"; }
|
||||
//if (strlen($call_recording_description) == 0) { $msg .= $text['message-required']." ".$text['label-call_recording_description']."<br>\n"; }
|
||||
//if (strlen($call_recording_base64) == 0) { $msg .= $text['message-required']." ".$text['label-call_recording_base64']."<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table><tr><td>\n";
|
||||
echo $msg."<br />";
|
||||
echo "</td></tr></table>\n";
|
||||
persistformvar($_POST);
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
//set the domain_uuid
|
||||
$_POST["domain_uuid"] = $_SESSION["domain_uuid"];
|
||||
|
||||
//add the call_recording_uuid
|
||||
if (strlen($_POST["call_recording_uuid"]) == 0) {
|
||||
$call_recording_uuid = uuid();
|
||||
$_POST["call_recording_uuid"] = $call_recording_uuid;
|
||||
}
|
||||
|
||||
//prepare the array
|
||||
$array['call_recordings'][0] = $_POST;
|
||||
|
||||
//save to the data
|
||||
$database = new database;
|
||||
$database->app_name = 'call_recordings';
|
||||
$database->app_uuid = null;
|
||||
if (strlen($call_recording_uuid) > 0) {
|
||||
$database->uuid($call_recording_uuid);
|
||||
}
|
||||
$database->save($array);
|
||||
$message = $database->message;
|
||||
|
||||
//debug info
|
||||
//echo "<pre>";
|
||||
//print_r($message);
|
||||
//echo "</pre>";
|
||||
//exit;
|
||||
|
||||
//redirect the user
|
||||
if (isset($action)) {
|
||||
if ($action == "add") {
|
||||
$_SESSION["message"] = $text['message-add'];
|
||||
}
|
||||
if ($action == "update") {
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
}
|
||||
header('Location: call_recording_edit.php?id='.$call_recording_uuid);
|
||||
return;
|
||||
}
|
||||
} //(is_array($_POST) && strlen($_POST["persistformvar"]) == 0)
|
||||
|
||||
//pre-populate the form
|
||||
if (is_array($_GET) && $_POST["persistformvar"] != "true") {
|
||||
$call_recording_uuid = check_str($_GET["id"]);
|
||||
$sql = "select * from v_call_recordings ";
|
||||
$sql .= "where call_recording_uuid = '$call_recording_uuid' ";
|
||||
//$sql .= "and domain_uuid = '$domain_uuid' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
foreach ($result as &$row) {
|
||||
$call_recording_name = $row["call_recording_name"];
|
||||
$call_recording_path = $row["call_recording_path"];
|
||||
$call_recording_length = $row["call_recording_length"];
|
||||
$call_recording_date = $row["call_recording_date"];
|
||||
$call_direction = $row["call_direction"];
|
||||
$call_recording_description = $row["call_recording_description"];
|
||||
$call_recording_base64 = $row["call_recording_base64"];
|
||||
}
|
||||
unset ($prep_statement);
|
||||
}
|
||||
|
||||
//show the header
|
||||
require_once "resources/header.php";
|
||||
|
||||
//add the calendar
|
||||
echo "<script language='JavaScript' type='text/javascript'>\n";
|
||||
echo " $(document).ready(function() {\n";
|
||||
echo " apply_datetimepicker();\n";
|
||||
echo " });\n";
|
||||
echo " function apply_datetimepicker() {\n";
|
||||
echo " $('.datetimepicker').datetimepicker({ format: 'YYYY-MM-DD HH:mm', showTodayButton: true, showClear: true, showClose: true });\n";
|
||||
echo " $('.datepicker').datetimepicker({ format: 'YYYY-MM-DD', showClear: true, showClose: true });\n";
|
||||
echo " }\n";
|
||||
echo "</script>\n";
|
||||
|
||||
//show the content
|
||||
echo "<form name='frm' id='frm' method='post' action=''>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td align='left' width='30%' nowrap='nowrap' valign='top'><b>".$text['title-call_recording']."</b><br><br></td>\n";
|
||||
echo "<td width='70%' align='right' valign='top'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='call_recordings.php'\" value='".$text['button-back']."'>";
|
||||
echo " <input type='submit' class='btn' value='".$text['button-save']."'>";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-call_recording_name']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='call_recording_name' maxlength='255' value=\"$call_recording_name\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-call_recording_name']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-call_recording_path']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='call_recording_path' maxlength='255' value=\"$call_recording_path\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-call_recording_path']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-call_recording_length']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='call_recording_length' maxlength='255' value='$call_recording_length'>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-call_recording_length']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-call_recording_date']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <input class='formfld datetimepicker' type='text' name='call_recording_date' maxlength='16' value=\"$call_recording_date\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-call_recording_date']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-call_direction']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='call_direction' maxlength='255' value=\"$call_direction\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-call_direction']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-call_recording_description']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='call_recording_description' maxlength='255' value=\"$call_recording_description\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-call_recording_description']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo " <tr>\n";
|
||||
echo " <td colspan='2' align='right'>\n";
|
||||
if ($action == "update") {
|
||||
echo " <input type='hidden' name='call_recording_uuid' value='$call_recording_uuid'>\n";
|
||||
}
|
||||
echo " <input type='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "</form>";
|
||||
echo "<br /><br />";
|
||||
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
263
app/call_recordings/call_recordings.php
Normal file
263
app/call_recordings/call_recordings.php
Normal file
@@ -0,0 +1,263 @@
|
||||
<?php
|
||||
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
|
||||
//check permissions
|
||||
require_once "resources/check_auth.php";
|
||||
if (permission_exists('call_recording_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//get variables used to control the order
|
||||
$order_by = check_str($_GET["order_by"]);
|
||||
$order = check_str($_GET["order"]);
|
||||
|
||||
//add the search term
|
||||
$search = strtolower(check_str($_GET["search"]));
|
||||
if (strlen($search) > 0) {
|
||||
$sql_search = "and (";
|
||||
$sql_search .= "lower(call_recording_name) like '%".$search."%' ";
|
||||
$sql_search .= "or lower(call_recording_path) like '%".$search."%' ";
|
||||
$sql_search .= "or lower(call_direction) like '%".$search."%' ";
|
||||
$sql_search .= "or lower(call_recording_description) like '%".$search."%' ";
|
||||
$sql_search .= ") ";
|
||||
}
|
||||
|
||||
//delete the recordings
|
||||
if (permission_exists('call_recording_delete')) {
|
||||
if (is_array($_POST["call_recordings"])) {
|
||||
//set the array
|
||||
$call_recordings = $_POST["call_recordings"];
|
||||
//debug info
|
||||
//echo "<pre>\n";
|
||||
//print_r($call_recordings);
|
||||
//echo "</pre>\n";
|
||||
//get the action
|
||||
foreach($call_recordings as $row) {
|
||||
if ($row['action'] == 'delete') {
|
||||
$action = 'delete';
|
||||
break;
|
||||
}
|
||||
}
|
||||
//delete the checked rows
|
||||
if ($action == 'delete') {
|
||||
foreach($call_recordings as $row) {
|
||||
if ($row['checked'] == 'true') {
|
||||
$sql = "delete from v_call_recordings ";
|
||||
$sql .= "where call_recording_uuid = '".$row['call_recording_uuid']."'; ";
|
||||
//echo $sql."\n";
|
||||
$db->query($sql);
|
||||
unset($sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
//delete message
|
||||
messages::add($text['message-delete']);
|
||||
}
|
||||
}
|
||||
|
||||
//additional includes
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/paging.php";
|
||||
|
||||
//prepare to page the results
|
||||
$sql = "select count(call_recording_uuid) as num_rows from v_call_recordings ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION["domain_uuid"]."' ";
|
||||
$sql .= $sql_search;
|
||||
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
|
||||
$prep_statement = $db->prepare($sql);
|
||||
if ($prep_statement) {
|
||||
$prep_statement->execute();
|
||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||
if ($row['num_rows'] > 0) {
|
||||
$num_rows = $row['num_rows'];
|
||||
}
|
||||
else {
|
||||
$num_rows = '0';
|
||||
}
|
||||
}
|
||||
|
||||
//prepare to page the results
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = "";
|
||||
$page = $_GET['page'];
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the list
|
||||
$sql = "select * from v_call_recordings ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION["domain_uuid"]."' ";
|
||||
$sql .= $sql_search;
|
||||
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
|
||||
$sql .= "limit $rows_per_page offset $offset ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
unset ($prep_statement, $sql);
|
||||
|
||||
//alternate the row style
|
||||
$c = 0;
|
||||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
|
||||
//define the checkbox_toggle function
|
||||
echo "<script type=\"text/javascript\">\n";
|
||||
echo " function checkbox_toggle(item) {\n";
|
||||
echo " var inputs = document.getElementsByTagName(\"input\");\n";
|
||||
echo " for (var i = 0, max = inputs.length; i < max; i++) {\n";
|
||||
echo " if (inputs[i].type === 'checkbox') {\n";
|
||||
echo " if (document.getElementById('checkbox_all').checked == true) {\n";
|
||||
echo " inputs[i].checked = true;\n";
|
||||
echo " }\n";
|
||||
echo " else {\n";
|
||||
echo " inputs[i].checked = false;\n";
|
||||
echo " }\n";
|
||||
echo " }\n";
|
||||
echo " }\n";
|
||||
echo " }\n";
|
||||
echo "</script>\n";
|
||||
|
||||
//show the content
|
||||
echo "<table width='100%' border='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td width='50%' align='left' nowrap='nowrap'><b>".$text['title-call_recordings']."</b></td>\n";
|
||||
echo " <form method='get' action=''>\n";
|
||||
echo " <td width='50%' style='vertical-align: top; text-align: right; white-space: nowrap;'>\n";
|
||||
echo " <input type='text' class='txt' style='width: 150px' name='search' id='search' value='".$search."'>\n";
|
||||
echo " <input type='submit' class='btn' name='submit' value='".$text['button-search']."'>\n";
|
||||
echo " </td>\n";
|
||||
echo " </form>\n";
|
||||
echo " </tr>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td align='left' colspan='2'>\n";
|
||||
echo " ".$text['title_description-call_recording']."<br /><br />\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo "</table>\n";
|
||||
|
||||
//echo "<style>\n";
|
||||
//echo "audio {\n";
|
||||
//echo " background-color: #ffffff;\n";
|
||||
//echo " background-color: rgba(0,0,0,0);\n";
|
||||
//echo " -webkit-border-radius:7px 7px 7px 7px ;\n";
|
||||
//echo " border-radius:7px 7px 7px 7px ;\n";
|
||||
//echo "}\n";
|
||||
//echo "</style>\n";
|
||||
echo "\n";
|
||||
|
||||
echo "<form method='post' action=''>\n";
|
||||
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo " <th style='width:4px;'>\n";
|
||||
echo " <input type='checkbox' name='checkbox_all' id='checkbox_all' value='' onclick=\"checkbox_toggle();\">\n";
|
||||
echo " </th>\n";
|
||||
echo th_order_by('call_recording_name', $text['label-call_recording_name'], $order_by, $order);
|
||||
echo "<th>".$text['label-recording']."</th>\n";
|
||||
//echo th_order_by('call_recording_path', $text['label-play'], $order_by, $order);
|
||||
echo th_order_by('call_recording_length', $text['label-call_recording_length'], $order_by, $order);
|
||||
echo th_order_by('call_recording_date', $text['label-call_recording_date'], $order_by, $order);
|
||||
echo th_order_by('call_direction', $text['label-call_direction'], $order_by, $order);
|
||||
echo th_order_by('call_recording_description', $text['label-call_recording_description'], $order_by, $order);
|
||||
//echo th_order_by('call_recording_base64', $text['label-call_recording_base64'], $order_by, $order);
|
||||
echo " <td class='list_control_icons'>";
|
||||
if (permission_exists('call_recording_add')) {
|
||||
echo " <a href='call_recording_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
else {
|
||||
echo " \n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo "<tr>\n";
|
||||
|
||||
if (is_array($result)) {
|
||||
$x = 0;
|
||||
foreach($result as $row) {
|
||||
//if (permission_exists('recording_play') && $recording_file_path != '') {
|
||||
// echo "<tr id='recording_progress_bar_".$row['call_recording_uuid']."' style='display: none3;'><td class='".$row_style[$c]." playback_progress_bar_background' style='padding: 0; border: none;' colspan='".((if_group("admin") || if_group("superadmin") || if_group("cdr")) ? ($col_count - 1) : $col_count)."'><span class='playback_progress_bar' id='recording_progress_".$row['call_recording_uuid']."'></span></td></tr>\n";
|
||||
//}
|
||||
if (permission_exists('call_recording_edit')) {
|
||||
$tr_link = "href='call_recording_edit.php?id=".$row['call_recording_uuid']."'";
|
||||
}
|
||||
echo "<tr ".$tr_link.">\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]." tr_link_void' style='text-align: center; padding: 3px 3px 0px 8px;'>\n";
|
||||
echo " <input type='checkbox' name=\"call_recordings[$x][checked]\" id='checkbox_".$x."' value='true' onclick=\"if (!this.checked) { document.getElementById('chk_all_".$x."').checked = false; }\">\n";
|
||||
echo " <input type='hidden' name=\"call_recordings[$x][call_recording_uuid]\" value='".$row['call_recording_uuid']."' />\n";
|
||||
echo " </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['call_recording_name']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]." row_style_slim tr_link_void' valign='top' align='center' nowrap='nowrap'>\n";
|
||||
//echo " <audio controls=\"download\" preload=\"metadata\" style=\"width:200px;\">\n";
|
||||
//echo " <source src=\"download.php?id=".$row['call_recording_uuid']."\" type=\"audio/wav\">\n";
|
||||
//echo " </audio>\n";
|
||||
//echo " <a href=\"download.php?id=".$row['call_recording_uuid']."&t=bin\">".$text['label-download']." ".$v_link_label_download."</a>\n";
|
||||
|
||||
//if (permission_exists('recording_play')) {
|
||||
echo "<audio id='recording_audio_".$row['call_recording_uuid']."' style='display: none;' preload='none' ontimeupdate=\"update_progress('".$row['call_recording_uuid']."')\" onended=\"recording_reset('".$row['call_recording_uuid']."');\" src=\"download.php?id=".$row['call_recording_uuid']."\" type='".$recording_type."'></audio>";
|
||||
echo "<span id='recording_button_".$row['call_recording_uuid']."' onclick=\"recording_play('".$row['call_recording_uuid']."')\" title='".$text['label-play']." / ".$text['label-pause']."'>".$v_link_label_play."</span>";
|
||||
//}
|
||||
//if (permission_exists('recording_download')) {
|
||||
echo "<a href=\"download.php?id=".$row['call_recording_uuid']."&t=bin\" title='".$text['label-download']."'>".$v_link_label_download."</a>";
|
||||
//}
|
||||
echo " </td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."' style=\"\">\n";
|
||||
//echo " <a href=\"download.php?id=".$row['call_recording_uuid']."&t=bin\">".$text['label-download']." ".$v_link_label_download."</a>\n";
|
||||
//echo " </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['call_recording_length']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['call_recording_date']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['call_direction']." </td>\n";
|
||||
echo " <td valign='top' class='row_stylebg'>".$row['call_recording_description']." </td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['call_recording_base64']." </td>\n";
|
||||
echo " <td class='list_control_icons'>";
|
||||
if (permission_exists('xml_cdr_details')) {
|
||||
echo " <a href='/app/xml_cdr/xml_cdr_details.php?uuid=".$row['call_recording_uuid']."' title='".$text['button-view']."'>$v_link_label_view</a>";
|
||||
}
|
||||
if (permission_exists('call_recording_edit')) {
|
||||
echo "<button type='button' class='btn btn-default list_control_icon' name='' alt='".$text['button-edit']."' onclick=\"window.location='call_recording_edit.php?id=".$row['call_recording_uuid']."'\" value='edit'><span class='glyphicon glyphicon-pencil'></span></input>\n";
|
||||
}
|
||||
if (permission_exists('call_recording_delete')) {
|
||||
echo "<button type='submit' class='btn btn-default list_control_icon' name=\"call_recordings[$x][action]\" alt='".$text['button-delete']."' value='delete'><span class='glyphicon glyphicon-remove'></span></button>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
$x++;
|
||||
if ($c==0) { $c=1; } else { $c=0; }
|
||||
} //end foreach
|
||||
unset($sql, $result, $row_count);
|
||||
} //end if results
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td colspan='9' align='left'>\n";
|
||||
echo " <table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td width='33.3%' nowrap='nowrap'> </td>\n";
|
||||
echo " <td width='33.3%' align='center' nowrap='nowrap'>$paging_controls</td>\n";
|
||||
echo " <td class='list_control_icons'>";
|
||||
if (permission_exists('call_recording_add')) {
|
||||
echo "<a href='call_recording_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
else {
|
||||
echo " ";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "</table>";
|
||||
echo "</form>\n";
|
||||
echo "<br /><br />";
|
||||
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
45
app/call_recordings/download.php
Normal file
45
app/call_recordings/download.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is FusionPBX
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2016
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
|
||||
//check permisions
|
||||
require_once "resources/check_auth.php";
|
||||
if (permission_exists('call_recording_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//download
|
||||
$obj = new call_recordings;
|
||||
$obj->download();
|
||||
|
||||
?>
|
||||
123
app/call_recordings/resources/classes/call_recordings.php
Normal file
123
app/call_recordings/resources/classes/call_recordings.php
Normal file
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* call_recordings class
|
||||
*
|
||||
* @method null download
|
||||
*/
|
||||
if (!class_exists('call_recordings')) {
|
||||
class call_recordings {
|
||||
|
||||
public $db;
|
||||
|
||||
/**
|
||||
* Called when the object is created
|
||||
*/
|
||||
public function __construct() {
|
||||
//connect to the database if not connected
|
||||
if (!$this->db) {
|
||||
require_once "resources/classes/database.php";
|
||||
$database = new database;
|
||||
$database->connect();
|
||||
$this->db = $database->db;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when there are no references to a particular object
|
||||
* unset the variables used in the class
|
||||
*/
|
||||
public function __destruct() {
|
||||
foreach ($this as $key => $value) {
|
||||
unset($this->$key);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* download the recordings
|
||||
*/
|
||||
public function download() {
|
||||
|
||||
// if (permission_exists('call_recording_play') || permission_exists('call_recording_download')) {
|
||||
|
||||
//cache limiter
|
||||
session_cache_limiter('public');
|
||||
|
||||
//get call recording from database
|
||||
$call_recording_uuid = check_str($_GET['id']);
|
||||
if ($call_recording_uuid != '') {
|
||||
$sql = "select call_recording_name, call_recording_path, call_recording_base64 from v_call_recordings ";
|
||||
$sql .= "where call_recording_uuid = '".$call_recording_uuid."' ";
|
||||
//$sql .= "and domain_uuid = '".$domain_uuid."' \n";
|
||||
$prep_statement = $this->db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$call_recordings = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
|
||||
if (is_array($call_recordings)) {
|
||||
foreach($call_recordings as &$row) {
|
||||
$call_recording_name = $row['call_recording_name'];
|
||||
$call_recording_path = $row['call_recording_path'];
|
||||
if ($_SESSION['call_recordings']['storage_type']['text'] == 'base64' && $row['call_recording_base64'] != '') {
|
||||
file_put_contents($path.'/'.$call_recording_name, base64_decode($row['call_recording_base64']));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
unset ($sql, $prep_statement, $call_recordings);
|
||||
}
|
||||
|
||||
//set the path for the directory
|
||||
$default_path = $_SESSION['switch']['call_recordings']['dir']."/".$_SESSION['domain_name'];
|
||||
|
||||
//build full path
|
||||
$full_recording_path = $call_recording_path . '/' . $call_recording_name;
|
||||
|
||||
//download the file
|
||||
if (file_exists($full_recording_path)) {
|
||||
//content-range
|
||||
//if (isset($_SERVER['HTTP_RANGE'])) {
|
||||
// range_download($full_recording_path);
|
||||
//}
|
||||
ob_clean();
|
||||
$fd = fopen($full_recording_path, "rb");
|
||||
if ($_GET['t'] == "bin") {
|
||||
header("Content-Type: application/force-download");
|
||||
header("Content-Type: application/octet-stream");
|
||||
header("Content-Type: application/download");
|
||||
header("Content-Description: File Transfer");
|
||||
}
|
||||
else {
|
||||
$file_ext = substr($call_recording_name, -3);
|
||||
if ($file_ext == "wav") {
|
||||
header("Content-Type: audio/x-wav");
|
||||
}
|
||||
if ($file_ext == "mp3") {
|
||||
header("Content-Type: audio/mpeg");
|
||||
}
|
||||
}
|
||||
//exit;
|
||||
//echo "file_ext: ".$file_ext."<br />\n";
|
||||
//echo "type: ".$_GET['t']."<br />\n";
|
||||
//exit;
|
||||
header('Content-Disposition: attachment; filename="'.$call_recording_name.'"');
|
||||
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
||||
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
|
||||
// header("Content-Length: " . filesize($full_recording_path));
|
||||
ob_clean();
|
||||
fpassthru($fd);
|
||||
}
|
||||
|
||||
//if base64, remove temp recording file
|
||||
if ($_SESSION['call_recordings']['storage_type']['text'] == 'base64' && $row['call_recording_base64'] != '') {
|
||||
@unlink($full_recording_path);
|
||||
}
|
||||
// }
|
||||
} //end download method
|
||||
} //end the class
|
||||
}
|
||||
|
||||
/*
|
||||
$obj = new call_recordings;
|
||||
$obj->download('all');
|
||||
*/
|
||||
|
||||
?>
|
||||
90
app/call_recordings/root.php
Normal file
90
app/call_recordings/root.php
Normal file
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is FusionPBX
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
// make sure the PATH_SEPARATOR is defined
|
||||
umask(2);
|
||||
if (!defined("PATH_SEPARATOR")) {
|
||||
if (strpos($_ENV["OS"], "Win") !== false) {
|
||||
define("PATH_SEPARATOR", ";");
|
||||
} else {
|
||||
define("PATH_SEPARATOR", ":");
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
|
||||
|
||||
// make sure the document_root is set
|
||||
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
|
||||
if(PHP_SAPI == 'cli'){
|
||||
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
|
||||
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
|
||||
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
|
||||
if (file_exists('/project_root.php')) {
|
||||
$path = '/';
|
||||
} else {
|
||||
$i = 1;
|
||||
$path = '';
|
||||
while ($i < count($dirs)) {
|
||||
$path .= '/' . $dirs[$i];
|
||||
if (file_exists($path. '/project_root.php')) {
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$_SERVER["DOCUMENT_ROOT"] = $path;
|
||||
}else{
|
||||
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
|
||||
}
|
||||
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
|
||||
// try to detect if a project path is being used
|
||||
if (!defined('PROJECT_PATH')) {
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
|
||||
define('PROJECT_PATH', '/fusionpbx');
|
||||
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
|
||||
define('PROJECT_PATH', '');
|
||||
} else {
|
||||
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
|
||||
$i = 1;
|
||||
$path = $_SERVER["DOCUMENT_ROOT"];
|
||||
while ($i < count($dirs)) {
|
||||
$path .= '/' . $dirs[$i];
|
||||
if (file_exists($path. '/project_root.php')) {
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
if(!file_exists($path. '/project_root.php')){
|
||||
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
|
||||
}
|
||||
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
|
||||
define('PROJECT_PATH', $project_path);
|
||||
}
|
||||
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user