示例#1
0
    //'<center>Point: map='.@$p[0].' x='.@$p[1].' y='.@$p[2].' z='.@$p[3].'</center>';
}
if ($waypoint = @$_REQUEST['waypoint']) {
    $ajaxptr .= '&waypoint=' . $waypoint;
    $pointsList->addWaypoint($waypoint, $dDB->selectCell('SELECT `map` FROM `creature` WHERE `guid` = ?d', $waypoint));
}
if ($width) {
    $ajaxptr .= "&width={$width}";
}
$ajaxmode = !(!$ajaxmode || @$_REQUEST['map'] == '' && $area == 0 && !isset($_REQUEST['gps']));
if (!$ajaxmode) {
    echo "<script type=\"text/javascript\" src=\"js/mapper.js\"></script>";
    echo $text;
    if ($pointsList->getCount()) {
        // Create maps and area list
        $list = $pointsList->getMapsList();
        if (count(@$list['area']) + count(@$list['map']) > 1) {
            echo "<select onchange=\"areaSelect(this)\" style=\"WIDTH: " . ($width + 8) . "px\">";
            if (isset($list['area'])) {
                echo '<optgroup label="' . $lang['map_areas'] . '">';
                foreach ($list['area'] as $a) {
                    echo "<option value='?area=" . $a['id'] . $ajaxptr . "'>" . $a['text'] . "</option>";
                }
                echo '</optgroup>';
            }
            if (isset($list['gps'])) {
                foreach ($list['gps'] as $g) {
                    echo "<option value='?map=" . $map . $ajaxptr . "&gps'>" . $lang['map_gps'] . ' - ' . $g['text'] . "</option>";
                }
            }
            if (isset($list['map'])) {