Jump to content

fa_dy

Members
  • Posts

    18
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

fa_dy's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello guys, I have a quick question. I have a div slider set up to scroll through the content under Our Works and Our Clients on homepage of this website http://www.edhubdemo.com/wp/. When you click on the next and the previous buttons, the slider moves forward and backward respectively. Now what I want is that the slider should automatically move even when the next and previous buttons are not clicked. I searched for a solution over the internet and the closest solution which I found was to set timer to call the click function but I can't seem to implement that on this code. Here's the jquery liquid carousel code which I am using: [/size][/font][/color] (function($){ $.fn.liquidcarousel = function(options) { var defaults = { duration: 100, hidearrows: true }; var options = $.extend(defaults, options); return this.each(function() { var divobj = $(this); $(divobj).css('overflow', 'hidden'); $('> .wrapper', divobj).css('overflow', 'hidden'); $('> .wrapper', divobj).css('float', 'left'); $('> .wrapper > ul', divobj).css('float', 'left'); $('> .wrapper > ul', divobj).css('margin', '0'); $('> .wrapper > ul', divobj).css('padding', '0'); $('> .wrapper > ul', divobj).css('display', 'block'); $('> .wrapper > ul > li', divobj).css('display', 'block'); $('> .wrapper > ul > li', divobj).css('float', 'left'); var visiblelis = 0; var totallis = $('> .wrapper > ul > li', this).length; var currentposition = 0; var additionalmargin = 0; var totalwidth = 0; $(window).resize(function(e){ var divwidth = $(divobj).width(); var availablewidth = divwidth; var heighest = 0; $('> .wrapper > ul > li', divobj).css("height", "auto"); $('> .wrapper > ul > li', divobj).each(function () { if ( $(this).outerHeight() > heighest ) { heighest = $(this).outerHeight(); } }); $(divobj).height(heighest); $('> .wrapper', divobj).height(heighest); $('> .wrapper > ul', divobj).height(heighest); $('> .wrapper > ul > li', divobj).height(heighest); var liwidth = $('> .wrapper > ul > li:first', divobj).outerWidth(true); var originalmarginright = parseInt($('> .wrapper > ul > li', divobj).css('marginRight')); var originalmarginleft = parseInt($('> .wrapper > ul > li', divobj).css('marginLeft')); totalwidth = liwidth + additionalmargin; previousvisiblelis = visiblelis; visiblelis = Math.floor((availablewidth / liwidth)); if (visiblelis < totallis) { additionalmargin = Math.floor((availablewidth - (visiblelis * liwidth))/visiblelis); } else { additionalmargin = Math.floor((availablewidth - (totallis * liwidth))/totallis); } halfadditionalmargin = Math.floor(additionalmargin/2); totalwidth = liwidth + additionalmargin; if (visiblelis > previousvisiblelis || totallis <= visiblelis) { currentposition -= (visiblelis-previousvisiblelis); if (currentposition < 0 || totallis <= visiblelis ) { currentposition = 0; } } $('> .wrapper > ul', divobj).css('marginLeft', -(currentposition * totalwidth)); if (visiblelis >= totallis || ((divwidth >= (totallis * liwidth)) && options.hidearrows) ) { if (options.hidearrows) { $('> .prev', $(divobj).parents(".widget")).hide(); $('> .next', $(divobj).parents(".widget")).hide(); additionalmargin = Math.floor((divwidth - (totallis * liwidth))/totallis); halfadditionalmargin = Math.floor(additionalmargin/2); totalwidth = liwidth + additionalmargin; $('> .wrapper > ul > li', divobj).css('marginRight', originalmarginright + halfadditionalmargin); $('> .wrapper > ul > li', divobj).css('marginLeft', originalmarginleft + halfadditionalmargin); } $('> .wrapper', divobj).width(totallis * totalwidth); $('> ul', divobj).width(totallis * totalwidth); $('> .wrapper', divobj).css('marginLeft', 0); currentposition = 0; } else { $('.prev', $(divobj).parents(".widget")).show(); $('.next', $(divobj).parents(".widget")).show(); $('> .wrapper', divobj).width(visiblelis * totalwidth); $('> ul', divobj).width(visiblelis * totalwidth); } }); $('.next', $(divobj).parents(".widget")).click(function(){ if (totallis <= visiblelis) { currentposition = 0; } else if ((currentposition + (visiblelis*2)) < totallis) { currentposition += visiblelis; } else if ((currentposition + (visiblelis*2)) >= totallis -1) { currentposition = totallis - visiblelis; } $('> .wrapper > ul', divobj).stop(); $('> .wrapper > ul', divobj).animate({'marginLeft': -(currentposition * totalwidth)}, options.duration); }); $('.prev', $(divobj).parents(".widget")).click(function(){ if ((currentposition - visiblelis) > 0) { currentposition -= visiblelis; } else if ((currentposition - (visiblelis*2)) <= 0) { currentposition = 0; } $('> .wrapper > ul', divobj).stop(); $('> .wrapper > ul', divobj).animate({'marginLeft': -(currentposition * totalwidth)}, options.duration); }); $('.next', $(divobj).parents(".widget")).dblclick(function(e){ e.preventDefault(); clearSelection(); }); $('.prev', $(divobj).parents(".widget")).dblclick(function(e){ e.preventDefault(); clearSelection(); }); function clearSelection() { if (document.selection && document.selection.empty) { document.selection.empty(); } else if (window.getSelection) { var sel = window.getSelection(); sel.removeAllRanges(); } } $(window).resize(); }); }; [color=#000000]})(jQuery);[/color][color=#000000][font=Tahoma, Verdana, Arial][size=3] This is the part of the code which moves the slider forward when the next button is clicked: [/size][/font][/color] $('.next', $(divobj).parents(".widget")).click(function(){ if (totallis <= visiblelis) { currentposition = 0; } else if ((currentposition + (visiblelis*2)) < totallis) { currentposition += visiblelis; } else if ((currentposition + (visiblelis*2)) >= totallis -1) { currentposition = totallis - visiblelis; } $('> .wrapper > ul', divobj).stop(); $('> .wrapper > ul', divobj).animate({'marginLeft': -(currentposition * totalwidth)}, options.duration); }); [color=#000000][font=Tahoma, Verdana, Arial][size=3] And this is the part of the code which makes the slider move backwards when the previous button is clicked: [/size][/font][/color] $('.prev', $(divobj).parents(".widget")).click(function(){ if ((currentposition - visiblelis) > 0) { currentposition -= visiblelis; } else if ((currentposition - (visiblelis*2)) <= 0) { currentposition = 0; } $('> .wrapper > ul', divobj).stop(); $('> .wrapper > ul', divobj).animate({'marginLeft': -(currentposition * totalwidth)}, options.duration); }); [color=#000000][font=Tahoma, Verdana, Arial][size=3] This is the code which I found over the internet for calling a function using jquery timer but I couldn't integrate it inside the liquid carousel code: [/size][/font][/color] window.setInterval(yourfunction, 10000); function yourfunction() { alert('test'); } [color=#000000][font=Tahoma, Verdana, Arial][size=3] I want it to be this way that the slider automatically scrolls to the next 4 items after 7 seconds, then to the next 4 items after 7 seconds and then the same happens for backward. It'll be like this that the 'click next' function is called automatically after every 7 seconds and then the 'click previous' function is called after every 7 seconds. I hope this is possible. Looking forward to a solution. Thank you.
  2. Hello guys, I have run into a little problem, I have a created an html form and I am trying to send its content to my email, when the submit button is pressed, using a php mailer script which I found athttp://www.freecontactform.com/email_form.php. Here's the form code: <form id="genius_com_w2l_form" class="genius_com_w2l_form" action="sendform.php" method="post"> <table class="genius_com_w2l_form_table"> <tbody> <tr class="genius_com_w2l_form_row"> <td class="genius_com_w2l_form_label_cell"><label id="genius_com_w2l_label_std_Salutation" for="genius_com_w2l_field_std_Salutation">*Salutation</label></td> <td class="genius_com_w2l_form_input_cell"> <div class="genius_com_w2l_field"><select required id="genius_com_w2l_field_std_Salutation" name="std_Salutation"> <option value="">(Not Selected)</option> <option value="Dr.">Dr.</option> <option value="Mr.">Mr.</option> <option value="Mrs.">Mrs.</option> <option value="Ms.">Ms.</option> <option value="Prof.">Prof.</option> </select> <div id="genius_com_w2l_errorMsg_std_Salutation" class="errorMsg"></div> </div></td> </tr> <tr class="genius_com_w2l_form_row"> <td class="genius_com_w2l_form_label_cell"><label id="genius_com_w2l_label_std_firstName" for="genius_com_w2l_field_std_firstName">*First Name</label></td> <td class="genius_com_w2l_form_input_cell"> <div class="genius_com_w2l_field"> <input required id="genius_com_w2l_field_std_firstName" type="text" name="std_firstName" value="" maxlength="40" /> <div id="genius_com_w2l_errorMsg_std_firstName" class="errorMsg"></div> </div></td> </tr> <tr class="genius_com_w2l_form_row"> <td class="genius_com_w2l_form_label_cell"><label id="genius_com_w2l_label_std_lastName" for="genius_com_w2l_field_std_lastName">*Last Name</label></td> <td class="genius_com_w2l_form_input_cell"> <div class="genius_com_w2l_field"> <input required id="genius_com_w2l_field_std_lastName" type="text" name="std_lastName" value="" maxlength="80" /> <div id="genius_com_w2l_errorMsg_std_lastName" class="errorMsg"></div> </div></td> </tr> <tr class="genius_com_w2l_form_row"> <td class="genius_com_w2l_form_label_cell"><label id="genius_com_w2l_label_std_email" for="genius_com_w2l_field_std_email">*E-mail Address</label></td> <td class="genius_com_w2l_form_input_cell"> <div class="genius_com_w2l_field"> <input required id="genius_com_w2l_field_std_email" type="email" name="std_email" value="" maxlength="255" /> <div id="genius_com_w2l_errorMsg_std_email" class="errorMsg"></div> </div></td> </tr> <tr class="genius_com_w2l_form_row"> <td class="genius_com_w2l_form_label_cell"><label id="genius_com_w2l_label_std_phone" for="genius_com_w2l_field_std_phone">*Phone</label></td> <td class="genius_com_w2l_form_input_cell"> <div class="genius_com_w2l_field"> <input required id="genius_com_w2l_field_std_phone" type="text" name="std_phone" value="" maxlength="30" /> <div id="genius_com_w2l_errorMsg_std_phone" class="errorMsg"></div> </div></td> </tr> <tr class="genius_com_w2l_form_row"> <td class="genius_com_w2l_form_label_cell"><label id="genius_com_w2l_label_cust_243593" for="genius_com_w2l_field_cust_243593">Skype Name</label></td> <td class="genius_com_w2l_form_input_cell"> <div class="genius_com_w2l_field"> <input id="genius_com_w2l_field_cust_243593" type="text" name="cust_243593" value="" maxlength="255" /> <div id="genius_com_w2l_errorMsg_cust_243593" class="errorMsg"></div> </div></td> </tr> <tr class="genius_com_w2l_form_row"> <td class="genius_com_w2l_form_label_cell"><label id="genius_com_w2l_label_cust_243596" for="genius_com_w2l_field_cust_243596">*Country of Citizenship</label></td> <td class="genius_com_w2l_form_input_cell"> <div class="genius_com_w2l_field"><select required id="genius_com_w2l_field_cust_243596" name="cust_243596"> <option value="">(Not Selected)</option> <option value="Afghanistan">Afghanistan</option> <option value="Albania">Albania</option> <option value="Algeria">Algeria</option> <option value="American Samoa">American Samoa</option> <option value="Andorra">Andorra</option> <option value="Angola">Angola</option> <option value="Anguilla">Anguilla</option> <option value="Antigua">Antigua</option> <option value="Argentina">Argentina</option> <option value="Armenia">Armenia</option> <option value="Aruba">Aruba</option> <option value="Australia">Australia</option> <option value="Austria">Austria</option> <option value="Azerbaijan">Azerbaijan</option> <option value="Bahamas">Bahamas</option> <option value="Bahrain">Bahrain</option> <option value="Bangladesh">Bangladesh</option> <option value="Barbados">Barbados</option> <option value="Barbuda">Barbuda</option> <option value="Belarus">Belarus</option> <option value="Belgium">Belgium</option> <option value="Belize">Belize</option> <option value="Benin">Benin</option> <option value="Bermuda">Bermuda</option> <option value="Bhutan">Bhutan</option> <option value="Bolivia">Bolivia</option> <option value="Bonaire">Bonaire</option> <option value="Bosnia">Bosnia</option> <option value="Botswana">Botswana</option> <option value="Brazil">Brazil</option> <option value="British Virgin Islands">British Virgin Islands</option> <option value="Brunei">Brunei</option> <option value="Bulgaria">Bulgaria</option> <option value="Burma">Burma</option> <option value="Burundi">Burundi</option> <option value="Cambodia">Cambodia</option> <option value="Cameroon">Cameroon</option> <option value="Canada">Canada</option> <option value="Cape Verde">Cape Verde</option> <option value="Cayman Islands">Cayman Islands</option> <option value="Central African Rep">Central African Rep</option> <option value="Chad">Chad</option> <option value="Channel Island">Channel Island</option> <option value="Chile">Chile</option> <option value="China">China</option> <option value="Colombia">Colombia</option> <option value="Congo">Congo</option> <option value="Cook Island">Cook Island</option> <option value="Costa Rica">Costa Rica</option> <option value="Croatia">Croatia</option> <option value="Curacao">Curacao</option> <option value="Cyprus">Cyprus</option> <option value="Czech Republic">Czech Republic</option> <option value="Denmark">Denmark</option> <option value="Djibouti">Djibouti</option> <option value="Dominica">Dominica</option> <option value="Dominican Republic">Dominican Republic</option> <option value="Ecuador">Ecuador</option> <option value="Egypt">Egypt</option> <option value="El Salvador">El Salvador</option> <option value="Equatorial Guinea">Equatorial Guinea</option> <option value="Eritrea">Eritrea</option> <option value="Estonia">Estonia</option> <option value="Ethiopia">Ethiopia</option> <option value="Faeroe Island">Faeroe Island</option> <option value="Fiji">Fiji</option> <option value="Finland">Finland</option> <option value="France">France</option> <option value="French Guiana">French Guiana</option> <option value="French Polynesia">French Polynesia</option> <option value="Gabon">Gabon</option> <option value="Gambia">Gambia</option> <option value="Georgia">Georgia</option> <option value="Germany">Germany</option> <option value="Ghana">Ghana</option> <option value="Gibraltar">Gibraltar</option> <option value="Great Britain">Great Britain</option> <option value="Greece">Greece</option> <option value="Greenland">Greenland</option> <option value="Grenada">Grenada</option> <option value="Guadeloupe">Guadeloupe</option> <option value="Guatemala">Guatemala</option> <option value="Guinea">Guinea</option> <option value="Guinea Bissau">Guinea Bissau</option> <option value="Guyana">Guyana</option> <option value="Haiti">Haiti</option> <option value="Honduras">Honduras</option> <option value="Hong Kong">Hong Kong</option> <option value="Hungary">Hungary</option> <option value="Iceland">Iceland</option> <option value="India">India</option> <option value="Indonesia">Indonesia</option> <option value="Iran">Iran</option> <option value="Iraq">Iraq</option> <option value="Ireland">Ireland</option> <option value="Israel">Israel</option> <option value="Italy">Italy</option> <option value="Ivory Coast">Ivory Coast</option> <option value="Jamaica">Jamaica</option> <option value="Japan">Japan</option> <option value="Jordan">Jordan</option> <option value="Kazakhstan">Kazakhstan</option> <option value="Kenya">Kenya</option> <option value="Korea">Korea</option> <option value="Kuwait">Kuwait</option> <option value="Kyrgyzstan">Kyrgyzstan</option> <option value="Laos">Laos</option> <option value="Latvia">Latvia</option> <option value="Lebanon">Lebanon</option> <option value="Liberia">Liberia</option> <option value="Liechtenstein">Liechtenstein</option> <option value="Lithuania">Lithuania</option> <option value="Luxembourg">Luxembourg</option> <option value="Macau">Macau</option> <option value="Macedonia">Macedonia</option> <option value="Madagascar">Madagascar</option> <option value="Malawi">Malawi</option> <option value="Malaysia">Malaysia</option> <option value="Maldives">Maldives</option> <option value="Mali">Mali</option> <option value="Malta">Malta</option> <option value="Marshall Islands">Marshall Islands</option> <option value="Martinique">Martinique</option> <option value="Mauritania">Mauritania</option> <option value="Mauritius">Mauritius</option> <option value="Mexico">Mexico</option> <option value="Micronesia">Micronesia</option> <option value="Moldova">Moldova</option> <option value="Monaco">Monaco</option> <option value="Mongolia">Mongolia</option> <option value="Montserrat">Montserrat</option> <option value="Morocco">Morocco</option> <option value="Mozambique">Mozambique</option> <option value="Myanmar">Myanmar</option> <option value="Namibia">Namibia</option> <option value="Nepal">Nepal</option> <option value="Netherlands">Netherlands</option> <option value="Netherlands Antilles">Netherlands Antilles</option> <option value="New Caledonia">New Caledonia</option> <option value="New Zealand">New Zealand</option> <option value="Nicaragua">Nicaragua</option> <option value="Niger">Niger</option> <option value="Nigeria">Nigeria</option> <option value="Northern Ireland">Northern Ireland</option> <option value="Norway">Norway</option> <option value="Oman">Oman</option> <option value="Pakistan">Pakistan</option> <option value="Palau">Palau</option> <option value="Panama">Panama</option> <option value="Papua New Guinea">Papua New Guinea</option> <option value="Paraguay">Paraguay</option> <option value="Peru">Peru</option> <option value="Philippines">Philippines</option> <option value="Poland">Poland</option> <option value="Polynesia">Polynesia</option> <option value="Portugal">Portugal</option> <option value="Qatar">Qatar</option> <option value="Reunion">Reunion</option> <option value="Romania">Romania</option> <option value="Russia">Russia</option> <option value="Rwanda">Rwanda</option> <option value="Saba">Saba</option> <option value="Saipan">Saipan</option> <option value="Saudi Arabia">Saudi Arabia</option> <option value="Scotland">Scotland</option> <option value="Senegal">Senegal</option> <option value="Serbia">Serbia</option> <option value="Seychelles">Seychelles</option> <option value="Sierra Leone">Sierra Leone</option> <option value="Singapore">Singapore</option> <option value="Slovak Republic">Slovak Republic</option> <option value="Slovenia">Slovenia</option> <option value="South Africa">South Africa</option> <option value="South Korea">South Korea</option> <option value="Spain">Spain</option> <option value="Sri Lanka">Sri Lanka</option> <option value="Sudan">Sudan</option> <option value="Suriname">Suriname</option> <option value="Swaziland">Swaziland</option> <option value="Sweden">Sweden</option> <option value="Switzerland">Switzerland</option> <option value="Syria">Syria</option> <option value="Taiwan">Taiwan</option> <option value="Tajikistan">Tajikistan</option> <option value="Tanzania">Tanzania</option> <option value="Thailand">Thailand</option> <option value="Togo">Togo</option> <option value="Trinidad-Tobago">Trinidad-Tobago</option> <option value="Tunisia">Tunisia</option> <option value="Turkey">Turkey</option> <option value="Turkmenistan">Turkmenistan</option> <option value="Uganda">Uganda</option> <option value="Ukraine">Ukraine</option> <option value="United Arab Emirates">United Arab Emirates</option> <option value="United Kingdom">United Kingdom</option> <option value="Uruguay">Uruguay</option> <option value="Uzbekistan">Uzbekistan</option> <option value="Vanuatu">Vanuatu</option> <option value="Vatican City">Vatican City</option> <option value="Venezuela">Venezuela</option> <option value="Vietnam">Vietnam</option> <option value="Wales">Wales</option> <option value="Yemen">Yemen</option> <option value="Zaire">Zaire</option> <option value="Zambia">Zambia</option> <option value="Zimbabwe">Zimbabwe</option> </select> <div id="genius_com_w2l_errorMsg_cust_243596" class="errorMsg"></div> </div></td> </tr> <tr class="genius_com_w2l_form_row"> <td class="genius_com_w2l_form_label_cell"><label id="genius_com_w2l_label_cust_243624" for="genius_com_w2l_field_cust_243624">Personal Net Worth</label></td> <td class="genius_com_w2l_form_input_cell"> <div class="genius_com_w2l_field"><select id="genius_com_w2l_field_cust_243624" name="cust_243624"> <option value="">(Not Selected)</option> <option value="$0 - $500,000">$0 - $500,000</option> <option value="$1 million - $3 million">$1 million - $3 million</option> <option value="$3 million - $10 million">$3 million - $10 million</option> <option value="$500,000 - $1 million">$500,000 - $1 million</option> <option value="> $10 million">> $10 million</option> </select> <div id="genius_com_w2l_errorMsg_cust_243624" class="errorMsg"></div> </div></td> </tr> <tr class="genius_com_w2l_form_row"> <td class="genius_com_w2l_form_label_cell"><label id="genius_com_w2l_label_cust_243607" for="genius_com_w2l_field_cust_243607">*Source of $500,000 for Investment</label></td> <td class="genius_com_w2l_form_input_cell"> <div class="genius_com_w2l_field"><select required id="genius_com_w2l_field_cust_243607" name="cust_243607"> <option value="">(Not Selected)</option> <option value="Emigrating clients">Emigrating clients</option> <option value="Gift from Parents">Gift from Parents</option> <option value="Loan">Loan</option> <option value="Personal Savings">Personal Savings</option> <option value="Sale of Business">Sale of Business</option> <option value="Sale of Real Estate">Sale of Real Estate</option> <option value="Sale of Stock">Sale of Stock</option> </select> <div id="genius_com_w2l_errorMsg_cust_243607" class="errorMsg"></div> </div></td> </tr> <tr class="genius_com_w2l_form_row"> <td class="genius_com_w2l_form_label_cell" valign="top"><label id="genius_com_w2l_label_cust_243595" for="genius_com_w2l_field_cust_243595">*Your Business/Occupation</label></td> <td class="genius_com_w2l_form_input_cell" valign="top"> <div class="genius_com_w2l_field"> <textarea required id="genius_com_w2l_field_cust_243595" name="cust_243595" rows="2" cols="20"></textarea> <div id="genius_com_w2l_errorMsg_cust_243595" class="errorMsg"></div> </div></td> </tr> <tr class="genius_com_w2l_form_row"> <td class="genius_com_w2l_form_label_cell"><label id="genius_com_w2l_label_cust_243598" for="genius_com_w2l_field_cust_243598">*Where Are You In the Process</label></td> <td class="genius_com_w2l_form_input_cell"> <div class="genius_com_w2l_field"><select required id="genius_com_w2l_field_cust_243598" name="cust_243598"> <option value="">(Not Selected)</option> <option value="Beginning to Investigate the Visa">Beginning to Investigate the Visa</option> <option value="Have Spoken with Some Regional Centers">Have Spoken with Some Regional Centers</option> <option value="Just Learning About the Visa">Just Learning About the Visa</option> <option value="Looking to Hire a Regional Center Consultant">Looking to Hire a Regional Center Consultant</option> <option value="Looking to Hire An Attorney Immediately">Looking to Hire An Attorney Immediately</option> <option value="Making Final Selection of Regional Center">Making Final Selection of Regional Center</option> <option value="Reviewing Various Regional Centers">Reviewing Various Regional Centers</option> </select> <div id="genius_com_w2l_errorMsg_cust_243598" class="errorMsg"></div> </div></td> </tr> <tr class="genius_com_w2l_form_row"> <td class="genius_com_w2l_form_label_cell" valign="top"><label id="genius_com_w2l_label_cust_243597" for="genius_com_w2l_field_cust_243597">*Your Situation & Goals</label></td> <td class="genius_com_w2l_form_input_cell" valign="top"> <div class="genius_com_w2l_field"> <textarea required id="genius_com_w2l_field_cust_243597" name="cust_243597" rows="5" cols="20"></textarea> <div id="genius_com_w2l_errorMsg_cust_243597" class="errorMsg"></div> </div></td> </tr> <tr class="genius_com_w2l_form_row"> <td class="genius_com_w2l_form_label_cell"><label id="genius_com_w2l_label_cust_243599" for="genius_com_w2l_field_cust_243599">Marital Status</label></td> <td class="genius_com_w2l_form_input_cell"> <div class="genius_com_w2l_field"><select id="genius_com_w2l_field_cust_243599" name="cust_243599"> <option value="">(Not Selected)</option> <option value="Divorced">Divorced</option> <option value="Married">Married</option> <option value="Single">Single</option> <option value="Widow(ed)">Widow(ed)</option> </select> <div id="genius_com_w2l_errorMsg_cust_243599" class="errorMsg"></div> </div></td> </tr> <tr class="genius_com_w2l_form_row"> <td class="genius_com_w2l_form_label_cell"><label id="genius_com_w2l_label_cust_243601" for="genius_com_w2l_field_cust_243601">No. of Unmarried Children Under 21</label></td> <td class="genius_com_w2l_form_input_cell"> <div class="genius_com_w2l_field"> <input id="genius_com_w2l_field_cust_243601" type="text" name="cust_243601" value="" maxlength="22" /> <div id="genius_com_w2l_errorMsg_cust_243601" class="errorMsg"></div> </div></td> </tr> <tr class="genius_com_w2l_form_row"> <td class="genius_com_w2l_form_label_cell"><label id="genius_com_w2l_label_cust_243600" for="genius_com_w2l_field_cust_243600">*English Fluency</label></td> <td class="genius_com_w2l_form_input_cell"> <div class="genius_com_w2l_field"><select required id="genius_com_w2l_field_cust_243600" name="cust_243600"> <option value="">(Not Selected)</option> <option value="Excellent">Excellent</option> <option value="Fair">Fair</option> <option value="Good">Good</option> <option value="None">None</option> <option value="Poor">Poor</option> <option value="Very Good">Very Good</option> </select> <div id="genius_com_w2l_errorMsg_cust_243600" class="errorMsg"></div> </div></td> </tr> </tbody> </table> <div><input class="btn" type="submit" value="Submit" /></div> </form> And here's the code which I've put inside the php mailer script: <?php if(isset($_POST["email"])) { // EDIT THE 2 LINES BELOW AS REQUIRED $email_to = "email@hotmail.com"; $email_subject = "Your email subject line"; function died($error) { // your error code can go here echo "We are very sorry, but there were error(s) found with the form you submitted. "; echo "These errors appear below.<br /><br />"; echo $error."<br /><br />"; echo "Please go back and fix these errors.<br /><br />"; die(); } // validation expected data exists if(!isset($_POST["std_Salutation"]) || !isset($_POST["std_firstName"]) || !isset($_POST["std_lastName"]) || !isset($_POST["std_email"]) || !isset($_POST["std_phone"]) || !isset($_POST["cust_243593"]) || !isset($_POST["cust_243596"]) || !isset($_POST["cust_243624"]) || !isset($_POST["cust_243607"]) || !isset($_POST["cust_243595"]) || !isset($_POST["cust_243598"]) || !isset($_POST["cust_243597"]) || !isset($_POST["cust_243599"]) || !isset($_POST["cust_243601"]) || !isset($_POST["cust_243600"])) { died('We are sorry, but there appears to be a problem with the form you submitted.'); } $salu = $_POST["std_Salutation"]; $first = $_POST["std_firstName"]; $last = $_POST["std_lastName"]; $email_from = $_POST["std_email"]; $phone = $_POST["std_phone"]; $sky = $_POST["cust_243593"]; $coun = $_POST["cust_243596"]; $per = $_POST["cust_243624"]; $sou = $_POST["cust_243607"]; $you = $_POST["cust_243595"]; $whe = $_POST["cust_243598"]; $your = $_POST["cust_243597"]; $mari = $_POST["cust_243599"]; $unm = $_POST["cust_243601"]; $eng = $_POST["cust_243600"]; $error_message = ""; $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/'; if(!preg_match($email_exp,$email_from)) { $error_message .= 'The Email Address you entered does not appear to be valid.<br />'; } if(strlen($error_message) > 0) { died($error_message); } $email_message = "Form details below.\n\n"; function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } $email_message .= "Salutation: ".clean_string($salu)."\n"; $email_message .= "First Name: ".clean_string($first)."\n"; $email_message .= "Last Name: ".clean_string($last)."\n"; $email_message .= "E-mail Address: ".clean_string($email_from)."\n"; $email_message .= "Phone: ".clean_string($phone)."\n"; $email_message .= "Skype Name: ".clean_string($sky)."\n"; $email_message .= "Country of Citizenship: ".clean_string($coun)."\n"; $email_message .= "Personal Net Worth: ".clean_string($per)."\n"; $email_message .= "Source of 500,000 for Investment: ".clean_string($sou)."\n"; $email_message .= "Your Business/Occupation: ".clean_string($you)."\n"; $email_message .= "Where Are You In the Process: ".clean_string($whe)."\n"; $email_message .= "Your Situation & Goals: ".clean_string($your)."\n"; $email_message .= "Marital Status: ".clean_string($mari)."\n"; $email_message .= "No. of Unmarried Children Under 21: ".clean_string($unm)."\n"; $email_message .= "English Fluency: ".clean_string($eng)."\n"; // create email headers $headers = 'From: '.$email_from."\r\n". 'Reply-To: '.$email_from."\r\n" . 'X-Mailer: PHP/' . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); ?> <!-- include your own success html here --> Thank you for contacting us. We will be in touch with you very soon. <?php } ?> The problem which I am facing is that when I fill the form and click on the submit button, the blank page of sendform.php opens up and no email is sent to my email account. Now when I use the demo form code from the php mailer site along with the php mailer script, it works like a charm and the email is sent to my email account. So I am assuming that something is wrong with my html form code. Please help me guys, it's urgent.
  3. Hello guys, hope all of you're doing good. I have run into a little problem and I was wondering if you guys can help me. I have put up a little yellow square on the left side of my website http://www.allwebutilities.com/public/and have set it's position to 'fixed' and the z-index to '999' so that it stays in its place. Now the problem which I am facing is that when I zoom in my browser using 'ctrl' + '+' to lets say 125% (in chrome), that yellow box deviates from it's position and sticks to the vertical scroll bar. And when I further zoom in, it completely disappears. What I want is that it should stay in its place regardless of me zooming in or out. Please help me guys. The code is really simple: This is the code generating the yellow box: <div class="fixed-head"> <div class="tile bg-color-yellow icon" data-role="tile-slider" data-param-period="6000"> <div class="tile-content"> <img src="images/cus2.png" class="imgg" /> </div> </div> </div> This is the code which is making it stick to it's place: .fixed-head { position: fixed; top: 170px; margin-left: 820px; }
  4. Hello guys, hope all of you're doing good. I have a website running an ecommerce theme powered by wordpress. Inside it, there's this product page which I've on which there are two tables (http://allwebutilities.com/finewatches/product/pen/). The first table consists of the following headings: Size, Price, Strap/Bracelet, Case & Back, Specifications and Shape. And the second table consists of the following headings: Size, Cap, Clip, Trim, Barrel, Refill. Now what I want to do is that if I've fed a certain value of 'Cap' in the backend, then only the first table should be echo'd out. For example, if I've entered the value of 'Cap' as 'No' in the backend, then only the first table is echo'd out. But if there's any other value of 'Cap' entered in the backend, then only the second table is echo'd out. I know this can be done using the If and Else statements but I just can't get it right. Please help me guys. Here's the code which is echoing out the products page. <?php get_header(); ?>[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3]<?php $aOptions = SofaSuppaStore::initOptions( false ); $entrycurrency = $aOptions[ 'entrycurrency' ]; $prod_use_related = $aOptions[ 'prod_use_related' ]; $prod_disable_comments = $aOptions[ 'prod_disable_comments' ]; $num_of_mb = $aOptions[ 'num_of_def_boxes' ]; $use_stock = $aOptions[ 'use_stock' ]; if( $num_of_mb <= 0 ) $num_of_mb = 1; ?>[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3]<!-- main content start --> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php // meta stuff $arr_price = array();[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3]$arr_sizes = array();[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3]$arr_stock = array();[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3]$arr_shipp = array();[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3]$arr_strap = array();[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3]$arr_case = array();[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3]$arr_spec = array();[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3]$arr_shape = array();[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3]$arr_sze = array(); $arr_cap = array();[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3]$arr_clip = array(); $arr_trim = array(); $arr_barr = array(); $arr_refi = array();[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3]$iter_meta = 0;[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3]// extract post meta[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3]while( $iter_meta < $num_of_mb ) {[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $single_price = 'sofa_' . $iter_meta . '_textarea_price';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $single_sizes = 'sofa_' . $iter_meta . '_textarea_size';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $single_stock = 'sofa_' . $iter_meta . '_textarea_stock';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $single_shipp = 'sofa_' . $iter_meta . '_textarea_shipp';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $single_strap = 'sofa_' . $iter_meta . '_textarea_strap';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $single_case = 'sofa_' . $iter_meta . '_textarea_case';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $single_spec = 'sofa_' . $iter_meta . '_textarea_spec';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $single_shape = 'sofa_' . $iter_meta . '_textarea_shape'; $single_sze = 'sofa_' . $iter_meta . '_textarea_sze';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $single_cap = 'sofa_' . $iter_meta . '_textarea_cap';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $single_clip = 'sofa_' . $iter_meta . '_textarea_clip';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $single_trim = 'sofa_' . $iter_meta . '_textarea_trim';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $single_barr = 'sofa_' . $iter_meta . '_textarea_barr';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $single_refi = 'sofa_' . $iter_meta . '_textarea_refi'; // populate array $single_id = get_the_ID(); // just to speed it up if( get_post_meta( $single_id, $single_price, true ) != '*' ) {[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] array_push( $arr_price, get_post_meta( $single_id, $single_price, true ) );[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] array_push( $arr_sizes, get_post_meta( $single_id, $single_sizes, true ) );[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] array_push( $arr_strap, get_post_meta( $single_id, $single_strap, true ) );[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] array_push( $arr_case, get_post_meta( $single_id, $single_case, true ) );[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] array_push( $arr_spec, get_post_meta( $single_id, $single_spec, true ) );[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] array_push( $arr_shape, get_post_meta( $single_id, $single_shape, true ) ); array_push( $arr_sze, get_post_meta( $single_id, $single_sze, true ) ); array_push( $arr_cap, get_post_meta( $single_id, $single_cap, true ) );[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] array_push( $arr_clip, get_post_meta( $single_id, $single_clip, true ) );[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] array_push( $arr_trim, get_post_meta( $single_id, $single_trim, trim ) );[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] array_push( $arr_barr, get_post_meta( $single_id, $single_barr, true ) ); array_push( $arr_refi, get_post_meta( $single_id, $single_refi, true ) );[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] if( $use_stock == 'yes' ) { $stock_post_meta_value = get_post_meta( $single_id, $single_stock, true ); if( $stock_post_meta_value == '*' ) array_push( $arr_stock, 0 ); else array_push( $arr_stock, $stock_post_meta_value ); } if( get_post_meta( $single_id, $single_shipp, true ) != '*' ) array_push( $arr_shipp, get_post_meta( $single_id, $single_shipp, true ) ); } $iter_meta ++; } // content $content = get_the_content(); $content = apply_filters( 'the_content', $content ); $content = str_replace( ']]>', ']]>', $content ); $content = preg_replace( '|(class=[\'"]wp-caption.*?[\'"]).*?(style=[\'"](.*?)[\'"]).*?|i', '$1', $content ); // remove captions from extracted images $p_page = __( "Previous page", "sofa_suppastore" ); $n_page = __( "Next page", "sofa_suppastore" ); wp_link_pages( array( 'before' => '<div id="pagination" class="wp-pagenavi grid_8 alpha omega"><span class="nava">', 'next_or_number' => 'next', 'previouspagelink' => $p_page, 'nextpagelink' => $n_page, 'after' => '</span></div>' ) ); ?> <!-- content start -->[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] <div id="featured" class="grid_8"> <!-- title start --> <h1 class="grid_8 alpha"><?php the_title(); ?></h1> <!-- title end --> <!-- images set start --> <div id="prodimageset" class="castshadow grid_4 alpha"> <?php // any featured image? if( has_post_thumbnail() && get_the_post_thumbnail( $single_id, 'featured' ) != '' ) { $featured_image_id = get_post_thumbnail_id(); $large_image_url = wp_get_attachment_image_src( $featured_image_id, 'large' ); echo '<div class="grid_4 alpha omega">'; echo '<a href="' . $large_image_url[ 0 ] . '" title="' . the_title_attribute( 'echo=0' ) . '">'; the_post_thumbnail( 'featured' ); echo '</a>'; echo '</div>'; } ?> </div> <!-- images set end --> <!-- product selection start -->[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] <div id="proddetails" class="grid_4 omega"> <h1 id="prodprice"><?php echo $entrycurrency . ' ' . number_format( $arr_price[ 0 ], 2, '.', '' ); ?></h1> <table id="tblmeta" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <th scope="col" class="center"><?php _e( "Size", "sofa_suppastore" ); ?></th> <th scope="col" class="<?php if( empty( $arr_shipp ) && $use_stock == 'no' ) echo 'center'; else echo 'center'; ?>"><?php echo __( "Price", "sofa_suppastore" ) . ' ' . '(' . $entrycurrency . ')'; ?></th> <?php if( !empty( $arr_shipp ) ) { ?><th scope="col" class="<?php if( $use_stock == 'no' ) echo 'center'; else echo 'center'; ?>"><?php echo __( "Movement", "sofa_suppastore" ); ?></th><?php } ?> <?php if( $use_stock == 'yes' ) { ?><th scope="col" class="textright"><?php _e( "Stock", "sofa_suppastore" ); ?></th><?php } ?> <th scope="col" class="center"><?php _e( "Strap/<br />Bracelet", "sofa_suppastore" ); ?></th> </tr>[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] <?php // loop through meta $iter_chck = 0; $iter_loop = 0; $iter_leng = count( $arr_price ); while( $iter_loop < $iter_leng ) { if( $use_stock == 'yes' ) { if( $arr_stock[ $iter_loop ] != '*' && $arr_stock[ $iter_loop ] > 0 ) { // don't list products that are out of stock! $iter_chck ++; echo '<tr id="infoline_' . $iter_loop . '" class="proddetailstr">'; echo '<td title="size" class="center">' . $arr_sizes[ $iter_loop ] . '</td>'; echo '<td title="price" class="center">' . number_format( $arr_price[ $iter_loop ], 2, '.', '' ) . '</td>'; if( !empty( $arr_shipp ) ) echo '<td title="shipp" class="center">' . number_format( $arr_shipp[ $iter_loop ], 2, '.', '' ) . '</td>';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $true_stock_value = 0; if( $arr_stock[ $iter_loop ] != '*' ) $true_stock_value = $arr_stock[ $iter_loop ]; echo '<td title="stock" class="textright">' . $true_stock_value . '</td>'; echo '<td title="strap" class="center">' . $arr_strap[ $iter_loop ] . '</td>';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '</tr>'; } } elseif( $use_stock == 'no' ) { $iter_chck ++; echo '<tr id="infoline_' . $iter_loop . '" class="proddetailstr">'; echo '<td title="size" class="optionstill textleft">' . $arr_sizes[ $iter_loop ] . '</td>'; if( !empty( $arr_shipp ) ) echo '<td title="price" class="center">' . number_format( $arr_price[ $iter_loop ], 2, '.', '' ) . '</td>'; else echo '<td title="price" class="center">' . number_format( $arr_price[ $iter_loop ], 2, '.', '' ) . '</td>'; if( !empty( $arr_shipp ) ) echo '<td title="shipp" class="center">' . $arr_shipp[ $iter_loop ] . '</td>'; echo '<td title="strap" class="center">' . $arr_strap[ $iter_loop ] . '</td>'; echo '</tr>'; } $iter_loop ++; } if( $iter_chck == 0 ) { echo '<tr>'; echo '<td colspan="4" class="textleft">' . __( "Product not available!", "sofa_suppastore" ) . '</td>'; echo '</tr>'; } ?> </table>[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] <table id="tblmeta" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <th scope="col" class="center"><?php _e( "Case & Back", "sofa_suppastore" ); ?></th> <th scope="col" class="center"><?php _e( "Specifications", "sofa_suppastore" ); ?></th> <th scope="col" class="center"><?php _e( "Shape", "sofa_suppastore" ); ?></th> </tr> <?php // loop through meta $iter_chck = 0; $iter_loop = 0; $iter_leng = count( $arr_price ); while( $iter_loop < $iter_leng ) { if( $use_stock == 'yes' ) { if( $arr_stock[ $iter_loop ] != '*' && $arr_stock[ $iter_loop ] > 0 ) { // don't list products that are out of stock! $iter_chck ++; echo '<tr id="infoline_' . $iter_loop . '" class="proddetailstr">'; echo '<td title="case" class="center">' . $arr_case[ $iter_loop ] . '</td>'; echo '<td title="spec" class="center">' . $arr_spec[ $iter_loop ] . '</td>'; echo '<td title="shape" class="center">' . $arr_shape[ $iter_loop ] . '</td>';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '</tr>'; } } elseif( $use_stock == 'no' ) { $iter_chck ++; echo '<tr id="infoline_' . $iter_loop . '" class="proddetailstr">'; echo '<td title="case" class="center">' . $arr_case[ $iter_loop ] . '</td>'; echo '<td title="spec" class="center">' . $arr_spec[ $iter_loop ] . '</td>'; echo '<td title="shape" class="center">' . $arr_shape[ $iter_loop ] . '</td>'; echo '</tr>'; } $iter_loop ++; } if( $iter_chck == 0 ) { echo '<tr>'; echo '<td colspan="4" class="textleft">' . __( "Product not available!", "sofa_suppastore" ) . '</td>'; echo '</tr>'; } ?> </table> <table id="tblmeta" width="100%" border="0" cellspacing="0" cellpadding="0">[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] <tr>[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] <th scope="col" class="center"><?php _e( "Size", "sofa_suppastore" ); ?></th>[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] <th scope="col" class="center"><?php _e( "Cap", "sofa_suppastore" ); ?></th>[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] <th scope="col" class="center"><?php _e( "Clip", "sofa_suppastore" ); ?></th>[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] </tr> [/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] <?php[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] // loop through meta[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $iter_chck = 0;[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $iter_loop = 0;[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $iter_leng = count( $arr_price );[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] while( $iter_loop < $iter_leng ) {[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] if( $use_stock == 'yes' ) {[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] if( $arr_stock[ $iter_loop ] != '*' && $arr_stock[ $iter_loop ] > 0 ) { // don't list products that are out of stock![/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $iter_chck ++;[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '<tr id="infoline_' . $iter_loop . '" class="proddetailstr">';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '<td title="sze" class="center">' . $arr_sze[ $iter_loop ] . '</td>';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '<td title="cap" class="center">' . $arr_cap[ $iter_loop ] . '</td>';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '<td title="clip" class="center">' . $arr_clip[ $iter_loop ] . '</td>';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '</tr>';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] }[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] } elseif( $use_stock == 'no' ) {[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $iter_chck ++;[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '<tr id="infoline_' . $iter_loop . '" class="proddetailstr">';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '<td title="sze" class="center">' . $arr_sze[ $iter_loop ] . '</td>';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '<td title="cap" class="center">' . $arr_cap[ $iter_loop ] . '</td>';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '<td title="clip" class="center">' . $arr_clip[ $iter_loop ] . '</td>';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '</tr>';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] }[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $iter_loop ++;[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] }[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] if( $iter_chck == 0 ) {[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '<tr>';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '<td colspan="4" class="textleft">' . __( "Product not available!", "sofa_suppastore" ) . '</td>';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '</tr>';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] }[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] ?>[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] </table> <table id="tblmeta" width="100%" border="0" cellspacing="0" cellpadding="0">[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] <tr>[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] <th scope="col" class="center"><?php _e( "Trim", "sofa_suppastore" ); ?></th>[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] <th scope="col" class="center"><?php _e( "Barrel", "sofa_suppastore" ); ?></th>[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] <th scope="col" class="center"><?php _e( "Refill", "sofa_suppastore" ); ?></th>[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] </tr>[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] <?php[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] // loop through meta[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $iter_chck = 0;[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $iter_loop = 0;[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $iter_leng = count( $arr_price );[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] while( $iter_loop < $iter_leng ) {[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] if( $use_stock == 'yes' ) {[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] if( $arr_stock[ $iter_loop ] != '*' && $arr_stock[ $iter_loop ] > 0 ) { // don't list products that are out of stock![/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $iter_chck ++;[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '<tr id="infoline_' . $iter_loop . '" class="proddetailstr">';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '<td title="trim" class="center">' . $arr_trim[ $iter_loop ] . '</td>';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '<td title="barr" class="center">' . $arr_barr[ $iter_loop ] . '</td>';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '<td title="refi" class="center">' . $arr_refi[ $iter_loop ] . '</td>';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '</tr>';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] }[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] } elseif( $use_stock == 'no' ) {[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $iter_chck ++;[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '<tr id="infoline_' . $iter_loop . '" class="proddetailstr">';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '<td title="trim" class="center">' . $arr_trim[ $iter_loop ] . '</td>';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '<td title="barr" class="center">' . $arr_barr[ $iter_loop ] . '</td>';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '<td title="refi" class="center">' . $arr_refi[ $iter_loop ] . '</td>';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '</tr>';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] }[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] $iter_loop ++;[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] }[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] if( $iter_chck == 0 ) {[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '<tr>';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '<td colspan="4" class="textleft">' . __( "Product not available!", "sofa_suppastore" ) . '</td>';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] echo '</tr>';[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] }[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] ?>[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] </table> <?php if( $iter_chck > 0 ) { ?>[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3]<?php edit_post_link( $link, $before, $after, $id ); ?> [/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] <p>No Hidden Charges<br>Free Delivery Across Pakistan<br>Payment At The Time Of Delivery</p>[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] <div class="grid_4 alpha omega"> <div class="left"><button class="close">Close Form</button></div>[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] <div class="right"><button class="btn2">Order Now!</button></div> </div>[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3]<br><br><br><br><div id="div1"><form name="contactform" method="post" action="http://allwebutilities.com/finewatches/send_form_email.php"> <table width="450px"> <tr> <td valign="top"> <label for="first_name">First Name *</label> </td> <td valign="top"> <input type="text" required name="first_name" maxlength="50" size="23"> </td> </tr> <tr> <td valign="top""> <br><label for="last_name">Last Name *</label> </td> <td valign="top"> <br><input type="text" required name="last_name" maxlength="50" size="23"> </td> </tr> <tr> <td valign="top"> <br><label for="email">Email Address*</label> </td> <td valign="top"> <br><input type="email" required name="email" maxlength="800" size="23"> </td> </tr> <tr> <td valign="top"> <br><label for="telephone">Cell Number*</label> </td> <td valign="top"> <br><input type="text" required name="telephone" maxlength="300" size="23"> </td> </tr> <tr> <td valign="top"> <br><label for="age">Age*</label> </td> <td valign="top"> <br><input type="text" required name="age" maxlength="30" size="3"> </td> </tr> <tr> <td valign="top"> <br><label for="quantity">Quantity*</label> </td> <td valign="top"> <br><input type="text" required name="quantity" maxlength="30" size="3"> </td> </tr> <tr> <td valign="top"> <br><label for="address">Address*</label> </td> <td valign="top"> <br><input type="text" required name="address" maxlength="1000" size="23"> </td> </tr> <tr> <td valign="top"> <br><label for="city">City*</label> </td> <td valign="top"> <br><input name="city" required type="text" id="mobile" size="23" /> </td> </tr> <tr> <td valign="top"> <br><label for="comments">Comments/<br>Instructions</label> </td> <td valign="top"> <br><textarea name="comments" maxlength="1000" cols="19" rows="6"></textarea> </td> </tr> <tr> <td colspan="2" style="text-align:center"> <br><button type="submit">Submit</button> <button type="reset">Reset</button> </td> </tr> </table> <div class="no-display"> <input type="hidden" name="product_namee" value="<?php the_title(); ?>" /> <input type="hidden" name="product_nameee" value="<?php the_permalink(); ?>" /> </div> </form> </div> <?php } ?> <input type="hidden" name="itemselmeta" id="itemselmeta" value="" /> <input type="hidden" name="itemid" id="itemid" value="<?php the_ID(); ?>" /> <input type="hidden" name="dothis" id="dothis" value="addnew" /> <input type="hidden" name="itemsize" id="itemsize" value="" /> <input type="hidden" name="itemprice" id="itemprice" value="" /> <input type="hidden" name="itemstock" id="itemstock" value="" /> <input type="hidden" name="itemshipp" id="itemshipp" value="" /> <?php wp_nonce_field( 'chck_ref_cc', 'sofa_suppastore_cc' ); ?>[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] <!-- product selection end --> </div> <!-- product description start --> <div class="grid_8 alpha omega"> <?php // get all other images attached to this product... $html_tab_images = ''; $args = array( 'post_type' => 'attachment', 'numberposts' => -1, 'post_status' => NULL, 'post_parent' => $single_id, 'exclude' => get_post_thumbnail_id() ); $attachments = get_posts( $args ); if( $attachments ) { $i = 1; $html_tab_images .= '<div id="pimages" class="tab-content">'; foreach( $attachments as $attachment ) { if( $i % 4 == 0 ) $switch_class = ' alpha omega'; elseif( ( $i - 1 ) % 4 == 0 ) $switch_class = ''; else $switch_class = ''; $large_image_url = wp_get_attachment_image_src( $attachment->ID, 'large' ); $html_tab_images .= '<span style="width: 130px;" class="prodimgwrap alignleft' . $switch_class . '"><a href="' . $large_image_url[ 0 ] . '" title="' . the_title_attribute( 'echo=0' ) . '">'; $html_tab_images .= wp_get_attachment_image( $attachment->ID, 'thumbnail' ); $html_tab_images .= '</a><span class="imgshadow"><span class="shadowleft"> </span><span class="shadowright"> </span></span></span>'; $i ++; } echo '</div>'; } ?> <span class="prodtab"><a class="tablink tabactive" href="javascript:;" rel="pdetails"><?php _e( "Product Details", "sofa_suppastore" ); ?></a></span> <?php if( $attachments ) { ?><span class="prodtab"><a class="tablink tabnormal" href="javascript:;" rel="pimages"><?php _e( "More Images", "sofa_suppastore" ); ?></a></span><?php } ?> <div id="pdetails" class="tab-content defaulttab"> <?php // remove images from content $content = preg_replace( '|<a.*?href=[\'"](.*?)[\'"].*?>.*?<img.*?src=[\'"](.*?)[\'"].*?alt=[\'"](.*?)[\'"].*?><.*?a>|i', '', $content ); echo $content; ?> </div> <?php echo $html_tab_images; ?> </div> <!-- product description end --> <!-- content end --> <!-- related products scroller start --> <?php if( $prod_use_related == 'yes' ) { // handle related products... $backup = $post; // backup the current object $tags = wp_get_post_tags( $single_id ); $tagIDs = array(); if( $tags ) { $tagcount = count( $tags ); for( $i = 0; $i < $tagcount; $i++ ) { $tagIDs[ $i ] = $tags[ $i ]->term_id; } $args = array( 'tag__in' => $tagIDs, 'post__not_in' => array( $single_id ), 'showposts' => -1, 'post_type' => 'product' ); $my_query = new WP_Query( $args ); // how many related posts? $my_query->post_count; if( $my_query->have_posts() ) : ?> <div class="clear"> </div> <div id="relatedproducts" class="castshadow grid_8 alpha"> <div class="bordertop grid_8 alpha omega"> <!-- control button left start --> <div class="grid_2 alpha"> <?php if( $my_query->post_count > 4 ) { ?> <span class="addtocart prevPage"><a href="#l"><?php _e( "Previous", "sofa_suppastore" ); ?></a></span> <?php } else echo ' '; ?> </div> <!-- control button left end --> <!-- title start --> <div class="grid_4 center"> <h2 class="relatedtitle"><?php _e( "Related products", "sofa_suppastore" ); ?></h2> </div> <!-- title end --> <!-- control button right start --> <div class="grid_2 omega"> <?php if( $my_query->post_count > 4 ) { ?> <span class="addtocart nextPage"><a href="#r"><?php _e( "Next", "sofa_suppastore" ); ?></a></span> <?php } else echo ' '; ?> </div> <!-- control button right end --> </div> <div class="scrollable"> <ul class="images items"> <!-- wordpress sub-loop loop start --> <?php $count_items = 0; while( $my_query->have_posts() ) : $my_query->the_post(); // related post details $rel_product_meta_labeltype = get_post_meta( $post->ID, 'labeltype', true ); $rel_product_meta_labelvalue = get_post_meta( $post->ID, 'labelvalue', true ); $rel_product_meta_price = get_post_meta( $post->ID, 'sofa_0_textarea_price', true ); // extract image $rel_prod_image_link = ''; if( has_post_thumbnail( $post->ID ) ) { $default_attr = array( 'class' => "size-thumbnail clearfix alignleft", 'alt' => $post->post_title, 'title' => $post->post_title ); if( $rel_product_meta_labeltype != '' && $rel_product_meta_labelvalue != '' ) { $rel_prod_image_link .= ( '<a href="' . get_permalink( $post->ID ) . '" rel="' . $rel_product_meta_labeltype . '|' . $rel_product_meta_labelvalue . '">' ); } else $rel_prod_image_link .= ( '<a href="' . get_permalink( $post->ID ) . '">' ); $rel_prod_image_link .= get_the_post_thumbnail( $post->ID, 'thumbnail', $default_attr ); $rel_prod_image_link .= '</a>'; } ?> <li> <div class="grid_2 product alpha"> <?php echo $rel_prod_image_link; ?> <span class="prodtitle clearfix"> <?php echo $post->post_title; ?> </span> </div> </li> [/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] <?php endwhile; // backup query aka reset custom query posts loop $post = $backup; wp_reset_query(); ?> <!-- wordpress sub-loop loop end -->[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] </ul> </div> </div> <!-- related products scroller end --> <?php endif; } // end if tags } // end if use related ?> <?php endwhile; ?>[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] <script type="text/javascript">[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3]jQuery(document).ready(function(){ jQuery("#div1").hide(); jQuery(".close").hide(); jQuery(".close").click(function(){ jQuery("#div1").fadeOut() }); jQuery(".close").click(function(){ jQuery(".close").fadeOut() }); jQuery(".btn2").click(function(){ jQuery("#div1").fadeIn(); }); jQuery(".btn2").click(function(){ jQuery(".close").fadeIn(); }); } ); jQuery( document ).ready( function() { // tabs jQuery( '.prodtab a' ).click( function() { if( !jQuery( this ).is( '.tabactive' ) ) switch_tabs( jQuery( this ) ); } ); // related products - Scrollable <?php if( $prod_use_related == 'yes' ) { if( $tags ) { ?>jQuery( "div.scrollable" ).scrollable( { size: 4, speed: 300 } );<?php } } ?> // table tr hover jQuery( function() { jQuery( 'table .proddetailstr' ).hover( function() { jQuery( this ).addClass( 'hovered' ); jQuery( this ).css( 'cursor', 'default' ); }, function() { jQuery( this ).removeClass( 'hovered' ); } ) } ); // colorbox // jQuery( "a[rel='productslide']" ).colorbox( { transition: "fade" } ); // anything already written to fields (browser cache?) var written_meta = decodeURIComponent( jQuery( '#itemselmeta' ).val() ); var written_price = jQuery( '#itemprice' ).val(); if( written_meta != '' ) jQuery( written_meta + ' td:first-child' ).removeClass( 'optionstill' ).addClass( 'optionactiv' ); else { jQuery( '#infoline_0 td:first-child' ).removeClass( 'optionstill' ).addClass( 'optionactiv' ); // populate other crucial info with initial values jQuery( '#itemselmeta' ).val( '%23infoline_0' ); jQuery( '#itemsize' ).val( "<?php echo $arr_sizes[ 0 ]; ?>" ); jQuery( '#itemprice' ).val( "<?php echo $arr_price[ 0 ]; ?>" ); <?php if( $use_stock == 'yes' ) { ?>jQuery( '#itemstock' ).val( "<?php echo $arr_stock[ 0 ]; ?>" );<?php } ?> <?php if( !empty( $arr_shipp ) ) { ?>jQuery( '#itemshipp' ).val( "<?php echo $arr_shipp[ 0 ]; ?>" );<?php } ?> } if( written_price != '' ) jQuery( '#prodprice' ).html( "<?php echo $entrycurrency . ' '; ?>" + written_price ); // handle selections jQuery( '.proddetailstr' ).click( function( event ) { var this_id = '#' + jQuery( this ).attr( 'id' ); var options_length = jQuery( this_id + ' td' ).length; if( options_length > 0 ) { var ii = 0; while( ii < options_length ) { // faster than jQuery.each var cell_value = jQuery( this_id + ' td' ).eq( ii ).text(); var cell_title = jQuery( this_id + ' td' ).eq( ii ).attr( 'title' ); switch( cell_title ) { case 'size': jQuery( '#itemsize' ).val( encodeURIComponent( cell_value ) ); break; case 'price': jQuery( '#itemprice' ).val( encodeURIComponent( cell_value ) ); break; <?php if( $use_stock == 'yes' ) { ?> case 'stock': jQuery( '#itemstock' ).val( encodeURIComponent( cell_value ) ); break; <?php } ?> <?php if( !empty( $arr_shipp ) ) { ?> case 'shipp': jQuery( '#itemshipp' ).val( encodeURIComponent( cell_value ) ); break; <?php } ?> default: 0; } ii ++; } // remember selection if( jQuery( this ).attr( 'id' ).substring( 0, 8 ) == 'infoline' ) jQuery( '#itemselmeta' ).val( encodeURIComponent( this_id ) ); // remove all active selections var my_parent = '#' + jQuery( this_id ).parent().parent().attr( 'id' ); jQuery( my_parent + ' tr td:first-child' ).each( function() { jQuery( this ).removeClass( 'optionactiv' ).addClass( 'optionstill' ); } ); // switch class to selected jQuery( this_id + ' td:first-child' ).removeClass( 'optionstill' ).addClass( 'optionactiv' ); // update main price jQuery( '#prodprice' ).html( "<?php echo $entrycurrency . ' '; ?>" + jQuery( '#itemprice' ).val() ); } } ); } ); function switch_tabs( obj ) { jQuery( '.tab-content' ).slideUp( 'fast', function() { jQuery( '#' + obj.attr( "rel" ) ).slideDown( 'fast' ); } ); jQuery( '.prodtab a' ).removeClass( 'tabactive' ); obj.addClass( 'tabactive' ); } </script> <!-- comments --> <?php if( 'open' == $post->comment_status && $prod_disable_comments == 'no' ) comments_template(); ?> <!-- end comments --> </div> <?php else: ?> <!-- no content start -->[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3] <div id="featured" class="castshadow grid_8"> <div class="grid_8 alpha"> <h1><?php _e( "Nothing found!", "sofa_suppastore" ); ?></h1> <p><?php _e( "Sorry but no products found. Take your time, there's gonna be soon to see something listed here.", "sofa_suppastore" ); ?></p> </div> </div> <!-- no content end --> <?php endif; ?> <!-- main content end -->[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3]<!-- include sidebar start --> <?php get_template_part( 'sidebar_single_product' ); ?> <!-- include sidebar end -->[/size][/font][/color] [color=#000000][font=Tahoma, Verdana, Arial][size=3]<?php get_footer(); ?> I don't mind using Javascript for this either. I just need a solution. Thanking you all in advance.
  5. I have fixed it on IE9 but there are still some problems viewing it on Firefox 13 and Safari. Please help me.
  6. Hello guys, hope you are doing good. I urgently need your help at a point where I am stuck. I have created this form and applied some css to it. If I am viewing that form using Google Chrome, it looks perfectly fine but when I am viewing it using IE9 or Mozilla or viewing it on my iPhone, the whole border, button etc. gets messed up. Anybody knows how I can fix this so that it looks completely fine no matter if one is viewing it using any browser? The form can be viewed over here http://sigmalogistix.com/index3.php and this is the code: <html> <head> <title>Login - Sigma Logistics</title> <style type="text/css"> form { padding:5px 450px; } img { padding:20px 521px; } a:link { color:#43759b; text-decoration:underline; } a:visited { color:#43759b; text-decoration:underline; } a:hover { color:#43759b; text-decoration:underline; } a:active { color:#43759b; text-decoration:underline; } a.otherLink:link { color:#43759b; text-decoration:none; } a.otherLink:visited { color:#43759b; text-decoration:none; } a.otherLink:hover { color:#43759b; text-decoration:underline; } a.otherLink:active { color:#43759b; text-decoration:none; } label { width: 12.2em; float: left; text-align: right; margin-right: 0.5em; display: block } .submit input { margin-left: 10.5em; } input { color: #47596e; background: #fee3ad; border: 1px solid #47596e; margin-left: 3.6em } .submit input { color: #000; background: #ffa20f; border: 2px outset #d7b9c9 } fieldset { border: 2px solid #47596e; width: 21em -moz-box-shadow: 0px 5px 12px #cdd0cc; box-shadow: 0px 5px 12px #cdd0cc; } legend { color: black; background: #ffa20c; border: 2px solid #47596e; padding: 2px 6px } </style> </head> <img src="http://sigmalogistix.com/wp-content/uploads/2012/02/Untitled-22.png" /> <form action='login.php' method='POST'> <fieldset> <legend>Track & Trace</legend> <p><label for="username"><font face="Arial" size="2">Username</font></label> <br><input type="text" name="username" size="35" /></p> <p><label for="password"><font face="Arial" size="2">Password</font></label> <br><input type="password" name="password" size="35" /></p> <p class="submit"><input type="submit" value="Log in" /></p> <a href='http://www.sigmalogistix.com'>← <font size="2" face="Arial">Back to Sigma Logistics</font></a> </fieldset> </form> </html> This is how it looks when I view it using Google Chrome 19 (everything's perfect). This is how it looks when I view it using Firefox 12 (notice that the shadow behind the form is misaligned). This is how it looks when I view it using IE9 (everything's misaligned ) And this is on iPhone's Safari browser. Please help me guys, thanks.
  7. Thanks a lot for the replies, guys. I was a little busy with studies that's why I couldn't reply. It took me around 2 days, some tutorials and I have successfully developed the admin interface
  8. Hello guys, hope all of you are doing good. I want to ask a quick question . I have developed this track and trace application (php script) through which users can trace their shipment by entering a bill of lading number in the track and trace interface on our website and then the information stored in our database is displayed to them. Currently, what I do to add new or change the status of existing bill of lading numbers is that first I have to log in to the cPanel of my website, then I need to log in to phpmyadmin and then I can add new bill of lading numbers or change the number of existing bill of lading numbers. This is a pretty long way and I don't want to give the cPanel password to other employees so that they can do the job of entering bill of lading numbers. So I was thinking that can an interface be created through which any employee can add new or change the status etc. of the bill of lading numbers stored in the database without actually logging in to phpmyadmin? The interface would obviously be connected to the database and any new bill of lading number entered through the interface should automatically be stored in the database. And on the other hand, the bill of lading numbers which are already stored in the database, they can also be edited through this interface. Please let me know if such an interface can be created. And if yes, is there any tutorial on how this can be done? Thanks.
  9. Thanks for your reply I tried and succeeded; Just made some changes to the code and now the images are being displayed with different 'status' values.
  10. I have another question. In the database, I have four 'Status' values, namely Initiated, Picked Up, In Transit and Delivered. Now I have four images corresponding to each Status Value which I want to be displayed when a person submits the form: Initiated: Picked Up: In Transit: Delivered: What I want is that when somebody's courier status is 'Initiated', the image assigned to the value 'initiated' should be displayed above the table. Just like this, when somebody's courier status is 'Delivered', the image assigned to the value 'delivered' should be displayed above the table and so on for each value. The code would be something like this (this is not a proper code, just an imitation of what I want) If status=Delivered show img: http://www.fedex.com/Tracking/track/images/detail/progress_delivered_ltr.gif or else If status=In Transit show img: http://www.fedex.com/Tracking/track/images/detail/progress_intransit_ltr.gif or else If status=Picked Up show img: http://www.fedex.com/Tracking/track/images/detail/progress_pickedup_ltr.gif or else If status=Initiated show img: http://www.fedex.com/Tracking/track/images/detail/progress_initiated_ltr.gif Please let me know if doing so is possible. Thanks.
  11. Finally its working :D Thanks a lot for your help, bro! Couldn't have found a better forum than phpfreaks to get my problem solved. Thanks a lot.
  12. It says: and then there's the table with the same type of results as before. I am now making the changes on my localhost. This is how the code looks like: <?php include 'func.inc.php'; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>search</title> </head> <body> <form action="" method="POST"> <p> <input type="text" name="keywords" size="17" maxlength="9" value="Enter B/L No." onfocus="if(this.value == 'Enter B/L No.'){this.value = '';}" /> <input type="submit" class="formbutton" value="Track" /> </p> </form> <?php if (isset($_POST['keywords'])) { $suffix = ""; $keywords = mysql_real_escape_string(htmlentities(trim($_POST['keywords']))); $errors = array(); if (empty($keywords)) { $errors[] = ''; } else if (strlen($keywords)<9) { $errors[] = '<br><strong>Your Bill of Lading Number must contain 9-digits.</strong>'; } else if (search_results($keywords) === false) { $errors[] = '<br><strong>Please enter a valid Bill of Lading Number.</strong>'; } if (empty($errors)) { $results = search_results($keywords); var_dump($results); $results_num = count($results); $suffix = ($results_num !=1) ? 's' : ''; foreach($results as $result) { echo '<br><table> <thead> <tr> <th><strong>B/L No.</strong></th> <th><strong>Origin City</strong></th> <th><strong>Origin Country</strong></th> <th><strong>Destination City</strong></th> <th><strong>Destination Country</strong></th> <th><strong>Status</strong></th> <th><strong>Current Location</strong></th> </tr> </thead> <tbody> <?php while ($row = mysql_fetch_assoc($results) { ?> <tr> <td>echo $result["Bill_No"]</td> <td>echo $result["Origin_City"]</td> <td>echo $result["Origin_Country"]</td> <td>echo $result["Destination_City"]</td> <td>echo $result["Destination_Country"]</td> <td>echo $result["Status"]</td> <td>echo $result["Current_Location"]</td> </tr> <?php } ?> </tbody> </table>'; } } else { foreach($errors as $error) { echo $error, '</br>'; } } } ?> </body> </html>
  13. It was with my code. With your code, the page doesn't load and hence no error shows up. I wonder where we are getting wrong :-\
  14. There are 2 Errors. The first one says: 'theme-shortcodes.php' is a file inside my theme. This is the code inside that file: <?php /*============================================================ Layout Columns Shortcodes ============================================================*/ function celta_columns_shortcode( $atts, $content = null ) { extract( shortcode_atts( array( "size" => 'full-width', "last" => 'false', "title" => '', "subtitle" => '' ), $atts)); $clear = ''; if ( $last == 'true' ) { $last = ' last'; $clear = '<div class="clear"></div>'; } else { $last = ''; } $box_title = ''; if ( $title != '' ) { $box_title = '<div class="box-title"> <h3>' .$title. '</h3> <span class="box-subtitle">' .$subtitle. '</span> </div>'; } return '<div class="' . $size . $last . '">' . $box_title . do_shortcode( $content ) . '</div>' . $clear; } add_shortcode( 'column', 'celta_columns_shortcode' ); /*============================================================ Title Column Shortcodes ============================================================*/ function celta_title_col_shortcode( $atts, $content = null ) { extract( shortcode_atts( array( "title" => '' ), $atts)); $output = '<div class="title-col"> <h2>' . $title . '</h2> ' . do_shortcode( $content ) . ' </div>'; return $output; } add_shortcode( 'title_column', 'celta_title_col_shortcode' ); /*============================================================ Numbered Box Shortcodes ============================================================*/ function celta_numbered_box_shortcode( $atts, $content = null ) { extract( shortcode_atts( array( "title" => '', "subtitle" => '', "number" => '' ), $atts)); $output = '<div class="box-title"> <span class="box-number">' . $number . '</span> <h3>' . $title . '</h3> <span class="box-subtitle">' . $subtitle . '</span> </div><!-- end box-title --> ' . do_shortcode( $content ); return $output; } add_shortcode( 'numbered_box', 'celta_numbered_box_shortcode' ); /*============================================================ Project Shortcodes ============================================================*/ function celta_project_shortcode( $atts, $content = null ) { extract( shortcode_atts( array( "type" => '', "link" => '', "image" => '', "title" => '' ), $atts)); if ( $type == 'video') $class = 'play'; else $class = 'zoom'; $output = '<a class="' .$class. '" href="' .$link. '" rel="prettyPhoto" title="' .$title. '"><img class="box-img" src="' .$image. '" alt="" /></a> <div class="box-title"> <h4>' .$title. '</h4> </div><!-- end box-title --> <p>' .$content. '</p>'; return $output; } add_shortcode( 'project', 'celta_project_shortcode' ); /*============================================================ Dropcap Shortcodes ============================================================*/ function celta_drop_shortcode( $atts, $content = null ) { extract( shortcode_atts( array( "type" => '', ), $atts)); if ( $type != 'colored' ) $output = '<span class="dropcap-1">' .$content. '</span>'; else $output = '<span class="dropcap-2">' .$content. '</span>'; return $output; } add_shortcode( 'dropcap', 'celta_drop_shortcode' ); /*============================================================ Highlight Shortcodes ============================================================*/ function celta_high_shortcode( $atts, $content = null ) { extract( shortcode_atts( array( "type" => '', ), $atts)); if ( $type == 'alternative-1' ) $output = '<span class="highlight-2">' .$content. '</span>'; elseif ( $type == 'alternative-2' ) $output = '<span class="highlight-3">' .$content. '</span>'; else $output = '<span class="highlight-1">' .$content. '</span>'; return $output; } add_shortcode( 'highlight', 'celta_high_shortcode' ); /*============================================================ Divider Shortcodes ============================================================*/ function celta_divider_shortcode( $atts, $content = null ) { return '<div class="separator-line"></div>'; } add_shortcode( 'divider', 'celta_divider_shortcode' ); /*============================================================ Recent Posts Shortcodes ============================================================*/ function celta_recent_shortcode( $atts, $content = null ) { extract( shortcode_atts( array( "qty" => 1 ), $atts)); $output = '<ul class="latest-news">'; $loop = new WP_Query( array( 'post_type' => 'post', 'posts_per_page' => $qty ) ); while ( $loop->have_posts() ) : $loop->the_post(); $output .= '<li>'; $output .= '<a href="' . get_permalink() . '" title=""><strong>' . get_the_title() . '</strong></a>'; $output .= '<p>' . get_the_excerpt() . '</p>'; $output .= '<span>' . get_the_time( 'j F, Y' ) . '</span>'; $output .= '</li>'; endwhile; $output .= '</ul>'; return $output; } add_shortcode( 'recent_posts', 'celta_recent_shortcode' ); /*============================================================ Social Profiles Shortcodes ============================================================*/ function celta_social_shortcode( $atts, $content = null ) { require( CELTA_LIB . "theme-options-vars.php" ); $output = '<ul class="social-links">'; if ( $celta_blogger != '' ) $output .= '<li class="blogger" title="Blogger"><a href="' . $celta_blogger . '"></a></li>'; if ( $celta_delicious != '' ) $output .= '<li class="delicious" title="Delicious"><a href="' . $celta_delicious . '"></a></li>'; if ( $celta_deviantart != '' ) $output .= '<li class="deviant" title="DeviantArt"><a href="' . $celta_deviantart . '"></a></li>'; if ( $celta_digg != '' ) $output .= '<li class="digg" title="Digg"><a href="' . $celta_digg . '"></a></li>'; if ( $celta_facebook != '' ) $output .= '<li class="facebook" title="Facebook"><a href="' . $celta_facebook . '" target="_blank"></a></li>'; if ( $celta_flickr != '' ) $output .= '<li class="flickr" title="Flickr"><a href="' . $celta_flickr . '"></a></li>'; if ( $celta_forrst != '' ) $output .= '<li class="forrst" title="Forrst"><a href="' . $celta_forrst . '"></a></li>'; if ( $celta_lastfm != '' ) $output .= '<li class="lastfm" title="LastFM"><a href="' . $celta_lastfm . '"></a></li>'; if ( $celta_linkedin != '' ) $output .= '<li class="linkedin" title="Linkedin"><a href="' . $celta_linkedin . '"></a></li>'; if ( $celta_myspace != '' ) $output .= '<li class="myspace" title="MySpace"><a href="' . $celta_myspace . '"></a></li>'; if ( $celta_reddit != '' ) $output .= '<li class="reddit" title="Reddit"><a href="' . $celta_reddit . '"></a></li>'; if ( $celta_tumblr != '' ) $output .= '<li class="tumblr" title="Tumblr"><a href="' . $celta_tumblr . '"></a></li>'; if ( $celta_twitter != '' ) $output .= '<li class="twitter" title="Twitter"><a href="' . $celta_twitter . '" target="_blank"></a></li>'; if ( $celta_vimeo != '' ) $output .= '<li class="vimeo" title="Vimeo"><a href="' . $celta_vimeo . '"></a></li>'; if ( $celta_rss != '' ) $output .= '<li class="rss" title="RSS"><a href="' . $celta_vimeo . '"></a></li>'; $output .= '</ul>'; return $output; } add_shortcode( 'social_profiles', 'celta_social_shortcode' ); /*============================================================ Tabs Shortcodes ============================================================*/ function celta_tabs_shortcode( $atts, $content = null ) { return '<div class="tabs">' . do_shortcode( $content ) . '</div></div>'; } add_shortcode( 'tabs', 'celta_tabs_shortcode' ); function celta_tabsNav_shortcode( $atts, $content = null ) { return '<ul class="tab-nav">' . do_shortcode( $content ) . '</ul><div class="tab-panels">'; } add_shortcode( 'tabsNav', 'celta_tabsNav_shortcode' ); function celta_tabLink_shortcode( $atts, $content = null ) { return '<li><a href="#">' . $content . '</a></li>'; } add_shortcode( 'tabLink', 'celta_tabLink_shortcode' ); function celta_tab_shortcode( $atts, $content = null ) { return '<div>' . do_shortcode( $content ) . '</div>'; } add_shortcode( 'tab', 'celta_tab_shortcode' ); /*============================================================ Pricing Table Shortcodes ============================================================*/ function celta_pricing_shortcode( $atts, $content = null ) { extract( shortcode_atts( array( "color" => '', "title" => '', "price" => '' ), $atts)); $output = '<div class="pricing-column"> <div class="pricing-header"> <div class="pricing-title '.$color.'"> <h3>'.$title.'</h3> </div><!-- end pricing-title --> <div class="price"> <p>'.$price.'</p> </div><!-- end price --> </div><!-- end pricing-header --> '.do_shortcode($content).' </div>'; return $output; } add_shortcode( 'pricing_table', 'celta_pricing_shortcode' ); /*============================================================ Toggle Shortcodes ============================================================*/ function celta_toggle_shortcode( $atts, $content = null ) { return '<div class="toggle-container">' . do_shortcode( $content ) . '</div>'; } add_shortcode( 'toggle', 'celta_toggle_shortcode' ); function celta_toggle_title_shortcode( $atts, $content = null ) { return '<div class="toggle-header"><h4>' . $content . '</h4><a class="toggle-link toggle-open" href="#"></a><div class="clear"></div></div>'; } add_shortcode( 'toggle_title', 'celta_toggle_title_shortcode' ); function celta_toggle_box_shortcode( $atts, $content = null ) { return '<div class="toggle-content">' . do_shortcode( $content ) . '</div>'; } add_shortcode( 'toggle_content', 'celta_toggle_box_shortcode' ); /*============================================================ Content Boxes Shortcodes ============================================================*/ function celta_boxes_shortcode( $atts, $content = null ) { extract( shortcode_atts( array( "color" => '' ), $atts)); return '<div class="'.$color.'-info info-box"> '.do_shortcode($content).' </div>'; } add_shortcode( 'content_box', 'celta_boxes_shortcode' ); /*============================================================ Button Shortcodes ============================================================*/ function celta_button_shortcode( $atts, $content = null ) { extract( shortcode_atts( array( "link" => '' ), $atts)); return '<a class="button" href="'.$link.'">' . do_shortcode( $content ) . '</a>'; } add_shortcode( 'button', 'celta_button_shortcode' ); /*============================================================ Google Maps Shortcode ============================================================*/ function fn_googleMaps($atts, $content = null) { extract(shortcode_atts(array( "width" => '640', "height" => '480', "src" => '' ), $atts)); return '<div id="google-map"><iframe width="'.$width.'" height="'.$height.'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'.$src.'"></iframe></div>'; } add_shortcode("googlemap", "fn_googleMaps"); // Add Shortcodes to Widgets add_filter('widget_text', 'do_shortcode'); ?> And the second one says:
  15. Actually I had switched back to the previous code. Please check now and you'll see that the page isn't opening up.
×
×
  • 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.