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

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

//$strSQL = "select `id`,   `order`,   `name`,   `email`,   `username`,   `password`,   `adminpanel`,   `date`,   `info`,   `int1`,   `int2`,   `char1`,   `char2`  From `_authors` ";

$sqlHead="select `id`,   `order`,   `name`,   `email`,   `username`,   `password`,   `adminpanel`,   `date`,   `info`,   `int1`,   `int2`,   `char1`,   `char2`  ";
$sqlFrom="From `_authors` ";
$sqlWhere="";
$sqlTail="";

$where="";

if($detailtable=="chosen blogs")
{
		$where.= GetFullFieldName("username")."=".make_db_value("username",$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"]));
	

//	date - Short Date
			$value="";
				$value = ProcessLargeText(GetData($data,"date", "Short Date"),"field=date".$keylink,"",MODE_PRINT);
			$smarty->assign("showmaster_date",$value);

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

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

// events

?>
Return current item: Blogs manager