예제 #1
0
     echo "1";
     break;
 case "update":
     $_REQUEST['updatedon'] = date('Y-m-d H:i:s');
     $formMaps = profile_form_table_map_contacts();
     // for new group name and existing group name start
     if (trim($_REQUEST["newcontactgroupname"]) != "") {
         $_REQUEST["contactgroup"] = trim($_REQUEST["newcontactgroupname"]);
     }
     // for new group name and existing group name end
     $updateparams = getUpdateQueryString($_REQUEST, $formMaps);
     $result = updateContactProfile($updateparams, $_REQUEST["contactid"], $objDataHelper, $strCK_user_id, $_REQUEST["action"]);
     echo $result;
     break;
 case "getcontact":
     $arrContact = getContactByContactid($strCK_user_id, $_REQUEST["contactid"], $objDataHelper);
     $formMaps = profile_form_table_map_contacts();
     $frmName = "frmcontact";
     $arrContactDetails = array();
     foreach ($formMaps[$frmName] as $key => $value) {
         $arrContactDetails[$key] = $arrContact[0][$value];
     }
     if (count($arrContactDetails) == 0) {
         echo "0";
     } else {
         echo json_encode($arrContactDetails);
     }
     break;
 case "uploadfiledata":
     $checkKeys = array("contact_email_address", "contact_mobile_number");
     $filename = $_REQUEST['filename'];
예제 #2
0
     echo "1";
     break;
 case "update":
     $_REQUEST['updatedon'] = date('Y-m-d H:i:s');
     $formMaps = profile_form_table_map_contacts();
     // for new group name and existing group name start
     if (trim($_REQUEST["newcontactgroupname"]) != "") {
         $_REQUEST["contactgroup"] = trim($_REQUEST["newcontactgroupname"]);
     }
     // for new group name and existing group name end
     $updateparams = getUpdateQueryString($_REQUEST, $formMaps);
     $result = updateContactProfile($updateparams, $_REQUEST["contactid"], $objDataHelper, $strSetClient_ID, $_REQUEST["action"]);
     echo $result;
     break;
 case "getcontact":
     $arrContact = getContactByContactid($strSetClient_ID, $_REQUEST["contactid"], $objDataHelper);
     $formMaps = profile_form_table_map_contacts();
     $frmName = "frmcontact";
     $arrContactDetails = array();
     foreach ($formMaps[$frmName] as $key => $value) {
         $arrContactDetails[$key] = $arrContact[0][$value];
     }
     if (count($arrContactDetails) == 0) {
         echo "0";
     } else {
         echo json_encode($arrContactDetails);
     }
     break;
 case "uploadfiledata":
     $checkKeys = array("contact_email_address", "contact_mobile_number");
     $filename = $_REQUEST['filename'];