class NewsCloudStory { var $db; // database object function NewsCloudStory() { require_once($_SERVER['DOCUMENT_ROOT'].'/classes/db.class.php'); $this->db = new newscloudDatabase(); } function getStory } /* // sanitize input if (is_numeric($contentid) && strlen($contentid) <= 32) { $contentid = mysql_real_escape_string(trim($contentid)); } else { $this->sendNotFound(); } $this->db->query("UPDATE Content SET totaldownloads = totaldownloads + 1, weeklydownloads=weeklydownloads+1 WHERE contentid = " . $contentid . ";"); if (isset($_SESSION['uid'])) { $uid=$_SESSION['uid']; $this->db->query("INSERT INTO UserRead (uid,contentid) values (" . $uid . "," . $contentid . ");"); } $webpage_result = $this->db->query("SELECT webpage FROM Content WHERE contentid=" . $contentid . ";"); $data = mysql_fetch_object($webpage_result); if ($data->webpage) { header('Location: '.$data->webpage); } else { $this->sendNotFound(); } */