当前位置: 首页>>代码示例>>PHP>>正文


PHP CommonFunctions::getTheme方法代码示例

本文整理汇总了PHP中CommonFunctions::getTheme方法的典型用法代码示例。如果您正苦于以下问题:PHP CommonFunctions::getTheme方法的具体用法?PHP CommonFunctions::getTheme怎么用?PHP CommonFunctions::getTheme使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CommonFunctions的用法示例。


在下文中一共展示了CommonFunctions::getTheme方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: display

 function display()
 {
     $str = ROOT_PATH . $this->formPath;
     require_once ROOT_PATH . '/lib/common/xajax/xajax.inc.php';
     require_once ROOT_PATH . '/lib/common/xajax/xajaxElementFiller.php';
     require_once ROOT_PATH . '/language/default/lang_default_full.php';
     $lan = new Language();
     require_once $lan->getLangPath("full.php");
     $fileName = pathinfo($this->formPath, PATHINFO_BASENAME);
     $styleSheet = CommonFunctions::getTheme();
     if (preg_match('/view\\.php$/', $fileName) == 1) {
         require_once ROOT_PATH . '/language/default/lang_default_' . $fileName;
     }
     require_once ROOT_PATH . $this->formPath;
 }
开发者ID:noikiy,项目名称:owaspbwa,代码行数:15,代码来源:FormCreator.php

示例2: array

