<?php 
ini_set("display_errors","1");
ini_set("display_startup_errors","1");
set_magic_quotes_runtime(0);

include("include/dbcommon.php");
include("include/pf_sensorxcamara_variables.php");



$filename="";	
$message="";

//connect database
$conn = db_connect();

$keys=array();
$keys["LecturaDirModulo"]=postvalue("editid1");
$keys["LecturaDirTipo"]=postvalue("editid2");

//	get current values and show edit controls

$strSQL=$gstrSQL;
$where = KeyWhere($keys);
$strSQL = AddWhere($strSQL,$where);



LogInfo($strSQL);
$rs=db_query($strSQL,$conn);
$data=db_fetch_array($rs);


include('libs/Smarty.class.php');
$smarty = new Smarty();

	$smarty->assign("show_key1", htmlspecialchars(GetData($data,"LecturaDirModulo", "")));
	$smarty->assign("show_key2", htmlspecialchars(GetData($data,"LecturaDirTipo", "")));

$keylink="";
$keylink.="&key1=".htmlspecialchars(urlencode($data["LecturaDirModulo"]));
$keylink.="&key2=".htmlspecialchars(urlencode($data["LecturaDirTipo"]));

////////////////////////////////////////////
//	LecturaDirModulo - 
	$value="";
		$value = ProcessLargeText(GetData($data,"LecturaDirModulo", ""),"","",MODE_VIEW);
	$smarty->assign("show_LecturaDirModulo",$value);
////////////////////////////////////////////
//	LecturaDirTipo - 
	$value="";
		$value = ProcessLargeText(GetData($data,"LecturaDirTipo", ""),"","",MODE_VIEW);
	$smarty->assign("show_LecturaDirTipo",$value);
////////////////////////////////////////////
//	id_camara - 
	$value="";
		$value = ProcessLargeText(GetData($data,"id_camara", ""),"","",MODE_VIEW);
	$smarty->assign("show_id_camara",$value);
////////////////////////////////////////////
//	id_status - 
	$value="";
		$value = ProcessLargeText(GetData($data,"id_status", ""),"","",MODE_VIEW);
	$smarty->assign("show_id_status",$value);
////////////////////////////////////////////
//	Nombre_modulo - 
	$value="";
		$value = ProcessLargeText(GetData($data,"Nombre_modulo", ""),"","",MODE_VIEW);
	$smarty->assign("show_Nombre_modulo",$value);
////////////////////////////////////////////
//	limite_minimo - 
	$value="";
		$value = ProcessLargeText(GetData($data,"limite_minimo", ""),"","",MODE_VIEW);
	$smarty->assign("show_limite_minimo",$value);
////////////////////////////////////////////
//	limite_maximo - 
	$value="";
		$value = ProcessLargeText(GetData($data,"limite_maximo", ""),"","",MODE_VIEW);
	$smarty->assign("show_limite_maximo",$value);

$smarty->display("pf_sensorxcamara_view.htm");

?>