Пример #1
0
function listTakeoffs($res, $legend, $query_str = "", $sortOrder = "CountryCode")
{
    global $db, $Theme;
    global $takeoffRadious;
    global $userID;
    global $moduleRelPath;
    global $PREFS;
    global $page_num, $pagesNum, $startNum, $itemsNum;
    global $currentlang, $nativeLanguage, $opMode;
    global $countries;
    $legendRight = "";
    $headerSelectedBgColor = "#F2BC66";
    open_inner_table("<table class=main_text width=100%><tr><td>{$legend}</td><td width=300 align=right bgcolor=#eeeeee>{$legendRight}</td></tr></table>", 750);
    ?>
  <td width="25" bgcolor="<?php 
    echo $Theme->color1;
    ?>
"><div align=left><?php 
    echo _NUM;
    ?>
</div></td>
 <?php 
    printHeaderTakeoffs(120, $headerSelectedBgColor, $Theme->color0, $sortOrder, "CountryCode", _COUNTRY, $query_str);
    printHeaderTakeoffs(0, $headerSelectedBgColor, $Theme->color2, $sortOrder, "clubName", _CLUB_NAME, $query_str);
    printHeaderTakeoffs(120, $headerSelectedBgColor, $Theme->color3, $sortOrder, "FlightsNum", _NUMBER_OF_FLIGHTS, $query_str);
    printHeaderTakeoffs(100, $headerSelectedBgColor, $Theme->color4, $sortOrder, "max_distance", _SITE_RECORD_OPEN_DISTANCE, $query_str);
    ?>
</tr>
<?php 
    $currCountry = "";
    $i = 1;
    while ($row = $db->sql_fetchrow($res)) {
        $takeoffName = $row["name"];
        //	 $sortRowBgColor=($i%2)?"#CCCACA":"#E7E9ED";
        $sortRowBgColor = "#E7E9ED";
        $bgcolor = "";
        if ($countries[$row["countryCode"]] != $currCountry || $sortOrder != 'CountryCode') {
            $currCountry = $countries[$row["countryCode"]];
            $country_str = "<div align=left>" . "<a href='" . CONF_MODULE_ARG . "&op=list_clubs&country=" . $row["countryCode"] . "'>" . $currCountry . "</a>" . "</div>";
            if ($sortOrder == 'CountryCode') {
                $bgcolor = "bgcolor=#DDDDDD";
            } else {
                $bgcolor = $i % 2 ? "bgcolor=#DDDDDD" : "";
            }
        } else {
            $country_str = "";
        }
        $i++;
        echo "<TR {$bgcolor} align=right>";
        echo "<TD {$first_col_back_color} ><div align=left>" . ($i - 1 + $startNum) . "</div></TD>      ";
        echo "<TD valign=top>{$country_str}</TD>";
        echo "<TD " . ($sortOrder == "takeoffID" ? "bgcolor=" . $sortRowBgColor : "") . ">" . "<div align=left>" . "<a href='" . CONF_MODULE_ARG . "&op=show_club&clubIDview=" . $row["ID"] . "'><img src='" . $moduleRelPath . "/img/icon_magnify_small.gif' border=0></a>" . "&nbsp;" . "<a href='" . CONF_MODULE_ARG . "&op=list_flights&clubID=" . $row["ID"] . "'>" . $takeoffName . "</a>" . "</div></TD>";
        echo "<TD " . ($sortOrder == "LINEAR_DISTANCE" ? "bgcolor=" . $sortRowBgColor : "") . "><div align=right>" . $row["FlightsNum"] . " (<a href='" . CONF_MODULE_ARG . "&op=list_flights&clubID=" . $row["ID"] . "'>" . _SHOW_FLIGHTS . "</a>)</div></TD>\t";
        echo "<TD " . ($sortOrder == "LINEAR_DISTANCE" ? "bgcolor=" . $sortRowBgColor : "") . "><div align=right>" . formatDistanceOpen($row["max_distance"]) . "</div></TD>\t";
        close_tr();
    }
    close_inner_table();
    $db->sql_freeresult($res);
}
Пример #2
0
function listTakeoffs($res, $legend, $queryExtraArray = array(), $sortOrder = "CountryCode")
{
    global $db, $Theme, $takeoffRadious, $userID, $moduleRelPath;
    global $PREFS;
    global $page_num, $pagesNum, $startNum, $itemsNum;
    global $currentlang, $nativeLanguage, $countries;
    $headerSelectedBgColor = "#F2BC66";
    ?>
  <table class='listTable' width="100%" cellpadding="2" cellspacing="0">
  <tr>
  	<td width="25" class='SortHeader'><?php 
    echo _NUM;
    ?>
</td>
 	<?php 
    printHeaderTakeoffs(100, $sortOrder, "CountryCode", _COUNTRY, $queryExtraArray);
    printHeaderTakeoffs(0, $sortOrder, "intName", _TAKEOFF, $queryExtraArray);
    printHeaderTakeoffs(80, $sortOrder, "FlightsNum", _NUMBER_OF_FLIGHTS, $queryExtraArray);
    printHeaderTakeoffs(100, $sortOrder, "max_distance", _SITE_RECORD_OPEN_DISTANCE, $queryExtraArray);
    ?>
	</tr>
<?php 
    $currCountry = "";
    $i = 1;
    while ($row = $db->sql_fetchrow($res)) {
        $takeoffName = selectWaypointName($row["name"], $row["intName"], $row["countryCode"]);
        $sortRowClass = "l_row1";
        if ($countries[$row["countryCode"]] != $currCountry || $sortOrder != 'CountryCode') {
            $currCountry = $countries[$row["countryCode"]];
            $country_str = "<a href='" . getLeonardoLink(array('op' => 'list_flights', 'country' => $row["countryCode"], 'takeoffID' => '0')) . "'>" . $currCountry . "</a>";
            if ($sortOrder == 'CountryCode') {
                $sortRowClass = "l_row2";
            } else {
                $sortRowClass = $i % 2 ? "l_row1" : "l_row2";
            }
        } else {
            $country_str = "&nbsp;";
        }
        $i++;
        echo "<TR class='{$sortRowClass}'>";
        echo "<TD>" . ($i - 1 + $startNum) . "</TD>";
        echo "<TD>{$country_str}</TD>";
        $takeoffNameSafe = str_replace("'", "\\'", $takeoffName);
        $takeoffNameSafe = str_replace('"', '\\"', $takeoffNameSafe);
        $takeoffNameSafe = htmlspecialchars($takeoffName);
        echo "<TD class='alLeft'><div align=left id='t_{$i}'>";
        //	echo "<a href='javascript:nop()' onclick=\"takeoffTip.newTip('inline', 0, 13, 't_$i', 250, '".$row["takeoffID"]."','".str_replace("'","\'",$takeoffName)."')\"  onmouseout=\"takeoffTip.hide()\">$takeoffName</a>";
        echo "<a href=\"javascript:takeoffTip.newTip('inline', 0, 13, 't_{$i}', 250, '" . $row["takeoffID"] . "','" . str_replace("'", "\\'", $takeoffNameSafe) . "')\"  onmouseout=\"takeoffTip.hide()\">{$takeoffName}</a>";
        echo "</div></TD>";
        echo "<TD>" . $row["FlightsNum"] . "</TD>";
        echo "<TD>" . formatDistanceOpen($row["max_distance"]) . "</TD>";
        echo "</TR>";
    }
    echo "</table>";
    $db->sql_freeresult($res);
}
Пример #3
0
    }
    if ($sortOrder == $fieldName) {
        echo "<td {$widthStr}  class='SortHeader activeSortHeader {$alignClass}'>\n\t\t\t<a href='" . CONF_MODULE_ARG . "&op=admin_takeoffs&sortOrder={$fieldName}{$query_str}'>{$fieldDesc}<img src='{$moduleRelPath}/img/icon_arrow_down.png' border=0  width=10 height=10></div>\n\t\t</td>";
    } else {
        echo "<td {$widthStr}  class='SortHeader {$alignClass}'><a href='" . CONF_MODULE_ARG . "&op=admin_takeoffs&sortOrder={$fieldName}{$query_str}'>{$fieldDesc}</td>";
    }
}
$headerSelectedBgColor = "#F2BC66";
?>
  <table class='simpleTable' width="100%" border=0 cellpadding="2" cellspacing="0">
  <tr>
  	<td width="25" class='SortHeader'>#</td>
 	<?php 
