Can't see Etology ads on my site

Discussion in 'PHP' started by dusco, Feb 21, 2008.

  1. #1
    Hello guys got a problem and i really know next to nothing when it comes to php so hoping i can get some sort of help with it, here it goes..

    I have been trying for a few days now to add Eology ads to my sites header.php and footer.php but for some reason the ads will not show up i do not get any error tho... I'll post the code below...

    Etology
    
    ?>
    <!--Start Etology Code-->
    <script language="javascript" type="text/javascript" charset="utf-8">
    et_ads_orientation = 'v';
    et_ads_width = '160';
    et_ads_height = '100';
    et_ads_bkgrd_color = '#E8E8E8';
    et_ads_border_color = '#FFFFFF';
    et_ads_border_size = '0';
    et_ads_cell_space = '6';
    et_ads_cell_pad = '6';
    et_ads_body_align = 'center';
    et_ads_head_font = 'Arial';
    et_ads_head_size = '6';
    et_ads_head_color = '#0000FF';
    et_ads_head_style = 'bold, normal, underline';
    et_ads_descr_font = 'Arial';
    et_ads_descr_size = '6';
    et_ads_descr_color = '#000000';
    et_ads_descr_style = 'normal, normal, none';
    et_ads_broker_link = 'show';
    et_ads_broker_text = 'Advertise Here';
    et_ads_broker_font = 'Arial';
    et_ads_broker_size = '4';
    et_ads_broker_color = '#000000';
    et_ads_broker_style = 'normal, normal, none';
    et_ads_broker_align = 'center';
    </script>
    <script language="javascript" type="text/javascript" charset="utf-8" src="http://pages.etology.com/js2/41524.php?view=v"></script>
    <!--End Etology Code-->
    <?php
    
    Code (markup):
    header.php
    <?php 
    /***************************************************************************
     *                      Part of PHP Krazy Image Host Script
     *														   Header Script
     *                            -------------------
     *   copyright            : Lappy512 @ krazyletter.com
     *   site                 : http://forums.krazyletter.com/index.php?showforum=59
     *
     ***************************************************************************/
    
    /***************************************************************************
     *
     *   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
     *   the Free Software Foundation; either version 2 of the License, or
     *   (at your option) any later version.
     *
     ***************************************************************************/
    
    /***************************************************************************
      *  This file has been modified by Threatcon for PHP Krazy Image Host Script
    ***************************************************************************/
    
    include "ctracker.php";
    include "online_users.php";
    include "conf_global.php";
    ?>
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title><?php echo $sitename; ?></title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
    <meta http-equiv="Expires" CONTENT="0">
    <meta http-equiv="Cache-Control" CONTENT="no-store">
    <meta http-equiv="Pragma" CONTENT="no-store">
    <link rel="shortcut icon" href="<?php echo $siteurl;?>favicon.ico" >
    <link rel="icon" href="<?php echo $siteurl;?>animated_favicon1.gif" type="image/gif" >
    <link href="<?php echo $siteurl;?>css.css" rel="stylesheet" type="text/css">
    
    <?php 
    //Start Ban system
    //Lets try connecting to mySQL
    @ $db = mysql_pconnect($mysql['host'], $mysql['user'], $mysql['pass'], $mysql['db']);
    
    //IT"S NOT WORKING!
    if (!$db)
    	{
    	 	echo "MySQL error connecting to the database.  Ensure your MySQL info in conf_global.php is correct.<br /><br />" . mysql_error();
    		die();
    	}
    
    //IT"S NOT WORKING!
    if (!mysql_select_db($mysql['db'],$db))
    	{
    	 	echo "MySQL error connecting to the database.  No database selected.<br /><br />" . mysql_error();
    		mysql_close($db);
    		die();
    	}
    
    $ban1 = mysql_query("SELECT ip FROM ban_ip");
    $ban2 = mysql_num_rows($ban1);
    if ($ban2)
    	{
    	 	for ($ctr = 1; $ban2 = mysql_fetch_array($ban1); $ctr++)
    			{
    			 	$deny_ip[$ctr] = $ban2[ip];
    			}
    	}
    else
    	{
    	 	$deny_ip = array();
    	}
    
    $_allowed = true;
    foreach($deny_ip as $dip)
    	{
    	 	$dip = str_replace('.','\.',$dip);
    		$dip = str_replace('*','[0-9]{1,3}',$dip);
    		$dip = str_replace('?','[0-9]{1}',$dip);
    		if(ereg("^{$dip}$", $_SERVER[REMOTE_ADDR])) $_allowed = false;
    	}
    if(!$_allowed)
    	{
    	 	echo '<table cellspacing="1" cellpadding="4" border="1" width="475" align="center"><tr><td align="center"><font style="font-weight: bold; color: #ff0000; font-size: 10pt; font-family: tahoma, Arial, Helvetica, sans-serif;" >** WARNING **<br /><br />You do not have access to this page.<br /></font><br /></td></tr></table>';
    		mysql_close($db);
    		die();
    	}
    // End Ban System
    
    if(isset($javascript)) { echo $javascript; }?>
    
    <script type="text/javascript" src="<?php echo $siteurl;?>javascript/dropdown.js"></script>
    <script type="text/javascript">
    /***********************************************
    * Dropdown java script
    * Single click to select code
    * Copyright (C) 2005 Ilya S. Lyubinskiy
    * Visit http://www.php-development.ru/javascripts/smart-forms.php for full source code
    ***********************************************/
    function highlight(field) {
    field.focus();
    field.select();
    }
    -->
    </script>
    
    <script type="text/javascript">
    /***********************************************
    * Disable "Enter" key in Form script- By Nurul Fadilah(nurul@REMOVETHISvolmedia.com)
    * This notice must stay intact for use
    * Visit http://www.dynamicdrive.com/dynamicindex16/disableenter.htm for full source code
    ***********************************************/
    function handleEnter (field, event) {
    		var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
    		if (keyCode == 13) {
    			var i;
    			for (i = 0; i < field.form.elements.length; i++)
    				if (field == field.form.elements[i])
    					break;
    			i = (i + 1) % field.form.elements.length;
    			field.form.elements[i].focus();
    			return false;
    		} 
    		else
    		return true;
    	}
    </script>
    
    <script type="text/javascript">
    /***********************************************
    * Form field Limiter script- By Dynamic Drive
    * This notice must stay intact for use
    * Visit http://www.dynamicdrive.com/dynamicindex16/limitinput.htm for full source code
    ***********************************************/
    var ns6=document.getElementById&&!document.all
    function restrictinput(maxlength,e,placeholder){
    if (window.event&&event.srcElement.value.length>=maxlength)
    return false
    else if (e.target&&e.target==eval(placeholder)&&e.target.value.length>=maxlength){
    var pressedkey=/[a-zA-Z0-9\.\,\/]/ //detect alphanumeric keys
    if (pressedkey.test(String.fromCharCode(e.which)))
    e.stopPropagation()
    }}
    function countlimit(maxlength,e,placeholder){
    var theform=eval(placeholder)
    var lengthleft=maxlength-theform.value.length
    var placeholderobj=document.all? document.all[placeholder] : document.getElementById(placeholder)
    if (window.event||e.target&&e.target==eval(placeholder)){
    if (lengthleft<0)
    theform.value=theform.value.substring(0,maxlength)
    placeholderobj.innerHTML=lengthleft
    }}
    function displaylimit(thename, theid, thelimit){
    var theform=theid!=""? document.getElementById(theid) : thename
    var limit_text='<b><span id="'+theform.toString()+'">'+thelimit+'</span></b> characters remaining.'
    if (document.all||ns6)
    document.write(limit_text)
    if (document.all){
    eval(theform).onkeypress=function(){ return restrictinput(thelimit,event,theform)}
    eval(theform).onkeyup=function(){ countlimit(thelimit,event,theform)}
    }
    else if (ns6){
    document.body.addEventListener('keypress', function(event) { restrictinput(thelimit,event,theform) }, true); 
    document.body.addEventListener('keyup', function(event) { countlimit(thelimit,event,theform) }, true); 
    }}
    </script>
    
    <script type="text/javascript">
    /***********************************************
    * "Accept terms" form submission- By Dynamic Drive
    * This notice must stay intact for use
    * Visit http://www.dynamicdrive.com/dynamicindex16/acceptterm.htm for full source code
    ***********************************************/
    var checkobj
    function agreesubmit(el){
    checkobj=el
    if (document.all||document.getElementById){
    for (i=0;i<checkobj.form.length;i++){  //hunt down submit button
    var tempobj=checkobj.form.elements[i]
    if(tempobj.type.toLowerCase()=="submit")
    tempobj.disabled=!checkobj.checked
    }}}
    function defaultagree(el){
    if (!document.all&&!document.getElementById){
    if (window.checkobj&&checkobj.checked)
    return true
    else{
    alert("Please read/accept terms to submit form")
    return false
    }}}
    </script>
    
    <script language="JavaScript" type="text/javascript">
    <!--
    /***********************************************
    * Required field(s) validation v1.10- By NavSurf
    * Visit Nav Surf at http://navsurf.com
    * This notice must stay intact for use
    * Visit http://www.dynamicdrive.com/dynamicindex16/requiredcheck.htm for full source code
    ***********************************************/
    function formCheck(formobj){
    	// Enter name of mandatory fields
    	var fieldRequired = Array("imagefile", "word", "searchterm");
    	// Enter field description to appear in the dialog box
    	var fieldDescription = Array("No image file specified to upload", "Validation code required", "Enter a search term");
    	// dialog message
    	var alertMsg = "Please complete the following fields:\n";
    	var l_Msg = alertMsg.length;
    	for (var i = 0; i < fieldRequired.length; i++){
    		var obj = formobj.elements[fieldRequired[i]];
    		if (obj){
    			switch(obj.type){
    			case "select-one":
    				if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){
    					alertMsg += " - " + fieldDescription[i] + "\n";
    				}
    				break;
    			case "select-multiple":
    				if (obj.selectedIndex == -1){
    					alertMsg += " - " + fieldDescription[i] + "\n";
    				}
    				break;
    			case "text":
    			case "textarea":
    				if (obj.value == "" || obj.value == null){
    					alertMsg += " - " + fieldDescription[i] + "\n";
    				}
    				break;
    			case "file":
    				if (obj.value == "" || obj.value == null){
    					alertMsg += " - " + fieldDescription[i] + "\n";
    				}
    				break;
    			default:
    			}
    			if (obj.type == undefined){
    				var blnchecked = false;
    				for (var j = 0; j < obj.length; j++){
    					if (obj[j].checked){
    						blnchecked = true;
    					}
    				}
    				if (!blnchecked){
    					alertMsg += " - " + fieldDescription[i] + "\n";
    				}
    			}
    		}
    	}
    
    	if (alertMsg.length == l_Msg){
    		return true;
    	}else{
    		alert(alertMsg);
    		return false;
    	}
    }
    // -->
    </script>
    
    </head>
    <body>
    <?php 
    //
    // Check for the _install.php file and disable the image hosting script until it is deleted
    //
    if (!$mysql['db'])
    	{
    	 	echo '<center>';
    		echo '<br /><br />Please <a href="../_install.php">Install</a> the MySQL database and create your conf_global.php file first!<br /><br />';
    		include "footer.php";
    		echo '</center>';
    		die();
    	}
    
    else if ( file_exists('_install.php') )
    	{
    	 	echo '<center>';
    		echo '<table bgcolor="#FFFF33" cellspacing="1" cellpadding="4" border="1" class="extra"><tr><td><br /><center><b>** WARNING **</b><br /><br />Please delete the <b>_install.php</b> file before continuing.<br /><br />Leaving this file on your server may pose a security issue.</center><br /><br /></td></tr></table>';
    		include "footer.php";
    		echo '</center>';
    		mysql_close($db);
    		die();
    	}
    
    echo '<center>';
    ?>
    Code (markup):
    footer.php
    <?php 
    
    /***************************************************************************
     *                      Part of PHP Krazy Image Host Script
     *														   Footer Script
     *                            -------------------
     *   copyright            : Lappy512 @ krazyletter.com
     *   site                 : http://forums.krazyletter.com/index.php?showforum=59
     *
     ***************************************************************************/
    
    /***************************************************************************
     *
     *   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
     *   the Free Software Foundation; either version 2 of the License, or
     *   (at your option) any later version.
     *
     ***************************************************************************/
    
    /***************************************************************************
      *  This file has been modified by Threatcon for PHP Krazy Image Host Script
    ***************************************************************************/
    include "conf_global.php";
    
    
    //If the index is disabled than disable the link
    if ($index != 1) 
    	{ 
    		echo '<br /><hr width="80%"><br /><font size="1"><a href="'.$siteurl.'index.php">Index Page</a>';
    	}
    else
    	{
    	 	echo '<br /><hr width="80%"><br /><font size="1"><a href="'.$siteurl.'index.php">Index Page</a>';
    	}
    
    
    //If the page is disabled than disable the link
    if ($reported != 1) 
    	{ 
    		echo '&nbsp;&nbsp;&nbsp;&nbsp;<a href="'.$siteurl.'reported.php">Reported Images</a>';
    	}
    else
    	{
    	 	echo '&nbsp;&nbsp;&nbsp;&nbsp;<a href="'.$siteurl.'reported.php">Reported Images</a>';
    	}
    
    //If view_all is disabled than disable the link
    if ($view_all != 1) 
    	{ 
    		echo '&nbsp;&nbsp;&nbsp;&nbsp;<a href="'.$siteurl.'view_all.php">Hosted Images</a>';
    	}
    else
    	{
    	 	echo '&nbsp;&nbsp;&nbsp;&nbsp;<a href="'.$siteurl.'view_all.php">Hosted Images</a>';
    	}
    
    //If uploading is disabled than disable the link
    if ($upload != 1) 
    	{ 
    		echo '&nbsp;&nbsp;&nbsp;&nbsp;<a href="'.$siteurl.'upload.php">Upload Image</a>';
    	}
    else
    	{
    	 	echo '&nbsp;&nbsp;&nbsp;&nbsp;<a href="'.$siteurl.'upload.php">Upload Image</a>';
    	}
    
    echo '<br /><br /><a href="'.$siteurl.'admin/admin.php">Admin Login</a>';
    
    /* To help support us, please don't remove our copyright, please. If you do, please at least donate to us! */
    echo '<br /><br />All content is Copyright &copy; '.date("Y").' <a href="" target="_blank"></a> and its original authors';
    echo '<br /><a href=""></a><br />';
    
    //Do not delete this line.  It is a cron job used to check if images need to be deleted
    //Images that are not viewed in xx days are deleted automatically.  Configure this in the Admin Control Panel
    echo '<img src="'.$siteurl.'includes/fakecron.php" width="0" height="0" border="0" alt="">';
    
    echo '</center>';
    echo '</body>';
    echo '</html>';
    
    ?>
    Code (markup):
     
    dusco, Feb 21, 2008 IP