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

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



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

//connect database
$conn = db_connect();

$keys=array();
$keys["codigo_tarjeta"]=postvalue("editid1");

//	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,"codigo_tarjeta", "")));

$keylink="";
$keylink.="&key1=".htmlspecialchars(urlencode($data["codigo_tarjeta"]));

////////////////////////////////////////////
//	codigo_tarjeta - 
	$value="";
		$value = ProcessLargeText(GetData($data,"codigo_tarjeta", ""),"","",MODE_VIEW);
	$smarty->assign("show_codigo_tarjeta",$value);
////////////////////////////////////////////
//	flag - 
	$value="";
		$value = ProcessLargeText(GetData($data,"flag", ""),"","",MODE_VIEW);
	$smarty->assign("show_flag",$value);
////////////////////////////////////////////
//	fecha_creacion - 
	$value="";
		$value = ProcessLargeText(GetData($data,"fecha_creacion", ""),"","",MODE_VIEW);
	$smarty->assign("show_fecha_creacion",$value);
////////////////////////////////////////////
//	tarja_anterior - 
	$value="";
		$value = ProcessLargeText(GetData($data,"tarja_anterior", ""),"","",MODE_VIEW);
	$smarty->assign("show_tarja_anterior",$value);
////////////////////////////////////////////
//	id_especie - 
	$value="";
		$value = ProcessLargeText(GetData($data,"id_especie", ""),"","",MODE_VIEW);
	$smarty->assign("show_id_especie",$value);
////////////////////////////////////////////
//	num_cajas - 
	$value="";
		$value = ProcessLargeText(GetData($data,"num_cajas", ""),"","",MODE_VIEW);
	$smarty->assign("show_num_cajas",$value);
////////////////////////////////////////////
//	id_envase - 
	$value="";
		$value = ProcessLargeText(GetData($data,"id_envase", ""),"","",MODE_VIEW);
	$smarty->assign("show_id_envase",$value);
////////////////////////////////////////////
//	id_tipo - 
	$value="";
		$value = ProcessLargeText(GetData($data,"id_tipo", ""),"","",MODE_VIEW);
	$smarty->assign("show_id_tipo",$value);
////////////////////////////////////////////
//	proveedor - 
	$value="";
		$value = ProcessLargeText(GetData($data,"proveedor", ""),"","",MODE_VIEW);
	$smarty->assign("show_proveedor",$value);

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

?>