Ver Mensaje Individual
  #7 (permalink)  
Antiguo 09/11/2012, 07:57
eldespertador
 
Fecha de Ingreso: agosto-2012
Mensajes: 33
Antigüedad: 12 años, 2 meses
Puntos: 0
Respuesta: Generar sólo una parte de la página con php

Os dejo el código completo. Creo que falla la parte de abajo del html, ¿cómo lo tendría que poner para que aparezca el formulario en pantalla? Ahora me sale la pantalla en blanco.

Código:
<?php
/**
 * ReOS is a vertical software for real estates.
 * Copyright 2010 IT ELAZOS S.L.
 *
 * This file is part of ReOS v2.x.x.
 *
 * ReOS is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * ReOS is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with ReOS.  If not, see <http://www.gnu.org/licenses/>.
 **/

/**
 *Returns xml node for search immos by criterias.
 *@package blocks_public
 **/
 
define("FILE_EXT","_adm");
require_once("includes/lks_1.php");  // Lista de Hyperlinks
require_once("includes/constants.php");
require_once("includes/class_site_xml.php"); 

$PHP_SELF = $_SERVER['PHP_SELF'];

if (preg_match("/bookingsearch.php/i",$PHP_SELF)) {
	Header("HTTP/1.0 404 Not Found");
	die();
}


require_once(_DirINCLUDES."class_immo.php");
require_once(_DirINCLUDES."forms/forms_xml.php");
require_once(_DirINCLUDES."class_lovs.php");

$lovs= new lovs;
$lovs->getLovs('_LST_TP_SERVICIO',_IDIOMA);
$lovs->getLovs('_LST_TP_PROPIEDAD',_IDIOMA);
$lovs->getLovs('_LST_ORDER',_IDIOMA, TRUE);
$lovs->getLovs('_LST_PRICE',_IDIOMA, TRUE,"#");

global $keywords;
global $id_org_session;
global $nm;

$out="";

$immo= new immo;

$form = new xmlform("form1","".LK_HOME_ADM."","GET",""._FIND."");

//---------------------------------------------------------

$form->add_textbox("ref_immo",""._REF_IMMO.":",10,10);
$form->add_static_listbox("precio_min",_PRICE_MIN.":",_LST_PRICE,"#");
$form->add_static_listbox("precio_max",_PRICE_MAX.":",_LST_PRICE,"#");
$this->onload.="initDynamicOptionLists();"; $this->file_script="jscripts/dol.js";
$result=$immo->array_pob_zona($id_org_session,true);
$form->add_link_2listbox(""._TXT_POBLACION.":",""._TXT_ZONA.":","txt_poblacion","txt_zona",$result,""._ANY."");
$form->add_datebox( "dt_start_bk", ""._DT_START.":", 8, 10 );
$form->add_datebox( "dt_end_bk", ""._DT_END.":", 8, 10 );
$form->add_static_listbox("order_by",""._ORDERBY.":","precio;"._PRECIO.",ref_immo;"._REF_IMMO.",txt_poblacion;"._TXT_POBLACION.",tp_propiedad;"._TP_PROPIEDAD."");
$form->add_static_listbox("in_order",""._ORDER.":",""._LST_ORDER."");
$form->add_hidden("data");


if (!$form->process()){
	if (isset($keywords)) {parse_str(preg_replace("/,/","&",$keywords),$fields);
	while (list($key,$value)=each($fields))
	if ($key!="tp_state" && $key!="dt_create") $form->fields[$key]->value = $value;
	}
	$form->fields["data"]->value = $this->txt_encrypt("pg=verbookings&nm="._RESULTS."&show=0&from=0");
}

$out.=$form->draw();

$this->html_out .= "<immosearch>\n"."<title>"._FIND_BY_CRITERIA."</title>".$out."</immosearch>";


?>



<html> <head>
</head>
<body>
<? //vuelves a abrir espacio para codigo php
echo"<form name='form1' action='' method='POST'>"; //ejemplo de html embebido
?>
</body>
</html>