Sat May 26, 2018 @ 10,750,132 unique visits

Event Calendar

Summer

  May 2018  

Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
Legend

Normal Day:
Event Day:
Today:

More...
05/28/2018 Memorial Day
05/31/2018 Koma's birthday
06/01/2018 zodan's birthday
06/22/2018 zottelxxl's birthday
blank.gif blank.gif
Subscriptions
Newsletter

Site Members Only

blank.gif blank.gif
Site User Pages

New Site User Pages

Gargon
Webmaster


Most Visited Pages

Gargon[163]
Webmaster[102]
blank.gif blank.gif
Classified Ads
bullet.gifCommodore 128 For Sa...
Somewhere, USA


1 Classified Ad


Version 5.00
blank.gif blank.gif
Latest Articles
bullet.gif PHP-Fusion Multiple ...
bullet.gif PHP-Fusion ver7.02.07
bullet.gif MySQL/DB Functions
blank.gif blank.gif
View Thread
 Print Thread
Monthly registration page
29sd102
For admins, to see who joined your site

Copy full code and place into a custom page,

Many thanks to KneeKoo for this code,


<?php /*-------------------------------------------------------+ | PHP-Fusion Content Management System | Copyright (C) 2002 - 2010 Nick Jones | <A title=autolink href="http://www.php-fusion.co.uk/" target=_blank>http://www.php-fu...</A> +--------------------------------------------------------+ | Filename: monthly_registrations.php | Author: kneekoo +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at <A title=autolink href="http://www.gnu.org/licenses/agpl.html." target=_blank>www.gnu.org/licen...</A> Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ $locale['mrs_title'] = "Monthly Registrations"; $locale['mrs_timezone'] = "Europe/London"; $locale['mrs_back_to_main'] = "Go back to the main page"; $locale['mrs_back_to'] = "Go back to"; $locale['mrs_no_registrations'] = "There are no registrations for the current selection"; $locale['mrs_registered_on'] = "Members registered on"; $locale['mrs_none'] = "None"; $locale['mrs_days'] = array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"); $locale['mrs_hour'] = "Hour"; $locale['mrs_unactivated'] = "Unactivated"; $locale['mrs_banned'] = "Banned"; $page_id = isset($_GET['page_id']) && isNum($_GET['page_id']) ? "page_id=".$_GET['page_id'] : ""; if ((substr(phpversion(), 0, 1) == '5' && substr(phpversion(), 2, 1) >= '1') || substr(phpversion(), 0, 1) > '5') { date_default_timezone_set($locale['mrs_timezone']); } $years_per_row = 3; $sadmin = dbarray(dbquery("SELECT user_joined FROM ".DB_PREFIX."users WHERE user_id='1' LIMIT 1")); $sajoin = $sadmin['user_joined']; $y_start = date("Y", $sajoin); $m_start = date("n", $sajoin); $y_end = date("Y", time()); $m_end = date("n", time()); $months = explode("|", $locale['months']); $mode = ""; if (isset($_GET['mode']) && ($_GET['mode'] == 'm' || $_GET['mode'] == 'd')) $mode = $_GET['mode']; if ($mode == 'm') { if (!isset($_GET['year']) || !isNum($_GET['year']) || !isset($_GET['month']) || !isNum($_GET['month'])) { $mode = ""; } else { $get_year = $_GET['year']; $get_month = $_GET['month']; } } if ($mode == 'd') { if (!isset($_GET['year']) || !isNum($_GET['year']) || !isset($_GET['month']) || !isNum($_GET['month']) || !isset($_GET['day']) || !isNum($_GET['day'])) { $mode = ""; } else { $get_year = $_GET['year']; $get_month = $_GET['month']; $get_day = $_GET['day']; } } switch ($mode) { case 'm': { add_to_title(" - ".$months[$get_month]." ".$get_year); echo "<div align='center'>\n"; $m_stats = array(); $m_days = cal_days_in_month(CAL_GREGORIAN, $get_month, $get_year); if ($get_year == date("Y", time()) && $get_month == date("m", time())) $m_days = date("d", time()); $m_min = mktime(0, 0, 0, $get_month, 1, $get_year) - 1; $m_max = $m_min + ($m_days * 24 * 60 * 60); $dates = dbquery("SELECT user_joined FROM ".$db_prefix."users WHERE user_joined > '".$m_min."' && user_joined < '".$m_max."' ORDER BY user_id ASC"); if (dbrows($dates)) { while ($id = dbarray($dates)) { $m_day = date("j", $id['user_joined']); if (!isset($m_stats[$m_day])) { $m_stats[$m_day] = 1; } else { $m_stats[$m_day]++; } } echo "<p>[<a href='".BASEDIR.FUSION_SELF."?".$page_id."'>".$locale['mrs_back_to_main']."</a>]</p>"; echo "<table width='150' class='tbl-border' cellspacing='1' cellpadding='0'>\n"; echo " <tr>\n <td class='capmain' style='font-weight: bold'>$months[$get_month] $get_year</td><td class='capmain' align='center' style='font-weight: bold'>#</td>\n </tr>\n"; for ($i = 1; $i < $m_days + 1; $i++) { echo " <tr>\n"; echo " <td align='left' class='tbl" . ($i % 2 ? "1" : "2") . "'>" . $i . ", <a href='".BASEDIR.FUSION_SELF."?".$page_id."&amp;mode=d&amp;year=$get_year&amp;month=$get_month&amp;day=$i'>".$locale['mrs_days'][date("w", mktime(1, 1, 1, $get_month, $i, $get_year))]."</a></td>\n"; echo " <td align='center' class='tbl" . ($i % 2 ? "1" : "2") . "'>". (isset($m_stats[$i]) ? $m_stats[$i] : "-") . "</td>\n"; echo " </tr>\n"; } echo "</table>\n</div>\n"; } else { echo "<p>".$locale['mrs_no_registrations']."</p>\n"; } unset($m_stats, $m_days, $m_min, $m_max, $dates, $id, $get_year, $get_month, $i); break; } case 'd': { add_to_title(" - ".$get_day." ".$months[$get_month]." ".$get_year); echo "<div align='center'>\n"; echo "<p>[<a href='".BASEDIR.FUSION_SELF."?".$page_id."'>".$locale['mrs_back_to_main']."</a>] [<a href='".BASEDIR.FUSION_SELF."?".$page_id."&amp;mode=m&amp;year=$get_year&amp;month=$get_month'>".$locale['mrs_back_to']." $months[$get_month] $get_year</a>]</p>"; $d_min = mktime(23, 59, 59, $get_month, $get_day-1, $get_year); $d_max = $d_min + (24 * 60 * 60); $members = dbquery("SELECT user_id, user_name, user_joined, user_status FROM ".$db_prefix."users WHERE user_joined > '".$d_min."' && user_joined < '".$d_max."' ORDER BY user_id ASC"); echo "<table width='350' class='tbl-border' cellspacing='1' cellpadding='0'>\n"; echo " <tr>\n <td class='capmain' style='font-weight: bold'>".$locale['mrs_registered_on']." ".date("d.m.Y", $d_min+1)."</td><td class='capmain' align='center' style='font-weight: bold'>".$locale['mrs_hour']."</td>\n </tr>\n"; if (dbrows($members) > 0) { $cnt = 0; while ($member = dbarray($members)) { $cnt++; echo " <tr>\n"; echo " <td align='left' class='tbl" . ($cnt % 2 ? "1" : "2") . "'><a href='".BASEDIR."profile.php?lookup=".$member['user_id']."'>".$member['user_name']."</a>".($member['user_status'] > 0 ? ($member['user_status'] > 1 ? " <span class='small'>[".$locale['mrs_unactivated']."]</span>" : " <span class='small'>[".$locale['mrs_banned']."]</span>") : "")."</td>\n"; echo " <td align='center' class='tbl" . ($cnt % 2 ? "1" : "2") . "'>". date("H:i:s", $member['user_joined']) . "</td>\n"; echo " </tr>\n"; } } else { echo " <tr>\n"; echo " <td colspan='2' class='tbl1 alt' align='center'>".$locale['mrs_none']."</td>\n"; echo " </tr>\n"; } echo "</table>\n</div>\n"; break; } default: { $stats = array(); $dates = dbquery("SELECT user_joined FROM ".$db_prefix."users ORDER BY user_id DESC"); while ($id = dbarray($dates)) { $year = date("Y", $id['user_joined']); $month = date("n", $id['user_joined']); $date = $year."_".$month; if (!isset($stats[$date])) { $stats[$date] = 1; } else { $stats[$date]++; } } $curr_year = 0; $last_year = 0; $cnt = 0; $year_cnt = 0; echo "<div align='center'>\n"; echo "<table cellspacing='10'>\n<tr><td style='vertical-align: top'>\n"; foreach ($stats as $key => $value) { $curr_year_mon = explode("_", $key); $last_year = $curr_year; $curr_year = $curr_year_mon[0]; if ($curr_year != $last_year && $curr_year != 0) { if ($last_year != 0) echo "</table></td>".($year_cnt % $years_per_row == 0 ? "</tr><tr>" : "")."<td style='vertical-align: top'>\n"; echo "<table width='150' class='tbl-border' cellspacing='1' cellpadding='0'>\n <tr>\n <td class='capmain' align='left' style='font-weight: bold'>$curr_year</td><td class='capmain' align='center' style='font-weight: bold'>#</td>\n </tr>\n"; $cnt = 0; $year_cnt++; } echo " <tr>\n <td class='tbl".($cnt % 2 == 0 ? "1" : "2")."' align='left'><a href='".BASEDIR.FUSION_SELF."?".$page_id."&amp;mode=m&amp;year=".$curr_year."&amp;month=".$curr_year_mon[1]."'>".$months[$curr_year_mon[1]]."</a></td><td align='center' class='tbl".($cnt % 2 == 0 ? "1" : "2")."'>" . $value . "</td>\n </tr>\n"; $cnt++; } echo "</table>\n"; echo "</td>\n</tr>\n</table>\n"; echo "</div>"; unset($stats, $dates, $id, $year, $month, $date, $curr_year, $cnt, $key, $value); } } unset($months, $mode); ?>

Edited by 29sd102 on February 19, 2012
 
Webmaster
Thanks for passing on this code Pat.
 
http://www.fortworthbonsai.org
jemstar
Nice one thanks heaps!!
 
FreedomIOPList
I figured it out. I had to Disable the TinyMCE Editor and it works like a charm. Thank you for sharing this!


I could use this for my site. Is there somewhere specific it gets pasted in the custom page? I tried just pasting it in the text area and in HTML both and it just shows the code when I preview it. Or does this mean create a custom page outside of PHP-Fusion, paste it, save and upload it to the server?
Edited by FreedomIOPList on February 04, 2018
My Websites
Freedom IOP List - www.freedomioplist.com
Heaven's Handmades - www.heavenshandmades.com



 
http://www.freedomioplist.com
Jump to Forum:
purple-btm-left.png purple-btm-right.png
Login

Please Login Above
blank.gif blank.gif
User Log
bullet.gif Guests On: 21
bullet.gif Members On: 0


Last Seen Members

Webmaster Webmaster
Joined
08/14/08
06:42:28
Gaboe
Joined
02/06/11
1 day Offline
FreedomIOPList FreedomIO...
Joined
09/06/17
4 days Offline
aznetcowboy aznetcowboy
Joined
07/22/15
2 weeks Offline
afoster afoster
Joined
01/23/09
5 weeks Offline
jarcastle jarcastle
Joined
03/20/18
5 weeks Offline
Gargon Gargon
Joined
02/19/09
5 weeks Offline
scathing scathing
Joined
08/28/09
12 weeks Offline

  More Users 
blank.gif blank.gif
Shoutbox
You must login to post a message.

 afoster
03/08/2018
Like the new look of the website. I have always liked this particular theme.


 FreedomIOPList
10/07/2017
I love this site and all of the unique, original infusions and mods offered here. Excellent work, please keep it up!


 Webmaster
04/23/2016
Hi Pat! Long time no see. I'm doing well and I hope you and your family are well also. :)


 29sd102
04/23/2016
Hi Terry, I hope you are well mate, Cheers from Ireland, Pat :)


 WildHaggis
03/29/2016
Site's looking great :)


 Dallas
01/12/2016
Thanks Terry. Getting back into coding a little. Missed you all.


 Webmaster
01/10/2016
Hey Dallas! Man we thought you left the Fusion scene for good. I am really happy to welcome you back to the fold. :D


blank.gif blank.gif
center-left.png center-right.png
centerb-left.png centerb-right.png