git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_Intranet/trunk/src@69 e2b1556b-49f8-d141-9351-52d6861a72d9
39 lines
956 B
PHP
39 lines
956 B
PHP
<?php
|
|
include("seguridad.php");
|
|
include("functions.php");
|
|
/*
|
|
* Sólo RRHH y Admin
|
|
*/
|
|
if(!$usuario->tieneRol("4")
|
|
&& !$usuario->tieneRol("1")){
|
|
header("Location: aplicacion.php?e=permiso");
|
|
exit;
|
|
}
|
|
include_once("Objects/Pedido.php");
|
|
include_once("Objects/ListaOfertas.php");
|
|
include_once("Objects/Oferta.php");
|
|
|
|
$idCandidato=$_POST['idCandidato'];
|
|
$pedidos=$_POST['propPed'];
|
|
$back=$_POST['back'];
|
|
$observacion=$_POST['obsProponer'];
|
|
|
|
$listaOfertas = new ListaOfertas($usuario, "", "", "0");
|
|
$arrayInsert = array();
|
|
|
|
// Para cada pedido, proponer el candidato
|
|
foreach($pedidos as $codigo) {
|
|
$arrayInsert["pedido"] = $codigo;
|
|
$arrayInsert["obsGerente"] = $observacion;
|
|
$arrayInsert["estado"] = "110";
|
|
$arrayInsert["candidato"] = $idCandidato;
|
|
|
|
|
|
$idOferta = $listaOfertas->addOferta($arrayInsert);
|
|
unset ($arrayInsert);
|
|
}
|
|
$back.="&msg=1";
|
|
header("Location: ".$back);
|
|
|
|
?>
|