Example #1
0
 /**
  * Format the next departures list
  * @param array $departures
  * @return array
  */
 public function formatDepartures($departures)
 {
     $return = array();
     if (isset($departures['values'])) {
         foreach ($departures['values'] as $row) {
             if (!in_array(trim($row['platform']['direction']['line']['line_name']), $this->Provider->ignore_routes)) {
                 $Date = new DateTime($row['time_timetable_utc']);
                 $Date->setTimezone(new DateTimeZone($this->Place->Region->timezone));
                 $key = $Date->getTimestamp();
                 $Now = new DateTime();
                 $Now->setTimezone(new DateTimeZone($this->Place->Region->timezone));
                 $item = array("to" => array("stop_id" => $row['run']['destination_id'], "stop_name" => $row['run']['destination_name']), "leaving" => array("utc" => $row['time_timetable_utc'], "local" => $Date->format(DateTime::ISO8601), "local_nice" => $Date->format("F j, g:i a"), "relative" => time2str($Date->getTimestamp(), $Now->getTimestamp())), "route" => array("name" => $row['platform']['direction']['line']['line_name'], "id" => $row['platform']['direction']['line']['line_id'], "number" => $row['platform']['direction']['line']['line_number']), "direction" => array("id" => $row['platform']['direction']['direction_id'], "name" => $row['platform']['direction']['direction_name']));
                 $return[$key] = $item;
             }
         }
     }
     return $return;
 }
Example #2
0
 /**
  * Get feedback items assigned to this user
  * @since Version 3.9
  * @return array
  */
 public function getAssignedItems()
 {
     if (!$this->Staff instanceof User) {
         throw new Exception("You must assign a valid User object before fetching assigned feedback items");
     }
     $query = "SELECT f.*, fs.name AS status_text, fa.feedback_title AS area_text\r\n                FROM feedback AS f \r\n                INNER JOIN feedback_status AS fs ON f.status = fs.id\r\n                INNER JOIN feedback_area AS fa ON f.area = fa.feedback_id\r\n                WHERE f.assigned_to = ?\r\n                ORDER BY f.time DESC";
     $return = array();
     foreach ($this->db->fetchAll($query, $this->Staff->id) as $row) {
         $date = new DateTime(sprintf("@%s", $row['time']));
         $data = array("id" => $row['id'], "message" => $row['message'], "date" => array("absolute" => $date->format("Y-m-d H:i:s"), "relative" => time2str($row['time'])), "area" => array("id" => $row['area'], "text" => $row['area_text']), "status" => array("id" => $row['status'], "text" => $row['status_text']), "author" => array("id" => false, "username" => false, "realname" => false, "email" => $row['email']));
         if (filter_var($row['user_id'], FILTER_VALIDATE_INT) && $row['user_id'] > 0) {
             $Author = new User($row['user_id']);
             $data['author']['id'] = $Author->id;
             $data['author']['username'] = $Author->username;
             $data['author']['realname'] = $Author->real_name;
             $data['author']['url'] = $Author->url->url;
             $data['author']['avatar'] = array("large" => format_avatar($Author->avatar, 120), "small" => format_avatar($Author->avatar, 40));
         }
         $return[] = $data;
     }
     return $return;
 }
Example #3
0
"><?php 
    echo time2str($t->dt);
    ?>
</a>
                                        </td>
                                        <td>
                                            <?php 
    echo twitterfy($t->body);
    ?>
<br>
                                            <span style="font-size:80%;">
                                            <?php 
    if ($t->replied_to) {
        ?>
                                            Replied to <?php 
        echo time2str($t->reply_date);
        ?>
                                            <?php 
    } else {
        ?>
                                            <a href="tweets.php?id=<?php 
        echo $app_id;
        ?>
&amp;reply=<?php 
        echo $t->id;
        ?>
">Reply</a>
                                            <?php 
    }
    ?>
                                            </span>
