本文整理汇总了PHP中getURL函数的典型用法代码示例。如果您正苦于以下问题:PHP getURL函数的具体用法?PHP getURL怎么用?PHP getURL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getURL函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: RemindPassword
function RemindPassword($Email)
{
global $Db, $Logs, $nsProduct, $nsLang, $LangConfig, $Lang;
$Query = "SELECT * FROM " . PFX . "_system_user WHERE EMAIL = ?";
$User = $Db->Select($Query, false, $Email);
if (!ValidId($User->ID)) {
$Logs->Err($Lang['NoEmail']);
return false;
}
$NewPass = substr(md5(uniqid(rand())), 0, 10);
$Query = "UPDATE " . PFX . "_system_user SET PWD= '" . md5($NewPass) . "' WHERE ID = " . $User->ID;
$Db->Query($Query);
$Query = "SELECT LANG FROM " . PFX . "_system_user2lang WHERE PROD_ID=" . $nsProduct->ID . " AND UID = " . $User->ID;
$ULang = $Db->ReturnValue($Query);
if ($ULang && $ULang != $nsLang->CurrentLang) {
$LConfig = $nsLang->ReturnConfig($ULang);
$nsLang->TplInc("admin.remind", $ULang);
} else {
$LConfig = $LangConfig;
}
$Query = "SELECT FROM_EMAIL FROM " . PFX . "_tracker_config WHERE COMPANY_ID=0";
$FromEmail = $Db->ReturnValue($Query);
$FromEmail = $FromEmail ? $FromEmail : $Email;
$Message = $Lang['MsgBody'];
$Message = str_replace("{LOGIN}", $User->LOGIN, $Message);
$Message = str_replace("{PASS}", $NewPass, $Message);
$Message = str_replace("{LINK}", getURL("login", "", "admin"), $Message);
$Subject = $Lang['MsgSubject'];
$Headers = "From: {$FromEmail}\n";
$Headers .= "Content-Type: text/plain; charset=" . $LConfig['charset'] . "\n";
mail($Email, $Subject, $Message, $Headers);
$Logs->Msg(str_replace("{EMAIL}", $Email, $Lang['PasswordSent']));
}
示例2: do_url
public function do_url()
{
if (!isset(Vars::$get['blogname']) || trim(Vars::$get['blogname']) == '') {
throw new PluginException('パラメータが足りません。', $this);
}
$blogname = trim(Vars::$get['blogname']);
$num = isset(Vars::$get['recent']) && Vars::$get['recent'] > 0 ? (int) Vars::$get['recent'] : 15;
$db = DataBase::getinstance();
$_exp = $db->escape('^' . mb_ereg_quote($blogname) . '/\\d{4}-\\d{2}-\\d{2}/');
$query = "SELECT pagename,timestamp FROM page";
$query .= " WHERE php('mb_ereg', '{$_exp}', pagename)";
$query .= " ORDER BY timestamp DESC, pagename ASC LIMIT {$num}";
$result = $db->query($query);
$list = array();
$prefixsize = mb_strlen($blogname . '/9999-99-99/');
while ($row = $db->fetch($result)) {
$item['timestamp'] = $row['timestamp'];
$item['pagename'] = mb_substr($row['pagename'], $prefixsize);
$item['url'] = getURL(Page::getinstance($row['pagename']));
$list[] = $item;
}
$smarty = $this->getSmarty();
$smarty->assign('rssurl', SCRIPTURL . '?' . htmlspecialchars($_SERVER['QUERY_STRING']));
$smarty->assign('sitename', SITENAME);
$smarty->assign('blogurl', getURL(Page::getinstance($blogname)));
$smarty->assign('blogname', $blogname);
$smarty->assign('list', $list);
header('Content-Type: application/xml; charset=UTF-8');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $item['timestamp'][0]) . ' GMT');
$smarty->display('blogrss10.tpl.htm');
exit;
}
示例3: smarty_function_online_payment_link
function smarty_function_online_payment_link($params, &$smarty)
{
global $LANG;
$domain_id = domain_id::get($params['domain_id']);
$url = getURL();
if (in_array("paypal", explode(",", $params['type']))) {
$link = "<a \n\t\t\t\thref=\"https://www.paypal.com/xclick/?business=" . urlencode($params['business']) . "&item_name=" . urlencode($params['item_name']) . "&invoice=" . urlencode($params['invoice']) . "&amount=" . urlencode(number_format($params['amount'], 2, '.', '')) . "¤cy_code=" . urlencode($params['currency_code']) . "¬ify_url=" . urlencode($params['notify_url']) . "&return=" . urlencode($params['return_url']) . "&no_shipping=1&no_note=1&custom=domain_id:" . urlencode($domain_id) . "; \">";
if ($params['include_image'] == "true") {
$link .= "<img border='0' src='" . urlsafe($url) . "/images/common/pay_with_paypal.gif'/>";
} else {
$link .= htmlsafe($params['link_wording']);
}
$link .= "</a>";
echo $link;
}
if (in_array("eway_shared", explode(",", $params['type']))) {
$link = "<a \n\t\t\t\thref=\"https://www.paypal.com/xclick/?business=" . urlencode($params['business'] . "\n\t\t\t\t&item_name=" . urlencode($params['item_name']) . "&invoice=" . urlencode($params['invoice']) . "\n\t\t\t\t&amount=" . urlencode(number_format($params['amount'], 2, '.', '')) . "¤cy_code=" . $params['currency_code']) . "\n\t\t\t\t&return=http://vcsweb.com.au&no_shipping=1&no_note=1\">";
if ($params['include_image'] == "true") {
$link .= "<img border='0' src='" . urlsafe($url) . "/images/common/pay_with_eway.gif'/>";
} else {
$link .= htmlsafe($params['link_wording']);
}
$link .= "</a>";
echo $link;
}
}
示例4: GetCampTree
function GetCampTree($ParentId = 0, $CompId = false)
{
if (!ValidId($ParentId)) {
return false;
}
global $Db, $Lang, $nsUser;
if ($CompId) {
$Where = " AND COMPANY_ID={$CompId} ";
} else {
$Where = "";
}
$Query = "SELECT * FROM " . PFX . "_tracker_campaign WHERE PARENT_ID = {$ParentId} AND COMPANY_ID={$CompId} ORDER BY NAME ASC";
$Sql = new Query($Query);
$Sql->ReadSkinConfig();
$CampArr = array();
while ($Row = $Sql->Row()) {
if ($Sql->Position > 0) {
$Row->_UP = true;
} else {
$Row->_UP = false;
}
$Row->_DOWN = true;
$Row->NAME = stripslashes($Row->NAME);
$Row->DESCRIPTION = stripslashes($Row->DESCRIPTION);
$Row->_STYLE = $Sql->_STYLE;
$SubCnt = $Db->CNT(PFX . "_tracker_campaign", "PARENT_ID=" . $Row->ID);
$Row->CHILD_COUNT = $SubCnt > 0 ? $SubCnt : 0;
$Row->_UPLINK = getURL("campaign", "SortId=" . $Row->ID . "&SortTo=Up&ParentId=" . $Row->PARENT_ID);
$Row->_DOWNLINK = getURL("campaign", "SortId=" . $Row->ID . "&SortTo=Down&ParentId=" . $Row->PARENT_ID);
if ($nsUser->Columns->ROI || $nsUser->Columns->CONVERSIONS) {
$Row->Report = new Paid_v2();
$Row->Report->GrpId = $Row->ID;
$Row->Report->CpId = $Row->COMPANY_ID;
$Row->Report->ShowPerClick = true;
$Row->Report->ShowTotalCost = true;
$Row->Report->DisableAll();
if ($nsUser->Columns->ROI) {
$Row->Report->ShowROI = true;
}
if ($nsUser->Columns->CONVERSIONS) {
$Row->Report->ShowActionConv = true;
}
if ($nsUser->Columns->CONVERSIONS) {
$Row->Report->ShowSaleConv = true;
}
$Row->Report->Calculate();
//Dump($Row->Report);
$Row->CampStat =& $Row->Report->CampStat;
}
$Row->_MOVE = true;
$CampArr[$Sql->Position] = $Row;
$PrevRow =& $CampArr[$Sql->Position];
}
$PrevRow->_DOWN = false;
if (count($CampArr) < 1) {
return false;
}
//if (count($CampArr)==1) $PrevRow->_MOVE=false;
return $CampArr;
}
示例5: isConnected
function isConnected($URL = false)
{
if (!SESSION("ZanUser")) {
redirect($URL !== false ? $URL : path("users/login/?return_to=" . urlencode(getURL())));
}
return true;
}
示例6: do_url
public function do_url()
{
$num = isset(Vars::$get['recent']) && Vars::$get['recent'] > 0 ? (int) Vars::$get['recent'] : 15;
$db = DataBase::getinstance();
$query = "SELECT pagename,timestamp FROM page";
if (isset(Vars::$get['exp']) && trim(Vars::$get['exp']) != '') {
$_inc = $db->escape(Vars::$get['exp']);
$query .= " WHERE php('mb_ereg', '{$_inc}', pagename)";
} else {
if (isset(Vars::$get['include']) && trim(Vars::$get['include']) != '') {
$_inc = $db->escape(glob2ereg(Vars::$get['include']));
$query .= " WHERE php('mb_ereg', '{$_inc}', pagename)";
}
}
$query .= " ORDER BY timestamp DESC, pagename ASC LIMIT {$num}";
$result = $db->query($query);
$list = array();
while ($row = $db->fetch($result)) {
$item['timestamp'] = $row['timestamp'];
$item['pagename'] = $row['pagename'];
$item['url'] = getURL(Page::getinstance($row['pagename']));
$list[] = $item;
}
$smarty = $this->getSmarty();
$smarty->assign('rssurl', SCRIPTURL . '?' . htmlspecialchars($_SERVER['QUERY_STRING']));
$smarty->assign('sitename', SITENAME);
$smarty->assign('baseurl', SCRIPTURL);
$smarty->assign('list', $list);
header('Content-Type: application/xml; charset=UTF-8');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $item['timestamp'][0]) . ' GMT');
$smarty->display('rss10.tpl.htm');
exit;
}
示例7: getPage
protected function getPage(array $data)
{
$data['alerts'] = System::alerts();
$data['jumbotron'] = view('install.jumbotron', ['title' => 'Database connection', 'description' => 'Setup your default database connection.', 'logo' => asset('opis-colibri/system', 'opis-colibri.png'), 'button' => ['link' => getURL('/install/account'), 'text' => 'Skip this step']]);
$data['supported'] = class_exists('\\PDO');
return ['title' => 'Database', 'content' => view('install.page.database', $data)];
}
示例8: printHeadingImage
function printHeadingImage($randomImage)
{
global $_zp_themeroot;
$id = getAlbumId();
echo '<div id="randomhead">';
if (is_null($randomImage)) {
echo '<img src="' . $_zp_themeroot . '/images/zen-logo.jpg" alt="' . gettext('There were no images from which to select the random heading.') . '" />';
} else {
$randomAlbum = $randomImage->getAlbum();
$randomAlt1 = $randomAlbum->getTitle();
if ($randomAlbum->getAlbumId() != $id) {
$randomAlbum = $randomAlbum->getParent();
while (!is_null($randomAlbum) && $randomAlbum->getAlbumId() != $id) {
$randomAlt1 = $randomAlbum->getTitle() . ":\n" . $randomAlt1;
$randomAlbum = $randomAlbum->getParent();
}
}
$randomImageURL = html_encode(getURL($randomImage));
if (getOption('allow_upscale')) {
$wide = 620;
$high = 180;
} else {
$wide = min(620, $randomImage->getWidth());
$high = min(180, $randomImage->getHeight());
}
echo "<a href='" . $randomImageURL . "' title='" . gettext('Random picture...') . "'>";
$html = "<img src='" . html_encode($randomImage->getCustomImage(NULL, $wide, $high, $wide, $high, NULL, NULL, !getOption('Watermark_head_image'))) . "' width='{$wide}' height='{$high}' alt=" . '"' . html_encode($randomAlt1) . ":\n" . html_encode($randomImage->getTitle()) . '" />';
$html = zp_apply_filter('custom_image_html', $html, false);
echo $html;
echo '</a>';
}
echo '</div>';
}
示例9: printHeadingImage
function printHeadingImage($randomImage)
{
global $_zp_themeroot;
$id = getAlbumId();
echo '<div id="randomhead">';
if (is_null($randomImage) || checkforPassword(true)) {
echo '<img src="' . $_zp_themeroot . '/images/zen-logo.jpg" alt="' . gettext('There were no images from which to select the random heading.') . '" />';
} else {
$randomAlbum = $randomImage->getAlbum();
$randomAlt1 = $randomAlbum->getTitle();
if ($randomAlbum->getAlbumId() != $id) {
$randomAlbum = $randomAlbum->getParent();
while (!is_null($randomAlbum) && $randomAlbum->getAlbumId() != $id) {
$randomAlt1 = $randomAlbum->getTitle() . ":\n" . $randomAlt1;
$randomAlbum = $randomAlbum->getParent();
}
}
$randomImageURL = htmlspecialchars(getURL($randomImage));
if (getOption('allow_upscale')) {
$wide = 620;
$high = 180;
} else {
$wide = min(620, $randomImage->getWidth());
$high = min(180, $randomImage->getHeight());
}
echo "<a href='" . $randomImageURL . "' title='" . gettext('Random picture...') . "'><img src='" . htmlspecialchars($randomImage->getCustomImage(NULL, $wide, $high, $wide, $high, NULL, NULL, !getOption('Watermark_head_image'))) . "' width={$wide} height={$high} alt=" . '"' . htmlspecialchars($randomAlt1, ENT_QUOTES) . ":\n" . htmlspecialchars($randomImage->getTitle(), ENT_QUOTES) . '" /></a>';
}
echo '</div>';
}
示例10: getLogo
function getLogo($biller)
{
$url = getURL();
if (!empty($biller['logo'])) {
return $url . "/templates/invoices/logos/{$biller['logo']}";
} else {
return $url . "/templates/invoices/logos/_default_blank_logo.png";
}
}
示例11: visitT_Heading
function visitT_Heading($e)
{
static $list = array('', '<h3 id=\\"{$id}\\"><a href=\\"{$link}#{$id}\\"><span class=\\"sanchor\\">■</span></a> {$str}</h3>', '<h4 id=\\"{$id}\\">{$str}</h4>', '<h5 id=\\"{$id}\\">{$str}</h5>', '<h6 id=\\"{$id}\\">{$str}</h6>');
$level = $e->getlevel();
$id = 'id' . substr(md5($level . $e->getsource()), 0, 6);
$link = getURL($e->getcontext()->pagename);
$str = $e->getelem()->accept($this);
return eval("return \"{$list[$level]}\";");
}
示例12: getLogo
function getLogo($biller) {
$url = getURL();
if(!empty($biller['logo'])) {
return $url."/images/logos/$biller[logo]";
}
else {
return $url."/images/logos/_default_blank_logo.png";
}
}
示例13: __construct
public function __construct(array $form = [])
{
$form += array('id' => 'form-module-manager', 'method' => 'post', 'action' => getURL('/module-manager/module'));
$modules = array();
foreach (app()->getModules() as $module) {
if (!$module->isHidden()) {
$modules[$module->name()] = new ModuleInfo($module, $form['id']);
}
}
ksort($modules);
parent::__construct('manager.module.list', ['list' => $modules, 'form' => $form]);
}
示例14: smarty_function_online_payment_link
function smarty_function_online_payment_link($params, &$smarty)
{
global $LANG;
global $siUrl;
global $config;
global $siUrl;
$domain_id = domain_id::get($params['domain_id']);
$url = getURL();
if (in_array("paypal", explode(",", $params['type']))) {
$link = "<a \n href=\"https://www.paypal.com/xclick/?business=" . urlencode($params['business']) . "&item_name=" . urlencode($params['item_name']) . "&invoice=" . urlencode($params['invoice']) . "&amount=" . urlencode(number_format($params['amount'], 2, '.', '')) . "¤cy_code=" . urlencode($params['currency_code']) . "¬ify_url=" . urlencode($params['notify_url']) . "&return=" . urlencode($params['return_url']) . "&no_shipping=1&no_note=1&custom=domain_id:" . urlencode($domain_id) . "; \">";
if ($params['include_image'] == "true") {
$link .= "<img border='0' src='" . urlsafe($url) . "/images/common/pay_with_paypal.gif'/>";
} else {
$link .= htmlsafe($params['link_wording']);
}
$link .= "</a>";
echo $link;
}
if (in_array("eway_shared", explode(",", $params['type']))) {
$link = "<a \n href=\"https://www.paypal.com/xclick/?business=" . urlencode($params['business'] . "\n &item_name=" . urlencode($params['item_name']) . "&invoice=" . urlencode($params['invoice']) . "\n &amount=" . urlencode(number_format($params['amount'], 2, '.', '')) . "¤cy_code=" . $params['currency_code']) . "\n &return=http://vcsweb.com.au&no_shipping=1&no_note=1\">";
if ($params['include_image'] == "true") {
$link .= "<img border='0' src='" . urlsafe($url) . "/images/common/pay_with_eway.gif'/>";
} else {
$link .= htmlsafe($params['link_wording']);
}
$link .= "</a>";
echo $link;
}
if (in_array("paymentsgateway", explode(",", $params['type']))) {
// $today = date('Y-m-d',$x);
/*
$datetime1 = new DateTime('0001-01-01');
$datetime2 = new DateTime('now', new DateTimeZone('UTC'));
$interval = $datetime1->diff($datetime2);
//$interval->format('%a %h %i %s ') ;
$seconds = ( $interval->format('%a') * 24 * 60 * 60) + ( $interval->format('%h') * 60 * 60 )+ ($interval->format('%i') * 60) + ( $interval->format('%s') ) ;
*/
//$time = time() + 62135596800;
//$seconds = $time . '0000000';
//get biller secure trans key here
// $hash_info = $params['api_id'] ."|1|1.0|". number_format($params['amount'], 2, '.', '') ."|". $seconds. "|". $params['invoice'] ;
//$hash = hash_hmac('md5', $hash_info, $params['transaction_password']) ;
$link = "<a \n href='https://swp.paymentsgateway.net/co/default.aspx?pg_api_login_id=" . urlencode($params['api_id']) . "&pg_billto_postal_name_company=" . urlencode($params['customer']['name']) . "&pg_version_number=1.0&pg_total_amount=" . urlencode(number_format($params['amount'], 2, '.', '')) . "&pg_transaction_order_number=" . urlencode($params['invoice']) . "&pg_billto_postal_name_first=" . urlencode($params['customer']['attention']) . "&pg_billto_postal_name_last=-&pg_billto_postal_street_line1=" . urlencode($params['customer']['street_address']) . "&pg_billto_postal_street_line2=" . urlencode($params['customer']['street_address2']) . "&pg_billto_postal_city=" . urlencode($params['customer']['city']) . "&pg_billto_postal_stateprov=" . urlencode($params['customer']['state']) . "&pg_billto_postal_postalcode=" . urlencode($params['customer']['zip_code']) . "&pg_billto_telecom_phone_number=" . urlencode($params['customer']['phone']) . "&pg_billto_online_email=" . $params['customer']['email'] . "&pg_consumerorderid=" . $params['invoice'] . "&pg_return_url=" . $siUrl . "/api-ach&pg_save_client=2'>";
if ($params['include_image'] == "true") {
$link .= "<img border='0' src='" . urlsafe($url) . "/images/common/pay_with_ach.gif'/>";
} else {
$link .= htmlsafe($params['link_wording']);
}
$link .= "</a>";
echo $link;
}
}
示例15: isLoggedInFilter
public static function isLoggedInFilter(Context $context)
{
if (session()->get('is_system_admin', false)) {
if ($context->path() === '/module-manager/login') {
redirect(getURL('/module-manager'));
}
} else {
if ($context->path() !== '/module-manager/login') {
redirect(getURL('/module-manager/login'));
}
}
return true;
}