printHeaderTakeoffs(120, $sortOrder, "actionTime", "DATE", $query_str);
printHeaderTakeoffs(0, $sortOrder, "userID", "userID", $query_str);
printHeaderTakeoffs(40, $sortOrder, "ActionID", "Action", $query_str);
echo '<td width="300" class="SortHeader">Name</td>';
echo '<td width="50" class="SortHeader">Details</td>';
echo '<td width="200" class="SortHeader">ACTIONS</td>';
?>
	
	</tr>
<?php 
$takeoffs = array();
while ($row = $db->sql_fetchrow($res)) {
    $takeoffID = $row['ItemID'];
    $takeoffs[$takeoffID][$row['actionTime']]['ActionID'] = $row['ActionID'];
    $takeoffs[$takeoffID][$row['actionTime']]['userID'] = $row['userID'];
    $takeoffs[$takeoffID][$row['actionTime']]['intName'] = $row['intName'];
    $takeoffs[$takeoffID][$row['actionTime']]['intLocation'] = $row['intLocation'];
    $takeoffs[$takeoffID][$row['actionTime']]['countryCode'] = $row['countryCode'];
Пример #4
0
    }
}
$headerSelectedBgColor = "#F2BC66";
?>
  <table class='simpleTable' width="100%" border=0 cellpadding="2" cellspacing="0">
  <tr>
  	<td width="25" class='SortHeader'>#</td>
 	<?php 
printHeaderTakeoffs(100, $sortOrder, "actionTime", "DATE", $query_str);
printHeaderTakeoffs(0, $sortOrder, "ServerItemID", "Server", $query_str);
printHeaderTakeoffs(80, $sortOrder, "userID", "userID", $query_str);
printHeaderTakeoffs(100, $sortOrder, "ItemType", "Type", $query_str);
printHeaderTakeoffs(100, $sortOrder, "ItemID", "ID", $query_str);
printHeaderTakeoffs(100, $sortOrder, "ActionID", "Action", $query_str);
echo '<td width="100" class="SortHeader">Details</td>';
printHeaderTakeoffs(100, $sortOrder, "Result", "Result", $query_str);
echo '<td width="100" class="SortHeader">ACTIONS</td>';
?>
	
	</tr>
<?php 
$currCountry = "";
$i = 1;
while ($row = $db->sql_fetchrow($res)) {
    if (L_auth::isAdmin($row['userID'])) {
        $admStr = "*ADMIN*";
    } else {
        $admStr = "";
    }
    if ($row['ServerItemID'] == 0) {
        $serverStr = "Local";