Example #4
0
$ticketInformation = "Information: To use this card, please connect <br/>" . "your device to the nearest ssid. Open your web <br/>" . "browser and enter each needed field.";
$ticketLogoFile = "/images/daloradius_small.png";
if (isset($_REQUEST['type']) && $_REQUEST['type'] == "batch") {
    $format = $_REQUEST['format'];
    $plan = $_REQUEST['plan'];
    // accounts is a string with the format of "username1,password1||username2,password2||..."
    $accounts_temp = $_REQUEST['accounts'];
    $accounts = explode("||", $accounts_temp);
    include_once '../../library/opendb.php';
    include_once '../management/pages_common.php';
    $sql = "SELECT " . $configValues['CONFIG_DB_TBL_DALOBILLINGPLANS'] . ".planCost AS planCost, " . $configValues['CONFIG_DB_TBL_DALOBILLINGPLANS'] . ".planTimeBank AS planTimeBank, " . $configValues['CONFIG_DB_TBL_DALOBILLINGPLANS'] . ".planCurrency AS planCurrency " . " FROM " . $configValues['CONFIG_DB_TBL_DALOBILLINGPLANS'] . " WHERE " . $configValues['CONFIG_DB_TBL_DALOBILLINGPLANS'] . ".planName=" . " '{$plan}' ";
    $res = $dbSocket->query($sql);
    $row = $res->fetchRow(DB_FETCHMODE_ASSOC);
    $ticketCurrency = $row['planCurrency'];
    $ticketCost = $row['planCost'] . " " . $ticketCurrency;
    $ticketTime = time2str($row['planTimeBank']);
    printTicketsHTMLTable($accounts, $ticketCost, $ticketTime);
}
function printTicketsHTMLTable($accounts, $ticketCost, $ticketTime)
{
    $output = "";
    global $ticketInformation;
    global $ticketLogoFile;
    // the $accounts array contain the username,password|| first element as it's originally
    // used to be a for CSV table header
    array_shift($accounts);
    // we align 3 tables for each row (each line)
    // for each 4th entry of a new ticket table we put it in a new row of it's own
    $trCounter = 0;
    foreach ($accounts as $userpass) {
        list($user, $pass) = split(",", $userpass);
Example #5
0
                    </thead>
                    <tbody>
                    <?php 
$query = $dbConn->prepare("SELECT `id`, `name`, `hidden`, `rank`, `lastMatch`, `teamCount`, `team1`, `team2`, `team3`, `team4`, `team5`" . "FROM `player_information`" . $conditions . "ORDER BY {$orderByVal} {$orderByOrder} " . "LIMIT {$lowerLimit}, {$upperLimit}");
$query->execute();
$result = $query->get_result();
while ($row = $result->fetch_assoc()) {
    print "<tr class=\"tableRow\" id=\"tableRow{$row['id']}\">";
    print '<td>' . "<a target=\"_blank\" href=\"http://lan.op.gg/summoner/userName={$row['name']}\">" . $row['name'] . '</td>';
    print '<td>' . $row['rank'] . '</td>';
    ?>
                            <?php 
    if ($row['lastMatch'] == "0000-00-00 00:00:00") {
        print '<td><a data-toggle="tooltip" data-placement="top" title="No games on record">Not available</a></td>';
    } else {
        print '<td><a data-toggle="tooltip" data-placement="top" title="' . date("F j, Y, g:i a", strtotime($row['lastMatch'])) . '">' . time2str($row['lastMatch']) . '</a></td>';
    }
    ?>
                            <td>
                                <?php 
    if ($row['teamCount'] > 0) {
        ?>
                                <ul>
                                    <?php 
        for ($i = 1; $i <= $row['teamCount']; $i++) {
            print "<li>{$row["team{$i}"]}</li>";
        }
        ?>
                                </ul>
                                <?php 
    } else {
Example #6
0
 public function strLastReleaseDate()
 {
     $db = Database::getDatabase();
     $dt = $db->getValue("SELECT dt FROM shine_versions WHERE app_id = '{$this->id}' ORDER BY dt DESC LIMIT 1");
     return time2str($dt);
 }
Example #7
0
                $content .= '<tr align="left"><td>' . $rak[$row[type]][name] . '</td><td style="width:55px"><center>' . countdown($row[fertigstellung] - date(U)) . '</center></td></tr>';
                $stop = $row[fertigstellung];
            }
        } else {
            if ($row[type] >= 1 and $row[type] <= 15) {
                $content .= '<tr align="left"><td>' . $einh[$row[type]][name] . '</td><td style="width:55px"><center>' . time2str($row[fertigstellung] - date(U)) . '</center></td></tr>';
                $stop = $row[fertigstellung];
            }
            if ($row[type] >= 1001 and $row[type] <= 1011) {
                $row[type] -= 1000;
                $content .= '<tr align="left"><td>' . $def[$row[type]][name] . '</td><td style="width:55px"><center>' . time2str($row[fertigstellung] - date(U)) . '</center></td></tr>';
                $stop = $row[fertigstellung];
            }
            if ($row[type] >= 2001 and $row[type] <= 2006) {
                $row[type] -= 2000;
                $content .= '<tr align="left"><td>' . $rak[$row[type]][name] . '</td><td style="width:55px"><center>' . time2str($row[fertigstellung] - date(U)) . '</center></td></tr>';
                $stop = $row[fertigstellung];
            }
        }
        $row = mysql_fetch_array($result);
    } while ($row);
    $content .= '</table>';
}
// forschungen
for ($i = $forschung['feuerwaffen']; $i > 0; $i--) {
    $content = str_replace('Feuerwaffen ' . $forschung['feuerwaffen'] . '/' . $i . ' ', '<font color="green">Feuerwaffen ' . $forschung['feuerwaffen'] . '/' . $i . ' </font>', $content);
}
for ($i = $forschung['sprengstoff']; $i > 0; $i--) {
    $content = str_replace('Sprengstoff ' . $forschung['sprengstoff'] . '/' . $i . ' ', '<font color="green">Sprengstoff ' . $forschung['sprengstoff'] . '/' . $i . ' </font>', $content);
}
for ($i = $forschung['raketen']; $i > 0; $i--) {
Example #8
0
 $content .= '<br/><br/><b>' . $l['all']['NASMAC'] . ':</b> ' . $row['mac'];
 $str = addToolTipBalloon(array('content' => $content, 'onClick' => '', 'value' => '<b>' . $row['hotspotname'] . '</b>', 'divId' => ''));
 echo "\n\t\t\t<tr>\n\t\t\t\t<td>\n\t\t\t\t\t{$str}\n\t\t\t\t</td>\n\t\t\t\n\t\t\t\t<td>" . $row['firmware'] . "\n\t\t\t\t\t<br/>" . $row['firmware_revision'] . "\n\t\t\t\t</td>\n\t\t\t";
 $content = '<b>' . $l['all']['WanIface'] . ":</b> " . $row['wan_iface'] . "<br/>" . '<b>' . $l['all']['WanMAC'] . ":</b> " . $row['wan_mac'] . "<br/>" . '<b>' . $l['all']['WanIP'] . ":</b> " . $row['wan_ip'] . "<br/>" . '<b>' . $l['all']['WanGateway'] . ":</b> " . $row['wan_ip'];
 $value = '<b>' . $l['all']['WanIP'] . ":</b> " . $row['wan_ip'];
 $str = addToolTipBalloon(array('content' => $content, 'onClick' => '', 'value' => $value, 'divId' => ''));
 echo "<td> {$str} </td>";
 $content = $l['all']['LanIface'] . ":</b> " . $row['lan_iface'] . "<br/><b>" . $l['all']['LanMAC'] . ":</b> " . $row['lan_mac'] . "<br/><b>" . $l['all']['LanIP'] . ":</b> " . $row['lan_ip'];
 $value = '<b>' . $l['all']['LanIP'] . ":</b> " . $row['lan_ip'];
 $str = addToolTipBalloon(array('content' => $content, 'onClick' => '', 'value' => $value, 'divId' => ''));
 echo "<td> {$str} </td>";
 $content = $l['all']['WifiIface'] . ":</b> " . $row['wifi_iface'] . "<br/><b>" . $l['all']['WifiMAC'] . ":</b> " . $row['wifi_mac'] . "<br/><b>" . $l['all']['WifiIP'] . ":</b> " . $row['wifi_ip'] . "<br/><b>" . $l['all']['WifiSSID'] . ":</b> " . $row['wifi_ssid'] . "<br/><b>" . $l['all']['WifiKey'] . ":</b> " . $row['wifi_key'] . "<br/><b>" . $l['all']['WifiChannel'] . ":</b> " . $row['wifi_channel'];
 $value = '<b>' . $l['all']['WifiSSID'] . ":</b> " . $row['wifi_ssid'] . "<br/><b>" . $l['all']['WifiKey'] . ":</b> " . $row['wifi_key'];
 $str = addToolTipBalloon(array('content' => $content, 'onClick' => '', 'value' => $value, 'divId' => ''));
 echo "<td> {$str} </td>";
 echo "\n\t\t\t\t<td>" . time2str($row['uptime']) . "\n\t\t\t\t</td>\n\n\t\t\t\t<td>" . $row['memfree'] . "\n\t\t\t\t</td>\n\n\t\t\t\t<td>" . toxbyte($row['wan_bup']) . "\n\t\t\t\t</td>\n\n\t\t\t\t<td>" . toxbyte($row['wan_bdown']) . "\n\t\t\t\t</td>\n\n\t\t\t\t<td>" . $row['time'] . "\n\t\t\t\t</td>\n\t\t\t\t\n\t\t\t</tr>\n\t\t";
 /*
 printqn("
 	<td> <input type='checkbox' name='username[]' value='$row[0]'>$row[2]</td>
 	<td> 
 ");
 
 
 if ( ($row[1] == "Reject") && ($row[4] == "Auth-Type") )
 	echo "<img title='user is disabled' src='images/icons/userStatusDisabled.gif' alt='[disabled]'>";
 else
 	echo "<img title='user is enabled' src='images/icons/userStatusActive.gif' alt='[enabled]'>";
 
 
 printqn("
 		<a class='tablenovisit' href='javascript:return;'
Example #9
0
 /**
  * Get photos as an associative array
  * @since Version 3.9.1
  * @return array
  * @param boolean $force
  */
 public function getPhotosAsArray($force = null)
 {
     $key = sprintf("railpage:comp=%d;images.array", $this->id);
     $this->Memcached = AppCore::getMemcached();
     if ($force == null && ($photos = $this->Memcached->fetch($key))) {
         return $photos;
     }
     $photos = array();
     foreach ($this->getPhotos() as $Submission) {
         $photos[] = array("id" => $Submission->id, "url" => $Submission->url->getURLs(), "image" => $Submission->Image->getArray(), "author" => array("id" => $Submission->Author->id, "username" => $Submission->Author->username, "url" => $Submission->Author->url instanceof Url ? $Submission->Author->url->getURLs() : array("url" => $Submission->Author->url)), "dateadded" => array("absolute" => $Submission->DateAdded->format("Y-m-d H:i:s"), "relative" => function_exists("time2str") ? time2str($Submission->DateAdded->getTimestamp()) : null));
     }
     $this->Memcached->save($key, $photos);
     return $photos;
 }
Example #10
0
    }
}
echo "<thread> <tr>\n\t\t<th scope='col'>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=username&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['Username'] . "</a>\n\t\t</th>\n\t\t<th scope='col'>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=attribute&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['Attribute'] . "</a>\n\t\t</th>\n\t\t<th scope='col'>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=maxtimeexpiration&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['MaxTimeExpiration'] . "</a>\n\t\t</th>\n\t\t<th scope='col'>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=usedtime&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['UsedTime'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> " . $l['all']['Status'] . " </th>\n\t\t<th scope='col'> " . $l['all']['Usage'] . " </th>\n\t\t</tr> </thread>";
while ($row = $res->fetchRow()) {
    $status = "Active";
    if ($row[1] == "Expiration") {
        if (datediff('d', $row[2], "{$currdate}", false) > 0) {
            $status = "Expired";
        }
    }
    if ($row[1] == "Max-All-Session") {
        if ($row[3] >= $row[2]) {
            $status = "End";
        }
    }
    printqn("<tr>\n                        <td> <a class='tablenovisit' href='javascript:return;'\n                                onClick='javascript:ajaxGeneric(\"include/management/retUserInfo.php\",\"retBandwidthInfo\",\"divContainerUserInfo\",\"username={$row['0']}\");\n                                        javascript:__displayTooltip();'\n                                tooltipText='\n                                        <a class=\"toolTip\" href=\"mng-edit.php?username={$row['0']}\">\n                                                {$l['Tooltip']['UserEdit']}</a>\n                                        <br/><br/>\n\n                                        <div id=\"divContainerUserInfo\">\n                                                Loading...\n                                        </div>\n                                        <br/>'\n                                >{$row['0']}</a>\n                        </td>\n\n                        <td> {$row['1']} </td>\n                        <td> {$row['2']} </td>\n                        <td>" . time2str($row[3]) . "</td>\n                        <td> {$status} </td>\n\t\t\t<td> ");
    if ($row[1] == "Expiration") {
        $difference = datediff('d', $row[2], "{$currdate}", false);
        if ($difference > 0) {
            echo "<h100> " . " {$difference} days since expired" . "</h100> ";
        } else {
            echo substr($difference, 1) . " days until expiration";
        }
    }
    if ($row[1] == "Max-All-Session") {
        if ($status == "End") {
            echo "<h100> " . abs($row[2] - $row[3]) . " seconds overdue credit" . "</h100>";
        } else {
            echo $row[2] - $row[3];
            echo " left on credit";
        }
Example #11
0
    $orderTypeNextPage = "desc";
} else {
    if ($orderType == "desc") {
        $orderTypeNextPage = "asc";
    }
}
echo "<thread> <tr>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&ratename={$ratename}&startdate={$startdate}&enddate={$enddate}&orderBy=username&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['Username'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&ratename={$ratename}&startdate={$startdate}&enddate={$enddate}&orderBy=nasipaddress&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['NASIPAddress'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&ratename={$ratename}&startdate={$startdate}&enddate={$enddate}&orderBy=acctstarttime&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['LastLoginTime'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&ratename={$ratename}&startdate={$startdate}&enddate={$enddate}&orderBy=acctsessiontime&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['TotalTime'] . "</a>\n\t\t</th>\n\t\t<th scope='col'>\n\t\t<br/>\n\t\t " . $l['all']['Billed'] . "\n\t\t</th>\n                </tr> </thread>";
$sumBilled = 0;
$sumSession = 0;
while ($row = $res->fetchRow()) {
    $sessionTime = $row[3];
    $rateCost = $row[4];
    $billed = $sessionTime / $rateDivisor * $rateCost;
    $sumBilled += $billed;
    $sumSession += $sessionTime;
    echo "<tr>\n\t\t\t\t<td> {$row['0']} </td>\n\t\t\t\t<td> {$row['1']} </td>\n\t\t\t\t<td> {$row['2']} </td>\n\t\t\t\t<td> " . time2str($row[3]) . " </td>\n\t\t\t\t<td> " . number_format($billed, 2) . " </td>\n\t\t</tr>";
}
echo "\n                                        <tfoot>\n                                                        <tr>\n                                                        <th colspan='12' align='left'>\n        ";
setupLinks($pageNum, $maxPage, $orderBy, $orderType, "&username={$username}&ratename={$ratename}&startdate={$startdate}&enddate={$enddate}");
echo "\n                                                        </th>\n                                                        </tr>\n                                        </tfoot>\n                ";
echo "</table>";
include 'library/closedb.php';
?>
			
		</div>


<?php 
include 'include/config/logging.php';
?>
							I\'m sorry, but my premium account isn\'t active anymore.<br />
							Please try again later, maybe I have then premium again.';
        }
    }
    echo '
			<div class="ui-widget" style="width:500px;">
				<div class="ui-state-error ui-corner-all" style="padding: 0 .7em;">
					<p>
						<span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span>
						' . $alertmsg . '
					</p>
				</div>
			</div>
			';
} else {
    echo 'Traffic left: ' . round($info['traffic'] / 1024 / 1024 / 1024, 2) . ' GB &nbsp; &bull; &nbsp; Premium expires on <span title="' . time2str($info['expire'] - time()) . ' left">' . date("d.m.Y H:i", $info['expire']) . '</span><br /><hr style="width:400px;">';
    ?>

				<br />
				<span id="message">
<?php 
    if (count($dlFiles) > 0) {
        if (true) {
            echo '<font color="green">Great, your Batch download is Ready!<br />';
            foreach ($dlFiles as $dlFile) {
                $link = $dlFile[0];
                $name = $dlFile[1];
                if (strpos($link, "#F#") === false) {
                    echo '<a style="color: green" target="_blank" href="' . $link . '" onclick="started();">' . $name . '</a></font><br>' . "\n";
                } else {
                    echo '<a style="color: red">' . $name . ' failed!</a></font><br>' . "\n";
Example #13
0
    					    <table class="lines">
    					        <thead>
    					            <tr>
    					                <td>Date</td>
    					                <td>Name</td>
    					                <td>Email</td>
    					                <td>App Name</td>
    					            </tr>
    					        </thead>
    					        <tbody>
        							<?php 
foreach ($orders as $o) {
    ?>
        							<tr>
        							    <td><?php 
    echo time2str($o->dt);
    ?>
</td>
        							    <td><a href="order.php?id=<?php 
    echo $o->id;
    ?>
"><?php 
    echo utf8_encode($o->first_name);
    ?>
 <?php 
    echo utf8_encode($o->last_name);
    ?>
</a></td>
        							    <td><a href="mailto:<?php 
    echo $o->payer_email;
    ?>
Example #14
0
            }
            if (!$clan1) {
                $clan1['tag'] = '<font class="red">aufgel&ouml;st</font>';
            }
            if (!$clan2) {
                $clan2['tag'] = '<font class="red">aufgel&ouml;st</font>';
            }
            if ($clan1['aufgeloest'] >= 1) {
                $clan1['tag'] = '<font class="red">' . $clan1['tag'] . '</font>';
            }
            if ($clan2['aufgeloest'] >= 1) {
                $clan2['tag'] = '<font class="red">' . $clan2['tag'] . '</font>';
            }
            $i++;
            $newpiece = tag2value('id', $row['id'], $piece);
            $newpiece = tag2value('start', time2str($row['ended'] - $row['started']), $newpiece);
            $newpiece = tag2value('clan1', '<a href="claninfo.php?' . SID . '&clan=' . $clan1['clanid'] . '">' . $clan1['tag'] . '</a>', $newpiece);
            $newpiece = tag2value('kp1', $row['kampfpunkte1'], $newpiece);
            $newpiece = tag2value('pluenderung1', $row['ressis1'], $newpiece);
            $newpiece = tag2value('clan2', '<a href="claninfo.php?' . SID . '&clan=' . $clan2['clanid'] . '">' . $clan2['tag'] . '</a>', $newpiece);
            $newpiece = tag2value('kp2', $row['kampfpunkte2'], $newpiece);
            $newpiece = tag2value('pluenderung2', $row['ressis2'], $newpiece);
            $ranking2 .= $newpiece;
        }
    } while ($row);
} else {
    $ranking2 = '<tr><td colspan="8"><center><a href="clanwars.php?archiv=1&amp;' . SID . '">Klicke hier um die beendeten Clanwars anzuzeigen.</a></center></td></tr>';
}
// get page html
$template .= template('clanwars');
$template = tag2value('ranking', $ranking, $template);
Example #15
0
	<tr align="center"><td style="width:150px">Geschwindigkeit</td><td style="width:150px"><select name="speed" size="1" style="border:0; width:150px; height:20px" onchange="berechne()">
					<option value="100" ' . $speedstep100 . '>100%</option>
	 				<option value="90" ' . $speedstep90 . '>90%</option>
					<option value="80" ' . $speedstep80 . '>80%</option>
					<option value="70" ' . $speedstep70 . '>70%</option>	
					<option value="60" ' . $speedstep60 . '>60%</option>	
					<option value="50" ' . $speedstep50 . '>50%</option>	
					<option value="40" ' . $speedstep40 . '>40%</option>
					<option value="30" ' . $speedstep30 . '>30%</option>	
					<option value="20" ' . $speedstep20 . '>20%</option>	
					<option value="10" ' . $speedstep10 . '>10%</option>	
				</select></td></tr>
	<tr align="center"><td style="width:150px">Einheiten</td><td style="width:150px">' . $anzahl . '</td></tr>
	<tr align="center"><td style="width:150px">Entfernung</td><td style="width:150px"><a id="entfernung" name="entfernung">' . $entfernung * 2.5 . '</a> km</td></tr>
	<tr align="center"><td style="width:150px">Geschwindigkeit</td><td style="width:150px"><div id="s">' . $maxspeed . '.00 km/h</div></td></tr>
	<tr align="center"><td style="width:150px">Dauer</td><td style="width:150px"><div id="d">' . time2str(felder2time($entfernung * 10 / $maxspeed) - 3600) . '<br />+1:00:00<br />=' . time2str(felder2time($entfernung * 10 / $maxspeed)) . '</div></td></tr>
	<tr align="center"><td style="width:150px">Gesamtplatz</td><td style="width:150px">' . $platz . '</td></tr>
	<tr align="center"><td style="width:150px">Verbrauch in Liter</td><td style="width:150px"><div id="v1">' . $verbrauch . ' Liter</div></td></tr>
	<tr align="center"><td style="width:150px">Verbrauch in Einh.</td><td style="width:150px"><div id="v2">' . $verbrauch_einh . ' Einh.</div></td></tr>
	<tr align="center"><td style="width:150px">Eisen</td><td class="input"><input onChange="berechne();" onkeyup="berechne();" type="text" name="eisen" value="' . $_POST['eisen'] . '" style="border:0; width:150px; height:14px;"></td></tr>
	<tr align="center"><td style="width:150px">Titan</td><td class="input"><input onChange="berechne();" onkeyup="berechne();" type="text" name="titan" value="' . $_POST['titan'] . '" style="border:0; width:150px; height:14px"></td></tr>
	<tr align="center"><td style="width:150px">Oel</td><td class="input"><input onChange="berechne();" onkeyup="berechne();" type="text" name="oel" value="' . $_POST['oel'] . '" style="border:0; width:150px; height:14px"></td></tr>
	<tr align="center"><td style="width:150px">Uran</td><td class="input"><input onChange="berechne();" onkeyup="berechne();" type="text" name="uran" value="' . $_POST['uran'] . '" style="border:0; width:150px; height:14px"></td></tr>
	<tr align="center"><td style="width:150px">Gold</td><td class="input"><input onChange="berechne();" onkeyup="berechne();" type="text" name="gold" value="' . $_POST['gold'] . '" style="border:0; width:150px; height:14px"></td></tr>
	<tr align="center"><td style="width:150px">Chanje</td><td class="input"><input onChange="berechne();" onkeyup="berechne();" type="text" name="chanje" value="' . $_POST['chanje'] . '" style="border:0; width:150px; height:14px"></td></tr>	
	<tr align="center"><td style="width:150px">Restplatz</td><td style="width:150px;' . $red . '"><div id="w">' . round($restplatz, 0) . '</div></td></tr>
	</table>
	<br />
	<input type="submit" name="starten" value="Mission starten">
	<input type="hidden" name="action" value="mission" />
	<input type="hidden" name="anz1" value="' . $_POST['anz1'] . '" />
Example #16
0
 /**
  * Get detailed information about this file
  * @since Version 3.9.1
  * @return array
  */
 public function getDetails()
 {
     $mckey = sprintf("%s;details", $this->mckey);
     if (!($data = $this->Memcached->fetch($mckey))) {
         if (empty($this->mime) && file_exists(RP_DOWNLOAD_DIR . $this->filepath)) {
             $finfo = finfo_open(FILEINFO_MIME_TYPE);
             $this->mime = finfo_file($finfo, RP_DOWNLOAD_DIR . $this->filepath);
         }
         $mime = explode("/", $this->mime);
         $data = array("type" => ucwords($mime[0]), "size" => $this->filesize, "downloads" => $this->hits, "added" => array("absolute" => $this->Date->format("Y-m-d g:i:s a"), "relative" => time2str($this->Date->getTimestamp())), "thumbnail" => $this->getThumbnail(), "video" => $this->getHTML5Video());
         $this->Memcached->save($mckey, $data, strtotime("+12 hours"));
     }
     return $data;
 }
Example #17
0
 $words = explode(" ", $tweet->text);
 $totalWords = sizeof($words);
 //print_r($tweet);
 // SUPAR HACK to determine if it's a question
 foreach ($words as $word) {
     // Skip hashtags
     if (substr($word, 0, 1) == "#") {
         continue;
     }
     $isquestion = substr($word, -1) == "?";
 }
 // Skip non-questions
 if (!$isquestion) {
     continue;
 }
 print "<tr><td style=\"width:5%\">" . $count . " <a href=\"?upvote&voteid=" . $tweet->id . (isset($_GET['q']) ? "&q=" . urlencode($_GET['q']) : "") . "\">+</a>/<a href=\"?downvote&voteid=" . $tweet->id . (isset($_GET['q']) ? "&q=" . urlencode($_GET['q']) : "") . "\">-</a></td><td style=\"width:50%\"><a href=\"?qid=" . $tweet->id . "&sname=" . $tweet->user->screen_name . "\">" . $tweet->text . "</a> (" . time2str($tweet->created_at) . ")<br />";
 //$count++;
 //print("<form><input type=\"text\" name=\"answer_1\" size=\"50\" margin-bottom=\"5\"><br />");
 //print("<button type=\"button\" class=\"btn btn-xs btn-info\" style=\"margin: 5px 1px\">Reply</button>");
 //print("<button type=\"button\" class=\"btn btn-xs btn-default\" style=\"margin: 5px 1px\">Clear</button></td>");
 print "<td style=\"width:10%\"><a href=\"http://twitter.com/" . $tweet->user->screen_name . "\">@" . $tweet->user->screen_name . "</a></td>";
 // Populate Tags column
 print "<td style=\"word-wrap: break-word; width:30%\"><h4>";
 $tagcount = 0;
 for ($j = 0; $j < $totalWords; $j++) {
     // Remove all special characters
     //$stripped = preg_replace('/[^a-z]/i', '', $words[$j]);
     //print($stripped . "<br />");
     // Check if the words are hashtags
     if (substr($words[$j], 0, 1) == "#") {
         $tagcount++;
Example #18
0
foreach ($pirates as $p) {
    ?>
									<tr>
									    <td><a href="http://www.geobytes.com/IpLocator.htm?GetLocation&amp;ipaddress=<?php 
    echo $p['ip'];
    ?>
"><?php 
    echo $p['ip'];
    ?>
</a></td>
									    <td><?php 
    echo $p['guid'];
    ?>
</td>
									    <td><?php 
    echo time2str($p['dt']);
    ?>
</td>
									</tr>
									<?php 
}
?>
								</tbody>
							</table>
						</div>
					</div>
              
                </div></div>
            </div>
            <div id="sidebar" class="yui-b">
                <div class="block">
Example #19
0
              <mark>
                <?php 
    echo T_($row['category']);
    ?>
<!--
           --></mark>,
            </span>
            <span class="lang">
            <?php 
    $str = sprintf(T_('<mark>%s</mark>에서 <mark>%s</mark>로,'), T_($row['lang_from']), T_($row['lang_to']));
    echo $str;
    ?>
            </span>
            <span>
              <?php 
    echo time2str($row['date']);
    ?>
              <?php 
    $user = fetch_first_row('SELECT * FROM users WHERE ID = ?', 'i', $row['author']);
    echo "<a href='/profile.php?id=" . $user['ID'] . "'>" . $user['user_nickname'] . "</a>";
    ?>
            </span>
          </div>
        </section>
      </article>
    <?php 
}
?>
  </div>
  <ul class="pagination">
    <?php 
Example #20
0
 /**
  * Get stories from topic
  * @version 3.0
  * @since Version 3.0
  * @return mixed
  * @param int $page
  * @param int $limit
  * @param boolean $total
  */
 public function stories($page = 0, $limit = 25, $total = true)
 {
     $return = false;
     $mckey = "railpage:topic_id=" . $this->id . ".stories.page=" . $page . ".limit=" . $limit . ".total=" . (int) $total;
     $mcexp = strtotime("+1 hour");
     if (!($return = getMemcacheObject($mckey))) {
         // Get it from Sphinx
         $Sphinx = $this->getSphinx();
         $query = $Sphinx->select("*")->from("idx_news_article")->orderBy("story_time_unix", "DESC")->limit($page * $limit, $limit)->where("topic_id", "=", $this->id);
         $matches = $query->execute();
         $meta = $Sphinx->query("SHOW META");
         $meta = $meta->execute();
         if (is_array($matches) && count($matches)) {
             $return = array("total" => $meta[1]['Value'], "children" => array(), "page" => $page, "perpage" => $limit, "topic_id" => $this->id);
             foreach ($matches as $id => $row) {
                 $row['time_relative'] = time2str($row['story_time_unix']);
                 $row['time'] = $row['story_time'];
                 $row['title'] = format_topictitle($row['story_title']);
                 // Match the first sentence
                 $line = explode("\n", $row['story_blurb']);
                 $row['firstline'] = preg_replace('/([^?!.]*.).*/', '\\1', strip_tags($line[0]));
                 if (empty($row['story_slug'])) {
                     $row['slug'] = $this->createSlug($row['story_id']);
                 }
                 $row['url'] = $this->makePermaLink($row['story_slug']);
                 $row['hometext'] = $row['story_blurb'];
                 $row['bodytext'] = $row['story_body'];
                 $row['featured_image'] = $row['story_image'];
                 $row['informant'] = $row['username'];
                 $return['children'][$id] = $row;
             }
         }
     }
     if (!isset($return) || $return === false || !is_array($return)) {
         $query = "SELECT SQL_CALC_FOUND_ROWS s.*, t.topicname, t.topicimage, t.topictext, u.user_id AS informant_id FROM nuke_stories AS s LEFT JOIN nuke_topics AS t ON s.topic = t.topicid LEFT JOIN nuke_users AS u ON s.informant = u.username WHERE s.topic = ? AND s.approved = ? ORDER BY s.time DESC LIMIT ?, ?";
         $return = array();
         $return['total'] = 0;
         $return['children'] = array();
         $return['page'] = $page;
         $return['perpage'] = $limit;
         $return['topic_id'] = $this->id;
         if ($result = $this->db_readonly->fetchAll($query, array($this->id, "1", $page * $limit, $limit))) {
             $return['total'] = $this->db_readonly->fetchOne("SELECT FOUND_ROWS() AS total");
             foreach ($result as $row) {
                 if (function_exists("relative_date")) {
                     $row['time_relative'] = relative_date(strtotime($row['time']));
                 } else {
                     $row['time_relative'] = $row['time'];
                 }
                 $row['title'] = format_topictitle($row['title']);
                 // Match the first sentence
                 $line = explode("\n", $row['hometext']);
                 $row['firstline'] = preg_replace('/([^?!.]*.).*/', '\\1', strip_tags($line[0]));
                 if (empty($row['slug'])) {
                     $row['slug'] = $this->createSlug($row['sid']);
                 }
                 $row['url'] = $this->makePermaLink($row['slug']);
                 $return['children'][] = $row;
             }
         }
         setMemcacheObject($mckey, $return, $mcexp);
     }
     return $return;
 }
Example #21
0
$content = tag2value('titanmine_titan', $kosten[titanmine][titan] * ($row[titanmine] * $row[titanmine]), $content);
$content = tag2value('titanmine_oel', $kosten[titanmine][oel] * ($row[titanmine] * $row[titanmine]), $content);
$content = tag2value('titanmine_uran', $kosten[titanmine][uran] * ($row[titanmine] * $row[titanmine]), $content);
$content = tag2value('titanmine_gold', $kosten[titanmine][gold] * ($row[titanmine] * $row[titanmine]), $content);
$content = tag2value('titanmine_chanje', $kosten[titanmine][chanje] * ($row[titanmine] * $row[titanmine]), $content);
$content = tag2value('titanmine_dauer', time2str($kosten[titanmine][zeit] * $row[titanmine]), $content);
$content = tag2value('titanmine_bauen', $bauen[titanmine], $content);
$content = tag2value('lvl_oelpumpe', $row[oelpumpe] - 1, $content);
$content = tag2value('oelpumpe_eisen', $kosten[oelpumpe][eisen] * ($row[oelpumpe] * $row[oelpumpe]), $content);
$content = tag2value('oelpumpe_titan', $kosten[oelpumpe][titan] * ($row[oelpumpe] * $row[oelpumpe]), $content);
$content = tag2value('oelpumpe_oel', $kosten[oelpumpe][oel] * ($row[oelpumpe] * $row[oelpumpe]), $content);
$content = tag2value('oelpumpe_uran', $kosten[oelpumpe][uran] * ($row[oelpumpe] * $row[oelpumpe]), $content);
$content = tag2value('oelpumpe_gold', $kosten[oelpumpe][gold] * ($row[oelpumpe] * $row[oelpumpe]), $content);
$content = tag2value('oelpumpe_chanje', $kosten[oelpumpe][chanje] * ($row[oelpumpe] * $row[oelpumpe]), $content);
$content = tag2value('oelpumpe_dauer', time2str($kosten[oelpumpe][zeit] * $row[oelpumpe]), $content);
$content = tag2value('oelpumpe_bauen', $bauen[oelpumpe], $content);
$content = tag2value('lvl_uranmine', $row[uranmine] - 1, $content);
$content = tag2value('uranmine_eisen', $kosten[uranmine][eisen] * ($row[uranmine] * $row[uranmine]), $content);
$content = tag2value('uranmine_titan', $kosten[uranmine][titan] * ($row[uranmine] * $row[uranmine]), $content);
$content = tag2value('uranmine_oel', $kosten[uranmine][oel] * ($row[uranmine] * $row[uranmine]), $content);
$content = tag2value('uranmine_uran', $kosten[uranmine][uran] * ($row[uranmine] * $row[uranmine]), $content);
$content = tag2value('uranmine_gold', $kosten[uranmine][gold] * ($row[uranmine] * $row[uranmine]), $content);
$content = tag2value('uranmine_chanje', $kosten[uranmine][chanje] * ($row[uranmine] * $row[uranmine]), $content);
$content = tag2value('uranmine_dauer', time2str($kosten[uranmine][zeit] * $row[uranmine]), $content);
$content = tag2value('uranmine_bauen', $bauen[uranmine], $content);
// generierte seite ausgeben
if ($running) {
    $onload = 'startCountdown();';
}
$content = tag2value("onload", $onload, $content);
echo $content . template('footer');
Example #22
0
function userConnectionStatus($username, $drawTable)
{
    $userStatus = checkUserOnline($username);
    include_once 'include/management/pages_common.php';
    include 'library/opendb.php';
    $username = $dbSocket->escapeSimple($username);
    // sanitize variable for sql statement
    $sql = "SELECT AcctStartTime,AcctSessionTime,NASIPAddress,CalledStationId,FramedIPAddress,CallingStationId" . ",AcctInputOctets,AcctOutputOctets FROM " . $configValues['CONFIG_DB_TBL_RADACCT'] . " WHERE Username='******' ORDER BY RadAcctId DESC LIMIT 1";
    $res = $dbSocket->query($sql);
    $row = $res->fetchRow(DB_FETCHMODE_ASSOC);
    $userUpload = toxbyte($row['AcctInputOctets']);
    $userDownload = toxbyte($row['AcctOutputOctets']);
    $userLastConnected = $row['AcctStartTime'];
    $userOnlineTime = time2str($row['AcctSessionTime']);
    $nasIPAddress = $row['NASIPAddress'];
    $nasMacAddress = $row['CalledStationId'];
    $userIPAddress = $row['FramedIPAddress'];
    $userMacAddress = $row['CallingStationId'];
    include 'library/closedb.php';
    if ($drawTable == 1) {
        echo "<table border='0' class='table1'>";
        echo "\r\n        \t\t<thead>\r\n        \t\t\t<tr>\r\n        \t                <th colspan='10' align='left'> \r\n        \t\t\t\t<a class=\"table\" href=\"javascript:toggleShowDiv('divConnectionStatus')\">Session Info</a>\r\n        \t                </th>\r\n        \t                </tr>\r\n        \t\t</thead>\r\n        \t\t</table>\r\n        \t";
        echo "\r\n                        <div id='divConnectionStatus' style='display:none;visibility:visible'>\r\n               \t\t<table border='0' class='table1'>\r\n        \t\t<thread>\r\n\r\n                        <tr>        \r\n                        <th scope='col' align='right'>\r\n                        User Status\r\n                        </th> \r\n        \r\n                        <th scope='col' align='left'>\r\n                        {$userStatus}\r\n                        </th>\r\n                        </tr>\r\n\r\n                        <tr>\r\n                        <th scope='col' align='right'>\r\n                        Last Connection                        \r\n                        </th> \r\n        \r\n                        <th scope='col' align='left'>\r\n                        {$userLastConnected}\r\n                        </th>\r\n                        </tr>\r\n\r\n                        <tr>\r\n                        <th scope='col' align='right'>\r\n                        Online Time\r\n                        </th> \r\n        \r\n                        <th scope='col' align='left'>\r\n                        {$userOnlineTime}\r\n                        </th>\r\n                        </tr>\r\n\r\n                        <tr>\r\n                        <th scope='col' align='right'>\r\n                        Server (NAS)\r\n                        </th> \r\n        \r\n                        <th scope='col' align='left'>\r\n                        {$nasIPAddress} (MAC: {$nasMacAddress})\r\n                        </th>\r\n                        </tr>\r\n\r\n                        <tr>\r\n                        <th scope='col' align='right'>\r\n                        User Workstation\r\n                        </th> \r\n        \r\n                        <th scope='col' align='left'>\r\n                        {$userIPAddress} (MAC: {$userMacAddress})\r\n                        </th>\r\n                        </tr>\r\n\r\n                        <tr>\r\n                        <th scope='col' align='right'>\r\n                        User Upload\r\n                        </th> \r\n        \r\n                        <th scope='col' align='left'>\r\n                        {$userUpload}\r\n                        </th>\r\n                        </tr>\r\n\r\n\r\n                        <tr>\r\n                        <th scope='col' align='right'>\r\n                        User Download\r\n                        </th> \r\n        \r\n                        <th scope='col' align='left'>\r\n                        {$userDownload}\r\n                        </th>\r\n                        </tr>\r\n\r\n                        </table>\r\n\r\n        \t\t</div>\r\n        \t";
    }
}
Example #23
0
        ?>
      <div class="profile-story">
        <h2><?php 
        echo anchor('stories/view/' . $story->id, $story->headline);
        ?>
</h2>
        <h3>
          <div class="dashboard-actions right">
          <a href="#" class="display-stats">Stats</a>
          <a href="">Edit Story</a>
          <?php 
        echo anchor('stories/delete/' . $story->id, 'Delete Story', ['data-reveal-id' => 'confirm-modal', 'data-reveal-ajax' => 'true']);
        ?>
          </div>
          Authored <em><?php 
        echo time2str($story->date_created);
        ?>
</em>. Happening in <a href=""><?php 
        echo $story->state;
        ?>
</a>
        </h3>
        <div class="stats">
          <?php 
        $sum = $story->upvote + $story->downvote;
        ?>
          <?php 
        $score = $sum == 0 ? 0 : $story->upvote / $sum * 100;
        ?>
          <h1>Score: <?php 
        echo $score;
Example #24
0
    $str = addToolTipBalloon(array('content' => $content, 'onClick' => '', 'value' => $value, 'divId' => ''));
    echo "<td> {$str} </td>";
    // calculate time delay
    $currTime = time();
    $checkinTime = strtotime($row['time']);
    if ($currTime - $checkinTime >= 60 * $hardDelay) {
        // this is hard delay
        $delayColor = 'red';
    } elseif ($currTime - $checkinTime >= 60 * $softDelay && $currTime - $checkinTime < 60 * $hardDelay) {
        // this is soft delay
        $delayColor = 'orange';
    } else {
        // this is no delay at all, meaning not above 5 minutes delay
        $delayColor = 'green';
    }
    echo "\n\t\t\t\t<td>" . time2str($row['uptime']) . "\n\t\t\t\t</td>\n\n\t\t\t\t<td>" . $row['cpu'] . "\n\t\t\t\t</td>\n\t\t\t\t\n\t\t\t\t<td>" . $row['memfree'] . "\n\t\t\t\t</td>\n\n\t\t\t\t<td>" . toxbyte($row['wan_bup']) . "\n\t\t\t\t</td>\n\n\t\t\t\t<td>" . toxbyte($row['wan_bdown']) . "\n\t\t\t\t</td>\n\n\t\t\t\t<td> <font color='{$delayColor}'> " . $row['time'] . "\n\t\t\t\t\t</font>\n\t\t\t\t</td>\n\t\t\t\t\n\t\t\t</tr>\n\t\t";
}
echo "\n\t\t\t\t\t<tfoot>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th colspan='11' align='left'> \n\t";
setupLinks($pageNum, $maxPage, $orderBy, $curOrderType);
echo "\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tfoot>\n\t\t";
echo "</table>";
echo "</form>";
include 'library/closedb.php';
?>



<?php 
include 'include/config/logging.php';
?>
Example #25
0
echo "<table border='0' class='table1'>\n";
echo "\n                <thead>\n                        <tr>\n                        <th colspan='12' align='left'>\n\n                        <input class='button' type='button' value='CSV Export'\n                        onClick=\"javascript:window.location.href='include/management/fileExport.php?reportFormat=csv'\"\n                        />\n                        <br/>\n                <br/>\n        ";
if ($configValues['CONFIG_IFACE_TABLES_LISTING_NUM'] == "yes") {
    setupNumbering($numrows, $rowsPerPage, $pageNum, $orderBy, $orderType, "&username={$username}&startdate={$startdate}&enddate={$enddate}");
}
echo " </th></tr>\n\t\t\t</thead>\n\t";
if ($orderType == "asc") {
    $orderType = "desc";
} else {
    if ($orderType == "desc") {
        $orderType = "asc";
    }
}
echo "<thread> <tr>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=radacctid&orderType={$orderType}\">\n\t\t" . $l['all']['ID'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=hotspot&orderType={$orderType}\">\n\t\t" . $l['all']['HotSpot'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=username&orderType={$orderType}\">\n\t\t" . $l['all']['Username'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=framedipaddress&orderType={$orderType}\">\n\t\t" . $l['all']['IPAddress'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=acctstarttime&orderType={$orderType}\">\n\t\t" . $l['all']['StartTime'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=acctstoptime&orderType={$orderType}\">\n\t\t" . $l['all']['StopTime'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=acctsessiontime&orderType={$orderType}\">\n\t\t" . $l['all']['TotalTime'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=acctinputoctets&orderType={$orderType}\">\n\t\t" . $l['all']['Upload'] . " (" . $l['all']['Bytes'] . ")</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=acctoutputoctets&orderType={$orderType}\">\n\t\t" . $l['all']['Download'] . " (" . $l['all']['Bytes'] . ")</a>\n\t\t</th>\n\t\t<th scope='col'>\n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=acctterminatecause&orderType={$orderType}\">\n\t\t " . $l['all']['Termination'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=nasipaddress&orderType={$orderType}\">\n\t\t" . $l['all']['NASIPAddress'] . "</a>\n\t\t</th>\n                </tr> </thread>";
while ($row = $res->fetchRow()) {
    printqn("<tr>\n\t\t\t\t<td> {$row['0']} </td>\n\t\t                <td> {$row['1']} </td>\n\t                        <td> {$row['2']} </td>\n\t\t\t\t<td> {$row['3']} </td>\n\t\t\t\t<td> {$row['4']} </td>\n\t\t\t\t<td> {$row['5']} </td>\n\t\t\t\t<td> " . time2str($row[6]) . " </td>\n\t\t\t\t<td> " . toxbyte($row[7]) . "</td>\n\t\t\t\t<td> " . toxbyte($row[8]) . "</td>\n\t\t\t\t<td> {$row['9']} </td>\n\t\t\t\t<td> {$row['10']} </td>\n\t\t</tr>");
}
echo "\n                                        <tfoot>\n                                                        <tr>\n                                                        <th colspan='12' align='left'>\n        ";
setupLinks($pageNum, $maxPage, $orderBy, $orderType, "&username={$username}&startdate={$startdate}&enddate={$enddate}");
echo "\n                                                        </th>\n                                                        </tr>\n                                        </tfoot>\n                ";
echo "</table>";
include 'library/closedb.php';
?>
			
		</div>


<?php 
include 'include/config/logging.php';
?>
Example #26
0
										<td class="milestone"><a href="tickets-milestone.php?id=<?php 
    echo $t->milestone_id;
    ?>
"><?php 
    echo $milestones[$t->milestone_id]->title;
    ?>
</a></td>
										<td class="assigned-to"><a href="tickets-user.php?id=<?php 
    echo $t->assigned_to;
    ?>
"><?php 
    echo $users[$t->assigned_to]->username;
    ?>
</a></td>
										<td class="age"><?php 
    echo time2str($t->dt_created);
    ?>
</td>
									</tr>
									<?php 
}
?>
                                </tbody>
                            </table>
						</div>
					</div>
              
                </div></div>
            </div>
            <div id="sidebar" class="yui-b">
				<div class="block">
                $lastlog_output = bytes2str($lastlog_output);
            } else {
                $not_known = 1;
            }
        } else {
            echo "<b>Database query failed: " . da_sql_error($link, $config) . "</b><br>\n";
        }
    }
} else {
    echo "<b>Could not connect to SQL database</b><br>\n";
}
$monthly_limit = is_numeric($monthly_limit) ? time2str($monthly_limit) : $monthly_limit;
$weekly_limit = is_numeric($weekly_limit) ? time2str($weekly_limit) : $weekly_limit;
$daily_limit = is_numeric($daily_limit) ? time2str($daily_limit) : $daily_limit;
$session_limit = is_numeric($session_limit) ? time2str($session_limit) : $session_limit;
$remaining = is_numeric($remaining) ? time2str($remaining) : $remaining;
if ($item_vals['Dialup-Access'][0] == 'FALSE' || !isset($item_vals['Dialup-Access'][0]) && $attrmap['Dialup-Access'] != '' && $attrmap['Dialup-Access'] != 'none') {
    $msg = <<<EON
<font color=red><b> The user account is locked </b></font>
EON;
} else {
    $msg = <<<EON
user can login for <font color="{$log_color}"> <b>{$remaining} {$extra_msg}</font>
EON;
}
$lock_msg = $item_vals['Dialup-Lock-Msg'][0];
if ($lock_msg != '') {
    $descr = <<<EON
<font color=red><b>{$lock_msg} </b</font>
EON;
} else {
$sql = "SELECT " . $configValues['CONFIG_DB_TBL_DALOHOTSPOTS'] . ".name AS hotspot, count(distinct(UserName)) AS uniqueusers, count(radacctid) AS totalhits, " . " avg(AcctSessionTime) AS avgsessiontime, sum(AcctSessionTime) AS totaltime, " . " avg(AcctInputOctets) AS avgInputOctets, sum(AcctInputOctets) AS sumInputOctets, " . " avg(AcctOutputOctets) AS avgOutputOctets, sum(AcctOutputOctets) AS sumOutputOctets " . " FROM " . $configValues['CONFIG_DB_TBL_RADACCT'] . " JOIN " . $configValues['CONFIG_DB_TBL_DALOHOTSPOTS'] . " on (" . $configValues['CONFIG_DB_TBL_RADACCT'] . ".calledstationid LIKE " . $configValues['CONFIG_DB_TBL_DALOHOTSPOTS'] . ".mac) GROUP BY " . $configValues['CONFIG_DB_TBL_DALOHOTSPOTS'] . ".name  ORDER BY {$orderBy} {$orderType};";
$res = $dbSocket->query($sql);
$logDebugSQL = "";
$logDebugSQL .= $sql . "\n";
echo "<table border='0' class='table1'>\n";
echo "\n                        <thead>\n                                <tr>\n                                <th colspan='10'>" . $l['all']['Records'] . "</th>\n                                </tr>\n                        </thead>\n                ";
if ($orderType == "asc") {
    $orderType = "desc";
} else {
    if ($orderType == "desc") {
        $orderType = "asc";
    }
}
echo "<thread> <tr>\n                <th scope='col'> \n\t\t\t<br/>\n\t\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=hotspot&orderType={$orderType}\">\n\t\t\t" . $l['all']['HotSpot'] . "</a>\n\t\t\t</th>\n\t\t\t<th scope='col'> \n\t\t\t<br/>\n\t\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=uniqueusers&orderType={$orderType}\">\n\t\t\t" . $l['all']['UniqueUsers'] . "</a>\n\t\t\t</th>\n\t\t\t<th scope='col'> \n\t\t\t<br/>\n\t\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=totalhits&orderType={$orderType}\">\n\t\t\t" . $l['all']['TotalHits'] . "</a>\n\t\t\t</th>\n\t\t\t<th scope='col'> \n\t\t\t<br/>\n\t\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=avgsessiontime&orderType={$orderType}\">\n\t\t\t" . $l['all']['AverageTime'] . "</a>\n\t\t\t</th>\n\t\t\t<th scope='col'> \n\t\t\t<br/>\n\t\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=totaltime&orderType={$orderType}\">\n\t\t\t" . $l['all']['TotalTime'] . "</a>\n\t\t\t</th>\n\t\t\t<th scope='col'> \n\t\t\t<br/>\n\t\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=sumInputOctets&orderType={$orderType}\">\n\t\t\tTotal Uploads</a>\n\t\t\t</th>\n\t\t\t<th scope='col'> \n\t\t\t<br/>\n\t\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?orderBy=sumOutputOctets&orderType={$orderType}\">\n\t\t\tTotal Downloads</a>\n\t\t\t</th>\n        </tr> </thread>";
while ($row = $res->fetchRow()) {
    echo "<tr>\n                        <td> {$row['0']} </td>\n                        <td> {$row['1']} </td>\n                        <td> {$row['2']} </td>\n                        <td> " . time2str($row[3]) . " </td>\n                        <td> " . time2str($row[4]) . " </td>\n\t\t\t<td> " . toxbyte($row[6]) . "</td>\n\t\t\t<td> " . toxbyte($row[8]) . "</td>\n                </tr>";
}
echo "</table>";
include 'library/closedb.php';
?>

	</div>

     <div class="tabbertab" title="Graph">

<?php 
echo "<br/><br/><br/><center>";
echo "<img src=\"library/graphs-hotspot-compare-unique-users.php\" /><br/><br/>";
echo "<img src=\"library/graphs-hotspot-compare-hits.php\" /><br/><br/>";
echo "<img src=\"library/graphs-hotspot-compare-time.php\" /><br/><br/>";
echo "</center>";
Example #29
0
echo "<table border='0' class='table1'>\n";
echo "\n                <thead>\n                        <tr>\n                        <th colspan='12' align='left'>\n\n                        <input class='button' type='button' value='CSV Export'\n                        onClick=\"javascript:window.location.href='include/management/fileExport.php?reportFormat=csv'\"\n                        />\n                        <br/>\n                <br/>\n        ";
if ($configValues['CONFIG_IFACE_TABLES_LISTING_NUM'] == "yes") {
    setupNumbering($numrows, $rowsPerPage, $pageNum, $orderBy, $orderType, "&username={$username}&startdate={$startdate}&enddate={$enddate}");
}
echo " </th></tr>\n\t\t\t</thead>\n\t";
if ($orderType == "asc") {
    $orderTypeNextPage = "desc";
} else {
    if ($orderType == "desc") {
        $orderTypeNextPage = "asc";
    }
}
echo "<thread> <tr>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=radacctid&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['ID'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=hotspot&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['HotSpot'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=username&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['Username'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=framedipaddress&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['IPAddress'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=acctstarttime&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['StartTime'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=acctstoptime&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['StopTime'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=acctsessiontime&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['TotalTime'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=acctinputoctets&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['Upload'] . " (" . $l['all']['Bytes'] . ")</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=acctoutputoctets&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['Download'] . " (" . $l['all']['Bytes'] . ")</a>\n\t\t</th>\n\t\t<th scope='col'>\n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=acctterminatecause&orderType={$orderTypeNextPage}\">\n\t\t " . $l['all']['Termination'] . "</a>\n\t\t</th>\n\t\t<th scope='col'> \n\t\t<br/>\n\t\t<a class='novisit' href=\"" . $_SERVER['PHP_SELF'] . "?username={$username}&startdate={$startdate}&enddate={$enddate}&orderBy=nasipaddress&orderType={$orderTypeNextPage}\">\n\t\t" . $l['all']['NASIPAddress'] . "</a>\n\t\t</th>\n                </tr> </thread>";
while ($row = $res->fetchRow()) {
    printqn("<tr>\n\t\t\t\t<td> {$row['0']} </td>\n\n                        <td> <a class='tablenovisit' href='javascript:return;'\n                                onClick='javascript:ajaxGeneric(\"include/management/retHotspotInfo.php\",\"retHotspotGeneralStat\",\"divContainerHotspotInfo\",\"hotspot={$row['1']}\");\n                                        javascript:__displayTooltip();'\n                                tooltipText='\n                                        <a class=\"toolTip\" href=\"mng-hs-edit.php?name={$row['1']}\">\n                                                {$l['Tooltip']['HotspotEdit']}</a>\n                                        &nbsp;\n                                        <a class=\"toolTip\" href=\"acct-hotspot-compare.php?\">\n                                                {$l['all']['Compare']}</a>\n                                        <br/><br/>\n\n                                        <div id=\"divContainerHotspotInfo\">\n                                                Loading...\n                                        </div>\n                                        <br/>'\n                                >{$row['1']}</a>\n                        </td>\n\n                        <td> <a class='tablenovisit' href='javascript:return;'\n                                onClick='javascript:ajaxGeneric(\"include/management/retUserInfo.php\",\"retBandwidthInfo\",\"divContainerUserInfo\",\"username={$row['2']}\");\n                                        javascript:__displayTooltip();'\n                                tooltipText='\n                                        <a class=\"toolTip\" href=\"mng-edit.php?username={$row['2']}\">\n\t                                        {$l['Tooltip']['UserEdit']}</a>\n                                        <br/><br/>\n\n                                        <div id=\"divContainerUserInfo\">\n                                                Loading...\n                                        </div>\n                                        <br/>'\n                                >{$row['2']}</a>\n                        </td>\n\t\t\t\t<td> {$row['3']} </td>\n\t\t\t\t<td> {$row['4']} </td>\n\t\t\t\t<td> {$row['5']} </td>\n\t\t\t\t<td> " . time2str($row[6]) . " </td>\n\t\t\t\t<td> " . toxbyte($row[7]) . "</td>\n\t\t\t\t<td> " . toxbyte($row[8]) . "</td>\n\t\t\t\t<td> {$row['9']} </td>\n\t\t\t\t<td> {$row['10']} </td>\n\t\t</tr>");
}
echo "\n                                        <tfoot>\n                                                        <tr>\n                                                        <th colspan='12' align='left'>\n        ";
setupLinks($pageNum, $maxPage, $orderBy, $orderType, "&username={$username}&startdate={$startdate}&enddate={$enddate}");
echo "\n                                                        </th>\n                                                        </tr>\n                                        </tfoot>\n                ";
echo "</table>";
include 'library/closedb.php';
?>
			
		</div>


<?php 
include 'include/config/logging.php';
?>
Example #30
0
/**
Actual Functionality - building of member rows!
**/
function build_members($usergroup, $start)
{
    global $templates, $mybb, $parser, $plugins, $user;
    $rowiterator = 0;
    eval("\$memberlist = \"\";");
    foreach ($usergroup->get_members_offset($start, $mybb->settings['rpgsuite_groupranks_perpage']) as $member) {
        $rowstyle = $rowiterator % 2 ? "trow2" : "trow1";
        $user = $member->get_info();
        $plugins->run_hooks("groupranks_user");
        $user['isleader'] = $member->is_leader();
        $lastpost = $member->get_last_icpost();
        $user['lasticpost'] = $lastpost ? time2str($lastpost['dateline']) : 'Never';
        eval("\$memberlist .= \"" . $templates->get('rpggroupview_noranks_user') . "\";");
        $rowiterator++;
    }
    return $memberlist;
}