Kristopher
Photographer
- Dec 25, 2010
- 803
- 68
So I'm trying to have this output:
<p><a class="newsListElement"<a href="
Like this:
<p><a class="newsListElement"<a href="
My code is currently:
Please note I am trying to stick with the template system. The more help the better as I plan to release a complete different style for RevCMS
<p><a class="newsListElement"<a href="
You must be registered for see links
">News name<br/><i>Posted on:1469230695By:Admin</i></a></p>Like this:
<p><a class="newsListElement"<a href="
You must be registered for see links
">News name<br/><i>Posted on: 7/8/2015 By:Admin</i></a></p>My code is currently:
$result = mysql_query("SELECT title, author, published, id FROM cms_news WHERE id != '" . $engine->secure($_GET['id']) . "' ORDER BY id DESC");
while($news1 = mysql_fetch_array($result))
{
$template->setParams('newsList', '<p><a class="newsListElement"<a href="index.php?url=news&id='.$news1["id"].'">' . $news1['title'] . '<br/>' . '<i>Posted on:' . $news1['published'] . 'By:' . $news1['author'] . '</i></a></p> <br>');
}
$news = $engine->fetch_assoc("SELECT title, longstory, author, published FROM cms_news WHERE id = '" . $engine->secure($_GET['id']) . "' LIMIT 1");
$template->setParams('newsTitle', $news['title']);
$template->setParams('newsContent', $news['longstory']);
$template->setParams('newsAuthor', $news['author']);
$template->setParams('newsDate', date("d-m-y", $news['published']));
unset($result);
unset($news1);
unset($news);
while($news1 = mysql_fetch_array($result))
{
$template->setParams('newsList', '<p><a class="newsListElement"<a href="index.php?url=news&id='.$news1["id"].'">' . $news1['title'] . '<br/>' . '<i>Posted on:' . $news1['published'] . 'By:' . $news1['author'] . '</i></a></p> <br>');
}
$news = $engine->fetch_assoc("SELECT title, longstory, author, published FROM cms_news WHERE id = '" . $engine->secure($_GET['id']) . "' LIMIT 1");
$template->setParams('newsTitle', $news['title']);
$template->setParams('newsContent', $news['longstory']);
$template->setParams('newsAuthor', $news['author']);
$template->setParams('newsDate', date("d-m-y", $news['published']));
unset($result);
unset($news1);
unset($news);
Please note I am trying to stick with the template system. The more help the better as I plan to release a complete different style for RevCMS