// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
// Fecha Creación: Año 2009-2010
// Fecha Última modificación: Agosto-2010
// Nombre del fichero: repositorios.php
// Descripción :
// Administra los repositorios de un determinado Centro
// *************************************************************************************************************************************************
include_once("../includes/ctrlacc.php");
include_once("../clases/AdoPhp.php");
include_once("../clases/XmlPhp.php");
include_once("../clases/ArbolVistaXML.php");
include_once("../clases/MenuContextual.php");
include_once("../includes/constantes.php");
include_once("../includes/CreaComando.php");
include_once("../idiomas/php/".$idioma."/repositorios_".$idioma.".php");
//________________________________________________________________________________________________________
$cmd=CreaComando($cadenaconexion);
if (!$cmd)
Header('Location: '.$pagerror.'?herror=2'); // Error de conexión con servidor B.D.
else
$arbolXML=CreaArbol($cmd,$idcentro); // Crea el arbol XML con todos los datos del Centro
// Creación del árbol
$baseurlimg="../images/signos"; // Url de las imágenes de signo
$clasedefault="texto_arbol"; // Hoja de estilo (Clase por defecto) del árbol
$arbol=new ArbolVistaXML($arbolXML,0,$baseurlimg,$clasedefault,1,0,5);
//________________________________________________________________________________________________________
?>
Administración web de aulas
echo ''?>
echo ''?>
//________________________________________________________________________________________________________
echo $arbol->CreaArbolVistaXML(); // Crea árbol (HTML) a partir del XML
$flotante=new MenuContextual(); // Crea objeto MenuContextual
// Crea contextual de repositorios
$XMLcontextual=CreacontextualXMLRepositorios();
echo $flotante->CreaMenuContextual($XMLcontextual);
$XMLcontextual=CreacontextualXMLGruposRepositorios(); // Grupos de repositorios
echo $flotante->CreaMenuContextual($XMLcontextual);
$XMLcontextual=CreacontextualXMLRepositorio(); // Repositorio
echo $flotante->CreaMenuContextual($XMLcontextual);
?>
// *************************************************************************************************************************************************
// Devuelve una cadena con formato XML de toda la información de los repositorios de un Centro concreto
// Parametros:
// - cmd:Una comando ya operativo ( con conexión abierta)
// - idcentro: El identificador del centro
//________________________________________________________________________________________________________
function CreaArbol($cmd,$idcentro)
{
global $TbMsg;
global $LITAMBITO_REPOSITORIOS;
$cadenaXML='';
$cadenaXML.=SubarbolXML_grupos_repositorios($cmd,$idcentro,0);
$cadenaXML.='';
return($cadenaXML);
}
// ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function SubarbolXML_grupos_repositorios($cmd,$idcentro,$grupoid){
global $LITAMBITO_GRUPOSREPOSITORIOS;
global $AMBITO_GRUPOSREPOSITORIOS;
global $LITAMBITO_REPOSITORIOS;
$cadenaXML="";
$rs=new Recordset;
$cmd->texto="SELECT idgrupo,nombregrupo,grupoid FROM grupos WHERE grupoid=".$grupoid." AND idcentro=".$idcentro." AND tipo=".$AMBITO_GRUPOSREPOSITORIOS." ORDER BY nombregrupo";
$rs->Comando=&$cmd;
if (!$rs->Abrir()) return($cadenaXML); // Error al abrir recordset
$rs->Primero();
while (!$rs->EOF){
$cadenaXML.='campos["idgrupo"];
$cadenaXML.='>';
$cadenaXML.=SubarbolXML_grupos_repositorios($cmd,$idcentro,$rs->campos["idgrupo"]);
$cadenaXML.='';
$rs->Siguiente();
}
$rs->Cerrar();
$cmd->texto="SELECT idrepositorio,nombrerepositorio FROM repositorios WHERE grupoid=".$grupoid." AND idcentro=".$idcentro." order by idrepositorio desc" ;
$rs->Comando=&$cmd;
if (!$rs->Abrir()) return($cadenaXML); // Error al abrir recordset
$rs->Primero();
while (!$rs->EOF){
$cadenaXML.='campos["idrepositorio"];
$cadenaXML.='>';
$cadenaXML.='';
$rs->Siguiente();
}
$rs->Cerrar();
return($cadenaXML);
}
//________________________________________________________________________________________________________
//
// Menús Contextuales
//________________________________________________________________________________________________________
function CreacontextualXMLRepositorios(){
global $AMBITO_REPOSITORIOS;
global $AMBITO_GRUPOSREPOSITORIOS;
global $LITAMBITO_GRUPOSREPOSITORIOS;
global $LITAMBITO_REPOSITORIOS;
global $TbMsg;
$layerXML='';
$layerXML.='';
$wLeft=140;
$wTop=115;
$wWidth=550;
$wHeight=280;
$wpages="../propiedades/propiedades_repositorios.php";
$wParam=$wLeft .",".$wTop.",".$wWidth.",".$wHeight.",'". $wpages."'";
$layerXML.='';
$layerXML.='';
$layerXML.='';
$wParam="../gestores/gestor_repositorios.php";
$layerXML.='';
$layerXML.='';
return($layerXML);
}
//________________________________________________________________________________________________________
function CreacontextualXMLGruposRepositorios(){
global $AMBITO_REPOSITORIOS;
global $AMBITO_GRUPOSREPOSITORIOS;
global $LITAMBITO_GRUPOSREPOSITORIOS;
global $TbMsg;
$layerXML='';
$layerXML.='';
$wLeft=140;
$wTop=115;
$wWidth=550;
$wHeight=280;
$wpages="../propiedades/propiedades_repositorios.php";
$wParam=$wLeft .",".$wTop.",".$wWidth.",".$wHeight.",'". $wpages."'";
$layerXML.='';
$layerXML.='';
$layerXML.='';
$wParam="../gestores/gestor_repositorios.php";
$layerXML.='';
$layerXML.='';
$layerXML.='';
$layerXML.='';
$layerXML.='';
$layerXML.='';
return($layerXML);
}
//________________________________________________________________________________________________________
function CreacontextualXMLRepositorio(){
global $AMBITO_REPOSITORIOS;
global $LITAMBITO_REPOSITORIOS;
global $TbMsg;
$layerXML='';
$layerXML.='';
$layerXML.='';
$layerXML.='';
$layerXML.='';
$layerXML.='';
$layerXML.='';
$wLeft=140;
$wTop=115;
$wWidth=550;
$wHeight=280;
$wpages="../propiedades/propiedades_repositorios.php";
$wParam=$wLeft .",".$wTop.",".$wWidth.",".$wHeight.",'". $wpages."'";
$layerXML.='';
$layerXML.='';
$layerXML.='';
return($layerXML);
}
?>