Page 91 - DISEÑAR ESTRATEGIAS A TRAVÉS DEL SERVICIÓ AL CLIENTE PARA LA APLICACIÓN NORMATIVA VIGENTE EN EL FUNCIONAMIENTO Y ORGANIZACIÓN DEL SERVICIO DE LABORATORIO DEL HOSPITAL DE LA COMUNIDAD DE NARANJOS
P. 91

Figura 41. altas_empleados.php


                     Para poder realizar las altas de los empleados, utilizamos el código siguiente:



                     <?php require_once('Connections/conexion_cfe.php'); ?>
                     <?php

                     if (!function_exists("GetSQLValueString")) {
                     function GetSQLValueString($theValue, $theType, $theDefinedValue = "",

                     $theNotDefinedValue = "")

                     {
                       if (PHP_VERSION < 6) {

                         $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
                       }

                       $theValue = function_exists("mysql_real_escape_string") ?

                     mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
                       switch ($theType) {

                         case "text":
                           $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";

                           break;
                         case "long":

                         case "int":

                           $theValue = ($theValue != "") ? intval($theValue) : "NULL";
                           break;

                         case "double":


                                                                                             Página 91
   86   87   88   89   90   91   92   93   94   95   96