Changeset 49216 in spip-zone
- Timestamp:
- Jul 1, 2011, 10:17:12 PM (10 years ago)
- 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 11 11 12 12 function action_vider_poubelle_pubban(){ 13 include_spip('base/abstract_sql'); 13 14 $resultat1 = sql_select("id_pub", $GLOBALS['_PUBBAN_CONF']['table_pub'], "statut='5poubelle'", '', '', '', '', _BDD_PUBBAN); 14 15 if (sql_count($resultat1) > 0) { -
_plugins_/pub_banner/trunk/balise/clic_banner.php
r49157 r49216 15 15 16 16 function balise_CLIC_BANNER_dyn($p, $id_pub, $id_empl) { 17 include_spip('base/abstract_sql'); 17 18 $id_pub = _request('id_pub'); 18 19 $id_empl = _request('id_empl') ? _request('id_empl') : $pub['emplacement']; -
_plugins_/pub_banner/trunk/balise/pubban.php
r49157 r49216 23 23 24 24 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>"; 26 26 } 27 27 echo $div; -
_plugins_/pub_banner/trunk/base/pubban_upgrade.php
r49157 r49216 9 9 if (!defined("_ECRIRE_INC_VERSION")) return; 10 10 include_spip('base/pubban_chargeur'); 11 include_spip('base/abstract_sql'); 11 12 12 13 function pubban_upgrade($nom_meta_base_version,$version_cible) { … … 15 16 if (!isset($GLOBALS['meta'][$nom_meta_base_version]) 16 17 || (($current_version = $GLOBALS['meta'][$nom_meta_base_version])!=$version_cible)){ 17 include_spip('base/abstract_sql');18 18 include_spip('base/create'); 19 19 maj_tables(array( -
_plugins_/pub_banner/trunk/exec/pubban_admin.php
r49157 r49216 73 73 } 74 74 75 include_spip('base/abstract_sql'); 75 76 $verif_empl = sql_countsel($GLOBALS['_PUBBAN_CONF']['table_empl'], '', '', '', '', '', _BDD_PUBBAN); 76 77 $verif = sql_countsel($GLOBALS['_PUBBAN_CONF']['table_pub'], '', '', '', '', '', _BDD_PUBBAN); -
_plugins_/pub_banner/trunk/exec/pubban_stats.php
r49157 r49216 13 13 global $connect_statut, $connect_id_auteur, $spip_lang_right, $spip_lang_left; 14 14 include_spip('inc/presentation'); 15 include_spip('base/abstract_sql'); 15 16 $commencer_page = charger_fonction('commencer_page', 'inc'); 16 17 $titre_page = _T('pubban:stats_pubban'); -
_plugins_/pub_banner/trunk/formulaires/display_adds.php
r49157 r49216 12 12 function formulaires_display_adds_charger_dist(){ 13 13 include_spip('inc/pubban_process'); 14 include_spip('base/abstract_sql'); 14 15 $emplacement = pubban_recuperer_emplacement_par_nom(_request('empl')); 15 16 if($emplacement['statut'] != '2actif') return; … … 62 63 'type' => $type, 63 64 'code' => $code, 64 'java_goto' => _PUBBAN_ADDS_CLICKER,65 'java_goto' => generer_url_public(_PUBBAN_ADDS_CLICKER), 65 66 'width' => $emplacement['width'], 66 67 'height' => $emplacement['height'] -
_plugins_/pub_banner/trunk/formulaires/stats_adds.php
r49157 r49216 11 11 12 12 function formulaires_stats_adds_charger_dist(){ 13 include_spip('base/abstract_sql'); 13 14 $valeurs = array( 14 15 'action' => generer_url_ecrire('pubban_stats'), -
_plugins_/pub_banner/trunk/genie/pubban_cron.php
r49157 r49216 15 15 */ 16 16 function genie_pubban_cron($time){ 17 include_spip('base/abstract_sql'); 17 18 $nb_modif = $nb_delete = $nb_errors = 0; 18 19 $gdate = date("Y-m-d"); -
_plugins_/pub_banner/trunk/inc/attacher_pub_emplacements.php
r49157 r49216 2 2 3 3 function 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 ); 6 7 $old_emp = pubban_emplacements_de_la_pub($id_pub); 7 8 $ok = true; … … 11 12 $ok = sql_insertq($GLOBALS['_PUBBAN_CONF']['table_join'], array('id_pub'=>$id_pub, 'id_empl'=>$id_empl), '', _BDD_PUBBAN); 12 13 } 13 if ($old_emp AND count($old_emp))14 if ($old_emp AND count($old_emp)) 14 15 foreach($old_emp as $k=>$id_old) { 15 16 if( !in_array($id_old, $empls) ) -
_plugins_/pub_banner/trunk/inc/editer_emplacement.php
r49157 r49216 5 5 */ 6 6 function 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) ) 9 10 return true; 10 11 return false; -
_plugins_/pub_banner/trunk/inc/editer_pub.php
r49157 r49216 5 5 */ 6 6 function 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) ) 9 10 return true; 10 11 return false; -
_plugins_/pub_banner/trunk/inc/instituer_emplacement.php
r49157 r49216 5 5 */ 6 6 function inc_instituer_emplacement_dist($datas) { 7 if( !is_array($datas) ) return; 7 if (!is_array($datas)) return; 8 include_spip('base/abstract_sql'); 8 9 $conf = pubban_recuperer_config(); 9 if ($conf['adds_ok'] == 'oui')10 if ($conf['adds_ok'] == 'oui') 10 11 $datas = array_merge($datas, array( 11 12 'prix_tranche_1' => $conf['prix_tranche_1'], … … 14 15 'prix_tranche_4' => $conf['prix_tranche_4'], 15 16 )); 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) ) 17 18 return $id_empl; 18 19 return false; -
_plugins_/pub_banner/trunk/inc/instituer_pub.php
r49157 r49216 5 5 */ 6 6 function 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'); 9 10 $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) ) 11 12 return $id_pub; 12 13 return false; -
_plugins_/pub_banner/trunk/inc/pubban_prive.php
r49214 r49216 2 2 3 3 function pubban_poubelle_pleine(){ 4 include_spip('base/abstract_sql'); 4 5 $trash = sql_countsel($GLOBALS['_PUBBAN_CONF']['table_pub'], "statut='5poubelle'", '', '', '', '', _BDD_PUBBAN) + sql_countsel($GLOBALS['_PUBBAN_CONF']['table_empl'], "statut='5poubelle'", '', '', '', '', _BDD_PUBBAN); 5 6 return $trash; … … 22 23 */ 23 24 function afficher_statistiques_pubban($return=false, $div='', $plie='deplie') { 25 include_spip('base/abstract_sql'); 24 26 25 27 $div = "<div id='$div' class='bloc_depliable bloc$plie'><table width='100%'>"; … … 85 87 */ 86 88 function pubban_search($str){ 89 include_spip('base/abstract_sql'); 87 90 $results = array('pub', 'emp'); 88 91 $i=0; -
_plugins_/pub_banner/trunk/inc/pubban_process.php
r49157 r49216 6 6 7 7 function pubban_pubs_de_emplacement($id_emp, $toutes=true){ 8 include_spip('base/abstract_sql'); 8 9 $list_pub = array(); 9 10 $requete = sql_select("id_pub", $GLOBALS['_PUBBAN_CONF']['table_join'], "id_empl=".intval($id_emp), '', '', '', '', _BDD_PUBBAN); … … 31 32 */ 32 33 function pubban_emplacements_de_la_pub($id_pub, $id_empl_verif=false){ 34 include_spip('base/abstract_sql'); 33 35 $list_emp = array(); 34 36 $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"> 3 7 <img src="[(#ENV{objet}|textebrut)]" border="0" title="#ENV{nompub}" /> 4 8 </a> … … 6 10 7 11 [(#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}');"]> 10 19 <param name="movie" value="[(#ENV{objet}|textebrut|affiche_pub)]" /> 11 20 <param name="wmode" value="transparent" /> 12 21 <param name="quality" value="high" /> 13 22 <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> 15 27 </object></a> 16 28 ] -
_plugins_/pub_banner/trunk/pubban_options.php
r49157 r49216 50 50 * Adresse du displayer de pub 51 51 */ 52 define('_PUBBAN_ADDS_DISPLAYER', $GLOBALS['meta']['adresse_site'].'/?page=pub_displayer');52 define('_PUBBAN_ADDS_DISPLAYER', 'pub_displayer'); 53 53 54 54 /** 55 55 * Adresse du cliqueur 56 56 */ 57 define('_PUBBAN_ADDS_CLICKER', $GLOBALS['meta']['adresse_site'].'/?page=clic');57 define('_PUBBAN_ADDS_CLICKER', 'clic'); 58 58 59 59 /** … … 142 142 */ 143 143 function pubban_recuperer_pub($id_pub, $str=false) { 144 include_spip('base/abstract_sql'); 144 145 $vals = array(); 145 146 if($id_pub != '0') { … … 201 202 */ 202 203 function pubban_recuperer_emplacement($id_empl, $str=false) { 204 include_spip('base/abstract_sql'); 203 205 $vals = array(); 204 206 if($id_empl != '0') { … … 233 235 */ 234 236 function pubban_recuperer_emplacement_par_nom($name) { 237 include_spip('base/abstract_sql'); 235 238 $_name = str_replace('_', ' ', strtolower($name)); 236 239 $id_empl = sql_getfetsel("id_empl", $GLOBALS['_PUBBAN_CONF']['table_empl'], "titre LIKE ('$name')", '', '', '', '', _BDD_PUBBAN); … … 240 243 241 244 function pubban_liste_empl($statut=false){ 245 include_spip('base/abstract_sql'); 242 246 $emplacements = array(); 243 247 if($statut AND !is_array($statut)) … … 255 259 function pubban_trouver_emplacements($id_pub){ 256 260 if($id_pub == '0') return; 261 include_spip('base/abstract_sql'); 257 262 $emplacements = array(); 258 263 $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.