*/
function file_creditos_get($user)
{
- if (($f = fopen("data/$user.creditos.csv", 'r')) === false) return false;
+ if (($f = fopen("data/creditos.$user.csv", 'r')) === false) return false;
$seek = intval(trim(fgets($f, 11)));
fseek($f, $seek);
$row = fgetcsv($f, 4096);
*/
function file_creditos_write($user, $creditos, $bonus, $dias)
{
- if (($f = fopen("data/$user.creditos.csv", 'a+')) === false) return false;
+ if (($f = fopen("data/creditos.$user.csv", 'a+')) === false) return false;
$seek = ftell($f);
$fecha = time();
fputcsv($f, array($fecha, $creditos, $bonus, $dias));
*/
function file_creditos_crear($user)
{
- if (($f = fopen("data/$user.creditos.csv", 'w')) === false) return false;
+ if (($f = fopen("data/creditos.$user.csv", 'w')) === false) return false;
fwrite($f, sprintf("%010d\n", 11), 11);
fputcsv($f, array(time(), 1, 0, 0));
fclose($f);