• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP url_absolue函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中url_absolue函数的典型用法代码示例。如果您正苦于以下问题:PHP url_absolue函数的具体用法?PHP url_absolue怎么用?PHP url_absolue使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: pub_insert_head

function pub_insert_head($flux)
{
    // on ajoute la feuille de style pub.css
    $flux .= '
<link rel="stylesheet" href="' . url_absolue(find_in_path('css/pub.css')) . '" type="text/css" />';
    return $flux;
}
开发者ID:pcrest,项目名称:eludis,代码行数:7,代码来源:head.php


示例2: affiche_boutons_admin

function affiche_boutons_admin($contenu) {
	include_spip('inc/filtres');

	// Inserer le css d'admin
	$css = "<link rel='stylesheet' href='".url_absolue(find_in_path('spip_admin.css'))
	. "' type='text/css' />\n";
	if ($f = find_in_path('spip_admin_perso.css'))
		$css .= "<link rel='stylesheet' href='"
		. url_absolue($f) . "' type='text/css' />\n";

	($pos = stripos($contenu, '</head>'))
	    || ($pos = stripos($contenu, '<body>'))
	    || ($pos = 0);
	$contenu = substr_replace($contenu, $css, $pos, 0);


	// Inserer la balise #FORMULAIRE_ADMIN, en float
	$boutons_admin = inclure_balise_dynamique(
		balise_FORMULAIRE_ADMIN_dyn('spip-admin-float'),
	false);

	($pos = strripos($contenu, '</body>'))
	    || ($pos = strripos($contenu, '</html>'))
	    || ($pos = strlen($contenu));
	$contenu = substr_replace($contenu, $boutons_admin, $pos, 0);


	return $contenu;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:29,代码来源:admin.php


示例3: html_3002936b70d02a85d3d71dc952115155

function html_3002936b70d02a85d3d71dc952115155($Cache, $Pile, $doublons = array(), $Numrows = array(), $SP = 0)
{
    if (isset($Pile[0]["doublons"]) and is_array($Pile[0]["doublons"])) {
        $doublons = nettoyer_env_doublons($Pile[0]["doublons"]);
    }
    $connect = '';
    $page = '<' . '?php header("X-Spip-Cache: 604800"); ?' . '>' . '<' . '?php header("' . 'Content-Type: text/css; charset=utf-8' . '"); ?' . '>' . '<' . '?php header("' . 'Vary: Accept-Encoding' . '"); ?' . '>' . barre_outils_css_icones('') . '

/* roue ajax */
.ajaxLoad{
		position:relative;
}
.ajaxLoad:after {
		content:"";
		display:block;
		width:40px;
		height:40px;
		border:1px solid #eee;
		background:#fff url(\'' . protocole_implicite(url_absolue(find_in_path('images/searching.gif'))) . '\') center no-repeat;
		position:absolute;
		left:50%;
		top:50%;
		margin-left:-20px;
		margin-top:-20px;
}
.fullscreen .ajaxLoad:after {
		position:fixed;
		left:75%;
}
';
    return analyse_resultat_skel('html_3002936b70d02a85d3d71dc952115155', $Cache, $page, 'plugins-dist/porte_plume/barre_outils_icones.css.html');
}
开发者ID:xablen,项目名称:Semaine14_SPIP_test,代码行数:32,代码来源:html_3002936b70d02a85d3d71dc952115155.php


示例4: is_url_prive

function is_url_prive($cible)
{
    include_spip('inc/filtres_mini');
    $path = parse_url(tester_url_absolue($cible) ? $cible : url_absolue($cible));
    $path = isset($path['path']) ? $path['path'] : '';
    return strncmp(substr($path, -strlen(_DIR_RESTREINT_ABS)), _DIR_RESTREINT_ABS, strlen(_DIR_RESTREINT_ABS)) == 0;
}
开发者ID:horaciogd,项目名称:CGeomap,代码行数:7,代码来源:login.php


示例5: surligner_mots

function surligner_mots($page, $surcharge_surligne = '')
{
    $surlignejs_engines = array(array("," . str_replace(array("/", "."), array("\\/", "\\."), $GLOBALS['meta']['adresse_site']) . ",i", ",recherche=([^&]+),i"), array(",^http://(www\\.)?google\\.,i", ",q=([^&]+),i"), array(",^http://(www\\.)?search\\.yahoo\\.,i", ",p=([^&]+),i"), array(",^http://(www\\.)?search\\.msn\\.,i", ",q=([^&]+),i"), array(",^http://(www\\.)?search\\.live\\.,i", ",query=([^&]+),i"), array(",^http://(www\\.)?search\\.aol\\.,i", ",userQuery=([^&]+),i"), array(",^http://(www\\.)?ask\\.com,i", ",q=([^&]+),i"), array(",^http://(www\\.)?altavista\\.,i", ",q=([^&]+),i"), array(",^http://(www\\.)?feedster\\.,i", ",q=([^&]+),i"), array(",^http://(www\\.)?search\\.lycos\\.,i", ",q=([^&]+),i"), array(",^http://(www\\.)?alltheweb\\.,i", ",q=([^&]+),i"), array(",^http://(www\\.)?technorati\\.com,i", ",([^\\?\\/]+)(?:\\?.*)\$,i"));
    $ref = $_SERVER['HTTP_REFERER'];
    //avoid a js injection
    if ($surcharge_surligne) {
        $surcharge_surligne = preg_replace(",(?<!\\\\)((?:(?>\\\\){2})*)('),", "\$1\\\\\$2", $surcharge_surligne);
        $surcharge_surligne = str_replace("\\", "\\\\", $surcharge_surligne);
        if ($GLOBALS['meta']['charset'] == 'utf-8') {
            include_spip('inc/charsets');
            if (!is_utf8($surcharge_surligne)) {
                $surcharge_surligne = utf8_encode($surcharge_surligne);
            }
        }
    }
    foreach ($surlignejs_engines as $engine) {
        if ($surcharge_surligne || preg_match($engine[0], $ref) && preg_match($engine[1], $ref)) {
            //good referrer found or var_recherche is not null
            include_spip('inc/filtres');
            $script = "\n      <script type='text/javascript' src='" . url_absolue(find_in_path('javascript/SearchHighlight.js')) . "'></script>\n      <script type='text/javascript'>/*<![CDATA[*/\n      if (window.jQuery)\n        (function(\$){\$(function(){\n          \$(document).SearchHighlight({\n            tag_name:'" . (html5_permis() ? 'mark' : 'span') . "',\n            style_name:'spip_surligne',\n            exact:'whole',\n            style_name_suffix:false,\n            engines:[/^" . str_replace(array("/", "."), array("\\/", "\\."), $GLOBALS['meta']['adresse_site']) . "/i,/recherche=([^&]+)/i],\n            highlight:'.surlignable',\n            nohighlight:'.pas_surlignable'" . ($surcharge_surligne ? ",\n            keys:'{$surcharge_surligne}'" : "") . ",\n            min_length: 3\n          })\n        });\n      })(jQuery);\n      /*]]>*/</script>\n      ";
            // on l'insere juste avant </head>, sinon tout en bas
            if (is_null($l = strpos($page, '</head>'))) {
                $l = strlen($page);
            }
            $page = substr_replace($page, $script, $l, 0);
            break;
        }
    }
    return $page;
}
开发者ID:nursit,项目名称:SPIP,代码行数:30,代码来源:surligne.php


示例6: filets_sep_installe

function filets_sep_installe() {
//cs_log('filets_sep_installe()');
	include_spip('inc/texte');
	// Tester si on echappe en span ou en div
	$mode = preg_match(',<('._BALISES_BLOCS.'|p)(\W|$),iS', _FILETS_SEP_BALISE_DEBUT)?'div':'span';
	$bt = defined('_DIR_PLUGIN_PORTE_PLUME');
	$filets = array();
	// filets numeriques
	for($i=0; $i<=_FILETS_SEP_MAX_CSS; $i++) {
		$filets[6][] = $i;
		$filets[1]["$i"] = cs_code_echappement(_FILETS_SEP_BALISE_DEBUT." class='filet_sep filet_sep_$i'"._FILETS_SEP_BALISE_FIN, '', $mode);
	}
	// filets image	
	$path = find_in_path('img/filets');
	$dossier = opendir($path);
	if($path) while ($image = readdir($dossier)) {
		if (preg_match(',^(([a-z0-9_-]+)'._FILETS_REG_EXT.'),', $image, $reg)) {
			$filets[0][] = '__'.$reg[1].'__';
			$filets[6][] = preg_quote($reg[1]);
			$filets[2][] = $reg[2];
			list(,$haut) = @getimagesize($path.'/'.$reg[1]);
			if ($haut) $haut="height:{$haut}px;";
			$f = url_absolue($path).'/'.$reg[1];
			$filets[1][$reg[1]] = cs_code_echappement(_FILETS_SEP_BALISE_DEBUT." class=\"filet_sep filet_sep_image\" style=\"$haut background-image: url($f);\""._FILETS_SEP_BALISE_FIN, '', $mode);
			if($bt)
				$filets[4]['filet_'.str_replace('.','_',$reg[1])] = $reg[1];
		}
	}
	// RegExpr finale
	$filets[6] = _FILETS_REG_DEBUT . join('|', $filets[6]) . _FILETS_REG_FIN;
	if($bt) for($i=0; $i<=_FILETS_SEP_MAX_CSS; $i++)
		$filets[5]['filet_'.$i] = $i;
	return array('filets_sep' => $filets);
}
开发者ID:rhertzog,项目名称:lcs,代码行数:34,代码来源:filets_sep.php


示例7: sarkaspip_insert_head

function sarkaspip_insert_head($flux)
{
    include_spip('inc/config');
    // Recuperation des parametres cfg sur le menu des rubriques
    $position = lire_config('sarkaspip_menus/position_rubriques', 1);
    $modele = lire_config('sarkaspip_menus/modele_rubriques', 1);
    // Si le menu des rubriques est deroulant dans le bandeau
    if ($position == 5 && $modele == 1) {
        $flux .= '<script src="' . url_absolue(find_in_path('scripts/menu_deroulant_horizontal.js')) . '" type="text/javascript"></script>';
    }
    // Si le menu des rubriques est deroulant dans la colonne navigation
    if ($position == 1 && $modele == 1) {
        $flux .= '<script src="' . url_absolue(find_in_path('scripts/menu_deroulant_vertical.js')) . '" type="text/javascript"></script>';
    }
    // Insertion de la librairie jCarouselLite et des librairies connexes
    $position = lire_config('sarkaspip_album/position_carrousel', 1);
    $modele = lire_config('sarkaspip_album/modele_carrousel', 1);
    if ($position != 0 && $modele == 1) {
        $flux .= '<script src="' . url_absolue(find_in_path('scripts/jcarousellite_1.0.1.js')) . '" type="text/javascript"></script>';
        $flux .= '<script src="' . url_absolue(find_in_path('scripts/jquery.mousewheel.js')) . '" type="text/javascript"></script>';
    }
    // Insertion de la librairie Innerfade pour la noisette des sites favoris
    $position = lire_config('sarkaspip_noisettes/position_herbier', 0);
    $modele = lire_config('sarkaspip_noisettes/liste_herbier', 2);
    if ($position != 0 && $modele == 2) {
        $flux .= '<script src="' . url_absolue(find_in_path('scripts/jquery.innerfade.js')) . '" type="text/javascript"></script>';
    }
    // Insertion de la librairie jquery.corner pour la noisette cfg_sarkaspip_coins
    $coins_arrondis = lire_config('sarkaspip_coins/avec_arrondis', 0);
    if ($coins_arrondis == 1) {
        $flux .= '<script src="' . url_absolue(find_in_path('scripts/jquery.corner.js')) . '" type="text/javascript"></script>';
        $flux .= '<script src="' . generer_url_public('sarkaspip_coins.js') . '" type="text/javascript"></script>';
    }
    return $flux;
}
开发者ID:jazzman346,项目名称:CAC_Site,代码行数:35,代码来源:sarkaspip_pipelines.php


示例8: geol_recuperer_fond

/**
 * Insertion dans le pipeline recuperer_fond (SPIP)
 * 
 * Ajouter le script leaflet.geodiv.js au squelette du script de GIS
 * 
 * @param array $flux
 * @return array $flux
 */
function geol_recuperer_fond($flux)
{
    if ($flux['args']['fond'] == 'javascript/gis.js') {
        $flux['data']['texte'] .= "\n\n(function() { L.gisConfig.getInfowindowUrl = '" . url_absolue(generer_url_public('get_infowindow')) . "'; })();";
        $flux['data']['texte'] .= "\n\n" . spip_file_get_contents(find_in_path('javascript/leaflet.geodiv.js'));
    }
    return $flux;
}
开发者ID:BenFer,项目名称:geodiversite,代码行数:16,代码来源:geol_pipelines.php


示例9: redirige_par_entete

function redirige_par_entete($url, $equiv = '', $status = 302)
{
    if (!in_array($status, array(301, 302))) {
        $status = 302;
    }
    $url = trim(strtr($url, "\n\r", "  "));
    # en theorie on devrait faire ca tout le temps, mais quand la chaine
    # commence par ? c'est imperatif, sinon l'url finale n'est pas la bonne
    if ($url[0] == '?') {
        $url = url_de_base() . $url;
    }
    if ($url[0] == '#') {
        $url = self('&') . $url;
    }
    # si profondeur non nulle et url relative, il faut la passer en absolue
    if ($GLOBALS['profondeur_url'] > (_DIR_RESTREINT ? 1 : 2) and !preg_match(",^(\\w+:)?//,", $url)) {
        include_spip("inc/filtres_mini");
        $url = url_absolue($url);
    }
    if ($x = _request('transformer_xml')) {
        $url = parametre_url($url, 'transformer_xml', $x, '&');
    }
    if (defined('_AJAX') and _AJAX) {
        $url = parametre_url($url, 'var_ajax_redir', 1, '&');
    }
    // ne pas laisser passer n'importe quoi dans l'url
    $url = str_replace(array('<', '"'), array('&lt;', '&quot;'), $url);
    // interdire les url inline avec des pseudo-protocoles :
    if (preg_match(",data:,i", $url) and preg_match("/base64\\s*,/i", $url) or preg_match(",(javascript|mailto):,i", $url)) {
        $url = "./";
    }
    // Il n'y a que sous Apache que setcookie puis redirection fonctionne
    include_spip('inc/cookie');
    if (!$equiv and !spip_cookie_envoye() or (strncmp("Apache", $_SERVER['SERVER_SOFTWARE'], 6) == 0 or defined('_SERVER_APACHE'))) {
        @header("Location: " . $url);
        $equiv = "";
    } else {
        @header("Refresh: 0; url=" . $url);
        $equiv = "<meta http-equiv='Refresh' content='0; url={$url}'>";
    }
    include_spip('inc/lang');
    if ($status != 302) {
        http_status($status);
    }
    echo '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">', "\n", html_lang_attributes(), '
<head>', $equiv, '
<title>HTTP ' . $status . '</title>
</head>
<body>
<h1>HTTP ' . $status . '</h1>
<a href="', quote_amp($url), '">', _T('navigateur_pas_redirige'), '</a></body></html>';
    spip_log("redirige {$status}: {$url}");
    exit;
}
开发者ID:genma,项目名称:spip_ynh,代码行数:54,代码来源:headers.php


示例10: mediabox_config

function mediabox_config($public = null) {
	include_spip("inc/filtres");
	include_spip("inc/config");
	$config = lire_config('mediabox', array());

	$config = array_merge(array(
		'active' => 'oui',
		'traiter_toutes_images' => 'oui',
		'selecteur_galerie' => '#documents_portfolio a[type=\'image/jpeg\'],#documents_portfolio a[type=\'image/png\'],#documents_portfolio a[type=\'image/gif\']',
		'selecteur_commun' => '.mediabox',
		'splash_url' => '',
		'splash_width' => '600px',
		'splash_height' => '90%',
		'skin' => 'black-striped',
		'transition' => 'elastic',
		'speed' => '200',
		'maxWidth' => '90%',
		'maxHeight' => '90%',
		'minWidth' => '400px',
		'minHeight' => '',
		'slideshow_speed' => '2500',
		'opacite' => '0.9',
	), $config);

	if ((is_null($public) and test_espace_prive()) or $public === false) {
		$config = array_merge($config, array(
			'active' => 'oui',
			'selecteur_galerie' => '#portfolios a[type^=\'image/\']',
			'selecteur_commun' => '.mediabox, .iconifier a[href$=jpg],.iconifier a[href$=png],.iconifier a[href$=gif]',
			'splash_url' => '',
			'skin' => 'white-shadow',
			'maxWidth' => '90%',
			'maxHeight' => '95%',
			'minWidth' => '600px',
			'minHeight' => '300px',
			'opacite' => '0.9',
		));
	}

	// Gerer aussi les liens internes de SPIP
	if (!test_espace_prive() and $config['splash_url']) {
		include_spip("inc/filtres_ecrire");
		$config['splash_url'] = url_absolue(extraire_attribut(lien_article_virtuel($config['splash_url']), 'href'));
	}

	// charger la config du theme uniquement dans le public
	if (!test_espace_prive() and include_spip("colorbox/" . $config['skin'] . "/mediabox_config_theme")) {
		$config_theme = mediabox_config_theme();
		$config = array_merge($config, $config_theme);
	}

	return $config;
}
开发者ID:samszo,项目名称:open-edition,代码行数:53,代码来源:mediabox_pipelines.php


示例11: inc_profil_decrire

/**
 * Decrire un profil
 * renvoie un tableau de ses infos
 *
 * @param int $id_auteur
 * @param bool $url
 * @return array
 */
function inc_profil_decrire($id_auteur, $url = false)
{
    static $profils = array();
    if (!isset($profils[$id_auteur]) or $url && !isset($profils[$id_auteur][$url])) {
        $profils[$id_auteur] = sql_fetsel('nom,prenom,email,bio,pgp', 'spip_auteurs', 'id_auteur=' . intval($id_auteur));
        if ($url) {
            $profils[$id_auteur]['url'] = url_absolue(generer_url_entite($id_auteur, 'auteur', '', '', false));
            $profils[$id_auteur]['nom_lien'] = "<a href='" . generer_url_entite($id_auteur, 'auteur', '', '', false) . "'>" . ($profils[$id_auteur]['prenom'] ? $profils[$id_auteur]['prenom'] : $profils[$id_auteur]['nom']) . "</a>";
        }
    }
    return $profils[$id_auteur];
}
开发者ID:rougerose,项目名称:fraap_candidatures,代码行数:20,代码来源:fraap_candidatures_options.php


示例12: formulaires_clevermail_list_edit_charger_dist

function formulaires_clevermail_list_edit_charger_dist($lst_id = -1)
{
    // Ces define sont mis ici car dans clevermail_options.php, il etait impossible de surcharger avec un plugin ayant :
    // 	<utilise id="clevermail" version="[2.5.0;]" />
    // Pour proposer une URL complète (true) ou juste le chemin du squelette (false) à la création d'une nouvelle lettre
    if (!defined('_CLEVERMAIL_DISTANT')) {
        define("_CLEVERMAIL_DISTANT", true);
    }
    if (!defined('_CLEVERMAIL_NOUVEAUTES_HTML')) {
        define("_CLEVERMAIL_NOUVEAUTES_HTML", 'clevermail_nouveautes_html');
    }
    // _CLEVERMAIL_NOUVEAUTES_HTML_OPTION est facultatif. Il permet de completer l'url amorcee avec _CLEVERMAIL_NOUVEAUTES_HTML.
    // define("_CLEVERMAIL_NOUVEAUTES_HTML_OPTION", 'cat=mot&sujet=1&pied=1&entete=1');
    if (!defined('_CLEVERMAIL_NOUVEAUTES_TEXT')) {
        define("_CLEVERMAIL_NOUVEAUTES_TEXT", 'clevermail_nouveautes_text');
    }
    // _CLEVERMAIL_NOUVEAUTES_TEXT_OPTION est facultatif. Il permet de completer l'url amorcee avec _CLEVERMAIL_NOUVEAUTES_TEXT.
    // define("_CLEVERMAIL_NOUVEAUTES_TEXT_OPTION", 'cat=mot&sujet=1&pied=1&entete=1');
    if ($valeurs = sql_fetsel('*', 'spip_cm_lists', 'lst_id=' . intval($lst_id))) {
        $valeurs['lst_auto_week_days'] = explode(',', $valeurs['lst_auto_week_days']);
    } else {
        $cm_mail_admin = sql_getfetsel('set_value', 'spip_cm_settings', 'set_name="CM_MAIL_ADMIN"');
        if (defined('_CLEVERMAIL_NOUVEAUTES_HTML_OPTION')) {
            if (_CLEVERMAIL_DISTANT) {
                $url_html = url_absolue(generer_url_public(_CLEVERMAIL_NOUVEAUTES_HTML, _CLEVERMAIL_NOUVEAUTES_HTML_OPTION));
            } else {
                $url_html = _CLEVERMAIL_NOUVEAUTES_HTML;
            }
        } else {
            if (_CLEVERMAIL_DISTANT) {
                $url_html = url_absolue(generer_url_public(_CLEVERMAIL_NOUVEAUTES_HTML));
            } else {
                $url_html = _CLEVERMAIL_NOUVEAUTES_HTML;
            }
        }
        if (defined('_CLEVERMAIL_NOUVEAUTES_TEXT_OPTION')) {
            if (_CLEVERMAIL_DISTANT) {
                $url_text = url_absolue(generer_url_public(_CLEVERMAIL_NOUVEAUTES_TEXT, _CLEVERMAIL_NOUVEAUTES_TEXT_OPTION));
            } else {
                $url_text = _CLEVERMAIL_NOUVEAUTES_TEXT;
            }
        } else {
            if (_CLEVERMAIL_DISTANT) {
                $url_text = url_absolue(generer_url_public(_CLEVERMAIL_NOUVEAUTES_TEXT));
            } else {
                $url_text = _CLEVERMAIL_NOUVEAUTES_TEXT;
            }
        }
        $valeurs = array('lst_id' => -1, 'lst_name' => '', 'lst_comment' => '', 'lst_moderation' => 'closed', 'lst_moderator_email' => $cm_mail_admin, 'lst_subscribe_subject' => _T('clevermail:confirmation_votre_inscription'), 'lst_subscribe_text' => _T('clevermail:confirmation_votre_inscription_text'), 'lst_unsubscribe_subject' => _T('clevermail:confirmation_votre_desinscription'), 'lst_unsubscribe_text' => _T('clevermail:confirmation_votre_desinscription_text'), 'lst_subject_tag' => 1, 'lst_url_html' => $url_html, 'lst_url_text' => $url_text, 'lst_auto_mode' => 'none', 'lst_auto_hour' => 8, 'lst_auto_week_days' => array(1), 'lst_auto_month_day' => 1, 'lst_auto_subscribers' => '', 'lst_auto_subscribers_mode' => 1);
    }
    return $valeurs;
}
开发者ID:nohavy,项目名称:clevermail,代码行数:52,代码来源:clevermail_list_edit.php


示例13: redirige_par_entete

/**
 * Envoyer le navigateur sur une nouvelle adresse
 *
 * Le tout en évitant les attaques par la redirection (souvent indique par un `$_GET`)
 *
 * @example
 *     ```
 *     $redirect = parametre_url(urldecode(_request('redirect')),'id_article=' . $id_article);
 *     include_spip('inc/headers');
 *     redirige_par_entete($redirect);
 *     ```
 *
 * @param string $url URL de redirection
 * @param string $equiv ?
 * @param int $status Code de redirection (301 ou 302)
 **/
function redirige_par_entete($url, $equiv = '', $status = 302)
{
    if (!in_array($status, array(301, 302))) {
        $status = 302;
    }
    $url = trim(strtr($url, "\n\r", "  "));
    # si l'url de redirection est relative, on la passe en absolue
    if (!preg_match(",^(\\w+:)?//,", $url)) {
        include_spip("inc/filtres_mini");
        $url = url_absolue($url);
    }
    if ($x = _request('transformer_xml')) {
        $url = parametre_url($url, 'transformer_xml', $x, '&');
    }
    if (defined('_AJAX') and _AJAX) {
        $url = parametre_url($url, 'var_ajax_redir', 1, '&');
    }
    // ne pas laisser passer n'importe quoi dans l'url
    $url = str_replace(array('<', '"'), array('&lt;', '&quot;'), $url);
    // interdire les url inline avec des pseudo-protocoles :
    if (preg_match(",data:,i", $url) and preg_match("/base64\\s*,/i", $url) or preg_match(",(javascript|mailto):,i", $url)) {
        $url = "./";
    }
    // Il n'y a que sous Apache que setcookie puis redirection fonctionne
    include_spip('inc/cookie');
    if (!$equiv and !spip_cookie_envoye() or (strncmp("Apache", $_SERVER['SERVER_SOFTWARE'], 6) == 0 or defined('_SERVER_APACHE'))) {
        @header("Location: " . $url);
        $equiv = "";
    } else {
        @header("Refresh: 0; url=" . $url);
        if (isset($GLOBALS['meta']['charset'])) {
            @header("Content-Type: text/html; charset=" . $GLOBALS['meta']['charset']);
        }
        $equiv = "<meta http-equiv='Refresh' content='0; url={$url}'>";
    }
    include_spip('inc/lang');
    if ($status != 302) {
        http_status($status);
    }
    echo '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">', "\n", html_lang_attributes(), '
<head>', $equiv, '
<title>HTTP ' . $status . '</title>
' . (isset($GLOBALS['meta']['charset']) ? '<meta http-equiv="Content-Type" content="text/html;charset=' . $GLOBALS['meta']['charset'] . '">' : '') . '
</head>
<body>
<h1>HTTP ' . $status . '</h1>
<a href="', quote_amp($url), '">', _T('navigateur_pas_redirige'), '</a></body></html>';
    spip_log("redirige {$status}: {$url}");
    exit;
}
开发者ID:RadioCanut,项目名称:site-radiocanut,代码行数:66,代码来源:headers.php


示例14: essais_couleur_extraire

	function essais_couleur_extraire(){
		$essais = array (
  0 => 
  array (
    0 => '759bc8',
    1 => url_absolue(find_in_path('tests/degrade-bleu.jpg')),
  ),
  1 => 
  array (
    0 => '759bc8',
    1 => find_in_path('tests/degrade-bleu.jpg'),
  ),
);
		return $essais;
	}
开发者ID:rhertzog,项目名称:lcs,代码行数:15,代码来源:couleur_extraire.php


示例15: chatons_installe

function chatons_installe() {
	$chatons = array();
	$path = find_in_path('img/chatons');
	$dossier = opendir($path);
	$bt = defined('_DIR_PLUGIN_PORTE_PLUME');
	if($path) while ($image = readdir($dossier)) {
		if (preg_match(',^([a-z][a-z0-9_-]*)\.(png|gif|jpg),', $image, $reg)) { 
			$chatons[0][] = ':'.$reg[1];
			list(,,,$size) = @getimagesize("$path/$reg[1].$reg[2]");
			$chatons[1][] = "<img class=\"no_image_filtrer\" alt=\"$reg[1]\" title=\"$reg[1]\" src=\"".url_absolue($path)."/$reg[1].$reg[2]\" $size/>";
			if($bt)	$chatons[4]['chaton_'.$reg[1]] = $reg[1].'.'.$reg[2];
		}
	}
	return array('chatons' => $chatons);
}
开发者ID:rhertzog,项目名称:lcs,代码行数:15,代码来源:chatons.php


示例16: controleurs_portfolio_dist

function controleurs_portfolio_dist($regs)
{
    list(, $crayon, $type, $champ, $id) = $regs;
    include_spip('inc/minipres');
    # pour aide()
    include_spip('inc/presentation');
    # pour debut_cadre()
    include_spip('inc/layer');
    # pour le js des fleches
    include_spip('inc/documents');
    # pour aide()
    $html = http_script("\nvar ajax_image_searching = \n'<div style=\"float: " . $GLOBALS['spip_lang_right'] . ";\"><img src=\"" . url_absolue(_DIR_IMG_PACK . "searching.gif") . "\" alt=\"\" /></div>';") . http_script('', generer_url_public('jquery.js')) . http_script('', _DIR_JAVASCRIPT . 'layer.js', '') . afficher_documents_colonne($id, $type, 'portfolio');
    $status = NULL;
    return array($html, $status);
}
开发者ID:RadioCanut,项目名称:site-radiocanut,代码行数:15,代码来源:portfolio.php


示例17: presta_paybox_call_request_dist

function presta_paybox_call_request_dist($id_transaction, $transaction_hash, $abo = false, $cartes = array('CB', 'VISA', 'EUROCARD_MASTERCARD', 'E_CARD'))
{
    if (!($row = sql_fetsel("*", "spip_transactions", "id_transaction=" . intval($id_transaction) . " AND transaction_hash=" . sql_quote($transaction_hash)))) {
        return "";
    }
    if (!$row['id_auteur'] and $GLOBALS['visiteur_session']['id_auteur']) {
        sql_updateq("spip_transactions", array("id_auteur" => intval($row['id_auteur'] = $GLOBALS['visiteur_session']['id_auteur'])), "id_transaction=" . intval($id_transaction));
    }
    // recuperer l'email
    $mail = sql_getfetsel('email', 'spip_auteurs', 'id_auteur=' . intval($row['id_auteur']));
    // passage en centimes d'euros
    $montant = intval(100 * $row['montant']);
    if (strlen($montant) < 3) {
        $montant = str_pad($montant, 3, '0', STR_PAD_LEFT);
    }
    //		Affectation des parametres obligatoires
    $parm = paybox_pbx_ids();
    $parm['PBX_OUTPUT'] = "C";
    // recuperer uniquement les hidden
    $parm['PBX_LANGUE'] = "FRA";
    $parm['PBX_DEVISE'] = "978";
    $parm['PBX_TOTAL'] = $montant;
    $parm['PBX_PORTEUR'] = defined('_PBX_PORTEUR') ? _PBX_PORTEUR : $mail;
    $parm['PBX_CMD'] = intval($id_transaction);
    $parm['PBX_RETOUR'] = 'montant:M;id_transaction:R;auth:A;trans:S;abo:B;erreur:E;valid:D;sign:K';
    $parm['PBX_EFFECTUE'] = generer_url_action('bank_response', "bankp=paybox", true, true);
    $parm['PBX_REFUSE'] = generer_url_action('bank_cancel', "bankp=paybox", true, true);
    $parm['PBX_ANNULE'] = generer_url_action('bank_cancel', "bankp=paybox", true, true);
    if ($abo and $id_abonnement = sql_getfetsel("id_abonnement", "spip_abonnements_transactions", "id_transaction=" . intval($id_transaction)) and $montant_echeance = sql_getfetsel('prix_echeance', 'spip_abonnements', 'id_abonnement=' . intval($id_abonnement))) {
        $montant_echeance = str_pad(intval(100 * $montant_echeance), 10, "0", STR_PAD_LEFT);
        // infos de l'abonnement :
        // montant identique recurrent, frequence mensuelle, a date anniversaire, sans delai
        $parm['PBX_CMD'] .= "IBS_2MONT{$montant_echeance}" . "IBS_NBPAIE00" . "IBS_FREQ01" . "IBS_QUAND00";
    }
    //var_dump($parm);
    $cartes_possibles = array('CB' => 'presta/paybox/logo/CB.gif', 'VISA' => 'presta/paybox/logo/VISA.gif', 'EUROCARD_MASTERCARD' => 'presta/paybox/logo/MASTERCARD.gif', 'E_CARD' => 'presta/paybox/logo/E-CB.gif', 'AMEX' => 'presta/paybox/logo/AMEX.gif', 'AURORE' => 'presta/paybox/logo/AURORE.gif');
    include_spip('inc/filtres_mini');
    $contexte = array('hidden' => array(), 'action' => _PAYBOX_URL, 'backurl' => url_absolue(self()), 'id_transaction' => $id_transaction);
    foreach ($cartes as $carte) {
        if ($cartes_possibles[$carte]) {
            $parm['PBX_TYPEPAIEMENT'] = 'CARTE';
            $parm['PBX_TYPECARTE'] = $carte;
            $contexte['hidden'][$carte] = paybox_exec_request($parm);
            $contexte['logo'][$carte] = $cartes_possibles[$carte];
        }
    }
    return $contexte;
}
开发者ID:rougerose,项目名称:bank,代码行数:48,代码来源:request.php


示例18: balise_CLEVERMAIL_UNSUBSCRIBE_dyn

function balise_CLEVERMAIL_UNSUBSCRIBE_dyn()
{
    if (isset($_GET['id']) && $_GET['id'] != '') {
        if (sql_countsel("spip_cm_lists_subscribers", "lsr_id=" . sql_quote($_GET['id'])) == 1) {
            $abonnement = sql_fetsel("*", "spip_cm_lists_subscribers", "lsr_id=" . sql_quote($_GET['id']));
            // Desinscription a cette liste demandee
            $actionId = md5('unsubscribe#' . intval($abonnement['lst_id']) . '#' . intval($abonnement['sub_id']) . '#' . time());
            if (sql_countsel("spip_cm_pending", "lst_id = " . intval($abonnement['lst_id']) . " AND sub_id = " . intval($abonnement['sub_id'])) == 0) {
                sql_insertq("spip_cm_pending", array('lst_id' => intval($abonnement['lst_id']), 'sub_id' => $abonnement['sub_id'], 'pnd_action' => 'unsubscribe', 'pnd_action_date' => time(), 'pnd_action_id' => $actionId));
            }
            // Composition du message de demande de confirmation
            $sub = sql_fetsel("*", "spip_cm_subscribers", "sub_id=" . intval($abonnement['sub_id']));
            $list = sql_fetsel("*", "spip_cm_lists", "lst_id=" . intval($abonnement['lst_id']));
            $template = array();
            if (strpos($list['lst_name'], '/') === false) {
                $template['@@NOM_LETTRE@@'] = supprimer_numero($list['lst_name']);
                $template['@@NOM_CATEGORIE@@'] = '';
                $template['@@NOM_COMPLET@@'] = $template['@@NOM_LETTRE@@'];
            } else {
                $template['@@NOM_LETTRE@@'] = supprimer_numero(substr($list['lst_name'], strpos($list['lst_name'], '/') + 1));
                $template['@@NOM_CATEGORIE@@'] = supprimer_numero(substr($list['lst_name'], 0, strpos($list['lst_name'], '/')));
                $template['@@NOM_COMPLET@@'] = $template['@@NOM_CATEGORIE@@'] . ' / ' . $template['@@NOM_LETTRE@@'];
            }
            $template['@@EMAIL@@'] = $sub['sub_email'];
            $template['@@FORMAT_INSCRIPTION@@'] = $data['lsr_mode'] == 1 ? 'HTML' : 'texte';
            //$template['@@URL_CONFIRMATION@@'] = $GLOBALS['meta']['adresse_site'].'/spip.php?page=clevermail_do&id='.$actionId;
            $template['@@URL_CONFIRMATION@@'] = url_absolue(generer_url_public(_CLEVERMAIL_UNSUBSCRIBE, 'id=' . $actionId));
            $to = $sub['sub_email'];
            $subject = (intval($list['lst_subject_tag']) == 1 ? '[' . $template['@@NOM_COMPLET@@'] . '] ' : '') . html_entity_decode($list['lst_unsubscribe_subject'], ENT_QUOTES, 'UTF-8');
            $body = $list['lst_unsubscribe_text'];
            while (list($translateFrom, $translateTo) = each($template)) {
                $body = str_replace($translateFrom, $translateTo, $body);
            }
            $from = sql_getfetsel("set_value", "spip_cm_settings", "set_name='CM_MAIL_FROM'");
            $return = sql_getfetsel("set_value", "spip_cm_settings", "set_name='CM_MAIL_RETURN'");
            // TODO : Et le charset ?
            // TODO : Et le return-path ?
            $envoyer_mail = charger_fonction('envoyer_mail', 'inc');
            $envoyer_mail($to, $subject, $body, $from);
            $return = '<p>' . _T('clevermail:desinscription_confirmation_debut') . ' ' . $template['@@NOM_COMPLET@@'] . ' ' . _T('clevermail:desinscription_confirmation_fin') . '</p>';
        } else {
            $return = '<p>' . _T('clevermail:aucune_inscription') . '</p>';
        }
    }
    return $return;
}
开发者ID:nohavy,项目名称:clevermail,代码行数:46,代码来源:clevermail_unsubscribe.php


示例19: message_oubli

function message_oubli($email, $param)
{
    $r = formulaires_oubli_mail($email);
    if (is_array($r) and $r[1]) {
        include_spip('inc/texte');
        # pour corriger_typo
        include_spip('action/inscrire_auteur');
        $cookie = auteur_attribuer_jeton($r[1]['id_auteur']);
        // l'url_reset doit etre une URL de confiance, on force donc un url_absolue sur adresse_site
        include_spip('inc/filtres');
        $msg = recuperer_fond("modeles/mail_oubli", array('url_reset' => url_absolue(generer_url_public('spip_pass', "{$param}={$cookie}"), $GLOBALS['meta']['adresse_site'])));
        include_spip("inc/notifications");
        notifications_envoyer_mails($email, $msg);
        return _T('pass_recevoir_mail');
    }
    return _T('pass_erreur_probleme_technique');
}
开发者ID:RadioCanut,项目名称:site-radiocanut,代码行数:17,代码来源:oubli.php


示例20: accesrestreint_gerer_htaccess

/**
 * on essaye de poser un htaccess rewrite global sur IMG/
 * si fonctionne on gardera des ulrs de document permanente
 * si ne fonctionne pas on se rabat sur creer_htaccess du core
 * qui pose un deny sur chaque sous repertoire de IMG/
 *
 * http://doc.spip.org/@gerer_htaccess
 *
 * @param bool $active
 * @return bool
 */
function accesrestreint_gerer_htaccess($active = true)
{
    if (!$active) {
        spip_unlink(_DIR_IMG . _ACCESS_FILE_NAME);
        effacer_meta("creer_htaccess");
        // effacer les xx/.htaccess crees eventuellement par le core
        include_spip("inc/acces");
        gerer_htaccess();
        return false;
    } else {
        $rewrite = <<<rewrite
RewriteEngine On
RewriteCond %{QUERY_STRING} ^(\\d+/[\\da-f]+)\$
RewriteRule ^\\w+/.*\$     ../spip.php?action=api_docrestreint&arg=%1/\$0 [skip=100]
RewriteRule ^\\w+/.*\$     ../spip.php?action=api_docrestreint&arg=0/0/\$0 [skip=100]
rewrite;
        // On cherche si le dossier racine a un RewriteBase plus long que "/"
        if (file_exists(_DIR_RACINE . _ACCESS_FILE_NAME)) {
            $ht = '';
            lire_fichier(_DIR_RACINE . _ACCESS_FILE_NAME, $ht);
            if ($ht and preg_match('|^RewriteBase\\s+/.+$|m', $ht, $rewritebase)) {
                $rewritebase = rtrim(trim($rewritebase[0]), '/') . '/' . _NOM_PERMANENTS_ACCESSIBLES;
                $rewrite = $rewritebase . "\n" . $rewrite;
            }
        }
        ecrire_fichier(_DIR_IMG . _ACCESS_FILE_NAME, $rewrite);
        // verifier sur l'url de test
        include_spip('inc/distant');
        $url_test = url_absolue(_DIR_IMG . "test/.test?0/1");
        $test = recuperer_page($url_test);
        // si l'url de test renvoie bien "OK" alors rewrite rule fonctionne et on peut baser la protection de document sur ce shema
        if ($test == "OK") {
            effacer_meta("creer_htaccess");
            // securite, et permet de generer des urls permanentes
        } else {
            // sinon on se rabat sur un deny et on generera des urls moches
            spip_unlink(_DIR_IMG . _ACCESS_FILE_NAME);
            ecrire_meta("creer_htaccess", "oui");
        }
        // dans tous les cas on passe par gerer_htaccess pour enlever ou mettre les .htaccess dans les sous rep
        include_spip("inc/acces");
        gerer_htaccess();
        return true;
    }
}
开发者ID:loorenzooo,项目名称:aslfc,代码行数:56,代码来源:accesrestreint_documents.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP url_action函数代码示例发布时间:2022-05-23
下一篇:
PHP url_GetFromFilePath函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap