Thu Oct 18, 2018 @ 11,946,533 unique visits

center-left.png center-right.png
Event Calendar

 Fall Season 
October, 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 1819 20
21 22 23 24 25 26 27
28 29 30 31

Birthdays
10-01 - cschilder
10-07 - greg
10-13 - Red
10-16 - Gargon
10-20 - aborovsak
10-22 - The Master
10-24 - ceg
10-29 - Dove

Events
 10-01Day for The Elderly
 10-05World Smile Day
 10-08Columbus Day
 10-16Boss's Day
 10-20Sweetest Day
 10-24United Nations Day
 10-27Make A Difference Day
 10-31Halloween
blank.gif blank.gif
Subscriptions
Newsletter

Site Members Only

blank.gif blank.gif
Classified Ads


0 Classified Ads


Version 5.02
blank.gif blank.gif
Site User Pages

New Site User Pages

21Matze
gjsttt
outlaw
FreedomIOPList
Gargon


Most Visited Pages

Gargon[619]
Webmaster[429]
outlaw[231]
FreedomIOPList[211]
gjsttt[164]
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,

Quote


<?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
 
http://www.phpfusionprojectportal.tk
Jump to Forum:
purple-btm-left.png purple-btm-right.png
Login

Please Login Above
blank.gif blank.gif
Users Online
bullet.gif Guests Online: 1
bullet.gif Total Members: 683

bullet.gif Unactivated Members: 0
bullet.gif Newest Member: 21Matze
Last Seen Admin:
bullet.gif Webmaster 1 day
Last Seen Users:
bullet.gif afoster 1 day
bullet.gif Gargon 1 day
bullet.gif 21Matze 2 days
bullet.gif Harlekin 1 week
bullet.gif Beyond63 3 weeks
bullet.gif kenloen 3 weeks
bullet.gif helmuth 5 weeks
bullet.gif aznetcowboy 7 weeks
bullet.gif Ingolstadt10 weeks
bullet.gif outlaw10 weeks
bullet.gif gjsttt13 weeks
bullet.gif jarcastle15 weeks
bullet.gif Sc07715 weeks
bullet.gif abele17 weeks
bullet.gif Mario17 weeks
blank.gif blank.gif
Shoutbox
You must login to post a message.

 Gargon
Since 02/19/2009
On August 02, 2018 00:34
OK... new shoutbox stuff huh? Kool !!

 Webmaster
Since 08/14/2008
On August 01, 2018 11:44
Hey hey I think I have it Fred !!!

 Webmaster
Since 08/14/2008
On August 01, 2018 11:29
Sure will Fred !!

 afoster
Since 01/23/2009
On August 01, 2018 11:15
OK, I see what you are talking about and yes...the online/offline icons are not needed. Can you send me the "finished" product when you are done?

 afoster
Since 01/23/2009
On August 01, 2018 10:51
Let me know what oddities you are talking about. If there are any code issues, I am sure you fill find and fix them.

 Webmaster
Since 08/14/2008
On August 01, 2018 10:13
Yeah thanks Fred! Still tinkering with it to clear up some oddities that it has though. !crazy!

 afoster
Since 01/23/2009
On August 01, 2018 10:01
I see you have installed the new shoutbox. Glad you got it working the way you wanted it to.

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