PHP Classes

tinyUGatMs: Manage users and groups of events in a database

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 173 All time: 8,802 This week: 89Up
Version License PHP version Categories
m9 1.0Custom (specified...5PHP 5, Time and Date, Databases, User...
Description 

Author

This package can manage users and groups of events in a database.

It can manage records of users and user groups associated to events.

The package can create or update given user records. Each user belongs to a group of recurring events.

It can also create or update recurring event records to be associated with groups of users.

Innovation Award
PHP Programming Innovation award nominee
August 2017
Number 9
Recurring events are often implemented by applications that store them in a database, so they can be easily updated.

This package can manage events associated to multiple users. The event and user information is stored in a database.

Manuel Lemos
Picture of zinsou A.A.E.Moïse
  Performance   Level  
Name: zinsou A.A.E.Moïse is available for providing paid consulting. Contact zinsou A.A.E.Moïse .
Classes: 50 packages by
Country: Benin Benin
Age: 34
All time rank: 6761 in Benin Benin
Week rank: 178 Up1 in Benin Benin Equal
Innovation award
Innovation award
Nominee: 23x

Winner: 2x

Recommendations

Access Time for Groups
Access per time range

What is the best PHP pdo user accounts class?
Manage user accounts

What is the best PHP user profile using pdo class?
Login and user profile system using PDO

What is the best PHP roles and permissions class?
Roles and permissions

What is the best PHP users admin panel class?
Create an admin panel to manage user accounts

user login script
package to create, update user login logout

user and registration management
login logout password and session management

User access module
User access module written in pure php

user authorization
user authorization process

What is the best PHP mysql login class?
MySQL login script

Example

<?php
session_start
();
require_once(
'usefullfunctions.php');
$url='connexion.php';
?>
<!DOCTYPE>
    <html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>GROUP ACCESS TIME</title>

    <style type="text/css">
       
         #other {
            font-family: verdana;
            font-weight: bold;
            font-size: 14px;
            font-style:italic;
            color: #FFFFFF;
            background-color: grey;
            width: auto;
            margin-left: 15%;
            margin-right: 15%;
            padding:2%;
        }
       
        label
        {
            display: block ;
            width: 150px;
            float : left ;
        }
        </style>
   
    </head>
<body>
<div id="other">
<?php
if(isset($_SESSION ['groupstatut'])&&isset($_SESSION["startaccesstime"])&&isset($_SESSION["endaccesstime"])&&$_SESSION ['groupstatut']==true&&inrangetime(explode(':',date('H:I:s')),explode(':',$_SESSION["startaccesstime"]),explode(':',$_SESSION["endaccesstime"]))){
if(isset(
$_SESSION['role'])&&$_SESSION['role']=="admin"){
    echo
'<div><p>welcome buddy <a href="./logout.php">logout</a><br>Here is your future cool and fresh member area</p>
    <p>What do you want to do ?
            <ul><li><a href="./managegroups.php?action=edit">Edit existing groups ?</a></li>
            <li><a href="./managegroups.php?action=add">Add a new group ?</a></li>
            <li><a href="./managegroups.php?action=delete">DELETE a group ?</a></li>
            <li><a href="./manageusers.php?action=edit">Edit existing user ?</a></li>
            <li><a href="./manageusers.php?action=add">Add a new user ?</a></li>
            <li><a href="./manageusers.php?action=delete">DELETE a user ?</a></li></ul>
            </p></div>'
;
}else{
echo
'welcome buddy <a href="./logout.php">logout</a><br>Here is your future cool and fresh member area';
}

}else{
echo
'<script type="text/javascript">window.location="'.$url.'";</script>';
exit;
}
?>
</div>
</body>
</html>


Details

