'expressoAdmin1_2',
'nonavbar' => true,
'noheader' => true
);
}
include_once('../header.inc.php');
include_once("inc/class.user.inc.php");
require_once('../header.session.inc.php');
if ($_FILES["file"]["error"] > 0)
{
echo "Error: " . $_FILES["file"]["error"] . "
";
}
else
{
$fileName = $_FILES["file"]["name"];
$tmpFile = $_FILES["file"]["tmp_name"];
if (file_exists($fileName)){
echo $fileName . " ja existe !! ";
}
else
{
if(move_uploaded_file($tmpFile,"/tmp/$fileName")){
$file = fopen("/tmp/$fileName", "r");
if (!$file){
echo "O arquivo nao pode ser aberto";
exit();
}
else
{
$params = Array();
$user = new user;
while(!feof($file)) {
if (!feof($file)) {
$linha = trim(fgets($file));
$result = explode(",",$linha);
$params['uid'] = $result[0];
$params['uidnumber'] = $result[1];
$info_user = $user->get_user_info($params['uidnumber']);
// $passwdExpired = $info_user['passwd_expired'];
if ($info_user) {
echo "Deletando usuario: " . $params['uid'] . " " . " ; " . $info_user['context'] . "
";
$user->delete($params);
}
else
{
echo "Usuario NAO EXISTE : " . $params['uid'] . " " . " ; " . $info_user['context'] . "
";
}
}
}
}
}
}
}
?>