isEmpty("url_art", "Invalid URL - 1");
$article_valform->isNumber("url_art", "Invalid Article ID - 1");
$article_valform->isWithinRange("url_art", "Invalid Article ID - 2", 0, 794);
//If no errors are posted, grab article information
if (!$article_valform->isError()) {
$ip=$_SERVER['REMOTE_ADDR'];
if ($type == "dealer") {
$enter_type = "custom";
} else {
$enter_type = "generic";
}
//$queryInsert = "INSERT INTO article_counter (countid, artid, timestamp,ipaddress, subdomain, type) values ('',$url_art,now(),'$ip', '$subdomain', '$enter_type')";
//$result_insert = db_query($queryInsert) or die("Page Being Updated..");
//URL variables fine, Reset the errorlist
$article_valform->resetErrorList();
if ($type == "dealer"){ //article is a dealership article
//Grab all info on the article based on the ID
$query_art = "SELECT * FROM articles_custom, club_links WHERE articleID=$url_art AND rel_clubID=club_linkID AND domain='$subdomain'";
$result_art = db_query($query_art) or die($article_valform->raiseError("result", "Database Error - 1"));
} else {
//Grab all info on the article based on the ID
$query_art = "SELECT * FROM articles WHERE articleID=$url_art";
$result_art = db_query($query_art) or die($article_valform->raiseError("result", "Database Error - 1"));
}
//Place all results into an array
$line_art = db_fetch_array($result_art, MYSQL_NUM);
/*
//Grab all sidebar data from the article or none if there arent any
$query_side = "SELECT * FROM sidebars WHERE articleID=$url_art";
$result_side = db_query($query_side) or die($article_valform->raiseError("result", "Database Error - 2"));
//See how many sidebars there are for this article
$num_rows = db_numrows($result_side);
//Get the title colour from the array to use in the article header
$sid_tcolour = db_fetch_row($result_side);
//Grab all sidebar data to place into template
$query_side2 = "SELECT * FROM sidebars WHERE articleID=$url_art";
$result_side2 = db_query($query_side2) or die($article_valform->raiseError("result", "Database Error - 3"));
//Grab videolink data with article ID
$query_vl = "SELECT filename, title FROM videos, videolinks WHERE videos.videoID = videolinks.videoID AND articleID=$url_art";
$result_vl = db_query($query_vl) or die($article_valform->raiseError("result", "Database Error - 4"));
*/
}
//List errors and add them to the feedback variable
if ($article_valform->isError()) {
$feedback_pre = $article_valform->getErrorList();
foreach ($feedback_pre as $f)
{
$feedback .= "
* ".$f['msg'];
}
}
//print out the correct template
if (!$article_valform->isError()) {
if ($url_option == "print" && $error!=1) { //printing the article
//Print out html header code
print '