本文整理汇总了PHP中http_img_pack函数的典型用法代码示例。如果您正苦于以下问题:PHP http_img_pack函数的具体用法?PHP http_img_pack怎么用?PHP http_img_pack使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了http_img_pack函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: plugins_afficher_plugin_dist
function plugins_afficher_plugin_dist($url_page, $plug_file, $checked, $actif, $expose = false, $class_li = "item", $dir_plugins = _DIR_PLUGINS)
{
static $id_input = 0;
static $versions = array();
$force_reload = _request('var_mode') == 'recalcul';
$get_infos = charger_fonction('get_infos', 'plugins');
$info = $get_infos($plug_file, $force_reload, $dir_plugins);
$prefix = $info['prefix'];
$cfg = "";
$checkable = $dir_plugins !== _DIR_PLUGINS_DIST;
$nom = plugin_nom($info, $dir_plugins, $plug_file);
if (!plugin_version_compatible($info['compatibilite'], $GLOBALS['spip_version_branche'], 'spip')) {
$info['slogan'] = _T('plugin_info_non_compatible_spip');
$erreur = http_img_pack("plugin-dis-32.png", _T('plugin_info_non_compatible_spip'), " class='picto_err'", _T('plugin_info_non_compatible_spip'));
$class_li .= " disabled";
$checkable = false;
} elseif (isset($info['erreur'])) {
$class_li .= " error";
$erreur = http_img_pack("plugin-err-32.png", _T('plugin_info_erreur_xml'), " class='picto_err'", _T('plugin_info_erreur_xml')) . "<div class='erreur'>" . join('<br >', $info['erreur']) . "</div>";
$checkable = false;
} elseif (isset($GLOBALS['erreurs_activation_raw'][$dir_plugins . $plug_file])) {
$class_li .= " error";
$erreur = http_img_pack("plugin-err-32.png", _T('plugin_impossible_activer', array('plugin' => $nom)), " class='picto_err'", _T('plugin_impossible_activer', array('plugin' => $nom))) . "<div class='erreur'>" . implode("<br />", $GLOBALS['erreurs_activation_raw'][$dir_plugins . $plug_file]) . "</div>";
} else {
$cfg = $actif ? plugin_bouton_config($plug_file, $info, $dir_plugins) : "";
}
// numerotons les occurrences d'un meme prefix
$versions[$prefix] = $id = isset($versions[$prefix]) ? $versions[$prefix] + 1 : '';
$class_li .= ($actif ? " actif" : "") . ($expose ? " on" : "");
return "<li id='{$prefix}{$id}' class='{$class_li}'>" . ((!$checkable and !$checked) ? '' : plugin_checkbox(++$id_input, $plug_file, $checked)) . plugin_resume($info, $dir_plugins, $plug_file, $url_page) . $cfg . $erreur . (($dir_plugins !== _DIR_PLUGINS_DIST and plugin_est_installe($plug_file)) ? plugin_desintalle($plug_file, $nom) : '') . "<div class='details'>" . (!$expose ? '' : affiche_bloc_plugin($plug_file, $info)) . "</div>" . "</li>";
}
开发者ID:nursit,项目名称:SPIP,代码行数:31,代码来源:afficher_plugin.php
示例2: puce_statut_site_dist
function puce_statut_site_dist($id, $statut, $id_rubrique, $type, $ajax = '', $menu_rapide = _ACTIVER_PUCE_RAPIDE)
{
$t = sql_getfetsel("syndication", "spip_syndic", "id_syndic=" . intval($id));
// cas particulier des sites en panne de syndic :
// on envoi une puce speciale, et pas de menu de changement rapide
if ($t == 'off' or $t == 'sus') {
switch ($statut) {
case 'publie':
$puce = 'puce-verte-anim.gif';
$title = _T('sites:info_site_reference');
break;
case 'prop':
$puce = 'puce-orange-anim.gif';
$title = _T('sites:info_site_attente');
break;
case 'refuse':
default:
$puce = 'puce-poubelle-anim.gif';
$title = _T('sites:info_site_refuse');
break;
}
return http_img_pack($puce, $title);
} else {
return puce_statut_changement_rapide($id, $statut, $id_rubrique, $type, $ajax, $menu_rapide);
}
}
开发者ID:xablen,项目名称:Semaine14_SPIP_test,代码行数:26,代码来源:site.php
示例3: en_travaux_affichage_final
function en_travaux_affichage_final($flux){
if(defined('_en_travaux_SANSMSG') || !$GLOBALS['html']) return $flux;
include_spip('inc/minipres'); // pour http_img_pack
$res = '<div id="en_travaux" style="padding:6px; position:absolute; left:12px; top:22px; border-color:#CECECE #CECECE #4A4A4A; background-color:#FFEEEE; opacity:0.8; font-size:12px; border-style:solid; border-width:3px; font-weight:bold;">'
. http_img_pack('warning-24.gif', _T('info_travaux_titre'), 'align="absmiddle"')
. ' '. _T('info_travaux_titre') . '</div>';
if (!$pos = stripos($flux, '</body>')) $pos = strlen($flux);
return substr_replace($flux, $res, $pos, 0);
}
开发者ID:rhertzog,项目名称:lcs,代码行数:9,代码来源:en_travaux_options.php
示例4: aider_icone
function aider_icone($url, $clic = '')
{
global $spip_lang, $spip_lang_rtl;
if (!$clic) {
$t = _T('titre_image_aide');
$clic = http_img_pack("aide" . aide_lang_dir($spip_lang, $spip_lang_rtl) . "-16.png", _T('info_image_aide'), " title=\"{$t}\" class='aide'");
}
return "\n <a class='aide popin'\nhref='" . $url . "' target='_blank'>" . $clic . "</a>";
}
开发者ID:genma,项目名称:spip_ynh,代码行数:9,代码来源:aider.php
示例5: agenda_affiche_milieu
/**
* Inserer les infos d'agenda sur les articles et rubriques
*
* @param array $flux
* @return array
*/
function agenda_affiche_milieu($flux)
{
$e = trouver_objet_exec($flux['args']['exec']);
$out = "";
if ($e['type'] == 'rubrique' and autoriser('configurer') and $e['edition'] == false and $id_rubrique = intval($flux['args']['id_rubrique']) and autoriser('modifier', 'rubrique', $id_rubrique)) {
$activer = true;
$res = "";
$actif = sql_getfetsel('agenda', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique));
$statut = "-32";
$alt = "";
$voir = "";
if (!sql_countsel('spip_rubriques', 'agenda=1')) {
$res .= "<span class='small'>" . _T('agenda:aucune_rubrique_mode_agenda') . "</span><br />";
} else {
include_spip('inc/rubriques');
if (sql_countsel('spip_rubriques', sql_in('id_rubrique', calcul_hierarchie_in($id_rubrique)) . " AND agenda=1 AND id_rubrique<>" . intval($id_rubrique))) {
$alt = _T('agenda:rubrique_dans_une_rubrique_mode_agenda');
$activer = false;
$statut = "-ok-32";
$voir = _T('agenda:voir_evenements_rubrique');
} elseif (!$actif) {
$alt = _T('agenda:rubrique_sans_gestion_evenement') . '<br />';
$statut = "-non-32";
}
if ($actif) {
$alt = _T('agenda:rubrique_mode_agenda') . '<br />';
$statut = "-ok-32";
$voir = _T('agenda:voir_evenements_rubrique');
}
}
if (!$actif) {
if ($activer) {
$res .= bouton_action(_T('agenda:rubrique_activer_agenda'), generer_action_auteur('activer_agenda_rubrique', $id_rubrique, self()), 'ajax');
}
} else {
$res .= bouton_action(_T('agenda:rubrique_desactiver_agenda'), generer_action_auteur('activer_agenda_rubrique', "-{$id_rubrique}", self()), 'ajax');
}
if ($voir) {
$res .= " | <a href='" . generer_url_ecrire('evenements', "id_rubrique={$id_rubrique}") . "'>{$voir}</a>";
}
if ($res) {
$out .= boite_ouvrir(_T('agenda:agenda') . http_img_pack("agenda{$statut}.png", $alt, "class='statut'", $alt), 'simple agenda-statut') . $res . boite_fermer();
}
} elseif ($e['type'] == 'article' and $e['edition'] == false) {
$id_article = $flux['args']['id_article'];
$out .= recuperer_fond('prive/objets/contenu/article-evenements', $flux['args']);
}
if ($out) {
if ($p = strpos($flux['data'], '<!--affiche_milieu-->')) {
$flux['data'] = substr_replace($flux['data'], $out, $p, 0);
} else {
$flux['data'] .= $out;
}
}
return $flux;
}
开发者ID:jazzman346,项目名称:CAC_Site,代码行数:62,代码来源:agenda_pipelines.php
示例6: construire_selectionner_hierarchie
/**
* Construit le sélectionneur de hierarchie
*
* @param string $idom
* Identifiant dans le dom de l'élément
* @param string $liste
* @param int $racine
* @param string $url
* @param string $name
* @param string $url_init
* @return string
* Code HTML
**/
function construire_selectionner_hierarchie($idom, $liste, $racine, $url, $name, $url_init = '')
{
$idom1 = $idom . "_champ_recherche";
$idom2 = $idom . "_principal";
$idom3 = $idom . "_selection";
$idom4 = $idom . "_col_1";
$idom5 = 'img_' . $idom4;
$idom6 = $idom . "_fonc";
return "<div id='{$idom}'>" . "<a id='{$idom6}' style='visibility: hidden;'" . ($url_init ? "\nhref='{$url_init}'" : '') . "></a>" . "<div class='recherche_rapide_parent'>" . http_img_pack("searching.gif", "*", "style='visibility: hidden;float:" . $GLOBALS['spip_lang_right'] . "' id='{$idom5}'") . "" . "<input style='width: 100px;float:" . $GLOBALS['spip_lang_right'] . ";' type='search' id='{$idom1}'" . "\nonkeypress=\"k=event.keyCode;if (k==13 || k==3 || k==9){return false;}\"" . "\nonkeyup=\"if(event.keyCode==9){return false;};return onkey_rechercher(this.value," . "'{$idom4}'" . ",'" . $url . "'," . "this.parentNode.previousSibling.firstChild" . ",'" . $name . "','" . $idom6 . "')\"" . " />" . "\n</div>" . ($racine ? "<div>{$racine}</div>" : "") . "<div id='" . $idom2 . "'><div id='{$idom4}'" . " class=''>" . $liste . "</div></div>\n<div id='{$idom3}'></div></div>\n";
}
开发者ID:xablen,项目名称:Semaine14_SPIP_test,代码行数:23,代码来源:selectionner.php
示例7: construire_selectionner_hierarchie
function construire_selectionner_hierarchie($idom, $liste, $racine, $url, $name, $url_init='')
{
global $spip_lang_right;
$idom1 = $idom . "_champ_recherche";
$idom2 = $idom . "_principal";
$idom3 = $idom . "_selection";
$idom4 = $idom . "_col_1";
$idom5 = 'img_' . $idom4;
$idom6 = $idom."_fonc";
return "<div id='$idom'>"
. "<a id='$idom6' style='visibility: hidden;'"
. ($url_init ? "\nhref='$url_init'" : '')
. "></a>"
. "<div class='recherche_rapide_parent'>"
. http_img_pack("searching.gif", "*", "style='visibility: hidden;float:$spip_lang_right' id='$idom5'")
. ""
. "<input style='width: 100px;float:$spip_lang_right;' type='search' id='$idom1'"
// eliminer Return car il provoque la soumission (balise unique)
// ce serait encore mieux de ne le faire que s'il y a encore plusieurs
// resultats retournes par la recherche
. "\nonkeypress=\"k=event.keyCode;if (k==13 || k==3){return false;}\""
// lancer la recherche apres le filtrage ci-dessus
. "\nonkeyup=\"return onkey_rechercher(this.value,"
// la destination de la recherche
. "'$idom4'"
# . "this.parentNode.parentNode.parentNode.parentNode.nextSibling.firstChild.id"
. ",'"
// l'url effectuant la recherche
. $url
. "',"
// le noeud contenant un gif anime
// . "'idom5'"
. "this.parentNode.previousSibling.firstChild"
. ",'"
// la valeur de l'attribut Name a remplir
. $name
. "','"
// noeud invisible memorisant l'URL initiale (pour re-initialisation)
. $idom6
. "')\""
. " />"
. "\n</div>"
. ($racine?"<div>$racine</div>":"")
. "<div id='"
. $idom2
. "'><div id='$idom4'"
. " class='arial1'>"
. $liste
. "</div></div>\n<div id='$idom3'></div></div>\n";
}
开发者ID:rhertzog,项目名称:lcs,代码行数:52,代码来源:selectionner.php
示例8: inc_plonger_dist
function inc_plonger_dist($id_rubrique, $idom = "", $list = array(), $col = 1, $exclu = 0, $do = 'aff')
{
global $spip_lang_left;
if ($list) {
$id_rubrique = $list[$col - 1];
}
$ret = '';
# recherche les filles et petites-filles de la rubrique donnee
# en excluant une eventuelle rubrique interdite (par exemple, lorsqu'on
# deplace une rubrique, on peut la deplacer partout a partir de la
# racine... sauf vers elle-meme ou sa propre branche)
$ordre = array();
$rub = array();
$res = sql_select("rub1.id_rubrique, rub1.titre, rub1.id_parent, rub1.lang, rub1.langue_choisie, rub2.id_rubrique AS id_enfant", "spip_rubriques AS rub1 LEFT JOIN spip_rubriques AS rub2 ON (rub1.id_rubrique = rub2.id_parent)", "rub1.id_parent = " . sql_quote($id_rubrique) . "\n\t\t\tAND rub1.id_rubrique!=" . sql_quote($exclu) . "\n\t\t\tAND (rub2.id_rubrique IS NULL OR rub2.id_rubrique!=" . sql_quote($exclu) . ")", "", "0+rub1.titre,rub1.titre");
while ($row = sql_fetch($res)) {
if (autoriser('voir', 'rubrique', $row['id_rubrique'])) {
$rub[$row['id_rubrique']]['enfants'] = $row['id_enfant'];
if ($row['id_parent'] == $id_rubrique) {
$t = trim(typo(supprimer_numero($row['titre'])));
if ($row['langue_choisie'] != 'oui') {
$t .= ' <small title="' . traduire_nom_langue($row['lang']) . '">[' . $row['lang'] . ']</small>';
}
$ordre[$row['id_rubrique']] = $t;
}
}
}
$next = isset($list[$col]) ? $list[$col] : 0;
if ($ordre) {
$rec = generer_url_ecrire('plonger', "rac={$idom}&exclus={$exclu}&do={$do}&col=" . ($col + 1));
$info = generer_url_ecrire('informer', "type=rubrique&rac={$idom}&do={$do}&id=");
$args = "'{$idom}',this,{$col},'{$spip_lang_left}','{$info}',event";
while (list($id, $titrebrut) = each($ordre)) {
$titre = supprimer_numero($titrebrut);
$classe1 = $id_rubrique ? 'petite-rubrique' : "petit-secteur";
if (isset($rub[$id]["enfants"])) {
$classe2 = " class='rub-ouverte'";
$url = "\nhref='{$rec}&id={$id}'";
} else {
$classe2 = $url = '';
$url = "\nhref='javascript:void(0)'";
}
$js_func = $do . '_selection_titre';
$click = "\nonclick=\"changerhighlight(this.parentNode.parentNode.parentNode);\nreturn " . (!is_array($list) ? ' false' : "aff_selection_provisoire({$id},{$args})") . "\"\nondblclick=\"" . "{$js_func}(this." . "firstChild.nodeValue," . $id . ",'selection_rubrique','id_parent');" . "\nreturn aff_selection_provisoire({$id},{$args});" . "\"";
$ret .= "<div class='" . ($id == $next ? "item on" : "item") . "'><div class='" . $classe1 . "'><div{$classe2}><a" . $url . $click . ">" . $titre . "</a></div></div></div>";
}
}
$idom2 = $idom . "_col_" . ($col + 1);
$left = $col * 150;
return http_img_pack("searching.gif", "*", "style='visibility: hidden; position: absolute; {$spip_lang_left}: " . ($left - 30) . "px; top: 2px; z-index: 2;' id='img_{$idom2}'") . "<div style='width: 150px; height: 100%; overflow: auto; position: absolute; top: 0px; {$spip_lang_left}: " . ($left - 150) . "px;'>" . $ret . "\n</div>\n<div id='{$idom2}'>" . ($next ? inc_plonger_dist($id_rubrique, $idom, $list, $col + 1, $exclu) : "") . "\n</div>";
}
开发者ID:JLuc,项目名称:SPIP,代码行数:50,代码来源:plonger.php
示例9: medias_puce_statut_document
/**
* Afficher la puce de statut pour les documents
*
* @param unknown_type $id_document
* @param unknown_type $statut
* @param unknown_type $id_rubrique
* @param unknown_type $type
* @param unknown_type $ajax
* @return unknown
*/
function medias_puce_statut_document($id_document, $statut)
{
if ($statut == 'publie') {
$puce = 'puce-verte.gif';
} else {
if ($statut == "prepa") {
$puce = 'puce-blanche.gif';
} else {
if ($statut == "poubelle") {
$puce = 'puce-poubelle.gif';
} else {
$puce = 'puce-blanche.gif';
}
}
}
return http_img_pack($puce, $statut, "class='puce'");
}
开发者ID:loorenzooo,项目名称:aslfc,代码行数:27,代码来源:medias_fonctions.php
示例10: exec_convert_sql_utf8_dist
function exec_convert_sql_utf8_dist() {
include_spip('inc/minipres');
include_spip('inc/charsets');
$charset_spip = $GLOBALS['meta']['charset'];
// Definir le titre de la page (et le nom du fichier admin)
//$action = _T('utf8_convertir_votre_site');
$action = _L("Conversion de la base en $charset_spip"); #volontairement non traduit (obsolete)
// si meta deja la, c'est une reprise apres timeout.
if ($GLOBALS['meta']['convert_sql_utf8']) {
$base = charger_fonction('convert_sql_utf8', 'base');
$base($action, true);
} else {
$charset_supporte = false;
$utf8_supporte = false;
// verifier que mysql gere le charset courant pour effectuer les conversions
include_spip('base/abstract_sql');
if ($c = sql_get_charset($charset_spip)){
$sql_charset = $c['charset'];
$sql_collation = $c['collation'];
$charset_supporte = true;
}
if (!$charset_supporte) {
$utf8_supporte = sql_get_charset('utf8');
$res = _L("Le charset SPIP actuel $charset_spip n'est pas supporte par votre serveur MySQL<br/>");
if ($utf8_supporte)
$res .= _L("Votre serveur supporte utf-8, vous devriez convertir votre site en utf-8 avant de recommencer cette operation");
echo minipres($action, $res);
} else {
$commentaire = "";
//$commentaire = _T('utf8_convert_avertissement',
// array('orig' => $charset_orig,'charset' => 'utf-8'));
$commentaire .= "<small>"
. http_img_pack('warning.gif', _T('info_avertissement'), "style='width: 48px; height: 48px; float: right;margin: 10px;'");
$commentaire .= _T('utf8_convert_backup', array('charset' => 'utf-8'))
."</small>";
$commentaire .= '<br />'._T('utf8_convert_timeout');
$commentaire .= "<hr />\n";
$admin = charger_fonction('admin', 'inc');
echo $admin('convert_sql_utf8', $action, $commentaire);
}
}
}
开发者ID:rhertzog,项目名称:lcs,代码行数:46,代码来源:convert_sql_utf8.php
示例11: aider_icone
function aider_icone($url, $clic= '')
{
global $spip_lang, $spip_lang_rtl;
if (!$clic) {
$t = _T('titre_image_aide');
$clic = http_img_pack("aide-12".aide_lang_dir($spip_lang,$spip_lang_rtl).".png",
_T('info_image_aide'),
" title=\"$t\" class='aide'");
}
return "\n <a class='aide'\nhref='"
. $url
. "'\nonclick=\"javascript:window.open(this.href,"
. "'spip_aide', "
. "'scrollbars=yes, resizable=yes, width=740, height=580'); "
. "return false;\">"
. $clic
. "</a>";
}
开发者ID:rhertzog,项目名称:lcs,代码行数:19,代码来源:aider.php
示例12: exec_convert_utf8_dist
function exec_convert_utf8_dist() {
include_spip('inc/minipres');
include_spip('inc/charsets');
// Definir le titre de la page (et le nom du fichier admin)
$action = _T('utf8_convertir_votre_site');
// si meta deja la, c'est une reprise apres timeout.
if ($GLOBALS['meta']['convert_utf8'] AND $GLOBALS['meta']['admin']) {
$admin = charger_fonction('admin', 'inc');
echo $admin('convert_utf8', $action, '', true);
} else {
$charset_orig = $GLOBALS['meta']['charset'];
// tester si le charset d'origine est connu de spip
if (!load_charset($charset_orig))
convert_utf8_non($action,
_T('utf8_convert_erreur_orig', array('charset' => "<b>".$charset_orig."</b>")));
// ne pas convertir si deja utf8
// ou si l'interface du serveur ne comprend rien
else if (($charset_orig == 'utf-8'))
convert_utf8_non($action,
_T('utf8_convert_erreur_deja',
array('charset' => $charset_orig)));
else if(!sql_get_charset('utf-8'))
convert_utf8_non($action,
_L('Votre version du serveur SQL ne gere pas les charset'));
else {
$commentaire = _T('utf8_convert_avertissement',
array('orig' => $charset_orig,'charset' => 'utf-8'));
$commentaire .= "<small>"
. http_img_pack('warning.gif', _T('info_avertissement'), "style='width: 48px; height: 48px; float: right;margin: 10px;'");
$commentaire .= _T('utf8_convert_backup', array('charset' => 'utf-8'))
."</small>";
$commentaire .= '<br />'._T('utf8_convert_timeout');
$commentaire .= "<hr />\n";
$admin = charger_fonction('admin', 'inc');
echo $admin('convert_utf8', $action, $commentaire);
}
}
}
开发者ID:rhertzog,项目名称:lcs,代码行数:42,代码来源:convert_utf8.php
示例13: enfant_rub
/**
* Crée l'affichage des listes de rubriques dans le privé
*
* @param int $collection
* L'identifiant numérique de la rubrique à lister
* @param int $debut
* Le numéro de la pagination si paginé (> 500)
* @param int $limite
* Le pas de pagination si paginé (> 500)
* @return array $res
* Un tableau des sous rubriques
*/
function enfant_rub($collection, $debut = 0, $limite = 500)
{
$voir_logo = (isset($GLOBALS['meta']['image_process']) and $GLOBALS['meta']['image_process'] != "non");
$logo = "";
if ($voir_logo) {
$chercher_logo = charger_fonction('chercher_logo', 'inc');
include_spip('inc/filtres_images_mini');
}
$res = array();
$result = sql_select("id_rubrique, id_parent, titre, descriptif, lang ", "spip_rubriques", "id_parent={$collection}", '', '0+titre,titre', "{$debut},{$limite}");
while ($row = sql_fetch($result)) {
$id_rubrique = $row['id_rubrique'];
$id_parent = $row['id_parent'];
$titre = generer_info_entite($id_rubrique, 'rubrique', 'titre');
// pour etre sur de passer par tous les traitements
if ('' !== ($rang = recuperer_numero($row['titre']))) {
$rang = "{$rang}. ";
}
if (autoriser('voir', 'rubrique', $id_rubrique)) {
$les_sous_enfants = sous_enfant_rub($id_rubrique);
changer_typo($row['lang']);
$lang_dir = lang_dir($row['lang']);
$descriptif = propre($row['descriptif']);
if ($voir_logo) {
if ($logo = $chercher_logo($id_rubrique, 'id_rubrique', 'on')) {
list($fid, $dir, $nom, $format) = $logo;
$logo = image_reduire("<img src='{$fid}' alt='' />", 48, 36);
if ($logo) {
$logo = inserer_attribut($logo, 'class', 'logo');
}
}
}
$lib_bouton = (!acces_restreint_rubrique($id_rubrique) ? "" : http_img_pack('auteur-0minirezo-16.png', '', " width='16' height='16'", _T('image_administrer_rubrique'))) . " <a dir='{$lang_dir}'" . ($row['lang'] !== $GLOBALS['spip_lang'] ? " hreflang='" . $row['lang'] . "'" : '') . " href='" . generer_url_entite($id_rubrique, 'rubrique') . "'>" . $rang . $titre . "</a>";
$titre = (is_string($logo) ? $logo : '') . bouton_block_depliable($lib_bouton, $les_sous_enfants ? false : -1, "enfants{$id_rubrique}");
$res[] = debut_cadre_sous_rub($id_parent ? "rubrique-24.png" : "secteur-24.png", true, "", $titre) . (!$descriptif ? '' : "\n<div class='descriptif'>{$descriptif}</div>") . $les_sous_enfants . fin_cadre_sous_rub(true);
}
}
changer_typo($GLOBALS['spip_lang']);
# remettre la typo de l'interface pour la suite
return $res;
}
开发者ID:xablen,项目名称:Semaine14_SPIP_test,代码行数:53,代码来源:presenter_enfants.php
示例14: prepare_icone_base
/**
* Fonction de base pour une icone dans un squelette
* structure html : <span><a><img><b>texte</b></span>
*
* @param string $type
* 'lien' ou 'bouton'
* @param string $lien
* url
* @param string $texte
* texte du lien / alt de l'image
* @param string $fond
* objet avec ou sans son extension et sa taille (article, article-24, article-24.png)
* @param string $fonction
* new/del/edit
* @param string $class
* classe supplementaire (horizontale, verticale, ajax ...)
* @param string $javascript
* "onclick='...'" par exemple
* @return string
*/
function prepare_icone_base($type, $lien, $texte, $fond, $fonction = "", $class = "", $javascript = "")
{
if (in_array($fonction, array("del", "supprimer.gif"))) {
$class .= ' danger';
} elseif ($fonction == "rien.gif") {
$fonction = "";
} elseif ($fonction == "delsafe") {
$fonction = "del";
}
// remappage des icone : article-24.png+new => article-new-24.png
if ($icone_renommer = charger_fonction('icone_renommer', 'inc', true)) {
list($fond, $fonction) = $icone_renommer($fond, $fonction);
}
// ajouter le type d'objet dans la class de l'icone
$class .= " " . substr(basename($fond), 0, -4);
$alt = attribut_html($texte);
$title = " title=\"{$alt}\"";
// est-ce pertinent de doubler le alt par un title ?
$ajax = "";
if (strpos($class, "ajax") !== false) {
$ajax = "ajax";
if (strpos($class, "preload") !== false) {
$ajax .= " preload";
}
if (strpos($class, "nocache") !== false) {
$ajax .= " nocache";
}
$ajax = " class='{$ajax}'";
}
$size = 24;
if (preg_match("/-([0-9]{1,3})[.](gif|png)\$/i", $fond, $match)) {
$size = $match[1];
}
if ($fonction) {
// 2 images pour composer l'icone : le fond (article) en background,
// la fonction (new) en image
$icone = http_img_pack($fonction, $alt, "width='{$size}' height='{$size}'\n" . http_style_background($fond));
} else {
$icone = http_img_pack($fond, $alt, "width='{$size}' height='{$size}'");
}
if ($type == 'lien') {
return "<span class='icone s{$size} {$class}'>" . "<a href='{$lien}'{$title}{$ajax}{$javascript}>" . $icone . "<b>{$texte}</b>" . "</a></span>\n";
} else {
return bouton_action("{$icone}<b>{$texte}</b>", $lien, "icone s{$size} {$class}", $javascript, $alt);
}
}
开发者ID:loorenzooo,项目名称:aslfc,代码行数:66,代码来源:filtres.php
示例15: statistiques_zoom
function statistiques_zoom($id_article, $largeur_abs, $date_premier, $date_debut, $date_fin)
{
if ($largeur_abs > 1) {
$inc = ceil($largeur_abs / 5);
$duree_plus = 420 / ($largeur_abs - $inc);
$duree_moins = 420 / ($largeur_abs + $inc);
}
if ($largeur_abs == 1) {
$duree_plus = 840;
$duree_moins = 210;
}
if ($largeur_abs < 1) {
$duree_plus = 420 * ((1/$largeur_abs) + 1);
$duree_moins = 420 * ((1/$largeur_abs) - 1);
}
$pour_article = $id_article ? "&id_article=$id_article" : '';
$zoom = '';
if ($date_premier < $date_debut)
$zoom= lien_ou_expose(generer_url_ecrire("statistiques_visites","duree=$duree_plus$pour_article"),
http_img_pack('loupe-moins.gif',
_T('info_zoom'). '-',
"style='border: 0px; vertical-align: middle;'"), false, '',
" ");
if ( (($date_fin - $date_debut) / (24*3600)) > 30)
$zoom .= lien_ou_expose(generer_url_ecrire("statistiques_visites","duree=$duree_moins$pour_article"),
http_img_pack('loupe-plus.gif',
_T('info_zoom'). '+',
"style='border: 0px; vertical-align: middle;'"), false, '',
" ");
return $zoom;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:37,代码来源:statistiques.php
示例16: traiter_raccourcis
/**
* Nettoie un texte, traite les raccourcis autre qu'URL, la typo, etc.
*
* http://code.spip.net/@traiter_raccourcis
*
* @param string $t
* @param bool $show_autobr
* @return string
*/
function traiter_raccourcis($t, $show_autobr = false)
{
static $wheel, $notes;
static $img_br_auto, $img_br_manuel, $img_br_no;
// hack1: respecter le tag ignore br
if (_AUTOBR_IGNORER and strncmp($t, _AUTOBR_IGNORER, strlen(_AUTOBR_IGNORER)) == 0) {
$ignorer_autobr = true;
$t = substr($t, strlen(_AUTOBR_IGNORER));
} else {
$ignorer_autobr = false;
}
// Appeler les fonctions de pre_traitement
$t = pipeline('pre_propre', $t);
if (!isset($wheel)) {
$ruleset = SPIPTextWheelRuleset::loader($GLOBALS['spip_wheels']['raccourcis'], 'personnaliser_raccourcis');
$wheel = new TextWheel($ruleset);
if (_request('var_mode') == 'wheel' and autoriser('debug')) {
$f = $wheel->compile();
echo "<pre>\n" . spip_htmlspecialchars($f) . "</pre>\n";
exit;
}
$notes = charger_fonction('notes', 'inc');
}
// Gerer les notes (ne passe pas dans le pipeline)
list($t, $mes_notes) = $notes($t);
$t = $wheel->text($t);
// Appeler les fonctions de post-traitement
$t = pipeline('post_propre', $t);
if ($mes_notes) {
$notes($mes_notes, 'traiter', $ignorer_autobr);
}
// hack2: wrap des autobr dans l'espace prive, pour affichage css
// car en css on ne sait pas styler l'element BR
if ($ignorer_autobr and _AUTOBR) {
if (is_null($img_br_no)) {
$img_br_no = $show_autobr ? http_img_pack("br-no-10.png", _T("tw:retour_ligne_ignore"), "class='br-no'", _T("tw:retour_ligne_ignore")) : "";
}
$t = str_replace(_AUTOBR, $img_br_no, $t);
}
if ($show_autobr and _AUTOBR) {
if (is_null($img_br_manuel)) {
$img_br_manuel = http_img_pack("br-manuel-10.png", _T("tw:retour_ligne_manuel"), "class='br-manuel'", _T("tw:retour_ligne_manuel"));
}
if (is_null($img_br_auto)) {
$img_br_auto = http_img_pack("br-auto-10.png", _T("tw:retour_ligne_auto"), "class='br-auto'", _T("tw:retour_ligne_auto"));
}
if (false !== strpos(strtolower($t), '<br')) {
$t = preg_replace("/<br\\b.*>/UiS", "{$img_br_manuel}\\0", $t);
$t = str_replace($img_br_manuel . _AUTOBR, $img_br_auto . _AUTOBR, $t);
}
}
return $t;
}
开发者ID:genma,项目名称:spip_ynh,代码行数:62,代码来源:texte.php
示例17: afficher_site
function afficher_site($id_syndic, $id_rubrique, $nom_site, $row){
global $spip_lang_right;
$cherche_mot = _request('cherche_mot');
$select_groupe = _request('select_groupe');
$id_secteur = $row["id_secteur"];
$url_site = $row["url_site"];
$url_syndic = $row["url_syndic"];
$syndication = $row["syndication"];
$statut = $row["statut"];
$date_heure = $row["date"];
$date_syndic = $row['date_syndic'];
$flag_administrable = autoriser('modifier','site',$id_syndic);
$flag_editable = ($flag_administrable OR ($GLOBALS['meta']["proposer_sites"] > 0 AND ($statut == 'prop')));
$meme_rubrique = charger_fonction('meme_rubrique', 'inc');
$iconifier = charger_fonction('iconifier', 'inc');
if ($flag_editable AND ($statut == 'publie'))
$dater = charger_fonction('dater', 'inc');
$editer_mots = charger_fonction('editer_mots', 'inc');
if ($flag_administrable)
$instituer_site = charger_fonction('instituer_site','inc');
echo debut_grand_cadre(true);
echo afficher_hierarchie($id_rubrique);
echo fin_grand_cadre(true);
echo debut_gauche('', true);
echo debut_boite_info(true);
echo pipeline ('boite_infos', array('data' => '',
'args' => array(
'type'=>'site',
'id' => $id_syndic,
'row' => $row
)
));
echo fin_boite_info(true);
echo $iconifier('id_syndic', $id_syndic, 'sites', false, $flag_administrable);
echo pipeline('affiche_gauche',array('args'=>array('exec'=>'sites','id_syndic'=>$id_syndic),'data'=>''));
echo creer_colonne_droite('', true);
echo $meme_rubrique($id_rubrique, $id_syndic, 'syndic');
echo pipeline('affiche_droite',array('args'=>array('exec'=>'sites','id_syndic'=>$id_syndic),'data'=>''));
echo bloc_des_raccourcis(
icone_horizontale(_T('icone_voir_sites_references'), generer_url_ecrire("sites_tous",""), "site-24.gif","rien.gif", false)
);
echo debut_droite('', true);
if ($syndication == 'off' OR $syndication == 'sus')
$droit = $id_rubrique;
else $droit = 0;
$url_affichee = $url_site;
if (strlen($url_affichee) > 40) $url_affichee = substr($url_affichee, 0, 30)."...";
$actions =
($flag_editable ? icone_inline(_T('icone_modifier_site'), generer_url_ecrire('sites_edit',"id_syndic=$id_syndic"), "site-24.gif", "edit.gif",$spip_lang_right) : "");
$haut =
"<div class='bandeau_actions'>$actions</div>".
gros_titre($nom_site?$nom_site:"("._T('info_sans_titre_2').")", '' , false)
. "<a href='$url_site' class='url_site'>$url_affichee</a>";
$type = 'site';
$contexte = array('id'=>$id_syndic,'id_rubrique'=>$id_rubrique);
$fond = recuperer_fond("prive/contenu/$type",$contexte);
// permettre aux plugin de faire des modifs ou des ajouts
$fond = pipeline('afficher_contenu_objet',
array(
'args'=>array(
'type'=>$type,
'id_objet'=>$id_syndic,
'contexte'=>$contexte),
'data'=> $fond));
$fond = "<div id='wysiwyg'>$fond</div>";
$onglet_contenu =
(_INTERFACE_ONGLETS?
($statut == 'prop' ? "<p class='site_prop'>"._T('info_site_propose')." <b>".affdate($date_heure)." </b></p>" : "")
. $fond:"")
. (($syndication == "oui" OR $syndication == "off" OR $syndication == "sus") ?
"<p class='site_syndique'><a href='".htmlspecialchars($url_syndic)."'>"
. http_img_pack('feed.png', 'RSS'). '</a>'._T('info_site_syndique').'</p>'
. (($syndication == "off" OR $syndication=="sus") ?
"<div class='site_syndique_probleme'>" . _T('avis_site_syndique_probleme', array('url_syndic' => quote_amp($url_syndic)))
. redirige_action_auteur('editer_site', $id_syndic, 'sites', '',
"<input type='hidden' name='reload' value='oui' />
<input type='submit' value=\""
. attribut_html(_T('lien_nouvelle_recuperation'))
. "\" class='spip_xx-small' />")
. "</div>"
//.........这里部分代码省略.........
开发者ID:rhertzog,项目名称:lcs,代码行数:101,代码来源:sites.php
示例18: puce_statut
function puce_statut($statut, $atts='') {
switch ($statut) {
case 'publie':
$img = 'puce-verte.gif';
$alt = _T('info_article_publie');
return http_img_pack($img, $alt, $atts);
case 'prepa':
$img = 'puce-blanche.gif';
$alt = _T('info_article_redaction');
return http_img_pack($img, $alt, $atts);
case 'prop':
$img = 'puce-orange.gif';
$alt = _T('info_article_propose');
return http_img_pack($img, $alt, $atts);
case 'refuse':
$img = 'puce-rouge.gif';
$alt = _T('info_article_refuse');
return http_img_pack($img, $alt, $atts);
case 'poubelle':
$img = 'puce-poubelle.gif';
$alt = _T('info_article_supprime');
return http_img_pack($img, $alt, $atts);
}
return http_img_pack($img, $alt, $atts);
}
开发者ID:rhertzog,项目名称:lcs,代码行数:25,代码来源:puce_statut.php
示例19: afficher_tranches_requete
function afficher_tranches_requete($num_rows, $idom, $url='', $nb_aff = 10, $old_arg=NULL) {
static $ancre = 0;
global $browser_name, $spip_lang_right, $spip_display;
if ($old_arg!==NULL){ // eviter de casser la compat des vieux appels $cols_span ayant disparu ...
$idom = $url; $url = $nb_aff; $nb_aff=$old_arg;
}
$ancre++;
$self = self();
$ie_style = ($browser_name == "MSIE") ? "height:1%" : '';
$style = "style='visibility: hidden; float: $spip_lang_right'";
$nav= navigation_pagination($num_rows, $nb_aff, $url, _request($idom), $idom, true);
$script = parametre_url($self, $idom, -1);
$l = htmlentities(_T('lien_tout_afficher'));
return http_img_pack("searching.gif", "*", "$style id='img_$idom'")
. "\n<div style='$ie_style;' class='arial1 tranches' id='a$ancre'>"
. $nav
. "<a href='$script#a$ancre' class='plus'"
. (!$url ? '' : generer_onclic_ajax($url, $idom,-1))
. "><img title=\"$l\" alt=\"$l\"\nsrc=\""
. chemin_image("plus.gif")
. "\" /></a></div>\n";
}
开发者ID:rhertzog,项目名称:lcs,代码行数:24,代码来源:presenter_liste.php
|
请发表评论