Browse Source

Merge pull request #1 from fusionpbx/master

1
blackc2004 9 years ago
parent
commit
6220663a28

+ 19 - 0
languages/app_config.php

@@ -0,0 +1,19 @@
+<?php
+
+	//application details
+		$apps[$x]['name'] = "Languages";
+		$apps[$x]['uuid'] = "23ecb350-b423-428d-9a8d-d617d27b30fe";
+		$apps[$x]['category'] = "System";
+		$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'] = "A tool to analyze languages used in the GUI following https://msdn.microsoft.com/en-gb/library/ee825488%28v=cs.20%29.aspx";
+
+	//permission details
+		$y = 0;
+		$apps[$x]['permissions'][$y]['name'] = "languages_view";
+		$apps[$x]['permissions'][$y]['menu']['uuid'] = "29295c90-b1b9-440b-9c7E-c8363c6e8975";
+		$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
+
+?>

+ 24 - 0
languages/app_languages.php

@@ -0,0 +1,24 @@
+<?php
+
+$text['title-languages']['en-us'] = "Languages";
+$text['title-compare_languages']['en-us'] = "Compare Languages";
+
+$text['header-compare_languages']['en-us'] = "Select Languages";
+$text['header-language_results']['en-us'] = "Language results";
+
+$text['warning-incorrect_language_culture_code']['en-us'] = "the language culture code does not follow the normal format see - ";
+$text['warning-global_already_defined']['en-us'] = "Global already defines this text as ";
+
+$text['label-culture_code']['en-us'] = "Culture Code";
+$text['label-flag']['en-us'] = "Flag";
+$text['label-reference_language']['en-us'] = "Reference Language";
+$text['label-target_language']['en-us'] = "Target Language";
+$text['label-tag']['en-us'] = "Tag";
+$text['label-app_target']['en-us'] = "Application";
+
+$text['description-languages']['en-us'] = "Languages listed below are managed in /resources/app_languages.php";
+$text['description-compare_languages']['en-us'] = "Compare laguages between different cultures";
+$text['description-reference_language']['en-us'] = "Language to use for reference of missing text";
+$text['description-target_language']['en-us'] = "Language to compare";
+
+?>

+ 21 - 0
languages/app_menu.php

@@ -0,0 +1,21 @@
+<?php
+
+$apps[$x]['menu'][0]['title']['en-us'] = "Languages";
+$apps[$x]['menu'][0]['title']['es-cl'] = "";
+$apps[$x]['menu'][0]['title']['fr-fr'] = "";
+$apps[$x]['menu'][0]['title']['pt-pt'] = "";
+$apps[$x]['menu'][0]['title']['pt-br'] = "";
+$apps[$x]['menu'][0]['title']['pl'] = "";
+$apps[$x]['menu'][0]['title']['sv-se'] = "";
+$apps[$x]['menu'][0]['title']['uk'] = "";
+$apps[$x]['menu'][0]['title']['ro'] = "";
+$apps[$x]['menu'][0]['title']['de-at'] = "";
+$apps[$x]['menu'][0]['title']['ar-eg'] = "";
+$apps[$x]['menu'][0]['title']['he'] = "";
+$apps[$x]['menu'][0]['uuid'] = "13a8fd28-6718-4ac1-8acc-0bcffbce29c3";
+$apps[$x]['menu'][0]['parent_uuid'] = "0438b504-8613-7887-c420-c837ffb20cb1";
+$apps[$x]['menu'][0]['category'] = "internal";
+$apps[$x]['menu'][0]['path'] = "/app/languages/index.php";
+$apps[$x]['menu'][0]['groups'][] = "superadmin";
+
+?>

+ 100 - 0
languages/index.php

@@ -0,0 +1,100 @@
+<?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 <[email protected]>
+	Portions created by the Initial Developer are Copyright (C) 2008-2012
+	the Initial Developer. All Rights Reserved.
+
+	Contributor(s):
+	Matthew Vale <[email protected]>
+*/
+require_once "root.php";
+require_once "resources/require.php";
+
+//check permissions
+	require_once "resources/check_auth.php";
+	if (permission_exists('languages_view')) {
+		//access granted
+	}
+	else {
+		echo "access denied";
+		exit;
+	}
+
+//add multi-lingual support
+	$language = new text;
+	$text = $language->get();
+
+//additional includes
+	require_once "resources/header.php";
+	require_once "resources/paging.php";
+
+//get variables used to control the order
+	$order_by = $_GET["order_by"];
+	$order = $_GET["order"];
+
+//show the content
+	echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
+	echo "	<tr>\n";
+	echo "		<td width='50%' align='left' nowrap='nowrap'><b>".$text['title-languages']."</b></td>\n";
+	echo "		<td width='50%' align='right'>&nbsp;</td>\n";
+	echo "	</tr>\n";
+	echo "	<tr>\n";
+	echo "		<td align='left' colspan='2'>\n";
+	echo "			".$text['description-languages']."<br /><br />\n";
+	echo "		</td>\n";
+	echo "	</tr>\n";
+	echo "</table>\n";
+
+
+//table headers
+	echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
+	echo "<tr>\n";
+	echo "<th nowrap='' style='width:2em'>".$text['label-flag']."</th>\n";
+	echo th_order_by('language_code', $text['label-culture_code'], $order_by, $order, '', "style='width:4em;'");
+	echo th_order_by('language_name', $text['label-name'], $order_by, $order);
+	echo "</tr>\n";
+
+	$c= 0;
+	$warn_about_wrong_culture = false;
+	foreach($_SESSION['app']['languages'] as $lang_code){ //TODO add sorting
+		$tr_link = "href='languages_compare.php?target_language=$lang_code'";
+		echo "<tr $tr_link>\n";
+		echo "<td class='row_style".($c%2)."'>";
+		echo "<img src='$project_path/themes/flags/$lang_code.png' alt='$lang_code'/></td>";
+		echo "<td class='row_style".($c%2)."'>$lang_code";
+		if(strlen($lang_code) < 5){
+			$warn_about_wrong_culture = true;
+			echo "$nbsp;<sup>*1</sup>";
+		}
+		echo "</td>";
+		echo "<td class='row_style".($c%2)."'>".$text["language-$lang_code"]."</td>";
+		echo "</tr>\n";
+		$c++;
+	}
+//complete the content
+	echo "</table>";
+	if($warn_about_wrong_culture){
+		$lang_code = $_SESSION['domain']['language']['code'];
+		echo "<p><sup>*1</sup>&nbsp;".$text['warning-incorrect_language_culture_code']."<a href='https://msdn.microsoft.com/$lang_code/library/ee825488%28v=cs.20%29.aspx'>https://msdn.microsoft.com/$lang_code/library/ee825488%28v=cs.20%29.aspx</a></p>";
+	}
+
+//include the footer
+	require_once "resources/footer.php";
+
+?>

