
yankidank
By: a guest on
Jan 25th, 2010 | syntax:
PHP | size: 1.21 KB | hits: 1,565 | expires: Never
<?php
include_once 'libs/dbconnect.php';
include_once('Smarty.class.php');
$main_smarty = new Smarty;
include_once('config.php');
include(mnminclude.'html1.php');
include(mnminclude.'smartyvariables.php');
force_authentication();
$amIgod = 0;
$amIgod = $amIgod + checklevel('god');
$main_smarty->assign('amIgod', $amIgod);
if($amIgod == 0){
header("Location: " . getmyurl
('login', $_SERVER['REQUEST_URI']));
}
$main_smarty->assign('isAdmin', $canIhaveAccess);
header("Content-Type: application/vnd.ms-excel");
$filename = "Website_User_Data_" . date('d-m-Y') . ".xls";
header("Content-Disposition: attachment;filename=\"$filename\"");
$result = mysql_query("SELECT * FROM ".table_prefix
."users ORDER BY user_id") or
die('MySQL query attempting to select user data failed!');
echo $row[user_id]."\t";
echo $row[user_names]."\t";
echo $row[user_login]."\t";
echo $row[user_email]."\t";
echo $row[user_url] . "\t";
echo $row[user_date] . "\t";
echo $row[user_lastlogin]." \n";
//echo implode("\t", array_values($row)) . "\n";
}
?>