Exemplo n.º 1
0
function mod_roster($r, $n, $us = "us", $size = "100%")
{
    $error = '';
    if (empty($r) || empty($n) || empty($us)) {
        echo 'Missing guild realm/name/or locale (us/eu).';
        return;
    }
    $r = stripslashes(str_replace(' ', '+', $r));
    $n = stripslashes(str_replace(' ', '+', $n));
    if (strtolower($us) == "us") {
        $us = "www";
    } else {
        $us = "eu";
    }
    $output = readXML('http://' . $us . '.wowarmory.com/guild-info.xml?r=' . $r . '&n=' . $n);
    if (strpos($output, "<guildInfo/>") !== false) {
        echo 'Incorrect guild realm/name/or locale (us/eu).';
        return;
    }
    groupHead("<b>Roster</b>", $size);
    /*
    echo '<textarea rows="12" cols="128" style="font-size: 11px;">';
    echo htmlspecialchars($output);
    echo '</textarea>';
    */
    echo '<table cellpadding="0" cellspacing="0" border="0" width="100%">';
    $pos = 0;
    $guildName = '';
    while (true) {
        $thisElem = readElement($output, $pos);
        if ($thisElem == false) {
            break;
        } else {
            $element = readAttribs($thisElem[0]);
            if ($element[0] == 'character') {
                //echo "<br />Element: [".$element[0]." | Name: ".$element['name'].", Gender: ".$element['gender'].", Race: ".$element['race'].", Class: ".$element['class']."]";
                $pic = strtolower($element['gender']) . '-' . strtolower(str_replace(' ', '', $element['race']));
                $pic2 = strtolower($element['class']);
                echo '<tr><td align="left" height="24"><a href="http://www.wowarmory.com/character-sheet.xml?' . $element['url'] . '" class="classCol' . $element['class'] . '">' . '<img src="../images/icons/race/' . $pic . '.gif" border="0" width="18" height="18" />' . '<img src="../images/icons/class/' . $pic2 . '.gif" border="0" alt="' . $pic2 . '" /> [<b>' . $element['level'] . '</b>] ' . $element['name'] . '</a></td><td align="right"><u>Rank ' . $element['rank'] . '</u></td></tr>';
            }
            $pos = $thisElem[1];
        }
    }
    echo '</table>';
    groupFoot();
}
Exemplo n.º 2
0
    }
    echo '<b><a href="analyze.php?u=' . $shout[$i] . '"';
    if (rights($shout[$i]) == 'admin') {
        echo ' style="color: #CC0000;" title="' . $shout[$i] . ' is an administrator."';
    } elseif (rights($shout[$i]) == 'moderator') {
        echo ' style="color: #00CC00;" title="' . $shout[$i] . ' is a moderator."';
    }
    echo '>' . $shout[$i] . '</a></b>';
    echo '<br />' . $shout[$i + 2];
    if ($i > 0 && $max > 0) {
        $tmp = $i / 3 % 3;
        if ($tmp == 0) {
            echo '<hr size="1" color="#CCCCFF">';
        } elseif ($tmp == 1) {
            echo '<hr size="1" color="#FFCCCC">';
        } elseif ($tmp == 2) {
            echo '<hr size="1" color="#CCFFCC">';
        }
    }
}
groupFoot($sideColor, "", "yes");
echo '</td></tr></table>';
echo '</td>';
echo '</tr></table>';
echo '<p />&nbsp;<p />';
echo '<br /><center><i>Background image copyright &copy;2007 <a href="http://wvs.topleftpixel.com/">sam javanrouh</a></i></center>';
echo '<br /><center>If you would like to make a donation to help further the production of this site, please visit the ads at the top of the page.</center>';
include "tracker.php";
?>
</body>
</html>
Exemplo n.º 3
0
        groupFoot();
    }
} else {
    if (isset($_SESSION['user']) && empty($error)) {
        groupHead("Login", 400);
        echo '<table cellpadding="0" cellspacing="0" border="0" width="100%">';
        echo '<div align="center">You are now logged in as ' . $_SESSION['user'] . '.<br /><br /><a href="index.php">Back to Home Page</a></div>';
        echo '</table>';
        groupFoot();
    } else {
        groupHead("Login", 400);
        if (!empty($error)) {
            echo '<div align="center" style="font-weight: bold; color: #FF0000;"><br />' . $error . '</div><br />';
        }
        echo '<form name="register" action="login.php" method="post">';
        echo '<input type="hidden" name="login" value="yes">';
        echo '<input type="hidden" name="refer" value="' . $_SERVER['HTTP_REFERER'] . '">';
        echo '<table cellpadding="0" cellspacing="0" border="0" width="100%">';
        echo '<tr class="login"><td align="right" width="50%">Username:&nbsp;&nbsp;</td><td align="left"><input type="text" name="user" size="24" maxlength="15" value="' . $_POST['user'] . '"></td></tr>';
        echo '<tr class="login"><td align="right" width="50%">Password:&nbsp;&nbsp;</td><td align="left"><input type="password" name="pass" size="24" maxlength="15"></td></tr>';
        echo '<tr class="login"><td align="center" colspan="2"><input type="submit" value="Login"></td></tr>';
        echo '</table>';
        echo '</form>';
        groupFoot();
    }
}
echo '</td></tr></table>';
?>

</body>
</html>
Exemplo n.º 4
0
    }
    // End For
    echo '</tr></table>';
    echo $nl . '<script type="text/javascript" language="javascript1.1">' . $nl;
    echo '<!--' . $nl;
    echo 'function finished() {' . $nl;
    echo 'document.getElementById("totalviews").innerHTML = \'Total Views: ' . array_sum($views) . '\';' . $nl;
    echo 'document.getElementById("totaldownloads").innerHTML = \'Total Downloads: ' . array_sum($downloads) . '\';' . $nl;
    echo '}' . $nl;
    echo '//-->' . $nl;
    echo '</script>' . $nl;
    if (count($myTracks) == 0) {
        echo 'This user hasn\'t uploaded any tracks yet.';
    }
    groupFoot($userColor);
    echo '</td></tr></table>';
} else {
    echo '<p />&nbsp;<p />&nbsp;<p />';
    groupHead("<center>Track Manager</center>", "993333");
    echo 'You must be logged in to analyze your tracks.';
    groupFoot("993333");
}
?>


<?php 
include "tracker.php";
?>

</body>
</html>