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


PHP Utility::getCORALURL方法代码示例

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


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

示例1: User

    $loginID = $util->getLoginCookie();
    //load user and verify they have a valid open session
    $user = new User(new NamedArguments(array('primaryKey' => $loginID)));
    //if the user has an open session
    if ($loginID && $user->hasOpenSession()) {
        session_start();
        $_SESSION['loginID'] = $loginID;
        //no open session
    } else {
        //redirect to auth page
        if (isset($user->loginID)) {
            $addURL = '?timeout&service=';
        } else {
            $addURL = '?service=';
        }
        $authURL = $util->getCORALURL() . "auth/" . $addURL . htmlentities($_SERVER['REQUEST_URI']);
        header('Location: ' . $authURL, true);
    }
    //otherwise plug into apache server variable
} else {
    //get login id from server
    if (!isset($_SESSION['loginID']) || $_SESSION['loginID'] == '') {
        $varName = $config->settings->remoteAuthVariableName;
        //the following code takes the remote auth variable name from the config settings and evaluates it to get the actual value from web server
        //if the first character is a $ it needs to be stripped off for the eval to work
        $theVarStem = ltrim($varName, "\$");
        //evaluate the remote variable
        $remoteAuth = eval("return \${$theVarStem};");
        //use the split in case the remote login is supplied as an email address
        list($loginID, $restofAddr) = explode("@", $remoteAuth);
        session_start();
开发者ID:jcraitz,项目名称:resources,代码行数:31,代码来源:user.php

示例2: Utility

** CORAL 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 CORAL.  If not, see <http://www.gnu.org/licenses/>.
**
**************************************************************************************************************************
*/
include_once 'directory.php';
include_once 'user.php';
$util = new Utility();
$config = new Configuration();
//get the current page to determine which menu button should be depressed
$currentPage = $_SERVER["SCRIPT_NAME"];
$parts = Explode('/', $currentPage);
$currentPage = $parts[count($parts) - 1];
//get CORAL URL for 'Change Module' and logout link
$coralURL = $util->getCORALURL();
?>

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CORAL Usage Statistics - <?php 
echo $pageTitle;
?>
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<link rel="stylesheet" href="css/thickbox.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/jquery.tooltip.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/jquery.autocomplete.css" type="text/css" media="screen" />
<link rel="SHORTCUT ICON" href="images/seahorsefavicon.ico" />
开发者ID:veggiematts,项目名称:usage,代码行数:31,代码来源:header.php

示例3:

        ?>
				</span>
				</th>
				</tr>

				<?php 
        if (isset($contact['organizationName'])) {
            ?>

				<tr>
				<td style='vertical-align:top;width:110px;'><?php 
            echo _("Organization:");
            ?>
</td>
				<td><?php 
            echo $contact['organizationName'] . "&nbsp;&nbsp;<a href='" . $util->getCORALURL() . "organizations/orgDetail.php?showTab=contacts&organizationID=" . $contact['organizationID'] . "' target='_blank'><img src='images/arrow-up-right.gif' alt='" . _("Visit Contact in Organizations Module") . "' title='" . _("Visit Contact in Organizations Module") . "' style='vertical-align:top;'></a>";
            ?>
</td>
				</tr>

				<?php 
        }
        if ($contact['archiveDate'] != '0000-00-00' && $contact['archiveDate']) {
            ?>
				<tr>
				<td style='vertical-align:top;background-color:#ebebeb; width:110px;'><?php 
            echo _("No longer valid:");
            ?>
</td>
				<td style='background-color:#ebebeb'><i><?php 
            echo format_date($contact['archiveDate']);
开发者ID:billdueber,项目名称:resources,代码行数:31,代码来源:getContactDetails.php

示例4: Utility

**
** CORAL 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.
**
** CORAL 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 CORAL.  If not, see <http://www.gnu.org/licenses/>.
**
**************************************************************************************************************************
*/
session_start();
include_once 'directory.php';
$util = new Utility();
if (isset($_GET['service'])) {
    $service = $_GET['service'];
} else {
    $service = $util->getCORALURL();
}
$errorMessage = '';
$message = '&nbsp;';
$inputLoginID = '';
$rememberChecked = '';
if (isset($_SESSION['loginID'])) {
    $loginID = $_SESSION['loginID'];
    $user = new User(new NamedArguments(array('primaryKey' => $loginID)));
}
//user is trying to log out
if (array_key_exists('logout', $_GET)) {
    $user->processLogout();
    $message = _('You are successfully logged out of the system.');
    $user = new User();
    //get login, if set
开发者ID:ndlibersa,项目名称:auth,代码行数:31,代码来源:index.php

示例5: header

fwrite($fp, "<?php header(\"Content-type: application/vnd.ms-excel\");\nheader(\"Content-Disposition: attachment; filename=" . $excelfile . "\"); ?>");
fwrite($fp, "<html><head></head><body>");
fwrite($fp, $topLogOutput);
//for major errors
fwrite($fp, "<br />");
fwrite($fp, $logOutput);
fwrite($fp, "</body></html>");
fclose($fp);
//send email to email addresses listed in DB
$logEmailAddress = new LogEmailAddress();
$emailAddresses = array();
foreach ($logEmailAddress->allAsArray() as $emailAddress) {
    $emailAddresses[] = $emailAddress['emailAddress'];
}
$util = new Utility();
$Base_URL = $util->getCORALURL() . "usage/";
$mailOutput = '';
if (count($emailAddresses) > 0) {
    $email = new Email();
    $email->to = implode(", ", $emailAddresses);
    $email->subject = _("Log Output for ") . $uploadedFile;
    $email->message = _("Usage Statistics File Import Run!") . "\n\n" . _("Please find log file: ") . "\n\n" . $Base_URL . $logfile;
    if ($email->send()) {
        $mailOutput = _("Log has been emailed to ") . implode(", ", $emailAddresses);
    } else {
        $mailOutput = _("Email to ") . implode(", ", $emailAddresses) . _(" Failed!");
    }
}
if ($multYear) {
    $logSummary .= date("F Y", mktime(0, 0, 0, $startMonth, 10, $startYear)) . " - " . date("F Y", mktime(0, 0, 0, $holdEndMonth, 10, $endYear));
} else {
开发者ID:pontifechs,项目名称:usage,代码行数:31,代码来源:uploadComplete.php


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