Jump to content

Axcelcius

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Axcelcius's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I couldn't figure out the problem completely so I just implemented this: http://garetjax.info/projects/browscap and it worked.
  2. I missed some information. Here is the code: echo $_SERVER['HTTP_USER_AGENT']; $browser = get_browser($_SERVER['HTTP_USER_AGENT'], true); echo "<pre>"; print_r($browser); echo "</pre>"; And here is the result: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12 Array ( [browser_name_regex] => ^.*$ [browser_name_pattern] => * [browser] => Default Browser [css] => 0 [frames] => [iframes] => [tables] => 1 [cookies] => [backgroundsounds] => [vbscript] => [javascript] => [javaapplets] => [activexcontrols] => [cdf] => [aol] => [beta] => [win16] => [crawler] => [stripper] => [wap] => [netclr] => )
  3. When I print out a normal get_browser() this is my result: Array ( [browser_name_regex] => ^.*$ [browser_name_pattern] => * [browser] => Default Browser [css] => 0 [frames] => [iframes] => [tables] => 1 [cookies] => [backgroundsounds] => [vbscript] => [javascript] => [javaapplets] => [activexcontrols] => [cdf] => [aol] => [beta] => [win16] => [crawler] => [stripper] => [wap] => [netclr] => ) How can I fix it so that the browser information is present?
  4. Files in the system folder: - cache.sys.php - ajax.js - rss.php I only want it to include cache.sys.php $system_dir = opendir(ROOT_PATH."system/"); echo ROOT_PATH."system/"; while($system_file = readdir($system_dir)){ if(eregi("[a-zA-z0-9].sys.php$", $system_file)){ include_once "./system/".$system_file; } }
  5. Found the problem. Needed to change CSS from: //Content Box Style .box{ width: 100%; position: relative; border: 1px solid #31519F; } To: /*Content Box Style*/ .box{ width: 100%; position: relative; border: 1px solid #31519F; }
  6. There is something else wrong then. Separate from the rest of the code the previous stuff works fine but with the complete page it does not. Here is the rendering in Firefox and IE (Safari displays the same as FF). Also the .box CSS does not render the border so I am required to add left and right borders where they should all ready be. Any clues? @charset "utf-8"; html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td{ font-weight:inherit; font-style:inherit; font-size:100.01%; font-family:inherit; vertical-align:baseline; outline:0; } body{ background-color: #F6F3EC; background-image: url(./images/background.jpg); background-repeat: repeat-y; background-position: center; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #444444; margin:0; padding:0; border:0; } a:link, a:active, a:visited{ color: #6b8AAB; text-decoration: none; } a:hover{ color: #699945; text-decoration: none; } .container{ margin:0 auto; width: 920px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; } /* Header Styles */ #top_bar{ background-color: #F0F3FB; padding-top: 4px; padding-right: 3px; padding-bottom: 4px; padding-left: 3px; } #header .container{ background-image: url(images/bg_header.jpg); background-repeat: no-repeat; border-top: 1px solid #31519F; border-bottom: 1px solid #31519F; height: 100px; width: 900px; padding-right: 10px; padding-left: 10px; vertical-align: middle; } /*Content Left Styles */ #content_left{ background-color: #DDDDDD; border-right: 1px solid #BBBBBB; border-left: 1px solid #BBBBBB; color: #3A332D; padding: 5px; width: 200px; } #block_box_left .header{ background-color: #F0F3FB; height: 17px; border: 1px solid #BBBBBB; margin: 0px; font-size: 10px; font-weight: bold; color: #5F8BBC; text-decoration: none; line-height: 16px; text-align: center; } #block_box_left .content{ background-color: #FFFFFF; margin-top: 0px; margin-bottom: 5px; border-top: solid 0px #BBBBBB; border-bottom: solid 1px #BBBBBB; border-left: solid 1px #BBBBBB; border-right: solid 1px #BBBBBB; padding: 5px; } #block_box_left ul{ display: block; text-align: left; padding: 0px; list-style-type: none; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; margin-top: 0px; } #block_box_left .category{ text-indent: 0px; text-align: center; } #block_box_left li{ height: 15px; border: 1px solid #BBBBBB; background-color: #FFFFFF; margin-top: 2px; font-size: 10px; text-indent: 18px; line-height: 14px; text-decoration: none; font-weight: bold; } #block_box_left li a:link, #block_box_left li a:active, #block_box_left li a:visited{ background-image: url(./images/nav_left_off.gif); background-repeat: no-repeat; background-position: left center; display: block; color: #6b8AAB; text-decoration: none; font-weight: bold; } #block_box_left li a:hover{ display: block; background-color: #F0F3FB; background-image: url(./images/nav_left_on.gif); background-repeat: no-repeat; background-position: left center; text-decoration: none; color: #699945; font-weight: bold; } /* Content Center Styles */ #content_center_10{ padding: 5px; vertical-align: top; margin: 0px; width: 700px } #content_center_01{ padding: 5px; vertical-align: top; margin: 0px; width: 700px } /* Footer Styles */ #footer{ background-color: #FBD5CC; border-top: 1px solid #31519F; clear: both; } #footer .top_bar{ background-color: #9CB9FD; border-top: 1px solid #FFFFFF; clear: both; padding: 3px; text-align: center; font-weight: bold; } #copyright{ background-color: #F0F3FB; text-align: center; padding-top: 3px; position: absolute; } .block_left{ padding: 3px; float: left; text-align: left; width: 400px; } .block_center{ border-right: 1px dotted #31519F; border-left: 1px dotted #31519F; float: left; text-align: center; padding: 3px; width: 345px; } .block_right{ padding: 3px; float: left; text-align: right; width: 155px; } //Content Box Style .box{ width: 100%; position: relative; border: 1px solid #31519F; } .box .header{ background-color: #9CB9FD; border: 1px solid #31519F; padding: 2px; font-weight: bold; } .box .subheader, .box .comments{ background-color: #F0F3FB; border-bottom: 1px solid #31519F; border-left: 1px solid #31519F; border-right: 1px solid #31519F; padding: 2px; } .box .comments{ clear: both; } .box .content{ border-bottom: 1px solid #31519F; border-left: 1px solid #31519F; border-right: 1px solid #31519F; padding: 2px; height: 100%; } <!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' lang='en' xml:lang='en'><head> <title>My Site | Taking Control of the Web - Homepage</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv='CONTENT-LANGUAGE' content='english-us' /> <link rel='StyleSheet' href='./themes/default/style.css' type='text/css' /> </head><body> <div id="page" class="container"> <div id="header"> <div id="top_bar" style="clear: both;"> <b>Welcome to My Site | Enjoy Your Stay!</b> </div> <div class="container"> <img src="./uploads/images/original/" alt="Taking Control of the Web" title="Taking Control of the Web" border="0" /> </div> </div> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td id="content_left"> <div id="block_box_left"> <div class="header">Navigation</div> <div class="content"> <ul><li class="category">General</li><li><a href='index.php?what=news'>News / Updates</a></li> <li><a href='index.php?what=archives'>News Archives</a></li> </ul> </div> </div> <div> </div> </td> <td id="content_center_10" > 1200611565 <div id="news_article_2" class="box"> <div class="header">News Story Post #2</div> <div class="subheader">5:43PM Thursday, January 17, 2008 | Posted by | </div> <div class="content"><a href="index.php?what=news&category=1"> <img src="./uploads/images/original/site_news.gif" alt="Site News" align="left" border="0" /></a> Eos cu consul timeam oportere, omnium sanctus verterem ut eos. Te mel regione labitur theophrastus, an vim nihil ancillae, ut duo idque propriae. Ad possim erroribus voluptaria eum, ut vim dicit suavitate assentior. Sit exerci tempor ne, an altera perpetua explicari eum. Ad vim vocent accumsan.<br /> <br /> Ex vis lucilius convenire, quidam saperet duo te, ex qui scripta feugiat. Percipit definiebas ne mei. Sed vero eirmod cu, cu facilis officiis has, ea eos dicat altera. Quod lobortis no sit. Menandri volutpat et pri, omnium doctus ea cum.<br /> <br /> Et solum delenit vim. An equidem suavitate tincidunt vel, at altera fastidii mei. Te per scripserit repudiandae, voluptaria comprehensam usu ne. Vel inani atomorum ne, ut mel dicam urbanitas. Harum paulo mei te, postea invidunt disputando at sit, ea cibo quas mei. Aliquyam takimata ex sit. In mundi probatus mea.<br /> <br /> An soleat copiosae vix, ius et etiam aeque graece. Id vel tota etiam inimicus, ex per timeam atomorum. Eos id error sadipscing. Paulo tritani ne nec, est hinc dicta animal ea, zzril graece conclusionemque eam ne. Utinam prompta deserunt et sed, dicat suscipit suavitate duo an.<br /> <br /> Eos id altera inciderint, propriae sententiae argumentum per ad. Has in nulla petentium, eum semper referrentur cu. Usu ne quod detracto, autem impedit deseruisse no has, eam commodo pertinax scripserit no. Ferri choro feugiat at vim, cum an essent eligendi nominati.<br /> <br /> Ex eam quem iuvaret maluisset. Hinc invenire concludaturque ius id. Qui no sapientem persequeris, justo nonummy pri te. Vis ex audire pericula temporibus, ludus choro liberavisse an duo. Causae mentitum vis ad, ex nec mentitum patrioque iracundia, eum clita sanctus cu. Simul patrioque cu ius, tota verear ut eos, denique officiis sit cu.<br /> <br /> Lucilius sapientem his cu, mea eruditi detraxit principes no. Aliquip labitur epicurei id est, choro facilisi nec in. In sumo sapientem vix, eu nam utinam lobortis. In mel vidit impedit, graeco partiendo ius ei. Affert ridens gloriatur no sea, pri an audire tritani alienum. Per ea dissentias scribentur.<br /> <br /> Diceret delectus ius ad, facer voluptaria his ad, pro no denique consequat. Mel adhuc repudiandae te, an aliquyam deterruisset vel. Ex tale saepe vis, ei nec offendit repudiare. Vide nemore mandamus sit ut, sed no iisque accommodare, vide legendos nam eu. Mei soleat patrioque efficiantur ei, vim no sonet utinam, cu rebum facilis consulatu est.<br /> <br /> Eu perpetua voluptatibus mel. Ut ius falli congue pertinacia, nam vituperatoribus appareat putent in. Vix diceret philosophia et. Vis tantas concludaturque ei, no saperet corpora sed. Has congue delicata persequeris ne, ut ipsum velit inciderint sea. Te melius detracto similique pri, mei eius dolore patrioque ad.<br /> <br /> Qui no scripta voluptatum, et paulo adipisci mei, assum verear impedit ei vel. Vis ad veritus instructior concludaturque. Cum ut ferri definiebas interesset. Mel wisi prompta accumsan ne. Qui reque sapientem similique at, modo aeque lobortis ad duo. Nusquam accusamus vix ut, nam ea alterum partiendo.<br /> </div> <div class="comments">Comments (0) | </div> </div><br /> <div id="news_article_1" class="box"> <div class="header">News Story Post #1</div> <div class="subheader">5:38PM Thursday, January 17, 2008 | Posted by | </div> <div class="content"><a href="index.php?what=news&category=1"> <img src="./uploads/images/original/site_news.gif" alt="Site News" align="left" border="0" /></a> Eos cu consul timeam oportere, omnium sanctus verterem ut eos. Te mel regione labitur theophrastus, an vim nihil ancillae, ut duo idque propriae.</div> <div class="comments">Comments (0) | </div> </div><br /> </td> </tr> </table> <div id="footer"> <div class="top_bar"> </div> <div id="copyright"> <span class="block_left"> <b>© 2004-2008 . All Rights Reserved.</b><br /> </span> <span class="block_center"> All logos and trademarks are property of their respective owners. All posts are property of their poster. All other content © 2008 by My Site. </span> <div class="block_right"> </div> </div> </div> </div> </body></html>
  7. I have a layout for a news post that I am working. The image in the body of the message takes up more height than the text and as a result the image overlays the div right under it. (I am aware that the image is missing in the example. But the concept is still valid.) Plus I have tested in Firefox, IE, and Safari. Any suggestions? <div id="news_article_4" class="box"> <div class="header">All Around</div> <div class="subheader">10:56PM Monday, January 14, 2008 | Posted by Jhon | </div> <div class="content"><a href="index.php?what=news&category="> <img src="./uploads/images/original/" alt="" align="left" border="0" /></a> Iasldfgjasjkvbhjabvjhb ks dfhsadh fkjsadkjlhksdhfkjashdkj faksdhf khfk hasjk jksjkfhdsa jkasjkdfa</div> <div class="subheader">Comments (0) | </div> </div><br /> //Content Box Style .box{ width: 100%; position: relative; } .box .header{ background-color: #9CB9FD; border: 1px solid #31519F; padding: 2px; font-weight: bold; } .box .subheader{ background-color: #F0F3FB; border-bottom: 1px solid #31519F; border-left: 1px solid #31519F; border-right: 1px solid #31519F; padding: 2px; } .box .content{ border-bottom: 1px solid #31519F; border-left: 1px solid #31519F; border-right: 1px solid #31519F; padding: 2px; height: 100%; }
  8. I just need to know the purpose and how to structure the '?' and ':' in PHP. I have run across a few functions that utilize them in what looks to be IF ELSE statements but I don't quite understand how to use them.
  9. I have a little bit of a problem. I need to make information selected in "content_container" from AJAX to control "next_button" to be disabled. If that makes sense. <div id="middle_container" style="background:url(images/body_background.gif) repeat-y #CCCCCC; width: 100%; float: left; clear: both;"> <div id="content_container"> <div style="float: left; clear: right; margin-top: 5px;"><img src="./images/installer.gif" alt="" title="" /></div> <div id="content_header" style="float: left; clear: right;"> Thank you for choosing <b><span style="color: #000000">PHP</span><span style="color: #990000">Katalyst</span></b></div> <hr /> <div id="page_errors"></div> <div id="content_layer"> </div> <div style="clear: both;" align="center"> <input id="back_button" class="hidden" type="button" value="Back" onclick="get_page(-1);" /> <input id="check_again" class="hidden" type="button" value="Check Again" onclick="get_page(0);" /> <input id="next_button" type="button" value="Begin Install" onClick="process_page();" /></div> </div> </div> </body> </html>
  10. Here is my code: var page_current = 0; var page_request = false; var page_information = Array(); if(window.XMLHttpRequest){ page_request = new XMLHttpRequest(); }else if (window.ActiveXObject){ try{ page_request = new ActiveXObject("Msxml2.XMLHTTP"); }catch(e){ try{ page_request = new ActiveXObject("Microsoft.XMLHTTP"); }catch(e){} } } function process_page(){ page_current = parseInt(page_current); if(page_information[page_current][5] == 0){ get_page(1); }else{ page_request.open('get', './sources/' + page_information[page_current][5]); page_request.onreadystatechange = function(){ if(page_request.readyState == 4 && page_request.status == 200){ if(page_request.responseText == 1){ document.getElementById("page_errors").innerHTML = null; get_page(1); }else{ document.getElementById("page_errors").innerHTML = page_request.responseText; } } } page_request.send(null); } } function get_page(dir){ page_request.open('get', './sources/' + page_information[page_current][4]); page_request.onreadystatechange = function(){ if(page_request.readyState == 4 && page_request.status == 200){ document.getElementById("menu_item_" + page_current).className = "process_inactive"; page_current = page_current + dir; document.getElementById("menu_item_" + page_current).className = "process_active"; document.getElementById("progress").style.width = ((page_current) / page_information.length * 100) + "%"; document.getElementById("content_header").innerHTML = page_information[page_current][1]; document.getElementById("page_errors").innerHTML = null; document.getElementById("content_layer").innerHTML = page_request.responseText; if(page_information[page_current][3] == 0){ document.getElementById("check_again").className = "hidden"; }else{ document.getElementById("check_again").className = "visible"; } document.getElementById("next_button").value = page_information[page_current][2]; } } page_request.send(null); } What's supposed to happen is when get_page(0) is called to the div content reloads. The problem is that it does not. I don't have any other problems other than that.
  11. I have two files. index.html and system_check.php. I was using the following code to prevent hackers from accessing system_check.php directly. The problem is that it also prevents index.html from accessing that file. <?php //Protects from Unauthorized Access if(eregi("system_check.php", $_SERVER['PHP_SELF'])) die("Hacking Attempt"); ?> Is there an alternate way of denying direct access to system_check.php but will allow index.html to access it?
  12. It will be in PHP. The goal is to use PHP to automatically add and delete URLs in the sitemap.
  13. I am trying to work with a sitemap and be able to add and delete URLs. So I need to be able to search out URL sections like below using the URL link as the identifier for the section of code. What expression would I use to find the bottom section of code in the sitemap? It would have to match the URL exactly. <url> <loc>http://www.example.com/catalog?item=73&desc=vacation_new_zealand</loc> <lastmod>2004-12-23</lastmod> <changefreq>weekly</changefreq> </url> sitemap.xml <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>http://www.example.com/</loc> <lastmod>2005-01-01</lastmod> <changefreq>monthly</changefreq> <priority>0.8</priority> </url> <url> <loc>http://www.example.com/catalog?item=12&desc=vacation_hawaii</loc> <changefreq>weekly</changefreq> </url> <url> <loc>http://www.example.com/catalog?item=73&desc=vacation_new_zealand</loc> <lastmod>2004-12-23</lastmod> <changefreq>weekly</changefreq> </url> <url> <loc>http://www.example.com/catalog?item=74&desc=vacation_newfoundland</loc> <lastmod>2004-12-23T18:00:15+00:00</lastmod> <priority>0.3</priority> </url> <url> <loc>http://www.example.com/catalog?item=83&desc=vacation_usa</loc> <lastmod>2004-11-23</lastmod> </url> </urlset>
×
×
  • 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.