Jump to content

eaglelegend

Members
  • Posts

    353
  • Joined

  • Last visited

    Never

Everything posted by eaglelegend

  1. Ok I have been trying to while fix a couple of bugs on a website, however after a number of weeks searching forums after forums, books and all, I have come to the conclusion I am unable to fix it, myself anyhow, I hope someone can help me fix is, thanks in advance. Heres the problem, I go onto one of the pages this one is about.php and this is what is showing up; Now the strange thing is, ioncube_loader and all additional files are there. If you need any code, feel free to ask Regards, Mark
  2. Hi, I hope you guys can help me, I have just got a reseller account with a company, and their control panel can be intergrated with another template, but I just cant work it out, I would be thankful if you can help, thanks in advance Here is the template I am trying to intergrate; <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>title</title> <link rel="stylesheet" href="css/core.css" type="text/css" /> <!--[if lte IE 6]> <link rel="stylesheet" href="css/core-ie6.css" type="text/css" /> <![endif]--> <!--[if lte IE 7]> <link rel="stylesheet" href="css/core-ie7.css" type="text/css" /> <![endif]--> <link rel="stylesheet" href="css/orange.css" type="text/css" /> <script type="text/javascript" src="js/jquery-1.2.6.min.js"></script> <script type="text/javascript" src="js/superfish.js"></script> <script type="text/javascript" src="js/jquery.flow.1.2.js"></script> <script type="text/javascript" src="js/custom.js"></script> </head> <body> <!-- wrapper, adds curve background images --> <div id="wrapper"> <div class="inner-wrapper"> <div class="header clear"> <!-- START SUBSCRIPTION OPTIONS --> <div class="subscribe"> <p>Subscribe via <a href="#">RSS</a> | <a href="#">Email</a> | <a href="#">Twitter</a></p> </div> <!-- START HEADER --> <h1><img src="/images/logo.png" width="172" height="59" alt="Dunoon Logo" /></h1> <h2>a markrichardson.IT company</h2> <!-- END HEADER --> </div> <div class="menu"> <div class="menu-inside"> <ul class="sf-menu clear"> <!-- MENU --> <li class="current firstitem"><a href="index.html">Home</a></li> <li><a href="examples.html">Examples</a></li> <li><a href="#">Products</a> <ul> <li><a href="#">Web templates</a> <ul> <li><a href="http://themeforest.net/item/ripped-blue/39252?ref=spykawg">Ripped blue</a></li> <li><a href="http://themeforest.net/item/olympus-multicolor/43212?ref=spykawg">Olympus multicolor</a> <ul> <li><a href="http://themeforest.net/item/simplecorp/53756?ref=spykawg">Buy</a></li> <li><a href="http://themeforest.net/item/simplecorp/53756?ref=spykawg">Preview</a></li> </ul></li> <li><a href="http://themeforest.net/item/simplecorp/53756">SimpleCorp</a> <ul> <li><a href="http://themeforest.net/item/simplecorp/53756?ref=spykawg">Buy</a></li> <li><a href="http://themeforest.net/item/simplecorp/53756?ref=spykawg">Preview</a></li> </ul> </li> </ul> </li> <li><a href="#">PHP scripts</a> <ul> <li><a href="http://themeforest.net/item/php-users-online-counter/57062?ref=spykawg">Users online counter</a></li> </ul> </li> <li><a href="#">Speciality Pages</a> <ul> <li><a href="http://themeforest.net/item/powerful-errors-phpajax-error-template/55303?ref=spykawg">PHP/Ajax error page</a></li> <li><a href="http://themeforest.net/item/ajax-launch-page/55421?ref=spykawg">Ajax launch page</a></li> </ul> </li> </ul> </li> <li><a href="portfolio.html">Portfolio</a></li> <li><a href="#">Solutions</a></li> <li><a href="#">Support</a> <ul> <li><a href="#">Support forum</a> <ul> <li><a href="#">Support forum</a></li> <li><a href="#">Knowledgebase</a></li> <li><a href="#">FAQ</a></li> <li><a href="#">Tutorials</a></li> </ul> </li> <li><a href="#">Knowledgebase</a></li> <li><a href="#">FAQ</a></li> <li><a href="#">Tutorials</a></li> </ul> </li> <li><a href="terms.html">Terms</a></li> <li class="lastitem"><a href="contact.html">Contact</a></li> <!-- END MENU --> </ul> </div> </div> <!-- START: FRONT PAGE SLIDER --> <div id="slides-wrapper"> <div class="shadow"> <div id="slides-container"> <div id="slides"> <!-- EDIT FROM HERE: --> <!-- START SLIDE #1 --> <div> <div class="slide-image"><img src="images/slide-1.png" alt="Slide #1 image" /></div> <div class="slide-text"> <h2>Curabitur at metus</h2> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque venenatis sagittis enim. Maecenas ligula erat, egestas congue, varius nec, sagittis nec, purus. In neque. Curabitur at metus tincidunt dui tristique molestie. Donec porta molestie tortor. Fusce euismod consectetuer sapien. Fusce ac velit.</p> </div> </div> <!-- END SLIDE #1 --> <!-- START SLIDE #2 --> <div> <div class="slide-image"><img src="images/slide-2.png" alt="Slide #2 image" /></div> <div class="slide-text"> <h2><a href="#">Donec porta molestie tortor</a></h2> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque venenatis sagittis enim. Maecenas ligula erat, egestas congue, varius nec, sagittis nec, purus. In neque. Curabitur at metus tincidunt dui tristique molestie. Donec porta molestie tortor. Fusce euismod consectetuer sapien. Fusce ac velit.</p> </div> </div> <!-- END SLIDE #2 --> <!-- START SLIDE #3 --> <div> <div class="slide-image"><img src="images/slide-3.png" alt="Slide #3 image" /></div> <div class="slide-text"> <h2>In neque</h2> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque venenatis sagittis enim. Maecenas ligula erat, egestas congue, varius nec, sagittis nec, purus. In neque. Curabitur at metus tincidunt dui tristique molestie. Donec porta molestie tortor. Fusce euismod consectetuer sapien. Fusce ac velit.</p> </div> </div> <!-- END SLIDE #3 --> <!-- STOP SLIDE EDITING --> </div> <div class="controls"><span class="jFlowNext"><span>Next</span></span><span class="jFlowPrev"><span>Prev</span></span></div> <div id="slider-nav"> <div class="slider-nav-inside"> <div id="myController"> <div class="clear slider-controls"> <!-- ####################### ####################### IMPORTANT ###################### You need to copy and paste the below <span> tag with class jFlowControl for each slide you add. --> <span class="jFlowControl"></span> <span class="jFlowControl"></span> <span class="jFlowControl"></span> </div> </div> </div> </div> </div> </div> </div> <!-- START BODY --> <div class="clear body body-fp"> <div class="column column-280 left"> <h3>What we do</h3> <ul class="servicelist"> <li class="search-icon">In interdum, leo mollis blandit feugiat, ipsum risus luctus odio.</li> <li class="chart-icon">Pellentesque venenatis sagittis enim. Maecenas ligula erat.</li> <li class="user-icon">Praesent sollicitudin molestie semper. Nulla facilisi.</li> </ul> </div> <div class="column column-280 inner"> <h3>About us</h3> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse diam nulla, dignissim tempor sodales quis, dapibus a felis. Etiam gravida orci eget ligula dapibus convallis. Ut sollicitudin molestie tortor id aliquam. Praesent sollicitudin molestie semper. Nulla facilisi. </p> <p>Curabitur at metus tincidunt dui tristique molestie. Donec porta molestie tortor. Fusce euismod consectetuer sapien. Fusce ac velit.</p> </div> <div class="column column-280 right"> <h3>Latest news</h3> <ul class="newslist"> <li> <a href="#">Lorem ipsum dolor sit amet</a> <span>03.09.09</span> </li> <li class="alt"> <a href="#">Trconsectetur adipiscing elit</a> <span>31.08.09</span> </li> <li> <a href="#">Suspendisse diam nulla</a> <span>08.06.09</span> </li> <li class="alt"> <a href="#">Dapibus a felis. Etiam gravida</a> <span>23.05.09</span> </li> <li> <a href="#">Ut sollicitudin molestie tortor id</a> <span>15.02.09</span> </li> <li class="alt"> <a href="#">Praesent sollicitudin molestie</a> <span>01.01.09</span> </li> <li> <a href="#">Nulla facilisi.</a> <span>15.12.08</span> </li> </ul> </div> </div> </div> <div id="footer" class="clear"> <p class="left">© 2010. All rights reserved | Valid <a title="valid XHTML strict" href="http://validator.w3.org/check/referer">XHTML</a> and <a title="CSS" href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a> </p> <p class="right"><a href="#">Terms of use</a> | <a href="#">Privacy policy</a> | <a href="#">Contact us</a></p> </div> </div> </body> </html> And here is the sample they provide; <div id='all'> <div id='header-block'> <div id="wrapper"> <div id='banner-bg'> <div id='top-text-block'> <div id="cp-name-holder"> <span id='cp-name-block' class='cp-name-here'></span> </div> <div id='top-link-block'> <a id='home-link' href='/'>Home</a> <span class='header-splitter'> | </span> <a id='logout-link' href='/expired.cgi?logout=1'>Log Out</a> <span id='help-block'> <span class='header-splitter'> | </span> <a id='help-link' href='/support.cgi'>Help</a></span> <span class='header-splitter'> | </span> <a target='_blank' id='managing-domain-name'></a> </div> <div id="translation-holder"> <div id="google_translate_element"></div> <script> if(google_translate == 1) { function googleTranslateElementInit() { function inner() { new google.translate.TranslateElement({ pageLanguage: 'en' }, 'google_translate_element'); } // Internet Explorer needs this second check. if(google_translate == 1) { setTimeout(inner, 0); } } } else { // Move the links over to the right. document.getElementById('top-link-block').style.marginRight = '15px'; } </script> <script src="/secure-proxy.cgi?file=GoogleTranslateElement"></script> </div> </div> </div> </div><!-- wrapper --> </div> <script type="text/javascript"> var broken_windows_browser = 0; if(navigator.userAgent.toLowerCase().indexOf("msie")>=0) broken_windows_browser = 1; var interval_id = setInterval('watch_for_close()', 500); if(google_translate == 1) { setTimeout('find_dropdown()', 1000); } var translation_seen = 0; var updated_on_close = 0; function find_dropdown() { if(document.getElementById(':0.targetLanguage')) { var lang_dropdown = document.getElementById(':0.targetLanguage').firstChild; lang_dropdown.onchange = function() { translation_seen = 1; var lang = lang_dropdown.value; update_language(lang); }; } } function is_superuser() { if(get_cookie('dc')) { return 1; } else { return 0; } } function get_cookie(cookie_name) { var results = document.cookie.match('(^| ?' + cookie_name + '=([^;]*)(;|$)'); if (results) { return(unescape(results[2])); } else { return null; } } function watch_for_close() { try { var iframe = document.getElementById(':1.container'); var iframe_holder = iframe.parentNode; } catch(e) { return; } if(iframe_holder.style.display != 'none') { translation_seen = 1; } else { if(translation_seen && updated_on_close == 0) { updated_on_close = 1; update_language('none'); } } } function update_language(language) { var xmlhttp; if(broken_windows_browser) { xmlhttp = new ActiveXObject("MsXml2.XmlHttp"); } else { xmlhttp = new XMLHttpRequest(); } var query_string = "superuser=" + is_superuser() + "&lang=" + language; xmlhttp.open("POST", "update_language.cgi", true); xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.setRequestHeader("Content-length", query_string.length); xmlhttp.setRequestHeader("Connection", "close"); xmlhttp.send(query_string); } function set_page_language() { if(document.getElementById(':1.container')) { return; } var xmlhttp; if(broken_windows_browser) { xmlhttp = new ActiveXObject("MsXml2.XmlHttp"); } else { xmlhttp = new XMLHttpRequest(); } var query_string = "superuser=" + is_superuser(); var location = "" + document.location; xmlhttp.onreadystatechange = function() { if(xmlhttp.readyState == 4) { var language = xmlhttp.responseText; if(language != '0') { update_language(language); var separator = '?'; if(location.match(/\?/)) { separator = '&'; } if(!location.match(/googtrans/i)) { document.location = document.location + separator + 'translate=1#googtrans/en/' + language; } } } }; if(!location.match(/login\.cgi/) && google_translate) { xmlhttp.open("POST", "get_language.cgi", true); xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.setRequestHeader("Content-length", query_string.length); xmlhttp.setRequestHeader("Connection", "close"); xmlhttp.send(query_string); } } setTimeout('set_page_language()', 1000); </script> <div id='body-block'> [bODY]</div> <!-- footer --> </div>
  3. Thanks again simshaun, you have been brilliant, now I think thats all I need for a little while lol
  4. Hi, I am using Cutenews for my articles and such, now I tried intergrating it onto one of my pages, the strange thing is that the articles are not showing up, yet if I go to the url on the script, the articles show, but for some reason they are not showing on my index.php page, have a look and please help if you can... <?php $page = 'index'; $content=<<<EOF <h2>Header</h2> <p>Paragraph</p> <?php include("articles/show_news.php"); ?> <br /> <br /> EOF; include_once ( 'template.php' ); Edit: My index page is seperate from the rest of the cutenews program.
  5. Thanks simshaun - I reread your first post and worked it out for myself, for the rest of the code I mean, it is now working thanks to you!
  6. Simshaun, I pasted this code where i copied the "sample" code earlier, into the full code, and the error changed to; Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in contact.php on line 65
  7. Same error, I tried changing the other one you mentioned but same error, so heres the full code, I dont believe it is over 300 lines though. <?php session_name("fancyform"); session_start(); $_SESSION['n1'] = rand(1,20); $_SESSION['n2'] = rand(1,20); $_SESSION['expect'] = $_SESSION['n1']+$_SESSION['n2']; $str=''; if($_SESSION['errStr']) { $str='<div class="error">'.$_SESSION['errStr'].'</div>'; unset($_SESSION['errStr']); } $success=''; if($_SESSION['sent']) { $success='<h1>Thank you!</h1>'; $css='<style type="text/css">#contact-form{display:none;}</style>'; unset($_SESSION['sent']); } $page = 'contact'; $content=<<<EOF <div id="main-container"> <div id="form-container"> <h1>Contact Form</h1> <h2>Why not drop us a line and we will get back to you!</h2> <form id="contact-form" name="contact-form" method="post" action="submit.php"> <table width="100%" border="0" cellspacing="0" cellpadding="5"> <tr> <td width="15%"><label for="name">Name</label></td> <td width="70%"><input type="text" class="validate[required,custom[onlyLetter]]" name="name" id="name" value="<?php echo $_SESSION['post']['name']; ?>" /></td> <td width="15%" id="errOffset"> </td> </tr> <tr> <td><label for="email">Email</label></td> <td><input type="text" class="validate[required,custom[email]]" name="email" id="email" value="<?=$_SESSION['post']['email']?>" /></td> <td> </td> </tr> <tr> <td><label for="subject">Subject</label></td> <td><select name="subject" id="subject"> <option value="" selected="selected"> - Choose -</option> <option value="Question">Question</option> <option value="Business proposal">Business proposal</option> <option value="Advertisement">Advertising</option> <option value="Complaint">Complaint</option> </select> </td> <td> </td> </tr> <tr> <td valign="top"><label for="message">Message</label></td> <td><textarea name="message" id="message" class="validate[required]" cols="35" rows="5"><?=$_SESSION['post']['message']?></textarea></td> <td valign="top"> </td> </tr> <tr> <td><label for="captcha"><?=$_SESSION['n1']?> + <?=$_SESSION['n2']?> =</label></td> <td><input type="text" class="validate[required,custom[onlyNumber]]" name="captcha" id="captcha" /></td> <td valign="top"> </td> </tr> <tr> <td valign="top"> </td> <td colspan="2"><input type="submit" name="button" id="button" value="Submit" /> <input type="reset" name="button2" id="button2" value="Reset" /> <?=$str?> <img id="loading" src="/img/ajax-load.gif" width="16" height="16" alt="loading" /></td> </tr> </table> </form> <?=$success?> </div> </div> <br /> <br /> EOF; include_once ( 'template.php' ); ?>
  8. Thanks, but still not working :/ :'( any Ideas?
  9. Hi, sorry guys, I have come accross an error on my site and I am unsure qhats causing it, this is the error Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in contact.php on line 44 This is everything from line 1 to 50; <?php session_name("fancyform"); session_start(); $_SESSION['n1'] = rand(1,20); $_SESSION['n2'] = rand(1,20); $_SESSION['expect'] = $_SESSION['n1']+$_SESSION['n2']; $str=''; if($_SESSION['errStr']) { $str='<div class="error">'.$_SESSION['errStr'].'</div>'; unset($_SESSION['errStr']); } $success=''; if($_SESSION['sent']) { $success='<h1>Thank you!</h1>'; $css='<style type="text/css">#contact-form{display:none;}</style>'; unset($_SESSION['sent']); } $page = 'contact'; $content=<<<EOF <div id="main-container"> <div id="form-container"> <h1>Contact Form</h1> <h2>Why not drop us a line and we will get back to you!</h2> <form id="contact-form" name="contact-form" method="post" action="submit.php"> <table width="100%" border="0" cellspacing="0" cellpadding="5"> <tr> <td width="15%"><label for="name">Name</label></td> <td width="70%"><input type="text" class="validate[required,custom[onlyLetter]]" name="name" id="name" value="<?=$_SESSION['post']['name']?>" /></td> <td width="15%" id="errOffset"> </td> </tr> <tr> <td><label for="email">Email</label></td> <td><input type="text" class="validate[required,custom[email]]" name="email" id="email" value="<?=$_SESSION['post']['email']?>" /></td> <td> </td>
  10. Thank you mattal999!, your a star, it now works, the code that is...
  11. I accidentally left the path in there which I felt was a security risk waiting to happen, I contacted Gimzola to take that out, and he did exactly that, as I couldnt :/. I am still trying to figure out why this parse error is showing up :/
  12. Cheers Gimzola!! Any ideas for this Parse error?
  13. Hi I am getting fed up with this error, as I cannot figure out the issue :/ Parse error: syntax error, unexpected T_VARIABLE in /home/webredev/public_html/...../jump_page.php on line 1 however the only thing on line 1 is <?php right?? note it is only this page. <?php $uri->name(array("id")); $id = stripinput($_URI['id']); if ($id == "new") { switch($_REQUEST['state']) { default: { $renderer->assign('id',$id); $renderer->display('admin/settings/jump_page_new.tpl'); break; } // end default case 'process': { $JUMP = array( 'page_title' => $_POST['jump']['page_title'], 'page_html_title' => $_POST['jump']['page_html_title'], 'layout_type' => $_POST['jump']['layout_type'], 'page_slug' => $_POST['jump']['page_slug'], 'access_level' => $_POST['jump']['access_level'], 'restricted_permission_api_name' => $_POST['jump']['restricted_permission_api_name'], 'php_script' => $_POST['jump']['php_script'], 'include_tinymce' => $_POST['jump']['include_tinymce'], 'active' => $_POST['jump']['active'], ); // Create an user and set some base attrs. $jump_edit = new JumpPage($db); $jump_edit->setPageTitle($JUMP['page_title']); $jump_edit->setPageHtmlTitle($JUMP['page_html_title']); $jump_edit->setLayoutType($JUMP['layout_type']); $jump_edit->setPageSlug($JUMP['page_slug']); $jump_edit->setAccessLevel($JUMP['access_level']); $jump_edit->setRestrictedPermissionApiName($JUMP['restricted_permission_api_name']); $jump_edit->setPhpScript($JUMP['php_script']); $jump_edit->setIncludeTinymce($JUMP['include_tinymce']); $jump_edit->setActive($JUMP['active']); $jump_edit->save(); redirect('admin-jump'); break; } // end process } // end switch } else { if ($id == null) { $JUMP_PAGE_LIST = array(); $jump_page2 = new JumpPage($db); $jump_page2 = $jump_page2->findBy(array()); foreach($jump_page2 as $jump_list) { $JUMP_PAGE_LIST[] = array( 'id' => $jump_list->getJumpPageId(), 'page_title' => $jump_list->getPageTitle(), ); } // end user list $renderer->assign('jump_list',$JUMP_PAGE_LIST); $renderer->assign('jump_available',(bool)sizeof($JUMP_PAGE_LIST)); $renderer->display('admin/settings/jump_page_list.tpl'); } else { switch($_REQUEST['state']) { default: { $jump_page2 = new JumpPage($db); $jump_page2 = $jump_page2->findOneByJumpPageId($id); $jump_page2 = array( 'id' => $jump_page2->getJumpPageId(), 'page_title' => $jump_page2->getPageTitle(), 'page_html_title' => $jump_page2->getPageHtmlTitle(), 'layout_type' => $jump_page2->getLayoutType(), 'page_slug' => $jump_page2->getPageSlug(), 'access_level' => $jump_page2->getAccessLevel(), 'restricted_permission_api_name' => $jump_page2->getRestreictedPermissionApiName(), 'php_script' => $jump_page2->getPhpScript(), 'include_tinymce' => $jump_page2->getIncludeTinymce(), 'active' => $jump_page2->getActive(), ); $renderer->assign('id',$id); $renderer->assign('jump_page',$jump_page2); $renderer->display('admin/settings/jump_page_display.tpl'); break; } // end default case 'process': { $JUMP = array( 'id' => $_POST['jump']['id'], 'page_title' => $_POST['jump']['page_title'], 'page_html_title' => $_POST['jump']['page_html_title'], 'layout_type' => $_POST['jump']['layout_type'], 'page_slug' => $_POST['jump']['page_slug'], 'access_level' => $_POST['jump']['access_level'], 'restricted_permission_api_name' => $_POST['jump']['restricted_permission_api_name'], 'php_script' => $_POST['jump']['php_script'], 'include_tinymce' => $_POST['jump']['include_tinymce'], 'active' => $_POST['jump']['active'], ); // Create an user and set some base attrs. $jump_edit = new JumpPage($db); $jump_edit = $jump_edit->findOneByJumpPageId($id); $jump_edit->setPageTitle($JUMP['page_title']); $jump_edit->setPageHtmlTitle($JUMP['page_html_title']); $jump_edit->setLayoutType($JUMP['layout_type']); $jump_edit->setPageSlug($JUMP['page_slug']); $jump_edit->setAccessLevel($JUMP['access_level']); $jump_edit->setRestrictedPermissionApiName($JUMP['restricted_permission_api_name']); $jump_edit->setPhpScript($JUMP['php_script']); $jump_edit->setIncludeTinymce($JUMP['include_tinymce']); $jump_edit->setActive($JUMP['active']); $jump_edit->save(); redirect('admin-jump'); break; } // end process } // end switch } } ?>
  14. Hi, on my config file I have 'public_dir' => 'http://www.URL.com', now would there be any possible way I can have somekind of if this user is on the .com site, its.com and if .net, its .net, btw both domains lead to the same path. Thank you in advance Mark
  15. Thank you so much skepsis!, I figured out where the } was meant to be! and it works perfectly now!
  16. Hi I am getting the following in my code: Parse error: syntax error, unexpected $end in view.php on line 118 My code is; <?php include "top.php"; if(isset($_GET[cat])) $CurrentCategory = $_GET[cat]; else $CurrentCategory = ""; $res = query("SELECT COUNT(*) FROM games WHERE cat = \"$CurrentCategory\""); list($total) = mysql_fetch_array($res); $limit=32; if(!isset($_GET )) $page=1; else $page=$_GET ; if($total>0) { $p = new pagination(); $p->Items($total); $p->limit($limit); if(empty($CurrentCategory)) { $p->target('view.php'); } else { $p->target('view.php?cat='.$CurrentCategory); } $p->currentPage($_GET['page']); $p->calculate(); $p->changeClass("pagination"); } $counter = 0; $offset = ($page-1) * $limit; echo '<div class=navigation>'; if($total>0) $p->show(); echo '</div>'; $res = query("SELECT * FROM games WHERE cat = \"$_GET[cat]\" LIMIT $offset,$limit"); echo '<table width=100% cellpadding=2 cellspacing=0 class=maintable>'; echo '<tr>'; while( $row = mysql_fetch_array($res) ) { $imgname = "URL"; $imgname .= "img/"; $imgname .= $row[1]; $imgname .= ".png"; echo '<td align=center valign=top width=110><CENTER><A HREF=play.php?id='.$row[0].'><img class=imgbox src='.$imgname.' WIDTH=60 HEIGHT=50 BORDER=1 ALT="'.$row[2].'"></A><BR><A HREF=play.php?id='.$row[0].'><B>'. $row[name] .'</B></A><BR><P>'. $row[descr] .'</P></CENTER></td>'; $counter++; if( $counter == 4 ) { echo '</tr><tr>'; $counter = 0; } if(isset($_GET[rating])) $CurrentRating = $_GET[rating]; else $CurrentRating = ""; $res = query("SELECT COUNT(*) FROM games WHERE rating = \"$CurrentRating\""); list($total) = mysql_fetch_array($res); $limit=32; if(!isset($_GET )) $page=1; else $page=$_GET ; if($total>0) { $p = new pagination(); $p->Items($total); $p->limit($limit); if(empty($CurrentRating)) { $p->target('view.php'); } else { $p->target('view.php?rating='.$CurrentRating); } $p->currentPage($_GET['page']); $p->calculate(); $p->changeClass("pagination"); } $counter = 0; $offset = ($page-1) * $limit; echo '<div class=navigation>'; if($total>0) $p->show(); echo '</div>'; $res = query("SELECT * FROM games WHERE rating = \"$_GET[rating]\" LIMIT $offset,$limit"); echo '<table width=100% cellpadding=2 cellspacing=0 class=maintable>'; echo '<tr>'; while( $row = mysql_fetch_array($res) ) { $imgname = "URL"; $imgname .= "img/"; $imgname .= $row[1]; $imgname .= ".png"; echo '<td align=center valign=top width=110><CENTER><A HREF=play.php?id='.$row[0].'><img class=imgbox src='.$imgname.' WIDTH=60 HEIGHT=50 BORDER=1 ALT="'.$row[2].'"></A><BR><A HREF=play.php?id='.$row[0].'><B>'. $row[name] .'</B></A><BR><P>'. $row[descr] .'</P></CENTER></td>'; $counter++; if( $counter == 4 ) { echo '</tr><tr>'; $counter = 0; } } echo '</tr>'; echo '</table>'; include "bottom.php"; ?> The code is meant to show people the games depending what they clicked on, for example view.php?cat=Action would give them the Action catagory of games, and view.php?rating=Teen for games only suitable for teens, I really dont know why it isnt working, if you could help, that would be great!, and thanks in advance! Mark
  17. Hi, I am getting rather annoyed with this little bit of code as it is giving me an error, on my application on facebook... any ideas? The code: it is meant to get the users that have recently viewed my application from the database then display their pictures on the app. $sql = "SELECT * FROM usertable order by uid DESC limit 7"; $result = mysql_query($sql, $connection); $num = @mysql_num_rows($result); $i = 0; print"<div align=center><b>Recent Visitors</b><br />"; while ($num > $i) { $uids = mysql_result($result, $i, "uid"); $scores = mysql_result($result, $i, "point"); $num_games = mysql_result($result, $i, "gameplayed"); s ?> <fb:profile-pic uid="<?php echo $uids; ?>" size="square" linked="true" /> echo '<fb:tabs>'; echo '<fb:tab-item href='.$appCanvasUrl.' title="Arcade Site List" selected="true" />'; echo '<fb:tab-item href='.$appCanvasUrl.'invite.php title="Invite Friends" />'; echo '</fb:tabs>'; <?php //$game = mysql_result($result,$i, "game"); $i++; } print"</div>"; ?> This is the error im getting Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in THE_CODE on line 18
  18. Hey!, On my site I have this little whois feature, to search to see if there are any tlds available of which my user might be after, however for some odd reason, from .co.uk to the last tld available, it automatically lists them as if they have been selected, thing is, they havent... Any ideas? Help much appreciated, thanks in advance! <?php function checkDomain($domain,$server,$findText){ // Open a socket connection to the whois server $con = fsockopen($server, 43); if (!$con) return false; // Send the requested doman name fputs($con, $domain."\r\n"); // Read and store the server response $response = ' :'; while(!feof($con)) { $response .= fgets($con,128); } // Close the connection fclose($con); // Check the response stream whether the domain is available if (strpos($response, $findText)){ return true; } else { return false; } } function showDomainResult($domain,$server,$findText){ if (checkDomain($domain,$server,$findText)){ echo "<tr><td>$domain</td><td>AVAILABLE</td></tr>"; } else echo "<tr><td>$domain</td><td>TAKEN</td></tr>"; } ?> <style type="text/css"><!-- .header {font-family:Tahoma, sans-serif; font-size: 12px; COLOR:#2FFFFF; padding-left:10; padding-right:5; font-weight:900 } .text {font-family:Tahoma,sans-serif; font-size: 11px; color:#626567; padding-left:20; padding-right:10 } .text2 {font-family:Verdana,sans-serif; font-size: 10px; color:#808087; padding-left:20; padding-right:10 } .news {font-family:Arial, sans-serif; font-size: 9px; color:#808087; padding-left:10; padding-right:5; font-weight:900; } a:link{text-decoration: none; color:#6699CC} a:visited{text-decoration: none; color: #6699CC} a:hover{text-decoration: underline; color: #6699CC} a:active{text-decoration: none; color: #6699CC} li { list-style-image:url('images/pic.jpg') } --></style> <tr> <td align="center"> <div align="center"> <table style="border-collapse: collapse;" id="table6" border="1" bordercolor="#c2e7ec" cellpadding="2" height="162" width="555"> <tbody><tr> <td valign="top" height="158"> <div align="center"> <table id="table7" border="0" cellpadding="2" cellspacing="0" width="100%"> <tbody><tr> <td> <div align="center"> <table id="table52" border="0" cellspacing="0" width="98%"> <tbody><tr> <td> <div align="center"> <table id="table3" border="0" cellpadding="2" cellspacing="0" width="100%"> <tbody><tr> <td> </td> </tr> <tr> <td> <table id="table4" border="0" cellpadding="0" cellspacing="0" width="528"> <tbody><tr> <td width="525"> <p align="justify"><font face="Arial"> <font color="#666666" style="font-size: 9pt; font-weight: 700"> Domain Names</font></font></p> <p align="justify">Sorry!, we do not currently offer domains. Why don't you try out our new domain lookup tool below to see if the domain name of your dreams is available! Please note we currently support limited TLDs (Top Level Domains - .com, .co.uk etc.) on the lookup, we will be adding more options soon!</p> <p> <div id="main"> <div id="caption"><b>Domain Lookup</b></div> <div id="icon"> </div> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="domain" id="domain"> Domain name: <table> <tr><td><input class="text" name="domainname" type="text" size="36"/></td></tr> <tr> <td> <input type="checkbox" name="all" checked />All <input type="checkbox" name="com"/>.com <input type="checkbox" name="net"/>.net <input type="checkbox" name="org"/>.org <input type="checkbox" name="co.uk"/>.co.uk <input type="checkbox" name="org.uk"/>.org.uk <input type="checkbox" name="ltd.uk"/>.ltd.uk <input type="checkbox" name="plc.uk"/>.plc.uk <input type="checkbox" name="me.uk"/>.me.uk <input type="checkbox" name="info"/>.info <input type="checkbox" name="edu"/>.edu </td></tr> <tr><td align="center"><br/><input class="text" type="submit" name="submitBtn" value="Check domain"/></td></tr> </table> </form> <?php if (isset($_POST['submitBtn'])){ $domainbase = (isset($_POST['domainname'])) ? $_POST['domainname'] : ''; $d_all = (isset($_POST['all'])) ? 'all' : ''; $d_com = (isset($_POST['com'])) ? 'com' : ''; $d_net = (isset($_POST['net'])) ? 'net' : ''; $d_org = (isset($_POST['org'])) ? 'org' : ''; $d_couk = (isset($_POST['couk'])) ? 'co.uk' : ''; $d_orguk = (isset($_POST['orguk'])) ? 'org.uk' : ''; $d_ltduk = (isset($_POST['ltduk'])) ? 'ltd.uk' : ''; $d_plcuk = (isset($_POST['plcuk'])) ? 'plc.uk' : ''; $d_meuk = (isset($_POST['meuk'])) ? 'me.uk' : ''; $d_info = (isset($_POST['info'])) ? 'info' : ''; $d_edu = (isset($_POST['edu'])) ? 'edu' : ''; // Check domains only if the base name is big enough if (strlen($domainbase)>2){ ?> <div id="caption">RESULT</div> <div id="icon2"> </div> <div id="result"> <table width="100%"> <?php if (($d_com != '') || ($d_all != '') ) showDomainResult($domainbase.".com",'whois.crsnic.net','No match for'); if (($d_net != '') || ($d_all != '') ) showDomainResult($domainbase.".net",'whois.crsnic.net','No match for'); if (($d_org != '') || ($d_all != '') ) showDomainResult($domainbase.".org",'whois.publicinterestregistry.net','NOT FOUND'); if (($d_co.uk != '') || ($d_all != '') ) showDomainResult($domainbase.".co.uk",'whois.nic.uk','No match'); if (($d_org.uk != '') || ($d_all != '') ) showDomainResult($domainbase.".org.uk",'whois.nic.uk','No match'); if (($d_ltd.uk != '') || ($d_all != '') ) showDomainResult($domainbase.".ltd.uk",'whois.nic.uk','No match'); if (($d_plc.uk != '') || ($d_all != '') ) showDomainResult($domainbase.".plc.uk",'whois.nic.uk','No match'); if (($d_me.uk != '') || ($d_all != '') ) showDomainResult($domainbase.".me.uk",'whois.nic.uk','No match'); if (($d_info != '') || ($d_all != '') ) showDomainResult($domainbase.".info",'whois.afilias.net','NOT FOUND'); if (($d_edu != '') || ($d_all != '') ) showDomainResult($domainbase.".edu",'whois.internic.net','No match for'); ?> </table> </div> <?php } } ?> </div></p> <center> <!--Advertise Here--> </td> <td width="3"> <p align="right"></p></td> </tr> </tbody></table> </td> </tr> </tbody></table></div> </td> </tr> </tbody></table> </div> </td> </tr> <tr> <td> <p style="text-align: center;" align="center"> <img src="images/logobot.jpg" border="0" height="70" width="535"></p></td> </tr> </tbody></table> </div> </td> </tr> </tbody></table> </div> </td> </tr>
  19. Sorry to be a pain, but for some reason the results are always showing all the options after .co.uk even if I just want to check .com... here is the code in full <?php function checkDomain($domain,$server,$findText){ // Open a socket connection to the whois server $con = fsockopen($server, 43); if (!$con) return false; // Send the requested doman name fputs($con, $domain."\r\n"); // Read and store the server response $response = ' :'; while(!feof($con)) { $response .= fgets($con,128); } // Close the connection fclose($con); // Check the response stream whether the domain is available if (strpos($response, $findText)){ return true; } else { return false; } } function showDomainResult($domain,$server,$findText){ if (checkDomain($domain,$server,$findText)){ echo "<tr><td>$domain</td><td>AVAILABLE</td></tr>"; } else echo "<tr><td>$domain</td><td>TAKEN</td></tr>"; } ?> <style type="text/css"><!-- .header {font-family:Tahoma, sans-serif; font-size: 12px; COLOR:#2FFFFF; padding-left:10; padding-right:5; font-weight:900 } .text {font-family:Tahoma,sans-serif; font-size: 11px; color:#626567; padding-left:20; padding-right:10 } .text2 {font-family:Verdana,sans-serif; font-size: 10px; color:#808087; padding-left:20; padding-right:10 } .news {font-family:Arial, sans-serif; font-size: 9px; color:#808087; padding-left:10; padding-right:5; font-weight:900; } a:link{text-decoration: none; color:#6699CC} a:visited{text-decoration: none; color: #6699CC} a:hover{text-decoration: underline; color: #6699CC} a:active{text-decoration: none; color: #6699CC} li { list-style-image:url('images/pic.jpg') } --></style> <tr> <td align="center"> <div align="center"> <table style="border-collapse: collapse;" id="table6" border="1" bordercolor="#c2e7ec" cellpadding="2" height="162" width="555"> <tbody><tr> <td valign="top" height="158"> <div align="center"> <table id="table7" border="0" cellpadding="2" cellspacing="0" width="100%"> <tbody><tr> <td> <div align="center"> <table id="table52" border="0" cellspacing="0" width="98%"> <tbody><tr> <td> <div align="center"> <table id="table3" border="0" cellpadding="2" cellspacing="0" width="100%"> <tbody><tr> <td> </td> </tr> <tr> <td> <table id="table4" border="0" cellpadding="0" cellspacing="0" width="528"> <tbody><tr> <td width="525"> <p align="justify"><font face="Arial"> <font color="#666666" style="font-size: 9pt; font-weight: 700"> Domain Names</font></font></p> <p align="justify">Sorry!, we do not currently offer domains. Why don't you try out our new domain lookup tool below to see if the domain name of your dreams is available! Please note we currently support limited TLDs (Top Level Domains - .com, .co.uk etc.) on the lookup, we will be adding more options soon!</p> <p> <div id="main"> <div id="caption"><b>Domain Lookup</b></div> <div id="icon"> </div> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="domain" id="domain"> Domain name: <table> <tr><td><input class="text" name="domainname" type="text" size="36"/></td></tr> <tr> <td> <input type="checkbox" name="all" checked />All <input type="checkbox" name="com"/>.com <input type="checkbox" name="net"/>.net <input type="checkbox" name="org"/>.org <input type="checkbox" name="co.uk"/>.co.uk <input type="checkbox" name="org.uk"/>.org.uk <input type="checkbox" name="ltd.uk"/>.ltd.uk <input type="checkbox" name="plc.uk"/>.plc.uk <input type="checkbox" name="me.uk"/>.me.uk <input type="checkbox" name="info"/>.info <input type="checkbox" name="edu"/>.edu </td></tr> <tr><td align="center"><br/><input class="text" type="submit" name="submitBtn" value="Check domain"/></td></tr> </table> </form> <?php if (isset($_POST['submitBtn'])){ $domainbase = (isset($_POST['domainname'])) ? $_POST['domainname'] : ''; $d_all = (isset($_POST['all'])) ? 'all' : ''; $d_com = (isset($_POST['com'])) ? 'com' : ''; $d_net = (isset($_POST['net'])) ? 'net' : ''; $d_org = (isset($_POST['org'])) ? 'org' : ''; $d_couk = (isset($_POST['couk'])) ? 'co.uk' : ''; $d_orguk = (isset($_POST['orguk'])) ? 'org.uk' : ''; $d_ltduk = (isset($_POST['ltduk'])) ? 'ltd.uk' : ''; $d_plcuk = (isset($_POST['plcuk'])) ? 'plc.uk' : ''; $d_meuk = (isset($_POST['meuk'])) ? 'me.uk' : ''; $d_info = (isset($_POST['info'])) ? 'info' : ''; $d_edu = (isset($_POST['edu'])) ? 'edu' : ''; // Check domains only if the base name is big enough if (strlen($domainbase)>2){ ?> <div id="caption">RESULT</div> <div id="icon2"> </div> <div id="result"> <table width="100%"> <?php if (($d_com != '') || ($d_all != '') ) showDomainResult($domainbase.".com",'whois.crsnic.net','No match for'); if (($d_net != '') || ($d_all != '') ) showDomainResult($domainbase.".net",'whois.crsnic.net','No match for'); if (($d_org != '') || ($d_all != '') ) showDomainResult($domainbase.".org",'whois.publicinterestregistry.net','NOT FOUND'); if (($d_co.uk != '') || ($d_all != '') ) showDomainResult($domainbase.".co.uk",'whois.nic.uk','No match'); if (($d_org.uk != '') || ($d_all != '') ) showDomainResult($domainbase.".org.uk",'whois.nic.uk','No match'); if (($d_ltd.uk != '') || ($d_all != '') ) showDomainResult($domainbase.".ltd.uk",'whois.nic.uk','No match'); if (($d_plc.uk != '') || ($d_all != '') ) showDomainResult($domainbase.".plc.uk",'whois.nic.uk','No match'); if (($d_me.uk != '') || ($d_all != '') ) showDomainResult($domainbase.".me.uk",'whois.nic.uk','No match'); if (($d_info != '') || ($d_all != '') ) showDomainResult($domainbase.".info",'whois.afilias.net','NOT FOUND'); if (($d_edu != '') || ($d_all != '') ) showDomainResult($domainbase.".edu",'whois.internic.net','No match for'); ?> </table> </div> <?php } } ?> </div></p> <center> <!--Advertise Here--> </td> <td width="3"> <p align="right"></p></td> </tr> </tbody></table> </td> </tr> </tbody></table></div> </td> </tr> </tbody></table> </div> </td> </tr> <tr> <td> <p style="text-align: center;" align="center"> <img src="images/logobot.jpg" border="0" height="70" width="535"></p></td> </tr> </tbody></table> </div> </td> </tr> </tbody></table> </div> </td> </tr>
  20. hey guys, while were on the subject, you wouldnt happen to know anyway I can make the results show the available domains (available) to show in green and taken in red do you?
  21. ah, thanks all, I think im getting the hang of this now LOL, thanks again
  22. OK, now it looks like so; <?php if (isset($_POST['submitBtn'])){ $domainbase = (isset($_POST['domainname'])) ? $_POST['domainname'] : ''; $d_all = (isset($_POST['all'])) ? 'all' : ''; $d_com = (isset($_POST['com'])) ? 'com' : ''; $d_net = (isset($_POST['net'])) ? 'net' : ''; $d_org = (isset($_POST['org'])) ? 'org' : ''; $d_info = (isset($_POST['info'])) ? 'info' : ''; $d_edu = (isset($_POST['edu'])) ? 'edu' : ''; $d_co.uk = (isset($_POST['couk'])) ? 'co.uk' : ''; // Check domains only if the base name is big enough if (strlen($domainbase)>2){ ?> however the form still dont show now, and the rest of the page oddly enough... any ideas?
  23. so instead of .co.uk then, what can I do that it will still look for .co.uk as you say I cant have . in it?
×
×
  • 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.