summary refs log tree commit diff stats
path: root/pages/blog.php
diff options
context:
space:
mode:
Diffstat (limited to 'pages/blog.php')
-rwxr-xr-xpages/blog.php23
1 files changed, 18 insertions, 5 deletions
diff --git a/pages/blog.php b/pages/blog.php index a03d3b1..c9781ee 100755 --- a/pages/blog.php +++ b/pages/blog.php
@@ -27,7 +27,7 @@ if ((strpos($_SERVER['REQUEST_URI'],'index.php')) && (isset($_GET['post'])))
27 header('Location: /blog/' . $_GET['post'] . '/'); 27 header('Location: /blog/' . $_GET['post'] . '/');
28} 28}
29 29
30$pageCategory = 'home'; 30$pageCategory = 'blog';
31$pageAID = 'archive'; 31$pageAID = 'archive';
32 32
33if (isset($_GET['post'])) 33if (isset($_GET['post']))
@@ -65,7 +65,7 @@ if (isset($_GET['post']))
65 65
66 $template->add_ref(0, 'POST', array( 'ID' => $getpost3['id'], 66 $template->add_ref(0, 'POST', array( 'ID' => $getpost3['id'],
67 'YEARID' => ((date('Y',strtotime($getpost3['pubDate']))-2006) % 4), 67 'YEARID' => ((date('Y',strtotime($getpost3['pubDate']))-2006) % 4),
68 'DATE' => date('F dS Y \a\\t g:i:s a',strtotime($getpost3['pubDate'])), 68 'DATE' => date('F jS Y \a\\t g:i:s a',strtotime($getpost3['pubDate'])),
69 'MONTH' => date('M',strtotime($getpost3['pubDate'])), 69 'MONTH' => date('M',strtotime($getpost3['pubDate'])),
70 'DAY' => date('d',strtotime($getpost3['pubDate'])), 70 'DAY' => date('d',strtotime($getpost3['pubDate'])),
71 'CODED' => $getpost3['slug'], 71 'CODED' => $getpost3['slug'],
@@ -80,6 +80,19 @@ if (isset($_GET['post']))
80 $template->adds_ref_sub(0, 'TAGS', array('TAG' => $tag)); 80 $template->adds_ref_sub(0, 'TAGS', array('TAG' => $tag));
81 } 81 }
82 82
83 $gettrack = "SELECT * FROM tracking WHERE ip = \"" . $_SERVER['REMOTE_ADDR'] . "\"";
84 $gettrack2 = mysql_query($gettrack);
85 $gettrack3 = mysql_fetch_array($gettrack2);
86
87 $trackArr = explode(',',$gettrack3['rating']);
88
89 if (($gettrack3['ip'] != $_SERVER['REMOTE_ADDR']) || (array_search($getpost3['id'],$trackArr) === FALSE))
90 {
91 $template->adds_ref_sub(0, 'CANVOTE', array('exi'=>1));
92 } else {
93 $template->adds_ref_sub(0, 'NOVOTE', array('exi'=>1));
94 }
95
83 $template->display(); 96 $template->display();
84 97
85 $getpings = "SELECT * FROM pingbacks WHERE post_id = " . $getpost3['id']; 98 $getpings = "SELECT * FROM pingbacks WHERE post_id = " . $getpost3['id'];
@@ -93,8 +106,8 @@ if (isset($_GET['post']))
93 } 106 }
94 107
95 $template->adds_block('PINGBACK', array( 'TITLE' => $getpings3[$i]['title'], 108 $template->adds_block('PINGBACK', array( 'TITLE' => $getpings3[$i]['title'],
96 'URL' => $getpings3[$i]['url'], 109 'URL' => htmlspecialchars($getpings3[$i]['url']),
97 'DATE' => date('F d<\S\U\P>S</\S\U\P> Y', strtotime($getpings3[$i]['pubDate'])))); 110 'DATE' => date('F jS Y', strtotime($getpings3[$i]['pubDate']))));
98 $i++; 111 $i++;
99 } 112 }
100 113
@@ -124,7 +137,7 @@ if (isset($_GET['post']))
124 { 137 {
125 $template->adds_block('BIO', array( 'TEXT' => $getbio3['text'], 138 $template->adds_block('BIO', array( 'TEXT' => $getbio3['text'],
126 'USERNAME' => $getbio3['username'], 139 'USERNAME' => $getbio3['username'],
127 'DATE' => date('F dS Y \a\\t g:i:s a',strtotime($getbio3['lastUpdated'])))); 140 'DATE' => date('F jS Y \a\\t g:i:s a',strtotime($getbio3['lastUpdated']))));
128 } 141 }
129 } elseif (isset($_GET['tag'])) 142 } elseif (isset($_GET['tag']))
130 { 143 {