diff --git a/app/call_broadcast/app_languages.php b/app/call_broadcast/app_languages.php index aad7c05c8e..4c670de57c 100644 --- a/app/call_broadcast/app_languages.php +++ b/app/call_broadcast/app_languages.php @@ -321,6 +321,46 @@ $text['label-accountcode']['ru-ru'] = "Код Авторизации"; $text['label-accountcode']['sv-se'] = "Accountcode"; $text['label-accountcode']['uk-ua'] = "Код облікового запису"; +$text['label-sample_file']['en-us'] = "Sample CSV File"; +$text['label-sample_file']['ar-eg'] = "Sample CSV File"; +$text['label-sample_file']['de-at'] = "Sample CSV File"; +$text['label-sample_file']['de-ch'] = "Sample CSV File"; +$text['label-sample_file']['de-de'] = "Sample CSV File"; +$text['label-sample_file']['es-cl'] = "Sample CSV File"; +$text['label-sample_file']['es-mx'] = "Sample CSV File"; +$text['label-sample_file']['fr-ca'] = "Sample CSV File"; +$text['label-sample_file']['fr-fr'] = "Sample CSV File"; +$text['label-sample_file']['he-il'] = "Sample CSV File"; +$text['label-sample_file']['it-it'] = "Sample CSV File"; +$text['label-sample_file']['nl-nl'] = "Sample CSV File"; +$text['label-sample_file']['pl-pl'] = "Sample CSV File"; +$text['label-sample_file']['pt-br'] = "Sample CSV File"; +$text['label-sample_file']['pt-pt'] = "Sample CSV File"; +$text['label-sample_file']['ro-ro'] = "Sample CSV File"; +$text['label-sample_file']['ru-ru'] = "Sample CSV File"; +$text['label-sample_file']['sv-se'] = "Sample CSV File"; +$text['label-sample_file']['uk-ua'] = "Sample CSV File"; + +$text['label-list_example']['en-us'] = "Number|First,Last\nNumber|First,Last\n..."; +$text['label-list_example']['ar-eg'] = "Number|First,Last\nNumber|First,Last\n..."; +$text['label-list_example']['de-at'] = "Number|First,Last\nNumber|First,Last\n..."; +$text['label-list_example']['de-ch'] = "Number|First,Last\nNumber|First,Last\n..."; +$text['label-list_example']['de-de'] = "Number|First,Last\nNumber|First,Last\n..."; +$text['label-list_example']['es-cl'] = "Number|First,Last\nNumber|First,Last\n..."; +$text['label-list_example']['es-mx'] = "Number|First,Last\nNumber|First,Last\n..."; +$text['label-list_example']['fr-ca'] = "Number|First,Last\nNumber|First,Last\n..."; +$text['label-list_example']['fr-fr'] = "Number|First,Last\nNumber|First,Last\n..."; +$text['label-list_example']['he-il'] = "Number|First,Last\nNumber|First,Last\n..."; +$text['label-list_example']['it-it'] = "Number|First,Last\nNumber|First,Last\n..."; +$text['label-list_example']['nl-nl'] = "Number|First,Last\nNumber|First,Last\n..."; +$text['label-list_example']['pl-pl'] = "Number|First,Last\nNumber|First,Last\n..."; +$text['label-list_example']['pt-br'] = "Number|First,Last\nNumber|First,Last\n..."; +$text['label-list_example']['pt-pt'] = "Number|First,Last\nNumber|First,Last\n..."; +$text['label-list_example']['ro-ro'] = "Number|First,Last\nNumber|First,Last\n..."; +$text['label-list_example']['ru-ru'] = "Number|First,Last\nNumber|First,Last\n..."; +$text['label-list_example']['sv-se'] = "Number|First,Last\nNumber|First,Last\n..."; +$text['label-list_example']['uk-ua'] = "Number|First,Last\nNumber|First,Last\n..."; + $text['description-timeout']['en-us'] = "Specify the absolute timeout in seconds."; $text['description-timeout']['ar-eg'] = ""; $text['description-timeout']['de-at'] = "Geben Sie die absolute Zeitüberschreitung in Sekunden an."; //copied from de-de @@ -341,25 +381,25 @@ $text['description-timeout']['ru-ru'] = "Время ожидания (в мил $text['description-timeout']['sv-se'] = "Specificera den absoluta timeout:en i sekunder."; $text['description-timeout']['uk-ua'] = ""; -$text['description-phone']['en-us'] = "Optional, set a list of phone numbers one per row in the following format: 123-123-1234|Last Name, First Name"; +$text['description-phone']['en-us'] = "Select a TXT/CSV file for upload, or enter Phone Numbers one per line in the format shown above."; $text['description-phone']['ar-eg'] = ""; -$text['description-phone']['de-at'] = "Optional: Ergänzen Sie eine Liste von Telefonnummern, eine Nummer pro Zeile im folgenden Format: 123-123-1234|Nachname, Vorname"; //copied from de-de -$text['description-phone']['de-ch'] = "Optional: Ergänzen Sie eine Liste von Telefonnummern, eine Nummer pro Zeile im folgenden Format: 123-123-1234|Nachname, Vorname"; //copied from de-de -$text['description-phone']['de-de'] = "Optional: Ergänzen Sie eine Liste von Telefonnummern, eine Nummer pro Zeile im folgenden Format: 123-123-1234|Nachname, Vorname"; -$text['description-phone']['es-cl'] = "Opcional, definir una lista de números de telefono, uno por línea en el siguiente formato: 123-123-1234 | Apellido, Nombre"; -$text['description-phone']['es-mx'] = "Opcional, definir una lista de números de telefono, uno por línea en el siguiente formato: 123-123-1234 | Apellido, Nombre"; //copied from es-cl -$text['description-phone']['fr-ca'] = "Optionnel, Insérer une liste de numéros de téléphone, un par ligne, dans le format suivant ; 0123456789 | Nom, Prénom"; //copied from fr-fr -$text['description-phone']['fr-fr'] = "Optionnel, Insérer une liste de numéros de téléphone, un par ligne, dans le format suivant ; 0123456789 | Nom, Prénom"; +$text['description-phone']['de-at'] = "Optional: Ergänzen Sie eine Liste von Telefonnummern, eine Nummer pro Zeile im folgenden Format: 123-123-1234|Nachname,Vorname"; //copied from de-de +$text['description-phone']['de-ch'] = "Optional: Ergänzen Sie eine Liste von Telefonnummern, eine Nummer pro Zeile im folgenden Format: 123-123-1234|Nachname,Vorname"; //copied from de-de +$text['description-phone']['de-de'] = "Optional: Ergänzen Sie eine Liste von Telefonnummern, eine Nummer pro Zeile im folgenden Format: 123-123-1234|Nachname,Vorname"; +$text['description-phone']['es-cl'] = "Opcional, definir una lista de números de telefono, uno por línea en el siguiente formato: 123-123-1234|Apellido,Nombre"; +$text['description-phone']['es-mx'] = "Opcional, definir una lista de números de telefono, uno por línea en el siguiente formato: 123-123-1234|Apellido,Nombre"; //copied from es-cl +$text['description-phone']['fr-ca'] = "Optionnel, Insérer une liste de numéros de téléphone, un par ligne, dans le format suivant ; 0123456789|Nom,Prénom"; //copied from fr-fr +$text['description-phone']['fr-fr'] = "Optionnel, Insérer une liste de numéros de téléphone, un par ligne, dans le format suivant ; 0123456789|Nom,Prénom"; $text['description-phone']['he-il'] = ""; -$text['description-phone']['it-it'] = "Opzionale, inserire una lista di numeri di telefono, uno per riga, nel formato 123-123-1234|Cognome, Nome"; +$text['description-phone']['it-it'] = "Opzionale, inserire una lista di numeri di telefono, uno per riga, nel formato 123-123-1234|Cognome,Nome"; $text['description-phone']['nl-nl'] = ""; -$text['description-phone']['pl-pl'] = "Opcjonalne - ułóż listę numerów (jeden pod drugim) w formacie: 123-123-1234|Nazwisko, Imię"; -$text['description-phone']['pt-br'] = "Opcional, definir uma lista de números de telefone, um por linha, no seguinte formato: 210000000 | Apelido, Primeiro Nome."; -$text['description-phone']['pt-pt'] = "Opcional, definir uma lista de números de telefone, um por linha, no seguinte formato: 210000000 | Apelido, Primeiro Nome"; +$text['description-phone']['pl-pl'] = "Opcjonalne - ułóż listę numerów (jeden pod drugim) w formacie: 123-123-1234|Nazwisko,Imię"; +$text['description-phone']['pt-br'] = "Opcional, definir uma lista de números de telefone, um por linha, no seguinte formato: 210000000|Apelido,Primeiro Nome."; +$text['description-phone']['pt-pt'] = "Opcional, definir uma lista de números de telefone, um por linha, no seguinte formato: 210000000|Apelido,Primeiro Nome"; $text['description-phone']['ro-ro'] = ""; -$text['description-phone']['ru-ru'] = "Дополнительно, задайте список телефонных номеров, по одному в ряд, в формате: 123-123-1234 | Фамилия, Имя"; -$text['description-phone']['sv-se'] = "Frivillig, fyll i en lista med nummer (ett per rad) i följande format: 123-123-1234|Efternamn, Förnamn"; -$text['description-phone']['uk-ua'] = "Додатково, задайте список телефонних номерів по одному на рядок в наступному форматі: 123-123-1234 | Прізвище, ім'я"; +$text['description-phone']['ru-ru'] = "Дополнительно, задайте список телефонных номеров, по одному в ряд, в формате: 123-123-1234|Фамилия,Имя"; +$text['description-phone']['sv-se'] = "Frivillig, fyll i en lista med nummer (ett per rad) i följande format: 123-123-1234|Efternamn,Förnamn"; +$text['description-phone']['uk-ua'] = "Додатково, задайте список телефонних номерів по одному на рядок в наступному форматі: 123-123-1234|Прізвище,ім'я"; $text['description-name']['en-us'] = "Enter the name here."; $text['description-name']['ar-eg'] = ""; diff --git a/app/call_broadcast/call_broadcast_edit.php b/app/call_broadcast/call_broadcast_edit.php index 4f5f2366f8..049f4714e9 100644 --- a/app/call_broadcast/call_broadcast_edit.php +++ b/app/call_broadcast/call_broadcast_edit.php @@ -59,19 +59,19 @@ $filename=$_FILES["broadcast_phone_numbers_file"]["tmp_name"]; $file_extension = array('application/octet-stream','application/vnd.ms-excel','text/plain','text/csv','text/tsv'); if (in_array($_FILES['broadcast_phone_numbers_file']['type'],$file_extension)) { - $file = fopen($filename, "r"); - $count = 0; - while (($getData = fgetcsv($file, 0, "\n")) !== FALSE) - { - $count++; - if ($count == 1) { continue; } - $getData = preg_split('/[ ,|]/', $getData[0], null, PREG_SPLIT_NO_EMPTY); - $separator = $getData[0]; - $separator .= (isset($getData[1]) && $getData[1] != '')? '|'.$getData[1] : ''; - $separator .= (isset($getData[2]) && $getData[2] != '')? ','.$getData[2] : ''; - $separator .= '\n'; - $upload_csv .= $separator; - } + $file = fopen($filename, "r"); + $count = 0; + while (($getData = fgetcsv($file, 0, "\n")) !== FALSE) + { + $count++; + if ($count == 1) { continue; } + $getData = preg_split('/[ ,|]/', $getData[0], null, PREG_SPLIT_NO_EMPTY); + $separator = $getData[0]; + $separator .= (isset($getData[1]) && $getData[1] != '')? '|'.$getData[1] : ''; + $separator .= (isset($getData[2]) && $getData[2] != '')? ','.$getData[2] : ''; + $separator .= '\n'; + $upload_csv .= $separator; + } fclose($file); } else { @@ -79,15 +79,13 @@ } } if (!empty($broadcast_phone_numbers) && !empty($upload_csv)) { - $sql .= "E'"; $sql .= $broadcast_phone_numbers.'\n'.$upload_csv; - $sql .= "',"; } elseif (empty($broadcast_phone_numbers) && !empty($upload_csv)) { - $sql .= "E'$upload_csv', "; + $sql .= $upload_csv; } else { - $sql .= "E'$broadcast_phone_numbers', "; + $sql .= $broadcast_phone_numbers; } return array('code'=>true,'sql'=> $sql); } @@ -270,8 +268,8 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo " \n"; if ($action == "update") { echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; } echo " \n"; echo "\n"; @@ -455,16 +453,11 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "