Beispiel #1
0
 public static function mantenimientoBanner(EntidadBanner $objBannerEntidad, array $param)
 {
     $query = NULL;
     $error = NULL;
     $objMysql = new Mysql();
     try {
         $query = "CALL sp_mnt_banner('" . $param[0] . "',\n                                           '" . $objBannerEntidad->getIdbanner() . "',\n                                           '" . $objBannerEntidad->getTitulo() . "',    \n                                           '" . $objBannerEntidad->getUrl() . "',        \n                                           '" . $objBannerEntidad->getOrden() . "',\n                                           '" . $objBannerEntidad->getFoto() . "',    \n                                           '" . $objBannerEntidad->getFotochico() . "',        \n                                           '" . $objBannerEntidad->getEliminado() . "',    \n                                           '" . $objBannerEntidad->getCargaurl() . "',    \n                                           '" . $objBannerEntidad->getMostrar() . "',\n                                           '" . $objBannerEntidad->getIdcatempre() . "',\n                                           '" . $objBannerEntidad->getDescripcion() . "',\n                                           '" . $objBannerEntidad->getAbrir() . "',\n                                           '" . $objBannerEntidad->getEnlace() . "');";
         $rs = $objMysql->ejecutar($query);
         $error = 1;
     } catch (PDOException $exc) {
         $error = 0;
     }
     return $error;
 }
Beispiel #2
0
     $sAbrir = "";
 }
 if (isset($_POST["chkmostrar"])) {
     $nSwMostrar = $_POST["chkmostrar"];
 } else {
     $nSwMostrar = "";
 }
 if (isset($_POST["idclase"])) {
     $nIdclase = $_POST["idclase"];
 } else {
     $nIdclase = "";
 }
 $dirses = new Sesion();
 $dir = $dirses->getVariableSession("dir");
 include "DAOBanner.php";
 $objCategoriaBanner = new EntidadBanner();
 $objCategoriaBanner->setIdbanner($nId);
 $objCategoriaBanner->setTitulo($sNombre);
 $objCategoriaBanner->setDescripcion($sDescripcion);
 $objCategoriaBanner->setEnlace($sContenido);
 switch ($sContenido) {
     case 1:
         $objCategoriaBanner->setUrl("#");
         break;
     case 2:
         $objCategoriaBanner->setUrl($sEnlace);
         break;
     case 3:
         $objCategoriaBanner->setUrl($sExterno);
         break;
 }