+ 230 - 0
languages/languages_compare.php

@@ -0,0 +1,230 @@
+<?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 <[email protected]>
+	Portions created by the Initial Developer are Copyright (C) 2008-2012
+	the Initial Developer. All Rights Reserved.
+
+	Contributor(s):
+	Matthew Vale <[email protected]>
+*/
+require_once "root.php";
+require_once "resources/require.php";
+
+//check permissions
+	require_once "resources/check_auth.php";
+	if (permission_exists('languages_view')) {
+		//access granted
+	}
+	else {
+		echo "access denied";
+		exit;
+	}
+
+//get http post variables and set them to php variables
+	$reference_language = $_SESSION['domain']['language']['code'];
+	$target_language = check_str($_GET["target_language"]);
+	$app_target = 'resources';
+	if (count($_POST) > 0) {
+		//set the variables
+			$reference_language = check_str($_POST["reference_language"]);
+			$target_language = check_str($_POST["target_language"]);
+			$app_target = check_str($_POST["app_target"]);
+	}
+
+//collect languages
+	$language = new text;
+	
+	$language_text = $language->get('all', $app_target, true);
+	foreach ($language_text as $lang_label => $lang_codes) {
+		$language_labels[] = $lang_label;
+		$reference_text[$lang_label] = $lang_codes[$reference_language];
+		$target_text[$lang_label] = $lang_codes[$target_language];
+	}
+	sort($language_labels);
+	
+	if($app_target != 'resources'){
+		$global_text = $language->get($reference_language, 'resources', true);
+	}
+	unset($language_text);
+
+//add multi-lingual support
+	$text = $language->get();
+
+//get the list of installed apps from the core and mod directories
+	$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
+	$app_list;
+	$x=0;
+	foreach ($config_list as $config_path) {
+		include($config_path);
+		$dirs = explode("/", $config_path);
+		$app_path = $dirs[(sizeof($dirs)-3)] . "/" . $dirs[(sizeof($dirs)-2)];
+		$app_name = $apps[$x]['name'];
+		if( strlen($app_name) == 0) { $app_name = $app_path; }
+		$app_list[$app_name] = $app_path;
+		$x++;
+	}
+	$theme_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/themes/*/app_languages.php");
+	foreach ($theme_list as $config_path) {
+		$dirs = explode("/", $config_path);
+		$app_path = $dirs[(sizeof($dirs)-3)] . "/" . $dirs[(sizeof($dirs)-2)];
+		$app_name = 'Theme - ' . $dirs[(sizeof($dirs)-2)];
+		$app_list[$app_name] = $app_path;
+	}
+	unset($apps);
+	ksort($app_list);
+
+//additional includes
+	require_once "resources/header.php";
+	require_once "resources/paging.php";
+
+//get variables used to control the order
+	$order_by = $_GET["order_by"];
+	$order = $_GET["order"];
+
+//show the content
+	echo "<p>\n";
+	echo "<b>".$text['title-compare_languages']."</b><br/>\n";
+	echo $text['description-compare_languages']."\n";
+	echo "</p>\n";
+
+//select comparison
+	echo "<span><b>".$text['header-compare_languages']."</b><br/></span>\n";
+	echo "<form method='post' name='frm' action=''>\n";
+	echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
+
+	echo "<tr>\n";
+	echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
+	echo "	".$text['label-reference_language']."\n";
+	echo "</td>\n";
+	echo "<td class='vtable' align='left'>\n";
+	echo "<fieldset class='container'>";
+	foreach($_SESSION['app']['languages'] as $lang_code){
+		echo "<fieldset class='container'>";
+		echo "	<label class='radio' style='width:200px;'>";
+		echo "<input type='radio' name='reference_language' value='$lang_code' id='reference_language_$lang_code'";
+		if($lang_code == $reference_language)
+		{
+			echo " checked='checked'";
+		}
+		echo "/>";
+		echo "<img src='$project_path/themes/flags/$lang_code.png' alt='$lang_code'/>&nbsp;".$text["language-$lang_code"];
+		echo "</label>\n";
+		echo "</fieldset>";
+	}
+	echo "</fieldset>";
+	echo "<br />".$text['description-reference_language']."\n";
+	echo "</td>\n";
+	echo "</tr>\n";
+
+	echo "<tr>\n";
+	echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
+	echo "	".$text['label-target_language']."\n";
+	echo "</td>\n";
+	echo "<td class='vtable' align='left'>\n";
+	echo "<fieldset class='container'>";
+	foreach($_SESSION['app']['languages'] as $lang_code){
+		echo "<fieldset class='container'>";
+		echo "	<label class='radio' style='width:200px;'>";
+		echo "<input type='radio' name='target_language' value='$lang_code' id='target_language_$lang_code'";
+		if($lang_code == $target_language)
+		{
+			echo " checked='checked'";
+		}
+		echo "/>";
+		echo "<img src='$project_path/themes/flags/$lang_code.png' alt='$lang_code'/>&nbsp;".$text["language-$lang_code"];
+		echo "</label>\n";
+		echo "</fieldset>";
+	}
+	echo "</fieldset>";
+	echo "<br />".$text['description-app_target']."\n";
+	echo "</td>\n";
+	echo "</tr>\n";
+	echo "<tr>\n";
+	echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
+	echo "	".$text['label-application']."\n";
+	echo "</td>\n";
+	echo "<td class='vtable' align='left'>\n";
+	echo "	<select name='app_target' id='app_target' class='formfld'>\n";
+	echo "		<option value='resources'";
+	if($app_target == 'resources') { echo " selected='selected'"; }
+	echo ">Global</option>\n";
+	echo "		<option value=''>==========</option>";
+	foreach($app_list as $app => $app_path ) {
+		echo "		<option value='$app_path'";
+		if($app_target == $app_path) { echo " selected='selected'"; }
+		echo ">".$app."</option>\n";
+	}
+	echo "	</select>\n";
+	echo "	<br />".$text['description-app_target']."\n";
+	echo "</td>\n";
+	echo "</tr>\n";
+	echo "</table>\n";
+	echo "	<div style='text-align:right'>\n";
+	echo "    <button type='button' onclick=\"history.go(-1);\">".$text['button-back']."</button>\n";
+	echo "    <button type='submit' id='next'>".$text['button-search']."</button>\n";
+	echo "	</div>\n";
+	echo "</form>\n";
+
+	echo "<br/>\n";
+
+//render the texts
+	echo "<span><b>".$text['header-language_results']."</b> for '$app_target/app_languages.php'<br/></span>\n";
+	echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
+	echo "<tr>\n";
+	echo "<th>".$text['label-tag']."</th>";
+	echo "<th><img src='$project_path/themes/flags/$reference_language.png' alt='$reference_language'/>&nbsp;".$text["language-$reference_language"]."</th>\n";
+	if(strlen($target_language) > 0 ) { echo "<th><img src='$project_path/themes/flags/$target_language.png' alt='$target_language'/>&nbsp;".$text["language-$target_language"]."</th>\n"; }
+	echo "</tr>\n";
+	$language_count = 0;
+	foreach ($language_labels as $lang_label){
+		if( preg_match( '/\Alanguage-\w{2}(?:-\w{2})?\z/', $lang_label) ) { break; }
+		echo "<tr>\n";
+		echo "<td class='vncellreq' valign='top' align='left' nowrap>$lang_label";
+		if(isset($global_text[$lang_label])){
+			echo "&nbsp;<img src='$project_path/themes/enhanced/images/warning.png' alt='!' title=\"".$text['warning-global_already_defined']."'".$global_text[$lang_label]."'\"/>";
+		}
+		echo "</td>\n";
+		echo "<td class='vtable' align='left'>";
+		if(strlen($reference_text[$lang_label]) == 0) {
+			echo "<b>Missing!</b>";
+		}else{
+			echo $reference_text[$lang_label];
+		}
+		echo "</td>\n";
+		if(strlen($target_language) > 0 ) {
+			echo "<td class='vtable' align='left'>";
+			if(strlen($target_text[$lang_label]) == 0) {
+				echo "<b>Missing!</b>";
+			}else{
+				echo $target_text[$lang_label];
+			}
+			echo "</td>\n";
+		}
+		echo "</tr>\n";
+		$language_count++;
+	}
+	if($language_count == 0){
+		echo "<tr><td colspan='3'>Sorry, this app hasn't defined any text</td></tr>\n";
+	}
+	echo "</table>\n";
+	
+//include the footer
+	require_once "resources/footer.php";
+
+?>

+ 52 - 0
languages/root.php

@@ -0,0 +1,52 @@
+<?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 <[email protected]>
+	Portions created by the Initial Developer are Copyright (C) 2008-2012
+	the Initial Developer. All Rights Reserved.
+
+	Contributor(s):
+	Mark J Crane <[email protected]>
+	
+	Callblock is written by Gerrit Visser <[email protected]>
+*/
+
+// make sure the PATH_SEPARATOR is defined
+	if (!defined("PATH_SEPARATOR")) {
+		if ( strpos( $_ENV[ "OS" ], "Win" ) !== false ) { define("PATH_SEPARATOR", ";"); } else { define("PATH_SEPARATOR", ":"); }
+	}
+
+// make sure the document_root is set
+	$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", "/", $_SERVER["SCRIPT_FILENAME"]);
+	$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
+	$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
+	//echo "DOCUMENT_ROOT: ".$_SERVER["DOCUMENT_ROOT"]."<br />\n";
+	//echo "PHP_SELF: ".$_SERVER["PHP_SELF"]."<br />\n";
+	//echo "SCRIPT_FILENAME: ".$_SERVER["SCRIPT_FILENAME"]."<br />\n";
+
+// if the project directory exists then add it to the include path otherwise add the document root to the include path
+	if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); }
+		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' );
+	}
+	else {
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); }
+		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );
+	}
+
+?>

