"><?php echo $app['author']; ?> </a></div> </div> </div> <div class="bpane row"> <div class="lside col s6 l6"> <?php echo "<div>Rating: " . $app['rating'] . "</div>"; echo "<div class='downloads'>" . $app['downloads'] . " downloads</div>"; ?> </div> <div class="rside col s6 l6"> <div>Updated <?php echo Time::getTimeago($app['updated']); ?> </div> </div> </div> </div> <?php } echo '</div>'; $apps_pages = ceil($server_response['apps_count'] / 6) + 1; $cur_page = \Request::get("p", "1"); echo "<ul class='pagination'>"; for ($i = 1; $i < $apps_pages; $i++) { echo "<li class='waves-effect " . ($cur_page == $i ? "active" : "") . "'>"; echo "<a href='?p={$i}'>{$i}</a>"; echo "</li>";
/** * Get App Data */ public static function getData($id, $name = "", $extra = false, $safe = true) { if (self::$installed) { $return = array(); $prefix = self::$prefix; if ($id != "" && $name == "") { $sql = self::$dbh->prepare("SELECT * FROM `{$prefix}data` WHERE `app` = ?"); $sql->execute(array($id)); $return = $sql->fetchAll(); foreach ($return as &$v) { $v["created"] = \Lobby\Time::date($v["created"]); $v["updated"] = \Lobby\Time::date($v["updated"]); } } else { $sql = self::$dbh->prepare("SELECT * FROM `{$prefix}data` WHERE `name` = ? AND `app` = ?"); $sql->execute(array($name, $id)); $r = $sql->fetchAll(\PDO::FETCH_ASSOC); $count = count($r); if ($count > 1) { /** * Multiple Results; so give a multidimensional array of results */ $return = $r; foreach ($return as &$v) { $v["created"] = \Lobby\Time::date($v["created"]); $v["updated"] = \Lobby\Time::date($v["updated"]); } } else { if ($count === 1) { /** * A single result is present, so give a single array only if $extra is TRUE */ $return = $r[0]; if ($extra === false) { $return = $return['value']; } else { /** * Cconvert time to the timezone chosen by user */ $return["created"] = \Lobby\Time::date($return["created"]); $return["updated"] = \Lobby\Time::date($return["updated"]); } } else { $return = array(); } } } if (is_array($return) && $safe === true) { array_walk_recursive($return, function (&$value) { $value = \Lobby\DB::filt($value); }); } return is_array($return) && count($return) == 0 ? null : $return; } }
/** * Publish status */ public function status($msg) { $msg = \Lobby\Time::now("H:i:s") . " - " . $msg; $this->app->data->saveArray("log", array($this->statusID => $msg)); $this->statusID++; }
<?php $offset = Request::postParam("offset"); if ($offset !== null) { $timeZone = \Lobby\Time::getTimezone($offset); if (@date_default_timezone_set($timeZone)) { \Lobby\DB::saveOption("lobby_timezone", $timeZone); } }
</optgroup> <?php $regions = array("Africa" => DateTimeZone::AFRICA, "America" => DateTimeZone::AMERICA, "Antartica" => DateTimeZone::ANTARCTICA, "Asia" => DateTimeZone::ASIA, "Atlantic" => DateTimeZone::ATLANTIC, "Australia" => DateTimeZone::AUSTRALIA, "Europe" => DateTimeZone::EUROPE, "Indian" => DateTimeZone::INDIAN, "Pacific" => DateTimeZone::PACIFIC, "UTC" => DateTimeZone::UTC); $ctz = Lobby\DB::getOption("lobby_timezone"); foreach ($regions as $region => $id) { $tzs = \DateTimeZone::listIdentifiers($id); echo '<optgroup label="' . $region . '">'; foreach ($tzs as $tz) { echo '<option value="' . $tz . '" ' . ($ctz === $tz ? "selected" : "") . '>' . $tz . '</option>'; } echo '</optgroup>'; } ?> </select> <p>Timestamp Now : <?php echo \Lobby\Time::now(); ?> </p> </label> <button clear class="btn green">Save Settings</button> </form> <h2>About</h2> <table> <col width="100"> <col width="120"> <tbody> <tr> <td>Version</td> <td><?php echo \Lobby::$version; ?>