本文整理汇总了PHP中Utility::getPageURL方法的典型用法代码示例。如果您正苦于以下问题:PHP Utility::getPageURL方法的具体用法?PHP Utility::getPageURL怎么用?PHP Utility::getPageURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Utility
的用法示例。
在下文中一共展示了Utility::getPageURL方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: User
}
break;
case 'setProdUse':
$expressionID = $_GET['expressionID'];
$licenseID = $_GET['licenseID'];
$productionUseInd = $_GET['productionUseInd'];
//send email if prod use is being set
if ($productionUseInd == "1") {
$user = new User();
$toList = array();
$toList = $user->getSFXUpdateList();
$license = new License(new NamedArguments(array('primaryKey' => $licenseID)));
$util = new Utility();
$emailMessage = "An expression in the licensing module has been approved for terms tool use.\n";
$emailMessage .= "License: " . $license->shortName . "\n\n";
$emailMessage .= "View License Record: " . $util->getPageURL() . "license.php?licenseID=" . $licenseID;
$email = new Email();
$email->to = implode(", ", $toList);
$email->subject = "Licensing - expression set to production use";
$email->message = $emailMessage;
$email->send();
$response = "Approved for terms tool display.";
} else {
$response = "Removed from terms tool display.";
}
//save it in the expression record
$expression = new Expression(new NamedArguments(array('primaryKey' => $_GET['expressionID'])));
$expression->productionUseInd = $productionUseInd;
try {
$expression->save();
echo $response;
示例2: SushiService
$sushiServices = new SushiService();
$sushiServicesArray = $sushiServices->getByDayOfMonth($day);
$emailLog = "<h2>" . count($sushiServicesArray) . " SUSHI runs found for day: " . $day . "</h2>";
foreach ($sushiServicesArray as $sushiService) {
$sushiService->setImportDates();
$emailLog .= "<h3>" . $sushiService->getServiceProvider() . "</h3>";
//try to run!
try {
$emailLog .= nl2br($sushiService->runAll($_POST['overwritePlatform']));
} catch (Exception $e) {
$emailLog .= nl2br($e->getMessage());
}
}
//if more than one run, send email
if (count($sushiServicesArray) > 0) {
$emailLog .= "<br /><br />Log in to <a href='" . $util->getPageURL() . "sushi.php'>Sushi Administration</a> for more information.";
//send email to email addresses listed in DB
$logEmailAddress = new LogEmailAddress();
$emailAddresses = array();
foreach ($logEmailAddress->allAsArray() as $emailAddress) {
$emailAddresses[] = $emailAddress['emailAddress'];
}
if (count($emailAddresses) > 0) {
$email = new Email();
$email->to = implode(", ", $emailAddresses);
$email->subject = "SUSHI Scheduled run log for " . format_date(date) . " - " . count($sushiServicesArray) . " runs";
$email->message = $emailLog;
if ($email->send()) {
echo "Run complete. Log has been emailed to " . implode(", ", $emailAddresses);
} else {
echo "Email to " . implode(", ", $emailAddresses) . " Failed!";
示例3: parseXML
//.........这里部分代码省略.........
break;
case 'Count':
$countArray[$metricType] = $reader->value;
break;
}
}
//Finished parsing the Title!!!
} else {
if ($reader->nodeType == XMLReader::END_ELEMENT && $reader->localName == "ReportItems") {
foreach ($identifierArray as $key => $value) {
if (!(strrpos($key, 'PRINT') === false) && !(strrpos($key, 'ISSN') === false)) {
$reportArray['issn'] = $value;
} else {
if (!(strrpos($key, 'ONLINE') === false) && !(strrpos($key, 'ISSN') === false)) {
$reportArray['eissn'] = $value;
} else {
if (!(strpos($key, 'PRINT') === false) && !(strpos($key, 'ISBN') === false)) {
$reportArray['isbn'] = $value;
} else {
if (!(strpos($key, 'ONLINE') === false) && !(strpos($key, 'ISBN') === false)) {
$reportArray['eisbn'] = $value;
} else {
if (!(strpos($key, 'DOI') === false)) {
$reportArray['doi'] = $value;
} else {
if (!(strpos($key, 'PROPRIETARY') === false)) {
$reportArray['pi'] = $value;
}
}
}
}
}
}
}
//get the last array into the totals array
$totalCountsArray[$m] = $countArray;
//now figure out the months and the ytd, etc totals
foreach ($totalCountsArray as $key => $countArray) {
if ($key != '') {
if (intval($countArray['ytd']) == "0") {
$reportArray[$key] = intval($countArray['pdf']) + intval($countArray['html']);
} else {
$reportArray[$key] = intval($countArray['ytd']);
}
if ($reportArray['ytd'] === null) {
$reportArray['ytd'] = intval($countArray['ytd']);
} else {
$reportArray['ytd'] += intval($countArray['ytd']);
}
if ($reportArray['ytdPDF'] === null) {
$reportArray['ytdPDF'] = intval($countArray['pdf']);
} else {
$reportArray['ytdPDF'] += intval($countArray['pdf']);
}
if ($reportArray['ytdHTML'] === null) {
$reportArray['ytdHTML'] = intval($countArray['html']);
} else {
$reportArray['ytdHTML'] += intval($countArray['html']);
}
}
}
//Now look at the report's layoutcode's columns to order them properly
$finalArray = array();
foreach ($layoutColumns as $colName) {
if (isset($reportArray[$colName])) {
$finalArray[] = $reportArray[$colName];
} else {
$finalArray[] = null;
}
}
$txtOut .= implode($finalArray, "\t") . "\n";
$totalCountsArray = array();
break;
}
}
}
}
}
$reader->close();
if ($layoutKey == "" || count($layoutColumns) == '0' || $txtOut == "") {
if (file_exists($xmlFileName)) {
$this->logStatus("Failed XML parsing or no data was found.");
$xml = simplexml_load_file($xmlFileName);
$this->log("The following is the XML response:");
$this->log(htmlentities(file_get_contents($xmlFileName)));
} else {
$this->log("Failed loading XML file. Please verify you have write permissions on /sushistore/ directory.");
}
$this->saveLogAndExit($layoutCode);
}
#Save final text delimited "file" and log output on server
$txtFile = strtotime("now") . '.txt';
$fp = fopen(BASE_DIR . 'archive/' . $txtFile, 'w');
fwrite($fp, $txtOut);
fclose($fp);
$this->log("");
$this->log("-- Sushi XML parsing completed --");
$this->log("Archive/Text File Name: " . Utility::getPageURL() . 'archive/' . $txtFile);
$this->saveLogAndExit($layoutCode, $txtFile, true);
}
示例4: SushiService
$sushiServices = new SushiService();
$sushiServicesArray = $sushiServices->getByDayOfMonth($day);
$emailLog = "<h2>" . count($sushiServicesArray) . _(" SUSHI runs found for day: ") . $day . "</h2>";
foreach ($sushiServicesArray as $sushiService) {
$sushiService->setImportDates();
$emailLog .= "<h3>" . $sushiService->getServiceProvider() . "</h3>";
//try to run!
try {
$emailLog .= nl2br($sushiService->runAll($_POST['overwritePlatform']));
} catch (Exception $e) {
$emailLog .= nl2br($e->getMessage());
}
}
//if more than one run, send email
if (count($sushiServicesArray) > 0) {
$emailLog .= "<br /><br />" . _("Log in to ") . "<a href='" . $util->getPageURL() . "sushi.php'>" . _("Sushi Administration") . "</a>" . _(" for more information.");
//send email to email addresses listed in DB
$logEmailAddress = new LogEmailAddress();
$emailAddresses = array();
foreach ($logEmailAddress->allAsArray() as $emailAddress) {
$emailAddresses[] = $emailAddress['emailAddress'];
}
if (count($emailAddresses) > 0) {
$email = new Email();
$email->to = implode(", ", $emailAddresses);
$email->subject = _("SUSHI Scheduled run log for ") . format_date(date) . " - " . count($sushiServicesArray) . _(" runs");
$email->message = $emailLog;
if ($email->send()) {
echo _("Run complete. Log has been emailed to ") . implode(", ", $emailAddresses);
} else {
echo _("Email to ") . implode(", ", $emailAddresses) . _(" Failed!");