+ 30 - 0
zoiper/app_config.php

@@ -0,0 +1,30 @@
+<?php
+
+	//application details
+		$apps[$x]['name'] = "Zoiper";
+		$apps[$x]['uuid'] = "0e1a851b-fa97-43d8-a862-1f78698661d7";
+		$apps[$x]['category'] = "Switch";;
+		$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'] = "Zoiper Desktop and Mobile";
+		$apps[$x]['description']['es-cl'] = "";
+		$apps[$x]['description']['de-de'] = "";
+		$apps[$x]['description']['de-ch'] = "";
+		$apps[$x]['description']['de-at'] = "";
+		$apps[$x]['description']['fr-fr'] = "";
+		$apps[$x]['description']['fr-ca'] = "";
+		$apps[$x]['description']['fr-ch'] = "";
+		$apps[$x]['description']['pt-pt'] = "";
+		$apps[$x]['description']['pt-br'] = "";
+
+	//permission details
+		$apps[$x]['permissions'][$y]['name'] = "zoiper";
+		$apps[$x]['permissions'][$y]['menu']['uuid'] = "fe8a5b30-834f-4eeb-8462-494ad6034588";		
+		$apps[$x]['permissions'][$y]['groups'][] = "user";
+		$apps[$x]['permissions'][$y]['groups'][] = "admin";
+		$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
+		$y++;
+
+?>

+ 424 - 0
zoiper/app_languages.php

