= time()) { return('New!'); } else { return; } } function getpercent($getpoll3,$num) { $maxper = ($getpoll3['clicks1'] + $getpoll3['clicks2'] + $getpoll3['clicks3'] + $getpoll3['clicks4']); $percent = round(($getpoll3['clicks' . $num] / $maxper) * 100); return($percent); } function generateSlug($title,$table) { $title = preg_replace('/[^A-Za-z0-9]/','-',$title); $title = preg_replace('/-{2,}/','-',$title); if (substr($title,0,1) == '-') { $title = substr($title,1); } if (substr($title,strlen($title)-1,1) == '-') { $title = substr($title,0,strlen($title)-1); } $title = strtolower($title); $getprevs = "SELECT COUNT(*) FROM " . $table . " WHERE slug = \"" . $title . "\" OR slug LIKE \"" . $title . "-%\""; $getprevs2 = mysql_query($getprevs); @$getprevs3 = mysql_fetch_array($getprevs2); if ($getprevs3[0] > 0) { $title .= '-' . ($getprevs3[0]+1); } return($title); } function postBlogPost($title,$author,$tags,$content) { $slug = generateSlug($title,'updates'); $inspost = "INSERT INTO updates (title,slug,author,text) VALUES (\"" . $title . "\",\"" . $slug . "\",\"" . $author . "\",\"" . mysql_real_escape_string($content) . "\")"; $inspost2 = mysql_query($inspost); $id = mysql_insert_id(); addTags($id, $tags); $upconf = "UPDATE config SET value = \"" . date('md') . "\" WHERE name = \"lastUpdate\""; $upconf2 = mysql_query($upconf); preg_match_all('|]*href="([^"]+)"|i', parseText($content), $matches); foreach ($matches[1] as $link) { if ($all_links[$link]) { continue; } $all_links[$link] = true; if (preg_match('/^https{0,1}:/i', $link)) { $c = curl_init(); curl_setopt($c, CURLOPT_URL, $link); curl_setopt($c, CURLOPT_RETURNTRANSFER, true); curl_setopt($c, CURLOPT_HEADER, false); $page_data = curl_exec($c); curl_close($c); if (preg_match('/send($msg); } } } $client = new xmlrpc_client('http://rpc.pingomatic.com'); $msg = new xmlrpcmsg("weblogUpdates.ping", array( new xmlrpcval('Four Island', 'string'), new xmlrpcval('http://fourisland.com/', 'string'))); $client->send($msg); return $id; } function recalcPop($id) { $getpost = "SELECT * FROM updates WHERE id = " . $id; $getpost2 = mysql_query($getpost); $getpost3 = mysql_fetch_array($getpost2); $popularity = $getpost3['home_views']; $popularity += ($getpost3['views']*2); $popularity += ($getpost3['rating']*5); $getcomment
#include <wx/wxprec.h>

#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif

#include "tracker_config.h"
#include "tracker_frame.h"

class TrackerApp : public wxApp {
 public:
  virtual bool OnInit() {
    GetTrackerConfig().Load();

    TrackerFrame *frame = new TrackerFrame();
    frame->Show(true);
    return true;
  }
};

wxIMPLEMENT_APP(TrackerApp);