本文整理汇总了PHP中sefRelToAbs函数的典型用法代码示例。如果您正苦于以下问题:PHP sefRelToAbs函数的具体用法?PHP sefRelToAbs怎么用?PHP sefRelToAbs使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sefRelToAbs函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateDocumentForm
function updateDocumentForm($list, $links, $paths, $data)
{
$action = _taskLink('doc_update_process', $data->id);
ob_start();
?>
<form action="<?php
echo sefRelToAbs($action);
?>
" method="post" enctype="multipart/form-data" id="dm_frmupdate" class="dm_form" >
<fieldset class="input">
<p>
<label for="upload"><?php
echo _DML_SELECTFILE;
?>
</label><br />
<input id="upload" name="upload" type="file" />
</p>
</fieldset>
<fieldset class="dm_button">
<p>
<input name="submit" class="button" value="<?php
echo _DML_UPLOAD;
?>
" type="submit" />
</p>
</fieldset>
<?php
echo DOCMAN_token::render();
?>
</form>
<?php
$html = ob_get_contents();
ob_end_clean();
return $html;
}
示例2: getObjectInfo
function getObjectInfo($id, $language = null)
{
$info = new JCommentsObjectInfo();
$row = null;
if (JCOMMENTS_JVERSION == '1.0') {
$db = JCommentsFactory::getDBO();
$db->setQuery('SELECT id, ad_headline, userid, category FROM #__adsmanager_ads WHERE id = ' . $id);
$db->loadObject($row);
} else {
$db = JFactory::getDBO();
$db->setQuery('SELECT id, ad_headline, userid, category FROM #__adsmanager_ads WHERE id = ' . $id);
$row = $db->loadObject();
}
if (!empty($row)) {
$info->title = $row->ad_headline;
$info->userid = $row->userid;
if (JCOMMENTS_JVERSION == '1.0') {
$Itemid = self::getItemid('com_adsmanager');
$Itemid = $Itemid > 0 ? '&Itemid=' . $Itemid : '';
$info->link = sefRelToAbs("index.php?option=com_adsmanager&page=show_ad&adid=" . $id . $Itemid);
} else {
$Itemid = self::getItemid('com_adsmanager', 'index.php?option=com_adsmanager&view=front');
$Itemid = $Itemid > 0 ? '&Itemid=' . $Itemid : '';
$info->link = JRoute::_("index.php?option=com_adsmanager&view=details&id=" . $row->id . "&catid=" . $row->category . $Itemid);
}
}
return $info;
}
示例3: getObjectInfo
function getObjectInfo($id, $language = null)
{
$info = new JCommentsObjectInfo();
$row = null;
if (JCOMMENTS_JVERSION == '1.0') {
$db = JCommentsFactory::getDBO();
$db->setQuery('SELECT link_id, link_name, user_id FROM #__mt_links WHERE link_id = ' . $id);
$db->loadObject($row);
} else {
$db = JFactory::getDBO();
$db->setQuery('SELECT link_id, link_name, user_id FROM #__mt_links WHERE link_id = ' . $id);
$row = $db->loadObject();
}
if (!empty($row)) {
$Itemid = self::getItemid('com_mtree');
$Itemid = $Itemid > 0 ? '&Itemid=' . $Itemid : '';
$info->title = $row->link_name;
$info->userid = $row->user_id;
if (JCOMMENTS_JVERSION == '1.0') {
$info->link = sefRelToAbs('index.php?option=com_mtree&task=viewlink&link_id=' . $id . $Itemid);
} else {
$info->link = JRoute::_('index.php?option=com_mtree&task=viewlink&link_id=' . $id . $Itemid);
}
}
return $info;
}
示例4: getObjectLink
function getObjectLink($id)
{
global $Itemid;
$_Itemid = $Itemid;
$db = JCommentsFactory::getDBO();
$query = "SELECT m.id as category_itemid, v.itemid as vendor_itemid, m1.itemid as model_itemid" . "\n FROM #__menu as m" . "\n LEFT JOIN #__categories as c ON m.params LIKE CONCAT('%category_id=',c.id,'%')" . "\n LEFT JOIN #__autobb_messages as a ON c.id=a.category" . "\n LEFT JOIN #__autobb_vendors as v ON a.vendor=v.id" . "\n LEFT JOIN #__autobb_models as m1 ON a.model=m1.id" . "\n WHERE m.type='components' AND m.link='index.php?option=com_autobb' AND c.section='com_autobb' and m.published=1 and a.id={$id}" . "\n GROUP BY a.id" . "\n LIMIT 1";
$db->setQuery($query);
$result = null;
if (JCOMMENTS_JVERSION == '1.5') {
$config = JFactory::getConfig();
if ($config->getValue('config.legacy')) {
$db->loadObject($result);
} else {
$result = $db->loadObject();
}
} else {
$db->loadObject($result);
}
if ($result != null) {
if ($result->model_itemid) {
$_Itemid = $result->model_itemid;
} else {
if ($result->model_itemid) {
$_Itemid = $result->vendor_itemid;
} else {
if ($result->category_itemid) {
$_Itemid = $result->category_itemid;
}
}
}
}
$link = sefRelToAbs("index.php?option=com_autobb&Itemid={$_Itemid}&task=show&id={$id}");
return $link;
}
示例5: show_checkout
function show_checkout($option, $subscription, $item_id, $proc)
{
global $Itemid, $JLMS_CONFIG, $my;
$params = new JLMSParameters($proc->params);
if (!$params->get('inst_id')) {
$redirect_task = 'subscription';
if ($subscription->payment_type == 2) {
$redirect_task = 'show_cart';
}
JLMSredirect(sefRelToAbs("index.php?option=" . $option . "&Itemid=" . $Itemid . "&task={$redirect_task}"), "This payment method is not available at the moment.<br /> Ask site administrator to check payment method settings.");
}
setcookie('joomlalms_cart_contents', '', time() - 3600, '/');
// generating sites string;
$prod_descr = $params->get('prod_descr');
?>
<html>
<body onLoad="document.forms.ms_checkout_form.submit();">
<form action="https://select.worldpay.com/wcc/purchase" method="post" name="ms_checkout_form" id="ms_checkout_form">
<input type="hidden" name="instId" value="<?php
echo $params->get('inst_id');
?>
" />
<input type="hidden" name="cartId" value="<?php
echo $item_id;
?>
" />
<input type="hidden" name="amount" value="<?php
echo number_format($subscription->price + $subscription->tax_amount, 2, '.', '');
?>
" />
<input type="hidden" name="currency" value="<?php
echo $JLMS_CONFIG->get('jlms_cur_code');
?>
" />
<input type="hidden" name="desc" value="<?php
echo $subscription->name;
?>
" />
<input type="hidden" name="testMode" value="<?php
echo $params->get('test_mode');
?>
" />
<input type="hidden" name="MC_order" value="<?php
echo $item_id;
?>
" />
<input type="hidden" name="MC_tax" value="<?php
echo $subscription->tax_amount;
?>
" />
<input type="hidden" name="MC_user" value="<?php
echo $my->id;
?>
" />
</form>
</body>
</html>
<?php
die;
}
示例6: getObjectInfo
function getObjectInfo($id, $language = null)
{
if (JCOMMENTS_JVERSION == '1.0') {
$query = "SELECT id, title, '' as alias, access FROM #__polls WHERE id = " . $id;
} else {
$query = "SELECT id, title, alias, access FROM #__polls WHERE id = " . $id;
}
$db = JCommentsFactory::getDBO();
$db->setQuery($query);
$row = $db->loadObject();
$info = new JCommentsObjectInfo();
if (!empty($row)) {
$_Itemid = self::getItemid('com_poll');
$info->title = $row->title;
$info->access = $row->access;
if (JCOMMENTS_JVERSION == '1.0') {
$link = sefRelToAbs('index.php?option=com_poll&task=results&id=' . $id . '&Itemid=' . $_Itemid);
} else {
$_Itemid = $_Itemid > 0 ? '&Itemid=' . $_Itemid : '';
$link = JRoute::_('index.php?option=com_poll&id=' . $id . ':' . $row->alias . $_Itemid);
}
$info->link = $link;
}
return $info;
}
示例7: licenseDocumentForm
function licenseDocumentForm(&$links, &$paths, &$data, $inline = 0)
{
$action = _taskLink('license_result', mosGetParam($_REQUEST, 'gid', 0), array('bid' => $data->id));
ob_start();
?>
<form action="<?php
echo sefRelToAbs($action);
?>
" method="POST" enctype="multipart/form-data">
<input type="hidden" name="inline" value="<?php
echo $inline;
?>
" />
<input type="radio" name="agree" value="0" checked /><?php
echo _DML_DONT_AGREE;
?>
<input type="radio" name="agree" value="1" /><?php
echo _DML_AGREE;
?>
<input name="submit" value="<?php
echo _DML_PROCEED;
?>
" type="submit" />
</form>
<?php
$html = ob_get_contents();
ob_end_clean();
return $html;
}
示例8: textBibleReferencesToLinks_replacer
/**
* Replaces the matched tags
* @param array An array of matches (see preg_match_all)
* @return string
*/
function textBibleReferencesToLinks_replacer(&$matches)
{
global $database, $mosConfig_live_site;
static $bookCodes = array("Gn" => 1, "Êx" => 2, "Lv" => 3, "Nm" => 4, "Dt" => 5, "Js" => 6, "Jz" => 7, "Rt" => 8, "1Sm" => 9, "1 Sm" => 9, "ISm" => 9, "I Sm" => 9, "2Sm" => 10, "2 Sm" => 10, "IISm" => 10, "II Sm" => 10, "1Rs" => 11, "1 Rs" => 11, "IRs" => 11, "I Rs" => 11, "2Rs" => 12, "2 Rs" => 12, "IIRs" => 12, "II Rs" => 12, "1Cr" => 13, "1 Cr" => 13, "ICr" => 13, "I Cr" => 13, "2Cr" => 14, "2 Cr" => 14, "IICr" => 14, "II Cr" => 14, "Ed" => 15, "Ne" => 16, "Et" => 17, "Jó" => 18, "Sl" => 19, "Pv" => 20, "Ec" => 21, "Ct" => 22, "Is" => 23, "Jr" => 24, "Lm" => 25, "Ez" => 26, "Dn" => 27, "Os" => 28, "Jl" => 29, "Am" => 30, "Ob" => 31, "Jn" => 32, "Mq" => 33, "Na" => 34, "He" => 35, "Sf" => 36, "Ag" => 37, "Zc" => 38, "Ml" => 39, "Mt" => 40, "Mc" => 41, "Lc" => 42, "Jo" => 43, "At" => 44, "Rm" => 45, "1Co" => 46, "1 Co" => 46, "ICo" => 46, "I Co" => 46, "2Co" => 47, "2 Co" => 47, "IICo" => 47, "II Co" => 47, "Gl" => 48, "Ef" => 49, "Fp" => 50, "Cl" => 51, "1Ts" => 52, "1 Ts" => 52, "ITs" => 52, "I Ts" => 52, "2Ts" => 53, "2 Ts" => 53, "IITs" => 53, "II Ts" => 53, "1Tm" => 54, "1 Tm" => 54, "ITm" => 54, "I Tm" => 54, "2Tm" => 55, "2 Tm" => 55, "IITm" => 55, "II Tm" => 55, "Tt" => 56, "Fm" => 57, "Hb" => 58, "Tg" => 59, "1Pe" => 60, "1 Pe" => 60, "IPe" => 60, "I Pe" => 60, "2Pe" => 61, "2 Pe" => 61, "IIPe" => 61, "II Pe" => 61, "1Jo" => 62, "1 Jo" => 62, "IJo" => 62, "I Jo" => 62, "2Jo" => 63, "2 Jo" => 63, "IIJo" => 63, "II Jo" => 63, "3Jo" => 64, "3 Jo" => 64, "IIIJo" => 64, "III Jo" => 64, "Jd" => 65, "Ap" => 66);
if ($bookCodes[$matches[2]]) {
$database->setQuery("SELECT bookId, ordering, bookName, location, qtdChapters " . "\nFROM #__bible_book" . "\nwhere ordering = '{$bookCodes[$matches[2]]}'");
$database->loadObject($book);
$capitulo = trim($matches[3]);
$versiculo = trim($matches[6]);
$final = trim($matches[7]);
$windowTitle = "{$book->bookName} {$capitulo}";
if ($final == "") {
$final = $versiculo;
}
if (preg_match("/\\-[1-9]*/", $final)) {
$final = substr($final, 1);
}
if (is_numeric($capitulo) && is_numeric($versiculo) && is_numeric($final)) {
$database->setQuery("SELECT verse, verseText " . "\nFROM #__bible" . "\nwhere bookOrdering = '{$bookCodes[$matches[2]]}'" . "\nand chapter = {$capitulo}" . "\nand verse between {$versiculo} and {$final}" . "\norder by verse");
$verses = $database->loadObjectList();
$windowTitle .= ":{$versiculo}" . ($versiculo == $final ? "" : "-{$final}");
foreach ($verses as $verse) {
$bibleHTMLText .= ($bibleHTMLText == "" ? "" : "<br>") . ($versiculo == $final ? "" : "<sup>({$verse->verse})</sup>") . "{$verse->verseText}";
}
}
if ($bibleHTMLText == "") {
$bibleHTMLText = "Clique para consultar";
}
$url = sefRelToAbs("{$mosConfig_live_site}/index2.php?option=bible&Itemid=71&task=viewBook&id={$bookCodes[$matches[2]]}&limitstart=" . ($matches[3] - 1) . "#{$matches[6]}");
$bibleHTMLText = addslashes($bibleHTMLText);
return "<a onMouseOver=\"return overlib('{$bibleHTMLText}', CAPTION, '{$windowTitle}', WIDTH, 350, BELOW, RIGHT);\" onMouseOut=\"return nd();\" href=\"{$url}\" target=biblia>{$matches[0]}</a>";
} else {
return $matches[0];
}
}
示例9: getObjectLink
function getObjectLink($id)
{
$_Itemid = self::getItemid('com_events');
$db = JCommentsFactory::getDBO();
$db->setQuery("SELECT id, publish_up FROM #__events WHERE id={$id}");
$event = null;
if (JCOMMENTS_JVERSION == '1.5') {
$event = $db->loadObject();
} else {
$db->loadObject($event);
}
$dates = '';
if ($event != null) {
$regs = array();
if (preg_match("#([0-9]{4})-([0-9]{2})-([0-9]{2})[ ]([0-9]{2}):([0-9]{2}):([0-9]{2})#", $event->publish_up, $regs)) {
$y = $regs[1];
$m = min(12, max(1, $regs[2]));
$d = $regs[3];
$d = max(1, $d);
$dates = '&year=' . $y . '&month=' . $m . '&day=' . $d;
}
}
$link = sefRelToAbs("index.php?option=com_events&task=view_detail&agid=" . $id . $dates . "&Itemid=" . $_Itemid);
return $link;
}
示例10: viewbanner
function viewbanner()
{
global $database, $mosConfig_live_site;
$query = "SELECT COUNT(*) AS numrows" . "\n FROM #__banner" . "\n WHERE showBanner = 1";
$database->setQuery($query);
$numrows = $database->loadResult();
if ($numrows === null) {
echo $database->stderr(true);
return;
}
if ($numrows > 1) {
mt_srand((double) microtime() * 1000000);
$bannum = mt_rand(0, --$numrows);
} else {
$bannum = 0;
}
$banner = null;
$query = "SELECT *" . "\n FROM #__banner" . "\n WHERE showBanner = 1";
$database->setQuery($query, $bannum, 1);
if ($database->loadObject($banner)) {
$query = "UPDATE #__banner" . "\n SET impmade = impmade + 1" . "\n WHERE bid = " . (int) $banner->bid;
$database->setQuery($query);
if (!$database->query()) {
echo $database->stderr(true);
return;
}
$banner->impmade++;
if ($numrows > 0) {
// Check if this impression is the last one and print the banner
if ($banner->imptotal == $banner->impmade) {
$query = "INSERT INTO #__bannerfinish" . "\n ( cid, type, name, impressions, clicks, imageurl, datestart, dateend )" . "\n VALUES ( " . (int) $banner->cid . ", " . $database->Quote($banner->type) . ", " . $database->Quote($banner->name) . ", " . (int) $banner->impmade . ", " . (int) $banner->clicks . ", " . $database->Quote($banner->imageurl) . ", " . $database->Quote($banner->date) . ", 'now()' )";
$database->setQuery($query);
if (!$database->query()) {
die($database->stderr(true));
}
$query = "DELETE FROM #__banner" . "\n WHERE bid = " . (int) $banner->bid;
$database->setQuery($query);
if (!$database->query()) {
die($database->stderr(true));
}
}
if (trim($banner->custombannercode)) {
echo $banner->custombannercode;
} else {
if (eregi("(\\.bmp|\\.gif|\\.jpg|\\.jpeg|\\.png)\$", $banner->imageurl)) {
$imageurl = "{$mosConfig_live_site}/images/banners/{$banner->imageurl}";
echo "<a href=\"" . sefRelToAbs("index.php?option=com_banners&task=click&bid={$banner->bid}") . "\" target=\"_blank\"><img src=\"{$imageurl}\" border=\"0\" alt=\"Advertisement\" /></a>";
} else {
if (eregi("\\.swf\$", $banner->imageurl)) {
$imageurl = "{$mosConfig_live_site}/images/banners/" . $banner->imageurl;
echo "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" border=\"5\">\n\t\t\t\t\t\t<param name=\"movie\" value=\"{$imageurl}\"><embed src=\"{$imageurl}\" loop=\"false\" pluginspage=\"http://www.macromedia.com/go/get/flashplayer\" type=\"application/x-shockwave-flash\"></embed></object>";
}
}
}
}
} else {
echo " ";
}
}
示例11: modify
/**
* modify the value
*
* @access public
* @param string value
* @return string modified value
*/
function modify($value, $params = array())
{
if (function_exists('sefRelToAbs')) {
return sefRelToAbs($value);
} else {
return $value;
}
}
示例12: getObjectLink
function getObjectLink($id)
{
$_Itemid = self::getItemid('com_jportfolio');
$db = JCommentsFactory::getDBO();
$db->setQuery('SELECT catid FROM #__jportfolio_projects WHERE id = ' . $id);
$catid = $db->loadResult();
$link = sefRelToAbs('index.php?option=com_jportfolio&catid=' . $catid . '&project=' . $id . '&Itemid=' . $_Itemid);
return $link;
}
示例13: getObjectLink
function getObjectLink($id)
{
$_Itemid = JCommentsPlugin::getItemid('com_afm');
$db =& JCommentsFactory::getDBO();
$db->setQuery('SELECT cat_id FROM #__afm_files WHERE file_id = ' . $id);
$catid = $db->loadResult();
$link = sefRelToAbs('index.php?option=com_afm&task=answer&catid=' . $catid . '&aid=' . $id . '&Itemid=' . $_Itemid);
return $link;
}
示例14: getObjectLink
function getObjectLink($id)
{
$_Itemid = JCommentsPlugin::getItemid('com_yellowpages');
$db =& JCommentsFactory::getDBO();
$db->setQuery('SELECT catid FROM #__jyp_entries WHERE id = ' . $id);
$catid = $db->loadResult();
$link = sefRelToAbs('index.php?option=com_yellowpages&Itemid=' . $_Itemid . '&task=view&catid=' . $catid . '&id=' . $id);
return $link;
}
示例15: call
/**
* call the function
*
* @access public
* @param array parameters of the function (= attributes of the tag)
* @param string content of the tag
* @return string content to insert into the template
*/
function call($params, $content)
{
/*
if( !isset( $params['macro'] ) ) {
return false;
}
*/
return sefRelToAbs($content);
}