Hola, en el siguiente enlace usted podra realizar el test tecnico

https://www.checktime-mod2-3.cl/chektime/ingreso_trabajador.php?em=".$idempresa."

COntraseña: ".$clave."

"; $mail->IsSMTP(); // telling the class to use SMTP $mail->Host = "mail.checktime-mod2-3.cl"; // SMTP server $mail->SMTPAuth = true; // enable SMTP authentication $mail->SMTPSecure = true; $mail->Port = 465; // set the SMTP port for the GMAIL server $mail->Username = "contacto@checktime-mod2-3.cl"; // SMTP account username $mail->Password = "Pic16f84@2021"; // SMTP account password $mail->SetFrom('contacto@checktime-mod2-3.cl', 'CHECKTIME.cl'); $mail->WordWrap = 50; $mail->IsHTML(true); $mail->Subject = ".::Inscripcion en Checktime ".$reg['nombre'].""; $mail->MsgHTML($cuerpo); $address = $correo1; $address2 = $correo2; $mail->AddAddress($correo); //$mail->AddAddress($correo2); //$mail->AddAddress($correo3); $mail->SMTPOptions = array( 'ssl' => array( 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true ) ); if(!$mail->Send()) { // echo "Mailer Error: " . $mail->ErrorInfo; } else { // echo "Message sent!"; } return $respuesta; } function mensaje_disc($correo,$clave,$id_token,$idempresa) { $mail= new PHPMailer(); $cuerpo ="

Hola, en el siguiente enlace usted podra realizar el Test tecnico mas el Test disc(personalidad)

https://www.checktime-mod2-3.cl/chektime/ingreso_trabajador_td.php?em=".$idempresa."&token=".$id_token."

COntraseña: ".$clave."

"; $mail->IsSMTP(); // telling the class to use SMTP $mail->Host = "mail.checktime-mod2-3.cl"; // SMTP server $mail->SMTPAuth = true; // enable SMTP authentication $mail->SMTPSecure = true; $mail->Port = 465; // set the SMTP port for the GMAIL server $mail->Username = "contacto@checktime-mod2-3.cl"; // SMTP account username $mail->Password = "Pic16f84@2021"; // SMTP account password $mail->SetFrom('contacto@checktime-mod2-3.cl', 'CHECKTIME.cl'); $mail->WordWrap = 50; $mail->IsHTML(true); $mail->Subject = ".::Inscripcion en Checktime ".$reg['nombre'].""; $mail->MsgHTML($cuerpo); $address = $correo1; $address2 = $correo2; $mail->AddAddress($correo); //$mail->AddAddress($correo2); //$mail->AddAddress($correo3); $mail->SMTPOptions = array( 'ssl' => array( 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true ) ); if(!$mail->Send()) { // echo "Mailer Error: " . $mail->ErrorInfo; } else { // echo "Message sent!"; } return $respuesta; } function mensaje_disc_solo($correo,$rut,$id_man,$id_con,$nombre,$token,$id_emp) { $tipo=4;//4:Operativo, 5:Táctico, 6:Estratégico. $mail= new PHPMailer(); $cuerpo ="

Hola, en el siguiente enlace usted podra realizar el Test disc(personalidad)

https://checktime.qualitatcorp.cl/register?rut=".$rut."&nombre=".$nombre."&type=checktime&rubrica=".$tipo."&empresa=".$id_emp."&contrato=".$id_con."&mandante=".$id_man."&url=https://www.checktime-mod2-3.cl/chektime/Result_disc.php

