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

PHP http_script函数代码示例

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

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



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

示例1: install_debut_html

function install_debut_html($titre = 'AUTO', $onLoad = '') {
	global $spip_lang_right,$spip_lang_left;
	
	utiliser_langue_visiteur();

	http_no_cache();

	if ($titre=='AUTO')
		$titre=_T('info_installation_systeme_publication');

	# le charset est en utf-8, pour recuperer le nom comme il faut
	# lors de l'installation
	if (!headers_sent())
		header('Content-Type: text/html; charset=utf-8');

	// au cas ou minipres() est appele avant spip_initialisation_suite()
	if (!defined('_DOCTYPE_ECRIRE')) define('_DOCTYPE_ECRIRE', '');
	return  _DOCTYPE_ECRIRE.
		html_lang_attributes().
		"<head>\n".
		"<title>".
		textebrut($titre).
		"</title>
		<link rel='stylesheet' href='".direction_css(find_in_path('minipres.css')).
		"' type='text/css' media='all' />\n" .
 // cet appel permet d'assurer un copier-coller du nom du repertoire a creer dans tmp (esj)
		http_script('',  "spip_barre.js") .
"</head>
<body".$onLoad." class='minipres'>
	<div id='minipres'>
	<h1>".
	  $titre .
	  "</h1>
	<div>\n";
}
开发者ID:rhertzog,项目名称:lcs,代码行数:35,代码来源:minipres.php


示例2: inc_iconifier_dist

function inc_iconifier_dist($id_objet, $id,  $script, $visible=false, $flag_modif=true) {
	if ($GLOBALS['spip_display'] == 4) return "";
	$texteon = $GLOBALS['logo_libelles'][($id OR $id_objet != 'id_rubrique') ? $id_objet : 'id_racine'];

	$chercher_logo = charger_fonction('chercher_logo', 'inc');
	
	// Add the redirect url when uploading via iframe
	$iframe_script = generer_url_ecrire('iconifier',"type=$id_objet&$id_objet=$id&script=$script",true);
	$iframe = "<input type='hidden' name='iframe_redirect' value='".rawurlencode($iframe_script)."' />\n";

	$logo = $chercher_logo($id, $id_objet, 'on');
	$logo_s = $chercher_logo($id, $id_objet, 'off');
	if (!$logo) {
		if ($flag_modif AND $GLOBALS['meta']['activer_logos'] != 'non') {
			$masque = indiquer_logo($texteon, $id_objet, 'on', $id, $script, $iframe);
			$masque = "<div class='cadre_padding'>$masque</div>";
			$bouton = bouton_block_depliable($texteon, $visible, "on-$id_objet-$id");
			$res = debut_block_depliable($visible,"on-$id_objet-$id") . $masque . fin_block();
		}
	} else {
		list($img, $clic) = decrire_logo($id_objet,'on',$id, 170, 170, $logo, $texteon, $script, $flag_modif AND !$logo_s);

		$bouton = bouton_block_depliable($texteon, $visible, "on-$id_objet-$id");

		$survol = '';
		$texteoff = _T('logo_survol');
		if (!$logo = $logo_s) {
			if ($flag_modif AND $GLOBALS['meta']['activer_logos_survol'] == 'oui') {
				$masque = "<br />".indiquer_logo($texteoff, $id_objet, 'off', $id, $script, $iframe);
				$survol .= "<br />".block_parfois_visible("off-$id_objet-$id", $texteoff, $masque, null, $visible);
			}
			$masque = debut_block_depliable($visible,"on-$id_objet-$id") 
				. "<div class='cadre_padding'>"
				. $clic . $survol . "</div>" . fin_block();
		} else {
			list($imgoff, $clicoff) = decrire_logo($id_objet, 'off', $id, 170, 170, $logo, $texteoff, $script, $flag_modif);
			$masque = debut_block_depliable($visible, "off-$id_objet-$id") .  $clicoff . fin_block();
			$survol .= "<br />".bouton_block_depliable($texteoff, $visible, "off-$id_objet-$id")
			. "<div class='cadre_padding'>".$imgoff.$masque."</div>";
			$masque = debut_block_depliable($visible,"on-$id_objet-$id") . $clic . fin_block() . $survol;
		}

		$res = "$img$masque";
	}

	if ($res) {
		$res = debut_cadre('r', 'image-24.gif', '', $bouton, '', '', false)
			. $res
			. fin_cadre_relief(true);

		if(_request("exec")!="iconifier") {
		  $js = http_script('',  'async_upload.js')
		    . http_script('$("form.form_upload_icon").async_upload(async_upload_icon)');

		} else $js = "";
		return ajax_action_greffe("iconifier", $id, $res).$js;
	}
	else return '';

}
开发者ID:rhertzog,项目名称:lcs,代码行数:60,代码来源:iconifier.php


示例3: exec_articles_tous_args