*/
/*TODO: This file seems to be not in use. TO BE REMOVED */
require_once ROOT_PATH . '/lib/confs/sysConf.php';
require_once ROOT_PATH . '/lib/common/CommonFunctions.php';
$srchlist[0] = array(0, 1, 2);
$srchlist[1] = array('-Select-', 'ID', 'Description');
$sysConst = new sysConf();
if ($this->getArr['mtcode'] == 'BUG') {
    $locRights = array('add' => true, 'delete' => true, 'edit' => true, 'view' => true);
} else {
    $locRights = $_SESSION['localRights'];
}
$headingInfo = $this->popArr['headinginfo'];
$currentPage = $this->popArr['currentPage'];
$message = $this->popArr['message'];
$styleSheet = CommonFunctions::getTheme();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link href="../../themes/<?php 
echo $styleSheet;
?>
/css/style.css" rel="stylesheet" type="text/css">
<style type="text/css">@import url("../../themes/<?php 
echo $styleSheet;
?>
/css/style.css"); </style>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
开发者ID:THM068,项目名称:orangehrm,代码行数:31,代码来源:mtview.php

示例3: notifyUser

function notifyUser($errlevel, $errstr, $errfile = '', $errline = '', $errcontext = '')
{
    if (error_reporting() == 0) {
        return;
    }
    $errMsg = "\n" . $errstr . ' in ' . $errfile . ' on line ' . $errline . "\n";
    switch ($errlevel) {
        case E_USER_WARNING:
            $type = "Warning";
            $errType = "warning";
            break;
        case E_USER_NOTICE:
            $type = "Notice";
            $errType = "notice";
            break;
        case E_USER_ERROR:
            $type = "Error";
            $errType = "error";
            break;
        case E_WARNING:
            $type = "Warning";
            $sysErr = true;
            $errType = "warning";
            break;
        case E_NOTICE:
            $type = "Notice";
            $sysErr = true;
            $errType = "notice";
            break;
        case E_ERROR:
            $type = "Error";
            $sysErr = true;
            $errType = "error";
            break;
        case E_ALL:
            $type = "General Error";
            $sysErr = true;
            $errType = "error";
    }
    if (isset($type)) {
        if (!isset($_SESSION)) {
            session_start();
        }
        ob_get_clean();
        $message = "<?xml version='1.0' encoding='iso-8859-1'?>\n";
        $message .= "<?xml-stylesheet href='" . $_SESSION['WPATH'] . "/error.xsl' type='text/xsl'?>\n";
        $message .= "<report>\n";
        $message .= "\t<heading>{$type}</heading>\n";
        $message .= "\t<type>{$errType}</type>\n";
        $errstr = strip_tags($errstr);
        $message .= "\t<message><![CDATA[{$errstr}]]></message>\n";
        $confObj = new Conf();
        if (isset($confObj->logPath) && !empty($confObj->logPath)) {
            $logPath = $confObj->logPath;
        } else {
            $logPath = ROOT_PATH . '/lib/logs/';
        }
        $message .= "\t<root>" . ROOT_PATH . "</root>\n";
        $message .= "\t<Wroot>" . $_SESSION['WPATH'] . "</Wroot>\n";
        $message .= "   <stylesheet>" . CommonFunctions::getTheme() . "</stylesheet>\n";
        $message .= "\t<logPath><![CDATA[" . $logPath . "]]></logPath>\n";
        $errfileEsc = str_replace("\\", "/", $errfile);
        if (isset($sysErr)) {
            $message .= "\t<cause>\n";
            $message .= "\t\t<message><![CDATA[Encountered the problem in " . $errfile . "]]></message>\n";
            $message .= "\t</cause>\n";
            $message .= "\t<cause>\n";
            $message .= "\t\t<message><![CDATA[Line " . $errline . "]]></message>\n";
            $message .= "\t</cause>\n";
            error_log(date('r') . ' : ' . strip_tags($errMsg), 3, $logPath . 'logDB.txt');
            $errMsgEsc = str_replace("'", "\\'", strip_tags($type . " :" . '\\n' . $errstr . '\\n' . "in " . $errfileEsc . '\\n' . "on line " . $errline));
        } else {
            $message .= "\t<cause>\n";
            $message .= "\t\t<message><![CDATA[" . mysql_error() . "]]></message>\n";
            $message .= "\t</cause>\n";
            $message .= "\t<cause>\n";
            $message .= "\t\t<message><![CDATA[MySQL Error # :" . mysql_errno() . "]]></message>\n";
            $message .= "\t</cause>\n";
            $errMsgEsc = str_replace("'", "\\'", strip_tags($type . " :" . '\\n' . $errstr . '\\n' . "Tech Info" . '\\n' . "------------" . '\\n' . mysql_error()));
            error_log(date('r') . ' : ' . strip_tags($errMsgEsc), 3, $logPath . 'logDB.txt');
        }
        $confObj = new Conf();
        $message .= "\t<environment>\n";
        $message .= "\t\t<version type='ohrm' description='OrangeHRM' ><![CDATA[" . $confObj->version . "]]></version>\n";
        $message .= "\t\t<version type='php' description='PHP' ><![CDATA[" . constant('PHP_VERSION') . "]]></version>\n";
        $message .= "\t\t<version type='mysql' description='MySQL Client' ><![CDATA[" . mysql_get_client_info() . "]]></version>\n";
        $message .= "\t\t<info type='memory_limit' description='Memory limit' ><![CDATA[" . ini_get('memory_limit') . "]]></info>\n";
        $message .= "\t\t<info type='session.gc_maxlifetime' description='Maximum session lifetime' ><![CDATA[" . ini_get('session.gc_maxlifetime') . "]]></info>\n";
        $message .= "\t</environment>\n";
        $message .= "\t<cmd n='js'><![CDATA[alert('{$errMsgEsc}');]]></cmd>\n";
        $message .= "</report>\n";
        header("Content-type: application/xml; charset=UTF-8");
        echo $message;
        exit;
    }
}
开发者ID:noikiy,项目名称:owaspbwa,代码行数:96,代码来源:ExceptionHandler.php

示例4: display

 public function display($modifier = null)
 {
     @ob_clean();
     require_once ROOT_PATH . '/language/default/lang_default_full.php';
     require_once ROOT_PATH . '/plugins/fpdf2/html2pdf.php';
     $printPdf = isset($_GET['printPdf']) && $_GET['printPdf'] == 1;
     if ($printPdf) {
         ob_start();
     }
     $lan = new Language();
     require_once $lan->getLangPath("full.php");
     $records = $this->getObj();
     if (isset($this->error)) {
         $errorFlag = true;
     }
     $styleSheet = CommonFunctions::getTheme();
     if (!empty($this->templateHeader)) {
         require_once ROOT_PATH . $this->getTemplateHeader();
     }
     require_once ROOT_PATH . $this->getTemplatePath();
     if (!empty($this->templateFooter)) {
         require_once ROOT_PATH . $this->getTemplateFooter();
     }
     if ($printPdf) {
         $html = ob_get_clean();
         $pdf = new PDF();
         $pdf->AddPage();
         $pdf->SetFont('Arial', '', 10);
         if (ini_get('magic_quotes_gpc') == '1') {
             $html = stripslashes($html);
         }
         $pdf->WriteHTML($html);
         $pdf->Output($_GET['pdfName'] . '.pdf', 'F');
         // TODO: Replace this with xhtml
         echo '<html>' . '<head>' . '<link href="../../themes/' . $_SESSION['styleSheet'] . '/css/style.css" type="text/css" rel="stylesheet" />' . '<style type="text/css">' . 'body { margin: 10px; }' . '</style>' . '</head>' . '<body>';
         echo '<input type="button" class="backbutton" value="' . $lang_Common_Back . '"' . ' onclick="history.back();" ' . 'onmouseover="moverButton(this)" onmouseout="moutButton(this)"  />';
         echo '</body></html>';
         echo "<script>window.open('" . $_SESSION['WPATH'] . "/lib/controllers/{$_GET['pdfName']}.pdf');</script>";
     }
 }
开发者ID:THM068,项目名称:orangehrm,代码行数:40,代码来源:TemplateMerger.php

示例5: display

 public function display($modifier = null)
 {
     require_once ROOT_PATH . '/lib/common/xajax/xajax.inc.php';
     require_once ROOT_PATH . '/lib/common/xajax/xajaxElementFiller.php';
     require_once ROOT_PATH . '/language/default/lang_default_full.php';
     require_once ROOT_PATH . '/plugins/fpdf2/html2pdf.php';
     $printPdf = isset($_GET['printPdf']) && $_GET['printPdf'] == 1;
     if ($printPdf) {
         ob_start();
     }
     $lan = new Language();
     require_once $lan->getLangPath("full.php");
     $records = $this->getObj();
     if (isset($this->error)) {
         $errorFlag = true;
     }
     $styleSheet = CommonFunctions::getTheme();
     if (!empty($this->templateHeader)) {
         require_once ROOT_PATH . $this->getTemplateHeader();
     }
     require_once ROOT_PATH . $this->getTemplatePath();
     if (!empty($this->templateFooter)) {
         require_once ROOT_PATH . $this->getTemplateFooter();
     }
     if ($printPdf) {
         $html = ob_get_clean();
         $pdf = new PDF();
         $pdf->AddPage();
         $pdf->SetFont('Arial', '', 10);
         if (ini_get('magic_quotes_gpc') == '1') {
             $html = stripslashes($html);
         }
         $pdf->WriteHTML($html);
         $pdf->Output($_GET['pdfName'] . '.pdf', 'F');
         echo "<img onclick=\"history.back();\" src=\"" . $_SESSION['WPATH'] . "/themes/beyondT/pictures/btn_back.gif\" onmouseover=\"this.src='" . $_SESSION['WPATH'] . "/themes/beyondT/pictures/btn_back_02.gif';\" onmouseout=\"this.src='" . $_SESSION['WPATH'] . "/themes/beyondT/pictures/btn_back.gif';\" title=\"Back\" />";
         echo "<script>window.open('" . $_SESSION['WPATH'] . "/lib/controllers/{$_GET['pdfName']}.pdf');</script>";
     }
 }
开发者ID:noikiy,项目名称:owaspbwa,代码行数:38,代码来源:TemplateMerger.php


注:本文中的CommonFunctions::getTheme方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。