Jump to content

irishpeck

Members
  • Posts

    24
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

irishpeck's Achievements

Member

Member (2/5)

0

Reputation

  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. Its submitting now but its not passing any of the values to my email its just showing blanks beside first name, last name etc.??
  3. 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"
  4. 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
  5. 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; } }); });
  6. 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
  7. 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"); } ?>
  8. 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!!
  9. Can you please help me with this sweeb im really stuck! php is not my strongest asset by any means lol
  10. 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.
  11. 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>'; } }
  12. Thanks so much it worked, honestly thanks alot for this!
  13. 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; } ?>
  14. Ok well how can i increase the memory limit?
  15. 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);
×
×
  • 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.