Union Posted April 4, 2007 Share Posted April 4, 2007 Hi there, I have a Nuked-Klan website, wich is almost exactly like PHP-Nuke websites but differently coded . I downloaded a theme that was rated 2/5...I was wondering why cause the design is awsome ... Now i think i know why...Cause the "Last Downloads" module is all messed up... When i go to the website, it says : "Parse error: syntax error, unexpected T_STRING in /www/110mb.com/u/n/i/o/n/w/e/b/unionwebsite/htdocs/website_contest/themes/deus_zone2bleu/inc/dl.php on line 35" So i modified line 35...got it able to work but wasn'T sure if it was ok....then they told me the same with 19....42....43..[...]...136 etc... So it looks like teh code is all messed u pand i don't know how to fix it cause i know html but not PHP :| That's what im talking about ( on the footer ) : http://unionwebsite.110mb.com/website_contest And theres the code of the page : <?php // -------------------------------------------------------------------------// // Nuked-KlaN - PHP Portal // // http://www.nuked-klan.org // // -------------------------------------------------------------------------// // This program is free software. you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // // the Free Software Foundation; either version 2 of the License. // // -------------------------------------------------------------------------// if (eregi("blok.php", $_SERVER['PHP_SELF'])) { die ("You cannot open this page directly"); } global $language, $nuked, $user, $theme; translate("modules/Download/lang/" . $language . ".lang.php"); if (!$user) { $visiteur = 0; } else { $visiteur = $user[1]; } $sql2 = mysql_query("SELECT active FROM " . BLOCK_TABLE . " WHERE bid='$bid'"); list($active) = mysql_fetch_array($sql2); if ($active == 3 || $active == 4) { if (is_file("themes/" . $theme . "/images/files.gif")) { $img = "<img src=\"themes/" . $theme . "/images/files.gif\" alt=\"\" />"; } else { $img = "<img src=\"modules/Download/images/files.gif\" alt=\"\" />"; } echo "<table style=\"margin-left: auto;margin-right: auto;text-align: left;\" width=\"90%\">\n" . "<tr><td style=\"width: 45%;\" valign=\"top\">" . $img . " <a href=\"index.php?file=Download&op=classe&orderby=news\"><big><b>" . _LASTDOWN . "</b></big></a><br /><br />\n"; $i = 0; $sql = mysql_query("SELECT id, titre, date, type FROM " . DOWNLOAD_TABLE . " WHERE " . $visiteur . " >= level ORDER BY id DESC LIMIT 0, 5"); while (list($dl_id, $titre, $date, $cat) = mysql_fetch_array($sql)) { $titre = stripslashes($titre); $titre = htmlentities($titre); $date = strftime("%x", $date); $sql4 = mysql_query("SELECT titre, parentid FROM " . DOWNLOAD_CAT_TABLE . " WHERE cid = '" . $cat . "'"); list($cat_name, $parentid) = mysql_fetch_array($sql4); $cat_name = stripslashes($cat_name); $cat_name = htmlentities($cat_name); if ($cat == 0) { $category = ""; } else if ($parentid > 0) { $sql5 = mysql_query("SELECT titre FROM " . DOWNLOAD_CAT_TABLE . " WHERE cid = '" . $parentid . "'"); list($parent_name) = mysql_fetch_array($sql5); $parent_name = stripslashes($parent_name); $parent_name = htmlentities($parent_name); $category = $parent_name . " - " . $cat_name; } else { $category = $cat_name; } $i++; echo "<b>" . $i . " . <a href=\"index.php?file=Download&op=description&dl_id=" . $dl_id\ . "\" style=\"text-decoration: underline\">" . $titre . "</a></b><br />\n"; if ($category != "") echo $category . "<br />\n"; } echo "</td><td style=\"width: 5%;\"> </td><td style=\"width: 45%;\" align=\"left\" valign=\"top\">" . $img . " <a href=\"index.php?file=Download&op=classe&orderby=count\"><big><b>" . _TOPDOWN . "</b></big></a><br /><br />\n"; $l = 0; $sql3 = mysql_query("SELECT id, titre, count, type FROM " . DOWNLOAD_TABLE . " WHERE " . $visiteur . " >= level ORDER BY count DESC LIMIT 0, 5"); while (list($tdl_id, $ttitre, $tcount, $tcat) = mysql_fetch_array($sql3)) { $ttitre = stripslashes($ttitre); $sql4 = mysql_query("SELECT titre, parentid FROM " . DOWNLOAD_CAT_TABLE . " WHERE cid = '" . $tcat . "'"); list($tcat_name, $tparentid) = mysql_fetch_array($sql4); $tcat_name = stripslashes($tcat_name); $tcat_name = htmlentities($tcat_name); if ($tcat == 0) { $tcategory = ""; } else if ($tparentid > 0) { $sql5 = mysql_query("SELECT titre FROM " . DOWNLOAD_CAT_TABLE . " WHERE cid = '" . $tparentid . "'"); list($tparent_name) = mysql_fetch_array($sql5); $tparent_name = stripslashes($tparent_name); $tparent_name = htmlentities($tparent_name); $tcategory = $tparent_name . " - " . $tcat_name; } else { $tcategory = $tcat_name; } $l++; echo "<b>" . $l . " . <a href=\"index.php?file=Download&op=description&dl_id=" . $tdl_id . "\" style=\"text-decoration: underline\">" . $ttitre . "</a></b><br />\n"; if ($tcategory != "") echo $tcategory . "<br />\n"; } echo "</td></tr><tr><td style=\"width: 45%;\" align=\"right\"><a href=\"index.php?file=Download&op=classe&orderby=news\"><small>+ " . _MORELAST . "</small></a></td>\n" . "<td style=\"width: 5%;\"></td><td style=\"width: 45%;\" align=\"right\"><a href=\"index.php?file=Download&op=classe&orderby=count\"><small>+ " . _MORETOP . "</small></a></td></tr></table>\n"; } else { $i = 0; $sql = mysql_query("SELECT id, titre, date FROM " . DOWNLOAD_TABLE . " WHERE " . $visiteur . " >= level ORDER BY date DESC LIMIT 0, 5"); while (list($dl_id, $titre, $date) = mysql_fetch_array($sql)) { $titre = stripslashes($titre); $titre = htmlentities($titre); $date = strftime("%x", $date); $i++; echo "<div><b>" . $i . " . <a href=\"index.php?file=Download&op=description&dl_id=" . $dl_id . "\">" . $titre . "</a></b> (" . $date . ")</div>\n"; } } ?> Anybudy could help me with the code...I mean i think it's not only line 35... I will really appreciate... Thanks, Union. Quote Link to comment https://forums.phpfreaks.com/topic/45487-could-you-guys-help-me-with-this-script-please/ Share on other sites More sharing options...
Union Posted April 4, 2007 Author Share Posted April 4, 2007 :'( Quote Link to comment https://forums.phpfreaks.com/topic/45487-could-you-guys-help-me-with-this-script-please/#findComment-221121 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.