Jump to content

irishpeck

Members
  • Posts

    24
  • Joined

  • Last visited

Posts posted by irishpeck

  1. Hi Guys,

    I have a website that has a homepage without a title bar but the rest of the pages in the site do have it. I want to apply this same bar to the homepage can anyone help. See below the 3 main pieces of code:

    This is the code for the Header

    <?php
    ?><!DOCTYPE html>
    <!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
    <!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
    <!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
    <!--[if (gte IE 9)|!(IE)]><!--><html <?php language_attributes(); ?>> <!--<![endif]-->
    
    <!-- head -->
    <head>
    
    <!-- meta -->
    <meta charset="<?php bloginfo( 'charset' ); ?>" />
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    <?php if( mfn_opts_get('responsive') ) echo '<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">'; ?>
    
    <title><?php
    global $post;
    if( mfn_opts_get('mfn-seo') && is_object($post) && get_post_meta( get_the_ID(), 'mfn-meta-seo-title', true ) ){
        echo stripslashes( get_post_meta( get_the_ID(), 'mfn-meta-seo-title', true ) );
    } else {
        global $page, $paged;
        wp_title( '|', true, 'right' );
        bloginfo( 'name' );
        if ( $paged >= 2 || $page >= 2 ) echo ' | ' . sprintf( __( 'Page %s', 'bretheon' ), max( $paged, $page ) );
    }
    ?></title>
    
    <!-- stylesheet -->
    <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_url' ); ?>" media="all" />
    <?php do_action('wp_styles'); ?>
    
    <!-- wp_head() -->
    <link rel="shortcut icon" href="<?php mfn_opts_show('favicon-img',THEME_URI .'/images/favicon.ico'); ?>" type="image/x-icon" />    
    
    <?php if( is_single() ): ?>
    <script>var switchTo5x=true;</script>
    <script src="http://w.sharethis.com/button/buttons.js"></script>
    <script>stLight.options({publisher: "ur-6568e777-919c-a5dd-ac31-98a6fa2e6b2d"}); </script>
    <?php endif; ?>
    <?php do_action('wp_seo'); ?>
    
    <?php wp_head();?>
    </head>
    
    <!-- body -->
    <body <?php body_class(); ?>>    
        <div id="Wrapper">
        
             <?php
                get_template_part( 'includes/header', 'top-area' );
        
                 if( ! is_404() ){
                    $slider = false;
                    if( get_post_type()=='page' ) $slider = get_post_meta( get_the_ID(), 'mfn-post-slider', true );
                    
                    if( $slider ){
                        if( $slider == 'mfn-offer-slider' ){
                            // Mfn Offer Slider
                            get_template_part( 'includes/header', 'offer-slider' );
                        } else {
                            // Revolution Slider
                            echo '<div id="mfn-rev-slider">';
                                putRevSlider( $slider );
                            echo '</div>';
                        }
                    } elseif( trim( wp_title( '', false ) ) ){
                        // Page title
                        echo '<div id="Subheader">';
                            echo '<div class="container">';
                                echo '<div class="sixteen columns">';
                                    if( get_post_type()=='page' || is_single() ){
                                        echo '<h1>'. $post->post_title .'</h1>';
                                    } else {
                                        echo '<h1>'. trim( wp_title( '', false ) ) .'</h1>';
                                    }
                                    mfn_breadcrumbs();
                                echo '</div>';
                            echo '</div>';
                        echo '</div>';
                    }
                }
            ?>



    This is the code for the Index page which is the homepage

    <?php
    
    get_header();
    $sidebar = mfn_sidebar_classes();
    ?>
    
    <!-- #Content -->
    <div id="Content">
        <div class="container">
    
            <!-- .content -->
            <?php
                if( $sidebar ) echo '<div class="content">';
                echo '<div class="the_content the_content_wrapper">';
                
                while ( have_posts() )
                {
                    the_post();
                    get_template_part( 'includes/content', get_post_type() );
                }
                
                // pagination
                if(function_exists( 'mfn_pagination' )):
                    mfn_pagination();
                else:
                ?>
                    <div class="nav-next"><?php next_posts_link(__('← Older Entries', 'bretheon')) ?></div>
                    <div class="nav-previous"><?php previous_posts_link(__('Newer Entries →', 'bretheon')) ?></div>
                <?php
                endif;
                
                echo '</div>';
                if( $sidebar ){
                    echo '</div>';
                } else {
                    echo '<div class="clearfix"></div>';
                }
            ?>    
            
            <!-- Sidebar -->
            <?php
                if( $sidebar ){
                    get_sidebar( 'blog' );
                }
            ?>
    
        </div>
    </div>
    
    
    <?php get_footer(); ?>



    This is the code for the inner pages which contain the title bar

    <?php
    
    get_header();
    $sidebar = mfn_sidebar_classes();
    ?>
        
    <!-- Content -->
    <div id="Content">
        <div class="container">
    
            <!-- .content -->
            <?php
                if( $sidebar ) echo '<div class="content">';
                
                while ( have_posts() )
                {
                    the_post();
                    get_template_part( 'includes/content', 'page' );
                }
    
                if( $sidebar ){
                    echo '</div>';
                } else {
                    echo '<div class="clearfix"></div>';
                }
            ?>    
            
            <!-- Sidebar -->
            <?php
                if( $sidebar ){
                    get_sidebar();
                }
            ?>
    
        </div>
    </div>
    
    <?php get_footer(); ?>

     

  2. Hey thanks ive done that and its still not submitting any ideas on how to just get the form to submit to my designated email address for the time being. Il worry about the validation later i just need to get it submitting now. And thanks so much in advance i appreciate all the people on this helping us "Noobs"

  3. Hi Guys i have a form on the website http://www.wewilbuyyourcar.ie this is a html form that i need to validate and submit and then show a certain page. I think everything is working except for the js any ideas?

     

    This is my form!!

    <div id="contact_form">
    					  <form id="contact" action="process.php">
    						<fieldset>
    
    
    <TR><TD><TABLE BORDER="0" CELLPADDING="3" CELLSPACING="0" WIDTH="50%">
    
    <FORM ACTION="" METHOD="post" name="sellcarform" onsubmit="" >
    <TR><TD CLASS="tableBlueBody" ALIGN="right">* <B>First Name</B></TD><TD CLASS="tableBlueBody" STYLE="border-right : 1px solid #CCCCCC;" ALIGN="left"><INPUT  TYPE="Text" NAME="firstname" MAXLENGTH="150"></TD><TD CLASS="tableBlueBody" ALIGN="right">* <B>Last Name</B></TD><TD CLASS="tableBlueBody" ALIGN="center"><INPUT TYPE="Text" NAME="lastname"  MAXLENGTH="150"></TD></TR>
    <TR><TD CLASS="tableBlueBody" ALIGN="right"><B>Address</B></TD><TD CLASS="tableBlueBody" STYLE="border-right : 1px solid #CCCCCC;" ALIGN="left"><INPUT TYPE="Text" NAME="AddressLine1" MAXLENGTH="150"></TD><TD CLASS="tableBlueBody" ALIGN="right">* <B>Email</B></TD><TD CLASS="tableBlueBody" ALIGN="center"><INPUT TYPE="Text" NAME="email" MAXLENGTH="150"></TD></TR>
    <TR><TD CLASS="tableBlueBody" ALIGN="right"><B>City</B></TD><TD CLASS="tableBlueBody" STYLE="border-right : 1px solid #CCCCCC;" ALIGN="left"><INPUT TYPE="Text" NAME="City" MAXLENGTH="150"></TD><TD CLASS="tableBlueBody" ALIGN="right">* <B>Phone</B></TD><TD CLASS="tableBlueBody" ALIGN="center"><INPUT TYPE="Text" NAME="phone" MAXLENGTH="150"></TD></TR>
    <TR><TD CLASS="tableBlueBody" ALIGN="right"><B>Country</B></TD><TD CLASS="tableBlueBody" STYLE="border-right : 1px solid #CCCCCC;" ALIGN="left">
    
    
    <select name="CountryID">
    
    	<option value="1"
    
    	>Albania</option>
    
    	<option value="2"
    
    	>Algeria</option>
    
    	<option value="3"
    
    	>American Samoa</option> etc...
    
    </select>
    
    
    </TD><TD CLASS="tableBlueBody" ALIGN="right"><B>Fax</B></TD><TD CLASS="tableBlueBody" ALIGN="center"><INPUT TYPE="Text" NAME="fax" MAXLENGTH="150"></TD></TR>
    
    <TR><TD COLSPAN="4" CLASS="tableBlueBody"> </TD></TR>
    <TR><TD CLASS="tableBlueBody" ALIGN="right" VALIGN="top">
    
    
    <B>Comments</B>
    
    
    
    
    
    </TD><TD COLSPAN="3" CLASS="tableBlueBody" ALIGN="left">
    
    <TEXTAREA NAME="comment" ROWS="7" COLS="45" ></TEXTAREA>
    
    
    </TD></TR>
    
    </TD><TD COLSPAN="5" CLASS="tableBlueBody" ALIGN="left">
    
    
    <TR><TD CLASS="tableBlueBody" ALIGN="right">* <B>Registration Number</B></TD><TD CLASS="tableBlueBody" STYLE="border-right : 1px solid #CCCCCC;" ALIGN="left"><INPUT  TYPE="Text" NAME="regnumber" MAXLENGTH="150"></TD><TD CLASS="tableBlueBody" ALIGN="right">* <B>Colour</B></TD><TD CLASS="tableBlueBody" ALIGN="center"><INPUT TYPE="Text" NAME="colour"  MAXLENGTH="150"></TD></TR>
    <TR><TD CLASS="tableBlueBody" ALIGN="right">* <B>Car Make</B></TD><TD CLASS="tableBlueBody" STYLE="border-right : 1px solid #CCCCCC;" ALIGN="left"><INPUT TYPE="Text" NAME="carmake" MAXLENGTH="150"></TD><TD CLASS="tableBlueBody" ALIGN="right">* <B>Has the vehicle been used as a taxi?</B></TD><TD CLASS="tableBlueBody" ALIGN="center"><input type='radio' value="Yes" name='question1' /> Yes <input name='question1' type="radio" value="No" checked /> No</TD></TR>
    <TR><TD CLASS="tableBlueBody" ALIGN="right">* <B>Model</B></TD><TD CLASS="tableBlueBody" STYLE="border-right : 1px solid #CCCCCC;" ALIGN="left"><INPUT TYPE="Text" NAME="model" MAXLENGTH="150"></TD><TD CLASS="tableBlueBody" ALIGN="right">* <B>Is finance outstanding on the vehicle?</B></TD><TD CLASS="tableBlueBody" ALIGN="center"><input type='radio' value="Yes" name='question2' /> Yes <input name='question2' type="radio" value="No" checked /> No</TD></TR>
    <TR><TD CLASS="tableBlueBody" ALIGN="right">* <B>Milage / Kms</B></TD><TD CLASS="tableBlueBody" STYLE="border-right : 1px solid #CCCCCC;" ALIGN="left"><INPUT TYPE="Text" NAME="milage" MAXLENGTH="150"></TD><TD CLASS="tableBlueBody" ALIGN="right">* <B>How did you hear about us?</B></TD><TD CLASS="tableBlueBody" ALIGN="center"><select name="question3"><option value="Other">Other</option><option value="Web">Web</option><option value="Newspaper">Newspaper</option><option value="Radio">Radio</option><option value="Recommended">Recommended</option></select></TD></TR>
    <TR><TD COLSPAN="2" CLASS="tableBlueBody" STYLE="border-bottom : 1px solid #CCCCCC; border-right : 1px solid #CCCCCC;"> </TD><TD COLSPAN="2" CLASS="tableBlueBody" STYLE="border-bottom : 1px solid #CCCCCC;"> </TD></TR>
    
    
    
    <TR><TD COLSPAN="4" ALIGN="left"><input type="submit" value="Click here to send us your information" class='contactFormSubmit'></TD></TR>
    </FORM></TABLE>
    </TD></TR></TABLE><BR></TD>
    <TD><IMG SRC="images/spacer.gif" WIDTH="8" HEIGHT="1" BORDER="0" ALT=""></TD>
    <TD WIDTH="183" VALIGN="top">
    </TD></TR></TABLE>
    
    						</fieldset>
    					  </form><br />
    				</div><!-- end of #contact_form -->
    

     

    This is my process.php file!!

    <?php 
        $emailTo = 'sakura-designs@hotmail.com';
        $subject = 'We Will Buy Your Car.ie Form Submission';
        $firstname=$_POST['firstname'];
        $lastname=$_POST['lastname'];
        $email=$_POST['email'];
        $AddressLine1=$_POST['AddressLine1'];
        $City=$_POST['City'];
        $phone=$_POST['phone'];
        $CountryID=$_POST['CountryID'];
        $fax=$_POST['fax'];
        $comment=$_POST['comment'];
        $regnumber=$_POST['regnumber'];
        $colour=$_POST['colour'];
        $carmake=$_POST['carmake'];
        $question1=$_POST['question1'];
        $model=$_POST['model'];
        $question2=$_POST['question2'];
        $milage=$_POST['milage'];
        $question3=$_POST['question3'];
        
        $body = "First Name: $firstname \n\nLast Name: $lastname \n\nEmail: $email \n\nAddress: $AddressLine1 \n\nCity: $city \n\nPhone: $phone \n\nCountry: $CountryID \n\nFax: $fax \n\nComment: $comment \n\nReg Number: $regnumber \n\nColour: $colour \n\nCar Make: $carmake \n\nQuestion1: $question1 \n\nModel: $model \n\nQuestion2: $question2 \n\nMilage: $milage \n\nQuestion3: $question3";
        $headers = 'From: '.$name.' <'.$email.'>' . "\r\n" . 'Reply-To: ' . $email;
        
        mail($emailTo, $subject, $body);
        header( "Location: http://www.wewillbuyyourcar.ie/thankyou.html" );
    ?>

     

    And this is my contact1.js file!!

    $(document).ready( function() {
    $('.error').hide();
    $('.but').click( function() {
    
    	var fname = document.getElementById('firstname');
    	var lname = document.getElementById('lastname');
    	var email = document.getElementById('email');
    	var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
    	var AddressLine1 = document.getElementById('AddressLin1');
    	var city = document.getElementById('city');
    	var phone = document.getElementById('phone');
    	var CountryID = document.getElementById('CountryID');
    	var fax = document.getElementById('fax');
    	var comment = document.getElementById('comment');
    	var regnumber = document.getElementById('regnumber');
    	var colour = document.getElementById('colour');
    	var carmake = document.getElementById('carmake');
    	var question1 = document.getElementById('question1');
    	var model = document.getElementById('model');
    	var question2 = document.getElementById('question2');
    	var milage = document.getElementById('milage');
    	var question3 = document.getElementById('question3');
    
    	if(fname.val() != '' && lname.val() != '') {
    		if(email.val() != '' && emailReg.match.exp) {
    			if(comment != '') {
    				$('#comment_error').show();
    				comment.focus();
    				return false;
    			} else {
    
    				var dataString = 'name='+ fname + lname +'&email=' + email + '&comment=' + comment;
    				//alert (dataString);return false;
    
      				$ajax({
         					 type: "POST",
         					 url: "process.php",
         					 data: dataString,
         					 success: function() {
         					   $('#contact_form').html("<div id='message'></div>");
         					   $('#message').html("<strong>Contact Form Submitted!</strong>")
         					   .append("<p>We will be in touch soon.</p>")
         					   .hide()
         					   .fadeIn(1500, function() {
         					     jQuery('#message');
         					   });
         					}
        				});
    
    			}
    		} else {
    			$('#email_error').show();
    			email.focus();
    			return false;
    		}
    	} else {
    		$('#name_error').show();
    		fname.focus();
    		return false;
    	}
    
    });
    
    });

     

    Thanks for all your help in advance and Merry Christmas

  4. Sorry i forgot this code aswell called contact.js

    $(document).ready( function() {
    $('.error').hide();
    $('.but').click( function() {
    
    	var fname = document.getElementById('firstname');
    	var lname = document.getElementById('lastname');
    	var email = document.getElementById('email');
    	var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
    	var comment = document.getElementById('comment');
    
    	if(fname.val() != '' && lname.val() != '') {
    		if(email.val() != '' && emailReg.match.exp) {
    			if(comment != '') {
    				$('#comment_error').show();
    				comment.focus();
    				return false;
    			} else {
    
    				var dataString = 'name='+ fname + lname +'&email=' + email + '&comment=' + comment;
    				//alert (dataString);return false;
    
      				$ajax({
         					 type: "POST",
         					 url: "process.php",
         					 data: dataString,
         					 success: function() {
         					   $('#contact_form').html("<div id='message'></div>");
         					   $('#message').html("<strong>Contact Form Submitted!</strong>")
         					   .append("<p>We will be in touch soon.</p>")
         					   .hide()
         					   .fadeIn(1500, function() {
         					     jQuery('#message');
         					   });
         					}
        				});
    
    			}
    		} else {
    			$('#email_error').show();
    			email.focus();
    			return false;
    		}
    	} else {
    		$('#name_error').show();
    		fname.focus();
    		return false;
    	}
    
    });
    
    });

     

  5. Hi Guys,

     

    I have a form on a website http://www.wewillbuyyourcar.ie/sellyourcar.html. This form has several fields and all fields need to be submitted to a designated email address on submission. To be honest im not sure where im at with it i cant get it to submit so i need some help to validate it and submit and then maybe display a html page to the user like thankyou.html. Heres the code needed.

     

    This is the form

    <div id="contact_form">
    					  <form id="contact" action="process.php">
    						<fieldset>
    
    
    <TR><TD><TABLE BORDER="0" CELLPADDING="3" CELLSPACING="0" WIDTH="50%">
    
    <FORM ACTION="" METHOD="post" name="sellcarform" onsubmit="" >
    <TR><TD CLASS="tableBlueBody" ALIGN="right">* <B>First Name</B></TD><TD CLASS="tableBlueBody" STYLE="border-right : 1px solid #CCCCCC;" ALIGN="left"><INPUT  TYPE="Text" NAME="firstname" MAXLENGTH="150"></TD><TD CLASS="tableBlueBody" ALIGN="right">* <B>Last Name</B></TD><TD CLASS="tableBlueBody" ALIGN="center"><INPUT TYPE="Text" NAME="lastname"  MAXLENGTH="150"></TD></TR>
    <TR><TD CLASS="tableBlueBody" ALIGN="right"><B>Address</B></TD><TD CLASS="tableBlueBody" STYLE="border-right : 1px solid #CCCCCC;" ALIGN="left"><INPUT TYPE="Text" NAME="AddressLine1" MAXLENGTH="150"></TD><TD CLASS="tableBlueBody" ALIGN="right">* <B>Email</B></TD><TD CLASS="tableBlueBody" ALIGN="center"><INPUT TYPE="Text" NAME="email" MAXLENGTH="150"></TD></TR>
    <TR><TD CLASS="tableBlueBody" ALIGN="right"><B>City</B></TD><TD CLASS="tableBlueBody" STYLE="border-right : 1px solid #CCCCCC;" ALIGN="left"><INPUT TYPE="Text" NAME="City" MAXLENGTH="150"></TD><TD CLASS="tableBlueBody" ALIGN="right">* <B>Phone</B></TD><TD CLASS="tableBlueBody" ALIGN="center"><INPUT TYPE="Text" NAME="phone" MAXLENGTH="150"></TD></TR>
    <TR><TD CLASS="tableBlueBody" ALIGN="right"><B>Country</B></TD><TD CLASS="tableBlueBody" STYLE="border-right : 1px solid #CCCCCC;" ALIGN="left">
    
    
    <select name="CountryID">
    
    	<option value="1"
    
    	>Albania</option>
    
    	<option value="2"
    
    	>Algeria</option>
    
    	<option value="3"
    
    	>American Samoa</option>
    
    	<option value="4"
    
    	>Andorra</option>
    
    	<option value="5"
    
    	>Anguilla</option>
    
    	<option value="6"
    
    	>Antartica</option>
    
    	<option value="7"
    
    	>Antigua & Barbuda</option>
    
    	<option value="8"
    
    	>Argentina</option>
    
    	<option value="9"
    
    	>Armenia</option>
    
    	<option value="10"
    
    	>Aruba</option>
    
    	<option value="11"
    
    	>Australia</option>
    
    	<option value="12"
    
    	>Austria</option>
    
    	<option value="13"
    
    	>Azerbaijan</option>
    
    	<option value="14"
    
    	>Bahamas</option>
    
    	<option value="15"
    
    	>Bahrain</option>
    
    	<option value="16"
    
    	>Bangladesh</option>
    
    	<option value="17"
    
    	>Barbados</option>
    
    	<option value="18"
    
    	>Belarus</option>
    
    	<option value="19"
    
    	>Belgium</option>
    
    	<option value="20"
    
    	>Belize</option>
    
    	<option value="21"
    
    	>Benin</option>
    
    	<option value="22"
    
    	>Bermuda</option>
    
    	<option value="23"
    
    	>Bhutan</option>
    
    	<option value="24"
    
    	>Bolivia</option>
    
    	<option value="25"
    
    	>Botswana</option>
    
    	<option value="26"
    
    	>Bouvet Island</option>
    
    	<option value="27"
    
    	>Brazil</option>
    
    	<option value="28"
    
    	>British Indian Ocean Terr.</option>
    
    	<option value="29"
    
    	>Brunei Darussalam</option>
    
    	<option value="30"
    
    	>Bulgaria</option>
    
    	<option value="31"
    
    	>Burkina Faso</option>
    
    	<option value="32"
    
    	>Burundi</option>
    
    	<option value="33"
    
    	>Cambodia</option>
    
    	<option value="34"
    
    	>Cameroon</option>
    
    	<option value="35"
    
    	>Canada</option>
    
    	<option value="36"
    
    	>Cape Verde</option>
    
    	<option value="37"
    
    	>Cayman Islands</option>
    
    	<option value="38"
    
    	>Central African Republic</option>
    
    	<option value="39"
    
    	>Chad</option>
    
    	<option value="40"
    
    	>Chile</option>
    
    	<option value="41"
    
    	>China</option>
    
    	<option value="42"
    
    	>Christmas Island</option>
    
    	<option value="43"
    
    	>Cocos (Keeling) Isl</option>
    
    	<option value="44"
    
    	>Colombia</option>
    
    	<option value="45"
    
    	>Comoros</option>
    
    	<option value="46"
    
    	>Congo</option>
    
    	<option value="47"
    
    	>Cook Isl</option>
    
    	<option value="48"
    
    	>Costa Rica</option>
    
    	<option value="49"
    
    	>Cote D'Ivoire</option>
    
    	<option value="50"
    
    	>Croatia</option>
    
    	<option value="51"
    
    	>Cyprus</option>
    
    	<option value="52"
    
    	>Czech Republic</option>
    
    	<option value="53"
    
    	>Denmark</option>
    
    	<option value="54"
    
    	>Djibouti</option>
    
    	<option value="55"
    
    	>Dominica</option>
    
    	<option value="56"
    
    	>Dominican Republic</option>
    
    	<option value="57"
    
    	>East Timor</option>
    
    	<option value="58"
    
    	>Ecuador</option>
    
    	<option value="59"
    
    	>Egypt</option>
    
    	<option value="60"
    
    	>El Salvador</option>
    
    	<option value="61"
    
    	>Equatorial Guinea</option>
    
    	<option value="62"
    
    	>Estonia</option>
    
    	<option value="63"
    
    	>Ethiopia</option>
    
    	<option value="64"
    
    	>Faeroe Islands</option>
    
    	<option value="65"
    
    	>Falkland Isl. (Malvinas)</option>
    
    	<option value="66"
    
    	>Fiji</option>
    
    	<option value="67"
    
    	>Finland</option>
    
    	<option value="68"
    
    	>France</option>
    
    	<option value="69"
    
    	>French Guiana</option>
    
    	<option value="70"
    
    	>French Polynesia</option>
    
    	<option value="71"
    
    	>French Southern Terr.</option>
    
    	<option value="72"
    
    	>Gabon</option>
    
    	<option value="73"
    
    	>Gambia</option>
    
    	<option value="74"
    
    	>Georgia</option>
    
    	<option value="75"
    
    	>Germany</option>
    
    	<option value="76"
    
    	>Ghana</option>
    
    	<option value="77"
    
    	>Gibraltar</option>
    
    	<option value="78"
    
    	>Greece</option>
    
    	<option value="79"
    
    	>Greenland</option>
    
    	<option value="80"
    
    	>Grenada</option>
    
    	<option value="81"
    
    	>Guadeloupe</option>
    
    	<option value="82"
    
    	>Guam</option>
    
    	<option value="83"
    
    	>Guatemala</option>
    
    	<option value="84"
    
    	>Guernsey C.I.</option>
    
    	<option value="85"
    
    	>Guinea</option>
    
    	<option value="86"
    
    	>Guinea-Bissau</option>
    
    	<option value="87"
    
    	>Guyana</option>
    
    	<option value="88"
    
    	>Haiti</option>
    
    	<option value="89"
    
    	>Heard and McDonald Isl</option>
    
    	<option value="90"
    
    	>Honduras</option>
    
    	<option value="91"
    
    	>Hong Kong</option>
    
    	<option value="92"
    
    	>Hungary</option>
    
    	<option value="93"
    
    	>Iceland</option>
    
    	<option value="94"
    
    	>India</option>
    
    	<option value="95"
    
    	>Indonesia</option>
    
    	<option value="96"
    		selected			
    	>Ireland</option>
    
    	<option value="97"
    
    	>Isle of Man</option>
    
    	<option value="98"
    
    	>Israel</option>
    
    	<option value="99"
    
    	>Italy</option>
    
    	<option value="100"
    
    	>Jamaica</option>
    
    	<option value="101"
    
    	>Japan</option>
    
    	<option value="102"
    
    	>Jersey C.I.</option>
    
    	<option value="103"
    
    	>Jordan</option>
    
    	<option value="104"
    
    	>Kazakhstan</option>
    
    	<option value="105"
    
    	>Kenya</option>
    
    	<option value="106"
    
    	>Kiribati</option>
    
    	<option value="107"
    
    	>Korea Republic of</option>
    
    	<option value="108"
    
    	>Kuwait</option>
    
    	<option value="109"
    
    	>Kyrgyzstan</option>
    
    	<option value="110"
    
    	>Laos</option>
    
    	<option value="111"
    
    	>Latvia</option>
    
    	<option value="112"
    
    	>Lebanon</option>
    
    	<option value="113"
    
    	>Lesotho</option>
    
    	<option value="114"
    
    	>Liberia</option>
    
    	<option value="115"
    
    	>Liechtenstein</option>
    
    	<option value="116"
    
    	>Lithuania</option>
    
    	<option value="117"
    
    	>Luxemborg</option>
    
    	<option value="118"
    
    	>Macau</option>
    
    	<option value="119"
    
    	>Madagascar</option>
    
    	<option value="120"
    
    	>Malawi</option>
    
    	<option value="121"
    
    	>Malaysia</option>
    
    	<option value="122"
    
    	>Maldives</option>
    
    	<option value="123"
    
    	>Mali</option>
    
    	<option value="124"
    
    	>Malta</option>
    
    	<option value="125"
    
    	>Marshall Isl</option>
    
    	<option value="126"
    
    	>Martinique</option>
    
    	<option value="127"
    
    	>Mauritania</option>
    
    	<option value="128"
    
    	>Mauritius</option>
    
    	<option value="129"
    
    	>Mexico</option>
    
    	<option value="130"
    
    	>Micronesia</option>
    
    	<option value="131"
    
    	>Moldova Republic of</option>
    
    	<option value="132"
    
    	>Monaco</option>
    
    	<option value="133"
    
    	>Mongolia</option>
    
    	<option value="134"
    
    	>Montserrat</option>
    
    	<option value="135"
    
    	>Morocco</option>
    
    	<option value="136"
    
    	>Mozambique</option>
    
    	<option value="137"
    
    	>Myanmar</option>
    
    	<option value="138"
    
    	>Namibia</option>
    
    	<option value="139"
    
    	>Nauru</option>
    
    	<option value="140"
    
    	>Nepal</option>
    
    	<option value="141"
    
    	>Netherland Antilles</option>
    
    	<option value="142"
    
    	>Netherlands</option>
    
    	<option value="143"
    
    	>New Caledonia</option>
    
    	<option value="144"
    
    	>New Zealand</option>
    
    	<option value="145"
    
    	>Nicaragua</option>
    
    	<option value="146"
    
    	>Niger</option>
    
    	<option value="147"
    
    	>Nigeria</option>
    
    	<option value="148"
    
    	>Niue</option>
    
    	<option value="149"
    
    	>Norfolk Isl</option>
    
    	<option value="150"
    
    	>Northern Mariana Isl</option>
    
    	<option value="151"
    
    	>Norway</option>
    
    	<option value="152"
    
    	>Oman</option>
    
    	<option value="153"
    
    	>Pakistan</option>
    
    	<option value="154"
    
    	>Palau</option>
    
    	<option value="155"
    
    	>Panama</option>
    
    	<option value="156"
    
    	>Panama Canal Zone</option>
    
    	<option value="157"
    
    	>Papua New Guinea</option>
    
    	<option value="158"
    
    	>Paraguay</option>
    
    	<option value="159"
    
    	>Peru</option>
    
    	<option value="160"
    
    	>Philippines</option>
    
    	<option value="161"
    
    	>Pitcairn</option>
    
    	<option value="162"
    
    	>Poland</option>
    
    	<option value="163"
    
    	>Portugal</option>
    
    	<option value="164"
    
    	>Puerto Rico</option>
    
    	<option value="165"
    
    	>Qatar</option>
    
    	<option value="166"
    
    	>Rest of World</option>
    
    	<option value="167"
    
    	>Reunion</option>
    
    	<option value="168"
    
    	>Romania</option>
    
    	<option value="169"
    
    	>Russian Federation</option>
    
    	<option value="170"
    
    	>Rwanda</option>
    
    	<option value="171"
    
    	>Saint Kitts & Nevis</option>
    
    	<option value="172"
    
    	>Saint Lucia</option>
    
    	<option value="173"
    
    	>Samoa</option>
    
    	<option value="174"
    
    	>San Marino</option>
    
    	<option value="175"
    
    	>Sao Tome & Principe</option>
    
    	<option value="176"
    
    	>Saudi Arabia</option>
    
    	<option value="177"
    
    	>Senegal</option>
    
    	<option value="178"
    
    	>Seychelles</option>
    
    	<option value="179"
    
    	>Sierra Leone</option>
    
    	<option value="180"
    
    	>Singapore</option>
    
    	<option value="181"
    
    	>Slovakia</option>
    
    	<option value="182"
    
    	>Slovenia</option>
    
    	<option value="183"
    
    	>Solomon Islands</option>
    
    	<option value="184"
    
    	>Somalia</option>
    
    	<option value="185"
    
    	>South Africa</option>
    
    	<option value="186"
    
    	>Spain</option>
    
    	<option value="187"
    
    	>Sri Lanka</option>
    
    	<option value="188"
    
    	>St. Helena</option>
    
    	<option value="189"
    
    	>St. Pierre and Miquelon</option>
    
    	<option value="190"
    
    	>St. Vincent & Grenadines</option>
    
    	<option value="191"
    
    	>Suriname</option>
    
    	<option value="192"
    
    	>Svalbard & Jan Mayen Isl</option>
    
    	<option value="193"
    
    	>Swaziland</option>
    
    	<option value="194"
    
    	>Sweden</option>
    
    	<option value="195"
    
    	>Switzerland</option>
    
    	<option value="196"
    
    	>Taiwan</option>
    
    	<option value="197"
    
    	>Tajikistan</option>
    
    	<option value="198"
    
    	>Tanzania United Republic</option>
    
    	<option value="199"
    
    	>Thailand</option>
    
    	<option value="200"
    
    	>Togo</option>
    
    	<option value="201"
    
    	>Tokelau</option>
    
    	<option value="202"
    
    	>Tonga</option>
    
    	<option value="203"
    
    	>Trinidad & Tobago</option>
    
    	<option value="204"
    
    	>Tunisia</option>
    
    	<option value="205"
    
    	>Turkey</option>
    
    	<option value="206"
    
    	>Turkmenistan</option>
    
    	<option value="207"
    
    	>Turks and Caicos Isl</option>
    
    	<option value="208"
    
    	>Tuvalu</option>
    
    	<option value="209"
    
    	>U.A.E.</option>
    
    	<option value="210"
    
    	>U.S.Minor Outlying Isl</option>
    
    	<option value="211"
    
    	>Uganda</option>
    
    	<option value="212"
    
    	>Ukraine</option>
    
    	<option value="213"
    
    	>United Kingdom</option>
    
    	<option value="214"
    
    	>United States</option>
    
    	<option value="215"
    
    	>Uruguay</option>
    
    	<option value="216"
    
    	>Uzbekistan</option>
    
    	<option value="217"
    
    	>Vanuatu</option>
    
    	<option value="218"
    
    	>Vatican City State</option>
    
    	<option value="219"
    
    	>Venezuela</option>
    
    	<option value="220"
    
    	>Viet Nam</option>
    
    	<option value="221"
    
    	>Virgin Isl (British)</option>
    
    	<option value="222"
    
    	>Virgin Isl (U.S.)</option>
    
    	<option value="223"
    
    	>Wallis & Futuna Islands</option>
    
    	<option value="224"
    
    	>Western Sahara</option>
    
    	<option value="225"
    
    	>Yemen Republic of</option>
    
    	<option value="226"
    
    	>Zaire</option>
    
    	<option value="227"
    
    	>Zambia</option>
    
    	<option value="228"
    
    	>Zimbabwe</option>
    
    </select>
    
    
    
    
    </TD><TD CLASS="tableBlueBody" ALIGN="right"><B>Fax</B></TD><TD CLASS="tableBlueBody" ALIGN="center"><INPUT TYPE="Text" NAME="fax" MAXLENGTH="150"></TD></TR>
    
    <TR><TD COLSPAN="4" CLASS="tableBlueBody"> </TD></TR>
    <TR><TD CLASS="tableBlueBody" ALIGN="right" VALIGN="top">
    
    
    <B>Comments</B>
    
    
    
    
    
    </TD><TD COLSPAN="3" CLASS="tableBlueBody" ALIGN="left">
    
    <TEXTAREA NAME="comment" ROWS="7" COLS="45" ></TEXTAREA>
    
    
    </TD></TR>
    
    </TD><TD COLSPAN="5" CLASS="tableBlueBody" ALIGN="left">
    
    
    <TR><TD CLASS="tableBlueBody" ALIGN="right">* <B>Registration Number</B></TD><TD CLASS="tableBlueBody" STYLE="border-right : 1px solid #CCCCCC;" ALIGN="left"><INPUT  TYPE="Text" NAME="regnumber" MAXLENGTH="150"></TD><TD CLASS="tableBlueBody" ALIGN="right">* <B>Colour</B></TD><TD CLASS="tableBlueBody" ALIGN="center"><INPUT TYPE="Text" NAME="colour"  MAXLENGTH="150"></TD></TR>
    <TR><TD CLASS="tableBlueBody" ALIGN="right">* <B>Car Make</B></TD><TD CLASS="tableBlueBody" STYLE="border-right : 1px solid #CCCCCC;" ALIGN="left"><INPUT TYPE="Text" NAME="carmake" MAXLENGTH="150"></TD><TD CLASS="tableBlueBody" ALIGN="right">* <B>Has the vehicle been used as a taxi?</B></TD><TD CLASS="tableBlueBody" ALIGN="center"><input type='radio' value="Yes" name='question1' /> Yes <input name='question1' type="radio" value="No" checked /> No</TD></TR>
    <TR><TD CLASS="tableBlueBody" ALIGN="right">* <B>Model</B></TD><TD CLASS="tableBlueBody" STYLE="border-right : 1px solid #CCCCCC;" ALIGN="left"><INPUT TYPE="Text" NAME="model" MAXLENGTH="150"></TD><TD CLASS="tableBlueBody" ALIGN="right">* <B>Is finance outstanding on the vehicle?</B></TD><TD CLASS="tableBlueBody" ALIGN="center"><input type='radio' value="Yes" name='question2' /> Yes <input name='question2' type="radio" value="No" checked /> No</TD></TR>
    <TR><TD CLASS="tableBlueBody" ALIGN="right">* <B>Milage / Kms</B></TD><TD CLASS="tableBlueBody" STYLE="border-right : 1px solid #CCCCCC;" ALIGN="left"><INPUT TYPE="Text" NAME="milage" MAXLENGTH="150"></TD><TD CLASS="tableBlueBody" ALIGN="right">* <B>How did you hear about us?</B></TD><TD CLASS="tableBlueBody" ALIGN="center"><select name="question3"><option value="Other">Other</option><option value="Web">Web</option><option value="Newspaper">Newspaper</option><option value="Radio">Radio</option><option value="Recommended">Recommended</option></select></TD></TR>
    <TR><TD COLSPAN="2" CLASS="tableBlueBody" STYLE="border-bottom : 1px solid #CCCCCC; border-right : 1px solid #CCCCCC;"> </TD><TD COLSPAN="2" CLASS="tableBlueBody" STYLE="border-bottom : 1px solid #CCCCCC;"> </TD></TR>
    
    
    
    <TR><TD COLSPAN="4" ALIGN="left"><input type="submit" value="Click here to send us your information" class='contactFormSubmit'></TD></TR>
    </FORM></TABLE>
    </TD></TR></TABLE><BR></TD>
    <TD><IMG SRC="images/spacer.gif" WIDTH="8" HEIGHT="1" BORDER="0" ALT=""></TD>
    <TD WIDTH="183" VALIGN="top">
    </TD></TR></TABLE>
    
    						</fieldset>
    					  </form><br />
    				</div><!-- end of #contact_form -->

     

    And then i have a file called process.php!

    <?php 
    $emailTo = 'sakura-designs@hotmail.com';
    $subject = 'We Will Buy Your Car.ie Form Submission';
    $firstname=$_REQUEST['firstname'];
    $lastname=$_REQUEST['lastname'];
    $email=$_REQUEST['email'];
    $AddressLine1=$_REQUEST['AddressLine1'];
    $City=$_REQUEST['City'];
    $phone=$_REQUEST['phone'];
    $CountryID=$_REQUEST['CountryID'];
    $fax=$_REQUEST['fax'];
    $comment=$_REQUEST['comment'];
    $regnumber=$_REQUEST['regnumber'];
    $colour=$_REQUEST['colour'];
    $carmake=$_REQUEST['carmake'];
    $question1=$_REQUEST['question1'];
    $model=$_REQUEST['model'];
    $question2=$_REQUEST['question2'];
    $milage=$_REQUEST['milage'];
    $question3=$_REQUEST['question3'];
    
    
    $body = "First Name: $firstname \n\nLast Name: $lastname \n\nEmail: $email \n\nAddress: $AddressLine1 \n\nCity: $city \n\nPhone: $phone \n\nCountry: $CountryID \n\nFax: $fax \n\nComment: $comment \n\nReg Number: $regnumber \n\nColour: $colour \n\nCar Make: $carmake \n\nQuestion1: $question1 \n\nModel: $model \n\nQuestion2: $question2 \n\nMilage: $milage \n\nQuestion3: $question3";
    $headers = 'From: '.$name.' <'.$email.'>' . "\r\n" . 'Reply-To: ' . $email;
    
    mail($emailTo, $subject, $body, $headers);
    ?>

     

    PLEASE HELP!! Thanks

  6. Hi Guys,

     

    I got absolutely great advice here on this last time and i just need help with one more thing. Basically on the website www.smartinsuranceclaim.ie we have a form called Make A Claim. Now if your on the homepage and click it, the form pops up and submission works but when you go to any other page it doesnt popup it opens in a new page please help me fix this. Heres the bits you need.

     

    Heres the homepage script index.html!

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    	<title>Smart Insurance Claim</title>
    	<META NAME="DESCRIPTION" CONTENT="Smart Insurance Claim - Your Property Your Experts" />
    	<META NAME="KEYWORDS" CONTENT="Insurance, smart, claim, money, victim, pay, accident, residential, commercial, agricultural, theft, fire, flooding, damage, property, 		experts, loss, assessors, adjusters, adjuster, assessor, Ireland, flood, make, a, claim, repair, help, with, assistance, No Win, No Fee, advice, house, home, leak, 		homeowners, claims, property, repairs, shower, storm, repair, water, damage" />
    	<!-- layout style -->
    	<link href="css/reset.css" rel="stylesheet" type="text/css" media="screen" />
    	<link href="css/typography.css" rel="stylesheet" type="text/css" media="screen" />
        <link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />	
    	<!-- jquery -->
    	<script type="text/javascript" src="scripts/jquery-1.3.2.min.js"></script>	
    	<!-- superfish -->
    	<link rel="stylesheet" type="text/css" href="css/superfish.css" media="screen" />
    	<script type="text/javascript" src="scripts/hoverIntent.js"></script>
    	<script type="text/javascript" src="scripts/superfish.js"></script>
    	<!-- slider -->
    	<script type="text/javascript" src="scripts/easySlider1.5.js"></script>
    	<!-- ColorBox CSS -->
        	<link href="css/colorbox.css" rel="stylesheet" type="text/css" media="all" />
        	
        	<!-- Loading the Colorbox Scripts -->
    	<script type="text/javascript" SRC="js/jquery.colorbox.js"></script>
    
    	<script type="text/javascript">
    	jQuery(document).ready(function(){
    		//Loads the call for the gallery
    		$("a[rel='colorbox']").colorbox();
    		$(".colorbox").colorbox();
    
    		//Loads the call for the external file (form.html)
    		$("#click").click(function(){ 
    			$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
    			return false;
    		});
    	});
    </script>
    
    	<!-- initialize jquery plugins -->
    	<script type="text/javascript" src="scripts/init.js"></script>
    	<!--[if IE 6]>
    	<script src="scripts/dd_belated_png.js"></script>
    	<script>
    		DD_belatedPNG.fix('#top-items, #logo, #navmenu-container, #content-container-bg, #header-image-container, #prevBtn a, #nextBtn a, .comments, .post, #footer-container, .vertical-menu li, .vertical-menu li a, img, blockquote');
    		DD_belatedPNG.fix('.box-top, .box-center, .box-padding, .box-bottom');
    		DD_belatedPNG.fix('.box-2-top, .box-2-center, .box-2-padding, .box-2-bottom');
    		DD_belatedPNG.fix('.box-3-top, .box-3-center, .box-3-padding, .box-3-bottom');
    	</script>
    	<![endif]--> 
    
    
    </head>
    <body>
    <div id="wrapper">
    <div id="top">
    	<div id="top-items">
    		<div id="logo">
    			<br><a href="index.html"><img src="images/logo.png" alt=""/></a>
    		</div>
    
    		<div id="top-right">
    		<div id="block-search">
    			<h2>Search</h2>
    
    			<div class="content">
    				<div>
    					<div class="container-inline">
    
    					</div>
    
    				</div>
    				</form>
    			</div>
    		</div>
    	</div>
    
    	</div>
    	<br><div id="navmenu-container">
    
    		<div id="nav-menu">
    
    			<ul class="sf-menu">
    				<li>
    					<a href="index.html" class="current">Home</a>
    				</li>
    				<li>
    					<a href="f&s.html">Facts & Solutions</a>
    				</li>
    				<li>
    					<a href="whatwedo.html">What We Do</a>
    				</li>
    				<li>
    					<a class="colorbox" HREF="form.html">Make A Claim</a>
    				</li>	
    				<li>
    					<a href="whatarethesteps.html">What Are The Steps</a>
    				</li>
    				<li>
    					<a href="faq.html">FAQ</a>
    				</li>
    				<li>
    					<a href="contact.html">Contact</a>
    				</li>
    			</ul>
    
    
    		</div>
    
    
    	</div>
    </div>
    <!-- ok, to the header section, as you can see, there are lots of tags, this was supposed to be a slider for the whole header, I change it to slide the image only. I did not change the structure so that you can easily go back to the concept with the use of jflow. -->
    <br><div id="header-bg">
    	<div id="header-container">
    
    		<div id="header-image-container">
    			<div class="padding-10">
    				<div id="slider">
    				<ul>				
    					<li><a href="#"><img src="images/Busy Call Centre.jpg" width=552 height=222 alt="Preview" /></a></li>
    					<li><a href="#"><img src="images/happyfamily.jpg" width=552 height=222 alt="Preview" /></a></li>
    					<li><a href="#"><img src="images/offices.jpg" width=552 height=222 alt="Preview" /></a></li>
    					<li><a href="#"><img src="images/combineharvester.jpg" width=552 height=222 alt="Preview" /></a></li>
    				</ul>
    				</div>
    			</div>
    		</div>
    
    
    			<div id="header-description">
    				<br><font face="Arial"><Font Color="#FFFFFF"><h3>&nbsp&nbsp&nbsp <u>Welcome to Smart Insurance Claim</h3></u></Font>
    
    				<h4>
    				&nbsp&nbsp&nbsp* We take the complexity out of making a claim<p><p>
    				&nbsp&nbsp&nbsp* We prepare your claim<p>
    				&nbsp&nbsp&nbsp* We negotiate and settle your claim<p>
    				&nbsp&nbsp&nbsp* We ensure you get full entitlements<p>
    				&nbsp&nbsp&nbsp* We pride ourselves on achieving successful rapid payouts<p>
    				</h4></Font>
    			</div>
    
    
    		</div>	
    
    	</div>
    </div>
    
    <div id="content-container-bg">
    	<div id="content-container">
    
    		<div id="content">
    			<div id="left">
    							<!-- Box Start -->
    				<div class="box">
    					<div class="box-top"></div>
    					<div class="box-center">
    						<div class="box-content-container">
    							<div class="box-content">
    								<div class="box-header">
    									<h2>Contact Us at 1890 998 008</h2>
    								</div>
    
    								<div class="box-padding">
    
    
    									<!-- Content Begin -->
    
    									<a href="mailto:info@smartinsuranceclaim.ie?subject=Website Feedback&body=Could I please request a Call Back. My number is:"><img src="images/Mail.png" width="50" height="50" align="left"><br>&nbsp&nbsp&nbsp Request A Call Back</img></a>
    								<!--
    Skype 'Skype Me™!' button
    http://www.skype.com/go/skypebuttons
    -->
    <script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js"></script>
    <a href="skype:smartinsurance?call"><p><img src="images/Skype.png" width="50" height="50" align="left"><br>&nbsp&nbsp&nbsp Skype Call Us</img></a>
    
    
    
    									<!-- Content End -->
    
    								</div>
    
    							</div>	
    						</div>
    					</div>
    					<div class="box-bottom"></div>
    				</div>
    				<div class="clear"></div>
    				<!-- Box End -->
    
    
    				<!-- Box Start -->
    				<div class="box">
    					<div class="box-top"></div>
    					<div class="box-center">
    						<div class="box-content-container">
    							<div class="box-content">
    								<div class="box-header">
    									<h2>What Are The Steps</h2>
    								</div>
    
    								<div class="box-padding">
    
    
    									<div class="float-left">
    										<p>
    											<a href="whatarethesteps.html"><img src="images/icon1.png" class="image-margin-left float-left" alt="Step 1" /></a>
    											Phone 1890 998 008 or submit the short form on the Make a Claim page.
    										</p>
    									</div>
    									<div class="float-left">
    										<p>
    											<a href="whatarethesteps.html"><img src="images/icon2.png" class="image-margin-left float-left" alt="Step 2" /></a>
    											After speaking with you we will visit and inspect the damage.
    										</p>
    									</div>
    									<div class="float-left">
    										<p>
    											<a href="whatarethesteps.html"><img src="images/icon3.png" class="image-margin-left float-left" alt="Step 3" /></a>
    											We will prepare a full compensation report and meet with your insurers.<p>
    										</p>
    									</div>
    
    								</div>
    								<div class="box-footer">
    									<div class="box-footer-padding">
    										<div class="float-right">
    											<a href="whatarethesteps.html">More Steps</a>
    										</div>
    									</div>
    								</div>
    
    							</div>	
    						</div>
    					</div>
    					<div class="box-bottom"></div>
    				</div>
    				<div class="clear"></div>
    				<!-- Box End -->
    
    
    			</div>
    
    			<!-- Main content -->
    
    			<div id="main" class="margin-left-15">
    
    
    				<!-- Box Start -->
    				<div class="box-2">
    					<div class="box-top"></div>
    					<div class="box-center">
    						<div class="box-content-container">
    							<div class="box-content">
    								<div class="box-header">
    									<br><font size="+1.5"><big><center>Welcome to Smart Insurance Claim<Font Color="#306EFF"> - <i>Your Property, Your Experts</i></font></font></center></big>
    								</div>
    								<div class="box-padding">
    
    
    
    								<p><b><u>Commercial</b></u><br>
    Commercial insurance claims can be litigious and complex. Our professionals have the expertise to achieve your full compensation.<p>
    
    <b><u>Residential</b></u><br>
    We provide immediate access to funds while we quickly negotiate your full payout from your insurers.<p>
    
    <b><u>Agricultural</b></u><br>
    We understand any loss in today’s farming community is worrying. Our farm insurance experts identify all potential losses and achieve results.<p>
    
    <b><u>Theft</b></u><br>
    The only individual responsible for theft is the criminal. You should not have to suffer a large or small loss. We are here to achieve your full entitlements in all events.<p>						
    										<a href="about.html" class="button-light"><span>Read More</span></a>						
    
    									</p>
    
    								</div>
    							</div>
    						</div>
    					</div>
    					<div class="box-bottom"></div>
    				</div>
    				<div class="clear"></div>
    				<!-- Box End -->
    				</div>
    
    			<!-- end of Main content -->
    
    			<div class="clear"></div>
    
    			<!-- let's start the footer -->
    			<div id="footer">				
    				<!-- Box Start -->
    
    				<div class="box-3">
    					<div class="box-top"></div>
    					<div class="box-center">
    						<div class="box-content-container">
    							<div class="box-content">
    
    								<div class="box-padding">
    
    									<div class="float-left">					
    										<p> 
    											© Copyright 2010 Smart Insurance Claim. All Rights Reserved.<br />
    
    										</p>
    									</div>					
    									<div class="float-right">					
    
    											<ul class="menu">									
    												<li><a href="http://www.financialregulator.ie/Pages/home.aspx"><img src="images/logos/fin reg.png" width="130" height="70" alt=""/></a></li>
    												<li><a href="http://www.engineersireland.ie/"><img src="images/logos/engineers ireland.png" width="130" height="70" alt=""/></a></li>
    												<li><a href="http://www.iii.ie/"><img src="images/logos/iioi.png" width="130" height="70" alt=""/></a></li>
    												<li><a href="http://www.riai.ie/"><img src="images/logos/riai.png" width="130" height="70" alt=""/></a></li>
    												<li><a href="http://www.rics.org/"><img src="images/logos/rics.png" width="130" height="70" alt=""/></a></li>
    												<li><a href="http://www.scs.ie/home"><img src="images/logos/socs logo.jpg" width="130" height="70" alt=""/></a></li>
    											</ul>	
    
    									</div>	
    								</div>
    
    
    							</div>
    						</div>
    					</div>
    					<div class="box-bottom"></div>
    				</div>
    				<div class="clear"></div>
    				<!-- Box End -->
    			</div>
    
    		</div>
    	</div>
    </div>
    </div>
    
    
    
    </body>
    </html>

     

    This is the Form that pops up - form.html!

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
    
    <link href="css/all.css" rel="stylesheet" type="text/css" media="all" />
    <link href="css/styles/spectrum/spectrum.css" rel="stylesheet" type="text/css" media="all" />
    <!-- layout style -->
    	<link href="css/reset.css" rel="stylesheet" type="text/css" media="screen" />
    	<link href="css/typography.css" rel="stylesheet" type="text/css" media="screen" />
        <link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />	
    	<!-- jquery -->
    	<script type="text/javascript" src="scripts/jquery-1.2.6.min.js"></script>
    	<!-- superfish -->
    	<link rel="stylesheet" type="text/css" href="css/superfish.css" media="screen" />
    	<script type="text/javascript" src="scripts/hoverIntent.js"></script>
    	<script type="text/javascript" src="scripts/superfish.js"></script>
    	<!-- jcarousel -->
    	<script type="text/javascript" src="scripts/jquery.jcarousel.pack.js"></script>
    	<link rel="stylesheet" type="text/css" href="css/jquery.jcarousel.css" />
    	<link rel="stylesheet" type="text/css" href="css/skin.css" />
    	<!-- initialize slider -->
    
    	<script type="text/javascript">
    
    		jQuery(document).ready(function() {
    		    jQuery('#mycarousel').jcarousel({
    		        vertical: true,
    		        scroll: 1
    		    });
    		});
    
    	</script>
    	<!-- slider -->
    	<script type="text/javascript" src="scripts/easySlider1.5.js"></script>
    	<!-- initialize contact form -->
    	<script type="text/javascript" src="scripts/contact.js"></script>
    	<!-- initialize jquery plugins -->
    	<script type="text/javascript" src="scripts/init.js"></script>
    	<!--[if IE 6]>
    	<script src="scripts/dd_belated_png.js"></script>
    	<script>
    		DD_belatedPNG.fix('#top-items, #logo, #navmenu-container, #content-container-bg, #header-image-container, #prevBtn a, #nextBtn a, .comments, .post, #footer-container, .vertical-menu li, .vertical-menu li a, img, blockquote');
    		DD_belatedPNG.fix('.box-top, .box-center, .box-padding, .box-bottom');
    		DD_belatedPNG.fix('.box-2-top, .box-2-center, .box-2-padding, .box-2-bottom');
    		DD_belatedPNG.fix('.box-3-top, .box-3-center, .box-3-padding, .box-3-bottom');
    	</script>
    	<![endif]--> 
    </head>
    
    <body>
    <div style="padding:15px;"><div id="note"></div>
    									<div id="fields">
    <p>Please tell us about your claim by filling out the form below and someone from our dedicated staff will be in touch with you shortly</p>
    <form name="claimform" id="claimform" method="post" action="claimForm.php">
              		<label><span>1. Type of Claim</span></label><br />
                  
    <select name="claimType" id="claimType">
      <option value="">Please choose one</option>
      <option value="commercial">Commercial</option>
      <option value="residential">Residential</option>
      <option value="agricultural">Agricultural</option>
      <option value="theft">Theft</option>
    </select><br />
    <p><label><span>2. Type of damage</span></label><br />
                  
    <select name="damageType" id="damageType">
      <option value="">Please choose one</option>
      <option value="fire">Fire</option>
      <option value="flooding">Flooding</option>
      <option value="structural">Structural</option>
      <option value="other">Other</option>
    </select><br />
               <p> <label>If other please specify</label><!--VALIDATIONERROR--><br />
                  <input name="specify" type="text" class="form" id="specify" /><br />
                  
                <p><label><span>3. Contact details</span></label><!--VALIDATIONERROR--><br /><br>
                <label>Location</label><!--VALIDATIONERROR--><br />
                  <select name="county" id="county">
      <option value="">Please choose one</option>
      <option value="antrim">Antrim</option>
      <option value="armagh">Armagh</option>
      <option value="carlow">Carlow</option>
      <option value="cavan">Cavan</option>
      <option value="clare">Clare</option>
      <option value="cork">Cork</option>
      <option value="derry">Derry</option>
      <option value="donegal">Donegal</option>
      <option value="down">Down</option>
      <option value="dublin">Dublin</option>
      <option value="fermanagh">Fermanagh</option>
      <option value="galway">Galway</option>
      <option value="kerry">Kerry</option>
      <option value="kildare">Kildare</option>
      <option value="kilkenny">Kilkenny</option>
      <option value="laois">Laois</option>
      <option value="leitrim">Leitrim</option>
      <option value="limerick">Limerick</option>
      <option value="longford">Longford</option>
      <option value="louth">Louth</option>
      <option value="mayo">Mayo</option>
      <option value="meath">Meath</option>
      <option value="monaghan">Monaghan</option>
      <option value="offaly">Offaly</option>
      <option value="roscommon">Roscommon</option>
      <option value="sligo">Sligo</option>
      <option value="tipperary">Tipperary</option>
      <option value="tyrone">Tyrone</option>
      <option value="waterford">Waterford</option>
      <option value="westmeath">Westmeath</option>
      <option value="wexford">Wexford</option>
      <option value="wicklow">Wicklow</option>
    </select><br />
                  <p><label>Day time phone number</label><br /><br>
                  <input name="number" type="text" class="form" id="number" /><br />
                  <p><label>E-mail Address*</label><br /><br>
                  <input name="email" type="text" class="form" id="email" /><br />
              
            
    </div>
    <div class="content column2 padding2">
    
    <p><label>Full name*</label><br />
    
    <input name="name" type="text" class="form" id="name" /><br />
    
      <p><label>Please give a brief description of your claim</label><br /><p>
    <textarea name="description" id="description" class="form"  ></textarea><br />
    <p><input type="submit" id="submit" name="submit" value="submit" />
    </form>	</div>
    </body>
    </html>

     

    This is the Colorbox.css which opens the popup!

    /*
        ColorBox Core Style
        The following rules are the styles that are consistant between themes.
        Avoid changing this area to maintain compatability with future versions of ColorBox.
    */
    #colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
    #cboxOverlay{position:fixed; width:100%; height:100%;}
    #cboxMiddleLeft, #cboxBottomLeft{clear:left;}
    #cboxContent{position:relative; overflow:hidden;}
    #cboxLoadedContent{overflow:auto;}
    #cboxLoadedContent iframe{display:block; width:100%; height:100%; border:0;}
    #cboxTitle{margin:0;}
    #cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%;}
    #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
    
    /* 
        Example user style
        The following rules are ordered and tabbed in a way that represents the
        order/nesting of the generated HTML, so that the structure easier to understand.
    */
    #cboxOverlay{background:url(../images/overlay.png) 0 0 repeat;}
    #colorbox{}
        #cboxTopLeft{width:21px; height:21px; background:url(../images/controls.png) -100px 0 no-repeat;}
        #cboxTopRight{width:21px; height:21px; background:url(../images/controls.png) -129px 0 no-repeat;}
        #cboxBottomLeft{width:21px; height:21px; background:url(../images/controls.png) -100px -29px no-repeat;}
        #cboxBottomRight{width:21px; height:21px; background:url(../images/controls.png) -129px -29px no-repeat;}
        #cboxMiddleLeft{width:21px; background:url(../images/controls.png) left top repeat-y;}
        #cboxMiddleRight{width:21px; background:url(../images/controls.png) right top repeat-y;}
        #cboxTopCenter{height:21px; background:url(../images/border.png) 0 0 repeat-x;}
        #cboxBottomCenter{height:21px; background:url(../images/border.png) 0 -29px repeat-x;}
        #cboxContent{background:#fff;}
            #cboxLoadedContent{margin-bottom:28px;}
            #cboxTitle{position:absolute; bottom:4px; left:0; text-align:center; width:100%; color:#949494;}
            #cboxCurrent{position:absolute; bottom:4px; left:58px; color:#949494;}
            #cboxSlideshow{position:absolute; bottom:4px; right:30px; color:#0092ef;}
            #cboxPrevious{position:absolute; bottom:0; left:0px; background:url(../images/controls.png) -75px 0px no-repeat; width:25px; height:25px; text-indent:-9999px;}
            #cboxPrevious.hover{background-position:-75px -25px;}
            #cboxNext{position:absolute; bottom:0; left:27px; background:url(../images/controls.png) -50px 0px no-repeat; width:25px; height:25px; text-indent:-9999px;}
            #cboxNext.hover{background-position:-50px -25px;}
            #cboxLoadingOverlay{background:url(../images/loading_background.png) center center no-repeat;}
            #cboxLoadingGraphic{background:url(../images/loading.gif) center center no-repeat;}
            #cboxClose{position:absolute; bottom:0; right:0; background:url(../images/controls.png) -25px 0px no-repeat; width:25px; height:25px; text-indent:-9999px;}
            #cboxClose.hover{background-position:-25px -25px;}
    
    /*
        The following fixes png-transparency for IE6.  
        It is also necessary for png-transparency in IE7 & IE8 to avoid 'black halos' with the fade transition
        
        Since this method does not support CSS background-positioning, it is incompatible with CSS sprites.
        Colorbox preloads navigation hover classes to account for this.
        
        !! Important Note: AlphaImageLoader src paths are relative to the HTML document,
        while regular CSS background ../images are relative to the CSS document.
    */
    .cboxIE #cboxTopLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=../images/internet_explorer/borderTopLeft.png, sizingMethod='scale');}
    .cboxIE #cboxTopCenter{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=../images/internet_explorer/borderTopCenter.png, sizingMethod='scale');}
    .cboxIE #cboxTopRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=../images/internet_explorer/borderTopRight.png, sizingMethod='scale');}
    .cboxIE #cboxBottomLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=../images/internet_explorer/borderBottomLeft.png, sizingMethod='scale');}
    .cboxIE #cboxBottomCenter{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=../images/internet_explorer/borderBottomCenter.png, sizingMethod='scale');}
    .cboxIE #cboxBottomRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=../images/internet_explorer/borderBottomRight.png, sizingMethod='scale');}
    .cboxIE #cboxMiddleLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=../images/internet_explorer/borderMiddleLeft.png, sizingMethod='scale');}
    .cboxIE #cboxMiddleRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=../images/internet_explorer/borderMiddleRight.png, sizingMethod='scale');}
    

     

    And this is the claimForm.php

    <?php
    $to = "info@smartinsuranceclaim.ie";
    
    
    $claimType = $_POST['claimType'];
    $damageType = $_POST['damageType'];
    $specify = $_POST['specify'];
    $county = $_POST['county'];
    $number = $_POST['number'];
    $from = $_POST['email'];
    $name = $_POST['name'];
    $message = $_POST['description'];
    
    $subject = "Claim form submitted";
    $subject2 = "Thank you from Smart Insurance Claim";
    $message2 = "Thank you, your query has been submitted and is currently being reviewed. A member of our claims team shall be in contact shortly.\r\n\r\nKind regards,\r\nThe team at Smart Insurance Claim";
    
    $header = "From: ".$from."\r\n";
    $header .= "Reply-To: ".$from."\r\n\r\n";
    $header .= "Name:\r\n".$name."\r\n\r\n";
    $header .= "Type of claim:\r\n".$claimType."\r\n\r\n";
    $header .= "Type of damage:\r\n".$damageType."\r\n\r\n";
    $header .= "If other please specify:\r\n".$specify."\r\n\r\n";
    $header .= "Location:\r\n".$county."\r\n\r\n";
    $header .= "Phone number:\r\n".$number."\r\n\r\n";
    $header .= "Email address:\r\n".$from."\r\n\r\n";
    $header .= "Description:\r\n".$message."\r\n\r\n";
    
    
    if (empty($from) && empty($name)) {
        header( "Location: error1.php" );
      }
      elseif(empty($from)){
       header( "Location: error2.php" );
      }
       elseif(empty($name) && (!preg_match('/@/', $from) || !preg_match('/[.]/', $from) || preg_match( "/[\r\n]/", $from) || preg_match( "/[,]/", $from))){
       header( "Location: error5.php" );
      }
    
      elseif (!preg_match('/@/', $from) || !preg_match('/[.]/', $from) || preg_match( "/[\r\n]/", $from) || preg_match( "/[, ]/", $from)) {
        header( "Location: error4.php" );
      }
       
      elseif(empty($name)){
       header( "Location: error3.php" );
      }
      else {
      mail($to, $subject, "", $header);
      header("location: thankyou.php");
      mail($from, $subject2, $message2, "From: sakura-designs@hotmail.com");
      }
      
    ?>

     

     

     

  7. Hi GUys,

     

    I recently just done a website for a client at www.smartinsuranceclaim.ie/newebsite on this website i have a page called "Make A Claim" this page is a pop up form that opens in on top of the page that the customer is on. Can someone please help me edit this pop up form first of all to include drop downs and second of all i want to be able to send this form to my email address.

     

    Heres the code for the Form now this will include dropdowns!!! -

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
    
    <link href="css/all.css" rel="stylesheet" type="text/css" media="all" />
    <link href="css/styles/spectrum/spectrum.css" rel="stylesheet" type="text/css" media="all" />
    <!-- layout style -->
    	<link href="css/reset.css" rel="stylesheet" type="text/css" media="screen" />
    	<link href="css/typography.css" rel="stylesheet" type="text/css" media="screen" />
        <link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />	
    	<!-- jquery -->
    	<script type="text/javascript" src="scripts/jquery-1.2.6.min.js"></script>
    	<!-- superfish -->
    	<link rel="stylesheet" type="text/css" href="css/superfish.css" media="screen" />
    	<script type="text/javascript" src="scripts/hoverIntent.js"></script>
    	<script type="text/javascript" src="scripts/superfish.js"></script>
    	<!-- jcarousel -->
    	<script type="text/javascript" src="scripts/jquery.jcarousel.pack.js"></script>
    	<link rel="stylesheet" type="text/css" href="css/jquery.jcarousel.css" />
    	<link rel="stylesheet" type="text/css" href="css/skin.css" />
    	<!-- initialize slider -->
    
    	<script type="text/javascript">
    
    		jQuery(document).ready(function() {
    		    jQuery('#mycarousel').jcarousel({
    		        vertical: true,
    		        scroll: 1
    		    });
    		});
    
    	</script>
    	<!-- slider -->
    	<script type="text/javascript" src="scripts/easySlider1.5.js"></script>
    	<!-- initialize contact form -->
    	<script type="text/javascript" src="scripts/contact.js"></script>
    	<!-- initialize jquery plugins -->
    	<script type="text/javascript" src="scripts/init.js"></script>
    	<!--[if IE 6]>
    	<script src="scripts/dd_belated_png.js"></script>
    	<script>
    		DD_belatedPNG.fix('#top-items, #logo, #navmenu-container, #content-container-bg, #header-image-container, #prevBtn a, #nextBtn a, .comments, .post, #footer-container, .vertical-menu li, .vertical-menu li a, img, blockquote');
    		DD_belatedPNG.fix('.box-top, .box-center, .box-padding, .box-bottom');
    		DD_belatedPNG.fix('.box-2-top, .box-2-center, .box-2-padding, .box-2-bottom');
    		DD_belatedPNG.fix('.box-3-top, .box-3-center, .box-3-padding, .box-3-bottom');
    	</script>
    	<![endif]--> 
    </head>
    
    <body>
    <div style="padding:15px;"><div id="note"></div>
    									<div id="fields">
    <p>Please fill out the form below and we'll get back to you as soon as possible!</p>
    <form action="javascript:alert('success!');">
    	<table>
    		<tr>
    	    	<td class="body" id="Company">
    	    	<strong><label for="Company">Company:</label></strong>
    	    	</td>
    	    
    	    	<td>
    	    	<input name="Company" type="text" size="50" />
    	    	</td>
    			</tr>
    
    	    <tr>
    	        <td class="body" id="Contact">
    	        <strong><label for="Contact">Company Contact:</label></strong>
    	        </td>
    	        
    	        <td>
    	        <input name="Contact" type="text" size="50" />
    	        </td>
    	  	</tr>
    	  
    	  	<tr>
    	        <td class="body" id="Address">
    	        <strong><label for="Address">Address:</label></strong>
    	        </td>
    	        
    	        <td>
    	        <input name="Address" type="text" size="50" />
    	        </td>
    	  	</tr>
    	  	
    	    <tr>
    	        <td class="body" id="Phone">
    	        <strong><label for="Phone">Phone:</label></strong>
    	        </td>
    	        
    	        <td>
    	        <input name="Phone" type="text" size="50" />
    	        </td>
    	   </tr>
    	  	
    	    <tr>
    	        <td class="body" id="Email">
    	        <strong><label for="Email">Email:</label></strong>
    	        </td>
    	        <td>
    	        <input name="Email" type="text" size="50" />
    	        </td>
    	  	</tr>
    	  	
    	    <tr>
    	        <td class="body" id="Comments">
    	        <strong><label for="Comments">Questions/Comments:</label></strong>
    	        </td>
    	        <td>
    	        <textarea name="comments" cols="48" rows="6"></textarea>
    	        </td>
    	  	</tr>
    	    
    	  	<tr>
    	        <td></td>
    	        <td><input type="submit" value="Submit" id="submit" class="form-submit" /></td>
    	  	</tr>
    	</table>
    </form>
    </div>
    </body>
    </html>

     

     

    This is the php code. Please help me edit this in order to send all the details to my address.

    <?php
    
    /*
    Credits: Bit Repository
    URL: http://www.bitrepository.com/
    */
    
    include 'config.php';
    
    error_reporting (E_ALL ^ E_NOTICE);
    
    $post = (!empty($_POST)) ? true : false;
    
    if($post)
    {
    include 'functions.php';
    
    $name = stripslashes($_POST['name']);
    $email = trim($_POST['email']);
    $subject = stripslashes($_POST['subject']);
    $message = htmlspecialchars($_POST['message']);
    
    
    $error = '';
    
    // Check name
    
    if(!$name)
    {
    $error .= 'Please enter your name.<br />';
    }
    
    // Check email
    
    if(!$email)
    {
    $error .= 'Please enter an e-mail address.<br />';
    }
    
    if($email && !ValidateEmail($email))
    {
    $error .= 'Please enter a valid e-mail address.<br />';
    }
    
    // Check message (length)
    
    if(!$message || strlen($message) < 10)
    {
    $error .= "Please enter your message. It should have at least 10 characters.<br />";
    }
    
    
    if(!$error)
    {
    $mail = mail(WEBMASTER_EMAIL, $subject, $message,
         "From: ".$email."\r\n"
        ."Reply-To: ".$email."\r\n"
        ."X-Mailer: PHP/" . phpversion());
    
    if($mail)
    {
    echo 'OK';
    }
    
    }
    else
    {
    echo '<div class="notification_error">'.$error.'</div>';
    }
    
    }
    ?>

    Someone Please Help!!

  8. Well  i can explain exactly whats happening i need help changing it is all.

     

    Ok so basically the mail.php form is built to send a contact form that is made up of Name, Email and Message and when this delivers the message to my mailbox it works.

     

    The Book A Table form has a number of components i.e Party Size (how many people to book in), Date (has a calendar attached), Meal Type (dropdown menu with 4 options), Time, Name, Email and Notes. Now the problem is i need everything the person enters on this form to be delivered in a mail but because im using mail.php its only sending the name, email and notes section. I need help to code it so that when the person fills in the book a  table form it sends all information requested i.e Party Size, Date etc.

  9. Hi Guys,

     

    I am currently in the process of editing a template for a client. This template has a contact page and a book a table page. Both have the same mail.php form to authenticate and send the mail. The contact form is working grand and that sends perfectly its the Book a table page that aint working please help.

     

    heres the 2 code snippets for the form for Booking a table and the php form! PLease note i have made a copy of mail.php and renamed it mailbooking.php to distinguish the forms.

     

    <form action="php/mailbooking.php" method="post" enctype="multipart/form-data">
                                    <div class="book-table-form">
                                      <label>Party size:</label>
                                      <input class="input-field mid-short" name="party-size" id="party-size" />
                                      
                                      <label>Date:</label>
                                      <input class="input-field date" name="name" id="datepicker" />
                                      
                                      <label>Meal Type:</label>
                                      <div class="selector" id="uniform-"><span style="-moz-user-select: none;">Please select your meal type:</span>
                                      <select style="opacity: 0;">
                                        <option value="option1">Christmas Menu</option>
                                        <option value="option2">Dinner</option>
                                        <option value="option3">French Value Menu</option>
                                        <option value="option3">Group Menu</option>
                                      </select></div>
                                      
                                      <label>Time:</label>
                                      <input maxlength="2" class="input-field short" name="name" id="hours" /> : <input maxlength="2" class="input-field short" name="minutes" id="time" />
                                      
                                      <label>Name:</label>
                                      <input class="input-field" name="name" id="name1" />
                                      
                                      <label>Email:</label>
                                      <input class="input-field" name="email" id="email1" />
                                      
                                      <label>Phone:</label>
                                      <input class="input-field" name="phone" id="phone1" />
                                      
                                      <label>Notes:</label>
                                      <textarea class="textarea-field" name="message" id="message1" cols="80" rows="5"></textarea>
                                      <br/>
                                      <input type="submit" name="" class="submit" value="Send Email" />
    							  <input type="reset" name="" class="reset" value="Clear form" />
                                    
                                    </div>
                                  </form>

    <?php
    
    // CONFIGURATION --------------------------------------------------------------
    
    // This is the email where the contact mails will be sent to.
    $config['recipient'] = 'sakura-designs@hotmail.com';
    
    // This is the subject line for contact emails.
    // The variable %name% will be replaced with the name of the sender.
    $config['subject'] = 'Query from Website %name%';
    
    // These are the messages displayed in case of form errors.
    $config['errors'] = array
    (
    'no_name'       => 'Please enter your name',
    'no_email'      => 'Your Email adresse is required.',
    'invalid_email' => 'You entered an invalid email address.',
    'no_message'    => 'Please, include your message.',
    );
    
    // END OF CONFIGURATION -------------------------------------------------------
    
    
    // Ignore non-POST requests
    if ( ! $_POST)
    exit('Nothing to see here. Please go back to the site.');
    
    // Was this an AJAX request or not?
    $ajax = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) AND strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');
    
    // Set the correct HTTP headers
    header('Content-Type: text/'.($ajax ? 'plain' : 'html').'; charset=utf-8');
    
    // Extract and trim contactform values
    $name    = isset($_POST['name']) ? trim($_POST['name']) : '';
    $email   = isset($_POST['email']) ? trim($_POST['email']) : '';
    $message = isset($_POST['message']) ? trim($_POST['message']) : '';
    
    // Take care of magic quotes if needed (you really should have them disabled)
    set_magic_quotes_runtime(0);
    if (get_magic_quotes_gpc())
    {
    $name    = stripslashes($name);
    $email   = stripslashes($email);
    $message = stripslashes($message);
    }
    
    // Initialize the errors array which will also be sent back as a JSON object
    $errors = NULL;
    
    // Validate name
    if ($name == '' || strpos($name, "\r") || strpos($name, "\n"))
    {
    $errors['name'] = $config['errors']['no_name'];
    }
    
    // Validate email
    if ($email == '')
    {
    $errors['email'] = $config['errors']['no_email'];
    }
    elseif ( ! preg_match('/^[-_a-z0-9\'+*$^&%=~!?{}]++(?:\.[-_a-z0-9\'+*$^&%=~!?{}]+)*+@(??![-.])[-a-z0-9.]+(?<![-.])\.[a-z]{2,6}|\d{1,3}(?:\.\d{1,3}){3})(?::\d++)?$/iD', $email))
    {
    $errors['email'] = $config['errors']['invalid_email'];
    }
    
    // Validate message
    if ($message == '')
    {
    $errors['message'] = $config['errors']['no_message'];
    }
    
    // Validation succeeded
    if (empty($errors))
    {
    // Prepare subject line
    $subject = str_replace('%name%', $name, $config['subject']);
    
    // Additional mail headers
    $headers  = 'Content-Type: text/plain; charset=utf-8'."\r\n";
    $headers .= 'From: '.$email;
    
    // Send the mail
    if ( ! mail($config['recipient'], $subject, $message, $headers))
    {
    	$errors['server'] = 'There seems to be a technical problem with our server. We are sorry. '.
    	                    'Could you mail your message directly at '.$config['recipient'].'? Thank you.';
    }
    }
    
    if ($ajax)
    {
    // Output the possible errors as a JSON object
    echo json_encode($errors);
    }
    else
    {
    // Show a simple HTML feedback message in case of non-javascript support
    if (empty($errors))
    {
    	echo '<h1>Thank you</h1>';
    	echo '<p>Your message has been sent.</p>';
    }
    else
    {
    	echo '<h3>Oops!</h3>';
    	echo '<h5>Please go back and fix the following errors:</h5>';
    	echo '<ul><li>';
    	echo implode('</li><li>', $errors);
    	echo '</li></ul>';
    }
    }

     

     

  10. Well this is the whole code here so where would i be able to put it?

     

    <?php
    // Take care of MySQL injection attacks
    if(!get_magic_quotes_gpc())
    {
    addslashes_recurse($_GET);
    addslashes_recurse($_POST);
    addslashes_recurse($_REQUEST);
    }
    
    //wayne's edit - check to see if unique code already exists
    function unique_code_exists($code){
    $code = intval($code);
    $result = mysql_query("SELECT COUNT(*) AS num FROM clf_ads WHERE unique_code = '$code'");
    $result2 = mysql_query("SELECT COUNT(*) AS num FROM clf_events WHERE unique_code = '$code'");
    list($num) = mysql_fetch_row($result);
    list($num2) = mysql_fetch_row($result2);
    $num = $num + $num2;
    if($num == 0){
    	return false;
    }
    else{
    	return true;
    }
    }
    
    function addslashes_recurse(&$ar)
    {
    foreach ($ar as $k=>$v)
    {
    	if(is_array($v)) addslashes_recurse($v);
    	else $ar[$k] = addslashes($v);
    }
    }
    
    // Admin mode
    if(isset($_COOKIE[$ck_admin]) && $_COOKIE[$ck_admin]) $admin_logged = TRUE;
    else $admin_logged = FALSE;
    
    // Language
    if(!isset($path_escape)) $path_escape=NULL;
    if (!is_file("{$path_escape}lang/{$language}.inc.php") && !$in_admin)
    {
    die("Language file not found!");
    }
    
    require_once("{$path_escape}lang/{$language}.inc.php");
    
    $xlang = $language;	// For compatibility
    $langx['months'] = explode(";", $langx['months']);
    $langx['months_short'] = explode(";", $langx['months_short']);
    $langx['weekdays'] = explode(";", $langx['weekdays']);
    $langx['dateformat'] = str_replace("  ", "  ", $langx['dateformat']);
    $langx['datetimeformat'] = str_replace("  ", "  ", $langx['datetimeformat']);
    
    // Current view
    if(!isset($_GET['view'])) $_GET['view'] = false;
    $xview = $_GET['view'] ? $_GET['view'] : "main";
    if(!isset($_GET['search'])) $_GET['search'] = false;
    $xsearch = $_GET['search'];
    if(!isset($_GET['pricemin'])) $_GET['pricemin'] = false;
    if(!isset($_GET['pricemax'])) $_GET['pricemax'] = false;
    if(!isset($_GET['x'])) $_GET['x'] = NULL;
    $xsearchmode = ($_GET['search'] || $_GET['pricemin'] || $_GET['pricemax'] || count($_GET['x']));
    
    // Get current city
    if (isset($_GET['cityid']) && $_GET['cityid'] > 0)
    {
    $xcityid = $_GET['cityid'];
    }
    elseif (isset($_GET['cityid']) && $_GET['cityid'] < 0)
    {
    $xcountryid = abs($_GET['cityid']);
    $xcityid = $_GET['cityid'];
    }
    /*elseif ($_COOKIE[$ck_cityid] > 0)
    {
    $xcityid = $_COOKIE[$ck_cityid];
    }
    elseif ($_COOKIE[$ck_cityid] < 0)
    {
    $xcountryid = abs($_COOKIE[$ck_cityid]);
    $xcityid = $_COOKIE[$ck_cityid];
    }*/
    elseif ($default_city)
    {
    $xcityid = $default_city;
    if($xcityid < 0) $xcountryid = -($xcityid);
    }
    
    
    if ($xcityid)
    {
    if ($xcityid > 0) $sql = "SELECT COUNT(*) FROM $t_cities WHERE cityid = $xcityid";
    else $sql = "SELECT COUNT(*) FROM $t_countries WHERE countryid = $xcountryid";
    
    list($city_exists) = @mysql_fetch_array(mysql_query($sql));
    if(!$city_exists) $xcityid = 0;
    }
    
    /*if(!$xcityid)
    {
    $sql = "SELECT countryid
    		FROM $t_countries
    		WHERE enabled = '1'
    		LIMIT 1";
    list($xcountryid) = mysql_fetch_array(mysql_query($sql));
    $xcityid = 0-$xcountryid;
    }*/
    
    if(!$xcityid)
    {
    $sql = "SELECT cityid
    		FROM $t_cities
    		WHERE enabled = '1'
    		LIMIT 1";
    list($xcityid) = @mysql_fetch_array(mysql_query($sql));
    }
    if(!isset($in_admin)) $in_admin = false;
    if (!$xcityid && !$in_admin)
    {
    die("No locations defined!");
    }
    
    setcookie($ck_cityid, $xcityid, 0, "/");
    
    // Get city name
    if ($xcityid > 0)
    {
    $sql = "SELECT c.countryname, c.countryid, ct.cityname
    		FROM $t_cities ct
    			INNER JOIN $t_countries c ON c.countryid = ct.countryid
    		WHERE cityid = $xcityid";
    list($xcountryname, $xcountryid, $xcityname)= @mysql_fetch_array(mysql_query($sql));
    }
    elseif ($xcountryid)
    {
    $sql = "SELECT c.countryname
    		FROM $t_countries c 
    		WHERE countryid = $xcountryid";
    list($xcountryname)= @mysql_fetch_array(mysql_query($sql));
    $xcityname = $xcountryname;
    }
    
    
    // Common metadata
    $page_title = "Buy and Sell Anything In Ireland - Find It, Buy It ";
    $meta_kw = "Ireland Classified Ads,free,irish,Ireland Classified Ads,Ireland Classified Ads, buy sell online,buy sell,buy and sell,buyandsell,buy & sell,buy&sell,buy and sell ireland,free ads,free classifieds,irish classifieds,classifieds,dogs for sale,add,irelands newest website,irelands newest classifieds, buy anything, sell anything, find what you need, flog it, flog it ireland, flog-it.ie, flog-it, flog-it ireland, flog it.ie, flog your stuff, car for sale, cars for sale, buy and sell anything,buy and sell in Ireland,sell second hand,sell,buy, classifieds, flog, it, flog-it, flog-it.ie, ireland, classified, irelands newest classified, website, cars for sale, motors, holiday in ireland, van for sale, 4 x 4 for sale, business for sale, business oppurtunities, furniture, hotels in ireland, computers, laptops, hardware, dating, friends, diy, construction, events, health and beauty, freebies, travel, holidays, school stuff, propery for sale, property for let, pets, music, entertainment, jobs wanted, jobs offered, jobs, job, Ireland, Irelands newest classifed website, Flog-It, FlogIt, Flog-It.ie, Clothing, Accesories, Shoes, sports, leisure, swap shop, hobbies collectibles, tv's, tv, business services, Ireland , classifieds, classified ads, jobs, for sale, real estate, services, community, events, Ireland classifieds,free classifieds Ireland,online classifieds Ireland,classified ads Ireland, Ireland, free classified ads, classifieds, jobs, dating, singles, real estate, business listings, free classified ads, free classifieds, free online classified ads, free local classifieds, free online classifieds, ads free, classified, classified ads, free classified, buy sell, classifieds, classifieds classified, local classifieds, online classified ads, automobile classified ads, cars, classified ads real estate, collectibles, electronics, events,  free job classifieds, free online car classifieds, free real estate ads, free real estate, Jobs, Dublin, accommodation, rent, Dublin, dating, 20th century antiques,and garden furniture,antiques,antiques and collectables,antiques collectables,antiques guide,antiques price guide,antiques roadshow,auction cars,audi a3 cars,audi cars,auto classified ads,auto classifieds,auto classifieds guide,auto sales ireland,auto salvage cars,automatic car,automatic cars,b&b donegal ireland,bedroom furniture,business development,business for sale,business for sale ireland,business franchise,business opportunities,business opportunity,businesses for sale,buy a franchise,buy car,buy used car,buy used cars,cane furniture,car,car boot sale,car boot sales,car buyers guide,car classifieds,car dealers cork,car for sale,car hire dublin ireland,car hire ireland cork,car history ireland,car rental cork ireland,car rental dublin ireland,car sales,car sales ireland,cars,cars classifieds,cars for sale,
    castle hotel cork,cheap car,cheap used car,cheap used cars,city classified ads,classic car,classic car sales,classic cars,classic cars for sale,classified ad jobs,classified ads jobs,classified pets and,classifieds,classifieds ads jobs,classifieds for pets in,construction business for sale,cork ireland vacation,cottage in ireland,cottages in cork ireland,designer furniture,diesel car com,diesel car used,dining furniture,diy garden furniture,donegal ireland hotels,driving jobs ireland,dublin furniture shops,dublin holiday,dublin ireland holiday,dublin ireland vacation package,employment ads,employment classified ads,farm equipment salvage,farm equipment usa,flight ireland,franchise,franchise for sale,franchise ireland,franchise opportunities,franchise opportunity,franchises,franchises for sale,free classifieds for pets,furniture,furniture ireland,furniture online,furniture shop,furniture shops,furniture store,furniture stores,galway holiday,galway ireland hotels,garden furniture,garden furniture bench,garden furniture benches,garden furniture ireland,garden furniture online,holiday accommodation ireland,holiday cottage ireland,holidayhomes ireland,holiday offers ireland,holidays in ireland,hotel in kilkenny ireland,hotel spa jobs,hotels in dublin ireland,hotels ireland cork,in county sligo ireland,in free classifieds,ireland airfares,ireland cottages,ireland flowers,ireland travel info,job ads,job classified ads,jobs and classifieds,kildare ireland hotel,kildare ireland hotels,kitchen furniture,limerick ireland hotel,limerick ireland hotels,look classifieds new job,luxury holiday homes,luxury holiday ireland,luxury hotel offers ireland,map in ireland,massage in dublin ireland,mirrors car,new times classifieds job,newspaper classified ads,oak furniture,oak garden furniture,old farm equipment,outdoor furniture,outdoor garden furniture,patio furniture,pine furniture,pubs for sale,rent farm equipment,rosslare ireland hotels,sales jobs classifieds,salvage car auction,schools ireland dublin,second hand car,second hand cars,second hand cars for sale,secondhand cars,self catering donegal ireland,self catering galway ireland,self catering ireland,self catering ireland ireland,self
    catering wexford ireland,sell business,sell car,sell used car,selling a used car,sligo hotels ireland,small business advice,small business for sale,small business information,spa hotels in ireland,spa hotels ireland,sports in ireland,teak garden furniture,the antiques roadshow,
    travel ireland map,used audi cars,used car,used car dealer,used car dealers,used car dealers cork,used car dealers ireland,used car dealerships,used car deals,used car for sale,used car prices,used car sale,used car sales,used car search,used cars,used cars diesel,used cars for sale,used cars uk,used volkswagen diesel car,vw diesel cars,waterford ireland hotels,waterford ireland travel,waterford wexford,
    wexford ireland hotel,wexford ireland hotels,wicklow ireland travel,wooden garden furniture,";
    $meta_desc = "Buy and Sell Anything In Ireland - Find It, Buy It ";
    
    $xsubcatfields = array();
    
    
    
    // Search events
    if ($xsearchmode && ($_GET['catid'] == -1 || $_GET['subcatid'] == -1))
    {
    $xview = $_GET['view'] = $_REQUEST['view'] = "events";
    unset($_GET['subcatid'], $_GET['catid']);
    }
    
    
    // Find vars and make metadata
    if (($xview == "showad" || ($xview == "mailad" && $_GET['adtype'] == "A")) && $_GET['adid'])
    {
    $xsection = "ads";
    $xadtype = "A";
    $xpostmode = FALSE;
    
    $sql = "SELECT adtitle, cat.catid, cat.catname as catname, scat.subcatid, scat.subcatname as subcatname
    		FROM $t_ads a
    			INNER JOIN $t_subcats scat ON scat.subcatid = a.subcatid
    			INNER JOIN $t_cats cat ON cat.catid = scat.catid
    		WHERE a.adid = $_GET[adid]";
    list($adtitle, $xcatid, $xcatname, $xsubcatid, $xsubcatname) = mysql_fetch_array(mysql_query($sql));
    $xadid = $_GET['adid'];
    
    $page_title .= " $adtitle";
    $meta_kw .= ",$xcatname,$xcatname classified ads,classified ads on $xcatname,$xcatname offers,$xsubcatname,$xsubcatname classified ads,classified ads on $xsubcatname,$xsubcatname offers";
    $meta_desc .= "$site_name has posts in $catname and $subcatname and a number of other categories.";
    
    }
    
    elseif ($xview == "ads" && $_GET['subcatid'] > 0)
    {
    $xsection = "ads";
    $xadtype = "A";
    $xpostmode = FALSE;
    
    $sql = "SELECT cat.catid, catname as catname, subcatname as subcatname
    		FROM $t_subcats scat
    			INNER JOIN $t_cats cat ON cat.catid = scat.catid
    		WHERE scat.subcatid = $_GET[subcatid]";
    list($xcatid, $xcatname, $xsubcatname) = mysql_fetch_array(mysql_query($sql));
    $xsubcatid = $_GET['subcatid'];
    
    
    if($xsearch)
    {
    	$searchinttile = "'$xsearch'";
    
    	//if ($_GET['pricemin'] && $_GET['pricemax']) $searchinttile .= " between $currency $_GET[pricemin]  and $_GET[pricemax] ";
    	//if ($_GET['pricemin']) $searchinttile .= " above $currency $_GET[pricemin]";
    	//if ($_GET['pricemax']) $searchinttile .= " below $currency $_GET[pricemax]";
    
    	//$page_title .= " Search results for $searchinttile in $xcatname > $xsubcatname";
    	$page_title .= " $lang[sEARCH] - $searchinttile";
    
    }
    else
    {
    	$page_title .= " $lang[sHOWING_ADS_IN] $xcatname > $xsubcatname";
    }
    
    $meta_kw .= ",$xcatname,$xcatname classified ads,classified ads on $xcatname,$xcatname offers,$xsubcatname,$xsubcatname classified ads,classified ads on $xsubcatname,$xsubcatname offers";
    $meta_desc .= "$site_name has posts in $catname and $subcatname and a number of other categories.";
    }
    
    elseif (($xview == "ads" || $xview == "subcats") && $_GET['catid'])
    {
    $xsection = "ads";
    $xadtype = "A";
    $xpostmode = FALSE;
    
    $sql = "SELECT catname as catname
    		FROM $t_cats cat
    		WHERE cat.catid = $_GET[catid]";
    list($xcatname) = mysql_fetch_array(mysql_query($sql));
    
    $xcatid = $_GET['catid'];
    
    if($xsearch)
    {
    	//$page_title .= " Search results for '$xsearch' in $xcatname";
    	$page_title .= " $lang[sEARCH] - '$xsearch'";
    }
    else
    {
    	$page_title .= " $lang[sHOWING_ADS_IN] $xcatname";
    }
    
    $meta_kw .= ",$xcatname,$xcatname classified ads,classified ads on $xcatname,$xcatname offers";
    $meta_desc .= "$site_name has posts in $catname and $subcatname and a number of other categories.";
    }
    
    elseif (($xview == "showevent" || ($xview == "mailad" && $_GET['adtype'] == "E")) && $_GET['adid'])
    {
    $xsection = "events";
    $xadtype = "E";
    $xpostmode = FALSE;
    
    $xcatname = $lang['EVENTS'];
    $xadid = $_GET['adid'];
    $xcatid = -1;
    $xsubcatid = -1;
    
    $sql = "SELECT adtitle FROM $t_events WHERE adid = $xadid";
    list($adtitle) = mysql_fetch_array(mysql_query($sql));
    
    if ($_GET['date']) $xdate = $_GET['date'];
    else $xdate = date("Y-m-d");
    
    $page_title .= " $adtitle (Event on $xdate)";
    $meta_kw .= ",event calendar,events,classes,functions,meetings,announcements,events on $xdate,classes on $xdate,functions on $xdate,meetings on $xdate,announcements on $xdate";
    }
    
    elseif ($xview == "events")
    {
    $xsection = "events";
    $xadtype = "E";
    $xpostmode = FALSE;
    
    $xcatname = $lang['EVENTS'];
    $xsubcatname = $lang['EVENTS'];
    $xcatid = -1;
    $xsubcatid = -1;
    
    if ($_GET['date']) 
    {
    	$xdate = $_GET['date'];
    	$urldate = $xdate;
    	$page_title .= " - $xdate";
    	$meta_kw .= ",events on $xdate,classes on $xdate,functions on $xdate,meetings on $xdate,announcements on $xdate";
    }
    else 
    {
    	$xsearchmode = TRUE;
    }
    
    $page_title .= " Event Calendar";
    $meta_kw .= ",event calendar,events,classes,functions,meetings,announcements";
    
    }
    
    elseif ($xview == "imgs")
    {
    $xsection = "imgs";
    $xadtype = "I";
    $xpostmode = FALSE;
    
    $page_title .= " Images";
    $xposterenc = $_GET['posterenc'];
    if ($xposterenc)
    {
    	$sql = "SELECT postername, posteremail FROM $t_imgs WHERE MD5(CONCAT('IMG', '$encryptposter_sep', postername, '$encryptposter_sep', posteremail)) = '$xposterenc' LIMIT 1";
    	$res = mysql_query($sql) or die(mysql_error());
    	list($xpostername, $xposteremail) = mysql_fetch_array($res);
    	$page_title .= " by $xpostername";
    }
    
    }
    
    elseif ($xview == "showimg")
    {
    $xsection = "imgs";
    $xadtype = "I";
    $xpostmode = FALSE;
    
    $ximgid = $_GET['imgid'];
    $sql = "SELECT imgtitle, postername, posteremail, showemail FROM $t_imgs WHERE imgid = $ximgid";
    list($ximgtitle, $xpostername, $xposteremail, $xshowposteremail) = mysql_fetch_array(mysql_query($sql));
    $xposterenc = EncryptPoster("IMG", $xpostername, $xposteremail);
    $page_title .= " Images by $xpostername - $ximgtitle";
    }
    
    if ($xview == "post" || $xview == "edit")
    {
    $xsection = ($_REQUEST['postevent'] || $_REQUEST['isevent']) ? "events" : "ads";
    $xadtype = ($_REQUEST['postevent'] || $_REQUEST['isevent']) ? "E" : "A";;
    $xpostmode = TRUE;
    
    $xcatid = $_GET['catid'];
    $xsubcatid = $_GET['subcatid'];
    }
    else if ($xview == "postimg" || $xview == "editimg")
    {
    $xsection = "imgs";
    $xadtype = "I";
    $xpostmode = TRUE;
    }
    elseif ($xview == "selectcity")
    {
    $xpostmode = TRUE;
    }
    
    $meta_desc .= "$site_name has an event calendar also to post important events, classes, shows etc.";
    $page_title = ($xcityid>0 ? "$xcityname, " : "") . "$xcountryname" . ($page_title ? ": " : "" ) . "$page_title - $site_name";
    
    
    // Find subcat specific fields
    if(!isset($xsubcatid)) $xsubcatid = false;
    if ($xsubcatid)
    {
    list($xsubcathasprice, $xsubcatpricelabel, $xsubcatfields) = GetCustomFields($xsubcatid);
    }
    
    
    // Make timestamp of $xdate
    if(!isset($xdate)) $xdate = false;
    if ($xdate)
    {
    preg_match("/([0-9]+)-([0-9]+)-([0-9]+)/", $xdate, $dp);
    $xdatestamp = mktime(0, 0, 0, $dp[2], $dp[3], $dp[1]);
    $xdate_y = $dp[1];
    $xdate_m = $dp[2];
    $xdate_d = $dp[3];
    }
    
    
    // Location condition
    if($xcityid > 0)
    {
    $loc_condn = $city_condn = "AND a.cityid = $xcityid";
    $loc_condn_img = "AND a.cityid = $xcityid";
    }
    else
    {
    $loc_condn = $country_condn = "AND ct.countryid = $xcountryid";
    $loc_condn_img = "AND ct.countryid = $xcountryid";
    }
    
    
    // Visibility condition
    $visibility_condn = "a.enabled = '1' AND a.verified = '1' AND a.expireson >= NOW()";
    
    if($admin_logged) $visibility_condn_admin = "1";
    else $visibility_condn_admin = "a.enabled = '1' AND a.verified = '1' AND a.expireson >= NOW()";
    
    
    // Post link
    $postlink = "$script_url/index.php?view=post";
    if(!isset($xcatid)) $xcatid = false;
    if ($xcatid) $postlink .= "&catid=$xcatid";
    if ($xsubcatid) $postlink .= "&subcatid=$xsubcatid";
    if ($xview == "events" || $xview == "showevent") $postlink .= "&postevent=1";
    $postlink .= "&cityid=$xcityid&lang=$xlang";
    
    // Post ad link
    $postadlink = "index.php?view=post";
    if ($xcatid > 0) $postadlink .= "&catid=$xcatid";
    if ($xsubcatid > 0) $postadlink .= "&subcatid=$xsubcatid";
    $postadlink .= "&cityid=$xcityid";
    
    // Post event link
    $posteventlink = "index.php?view=post&postevent=1&cityid=$xcityid";
    
    // Post image link
    $postimagelink = "index.php?view=postimg&cityid=$xcityid";
    
    
    // Find cell width for directory based on $dir_cols
    $cell_width = round(100/$dir_cols);
    
    
    
    /*--------------------------------------------------+
    | FUNCTIONS                                         |
    +--------------------------------------------------*/
    
    
    function FilterBadWords($str)
    {
    global $path_escape, $badword_replacement, $datafile;
    
    $w = array();
    $fp = fopen("{$path_escape}{$datafile[badwords]}", "r");
    while($s=fgets($fp, 1024)) { if($s=trim($s)) $w[] = $s; }
    fclose($fp);
    
    // Note: Call preg_replace twice. Otherwise it wont replace consecutive bad words.
    $wordlist = implode("|", $w);
    $str = preg_replace("/(^|[^\w])($wordlist)([^\w]|$)/i", "\\1{$badword_replacement}\\3", $str);
    $str = preg_replace("/(^|[^\w])($wordlist)([^\w]|$)/i", "\\1{$badword_replacement}\\3", $str);
    
    return $str;
    }
    
    function QuickDate($timestamp, $showtime=TRUE, $gmt=FALSE, $format="")
    {
    if(!$format)
    {
    	if($showtime) $format = $GLOBALS['langx']['datetimeformat'];
    	else $format =  $GLOBALS['langx']['dateformat'];
    }
    
    return xDate($timestamp, $gmt, $format, $GLOBALS['langx']['months'], $GLOBALS['langx']['weekdays']);
    }
    
    function EncryptPoster($section, $postername, $posteremail)
    {
    global $encryptposter_sep;
    return md5("$section$encryptposter_sep$postername$encryptposter_sep$posteremail");
    }
    
    function GetCustomFields($subcatid)
    {
    global $xfields_count, $t_subcats, $t_subcatxfields;
    
    $sql = "SELECT hasprice, pricelabel
    		FROM $t_subcats
    		WHERE subcatid = $subcatid";
    list($hasprice, $pricelabel) = mysql_fetch_array(mysql_query($sql));
    
    // Get custom fields
    $sql = "SELECT * FROM $t_subcatxfields WHERE subcatid = $subcatid LIMIT $xfields_count";
    $res = mysql_query($sql) or die($sql.mysql_error());
    
    $subcatfields = array();
    while($row=mysql_fetch_array($res))
    {
    	$subcatfields[$row['fieldnum']] = array("NAME"=>$row["name"], 
    											"TYPE"=>$row['type'], 
    											"VALUES"=>$row['vals'],
    											"VALUES_A"=>explode(";",$row['vals']),
    											"SHOWINLIST"=>$row['showinlist'],
    											"SEARCHABLE"=>$row['searchable']);
    }
    
    return(array($hasprice, $pricelabel, $subcatfields));
    }
    
    function GetDateSelectOptions($seld=0, $selm=0, $sely=0)
    {
    global $langx;
    
    $dlist = "";
    for($i=1; $i<=31; $i++) $dlist .= "<option value=\"$i\"".($seld==$i?" selected":"").">$i</option>\n";
    
    $mlist = "";
    for ($i=1; $i<=12; $i++) $mlist .= "<option value=\"$i\"".($selm==$i?" selected":"").">".$langx['months'][$i-1]."</option>\n";
    
    $ylist = "";
    $thisy = date("Y");
    for ($i=2005; $i<=$thisy; $i++) $ylist .= "<option value=\"$i\"".($sely==$i?" selected":"").">$i</option>";
    
    return (array("D"=>$dlist, "M"=>$mlist, "Y"=>$ylist));
    }
    
    function IPVal($ip = "")
    {
    if(!$ip) $ip = $_ENV['REMOTE_ADDR'];
    preg_match("/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/U", $ip, $ipp);
    $ipval = $ipp[4] + $ipp[3]*256 + $ipp[2]*256*256 + $ipp[1]*256*256*256;
    return  $ipval;
    }
    
    function RemoveBadURLChars($str)
    {
    return preg_replace("/[^0-9a-zA-Z]+/", "_", $str);
    }
    
    function SaveUploadFile($file, $dir, $resize=TRUE, $maxw=0, $maxh=0, $quality=75)
    {
    if(!$GLOBALS['image_verification']) $resize = FALSE;
    
    if ($file['tmp_name'])
    {
    	$dotpos = strrpos($file['name'], ".");
    
    	if ($dotpos) $ext = strtolower(substr($file['name'], $dotpos));
    	else $ext = "";
    
    	$newname = uniqid("") . substr(md5($file['name']), 5, 12) . $ext;
    
    	if ($resize && ($ext==".jpg" || $ext==".jpeg" || $ext==".jfif")) $copysuccess = SaveResizedJPG($file['tmp_name'], "$dir/$newname", $maxw, $maxh, $quality);
    	else $copysuccess = copy($file['tmp_name'], "$dir/$newname");
    
    	if ($copysuccess)
    		$ret = $newname;
    	else
    		return "";
    
    	unlink($file['tmp_name']);
    	return $ret;
    }
    else
    {
    	return "";
    }
    }
    
    
    function SaveResizedJPG($srcfile, $dstfile, $maxw=450, $maxh=325, $quality=75)
    {
    $imgsrc = imagecreatefromjpeg($srcfile);
    $w = $actw = imagesx($imgsrc);
    $h = $acth = imagesy($imgsrc);
    
    if (!$maxw) $maxw = 450;
    if (!$maxh) $maxh = 325;
    if (!$quality) $quality = 75;
    
    if ($w > $maxw)
    {
    	$w = $maxw;
    	$h = round($acth/$actw*$maxw);
    }
    if ($h > $maxh)
    {
    	$h = $maxh;
    	$w = round($actw/$acth*$maxh);
    }
    
    $imgdest = imagecreatetruecolor($w,$h);
    imagecopyresampled($imgdest, $imgsrc, 0, 0, 0, 0, $w, $h, $actw, $acth);
    $imgsrc = null;
    return imagejpeg($imgdest, $dstfile, $quality);
    
    }
    
    function xMail($to, $subj, $msg, $from="", $charset="UTF-8", $xtraheaders="")
    {
    $headers  = "";
    if($from) $headers .= "From: {$from}\n";
    $headers .= "MIME-Version: 1.0\n";
    $headers .= "Content-Type: text/plain; charset=\"$charset\"\n";
    $headers .= "Content-Transfer-Encoding: 7bit\n";
    $headers .= $xtraheaders;
    $headers .= "\n";
    
    $ret = mail ($to, $subj, $msg, $headers, "-f$from");
    return $ret;
    
    }
    
    function HTMLMail($to, $subj, $msg, $from="", $charset="UTF-8", $xtraheaders="")
    {
    $headers  = "";
    if($from) $headers .= "From: {$from}\n";
    $headers .= "MIME-Version: 1.0\n";
    $headers .= "Content-Type: text/html; charset=\"$charset\"\n";
    $headers .= "Content-Transfer-Encoding: 7bit\n";
    $headers .= $xtraheaders;
    
    $ret = mail ($to, $subj, $msg, $headers, "-f$from");
    return $ret;
    
    }
    
    function xStripSlashes($str)
    {
    if(get_magic_quotes_gpc()) return stripslashes($str);
    else return $str;
    }
    
    function xDate($timestamp, $gmt=FALSE, $format="{l}, {d} {M}, {Y} {H}:{i}", $months="", $weekdays="")
    {
    if(!$months) $months = array("January","February","March","April","May","June","July","August","September","October","November","December");
    if(!$weekdays) $weekdays = array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
    
    $datetplformat = "w d n Y H i s j";
    $datetpl = $gmt ? gmdate($datetplformat, $timestamp) : date($datetplformat, $timestamp);
    $dateparts = explode(" ", $datetpl);
    
    $date = $format;
    $date = str_replace("{l}", $weekdays[$dateparts[0]], $date);
    $date = str_replace("{d}", $dateparts[1], $date);
    $date = str_replace("{M}", $months[$dateparts[2]-1], $date);
    $date = str_replace("{Y}", $dateparts[3], $date);
    $date = str_replace("{H}", $dateparts[4], $date);
    $date = str_replace("{i}", $dateparts[5], $date);
    $date = str_replace("{s}", $dateparts[6], $date);
    $date = str_replace("{j}", $dateparts[7], $date);
    $date = str_replace("{g}", $dateparts[8], $date);
    $date = str_replace("{a}", $dateparts[9], $date);
    
    return $date;
    }
    
    function ValidateEmail($email)
    {
    global $debug;
    if($debug) return TRUE;
    else return preg_match("/^[^\s]+@[^\s]+\.[^\s]+$/", $email);
    }
    
    function xSetCookie($name, $value)
    {
    setcookie($name, $value, 0, "/");
    }
    
    function GetThumbnailSize($imgfilename, $maxw, $maxh)
    {
    $origsize = @getimagesize($imgfilename);
    $newsize = array($origsize[0], $origsize[1]);
    
    if ($newsize[0] > $maxw)
    {
    	$newsize[0] = $maxw;
    	$newsize[1] = round($origsize[1]/$origsize[0]*$maxw);
    }
    if ($newsize[1] > $maxh)
    {
    	$newsize[1] = $maxh;
    	$newsize[0] = round($origsize[0]/$origsize[1]*$maxh);
    }
    
    return $newsize;
    }
    
    
    ?>

  11. We really need help with this fatal error message were recieving. Basically on our website www.flog-it.ie we allow people to upload images ok. Now in the config.php file we have set jpeg, jpg, png and gif as accepted filetypes and set the maximum file size as being 5000kb ok. But someone just uploaded a .jpeg image that was 260kb and it was 1459px x 1094px and they recieved this error:

     

    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 5836 bytes) in /home/sites/flog-it.ie/public_html/common.inc.php on line 548
    

     

    So i went to line 548 in common.inc.php and this is what the code is:

     

    $imgsrc = imagecreatefromjpeg($srcfile);

     

    The whole code of that area of common.inc is as follows:

     

    function SaveResizedJPG($srcfile, $dstfile, $maxw=450, $maxh=325, $quality=75)
    {
    $imgsrc = imagecreatefromjpeg($srcfile);
    $w = $actw = imagesx($imgsrc);
    $h = $acth = imagesy($imgsrc);
    
    if (!$maxw) $maxw = 450;
    if (!$maxh) $maxh = 325;
    if (!$quality) $quality = 75;
    
    if ($w > $maxw)
    {
    	$w = $maxw;
    	$h = round($acth/$actw*$maxw);
    }
    if ($h > $maxh)
    {
    	$h = $maxh;
    	$w = round($actw/$acth*$maxh);
    }
    
    $imgdest = imagecreatetruecolor($w,$h);
    imagecopyresampled($imgdest, $imgsrc, 0, 0, 0, 0, $w, $h, $actw, $acth);
    return imagejpeg($imgdest, $dstfile, $quality);

     

     

  12. **Showad.php** (This is the code that displays an advert when its clicked an example can be seen by clicking here

     

    <?php
    
    require_once("config.inc.php");
    
    if($image_verification) 
    {
    require_once("captcha.cls.php");
    $captcha = new captcha();
    }
    
    $msg = "";
    $err = "";
    
    ?>
    
    <?php
    
    if (!$_GET['adid'])
    {
    header("Location: $script_url/?view=main&cityid=$xcityid&lang=$xlang");
    exit;
    }
    
    
    $adtable = ($_GET['view'] == "showevent") ? $t_events : $t_ads;
    
    // Make up search query
    $qsA = $_GET; $qs = "";
    unset($qsA['do'], $qsA['reported'], $qsA['mailed'], $qsA['mailerr'], $qsA['msg'], $qsA['err']);
    foreach ($qsA as $k=>$v) $qs .= "$k=$v&";
    
    if ($_GET['do'] == "reportabuse")
    {
    $sql = "UPDATE $adtable SET abused = abused + 1 WHERE adid = $_GET[adid]";
    mysql_query($sql) or die($sql);
    
    if(mysql_affected_rows())
    {
    	echo "<div class=\"msg\">$lang[MESSAGE_ABUSE_REPORT]</div>";
    
    	if($max_abuse_reports)
    	{
    		$sql = "DELETE FROM $adtable WHERE abused > $max_abuse_reports";
    		mysql_query($sql);
    	}
    
    	header("Location: $script_url/?{$qs}reported=y");
    	exit;
    }
    
    unset($_GET['do']);
    }
    
    
    if ($xview == "showevent")
    {
    // Get the event
    $sql = "SELECT a.*, UNIX_TIMESTAMP(a.timestamp) AS timestamp, UNIX_TIMESTAMP(a.createdon) AS createdon, UNIX_TIMESTAMP(a.expireson) AS expireson, UNIX_TIMESTAMP(feat.featuredtill) AS featuredtill,
    		UNIX_TIMESTAMP(a.starton) AS starton, UNIX_TIMESTAMP(a.endon) AS endon
    	FROM $t_events a
    		LEFT OUTER JOIN $t_featured feat ON a.adid = feat.adid AND feat.adtype = 'E'
    	WHERE a.adid = $xadid
    		AND $visibility_condn_admin";
    $ad = mysql_fetch_array(mysql_query($sql));
    
    $isevent = 1;
    
    if($sef_urls) $thisurl = "{$vbasedir}$xcityid/events/$xdate/$xadid_".RemoveBadURLChars($ad['adtitle']).".html";
    else $thisurl = "?$qs";
    
    }
    else
    {
    // List of extra fields
    $xfieldsql = "";
    if(count($xsubcatfields)) 
    {
    	for($i=1; $i<=$xfields_count; $i++)	$xfieldsql .= ", axf.f$i";
    }
    
    // Get the ad
    $sql = "SELECT a.*, UNIX_TIMESTAMP(a.timestamp) AS timestamp, UNIX_TIMESTAMP(a.createdon) AS createdon, UNIX_TIMESTAMP(a.expireson) AS expireson, UNIX_TIMESTAMP(feat.featuredtill) AS featuredtill $xfieldsql
    		FROM $t_ads a
    			INNER JOIN $t_subcats scat ON scat.subcatid = a.subcatid
    			LEFT OUTER JOIN $t_adxfields axf ON a.adid = axf.adid
    			LEFT OUTER JOIN $t_featured feat ON a.adid = feat.adid AND feat.adtype = 'A'
    		WHERE a.adid = $xadid
    			AND $visibility_condn_admin";
    $ad = mysql_fetch_array(mysql_query($sql));
    
    $isevent = 0;
    if($sef_urls) $thisurl = "{$vbasedir}$xcityid/posts/$xcatid/$xsubcatid/$xadid_".RemoveBadURLChars($ad['adtitle']).".html";
    else $thisurl = "?$qs";
    
    }
    
    
    if (!$ad) 
    {
    header("Location: $script_url/?view=main&cityid=$xcityid&lang=$xlang");
    exit;
    }
    
    
    if ($_POST['email'] && $_POST['mail'] && $ad['showemail'] == EMAIL_USEFORM)
    {
    if ($image_verification && !$captcha->verify($_POST['captcha']))
    {
    	$err = $lang['ERROR_IMAGE_VERIFICATION_FAILED'];
    }
    else
    {
    
    	unset($_GET['mailed'],$_GET['mailerr'],$_GET['reported']);
    	$qs = "";
    	foreach ($_GET as $k=>$v) $qs .= "$k=$v&";
    	$qs = substr($qs, 0, -1);
    	$thisurl = "$script_url/?$qs";
    
    	$thismail_header = file_get_contents("mailtemplates/contact_header.txt");
    	$thismail_header = str_replace("{@SITENAME}", $site_name, $thismail_header);
    	$thismail_header = str_replace("{@ADTITLE}", $ad['adtitle'], $thismail_header);
    	$thismail_header = str_replace("{@ADURL}", $thisurl, $thismail_header);
    	$thismail_header = str_replace("{@FROM}", $_POST['email'], $thismail_header);
    
    	$thismail_footer = file_get_contents("mailtemplates/contact_footer.txt");
    	$thismail_footer = str_replace("{@SITENAME}", $site_name, $thismail_footer);
    	$thismail_footer = str_replace("{@ADTITLE}", $ad['adtitle'], $thismail_footer);
    	$thismail_footer = str_replace("{@ADURL}", $thisurl, $thismail_footer);
    	$thismail_footer = str_replace("{@FROM}", $_POST['email'], $thismail_footer);
    
    	$mail = $thismail_header . "\n" .
    			stripslashes($_POST['mail']) . "\n" .
    			$thismail_footer;
    
    
    	// Makeup mail headers and compose mime msg
    
    	$mime_boundary = "<<<-=-=-[xzero.clfx.".md5(time())."]-=-=->>>";
    
    	$mailheaders  = "";
    	$mailheaders .= "From: $contactmail_from\n";
    	$mailheaders .= "Reply-To: $_POST[email]\n";
    
    	if($_FILES['attach']['tmp_name'] && !$_FILES['attach']['error'])
    	{
    		$filename = $_FILES['attach']['name'];
    		$filetmpname = $_FILES['attach']['tmp_name'];
    		$filesize = $_FILES['attach']['size'];
    		$filecontents = base64_encode(file_get_contents($filetmpname));
    		$fileencoding = "base64";
    
    		$dotpos = strrpos($filename, ".");
    		if($dotpos !== FALSE) $ext = substr($filename, -$dotpos+1);
    
    		if (in_array($ext, $contactmail_attach_wrongfiles))
    		{
    			$mailerr = $lang['ERROR_INVALID_ATTACHMENT'];
    		}
    		elseif($filesize > $contactmail_attach_maxsize*1000)
    		{
    			$mailerr = "The attachment is too big";
    		}
    		else
    		{
    			$mailheaders .= "MIME-Version: 1.0\n";
    			$mailheaders .= "Content-Type: multipart/mixed;\n";
    			$mailheaders .= " boundary=\"".$mime_boundary."\"";
    
    			$fullmsg  = "";
    			$fullmsg .= "This is a multi-part message in MIME format.\n";
    			$fullmsg .= "\r\n";
    			$fullmsg .= "--".$mime_boundary."\r\n";
    
    			$fullmsg .= "Content-Type: text/plain; charset=\"{$langx[charset]}\"\n";
    			$fullmsg .= "Content-Transfer-Encoding: 8bit\n";
    			$fullmsg .= "\r\n";
    			$fullmsg .= $mail;
    			$fullmsg .= "\r\n";
    			$fullmsg .= "--".$mime_boundary."\r\n";
    
    			$fullmsg .= "Content-Type: application/octet-stream; name=\"".$filename."\"\n";
    			$fullmsg .= "Content-Transfer-Encoding: ".$fileencoding."\n";
    			$fullmsg .= "Content-Disposition: attachment; filename=\"".$filename."\"\n";
    			$fullmsg .= "\r\n";
    			$fullmsg .= $filecontents;
    			$fullmsg .= "\r\n";
    			$fullmsg .= "--".$mime_boundary."--\r\n";
    		}
    	}
    	else
    	{
    		$mailheaders .= "Content-Type: text/plain; charset=\"{$langx[charset]}\"\n";
    		$mailheaders .= "Content-Transfer-Encoding: 8bit\n";
    		$fullmsg = $mail;
    	}
    
    	$mailheaders .= "\r\n";
    
    	if ($mailerr)
    	{
    		$mailresult = "n";
    	}
    	else
    	{
    		if (mail($ad['email'], $lang['MAILSUBJECT_CONTACT_FORM'], $fullmsg, $mailheaders, "-f{$site_email}"))
    			$mailresult = "y";
    		else
    			$mailresult = "n";
    	}
    
    	header("Location: $script_url/?$qs&mailed=$mailresult&mailerr=$mailerr");
    	exit;
    }
    
    }
    
    $sql = "SELECT *
    	FROM $t_adpics p
    	WHERE p.adid = $xadid
    		AND isevent = '$isevent'";
    $pres = mysql_query($sql);
    
    
    ?>
    
    
    <script language="javascript">
    function confirmAbuseReport()
    {
    if (confirm('<?php echo addslashes($lang['REPORT_ABUSE_CONFIRM']); ?>'))
    {
    	location.href = '?<?php echo $qs; ?>do=reportabuse';
    }
    }
    </script>
    
    <?php
    
    if(!$_POST['mail'])
    {
    if($_GET['mailed'] == "y")		{ $msg .= $lang['MESSAGE_MAIL_SENT']."<br>"; }
    elseif ($_GET['mailed'] == "n")	{ $err .= $lang['ERROR_MAIL_NOT_SENT']."<br>".$_GET['mailerr']."<br>"; }
    
    if($_GET['reported'] == "y")	{ $msg .= $lang['MESSAGE_ABUSE_REPORT']."<br>"; }
    }
    
    if($_GET['msg'])				{ $msg .= $_GET['msg']."<br>"; }
    if($_GET['err'])				{ $err .= $_GET['err']."<br>"; }
    
    ?>
    
    <?php
    
    if($err) echo "<div class=\"err\">$err</div>";
    if($msg) echo "<div class=\"msg\">$msg</div>";
    
    ?>
    
    <?php if($ad['featuredtill'] && $ad['featuredtill'] > time()) { ?>
    <div class="msg">
    <img src="images/featured.gif" align="absmiddle">
    <b><?php echo $lang['THIS_AD_IS_FEATURED']; ?></b>
    </div>
    <?php } ?>
    
    <table class="adheader" width="100%">
    <tr>
    <td>
    
    <div align="right">
    <a href="javascript:confirmAbuseReport();"><?php echo $lang['REPORT_ABUSE']; ?></a> |
    <a href="?view=mailad&cityid=<?php echo $xcityid; ?>&adid=<?php echo $xadid; ?>&adtype=<?php echo $xadtype; ?>"><?php echo $lang['EMAIL_THIS_AD_LINK']; ?></a>
    </div>
    <?php echo $lang['POST_ID']; ?> <?php echo ($view=="showevent"?"E":"A"); ?><?php echo $ad['adid']; ?><br><br>
    <?php
    if ($xview == "showevent")
    {
    ?>
    <b><?php echo date("d", $ad['starton'])." ".$langx['months_short'][date("n", $ad['starton'])-1] . ", " . date("y", $ad['starton']); ?>
    <?php if($ad['starton'] != $ad['endon']) echo " - " . date("d", $ad['endon']) . " " . $langx['months_short'][date("n", $ad['endon'])-1] . ", " . date("y", $ad['endon']); ?></b>
    <br>
    
    <?php
    }
    ?>
    
    <div class="adtitle">
    <?php echo $ad['adtitle']; ?>
    <?php if($ad['area']) echo " <span class=\"adarea\">($ad[area])</span>"; ?>
    </div><br>
    
    <b><?php echo $lang['AD_DATE']; ?></b>: 
    <?php echo QuickDate($ad['createdon']); ?>
    <br>
    
    <?php if($ad['createdon'] != $ad['timestamp']) { ?>
    <b><?php echo $lang['AD_LAST_UPDATE']; ?></b>: 
    <?php echo QuickDate($ad['timestamp']); ?>
    <br>
    <?php } ?>
    
    <b><?php echo $lang['AD_EXPIRES_ON']; ?></b>: 
    <?php echo QuickDate($ad['expireson']); ?>
    <br>
    
    <b><?php echo $lang['REPLY_TO']; ?></b>: 
    <?php if ($ad['showemail'] == EMAIL_SHOW) { ?>
    <a href="mailto:<?php echo $ad['email']; ?>"><?php echo $ad['email']; ?></a>
    
    <?php } elseif ($ad['showemail'] == EMAIL_USEFORM) { ?>
    <i><?php echo $lang['USE_CONTACT_FORM']; ?></i>
    
    <?php } else { ?>
    <i><?php echo $lang['EMAIL_NOT_SHOWN']; ?></i>
    
    <?php } ?>
    <br>
    
    </td>
    </tr>
    </table>
    
    <?php
    if(($xsubcathasprice && $ad['price']) || count($xsubcatfields))
    {
    ?>
    <div style="border-bottom:1px solid #E0E0E0;">
    <table>
    
    <?php if($xsubcathasprice) { ?><tr><td><b><?php echo $xsubcatpricelabel; ?></b></td><td>: <?php if(($xsubcathasprice && $ad['price'] > 0.00)) { ?><?php echo $currency . $ad['price']; ?><?php } else { echo $lang['AD_PRICE_NOT_PROVIDED']; } ?></td></tr><?php } ?>
    
    <?php if(count($xsubcatfields)) { foreach ($xsubcatfields as $fldnum=>$fld) { if(($fld['TYPE'] == "N" && $ad["f$fldnum"] > 0) || ($fld['TYPE'] != "N" && $ad["f$fldnum"])) { ?>
    <tr><td><b><?php echo $fld['NAME']; ?></b></td><td>: <?php echo $ad["f$fldnum"]; ?></td></tr>
    <?php }}} ?>
    
    <tr><td> </td></tr>
    </table></div><br>
    <?php
    }
    ?>
    
    <table class="ad" width="100%"><tr><td>
    
    <?php echo nl2br(preg_replace("/\[url\](.*)\[\/URL\]/iU", "<a href=\"\\1\" target=\"_blank\">\\1</a>$link_append", $ad['addesc'])); ?>
    
    </td></tr></table>
    
    <?php
    
    if (@mysql_num_rows($pres))
    {
    $i = 0;
    ?>
    
    <table class="adpics" width="100%"><tr><td>
    
    <?php
    while ($row = mysql_fetch_array($pres))
    {
    	$i++;
    
    	$imgsize = GetThumbnailSize("{$datadir[adpics]}/{$row[picfile]}", $images_max_width, $images_max_height);
    
    ?>
    
    	<img src="<?php echo "{$datadir[adpics]}/{$row[picfile]}"; ?>" id="adimg<?php echo $i; ?>" width="<?php echo $imgsize[0]; ?>" height="<?php echo $imgsize[1]; ?>"><br><br>
    
    <?php
    }
    ?>
    
    </td></tr></table>
    
    <?php
    
    $imgcnt = $i;
    
    }
    ?>
    
    
    <?php if ($ad['showemail'] == EMAIL_USEFORM) { 
    
    /*$qs = ""; $qsA = $_GET; unset($qsA['syndicate']);
    foreach ($qsA as $k=>$v) $qs .= "$k=$v&";*/
    
    ?>
    
    <form action="<?php echo "$script_url/?$qs"; ?>" method="post" enctype="multipart/form-data">
    <table class="contactform">
    <tr>
    	<th colspan="2"><?php echo $lang['CONTACT_USER']; ?>:<a name="contactform"> </a>
    </th>
    </tr>
    <tr><td colspan="2"> </td></tr>
    <tr>
    	<td><?php echo $lang['YOUR_EMAIL']; ?>: <span class="marker">*</span></td>
    	<td>
    	<input type="text" size="65" name="email">
    	</td>
    </tr>
    <tr>
    	<td valign="top"><?php echo $lang['YOUR_MESSAGE']; ?>: <span class="marker">*</span></td>
    	<td>
    	<textarea cols="64" rows="10" name="mail"></textarea>
    	</td>
    </tr>
    <tr>
    	<td valign="top"><?php echo $lang['ATTACHMENT']; ?>:</td>
    	<td>
    	<input type="file" size="55" name="attach"><br>
    	<span class="hint"><?php echo $lang['UNSUPPORTED_ATTACHEMNTS']; ?>: <?php echo implode(", ", $contactmail_attach_wrongfiles); ?><br>
    	</span>
    	</td>
    </tr>
    
    <?php
    if($image_verification)
    {
    ?>
    
    	<tr>
    		<td valign="top"><?php echo $lang['POST_VERIFY_IMAGE']; ?>: <span class="marker">*</span></td>
    		<td>
    		<img src="captcha.png.php?<?php echo rand(0,999); ?>"><br>
    		<span class="hint"><?php echo $lang['POST_VERIFY_IMAGE_HINT']; ?></span><br>
    		<input type="text" name="captcha" value="">
    		</td>
    	</tr>
    
    <?php
    }
    ?>
    
    <tr>
    	<td> </td>
    	<td><button type="submit"><?php echo $lang['BUTTON_SEND_MAIL']; ?></button></td>
    </tr>
    </table>
    </form>
    
    <?php } ?>

  13. This code is located at the end of ads.php. (Ads.php is to display all the adverts in a certain category an example can be seen by clicking here)

     

     

    <div class="noresults"><?php echo $lang['NO_RESULTS']; ?><br>
    <a href="?view=main&cityid=<?php echo $xcityid; ?>"><?php echo $lang['BACK_TO_HOME']; ?></a>
    </div>
    

  14. **Ads.php**

    <?php
    
    require_once("config.inc.php");
    require_once("pager.cls.php");
    
    
    // Pager
    $page = $_GET['page'] ? $_GET['page'] : 1;
    $offset = ($page-1) * $ads_per_page;
    
    if ($sef_urls && !$xsearchmode)
    {
    if ($xview == "events")
    {
    	$urlformat = "{$vbasedir}$xcityid/events/$xdate/page{@PAGE}.html";
    }
    else
    {
    	$urlformat = "{$vbasedir}$xcityid/posts/$xcatid/".($xsubcatid?$xsubcatid:0)."/page{@PAGE}.html";
    }
    }
    else
    {
    $urlformat = "?";
    $tmp = $_GET;
    unset($tmp['page'], $tmp['msg']);
    foreach ($tmp as $k=>$v) $urlformat .= "$k=$v&";
    $urlformat .= "page={@PAGE}";
    }
    
    // Location condition
    if($xcityid > 0)
    {
    $loc_condn = $city_condn = "AND a.cityid = $xcityid";
    }
    else
    {
    $loc_condn = $country_condn = "AND ct.countryid = $xcountryid";
    }
    
    
    if ($xview == "events")
    {
    $where = "";
    
    if ($xsearch)
    {
    	$searchsql = mysql_escape_string($xsearch);
    	$where = "(a.adtitle LIKE '%$searchsql%' OR a.addesc LIKE '%$searchsql%') AND a.endon >= NOW()";
    }
    else if ($xdate)
    {
    	$where = "(starton <= '$xdate' AND endon >= '$xdate')";
    }
    else
    {
    	$where = "starton >= NOW()";
    }
    
    if($_GET['area']) $where .= "AND a.area = '$_GET[area]'";
    
    
    if ($xsearchmode)
    {
    	$sort = "a.starton ASC";
    }
    else
    {
    	$sort = "a.starton DESC";
    }
    
                
    // Get count
    $sql = "SELECT COUNT(*) AS adcount
    		FROM $t_events a
    			INNER JOIN $t_cities ct ON a.cityid = ct.cityid
    			LEFT OUTER JOIN $t_featured feat ON a.adid = feat.adid AND feat.adtype = 'E'
    		WHERE $where
    			AND $visibility_condn
    			AND (feat.adid IS NULL OR feat.featuredtill < NOW())
    			$loc_condn";
    $tmp = mysql_query($sql) or die($sql.mysql_error());
    list($adcount) = mysql_fetch_array($tmp);
    
    // Get results
    $sql = "SELECT a.*, COUNT(*) AS piccount, p.picfile,
    			UNIX_TIMESTAMP(a.createdon) AS timestamp, ct.cityname,
    			UNIX_TIMESTAMP(a.starton) AS starton, UNIX_TIMESTAMP(a.endon) AS endon			
    		FROM $t_events a
    			INNER JOIN $t_cities ct ON a.cityid = ct.cityid
    			LEFT OUTER JOIN $t_adpics p ON a.adid = p.adid AND p.isevent = '1'
    			LEFT OUTER JOIN $t_featured feat ON a.adid = feat.adid AND feat.adtype = 'E'
    		WHERE $where
    			AND $visibility_condn
    			AND (feat.adid IS NULL OR feat.featuredtill < NOW())
    			$loc_condn
    		GROUP BY a.adid
    		ORDER BY $sort
    		LIMIT $offset, $ads_per_page";
    $res = mysql_query($sql) or die($sql.mysql_error());
    
    // Get featured events
    $sql = "SELECT a.*, COUNT(*) AS piccount, p.picfile,
    			UNIX_TIMESTAMP(a.createdon) AS timestamp, ct.cityname,
    			UNIX_TIMESTAMP(a.starton) AS starton, UNIX_TIMESTAMP(a.endon) AS endon
    		FROM $t_events a
    			INNER JOIN $t_featured feat ON a.adid = feat.adid AND feat.adtype = 'E' AND feat.featuredtill >= NOW()
    			INNER JOIN $t_cities ct ON a.cityid = ct.cityid
    			LEFT OUTER JOIN $t_adpics p ON a.adid = p.adid AND p.isevent = '1'
    		WHERE $where
    			AND $visibility_condn
    			$loc_condn
    		GROUP BY a.adid
    		ORDER BY $sort";
    $featres = mysql_query($sql) or die(mysql_error().$sql);
    
    // Vars
    $adtable = $t_events;
    $adtype = "E";
    $target_view = "showevent";
    $target_view_sef = "events";
    //$page_title = "Events";
    if ($_GET['date']) $link_extra = "&date=$xdate";
    else $find_date = TRUE;
    
    }
    else
    {
    // Make up the sql query
    $whereA = array();
    
    if ($xsearch)
    {
    	$searchsql = mysql_escape_string($xsearch);
    	$whereA[] = "(a.adtitle LIKE '%$searchsql%' OR a.addesc LIKE '%$searchsql%')";
    }
    
    if($_GET['area']) $whereA[] = "a.area = '$_GET[area]'";
    
    if ($xsubcathasprice && $_GET['pricemin'])
    {
    	$whereA[] = "a.price >= $_GET[pricemin]";
    }
    
    if ($xsubcathasprice && $_GET['pricemax'])
    {
    	$whereA[] = "a.price <= $_GET[pricemax]";
    }
    
    if ($xsubcatid)		$whereA[] = "a.subcatid = $xsubcatid";
    else if ($xcatid)	$whereA[] = "scat.catid = $xcatid";
    
    if (count($_GET['x']))
    {
    	foreach ($_GET['x'] as $fldnum=>$val)
    	{
    		if (!$val) continue;
    
    		if($xsubcatfields[$fldnum]['TYPE'] == "N" && is_array($val))
    		{
    			if($val['min']) $whereA[] = "axf.f{$fldnum} >= $val[min]";
    			if($val['max']) $whereA[] = "axf.f{$fldnum} <= $val[max]";
    		}
    		elseif($xsubcatfields[$fldnum]['TYPE'] == "D") 
    		{
    			$whereA[] = "axf.f{$fldnum} = '$val'";
    		}
    		else
    		{
    			$whereA[] = "axf.f{$fldnum} LIKE '%$val%'";
    		}
    	}
    }
    
    $where = implode(" AND ", $whereA);
    if (!$where) $where = "1";
    
    // Get count
    $sql = "SELECT COUNT(*) AS adcount
    		FROM $t_ads a
    			INNER JOIN $t_cities ct ON a.cityid = ct.cityid
    			INNER JOIN $t_subcats scat ON a.subcatid = scat.subcatid
    			INNER JOIN $t_cats cat ON scat.catid = cat.catid
    			LEFT OUTER JOIN $t_adxfields axf ON a.adid = axf.adid
    			LEFT OUTER JOIN $t_featured feat ON a.adid = feat.adid AND feat.adtype = 'A'
    		WHERE $where
    			AND $visibility_condn
    			AND (feat.adid IS NULL OR feat.featuredtill < NOW())
    			$loc_condn";
    
    $tmp = mysql_query($sql) or die(mysql_error());
    list($adcount) = mysql_fetch_array($tmp);
    
    // List of extra fields
    $xfieldsql = "";
    if(count($xsubcatfields)) 
    {
    	for($i=1; $i<=$xfields_count; $i++)	$xfieldsql .= ", axf.f$i";
    }
    
    // Get results
    $sql = "SELECT a.*, UNIX_TIMESTAMP(a.createdon) AS timestamp, ct.cityname,
    			COUNT(*) AS piccount, p.picfile,
    			scat.subcatname, cat.catid, cat.catname $xfieldsql
    		FROM $t_ads a
    			INNER JOIN $t_cities ct ON a.cityid = ct.cityid
    			INNER JOIN $t_subcats scat ON a.subcatid = scat.subcatid
    			INNER JOIN $t_cats cat ON scat.catid = cat.catid
    			LEFT OUTER JOIN $t_adxfields axf ON a.adid = axf.adid
    			LEFT OUTER JOIN $t_adpics p ON a.adid = p.adid AND p.isevent = '0'
    			LEFT OUTER JOIN $t_featured feat ON a.adid = feat.adid AND feat.adtype = 'A'
    		WHERE $where
    			AND $visibility_condn
    			AND (feat.adid IS NULL OR feat.featuredtill < NOW())
    			$loc_condn
    		GROUP BY a.adid
    		ORDER BY a.createdon DESC
    		LIMIT $offset, $ads_per_page";
    $res = mysql_query($sql) or die($sql.mysql_error());
    
    // Get featured ads
    $sql = "SELECT a.*, UNIX_TIMESTAMP(a.createdon) AS timestamp, ct.cityname,
    			COUNT(*) AS piccount, p.picfile,
    			scat.subcatname, cat.catid, cat.catname $xfieldsql
    		FROM $t_ads a
    			INNER JOIN $t_featured feat ON a.adid = feat.adid AND feat.adtype = 'A' AND feat.featuredtill >= NOW()
    			INNER JOIN $t_cities ct ON a.cityid = ct.cityid
    			INNER JOIN $t_subcats scat ON a.subcatid = scat.subcatid
    			INNER JOIN $t_cats cat ON scat.catid = cat.catid
    			LEFT OUTER JOIN $t_adxfields axf ON a.adid = axf.adid
    			LEFT OUTER JOIN $t_adpics p ON a.adid = p.adid AND p.isevent = '0'
    		WHERE $where
    			AND $visibility_condn
    			$loc_condn
    		GROUP BY a.adid
    		ORDER BY feat.timestamp DESC";
    $featres = mysql_query($sql) or die(mysql_error().$sql);
    $featadcount = mysql_num_rows($featres);
    
    // Vars
    $adtable = $t_ads;
    $adtype = "A";
    $target_view = "showad"; 
    $target_view_sef = "posts"; 
    //$page_title = ($xsubcatname ? $xsubcatname : $xcatname);
    
    }
    
    $pager = new pager($urlformat, $adcount, $ads_per_page, $page);
    
    ?>
    <table width="600" cellspacing="15" cellpadding="15" border="0"><tr>
    <td><h2><?php echo $xsubcatname?$xsubcatname:$xcatname; ?></h2></td>
    <td align="right" valign="top">
    <a href="<?php echo $rssurl; ?>"><img src="images/rss.gif" border="0" align="absmiddle"></a> 
    </td></tr></table>
    
    <?php
    
    if ($xview == "events" && !$xsearchmode)
    {
    // Calendar navigation
    $prevmonth = mktime(0, 0, 0, $xdate_m-1, $xdate_d, $xdate_y);
    $nextmonth = mktime(0, 0, 0, $xdate_m+1, $xdate_d, $xdate_y);
    $prevday = $xdatestamp - 24*60*60;
    $nextday = $xdatestamp + 24*60*60;
    ?>
    <table width="100%" class="eventnav" border="0"><tr>
    
    <td valign="bottom">
    <?php 
    if($sef_urls)
    {
    $prevday_url = "{$vbasedir}$xcityid/events/".date("Y-m-d", $prevday)."/";
    $nextday_url = "{$vbasedir}$xcityid/events/".date("Y-m-d", $nextday)."/";
    }
    else
    {
    $prevday_url = "?view=events&date=".date("Y-m-d", $prevday)."&cityid=$xcityid&lang=$xlang";
    $nextday_url = "?view=events&date=".date("Y-m-d", $nextday)."&cityid=$xcityid&lang=$xlang";
    }
    ?>
    <a href="<?php echo $prevday_url; ?>">
    <?php echo $lang['EVENTS_PREVDAY']; ?></a>
    </td>
    
    <td align="center">
    <b><?php echo QuickDate($xdatestamp, FALSE, FALSE); ?> </b>
    </td>
    
    <td align="right" valign="bottom">
    <a href="<?php echo $nextday_url; ?>">
    <?php echo $lang['EVENTS_NEXTDAY']; ?></a>
    </td>
    
    </tr></table>
    <?php
    }
    ?>
    
    <?php 
    if(!$show_sidebar_always)
    {
    ?>
    
    <div id="search_top">
    <b><?php echo $lang['SEARCH']; ?></b><br>
    <?php include("search.inc.php"); ?>
    </div>
    
    <?php
    }
    ?>
    
    
    <?php
    
    if ($adcount || mysql_num_rows($featres)>0)
    {
    
    ?>
    
    
    <table border="0" cellspacing="0" cellpadding="0" width="100%" class="adlisting">
    
    <?php
    
    if($xview == "events")
    {
    
    ?>
    <tr class="head">
    <td><?php echo $lang['EVENTLIST_EVENTTITLE']; ?></td>
    <td align="center" width="15%"><?php echo $lang['EVENTLIST_STARTSON']; ?></td>
    <td align="center" width="15%"><?php echo $lang['EVENTLIST_ENDSON']; ?></td>
    </tr>
    
    <?php
    
    // Featured events
    if (mysql_num_rows($featres)>0)
    {
    
    $css_first = "_first";
    
    while($row=mysql_fetch_array($featres))
    {
    	if ($find_date) 
    	{
    		$link_extra = "&date=".date("Y-m-d", $row['starton']);
    		$urldate = date("Y-m-d", $row['starton']);
    	}
    
    	if($sef_urls) $url = "{$vbasedir}$xcityid/$target_view_sef/$urldate/$row[adid]_" . RemoveBadURLChars($row['adtitle']) . ".html";
    	else $url = "?view=$target_view&adid=$row[adid]&cityid=$xcityid&lang=$xlang{$link_extra}";
    
    ?>
    
    	<tr class="featuredad<?php echo $css_first; ?>">
    		<td>
    		<a href="<?php echo $url; ?>" class="adtitle">
    		<?php 
    		if($row['picfile'] && $ad_thumbnails) 
    		{ 
    			$imgsize = GetThumbnailSize("{$datadir[adpics]}/{$row[picfile]}", $tinythumb_max_width, $tinythumb_max_height);
    		?>
    			<img src="<?php echo "$datadir[adpics]/$row[picfile]"; ?>" border="0" width="<?php echo $imgsize[0]; ?>" height="<?php echo $imgsize[1]; ?>" align="left" style="border:1px solid black;margin-right:5px;"> 
    		<?php 
    		}
    		?>
    		<img src="images/featured.gif" align="absmiddle" border="0">
    
    		<?php echo $row['adtitle']; ?></a>
    
    		<?php 
    		$loc = "";
    		if($row['area']) $loc = $row['area'];
    		if($xcityid < 0) $loc .= ($loc ? ", " : "") . $row['cityname'];
    		if($loc) echo "($loc)";
    		?>
    
    		<?php if($row['picfile']) { ?><img src="images/adwithpic.gif" align="absmiddle" title="This ad has picture(s)"><?php } ?>
    
    
    		<?php 
    		if($ad_preview_chars) 
    		{ 
    			echo "<span class='adpreview'>";
    			$row['addesc'] = preg_replace("/\[\/?URL\]/", "", $row['addesc']);
    			echo substr($row['addesc'],0,$ad_preview_chars);
    			if (strlen($row['addesc'])>$ad_preview_chars) echo "...";
    			echo "</span>";
    		} 
    		?>
    
    
    		</td>
    		<td align="center"><?php echo $langx['months_short'][date("n", $row['starton'])-1] . " " . date("j", $row['starton']); ?></td>
    		<td align="center"><?php if($row['starton'] != $row['endon']) echo $langx['months_short'][date("n", $row['endon'])-1] . " " . date("j", $row['endon']);	?>
    
    
    		</td>
    
    	</tr>
    
    <?php
    
    	$css_first = "";
    }
    
    }
    
    ?>
    
    
    <?php
    
    $i = 0;
    while($row=mysql_fetch_array($res))
    {
    	$css_class = "ad" . (($i%2)+1);
    	$i++;
    
    ?>
    
    	<tr class="<?php echo $css_class; ?>">
    
    		<td>
    
    			<?php
    
    			if ($find_date) 
    			{
    				$link_extra = "&date=".date("Y-m-d", $row['starton']);
    				$urldate = date("Y-m-d", $row['starton']);
    			}
    
    			if($sef_urls) $url = "{$vbasedir}$xcityid/$target_view_sef/$urldate/$row[adid]_" . RemoveBadURLChars($row['adtitle']) . ".html";
    			else $url = "?view=$target_view&adid=$row[adid]&cityid=$xcityid&lang=$xlang{$link_extra}";
    
    
    			?>
    
    			<a href="<?php echo $url; ?>" class="adtitle">
    
    
    			<?php 
    			if($row['picfile'] && $ad_thumbnails) 
    			{ 
    				$imgsize = GetThumbnailSize("{$datadir[adpics]}/{$row[picfile]}", $tinythumb_max_width, $tinythumb_max_height);
    			?>
    				<img src="<?php echo "$datadir[adpics]/$row[picfile]"; ?>" border="0" width="<?php echo $imgsize[0]; ?>" height="<?php echo $imgsize[1]; ?>" align="left" style="border:1px solid black;margin-right:5px;"> 
    			<?php 
    			}
    			?>
    
    
    			<?php echo $row['adtitle']; ?></a>
    
    			<?php 
    			$loc = "";
    			if($row['area']) $loc = $row['area'];
    			if($xcityid < 0) $loc .= ($loc ? ", " : "") . $row['cityname'];
    			if($loc) echo "($loc)";
    			?>
    
    
    			<?php if($row['picfile']) echo "<img src=\"images/adwithpic.gif\" align=\"absmiddle\" title=\"This ad has picture(s)\"> "; ?>
    
    
    
    		<?php 
    		if($ad_preview_chars) 
    		{ 
    			echo "<span class='adpreview'>";
    			$row['addesc'] = preg_replace("/\[\/?URL\]/", "", $row['addesc']);
    			echo substr($row['addesc'],0,$ad_preview_chars);
    			if (strlen($row['addesc'])>$ad_preview_chars) echo "...";
    			echo "</span>";
    		} 
    		?>
    
    
    		</td>
    		<td align="center"><?php echo $langx['months_short'][date("n", $row['starton'])-1] . " " . date("j", $row['starton']); ?></td>
    		<td align="center"><?php if($row['starton'] != $row['endon']) echo $langx['months_short'][date("n", $row['endon'])-1] . " " . date("j", $row['endon']);	?>
    
    
    			</td>
    
    	</tr>
    
    <?php
    
    }
    }
    else
    {
    
    ?>
    <tr class="head">
    <td><?php echo $lang['ADLIST_ADTITLE']; ?></td>
    <?php
    $colspan = 1;
    foreach ($xsubcatfields as $fldnum=>$fld)
    {
    if (!$fld['SHOWINLIST']) continue;
    
    echo "<td";
    //if ($fld['TYPE']=="N") 
    echo " align=\"center\"";
    echo ">$fld[NAME]</td>";
    $colspan++;
    }
    if ($xsubcathasprice) 
    {
    echo "<td align=\"right\" width=\"12%\">$xsubcatpricelabel</td>";
    $colspan++;
    }
    ?>
    </tr>
    
    <?php
    
    // Featured ads
    if (mysql_num_rows($featres)>0)
    {
    
    echo "<tr><td height=\"1\"></td></tr>";
    $css_first = "_first";
    
    while($row=mysql_fetch_array($featres))
    {
    
    	$catname_inurl = RemoveBadURLChars($row['catname']);
    	$subcatname_inurl = RemoveBadURLChars($row['subcatname']);
    
    	if($sef_urls) $url = "{$vbasedir}$xcityid/$target_view_sef/{$row[catid]}_{$catname_inurl}/{$row[subcatid]}_{$subcatname_inurl}/$row[adid]_" . RemoveBadURLChars($row['adtitle']) . ".html";
    	else $url = "?view=$target_view&adid=$row[adid]&cityid=$xcityid&lang=$xlang{$link_extra}";
    
    ?>
    
    	<tr class="featuredad<?php echo $css_first; ?>">
    		<td>
    		<a href="<?php echo $url; ?>" class="adtitle">
    
    
    		<?php 
    		if($row['picfile'] && $ad_thumbnails) 
    		{ 
    			$imgsize = GetThumbnailSize("{$datadir[adpics]}/{$row[picfile]}", $tinythumb_max_width, $tinythumb_max_height);
    		?>
    			<img src="<?php echo "$datadir[adpics]/$row[picfile]"; ?>" border="0" width="<?php echo $imgsize[0]; ?>" height="<?php echo $imgsize[1]; ?>" align="left" style="border:1px solid black;margin-right:5px;"> 
    		<?php 
    		}
    		?>
    
    
    
    		<img src="images/featured.gif" align="absmiddle" style="padding-right:5px;" border="0"><?php echo $row['adtitle']; ?></a>
    		<?php 
    		$loc = "";
    		if($row['area']) $loc = $row['area'];
    		if($xcityid < 0) $loc .= ($loc ? ", " : "") . $row['cityname'];
    		if($loc) echo "($loc)";
    		?>
    		<?php if($row['picfile']) { ?><img src="images/adwithpic.gif" align="absmiddle" title="This ad has Picture(s)"><?php } ?>
    
    
    			<?php 
    			if($ad_preview_chars) 
    			{ 
    				echo "<span class='adpreview'>";
    				$row['addesc'] = preg_replace("/\[\/?URL\]/", "", $row['addesc']);
    				echo substr($row['addesc'],0,$ad_preview_chars);
    				if (strlen($row['addesc'])>$ad_preview_chars) echo "...";
    				echo "</span>";
    			} 
    			?>
    
    
    		</td>
    
    		<?php
    
    		foreach ($xsubcatfields as $fldnum=>$fld)
    		{
    			if (!$fld['SHOWINLIST']) continue;
    
    			echo "<td";
    			//if ($fld['TYPE']=="N")
    			echo " align=\"center\"";
    			echo "width=\"10%\"> ".
    				((($fld['TYPE']=="N" && ($row["f$fldnum"]==-1 || $row["f$fldnum"]=="0" || $row["f$fldnum"]=="")) || ($fld['TYPE']!="N" && trim($row["f$fldnum"])==""))?"-":$row["f$fldnum"])."</td>";
    		}
    
    		if($xsubcathasprice) 
    			echo "<td align=\"right\"> ".($row['price'] > 0.00?"$currency".$row['price']:"-")."</td>";
    
    		?>
    
    	</tr>
    
    <?php
    
    	$css_first = "";
    
    }
    
    }
    
    ?>
    
    <?php
    
    $i = $j = 0;
    $lastdate = "";
    while($row=mysql_fetch_array($res))
    {
    	$date_formatted = date("Ymd", $row['timestamp']);
    	if($date_formatted != $lastdate)
    	{
    		if ($lastdate) 
    		{
    			//echo "<tr><td height=\"1\"></td></tr>";
    			$j = 0;
    		}
    
    		echo "<tr><td height=\"1\"></td></tr><tr><td class=\"datehead\" colspan=\"$colspan\">".QuickDate($row['timestamp'], FALSE, FALSE)."</td></tr><tr><td height=\"1\"></td></tr>";
    
    		$lastdate = $date_formatted;
    	}
    
    	$css_class = "ad" . (($j%2)+1);
    	$i++; $j++;
    
    	$catname_inurl = RemoveBadURLChars($row['catname']);
    	$subcatname_inurl = RemoveBadURLChars($row['subcatname']);
    
    	if($sef_urls) $url = "{$vbasedir}$xcityid/$target_view_sef/{$row[catid]}_{$catname_inurl}/{$row[subcatid]}_{$subcatname_inurl}/$row[adid]_" . RemoveBadURLChars($row['adtitle']) . ".html";
    	else $url = "?view=$target_view&adid=$row[adid]&cityid=$xcityid&lang=$xlang{$link_extra}";
    
    	if($xsearchmode || !$xsubcatid)
    	{
    		if($sef_urls) $subcatlink = "{$vbasedir}$xcityid/$target_view_sef/{$row[catid]}_{$catname_inurl}/{$row[subcatid]}_{$subcatname_inurl}/";
    		else $subcatlink = "?view=ads&subcatid=$row[subcatid]&cityid=$xcityid&lang=$xlang{$link_extra}";
    
    		$title_extra = " - <a href=\"$subcatlink\" class=\"adcat\">$row[catname] $path_sep $row[subcatname]</a>";
    	}
    
    
    ?>
    
    	<tr class="<?php echo $css_class; ?>">
    
    		<td>
    
    			<a href="<?php echo $url; ?>" class="adtitle">
    
    			<?php 
    			if($row['picfile'] && $ad_thumbnails) 
    			{ 
    				$imgsize = GetThumbnailSize("{$datadir[adpics]}/{$row[picfile]}", $tinythumb_max_width, $tinythumb_max_height);
    			?>
    				<img src="<?php echo "$datadir[adpics]/$row[picfile]"; ?>" border="0" width="<?php echo $imgsize[0]; ?>" height="<?php echo $imgsize[1]; ?>" align="left" style="border:1px solid black;margin-right:5px;"> 
    			<?php 
    			}
    			?>
    
    
    			<?php echo $row['adtitle']; ?></a>
    			<?php 
    			$loc = "";
    			if($row['area']) $loc = $row['area'];
    			if($xcityid < 0) $loc .= ($loc ? ", " : "") . $row['cityname'];
    			if($loc) echo "($loc)";
    			?>
    
    			<?php if($row['picfile']) echo "<img src=\"images/adwithpic.gif\" align=\"absmiddle\" title=\"This ad has picture(s)\"> "; ?>
    			<?php echo $title_extra; ?>
    
    
    			<?php 
    			if($ad_preview_chars) 
    			{ 
    				echo "<span class='adpreview'>";
    				$row['addesc'] = preg_replace("/\[\/?URL\]/", "", $row['addesc']);
    				echo substr($row['addesc'],0,$ad_preview_chars);
    				if (strlen($row['addesc'])>$ad_preview_chars) echo "...";
    				echo "</span>";
    			} 
    			?>
    
    
    		</td>
    		<?php
    
    		foreach ($xsubcatfields as $fldnum=>$fld)
    		{
    			if (!$fld['SHOWINLIST']) continue;
    
    			echo "<td";
    			//if ($fld['TYPE']=="N")
    			echo " align=\"center\"";
    			echo "width=\"10%\"> ".
    				((($fld['TYPE']=="N" && ($row["f$fldnum"]==-1 || $row["f$fldnum"]=="0" || $row["f$fldnum"]=="")) || ($fld['TYPE']!="N" && trim($row["f$fldnum"])==""))?"-":$row["f$fldnum"])."</td>";
    		}
    
    		if($xsubcathasprice) 
    			echo "<td align=\"right\"> ".($row['price'] > 0.00?"$currency".$row['price']:"-")."</td>";
    
    		?>
    
    	</tr>
    
    <?php
    
    }
    }
    ?>
    
    </table>
    
    <?php
    
    if ($adcount > $ads_per_page)
    {
    
    ?>
    
    <br>
    <div align="right">
    <table>
    <tr><td><b><?php echo $lang['PAGE']; ?>: </b></td><td><?php echo $pager->outputlinks(); ?></td></tr>
    </table>
    </div>
    
    <?php
    
    }
    
    ?>
    
    
    <?php
    
    }
    else
    {
    
    ?>
    
    
    <?php
    
    }
    
    ?>
    

  15. Ok so we have a new classifieds website called www.flog-it.ie. On this website we allow people to upload images to the website. These images are stored in our database. How do we setup so that when someone uploads an image it automatically applys a transparent png or gif as a watermark to each image? Below i have added the code for putting the images into the database imgs.php.

     

    ***imgs.php***

     

    <?php
    
    require_once("config.inc.php");
    require_once("pager.cls.php");
    
    // Pager
    $page = $_GET['page'] ? $_GET['page'] : 1;
    $offset = ($page-1) * $images_per_page;
    
    if ($sef_urls && !$xsearchmode)
    {
    $urlformat = "{$vbasedir}$xcityid/images/".($xposterenc?"$xposterenc/":"")."page{@PAGE}.html";
    }
    else
    {
    $urlformat = "?";
    $tmp = $_GET;
    unset($tmp['page'], $tmp['msg']);
    foreach ($tmp as $k=>$v) $urlformat .= "$k=$v&";
    $urlformat .= "page={@PAGE}&cityid=$xcityid&lang=$xlang";
    }
    
    // The link to see all images
    if ($sef_urls)
    {
    $allimgslink = "{$vbasedir}$xcityid/images/";
    }
    else
    {
    $allimgslink = "?view=imgs&cityid=$xcityid&lang=$xlang";
    }
    
    // View conditions
    if($xposterenc) $whereplus = "AND MD5(CONCAT('IMG', '$encryptposter_sep', a.postername, '$encryptposter_sep', a.posteremail)) = '$xposterenc'";
    
    $whereplus .= " $loc_condn_img";
    
    ?>
    
    <h2><?php if($xposterenc) { ?>
    <?php echo $lang['IMAGES_BY']; ?> <?php echo $xpostername; ?>
    <?php } else { ?>
    <?php echo $lang['IMAGES']; ?>
    <?php } ?>
    </h2>
    
    <table width="100%" cellpadding="0"><tr><td width="150">
    <?php if($xposterenc) { ?>
    <table><tr><td class="linkbox2" width="150">
    <a href="<?php echo $allimgslink; ?>"><?php echo $lang['ALL_IMAGES']; ?></a>
    </td></tr></table>
    <?php } ?>
    </td>
    <td align="right">
    <?php include_once("imgcredits.inc.php"); ?>
    </td></tr></table><br><br>
    
    
    <table width="98%"><tr><td valign="top">
    
    <div class="imglisting">
    
    <?php
    
    $sql = "SELECT COUNT(*)
    	FROM $t_imgs a
    		INNER JOIN $t_cities ct ON a.cityid = ct.cityid
    	WHERE $visibility_condn
    		$whereplus";
    list($imgcount) = mysql_fetch_array(mysql_query($sql));
    
    $sql = "SELECT a.*, UNIX_TIMESTAMP(a.createdon) AS createdon, 
    		COUNT(*) AS commentcount, ic.imgid AS hascomments
    	FROM $t_imgs a
    		INNER JOIN $t_cities ct ON a.cityid = ct.cityid
    		LEFT OUTER JOIN $t_imgcomments ic ON a.imgid = ic.imgid
    	WHERE $visibility_condn 
    		$whereplus
    	GROUP BY a.imgid
    	ORDER BY a.timestamp DESC
    	LIMIT $offset, $images_per_page";
    $res = mysql_query($sql) or die($sql.mysql_error());
    
    while ($row=mysql_fetch_array($res))
    {
    $posterenc = EncryptPoster("IMG", $row['postername'], $row['posteremail']);
    if($sef_urls) $imgurl = "{$vbasedir}$xcityid/images/$posterenc/$row[imgid].html";
    else $imgurl = "?view=showimg&posterenc=$posterenc&imgid=$row[imgid]&cityid=$xcityid&lang=$xlang";
    
    $imgsize = GetThumbnailSize("{$datadir[userimgs]}/{$row[imgfilename]}", $thumb_max_width, $thumb_max_height);
    
    ?>
    
    <div class="imgitem">
    <?php echo $lang['POST_ID']; ?> M<?php echo $row['imgid']; ?>
    <div class="head"><?php echo $row['imgtitle']; ?></div><br>
    
    <div class="caption">
    
    <?php echo $lang['POSTED_BY']; ?>
    
    <?php if($row['showemail']) echo "<a href=\"mailto:$row[posteremail]\" class=\"poster\">$row[postername]</a>"; else echo "<span class=\"poster\">$row[postername]</span>"; ?>
    
    <?php echo $lang['POSTED_ON']; ?>
    
    <span class="time">
    <?php echo QuickDate($row['createdon']); ?>
    </span>
    
    </div>
    
    <a href="<?php echo $imgurl; ?>"><img class="img" id="img<?php echo $row['imgid']; ?>" border="0" src="<?php echo "{$datadir[userimgs]}/{$row[imgfilename]}"; ?>" width="<?php echo $imgsize[0]; ?>" height="<?php echo $imgsize[1]; ?>"></a><br>
    
    <?php if($row['imgdesc']) { ?><div class="desc"><?php echo $row['imgdesc']; ?></div><?php } ?>
    
    <a href="<?php echo $imgurl; ?>#comments">
    <?php if($row['hascomments']) { ?>
    (<?php echo $row['commentcount']; ?> <?php echo $lang['X_COMMENTS']; ?>)
    <?php } else { ?>
    (<?php echo $lang['ZERO_COMMENTS']; ?>)
    <?php } ?>
    </a>
    
    </div>
    
    <?php
    
    }
    
    ?>
    
    </div>
    
    <?php
    
    if ($imgcount > $images_per_page)
    {
    $pager = new pager($urlformat, $imgcount, $images_per_page, $page);
    
    ?>
    
    <br>
    <div>
    <table cellspacing="0" cellpadding="0">
    <tr><td><b><?php echo $lang['PAGE']; ?>:  </b></td><td><?php echo $pager->outputlinks(); ?></td></tr>
    </table>
    </div>
    
    <?php
    
    }
    
    ?>
    
    </td></tr></table>

  16. If you go to http://www.flog-it.ie you will see that the recent ads section is at the top and contains 5 images but they are different sizes but we want them all to be the same size. We have a file called latest.inc.php which displays these ads which can be seen below:

     

    <?php
    
    require_once("config.inc.php");
    
    ?>
    <?php
    if($latestads_count)
    {
    ?>
    
    
    <?php
        $sql = "SELECT a.*, ct.cityname, UNIX_TIMESTAMP(a.createdon) AS timestamp, feat.adid AS isfeat,
                    COUNT(*) AS piccount, p.picfile AS picfile, scat.subcatname, scat.catid, cat.catname
                FROM $t_ads a
                    INNER JOIN $t_cities ct ON a.cityid = ct.cityid
                    INNER JOIN $t_subcats scat ON a.subcatid = scat.subcatid
                    INNER JOIN $t_cats cat ON scat.catid = cat.catid
                    LEFT OUTER JOIN $t_featured feat ON a.adid = feat.adid AND feat.adtype = 'A' AND feat.featuredtill >= NOW()
                    LEFT OUTER JOIN $t_adpics p ON a.adid = p.adid AND p.isevent = '0'
                WHERE $visibility_condn
                    $loc_condn
                GROUP BY a.adid
                ORDER BY a.createdon DESC
                LIMIT $latestads_count";
        $res_latest = mysql_query($sql) or die($sql.mysql_error());
    
        $css_first = "_first";
        while($row = mysql_fetch_array($res_latest))
        {
           
            $catname_inurl = RemoveBadURLChars($row['catname']);
            $subcatname_inurl = RemoveBadURLChars($row['subcatname']);
    
            if($sef_urls) $url = "{$vbasedir}$xcityid/posts/{$row[catid]}_{$catname_inurl}/{$row[subcatid]}_{$subcatname_inurl}/$row[adid]_" . RemoveBadURLChars($row['adtitle']) . ".html";
            else $url = "?view=showad&adid=$row[adid]&cityid=$xcityid&lang=$xlang{$link_extra}";
    
    ?>
       
            <?php
            if($row['isfeat'])
            {
                //$feat_class = "class=\"featured\"";
                $feat_img = "<img src=\"images/featured.gif\" align=\"absmiddle\">";
            }
            else
            {
                //$feat_class = "";
                $feat_img = "";
            }
    
            if($row['picfile'])
            {
                $picfile = $row['picfile'];
                $imgsize = GetThumbnailSize("{$datadir[adpics]}/{$picfile}", $tinythumb_max_width, $tinythumb_max_height);
            }
            else
            {
                $picfile = "";
            }
            ?>
    
             
                <?php if($picfile) { ?>
                <a href="<?php echo $url; ?>"><img src="<?php echo "{$datadir[adpics]}/{$picfile}"; ?>" border="0" width="<?php echo $imgsize[0]; ?>" height="<?php echo $imgsize[1]; ?>" style="border:1px solid black"></a>
                <?php } ?>
               
    <?php
            $css_first = "";
        }
    ?>
    </div>
    
    <?php
    }
    ?>

     

    As you can see in the code we have this line which controls the thumbnail sizes

     

    if($row['picfile'])
            {
                $picfile = $row['picfile'];
                $imgsize = GetThumbnailSize("{$datadir[adpics]}/{$picfile}", $tinythumb_max_width, $tinythumb_max_height);
            }
            else
            {
                $picfile = "";
            }
            ?>

     

    And in our config.inc.php we have 2 variables --$tinythumb_max_width, $tinythumb_max_height-- I have these set as 100px X 100px but unfortunately its not changing the height. Is there anything else i can do to have these the same size?

  17. If you visit www.flog-it.ie you will see that all the images which are links have a black border around it. But when i change this to the same colour as the background colour it changes all the links in the middle of the page for the categories. How can i take the border off the images and keep the category links the same colour as they are? The css file is below in full.

    *************************************************************

    body {

    font-family: Verdana;

    font-size: 11px;

    margin: 0px;

    padding: 0px;

    }

     

    td {

    font-size: 11px;

    }

     

    h1 {

    font-size: 16pt;

    margin: 0px;

    }

     

    h2 {

    font-size: 14px;

    font-weight: bold;

    margin-top: 0px;

    padding-top: 0px;

    margin-bottom: 10px;

    }

     

    h3 {

    font-size: 12px;

    font-weight: bold;

    margin-top: 0px;

    padding-top: 0px;

    margin-bottom: 10px;

    }

     

    th {

    font-size: 12px;

    text-align: left;

    }

     

    form {

    margin: 0px;

    }

     

    input, textarea, select, optgroup, option {

    font-family: Verdana, sans-serif;

    font-size: 10px;

    }

     

    button {

    font-family: Verdana, sans-serif;

    font-size: 10px;

    font-weight: bold;

    text-transform: uppercase;

    background-color: #000;

    color: white;

    }

     

    pre {

    font-family: "Courier New";

    font-size: 12px;

    text-align: left;

    }

     

    .err {

    color: red;

    font-weight: bold;

    margin-bottom: 5px;

    }

     

    .imp {

    color: #CC3300;

    font-weight: bold;

    margin-bottom: 5px;

    }

     

    .msg {

    color: green;

    margin-bottom: 5px;

    }

     

    .marker {

    color: red;

    font-weight: bold;

    }

     

    .hint {

    font-size: 10px;

    font-style: italic;

    color: gray;

    }

     

    #header {

    padding: 10px;

    }

     

    #logo {

    font-size: 14px;

    font-weight: bold;

    }

     

    #logo a {

    color: black;

    text-decoration: none;

    }

     

    #logo a:hover {

    color: #DF971E;

    text-decoration: none;

    }

     

    #today {

    font-size: 10px;

    }

     

    #nav {

    text-align: right;

    }

     

    #city {

    font-weight: bold;

    font-size: 14px;

    display: block;

    }

     

    #sidebar_left {

    padding-top: 10px;

    background-color: #FF6; /*#F0F4FB*/

    }

     

    .buttons td {

    text-align: center;

    background-color: #FF6;

    }

     

    .buttons a {

    display: block;

    font-weight: bold;

    text-transform: uppercase;

    color: white;

    padding: 3px;

    }

     

    #sidebar_left .head {

    font-size: 10px;

    font-weight: bold;

    text-transform: uppercase;

    color: #003366;

    }

     

    #sidebar_left table.linkbox {

    margin-bottom: 15px;

    }

     

    #sidebar_left table.linkbox a {

    display: block;

    text-align: center;

    padding: 3px;

    border-bottom: 1px solid #DDDDDD;

    }

     

    table.sidebox {

    margin-bottom: 10px;

    }

     

    table.sidebox td {

    text-align: left;

    }

     

    #contentcell {

     

    }

     

    #content {

    padding: 10px;

    }

     

    #path {

    background-color: #FF6;

    font-size: 16px;

    margin-bottom: 5px;

    }

     

    #path td {

    padding: 5px 5px 5px 10px;

    }

     

    #path a {

    color: #777777;

    text-decoration: none;

    }

     

    #path a:hover {

    color: black;

    text-decoration: underline;

    }

     

    table.searchbox {

    background-color: #FF6;

    border: 1px solid #DDDDDD;

    margin-bottom: 20px;

    }

     

    table.searchbox td {

    padding: 10px;

    }

     

    .eventnav {

    border-bottom: 1px solid #DDDDDD;

    margin-bottom: 10px;

    }

     

    table.dir {

    }

     

    table.dir_cat {

     

    }

     

    table.dir_cat th {

    font-size: 14px;

    font-weight: bold;

    text-align: left;

    text-transform: none;

    margin: 0px;

    padding-bottom: 5px;

    }

     

    table.dir_cat td {

     

    }

     

    table.dir_cat .count {

    color: #999999;

    font-size: 10px;

    }

     

    table.dir_cat th .count {

    color: gray;

    font-size: 10px;

    }

     

    table.adlisting {

    }

     

    table.adlisting tr.ad1 {

    background-color: #FF6  /*#FAFAFA;*/

    }

     

    table.adlisting tr.ad2 {

    }

     

    table.adlisting td {

    padding: 4px;

    }

     

    table.adlisting td.head, table.adlisting tr.head td {

    font-weight: bold;

    background-color: #FF6;

     

    }

     

    table.adlisting td.datehead {

    background-color: #FF6;

    /*border-bottom: 1px solid #CCCCCC;*/

    font-weight: bold;

    border-bottom: 0px;

    }

     

    table.adlisting td.icon {

    }

     

    table.adlisting td.icon img {

    }

     

    table.adlisting .adtitle {

    font-weight: bold;

    }

     

    table.adlisting .date {

    font-style: italic;

    }

     

    table.adlisting .ad1 {

    }

     

    table.adlisting .ad2 {

    background-color: #FF6 /*#FAFAFA;*/

    }

     

    .adheader {

    margin-bottom: 10px;

    padding-bottom: 5px;

    border-bottom: 1px solid #E0E0E0;

    }

     

    .adheader .icon {

    /*vertical-align: top;*/

    }

     

    .adheader .adtitle {

    font-size: 14px;

    font-weight: bold;

    margin-top: 0px;

    padding-top: 0px;

    margin-bottom: 0px;

    padding-bottom: 0px;

    }

     

    .adheader .adarea {

    font-size: 11px;

    font-weight: normal;

    }

     

    .ad {

    margin-bottom: 10px;

    }

     

    .ad .link_marker {

    color: darkorange;

    font-weight: bold;

    }

     

    .disclosures {

    padding: 5px;

    }

     

    .disclosure_yes {

    color: green;

    }

     

    .disclosure_no {

    color: red;

    }

     

    .disclosures b {

    }

     

    .adpics {

    margin-bottom: 10px;

    /*border-bottom: 1px solid #DDDDDD;*/

    }

     

    .adpics img {

    border: 1px solid black;

    /*padding: 10px;

    background-color: #FAFAFA;*/

    }

     

    .imglisting {

    }

     

    .imgitem {

    margin-bottom: 30px;

    }

     

    .imgitem .head {

    font-size: 12px;

    font-weight: bold;

    }

     

    .imgitem img.img {

    margin-top: 5px;

    border: 1px solid black;

    }

     

    .imgitem .caption {

    }

     

    .imgitem .poster {

    font-weight: bold;

    }

     

    .imgitem .time {

    font-weight: bold;

    }

     

    .imgitem .desc {

    margin-top: 5px;

    }

     

    .linkbox2 {

    background-color: #FF6;

    font-weight: bold;

    text-transform: uppercase;

    padding: 5px;

    text-align: center;

    color: white;

    }

     

    .linkbox2 a {

    display: block;

    color: white;

    }

     

    .linkbox2 a:hover {

    color: white;

    text-align: center;

    }

     

    .imagecredits {

    padding: 5px;

    }

     

    .head {

    font-weight: bold;

    }

     

    .imagecredits a {

    }

     

    .imagecredits .count {

    color: #BBBBBB;

    font-size: 10px;

    }

     

    .comments {

    }

     

    .comments .head {

    font-size: 12px;

    font-weight: bold;

    }

     

    .commentitem {

    margin-bottom: 10px;

    }

     

    .commentitem .poster {

    font-weight: bold;

    display: block;

    }

     

    .commentitem .time {

    color: gray;

    display: block;

    }

     

    .commentitem .comments {

    display: block;

    }

     

    #sidebar_right_cities {

    background-color: #FF6;

    padding: 0px 5px 5px 5px;

    }

     

    #sidebar_right {

    padding: 5px 5px 5px 5px;

    }

     

    #sidebar_right a {

    }

     

    .citylist_country {

    display: block;

    color: black;

    font-weight: bold;

    text-transform: uppercase;

    font-size: 10px;

    margin-top: 2px;

    }

     

    .citylist_city {

    color: #777777;

    font-size: 10px;

    }

     

    #footer {

    color: #A0A0A0;

    }

     

    #footer td {

    font-size: 9px;

    padding-left: 15px;

    padding-top: 10px;

    }

     

    table.postad {

    }

     

    img.thumb {

    border: 1px solid black;

    }

     

    .postpath {

    padding: 5px;

    border: 1px solid #DBC06F;

    background-color: #F7F0DD;

    font-size: 12px;

    color: brown;

    margin-bottom: 10px;

    }

     

    .postpath b {

    color: black;

    }

     

    .postpath a {

    font-weight: bold;

    color: #003399;

    font-size: 11px;

    }

     

    #search_top {

    margin-bottom: 20px;

    padding: 10px;

    background-color: #FAFAFA;

    border: 1px solid #EAEAEA;

    }

     

    .invoice {

    background-color: #F0F0F0;

    border-right: 1px solid #EAEAEA;

    border-top: 1px solid #EAEAEA;

    }

     

    .invoice td {

    background-color: white;

    padding: 5px;

    border-left: 1px solid #EAEAEA;

    border-bottom: 1px solid #EAEAEA;

    }

     

    .invoice .empty {

    background-color: white;

    border: 1px solid white;

    }

     

    .invoice .firstcell {

    font-weight: bold;

    }

     

    .invoice .maincell {

    /*background-color: #FAFAFA;*/

    text-align: right;

    }

     

    .invoice .totalrow td {

    background-color: #FAFAFA;

    }

     

    .invoice .totalrow .totalcell {

    background-color: #F3F3F3;

    font-size: 13px;

    font-weight: bold;

    text-align: right;

    }

     

    .featuredad_first, .featuredad_first td {

    background-color: #FFEEC6;

    border-top: 1px solid #FFDF95;

    border-bottom: 1px solid #FFDF95;

    padding: 5px 5px 2px 5px;

    margin-bottom: 10px;

    }

     

    .featuredad, .featuredad td {

    background-color: #FFEEC6;

    border-bottom: 1px solid #FFDF95;

    padding: 5px 5px 2px 5px;

    margin-bottom: 10px;

    }

     

    .featuredad a, .featuredad_first a {

    font-weight: bold;

    }

     

    .post_note {

    color: green;

    }

     

    .latestads {

    padding-top: 10px;

    margin-bottom: 10px;

    }

     

    .latestads .head {

    padding-bottom: 5px;

    color: steelblue;

    font-size: 12px;

    }

     

    .latestads td {

    border-top: 1px solid #F0F0F0;

    }

     

    .adcat {

    font-size: 9px;

    color: #444444;

    /*text-decoration: underline;*/

    }

     

    table.latestads_table td {

    padding: 1px;

    }

     

    table.latestads_table a.featured {

    font-weight: bold;;

    }

     

    .catlist .cat {

    padding: 1px;

    display: block;

    }

     

    .catlist .cat a {

    font-weight: bold;

    }

     

    .catlist .subcat {

    padding: 1px;

    display: block;

    }

     

    .catlist .count {

    color: gray;

    }

     

    .adpreview {

    display: block;

    font-size: 10px;

    color: gray;

    }

    *********************************************************

  18. Ok i am currently helping to setup a new website called Flog-It (its a new classified website). I have a few things i need help with.

     

    1. I need to put the latest ads section which is located at the end of the page in the recent ads box at the top. But the text which is associated with the ad needs to be removed so only the image is displayed with a link to the ad. This can be seen on the homepage of http://www.donedeal.ie.

     

    2. I need the subcategories to be shortened to 4 or 5 subcategories with a link below it which expands that category into all of its subcategories. An example of this can be seen at http://www.buyandsell.ie. I would also like this to be an ajax style slide function instead of going to a new webpage although i dont mind if it does.

     

    3. This website allows people to upload images with their ad. I want to be able to add our own dynamic watermark to each image uploaded if its possible.

     

    I have all the necessary php pages and would like someone to help me with these codes as i have limited php knowledge. Thanks so much in advance. You can email me on sakura-designs@hotmail.com also.

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.