@@ -0,0 +1,424 @@
+<?php
+
+$text['title']['en-us'] = "Zoiper";
+$text['title']['es-cl'] = "";
+$text['title']['pt-pt'] = "";
+$text['title']['fr-fr'] = "";
+$text['title']['pt-br'] = "";
+$text['title']['pl'] = "";
+$text['title']['sv-se'] = "";
+$text['title']['uk'] = "";
+$text['title']['de-at'] = "";
+
+$text['table-tools']['en-us'] = "Tools";
+$text['table-tools']['es-cl'] = "Herramientas";
+$text['table-tools']['pt-pt'] = "Ferramentas";
+$text['table-tools']['fr-fr'] = "Outils";
+$text['table-tools']['pt-br'] = "Ferramentas";
+$text['table-tools']['pl'] = "Narzędzia";
+$text['table-tools']['sv-se'] = "Verktyg ";
+$text['table-tools']['uk'] = "Інструменти";
+$text['table-tools']['de-at'] = "Funktionen";
+
+$text['table-extension']['en-us'] = "Extension";
+$text['table-extension']['es-cl'] = "Extensión";
+$text['table-extension']['pt-pt'] = "Extensão";
+$text['table-extension']['fr-fr'] = "Extension";
+$text['table-extension']['pt-br'] = "Ramal";
+$text['table-extension']['pl'] = "Numer wewnętrzny";
+$text['table-extension']['sv-se'] = "Anknytning ";
+$text['table-extension']['uk'] = "Розширення (Extention)";
+$text['table-extension']['de-at'] = "Nebenstelle";
+
+$text['table-description']['en-us'] = "Description";
+$text['table-description']['es-cl'] = "Descripción";
+$text['table-description']['pt-pt'] = "Descrição";
+$text['table-description']['fr-fr'] = "Description";
+$text['table-description']['pt-br'] = "Descrição";
+$text['table-description']['pl'] = "Opis";
+$text['table-description']['sv-se'] = "Beskrivning ";
+$text['table-description']['uk'] = "Опис";
+$text['table-description']['de-at'] = "Beschreibung";
+
+$text['label-select-cid-number']['en-us'] = "Select Caller ID Number";
+$text['label-select-cid-number']['es-cl'] = "Seleccione Llamadas Número de Identificación";
+$text['label-select-cid-number']['pt-pt'] = "Selecione Caller ID Number";
+$text['label-select-cid-number']['fr-fr'] = "Sélectionnez Caller ID Number";
+$text['label-select-cid-number']['pt-br'] = "Selecionar ID da chamada";
+$text['label-select-cid-number']['pl'] = "Ustaw prezentację numeru dzwoniącego";
+$text['label-select-cid-number']['sv-se'] = "Välj Nummerpresentation ";
+$text['label-select-cid-number']['uk'] = "";
+$text['label-select-cid-number']['de-at'] = "Anruferkennung (Nummer) wählen";
+
+$text['label-ring-timeout']['en-us'] = "Timeout";
+$text['label-ring-timeout']['es-cl'] = "Timeout";
+$text['label-ring-timeout']['pt-pt'] = "Timeout";
+$text['label-ring-timeout']['fr-fr'] = "Timeout";
+$text['label-ring-timeout']['pt-br'] = "Tempo limite";
+$text['label-ring-timeout']['pl'] = "Przekroczenie czasu oczekiwania ";
+$text['label-ring-timeout']['sv-se'] = "Tidsgräns ";
+$text['label-ring-timeout']['uk'] = "Таймаут";
+$text['label-ring-timeout']['de-at'] = "Abwurfzeit";
+
+$text['label-ring-order']['en-us'] = "Ring Order";
+$text['label-ring-order']['es-cl'] = "Solicitar Llamado";
+$text['label-ring-order']['pt-pt'] = "Pedir Chamada";
+$text['label-ring-order']['fr-fr'] = "Ordre de sonnerie";
+$text['label-ring-order']['pt-br'] = "Solicitar chamada";
+$text['label-ring-order']['pl'] = "Kolejność dzwonienia";
+$text['label-ring-order']['sv-se'] = "Ring Ordning ";
+$text['label-ring-order']['uk'] = "Послідовність набору";
+$text['label-ring-order']['de-at'] = "Ruf Reihenfolge";
+
+$text['label-ring-delay']['en-us'] = "Delay";
+$text['label-ring-delay']['es-cl'] = "Retardo";
+$text['label-ring-delay']['pt-pt'] = "Atraso";
+$text['label-ring-delay']['fr-fr'] = "Délais";
+$text['label-ring-delay']['pt-br'] = "Delay";
+$text['label-ring-delay']['pl'] = "Opóznienie";
+$text['label-ring-delay']['sv-se'] = "Fördröjning ";
+$text['label-ring-delay']['uk'] = "Затримка";
+$text['label-ring-delay']['de-at'] = "Verzögerung";
+
+$text['label-prompt']['en-us'] = "Prompt to accept the call";
+$text['label-prompt']['es-cl'] = "Preguntar para aceptar una llamada";
+$text['label-prompt']['pt-pt'] = "Perguntar para aceitar a chamada";
+$text['label-prompt']['fr-fr'] = "Annonce pour accepter l'appel";
+$text['label-prompt']['pt-br'] = "Perguntar para aceitar a chamada";
+$text['label-prompt']['pl'] = "Podpowiedz, aby odebrać rozmowę";
+$text['label-prompt']['sv-se'] = "Kräv verifiering för att ta emot samtal. ";
+$text['label-prompt']['uk'] = "";
+$text['label-prompt']['de-at'] = "Ansage um den Anruf anzunehmen";
+
+$text['label-on-busy']['en-us'] = "On Busy";
+$text['label-on-busy']['es-cl'] = "Concurrida";
+$text['label-on-busy']['pt-pt'] = "Movimentado";
+$text['label-on-busy']['fr-fr'] = "Sur Occupé";
+$text['label-on-busy']['it-it'] = "Su occupato";
+$text['label-on-busy']['pt-br'] = "Ocupado";
+$text['label-on-busy']['pl'] = "Kiedy zajęty";
+$text['label-on-busy']['sv-se'] = "Vid Upptaget ";
+$text['label-on-busy']['uk'] = "Якщо зайнято";
+$text['label-on-busy']['de-at'] = "Bei Besetzt";
+
+$text['label-ignore-busy']['en-us'] = "Ignore Busy";
+$text['label-ignore-busy']['es-cl'] = "";
+$text['label-ignore-busy']['pt-pt'] = "";
+$text['label-ignore-busy']['fr-fr'] = "";
+$text['label-ignore-busy']['it-it'] = "";
+$text['label-ignore-busy']['pt-br'] = "";
+$text['label-ignore-busy']['pl'] = "";
+$text['label-ignore-busy']['sv-se'] = "";
+$text['label-ignore-busy']['uk'] = "";
+$text['label-ignore-busy']['de-at'] = "";
+
+$text['label-number']['en-us'] = "Number";
+$text['label-number']['es-cl'] = "Número";
+$text['label-number']['pt-pt'] = "Número";
+$text['label-number']['fr-fr'] = "Numéro";
+$text['label-number']['pt-br'] = "Número";
+$text['label-number']['pl'] = "Numer";
+$text['label-number']['sv-se'] = "Nummer ";
+$text['label-number']['uk'] = "Номер";
+$text['label-number']['de-at'] = "Nummer";
+
+$text['label-no_answer']['en-us'] = "No Answer";
+$text['label-no_answer']['es-cl'] = "Sin Respuesta";
+$text['label-no_answer']['pt-pt'] = "Sem Resposta";
+$text['label-no_answer']['fr-fr'] = "Sans Réponse";
+$text['label-no_answer']['it-it'] = "Senza Risposta";
+$text['label-no_answer']['pt-br'] = "Sem resposta";
+$text['label-no_answer']['pl'] = "Brak odpowiedzi";
+$text['label-no_answer']['sv-se'] = "Inget Svar ";
+$text['label-no_answer']['uk'] = "Без відповіді";
+$text['label-no_answer']['de-at'] = "Keine Antwort";
+
+$text['label-follow-me']['en-us'] = "Follow Me";
+$text['label-follow-me']['es-cl'] = "Sígueme";
+$text['label-follow-me']['pt-pt'] = "Segue-me";
+$text['label-follow-me']['fr-fr'] = "Follow Me";
+$text['label-follow-me']['pt-br'] = "Siga-me";
+$text['label-follow-me']['pl'] = "Podążaj za mną";
+$text['label-follow-me']['sv-se'] = "Följ Mig ";
+$text['label-follow-me']['uk'] = "";
+$text['label-follow-me']['de-at'] = "Follow Me";
+
+$text['label-enabled']['en-us'] = "Enabled";
+$text['label-enabled']['es-cl'] = "Activo";
+$text['label-enabled']['pt-pt'] = "Activo";
+$text['label-enabled']['fr-fr'] = "Activé";
+$text['label-enabled']['pt-br'] = "Habilitado";
+$text['label-enabled']['pl'] = "Włączony";
+$text['label-enabled']['sv-se'] = "Aktiverad ";
+$text['label-enabled']['uk'] = "Включено";
+$text['label-enabled']['de-at'] = "An";
+
+$text['label-enable']['en-us'] = "Enable";
+$text['label-enable']['es-cl'] = "Activar";
+$text['label-enable']['pt-pt'] = "Activar";
+$text['label-enable']['fr-fr'] = "Activer";
+$text['label-enable']['pt-br'] = "Ativar";
+$text['label-enable']['pl'] = "Włącz";
+$text['label-enable']['sv-se'] = "Aktivera ";
+$text['label-enable']['uk'] = "";
+$text['label-enable']['de-at'] = "Aktivieren";
+
+$text['label-dnd']['en-us'] = "Do Not Disturb";
+$text['label-dnd']['es-cl'] = "No Molestar";
+$text['label-dnd']['pt-pt'] = "Não Perturbar";
+$text['label-dnd']['fr-fr'] = "Ne pas déranger";
+$text['label-dnd']['pt-br'] = "Não Pertube";
+$text['label-dnd']['pl'] = "Nie przeszkadzaj (DND)";
+$text['label-dnd']['sv-se'] = "Stör Ej ";
+$text['label-dnd']['uk'] = "Не турбувати";
+$text['label-dnd']['de-at'] = "Bitte nicht stören";
+
+$text['label-disabled']['en-us'] = "Disabled";
+$text['label-disabled']['es-cl'] = "Desactivado";
+$text['label-disabled']['pt-pt'] = "Desactivo";
+$text['label-disabled']['fr-fr'] = "Desactivé";
+$text['label-disabled']['pt-br'] = "Inválido";
+$text['label-disabled']['pl'] = "Wyłączony";
+$text['label-disabled']['sv-se'] = "Inaktiverad ";
+$text['label-disabled']['uk'] = "Відключено";
+$text['label-disabled']['de-at'] = "Inaktiv";
+
+$text['label-disable']['en-us'] = "Disable";
+$text['label-disable']['es-cl'] = "Desactivar";
+$text['label-disable']['pt-pt'] = "Desactivo";
+$text['label-disable']['fr-fr'] = "Désactiver";
+$text['label-disable']['pt-br'] = "Desativado";
+$text['label-disable']['pl'] = "Wyłącz";
+$text['label-disable']['sv-se'] = "Inaktivera ";
+$text['label-disable']['uk'] = "Відключити";
+$text['label-disable']['de-at'] = "Deaktivieren";
+
+$text['label-destinations']['en-us'] = "Destinations";
+$text['label-destinations']['es-cl'] = "Destinos";
+$text['label-destinations']['fr-fr'] = "Destinations";
+$text['label-destinations']['pt-pt'] = "Destinos";
+$text['label-destinations']['pt-br'] = "Destinos";
+$text['label-destinations']['pl'] = "Destynacje";
+$text['label-destinations']['sv-se'] = "Destinationer ";
+$text['label-destinations']['uk'] = "Номери";
+$text['label-destinations']['de-at'] = "Ziele";
+
+$text['label-destination_timeout']['en-us'] = "Timeout";
+$text['label-destination_timeout']['es-cl'] = "Timeout";
+$text['label-destination_timeout']['fr-fr'] = "Timeout";
+$text['label-destination_timeout']['pt-pt'] = "Timeout";
+$text['label-destination_timeout']['pt-br'] = "Tempo de saída";
+$text['label-destination_timeout']['pl'] = "Limit czasowy";
+$text['label-destination_timeout']['sv-se'] = "Tidsgräns ";
+$text['label-destination_timeout']['uk'] = "Таймаут";
+$text['label-destination_timeout']['de-at'] = "Abwurfzeit";
+
+$text['label-destination_prompt_confirm']['en-us'] = "Confirm";
+$text['label-destination_prompt_confirm']['es-cl'] = "Confirmar";
+$text['label-destination_prompt_confirm']['fr-fr'] = "Confirmer";
+$text['label-destination_prompt_confirm']['pt-pt'] = "Confirmar";
+$text['label-destination_prompt_confirm']['pt-br'] = "Confirmar";
+$text['label-destination_prompt_confirm']['pl'] = "Potwierdź";
+$text['label-destination_prompt_confirm']['sv-se'] = "Bekräfta ";
+$text['label-destination_prompt_confirm']['uk'] = "Підтвердити";
+$text['label-destination_prompt_confirm']['de-at'] = "Bestätigen";
+
+$text['label-destination_prompt_announce']['en-us'] = "Announce";
+$text['label-destination_prompt_announce']['es-cl'] = "Anunciar";
+$text['label-destination_prompt_announce']['fr-fr'] = "Annonce";
+$text['label-destination_prompt_announce']['pt-pt'] = "Anunciar";
+$text['label-destination_prompt_announce']['pt-br'] = "Anunciar";
+$text['label-destination_prompt_announce']['pl'] = "Rozgłoś/powiadom";
+$text['label-destination_prompt_announce']['sv-se'] = "Meddela ";
+$text['label-destination_prompt_announce']['uk'] = "";
+$text['label-destination_prompt_announce']['de-at'] = "Ankündigen";
+
+$text['label-destination_prompt']['en-us'] = "Prompt";
+$text['label-destination_prompt']['es-cl'] = "Prompt";
+$text['label-destination_prompt']['fr-fr'] = "Prompt";
+$text['label-destination_prompt']['pt-pt'] = "Prompt";
+$text['label-destination_prompt']['pt-br'] = "Prompt";
+$text['label-destination_prompt']['pl'] = "Potwierdź aby odebrac rozmowę";
+$text['label-destination_prompt']['sv-se'] = "Verifiering ";
+$text['label-destination_prompt']['uk'] = "";
+$text['label-destination_prompt']['de-at'] = "Nachfragen";
+
+$text['label-destination_number']['en-us'] = "Destination";
+$text['label-destination_number']['es-cl'] = "Destino";
+$text['label-destination_number']['fr-fr'] = "Destination";
+$text['label-destination_number']['pt-pt'] = "Destino";
+$text['label-destination_number']['pt-br'] = "Desvio";
+$text['label-destination_number']['pl'] = "Destynacja";
+$text['label-destination_number']['sv-se'] = "Destination Nummer ";
+$text['label-destination_number']['uk'] = "Номер";
+$text['label-destination_number']['de-at'] = "Ziel";
+
+$text['label-destination_delay']['en-us'] = "Delay";
+$text['label-destination_delay']['es-cl'] = "Retraso";
+$text['label-destination_delay']['fr-fr'] = "Délais";
+$text['label-destination_delay']['pt-pt'] = "Atraso";
+$text['label-destination_delay']['pt-br'] = "Delay";
+$text['label-destination_delay']['pl'] = "Opóźnienie";
+$text['label-destination_delay']['sv-se'] = "Fördröjning ";
+$text['label-destination_delay']['uk'] = "Затримка";
+$text['label-destination_delay']['de-at'] = "Verzögerung";
+
+$text['label-destination']['en-us'] = "Destination";
+$text['label-destination']['es-cl'] = "Destino";
+$text['label-destination']['fr-fr'] = "Destination";
+$text['label-destination']['pt-pt'] = "Destino";
+$text['label-destination']['pt-br'] = "Número de destino";
+$text['label-destination']['pl'] = "Destynacja";
+$text['label-destination']['sv-se'] = "Destination ";
+$text['label-destination']['uk'] = "Номер";
+$text['label-destination']['de-at'] = "Ziel";
+
+$text['label-cid-number-prefix']['en-us'] = "Caller ID Number";
+$text['label-cid-number-prefix']['es-cl'] = "Número de Caller ID";
+$text['label-cid-number-prefix']['pt-pt'] = "Número do Chamador";
+$text['label-cid-number-prefix']['pt-br'] = "Número do discador";
+$text['label-cid-number-prefix']['pl'] = "Prefiks prezentacji numeru dzwoniącego";
+$text['label-cid-number-prefix']['sv-se'] = "Nummerpresentation ";
+$text['label-cid-number-prefix']['uk'] = "Caller ID Номер";
+$text['label-cid-number-prefix']['fr-fr'] = "CID Nombre Préfixe";
+$text['label-cid-number-prefix']['de-at'] = "Anruferkennung (Nummer)";
+
+$text['label-cid-name-prefix']['en-us'] = "Caller ID Name";
+$text['label-cid-name-prefix']['es-cl'] = "Nombre de Caller ID";
+$text['label-cid-name-prefix']['pt-pt'] = "Nome do Chamador";
+$text['label-cid-name-prefix']['fr-fr'] = "Préfixe de l'appelant";
+$text['label-cid-name-prefix']['pt-br'] = "Nome do discador";
+$text['label-cid-name-prefix']['pl'] = "Prefiks prezentacji nazwy dzwoniącego";
+$text['label-cid-name-prefix']['sv-se'] = "Namnpresentation ";
+$text['label-cid-name-prefix']['uk'] = "Caller ID Ім’я";
+$text['label-cid-name-prefix']['de-at'] = "Anruferkennung (Name)";
+
+$text['label-call-prompt']['en-us'] = "Call Prompt";
+$text['label-call-prompt']['es-cl'] = "Aviso de Llamadas";
+$text['label-call-prompt']['pt-pt'] = "Espoletar Chamada";
+$text['label-call-prompt']['fr-fr'] = "Annonce d'appel";
+$text['label-call-prompt']['pt-br'] = "Prompt chamada";
+$text['label-call-prompt']['pl'] = "Potwierdź przed odebraniem rozmowy";
+$text['label-call-prompt']['sv-se'] = "Samtals Verifiering ";
+$text['label-call-prompt']['uk'] = "";
+$text['label-call-prompt']['de-at'] = "Nachfragen";
+
+$text['label-zoiper']['en-us'] = "Zoiper Desktop/Mobile Download";
+$text['label-zoiper']['es-cl'] = "";
+$text['label-zoiper']['pt-pt'] = "";
+$text['label-zoiper']['fr-fr'] = "";
+$text['label-zoiper']['pt-br'] = "";
+$text['label-zoiper']['pl'] = "";
+$text['label-zoiper']['sv-se'] = "";
+$text['label-zoiper']['uk'] = "";
+$text['label-zoiper']['de-at'] = "";
+
+$text['description']['en-us'] = "Directs incoming calls for extension:";
+$text['description']['es-cl'] = "";
+$text['description']['pt-pt'] = "";
+$text['description']['fr-fr'] = "";
+$text['description']['pt-br'] = "";
+$text['description']['pl'] = "";
+$text['description']['sv-se'] = "";
+$text['description']['uk'] = "";
+$text['description']['de-at'] = "";
+
+$text['confirm-update']['en-us'] = "Update Complete";
+$text['confirm-update']['es-cl'] = "Actualización Completa";
+$text['confirm-update']['pt-pt'] = "Actualização Efectuada";
+$text['confirm-update']['fr-fr'] = "Mis à jour";
+$text['confirm-update']['pt-br'] = "Atualização Efetuada";
+$text['confirm-update']['pl'] = "Aktualizacja zakonczona";
+$text['confirm-update']['sv-se'] = "Uppdatering Klar ";
+$text['confirm-update']['uk'] = "Оновлено";
+$text['confirm-update']['de-at'] = "Aktualisierung durchgeführt";
+
+$text['ckeck-true']['es-cl'] = "Verdadero";
+$text['ckeck-true']['pt-pt'] = "Sim";
+$text['ckeck-true']['fr-fr'] = "Oui";
+$text['ckeck-true']['pt-br'] = "Sim";
+$text['ckeck-true']['pl'] = "";
+$text['ckeck-true']['sv-se'] = "";
+$text['ckeck-true']['uk'] = "";
+$text['ckeck-true']['de-at'] = "";
+
+$text['ckeck-simultaneous']['es-cl'] = "simultaneo";
+$text['ckeck-simultaneous']['pt-pt'] = "simultâneo";
+$text['ckeck-simultaneous']['pt-br'] = "Simultâneo";
+$text['ckeck-simultaneous']['pl'] = "";
+$text['ckeck-simultaneous']['sv-se'] = "";
+$text['ckeck-simultaneous']['uk'] = "";
+$text['ckeck-simultaneous']['fr-fr'] = "";
+$text['ckeck-simultaneous']['de-at'] = "";
+
+$text['ckeck-sequence']['es-cl'] = "secuencia";
+$text['ckeck-sequence']['pt-pt'] = "sequência";
+$text['ckeck-sequence']['pt-br'] = "Sequência";
+$text['ckeck-sequence']['pl'] = "";
+$text['ckeck-sequence']['sv-se'] = "";
+$text['ckeck-sequence']['uk'] = "";
+$text['ckeck-sequence']['fr-fr'] = "";
+$text['ckeck-sequence']['de-at'] = "";
+
+$text['ckeck-false']['es-cl'] = "Falso";
+$text['ckeck-false']['pt-pt'] = "Não";
+$text['ckeck-false']['fr-fr'] = "Non";
+$text['ckeck-false']['pt-br'] = "Não";
+$text['ckeck-false']['pl'] = "";
+$text['ckeck-false']['sv-se'] = "";
+$text['ckeck-false']['uk'] = "";
+$text['ckeck-false']['de-at'] = "";
+
+$text['check-true']['en-us'] = "True";
+$text['check-true']['pt-br'] = "";
+$text['check-true']['pl'] = "Tak";
+$text['check-true']['sv-se'] = "Sann ";
+$text['check-true']['uk'] = "Так";
+$text['check-true']['fr-fr'] = "";
+$text['check-true']['de-at'] = "An";
+
+$text['check-simultaneous']['en-us'] = "simultaneous";
+$text['check-simultaneous']['fr-fr'] = "simultanément";
+$text['check-simultaneous']['pt-br'] = "";
+$text['check-simultaneous']['pl'] = "jednoczesne";
+$text['check-simultaneous']['sv-se'] = "Samtidiga ";
+$text['check-simultaneous']['uk'] = "одночасно";
+$text['check-simultaneous']['de-at'] = "gleichzeitig";
+
+$text['check-sequence']['en-us'] = "sequence";
+$text['check-sequence']['fr-fr'] = "séquence";
+$text['check-sequence']['pt-br'] = "";
+$text['check-sequence']['pl'] = "kolejność";
+$text['check-sequence']['sv-se'] = "sekvens ";
+$text['check-sequence']['uk'] = "послідовно";
+$text['check-sequence']['de-at'] = "sequenziell";
+
+$text['check-false']['en-us'] = "False";
+$text['check-false']['pt-br'] = "";
+$text['check-false']['pl'] = "Nie";
+$text['check-false']['sv-se'] = "Falsk ";
+$text['check-false']['uk'] = "Ні";
+$text['check-false']['fr-fr'] = "";
+$text['check-false']['de-at'] = "Aus";
+
+$text['button-save']['en-us'] = "Save";
+$text['button-save']['es-cl'] = "Guardar";
+$text['button-save']['pt-pt'] = "Guardar";
+$text['button-save']['fr-fr'] = "Sauvegarder";
+$text['button-save']['pt-br'] = "Salvar";
+$text['button-save']['pl'] = "Zachowaj";
+$text['button-save']['sv-se'] = "Spara ";
+$text['button-save']['uk'] = "Зберегти";
+$text['button-save']['de-at'] = "Speichern";
+
+$text['button-back']['en-us'] = "Back";
+$text['button-back']['es-cl'] = "Volver";
+$text['button-back']['pt-pt'] = "Voltar";
+$text['button-back']['fr-fr'] = "Retour";
+$text['button-back']['pt-br'] = "Voltar";
+$text['button-back']['pl'] = "Wróć";
+$text['button-back']['sv-se'] = "Tillbaka ";
+$text['button-back']['uk'] = "Назад";
+$text['button-back']['de-at'] = "Zurück";
+
+?>app_languages.php

