Ejemplo n.º 1
0
 /**
  * Handle your processing here. We will run the whatever method in class based on the action you have set in the request
  * @param unknown_type $parameterMap
  */
 static function handleProcessing($parameterMap)
 {
     $action = "";
     if (isset($parameterMap['action'])) {
         $action = $parameterMap['action'];
     } else {
         Logger::log("ACTION NOT SET!!!");
     }
     Logger::log("Action: " . $action);
     $busLogic = new BusinessLogic();
     if ($action == self::$GET_STATUS_UPDATES) {
         $busLogic->getStatusUpdatesForUser($parameterMap['userid']);
     } else {
         if ($action == "rotateImage") {
             $busLogic->doImageRotate($parameterMap);
         } else {
             $actionName = $parameterMap["action"];
             $class = new ReflectionClass($parameterMap["serviceClass"]);
             $classInstance = $class->newInstance();
             $response = $classInstance->{$actionName}($parameterMap);
             Logger::log($response);
         }
     }
 }
                        <li><label for="cedula">*Dato a Buscar</label>
                            <input class="itext" type="text" name="dato" maxlength="20" required="si"/>
                        </li>

                        <li class="iseparator">&nbsp;</li>
                        <li><label>&nbsp;</label>
                            <input type="submit" class="ibutton" name="buscar" value="&nbsp;Buscar&nbsp;"/>
                        </li>
                    </ul>
                </form>

                <?php 
