
function myxlinks(){
global $xoopsUser, $HTTP_COOKIE_VARS, $xoopsConfig,$xoopsTheme;
global $xoopsDB;
include_once(XOOPS_ROOT_PATH."/class/module.errorhandler.php");
include_once(XOOPS_ROOT_PATH."/include/xoopscodes.php");
$uid = $xoopsUser->getVar("uid");
$q = "SELECT lid, url, title, type FROM ".$xoopsDB->prefix("myxlinks_favorites")." WHERE uid = '$uid'";
$result = $xoopsDB->query($q) or die("");
$row_xoops_myxlinks_favs = mysql_fetch_assoc($result);
$totalRows_xoops_myxlinks_favs = mysql_num_rows($result);
if ($totalRows_xoops_myxlinks_favs > 0) {
$block = array();
$block['title'] = "Personal Links";
$block['content'].= "";
$block['content'].= "";
$block['content'].= "";
while ($myrow = $xoopsDB->fetchArray($result)){
$type = $myrow['type'];
$url = $myrow['url'];
$title = $myrow['title'];
$block['content'].= "$type$url target=_blank>$title";
}
$block['content'].= "
";
$block['content'].= "
.XOOPS_URL."/modules/myxlinks/showlinks.php'>Edit Links";
}else{
$block['content'].= "You do not have any
";
$block['content'].= "links setup, would you
";
$block['content'].= "like to set up some
";
$block['content'].= "personal Links? >>.XOOPS_URL."/modules/myxlinks/showlinks.php'>Yes<<";
}
return $block;
}
?>