X-Git-Url: https://git.llucax.com/z.facultad/75.43/tp1.git/blobdiff_plain/c3b9acb7467415454cb0060140ba31c9a7e46a76..21a6769f30fc9eb06772273b95062868c9bf2dd8:/src/lib/file.creditos.php?ds=inline diff --git a/src/lib/file.creditos.php b/src/lib/file.creditos.php index 9101eab..a178911 100644 --- a/src/lib/file.creditos.php +++ b/src/lib/file.creditos.php @@ -66,7 +66,7 @@ function file_creditos_evaluar($user, $es_bonus = false, $bonus_cant = 5) */ 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); @@ -79,7 +79,7 @@ function file_creditos_get($user) */ 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)); @@ -94,7 +94,7 @@ function file_creditos_write($user, $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);