Fix: missing google ad

This commit is contained in:
Regis Houssin 2010-04-18 14:43:47 +00:00
parent a897e62fd3
commit 3268dcbab8
3 changed files with 5 additions and 4 deletions

View File

@ -165,9 +165,9 @@ function donnefocus() {
<?php if ($main_google_ad_client) { ?> <?php if ($main_google_ad_client) { ?>
<div align="center"> <div align="center">
<script type="text/javascript"><!-- <script type="text/javascript"><!--
google_ad_client = <?php echo $conf->global->MAIN_GOOGLE_AD_CLIENT ?>; google_ad_client = "<?php echo $conf->global->MAIN_GOOGLE_AD_CLIENT ?>";
/* <?php echo $conf->global->MAIN_GOOGLE_AD_NAME; ?> */ /* <?php echo $conf->global->MAIN_GOOGLE_AD_NAME; ?> */
google_ad_slot = <?php echo $conf->global->MAIN_GOOGLE_AD_SLOT ?>; google_ad_slot = "<?php echo $conf->global->MAIN_GOOGLE_AD_SLOT ?>";
google_ad_width = <?php echo $conf->global->MAIN_GOOGLE_AD_WIDTH ?>; google_ad_width = <?php echo $conf->global->MAIN_GOOGLE_AD_WIDTH ?>;
google_ad_height = <?php echo $conf->global->MAIN_GOOGLE_AD_HEIGHT ?>; google_ad_height = <?php echo $conf->global->MAIN_GOOGLE_AD_HEIGHT ?>;
//--> //-->

View File

@ -206,7 +206,7 @@ function dol_loginfunction($langs,$conf,$mysoc)
$main_home=nl2br($conf->global->MAIN_HOME); $main_home=nl2br($conf->global->MAIN_HOME);
// Google AD // Google AD
$main_google_ad_client = (!empty($conf->global->MAIN_GOOGLE_AD_CLIENT)?1:0); $main_google_ad_client = ((! empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && ! empty($conf->global->MAIN_GOOGLE_AD_SLOT))?1:0);
$dol_loginmesg = $_SESSION["dol_loginmesg"]; $dol_loginmesg = $_SESSION["dol_loginmesg"];

View File

@ -1,6 +1,7 @@
<?php <?php
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2006-2009 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2006-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -269,7 +270,7 @@ if (! empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && ! empty($conf->global->MAIN
print '<div align="center">'."\n"; print '<div align="center">'."\n";
print '<script type="text/javascript"><!--'."\n"; print '<script type="text/javascript"><!--'."\n";
print 'google_ad_client = "'.$conf->global->MAIN_GOOGLE_AD_CLIENT.'";'."\n"; print 'google_ad_client = "'.$conf->global->MAIN_GOOGLE_AD_CLIENT.'";'."\n";
print '/* '.$conf->global->MAIN_GOOGLE_AD_WIDTH.'x'.$conf->global->MAIN_GOOGLE_AD_HEIGHT.', '.$conf->global->MAIN_GOOGLE_AD_NAME.' */'."\n"; print '/* '.$conf->global->MAIN_GOOGLE_AD_NAME.' */'."\n";
print 'google_ad_slot = "'.$conf->global->MAIN_GOOGLE_AD_SLOT.'";'."\n"; print 'google_ad_slot = "'.$conf->global->MAIN_GOOGLE_AD_SLOT.'";'."\n";
print 'google_ad_width = '.$conf->global->MAIN_GOOGLE_AD_WIDTH.';'."\n"; print 'google_ad_width = '.$conf->global->MAIN_GOOGLE_AD_WIDTH.';'."\n";
print 'google_ad_height = '.$conf->global->MAIN_GOOGLE_AD_HEIGHT.';'."\n"; print 'google_ad_height = '.$conf->global->MAIN_GOOGLE_AD_HEIGHT.';'."\n";