Changeset 49216 in spip-zone


Ignore:
Timestamp:
Jul 1, 2011, 10:17:12 PM (10 years ago)
Author:
piero.wbmstr@…
Message:

Clean des URLs du displayer et du clicker + inclusion systématique du fichier "base/abstract_sql" qui semble être inclus une fois sur deux (?? étrange d'ailleurs)

Location:
_plugins_/pub_banner/trunk
Files:
1 deleted
18 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/pub_banner/trunk/action/vider_poubelle_pubban.php

    r49157 r49216  
    1111
    1212function action_vider_poubelle_pubban(){
     13        include_spip('base/abstract_sql');
    1314        $resultat1 = sql_select("id_pub", $GLOBALS['_PUBBAN_CONF']['table_pub'], "statut='5poubelle'", '', '', '', '', _BDD_PUBBAN);
    1415        if (sql_count($resultat1) > 0) {
  • _plugins_/pub_banner/trunk/balise/clic_banner.php

    r49157 r49216  
    1515
    1616function balise_CLIC_BANNER_dyn($p, $id_pub, $id_empl) {
     17        include_spip('base/abstract_sql');
    1718        $id_pub = _request('id_pub');
    1819        $id_empl = _request('id_empl') ? _request('id_empl') : $pub['emplacement'];
  • _plugins_/pub_banner/trunk/balise/pubban.php

    r49157 r49216  
    2323       
    2424        if($emplacement['statut'] == '2actif') {
    25                 $div = "<center><div class=\"pubban pubban_".$emplacement['titre']."\"><iframe name='".$emplacement['titre']."' src='"._PUBBAN_ADDS_DISPLAYER."&empl=".$emplacement['titre']."' width=".$emplacement['width']." height=".$emplacement['height']." marginwidth=auto marginheight=0 hspace=0 vspace=0 frameborder=".$border." scrolling=no></iframe></div></center>";
     25                $div = "<center><div class=\"pubban pubban_".$emplacement['titre']."\"><iframe name='".$emplacement['titre']."' src='".generer_url_public(_PUBBAN_ADDS_DISPLAYER)."&empl=".$emplacement['titre']."' width=".$emplacement['width']." height=".$emplacement['height']." marginwidth=auto marginheight=0 hspace=0 vspace=0 frameborder=".$border." scrolling=no></iframe></div></center>";
    2626        }
    2727        echo $div;
  • _plugins_/pub_banner/trunk/base/pubban_upgrade.php

    r49157 r49216  
    99if (!defined("_ECRIRE_INC_VERSION")) return;
    1010include_spip('base/pubban_chargeur');
     11include_spip('base/abstract_sql');
    1112
    1213function pubban_upgrade($nom_meta_base_version,$version_cible) {
     
    1516        if (!isset($GLOBALS['meta'][$nom_meta_base_version])
    1617                        || (($current_version = $GLOBALS['meta'][$nom_meta_base_version])!=$version_cible)){
    17                 include_spip('base/abstract_sql');
    1818                include_spip('base/create');
    1919                maj_tables(array(
  • _plugins_/pub_banner/trunk/exec/pubban_admin.php

    r49157 r49216  
    7373        }
    7474
     75        include_spip('base/abstract_sql');
    7576        $verif_empl = sql_countsel($GLOBALS['_PUBBAN_CONF']['table_empl'], '', '', '', '', '', _BDD_PUBBAN);
    7677        $verif = sql_countsel($GLOBALS['_PUBBAN_CONF']['table_pub'], '', '', '', '', '', _BDD_PUBBAN);
  • _plugins_/pub_banner/trunk/exec/pubban_stats.php

    r49157 r49216  
    1313        global $connect_statut, $connect_id_auteur, $spip_lang_right, $spip_lang_left;
    1414        include_spip('inc/presentation');
     15        include_spip('base/abstract_sql');
    1516        $commencer_page = charger_fonction('commencer_page', 'inc');
    1617        $titre_page = _T('pubban:stats_pubban');
  • _plugins_/pub_banner/trunk/formulaires/display_adds.php

    r49157 r49216  
    1212function formulaires_display_adds_charger_dist(){
    1313        include_spip('inc/pubban_process');
     14        include_spip('base/abstract_sql');
    1415        $emplacement = pubban_recuperer_emplacement_par_nom(_request('empl'));
    1516        if($emplacement['statut'] != '2actif') return;
     
    6263                'type' => $type,
    6364                'code' => $code,
    64                 'java_goto' => _PUBBAN_ADDS_CLICKER,
     65                'java_goto' => generer_url_public(_PUBBAN_ADDS_CLICKER),
    6566                'width' => $emplacement['width'],
    6667                'height' => $emplacement['height']
  • _plugins_/pub_banner/trunk/formulaires/stats_adds.php

    r49157 r49216  
    1111
    1212function formulaires_stats_adds_charger_dist(){
     13        include_spip('base/abstract_sql');
    1314        $valeurs = array(
    1415                'action' => generer_url_ecrire('pubban_stats'),
  • _plugins_/pub_banner/trunk/genie/pubban_cron.php

    r49157 r49216  
    1515 */
    1616function genie_pubban_cron($time){
     17        include_spip('base/abstract_sql');
    1718        $nb_modif = $nb_delete = $nb_errors = 0;
    1819        $gdate = date("Y-m-d");
  • _plugins_/pub_banner/trunk/inc/attacher_pub_emplacements.php

    r49157 r49216  
    22
    33function inc_attacher_pub_emplacements_dist($id_pub, $empls){
    4         if( !strlen($empls) ) return;
    5         if( !is_array($empls) ) $empls = array( $empls );
     4        if (!strlen($empls)) return;
     5        include_spip('base/abstract_sql');
     6        if (!is_array($empls)) $empls = array( $empls );
    67        $old_emp = pubban_emplacements_de_la_pub($id_pub);
    78        $ok = true;
     
    1112                        $ok = sql_insertq($GLOBALS['_PUBBAN_CONF']['table_join'], array('id_pub'=>$id_pub, 'id_empl'=>$id_empl), '', _BDD_PUBBAN);
    1213        }
    13         if($old_emp AND count($old_emp))
     14        if ($old_emp AND count($old_emp))
    1415                foreach($old_emp as $k=>$id_old) {
    1516                        if( !in_array($id_old, $empls) )
  • _plugins_/pub_banner/trunk/inc/editer_emplacement.php

    r49157 r49216  
    55 */
    66function inc_editer_emplacement_dist($id_emp, $datas){
    7         if( !is_array($datas) ) return;
    8         if( $ok = sql_updateq($GLOBALS['_PUBBAN_CONF']['table_empl'], $datas, "id_empl=".intval($id_emp), '', _BDD_PUBBAN) )
     7        if (!is_array($datas)) return;
     8        include_spip('base/abstract_sql');
     9        if ( $ok = sql_updateq($GLOBALS['_PUBBAN_CONF']['table_empl'], $datas, "id_empl=".intval($id_emp), '', _BDD_PUBBAN) )
    910                return true;
    1011        return false;
  • _plugins_/pub_banner/trunk/inc/editer_pub.php

    r49157 r49216  
    55 */
    66function inc_editer_pub_dist($id_pub, $datas){
    7         if( !is_array($datas) ) return;
    8         if( $ok = sql_updateq($GLOBALS['_PUBBAN_CONF']['table_pub'], $datas, "id_pub=".intval($id_pub), '', _BDD_PUBBAN) )
     7        if (!is_array($datas)) return;
     8        include_spip('base/abstract_sql');
     9        if ( $ok = sql_updateq($GLOBALS['_PUBBAN_CONF']['table_pub'], $datas, "id_pub=".intval($id_pub), '', _BDD_PUBBAN) )
    910                return true;
    1011        return false;
  • _plugins_/pub_banner/trunk/inc/instituer_emplacement.php

    r49157 r49216  
    55 */
    66function inc_instituer_emplacement_dist($datas) {
    7         if( !is_array($datas) ) return;
     7        if (!is_array($datas)) return;
     8        include_spip('base/abstract_sql');
    89        $conf = pubban_recuperer_config();
    9         if($conf['adds_ok'] == 'oui')
     10        if ($conf['adds_ok'] == 'oui')
    1011                $datas = array_merge($datas, array(
    1112                        'prix_tranche_1' => $conf['prix_tranche_1'],
     
    1415                        'prix_tranche_4' => $conf['prix_tranche_4'],
    1516                ));
    16         if( $id_empl = sql_insertq($GLOBALS['_PUBBAN_CONF']['table_empl'], $datas, '', _BDD_PUBBAN) )
     17        if ( $id_empl = sql_insertq($GLOBALS['_PUBBAN_CONF']['table_empl'], $datas, '', _BDD_PUBBAN) )
    1718                return $id_empl;
    1819        return false;
  • _plugins_/pub_banner/trunk/inc/instituer_pub.php

    r49157 r49216  
    55 */
    66function inc_instituer_pub_dist($datas, $statut='1inactif') {
    7         if( !is_array($datas) ) return;
    8         if(!isset($datas['date_add']) ) $datas['date_add'] = date('Y-m-d H:i:s');
     7        if (!is_array($datas)) return;
     8        include_spip('base/abstract_sql');
     9        if (!isset($datas['date_add']) ) $datas['date_add'] = date('Y-m-d H:i:s');
    910        $datas['statut'] = $statut;
    10         if( $id_pub = sql_insertq($GLOBALS['_PUBBAN_CONF']['table_pub'], $datas, '', _BDD_PUBBAN) )
     11        if ( $id_pub = sql_insertq($GLOBALS['_PUBBAN_CONF']['table_pub'], $datas, '', _BDD_PUBBAN) )
    1112                return $id_pub;
    1213        return false;
  • _plugins_/pub_banner/trunk/inc/pubban_prive.php

    r49214 r49216  
    22
    33function pubban_poubelle_pleine(){
     4        include_spip('base/abstract_sql');
    45        $trash = sql_countsel($GLOBALS['_PUBBAN_CONF']['table_pub'], "statut='5poubelle'", '', '', '', '', _BDD_PUBBAN) + sql_countsel($GLOBALS['_PUBBAN_CONF']['table_empl'], "statut='5poubelle'", '', '', '', '', _BDD_PUBBAN);
    56        return $trash;
     
    2223 */
    2324function afficher_statistiques_pubban($return=false, $div='', $plie='deplie') {
     25        include_spip('base/abstract_sql');
    2426
    2527        $div = "<div id='$div' class='bloc_depliable bloc$plie'><table width='100%'>";
     
    8587 */
    8688function pubban_search($str){
     89        include_spip('base/abstract_sql');
    8790        $results = array('pub', 'emp');
    8891        $i=0;
  • _plugins_/pub_banner/trunk/inc/pubban_process.php

    r49157 r49216  
    66
    77function pubban_pubs_de_emplacement($id_emp, $toutes=true){
     8        include_spip('base/abstract_sql');
    89        $list_pub = array();
    910        $requete = sql_select("id_pub", $GLOBALS['_PUBBAN_CONF']['table_join'], "id_empl=".intval($id_emp), '', '', '', '', _BDD_PUBBAN);
     
    3132 */
    3233function pubban_emplacements_de_la_pub($id_pub, $id_empl_verif=false){
     34        include_spip('base/abstract_sql');
    3335        $list_emp = array();
    3436        $requete = sql_select("id_empl", $GLOBALS['_PUBBAN_CONF']['table_join'], "id_pub=".intval($id_pub), '', '', '', '', _BDD_PUBBAN);
  • _plugins_/pub_banner/trunk/modeles/pub.html

    r49157 r49216  
    1 [(#SET{goto_clicker,#ENV{java_goto}&id_pub=#ENV{id_pub}&id_empl=#ENV{id_empl}})][(#ENV{type}|=={img}|oui)
    2 <a href="[(#GET{goto_clicker}|parametre_url{redirect,#ENV{url,#ADRESSE_SITE}})]" onclick="clic('#ENV{url,#ADRESSE_SITE}');return false;" target="_blank">
     1[(#SET{goto_clicker,#ENV{java_goto}&id_pub=#ENV{id_pub}&id_empl=#ENV{id_empl}})]
     2
     3[(#ENV{type}|=={img}|oui)
     4<a href="[(#GET{goto_clicker}|parametre_url{redirect,#ENV{url,#ADRESSE_SITE}})]"
     5        onclick="clic('#ENV{url,#ADRESSE_SITE}');return false;"
     6        target="_blank">
    37        <img src="[(#ENV{objet}|textebrut)]" border="0" title="#ENV{nompub}" />
    48</a>
     
    610
    711[(#ENV{type}|=={swf}|oui)
    8 <a href="[(#GET{goto_clicker}|parametre_url{redirect,#ENV{url,#ADRESSE_SITE}})]" target="_blank"[(#ENV{javascript}|=={oui}|oui) onclick="return false;" ]>
    9 <object type="application/x-shockwave-flash" data="[(#ENV{objet}|textebrut|affiche_pub)]" width="#ENV{width}" height="#ENV{height}"[(#ENV{javascript}|=={oui}|oui) onmouseup="javascript:clic('#ENV{url}');" ]>
     12<a href="[(#GET{goto_clicker}|parametre_url{redirect,#ENV{url,#ADRESSE_SITE}})]"
     13        target="_blank"
     14        [ (#ENV{javascript}|=={oui}|oui)onclick="return false;"]>
     15<object type="application/x-shockwave-flash"
     16        data="[(#ENV{objet}|textebrut|affiche_pub)]"
     17        width="#ENV{width}" height="#ENV{height}"
     18        [ (#ENV{javascript}|=={oui}|oui)onmouseup="javascript:clic('#ENV{url}');"]>
    1019        <param name="movie" value="[(#ENV{objet}|textebrut|affiche_pub)]" />
    1120        <param name="wmode" value="transparent" />
    1221        <param name="quality" value="high" />
    1322        <param name="FlashVars" value="lien=#ENV{url}" />
    14         <center><a href="http://www.adobe.com/fr/products/flashplayer/" title="<:pubban:download_flash_player:>"><img src="[(#CHEMIN{img/get_adobe_flash_player.png})]" border="0" /></a></center>
     23        <center><a href="http://www.adobe.com/fr/products/flashplayer/"
     24                title="<:pubban:download_flash_player:>">
     25                <img src="[(#CHEMIN{img/get_adobe_flash_player.png})]" border="0" />
     26        </a></center>
    1527</object></a>
    1628]
  • _plugins_/pub_banner/trunk/pubban_options.php

    r49157 r49216  
    5050 * Adresse du displayer de pub
    5151 */
    52 define('_PUBBAN_ADDS_DISPLAYER', $GLOBALS['meta']['adresse_site'].'/?page=pub_displayer');
     52define('_PUBBAN_ADDS_DISPLAYER', 'pub_displayer');
    5353
    5454/**
    5555 * Adresse du cliqueur
    5656 */
    57 define('_PUBBAN_ADDS_CLICKER', $GLOBALS['meta']['adresse_site'].'/?page=clic');
     57define('_PUBBAN_ADDS_CLICKER', 'clic');
    5858
    5959/**
     
    142142 */
    143143function pubban_recuperer_pub($id_pub, $str=false) {
     144        include_spip('base/abstract_sql');
    144145        $vals = array();
    145146        if($id_pub != '0') {
     
    201202 */
    202203function pubban_recuperer_emplacement($id_empl, $str=false) {
     204        include_spip('base/abstract_sql');
    203205        $vals = array();
    204206        if($id_empl != '0') {
     
    233235 */
    234236function pubban_recuperer_emplacement_par_nom($name) {
     237        include_spip('base/abstract_sql');
    235238        $_name = str_replace('_', ' ', strtolower($name));
    236239        $id_empl = sql_getfetsel("id_empl", $GLOBALS['_PUBBAN_CONF']['table_empl'], "titre LIKE ('$name')", '', '', '', '', _BDD_PUBBAN);
     
    240243
    241244function pubban_liste_empl($statut=false){
     245        include_spip('base/abstract_sql');
    242246        $emplacements = array();
    243247        if($statut AND !is_array($statut))
     
    255259function pubban_trouver_emplacements($id_pub){
    256260        if($id_pub == '0') return;
     261        include_spip('base/abstract_sql');
    257262        $emplacements = array();
    258263        $resultat = sql_select("*", $GLOBALS['_PUBBAN_CONF']['table_join'], 'id_pub='.intval($id_pub), '', '', '', '', _BDD_PUBBAN);
Note: See TracChangeset for help on using the changeset viewer.