Move to the $text array and add dashes between words on the $text named array values.

This commit is contained in:
Mark Crane
2012-10-24 07:35:01 +00:00
parent 2ae59b382e
commit 8554794435
14 changed files with 384 additions and 379 deletions
+40 -39
View File
@@ -26,7 +26,7 @@
include "root.php";
require_once "includes/require.php";
require_once "includes/checkauth.php";
require_once "app_languages.php";
if (permission_exists('xml_cdr_view')) {
//access granted
}
@@ -35,9 +35,10 @@ else {
exit;
}
//prepare the languages
foreach($content_cdr as $key => $value) {
$content_cdr[$key] = $value[$_SESSION['domain']['language']['code']];
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
//get the http values and set them to a variable
@@ -80,16 +81,16 @@ else {
echo "<br>";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<td width='30%' align='left' valign='top' nowrap='nowrap'><b>".$content_cdr['title2']."</b></td>\n";
echo "<td width='30%' align='left' valign='top' nowrap='nowrap'><b>".$text['title2']."</b></td>\n";
echo "<td width='70%' align='right' valign='top'>\n";
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='xml_cdr.php'\" value='".$content_cdr['button-back']."'>\n";
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='xml_cdr.php'\" value='".$text['button-back']."'>\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td align='left' colspan='2'>\n";
echo "".$content_cdr['description5']." \n";
echo "".$content_cdr['description6']." \n";
echo "".$content_cdr['description7']." \n";
echo "".$text['description-5']." \n";
echo "".$text['description-6']." \n";
echo "".$text['description-7']." \n";
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
@@ -145,23 +146,23 @@ else {
echo "<div align='center'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<td align='left'><b>".$content_cdr['label-summary']."</b>&nbsp;</td>\n";
echo "<td align='left'><b>".$text['label-summary']."</b>&nbsp;</td>\n";
echo "<td></td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<th>".$content_cdr['table-direction']."</th>\n";
echo "<th>".$text['table-direction']."</th>\n";
//echo "<th>Language</th>\n";
//echo "<th>Context</th>\n";
echo "<th>".$content_cdr['table-name']."</th>\n";
echo "<th>".$content_cdr['table-download']."</th>\n";
echo "<th>".$content_cdr['label-destination']."</th>\n";
echo "<th>".$content_cdr['label-start']."</th>\n";
echo "<th>".$content_cdr['table-end']."</th>\n";
echo "<th>".$content_cdr['label-length']."</th>\n";
echo "<th>".$content_cdr['label-status']."</th>\n";
echo "<th>".$text['table-name']."</th>\n";
echo "<th>".$text['table-download']."</th>\n";
echo "<th>".$text['label-destination']."</th>\n";
echo "<th>".$text['label-start']."</th>\n";
echo "<th>".$text['table-end']."</th>\n";
echo "<th>".$text['label-length']."</th>\n";
echo "<th>".$text['label-status']."</th>\n";
echo "</tr>\n";
echo "<tr >\n";
@@ -211,7 +212,7 @@ else {
echo "<div align='center'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<td align='left'><b>".$content_cdr['label-channel']."</b>&nbsp;</td>\n";
echo "<td align='left'><b>".$text['label-channel']."</b>&nbsp;</td>\n";
echo "<td></td>\n";
echo "</tr>\n";
echo "</table>\n";
@@ -250,8 +251,8 @@ else {
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<th>".$content_cdr['label-name']."</th>\n";
echo "<th>".$content_cdr['label-value']."</th>\n";
echo "<th>".$text['label-name']."</th>\n";
echo "<th>".$text['label-value']."</th>\n";
echo "</tr>\n";
foreach($xml->variables->children() as $child) {
$key = $child->getName();
@@ -306,15 +307,15 @@ else {
echo "<div align='center'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<td align='left'><b>".$content_cdr['label-applog']."</b>&nbsp;</td>\n";
echo "<td align='left'><b>".$text['label-application-log']."</b>&nbsp;</td>\n";
echo "<td></td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<th>".$content_cdr['label-name']."</th>\n";
echo "<th>".$content_cdr['label-data']."</th>\n";
echo "<th>".$text['label-name']."</th>\n";
echo "<th>".$text['label-data']."</th>\n";
echo "</tr>\n";
foreach ($xml->app_log->application as $row) {
@@ -346,15 +347,15 @@ else {
//attributes
echo " <table width='95%' border='0' cellpadding='0' cellspacing='0'>\n";
echo " <tr>\n";
echo " <td><b>".$content_cdr['label-callflow']."</b>&nbsp;</td>\n";
echo " <td><b>".$text['label-call-flow']."</b>&nbsp;</td>\n";
echo " <td></td>\n";
echo " </tr>\n";
echo " </table>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo " <tr>\n";
echo " <th>".$content_cdr['label-name']."</th>\n";
echo " <th>".$content_cdr['label-value']."</th>\n";
echo " <th>".$text['label-name']."</th>\n";
echo " <th>".$text['label-value']."</th>\n";
echo " </tr>\n";
foreach($row->attributes() as $key => $value) {
echo " <tr>\n";
@@ -371,15 +372,15 @@ else {
//extension->attributes
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo " <tr>\n";
echo " <td><b>".$content_cdr['label-callflow2']."</b>&nbsp;</td>\n";
echo " <td><b>".$text['label-call-flow-2']."</b>&nbsp;</td>\n";
echo " <td></td>\n";
echo " </tr>\n";
echo "</table>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo " <tr>\n";
echo " <th>".$content_cdr['label-name']."</th>\n";
echo " <th>".$content_cdr['label-value']."</th>\n";
echo " <th>".$text['label-name']."</th>\n";
echo " <th>".$text['label-value']."</th>\n";
echo " </tr>\n";
foreach($row->extension->attributes() as $key => $value) {
echo " <tr >\n";
@@ -396,15 +397,15 @@ else {
//extension->application
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo " <tr>\n";
echo " <td><b>".$content_cdr['label-callflow3']."</b>&nbsp;</td>\n";
echo " <td><b>".$text['label-call-flow-3']."</b>&nbsp;</td>\n";
echo " <td></td>\n";
echo " </tr>\n";
echo "</table>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo " <tr>\n";
echo " <th>".$content_cdr['label-name']."</th>\n";
echo " <th>".$content_cdr['label-data']."</th>\n";
echo " <th>".$text['label-name']."</th>\n";
echo " <th>".$text['label-data']."</th>\n";
echo " </tr>\n";
foreach ($row->extension->application as $tmp_row) {
$app_name = $tmp_row->attributes()->app_name;
@@ -423,15 +424,15 @@ else {
//caller_profile
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo " <tr>\n";
echo " <td><b>".$content_cdr['label-callflow4']."</b>&nbsp;</td>\n";
echo " <td><b>".$text['label-call-flow-4']."</b>&nbsp;</td>\n";
echo " <td></td>\n";
echo " </tr>\n";
echo "</table>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo " <tr>\n";
echo " <th>".$content_cdr['label-name']."</th>\n";
echo " <th>".$content_cdr['label-value']."</th>\n";
echo " <th>".$text['label-name']."</th>\n";
echo " <th>".$text['label-value']."</th>\n";
echo " </tr>\n";
foreach($row->caller_profile->children() as $child) {
$key = $child->getName();
@@ -473,13 +474,13 @@ else {
//times
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo " <tr>\n";
echo " <td><b>".$content_cdr['label-callflow5']."</b>&nbsp;</td>\n";
echo " <td><b>".$text['label-call-flow-5']."</b>&nbsp;</td>\n";
echo " <td></td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <th>".$content_cdr['label-name']."</th>\n";
echo " <th>".$content_cdr['label-value']."</th>\n";
echo " <th>".$text['label-name']."</th>\n";
echo " <th>".$text['label-value']."</th>\n";
echo " </tr>\n";
foreach($row->times->children() as $child) {
$key = $child->getName();