function exec_articles_tous_args($id_rubrique, $aff_art, $sel_lang)
{
	global $browser_layer,$spip_lang_right,$spip_lang_left;

	changer_typo(); // pour definir la direction de la langue
	if (!is_array($aff_art)) $aff_art = array('prop','publie');
	$enfant = arbo_articles_tous();

	$flag_trad = (($GLOBALS['meta']['multi_rubriques'] == 'oui' 
		OR $GLOBALS['meta']['multi_articles'] == 'oui') 
		AND $GLOBALS['meta']['gerer_trad'] == 'oui');

	list($article,$text_article,$aff_statut) = texte_articles_tous($sel_lang, $flag_trad, $aff_art, lang_dir());
	if (_AJAX AND $id_rubrique) {
		include_spip('inc/actions');
		ajax_retour(afficher_contenu_rubrique($article, $enfant, $text_article, $id_rubrique, $flag_trad, 2));
	}
	else {

		pipeline('exec_init',array('args'=>array('exec'=>'articles_tous'),'data'=>''));
		$commencer_page = charger_fonction('commencer_page', 'inc');
		echo $commencer_page(_T('titre_page_articles_tous'), "accueil", "tout-site");

		echo http_script('var img_deplierhaut = "'. chemin_image('noeud_plus.gif') .'";
var img_deplierbas = "'. chemin_image('noeud_moins.gif') . '";');

		echo http_script('', 'jquery-ui-1.8-drag-drop.min.js');
		echo http_script('', 'articles_tous_edite.js');
		echo http_script('', 'pause.js');
	
		echo debut_gauche('', true);
		echo formulaire_affiche_tous($aff_art, $aff_statut, $sel_lang);

		echo pipeline('affiche_gauche',array('args'=>array('exec'=>'articles_tous'),'data'=>''));
		echo creer_colonne_droite('', true);
		echo pipeline('affiche_droite',array('args'=>array('exec'=>'articles_tous'),'data'=>''));
		echo debut_droite('', true);

		if ($enfant AND $browser_layer)
		  echo couche_formulaire_tous();

		$out = "<textarea cols='1' rows='1' id='deplacements' style='display:none;' name='deplacements'></textarea>"
		  . "\n<div id='apply' style='display:none;text-align:$spip_lang_right'><input type='submit' value='"._T('bouton_changer')."' /></div>";

		echo "\n<div id='cancel' class='verdana2' style='display:none;text-align:$spip_lang_left;float:$spip_lang_left'>",
		  "<a href='javascript:annuler_deplacement();'>",
		  _T('bouton_annuler'),
		  "</a></div>",
		  redirige_action_post("reorganiser","",'articles_tous', '', $out),
		  "<ul id='articles_tous'><li id='rubrique-0' class='treeItem racine verdana2'>",
		  "<span class='holder icone'>&nbsp;</span>",
		  _T('info_racine_site'),
		  "\n<ul class=''>\n",
		  afficher_contenu_rubrique($article, $enfant, $text_article, 0, $flag_trad, 2),
		  "</ul></li></ul>\n",
		  fin_gauche(), fin_page();
	}
}
开发者ID:rhertzog,项目名称:lcs,代码行数:58,代码来源:articles_tous.php


示例4: base_restaurer_dist

function base_restaurer_dist($titre = '', $reprise = false)
{
    $status_file = _DUMP_STATUS_FILE;
    $status_file = _DIR_TMP . basename($status_file) . ".txt";
    if (!lire_fichier($status_file, $status) or !($status = unserialize($status))) {
    } else {
        $redirect = parametre_url(generer_action_auteur('restaurer', _DUMP_STATUS_FILE), "step", intval(_request('step') + 1), '&');
        $timeout = ini_get('max_execution_time');
        // valeur conservatrice si on a pas reussi a lire le max_execution_time
        if (!$timeout) {
            $timeout = 30;
        }
        // parions sur une valeur tellement courante ...
        $max_time = time() + $timeout / 2;
        include_spip('inc/minipres');
        @ini_set("zlib.output_compression", "0");
        // pour permettre l'affichage au fur et a mesure
        $titre = _T('dump:restauration_en_cours') . " (" . count($status['tables']) . ") ";
        $balise_img = chercher_filtre('balise_img');
        $titre .= $balise_img(chemin_image('searching.gif'));
        echo install_debut_html($titre);
        // script de rechargement auto sur timeout
        echo http_script("window.setTimeout('location.href=\"" . $redirect . "\";'," . $timeout * 1000 . ")");
        echo "<div style='text-align: left'>\n";
        dump_serveur($status['connect']);
        spip_connect('dump');
        // au premier coup on ne fait rien sauf afficher l'ecran de sauvegarde
        if (_request('step')) {
            $options = array('callback_progression' => 'dump_afficher_progres', 'max_time' => $max_time, 'no_erase_dest' => lister_tables_noerase(), 'where' => $status['where'] ? $status['where'] : array(), 'desc_tables_dest' => array());
            if ($desc = sql_getfetsel('valeur', 'spip_meta', "nom='dump_structure_temp'", '', '', '', '', 'dump') and $desc = unserialize($desc)) {
                $options['desc_tables_dest'] = $desc;
            }
            #var_dump(sql_allfetsel('nom,valeur','spip_meta',"",'','','','','dump'));
            #die();
            $res = base_copier_tables($status_file, $status['tables'], 'dump', '', $options);
        } else {
            // mais on en profite pour reparer les version base pour etre sur de ne pas les perdre
            sql_updateq("spip_meta", array('impt' => 'oui'), "nom='version_installee'", '', 'dump');
            sql_updateq("spip_meta", array('impt' => 'oui'), "nom LIKE '%_base_version'", '', 'dump');
        }
        echo "</div>\n";
        if (!$res) {
            echo dump_relance($redirect);
        }
        echo install_fin_html();
        ob_end_flush();
        flush();
        if (!$res) {
            exit;
        }
        // quand on sort de $export avec true c'est qu'on a fini
        dump_end(_DUMP_STATUS_FILE, 'restaurer');
        include_spip('inc/headers');
        echo redirige_formulaire(generer_url_ecrire("restaurer", 'status=' . _DUMP_STATUS_FILE, '', true, true));
    }
}
开发者ID:genma,项目名称:spip_ynh,代码行数:56,代码来源:restaurer.php


示例5: bouton_block_depliable

function bouton_block_depliable($texte, $deplie, $ids = "")
{
    $bouton_id = 'b' . substr(md5($texte . microtime()), 0, 8);
    $class = $deplie === true ? " deplie" : ($deplie == -1 ? " impliable" : " replie");
    if (strlen($ids)) {
        $cible = explode(',', $ids);
        $cible = '#' . implode(",#", $cible);
    } else {
        $cible = "#{$bouton_id} + div.bloc_depliable";
    }
    $b = strpos($texte, "<h") === false ? 'h3' : 'div';
    return "<{$b} " . ($bouton_id ? "id='{$bouton_id}' " : "") . "class='titrem{$class}'" . ($deplie === -1 ? "" : " onmouseover=\"jQuery(this).depliant('{$cible}');\"") . ">" . "<a href='#' onclick=\"return jQuery(this).depliant_clicancre('{$cible}');\" class='titremancre'></a>" . "{$texte}</{$b}>" . http_script($deplie === 'incertain' ? "jQuery(document).ready(function(){if (jQuery('{$cible}').is(':visible')) \$('#{$bouton_id}').addClass('deplie').removeClass('replie');});" : '');
}
开发者ID:genma,项目名称:spip_ynh,代码行数:13,代码来源:layer.php


示例6: 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


示例7: inc_documenter_objet_dist

function inc_documenter_objet_dist($id, $type = "article", $script, $flag_editable=true) {
	global $spip_lang_left;

	// Joindre ?
	if  ($GLOBALS['meta']["documents_$type"]=='non'
	OR !autoriser('joindredocument', $type, $id)
	OR !$flag_editable)
		$res = '';
	else {
		$joindre = charger_fonction('joindre', 'inc');
		$res = $joindre(array(
			'cadre' => 'relief',
			'icone' => 'image-24.gif',
			'fonction' => 'creer.gif',
			'titre' => _T('titre_joindre_document'),
			'script' => $script,
			'args' => "id_$type=$id",
			'id' => $id,
			'intitule' => _T('info_telecharger_ordinateur'),
			'mode' => 'document',
			'type' => $type,
			'ancre' => '',
			'id_document' => 0,
			'iframe_script' => generer_url_ecrire("documenter","id_$type=$id&type=$type",true)
		));

	// eviter le formulaire upload qui se promene sur la page
	// a cause des position:relative incompris de MSIE

	  if ($GLOBALS['browser_name']!="MSIE") {
		$res = "\n<table width='100%' cellpadding='0' cellspacing='0' border='0'>\n<tr><td>&nbsp;</td><td style='text-align: $spip_lang_left;width: 50%;'>\n$res</td></tr></table>";
	  }

	  $res .= http_script('',"async_upload.js")
	 . http_script('$("form.form_upload").async_upload(async_upload_portfolio_documents);');

	}

	$documenter = charger_fonction('documenter', 'inc');

	return "<div id='portfolio'>".$documenter($id, $type, 'portfolio', $flag_editable)."</div><br />"
	."<div id='documents'>". $documenter($id, $type, 'documents', $flag_editable)."</div>"
	. $res;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:44,代码来源:documenter_objet.php


示例8: inc_sauvegarder_dist

function inc_sauvegarder_dist($status_file, $redirect = '')
{
    $status_file = _DIR_TMP . basename($status_file) . ".txt";
    if (!lire_fichier($status_file, $status) or !($status = unserialize($status))) {
    } else {
        $timeout = ini_get('max_execution_time');
        // valeur conservatrice si on a pas reussi a lire le max_execution_time
        if (!$timeout) {
            $timeout = 30;
        }
        // parions sur une valeur tellement courante ...
        $max_time = time() + $timeout / 2;
        include_spip('inc/minipres');
        @ini_set("zlib.output_compression", "0");
        // pour permettre l'affichage au fur et a mesure
        $titre = _T('dump:sauvegarde_en_cours') . " (" . count($status['tables']) . ") ";
        $balise_img = chercher_filtre('balise_img');
        $titre .= $balise_img(chemin_image('searching.gif'));
        echo install_debut_html($titre);
        // script de rechargement auto sur timeout
        echo http_script("window.setTimeout('location.href=\"" . $redirect . "\";'," . $timeout * 1000 . ")");
        echo "<div style='text-align: left'>\n";
        dump_serveur($status['connect']);
        spip_connect('dump');
        // au premier coup on ne fait rien sauf afficher l'ecran de sauvegarde
        $res = false;
        if (_request('step')) {
            $options = array('callback_progression' => 'dump_afficher_progres', 'max_time' => $max_time, 'no_erase_dest' => lister_tables_noerase(), 'where' => $status['where'] ? $status['where'] : array());
            $res = base_copier_tables($status_file, $status['tables'], '', 'dump', $options);
        }
        echo "</div>\n";
        if (!$res and $redirect) {
            echo dump_relance($redirect);
        }
        echo install_fin_html();
        ob_end_flush();
        flush();
        return $res;
    }
}
开发者ID:genma,项目名称:spip_ynh,代码行数:40,代码来源:sauvegarder.php


示例9: help_frame_menu

function help_frame_menu($titre, $contenu, $lang)
{
	global $spip_lang_rtl;

	return "<head>\n<title>" .$titre ."</title>\n" .
	 '<link rel="stylesheet" type="text/css" href="' .
	 generer_url_public('aide_menu', "ltr=". $GLOBALS['spip_lang_left']) .
	  "\"/>\n" .
		http_script('', 'jquery.js') .
		"\n" .
		$GLOBALS['browser_layer'] .
		http_script('var curr_article;
function activer_article(id) {
	if (curr_article)
		jQuery("#"+curr_article).removeClass("article-actif").addClass("article-inactif");
	if (id) {
		jQuery("#"+id).removeClass("article-inactif").addClass("article-actif");
		curr_article = id;
	}
}
') . '
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#E86519" vlink="#6E003A" alink="#FF9900" topmargin="5" leftmargin="5" marginwidth="5" marginheight="5"' .
		  ($spip_lang_rtl ? " dir='rtl'" : '') .
		  " lang='$lang'" . '>' .
		    $contenu .
		    '</body>';
}
开发者ID:rhertzog,项目名称:lcs,代码行数:28,代码来源:aide_index.php


示例10: export_trace

function export_trace($val_meta, $dir, $meta)
{
	list($gz, $archive, $rub, $tables_for_dump, $etape_actuelle, $sous_etape, $serveur, $save) = $val_meta;
	include_spip('inc/minipres');
	// pour permettre l'affichage au fur et a mesure
	@ini_set("zlib.output_compression","0");

	if (!($timeout = ini_get('max_execution_time')*1000));
	$timeout = 30000; // parions sur une valeur tellement courante ...
	// le premier hit est moitie moins long car seulement une phase d'ecriture de morceaux
	// sans ramassage
	// sinon grosse ecriture au 1er hit, puis gros rammassage au deuxieme avec petite ecriture,... ca oscille
	if (!$etape_actuelle AND !$sous_etape) {
		$timeout = round($timeout/2);
		$tables_sauvegardees = array();
	} else {
		$metatable = $meta . '_tables';
		$tables_sauvegardees = isset($GLOBALS['meta'][$metatable])?unserialize($GLOBALS['meta'][$metatable]):array();
	}

	// Les sauvegardes partielles prennent le temps d'indiquer les logos
	// Instancier une fois pour toutes, car on va boucler un max.
	// On complete jusqu'au secteur pour resituer dans l'arborescence)
	if ($rub) {
		$GLOBALS['chercher_logo'] = charger_fonction('chercher_logo', 'inc',true);
		$les_rubriques = complete_fils(array($rub), $serveur);
		$les_meres  = complete_secteurs(array($rub), $serveur);
	} else {
		$GLOBALS['chercher_logo'] = false;
		$les_rubriques = $les_meres = '';
	}

	// script de rechargement auto sur timeout
	$redirect = generer_url_ecrire("export_all");
	$all = count($tables_for_dump);
	echo ( install_debut_html(_T('info_sauvegarde') . " ($all)"));
	echo http_script("window.setTimeout('location.href=\"".$redirect."\";',$timeout)");

	echo "<div style='text-align: left'>\n";
	$etape = 1;
	foreach($tables_for_dump as $table){
		if ($etape_actuelle > $etape) {
			 // sauter les deja faits, mais rappeler qu'ils sont fait
			echo ( "\n<br /><strong>".$etape. '. '."</strong>". $tables_sauvegardees[$table]);
		}
		else {
			echo ( "\n<br /><strong>".$etape. '. '. $table."</strong> ");
			$r = sql_countsel($table, array(), array(), array(), $serveur);
			flush();
			if (!$r) $r = ( _T('texte_vide'));
			else {
			    $f = $dir . $archive . '.part_' . sprintf('%03d',$etape);
			    $r = export_objets($table, $sous_etape, $r, $f, $les_rubriques, $les_meres, $meta);
			    $r += $sous_etape*_EXPORT_TRANCHES_LIMITE;
			    // info pas fiable si interruption+partiel
			    if ($rub AND $etape_actuelle > 1) $r = ">= $r";
			}
			echo " $r";
			flush();
			$sous_etape = 0;
			// on utilise l'index comme ca c'est pas grave si on ecrit plusieurs fois la meme
			$tables_sauvegardees[$table] = "$table ($r)";
			ecrire_meta($meta . '_tables', serialize($tables_sauvegardees),'non');
		}
		$etape++;
		$v = serialize(array($gz, $archive, $rub, $tables_for_dump, $etape,$sous_etape, $serveur, $save));
		ecrire_meta($meta, $v,'non');
	}
	echo ( "</div>\n");
	// si Javascript est dispo, anticiper le Time-out
	echo  ("<script language=\"JavaScript\" type=\"text/javascript\">window.setTimeout('location.href=\"$redirect\";',0);</script>\n");
	echo (install_fin_html());
	flush();
}
开发者ID:rhertzog,项目名称:lcs,代码行数:74,代码来源:export.php


示例11: valider_xml_ok

/**
 * Vérifie le formatage d'un xml
 *
 * @see valider_resultats()
 * @see valider_dir()
 * @see valider_pseudo_url()
 *
 * @param string $url
 * @param string $req_ext
 * @param int $limit
 * @param array|bool $rec
 *
 **/
function valider_xml_ok($url, $req_ext, $limit, $rec)
{
    $url = urldecode($url);
    $rec = !$rec ? false : array();
    if (!$limit) {
        $limit = 200;
    }
    $titre = _T('analyse_xml');
    if (!$url) {
        $url_aff = 'http://';
        $onfocus = "this.value='';";
        $texte = $bandeau = $err = '';
    } else {
        include_spip('inc/distant');
        if (is_dir($url)) {
            $dir = substr($url, -1, 1) === '/' ? $url : "{$url}/";
            $ext = !preg_match('/^[.*\\w]+$/', $req_ext) ? 'php' : $req_ext;
            $files = preg_files($dir, "{$ext}\$", $limit, $rec);
            if (!$files and $ext !== 'html') {
                $files = preg_files($dir, 'html$', $limit, $rec);
                if ($files) {
                    $ext = 'html';
                }
            }
            if ($files) {
                $res = valider_dir($files, $ext, $url);
                list($err, $res) = valider_resultats($res, $ext === 'html');
                $err = ' (' . $err . '/' . count($files) . ')';
            } else {
                $res = _T('texte_vide');
                $err = '';
            }
            $bandeau = $dir . '*' . $ext . $err;
        } else {
            if (preg_match('@^((?:[.]/)?[^?]*)[?]([0-9a-z_]+)=([^&]*)(.*)$@', $url, $r)) {
                list(, $server, $dir, $script, $args) = $r;
                if ((!$server or $server == './' or strpos($server, url_de_base()) === 0) and is_dir($dir)) {
                    $url = $script;
                    // Pour quand le validateur saura simuler
                    // une query-string...
                    // $args = preg_split('/&(amp;)?[a-z0-9_]+=/', $args);
                    $args = true;
                }
            } else {
                $dir = 'exec';
                $script = $url;
                $args = true;
            }
            $transformer_xml = charger_fonction('valider', 'xml');
            $onfocus = "this.value='" . addslashes($url) . "';";
            if (preg_match(',^[a-z][0-9a-z_]*$,i', $url)) {
                $res = $transformer_xml(charger_fonction($url, $dir), $args);
                $url_aff = valider_pseudo_url($dir, $script);
            } else {
                $res = $transformer_xml(recuperer_page($url));
                $url_aff = entites_html($url);
            }
            list($texte, $err) = emboite_texte($res);
            if (!$err) {
                $err = '<h3>' . _T('spip_conforme_dtd') . '</h3>';
            }
            $res = "<div style='text-align: center'>" . $err . "</div>" . "<div style='margin: 10px; text-align: left'>" . $texte . '</div>';
            $bandeau = "<a href='{$url_aff}'>{$url}</a>";
        }
    }
    $commencer_page = charger_fonction('commencer_page', 'inc');
    $debut = $commencer_page($titre);
    $jq = http_script("", 'jquery.js');
    echo str_replace('<head>', "<head>{$jq}", $debut);
    $onfocus = '<input type="text" size="70" value="' . $url_aff . '" name="var_url" id="var_url" onfocus="' . $onfocus . '" />';
    $onfocus = generer_form_ecrire('valider_xml', $onfocus, " method='get'");
    echo "<h1>", $titre, '<br>', $bandeau, '</h1>', "<div style='text-align: center'>", $onfocus, "</div>", $res, fin_page();
}
开发者ID:spip,项目名称:SPIP,代码行数:86,代码来源:valider_xml.php


示例12: maj_debut_page

/**
 * Initialiser la page pour l'affichage des progres de l'upgrade
 * uniquement si la page n'a pas deja ete initilalisee
 * 
 * @param string $installee
 * @param string $meta
 * @param string $table
 * @return
 */
function maj_debut_page($installee, $meta, $table)
{
    static $done = false;
    if ($done) {
        return;
    }
    include_spip('inc/minipres');
    @ini_set("zlib.output_compression", "0");
    // pour permettre l'affichage au fur et a mesure
    $timeout = _UPGRADE_TIME_OUT * 2;
    $titre = _T('titre_page_upgrade');
    $balise_img = charger_filtre('balise_img');
    $titre .= $balise_img(chemin_image('searching.gif'));
    echo install_debut_html($titre);
    // script de rechargement auto sur timeout
    $redirect = generer_url_ecrire('upgrade', "reinstall={$installee}&meta={$meta}&table={$table}", true);
    echo http_script("window.setTimeout('location.href=\"" . $redirect . "\";'," . $timeout * 1000 . ")");
    echo "<div style='text-align: left'>\n";
    ob_flush();
    flush();
    $done = true;
}
开发者ID:genma,项目名称:spip_ynh,代码行数:31,代码来源:upgrade.php


示例13: rejouer_session

function rejouer_session()
{
	include_spip('inc/filtres');
	return	  http_img_pack('rien.gif', " ", "id='img_session' width='0' height='0'") .
		  http_script("\ndocument.img_session.src='" . generer_url_action('cookie','change_session=oui', true) .  "'");
}
开发者ID:rhertzog,项目名称:lcs,代码行数:6,代码来源:session.php


示例14: install_connexion_form

function install_connexion_form($db, $login, $pass, $predef, $hidden, $etape)
{
	$server_db = (is_string($predef[0])) ? $predef[0] : '';

	return generer_form_ecrire('install', (
	  "\n<input type='hidden' name='etape' value='$etape' />"
	. $hidden
	. (_request('echec')?
			("<p><b>"._T('avis_connexion_echec_1').
			"</b></p><p>"._T('avis_connexion_echec_2')."</p><p style='font-size: small;'>"._T('avis_connexion_echec_3')."</p>")
			:"")

	. http_script('',  'jquery.js')
	. http_script('
		$(document).ready(function() {
			$("input[type=hidden][name=server_db]").each(function(){
				if ($(this).attr("value").match("sqlite*")){
					$("#install_adresse_base_hebergeur").hide();
					$("#install_login_base_hebergeur").hide();
					$("#install_pass_base_hebergeur").hide();
				}
			});
			$("#sql_serveur_db").change(function(){
				if ($(this).find("option:selected").attr("value").match("sqlite*")){
					$("#install_adresse_base_hebergeur").hide();
					$("#install_login_base_hebergeur").hide();
					$("#install_pass_base_hebergeur").hide();
				} else {
					$("#install_adresse_base_hebergeur").show();
					$("#install_login_base_hebergeur").show();
					$("#install_pass_base_hebergeur").show();
				}
			});
		});')

	. ($server_db
		? '<input type="hidden" name="server_db" value="'.$server_db.'" />'
			. (($predef[0])
			   ?('<h3>'._T('install_serveur_hebergeur').'</h3>')
				:'')
		: ('<fieldset><legend>'
		   ._T('install_select_type_db')
		. "</legend>"
			.'<label for="sql_serveur_db">'
			. _T('install_types_db_connus')
			// Passer l'avertissement SQLIte en  commentaire, on pourra facilement le supprimer par la suite sans changer les traductions.
			. "<br /><small>(". _T('install_types_db_connus_avertissement') .')</small>'
			.'</label>'
		. "\n<div style='text-align: center;'><select name='server_db' id='sql_serveur_db' >\n"
		.   join("\n", install_select_serveur())
		. "\n</select></div></fieldset>")
	)
	. '<div id="install_adresse_base_hebergeur">'
	. ($predef[1]
	? '<h3>'._T('install_adresse_base_hebergeur').'</h3>'
	: fieldset(_T('entree_base_donnee_1'),
		array(
			'adresse_db' => array(
				'label' => $db[1],
				'valeur' => $db[0]
			),
		)
	)
	)
	. '</div>'

	. '<div id="install_login_base_hebergeur">'
	. ($predef[2]
	? '<h3>'._T('install_login_base_hebergeur').'</h3>'
	: fieldset(_T('entree_login_connexion_1'),
		array(
			'login_db' => array(
					'label' => $login[1],
					'valeur' => $login[0]
			),
		)
	)
	)
	. '</div>'

	. '<div id="install_pass_base_hebergeur">'
	. ($predef[3]
	? '<h3>'._T('install_pass_base_hebergeur').'</h3>'
	: fieldset(_T('entree_mot_passe_1'),
		array(
			'pass_db' => array(
				'label' => $pass[1],
				'valeur' => $pass[0]
			),
		)
	)
	)
	. '</div>'

	. bouton_suivant()));

}
开发者ID:rhertzog,项目名称:lcs,代码行数:97,代码来源:install.php


示例15: maj_auto_action_rapide

function maj_auto_action_rapide() {
	global $spip_version_affichee, $spip_version_base;
	$arg_chargeur = $spip_version_base>=15828?'url_zip_plugin2':'url_zip_plugin'; // eq. SPIP >= 2.1.2
	$time = time();
	$timeout = ini_get('max_execution_time');
	$timeout = $timeout?min(30,floor($timeout/2)):10;
	$style = 'style="padding:0.4em;"';
	// verification des mises a jour de SPIP>=2.1
	include_spip('inc/presentation');
	list($m1,$m2) = preg_split('/\D+/', $GLOBALS['spip_version_branche']);
	$html1 = (function_exists('info_maj_spip') && ($html1=info_maj_spip()))
		?"<fieldset><legend $style>"._T('couteauprive:help2', array('version'=>'SPIP '.$spip_version_affichee)).'</legend>'.propre("\n|{{{$html1}}}|")
			.(preg_match(",$m1\.$m2\.\d+,",$html1)?'<p>'._T('couteau:maj_spip').'</p>':'').'</fieldset>'
		:'';
	// verification de l'ecran de securite
	if(defined('_ECRAN_SECURITE')) {
		$maj = maj_auto_rev_distante(_MAJ_ECRAN_SECU,false,",(\d+\.\d+(\.\d+)?),",0,true);
		if($maj{0}!="-" && _ECRAN_SECURITE!=$maj) {
			include_spip('inc/description_outil');
			$html1 .= "\n<fieldset><legend $style>"._T('couteauprive:help2', array('version'=>_T('couteauprive:ecran_securite:nom').' '._ECRAN_SECURITE)).'</legend>'
				. description_outil_liens(_T("couteauprive:ecran_maj_ko2", array("n"=>"<span style=\"color:red; font-weight:bold;\">$maj</span>"))).'</fieldset>';
		}
	}
	// verification des plugins
	include_spip('inc/plugin');
	$plugins_actifs = array_values(liste_chemin_plugin_actifs());
	// tous, mais les actifs d'abord...
	$plugins = array_unique(array_merge($plugins_actifs, liste_plugin_files()));
	$html_actifs = $html_inactifs = array();
	foreach ($plugins as $p) /*if(preg_match(',^auto/,', $p))*/ {
		$actif = in_array($p, $plugins_actifs, true);
		$auto = preg_match(',^auto/,', $p);
		$infos = plugin_get_infos_maj($p, $stop=time()-$time>$timeout);
		$maj_lib = $checked = '';
		if($stop)
			$maj_lib = '<span class="cs_relancer">'.'Temps serveur &eacute;coul&eacute; : [poursuivre->#].'.'</span>';
		elseif($infos['maj_dispo']) { 
			$maj_lib = _T('couteau:maj_rev_ok', 
				array('revision' => $infos['rev_rss'], 'url'=>$infos['url_origine'], 'zip'=>$infos['zip_trac']));
			$checked = " class='maj_checked'"; }
		elseif($infos['rev_rss']>0 && $infos['rev_local'])
			$maj_lib = _T('couteau:maj'.($infos['svn']?'_svn':'_ok'),
				array('zip'=>$infos['zip_trac'], 'url'=>$infos['url_origine']));
		elseif($auto) {
			$maj_lib = _T('couteau:maj_rev_ko', array('url'=>$infos['url_origine']));
			$checked = " class='maj_checked'"; }
		elseif($infos['rev_local'] && $infos['rev_rss']<=0)
			$maj_lib = _T('couteau:maj_rev_ko', array('url'=>$infos['url_origine']));
		// eventuels liens morts
		$maj_lib = preg_replace(',\[([^[]+)->\],', '$1', $maj_lib);
		$nom = preg_replace(",[\n\r]+,",' ',$infos['nom']). '&nbsp;(v' .$infos['version'] . ')' . ($maj_lib?"\n_ {{".$maj_lib.'}}':'');
		$rev = $infos['rev_local']?_T('couteau:maj_rev', array('revision' => $infos['rev_local'])):'';
		if(strlen($infos['commit'])) $rev .= (strlen($rev)?'<br/>':'') . cs_date_court($infos['commit']);
		if($infos['svn']) $rev .= '<br/>SVN';		
		if(!strlen($rev)) $rev = '&nbsp;';
		$zip_log = (strlen($infos['zip_log']) && $infos['zip_log']!=$infos['zip_trac'])
			?"<label><input type='radio' value='$infos[zip_log]'$checked name='$arg_chargeur'/>[->$infos[zip_log]]</label>":'';
		$bouton = '&nbsp;';
		if($auto && !$stop) $bouton = strlen($infos['zip_trac'])
			?"<input type='radio' value='$infos[zip_trac]'$checked name='$arg_chargeur'/>"
			:'<center style="margin-top:0.6em;font-weight:bold;"><acronym title="'._T('couteau:maj_zip_ko').'">&#63;</acronym></center>';
		if(strlen($zip_log)) {
			if (!$stop)
				$nom .= "\n_ "._T('couteau:maj_verif') . "\n_ $zip_log\n_ {$bouton}[->$infos[zip_trac]]<label>";
			$bouton = '&nbsp;';
		}
		${$actif?'html_actifs':'html_inactifs'}[] = "|$bouton|$nom|$rev|";
	}
	
	$html1 = "\n<div $style id='maj_auto_div'>$html1<fieldset><legend $style>"
		. _T('couteau:maj_liste').'</legend>'
		. propre(
			(count($html_actifs)? "\n|{{" . _T('couteau:plug_actifs') . "}}|<|<|\n" . join("\n",$html_actifs) . "\n" : '')
			. (count($html_inactifs)? "\n|{{" . _T('couteau:plug_inactifs') . "}}|<|<|\n" . join("\n",$html_inactifs) . "\n" : '')
		  )
		. "<div style='text-align: right;'><input class='fondo' type='submit' value=\""
		. attribut_html(_T('couteau:maj_maj'))
		. '" /><p><i>'._T('couteau:maj_verif2').'</i></p></div></fieldset></div>'
		. http_script("
jQuery(document).ready(function() {
	var ch = jQuery('#maj_auto_div .maj_checked');
	var re = jQuery('.cs_relancer a');
	if(ch.length) ch[0].checked = true;
	else if(!re.length){
		jQuery('#maj_auto_div :submit').parent().remove();
		jQuery('#maj_auto_div :radio').attr('disabled','disabled');
	}
	if(!jQuery('#maj_auto_div :radio:checked').length)
		jQuery('#maj_auto_div :radio:first')[0].checked = true;
	re.click(function() {
		cs_href_click(jQuery('#maj_auto')[0], true);
		return false;
	});
});");
	$html2 = "\n<div class='cs_sobre'><input class='cs_sobre' type='submit' value=\"["
		. attribut_html(_T('couteau:maj_actu'))	. ']" /></div>';

// premier formulaire non ajax, lancant directement charger_plugin
	return redirige_action_post('charger_plugin', '', 'admin_couteau_suisse', "cmd=descrip&outil=maj_auto#cs_infos", $html1)
// second formulaire ajax : lien d'actualisation forcee
//.........这里部分代码省略.........
开发者ID:rhertzog,项目名称:lcs,代码行数:101,代码来源:maj_auto_action_rapide.php


示例16: exec_brouteur_frame_dist

function exec_brouteur_frame_dist() {
	global $connect_id_auteur, $spip_ecran, $spip_lang_left;

	$id_rubrique = is_numeric(_request('rubrique')) ? intval(_request('rubrique')) : "";
	$frame = _request('frame');
	$effacer_suivant = _request('effacer_suivant');
	$special = _request('special');
	$peutpub = autoriser('publierdans','rubrique');

	include_spip('inc/headers');
	http_no_cache();

	$profile = _request('var_profile') ? "&var_profile=1" : '';

	echo _DOCTYPE_ECRIRE
	. html_lang_attributes()
	. pipeline('header_prive',
		"<head>\n"
		.  "<title>brouteur_frame</title>\n"
		. "<meta http-equiv='Content-Type' content='text/html"
		. (($c = $GLOBALS['meta']['charset']) ? "; charset=$c" : '')
		. "' />\n"
		. envoi_link(_T('info_mon_site_spip'))	
		. http_script('jQuery(function(){
	jQuery("a.iframe").click(function(){
		window.open(this.href,"iframe"+this.rel);
		return false;
	});
});')
		. "</head>\n")
	."<body>";

	if ($spip_ecran == "large") {
		$nb_col = 4;
	} else {
		$nb_col = 3;
	}

	if ($effacer_suivant == "oui" && $frame < $nb_col) {
		$res = '';
		for ($i = $frame+1; $i < $nb_col; $i++) {
			$res .= "\nparent.iframe$i.location.href='" . generer_url_ecrire('brouteur_frame',"frame=$i$profile") . "'";
		}
		echo http_script($res);
	}
	echo "\n<div class='arial2'>";

	if ($special == "redac") {
		$result=sql_select("articles.id_article, articles.id_rubrique, articles.titre, articles.statut", "spip_articles AS articles LEFT JOIN spip_auteurs_articles AS lien ON articles.id_article=lien.id_article", "articles.statut = 'prepa' AND lien.id_auteur = $connect_id_auteur ", " id_article ", " articles.date DESC");
		$res = '';
		while($row=sql_fetch($result)){
			$id_article=$row['id_article'];
			if (autoriser('voir','article',$id_article)){
				$titre = typo($row['titre']);
				$statut = $row['statut'];
				$h = generer_url_ecrire('articles',"id_article=$id_article");
				$res .= "<a class='$statut'\nhref='javascript:window.parent.location=\"$h\"'>$titre</a>";
				}
			}
		if ($res) {
			echo "\n<div style='padding-top: 6px; padding-bottom: 3px;'><b class='verdana2'>"._T("info_cours_edition")."</b></div>";
			echo "\n<div class='plan-articles'>", $res, "</div>";
		}
	
	} else if ($special == "valider") {
		$result=sql_select("id_article, id_rubrique, titre, statut", "spip_articles", "statut = 'prop'", "", "date DESC");
		$res = '';
		while($row=sql_fetch($result)){
			$id_article=$row['id_article'];
			if (autoriser('voir','article',$id_article)){
				$titre = typo($row['titre']);
				$statut = $row['statut'];
				$h = generer_url_ecrire('articles',"id_article=$id_article");
				$res .= "<a class='$statut' href='javascript:window.parent.location=\"$h\"'>$titre</a>";
				}
		}

		if ($res) {
			echo "\n<div style='padding-top: 6px; padding-bottom: 3px;'><b class='verdana2'>"._T("info_articles_proposes")."</b></div>";
			echo "\n<div class='plan-articles'>", $res, "</div>";
		}
	
		$result=sql_select("*", "spip_breves", "statut = 'prop'", "", "date_heure DESC", "20");
		$res = '';
		while($row=sql_fetch($result)){
			$id_breve=$row['id_breve'];
			if (autoriser('voir','breve',$id_breve)){
				$titre = typo($row['titre']);
				$statut = $row['statut'];
				$h = generer_url_ecrire('breves_voir',"id_breve=$id_breve");
				$res .= "<a class='$statut' href='javascript:window.parent.location=\"$h\"'>$titre</a>";
				}
		}
		if ($res) {
			echo "\n<div style='padding-top: 6px;'><b class='verdana2'>"._T("info_breves_valider")."</b></div>";
			echo "\n<div class='plan-articles'>", $res, "</div>";
		}

	}
	else {
//.........这里部分代码省略.........
开发者ID:rhertzog,项目名称:lcs,代码行数:101,代码来源:brouteur_frame.php


示例17: exec_admin_plugin_dist


//.........这里部分代码省略.........
	if (!is_array($plugins_interessants))
		$plugins_interessants = array();

	echo "<div class='liste-plugins formulaire_spip'>";

	echo debut_cadre_trait_couleur('plugin-24.gif',true,'',_T('plugins_liste'),
	'plugins');

	if ($quoi!=='actifs'){
		if ($lpf)
			echo "<p>"._T('texte_presente_plugin')."</p>";
		else {
			if (!@is_dir(_DIR_PLUGINS))
				echo  "<p>"._T('plugin_info_automatique_ftp',array('rep'=>joli_repertoire(_DIR_PLUGINS)))
							. " &mdash; "._T('plugin_info_automatique_creer')."</p>";
		}
	}

	if ($quoi=='actifs' OR $lpf)
		echo "<h3>".sinon(
						singulier_ou_pluriel(count($lcpa), 'plugins_actif_un', 'plugins_actifs', 'count'),
						_T('plugins_actif_aucun')
						)."</h3>";

	$sub = "\n<div class='boutons'>"
	.  "<input type='submit' class='submit save' value='"._T('bouton_enregistrer')
	."' />"
	. "</div>";

	$no_button = false;

	// la liste
	if ($quoi=='actifs'){
		$aff = affiche_les_plugins($lcpa, $lcpa, $format);
		$no_button = !strlen($aff);
		$corps = $aff;
	}
	elsei 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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