├── .gitignore ├── CRMdb.sql ├── README.md ├── ajax.php ├── beep.mp3 ├── charts.html ├── composer.json ├── composer.lock ├── core ├── .htaccess ├── bin │ ├── ajax │ │ ├── goActualizarCont.php │ │ ├── goAgenda.php │ │ ├── goCampana.php │ │ ├── goChat.php │ │ ├── goChatemp.php │ │ ├── goCodigo.php │ │ ├── goCompletarTarea.php │ │ ├── goContacto.php │ │ ├── goContrato.php │ │ ├── goCuentaDatos.php │ │ ├── goElimCampana.php │ │ ├── goElimContrato.php │ │ ├── goElimTarea.php │ │ ├── goEliminarCont.php │ │ ├── goEliminarCuent.php │ │ ├── goEliminarEmp.php │ │ ├── goEmpleado.php │ │ ├── goFiltroPapelera.php │ │ ├── goFiltrocamp.php │ │ ├── goFiltrocontacto.php │ │ ├── goFiltrofert.php │ │ ├── goFiltrotarea.php │ │ ├── goLogin.php │ │ ├── goLoginEmp.php │ │ ├── goLostpass.php │ │ ├── goMensaje.php │ │ ├── goModCuent.php │ │ ├── goModifCampana.php │ │ ├── goModifContrato.php │ │ ├── goModificarEmp.php │ │ ├── goModificarPerfil.php │ │ ├── goOferta.php │ │ ├── goPublicar.php │ │ ├── goRecuperarContacto.php │ │ ├── goRecuperarCuenta.php │ │ ├── goReg.php │ │ ├── goResponder.php │ │ ├── goRest.php │ │ └── goTarea.php │ └── functions │ │ ├── AgreempleadoTemplate.php │ │ ├── CambiopassTemplate.php │ │ ├── ContratoTemplate.php │ │ ├── EmailTemplate.php │ │ ├── Encrypt.php │ │ ├── Lostpasstemplate.php │ │ ├── Templatemesanje.php │ │ ├── contactodatos.php │ │ ├── emp.php │ │ ├── ofertaTemplate.php │ │ └── user.php ├── controllers │ ├── LostpassController.php │ ├── aceptarController.php │ ├── aceptarofertController.php │ ├── activarController.php │ ├── codigoController.php │ ├── dashboardController.php │ ├── errorController.php │ ├── indexController.php │ ├── loginempController.php │ ├── logoutController.php │ ├── lostController.php │ ├── regController.php │ └── restpassController.php ├── core.php └── models │ ├── Campana.php │ ├── Contacto.php │ ├── Contrato.php │ ├── Cuenta.php │ ├── Tarea.php │ ├── TareaEmp.php │ ├── agenda.php │ ├── cards.php │ ├── class.Conexion.php │ └── post.php ├── crm.sql ├── docs └── images │ └── Screen Shot 2022-06-06 at 12.36.44 PM.png ├── html ├── index │ ├── Cards.php │ ├── agendamodal.php │ ├── codigorecuperar.php │ ├── confUsuario.php │ ├── dashboard.php │ ├── grafico.php │ ├── index.php │ ├── loginEmp.php │ ├── loginactivar.php │ ├── lost.php │ ├── mensaje.php │ ├── modificarCont.php │ ├── modificarCuent.php │ ├── oferta.php │ ├── perfil.php │ ├── perfilemp.php │ ├── reg.php │ ├── restpass.php │ └── veremp.php ├── lostpass_mensaje.php ├── overall │ ├── footer.php │ ├── header.php │ └── topnav.php ├── public │ ├── Campanafondo.html │ ├── Contratofondo.html │ ├── NoAcep.html │ ├── aceptar.html │ ├── agreCampana.html │ ├── agreContacto.php │ ├── agreContrato.php │ ├── agreCuenta.php │ ├── agreEmpleados.html │ ├── codigorecuperar.html │ ├── contactofondo.html │ ├── cuentafondo.html │ ├── login.html │ ├── loginEmp.html │ ├── loginactivar.html │ ├── lostp.html │ ├── modifCampana.html │ ├── modificarContrato.html │ ├── modificarEmp.html │ ├── ofertainvalida.html │ ├── post.php │ ├── reg.html │ └── restpass.html └── tablas │ ├── tablaagenda.php │ ├── tablacampana.php │ ├── tablacontacto.php │ ├── tablacontrato.php │ ├── tablacuenta.php │ ├── tablaofertas.php │ ├── tablapapelera.php │ ├── tablatarea.php │ └── tablatareaemp.php ├── index.php ├── tables.html └── views ├── app ├── img │ ├── agregar-documentos.png │ └── logo (3).png └── js │ ├── Campana.js │ ├── CuentaDatos.js │ ├── agenda.js │ ├── ajaxemp.js │ ├── ajaxjs.js │ ├── animaciones.js │ ├── codigo.js │ ├── contacto.js │ ├── contrato.js │ ├── eliminarymodi.js │ ├── empleados.js │ ├── filtrocontacto.js │ ├── filtrocontrato.js │ ├── filtrofert.js │ ├── filtropapelera.js │ ├── filtrotarea.js │ ├── generales.js │ ├── login.js │ ├── lostpass.js │ ├── mensaje.js │ ├── oferta.js │ ├── publicarycomen.js │ ├── reg.js │ ├── restpass.js │ └── tarea.js ├── css ├── addons │ ├── datatables.css │ └── datatables.min.css ├── alertify.css ├── alertify.min.css ├── alertify.rtl.css ├── alertify.rtl.min.css ├── bootstrap.css ├── bootstrap.min.css ├── mdb.css ├── mdb.min.css ├── sb-admin.css ├── sb-admin.min.css ├── style.css ├── style.min.css └── themes │ ├── bootstrap.css │ ├── bootstrap.min.css │ ├── bootstrap.rtl.css │ ├── bootstrap.rtl.min.css │ ├── default.css │ ├── default.min.css │ ├── default.rtl.css │ ├── default.rtl.min.css │ ├── semantic.css │ ├── semantic.min.css │ ├── semantic.rtl.css │ └── semantic.rtl.min.css └── js ├── addons ├── datatables.js └── datatables.min.js ├── alertify.js ├── alertify.min.js ├── bootstrap.js ├── bootstrap.min.js ├── chart-bar-demo.js ├── jquery-3.3.1.min.js ├── jquery.selectr.1.0.h.js ├── mdb.js ├── mdb.min.js ├── modules ├── chart.js ├── enhanced-modals.js ├── forms-free.js ├── jquery.easing.js ├── scrolling-navbar.js ├── velocity.min.js ├── waves.js └── wow.js ├── popper.min.js ├── sb-admin-charts.js ├── sb-admin-charts.min.js ├── sb-admin-datatables.js ├── sb-admin-datatables.min.js ├── sb-admin.js └── sb-admin.min.js /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CRM 2 | 3 | ![demo](https://raw.githubusercontent.com/LJMartinez07/crm/master/docs/images/Screen%20Shot%202022-06-06%20at%2012.36.44%20PM.png) 4 | 5 | In this project i started my investigation about crm for learn how this work, and looking how works salesforce, bitrix24 and some others y decide to start my own one, how was coding on php and js. 6 | -------------------------------------------------------------------------------- /beep.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LJMartinez07/crm-application-php/195395b2394605fca0b9c63941b725da78df1e6c/beep.mp3 -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "slim/slim": "^3.0", 4 | "phpmailer/phpmailer": "^6.0" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /core/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all -------------------------------------------------------------------------------- /core/bin/ajax/goActualizarCont.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['id']); 5 | $nombre = $db->real_escape_string($_POST['nombre']); 6 | $apellido = $db->real_escape_string($_POST['apellido']); 7 | $cuenta = $db->real_escape_string($_POST['cuenta']); 8 | $email = $db->real_escape_string($_POST['email']); 9 | $telefono = $db->real_escape_string($_POST['telefono']); 10 | $telefono2 = $db->real_escape_string($_POST['telefono2']); 11 | $celular = $db->real_escape_string($_POST['celular']); 12 | $fuente = $db->real_escape_string($_POST['fuente']); 13 | $tipo = $db->real_escape_string($_POST['tipo']); 14 | 15 | 16 | 17 | $db -> query("UPDATE contacto_cliente SET Nombre = '$nombre', Apellido = '$apellido', Cuenta = '$cuenta', Email = '$email', Telefono = '$telefono', Telefono_ex = '$telefono2', Celular = '$celular', Fuente = '$fuente', Tipo = '$tipo' WHERE Id_Contacto = '$id'"); 18 | 19 | echo 1; 20 | 21 | 22 | 23 | 24 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goAgenda.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['asunto']); 7 | $descripcion = $db->real_escape_string($_POST['descripcion']); 8 | $fecha = $_POST['fecha']; 9 | $empleado = $_POST['empleado']; 10 | $id = $_SESSION['app_id']; 11 | $db -> query("INSERT INTO agenda(Asunto, Descripcion, Fecha, fk_Id_usuario, fk_Id_empleado) VALUES ('$asunto','$descripcion', '$fecha', '$id', '$empleado')"); 12 | echo 1; 13 | 14 | }elseif(isset($_SESSION['app_idemp'])){ 15 | $idemp = $_SESSION['app_idemp']; 16 | $asunto = $db->real_escape_string($_POST['asunto']); 17 | $descripcion = $db->real_escape_string($_POST['descripcion']); 18 | $fecha = $_POST['fecha']; 19 | $idusuario = $db->query("SELECT Id_usuario FROM usuarios, empleados WHERE empleados.Id_empleados = '$idemp' AND empleados.fk_Id_usuario = usuarios.Id_usuario"); 20 | $dat = $db->recorrer($idusuario); 21 | $db->query("INSERT INTO agenda(Asunto, Descripcion, Fecha, fk_Id_usuario, fk_Id_empleado) VALUES ('$asunto', '$descripcion','$fecha','$dat[0]', '$idemp')"); 22 | 23 | } 24 | 25 | 26 | 27 | 28 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goCampana.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['nombre']); 6 | $estatus = $db->real_escape_string($_POST['estatus']); 7 | $fechai =$db->real_escape_string( $_POST['fechai']); 8 | $fechaf =$db->real_escape_string( $_POST['fechaf']); 9 | $recaudacion = $_POST['recaudacion']; 10 | $descripcion = $db->real_escape_string($_POST['descripcion']); 11 | $id = $_SESSION['app_id']; 12 | 13 | $sql = $db -> query("SELECT Nombre FROM campain WHERE Nombre = '$nombre' LIMIT 1"); 14 | if ($db->rows($sql)==0) { 15 | 16 | $db -> query("INSERT INTO campain (Nombre, Estado, Fecha_start, Fecha_close, Recaudacion, fk_Id_usuario, Descripcion) VALUES ('$nombre', '$estatus', '$fechai', '$fechaf', '$recaudacion','$id' , '$descripcion')"); 17 | 18 | echo 1; 19 | 20 | }else{ 21 | 22 | echo '
23 | 24 |

Alerta!!

25 |

Ya existe una cuenta con el mismo Website

26 |
'; 27 | 28 | } 29 | $db->liberar($sql); 30 | $db->close(); 31 | 32 | 33 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goChat.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM chat WHERE fk_Id_usuarios = '$id' ORDER BY id DESC"); 11 | while($fila = $db->recorrer($sql)) : 12 | ?> 13 | 14 | 15 |
16 |
17 |

18 | 19 |
20 | 21 | 22 | liberar($sql); 25 | 26 | $db ->close(); 27 | ?> 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /core/bin/ajax/goChatemp.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM chat WHERE fk_Id_usuarios = '$id' ORDER BY id DESC"); 13 | while($fila = $db->recorrer($sql)) : 14 | ?> 15 | 16 | 17 |
18 |
19 |

20 | 21 |
22 | 23 | 24 | liberar($sql); 27 | 28 | $db ->close(); 29 | 30 | 31 | ?> 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /core/bin/ajax/goCodigo.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['codigo']); 4 | $sql = $db->query("SELECT * FROM usuarios WHERE Codigo ='$codigo' LIMIT 1"); 5 | if ($db->rows($sql)>0) { 6 | echo 1; 7 | }else{ 8 | echo '
9 | 10 |

Alerta!!

11 |

El codigo ingresado no es valido

12 |
'; 13 | 14 | } 15 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goCompletarTarea.php: -------------------------------------------------------------------------------- 1 | query("UPDATE tarea SET Curso = 'Completada' WHERE Id_tarea = '$id' "); 7 | 8 | echo 1; 9 | 10 | 11 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goContacto.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['nombre']); 5 | $apellido = $db->real_escape_string($_POST['apellido']); 6 | $cuenta = $db->real_escape_string($_POST['cuenta']); 7 | $email = $db->real_escape_string($_POST['email']); 8 | $telefono = $db->real_escape_string($_POST['telefono']); 9 | $telefono2 = $db->real_escape_string($_POST['telefono2']); 10 | $celular = $db->real_escape_string($_POST['celular']); 11 | $fuente = $db->real_escape_string($_POST['fuente']); 12 | $tipo = $db->real_escape_string($_POST['tipo']); 13 | $fk_Id_usuario = $_SESSION['app_id']; 14 | 15 | $nombreComp = $db->real_escape_string($nombre.' '.$apellido); 16 | //se ejecuta la sentencia 17 | $sql = $db->query("SELECT Email FROM contacto_cliente WHERE Email = '$email' AND Estado = 1 LIMIT 1;"); 18 | if ($db->rows($sql) == 0) { 19 | 20 | $com= $db -> query("INSERT INTO contacto_cliente (Nombre, Apellido, Cuenta, Email, Telefono, Telefono_ex, Celular, Fuente, Tipo, fk_Id_usuario, NombreCompleto) VALUES ('$nombre', '$apellido', '$cuenta', '$email', '$telefono', '$telefono2', '$celular', '$fuente', '$tipo', '$fk_Id_usuario', '$nombreComp')"); 21 | if ($com) { 22 | echo 1; 23 | }else{ 24 | echo '
25 | 26 |

Error!

27 |

Si el error persiste por favor llamar a soporte

28 |
'; 29 | } 30 | 31 | 32 | 33 | }else { 34 | 35 | $emails = $db->recorrer($sql)[0]; 36 | if (strtolower($email) == strtolower($emails)) { 37 | echo '
38 | 39 |

Error!

40 |

Ese email ya es existente en sus contactos.

41 |
'; 42 | 43 | } 44 | 45 | } 46 | 47 | 48 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goContrato.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['nombre']); 10 | $tipo_contrato = $db->real_escape_string($_POST['tipo_contrato']); 11 | $Cantidad = $db->real_escape_string($_POST['cantidad_D']); 12 | $fecha_C = $db->real_escape_string($_POST['fechaC']); 13 | $Descripcion = $db->real_escape_string($_POST['Descripcion']); 14 | $contacto = $_POST['contacto']; 15 | $campana = $_POST['campana']; 16 | 17 | 18 | $sql = $db->query("SELECT Email, Nombre, Apellido FROM contacto_cliente WHERE Id_Contacto = '$contacto' LIMIT 1;"); 19 | 20 | if ($db->rows($sql)>0) { 21 | 22 | $data = $db -> recorrer($sql); 23 | $email = $data[0]; 24 | $nombreCom = $data[1].' '.$data[2]; 25 | $codigo = strtoupper(substr(sha1(time()),0,8)); 26 | $link = APP_URL. '?view=aceptar&codigo='.$codigo; 27 | $link2 = APP_URL. '?view=aceptar&no=1&codigo='.$codigo; 28 | 29 | 30 | $mail = new PHPMailer(true); // Passing `true` enables exceptions 31 | //Server settings 32 | $mail->CharSet = "UTF-8"; 33 | $mail->Encoding = "quoted-printable"; 34 | $mail->SMTPDebug = 0; // Enable verbose debug output 35 | $mail->isSMTP(); // Set mailer to use SMTP 36 | $mail->Host = PHPMAILER_HOST; // Specify main and backup SMTP servers 37 | $mail->SMTPAuth = true; // Enable SMTP authentication 38 | $mail->Username = PHPMAILER_USER; // SMTP username 39 | $mail->Password = PHPMAILER_PASS; // SMTP password 40 | $mail->SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted 41 | $mail->Port = PHPMAILER_PORT; // TCP port to connect to 42 | 43 | //Recipients 44 | $mail->setFrom(PHPMAILER_USER, APP_TITLE); //quien manda ? 45 | 46 | $mail->addAddress($email, $nombreCom); // aquien le llega? 47 | 48 | //Content 49 | $mail->isHTML(true); // Set email format to HTML 50 | $mail->Subject = 'Propuesta de contratacion CRM'; 51 | $mail->Body = ContratoTemple($nombreCom,$link,$link2,$nombre, $Descripcion ); 52 | $mail->AltBody = 'Hola, '.$nombre.' para activar tu cuenta ingresda a este link :)' .$link; 53 | 54 | if (!$mail->send()) { 55 | //si no mando el correo entonces imprime el error 56 | $html = ''; 57 | } 58 | else { 59 | 60 | $db -> query("INSERT INTO contrato(Nombre_Cont, Tipo, Cantidad, Fecha_close, Descripcion, CodigoConf, fk_Id_usuario, fk_id_Contacto, fk_id_campain) VALUES ('$nombre', '$tipo_contrato', '$Cantidad', '$fecha_C', '$Descripcion', '$codigo', '$id', '$contacto', '$campana')"); 61 | 62 | echo 1; 63 | 64 | } 65 | 66 | 67 | 68 | } else{ 69 | 70 | echo "Lo siento tenemos problemas contacta a soporte"; 71 | } 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goCuentaDatos.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['nombre']); 6 | $no_cuenta = $db->real_escape_string($_POST['no_cuenta']); 7 | $tipo_cuenta = $db->real_escape_string($_POST['tipo_cuenta']); 8 | $ingreso = $db->real_escape_string($_POST['ingreso']); 9 | $telefono = $db->real_escape_string($_POST['telefono']); 10 | $fax = $db->real_escape_string($_POST['fax']); 11 | $sitio_web = $db->real_escape_string($_POST['sitio_web']); 12 | $direccion = $db->real_escape_string($_POST['direccion']); 13 | $codigo_postal = $db->real_escape_string($_POST['codigo_postal']); 14 | $descripcion = $db->real_escape_string($_POST['descripcion']); 15 | $contacto = $db->real_escape_string($_POST['contacto']); 16 | $id_usuario = $_SESSION['app_id']; 17 | $sql = $db -> query("SELECT Website, Numero_cuenta FROM cuenta_cliente WHERE Website = '$sitio_web' OR Numero_cuenta = '$no_cuenta' LIMIT 1"); 18 | if ($db->rows($sql)==0) { 19 | 20 | $db -> query("INSERT INTO cuenta_cliente (Nombre, Numero_cuenta, Tipo_cuenta, Ingreso_anual, Telefono, Fax, Website, Direccion, Codigo_postal, Descripcion, fk_Id_usuario, Id_contacto) VALUES ('$nombre','$no_cuenta', '$tipo_cuenta', '$ingreso', '$telefono', '$fax', '$sitio_web', '$direccion', '$codigo_postal', '$descripcion', '$id_usuario', '$contacto');"); 21 | 22 | echo 1; 23 | 24 | }else { 25 | echo '
26 | 27 |

