Skip to content

Commit

Permalink
Modified export function, normalised field order and added heading row
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@879 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed Jan 31, 2004
1 parent 6ab1262 commit 2bb4d52
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions admin/tokens.php
Expand Up @@ -923,19 +923,19 @@
if ($action == "export") //EXPORT FEATURE SUBMITTED BY PIETERJAN HEYSE
{
$bquery = "SELECT * FROM {$dbprefix}tokens_$sid";
$bquery .= " ORDER BY email";
$bquery .= " ORDER BY tid";

$bresult = mysql_query($bquery) or die ("$bquery<br />".mysql_error());
$bfieldcount=mysql_num_fields($bresult);

echo "\t<textarea rows=20 cols=120>\n";
echo "Tid, Firstname, Lastname, Email, Token [, attribute1, attribute2, mpid]\n";
while ($brow = mysql_fetch_array($bresult))
{
if ($bgc == "#EEEEEE") {$bgc = "#DDDDDD";} else {$bgc = "#EEEEEE";}

echo trim($brow['email']).",";
echo trim($brow['tid']).",";
echo trim($brow['firstname']).",";
echo trim($brow['lastname']).",";
echo trim($brow['email']).",";
echo trim($brow['token']);
if($bfieldcount > 7)
{
Expand Down

0 comments on commit 2bb4d52

Please sign in to comment.