ID==-1) { Sin_sesion(); } $conn->ger_entolocal($geraplibd, 'WWW_GERAPLIBD'); if ($geraplibd!='') { $geraplibd=$geraplibd.".dbo."; } echo "\n"; echo "\n"; echo "Noticias\n"; $xweb=$_POST[GERWEB]; $xempresa=$_POST[GEREMPRESA]; $xgerini=$_POST[GERINI]; $sini=$sinidos=''; if ($xgerini!='') { $sini=$_POST[GERINI] . "/"; $sinidos=$_POST[GERINI]."\\"; } echo " \n"; echo " \n"; echo ' '; echo "\n"; echo ' '; echo "\n"; echo ' '; echo "\n"; echo ' '; echo "\n"; echo ' '; echo "\n"; echo ' '; echo "\n"; echo ' '; echo "\n"; echo ' '; echo "\n"; if ($_POST[GERIDIOMA]=='ES') { echo ' '; echo "\n"; } if ($_POST[GERIDIOMA]=='IN') { echo ' '; echo "\n"; } if ($_POST[GERIDIOMA]=='FR') { echo ' '; echo "\n"; } if ($_POST[GERIDIOMA]=='PT') { echo ' '; echo "\n"; } if ($_POST[GERIDIOMA]=='CA') { echo ' '; echo "\n"; } if ($_POST[GERIDIOMA]=='AL') { echo ' '; echo "\n"; } if ($_POST[GERIDIOMA]=='IT') { echo ' '; echo "\n"; } if ($_POST[GERIDIOMA]=='RU') { echo ' '; echo "\n"; } /* echo "\n"; */ echo ' '; echo "\n"; echo "\n"; echo "\n"; Actualizar_tit_cabe($xcabecera); $tpanta=array(); $buffer='select * from ' . $geraplibd . 'XW_PANTALLA where WEB=\'' . $xweb . '\' and EMPRESA=\''. $xempresa . '\''; $conn->ger_exec ($cursor1, $buffer); $rc= gerdb_fetch ($cursor1, $tpanta); if ($rc!='') { $tpanta[COLOR_RECUADRO]='#EEEEEE'; } $geruser = $_POST[GERUSER]; $gerpass = $_POST[GERPASS]; $identi=$_POST[ROWID]; $web = $_POST[GERWEB]; $empresa = $_POST[GEREMPRESA]; $idiomas_arr=array(); $buffer='select IDIOMA, CORTO, LARGO, GRAFICO from ' . $geraplibd . 'XW_IDIOMAS (NOLOCK) where WEB=\''.$web.'\' and ACTIVO=\'S\' order by IDIOMA ASC'; $conn->ger_exec ($cursor1, $buffer); $rc= gerdb_fetch ($cursor1, $idiomas_arr); $idiomas=array(); $i=0; while ($rc==''){ $idiomas[$i][idioma] =$idiomas_arr[IDIOMA]; $idiomas[$i][corto] =$idiomas_arr[CORTO]; $idiomas[$i][largo] =$idiomas_arr[LARGO]; $idiomas[$i][grafico]=$idiomas_arr[GRAFICO]; $i++; $rc= gerdb_fetch ($cursor1, $idiomas_arr); } $conn->ger_tradu($lit_noticia, '#99999', 'Noticia','','','','Noticia'); $conn->ger_tradu($lit_grupo, '#99999', 'Grupo','','','','Grup'); $conn->ger_tradu($lit_nuevogrupo, '#99999', 'Definir nuevo grupo','','','','Definir nou grup'); $conn->ger_tradu($lit_fechaalta, '#99999', 'Fecha alta','','','','Data alta'); $conn->ger_tradu($lit_fechacaduca, '#99999', 'Fecha caduca','','','','Data caducitat'); $conn->ger_tradu($lit_generales, '#99999', 'Datos generales', 'Background', 'Des donn‚es g‚n‚rales', 'Fundo', 'Dades generals'); $conn->ger_tradu($lit_descri, '#99999', 'Descripción','','','','Descripció'); $conn->ger_tradu($lit_modificar, '#99999', 'Aceptar','','','','Acceptar'); $conn->ger_tradu($cancelar, '#99999', 'Cancelar','','','','Cancel·lar'); $conn->ger_tradu($lit_error1, '#99999', 'Tiene que introducir un valor para los campos noticia y grupo','','','','Té que introduir un valor per els camps noticia i grup'); $lit_tit = $xcabecera . " " . $lit_noticia; $xtitulo=$lit_tit; $modificado=""; $modificar=''; if($_POST[MODIFICAR]=='S' || $_POST[ACTUALIZAR]=='S'){ $sroot=getenv('WWW_ROOT'); $tiempo=microtime(true); if (isset($sroot)) { $dire=$sroot . '\\tmp\\'.$geruser; $ok=mkdir($dire); } else { $dire='c:\\inetpub\\wwwroot\\tmp\\'.$geruser; $ok=mkdir($dire); } $fiche = array(); $descri = array(); $tamany = array(); for ($ii=1; $ii<=8; $ii++) { $tamany[$ii]=0; } for ($ii=0; $ii 

'){ $tamany[$kk]=0; } else { $tamany[$kk]=filesize($fiche[$kk]); } } $noticia = $_POST[Noticia]; $fcaduca = $_POST[fcaduca]; $falta = $_POST[falta]; $grupo = $_POST[Grupo]; if ($grupo=='@NUEVO'){ $grupo=$_POST[Grupo_nuevo]; } if ($descri[1]==''){$descri[1]=$descri[2];} if ($descri[1]==''){$descri[1]=$descri[3];} if ($descri[1]==''){$descri[1]=$descri[4];} if ($descri[1]==''){$descri[1]=$descri[5];} if ($descri[1]==''){$descri[1]=$descri[6];} if ($descri[1]==''){$descri[1]=$descri[7];} if ($descri[1]==''){$descri[1]=$descri[8];} if ($xmod=='A') { $buffer='insert into ' . $geraplibd . 'XW_NOTICIAS (WEB, EMPRESA, NOTICIA, GRUPO, DESCRIPCION1, DESCRIPCION2, DESCRIPCION3, DESCRIPCION4, DESCRIPCION5, DESCRIPCION6, DESCRIPCION7, DESCRIPCION8, FECHA_ALTA, FECHA_CADUCA, SIZE1, TEXTO1, SIZE2, TEXTO2, SIZE3, TEXTO3, SIZE4, TEXTO4, SIZE5, TEXTO5, SIZE6, TEXTO6, SIZE7, TEXTO7, SIZE8, TEXTO8) values '; $buffer.='(\''.$web.'\', \''.$empresa.'\', \''.$noticia.'\', \''.$grupo.'\', \''.str_replace("'","''",$descri[1]).'\', \''.str_replace("'","''",$descri[2]).'\', \''.str_replace("'","''",$descri[3]).'\', \''.str_replace("'","''",$descri[4]).'\', \''.str_replace("'","''",$descri[5]).'\', \''.str_replace("'","''",$descri[6]).'\', \''.str_replace("'","''",$descri[7]).'\', \''.str_replace("'","''",$descri[8]).'\', \''.$falta.'\', \''.$fcaduca.'\', '.$tamany[1].', \'0x01\', '.$tamany[2].', \'0x01\', '.$tamany[3].', \'0x01\', '.$tamany[4].', \'0x01\', '.$tamany[5].', \'0x01\', '.$tamany[6].', \'0x01\', '.$tamany[7].', \'0x01\', '.$tamany[8].', \'0x01\')'; } else { $buffer='update ' . $geraplibd . 'XW_NOTICIAS set NOTICIA = \'' . $noticia . '\', GRUPO=\''.$grupo.'\', FECHA_CADUCA=\'' . $fcaduca . '\', DESCRIPCION1=\'' . str_replace("'","''",$descri[1]) . '\', DESCRIPCION2=\'' . str_replace("'","''",$descri[2]) . '\', DESCRIPCION3=\'' . str_replace("'","''",$descri[3]) . '\', DESCRIPCION4=\'' . str_replace("'","''",$descri[4]) . '\', DESCRIPCION5=\'' . str_replace("'","''",$descri[5]) . '\', DESCRIPCION6=\'' . str_replace("'","''",$descri[6]) . '\', DESCRIPCION7=\'' . str_replace("'","''",$descri[7]) . '\', DESCRIPCION8=\'' . str_replace("'","''",$descri[8]) . '\', '; $buffer.= 'SIZE1=' . $tamany[1] . ', SIZE2=' . $tamany[2] . ', SIZE3=' . $tamany[3] . ', SIZE4=' . $tamany[4] . ', SIZE5=' . $tamany[5] . ', SIZE6=' . $tamany[6] . ', SIZE7=' . $tamany[7] . ', SIZE8=' . $tamany[8] . ' where IDENTI = ' . $identi; } $conn->ger_exec ($cursor1, $buffer); $identificador=array(); $buffer='select IDENTI from ' . $geraplibd. 'XW_NOTICIAS where WEB=\''.$web.'\' and EMPRESA=\''.$empresa.'\' and NOTICIA=\''.$noticia.'\' and DESCRIPCION1=\''.str_replace("'","''",$descri[1]).'\' and SIZE1='.$tamany[1].''; $conn->ger_exec ($cursor1, $buffer); $rc= gerdb_fetch ($cursor1, $identificador); $identi=$identificador[IDENTI]; if ($identi!='') { $groot = getenv('WWW_ROOT'); if ($groot=='') { $groot='c:\\inetpub\\wwwroot'; } $dir=$groot .'\\'.$_POST[GERPERFIL].'\\uweb'; $resul=mkdir($dir); $dir=$groot .'\\'.$_POST[GERPERFIL].'\\uweb\\noticias'; $resul=mkdir($dir); $dir=$groot .'\\'.$_POST[GERPERFIL].'\\uweb\\noticias\\'.$web.'_'.$empresa; $resul=mkdir($dir); for ($ii=0; $iiger_graba_grafico ($geraplibd ."XW_NOTICIAS", "TEXTO".$kk, $identi, $fiche[$kk]); } } if ($_POST[ACTUALIZAR]!='S'){ $modificado='S'; $modificar='N'; } else { $actualizar='N'; } } echo "
\n"; echo " \n"; if ($modificado!='S'){ echo " \n"; $identi=$noticia_old=''; if ($xmod=='M') { $tb=array(); $buffer='select IDENTI, NOTICIA, GRUPO, FECHA_ALTA, FECHA_CADUCA, DESCRIPCION1, DESCRIPCION2, DESCRIPCION3, DESCRIPCION4, DESCRIPCION5, DESCRIPCION6, DESCRIPCION7, DESCRIPCION8, SIZE1, SIZE2, SIZE3, SIZE4, SIZE5, SIZE6, SIZE7, SIZE8 from ' . $geraplibd . 'XW_NOTICIAS (NOLOCK) where IDENTI='.$_POST[ROWID]; $conn->ger_exec ($cursor1, $buffer); $rc= gerdb_fetch ($cursor1, $tb); $descri_old = array(); $tamany_old = array(); $identi = $tb[IDENTI]; $noticia_old = $tb[NOTICIA]; $falta_old = $tb[FECHA_ALTA]; $fcaduca_old = $tb[FECHA_CADUCA]; $grupo_old = $tb[GRUPO]; for ($ii=1; $ii<=8; $ii++) { $descri_old[$ii]=$tb[DESCRIPCION . $ii]; } for ($ii=1; $ii<=8; $ii++) { $tamany_old[$ii]=$tb[SIZE . $ii]; } } else { $falta_old = date('Y/m/d'); } $tabinicio=10; $tabancho=860; $gendespla=0; $tabdespla=10; $pestatop=105; $pestaalto=25; $cuerpotop=132; $tabalto=620; $botonalto=700; echo (""); echo (" \n"); echo ("
\n"); $ancho_tabla=$gendespla+$tabancho; echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
\n"; echo(' '); echo "\n"; echo(' \n"); $spuesto='N'; echo(' '); echo("\n"); echo(' \n"); $spuesto='N'; echo('
'); echo("\n"); echo(' '); echo("\n"); echo(' '); echo("\n"); echo("
'); echo(' '.$lit_modificar); echo ('
|'); echo("\n"); echo(' '); echo("\n"); echo(' '); echo("\n"); echo("
'); echo(' '.$cancelar); echo ('
'); echo "\n"; echo "
\n"; echo "
\n"; echo " $lit_generales\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; $tbele=array(); $buffer='select distinct GRUPO as grupo from ' . $geraplibd . 'XW_NOTICIAS (NOLOCK) where WEB=\''.$xweb.'\' and EMPRESA=\''.$xempresa.'\' order by GRUPO'; $conn->ger_exec ($cursor1, $buffer); $rc= gerdb_fetch ($cursor1, $tbele); echo " \n"; echo " \n"; echo " \n"; echo ' '; echo "\n"; echo "
$lit_noticia: ".str_replace(' ', ' ', $lit_fechaalta).": ".str_replace(' ', ' ', $lit_fechacaduca).": ".str_replace(' ', ' ', $lit_grupo).": \n"; echo " \n"; echo "
Utilizar el literal "#fin_resumen" para marcar el fin del contenido a visualizar en formato reducido.
"; echo ("
\n"); echo "
\n"; echo " \n"; echo " \n"; $_SESSION['userfilepath']=''; $_SESSION['userfilepath']=$srootns.'/'.$_POST[GERPERFIL].'/'.$web.'/'; for ($ii=0; $ii\n"; $descri=$descri_old[$kk]; echo "
".str_replace(' ', ' ', $lit_descri).": 
\n"; if ($xmod=='M') { $sroot=getenv('WWW_ROOT'); $tiempo=microtime(true); if (isset($sroot)) { $dire=$sroot . '\\tmp\\'.$geruser; $ok=mkdir($dire); } else { $dire='c:\\inetpub\\wwwroot\\tmp\\'.$geruser; $ok=mkdir($dire); } $tiempo=str_replace('.','',$tiempo); if (isset($sroot)) { $fichero=$sroot . '\\tmp\\' . $geruser . '\\Texto'.$tiempo.'.txt'; } else { $fichero='c:\\inetpub\\wwwroot\\tmp\\' . $geruser . '\\Texto'.$tiempo.'.txt'; } $identi=$_POST['ROWID']; $variable='TEXTO'.$kk; $conn->ger_lee_grafico ($geraplibd."XW_NOTICIAS", $variable, $identi, $fichero); $oFCKeditor->Value=file_get_contents($fichero); } echo ""; echo "\n"; echo " \n"; } echo ''; echo "\n"; } Poner_hidden_comunes(); echo (""); echo"\n"; echo (""); echo"\n"; echo ("\n"); echo ("\n"); echo ("\n"); echo "\n"; $xnivel=$_POST[GERNIVEL]; echo("\n"); function Obten_ip_servidor (&$ip_docu) { $ip_cliente=$_SERVER['REMOTE_HOST']; if (($_SERVER['HTTP_HA']=='1') || ($_SERVER['HTTP_HA_HTTPS']=='1')) { $ip_cliente=$_SERVER['HTTP_CLIENT_IP']; } $punto=0; $ip_rango_cli=''; $ip_servidor=getenv('WWW_SERVWEB'); if ($ip_servidor=="") { $ip_servidor=getenv('WWW_SERVIDOR'); } if ($ip_cliente=='127.0.0.1') { $ip_docu=$ip_servidor; return; } for ($i=0; $i<=strlen($ip_cliente); $i++) { $c=substr($ip_cliente, $i, 1); if ($c=='.') { $punto++; } if ($punto<2) { $ip_rango_cli.=$c; } } $punto=0; $ip_rango_svr=''; for ($i=0; $i<=strlen($ip_servidor); $i++) { $c=substr($ip_servidor, $i, 1); if ($c=='.') { $punto++; } if ($punto<2) { $ip_rango_svr.=$c; } } $ip_docu=$ip_servidor; if ($ip_rango_cli!=$ip_rango_svr) { $saux=getenv('WWW_IP_PUBLICA'); if ($saux!='') { $ip_docu=$saux; } } } ?>