"; $mail->IsSMTP(); // telling the class to use SMTP $mail->Host = "mail.checktime-mod2-3.cl"; // SMTP server $mail->SMTPAuth = true; // enable SMTP authentication $mail->SMTPSecure = true; $mail->Port = 465; // set the SMTP port for the GMAIL server $mail->Username = "contacto@checktime-mod2-3.cl"; // SMTP account username $mail->Password = "Pic16f84@2021"; // SMTP account password $mail->SetFrom('contacto@checktime-mod2-3.cl', 'CHECKTIME.cl'); $mail->WordWrap = 50; $mail->IsHTML(true); $mail->Subject = ".::Inscripcion en Checktime ".$reg['nombre'].""; $mail->MsgHTML($cuerpo); $address = $correo1; $address2 = $correo2; $mail->AddAddress($correo); //$mail->AddAddress($correo2); //$mail->AddAddress($correo3); $mail->SMTPOptions = array( 'ssl' => array( 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true ) ); if(!$mail->Send()) { // echo "Mailer Error: " . $mail->ErrorInfo; } else { // echo "Message sent!"; } return $respuesta; } //Carácteres para la contraseña $str = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890"; $password = ""; //Reconstruimos la contraseña segun la longitud que se quiera for($i=0;$i<6;$i++) { //obtenemos un caracter aleatorio escogido de la cadena de caracteres $password .= substr($str,rand(0,62),1); } if ($mandante!="" and $contrato!="") { if(isset($_POST["btnLogA"])) { $sql= "SELECT id,nombre FROM preseleccion WHERE id_mandante=".$mandante." and id_contrato=".$contrato." ORDER BY nombre "; $link= Conectarse(); $result2= mysql_query($sql, $link); $reg5 = mysql_fetch_array($result2); $estado=0; if( mysql_num_rows($result2) > 0 ) { $estado=1; } $sql1= "SELECT pre.*,tr.* FROM preseleccion_trabajadores as pre JOIN trabajador as tr ON(pre.id_trabajadores=tr.id and pre.id_preseleccion=".$reg5['id'].") ORDER BY tr.id"; $result= mysql_query($sql1, $link); $idempresa=$_POST['id_emp']; $token=$_POST['id_token']; } } else { if(isset($_POST["btnLogB"])) { $sql= "SELECT id_trabajadores as id,id_preseleccion FROM preseleccion_trabajadores where id_preseleccion=".$id_pre." ORDER BY id "; $link= Conectarse(); $result2= mysql_query($sql, $link); while($reg = mysql_fetch_array($result2) ) { $discr=0; if(@$_POST['selt'.$reg['id']]) //solo test tecnicos { $seleccionado=1; //seleccionar datos del trabajador $sql2= "SELECT * FROM trabajador where id=".$reg['id']." ORDER BY id "; $result3= mysql_query($sql2, $link); $reg3 = mysql_fetch_array($result3); //revisar si fue enviado el enlace o sino crear o enviar solo clave $sql4= "SELECT * FROM trabajador_seleccionado_test where rut_trabajador='".$reg3['rut']."' and id_cliente=".$id_emp; $result4= mysql_query($sql4, $link); //si existe solo enviar clavw if( mysql_num_rows($result4) > 0 ) { $reg4 = mysql_fetch_array($result4); if(@$_POST['seld'.$reg['id']])// si esta seleccionado ademas el seld mas el selt { mensaje_disc($reg3['email'],$reg4['clave_ind'],$id_token,$id_emp);// crear mensaje_disc $discr=1; } else { mensaje($reg3['email'],$reg4['clave_ind'],$id_emp); } } else// sino existe crear y enviar clave { //Mostramos la contraseña generada if(@$_POST['seld'.$reg['id']])// si esta seleccionado ademas el seld mas el selt { $sql_trab="REPLACE INTO trabajador_seleccionado_test (rut_trabajador,especialidad,clave_ind,id_cliente,test_disc,test_cert) VALUES ('".$reg3['rut']."','".$reg3['especialidad']. "','".$password."',".$id_emp.",1,1)"; $result4=mysql_query($sql_trab,$link); mensaje_disc($reg3['email'],$password,$id_token,$id_emp); $discr=1; } else { $sql_trab="REPLACE INTO trabajador_seleccionado_test (rut_trabajador,especialidad,clave_ind,id_cliente,test_disc,test_cert) VALUES ('".$reg3['rut']."','".$reg3['especialidad']. "','".$password."',".$id_emp.",0,1)"; $result4=mysql_query($sql_trab,$link); mensaje($reg3['email'],$password,$id_emp); } } $arreglo_tecnico[$i]=$reg2['id']; $i++; }//solo test disc if(@$_POST['seld'.$reg['id']] and $discr==0) { $seleccionado=1; //seleccionar datos del trabajador $sql2= "SELECT * FROM trabajador where id=".$reg['id']." ORDER BY id "; $result3= mysql_query($sql2, $link); $reg3 = mysql_fetch_array($result3); //revisar si fue enviado el enlace o sino crear o enviar solo clave $sql4= "SELECT * FROM trabajador_seleccionado_test where rut_trabajador='".$reg3['rut']."' and id_cliente=".$id_emp; $result4= mysql_query($sql4, $link); //si existe solo enviar clavw if( mysql_num_rows($result4) > 0 ) { //revisar si fue enviado el enlace o sino crear o enviar solo clave $sql5= "SELECT * FROM preseleccion where id=".$reg['id_preseleccion']; $result5= mysql_query($sql5, $link); $reg5 = mysql_fetch_array($result5); $result4= mysql_query($sql4, $link); $reg4 = mysql_fetch_array($result4); mensaje_disc_solo($reg3['email'],$reg3['rut'],$reg5['id_mandante'],$reg5['id_contrato'],$reg3['nombres'], $id_token,$id_emp); } else// sino existe crear y enviar clave { //Mostramos la contraseña generada $sql_trab="REPLACE INTO trabajador_seleccionado_test (rut_trabajador,especialidad,clave_ind,id_cliente,test_disc,test_cert) VALUES ('".$reg3['rut']."','".$reg3['especialidad']."','". $password. "',".$id_emp.",1,0)"; $result4=mysql_query($sql_trab,$link); mensaje_disc_solo($reg3['email'],$reg3['rut'],$reg5['id_mandante'],$reg5['id_contrato'],$reg3['nombres'], $id_token,$id_emp); } $arreglo_disc[$ii]=$reg2['id']; $ii++; } } if( $seleccionado==1 ) //funcion enviar correo { echo ""; } } } function cambiar_contrato($mand) { $respuesta = new xajaxResponse(); $contrato = json_decode(file_get_contents('http://chectime.com/app/api/contratos/'), true ); $salida=''; mysql_close($link); $respuesta->assign('cambia_contrato', 'innerHTML', $salida); return $respuesta; } //$xajax->configure('debug', true); $xajax->configure('javascript URI','xajax/'); $xajax->register(XAJAX_FUNCTION,"cambiar_contrato"); $xajax->configure( "errorHandler", true ); $xajax->register( XAJAX_PROCESSING_EVENT, XAJAX_PROCESSING_EVENT_INVALID, "onInvalidRequest" ); $xajax->processRequest(); ?>