Location: PHPKode > projects > Blogs manager > blogs/include/_category_masterlist.php
<?php
include("include/_category_settings.php");

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

//$strSQL = "select `id`,   `category`,   `info`  From `_category`";

$sqlHead="select `id`,   `category`,   `info`  ";
$sqlFrom="From `_category`";
$sqlWhere="";
$sqlTail="";

$where="";

if($detailtable=="categoriesblogs")
{
		$where.= GetFullFieldName("category")."=".make_db_value("category",$keys[1-1]);
}
if(!$where)
{
	$strTableName=$oldTableName;
	return;
}
	$str = SecuritySQL("Search");
	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"]));
	

//	category - 
			$value="";
				$value = ProcessLargeText(GetData($data,"category", ""),"field=category".$keylink);
			$smarty->assign("showmaster_category",$value);

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

// events

?>
Return current item: Blogs manager