Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 16971 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 16971 Rev 16972
Línea 666... Línea 666...
666
 
666
 
Línea 667... Línea -...
667
        $request    = $this->getRequest();
-
 
668
 
667
        $request    = $this->getRequest();
669
 
668
 
670
 
669
 
671
 
670
 
-
 
671
        if ($request->isPost()) {
672
        if ($request->isPost()) {
672
           
-
 
673
            $step = Functions::sanitizeFilterString($this->params()->fromPost('step'));
Línea 673... Línea 674...
673
 
674
            if ($step == 'validation') {
674
            $step = Functions::sanitizeFilterString($$this->params()->fromPost('step'));
675
                
Línea 813... Línea 814...
813
                        'data'   => $messages
814
                        'data'   => $messages
814
                    ]);
815
                    ]);
815
                }
816
                }
816
            } else if ($step == 'process') {
817
            } else if ($step == 'process') {
Línea -... Línea 818...
-
 
818
 
-
 
819
   
817
 
820
                
818
                $key = Functions::sanitizeFilterString($this->params()->fromPost('key'));
821
                $key = Functions::sanitizeFilterString($this->params()->fromPost('key'));
819
                if (!$key) {
822
                if (!$key) {
820
                    return new JsonModel([
823
                    return new JsonModel([
821
                        'success' => false,
824
                        'success' => false,
Línea 881... Línea 884...
881
                    $whatsapp =  $record['whatsapp'];
884
                    $whatsapp =  $record['whatsapp'];
882
                    $linkedin = $record['linkedin'];
885
                    $linkedin = $record['linkedin'];
883
                    $sector = $record['sector'];
886
                    $sector = $record['sector'];
884
                    $scholarship = $record['scholarship'];
887
                    $scholarship = $record['scholarship'];
Línea 885... Línea 888...
885
                    
888
                    
886
                    
889
       
887
                    $discoveryContact = $discoveryContactMapper->fetchOneByCorporateEmail($email_company);
890
                    $discoveryContact = $discoveryContactMapper->fetchOneByCorporateEmailAndCompanyId($email_company, $currentCompany->id);
Línea 888... Línea 891...
888
                    if ($discoveryContact) {
891
                    if ($discoveryContact) {
889
                        
892
                        
890
                        $csv .= "$email_company|DUPLICATE\r\n";
893
                        $csv .= "$email_company|DUPLICATE\r\n";
Línea 908... Línea 911...
908
                        $discoveryContact->celular = empty($movil) ? '' : '+' . $movil;
911
                        $discoveryContact->celular = empty($movil) ? '' : '+' . $movil;
909
                        $discoveryContact->whatsapp = empty($whatsapp) ? '' : '+' . $whatsapp;
912
                        $discoveryContact->whatsapp = empty($whatsapp) ? '' : '+' . $whatsapp;
910
                        $discoveryContact->linkedin = $linkedin;
913
                        $discoveryContact->linkedin = $linkedin;
911
                        $discoveryContact->scholarship = $scholarship;
914
                        $discoveryContact->scholarship = $scholarship;
Línea 912... Línea 915...
912
                      
915
                      
913
                        
916
    
914
                        if($discoveryContactMapper->insert($discoveryContact)) {
917
                        if($discoveryContactMapper->insert($discoveryContact)) {
Línea 915... Línea 918...
915
                            $new_contacts++; 
918
                            $new_contacts++; 
Línea 979... Línea 982...
979
                        } else {
982
                        } else {
980
                            $csv .= "$email_company|ERROR\r\n";
983
                            $csv .= "$email_company|ERROR\r\n";
981
                            $error_contacts++;
984
                            $error_contacts++;
982
                        }
985
                        }
983
                    }
986
                    }
984
                }
987
                }           
Línea 985... Línea 988...
985
                
988
                
986
                $csv_filename = 'discovery-contact-' . date('Y-m-d H:i') . '.csv';
989
                $csv_filename = 'discovery-contact-' . date('Y-m-d H:i') . '.csv';