Esempio n. 1
0
 /**
  * Get plugin object
  *
  * @return new plugin object
  */
 public static function factory($plugInName)
 {
     //Acces databse and get xmlpath
     $xmlPath = Plugin::fetchPlugin($plugInName);
     if ($xmlPath) {
         return PlugInFactory::readXMl($xmlPath);
     } else {
         throw new PlugInFactoryException(PlugInFactoryException::PLUGIN_INSTALL_ERROR);
     }
     /* $temppluginObj = new Plugin();
     		$temppluginObj->setPluginName(trim($plugInName));
     		$tempPluginObj = $temppluginObj->fetchPlugin();
     		
     		if(is_object($tempPluginObj)){
     			return PlugInFactory::readXMl($tempPluginObj);
     		}else{
     			throw new PlugInFactoryException(PlugInFactoryException::PLUGIN_INSTALL_ERROR);		
     		} */
 }
Esempio n. 2
0
You should have received a copy of the GNU General Public License along with this program;
if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA  02110-1301, USA
*/
$_SESSION['moduleType'] = 'rep';
require_once ROOT_PATH . '/lib/confs/sysConf.php';
require_once ROOT_PATH . '/plugins/PlugInFactoryException.php';
require_once ROOT_PATH . '/plugins/PlugInFactory.php';
$sysConst = new sysConf();
$locRights = $_SESSION['localRights'];
$headingInfo = $this->popArr['headinginfo'];
$currentPage = $this->popArr['currentPage'];
$message = $this->popArr['message'];
$themeDir = '../../themes/' . $styleSheet;
// Check csv plugin available
$PlugInObj = PlugInFactory::factory("CSVREPORT");
if (is_object($PlugInObj) && $PlugInObj->checkAuthorizeLoginUser(authorize::AUTHORIZE_ROLE_ADMIN) && $PlugInObj->checkAuthorizeModule($_SESSION['moduleType'])) {
    $csvExportRepotsPluginAvailable = true;
}
$sysConst = new sysConf();
$locRights = $_SESSION['localRights'];
$headingInfo = $this->popArr['headinginfo'];
$currentPage = $this->popArr['currentPage'];
$message = $this->popArr['message'];
$themeDir = '../../themes/' . $styleSheet;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="../../themes/<?php 
echo $styleSheet;
$styleSheet = CommonFunctions::getTheme();
$_SESSION['styleSheet'] = $styleSheet;
$wpath = explode('/login.php', $_SERVER['REQUEST_URI']);
$_SESSION['WPATH'] = $wpath[0];
require_once ROOT_PATH . '/lib/models/eimadmin/Login.php';
require_once ROOT_PATH . '/lib/common/authorize.php';
/* LDAP Module */
$ldapFile = ROOT_PATH . "/plugins/ldap/LdapLogin.php";
$_SESSION['ldap'] = "disabled";
$_SESSION['ldapStatus'] = "disabled";
if (file_exists($ldapFile)) {
    require_once ROOT_PATH . '/plugins/PlugInFactoryException.php';
    require_once ROOT_PATH . '/plugins/PlugInFactory.php';
    $_SESSION['ldap'] = "enabled";
    require_once $ldapFile;
    $ldap = PlugInFactory::factory("LDAP");
    if ($ldap->checkAuthorizeLoginUser("Admin") && $ldap->checkAuthorizeModule("Admin")) {
        $ldapStatus = $ldap->retrieveLdapStatus();
        $_SESSION['ldapStatus'] = $ldapStatus;
    } else {
        throw new PlugInFactoryException(PlugInFactoryException::PLUGIN_INSTALL_ERROR);
    }
}
/* LDAP Module */
/* Print Benefits Module */
$benefitsFile = ROOT_PATH . "/plugins/printBenefits/pdfHspSummary.php";
$_SESSION['printBenefits'] = "disabled";
if (file_exists($benefitsFile)) {
    $_SESSION['printBenefits'] = "enabled";
}
/* Print Benefits Module */