- function ingresar( $pId, $pTema, $pURL, $pAutor, $pComentario ) {\r
+ function saveNew() {\r
+ return fappendcsv($this->infoCSVConst, array($this->id, $this->tema, $this->url, $this->autor, $this->comentario, $this->ranking, $this->fecha));\r
+ }\r
+\r
+ function saveExisting() {\r
+ if (($f = fopen($this->infoCSVConst, 'r+')) == false) return false; // error\r
+ $index = 0;\r
+ while (!feof($f))\r
+ {\r
+ $index = ftell($f);\r
+ $d = fgetcsv($f, 4096);\r
+ if ($d[0] == $this->id)\r
+ {\r
+ fseek($f,$index);\r
+ fputcsv($f, array($this->id, $this->tema, $this->url, $this->autor, $this->comentario, $this->ranking, $this->fecha));\r
+ fclose($f);\r
+ return true;\r
+ }\r
+ }\r
+ fclose($f);\r
+ return false;\r
+ }\r
+\r
+ function saveLoadThis( $pId, $pTema, $pURL, $pAutor, $pComentario ) {\r