Forum Moderators: coopster
$sQuery = "
SELECT
`tp`.`ID` as `id`,
`tp`.`NickName` AS `username`,
`tp`.`Headline` AS `headline`,
`tp`.`City` AS `city`,
`tp`.`DescriptionMe` AS `description`,
`tp`.`Email` AS `email`,
`tp`.`Couple` AS `coupleid`,
`tp`.`FirstName` AS `firstname`,
`tp`.`LastName` AS `lastname`;
$aProfiles = $GLOBALS['MySQL']->getAll($sQuery);
function show($aProfiles) {
$iEmailLength = 50;
$aItems = array();
foreach($aProfiles as $aProfile)
{
$sEmail = ( mb_strlen($aProfile['email']) > $iEmailLength ) ? mb_substr($aProfile['email'], 0, $iEmailLength) . '...' : $aProfile['email'];
// BREAK 1
$aItems[$aProfile['id']] = array(
'id' => $aProfile['id'],
'username' => $aProfile['username'],
'headline' => $aProfile['headline'],
'description' => $aProfile['description'],
'firstname' => $aProfile['firstname'],
'lastname' => $aProfile['lastname'],
'email' => $sEmail,
'full_email' => $aProfile['email'],
// BREAK 2
);
//BREAK 3
}
return $GLOBALS['oAdmTemplate']->parseHtmlByName('show.html', array(
'su_repeat:items' => array_values($aItems),
'paginate' => $sPaginate
));
} $coupleid = $aProfiles['coupleid'];
if($coupleid != 0){
$couplefirstname = mysql_query("SELECT `FirstName` FROM `Profiles` WHERE `ID` = $coupleid");
$couplelastname = mysql_query("SELECT `LastName` FROM `Profiles` WHERE `ID` = $coupleid");
}
else{}