summary refs log tree commit diff stats
path: root/pages
diff options
context:
space:
mode:
Diffstat (limited to 'pages')
-rwxr-xr-xpages/blog.php35
1 files changed, 18 insertions, 17 deletions
diff --git a/pages/blog.php b/pages/blog.php index ab198a0..009326c 100755 --- a/pages/blog.php +++ b/pages/blog.php
@@ -81,23 +81,20 @@ if (isset($_GET['post']))
81 } 81 }
82 82
83 $template->display(); 83 $template->display();
84 $page_id = 'updates-' . $getpost3['id'];
85 include('includes/comments.php');
86 84
87 $getrelated = "SELECT *, MATCH (title, text) AGAINST (\"" . addslashes($getpost3['title']) . "\") AS score FROM updates WHERE MATCH (title, text) AGAINST (\"" . addslashes($getpost3['title']) . "\") AND id <> " . $getpost3['id'] . " LIMIT 0,5"; 85 $getpings = "SELECT * FROM pingbacks WHERE post_id = " . $getpost3['id'];
88 $getrelated2 = mysql_query($getrelated); 86 $getpings2 = mysql_query($getpings);
89 $i=0; 87 $i=0;
90 while ($getrelated3[$i] = mysql_fetch_array($getrelated2)) 88 while ($getpings3[$i] = mysql_fetch_array($getpings2))
91 { 89 {
92 if ($i==0) 90 if ($i==0)
93 { 91 {
94 $template = new FITemplate('related'); 92 $template = new FITemplate('pingbacks');
95 } 93 }
96 94
97 $template->adds_block('POST', array( 'TITLE' => $getrelated3[$i]['title'], 95 $template->adds_block('PINGBACK', array( 'TITLE' => $getpings3[$i]['title'],
98 'CODED' => $getrelated3[$i]['slug'], 96 'URL' => $getpings3[$i]['url'],
99 'AUTHOR' => $getrelated3[$i]['author'], 97 'DATE' => date('F d<\S\U\P>S</\S\U\P> Y', strtotime($getpings3[$i]['pubDate']))));
100 'DATE' => date('F d<\S\U\P>S</\S\U\P> Y',strtotime($getrelated3[$i]['pubDate']))));
101 $i++; 98 $i++;
102 } 99 }
103 100
@@ -106,19 +103,23 @@ if (isset($_GET['post']))
106 $template->display(); 103 $template->display();
107 } 104 }
108 105
109 $getpings = "SELECT * FROM pingbacks WHERE post_id = " . $getpost3['id']; 106 $page_id = 'updates-' . $getpost3['id'];
110 $getpings2 = mysql_query($getpings); 107 include('includes/comments.php');
108
109 $getrelated = "SELECT *, MATCH (title, text) AGAINST (\"" . addslashes($getpost3['title']) . "\") AS score FROM updates WHERE MATCH (title, text) AGAINST (\"" . addslashes($getpost3['title']) . "\") AND id <> " . $getpost3['id'] . " LIMIT 0,5";
110 $getrelated2 = mysql_query($getrelated);
111 $i=0; 111 $i=0;
112 while ($getpings3[$i] = mysql_fetch_array($getpings2)) 112 while ($getrelated3[$i] = mysql_fetch_array($getrelated2))
113 { 113 {
114 if ($i==0) 114 if ($i==0)
115 { 115 {
116 $template = new FITemplate('pingbacks'); 116 $template = new FITemplate('related');
117 } 117 }
118 118
119 $template->adds_block('PINGBACK', array( 'TITLE' => $getpings3[$i]['title'], 119 $template->adds_block('POST', array( 'TITLE' => $getrelated3[$i]['title'],
120 'URL' => $getpings3[$i]['url'], 120 'CODED' => $getrelated3[$i]['slug'],
121 'DATE' => date('F d<\S\U\P>S</\S\U\P> Y', strtotime($getpings3[$i]['pubDate'])))); 121 'AUTHOR' => $getrelated3[$i]['author'],
122 'DATE' => date('F d<\S\U\P>S</\S\U\P> Y',strtotime($getrelated3[$i]['pubDate']))));
122 $i++; 123 $i++;
123 } 124 }
124 125