date = time(); } function set($id,$subject='story') { $this->query = mysql_query("SELECT ".TITLEIS." FROM ".TABLE." WHERE ".IDIS." = $id LIMIT 1"); if (mysql_num_rows($this->query) != 1) { $this->error="No such story ID found."; return 0; } else { $this->id = $id; $this->folder = $subject; $this->title = mysql_result($this->query,0); statify::makeFileName(); return 1; } } function makeFileName() { $this->file = $this->title; $this->file = str_replace(' ','_',$this->file); $this->file = str_replace('.','',$this->file); $this->file = str_replace('"','\'',$this->file); }