示例#1
0
$breadcrumbObj->setTitle("Ranks");
$breadcrumbObj->addCrumb("Home", $MAIN_ROOT);
$breadcrumbObj->addCrumb("Ranks");
include $prevFolder . "include/breadcrumb.php";
?>


<table id='rankPageTable' class='formTable' style='width: 75%; margin-left: auto; margin-right: auto'>
<?php 
$result = $mysqli->query("SELECT rankcategory_id FROM " . $dbprefix . "rankcategory WHERE hidecat = '0' ORDER BY ordernum DESC");
while ($row = $result->fetch_assoc()) {
    $rankCatObj->select($row['rankcategory_id']);
    $rankCatInfo = $rankCatObj->get_info_filtered();
    if ($rankCatInfo['useimage'] == 1 && $rankCatInfo['imageurl'] != "") {
        if ($rankCatInfo['imagewidth'] == 0) {
            $imageURL = $rankCatObj->getLocalImageURL();
            $imageSize = getimagesize($imageURL);
            $rankCatInfo['imagewidth'] = $imageSize[0];
        }
        if ($rankCatInfo['imageheight'] == 0) {
            $imageURL = $rankCatObj->getLocalImageURL();
            $imageSize = getimagesize($imageURL);
            $rankCatInfo['imageheight'] = $imageSize[1];
        }
        echo "\n\t\t\t<tr>\n\t\t\t\t<td class='main' align='center' colspan='2'><img src='" . $rankCatInfo['imageurl'] . "' width='" . $rankCatInfo['imagewidth'] . "' height='" . $rankCatInfo['imageheight'] . "' onmouseover=\"showToolTip('<b>" . $rankCatInfo['name'] . "</b><br>" . $rankCatInfo['description'] . "')\" onmouseout='hideToolTip()'></td>\n\t\t\t</tr>\n\t\t";
    } else {
        $dispCatDesc = "";
        if ($rankCatInfo['description'] != "") {
            $dispCatDesc = " style='cursor: pointer' onmouseover=\"showToolTip('<b>" . $rankCatInfo['name'] . "</b><br>" . $rankCatInfo['description'] . "')\" onmouseout='hideToolTip()'";
        }
        echo "\n\t\t\t<tr>\n\t\t\t\t<td class='formTitle' align='center' colspan='2'><span" . $dispCatDesc . ">" . $rankCatInfo['name'] . "</span></td>\n\t\t\t</tr>\n\t\t";