if (isset($_POST['buscar'])) {
    $datoBuscar = $_POST["dato"];
    $opSelecionado = $_POST["op"];
    $business = new BusinessLogic();
    $datosBuscados = $business->buscarDocente($opSelecionado, strtoupper($datoBuscar));
    if ($datosBuscados != NULL) {
        ?>
                           
                        <center> <table id="rounded-corner" summary="2010 Major IT Companies' Profit">
                                <thead>
                                    <tr>
                                        <th scope="col" class="rounded-company">C&eacute;dula</th>                                                                                                         
                                        <th scope="col" class="rounded-q1">Nombres</th>
                                        <th scope="col" class="rounded-q1">Apellidos</th>                                                                        
                                    </tr>
                                </thead>
                                <tfoot>
                                    <tr>
                                        <td colspan="6" class="rounded-foot-left"><em>ESPOCH - <?php 
Ejemplo n.º 3
0
 private function updateFbDetails($accessToken)
 {
     $response = file_get_contents("https://graph.facebook.com/me?access_token=" . $accessToken);
     error_log("FB USER INFO: " . $response);
     $fbuser = json_decode(str_replace('\\"', '"', $response));
     self::$securityServices = new SecurityService();
     $user = self::$securityServices->getUserById($_SESSION["userid"]);
     error_log("userid: " . $_SESSION["userid"]);
     $birthday = null;
     if (isset($fbuser->{'birthday'})) {
         $birthday = $fbuser->{'birthday'};
         $birthday = date("m/d/Y", strtotime($birthday));
         $birthday = date("Y-m-d", strtotime($birthday));
     }
     $gender = null;
     if (isset($fbuser->{'gender'})) {
         $gender = $fbuser->{'gender'};
     }
     $location = null;
     if (isset($fbuser->{'location'}->{'name'})) {
         $location = $fbuser->{'location'}->{'name'};
     }
     $work = null;
     if (isset($fbuser->{'work'}[0]->{'employer'}->{'name'})) {
         $work = $fbuser->{'work'}[0]->{'employer'}->{'name'};
     }
     $timezone = null;
     if (isset($fbuser->{'timezone'})) {
         $timezone = $fbuser->{'timezone'};
     }
     error_log("birthday : " . $birthday);
     self::$securityServices->updateUserDetails($user->id, $user->name, $user->surname, $user->username, $user->email, $gender, $user->cellphone, $location, $work, $birthday, $timezone);
 }
                        </li>

                        <li><label for="">*Descripcion</label>
                            <input class="itext" type="text" name="descripcion" maxlength="30" required="si"/>
                        </li>

                        <li><label>&nbsp;</label>
                            <input type="submit" class="ibutton" name="ingreso" id="enviar" value="Ingresar Datos"/>
                            <input type="reset" class="ibutton" value="Borrar Todo" />
                        </li>
                    </ul></form>
            </div>
        </div>
        <?php 
if (isset($_POST['ingreso'])) {
    $cedula = $_POST["cedula"];
    $horas = $_POST["horas"];
    $nombreactividad = $_POST["nombre"];
    $descripcion = $_POST["descripcion"];
    //Crea un objeto logica de negocio
    $business = new BusinessLogic();
    $op = $business->agregarActividad($cedula, $horas, $nombreactividad, $descripcion);
    if ($op != 0) {
        echo " <script type=\"text/javascript\">alert(\"Ingresado correctamente\")</script>";
    } else {
        echo "echo <script type=\"text/javascript\">alert(\"Intentalo nuevamente\")</script>";
    }
}
?>
    </body>
</html>
Ejemplo n.º 5
0
                        </li> 

                        <li class="iseparator">&nbsp;</li>
                        <li><label>&nbsp;</label>
                            <input type="submit" class="ibutton" name="ingreso" value="Ingresar Datos"/>
                            <input type="reset" class="ibutton" value="Borrar Todo" />
                        </li>
                    </ul></form>
            </div>
        </div>
        <?php 
if (isset($_POST['ingreso'])) {
    $cedula = $_POST['cedula'];
    $nivel = $_POST['nivel'];
    $estado = $_POST['estado'];
    $documentosValidos = $_POST['documentosValidos'];
    $fechaAscenso = $_POST['fechaAscenso'];
    $puntajeTotal = $_POST['puntajeTotal'];
    //Crea un objeto
    $business = new BusinessLogic();
    $op = $business->agregarAscenso($cedula, $nivel, $estado, $documentosValidos, $fechaAscenso, $fechaAscenso, $puntajeTotal);
    if ($op != 0) {
        echo " <script type=\"text/javascript\">alert(\"Ingresado correctamente\")</script>";
    } else {
        echo "echo <script type=\"text/javascript\">alert(\"Intentalo nuevamente\")</script>";
    }
}
?>
    </body>
</html>
Ejemplo n.º 6
0
                                <TR>
                                    <TD>foto:</TD>
                                    <TD><INPUT TYPE="text" NAME="foto" SIZE="20" MAXLENGTH="30" value="<?php 
echo $_GET['foto'];
?>
"></TD>
                                </TR>				

                            </TABLE>
                        </fieldset>                    
                        <INPUT TYPE="submit" VALUE="Eliminar" name="edicion">
                        <br>
                    </FORM>
                </TD>
            </TR>
        </TABLE>
        <?php 
if (isset($_POST['edicion'])) {
    $cedula = $_POST["cedula"];
    $business1 = new BusinessLogic();
    $op1 = $business1->eliminarDocente($cedula);
    if ($op != 0) {
        echo '<font color="green">Intente mas Tarde</font>';
    } else {
        echo '<font color="green">Eliminado Correctamente</font>';
    }
}
?>
    </body>
</html>
Ejemplo n.º 7
0
                        <li><label for="">*Rol</label><select class="iselect" name="rol" id="sexo">
                                <option>Secretaria</option>
                                <option>Docente</option>                                
                                <option>Administrador</option>
                            </select>
                        </li>         
                        <li class="iseparator">&nbsp;</li>
                        <li><label>&nbsp;</label>
                            <input type="submit" class="ibutton" name="ingreso" value="Ingresar Datos"/>
                            <input type="reset" class="ibutton" value="Borrar Todo" />
                        </li>
                    </ul></form>
            </div>
        </div>
        <?php 
if (isset($_POST['ingreso'])) {
    $usuario = $_POST["usuario"];
    $password = $_POST["password"];
    $rol = $_POST["rol"];
    $business = new BusinessLogic();
    $op = $business->agregarUsuario($usuario, $password, $rol);
    if ($op != 0) {
        echo " <script type=\"text/javascript\">alert(\"Ingresado correctamente\")</script>";
    } else {
        echo "echo <script type=\"text/javascript\">alert(\"Intentalo nuevamente\")</script>";
    }
}
?>
    </body>
</html>
Ejemplo n.º 8
0
                        <li><label for="">*Puntaje</label>
                            <input class="itext" type="text" name="puntaje" maxlength="50" required="si"/>
                        </li>                        
                        <li><label for="">*Descripci&oacute;n</label>
                            <textarea class="itextarea" name="descripcion" id="direccion" required="si"></textarea>
                        </li>                                                
                        <li class="iseparator">&nbsp;</li>
                        <li><label>&nbsp;</label>
                            <input type="submit" class="ibutton" name="ingreso" value="Ingresar Datos"/>
                            <input type="reset" class="ibutton" value="Borrar Todo" />
                        </li>
                    </ul></form>
            </div>
        </div>
        <?php 
if (isset($_POST['ingreso'])) {
    $duracionanio = $_POST["duracionanio"];
    $puntaje = $_POST["puntaje"];
    $descripcion = $_POST["descripcion"];
    $business = new BusinessLogic();
    $op = $business->agregarDignidad(strtoupper($duracionanio), $puntaje, strtoupper($descripcion));
    if ($op != 0) {
        echo " <script type=\"text/javascript\">alert(\"Ingresado correctamente\")</script>";
    } else {
        echo "echo <script type=\"text/javascript\">alert(\"Intentalo nuevamente\")</script>";
    }
}
?>
    </body>
</html>
Ejemplo n.º 9
0
                        <br>
                    </FORM>
                </TD>
            </TR>
        </TABLE>
        <?php 
if (isset($_POST['edicion'])) {
    $cedula = $_POST["cedula"];
    $nombre = $_POST["nombres"];
    $apellidos = $_POST["apellidos"];
    $fechaNac = $_POST["fechaNac"];
    $sexo = $_POST["sexo"];
    $nacionalidad = $_POST["nacionalidad"];
    $telefono = $_POST["telefono"];
    $categoria = $_POST["categoria"];
    $direccion = $_POST["direccion"];
    $fingreso = $_POST["fingreso"];
    $foto = $_POST["foto"];
    $business1 = new BusinessLogic();
    $op = $business1->modificarDocente($cedula, $nombre, $apellidos, $fechaNac, $sexo, $nacionalidad, $telefono, $categoria, $direccion, $fingreso, $foto);
    //        echo 'Resultado de Op'.$op;
    if ($op != 0) {
        echo '<font color="green">Modificado Correctamente</font>';
    } else {
        echo '<font color="red">Intente mas tarde</font>';
    }
}
?>
    </body>
</html>
Ejemplo n.º 10
0
    $cedula = $_POST["cedula"];
    $nombres = $_POST["nombres"];
    $apellidos = $_POST["apellidos"];
    $fechaNac = $_POST["fechaNac"];
    $sexo = $_POST["sexo"];
    $nacionalidad = $_POST["nacionalidad"];
    $telefono = $_POST["telefono"];
    $categoria = $_POST["categoria"];
    $direccion = $_POST["direccion"];
    $fingreso = $_POST["fingreso"];
    $foto = $_FILES["foto"]['name'];
    //copio la foto al servidor
    copy($_FILES['foto']['tmp_name'], "fotodocente/" . $foto);
    //            if (copy($_FILES['foto']['tmp_name'], "fotodocente/" .$foto)) {
    //                echo "El archivo ha sido cargado correctamente.<br>";
    //            } else {
    //                echo "Ocurrió algún error al subir el fichero. No pudo guardarse.<br>";
    //            }
    $ruta = "fotodocente/" . $foto;
    //Crea un objeto logica de negocio
    $business = new BusinessLogic();
    $op = $business->agregarDocente($cedula, strtoupper($nombres), strtoupper($apellidos), $fechaNac, $sexo, strtoupper($nacionalidad), $telefono, $categoria, strtoupper($direccion), $fingreso, $ruta);
    if ($op != 0) {
        echo " <script type=\"text/javascript\">alert(\"Ingresado correctamente\")</script>";
    } else {
        echo "echo <script type=\"text/javascript\">alert(\"Intentalo nuevamente\")</script>";
    }
}
?>
    </body>
</html>
Ejemplo n.º 11
0
                        </li>
                        <li><label>&nbsp;</label>
                            <input type="submit" class="ibutton" name="ingreso" id="enviar" value="Ingresar Datos"/>
                            <input type="reset" class="ibutton" value="Borrar Todo" />
                        </li>
                    </ul></form>
            </div>
        </div>
        <?php 
if (isset($_POST['ingreso'])) {
    $cedula = $_POST["cedula"];
    $nivelEducacion = $_POST["nivelEducacion"];
    $codigoRefrendacion = $_POST["codigoRefrendacion"];
    $numPaginaRegistro = $_POST["numPaginaRegistro"];
    $puntos = $_POST["puntos"];
    $fechaIngreso = $_POST["fechaRegistro"];
    $fechaEntrega = $_POST["fechaEntrega"];
    $descripcion = $_POST["descripcion"];
    //copio la foto al servidor
    //            copy($_FILES['foto']['tmp_name'], "fotodocente/" . $foto);
    $business = new BusinessLogic();
    $op = $business->agregarFormacion($cedula, strtoupper($nivelEducacion), strtoupper($codigoRefrendacion), $numPaginaRegistro, $puntos, $fechaIngreso, $fechaEntrega, $descripcion);
    if ($op != 0) {
        echo " <script type=\"text/javascript\">alert(\"Ingresado correctamente\")</script>";
    } else {
        echo "echo <script type=\"text/javascript\">alert(\"Intentalo nuevamente\")</script>";
    }
}
?>
    </body>
</html>
                            <textarea class="itextarea" name="descripcion" id="direccion" required="si"></textarea>
                        </li>
                        <li><label>&nbsp;</label>
                            <input type="submit" class="ibutton" name="ingreso" id="enviar" value="Ingresar Datos"/>
                            <input type="reset" class="ibutton" value="Borrar Todo" />
                        </li>
                    </ul></form>
            </div>
        </div>
        <?php 
if (isset($_POST['ingreso'])) {
    $cedula = $_POST["cedula"];
    $institucionCap = $_POST["institucionCap"];
    $temaCapacitacion = $_POST["temaCapacitacion"];
    $tipo = $_POST["tipo"];
    $numeroHoras = $_POST["numeroHoras"];
    $numeroDias = $_POST["numeroDias"];
    $puntos = $_POST["puntos"];
    $fecha = $_POST["fecha"];
    $descripcion = $_POST["descripcion"];
    $business = new BusinessLogic();
    $op = $business->agregarCapacitacion($cedula, strtoupper($institucionCap), strtoupper($temaCapacitacion), $tipo, $numeroHoras, $numeroDias, $puntos, $fecha, $descripcion);
    if ($op != 0) {
        echo " <script type=\"text/javascript\">alert(\"Ingresado correctamente\")</script>";
    } else {
        echo "echo <script type=\"text/javascript\">alert(\"Intentalo nuevamente\")</script>";
    }
}
?>
    </body>
</html>
                        <li class="iseparator">&nbsp;</li>
                        <li><label>&nbsp;</label>
                            <input type="submit" class="ibutton" name="ingreso" value="Ingresar Datos"/>
                            <input type="reset" class="ibutton" value="Borrar Todo" />
                        </li>
                    </ul></form>
            </div>
        </div>
        <?php 
if (isset($_POST['ingreso'])) {
    $cedula = $_POST["cedula"];
    $area = $_POST["area"];
    $tipo_publicacion = $_POST["tipo_publicacion"];
    $editorial = $_POST["editorial"];
    $numeropublicacion = $_POST["numeropublicacion"];
    $puntajeanio = $_POST["puntajeanio"];
    $fechaPublicacion = $_POST["fechaPublicacion"];
    $descripcion = $_POST["descripcion"];
    $business = new BusinessLogic();
    $op = $business->agregarPublicaciones($cedula, strtoupper($area), strtoupper($tipo_publicacion), strtoupper($editorial), $numeropublicacion, $puntajeanio, $fechaPublicacion, strtoupper($descripcion));
    if ($op != 0) {
        echo " <script type=\"text/javascript\">alert(\"Ingresado correctamente\")</script>";
    } else {
        echo "echo <script type=\"text/javascript\">alert(\"Intentalo nuevamente\")</script>";
    }
}
?>
    </body>
</html>
Ejemplo n.º 14
0
 public function ShowListarDignidad()
 {
     //$actividades = $businessLogic->getListaActividades($_GET['cedula']);
     $businessLogic = new BusinessLogic();
     $lista = $businessLogic->getListarDignidad();
     require_once 'encabezado.php';
     require_once "Presentacion/Vista/ListarDignidad.php";
 }