} else { $class = ' un'; } if (getAlbumDesc()) { ?> <div class="desc<?php echo $class; ?> "> <?php echo html_encode(getAlbumDesc()); ?> </div> <?php } if (gettags()) { echo '<div class="tagsList' . $class . '">'; printTags('links', 'Tags: ', '', ', ', false, '', true); echo '</div>'; } if (function_exists('printRating')) { echo '<div class="clear ratings">'; printRating(); echo '</div>'; } ?> </div> <div class="thumbs"> <ul class="list"> <?php while (next_album()) {
gettags($post->{'tag'}); echo "</div>" . "\n"; } else { if ($type == 'conversation') { echo '<div class="tumblr-post tumblr-conversation">' . "\n"; echo '<div class="tumblr-date">' . $date . '</div>'; echo "<h4>" . $post->{'conversation-title'} . "</h4>\n"; $conversation = explode("\n", $post->{'conversation-text'}); foreach ($conversation as $key => $value) { if ($key % 2 == 0) { echo '<p class="tumblr-even"><strong>' . str_replace(':', ':</strong>', $value) . "</p>\n"; } else { echo '<p class="tumblr-odd"><strong>' . str_replace(':', ':</strong>', $value) . "</p>\n"; } } gettags($post->{'tag'}); echo "</div>" . "\n"; } } } } } } if ($post_number > $display_number) { echo '<br /><a href="http://nwctrack.tumblr.com"><img src="assets/tumblr-link.png" alt="nwctrack.tumblr.com" width="" height="" border="0"></a>'; } echo "</div>" . "\n\n"; } function gettags($tags) { // START TAGS
$main_nodes_str = implode(",", $main_nodes_arr); $query = $DBS->query("SELECT `id`, `name` FROM `yunbbs_categories` WHERE `id` in({$main_nodes_str})"); $main_nodes_arr = array(); while ($node = $DBS->fetch_array($query)) { $main_nodes_arr[$node['id']] = $node['name']; } unset($node); $DBS->free_result($query); } if ($_SERVER['REQUEST_METHOD'] == 'POST') { if (empty($_SERVER['HTTP_REFERER']) || $_POST['formhash'] != formhash() || preg_replace("/https?:\\/\\/([^\\:\\/]+).*/i", "\\1", $_SERVER['HTTP_REFERER']) !== preg_replace("/([^\\:]+).*/", "\\1", $_SERVER['HTTP_HOST'])) { exit('403: unknown referer.'); } $p_title = addslashes(trim($_POST['title'])); $p_content = addslashes(trim($_POST['content'])); $p_tags = gettags(trim($_POST['tags'])); // spam_words if ($options['spam_words'] && $cur_user['flag'] < 99) { $check_con = ' ' . $p_title . $p_content; $spam_words_arr = explode(",", $options['spam_words']); foreach ($spam_words_arr as $spam) { if (strpos($check_con, $spam)) { // has spam word $DBS->unbuffered_query("UPDATE yunbbs_users SET flag='0' WHERE id='{$cur_uid}'"); exit('403: dont post any spam.'); } } } if ($options['main_nodes']) { $cid = $_POST['select_cid']; }
if ($refresh == 'true') { $places = getyelpall($lat, $long, $cat, $radius); $places = parseyelp($places); $_SESSION['refresh'] = 'false'; } else { $places = $_SESSION['places']; } } print_r($_SESSION); //users history $userevents = getevents($user); //sanitise data //yelp $places = sanitise($places, $userevents); // get user tags $usertags = gettags($user); // weight yelp for ($i = 0; $i < count($places); $i++) { $places[$i] = weight($places[$i], $usertags); } //sort yelp $places = sortevents($places); $places = array_values($places); $_SESSION['places'] = $places; $userlat = $_SESSION['userlat']; $userlong = $_SESSION['userlong']; //display top $suggestion = $places[0]; $postcode = $suggestion['postcode']; //enrich with foursquare //geocode to get lat long