Alerta!!

28 |

Ya existe una cuenta con el mismo Website

29 |
'; 30 | 31 | } 32 | $db->liberar($sql); 33 | $db->close(); 34 | 35 | ?> 36 | -------------------------------------------------------------------------------- /core/bin/ajax/goElimCampana.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['id']); 4 | $sql = $db->query("UPDATE campain SET EstadoElim = 0 WHERE Id_campain = '$id'"); 5 | echo 1; 6 | 7 | 8 | $db->close(); 9 | 10 | 11 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goElimContrato.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['id']); 4 | $sql = $db->query("UPDATE contrato SET Estado = 0 WHERE Id_Contrato = '$id'"); 5 | echo 1; 6 | 7 | 8 | $db->close(); 9 | 10 | 11 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goElimTarea.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['id']); 4 | $sql = $db->query("UPDATE tarea SET Estado = 0 WHERE Id_tarea = '$id'"); 5 | echo 1; 6 | 7 | 8 | $db->close(); 9 | 10 | 11 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goEliminarCont.php: -------------------------------------------------------------------------------- 1 | query("UPDATE contacto_cliente SET Estado = 0 WHERE Id_Contacto = '$id'"); 5 | 6 | 7 | echo 1; 8 | 9 | 10 | $db->close(); 11 | 12 | 13 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goEliminarCuent.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['id']); 4 | $sql = $db->query("UPDATE cuenta_cliente SET Estado = 0 WHERE Id_Cuenta = '$id'"); 5 | echo 1; 6 | 7 | 8 | $db->close(); 9 | 10 | 11 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goEliminarEmp.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['id']); 4 | $sql = $db->query("UPDATE empleados SET Estado = 0 WHERE Id_empleados = '$id'"); 5 | echo 1; 6 | 7 | 8 | $db->close(); 9 | 10 | 11 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goEmpleado.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['nombre']); 6 | $apellido=$db->real_escape_string($_POST['apellido']); 7 | $email=$db->real_escape_string($_POST['email']); 8 | $cedula=$db->real_escape_string($_POST['cedula']); 9 | $cargo=$db->real_escape_string($_POST['cargo']); 10 | $id= $_SESSION['app_id']; 11 | //se ejecuta la sentencia 12 | $sql = $db->query("SELECT Email FROM empleados WHERE Email = '$email' LIMIT 1;"); 13 | 14 | if ($db->rows($sql) == 0) { 15 | $pass = strtoupper(substr(sha1(time()),0,8)); 16 | $pass2 = Encrypt($pass); 17 | $mail = new PHPMailer(true); // Passing `true` enables exceptions 18 | //Server settings 19 | $mail->CharSet = "UTF-8"; 20 | $mail->Encoding = "quoted-printable"; 21 | $mail->SMTPDebug = 0; // Enable verbose debug output 22 | $mail->isSMTP(); // Set mailer to use SMTP 23 | $mail->Host = PHPMAILER_HOST; // Specify main and backup SMTP servers 24 | $mail->SMTPAuth = true; // Enable SMTP authentication 25 | $mail->Username = PHPMAILER_USER; // SMTP username 26 | $mail->Password = PHPMAILER_PASS; // SMTP password 27 | $mail->SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted 28 | $mail->Port = PHPMAILER_PORT; // TCP port to connect to 29 | 30 | //Recipients 31 | $mail->setFrom(PHPMAILER_USER, APP_TITLE); //quien manda ? 32 | 33 | $mail->addAddress($email, $nombre); // aquien le llega? 34 | 35 | //Content 36 | $mail->isHTML(true); // Set email format to HTML 37 | $mail->Subject = 'Inicio de Sesion ADG CRM'; 38 | $mail->Body = AgEmpleado($nombre,$pass) ; 39 | $mail->AltBody = 'Hola, '.$nombre.'Usted a sido agreagado en ADG CRM'; 40 | 41 | if (!$mail->send()) { 42 | // code... 43 | $html = ''; 44 | }else{ 45 | $db -> query("INSERT INTO empleados (Nombre, Apellido, Email, Cedula, Password, Cargo, fk_Id_usuario) VALUES ('$nombre', '$apellido', '$email', '$cedula', '$pass2', '$cargo', '$id')"); 46 | echo 1; 47 | $sql_2 = $db -> query("SELECT MAX(Id_empleados) AS Id_empleados FROM empleados;"); 48 | 49 | $id2 = $db -> recorrer($sql_2)[0]; 50 | $db -> liberar($sql_2); 51 | $db ->query("INSERT INTO usuariopost (Nombre, Apellido, fk_Id_empleados ) VALUES ('$nombre', '$apellido', '$id2')"); 52 | } 53 | } 54 | 55 | 56 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goLogin.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['user_login']); 6 | $pass=Encrypt($_POST['pass_login']); 7 | $sql = $db->query("SELECT Id_Usuario FROM usuarios WHERE Email='$user' AND Password ='$pass' LIMIT 1"); 8 | if ($db->rows($sql)>0) { 9 | //si la consulta dio resultado 10 | 11 | //Si se chequeó la casilla de recordar usuario: 12 | /*if ($_POST['session_login']){ 13 | //se crea una cookie de sesión: 14 | setcookie('app_id', time() -86400 ); 15 | }*/ 16 | $_SESSION['app_id'] = $db->recorrer($sql)[0]; 17 | //Pongo echo 1 para que ajax lo tome como un success y me redireccione al dashboard 18 | echo 1; 19 | 20 | }else{ 21 | echo '
22 | 23 |

Alerta!!

24 |

Las credenciales no coinciden.

25 |
'; 26 | 27 | } 28 | $db->liberar($sql); 29 | $db->close(); 30 | ?> 31 | -------------------------------------------------------------------------------- /core/bin/ajax/goLoginEmp.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['user_login']); 5 | $pass=Encrypt($_POST['pass_login']); 6 | $sql = $db->query("SELECT Id_empleados FROM empleados WHERE Email='$user' AND Password ='$pass' LIMIT 1"); 7 | if ($db->rows($sql)>0) { 8 | //si la consulta dio resultado 9 | 10 | //Si se chequeó la casilla de recordar usuario: 11 | /*if ($_POST['session_login']){ 12 | //se crea una cookie de sesión: 13 | ini_set('session.cookie_lifetime', 1800 ); 14 | }*/ 15 | $_SESSION['app_idemp'] = $db->recorrer($sql)[0]; 16 | //Pongo echo 1 para que ajax lo tome como un success y me redireccione al dashboard 17 | echo 1; 18 | 19 | }else{ 20 | echo '
21 | 22 |

Alerta!!

23 |

Las credenciales no coinciden.

24 |
'; 25 | 26 | 27 | } 28 | $db->liberar($sql); 29 | $db->close(); 30 | 31 | 32 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goLostpass.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['email']); 7 | $sql = $db->query("SELECT * FROM usuarios WHERE Email = '$email'"); 8 | 9 | if($db->rows($sql)>0){ 10 | $data = $db -> recorrer($sql); 11 | $id = $data[0]; 12 | $nombre = $data[1]; 13 | 14 | $codigo = strtoupper(substr(sha1(time()),0,8)); 15 | $link = APP_URL .'?view=restpass&codigo='. $codigo; 16 | 17 | $mail = new PHPMailer(true); // Passing `true` enables exceptions 18 | //Server settings 19 | $mail->CharSet = "UTF-8"; 20 | $mail->Encoding = "quoted-printable"; 21 | $mail->SMTPDebug = 0; // Enable verbose debug output 22 | $mail->isSMTP(); // Set mailer to use SMTP 23 | $mail->Host = PHPMAILER_HOST; // Specify main and backup SMTP servers 24 | $mail->SMTPAuth = true; // Enable SMTP authentication 25 | $mail->Username = PHPMAILER_USER; // SMTP username 26 | $mail->Password = PHPMAILER_PASS; // SMTP password 27 | $mail->SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted 28 | $mail->Port = PHPMAILER_PORT; // TCP port to connect to 29 | 30 | //Recipients 31 | $mail->setFrom(PHPMAILER_USER, APP_TITLE); //quien manda ? 32 | 33 | $mail->addAddress($email, $nombre); // aquien le llega? 34 | 35 | //Content 36 | $mail->isHTML(true); // Set email format to HTML 37 | $mail->Subject = 'Recuperar contraseña perdida'; 38 | $mail->Body = Lostpasstemplate($nombre,$link, $codigo); 39 | $mail->AltBody = 'Hola, '.$nombre.' para recuperar tu contraseña debes ir a este enlace :)' .$link . 'si no lo ha solicitado obvie este mensaje'; 40 | 41 | if (!$mail->send()) { 42 | // code... 43 | $html = ''; 44 | }else{ 45 | $db -> query("UPDATE usuarios SET Codigo = '$codigo' WHERE Id_usuario = '$id';"); 46 | $html=1; 47 | } 48 | 49 | //LostpassTemplate($nombre,$link); 50 | 51 | }else{ 52 | $html = '
53 | 54 |

Error!

55 |

El correo solicitado no se encuentra favor y ingrese uno valido :]

56 |
'; 57 | 58 | 59 | } 60 | 61 | 62 | 63 | 64 | $db ->liberar($sql); 65 | $db->close(); 66 | 67 | echo $html; 68 | 69 | 70 | 71 | ?> 72 | 73 | -------------------------------------------------------------------------------- /core/bin/ajax/goMensaje.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['asunto']); 10 | $Descripcion = $db->real_escape_string($_POST['descripcion']); 11 | $contacto = $_POST['cliente']; 12 | 13 | 14 | 15 | $sql = $db->query("SELECT Email, Nombre, Apellido FROM contacto_cliente WHERE Id_Contacto = '$contacto' LIMIT 1;"); 16 | 17 | if ($db->rows($sql)>0) { 18 | 19 | $data = $db -> recorrer($sql); 20 | $email = $data[0]; 21 | $nombreCom = $data[1].' '.$data[2]; 22 | 23 | 24 | 25 | $mail = new PHPMailer(true); // Passing `true` enables exceptions 26 | //Server settings 27 | $mail->CharSet = "UTF-8"; 28 | $mail->Encoding = "quoted-printable"; 29 | $mail->SMTPDebug = 0; // Enable verbose debug output 30 | $mail->isSMTP(); // Set mailer to use SMTP 31 | $mail->Host = PHPMAILER_HOST; // Specify main and backup SMTP servers 32 | $mail->SMTPAuth = true; // Enable SMTP authentication 33 | $mail->Username = PHPMAILER_USER; // SMTP username 34 | $mail->Password = PHPMAILER_PASS; // SMTP password 35 | $mail->SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted 36 | $mail->Port = PHPMAILER_PORT; // TCP port to connect to 37 | 38 | //Recipients 39 | $mail->setFrom(PHPMAILER_USER, APP_TITLE); //quien manda ? 40 | 41 | $mail->addAddress($email, $nombreCom); // aquien le llega? 42 | 43 | //Content 44 | $mail->isHTML(true); // Set email format to HTML 45 | $mail->Subject = $asunto; 46 | $mail->Body = $Descripcion; 47 | $mail->AltBody = $email; 48 | 49 | if (!$mail->send()) { 50 | //si no mando el correo entonces imprime el error 51 | $html = ''; 52 | } 53 | else { 54 | 55 | /* $db -> query("INSERT INTO contrato(Nombre_Cont, Tipo, Cantidad, Fecha_close, Descripcion, CodigoConf, fk_Id_usuario, fk_id_Contacto, fk_id_campain) VALUES ('$nombre', '$tipo_contrato', '$Cantidad', '$fecha_C', '$Descripcion', '$codigo', '$id', '$contacto', '$campana')");*/ 56 | $db -> query("INSERT INTO bandeja values(1, '$id')"); 57 | 58 | 59 | echo 1; 60 | 61 | } 62 | 63 | 64 | 65 | } else{ 66 | 67 | echo "Lo siento tenemos problemas contacta a soporte"; 68 | } 69 | 70 | 71 | 72 | 73 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goModCuent.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['id']); 6 | $nombre = $db->real_escape_string($_POST['nombre']); 7 | $no_cuenta = $db->real_escape_string($_POST['no_cuenta']); 8 | $tipo_cuenta = $db->real_escape_string($_POST['tipo_cuenta']); 9 | $ingreso = $db->real_escape_string($_POST['ingreso']); 10 | $telefono = $db->real_escape_string($_POST['telefono']); 11 | $fax = $db->real_escape_string($_POST['fax']); 12 | $sitio_web = $db->real_escape_string($_POST['sitio_web']); 13 | $direccion = $db->real_escape_string($_POST['direccion']); 14 | $codigo_postal = $db->real_escape_string($_POST['codigo_postal']); 15 | $descripcion = $db->real_escape_string($_POST['descripcion']); 16 | 17 | $db -> query("UPDATE cuenta_cliente SET Nombre = '$nombre', Numero_cuenta = '$no_cuenta', Tipo_cuenta = '$tipo_cuenta', Ingreso_anual = '$ingreso', Telefono = '$telefono', Fax = '$fax', Website = '$sitio_web', Direccion = '$direccion', Codigo_postal = '$codigo_postal', Descripcion = '$descripcion' WHERE Id_Cuenta = '$id'"); 18 | 19 | echo 1; 20 | 21 | 22 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goModifCampana.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['nombre']); 7 | $estatus = $_POST['estatus']; 8 | $fechai = $_POST['fechai']; 9 | $fechaf = $_POST['fechaf']; 10 | $recaudacion = $_POST['recaudacion']; 11 | $descripcion =$_POST['descripcion']; 12 | 13 | $db -> query("UPDATE campain SET Nombre = '$nombre', Estado = '$estatus', Fecha_start = '$fechai', Fecha_close = '$fechaf', Recaudacion = '$recaudacion', Descripcion = '$descripcion' WHERE id_campain = '$id' "); 14 | 15 | echo 1; 16 | 17 | $db->close(); 18 | 19 | 20 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goModifContrato.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['nombre']); 8 | $tipo = $db->real_escape_string($_POST['tipo']); 9 | 10 | $fechaf =$db->real_escape_string( $_POST['fechaf']); 11 | $cantidad = $_POST['cantidad']; 12 | $descripcion = $db->real_escape_string($_POST['descripcion']); 13 | 14 | $db -> query("UPDATE contrato SET Nombre_Cont = '$nombre', Tipo = '$tipo', Fecha_close = '$fechaf', Cantidad = '$cantidad', Descripcion = '$descripcion' WHERE Id_Contrato = '$id'"); 15 | echo 1; 16 | 17 | $db ->close(); 18 | 19 | 20 | 21 | 22 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goModificarEmp.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['id']); 7 | $nombre = $db->real_escape_string($_POST['nombre']); 8 | $apellido = $db->real_escape_string($_POST['apellido']); 9 | $email = $db->real_escape_string($_POST['email']); 10 | $cedula = $db->real_escape_string($_POST['cedula']); 11 | $cargo = $db->real_escape_string($_POST['cargo']); 12 | 13 | $db -> query("UPDATE empleados SET Nombre = '$nombre', Apellido = '$apellido', Email = '$email', cedula ='$cedula', cargo= '$cargo' WHERE Id_empleados = '$id'"); 14 | 15 | echo 1; 16 | 17 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goModificarPerfil.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['nombre']); 9 | $apellido = $db->real_escape_string($_POST['apellido']); 10 | $pais =$db->real_escape_string( $_POST['pais']); 11 | $email =$db->real_escape_string( $_POST['email']); 12 | $telefono = $db->real_escape_string($_POST['telefono']); 13 | $celular = $db->real_escape_string($_POST['celular']); 14 | $dominio = $db->real_escape_string($_POST['dominio']); 15 | $cargo = $db->real_escape_string($_POST['cargo']); 16 | 17 | $db -> query("UPDATE usuarios SET Nombre = '$nombre', Apellido = '$apellido', Email = '$email', Pais ='$pais', Dominio = '$dominio', Cargo = '$nombre', telefono = '$telefono', Celular = '$celular' WHERE Id_usuario = '$id'"); 18 | echo 1; 19 | 20 | 21 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goOferta.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['nombre']); 10 | $precio = $db->real_escape_string($_POST['precio']); 11 | $cantidad = $db->real_escape_string($_POST['cantidad']); 12 | $descuento = $db->real_escape_string($_POST['descuento']); 13 | $descripcionven = $db->real_escape_string($_POST['descripcionven']); 14 | $bonus = $db->real_escape_string($_POST['bonus']); 15 | $fechafin = $db->real_escape_string($_POST['fechafin']); 16 | $descripciongara = $db->real_escape_string($_POST['descripciongara']); 17 | $contacto = $db->real_escape_string($_POST['contacto']); 18 | $id_usuario = $_SESSION['app_id']; 19 | 20 | $sql = $db -> query("SELECT Email, Nombre, Apellido FROM contacto_cliente WHERE Id_Contacto = '$contacto' LIMIT 1"); 21 | 22 | if ($db ->rows($sql)) { 23 | $codigo = strtoupper(substr(sha1(time()),0,8)); 24 | $link = APP_URL. '?view=aceptarofert&codigo='.$codigo; 25 | $link2 = APP_URL. '?view=aceptarofert&no=1&codigo='.$codigo; 26 | 27 | $datos = $db ->recorrer($sql); 28 | 29 | $email = $datos[0]; 30 | 31 | $nombreCom = $datos[1].' '.$datos[2]; 32 | 33 | 34 | $mail = new PHPMailer(true); // Passing `true` enables exceptions 35 | //Server settings 36 | $mail->CharSet = "UTF-8"; 37 | $mail->Encoding = "quoted-printable"; 38 | $mail->SMTPDebug = 0; // Enable verbose debug output 39 | $mail->isSMTP(); // Set mailer to use SMTP 40 | $mail->Host = PHPMAILER_HOST; // Specify main and backup SMTP servers 41 | $mail->SMTPAuth = true; // Enable SMTP authentication 42 | $mail->Username = PHPMAILER_USER; // SMTP username 43 | $mail->Password = PHPMAILER_PASS; // SMTP password 44 | $mail->SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted 45 | $mail->Port = PHPMAILER_PORT; // TCP port to connect to 46 | 47 | //Recipients 48 | $mail->setFrom(PHPMAILER_USER, APP_TITLE); //quien manda ? 49 | 50 | $mail->addAddress($email, $nombreCom); // aquien le llega? 51 | 52 | //Content 53 | $mail->isHTML(true); // Set email format to HTML 54 | $mail->Subject = 'Oferta CRM'; 55 | $mail->Body = OfertaTemple($nombreCom,$link,$link2,$nombre, $descripcionven, $bonus, $descripciongara, $fechafin, $precio, $descuento, $cantidad); 56 | $mail->AltBody = 'Nada por ahora'; 57 | 58 | if (!$mail->send()) { 59 | //si no mando el correo entonces imprime el error 60 | $html = ''; 61 | } 62 | else { 63 | 64 | $db -> query("INSERT INTO ofertas (NombrePro, Precio, Cantidad, Descuento, DescripcionVenta, Bonus, DescripcionGarantia, FechaFin, fk_Id_Contacto, CodigoConf, fk_Id_usuario) VALUES ('$nombre', '$precio', '$cantidad', '$descuento', '$descripcionven', '$bonus', '$descripciongara', '$fechafin', '$contacto', '$codigo', '$id_usuario')"); 65 | 66 | echo 1; 67 | 68 | } 69 | 70 | 71 | 72 | 73 | # code... 74 | }else{ 75 | echo "Tenemos Problemas En encontrar el email"; 76 | } 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goPublicar.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['nombre']); 6 | $apellido=$db->real_escape_string($_POST['apellido']); 7 | $id =$db->real_escape_string($_POST['id']); 8 | 9 | $mensaje = $db->real_escape_string($_POST['mensaje']); 10 | 11 | $db ->query("INSERT INTO chat (Nombre, Apellido, Mensaje, fk_Id_usuarios) value ('$nombre','$apellido', '$mensaje', '$id')"); 12 | 13 | echo ""; 14 | 15 | 16 | 17 | 18 | 19 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goRecuperarContacto.php: -------------------------------------------------------------------------------- 1 | query("UPDATE contacto_cliente SET Estado = 1 WHERE Id_Contacto = '$id';"); 10 | echo 1; 11 | 12 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goRecuperarCuenta.php: -------------------------------------------------------------------------------- 1 | query("UPDATE cuenta_cliente SET Estado = 1 WHERE Id_Cuenta = '$id';"); 11 | echo 1; 12 | 13 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goResponder.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['nombre']); 7 | $apellido=$db->real_escape_string($_POST['apellido']); 8 | $id =$db->real_escape_string($_POST['id']); 9 | 10 | $mensaje = $db->real_escape_string($_POST['mensaje']); 11 | 12 | $db ->query("INSERT INTO chat (Nombre, Apellido, Mensaje, fk_Id_usuarios) value ('$nombre','$apellido', '$mensaje', '$id')"); 13 | 14 | echo ""; 15 | 16 | $db->close(); 17 | 18 | 19 | 20 | 21 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goRest.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['pass1'])); 8 | $codigo = $db->real_escape_string($_POST['codigo']); 9 | $sql = $db->query("SELECT * FROM usuarios WHERE Codigo = '$codigo' LIMIT 1"); 10 | if ($db->rows($sql) > 0) { 11 | $data = $db -> recorrer($sql); 12 | $nombre = $data[1]; 13 | $email = $data[3]; 14 | 15 | 16 | 17 | 18 | $mail = new PHPMailer(true); // Passing `true` enables exceptions 19 | //Server settings 20 | $mail->CharSet = "UTF-8"; 21 | $mail->Encoding = "quoted-printable"; 22 | $mail->SMTPDebug = 0; // Enable verbose debug output 23 | $mail->isSMTP(); // Set mailer to use SMTP 24 | $mail->Host = PHPMAILER_HOST; // Specify main and backup SMTP servers 25 | $mail->SMTPAuth = true; // Enable SMTP authentication 26 | $mail->Username = PHPMAILER_USER; // SMTP username 27 | $mail->Password = PHPMAILER_PASS; // SMTP password 28 | $mail->SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted 29 | $mail->Port = PHPMAILER_PORT; // TCP port to connect to 30 | 31 | //Recipients 32 | $mail->setFrom(PHPMAILER_USER, APP_TITLE); //quien manda ? 33 | 34 | $mail->addAddress($email, $nombre); // aquien le llega? 35 | 36 | //Content 37 | $mail->isHTML(true); // Set email format to HTML 38 | $mail->Subject = 'Cambio de contraseña'; 39 | $mail->Body = CambiopassTemplate($nombre); 40 | $mail->AltBody = 'probando'; 41 | if (!$mail->send()) { 42 | $html = ''; 43 | }else { 44 | $db -> query("UPDATE usuarios SET Password = '$pass', Codigo = '' WHERE Codigo = '$codigo';"); 45 | $sql_2 = $db -> query("SELECT Id_usuario FROM usuarios WHERE Codigo = '$codigo'"); 46 | $db -> liberar($sql_2); 47 | 48 | echo 1; 49 | } 50 | 51 | 52 | 53 | $db->liberar($sql); 54 | $db->close(); 55 | 56 | 57 | }else{ 58 | echo '
59 | 60 |