+ 23 - 0
zoiper/app_menu.php

@@ -0,0 +1,23 @@
+<?php
+
+$apps[$x]['menu'][0]['title']['en-us'] = "Zoiper";
+$apps[$x]['menu'][0]['title']['es-cl'] = "";
+$apps[$x]['menu'][0]['title']['fr-fr'] = "";
+$apps[$x]['menu'][0]['title']['pt-pt'] = "";
+$apps[$x]['menu'][0]['title']['pt-br'] = "";
+$apps[$x]['menu'][0]['title']['pl'] = "";
+$apps[$x]['menu'][0]['title']['he'] = "";
+$apps[$x]['menu'][0]['title']['uk'] = "";
+$apps[$x]['menu'][0]['title']['sv-se'] = "";
+$apps[$x]['menu'][0]['title']['de-at'] = "";
+$apps[$x]['menu'][0]['title']['ro'] = "";
+$apps[$x]['menu'][0]['title']['ar-eg'] = "";
+$apps[$x]['menu'][0]['uuid'] = "fe8a5b30-834f-4eeb-8462-494ad6034588";
+$apps[$x]['menu'][0]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
+$apps[$x]['menu'][0]['category'] = "internal";
+$apps[$x]['menu'][0]['path'] = "/app/zoiper/zoiper.php";
+$apps[$x]['menu'][0]['groups'][] = "user";
+$apps[$x]['menu'][0]['groups'][] = "admin";
+$apps[$x]['menu'][0]['groups'][] = "superadmin";
+
+?>

