<?php
/*
AjaxExplorer Copyright (C) 2007-2008 Syed Mohammad Sidque Tahir Al-Habshi
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Head to
GNU site http://www.gnu.org/licenses/ for license copy.
*/
$access='0016';
include 'core.php';
$text='';
$user=Post('user');
$file=file('../user/record.php');
$numb=count($file)-1;
foreach($file as $id=>$rows)
{
if($id==$user)
{
$cols=explode("\t", $rows);
$text.=$cols[0]."\t".(Post('save')=='1'? $cols[1]."\t".Post('path')."\t".Post('perm'):Post('pass')."\t".$cols[2]."\t".$cols[3]).($numb>$id? "\r\n":"");
}
else $text.=$rows;
}
if(($file=fopen('../user/record.php', 'w+')))
{
$_SESSION['userid']=$userid;
fwrite($file, $text);
fclose($file);
}
?>