Odessa Content Sharing  





  Register now   Forgot password ?

Menu management

Php Exam Script Business (Paid version) :Menu management

All menu items are storing in table "modules"

How to add a new menu item   ?

 

To add a new menu item you need to add new row into the "modules" table . For example , you want to add new menu "Reports" under the menu "Assignments".

Insert one row into modules table as below .

insert into modules (module_name,file_name,parent_id,priority, access_key, can_be_default) values('Reports', 'reports_file', 5, 3, 'myreports', 0)

We are passing "5" as parent_id , because the id from Assignments menu is 5.

After you have created new menu item in "modules" table you need to define access list for this menu item , to display it in "Users"->"Access Management" .

For example , you need 4 accesses -   "View reports" , "Add report" , "Edit report" , "Delete report " .

You can define this access in "modules_access" table .

Just insert 4 rows to "modules_access" table

insert into modules_access (access_name,parent_id, access_key , priority )values ('View reports' , 34 , 'view_reports', 1 );

insert into modules_access (access_name,parent_id, access_key , priority )values ('Add reports' , 34 , 'add_reports', 2 );

insert into modules_access (access_name,parent_id, access_key , priority )values ('Edit reports' , 34 , 'edit_reports', 3 );

insert into modules_access (access_name,parent_id, access_key , priority )values ('Delete reports' , 34 , 'delete_reports', 4 );

 

After   inserting this rows , you need to add this menu item to "language" files . To do this , open "english.php" and all other language files from "lang" folder , and add this changes as below .

 

$MODULES['Reports']='Reports example';

$MODULE_ACCESS['Add reports']='Add reports';

$MODULE_ACCESS['Edit reports']='Edit reports';

$MODULE_ACCESS['Delete reports']='Delete reports';

$MODULE_ACCESS['View reports']='View reports';

 

Now , you can go to "Users->Roles->Access management" and define access for roles to this modules .

After that , you need to create 2 files "reports_file.php" and reports_file_temp.php" and write you php codes there .

To check having access to "Reports" menu , you can use "menu" function of "access" class. As a first parameter you need to pass "access_key" column of "modules" table . Here is an example :

access::menu("branches",false);

Will return true if has access . Pass "true" as a second parameter if you want to redirect to login page if user doesn't have access.

To check access list ( items in modules_access table) you can use "has" method of "access" class. For example :

access::has("edit_reports")  

Will return true if has access . Pass "1" as second parameter if you want to redirect to login page if user doesn't have access , and pass "2" if you want to redirect to "No Access" page.

 


Installation
Php Web Quiz Business (Paid version) : How to install

Menu management
Php Exam Script Business (Paid version) :Menu management

Access management : Branches
Php Exam Script Business (Paid version) : Access management : Branches

Access management : Roles
Php Exam Script Business (Paid version) : Access management : Roles

Access management : Users
Php Exam Script Business (Paid version) : Access management : Users

Access management : Restoring password
Php Exam Script Business (Paid version) : Access management : Restoring password

Questions : Categories
Php Exam Script Business (Paid version) : Questions : Categories

Questions : Quizzes
Php Exam Script Business (Paid version) : Questions : Quizzes

Questions : Question management
Php Exam Script Business (Paid version) : Questions : Question management

Exams : Create Exam
Php Exam Script Business (Paid version) : Exams : Create Exam

Exams : Manage Exams
Php Exam Script Business (Paid version) : Exams : Manage Exams

Exams : Starting Exam
Php Exam Script Business (Paid version) : Exams : Starting Exam

Exams : Point calculation
Php Exam Script Business (Paid version) : Exams : Point calculation

Importing users from Wordpress
Php Exam Script Business (Paid version) : Importing users from Wordpress

Importing users from IPB
Php Exam Script Business (Paid version) : Importing users from IPB

Using mathematical symbols
Php Exam Script Business (Paid version) : Using mathematical symbols

Mail configuration
Php Exam Script Business (Paid version) : Mail configuration

Certificates
Php Exam Script Business (Paid version) : Certificates

Localization
Php Exam Script Business (Paid version) : Localization

API For importing questions
Php Exam Script Business (Paid version) : API For importing questions

Integration with facebook
Php Exam Script Business (Paid version) : Integration with facebook

Using Jing (Easy image adding)
Php Exam Script Business (Paid version) : Using Jing (Easy image adding)

Email templates
Php Exam Script Business (Paid version) : Email templates

Exam results templates
Php Exam Script Business (Paid version) : Exam results templates

Backend events
Php Exam Script Business (Paid version) : Backend events

Integration with LDAP
Php Exam Script Business (Paid version) : Integration with LDAP

Integration with Paypal
Php Exam Script Business (Paid version) : Receiving payments with Paypal

Integration with other payment systems
Php Exam Script Business (Paid version) : Integration with other payment systems

Helpdesk Management System
Php Exam Script Business (Paid version) : Helpdesk Management System