+ 50 - 0
zoiper/root.php

@@ -0,0 +1,50 @@
+<?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 <[email protected]>
+	Portions created by the Initial Developer are Copyright (C) 2008-2012
+	the Initial Developer. All Rights Reserved.
+
+	Contributor(s):
+	Mark J Crane <[email protected]>
+*/
+
+// make sure the PATH_SEPARATOR is defined
+	if (!defined("PATH_SEPARATOR")) {
+		if ( strpos( $_ENV[ "OS" ], "Win" ) !== false ) { define("PATH_SEPARATOR", ";"); } else { define("PATH_SEPARATOR", ":"); }
+	}
+
+// make sure the document_root is set
+	$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", "/", $_SERVER["SCRIPT_FILENAME"]);
+	$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
+	$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
+	//echo "DOCUMENT_ROOT: ".$_SERVER["DOCUMENT_ROOT"]."<br />\n";
+	//echo "PHP_SELF: ".$_SERVER["PHP_SELF"]."<br />\n";
+	//echo "SCRIPT_FILENAME: ".$_SERVER["SCRIPT_FILENAME"]."<br />\n";
+
+// if the project directory exists then add it to the include path otherwise add the document root to the include path
+	if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); }
+		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' );
+	}
+	else {
+		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); }
+		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );
+	}
+
+?>

