new code for daily signup stats

It's not difficult to install myLounge Redirection, but sometimes it's quite tricky. Post your questions in here.

Moderator: Scooby

new code for daily signup stats

Postby www.hm/yourname.com! » Wed Mar 24, 2004 3:24 pm

Hey hey :) again i have the old 1.2 subdir version and dont even know if this kinda script is in the new code etc, the code is prolly really sketchy etcetc..
It makes a really basic table looking like this for all the days youve been accepting signups (this forum wont let me print tables)
Day Date .............# Signups
Thu 26 Feb 2004......4 [] [] [] []
Fri 27 Feb 2004.......3 [] [] []


put this in admin.php and link to it from the main admin page using <a href=\"index.php?do=stats\">Daily Signups</a>
Code: Select all
if ($do == 'stats') {//by www.hm/yourname.com, displaysdaily signup stats
$main="<table cellspacing=\"1\" cellpadding=\"3\" border=\"0\" width=\"450\" align=\"center\">
<tr>
<td><b>Your Statistics</b></td>
</tr>

<tr>
<td>
<table cellspacing=\"0\" cellpadding=\"2\" border=\"1\" width=\"400\" align=\"center\">
<tr>
<td><b>Day</b></td><td><b>Date</b></td><td><b>#</b></td><td><b>Signups</b></td>
</tr>
<tr>
<td>
";
$listusers=mysql_query("SELECT * FROM $redir_table ORDER BY time ASC");// LIMIT 0,5");
$users=mysql_num_rows($listusers);
$count = 1;
if ($users < 1) {
   $main.="An error has occurred<br>";
} else {
   while($rowusers=mysql_fetch_array($listusers)) {
      //$host=$rowusers[host];
      $date=$rowusers[time];
      $dateday = date('d', $date);
      $datedaytext = date('D', $date);
      $datedisp = date("d M Y", $date);
      if ($dateday == $lastday)
         {$count = $count +1;}
      else
         {
         $main.="$datedaytext</td><td> $datedisp</td><td>$count </td><td>";
         while($count > 0){$main.=" []" ; $count =$count-1;}
         $main.="</td></tr><tr><td>";
         $count = 1;}

      $lastday = $dateday;
   }
}


$main.="</td></tr></table>
<p align=\"center\"><b><a href=\"index.php\">Back to the main page</a></b></p>
</td>
</tr>
</table>";

$template = new MyredTemplate("../template/template.php");
$template->assign("TITLE", $pagetitle);
$template->assign("MENU", $menu);
$template->assign("MAIN", $main);
$template->myred_print() or die($template->error);
exit;
}
www.hm/yourname.com!
 

Postby andelal » Thu Mar 25, 2004 12:34 pm

Did I already tell you that you have very good ideas? :)
And I like your sites design.

Alex
User avatar
andelal
Site Admin
Site Admin
 
Posts: 479
Joined: Tue Jan 07, 2003 8:53 pm
Location: Vienna/Austria/Europe

Postby noname » Fri Mar 26, 2004 12:18 am

is this working in new ver of myred script, too?

i thing no, because i can see in code something in your code that there is not in new ver. maybe to work someone has to make some changes.


congrs www.hm :)
noname
 

Postby www.hm/yourname.com! » Mon Mar 29, 2004 10:34 pm

Thank you :)

Although I have been quite selfish in only making code for the admin pages! I plan to add some stuff to the users side of things althought the code will have to be much more rigid!!

Also Alex,
Ive signed up to this forum but havent received an activation code! You think you could sort me out? I signed up with
username: www.hm/yourname.com
www.hm/yourname.com!
 

Postby naredi » Sat Apr 03, 2004 12:13 am

Thank you!

Its a very nice extra-script!

/Jakob Naredi - WannaSurf.to
naredi
Newbie
Newbie
 
Posts: 6
Joined: Sat Jan 11, 2003 11:27 pm
Location: Sweden

Postby andelal » Sat Apr 03, 2004 8:17 am

www.hm/yourname.com! wrote:Also Alex,
Ive signed up to this forum but havent received an activation code! You think you could sort me out? I signed up with
username: www.hm/yourname.com

I just activated your account. Drop me an email for further details.

Alex
User avatar
andelal
Site Admin
Site Admin
 
Posts: 479
Joined: Tue Jan 07, 2003 8:53 pm
Location: Vienna/Austria/Europe


Return to Support

Who is online

Users browsing this forum: No registered users and 3 guests

cron