$blog_write_up = $row['writeup']; $blog_write_up = utf8_decode($blog_write_up); $blog_write_up = utf8_decode($blog_write_up); $blog_write_up = str_replace('???', "\"", $blog_write_up); $blog_write_up = substr(urldecode($blog_write_up), 0, 140) . '...'; $blog_write_up_full = $blog_write_up; } $blogentry = $row['blogentry']; $current_likes = $row['rate']; if ($subscriber_view = true && isset($_COOKIE['user_name'])) { //$if_logged_in = '<a href="#'.$rand_id.'" onclick="likePost('.$blog_id.', '.$current_likes.' , \''.$user_name_session.'\')" class="btn btn-success btn-xs" role="button"><span class="glyphicon glyphicon-save"></span> - SAVE</a>'; } else { $if_logged_in = ''; } $submission_date = date('l, F d', strtotime($row['submission_date'])); $submission_date = get_timeago(strtotime($submission_date)); //$rand_id = rand(111111,999999); $rand_id = $blog_id; $blog_write_up_embedd = ''; if ($row['writeup']) { $blog_write_up_embedd = '<p style="color:#fff;text-shadow:0px 0px 15px #000;" >' . $blog_write_up . '</p> <hr>'; $blog_write_up_full = '<p style="color:#fff;text-shadow:0px 0px 15px #000;" >' . $blog_write_up_full . '</p> <hr>'; } $blog_write_up_embedd = ''; $blog_write_up_full = ''; // TWEET SHARE MESSAGE $tweet_blog = urlencode("[#FLMAG] " . $twitter . "\n\n" . $blogtitle . " \n\n" . str_replace('http://', '', $blog_story_url) . "\n\n" . $twitpic); $link = 'http://freelabel.net/' . $twitter . '/' . $rand_id; echo '
if ($num_visits == 1) { $inputs = array(); $inputs[] = " We have not visited this system before."; $inputs[] = " This is our first time visiting this system."; shuffle($inputs); $va_text .= $inputs[0]; } elseif ($num_visits == 2) { $vis_res = mysqli_query($GLOBALS["___mysqli_ston"], "\tSELECT visit\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM user_visited_systems\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE system_name = '" . mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $curSys["name"]) . "'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tORDER BY visit ASC\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1") or write_log(mysqli_error($GLOBALS["___mysqli_ston"]), __FILE__, __LINE__); $vis_arr = mysqli_fetch_assoc($vis_res); $first_vis = get_timeago(strtotime($vis_arr["visit"])); $va_text .= " We have visited this system once before. That was " . $first_vis . "."; } else { $vis_res = mysqli_query($GLOBALS["___mysqli_ston"], "\tSELECT visit\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM user_visited_systems\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE system_name = '" . mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $curSys["name"]) . "'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tORDER BY visit ASC\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1") or write_log(mysqli_error($GLOBALS["___mysqli_ston"]), __FILE__, __LINE__); $vis_arr = mysqli_fetch_assoc($vis_res); $num_vis = $num_visits - 1; $first_vis = get_timeago(strtotime($vis_arr["visit"])); $va_text .= " We have visited this system " . $num_vis . " times before. Our first visit was " . $first_vis . "."; } } echo $va_text; is_null($___mysqli_res = mysqli_close($link)) ? false : $___mysqli_res; exit; } /* * Closest Station */ if (isset($_GET["cs"])) { if (valid_coordinates($curSys["x"], $curSys["y"], $curSys["z"])) { $usex = $curSys["x"]; $usey = $curSys["y"]; $usez = $curSys["z"];
echo '<a href="System.php?system_name=' . urlencode($system) . '" style="color:inherit">' . $system . '</a>' . $screenshots . '<br />No additional information'; } else { $logres = mysqli_query($GLOBALS["___mysqli_ston"], "\tSELECT id, LEFT(log_entry , 100) AS text\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM user_log\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE system_name = '" . mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $system) . "'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tORDER BY stardate\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1") or write_log(mysqli_error($GLOBALS["___mysqli_ston"]), __FILE__, __LINE__); $logged = mysqli_num_rows($logres); if (isset($visit)) { $visit = date_create($visit); $visit_date = date_modify($visit, "+1286 years"); $visit = date_format($visit_date, "d.m.Y, H:i"); } if ($text != null) { echo "" . $text . "<br />"; } if (!empty($visit)) { $visits = mysqli_num_rows(mysqli_query($GLOBALS["___mysqli_ston"], "\tSELECT id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM user_visited_systems\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE system_name = '" . mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $system) . "'")); $visit_unix = strtotime($visit_og); $visit_ago = get_timeago($visit_unix); echo "<a href=\"/System.php?system_name=" . urlencode($system) . "\" style=\"color:inherit;\">" . $system . "</a>" . $screenshots . " | \n\t\t\tTotal visits: " . $visits . " | First visit: " . $visit . " (" . $visit_ago . ")"; } else { echo "<a href=\"/System.php?system_name=" . urlencode($system) . "\" style=\"color:inherit;\">" . $system . "</a>"; } if ($logged > 0) { $logarr = mysqli_fetch_assoc($logres); $text = $logarr["text"]; echo '<br /> <a href="/log.php?system=' . urlencode($system) . '" style="color:inherit;font-weight:bold" title="View the log for this system"> ' . $text . ' ... </a>'; } } exit; }
<?php foreach ($posts as $post) { $post['embed'] = '<audio controls preload="metadata"><source src="' . $post['trackmp3'] . '"></audio>'; if ($post['trackmp3'] == '') { $post['embed'] = '<br><br><button class="btn btn-primary" >View</button>'; // = '<audio controls preload="metadata"><source src="'.$post['trackmp3'].'"></audio>'; } echo ' <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12 text-center post" style="background-image:url(\'' . $post['photo'] . '\');" data-img=\'' . $post['photo'] . '\'> <div class="background-tint"> <a class="story-img" href="' . $post['blog_story_url'] . '"><h1>' . $post['blogtitle'] . '</h1></a> <a class="story-img" href="' . $post['blog_story_url'] . '"><h3 class="post-twitter">' . $post['twitter'] . '</h3></a> <a class="story-img" href="' . $post['blog_story_url'] . '"><h6 class="post-twitter">' . get_timeago(strtotime($post['submission_date'])) . '</h6></a> <a class="story-img" href="' . $post['blog_story_url'] . '"><img src="' . $post['photo'] . '" style="width:100%;" class=""></a> ' . $post['embed'] . ' </div> </div> '; } ?> <br><br> <button class='col-md-12 load-more-button' ><a class='btn btn-primary' >Load Next (<?php echo $next_page_read; ?> )</a></button>
$new_file = "-1"; if (file_exists($newfile)) { $new_file = file_get_contents($newfile); } if ($new_file != $old_file) { mysqli_query($GLOBALS["___mysqli_ston"], "\tUPDATE edtb_common\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSET unixtime = UNIX_TIMESTAMP()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE name = 'last_galnet_new'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1") or write_log(mysqli_error($GLOBALS["___mysqli_ston"]), __FILE__, __LINE__); } } $in++; } } /* * update last_update time */ mysqli_query($GLOBALS["___mysqli_ston"], "\tUPDATE edtb_common\n\t\t\t\t\t\t\t\t\t\t\t\tSET unixtime = UNIX_TIMESTAMP()\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE name = 'last_galnet_update'\n\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1") or write_log(mysqli_error($GLOBALS["___mysqli_ston"]), __FILE__, __LINE__); } /* * fetch last check time and last new article time */ $last_galnet_check = edtb_common("last_galnet_check", "unixtime"); $last_galnet_new = edtb_common("last_galnet_new", "unixtime"); if ($last_galnet_new < $last_galnet_check) { echo "No new GalNet articles have been published since you last asked " . get_timeago($last_galnet_check, false) . "."; } else { echo "New GalNet articles have been published since you last asked. Would you like me to read them to you?"; } /* * update last check time */ mysqli_query($GLOBALS["___mysqli_ston"], "\tUPDATE edtb_common\n\t\t\t\t\t\t\t\t\t\t\tSET unixtime = UNIX_TIMESTAMP()\n\t\t\t\t\t\t\t\t\t\t\tWHERE name = 'last_galnet_check'\n\t\t\t\t\t\t\t\t\t\t\tLIMIT 1") or write_log(mysqli_error($GLOBALS["___mysqli_ston"]), __FILE__, __LINE__); is_null($___mysqli_res = mysqli_close($link)) ? false : $___mysqli_res;
<i class="mdi mdi-menu-right"></i> <a href="/user/<?php echo $post->uid; ?> /"><?php echo $post->r_fn; ?> </a> </p> </span> <span id="post-date" class="time" title="<?php echo $post->date; ?> "><?php echo get_timeago($post->date); ?> </span> </div> <?php } ?> <br> <div class="ui left aligned"> <?php if ($post->status == "2") { ?> <div class="ui warning message"> This post is private, only you can see it, you can change that by clicking <a id="post-publish" href="#"> here.</a> </div> <?php
$html_content = '<div class="alert alert-warning" role="alert"><span class="label label-warning">OOPS..</span> No available snippet found under this category.</div>'; } } else { // authenticated == true $query = "SELECT * FROM " . DBTABLE_SNIPPETS . " WHERE category_tag='" . $snippet_cat . "'"; $total_found = $db->num_rows($query); if ($total_found > 0) { $results = $db->get_results($query); $html_content = '<div class="alert alert-info" role="alert"><span class="label label-info">INFO</span> This category contains <strong>' . $total_found . '</strong> snippets, but some snippets will not be listed here due to private visibility.</div>'; $html_content .= '<div class="list-group snippet-list">'; foreach ($results as $row) { if ($row['visibility'] == 'private' && $row['user_id'] == $user_loggedin_id) { $html_content .= '<a href="view_snippet.php?id=' . $row['id'] . '" class="list-group-item"><span class="snippet-title">' . $row['name'] . '</span><span class="by-creator"> by <strong>' . get_username($row['user_id']) . '</strong></span> · <span class="created-date">' . get_timeago($row['updated_time']) . '</span><br><span class="private-snippet"><i class="fa fa-info-circle"></i> This is your private snippet. Only you can see this!</span></a>'; } else { if ($row['visibility'] == 'public') { $html_content .= '<a href="view_snippet.php?id=' . $row['id'] . '" class="list-group-item"><span class="snippet-title">' . $row['name'] . '</span><span class="by-creator"> by <strong>' . get_username($row['user_id']) . '</strong></span> · <span class="created-date">' . get_timeago($row['updated_time']) . '</span></a>'; } } } $html_content .= '</div>'; } else { $html_content = '<div class="alert alert-warning" role="alert"><span class="label label-warning">OOPS..</span> No available snippet found under this category.</div>'; } } } else { // ID not numeric header('Location: 404.php?error=invalid_category'); exit; } $category_title = get_category_title($snippet_cat); $category_color = get_category_color($snippet_cat);
?> /"><img src="<?php echo $u->img_path; ?> "></a> </div> <div class="content"> <a href="<?php echo BASE_URL . 'user/' . $u->id; ?> /" class="header"><?php echo $u->username; ?> </a> <div class="time"><?php echo get_timeago($u->register_date); ?> </div> </div> </div> <?php } ?> </div> </div> </div> </div> <div class="ui grid"> <div class="eight wide column"> <div class="ui segment purple cp_segs sections"> <div class="seg_title">
/** * Get audio log files * * @param object $obj * @return string */ private function get_audio($obj) { $logdata .= '<div class="audio" id="' . $obj->id . '" style="display:none">'; $audio_files = explode(", ", $obj->audio); foreach ($audio_files as $audio_file) { $file = $_SERVER["DOCUMENT_ROOT"] . "/audio_logs/" . $audio_file; $file_src = "/audio_logs/" . $audio_file; if (file_exists($file)) { $timestamp = filemtime($file) + $this->time_difference * 60 * 60; $record_date = date("Y-m-d H:i:s", $timestamp); $date = date_create($record_date); $record = date_modify($date, "+1286 years"); $record_added = date_format($record, "j M Y, H:i"); $added_ago = get_timeago($timestamp); $logdata .= '<div style="margin-bottom:4px;margin-top:6px;margin-left:3px">'; $logdata .= 'Added: ' . $record_added . ' (' . $added_ago . ')'; $logdata .= '</div>'; $logdata .= '<div>'; $logdata .= '<audio controls>'; $logdata .= '<source src="' . $file_src . '" type="audio/mp3">'; $logdata .= 'Your browser does not support the audio element.'; $logdata .= '</audio>'; $logdata .= '</div>'; } } unset($audio_file); $logdata .= '</div>'; return $logdata; }
echo $post->thread->link; ?> '"><div class="itemheadfull"> <i><img src="<?php echo $post->author->avatar->small->permalink; ?> " width="40" height="40" class="img-circle" /></i> <?php echo $post->author->username; ?> posted in <b><?php echo $post->thread->title; ?> </b> (<?php echo $this->category_code[$post->thread->category]; ?> ) <span><i class="fa fa-fw fa-clock-o"></i> <?php echo get_timeago(strtotime(str_replace('T', ' ', $post->createdAt))); ?> </span> <div class="discuss_postmessage"> <?php echo $post->message; ?> </div> </div></div> <?php }
$ls_from_star = $station_obj->ls_from_star; $max_landing_pad_size = $station_obj->max_landing_pad_size; $s_faction = $station_obj->faction == "" ? "" : "<strong>Faction:</strong> " . $station_obj->faction; $s_distance_from_star = $ls_from_star == 0 ? "" : "" . number_format($ls_from_star, 0) . " ls - "; $s_information = '<span style="float:right;margin-right:8px">└ ' . $s_distance_from_star . 'Landing pad: ' . $max_landing_pad_size . '</span><br />'; $s_government = $station_obj->government == "" ? "Government unknown" : $station_obj->government; $s_allegiance = $station_obj->allegiance == "" ? "Allegiance unknown" : $station_obj->allegiance; $s_state = $station_obj->state == "" ? "" : "<strong>State:</strong> " . $station_obj->state . "<br />"; $type = $station_obj->type == "" ? "Type unknown" : $station_obj->type; $economies = $station_obj->economies == "" ? "Economies unknown" : $station_obj->economies; $economies = $economies == "" ? "Economies unknown" : $economies; $import_commodities = $station_obj->import_commodities == "" ? "" : "<br /><strong>Import commodities:</strong> " . $station_obj->import_commodities . "<br />"; $export_commodities = $station_obj->export_commodities == "" ? "" : "<strong>Export commodities:</strong> " . $station_obj->export_commodities . "<br />"; $prohibited_commodities = $station_obj->prohibited_commodities == "" ? "" : "<strong>Prohibited commodities:</strong> " . $station_obj->prohibited_commodities . "<br />"; $outfitting_updated_ago = !empty($station_obj->outfitting_updated_at) ? 'Outfitting last updated: ' . get_timeago($station_obj->outfitting_updated_at, true, true) : ""; $shipyard_updated_ago = !empty($station_obj->shipyard_updated_at) ? ' (updated ' . get_timeago($station_obj->shipyard_updated_at, true, true) . ')' : ""; $selling_ships = $station_obj->selling_ships == "" ? "" : "<br /><br /><strong>Selling ships:</strong> " . str_replace("'", "", $station_obj->selling_ships) . $shipyard_updated_ago; $selling_modules = ""; /** * Information about the modules sold at the station */ if (!empty($station_obj->selling_modules)) { $modules = $station_obj->selling_modules; $modules_s = explode("-", $modules); $modules_t = ""; $last_class = ""; $last_module_name = ""; $last_category_name = ""; $mod_cat = []; $i = 0; foreach ($modules_s as $mods) {
$va_text .= " It has " . $count . " spaceports, the nearest one is " . $first_station_name . " " . number_format(round($first_station_ls_from_star)) . " light seconds away."; } else { $va_text .= " It has " . $count . " spaceports."; } } if ($num_visits == 1) { $inputs = []; $inputs[] = " We have not visited this system before."; $inputs[] = " This is our first time visiting this system."; shuffle($inputs); $va_text .= $inputs[0]; } else { $query = " SELECT visit\n FROM user_visited_systems\n WHERE system_name = '{$esc_sysname}'\n ORDER BY visit ASC\n LIMIT 1"; $result = $mysqli->query($query) or write_log($mysqli->error, __FILE__, __LINE__); $vis_arr = $result->fetch_object(); $first_vis = get_timeago(strtotime($vis_arr->visit)); $result->close(); if ($num_visits == 2) { $va_text .= " We have visited this system once before. That was " . $first_vis . "."; } else { $va_text .= " We have visited this system " . $num_visits . " times before. Our first visit was " . $first_vis . "."; } } } echo $va_text; exit; } /** * Nearest Station */ if (isset($_GET["cs"])) {
<div class="itemheadfull"> <i class="<?php echo $this->icons[$type]; ?> " style="color:<?php echo $this->colors[$type]; ?> "></i> <a href="r/<?php echo $r['_id']; ?> "><?php echo $rs['uploader']; ?> <span><i class="fa fa-fw fa-clock-o"></i> <?php echo get_timeago(strtotime(str_replace('.000Z', '', $rs['date']))); ?> </span><br> <span>ran flow</span> <?php echo $rs['run_flow']['name']; ?> <span>on task</span> <?php echo $rs['run_task']['tasktype']['name']; ?> on data set <?php echo $rs['run_task']['source_data']['name']; ?> </a> </div> <div class="runStats statLine"> <?php
/users/<?php echo $img; ?> "> </div> <div class="col-sm-9 col-md-10"> <div class="row"> <?php $curenttime = $comment['comment_created_time']; $time_ago = strtotime($curenttime); ?> <h4><span class="viewername"><?php echo $comment['user_name']; ?> </span> <span class="view-hr viewername"><?php echo get_timeago($time_ago); ?> </span></h4> <p> <?php echo $comment['comment']; ?> </p> <?php if ($comment['id'] == $this->session->userdata('user_id')) { ?> <a href="<?php echo site_url('home/comment_delete/' . $comment['comment_id'] . '/' . $product['id'] . ''); ?>
<td><?php echo $user->full_name; ?> </td> <td title="<?php echo $user->register_date; ?> "><?php echo get_timeago($user->register_date); ?> </td> <td title="<?php echo $user->activity; ?> "><?php echo get_timeago($user->activity); ?> </td> <td><?php echo $user->ip_address; ?> </td> </tr> <?php } ?> </tbody> </table> <br> <?php echo $pag->display(true);
} echo '</div>'; } elseif ($_POST['page'] == 'followers') { echo '<div class="col-md-12 xoverflow_div" style="font-size:80%;height:550px;text-align:left;">'; foreach ($tweets['followers/list'] as $tweet) { echo "<div class=''>"; print_r($tweet); echo '</div>'; } echo '</div>'; $home_timeline[] = '<h3>Home</h3>'; $home_timeline[] = '<div class="overflow_div">'; foreach ($user_timeline as $status) { $time_since_posted = (time() - strtotime($status->created_at)) / 60; $time_since_posted = substr($time_since_posted, 0, 2); $date = get_timeago(strtotime($status->created_at)); //$date = date( 'm-d h:i:s' , strtotime($status->created_at)); $text = $status->text; $home_timeline[] = $date . ' - ' . $text . '<hr>'; } echo '</div>'; } elseif ($_POST['page'] == 'mentions') { echo '<div class="col-md-12 xoverflow_div" style="font-size:80%;height:550px;text-align:left;"><h1>MENTIONS</h1>'; echo $build_data; echo '</div>'; } // ----------------------------------------------------------------- /// // ---------------------- END OF POST VALIDATION ---------------------- /// // ----------------------------------------------------------------- /// //echo '</pre>'; //foreach ($tweets['direct_messages'] as $conversation) {
/** * Show info about stations * * @param string $station_name * @param object $obj * @param string $tdclass */ private function station_info($station_name, $obj, $tdclass) { $station_ls_from_star = $obj->ls_from_star == 0 ? "n/a" : number_format($obj->ls_from_star); $station_max_landing_pad_size = $obj->max_landing_pad_size; $station_max_landing_pad_size = $station_max_landing_pad_size == "L" ? "Large" : "Medium"; $station_is_planetary = $obj->is_planetary; $station_type = $obj->type; $icon = get_station_icon($station_type, $station_is_planetary); $station_id = $obj->station_id; $station_faction = $obj->station_faction == "" ? "" : "<strong>Faction:</strong> " . $obj->station_faction . "<br />"; $station_government = $obj->station_government == "" ? "" : "<strong>Government:</strong> " . $obj->station_government . "<br />"; $station_allegiance = $obj->station_allegiance == "" ? "" : "<strong>Allegiance:</strong> " . $obj->station_allegiance . "<br />"; $station_state = $obj->station_state == "" ? "" : "<strong>State:</strong> " . $obj->station_state . "<br />"; $station_type_d = $obj->type == "" ? "" : "<strong>Type:</strong> " . $obj->type . "<br />"; $station_economies = $obj->station_economies == "" ? "" : "<strong>Economies:</strong> " . $obj->station_economies . "<br />"; $station_import_commodities = $obj->import_commodities == "" ? "" : "<br /><strong>Import commodities:</strong> " . $obj->import_commodities . "<br />"; $station_export_commodities = $obj->export_commodities == "" ? "" : "<strong>Export commodities:</strong> " . $obj->export_commodities . "<br />"; $station_prohibited_commodities = $obj->prohibited_commodities == "" ? "" : "<strong>Prohibited commodities:</strong> " . $obj->prohibited_commodities . "<br />"; $station_selling_ships = $obj->selling_ships == "" ? "" : "<br /><strong>Selling ships:</strong> " . str_replace("'", "", $obj->selling_ships) . "<br />"; $station_shipyard = $obj->shipyard; $station_outfitting = $obj->outfitting; $station_commodities_market = $obj->commodities_market; $station_black_market = $obj->black_market; $station_refuel = $obj->refuel; $station_repair = $obj->repair; $station_rearm = $obj->rearm; $station_includes = array("shipyard" => $station_shipyard, "outfitting" => $station_outfitting, "commodities market" => $station_commodities_market, "black market" => $station_black_market, "refuel" => $station_refuel, "repair" => $station_repair, "restock" => $station_rearm); $i = 0; $station_services = ""; foreach ($station_includes as $name => $included) { if ($included == 1) { if ($i != 0) { $station_services .= ", "; } else { $station_services .= "<strong>Facilities:</strong> "; } $station_services .= $name; $i++; } } $station_services .= "<br />"; $outfitting_updated_at = $obj->outfitting_updated_at == "0" ? "" : "<br /><strong>Outfitting last updated:</strong> " . get_timeago($obj->outfitting_updated_at, true, true) . "<br />"; $shipyard_updated_at = $obj->shipyard_updated_at == "0" ? "" : "<strong>Shipyard last updated:</strong> " . get_timeago($obj->shipyard_updated_at, true, true) . "<br />"; $info = $station_type_d . $station_faction . $station_government . $station_allegiance . $station_state . $station_economies . $station_services; $info .= $station_import_commodities . $station_export_commodities . $station_prohibited_commodities . $outfitting_updated_at . $shipyard_updated_at . $station_selling_ships; $info = str_replace("['", "", $info); $info = str_replace("']", "", $info); $info = str_replace("', '", ", ", $info); /** * get allegiance icon */ $station_allegiance_icon = get_allegiance_icon($obj->station_allegiance); $station_allegiance_icon = '<img src="/style/img/' . $station_allegiance_icon . '" alt="' . $obj->station_allegiance . '" style="width:19px;height:19px;margin-right:5px" />'; /** * notify user if data is old */ $station_disp_name = $station_name; if (!empty($group_id) || !empty($ship_name)) { if (data_is_old($obj->outfitting_updated_at) || data_is_old($obj->shipyard_updated_at)) { $station_disp_name = '<span class="old_data">' . $station_name . '</span>'; } } ?> <td class="<?php echo $tdclass; ?> "> <?php echo $station_allegiance_icon . $icon; ?> <a href="javascript:void(0)" id="minfo<?php echo $station_id; ?> " title="Additional information"> <?php echo $station_disp_name; ?> </a> </td> <td class="<?php echo $tdclass; ?> "> <?php echo $station_ls_from_star; ?> </td> <td class="<?php echo $tdclass; ?> "> <?php echo $station_max_landing_pad_size; ?> </td> <script> $(document).mouseup(function (e) { var containers = []; containers.push($("#si_statinfo")); $.each(containers, function (key, value) { if (!$(value).is(e.target) && $(value).has(e.target).length === 0) { $(value).fadeOut("fast"); } }); }); $("#minfo<?php echo $station_id; ?> ").click(function (e) { var statinfo_div = $("#si_statinfo"); if (statinfo_div.is(":hidden")) { statinfo_div.fadeToggle("fast"); statinfo_div.css( { left: e.pageX - 330, top: e.pageY - 40 }); statinfo_div.html("<?php echo addslashes($info); ?> "); } }); </script> <?php }
<tr> <th>IP</th> <th>Last seen</th> </tr> </thead> <tbody> <?php foreach ($records as $r) { ?> <tr> <td><?php echo $r->ip_addr; ?> </td> <td><?php echo get_timeago($r->date); ?> </td> </tr> <?php } ?> </tbody> </table> <?php echo $pag->display(true); ?> </div> </div> </div> <?php
if ($visibility == 'private' && $user_id != $user_loggedin_id) { // Visibility is private AND logged in user is not the owner of the snippet header('Location: 404.php?error=user_not_owner'); } else { $snippet_user_id = $user_id; $snippet_name = $name; $snippet_cat = get_category_title($category_tag); $snippet_cat_color = get_category_color($category_tag); $snippet_desc = $description; if ($snippet_cat == 'plain-text') { $snippet_output = '<div id="plainOutput"><pre class="plain"><code>' . $snippet . '</code></pre></div>'; } else { $snippet_output = '<div id="codeOutput"><pre class="highlighted"><code>' . $snippet . '</code></pre></div>'; } $snippet_created_time = get_timeago($created_time); $snippet_updated_time = get_timeago($updated_time); $snippet_creator = get_username($user_id); $snippet_view_count = $view_count + 1; snippet_view_increment($snippet_id, $snippet_view_count); } } else { // ID not found header('Location: 404.php?error=id_not_found'); exit; } } else { // ID not numeric header('Location: 404.php?error=id_not_numeric'); exit; } // Get total snippets for each category
</span> by <span name="create-by"><?php echo $this->data["create_user_name"]; ?> </span></td> </tr> <tr> <td><strong>Memo</strong></td> <td><span name="memo"> <?php echo $this->data["memo"]; ?> </span></td> </tr> <tr> <td><strong>Updated at</strong></td> <td><span name="update-date"> <?php echo get_timeago(strtotime($this->data["archived_date"])); ?> </span> by <span name="update-by"><?php echo $this->data["archived_user_name"]; ?> </span></td> </tr> <tr> <td colspan="3"> <?php $image_per_row = 6; $image_list_count = count($this->data["images"]); $column_width = 12 / $image_per_row; $i = 1; $row = 1; foreach ($this->data["images"] as $image) {
}); } fr_star(); }); </script> </div> <div id="about"> <div class="chip">Version : <?php echo $appInfo['version']; ?> </div><cl/> <div class="chip" title="UTC Time Zone - <?php echo $appInfo['updated']; ?> ">Updated : <?php echo get_timeago(strtotime($appInfo['updated'])); ?> </div><cl/> <div class="chip">Author : <a href='/u/<?php echo $appInfo['author']; ?> '><?php echo \Fr\LS2::getUser("name", $appInfo['author']); ?> </a></div><cl/> <div class="chip">Web Page : <?php echo "<a href='{$appInfo['app_page']}' target='_blank'>" . htmlspecialchars($appInfo['app_page']) . "</a>"; ?> </div> </div> </div>
<div class="searchresult panel"> <div class="itemheadfull"> <i><img src="<?php echo htmlentities(authorImage($this->author->image)); ?> " width="40" height="40" class="img-circle" /></i> <?php echo user_display_text($this->author); ?> <span><i class="fa fa-fw fa-clock-o"></i> <?php echo get_timeago(strtotime(str_replace('T', ' ', $this->thread->post_date))); ?> </span> </div> <div class="discuss_postmessage" style="margin-bottom:40px;"> <h2 style="margin-top:0px;"><?php echo $this->thread->title; ?> </h2> <?php echo nl2br(stripslashes($this->thread->body)); ?> </div> <div id="disqus_thread"></div> </div> <script type="text/javascript"> var disqus_shortname = '<?php echo DISQUS_USERNAME; ?>
$html_content = '<div class="list-group snippet-list">'; foreach ($results as $row) { $html_content .= '<a href="view_snippet.php?id=' . $row['id'] . '" class="list-group-item"><span class="snippet-title">' . $row['name'] . '</span> <span class="label ' . get_category_color($row['category_tag']) . '">' . get_category_title($row['category_tag']) . '</span> · <span class="created-date">updated ' . get_timeago($row['updated_time']) . '</span></a>'; } $html_content .= '</div>'; } else { // empty cat $html_content = 'Oops.. you don\'t have any snippet saved here yet. Why not <a href="add_snippet.php">submit one</a>?'; } $query2 = "SELECT * FROM " . DBTABLE_SNIPPETS . " WHERE user_id='" . $user_loggedin_id . "' AND visibility='private'"; $total_found2 = $db->num_rows($query2); if ($total_found2 > 0) { $results2 = $db->get_results($query2); $html_content2 = '<div class="list-group snippet-list">'; foreach ($results2 as $row2) { $html_content2 .= '<a href="view_snippet.php?id=' . $row2['id'] . '" class="list-group-item"><span class="snippet-title">' . $row2['name'] . '</span> <span class="label ' . get_category_color($row2['category_tag']) . '">' . get_category_title($row2['category_tag']) . '</span> · <span class="created-date">updated ' . get_timeago($row2['updated_time']) . '</span></a>'; } $html_content2 .= '</div>'; } else { // empty cat $html_content2 = 'Oops.. you don\'t have any snippet saved here yet. Why not <a href="add_snippet.php">submit one</a>?'; } $query3 = "SELECT * FROM " . DBTABLE_SNIPPETS . " WHERE user_id='" . $user_loggedin_id . "'"; $total_found3 = $db->num_rows($query3); $html_content3 = '<div class="alert alert-info" role="alert"><span class="label label-info">INFO</span> You have <strong>' . $total_found3 . '</strong> snippets in total; <em>' . $total_found . ' public snippets</em> and <em>' . $total_found2 . ' private snippets</em>.</div>'; ?> <!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
} else { $html_content = '<div class="alert alert-warning" role="alert"><span class="label label-warning">OOPS..</span> No available snippet found.</div>'; } } else { // authenticated == true $query = "SELECT * FROM " . DBTABLE_SNIPPETS . " ORDER BY view_count DESC LIMIT 20"; $total_found = $db->num_rows($query); if ($total_found > 0) { $results = $db->get_results($query); $html_content = '<div class="list-group snippet-list">'; foreach ($results as $row) { if ($row['visibility'] == 'private' && $row['user_id'] == $user_loggedin_id) { $html_content .= '<a href="view_snippet.php?id=' . $row['id'] . '" class="list-group-item"><span class="snippet-title">' . $row['name'] . '</span> <span class="label ' . get_category_color($row['category_tag']) . '">' . get_category_title($row['category_tag']) . '</span> · <span class="by-creator"> by <strong>' . get_username($row['user_id']) . '</strong></span> · <span class="created-date">updated ' . get_timeago($row['updated_time']) . '</span> · <span class="view-counter">' . $row['view_count'] . ' views</span><br><span class="private-snippet"><i class="fa fa-info-circle"></i> This is your private snippet. Only you can see this!</span></a>'; } else { if ($row['visibility'] == 'public') { $html_content .= '<a href="view_snippet.php?id=' . $row['id'] . '" class="list-group-item"><span class="snippet-title">' . $row['name'] . '</span> <span class="label ' . get_category_color($row['category_tag']) . '">' . get_category_title($row['category_tag']) . '</span> · <span class="by-creator"> by <strong>' . get_username($row['user_id']) . '</strong></span> · <span class="created-date">updated ' . get_timeago($row['updated_time']) . '</span> · <span class="view-counter">' . $row['view_count'] . ' views</span></a>'; } } } $html_content .= '</div>'; } else { $html_content = '<div class="alert alert-warning" role="alert"><span class="label label-warning">OOPS..</span> No available snippet found.</div>'; } } ?> <!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> <!--[if gt IE 8]><!-->
$bm_coordz = $bb_arr["z"] == "" ? "" : $bb_arr["z"]; } if (valid_coordinates($bm_coordx, $bm_coordy, $bm_coordz)) { if (strtolower($bm_system_name) != strtolower($curSys["name"])) { $bm_comment = $bm_row["comment"]; $bm_added_on = $bm_row["added_on"]; $bm_category_name = $bm_row["category_name"]; $cat = ',"cat":[6]'; $info .= '<div class="map_info"><span class="map_info_title">Bookmarked System</span><br />'; if (isset($bm_added_on)) { $bm_added_on_og = $bm_added_on; $bm_added_on = gmdate("Y-m-d\\TH:i:s\\Z", $bm_added_on); $bm_added_on = date_create($bm_added_on); $bm_added_on_date = date_modify($bm_added_on, "+1286 years"); $bm_added_on = date_format($bm_added_on_date, "d.m.Y, H:i"); $bm_added_on_ago = get_timeago($bm_added_on_og); $info .= '<strong>Bookmarked on</strong><br />' . $bm_added_on . ' (' . $bm_added_on_ago . ')<br /><br />'; } $info .= $bm_category_name == "" ? "" : '<strong>Category</strong><br />' . $bm_category_name . '<br /><br />'; $info .= $bm_comment == "" ? "" : '<strong>Comment</strong><br />' . $bm_comment . '<br /><br />'; $info .= '</div>'; $data = '{"name":"' . $bm_system_name . '"' . $cat . ',"coords":{"x":' . $bm_coordx . ',"y":' . $bm_coordy . ',"z":' . $bm_coordz . '},"infos":' . json_encode($info) . '}' . $last_row . ''; $last_row = "," . $data . ""; } } } } /** * fetch rares data for the map */ if ($settings["galmap_show_rares"] == "true") {
$i = 0; $station_services = ""; foreach ($station_includes as $name => $included) { if ($included == 1) { if ($i != 0) { $station_services .= ", "; } else { $station_services .= "<strong>Facilities:</strong> "; } $station_services .= $name; $i++; } } $station_services .= "<br />"; $outfitting_updated_at = $arr["outfitting_updated_at"] == "0" ? "" : "<br /><strong>Outfitting last updated:</strong> " . get_timeago($arr["outfitting_updated_at"], true, true) . "<br />"; $shipyard_updated_at = $arr["shipyard_updated_at"] == "0" ? "" : "<strong>Shipyard last updated:</strong> " . get_timeago($arr["shipyard_updated_at"], true, true) . "<br />"; $info = $station_type_d . $station_faction . $station_government . $station_allegiance . $station_state . $station_economies . $station_services . $station_import_commodities . $station_export_commodities . $station_prohibited_commodities . $outfitting_updated_at . $shipyard_updated_at . $station_selling_ships; $info = str_replace("['", "", $info); $info = str_replace("']", "", $info); $info = str_replace("', '", ", ", $info); // get allegiance icon $station_allegiance_icon = get_allegiance_icon($arr["station_allegiance"]); $station_allegiance_icon = '<img src="/style/img/' . $station_allegiance_icon . '" alt="' . $arr["station_allegiance"] . '" style="width:19px;height:19px;margin-right:5px" />'; /* * notify user if data is old */ $station_disp_name = $station_name; if (!empty($group_id) || !empty($ship_name)) { if (data_is_old($arr["outfitting_updated_at"]) || data_is_old($arr["shipyard_updated_at"])) { $station_disp_name = '<span class="old_data">' . $station_name . '</span>'; }
$ls_from_star = $sarr2["ls_from_star"]; $max_landing_pad_size = $sarr2["max_landing_pad_size"]; $s_faction = $sarr2["faction"] == "" ? "" : "<strong>Faction:</strong> " . $sarr2["faction"] . ""; $s_distance_from_star = $ls_from_star == 0 ? "" : "" . number_format($ls_from_star, 0) . " ls - "; $s_information = "<span style='float:right;margin-right:8px;'>└ " . $s_distance_from_star . "Landing pad: " . $max_landing_pad_size . "</span><br />"; $s_government = $sarr2["government"] == "" ? "Government unknown" : "" . $sarr2["government"] . ""; $s_allegiance = $sarr2["allegiance"] == "" ? "Allegiance unknown" : "" . $sarr2["allegiance"] . ""; $s_state = $sarr2["state"] == "" ? "" : "<strong>State:</strong> " . $sarr2["state"] . "<br />"; $type = $sarr2["type"] == "" ? "Type unknown" : "" . $sarr2["type"] . ""; $economies = $sarr2["economies"] == "" ? "Economies unknown" : "" . $sarr2["economies"] . ""; $economies = $economies == "" ? "Economies unknown" : $economies; $import_commodities = $sarr2["import_commodities"] == "" ? "" : "<br /><strong>Import commodities:</strong> " . $sarr2["import_commodities"] . "<br />"; $export_commodities = $sarr2["export_commodities"] == "" ? "" : "<strong>Export commodities:</strong> " . $sarr2["export_commodities"] . "<br />"; $prohibited_commodities = $sarr2["prohibited_commodities"] == "" ? "" : "<strong>Prohibited commodities:</strong> " . $sarr2["prohibited_commodities"] . "<br />"; $outfitting_updated_ago = !empty($sarr2["outfitting_updated_at"]) ? 'Outfitting last updated: ' . get_timeago($sarr2["outfitting_updated_at"], true, true) . '' : ""; $shipyard_updated_ago = !empty($sarr2["shipyard_updated_at"]) ? ' (updated ' . get_timeago($sarr2["shipyard_updated_at"], true, true) . ')' : ""; $selling_ships = $sarr2["selling_ships"] == "" ? "" : "<br /><br /><strong>Selling ships:</strong> " . str_replace("'", "", $sarr2["selling_ships"]) . "" . $shipyard_updated_ago . ""; $selling_modules = ""; if (!empty($sarr2["selling_modules"])) { $modules = $sarr2["selling_modules"]; $modules_s = explode("-", $modules); $modules_t = ""; $last_class = ""; $last_module_name = ""; $last_category_name = ""; $mod_cat = array(); $i = 0; foreach ($modules_s as $mods) { $mods_res = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT SQL_CACHE class, rating, price, group_name, category_name\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM edtb_modules\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE id = '" . $mods . "'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1") or write_log(mysqli_error($GLOBALS["___mysqli_ston"]), __FILE__, __LINE__); $mods_num = mysqli_num_rows($mods_res); if ($mods_num > 0) {
public function getPostFeatured($query = NULL) { // VERYFIY ISSET if ($query !== NULL) { // PREP VARIABLES $query = trim($query); include ROOT . 'inc/connection.php'; // BUILD QUERY $sql = mysqli_query($con, "SELECT * FROM `feed`\n WHERE `user_name` LIKE '%{$query}%'\n OR `blogtitle` LIKE '%{$query}%'\n OR `twitter` LIKE '%{$query}%'\n OR `tags` LIKE '%{$query}%'\n\n ORDER BY `id` DESC LIMIT 50"); // RUN QUERY while ($row = mysqli_fetch_assoc($sql)) { $feed_posts[] = $row; } // VERIFY POSTS if (!isset($feed_posts)) { $feed_posts = NULL; } } else { $feed_posts = 'No Query Set!'; } // GRAB GLOBAL FEED // $feed_posts = $this->getPostsByUser(0,50,'admin'); // shuffle($feed_posts); foreach ($feed_posts as $track_num => $meta) { if ($this->detect_type($meta['trackmp3']) == 'mp3') { // build play button $play_button = '<a href="#" id="controls-' . $meta['id'] . '" class="btn btn-default btn-xs btn-secondary-outline controls-play" data-src="' . $meta['trackmp3'] . '" data-title="' . $meta['twitter'] . ' - ' . $meta['blogtitle'] . '" style="background-image:url(\'' . $meta['photo'] . '\');" ><i class="fa fa-play"></i></a>'; // build article row $posts_panel .= '<section class="section-news" style="padding-bottom:0;"> <h3 class="sr-only">News</h3> <div class="bg-inverse"> <div class="row"> <div class="col-md-6 p-r-0"> <figure class="has-light-mask m-b-0 image-effect"> <img src="' . $meta['photo'] . '" alt="Article thumbnail" class="img-responsive"> </figure> </div> <div class="col-md-6 p-l-0"> <article class="center-block"> <span class="label label-info">' . $meta['twitter'] . '</span> <br> <h5><a href="' . $meta['blog_story_url'] . '">' . $meta['blogtitle'] . ' <span class="icon-arrow-right"></span></a></h5> <p class="m-b-0"> <a href="' . $meta['blog_story_url'] . '"><span class="label label-default text-uppercase"><span class="icon-tag"></span> Design Studio</span></a> <a href="' . $meta['blog_story_url'] . '"><span class="label label-default text-uppercase"><span class="icon-time"></span> ' . get_timeago(strtotime($meta['submission_date'])) . '</span></a> </p> </article> </div> </div> </div> </section>'; } else { // SKIP AND MOVE TO NEXT Post // ADD TO VIDEO ARRAY // TO DO LATER ################ } // IF END } // FOREACH END return $posts_panel; }
echo $rp->id; ?> "><?php echo $rp->content; ?> </a></td> <td><?php echo View::user($rp->uid); ?> </td> <td><?php echo $count; ?> </td> <td><?php echo get_timeago($rp->rp_date); ?> </td> <td><a href="report.php?id=<?php echo $rp->id; ?> ">View Details</a></td> </tr> <?php } ?> </tbody> </table> </div> </div> </div>
/** * Make items * * @param object $obj * @param string $type * @param int $i * @return string * @author Mauri Kujala <*****@*****.**> */ private function make_item($obj, $type, &$i) { $item_id = $obj->id; $item_text = $obj->text; $item_name = $obj->item_name; $item_system_name = $obj->system_name; $item_system_id = $obj->system_id; $item_cat_name = $obj->catname; $item_added_on = $obj->added_on; $item_added_ago = ""; if (!empty($item_added_on)) { $item_added_ago = get_timeago($item_added_on, false); $item_added_on = new \DateTime(date("Y-m-d\\TH:i:s\\Z", $item_added_on + $this->time_difference * 60 * 60)); $item_added_on = date_modify($item_added_on, "+1286 years"); $item_added_on = $item_added_on->format("j M Y, H:i"); } $item_coordx = $obj->item_coordx; $item_coordy = $obj->item_coordy; $item_coordz = $obj->item_coordz; $distance = "n/a"; if (valid_coordinates($item_coordx, $item_coordy, $item_coordz)) { $distance = number_format(sqrt(pow($item_coordx - $this->usex, 2) + pow($item_coordy - $this->usey, 2) + pow($item_coordz - $this->usez, 2)), 1) . " ly"; } /** * if visited, change border color */ $visited = System::num_visits($item_system_name); $style_override = $visited ? ' style="border-left: 3px solid #3da822"' : ""; $tdclass = $i % 2 ? "dark" : "light"; /** * provide crosslinks to screenshot gallery, log page, etc */ $item_crosslinks = System::crosslinks($item_system_name); echo '<tr>'; echo '<td class="' . $tdclass . ' poi_minmax">'; echo '<div class="poi"' . $style_override . '>'; echo '<a href="javascript:void(0)" onclick="update_values(\'/Bookmarks/get' . $type . 'EditData.php?' . $type . '_id=' . $item_id . '\', \'' . $item_id . '\');tofront(\'add' . $type . '\')" style="color:inherit" title="Click to edit entry">'; echo $distance . ' –'; if (!empty($item_system_id)) { echo '</a> <a title="System information" href="/System?system_id=' . $item_system_id . '" style="color:inherit">'; } elseif ($item_system_name != "") { echo '</a> <a title="System information" href="/System?system_name=' . urlencode($item_system_name) . '" style="color:inherit">'; } else { echo '</a> <a href="#" style="color:inherit">'; } if (empty($item_name)) { echo $item_system_name; } else { echo $item_name; } echo '</a>' . $item_crosslinks . '<span class="right" style="margin-left:5px">' . $item_cat_name . '</span><br />'; if (!empty($item_added_on)) { echo 'Added: ' . $item_added_on . ' (' . $item_added_ago . ')<br /><br />'; } echo nl2br($item_text); echo '</div>'; echo '</td>'; echo '</tr>'; $i++; }