Location: PHPKode > projects > Valid tiny-erp > validerp/include/syncategory_masterprint.php
<?php
include("include/syncategory_settings.php");

function DisplayMasterTableInfo($detailtable, $keys)
{
	global $conn,$strTableName,$smarty;
	
	$oldTableName=$strTableName;
	$strTableName="syncategory";

//$strSQL = "select `id_syncategory`,   `userid`,   `catsynallasomenos`,   `details`  From `syncategory`";

$sqlHead="select `id_syncategory`,   `userid`,   `catsynallasomenos`,   `details`  ";
$sqlFrom="From `syncategory`";
$sqlWhere="";
$sqlTail="";

$where="";

if($detailtable=="synallasomenos")
{
		$where.= GetFullFieldName("id_syncategory")."=".make_db_value("id_syncategory",$keys[1-1]);
}
if(!$where)
{
	$strTableName=$oldTableName;
	return;
}
	$str = SecuritySQL("Export");
	if(strlen($str))
		$where.=" and ".$str;
	
	$strWhere=whereAdd($sqlWhere,$where);
	if(strlen($strWhere))
		$strWhere=" where ".$strWhere." ";
	$strSQL= $sqlHead.$sqlFrom.$strWhere.$sqlTail;

//	$strSQL=AddWhere($strSQL,$where);

	LogInfo($strSQL);
	$rs=db_query($strSQL,$conn);
	$data=db_fetch_array($rs);
	$keylink="";
	$keylink.="&key1=".htmlspecialchars(rawurlencode($data["id_syncategory"]));
	

//	catsynallasomenos - 
			$value="";
				$value = ProcessLargeText(GetData($data,"catsynallasomenos", ""),"field=catsynallasomenos".$keylink,"",MODE_PRINT);
			$smarty->assign("showmaster_catsynallasomenos",$value);

//	details - 
			$value="";
				$value = ProcessLargeText(GetData($data,"details", ""),"field=details".$keylink,"",MODE_PRINT);
			$smarty->assign("showmaster_details",$value);
	$strTableName=$oldTableName;
}

// events

?>
Return current item: Valid tiny-erp