[ Index ] |
|
Code source de e107 0.7.8 |
1 <?php 2 /* 3 + ----------------------------------------------------------------------------+ 4 | e107 website system 5 | 6 | ©Steve Dunstan 2001-2002 7 | http://e107.org 8 | jalist@e107.org 9 | 10 | Released under the terms and conditions of the 11 | GNU General Public License (http://gnu.org). 12 | 13 | $Source: /cvsroot/e107/e107_0.7/e107_plugins/banner_menu/banner_menu.php,v $ 14 | $Revision: 1.12 $ 15 | $Date: 2006/06/14 22:12:07 $ 16 | $Author: lisa_ $ 17 +----------------------------------------------------------------------------+ 18 */ 19 20 if (!defined('e107_INIT')) { exit; } 21 22 /* 23 To define your own banner to use here ... 24 25 1. Go to admin -> banners and create a campaign, then add your banner to it 26 2. Add this line to this file ... 27 28 $campaign = NAME_OF_YOUR_CAMPAIGN 29 30 3. Save file 31 */ 32 33 34 global $THEMES_DIRECTORY; 35 if (file_exists(THEME."banner_template.php")) { 36 require_once(THEME."banner_template.php"); 37 } else { 38 require_once(e_BASE.$THEMES_DIRECTORY."templates/banner_template.php"); 39 } 40 41 if(isset($campaign)){ 42 $parm = (isset($campaign) ? $campaign : ""); 43 $bannersccode = file_get_contents(e_FILE."shortcode/banner.sc"); 44 $BANNER = eval($bannersccode); 45 $txt = $BANNER_MENU_START; 46 $txt .= preg_replace("/\{(.*?)\}/e", '$\1', $BANNER_MENU); 47 $txt .= $BANNER_MENU_END; 48 49 }else{ 50 if (isset($menu_pref['banner_campaign']) && $menu_pref['banner_campaign']) 51 { 52 if(strstr($menu_pref['banner_campaign'], "|")) 53 { 54 $campaignlist = explode("|", $menu_pref['banner_campaign']); 55 $amount = ($menu_pref['banner_amount']<1 ? '1' : $menu_pref['banner_amount']); 56 $amount = ($amount > count($campaignlist) ? count($campaignlist) : $amount); 57 $keys = array_rand($campaignlist, $amount); 58 $parms = array(); 59 foreach($keys as $k=>$v){ 60 $parms[] = $campaignlist[$v]; 61 } 62 } 63 else 64 { 65 $parms[] = $menu_pref['banner_campaign']; 66 } 67 } 68 69 $txt = $BANNER_MENU_START; 70 foreach($parms as $parm){ 71 $bannersccode = file_get_contents(e_FILE."shortcode/banner.sc"); 72 $BANNER = eval($bannersccode); 73 $txt .= preg_replace("/\{(.*?)\}/e", '$\1', $BANNER_MENU); 74 } 75 $txt .= $BANNER_MENU_END; 76 } 77 78 $text = $txt; 79 80 if (isset($menu_pref['banner_rendertype']) && $menu_pref['banner_rendertype'] == 2) 81 { 82 $ns->tablerender($menu_pref['banner_caption'], $text); 83 } 84 else 85 { 86 echo $text; 87 } 88 89 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Apr 1 01:23:32 2007 | par Balluche grâce à PHPXref 0.7 |