+ 177 - 0
zoiper/zoiper.php

@@ -0,0 +1,177 @@
+<?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 <[email protected]>
+	Portions created by the Initial Developer are Copyright (C) 2008-2012
+	the Initial Developer. All Rights Reserved.
+
+	Contributor(s):
+	Mark J Crane <[email protected]>
+*/
+include "root.php";
+require_once "resources/require.php";
+require_once "resources/check_auth.php";
+if (permission_exists('zoiper')) {
+	//access granted
+}
+else {
+	echo "access denied";
+	exit;
+}
+
+//get the https values and set as variables
+	$order_by = check_str($_GET["order_by"]);
+	$order = check_str($_GET["order"]);
+
+//add multi-lingual support
+	$language = new text;
+	$text = $language->get($_SESSION['domain']['language']['code'], 'app/zoiper');
+
+//begin the content
+	require_once "resources/header.php";
+	require_once "resources/paging.php";
+
+	if ($is_included != "true") {
+		echo "		<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
+		echo "		<tr>\n";
+		echo "		<td align='left'><b>".$text['title']."</b><br>\n";
+		echo "			".$text['description-2']."\n";
+		echo "			".$text['description-3']." \n";
+		echo "		</td>\n";
+		echo "		</tr>\n";
+		echo "		</table>\n";
+		echo "		<br />";
+	}
+
+	$sql = "select * from v_extensions ";
+	$sql .= "where domain_uuid = '$domain_uuid' ";
+	$sql .= "and enabled = 'true' ";
+	if (!(if_group("admin") || if_group("superadmin"))) {
+		if (count($_SESSION['user']['extension']) > 0) {
+			$sql .= "and (";
+			$x = 0;
+			foreach($_SESSION['user']['extension'] as $row) {
+				if ($x > 0) { $sql .= "or "; }
+				$sql .= "extension = '".$row['user']."' ";
+				$x++;
+			}
+			$sql .= ")";
+		}
+		else {
+			//used to hide any results when a user has not been assigned an extension
+			$sql .= "and extension = 'disabled' ";
+		}
+	}
+	if (strlen($order_by)> 0) {
+		$sql .= "order by $order_by $order ";
+	}
+	else {
+		$sql .= "order by extension asc ";
+	}
+	$prep_statement = $db->prepare(check_sql($sql));
+	$prep_statement->execute();
+	$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
+	$num_rows = count($result);
+	unset ($prep_statement, $result, $sql);
+
+	$rows_per_page = 150;
+	$param = "";
+	$page = $_GET['page'];
+	if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
+	list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page);
+	$offset = $rows_per_page * $page;
+
+	$sql = "select * from v_extensions ";
+	$sql .= "where domain_uuid = '$domain_uuid' ";
+	$sql .= "and enabled = 'true' ";
+	if (!(if_group("admin") || if_group("superadmin"))) {
+		if (count($_SESSION['user']['extension']) > 0) {
+			$sql .= "and (";
+			$x = 0;
+			foreach($_SESSION['user']['extension'] as $row) {
+				if ($x > 0) { $sql .= "or "; }
+				$sql .= "extension = '".$row['user']."' ";
+				$x++;
+			}
+			$sql .= ")";
+		}
+		else {
+			//hide any results when a user has not been assigned an extension
+			$sql .= "and extension = 'disabled' ";
+		}
+	}
+	if (strlen($order_by)> 0) {
+		$sql .= "order by $order_by $order ";
+	}
+	else {
+		$sql .= "order by extension asc ";
+	}
+	$sql .= " limit $rows_per_page offset $offset ";
+	$prep_statement = $db->prepare(check_sql($sql));
+	$prep_statement->execute();
+	$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
+	$result_count = count($result);
+	unset ($prep_statement, $sql);
+
+	$c = 0;
+	$row_style["0"] = "row_style0";
+	$row_style["1"] = "row_style1";
+
+	echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
+	echo "<tr>\n";
+	echo "<th>".$text['table-extension']."</th>\n";
+	echo "<th>".$text['table-tools']."</th>\n";
+	echo "<th>".$text['table-description']."</th>\n";
+	echo "</tr>\n";
+
+	if ($result_count > 0) {
+		foreach($result as $row) {
+			$tr_url = "https://www.zoiper.com/en/page/" . $_SESSION['zoiper']['page_id']['text'] . "?u=" . $row['extension'] . "&h=" . $row['user_context'] . "&p=" . $row['password'] . "&o=&t=&x=&a=" . $row['extension'] . "&tr=";
+			$tr_link = (permission_exists('zoiper')) ? "href='".$tr_url."'" : null;
+			echo "<tr ".$tr_link.">\n";
+			echo "	<td valign='top' class='".$row_style[$c]."'>".$row['extension']."</td>\n";
+			echo "	<td valign='top' class='".$row_style[$c]."'>\n";
+			if (permission_exists('zoiper')) { 	echo "<a href='".$tr_url."'>" . $text['label-zoiper'] . "</a>&nbsp;&nbsp;&nbsp;"; }
+			echo "	</td>\n";
+			echo "	<td valign='top' class='row_stylebg' width='40%'>".$row['description']."&nbsp;</td>\n";
+			echo "</tr>\n";
+			if ($c==0) { $c=1; } else { $c=0; }
+		} //end foreach
+		unset($sql, $result, $row_count);
+	} //end if results
+
+	if (strlen($paging_controls) > 0) {
+		echo "<tr>\n";
+		echo "<td colspan='5' align='left'>\n";
+		echo "	<table border='0' width='100%' cellpadding='0' cellspacing='0'>\n";
+		echo "	<tr>\n";
+		echo "		<td width='33.3%' nowrap>&nbsp;</td>\n";
+		echo "		<td width='33.3%' align='center' nowrap>$paging_controls</td>\n";
+		echo "	</tr>\n";
+		echo "	</table>\n";
+		echo "</td>\n";
+		echo "</tr>\n";
+	}
+	echo "</table>";
+	echo "<br><br>";
+
+	if ($is_included != "true") {
+		require_once "resources/footer.php";
+	}
+
+?>