hi all php developers,
I need your help plz...
In my config.php file I have the following:
class CF extends Classifieds {
// Enter admin password, which you can use to access any listing in the
// database. Useful for deleting or modifying unwanted postings.
var $admin_password = "mypass";
// Allow HTML in ads
// =====================================================================
// Do you want to allow HTML tags in the listing body? Enter either
// true or false. If false, all HTML tags will be stripped out.
var $allow_html = true;
...
in index.php I have:
function generate_edit() {
global $HTTP_POST_VARS,$HTTP_GET_VARS,$PHP_SELF,$QUERY_STRING;
if ($HTTP_GET_VARS["listing_id"]) {
$query = "SELECT password FROM classifieds_listings WHERE listing_id=" . $HTTP_GET_VARS["listing_id"];
$this->db->query($query);
if ($this->db->next_record()) {
$correct_password = $this->db->f('password');
}
}
if (($HTTP_POST_VARS && $HTTP_POST_VARS["password"] == $correct_password && $correct_password != "") || ($HTTP_POST_VARS["password"] == $this->admin_password)) {
// find out category_id, either from GET or FROM POST
$category_id = ($HTTP_POST_VARS["category_id"]) ? $HTTP_POST_VARS["category_id"] : $HTTP_GET_VARS["category_id"];
$listing_id = ($HTTP_POST_VARS["listing_id"]) ? $HTTP_POST_VARS["listing_id"] : $HTTP_GET_VARS["listing_id"];
if (!$category_id) $this->error("You have to supply category id");
if (!$listing_id) $this->error("You have to supply Listing ID");
...
ehen I execute index.php in my browser I get the following error msg:
Parse error: parse error in c:\website\index.php on line 1791
Fatal error: Class cf: Cannot inherit from undefined class classifieds in c:\website\local.php on line 98