Revcms Errors

Sab

I love milfs.
Jun 25, 2011
1,212
136
mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\app\tpl\class.forms.php in line 87

and

mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\app\tpl\skins\Custom-Habbo\includes\head.php on line 16
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
You expect us to know your error by this? You could at-least show us the queries from the files, also 'head.php' doesn't by default come w/ RevCMS.
 

Wickd

The first member of the Knights of the Pink Table
Jan 15, 2013
1,936
612
Change class.forms.php to this:
<?php

namespace Revolution;
if(!defined('IN_INDEX')) { die('Sorry, you cannot access this file.'); }
class forms implements iForms
{

public $error;

final public function setData()
{
global $engine;
foreach($_POST as $key => $value)
{
if($value != null)
{
$this->$key = $engine->secure($value);
}
else
{
$this->error = 'Please fill in all fields';
return;
}
}

}

final public function unsetData()
{
global $template;
foreach($this as $key => $value)
{
unset($this->$key);
}
}

final public function writeData($key)
{
global $template;
echo $this->$key;
}

final public function outputError()
{
global $template;
if(isset($this->error))
{
echo "<div id='message'> " . $this->error . " </div>";
}
}

/* Manage different pages */

final public function getPageNews()
{
global $template, $engine;
if(!isset($_GET['id']) || !is_numeric($_GET['id']))
{
$_GET['id'] = 1;
}
$result = mysql_query("SELECT title, id FROM cms_news WHERE id != '" . $engine->secure($_GET['id']) . "' ORDER BY id DESC");

while($news1 = mysql_fetch_array($result))
{
$template->setParams('newsList', '&laquo; <a href="index.php?url=news&id='.$news1["id"].'">' . $news1['title'] . '</a><br/>');
}

$news = $engine->fetch_assoc("SELECT title, shortstory, longstory, author, date 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['date']));
$template->setParams('newsPreview', $news['shortstory']);

unset($result);
unset($news1);
unset($news);
}

final public function getPageHome()
{
global $template, $engine;
$a = 1;
$data = mysql_query("SELECT title, id, date, shortstory, image FROM cms_news ORDER BY id DESC LIMIT 5");

while($news = mysql_fetch_array($data, MYSQL_ASSOC))
{
$template->setParams('newsTitle-' . $a, $news['title']);
$template->setParams('newsID-' . $a, $news['id']);
$template->setParams('newsDate-' . $a, date("d-m-y", $news['date']));
$template->setParams('newsCaption-' . $a, $news['shortstory']);
$template->setParams('newsIMG-' . $a, $news['image']);
$a++;
}

unset($news);
unset($data);
}

}

?>
 

Users who are viewing this thread

Top