Jump to content

craigbruiners

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

craigbruiners's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Can Anybody Help me please, please Thanks in advance
  2. Anybody there????? Please guys i really need help here. Im on bended knees here. Thanks again ??? ???
  3. Any solution or do u need more detail????
  4. Well im testing it the whole time and ran out of ideas of how to make this thing to work, coz my one friend in France is testing and when he goes to the website it brings back the english number $lg_id = "UA-1436977-1" instead of the french number $lg_id = "UA-1436987-1", so how do i go from here, coz i've came to this point where im stuck and feel so stupid(then i ask myself what am i doing in programming).
  5. So will the code work with the cookies file? Thanks again
  6. Well i just wanted you to check if there was any syntax error in the code, seeing that it doesn't wanna work, and seeing that you said that the code is fine, thanks alot for that hey, and thanks alot for ur reply, really appreciated. This is where we set the language in the cookie. This is the code for the cookies: <? /* Script to run at starup */ /* Detecting browser's default language */ if (!isset($_COOKIE['visitor_language'])) { $BrowserLang = substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2); switch($BrowserLang) { case "en": $_SESSION['DEFAULT_LANG'] = "en"; break; case "fr": $_SESSION['DEFAULT_LANG'] = "fr"; break; case "de": $_SESSION['DEFAULT_LANG'] = "de"; break; case "nl": $_SESSION['DEFAULT_LANG'] = "nl"; break; case "es": $_SESSION['DEFAULT_LANG'] = "es"; break; } } /* Set Default site language region */ if (!isset($_COOKIE['visitor_language'])) { if (getenv('HTTP_X_FORWARDED_FOR')) { $visitor_ip = getenv('HTTP_X_FORWARDED_FOR'); } else { $visitor_ip = getenv('REMOTE_ADDR'); } $VisitorInfo = file('http://api.hostip.info/get_html.php?ip='. $visitor_ip .'&position=true'); if($VisitorInfo != "") { $VisitorRegion = substr($VisitorInfo[0], -4, 2); switch($VisitorRegion) { case "FR": $_SESSION['DEFAULT_LANG'] = "fr"; break; case "DE": $_SESSION['DEFAULT_LANG'] = "de"; break; case "NL": $_SESSION['DEFAULT_LANG'] = "nl"; break; case "ES": $_SESSION['DEFAULT_LANG'] = "es"; break; } } } /* Register default language in cookie */ $time = time(); if (isset($_COOKIE['visitor_language'])) { $_SESSION['DEFAULT_LANG'] = $_COOKIE['visitor_language']; setcookie ("visitor_language",$_SESSION['DEFAULT_LANG'], $time+(60 * 60 * 24 * 60)); } else { $visitor_lang_pref = $_SESSION['DEFAULT_LANG']; setcookie ("visitor_language",$visitor_lang_pref, $time+(60 * 60 * 24 * 60)); } ?> Hope this will give u more detail, thanks again.
  7. Can anybody help me with this please?? Will really appreciate it. Thanks in advance.
  8. <? if ($COOKIE['visitor_language']== "en") { $lg_id = "UA-1436977-1"; } elseif ($COOKIE['visitor_language']== "fr") { $lg_id = "UA-1436987-1"; } elseif ($COOKIE['visitor_language']== "de") { $lg_id = "UA-1436993-1"; } elseif ($COOKIE['visitor_language']== "nl") { $lg_id = "UA-1436998-1"; } else { $lg_id = "UA-1437004-1"; } ?> <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "<?=$lg_id?>"; urchinTracker(); </script> It goes through this code once the user comes into the site from the different countries.
  9. No matter if i put it as ASC or DESC nothing happens, it just displays it the way it wants to from the database, is there anything else i could maybe do maybe coz i get this feeling that im confusing myself now :D ;D
  10. Yes i do want that order but the code doesnt order it in a alphabetical way. Coz if i put in that "order by" code it doesnt do anything, so how do i get it to display the documents in a alphabetical way
  11. doc_title contains just the names of different documents. The original code is: $tech = " select d.doc_id, d.doctype_id, d.doc_summary, d.doc_title, p.dpdf_name, doc.doctype_title, doc.doctype_img, doc.doctype_img_alt, d.doc_textversion from doctype doc,document d left join pdf p on d.dpdf_id = p.dpdf_id where d.doc_id='".base64_decode($_GET['id'])."' and d.doctype_id=doc.doctype_id"; But i want it to display the documents in alphabetical order, so i added the order by like this: $tech = " select d.doc_id, d.doctype_id, d.doc_summary, d.doc_title, p.dpdf_name, doc.doctype_title, doc.doctype_img, doc.doctype_img_alt, d.doc_textversion from doctype doc,document d left join pdf p on d.dpdf_id = p.dpdf_id where d.doc_id='".base64_decode($_GET['id'])."' and d.doctype_id=doc.doctype_id order by d.doc_title asc"; So i added the "order by d.doc_title asc" coz i want it in alphabetical order. Thanks again for your assistance, still new to all this
  12. What comma Do u mean? I would like the details to display in alphabetical order eg. Aby, Andy, Bettie, Zero etc. Because at the moment its Andy, Bettie, Zero, Aby. It displays the details in any way. Thanks for ur trouble
  13. This is the query: $tech = " select d.doc_id, d.doctype_id, d.doc_summary, d.doc_title, p.dpdf_name, doc.doctype_title, doc.doctype_img, doc.doctype_img_alt, d.doc_textversion from doctype doc,document d left join pdf p on d.dpdf_id = p.dpdf_id where d.doc_id='".base64_decode($_GET['id'])."' and d.doctype_id=doc.doctype_id order by d.doc_title asc"; Because at the moment it displays the results in any order. Thanks in advance.
  14. This is the query: $tech = " select d.doc_id, d.doctype_id, d.doc_summary, d.doc_title, p.dpdf_name, doc.doctype_title, doc.doctype_img, doc.doctype_img_alt, d.doc_textversion from doctype doc,document d left join pdf p on d.dpdf_id = p.dpdf_id where d.doc_id='".base64_decode($_GET['id'])."' and d.doctype_id=doc.doctype_id order by d.doc_title asc"; Because at the moment it displays the results in any order. Thanks in advance.
  15. [!--quoteo(post=385625:date=Jun 19 2006, 08:18 AM:name=SemiApocalyptic)--][div class=\'quotetop\']QUOTE(SemiApocalyptic @ Jun 19 2006, 08:18 AM) [snapback]385625[/snapback][/div][div class=\'quotemain\'][!--quotec--] I think you missunderstood me. How is PHP supposed to know if a file is not needed? Are you comparing the files in a directory to a list of files that are not needed, comparing to database enteries, or something else? [/quote] I want to compare it to database enteries.
×
×
  • 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.