diff --git a/addcustomfield.php b/addcustomfield.php index 30ebb355..af1807c6 100644 --- a/addcustomfield.php +++ b/addcustomfield.php @@ -1,42 +1,54 @@ * + * @author Alexander Jim Abenoja + * + * @par License: + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . +*/ - ################################################### - ### Name: edittelephonylist.php ### - ### Functions: Edit List Details ### - ### Copyright: GOAutoDial Ltd. (c) 2011-2016 ### - ### Version: 4.0 ### - ### Written by: Alexander Jim H. Abenoja ### - ### License: AGPLv2 ### - ################################################### - - require_once('./php/CRMDefaults.php'); require_once('./php/UIHandler.php'); - //require_once('./php/DbHandler.php'); - require_once('./php/LanguageHandler.php'); - require('./php/Session.php'); - require_once('./php/goCRMAPISettings.php'); + require_once('./php/APIHandler.php'); + require_once('./php/CRMDefaults.php'); + require_once('./php/LanguageHandler.php'); + include('./php/Session.php'); // initialize structures + $api = \creamy\APIHandler::getInstance(); $ui = \creamy\UIHandler::getInstance(); $lh = \creamy\LanguageHandler::getInstance(); $user = \creamy\CreamyUser::currentUser(); -$modifyid = NULL; -if (isset($_POST["modifyid"])) { - $modifyid = $_POST["modifyid"]; -} + $modifyid = NULL; + if (isset($_POST["modifyid"])) { + $modifyid = $_POST["modifyid"]; + } -$customFields = $ui->API_goGetAllCustomFields($modifyid); -$customs = $customFields->data; + $customFields = $api->API_getAllCustomFields($modifyid); + $customs = $customFields->data; -// echo "
";
-// print_r($customs);
-// die;
+	//echo "
";
+	//print_r($customs);
+	// die;
 
-$perm = $ui->goGetPermissions('customfields', $_SESSION['usergroup']);
-if ($perm->customfields_read === 'N' && $perm->customfields_update === 'N' && $perm->customfields_delete === 'N') {
-	header("location: telephonylist.php");
-}
+	$perm = $ui->goGetPermissions('customfields', $_SESSION['usergroup']);
+	if ($perm->customfields_read === 'N' && $perm->customfields_update === 'N' && $perm->customfields_delete === 'N') {
+		header("location: telephonylist.php");
+	}
 ?>
 
     
@@ -988,8 +1000,8 @@ function(){
 								contentType: false,
 								processData: false,
 								success: function(data) {
-									// console.log(data);
-									if(data == "success"){
+									console.log(data);
+									if(data == 1){
 										$('#wizard-form input[name="field_label"]').removeAttr('readonly');
 										swal({
 											title: "Success",
diff --git a/callrecordings.php b/callrecordings.php
index 34acabb3..d9864983 100644
--- a/callrecordings.php
+++ b/callrecordings.php
@@ -604,7 +604,7 @@
 				*****/
 				$(document).on('click','.play_audio',function() {
 					var audioFile = $(this).attr('data-location');
-					//audioFile = audioFile.replace("http", "https");
+					audioFile = audioFile.replace("http", "https");
 					//console.log(audioFile);
 					var voicedetails = "";
 					var sourceFile = '