Error!

61 |

Intentelo mas tarde..

62 |
'; 63 | 64 | } 65 | 66 | 67 | 68 | ?> -------------------------------------------------------------------------------- /core/bin/ajax/goTarea.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['asunto']); 5 | $descripcion = $db->real_escape_string($_POST['descripcion']); 6 | $prioridad = $db->real_escape_string($_POST['altaprioridad']); 7 | $responsables = $_POST['responsables']; 8 | $fechalimite = $_POST['fechalimite']; 9 | //$curso = $db->real_escape_string($_POST['curso']); 10 | $fk_Id_usuario = $_SESSION['app_id']; 11 | //se ejecuta la sentencia 12 | 13 | 14 | $db -> query("INSERT INTO tarea (Asunto, Descripcion, Altaprioridad, Personasresponsable, Fechalimite, fk_id_usuario) VALUES ('$asunto', '$descripcion', '$prioridad', '$responsables', '$fechalimite', '$fk_Id_usuario')"); 15 | echo 1; 16 | 17 | $db->close(); 18 | ?> -------------------------------------------------------------------------------- /core/bin/functions/Encrypt.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/bin/functions/contactodatos.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM contacto_cliente WHERE fk_Id_usuario = '$id_usuario' "); 7 | if ($db->rows($sql)>0) { 8 | while ($d = $db->recorrer($sql)) { 9 | $users[$d['Id_Contacto']]= array( 10 | 'id' => $d['Id_contacto'], 11 | 'nombre' => $d['Nombre'], 12 | 'apellido'=> $d['Apellido'], 13 | 'cuenta'=> $d['Cuenta'], 14 | 'email'=> $d['Email'], 15 | 'telefono'=> $d['Telefono'], 16 | 'telefono_ex'=> $d['Telefono_ex'], 17 | 'celular'=> $d['Celular'], 18 | 'fuente'=> $d['Fuente'] 19 | ); 20 | # code... 21 | } 22 | # code... 23 | }else{ 24 | $contacto = false; 25 | } 26 | $db->liberar($sql); 27 | $db->close(); 28 | return $users; 29 | }*/ 30 | ?> 31 | -------------------------------------------------------------------------------- /core/bin/functions/emp.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM empleados"); 6 | if ($db->rows($sql)>0) { 7 | while ($d = $db->recorrer($sql)) { 8 | $emp[$d['Id_empleados']]= array( 9 | 'id' => $d['Id_empleados'], 10 | 'nombre' => $d['Nombre'], 11 | 'apellido'=> $d['Apellido'], 12 | 'email'=> $d['Email'], 13 | 'cargo'=> $d['Cargo'], 14 | 'permiso'=> $d['Permiso'], 15 | 'fk_usu' => $d['fk_Id_usuario'] 16 | 17 | ); 18 | # code... 19 | } 20 | # code... 21 | }else{ 22 | $emp = false; 23 | } 24 | $db->liberar($sql); 25 | $db->close(); 26 | return $emp; 27 | } 28 | ?> 29 | -------------------------------------------------------------------------------- /core/bin/functions/user.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM usuarios"); 6 | if ($db->rows($sql)>0) { 7 | while ($d = $db->recorrer($sql)) { 8 | $users[$d['Id_usuario']]= array( 9 | 'id' => $d['Id_usuario'], 10 | 'nombre' => $d['Nombre'], 11 | 'apellido'=> $d['Apellido'], 12 | 'email'=> $d['Email'], 13 | 'pais'=> $d['Pais'], 14 | 'dominio'=> $d['Dominio'], 15 | 'cargo'=> $d['Cargo'], 16 | 'telefono'=> $d['Telefono'], 17 | 'celular'=> $d['Celular'], 18 | 'permiso'=> $d['Permiso'] 19 | ); 20 | # code... 21 | } 22 | # code... 23 | }else{ 24 | $users = false; 25 | } 26 | $db->liberar($sql); 27 | $db->close(); 28 | return $users; 29 | } 30 | ?> 31 | -------------------------------------------------------------------------------- /core/controllers/LostpassController.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_GET['email']); 7 | $sql = $db->query("SELECT Id_Usuario ,new_pass FROM usuarios WHERE keypass= '$keypass' LIMIT 1"); 8 | 9 | if($db->rows($sql) > 0){ 10 | $data = $db->recorrer($sql); 11 | $id_user = $data[0]; 12 | $new_pass = Encrypt($data[1]); 13 | $password =$data[1]; 14 | $sql=$db->query("UPDATE usuarios SET keypass= '', new_pass='', Password='$new_pass' WHERE Id_Usuario= $id_user;"); 15 | if ($sql==true) { 16 | include 'html/lostpass_mensaje.php'; 17 | }else{ 18 | echo "nooop"; 19 | } 20 | 21 | 22 | 23 | }else{ 24 | header("location: ?view=index"); 25 | } 26 | 27 | $db->liberar($sql); 28 | $db->close(); 29 | }else{ 30 | header('location: ?view=index'); 31 | } 32 | 33 | 34 | 35 | 36 | ?> 37 | -------------------------------------------------------------------------------- /core/controllers/aceptarController.php: -------------------------------------------------------------------------------- 1 | query("UPDATE contrato SET Confirmacion = 1, CodigoConf= '' WHERE CodigoConf = '$codigo'"); 12 | require './html/overall/header.php'; 13 | 14 | require './html/public/aceptar.html'; 15 | 16 | }else{ 17 | 18 | $codigo = $_GET['codigo']; 19 | $db -> query("UPDATE contrato SET Confirmacion = 2, CodigoConf= '' WHERE CodigoConf = '$codigo'"); 20 | require './html/overall/header.php'; 21 | require './html/public/NoAcep.html'; 22 | 23 | } 24 | }else{ 25 | 26 | echo "error"; 27 | 28 | 29 | } 30 | 31 | $db->close(); 32 | 33 | 34 | ?> -------------------------------------------------------------------------------- /core/controllers/aceptarofertController.php: -------------------------------------------------------------------------------- 1 | query("SELECT CodigoConf FROM ofertas WHERE CodigoConf = '$codigo'"); 13 | 14 | if ($db ->rows($sql) > 0) { 15 | 16 | if (!isset($_GET['no'])) { 17 | 18 | 19 | 20 | 21 | 22 | $db -> query("UPDATE ofertas SET Confirmacion = 1, CodigoConf= '' WHERE CodigoConf = '$codigo'"); 23 | require './html/overall/header.php'; 24 | 25 | require './html/public/aceptar.html'; 26 | 27 | }else{ 28 | 29 | $codigo = $_GET['codigo']; 30 | $db -> query("UPDATE ofertas SET Confirmacion = 2, CodigoConf= '' WHERE CodigoConf = '$codigo'"); 31 | require './html/overall/header.php'; 32 | require './html/public/NoAcep.html'; 33 | 34 | } 35 | 36 | 37 | 38 | 39 | }else{ 40 | require './html/overall/header.php'; 41 | require './html/public/ofertainvalida.html'; 42 | 43 | 44 | } 45 | 46 | 47 | 48 | 49 | 50 | }else{ 51 | 52 | echo "error"; 53 | 54 | 55 | } 56 | $db->liberar($sql); 57 | $db->close(); 58 | ?> -------------------------------------------------------------------------------- /core/controllers/activarController.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_GET['key']); 6 | $sql = $db -> query("SELECT Id_Usuario FROM usuarios WHERE Id_Usuario = '$id' AND keyreg='$key' LIMIT 1"); 7 | 8 | if ($db->rows($sql)>0) { 9 | $db->query("UPDATE usuarios SET activo=1, keyreg = '' WHERE Id_Usuario='$id'"); 10 | $db -> liberar($sql); 11 | header("location: ?view=dashboard&success=true"); 12 | 13 | $db->close(); 14 | }else { 15 | 16 | $sql = $db -> query("SELECT Id_Usuario FROM usuarios WHERE Id_Usuario = '$id' AND activo= 1 LIMIT 1"); 17 | if ($db->rows($sql)>0) { 18 | $db -> liberar($sql); 19 | $db->close(); 20 | header("location: ?view=dashboard&activa=true"); 21 | 22 | 23 | }else{ 24 | header("location: ?view=dashboard&error=true"); 25 | 26 | } 27 | 28 | 29 | 30 | } 31 | 32 | 33 | }else { 34 | include('html/index/loginactivar.php'); 35 | ?> 36 | 39 | 44 | -------------------------------------------------------------------------------- /core/controllers/codigoController.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/controllers/dashboardController.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/controllers/errorController.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/controllers/indexController.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/controllers/loginempController.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/controllers/logoutController.php: -------------------------------------------------------------------------------- 1 | 2 | 15 | -------------------------------------------------------------------------------- /core/controllers/lostController.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/controllers/regController.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/controllers/restpassController.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/core.php: -------------------------------------------------------------------------------- 1 | 44 | -------------------------------------------------------------------------------- /core/models/Campana.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM campain WHERE EstadoElim = 1"); 6 | 7 | ?> -------------------------------------------------------------------------------- /core/models/Contacto.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/models/Contrato.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LJMartinez07/crm-application-php/195395b2394605fca0b9c63941b725da78df1e6c/core/models/Contrato.php -------------------------------------------------------------------------------- /core/models/Cuenta.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM cuenta_cliente WHERE fk_Id_usuario = '$id_usuario' AND Estado = 1"); 6 | 7 | ?> -------------------------------------------------------------------------------- /core/models/Tarea.php: -------------------------------------------------------------------------------- 1 | query("SELECT tarea.*, empleados.Nombre,empleados.Apellido FROM tarea LEFT JOIN empleados ON tarea.Personasresponsable = empleados.Id_empleados WHERE tarea.fk_id_usuario = '$id' AND tarea.Estado = 1"); 5 | $sqlT = $db -> query("SELECT Id_empleados, Nombre, Apellido FROM empleados WHERE fk_Id_usuario = '$id' AND Estado = 1" ); 6 | 7 | ?> -------------------------------------------------------------------------------- /core/models/TareaEmp.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM tarea WHERE Estado = 1 AND Personasresponsable = '$id'"); 6 | 7 | ?> -------------------------------------------------------------------------------- /core/models/agenda.php: -------------------------------------------------------------------------------- 1 | query("SELECT Id_empleados, Nombre, Apellido FROM empleados WHERE fk_Id_usuario = '$id' AND Estado = 1" ); 8 | $sqltabla = $db->query("SELECT * FROM agenda WHERE fk_Id_usuario = '$id' AND Estado = 1"); 9 | 10 | }elseif(isset($_SESSION['app_idemp'])){ 11 | $id2 = $_SESSION['app_idemp']; 12 | $sqltabla = $db->query("SELECT * FROM agenda WHERE Estado = 1 AND fk_Id_empleado = '$id2'"); 13 | 14 | } 15 | 16 | ?> -------------------------------------------------------------------------------- /core/models/cards.php: -------------------------------------------------------------------------------- 1 | query("SELECT COUNT(*) FROM contacto_cliente WHERE fk_id_usuario = '$id' and Estado = 1 and Tipo = 'Potencial'"); 7 | $sql1 = $db->query("SELECT COUNT(*) FROM contacto_cliente WHERE fk_id_usuario = '$id' and Estado = 1 and tipo = 'Fijo'"); 8 | $sql2 = $db->query("SELECT COUNT(*) FROM contrato WHERE fk_id_usuario = '$id' and Estado = 1"); 9 | $sql3 = $db->query("SELECT COUNT(*) FROM bandeja WHERE fk_id_usuario = '$id'"); 10 | ?> -------------------------------------------------------------------------------- /core/models/class.Conexion.php: -------------------------------------------------------------------------------- 1 | connect_errno ? die('Error en la conexion de la base de datos pp') : null; 12 | $this->set_charset('utf8'); 13 | } 14 | 15 | public function rows($query){ 16 | return mysqli_num_rows($query); 17 | } 18 | public function liberar($query){ 19 | return mysqli_free_result($query); 20 | } 21 | public function recorrer($query){ 22 | return mysqli_fetch_array($query); 23 | } 24 | //public function __destruct(){ 25 | // $this->close(); 26 | //} 27 | } 28 | 29 | 30 | ?> 31 | -------------------------------------------------------------------------------- /core/models/post.php: -------------------------------------------------------------------------------- 1 | query("SELECT post.*, usuarios.Nombre, usuarios.Apellido 7 | FROM post 8 | 9 | LEFT JOIN usuarios ON post.fk_Id_usuario = usuarios.Id_usuario 10 | WHERE post.fk_Id_usuario = '$id' AND usuarios.Id_usuario = '$id' 11 | ORDER BY post.Id_post DESC"); 12 | 13 | 14 | 15 | 16 | ?> -------------------------------------------------------------------------------- /docs/images/Screen Shot 2022-06-06 at 12.36.44 PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LJMartinez07/crm-application-php/195395b2394605fca0b9c63941b725da78df1e6c/docs/images/Screen Shot 2022-06-06 at 12.36.44 PM.png -------------------------------------------------------------------------------- /html/index/Cards.php: -------------------------------------------------------------------------------- 1 | 6 |
7 |
8 |
9 |
10 |
11 | 12 |
13 |
recorrer($sql)[0]; ?> Clientes Potenciales!
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | 22 |
23 |
recorrer($sql1)[0]; ?> Clientes Fijos!
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | 32 |
33 |
recorrer($sql2)[0]; ?> Negociaciones!
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | 42 |
43 |
recorrer($sql3)[0]; ?> Mensajes enviados!
44 |
45 |
46 |
47 |
48 | 49 | liberar($sql); 51 | $db -> liberar($sql2); 52 | $db -> liberar($sql3); 53 | 54 | //$db ->close(); 55 | 56 | ?> -------------------------------------------------------------------------------- /html/index/agendamodal.php: -------------------------------------------------------------------------------- 1 | 83 | 86 | 87 | -------------------------------------------------------------------------------- /html/tablas/tablacampana.php: -------------------------------------------------------------------------------- 1 | 4 |
5 |
6 |
7 | Lista de Campaña 8 |
9 | 10 |
11 |
12 | 13 |
14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | recorrer($sql)){ 33 | $data = $f[0]."||".$f[1]."||".$f[2]."||".$f[3]."||".$f[4]."||".$f[5]."||".$f[7]; 34 | 35 | ?> 36 | 37 | 38 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | liberar($sql); 57 | $db->close(); 58 | ?> 59 | 60 |
NombreEstadoFecha InicioFecha CierreRecaudacionDescripcionActualizarEliminar
39 | 46 |
61 |
62 |
63 | 64 |
65 | 66 | 71 | 72 | -------------------------------------------------------------------------------- /html/tablas/tablacontrato.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 |
6 |
7 | Lista de Negociaciones 8 |
9 |
10 | 11 | 12 | 13 | 14 |
15 | 16 |
17 |
18 |
19 | 20 |
21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | recorrer($sql)){ 42 | $data = $f[0]."||".$f[1]."||".$f[2]."||".$f[3]."||".$f[4]."||".$f[5]; 43 | 44 | ?> 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 64 | 65 | 66 | 67 | 68 | liberar($sql); 71 | $db->close(); 72 | 73 | 74 | ?> 75 | 76 |
Nombre de negociaciónTipoCantidadFecha cierreDescripcionContactoConfirmaciónModificarEliminar
77 |
78 |
79 | 80 |
81 | 82 | 83 |
84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /html/tablas/tablacuenta.php: -------------------------------------------------------------------------------- 1 | 5 |
6 |
7 | Lista de Cuenta 8 |
9 | 10 | 11 | 12 |
13 | 14 | 15 |
16 | 17 |
18 | 19 |
20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | recorrer($sql)){ 41 | $data = $f[0]."||".$f[1]."||".$f[2]."||".$f[3]."||".$f[4]."||".$f[5]."||".$f[6]."||".$f[7]."||".$f[8]."||".$f[9]."||".$f[10]; 42 | 43 | 44 | ?> 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | close();?> 64 | 65 |
NombreNumero de cuentaTipo de cuentaIngresosTelefonoFaxWebsiteDireccionCodigo postalDescripcionActualizarEliminar
66 |
67 |
68 | 69 |
70 | 71 | 76 | 79 | -------------------------------------------------------------------------------- /html/tablas/tablaofertas.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 |
6 |
7 | Lista de ofertas 8 |
9 |
10 | 11 | 12 | 13 | 14 |
15 | 16 |
17 |
18 |
19 | 20 |
21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | recorrer($sql)){ 42 | 43 | 44 | ?> 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 67 | 68 | 69 | 70 | 71 | liberar($sql); 74 | $db->close(); 75 | 76 | 77 | ?> 78 | 79 |
Nombre de productoPrecioCantidadDescuentoDescripcion de ventaFecha FinDescripcion de garantiaContactoConfirmacion
80 |
81 |
82 | 83 |
84 | 85 | 86 |
87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /html/tablas/tablapapelera.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 | Papelera 6 |
7 |
8 | 9 | 10 | 11 |
12 | 13 |
14 |
15 |
16 | 17 |
18 | 19 | 20 |
21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | recorrer($sql)){ 39 | 40 | 41 | ?> 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | liberar($sql); 54 | $db->close(); 55 | ?> 56 | 57 |
NombreApellidoEmailTelefonoCelularTipoRecuperar
58 |
59 |
60 |
61 | 62 |
63 | 64 | -------------------------------------------------------------------------------- /html/tablas/tablatareaemp.php: -------------------------------------------------------------------------------- 1 | 6 |
7 |
8 |
9 | Lista de Tarea 10 | 11 | 12 | 13 |
14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | recorrer($sql)){ 33 | 34 | 35 | ?> 36 | 37 | 40 | 43 | 46 | 49 | 52 | 55 | 61 | 68 | 69 | 70 | 71 | liberar($sql); 73 | $db->close(); ?> 74 | 75 |
AsuntoDescripciónAlta prioridadResponsablesFecha LimiteCursoFinalizar
38 | 39 | 41 | 42 | 44 | 45 | 47 | 48 | 50 | 51 | 53 | 54 | 56 | 59 | 60 |
76 |
77 |
78 | 81 |
-------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /views/app/img/agregar-documentos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LJMartinez07/crm-application-php/195395b2394605fca0b9c63941b725da78df1e6c/views/app/img/agregar-documentos.png -------------------------------------------------------------------------------- /views/app/img/logo (3).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LJMartinez07/crm-application-php/195395b2394605fca0b9c63941b725da78df1e6c/views/app/img/logo (3).png -------------------------------------------------------------------------------- /views/app/js/Campana.js: -------------------------------------------------------------------------------- 1 | function goCampana() { 2 | var connect, form, response, result, nombre, estatus, fechai, fechaf, recaudacion, descripcion ; 3 | nombre = _('nombre').value; 4 | estatus = _('estatus').value; 5 | fechai = _('FechaI').value; 6 | fechaf = _('FechaF').value; 7 | recaudacion = _('recaudacion').value; 8 | descripcion = _('descripcion').value; 9 | if (nombre != "" && estatus != "" && fechai != "" && fechaf != "" && recaudacion != "" && descripcion != "" ) { 10 | form='nombre='+ nombre + '&estatus=' + estatus +'&fechai='+fechai + '&fechaf=' + fechaf +'&recaudacion='+ recaudacion +'&descripcion='+ descripcion; 11 | //Si el navegador es muy viejo, se usa ActiveXObject... de resto, todos los navegadores usan XMLHttpRequest 12 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 13 | //Cuando haya un movimiento, petición, recepción o algo nuevo entre AJAX y PHP 14 | connect.onreadystatechange = function () { 15 | if (connect.readyState == 4 && connect.status ==200) { 16 | //Si todo salió bien.. 17 | if (connect.responseText==1) { 18 | result = ''; 24 | _('_AJAX_CAMPANA_').innerHTML = result; 25 | location.reload(); 26 | 27 | }else{ 28 | _('_AJAX_CAMPANA_').innerHTML = connect.responseText; 29 | } 30 | //Aquí todavía no se ha recibido información de PHP.. así que ponemos a esperar al usuario 31 | }else if (connect.readyState != 4) { 32 | result = '
'; 33 | result += ''; 34 | result += '

Proceso!

'; 35 | result += '

Espere un momento porfavor..

'; 36 | result += '
'; 37 | _('_AJAX_CAMPANA_').innerHTML = result; 38 | } 39 | } 40 | //Enviamos los datos tipo POST, le indicamos que tipo de codificación debe usar con el POST, 41 | //Enviamos el formulario (form) 42 | connect.open('POST', 'ajax.php?mode=campana', true); 43 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 44 | connect.send(form); 45 | 46 | 47 | 48 | }else{ 49 | result = '
'; 50 | result += ''; 51 | result += '

Error!

'; 52 | result += '

Porfavor llena los datos

'; 53 | result += '
'; 54 | _('_AJAX_CAMPANA_').innerHTML = result; 55 | } 56 | 57 | } 58 | function runScriptCampana(e) { 59 | if (e.keyCode == 13) { 60 | goCampana(); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /views/app/js/CuentaDatos.js: -------------------------------------------------------------------------------- 1 | function goCuentaDatos() { 2 | var connect, form, response, result, nombre, no_cuenta, tipo_cuenta, ingreso, telefono, fax, sitio_web, direccion, codigo_postal, descripcion, contacto; 3 | nombre = _('nombre').value; 4 | no_cuenta = _('no_cuenta').value; 5 | tipo_cuenta = _('tipo_cuenta').value; 6 | ingreso = _('ingreso').value; 7 | telefono = _('telefono').value; 8 | fax = _('fax').value; 9 | sitio_web = _('sitio_web').value; 10 | direccion = _('direccion').value; 11 | codigo_postal = _('codigo_postal').value; 12 | descripcion = _('descripcion').value; 13 | contacto = _('contacto').value; 14 | 15 | if (nombre != "" && no_cuenta != "" && tipo_cuenta != "" && ingreso != "" && telefono != "" && sitio_web != "" && direccion != "" && codigo_postal != "") { 16 | form = 'nombre='+ nombre + '&no_cuenta=' + no_cuenta + '&tipo_cuenta=' + tipo_cuenta + '&ingreso=' + ingreso + '&telefono=' + telefono + '&fax=' + fax + '&sitio_web=' + sitio_web + '&direccion=' + direccion + '&codigo_postal=' + codigo_postal + '&descripcion=' + descripcion + '&contacto=' + contacto; 17 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 18 | connect.onreadystatechange = function () { 19 | if (connect.readyState == 4 && connect.status ==200) { 20 | if (connect.responseText==1) { 21 | result = ''; 27 | _('_AJAX_CUENTA_').innerHTML = result; 28 | location.reload(); 29 | 30 | }else{ 31 | _('_AJAX_CUENTA_').innerHTML = connect.responseText; 32 | } 33 | 34 | }else if (connect.readyState != 4) { 35 | result = '
'; 36 | result += ''; 37 | result += '

Proceso!

'; 38 | result += '

Espere un momento porfavor..

'; 39 | result += '
'; 40 | _('_AJAX_CUENTA_').innerHTML = connect.responseText; 41 | 42 | 43 | } 44 | } 45 | connect.open('POST', 'ajax.php?mode=cuentadatos', true); 46 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 47 | connect.send(form); 48 | }else{ 49 | result = '
'; 50 | result += ''; 51 | result += '

Faltan Campos!!

'; 52 | result += '

Favor llenar los campos faltantes que tiene *

'; 53 | result += '
'; 54 | _('_AJAX_CUENTA_').innerHTML = result; 55 | 56 | } 57 | } 58 | 59 | function runScriptCuentaDatos(e) { 60 | if (e.keyCode == 13) { 61 | goCuentaDatos(); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /views/app/js/agenda.js: -------------------------------------------------------------------------------- 1 | function goAgenda() { 2 | var connect, form, response, result, asunto, descripcion, fecha, empleado, fk_id_usuario; 3 | asunto = _('asunto').value; 4 | descripcion = _('descripcion').value; 5 | fecha = _('fecha').value; 6 | empleado = _('empleado').value; 7 | 8 | if (asunto != "" && descripcion != "" && fecha != "") { 9 | form = 'asunto=' + asunto + '&descripcion=' + descripcion + '&fecha=' + fecha + '&empleado=' + empleado; 10 | //Si el navegador es muy viejo, se usa ActiveXObject... de resto, todos los navegadores usan XMLHttpRequest 11 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 12 | //Cuando haya un movimiento, petición, recepción o algo nuevo entre AJAX y PHP 13 | connect.onreadystatechange = function () { 14 | if (connect.readyState == 4 && connect.status ==200) { 15 | //Si todo salió bien.. 16 | if (connect.responseText==1) { 17 | result = ''; 23 | _('_AJAX_ACTIVIDAD_').innerHTML = result; 24 | location.reload(); 25 | 26 | }else{ 27 | _('_AJAX_ACTIVIDAD_').innerHTML = connect.responseText; 28 | } 29 | //Aquí todavía no se ha recibido información de PHP.. así que ponemos a esperar al usuario 30 | }else if (connect.readyState != 4) { 31 | result = '
'; 32 | result += ''; 33 | result += '

Proceso!

'; 34 | result += '

Espere un momento porfavor..

'; 35 | result += '
'; 36 | _('_AJAX_ACTIVIDAD_').innerHTML = result; 37 | } 38 | } 39 | //Enviamos los datos tipo POST, le indicamos que tipo de codificación debe usar con el POST, 40 | //Enviamos el formulario (form) 41 | connect.open('POST', 'ajax.php?mode=agenda', true); 42 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 43 | connect.send(form); 44 | 45 | 46 | 47 | }else{ 48 | result = '
'; 49 | result += ''; 50 | result += '

Error!

'; 51 | result += '

Porfavor llena los datos con el *

'; 52 | result += '
'; 53 | _('_AJAX_ACTIVIDAD_').innerHTML = result; 54 | } 55 | 56 | } 57 | function runScriptAgenda(e) { 58 | if (e.keyCode == 13) { 59 | goAgenda(); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /views/app/js/ajaxemp.js: -------------------------------------------------------------------------------- 1 | function ajaxemp(){ 2 | 3 | var connect, form, response, result, idfk; 4 | idfk = _('id').value; 5 | 6 | form='id='+ idfk; 7 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 8 | 9 | connect.onreadystatechange = function(){ 10 | if (connect.readyState == 4 && connect.status == 200) { 11 | document.getElementById('chat').innerHTML = connect.responseText; 12 | } 13 | } 14 | 15 | connect.open('POST', 'ajax.php?mode=chatemp', true); 16 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 17 | connect.send(form); 18 | } 19 | 20 | setInterval(function(){ajaxemp();}, 4000); 21 | 22 | 23 | -------------------------------------------------------------------------------- /views/app/js/ajaxjs.js: -------------------------------------------------------------------------------- 1 | 2 | function ajax(){ 3 | 4 | var connect, form, response, result; 5 | mensaje = 'naaa'; 6 | 7 | form='mensaje='+ mensaje; 8 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 9 | 10 | connect.onreadystatechange = function(){ 11 | if (connect.readyState == 4 && connect.status == 200) { 12 | document.getElementById('chat').innerHTML = connect.responseText; 13 | } 14 | } 15 | 16 | connect.open('POST', 'ajax.php?mode=chat', true); 17 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 18 | connect.send(form); 19 | } 20 | 21 | setInterval(function(){ajax();}, 4000); 22 | 23 | -------------------------------------------------------------------------------- /views/app/js/animaciones.js: -------------------------------------------------------------------------------- 1 | 2 | $( document ).ready(function() { 3 | console.log( "ready!" ); 4 | $("#js_up").on('click', function (e) { 5 | e.preventDefault(); //evita que se ejecute el tag ancla (valor). 6 | $("body,html").animate({ // aplicamos la función animate a los tags body y html 7 | scrollTop: 0 //al colocar el valor 0 a scrollTop me volverá a la parte inicial de la página 8 | },700); //el valor 700 indica que lo ara en 700 mili segundos 9 | 10 | }); 11 | }); -------------------------------------------------------------------------------- /views/app/js/codigo.js: -------------------------------------------------------------------------------- 1 | function goCodigo() { 2 | var connect, form, response, result, codigo; 3 | codigo = _('codigo').value; 4 | 5 | if (codigo != "") { 6 | form='codigo='+ codigo; 7 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 8 | connect.onreadystatechange = function () { 9 | if (connect.readyState == 4 && connect.status ==200) { 10 | if (connect.responseText==1) { 11 | result = ''; 17 | _('_AJAX_CODIGO_').innerHTML = result; 18 | window.location.href="?view=restpass&codigo="+codigo; 19 | //location.reload(); 20 | 21 | }else{ 22 | _('_AJAX_CODIGO_').innerHTML = connect.responseText; 23 | } 24 | 25 | }else if (connect.readyState != 4) { 26 | result = '
'; 27 | result += ''; 28 | result += '

Proceso!

'; 29 | result += '

Espere un momento porfavor..

'; 30 | result += '
'; 31 | _('_AJAX_CODIGO_').innerHTML = result; 32 | 33 | 34 | } 35 | } 36 | connect.open('POST', 'ajax.php?mode=codigo', true); 37 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 38 | connect.send(form); 39 | }else{ 40 | result = '
'; 41 | result += ''; 42 | result += '

Alerta!!

'; 43 | result += '

Inserte un codigo

'; 44 | result += '
'; 45 | _('_AJAX_CODIGO_').innerHTML = result; 46 | 47 | } 48 | } 49 | 50 | function runScriptCodigo(e) { 51 | if (e.keyCode == 13) { 52 | goCodigo(); 53 | } 54 | // body... 55 | } -------------------------------------------------------------------------------- /views/app/js/contacto.js: -------------------------------------------------------------------------------- 1 | function goContacto() { 2 | var connect, form, response, result, nombre, apellido, cuenta, email, telefono, telefono2, celular, fuente, tipo; 3 | nombre = _('nombre').value; 4 | apellido= _('apellido').value; 5 | cuenta= _('cuenta').value; 6 | email= _('email').value; 7 | telefono= _('telefono').value; 8 | telefono2= _('telefono2').value; 9 | celular= _('celular').value; 10 | fuente= _('fuente').value; 11 | tipo= _('tipo').value; 12 | 13 | if (/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i.test(email)) { 14 | _('checkemail').innerHTML = ''; 15 | if (tipo != "" && nombre != "" && apellido != "" && email != "" && telefono != "") { 16 | form='nombre='+ nombre + '&apellido=' + apellido +'&cuenta='+cuenta + '&email=' + email +'&telefono='+telefono +'&telefono2='+telefono2 + '&celular=' + celular +'&fuente='+fuente +'&tipo=' +tipo; 17 | //Si el navegador es muy viejo, se usa ActiveXObject... de resto, todos los navegadores usan XMLHttpRequest 18 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 19 | //Cuando haya un movimiento, petición, recepción o algo nuevo entre AJAX y PHP 20 | connect.onreadystatechange = function () { 21 | if (connect.readyState == 4 && connect.status ==200) { 22 | //Si todo salió bien.. 23 | if (connect.responseText==1) { 24 | result = ''; 30 | _('_AJAX_CONTACTO_').innerHTML = result; 31 | location.reload(); 32 | 33 | }else{ 34 | _('_AJAX_CONTACTO_').innerHTML = connect.responseText; 35 | } 36 | //Aquí todavía no se ha recibido información de PHP.. así que ponemos a esperar al usuario 37 | }else if (connect.readyState != 4) { 38 | result = '
'; 39 | result += ''; 40 | result += '

Proceso!

'; 41 | result += '

Espere un momento porfavor..

'; 42 | result += '
'; 43 | _('_AJAX_CONTACTO_').innerHTML = result; 44 | } 45 | } 46 | //Enviamos los datos tipo POST, le indicamos que tipo de codificación debe usar con el POST, 47 | //Enviamos el formulario (form) 48 | connect.open('POST', 'ajax.php?mode=contacto', true); 49 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 50 | connect.send(form); 51 | 52 | 53 | 54 | }else{ 55 | result = '
'; 56 | result += ''; 57 | result += '

Error!

'; 58 | result += '

Porfavor llena los datos con el *

'; 59 | result += '
'; 60 | _('_AJAX_CONTACTO_').innerHTML = result; 61 | } 62 | 63 | }else{ 64 | _('checkemail').innerHTML = 'Favor de ingresar un email valido'; 65 | } 66 | 67 | } 68 | function runScriptContacto(e) { 69 | if (e.keyCode == 13) { 70 | goContacto(); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /views/app/js/contrato.js: -------------------------------------------------------------------------------- 1 | function goContrato() { 2 | var connect, form, response, result, nombre, tipo_contrato, cantidad_D, fechaC, Descripcion, contacto, campana; 3 | 4 | nombre = _('nombre').value; 5 | tipo_contrato = _('T_contrato').value; 6 | cantidad_D = _('cantidad').value; 7 | fechaC = _('fechaC').value; 8 | Descripcion = _('descripcion').value; 9 | contacto = _('contacto').value; 10 | campana = _('campana').value; 11 | 12 | if (nombre != "", tipo_contrato != "" && cantidad_D != "" && fechaC != "" && campana != "" && Descripcion !="") { 13 | form= 'nombre=' + nombre + '&tipo_contrato=' + tipo_contrato + '&cantidad_D=' + cantidad_D + '&fechaC=' + fechaC + '&Descripcion=' + Descripcion + '&contacto=' + contacto+ '&campana=' + campana; 14 | //Si el navegador es muy viejo, se usa ActiveXObject... de resto, todos los navegadores usan XMLHttpRequest 15 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 16 | //Cuando haya un movimiento, petición, recepción o algo nuevo entre AJAX y PHP 17 | connect.onreadystatechange = function () { 18 | if (connect.readyState == 4 && connect.status ==200) { 19 | //Si todo salió bien.. 20 | if (connect.responseText==1) { 21 | result = ''; 27 | _('_AJAX_CONTRATO_').innerHTML = result; 28 | location.reload(); 29 | 30 | }else{ 31 | _('_AJAX_CONTRATO_').innerHTML = connect.responseText; 32 | } 33 | //Aquí todavía no se ha recibido información de PHP.. así que ponemos a esperar al usuario 34 | }else if (connect.readyState != 4) { 35 | result = '
'; 36 | result += ''; 37 | result += '

Proceso!

'; 38 | result += '

Espere un momento porfavor..

'; 39 | result += '
'; 40 | _('_AJAX_CONTRATO_').innerHTML = result; 41 | } 42 | } 43 | //Enviamos los datos tipo POST, le indicamos que tipo de codificación debe usar con el POST, 44 | //Enviamos el formulario (form) 45 | connect.open('POST', 'ajax.php?mode=contrato', true); 46 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 47 | connect.send(form); 48 | 49 | 50 | 51 | }else{ 52 | result = '
'; 53 | result += ''; 54 | result += '

Error!

'; 55 | result += '

Porfavor llena los datos

'; 56 | result += '
'; 57 | _('_AJAX_CONTRATO_').innerHTML = result; 58 | } 59 | 60 | } 61 | function runScriptContrato(e) { 62 | if (e.keyCode == 13) { 63 | goContrato(); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /views/app/js/empleados.js: -------------------------------------------------------------------------------- 1 | function goEmpleados() { 2 | var connect, form, response, result, nombre, apellido, email, pass, cedula, cargo; 3 | nombre = _('nombre_ae').value; 4 | apellido = _('apellido_ae').value; 5 | email = _('email_ae').value; 6 | //pass = _('pass_ae').value; 7 | cedula = _('cedula_ae').value; 8 | cargo = _('cargo_ae').value; 9 | 10 | if (/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i.test(email)) { 11 | _('checkemail').innerHTML = ''; 12 | if (cedula.length == 11 ) { 13 | 14 | if (email!='' && cedula!= '' && nombre!='' && apellido!= '') { 15 | form = 'nombre=' + nombre + '&apellido=' + apellido + '&email=' + email + '&cedula=' + cedula + '&cargo=' + cargo; 16 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 17 | connect.onreadystatechange = function () { 18 | if (connect.readyState == 4 && connect.status ==200) { 19 | if (connect.responseText==1) { 20 | result = ''; 26 | _('_AJAX_EMPLEADO32_').innerHTML = result; 27 | location.reload(); 28 | 29 | }else{ 30 | _('_AJAX_EMPLEADO32_').innerHTML = connect.responseText; 31 | } 32 | 33 | }else if (connect.readyState != 4) { 34 | result = '
'; 35 | result += ''; 36 | result += '

Proceso!

'; 37 | result += '

Espere un momento porfavor..

'; 38 | result += '
'; 39 | _('_AJAX_EMPLEADO32_').innerHTML = result; 40 | 41 | 42 | } 43 | } 44 | connect.open('POST', 'ajax.php?mode=empleado', true); 45 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 46 | connect.send(form); 47 | 48 | 49 | }else{ 50 | result = '
'; 51 | result += ''; 52 | result += '

Faltan Campos!!

'; 53 | result += '

Favor llenar los campos faltantes que tiene *

'; 54 | result += '
'; 55 | _('_AJAX_EMPLEADO32_').innerHTML = result; 56 | _('checkcedula').innerHTML = ''; 57 | 58 | } 59 | 60 | } 61 | 62 | 63 | else{ 64 | _('checkcedula').innerHTML = 'Favor de ingresar una cedula valida'; 65 | 66 | } 67 | 68 | 69 | }else{ 70 | 71 | _('checkemail').innerHTML = 'Favor de ingresar un email valido'; 72 | 73 | } 74 | 75 | 76 | 77 | } 78 | 79 | 80 | function runScriptEmpleados(e) { 81 | if (e.keyCode == 13) { 82 | 83 | goEmpleados(); 84 | } 85 | // body... 86 | } -------------------------------------------------------------------------------- /views/app/js/filtrocontacto.js: -------------------------------------------------------------------------------- 1 | function Fijos(){ 2 | 3 | var connect, form, response, result, idfk; 4 | idfk = 1; 5 | 6 | form='id='+ idfk; 7 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 8 | 9 | connect.onreadystatechange = function(){ 10 | if (connect.readyState == 4 && connect.status == 200) { 11 | 12 | document.getElementById('_AJAX_FILTROCONTACTO_').innerHTML = connect.responseText; 13 | } 14 | } 15 | 16 | connect.open('POST', 'ajax.php?mode=filtrocontacto', true); 17 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 18 | connect.send(form); 19 | } 20 | 21 | function Potencial(){ 22 | 23 | var connect, form, response, result, idfk; 24 | idfk = 2; 25 | 26 | form='id='+ idfk; 27 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 28 | 29 | connect.onreadystatechange = function(){ 30 | if (connect.readyState == 4 && connect.status == 200) { 31 | 32 | document.getElementById('_AJAX_FILTROCONTACTO_').innerHTML = connect.responseText; 33 | } 34 | } 35 | 36 | connect.open('POST', 'ajax.php?mode=filtrocontacto', true); 37 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 38 | connect.send(form); 39 | } 40 | 41 | function Todos(){ 42 | 43 | var connect, form, response, result, idfk; 44 | idfk = 3; 45 | 46 | form='id='+ idfk; 47 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 48 | 49 | connect.onreadystatechange = function(){ 50 | if (connect.readyState == 4 && connect.status == 200) { 51 | 52 | document.getElementById('_AJAX_FILTROCONTACTO_').innerHTML = connect.responseText; 53 | } 54 | } 55 | 56 | connect.open('POST', 'ajax.php?mode=filtrocontacto', true); 57 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 58 | connect.send(form); 59 | } 60 | 61 | function runBuscar(e) { 62 | if (e.keyCode == 13) { 63 | goBuscar(); 64 | } 65 | 66 | } 67 | 68 | function goBuscar() { 69 | 70 | 71 | var connect, form, response, result, buscar; 72 | buscar = _('buscar').value; 73 | 74 | if (buscar != '') { 75 | 76 | form='buscar='+ buscar; 77 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 78 | 79 | connect.onreadystatechange = function(){ 80 | if (connect.readyState == 4 && connect.status == 200) { 81 | 82 | document.getElementById('_AJAX_FILTROCONTACTO_').innerHTML = connect.responseText; 83 | } 84 | } 85 | 86 | connect.open('POST', 'ajax.php?mode=filtrocontacto', true); 87 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 88 | connect.send(form); 89 | 90 | }else{ 91 | 92 | alert("Favor y llenar el campo antes de realizar la busqueda"); 93 | } 94 | 95 | 96 | 97 | } -------------------------------------------------------------------------------- /views/app/js/filtrocontrato.js: -------------------------------------------------------------------------------- 1 | function Aceptados(){ 2 | 3 | var connect, form, response, result, idfk; 4 | idfk = 1; 5 | 6 | form='id='+ idfk; 7 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 8 | 9 | connect.onreadystatechange = function(){ 10 | if (connect.readyState == 4 && connect.status == 200) { 11 | 12 | document.getElementById('_AJAX_FILTROCONTRATO_').innerHTML = connect.responseText; 13 | } 14 | } 15 | 16 | connect.open('POST', 'ajax.php?mode=filtrocamp', true); 17 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 18 | connect.send(form); 19 | } 20 | 21 | function Todos(){ 22 | 23 | var connect, form, response, result, idfk; 24 | idfk = 5; 25 | 26 | form='id='+ idfk; 27 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 28 | 29 | connect.onreadystatechange = function(){ 30 | if (connect.readyState == 4 && connect.status == 200) { 31 | 32 | document.getElementById('_AJAX_FILTROCONTRATO_').innerHTML = connect.responseText; 33 | } 34 | } 35 | 36 | connect.open('POST', 'ajax.php?mode=filtrocamp', true); 37 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 38 | connect.send(form); 39 | } 40 | 41 | function Cancelados(){ 42 | 43 | var connect, form, response, result, idfk; 44 | idfk = 2; 45 | 46 | form='id='+ idfk; 47 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 48 | 49 | connect.onreadystatechange = function(){ 50 | if (connect.readyState == 4 && connect.status == 200) { 51 | 52 | document.getElementById('_AJAX_FILTROCONTRATO_').innerHTML = connect.responseText; 53 | } 54 | } 55 | 56 | connect.open('POST', 'ajax.php?mode=filtrocamp', true); 57 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 58 | connect.send(form); 59 | } 60 | 61 | function Proceso(){ 62 | 63 | var connect, form, response, result, idfk; 64 | idfk = 3; 65 | 66 | form='id='+ idfk; 67 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 68 | 69 | connect.onreadystatechange = function(){ 70 | if (connect.readyState == 4 && connect.status == 200) { 71 | 72 | document.getElementById('_AJAX_FILTROCONTRATO_').innerHTML = connect.responseText; 73 | } 74 | } 75 | 76 | connect.open('POST', 'ajax.php?mode=filtrocamp', true); 77 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 78 | connect.send(form); 79 | } 80 | 81 | 82 | -------------------------------------------------------------------------------- /views/app/js/filtrofert.js: -------------------------------------------------------------------------------- 1 | function Todos(argument) { 2 | 3 | var connect, form, response, result, idfk; 4 | idfk = 7; 5 | 6 | form='id='+ idfk; 7 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 8 | 9 | connect.onreadystatechange = function(){ 10 | if (connect.readyState == 4 && connect.status == 200) { 11 | 12 | document.getElementById('_AJAX_FILTROOFERTA_').innerHTML = connect.responseText; 13 | } 14 | } 15 | 16 | connect.open('POST', 'ajax.php?mode=filtrofer', true); 17 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 18 | connect.send(form); 19 | 20 | 21 | 22 | } 23 | function Aceptados(argument) { 24 | 25 | var connect, form, response, result, idfk; 26 | idfk = 1; 27 | 28 | form='id='+ idfk; 29 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 30 | 31 | connect.onreadystatechange = function(){ 32 | if (connect.readyState == 4 && connect.status == 200) { 33 | 34 | document.getElementById('_AJAX_FILTROOFERTA_').innerHTML = connect.responseText; 35 | } 36 | } 37 | 38 | connect.open('POST', 'ajax.php?mode=filtrofer', true); 39 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 40 | connect.send(form); 41 | 42 | 43 | 44 | } 45 | function Proceso(argument) { 46 | var connect, form, response, result, idfk; 47 | idfk = 3; 48 | 49 | form='id='+ idfk; 50 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 51 | 52 | connect.onreadystatechange = function(){ 53 | if (connect.readyState == 4 && connect.status == 200) { 54 | 55 | document.getElementById('_AJAX_FILTROOFERTA_').innerHTML = connect.responseText; 56 | } 57 | } 58 | 59 | connect.open('POST', 'ajax.php?mode=filtrofer', true); 60 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 61 | connect.send(form); 62 | 63 | 64 | 65 | 66 | 67 | } 68 | function Cancelados(argument) { 69 | var connect, form, response, result, idfk; 70 | idfk = 2; 71 | 72 | form='id='+ idfk; 73 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 74 | 75 | connect.onreadystatechange = function(){ 76 | if (connect.readyState == 4 && connect.status == 200) { 77 | 78 | document.getElementById('_AJAX_FILTROOFERTA_').innerHTML = connect.responseText; 79 | } 80 | } 81 | 82 | connect.open('POST', 'ajax.php?mode=filtrofer', true); 83 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 84 | connect.send(form); 85 | 86 | 87 | } -------------------------------------------------------------------------------- /views/app/js/filtrotarea.js: -------------------------------------------------------------------------------- 1 | function Todas(){ 2 | 3 | var connect, form, response, result, idfk; 4 | idfk = 5; 5 | 6 | form='id='+ idfk; 7 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 8 | 9 | connect.onreadystatechange = function(){ 10 | if (connect.readyState == 4 && connect.status == 200) { 11 | 12 | document.getElementById('_AJAX_FILTROTAREA_').innerHTML = connect.responseText; 13 | } 14 | } 15 | 16 | connect.open('POST', 'ajax.php?mode=filtrotarea', true); 17 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 18 | connect.send(form); 19 | } 20 | function Completada(){ 21 | 22 | var connect, form, response, result, idfk; 23 | idfk = 1; 24 | 25 | form='id='+ idfk; 26 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 27 | 28 | connect.onreadystatechange = function(){ 29 | if (connect.readyState == 4 && connect.status == 200) { 30 | 31 | document.getElementById('_AJAX_FILTROTAREA_').innerHTML = connect.responseText; 32 | } 33 | } 34 | 35 | connect.open('POST', 'ajax.php?mode=filtrotarea', true); 36 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 37 | connect.send(form); 38 | } 39 | function Proceso(){ 40 | 41 | var connect, form, response, result, idfk; 42 | idfk = 2; 43 | 44 | form='id='+ idfk; 45 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 46 | 47 | connect.onreadystatechange = function(){ 48 | if (connect.readyState == 4 && connect.status == 200) { 49 | 50 | document.getElementById('_AJAX_FILTROTAREA_').innerHTML = connect.responseText; 51 | } 52 | } 53 | 54 | connect.open('POST', 'ajax.php?mode=filtrotarea', true); 55 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 56 | connect.send(form); 57 | } -------------------------------------------------------------------------------- /views/app/js/generales.js: -------------------------------------------------------------------------------- 1 | function _(id) { 2 | return document.getElementById(id) 3 | // body... 4 | } 5 | -------------------------------------------------------------------------------- /views/app/js/lostpass.js: -------------------------------------------------------------------------------- 1 | function goLostpass() { 2 | var connect, form, response, result, email; 3 | email= _('email_lostpass').value; 4 | //Si el campo email no esta vacio ejecutara el IF al contrario si lo esta ira al else... 5 | if (email != '') { 6 | // Si todo sale bien y se comprueba el campo con javascript 7 | form ='email=' + email; 8 | //Si el navegador es muy viejo, se usa ActiveXObject... de resto, todos los navegadores usan XMLHttpRequest 9 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 10 | //Cuando haya un movimiento, petición, recepción o algo nuevo entre AJAX y PHP 11 | connect.onreadystatechange = function () { 12 | if (connect.readyState == 4 && connect.status ==200) { 13 | //Si todo salió bien... 14 | if (connect.responseText==1) { 15 | result ='
'; 16 | result +=''; 17 | result +=' Perfecto!se ha enviado un mensaje a su correo..'; 18 | result +='
'; 19 | _('_AJAX_LOSTPASS_').innerHTML = result; 20 | window.location.href='?view=codigo'; 21 | 22 | }else{ 23 | _('_AJAX_LOSTPASS_').innerHTML = connect.responseText; 24 | } 25 | //Aquí todavía no se ha recibido información de PHP.. así que ponemos a esperar al usuario 26 | }else if (connect.readyState != 4) { 27 | result = '
'; 28 | result += ''; 29 | result += '

Espere!

'; 30 | result += '

Estamos procesando los datos.

'; 31 | result += '
'; 32 | _('_AJAX_LOSTPASS_').innerHTML = result; 33 | } 34 | }// fin del onreadystatechange 35 | 36 | //Enviamos los datos tipo POST, le indicamos que tipo de codificación debe usar con el POST, 37 | //Enviamos el formulario (form) 38 | connect.open('POST', 'ajax.php?mode=lostpass', true); 39 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 40 | connect.send(form); 41 | 42 | }else { 43 | result = '
'; 44 | result += ''; 45 | result += '

Favor!

'; 46 | result += '

Llenar los campos faltantes.

'; 47 | result += '
'; 48 | _('_AJAX_LOSTPASS_').innerHTML = result; 49 | } 50 | 51 | }// FIN DEL goLostpass 52 | 53 | function runScriptLostpass(e) { 54 | // si la tecla presionada es igual al número ASCI de la tecla ENTER 55 | if (e.keyCode == 13) { 56 | goLostpass(); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /views/app/js/mensaje.js: -------------------------------------------------------------------------------- 1 | function goMensaje() { 2 | var connect, form, response, result, asunto, descripcion, cliente; 3 | 4 | asunto =_('asunto').value; 5 | descripcion =_('descripcion').value; 6 | cliente =_('cliente').value; 7 | 8 | if (asunto!='' && descripcion!= '' && cliente!=' ') { 9 | 10 | form = 'asunto=' + asunto + '&descripcion=' + descripcion + '&cliente=' + cliente; 11 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 12 | connect.onreadystatechange = function () { 13 | if (connect.readyState == 4 && connect.status ==200) { 14 | if (connect.responseText==1) { 15 | result = ''; 21 | _('_AJAX_MENSAJES_').innerHTML = result; 22 | location.reload(); 23 | 24 | }else{ 25 | _('_AJAX_MENSAJES_').innerHTML = connect.responseText; 26 | } 27 | 28 | }else if (connect.readyState != 4) { 29 | result = '
'; 30 | result += ''; 31 | result += '

Proceso!

'; 32 | result += '

Espere un momento porfavor..

'; 33 | result += '
'; 34 | _('_AJAX_MENSAJES_').innerHTML = result; 35 | 36 | 37 | } 38 | } 39 | connect.open('POST', 'ajax.php?mode=mensaje', true); 40 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 41 | connect.send(form); 42 | 43 | }else{ 44 | result = '
'; 45 | result += ''; 46 | result += '

Faltan Campos!!

'; 47 | result += '

Favor llenar los campos faltantes que tiene *

'; 48 | result += '
'; 49 | _('_AJAX_MENSAJES_').innerHTML = result; 50 | } 51 | // body... 52 | } 53 | 54 | function runScriptMensaje() { 55 | if (e.keyCode == 13) { 56 | 57 | goMensaje(); 58 | } 59 | // body... 60 | } -------------------------------------------------------------------------------- /views/app/js/oferta.js: -------------------------------------------------------------------------------- 1 | function goOferta() { 2 | var connect, form, response, result, nombre, precio, cantidad, descuento, descripcionven, bonus, fechafin, descripciongara; 3 | nombre = _('NombreProdu').value; 4 | precio = _('PrecioProdu').value; 5 | cantidad = _('Cantidad').value; 6 | descuento = _('Descuento').value; 7 | descripcionven = _('DescripcionVen').value; 8 | bonus = _('Bonus').value; 9 | fechafin = _('FechaFin').value; 10 | descripciongara = _('DescripcionGarantia').value; 11 | contacto = _('clienteoferta').value; 12 | 13 | 14 | if (nombre != "" && precio != "" && cantidad != "" && descuento != "" && descripcionven != "" && fechafin != "" && contacto != "" ) { 15 | form='nombre='+ nombre + '&precio=' + precio +'&cantidad='+cantidad +'&descuento='+ descuento + '&descripcionven=' + descripcionven +'&bonus='+bonus + '&fechafin='+ fechafin + '&descripciongara=' + descripciongara +'&contacto='+contacto; 16 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 17 | connect.onreadystatechange = function () { 18 | if (connect.readyState == 4 && connect.status ==200) { 19 | if (connect.responseText==1) { 20 | result = ''; 26 | _('_AJAX_OFERTA_').innerHTML = result; 27 | 28 | location.reload(); 29 | }else{ 30 | _('_AJAX_OFERTA_').innerHTML = connect.responseText; 31 | } 32 | }else if (connect.readyState != 4) { 33 | result = '
'; 34 | result += ''; 35 | result += '

Proceso!

'; 36 | result += '

Espere un momento porfavor..

'; 37 | result += '
'; 38 | _('_AJAX_OFERTA_').innerHTML = result; 39 | } 40 | } 41 | connect.open('POST', 'ajax.php?mode=oferta', true); 42 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 43 | connect.send(form); 44 | 45 | 46 | 47 | 48 | }else{ 49 | result = '
'; 50 | result += ''; 51 | result += '

Error!

'; 52 | result += '

Porfavor llena los datos

'; 53 | result += '
'; 54 | _('_AJAX_OFERTA_').innerHTML = result; 55 | 56 | } 57 | 58 | 59 | 60 | 61 | } 62 | function runScriptOferta(e) { 63 | if (e.keyCode == 13) { 64 | goOferta(); 65 | } 66 | } -------------------------------------------------------------------------------- /views/app/js/restpass.js: -------------------------------------------------------------------------------- 1 | function goRest() { 2 | var connect, form, response, result, pass1, pass2, codigo; 3 | pass1 = _('pass1').value; 4 | pass2 = _('pass2').value; 5 | codigo = getParameterByName('codigo'); 6 | if (codigo != "") { 7 | if (pass1 != "" && pass2 != "") { 8 | if (pass1 == pass2) { 9 | form='pass1='+ pass1 + '&codigo='+ codigo; 10 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 11 | connect.onreadystatechange = function () { 12 | if (connect.readyState == 4 && connect.status == 200) { 13 | if (connect.responseText == 1) { 14 | result = ''; 20 | _('_AJAX_REST_').innerHTML = result; 21 | window.location.href="?view=index&pass=true"; 22 | } else { 23 | _('_AJAX_REST_').innerHTML = connect.responseText; 24 | 25 | } 26 | 27 | 28 | }else if (connect.readyState != 4) { 29 | result = '
'; 30 | result += ''; 31 | result += '

Proceso!

'; 32 | result += '

Espere un momento porfavor..

'; 33 | result += '
'; 34 | _('_AJAX_REST_').innerHTML = result; 35 | 36 | 37 | } 38 | } 39 | 40 | connect.open('POST', 'ajax.php?mode=rest', true); 41 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 42 | connect.send(form); 43 | }else{ 44 | 45 | result = '
'; 46 | result += ''; 47 | result += '

Error!

'; 48 | result += '

Las contraseñas no coinciden

'; 49 | result += '
'; 50 | _('_AJAX_REST_').innerHTML = result; 51 | 52 | } 53 | 54 | }else{ 55 | result = '
'; 56 | result += ''; 57 | result += '

Error!

'; 58 | result += '

Favor llenar los campos..

'; 59 | result += '
'; 60 | _('_AJAX_REST_').innerHTML = result; 61 | } 62 | }else{ 63 | 64 | result ='
'; 65 | result +=''; 66 | result +='

Alerta!!

'; 67 | result +='

Intente solicitar otro codigo porfavor

'; 68 | result +='
'; 69 | 70 | 71 | 72 | } 73 | 74 | 75 | } 76 | 77 | 78 | function runScriptRest(e) { 79 | if (e.keyCode == 13) { 80 | goRest(); 81 | } 82 | // body... 83 | } 84 | 85 | 86 | function getParameterByName(name) { 87 | name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); 88 | var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), 89 | results = regex.exec(location.search); 90 | return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); 91 | } 92 | -------------------------------------------------------------------------------- /views/app/js/tarea.js: -------------------------------------------------------------------------------- 1 | function goTarea() { 2 | var connect, form, response, result, asunto, descripcion, altaprioridad, responsables, fechalimite; 3 | asunto = _('asuntoT').value; 4 | descripcion = _('descripcionT').value; 5 | altaprioridad = _('PrioridadT').value; 6 | responsables = _('responsableT').value; 7 | fechalimite = _('FechaLimiteT').value; 8 | //curso = _('cursoT').value; 9 | 10 | 11 | if (asunto != "" && descripcion != "" && responsables != "" && fechalimite != "" && altaprioridad !="") { 12 | 13 | form = 'asunto=' + asunto + '&descripcion=' + descripcion + '&responsables=' + responsables + '&altaprioridad='+ altaprioridad + '&fechalimite=' + fechalimite; 14 | //Si el navegador es muy viejo, se usa ActiveXObject... de resto, todos los navegadores usan XMLHttpRequest 15 | connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('microsoft.XMLHTTP'); 16 | //Cuando haya un movimiento, petición, recepción o algo nuevo entre AJAX y PHP 17 | connect.onreadystatechange = function () { 18 | if (connect.readyState == 4 && connect.status == 200) { 19 | //Si todo salió bien... 20 | if (connect.responseText == 1) { 21 | result = ''; 27 | _('_AJAX_TAREA_').innerHTML = result; 28 | location.reload(); 29 | 30 | 31 | 32 | } else { 33 | _('_AJAX_TAREA_').innerHTML = connect.responseText; 34 | console.log(connect.responseText); 35 | } 36 | //Aquí todavía no se ha recibido información de PHP.. así que ponemos a esperar al usuario 37 | } else if (connect.readyState != 4) { 38 | result = '
'; 39 | result += ''; 40 | result += '

Proceso!

'; 41 | result += '

Espere un momento porfavor..

'; 42 | result += '
'; 43 | _('_AJAX_TAREA_').innerHTML = result; 44 | 45 | 46 | } 47 | } 48 | //Enviamos los datos tipo POST, le indicamos que tipo de codificación debe usar con el POST, 49 | //Enviamos el formulario (form) 50 | connect.open('POST', 'ajax.php?mode=tarea', true); 51 | connect.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 52 | connect.send(form); 53 | 54 | 55 | 56 | 57 | } else { 58 | //Error si no pasa la comprobación (los campos están vacíos, o algunos) 59 | 60 | result = '
'; 61 | result += ''; 62 | 63 | result += '

Error!

'; 64 | result += '

Favor llenar los campos..

'; 65 | result += '
'; 66 | _('_AJAX_TAREA_').innerHTML = result; 67 | } 68 | 69 | 70 | 71 | } 72 | 73 | //Esto para poder usar la tecla ENTER para enviar el formulario 74 | function runScriptTarea(e) { 75 | if (e.keyCode == 13) { 76 | // si la tecla presionada es igual al número ASCI de la tecla ENTER 77 | goTarea(); 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /views/css/addons/datatables.css: -------------------------------------------------------------------------------- 1 | /* 2 | * MDBootstrap integration with Datatables 3 | * Learn more: https://mdbootstrap.com/content/bootstrap-datatables/ 4 | * About MDBootstrap: https://mdbootstrap.com/ 5 | * 6 | * This combined file was created by the DataTables downloader builder: 7 | * https://datatables.net/download 8 | * 9 | * To rebuild or modify this file with the latest versions of the included 10 | * software please visit: 11 | * https://datatables.net/download/#bs4/dt-1.10.18 12 | * 13 | * Included libraries: 14 | * DataTables 1.10.18 15 | */ 16 | 17 | table.dataTable thead { 18 | cursor: pointer; 19 | } 20 | 21 | table.dataTable thead>tr>th:active { 22 | outline: none; 23 | } 24 | 25 | table.dataTable thead>tr>td:active { 26 | outline: none; 27 | } 28 | 29 | div.dataTables_wrapper div.dataTables_length.d-flex.flex-row label { 30 | margin-top: 1.2rem; 31 | margin-right: 1rem; 32 | } 33 | 34 | div.dataTables_wrapper div.dataTables_length.d-flex.flex-row .select-wrapper.mdb-select span, 35 | div.dataTables_wrapper div.dataTables_length.d-flex.flex-row .select-wrapper.mdb-select .select-dropdown { 36 | margin-top: 1rem; 37 | } 38 | 39 | div.dataTables_wrapper div.dataTables_length label, 40 | div.dataTables_wrapper div.dataTables_filter label { 41 | text-align: left; 42 | font-weight: normal; 43 | padding-top: .5rem; 44 | padding-bottom: .5rem; 45 | } 46 | 47 | div.dataTables_wrapper div.dataTables_length select, 48 | div.dataTables_wrapper div.dataTables_length input, 49 | div.dataTables_wrapper div.dataTables_filter select, 50 | div.dataTables_wrapper div.dataTables_filter input { 51 | width: auto; 52 | } 53 | 54 | div.dataTables_wrapper div.dataTables_filter { 55 | text-align: right; 56 | } 57 | 58 | div.dataTables_wrapper div.dataTables_filter input { 59 | margin-left: .5rem; 60 | display: inline-block; 61 | } 62 | 63 | div.dataTables_wrapper div.dataTables_info, 64 | div.dataTables_wrapper div.dataTables_paginate { 65 | font-weight: normal; 66 | padding-top: 1rem; 67 | padding-bottom: 1rem; 68 | } 69 | 70 | div.dataTables_wrapper div.dataTables_paginate { 71 | text-align: right; 72 | margin: 0; 73 | } 74 | 75 | div.dataTables_wrapper div.dataTables_paginate ul.pagination { 76 | -webkit-box-pack: end; 77 | -webkit-justify-content: flex-end; 78 | -ms-flex-pack: end; 79 | justify-content: flex-end; 80 | } 81 | 82 | div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item.active .page-link:focus { 83 | background-color: #4285f4; 84 | } 85 | 86 | div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item .page-link:focus { 87 | -webkit-box-shadow: none; 88 | box-shadow: none; 89 | } 90 | 91 | @media (max-width: 767px) { 92 | div.dataTables_wrapper div .dataTables_length, 93 | div.dataTables_wrapper div .dataTables_filter, 94 | div.dataTables_wrapper div .dataTables_info, 95 | div.dataTables_wrapper div .dataTables_paginate ul.pagination { 96 | text-align: center; 97 | -webkit-box-pack: center; 98 | -webkit-justify-content: center; 99 | -ms-flex-pack: center; 100 | justify-content: center; 101 | } 102 | } 103 | 104 | .bs-select select { 105 | display: inline-block !important; 106 | } -------------------------------------------------------------------------------- /views/css/addons/datatables.min.css: -------------------------------------------------------------------------------- 1 | table.dataTable thead{cursor:pointer}table.dataTable thead>tr>td:active,table.dataTable thead>tr>th:active{outline:0}div.dataTables_wrapper div.dataTables_length.d-flex.flex-row label{margin-top:1.2rem;margin-right:1rem}div.dataTables_wrapper div.dataTables_length.d-flex.flex-row .select-wrapper.mdb-select .select-dropdown,div.dataTables_wrapper div.dataTables_length.d-flex.flex-row .select-wrapper.mdb-select span{margin-top:1rem}div.dataTables_wrapper div.dataTables_filter label,div.dataTables_wrapper div.dataTables_length label{text-align:left;font-weight:400;padding-top:.5rem;padding-bottom:.5rem}div.dataTables_wrapper div.dataTables_filter input,div.dataTables_wrapper div.dataTables_filter select,div.dataTables_wrapper div.dataTables_length input,div.dataTables_wrapper div.dataTables_length select{width:auto}div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter input{margin-left:.5rem;display:inline-block}div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_paginate{font-weight:400;padding-top:1rem;padding-bottom:1rem}div.dataTables_wrapper div.dataTables_paginate{text-align:right;margin:0}div.dataTables_wrapper div.dataTables_paginate ul.pagination{-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item.active .page-link:focus{background-color:#4285f4}div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item .page-link:focus{-webkit-box-shadow:none;box-shadow:none}@media (max-width:767px){div.dataTables_wrapper div .dataTables_filter,div.dataTables_wrapper div .dataTables_info,div.dataTables_wrapper div .dataTables_length,div.dataTables_wrapper div .dataTables_paginate ul.pagination{text-align:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}}.bs-select select{display:inline-block!important} -------------------------------------------------------------------------------- /views/css/style.css: -------------------------------------------------------------------------------- 1 | /* Chat coco1s */ 2 | .coco1 { 3 | border: 2px solid #dedede; 4 | background-color: #f1f1f1; 5 | border-radius: 5px; 6 | padding: 10px; 7 | margin: 10px 0; 8 | } 9 | 10 | /* Darker chat coco1 */ 11 | .darker { 12 | border-color: #ccc; 13 | background-color: #ddd; 14 | } 15 | 16 | /* Clear floats */ 17 | .coco1::after { 18 | content: ""; 19 | clear: both; 20 | display: table; 21 | } 22 | 23 | /* Style images */ 24 | .coco1 img { 25 | float: left; 26 | max-width: 60px; 27 | width: 100%; 28 | margin-right: 20px; 29 | border-radius: 50%; 30 | } 31 | 32 | /* Style the right image */ 33 | .coco1 img.right { 34 | float: right; 35 | margin-left: 20px; 36 | margin-right:0; 37 | } 38 | 39 | /* Style time text */ 40 | .time-right { 41 | float: right; 42 | color: #aaa; 43 | } 44 | 45 | /* Style time text */ 46 | .time-left { 47 | float: left; 48 | color: #999; 49 | } 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /views/css/style.min.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LJMartinez07/crm-application-php/195395b2394605fca0b9c63941b725da78df1e6c/views/css/style.min.css -------------------------------------------------------------------------------- /views/css/themes/bootstrap.css: -------------------------------------------------------------------------------- 1 | /** 2 | * alertifyjs 1.11.1 http://alertifyjs.com 3 | * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. 4 | * Copyright 2018 Mohammad Younes (http://alertifyjs.com) 5 | * Licensed under GPL 3 */ 6 | .alertify .ajs-dimmer { 7 | background-color: #000; 8 | opacity: .5; 9 | } 10 | .alertify .ajs-dialog { 11 | max-width: 600px; 12 | min-height: 122px; 13 | background-color: #fff; 14 | border: 1px solid rgba(0, 0, 0, 0.2); 15 | -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); 16 | box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); 17 | border-radius: 6px; 18 | } 19 | .alertify .ajs-header { 20 | color: #333; 21 | border-bottom: 1px solid #e5e5e5; 22 | border-radius: 6px 6px 0 0; 23 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 24 | font-size: 18px; 25 | } 26 | .alertify .ajs-body { 27 | font-family: 'Roboto', sans-serif; 28 | color: black; 29 | } 30 | .alertify.ajs-resizable .ajs-content, 31 | .alertify.ajs-maximized:not(.ajs-resizable) .ajs-content { 32 | top: 58px; 33 | bottom: 68px; 34 | } 35 | .alertify .ajs-footer { 36 | background-color: #fff; 37 | padding: 15px; 38 | border-top: 1px solid #e5e5e5; 39 | border-radius: 0 0 6px 6px; 40 | } 41 | .alertify-notifier .ajs-message { 42 | background: rgba(255, 255, 255, 0.95); 43 | color: #000; 44 | text-align: center; 45 | border: solid 1px #ddd; 46 | border-radius: 2px; 47 | } 48 | .alertify-notifier .ajs-message.ajs-success { 49 | color: #fff; 50 | background: rgba(91, 189, 114, 0.95); 51 | text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.5); 52 | } 53 | .alertify-notifier .ajs-message.ajs-error { 54 | color: #fff; 55 | background: rgba(217, 92, 92, 0.95); 56 | text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.5); 57 | } 58 | .alertify-notifier .ajs-message.ajs-warning { 59 | background: rgba(252, 248, 215, 0.95); 60 | border-color: #999; 61 | } 62 | -------------------------------------------------------------------------------- /views/css/themes/bootstrap.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * alertifyjs 1.11.1 http://alertifyjs.com 3 | * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. 4 | * Copyright 2018 Mohammad Younes (http://alertifyjs.com) 5 | * Licensed under GPL 3 */ 6 | .alertify .ajs-dimmer{background-color:#000;opacity:.5}.alertify .ajs-dialog{max-width:600px;min-height:122px;background-color:#fff;border:1px solid rgba(0,0,0,.2);-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5);border-radius:6px}.alertify .ajs-header{color:#333;border-bottom:1px solid #e5e5e5;border-radius:6px 6px 0 0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:18px}.alertify .ajs-body{font-family:Roboto,sans-serif;color:#000}.alertify.ajs-maximized:not(.ajs-resizable) .ajs-content,.alertify.ajs-resizable .ajs-content{top:58px;bottom:68px}.alertify .ajs-footer{background-color:#fff;padding:15px;border-top:1px solid #e5e5e5;border-radius:0 0 6px 6px}.alertify-notifier .ajs-message{background:rgba(255,255,255,.95);color:#000;text-align:center;border:solid 1px #ddd;border-radius:2px}.alertify-notifier .ajs-message.ajs-success{color:#fff;background:rgba(91,189,114,.95);text-shadow:-1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-error{color:#fff;background:rgba(217,92,92,.95);text-shadow:-1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95);border-color:#999} -------------------------------------------------------------------------------- /views/css/themes/bootstrap.rtl.css: -------------------------------------------------------------------------------- 1 | /** 2 | * alertifyjs 1.11.1 http://alertifyjs.com 3 | * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. 4 | * Copyright 2018 Mohammad Younes (http://alertifyjs.com) 5 | * Licensed under GPL 3 */ 6 | .alertify .ajs-dimmer { 7 | background-color: #000; 8 | opacity: .5; 9 | } 10 | .alertify .ajs-dialog { 11 | max-width: 600px; 12 | min-height: 122px; 13 | background-color: #fff; 14 | border: 1px solid rgba(0, 0, 0, 0.2); 15 | -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); 16 | box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); 17 | border-radius: 6px; 18 | } 19 | .alertify .ajs-header { 20 | color: #333; 21 | border-bottom: 1px solid #e5e5e5; 22 | border-radius: 6px 6px 0 0; 23 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 24 | font-size: 18px; 25 | } 26 | .alertify .ajs-body { 27 | font-family: 'Roboto', sans-serif; 28 | color: black; 29 | } 30 | .alertify.ajs-resizable .ajs-content, 31 | .alertify.ajs-maximized:not(.ajs-resizable) .ajs-content { 32 | top: 58px; 33 | bottom: 68px; 34 | } 35 | .alertify .ajs-footer { 36 | background-color: #fff; 37 | padding: 15px; 38 | border-top: 1px solid #e5e5e5; 39 | border-radius: 0 0 6px 6px; 40 | } 41 | .alertify-notifier .ajs-message { 42 | background: rgba(255, 255, 255, 0.95); 43 | color: #000; 44 | text-align: center; 45 | border: solid 1px #ddd; 46 | border-radius: 2px; 47 | } 48 | .alertify-notifier .ajs-message.ajs-success { 49 | color: #fff; 50 | background: rgba(91, 189, 114, 0.95); 51 | text-shadow: 1px -1px 0 rgba(0, 0, 0, 0.5); 52 | } 53 | .alertify-notifier .ajs-message.ajs-error { 54 | color: #fff; 55 | background: rgba(217, 92, 92, 0.95); 56 | text-shadow: 1px -1px 0 rgba(0, 0, 0, 0.5); 57 | } 58 | .alertify-notifier .ajs-message.ajs-warning { 59 | background: rgba(252, 248, 215, 0.95); 60 | border-color: #999; 61 | } 62 | -------------------------------------------------------------------------------- /views/css/themes/bootstrap.rtl.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * alertifyjs 1.11.1 http://alertifyjs.com 3 | * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. 4 | * Copyright 2018 Mohammad Younes (http://alertifyjs.com) 5 | * Licensed under GPL 3 */ 6 | .alertify .ajs-dimmer{background-color:#000;opacity:.5}.alertify .ajs-dialog{max-width:600px;min-height:122px;background-color:#fff;border:1px solid rgba(0,0,0,.2);-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5);border-radius:6px}.alertify .ajs-header{color:#333;border-bottom:1px solid #e5e5e5;border-radius:6px 6px 0 0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:18px}.alertify .ajs-body{font-family:Roboto,sans-serif;color:#000}.alertify.ajs-maximized:not(.ajs-resizable) .ajs-content,.alertify.ajs-resizable .ajs-content{top:58px;bottom:68px}.alertify .ajs-footer{background-color:#fff;padding:15px;border-top:1px solid #e5e5e5;border-radius:0 0 6px 6px}.alertify-notifier .ajs-message{background:rgba(255,255,255,.95);color:#000;text-align:center;border:solid 1px #ddd;border-radius:2px}.alertify-notifier .ajs-message.ajs-success{color:#fff;background:rgba(91,189,114,.95);text-shadow:1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-error{color:#fff;background:rgba(217,92,92,.95);text-shadow:1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95);border-color:#999} -------------------------------------------------------------------------------- /views/css/themes/default.css: -------------------------------------------------------------------------------- 1 | /** 2 | * alertifyjs 1.11.1 http://alertifyjs.com 3 | * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. 4 | * Copyright 2018 Mohammad Younes (http://alertifyjs.com) 5 | * Licensed under GPL 3 */ 6 | .alertify .ajs-dialog { 7 | background-color: white; 8 | -webkit-box-shadow: 0px 15px 20px 0px rgba(0, 0, 0, 0.25); 9 | box-shadow: 0px 15px 20px 0px rgba(0, 0, 0, 0.25); 10 | border-radius: 2px; 11 | } 12 | .alertify .ajs-header { 13 | color: black; 14 | font-weight: bold; 15 | background: #fafafa; 16 | border-bottom: #eee 1px solid; 17 | border-radius: 2px 2px 0 0; 18 | } 19 | .alertify .ajs-body { 20 | color: black; 21 | } 22 | .alertify .ajs-body .ajs-content .ajs-input { 23 | display: block; 24 | width: 100%; 25 | padding: 8px; 26 | margin: 4px; 27 | border-radius: 2px; 28 | border: 1px solid #CCC; 29 | } 30 | .alertify .ajs-body .ajs-content p { 31 | margin: 0; 32 | } 33 | .alertify .ajs-footer { 34 | background: #fbfbfb; 35 | border-top: #eee 1px solid; 36 | border-radius: 0 0 2px 2px; 37 | } 38 | .alertify .ajs-footer .ajs-buttons .ajs-button { 39 | background-color: transparent; 40 | color: #000; 41 | border: 0; 42 | font-size: 14px; 43 | font-weight: bold; 44 | text-transform: uppercase; 45 | } 46 | .alertify .ajs-footer .ajs-buttons .ajs-button.ajs-ok { 47 | color: #3593D2; 48 | } 49 | .alertify-notifier .ajs-message { 50 | background: rgba(255, 255, 255, 0.95); 51 | color: #000; 52 | text-align: center; 53 | border: solid 1px #ddd; 54 | border-radius: 2px; 55 | } 56 | .alertify-notifier .ajs-message.ajs-success { 57 | color: #fff; 58 | background: rgba(91, 189, 114, 0.95); 59 | text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.5); 60 | } 61 | .alertify-notifier .ajs-message.ajs-error { 62 | color: #fff; 63 | background: rgba(217, 92, 92, 0.95); 64 | text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.5); 65 | } 66 | .alertify-notifier .ajs-message.ajs-warning { 67 | background: rgba(252, 248, 215, 0.95); 68 | border-color: #999; 69 | } 70 | -------------------------------------------------------------------------------- /views/css/themes/default.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * alertifyjs 1.11.1 http://alertifyjs.com 3 | * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. 4 | * Copyright 2018 Mohammad Younes (http://alertifyjs.com) 5 | * Licensed under GPL 3 */ 6 | .alertify .ajs-dialog{background-color:#fff;-webkit-box-shadow:0 15px 20px 0 rgba(0,0,0,.25);box-shadow:0 15px 20px 0 rgba(0,0,0,.25);border-radius:2px}.alertify .ajs-header{color:#000;font-weight:700;background:#fafafa;border-bottom:#eee 1px solid;border-radius:2px 2px 0 0}.alertify .ajs-body{color:#000}.alertify .ajs-body .ajs-content .ajs-input{display:block;width:100%;padding:8px;margin:4px;border-radius:2px;border:1px solid #ccc}.alertify .ajs-body .ajs-content p{margin:0}.alertify .ajs-footer{background:#fbfbfb;border-top:#eee 1px solid;border-radius:0 0 2px 2px}.alertify .ajs-footer .ajs-buttons .ajs-button{background-color:transparent;color:#000;border:0;font-size:14px;font-weight:700;text-transform:uppercase}.alertify .ajs-footer .ajs-buttons .ajs-button.ajs-ok{color:#3593d2}.alertify-notifier .ajs-message{background:rgba(255,255,255,.95);color:#000;text-align:center;border:solid 1px #ddd;border-radius:2px}.alertify-notifier .ajs-message.ajs-success{color:#fff;background:rgba(91,189,114,.95);text-shadow:-1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-error{color:#fff;background:rgba(217,92,92,.95);text-shadow:-1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95);border-color:#999} -------------------------------------------------------------------------------- /views/css/themes/default.rtl.css: -------------------------------------------------------------------------------- 1 | /** 2 | * alertifyjs 1.11.1 http://alertifyjs.com 3 | * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. 4 | * Copyright 2018 Mohammad Younes (http://alertifyjs.com) 5 | * Licensed under GPL 3 */ 6 | .alertify .ajs-dialog { 7 | background-color: white; 8 | -webkit-box-shadow: 0px 15px 20px 0px rgba(0, 0, 0, 0.25); 9 | box-shadow: 0px 15px 20px 0px rgba(0, 0, 0, 0.25); 10 | border-radius: 2px; 11 | } 12 | .alertify .ajs-header { 13 | color: black; 14 | font-weight: bold; 15 | background: #fafafa; 16 | border-bottom: #eee 1px solid; 17 | border-radius: 2px 2px 0 0; 18 | } 19 | .alertify .ajs-body { 20 | color: black; 21 | } 22 | .alertify .ajs-body .ajs-content .ajs-input { 23 | display: block; 24 | width: 100%; 25 | padding: 8px; 26 | margin: 4px; 27 | border-radius: 2px; 28 | border: 1px solid #CCC; 29 | } 30 | .alertify .ajs-body .ajs-content p { 31 | margin: 0; 32 | } 33 | .alertify .ajs-footer { 34 | background: #fbfbfb; 35 | border-top: #eee 1px solid; 36 | border-radius: 0 0 2px 2px; 37 | } 38 | .alertify .ajs-footer .ajs-buttons .ajs-button { 39 | background-color: transparent; 40 | color: #000; 41 | border: 0; 42 | font-size: 14px; 43 | font-weight: bold; 44 | text-transform: uppercase; 45 | } 46 | .alertify .ajs-footer .ajs-buttons .ajs-button.ajs-ok { 47 | color: #3593D2; 48 | } 49 | .alertify-notifier .ajs-message { 50 | background: rgba(255, 255, 255, 0.95); 51 | color: #000; 52 | text-align: center; 53 | border: solid 1px #ddd; 54 | border-radius: 2px; 55 | } 56 | .alertify-notifier .ajs-message.ajs-success { 57 | color: #fff; 58 | background: rgba(91, 189, 114, 0.95); 59 | text-shadow: 1px -1px 0 rgba(0, 0, 0, 0.5); 60 | } 61 | .alertify-notifier .ajs-message.ajs-error { 62 | color: #fff; 63 | background: rgba(217, 92, 92, 0.95); 64 | text-shadow: 1px -1px 0 rgba(0, 0, 0, 0.5); 65 | } 66 | .alertify-notifier .ajs-message.ajs-warning { 67 | background: rgba(252, 248, 215, 0.95); 68 | border-color: #999; 69 | } 70 | -------------------------------------------------------------------------------- /views/css/themes/default.rtl.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * alertifyjs 1.11.1 http://alertifyjs.com 3 | * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. 4 | * Copyright 2018 Mohammad Younes (http://alertifyjs.com) 5 | * Licensed under GPL 3 */ 6 | .alertify .ajs-dialog{background-color:#fff;-webkit-box-shadow:0 15px 20px 0 rgba(0,0,0,.25);box-shadow:0 15px 20px 0 rgba(0,0,0,.25);border-radius:2px}.alertify .ajs-header{color:#000;font-weight:700;background:#fafafa;border-bottom:#eee 1px solid;border-radius:2px 2px 0 0}.alertify .ajs-body{color:#000}.alertify .ajs-body .ajs-content .ajs-input{display:block;width:100%;padding:8px;margin:4px;border-radius:2px;border:1px solid #ccc}.alertify .ajs-body .ajs-content p{margin:0}.alertify .ajs-footer{background:#fbfbfb;border-top:#eee 1px solid;border-radius:0 0 2px 2px}.alertify .ajs-footer .ajs-buttons .ajs-button{background-color:transparent;color:#000;border:0;font-size:14px;font-weight:700;text-transform:uppercase}.alertify .ajs-footer .ajs-buttons .ajs-button.ajs-ok{color:#3593d2}.alertify-notifier .ajs-message{background:rgba(255,255,255,.95);color:#000;text-align:center;border:solid 1px #ddd;border-radius:2px}.alertify-notifier .ajs-message.ajs-success{color:#fff;background:rgba(91,189,114,.95);text-shadow:1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-error{color:#fff;background:rgba(217,92,92,.95);text-shadow:1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95);border-color:#999} -------------------------------------------------------------------------------- /views/css/themes/semantic.css: -------------------------------------------------------------------------------- 1 | /** 2 | * alertifyjs 1.11.1 http://alertifyjs.com 3 | * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. 4 | * Copyright 2018 Mohammad Younes (http://alertifyjs.com) 5 | * Licensed under GPL 3 */ 6 | .alertify .ajs-dimmer { 7 | background-color: rgba(0, 0, 0, 0.85); 8 | opacity: 1; 9 | } 10 | .alertify .ajs-dialog { 11 | max-width: 50%; 12 | min-height: 137px; 13 | background-color: #F4F4F4; 14 | border: 1px solid #DDD; 15 | -webkit-box-shadow: none; 16 | box-shadow: none; 17 | border-radius: 5px; 18 | } 19 | .alertify .ajs-header { 20 | padding: 1.5rem 2rem; 21 | border-bottom: none; 22 | border-radius: 5px 5px 0 0; 23 | color: #555; 24 | background-color: #fff; 25 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 26 | font-size: 1.6em; 27 | font-weight: 700; 28 | } 29 | .alertify .ajs-body { 30 | font-family: 'Roboto', sans-serif; 31 | color: #555; 32 | } 33 | .alertify .ajs-body .ajs-content .ajs-input { 34 | width: 100%; 35 | margin: 0; 36 | padding: .65em 1em; 37 | font-size: 1em; 38 | background-color: #FFF; 39 | border: 1px solid rgba(0, 0, 0, 0.15); 40 | outline: 0; 41 | color: rgba(0, 0, 0, 0.7); 42 | border-radius: .3125em; 43 | -webkit-transition: background-color 0.3s ease-out, border-color 0.2s ease, -webkit-box-shadow 0.2s ease; 44 | transition: background-color 0.3s ease-out, border-color 0.2s ease, -webkit-box-shadow 0.2s ease; 45 | transition: background-color 0.3s ease-out, box-shadow 0.2s ease, border-color 0.2s ease; 46 | transition: background-color 0.3s ease-out, box-shadow 0.2s ease, border-color 0.2s ease, -webkit-box-shadow 0.2s ease; 47 | -webkit-box-sizing: border-box; 48 | box-sizing: border-box; 49 | } 50 | .alertify .ajs-body .ajs-content .ajs-input:active { 51 | border-color: rgba(0, 0, 0, 0.3); 52 | background-color: #FAFAFA; 53 | } 54 | .alertify .ajs-body .ajs-content .ajs-input:focus { 55 | border-color: rgba(0, 0, 0, 0.2); 56 | color: rgba(0, 0, 0, 0.85); 57 | } 58 | .alertify.ajs-resizable .ajs-content, 59 | .alertify.ajs-maximized:not(.ajs-resizable) .ajs-content { 60 | top: 64px; 61 | bottom: 74px; 62 | } 63 | .alertify .ajs-footer { 64 | background-color: #fff; 65 | padding: 1rem 2rem; 66 | border-top: none; 67 | border-radius: 0 0 5px 5px; 68 | } 69 | .alertify-notifier .ajs-message { 70 | background: rgba(255, 255, 255, 0.95); 71 | color: #000; 72 | text-align: center; 73 | border: solid 1px #ddd; 74 | border-radius: 2px; 75 | } 76 | .alertify-notifier .ajs-message.ajs-success { 77 | color: #fff; 78 | background: rgba(91, 189, 114, 0.95); 79 | text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.5); 80 | } 81 | .alertify-notifier .ajs-message.ajs-error { 82 | color: #fff; 83 | background: rgba(217, 92, 92, 0.95); 84 | text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.5); 85 | } 86 | .alertify-notifier .ajs-message.ajs-warning { 87 | background: rgba(252, 248, 215, 0.95); 88 | border-color: #999; 89 | } 90 | -------------------------------------------------------------------------------- /views/css/themes/semantic.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * alertifyjs 1.11.1 http://alertifyjs.com 3 | * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. 4 | * Copyright 2018 Mohammad Younes (http://alertifyjs.com) 5 | * Licensed under GPL 3 */ 6 | .alertify .ajs-dimmer{background-color:rgba(0,0,0,.85);opacity:1}.alertify .ajs-dialog{max-width:50%;min-height:137px;background-color:#f4f4f4;border:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;border-radius:5px}.alertify .ajs-header{padding:1.5rem 2rem;border-bottom:none;border-radius:5px 5px 0 0;color:#555;background-color:#fff;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1.6em;font-weight:700}.alertify .ajs-body{font-family:Roboto,sans-serif;color:#555}.alertify .ajs-body .ajs-content .ajs-input{width:100%;margin:0;padding:.65em 1em;font-size:1em;background-color:#fff;border:1px solid rgba(0,0,0,.15);outline:0;color:rgba(0,0,0,.7);border-radius:.3125em;-webkit-transition:background-color .3s ease-out,border-color .2s ease,-webkit-box-shadow .2s ease;transition:background-color .3s ease-out,border-color .2s ease,-webkit-box-shadow .2s ease;transition:background-color .3s ease-out,box-shadow .2s ease,border-color .2s ease;transition:background-color .3s ease-out,box-shadow .2s ease,border-color .2s ease,-webkit-box-shadow .2s ease;-webkit-box-sizing:border-box;box-sizing:border-box}.alertify .ajs-body .ajs-content .ajs-input:active{border-color:rgba(0,0,0,.3);background-color:#fafafa}.alertify .ajs-body .ajs-content .ajs-input:focus{border-color:rgba(0,0,0,.2);color:rgba(0,0,0,.85)}.alertify.ajs-maximized:not(.ajs-resizable) .ajs-content,.alertify.ajs-resizable .ajs-content{top:64px;bottom:74px}.alertify .ajs-footer{background-color:#fff;padding:1rem 2rem;border-top:none;border-radius:0 0 5px 5px}.alertify-notifier .ajs-message{background:rgba(255,255,255,.95);color:#000;text-align:center;border:solid 1px #ddd;border-radius:2px}.alertify-notifier .ajs-message.ajs-success{color:#fff;background:rgba(91,189,114,.95);text-shadow:-1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-error{color:#fff;background:rgba(217,92,92,.95);text-shadow:-1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95);border-color:#999} -------------------------------------------------------------------------------- /views/css/themes/semantic.rtl.css: -------------------------------------------------------------------------------- 1 | /** 2 | * alertifyjs 1.11.1 http://alertifyjs.com 3 | * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. 4 | * Copyright 2018 Mohammad Younes (http://alertifyjs.com) 5 | * Licensed under GPL 3 */ 6 | .alertify .ajs-dimmer { 7 | background-color: rgba(0, 0, 0, 0.85); 8 | opacity: 1; 9 | } 10 | .alertify .ajs-dialog { 11 | max-width: 50%; 12 | min-height: 137px; 13 | background-color: #F4F4F4; 14 | border: 1px solid #DDD; 15 | -webkit-box-shadow: none; 16 | box-shadow: none; 17 | border-radius: 5px; 18 | } 19 | .alertify .ajs-header { 20 | padding: 1.5rem 2rem; 21 | border-bottom: none; 22 | border-radius: 5px 5px 0 0; 23 | color: #555; 24 | background-color: #fff; 25 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 26 | font-size: 1.6em; 27 | font-weight: 700; 28 | } 29 | .alertify .ajs-body { 30 | font-family: 'Roboto', sans-serif; 31 | color: #555; 32 | } 33 | .alertify .ajs-body .ajs-content .ajs-input { 34 | width: 100%; 35 | margin: 0; 36 | padding: .65em 1em; 37 | font-size: 1em; 38 | background-color: #FFF; 39 | border: 1px solid rgba(0, 0, 0, 0.15); 40 | outline: 0; 41 | color: rgba(0, 0, 0, 0.7); 42 | border-radius: .3125em; 43 | -webkit-transition: background-color 0.3s ease-out, border-color 0.2s ease, -webkit-box-shadow 0.2s ease; 44 | transition: background-color 0.3s ease-out, border-color 0.2s ease, -webkit-box-shadow 0.2s ease; 45 | transition: background-color 0.3s ease-out, box-shadow 0.2s ease, border-color 0.2s ease; 46 | transition: background-color 0.3s ease-out, box-shadow 0.2s ease, border-color 0.2s ease, -webkit-box-shadow 0.2s ease; 47 | -webkit-box-sizing: border-box; 48 | box-sizing: border-box; 49 | } 50 | .alertify .ajs-body .ajs-content .ajs-input:active { 51 | border-color: rgba(0, 0, 0, 0.3); 52 | background-color: #FAFAFA; 53 | } 54 | .alertify .ajs-body .ajs-content .ajs-input:focus { 55 | border-color: rgba(0, 0, 0, 0.2); 56 | color: rgba(0, 0, 0, 0.85); 57 | } 58 | .alertify.ajs-resizable .ajs-content, 59 | .alertify.ajs-maximized:not(.ajs-resizable) .ajs-content { 60 | top: 64px; 61 | bottom: 74px; 62 | } 63 | .alertify .ajs-footer { 64 | background-color: #fff; 65 | padding: 1rem 2rem; 66 | border-top: none; 67 | border-radius: 0 0 5px 5px; 68 | } 69 | .alertify-notifier .ajs-message { 70 | background: rgba(255, 255, 255, 0.95); 71 | color: #000; 72 | text-align: center; 73 | border: solid 1px #ddd; 74 | border-radius: 2px; 75 | } 76 | .alertify-notifier .ajs-message.ajs-success { 77 | color: #fff; 78 | background: rgba(91, 189, 114, 0.95); 79 | text-shadow: 1px -1px 0 rgba(0, 0, 0, 0.5); 80 | } 81 | .alertify-notifier .ajs-message.ajs-error { 82 | color: #fff; 83 | background: rgba(217, 92, 92, 0.95); 84 | text-shadow: 1px -1px 0 rgba(0, 0, 0, 0.5); 85 | } 86 | .alertify-notifier .ajs-message.ajs-warning { 87 | background: rgba(252, 248, 215, 0.95); 88 | border-color: #999; 89 | } 90 | -------------------------------------------------------------------------------- /views/css/themes/semantic.rtl.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * alertifyjs 1.11.1 http://alertifyjs.com 3 | * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. 4 | * Copyright 2018 Mohammad Younes (http://alertifyjs.com) 5 | * Licensed under GPL 3 */ 6 | .alertify .ajs-dimmer{background-color:rgba(0,0,0,.85);opacity:1}.alertify .ajs-dialog{max-width:50%;min-height:137px;background-color:#f4f4f4;border:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;border-radius:5px}.alertify .ajs-header{padding:1.5rem 2rem;border-bottom:none;border-radius:5px 5px 0 0;color:#555;background-color:#fff;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1.6em;font-weight:700}.alertify .ajs-body{font-family:Roboto,sans-serif;color:#555}.alertify .ajs-body .ajs-content .ajs-input{width:100%;margin:0;padding:.65em 1em;font-size:1em;background-color:#fff;border:1px solid rgba(0,0,0,.15);outline:0;color:rgba(0,0,0,.7);border-radius:.3125em;-webkit-transition:background-color .3s ease-out,border-color .2s ease,-webkit-box-shadow .2s ease;transition:background-color .3s ease-out,border-color .2s ease,-webkit-box-shadow .2s ease;transition:background-color .3s ease-out,box-shadow .2s ease,border-color .2s ease;transition:background-color .3s ease-out,box-shadow .2s ease,border-color .2s ease,-webkit-box-shadow .2s ease;-webkit-box-sizing:border-box;box-sizing:border-box}.alertify .ajs-body .ajs-content .ajs-input:active{border-color:rgba(0,0,0,.3);background-color:#fafafa}.alertify .ajs-body .ajs-content .ajs-input:focus{border-color:rgba(0,0,0,.2);color:rgba(0,0,0,.85)}.alertify.ajs-maximized:not(.ajs-resizable) .ajs-content,.alertify.ajs-resizable .ajs-content{top:64px;bottom:74px}.alertify .ajs-footer{background-color:#fff;padding:1rem 2rem;border-top:none;border-radius:0 0 5px 5px}.alertify-notifier .ajs-message{background:rgba(255,255,255,.95);color:#000;text-align:center;border:solid 1px #ddd;border-radius:2px}.alertify-notifier .ajs-message.ajs-success{color:#fff;background:rgba(91,189,114,.95);text-shadow:1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-error{color:#fff;background:rgba(217,92,92,.95);text-shadow:1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95);border-color:#999} -------------------------------------------------------------------------------- /views/js/chart-bar-demo.js: -------------------------------------------------------------------------------- 1 | // Set new default font family and font color to mimic Bootstrap's default styling 2 | Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif'; 3 | Chart.defaults.global.defaultFontColor = '#292b2c'; 4 | 5 | // Bar Chart Example 6 | var ctx = document.getElementById("myBarChart"); 7 | var myLineChart = new Chart(ctx, { 8 | type: 'bar', 9 | data: { 10 | labels: ["Clientes Fijos", "Clientes Potenciales"], 11 | datasets: [{ 12 | label: "Cantidad", 13 | backgroundColor: "rgba(2,117,216,1)", 14 | borderColor: "rgba(2,117,216,1)", 15 | data: [_('fijo').value, _('potencial').value], 16 | }], 17 | }, 18 | options: { 19 | scales: { 20 | xAxes: [{ 21 | time: { 22 | unit: 'Clientes' 23 | }, 24 | gridLines: { 25 | display: false 26 | }, 27 | ticks: { 28 | maxTicksLimit: 6 29 | } 30 | }], 31 | yAxes: [{ 32 | ticks: { 33 | min: 0, 34 | max: 10, 35 | maxTicksLimit: 3 36 | }, 37 | gridLines: { 38 | display: true 39 | } 40 | }], 41 | }, 42 | legend: { 43 | display: false 44 | } 45 | } 46 | }); 47 | -------------------------------------------------------------------------------- /views/js/modules/enhanced-modals.js: -------------------------------------------------------------------------------- 1 | /* 2 | Enhanced Bootstrap Modals 3 | https://mdbootstrap.com 4 | office@mdbootstrap.com 5 | */ 6 | 7 | $('body').on('shown.bs.modal', '.modal', function() { 8 | if($('.modal-backdrop').length) { 9 | } else { 10 | 11 | $modal_dialog = $(this).children('.modal-dialog') 12 | 13 | if($modal_dialog.hasClass('modal-side')) { 14 | $(this).addClass('modal-scrolling'); 15 | $('body').addClass('scrollable'); 16 | } 17 | 18 | if($modal_dialog.hasClass('modal-frame')) { 19 | $(this).addClass('modal-content-clickable'); 20 | $('body').addClass('scrollable'); 21 | } 22 | } 23 | }); 24 | $('body').on('hidden.bs.modal', '.modal', function() { 25 | $('body').removeClass('scrollable'); 26 | }); -------------------------------------------------------------------------------- /views/js/modules/scrolling-navbar.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | (function ($) { 4 | 5 | var SCROLLING_NAVBAR_OFFSET_TOP = 50; 6 | 7 | $(window).on('scroll', function () { 8 | 9 | var $navbar = $('.navbar'); 10 | if ($navbar.length) { 11 | 12 | if ($navbar.offset().top > SCROLLING_NAVBAR_OFFSET_TOP) { 13 | 14 | $('.scrolling-navbar').addClass('top-nav-collapse'); 15 | } else { 16 | 17 | $('.scrolling-navbar').removeClass('top-nav-collapse'); 18 | } 19 | } 20 | }); 21 | })(jQuery); -------------------------------------------------------------------------------- /views/js/sb-admin-charts.js: -------------------------------------------------------------------------------- 1 | // Chart.js scripts 2 | // -- Set new default font family and font color to mimic Bootstrap's default styling 3 | Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif'; 4 | Chart.defaults.global.defaultFontColor = '#292b2c'; 5 | // -- Area Chart Example 6 | var ctx = document.getElementById("myAreaChart"); 7 | var myLineChart = new Chart(ctx, { 8 | type: 'line', 9 | data: { 10 | labels: ["Mar 1", "Mar 2", "Mar 3", "Mar 4", "Mar 5", "Mar 6", "Mar 7", "Mar 8", "Mar 9", "Mar 10", "Mar 11", "Mar 12", "Mar 13"], 11 | datasets: [{ 12 | label: "Sessions", 13 | lineTension: 0.3, 14 | backgroundColor: "rgba(2,117,216,0.2)", 15 | borderColor: "rgba(2,117,216,1)", 16 | pointRadius: 5, 17 | pointBackgroundColor: "rgba(2,117,216,1)", 18 | pointBorderColor: "rgba(255,255,255,0.8)", 19 | pointHoverRadius: 5, 20 | pointHoverBackgroundColor: "rgba(2,117,216,1)", 21 | pointHitRadius: 20, 22 | pointBorderWidth: 2, 23 | data: [10000, 30162, 26263, 18394, 18287, 28682, 31274, 33259, 25849, 24159, 32651, 31984, 38451], 24 | }], 25 | }, 26 | options: { 27 | scales: { 28 | xAxes: [{ 29 | time: { 30 | unit: 'date' 31 | }, 32 | gridLines: { 33 | display: false 34 | }, 35 | ticks: { 36 | maxTicksLimit: 7 37 | } 38 | }], 39 | yAxes: [{ 40 | ticks: { 41 | min: 0, 42 | max: 40000, 43 | maxTicksLimit: 5 44 | }, 45 | gridLines: { 46 | color: "rgba(0, 0, 0, .125)", 47 | } 48 | }], 49 | }, 50 | legend: { 51 | display: false 52 | } 53 | } 54 | }); 55 | // -- Bar Chart Example 56 | 57 | -------------------------------------------------------------------------------- /views/js/sb-admin-charts.min.js: -------------------------------------------------------------------------------- 1 | Chart.defaults.global.defaultFontFamily='-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif',Chart.defaults.global.defaultFontColor="#292b2c";ctx=document.getElementById("myPieChart"),myPieChart=new Chart(ctx,{type:"pie",data:{labels:["Aceptados","En Proceso","Rechazado"],datasets:[{data:[_('aceptado').value,_('proceso').value,_('rechazado').value],backgroundColor:["#007bff","#dc3545","#ffc107"]}]}}); 2 | 3 | 4 | 5 | 6 | 7 | 8 | //Grafico de ofertas 9 | ctx=document.getElementById("myPieChart1"),myPieChart=new Chart(ctx,{type:"pie",data:{labels:["Aceptados","En Proceso","Rechazado"],datasets:[{data:[_('aceptadofert').value,_('procesofert').value,_('rechazadofert').value],backgroundColor:["#007bff","#dc3545","#ffc107"]}]}}); -------------------------------------------------------------------------------- /views/js/sb-admin-datatables.js: -------------------------------------------------------------------------------- 1 | // Call the dataTables jQuery plugin 2 | $(document).ready(function() { 3 | $('#dataTable').DataTable(); 4 | }); 5 | -------------------------------------------------------------------------------- /views/js/sb-admin-datatables.min.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){$("#dataTable").DataTable()}); -------------------------------------------------------------------------------- /views/js/sb-admin.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | "use strict"; // Start of use strict 3 | // Configure tooltips for collapsed side navigation 4 | $('.navbar-sidenav [data-toggle="tooltip"]').tooltip({ 5 | template: '' 6 | }) 7 | // Toggle the side navigation 8 | $("#sidenavToggler").click(function(e) { 9 | e.preventDefault(); 10 | $("body").toggleClass("sidenav-toggled"); 11 | $(".navbar-sidenav .nav-link-collapse").addClass("collapsed"); 12 | $(".navbar-sidenav .sidenav-second-level, .navbar-sidenav .sidenav-third-level").removeClass("show"); 13 | }); 14 | // Force the toggled class to be removed when a collapsible nav link is clicked 15 | $(".navbar-sidenav .nav-link-collapse").click(function(e) { 16 | e.preventDefault(); 17 | $("body").removeClass("sidenav-toggled"); 18 | }); 19 | // Prevent the content wrapper from scrolling when the fixed side navigation hovered over 20 | $('body.fixed-nav .navbar-sidenav, body.fixed-nav .sidenav-toggler, body.fixed-nav .navbar-collapse').on('mousewheel DOMMouseScroll', function(e) { 21 | var e0 = e.originalEvent, 22 | delta = e0.wheelDelta || -e0.detail; 23 | this.scrollTop += (delta < 0 ? 1 : -1) * 30; 24 | e.preventDefault(); 25 | }); 26 | // Scroll to top button appear 27 | $(document).scroll(function() { 28 | var scrollDistance = $(this).scrollTop(); 29 | if (scrollDistance > 100) { 30 | $('.scroll-to-top').fadeIn(); 31 | } else { 32 | $('.scroll-to-top').fadeOut(); 33 | } 34 | }); 35 | // Configure tooltips globally 36 | $('[data-toggle="tooltip"]').tooltip() 37 | // Smooth scrolling using jQuery easing 38 | $(document).on('click', 'a.scroll-to-top', function(event) { 39 | var $anchor = $(this); 40 | $('html, body').stop().animate({ 41 | scrollTop: ($($anchor.attr('href')).offset().top) 42 | }, 1000, 'easeInOutExpo'); 43 | event.preventDefault(); 44 | }); 45 | })(jQuery); // End of use strict 46 | -------------------------------------------------------------------------------- /views/js/sb-admin.min.js: -------------------------------------------------------------------------------- 1 | !function(e){"use strict";e('.navbar-sidenav [data-toggle="tooltip"]').tooltip({template:''}),e("#sidenavToggler").click(function(o){o.preventDefault(),e("body").toggleClass("sidenav-toggled"),e(".navbar-sidenav .nav-link-collapse").addClass("collapsed"),e(".navbar-sidenav .sidenav-second-level, .navbar-sidenav .sidenav-third-level").removeClass("show")}),e(".navbar-sidenav .nav-link-collapse").click(function(o){o.preventDefault(),e("body").removeClass("sidenav-toggled")}),e("body.fixed-nav .navbar-sidenav, body.fixed-nav .sidenav-toggler, body.fixed-nav .navbar-collapse").on("mousewheel DOMMouseScroll",function(e){var o=e.originalEvent,t=o.wheelDelta||-o.detail;this.scrollTop+=30*(t<0?1:-1),e.preventDefault()}),e(document).scroll(function(){e(this).scrollTop()>100?e(".scroll-to-top").fadeIn():e(".scroll-to-top").fadeOut()}),e('[data-toggle="tooltip"]').tooltip(),e(document).on("click","a.scroll-to-top",function(o){var t=e(this);e("html, body").stop().animate({scrollTop:e(t.attr("href")).offset().top},1e3,"easeInOutExpo"),o.preventDefault()})}(jQuery); --------------------------------------------------------------------------------