This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[MODULE] Rainloop
#8
RE: [MODULE] Rainloop
Castey:
You should update the module so that only admin see the admin link:
module.zpm
Code:
<div class="zmodule_content panel" id="zmodule_header_<@ ModuleName @>">
   <div class="panel-heading">
       <img src="<@ ModuleIcon @>" width="35" height="35" border="0" alt="<@ ModuleName @>">

       <div class="zmodule_title">
           <@ ModuleName @>
       </div>

       <div class="zmodule_desc" id="zmodule_desc_<@ ModuleName @>"><@ ModuleDesc @></div>

   </div>

   <a href="etc/apps/rainloop/" class="btn btn-large btn-primary" target="_blank"><: Launch Rainloop :></a>
    <% if Admin %>
    <a href="etc/apps/rainloop/?admin" class="btn btn-large btn-primary" target="_blank"><: Launch Rainloop Admin :></a>
    <% endif %>
</div>
controller.ext.php
Code:
<?php

/**
* @copyright 2014-2015 Sentora Project (http://www.sentora.org/)
* Sentora is a GPL fork of the ZPanel Project whose original header follows:
*
* ZPanel - A Cross-Platform Open-Source Web Hosting Control panel.
*
* @package ZPanel
* @version $Id$
* @author Bobby Allen - ballen@bobbyallen.me
* @copyright (c) 2008-2014 ZPanel Group - http://www.zpanelcp.com/
* @license http://opensource.org/licenses/gpl-3.0.html GNU Public License v3
*
* This program (ZPanel) is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
*
*/
class module_controller extends ctrl_module
{
   public static function getAdmin()
   {
       global $controller;
       $currentuser = ctrl_users::GetUserDetail();
       if ($currentuser['usergroup'] == "Administrators") {
           return true;
       } else {
           return false;
       }
   }
}
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by: Castey


Messages In This Thread
[MODULE] Rainloop - by Castey - 04-05-2015, 04:57 AM
RE: [MODULE] Rainloop - by Cantalupo - 04-05-2015, 06:42 AM
RE: [MODULE] Rainloop - by lino69 - 04-05-2015, 06:09 PM
RE: [MODULE] Rainloop - by bbspike - 09-24-2015, 03:36 AM
RE: [MODULE] Rainloop - by MarkDark - 09-24-2015, 07:05 AM
RE: [MODULE] Rainloop - by torq1337 - 11-10-2015, 06:05 PM
RE: [MODULE] Rainloop - by Samuel - 11-13-2015, 12:11 AM
RE: [MODULE] Rainloop - by TGates - 11-13-2015, 03:45 PM
RE: [MODULE] Rainloop - by Castey - 11-14-2015, 07:54 AM
RE: [MODULE] Rainloop - by ericvu - 11-28-2016, 02:35 AM
RE: [MODULE] Rainloop - by nscloud - 11-03-2017, 01:25 AM
RE: [MODULE] Rainloop - by shaylami - 12-26-2016, 11:02 PM
RE: [MODULE] Rainloop - by worksmarter - 12-27-2016, 04:25 PM
RE: [MODULE] Rainloop - by mvinaround - 03-10-2017, 01:34 PM
RE: [MODULE] Rainloop - by rizkypratama - 03-28-2017, 07:24 PM
RE: [MODULE] Rainloop - by TGates - 03-29-2017, 03:44 AM
RE: [MODULE] Rainloop - by worksmarter - 04-13-2017, 03:44 AM
RE: [MODULE] Rainloop - by TGates - 06-06-2017, 11:25 AM
RE: [MODULE] Rainloop - by TGates - 11-03-2017, 06:10 AM
RE: [MODULE] Rainloop - by Jns3242 - 06-06-2017, 11:10 AM
RE: [MODULE] Rainloop - by diogorocha18 - 01-13-2018, 03:43 AM
RE: [MODULE] Rainloop - by TGates - 01-13-2018, 01:39 PM
RE: [MODULE] Rainloop - by timce2000 - 05-20-2018, 03:05 AM
RE: [MODULE] Rainloop - by TGates - 05-21-2018, 05:21 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
[Module] ELFileManager (build on elfinder) Diablo925 94 289 ,215 05-30-2024, 05:25 AM
Last Post: TGates
[MODULE] phpMyAdmin-AU (Auto-Update) TGates 14 44 ,960 06-15-2021, 06:54 AM
Last Post: TGates
[MODULE] SenBrand - Basic Branding module for Sentora TGates 20 49 ,472 06-04-2021, 11:47 AM
Last Post: ccr1969

Forum Jump:


Users browsing this thread: 3 Guest(s)