tinyGatMs package is simple users and groups recurring access time management system. technolgies used: -PHP of course -MySql -AJAX(JAVASCRIPT) -HTML5 -for the css it's minimalist you will see what to do with that Features: -Class for groups management(validation, creation, suppression) -Class for users management(registration, validation, creation, suppression) -Management area based on user's role, actually it is set on Admin allowed only(fully used of ajax only) -Users registration with ajax using PDO to connect to MySql *check of already used mail or already used username (ajax) *send of validation mail(ajax) -Users connexion with ajax using PDO to connect to MySql *check of username existence(ajax) *check of true password(ajax) *check of access time (ajax) with message to tell you when to connect if you can't at the moment you try. *not register? link *forget password link -Users password recovering page and reset mail sending using ajax *mail prompt *password changing after mail validation with unique id -Management of users *Edit properties like activation statut,role,password,group for access time etc... *Add a new user *Delete an user -Management of Groups *Edit properties like name,description,access time,access time recurrence,starting date to apply the access time, etc... By default we make the FIRST GROUP permanent with dayly connexion with 00h-23h59.This is the default group for all the new users.You can't renamed it with management panel nor delete it but you could in the database directly or by building your own query to delete or rename it.However you must modify the name if you do it in all the files that used it to avoid bug because when you delete a group, all the users belong to this group were sent in FIRST GROUP for not making them loose access to your website. *Add a new group *Delete an existing group. Keep in mind that: the system is minimalist and can be extended like you want... For the test go to connexion.php and use one of the two user account already created: zinsou password zinsou or manuel password 0123 Classes: -class managemyusers{ protected $properties,$bdd; public function __construct(PDO $bdd,$user,$password,$firstname,$lastname,$email,$groupid,$role,$statutvalidation){ } public function properties(){ return $this->properties; } public function add(){ INSERT IGNORE INTO users (username,password,mail,dateinscription,groupid,firstname,lastname,role,statutvalidation) VALUES (:user,:password,:mail,:dateinscription,:groupid,:firstname,:lastname,:role,:statutvalidation) "); echo'User successfully added'; else return false; } public function update($oldname){ UPDATE users SET username=:user,password=:password,mail=:mail,dateinscription=:dateinscription,groupid=:groupid,firstname=:firstname,lastname=:lastname,role=:role,statutvalidation=:statutvalidation WHERE username=:useroldname'); echo'User successfully updated'; else return false; } } -class groupmyusers{ protected $properties,$bdd; public function __construct(PDO $bdd,$name,$description,$datestart,$startaccesstime,$endaccesstime,$recurrence,$days=''){ } public function properties(){ return $this->properties; } public function add(){ INSERT IGNORE INTO groups (name,description,datecreation,startaccesstime,endaccesstime,recurrence,days,datecreationtimestamp) VALUES (:name,:description,:datestart,:startaccesstime,:endaccesstime,:recurrence,:days,:datestartimestamp) "); echo'Group successfully added'; else return false; } public function update($oldname){ UPDATE groups SET description=:description,datecreation=:datestart,startaccesstime=:startaccesstime, endaccesstime=:endaccesstime,recurrence=:recurrence,days=:days,datecreationtimestamp=:datestartimestamp WHERE name=:oldname echo'Group successfully updated'; else return false; } } Functions: -function inrangetime($x,$y,$z) *$x,$y,$z are array(hours=>value,minutes=>value,seconds=>value) *use inrangetime(array(0,56,56),array(9,56,56),array(23,00,00)) *location ('usefullfunctions.php') -function dologout() *location ('usefullfunctions.php') -function reccurence_reached($x,$y) *$x (here we use start date for group access time timestamp) but you can use any other timestamp for other purposes. *$y={'dayly','weekly','monthly','quartely','yearly'} for this $recurrence=array('dayly'=>1,'weekly'=>7,'monthly'=>30,'quartely'=>90,'yearly'=>365); BUG reporting and feedback to leizmo@gmail.com or you can simply used dedicated forum on the PHPCLASSES site.

  Files folder image Files (22)  
File Role Description
Accessible without login Plain text file ajax-connexion.php Aux. php script for ajax connexion
Accessible without login Plain text file ajaxgroups.php Aux. php script for ajax group properties load
Accessible without login Plain text file ajaxusers.php Aux. php script for ajax user properties load
Accessible without login Plain text file config.php Aux. database configuration
Accessible without login Plain text file connexion.php Aux. script for members connexion
Accessible without login Plain text file forgetpassword.php Aux. script for members password reseting
Accessible without login Plain text file groupaccess.sql Data database MySql file
Plain text file groupmyusers.class.php Class class source for groups management
Accessible without login Plain text file group_properties.php Aux. php script for ajax group properties insertion
Accessible without login Plain text file license.txt Lic. license
Accessible without login Plain text file logout.php Aux. logout script
Accessible without login Plain text file managegroups.php Aux. script for groups management panel
Plain text file managemyusers.class.php Class class source for users management
Accessible without login Plain text file manageusers.php Aux. script for users management panel
Accessible without login Plain text file readme.txt Doc. readme
Accessible without login Plain text file registration.php Aux. script for members registration
Accessible without login Plain text file resetpassword.php Aux. php script for ajax user's password reset
Accessible without login Plain text file send_registrationmail.php Aux. php script for send with ajax registration mail
Accessible without login Plain text file testaccess.php Example test script
Accessible without login Plain text file usefullfunctions.php Aux. usefull functions php script
Accessible without login Plain text file user_properties.php Aux. php script for ajax users properties insertion
Accessible without login Plain text file validation.php Aux. script for registration mail link validation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:173
This week:0
All time:8,802
This week:89Up