$db->where("categorie = '{$cat}'"); $db->order_by("nom"); $res = $db->exec(); if ($db->num_rows($res) != 0) { echo "<table align=center border=0 cellspacing=0 cellpadding=0>"; while ($file = $db->fetch($res)) { echo "<tr><td>"; echo "<table cellspacing=0 cellpadding=2 border=0 width=500><tr>"; echo "<td valign=top><a href=\"?page=download&op=get&id={$file->id}\" target='_blank'><img src=images/download.gif align=absmiddle border=0></a></td>"; echo "<td class=text2 width=100%><a href=\"?page=download&op=get&id={$file->id}\" target='_blank'><b>" . stripslashes($file->nom) . "</b></a>"; echo "<br>"; if ($file->description) { echo "<i>{$strDescription}</i> : " . nl2br(stripslashes($file->description)) . "<br>"; } if ($file->taille >= 0) { echo "<i>{$strTaille}</i> : " . CoolSize($file->taille) . "<br>"; } if ($file->hits >= 0) { echo "<i>{$strHits}</i> : <b>{$file->hits}</b><br>"; } $date = strftime(DATESTRING2, $file->date); echo "<i>{$strAjouteLe}</i> : {$date} "; if ($file->date > time() - 3 * 24 * 3600) { echo "<img src=\"images/new_3day.gif\" border=0 align=align=absmiddle>"; } elseif ($file->date > time() - 7 * 24 * 3600) { echo "<img src=\"images/new_week.gif\" border=0 align=align=absmiddle>"; } elseif ($file->date > time() - 21 * 24 * 3600) { echo "<img src=\"images/new_3week.gif\" border=0 align=align=absmiddle>"; } echo "<br>"; echo "</td>";
function search($query, $min, $orderby, $show) { global $prefix, $dbi, $admin, $bgcolor2, $module_name; include "modules/{$module_name}/d_config.php"; include "header.php"; if (!isset($min)) { $min = 0; } if (!isset($max)) { $max = $min + $downloadsresults; } if (isset($orderby)) { $orderby = convertorderbyin($orderby); } else { $orderby = "title ASC"; } if ($show != "") { $downloadsresults = $show; } else { $show = $downloadsresults; } $query = check_html($query, nohtml); $query = addslashes($query); $result = sql_query("SELECT lid, cid, title, url, description, date, hits, downloadratingsummary, totalvotes, totalcomments, filesize, version, homepage FROM " . $prefix . "_downloads_downloads WHERE title LIKE '%{$query}%' OR description LIKE '%{$query}%' ORDER BY {$orderby} LIMIT {$min},{$downloadsresults}", $dbi); $fullcountresult = sql_query("SELECT lid, title, description, date, hits, downloadratingsummary, totalvotes, totalcomments FROM " . $prefix . "_downloads_downloads WHERE title LIKE '%{$query}%' OR description LIKE '%{$query}%' ", $dbi); $totalselecteddownloads = sql_num_rows($fullcountresult, $dbi); $nrows = sql_num_rows($result, $dbi); $x = 0; $the_query = stripslashes($query); $the_query = str_replace("\\'", "'", $the_query); menu(1); echo "<br>"; OpenTable(); if ($query != "") { if ($nrows > 0) { echo "<font class=\"option\">" . _SEARCHRESULTS4 . ": <b>{$the_query}</b></font><br><br>" . "<table width=\"100%\" bgcolor=\"{$bgcolor2}\"><tr><td><font class=\"option\"><b>" . _USUBCATEGORIES . "</b></font></td></tr></table>"; $result2 = sql_query("SELECT cid, title FROM " . $prefix . "_downloads_categories WHERE title LIKE '%{$query}%' ORDER BY title DESC", $dbi); while (list($cid, $stitle) = sql_fetch_row($result2, $dbi)) { $res = sql_query("SELECT * FROM " . $prefix . "_downloads_downloads WHERE cid={$cid}", $dbi); $numrows = sql_num_rows($res, $dbi); $result3 = sql_query("SELECT cid,title,parentid FROM " . $prefix . "_downloads_categories WHERE cid={$cid}", $dbi); list($cid3, $title3, $parentid3) = sql_fetch_row($result3, $dbi); if ($parentid3 > 0) { $title3 = getparent($parentid3, $title3); } $title3 = ereg_replace($query, "<b>{$query}</b>", $title3); echo "<strong><big>·</big></strong> <a href=\"modules.php?name={$module_name}&d_op=viewdownload&cid={$cid}\">{$title3}</a> ({$numrows})<br>"; } echo "<br><table width=\"100%\" bgcolor=\"{$bgcolor2}\"><tr><td><font class=\"option\"><b>" . _UDOWNLOADS . "</b></font></td></tr></table>"; $orderbyTrans = convertorderbytrans($orderby); echo "<center><font class=\"content\">" . _SORTDOWNLOADSBY . ": " . "" . _TITLE . " (<a href=\"modules.php?name={$module_name}&d_op=search&query={$the_query}&orderby=titleA\">A</a>\\<a href=\"modules.php?name={$module_name}&d_op=search&query={$the_query}&orderby=titleD\">D</a>) " . "" . _DATE . " (<a href=\"modules.php?name={$module_name}&d_op=search&query={$the_query}&orderby=dateA\">A</a>\\<a href=\"modules.php?name={$module_name}&d_op=search&query={$the_query}&orderby=dateD\">D</a>) " . "" . _RATING . " (<a href=\"modules.php?name={$module_name}&d_op=search&query={$the_query}&orderby=ratingA\">A</a>\\<a href=\"modules.php?name={$module_name}&d_op=search&query={$the_query}&orderby=ratingD\">D</a>) " . "" . _POPULARITY . " (<a href=\"modules.php?name={$module_name}&d_op=search&query={$the_query}&orderby=hitsA\">A</a>\\<a href=\"modules.php?name={$module_name}&d_op=search&query={$the_query}&orderby=hitsD\">D</a>)" . "<br>" . _RESSORTED . ": {$orderbyTrans}</center><br><br><br>"; while (list($lid, $cid, $title, $url, $description, $time, $hits, $downloadratingsummary, $totalvotes, $totalcomments, $filesize, $version, $homepage) = sql_fetch_row($result, $dbi)) { $downloadratingsummary = number_format($downloadratingsummary, $mainvotedecimal); $title = stripslashes($title); $description = stripslashes($description); $transfertitle = str_replace(" ", "_", $title); $title = ereg_replace($query, "<b>{$query}</b>", $title); global $prefix, $dbi, $admin; if (is_admin($admin)) { if (eregi("http", $url)) { echo "<a href=\"admin.php?op=DownloadsModDownload&lid={$lid}\"><img src=\"modules/{$module_name}/images/icon30.gif\" border=\"0\" alt=\"" . _EDIT . "\"></a>"; } else { echo "<a href=\"admin.php?op=DownloadsModDownload&lid={$lid}\"><img src=\"modules/{$module_name}/images/download.gif\" border=\"0\" alt=\"" . _EDIT . "\"></a>"; } } else { if (eregi("http", $url)) { echo "<img src=\"modules/{$module_name}/images/icon30.gif\" border=\"0\" alt=\"\">"; } else { echo "<img src=\"modules/{$module_name}/images/download.gif\" border=\"0\" alt=\"\">"; } } echo " <a href=\"modules.php?name={$module_name}&d_op=getit&lid={$lid}\" CLASS=\"title\" TARGET=\"_blank\">{$title}</a>"; newdownloadgraphic($datetime, $time); popgraphic($hits); detecteditorial($lid, $transfertitle, 1); echo "<br>"; $description = ereg_replace($query, "<b>{$query}</b>", $description); echo "<b>" . _DESCRIPTION . ":</b> {$description}<br>"; setlocale(LC_TIME, $locale); ereg("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime); $datetime = strftime("" . _LINKSDATESTRING . "", mktime($datetime[4], $datetime[5], $datetime[6], $datetime[2], $datetime[3], $datetime[1])); $datetime = ucfirst($datetime); echo "<b>" . _VERSION . ":</b> {$version} <b>" . _FILESIZE . ":</b> " . CoolSize($filesize) . "<br>"; echo "<b>" . _ADDEDON . ":</b> {$datetime} <b>" . _UDOWNLOADS . ":</b> {$hits}"; /* voting & comments stats */ if ($totalvotes == 1) { $votestring = _VOTE; } else { $votestring = _VOTES; } if ($downloadratingsummary != "0" || $downloadratingsummary != "0.0") { echo " <b>" . _RATING . ":</b> {$downloadratingsummary} ({$totalvotes} {$votestring})"; } echo "<br>"; $result3 = sql_query("SELECT cid,title,parentid FROM " . $prefix . "_downloads_categories WHERE cid={$cid}", $dbi); list($cid3, $title3, $parentid3) = sql_fetch_row($result3, $dbi); if ($parentid3 > 0) { $title3 = getparent($parentid3, $title3); } echo "<B>" . _CATEGORY . ":</B> <A HREF=\"modules.php?name=Downloads&d_op=viewdownload&cid={$cid}\">{$title3}</A>"; if ($homepage == "") { echo "<br>"; } else { echo "<br><a href=\"{$homepage}\" target=\"new\">" . _HOMEPAGE . "</a> | "; } echo "<a href=\"modules.php?name={$module_name}&d_op=ratedownload&lid={$lid}&ttitle={$transfertitle}\">" . _RATERESOURCE . "</a>"; echo " | <a href=\"modules.php?name={$module_name}&d_op=viewdownloaddetails&lid={$lid}&ttitle={$transfertitle}\">" . _DETAILS . "</a>"; if ($totalcomments != 0) { echo " | <a href=\"modules.php?name={$module_name}&d_op=viewdownloadcomments&lid={$lid}&ttitle={$transfertitle}>" . _SCOMMENTS . " ({$totalcomments})</a>"; } detecteditorial($lid, $transfertitle, 0); echo "<BR><BR>"; $x++; } echo "</font>"; $orderby = convertorderbyout($orderby); } else { echo "<br><br><center><font class=\"option\"><b>" . _NOMATCHES . "</b></font><br><br>" . _GOBACK . "<br></center>"; } /* Calculates how many pages exist. Which page one should be on, etc... */ $downloadpagesint = $totalselecteddownloads / $downloadsresults; $downloadpageremainder = $totalselecteddownloads % $downloadsresults; if ($downloadpageremainder != 0) { $downloadpages = ceil($downloadpagesint); if ($totalselecteddownloads < $downloadsresults) { $downloadpageremainder = 0; } } else { $downloadpages = $downloadpagesint; } /* Page Numbering */ if ($downloadpages != 1 && $downloadpages != 0) { echo "<br><br>" . "" . _SELECTPAGE . ": "; $prev = $min - $downloadsresults; if ($prev >= 0) { echo " <b>[ <a href=\"modules.php?name={$module_name}&d_op=search&query={$the_query}&min={$prev}&orderby={$orderby}&show={$show}\">" . " << " . _PREVIOUS . "</a> ]</b> "; } $counter = 1; $currentpage = $max / $downloadsresults; while ($counter <= $downloadpages) { $cpage = $counter; $mintemp = $perpage * $counter - $downloadsresults; if ($counter == $currentpage) { echo "<b>{$counter}</b> "; } else { echo "<a href=\"modules.php?name={$module_name}&d_op=search&query={$the_query}&min={$mintemp}&orderby={$orderby}&show={$show}\">{$counter}</a> "; } $counter++; } $next = $min + $downloadsresults; if ($x >= $perpage) { echo " <b>[ <a href=\"modules.php?name={$module_name}&d_op=search&query={$the_query}&min={$max}&orderby={$orderby}&show={$show}\">" . " " . _NEXT . " >></a> ]</b>"; } } echo "<br><br><center><font class=\"content\">" . "" . _TRY2SEARCH . " \"{$the_query}\" " . _INOTHERSENGINES . "<br>" . "<a target=\"_blank\" href=\"http://www.altavista.com/cgi-bin/query?pg=q&sc=on&hl=on&act=2006&par=0&q={$the_query}&kl=XX&stype=stext\">Alta Vista</a> - " . "<a target=\"_blank\" href=\"http://www.hotbot.com/?MT={$the_query}&DU=days&SW=web\">HotBot</a> - " . "<a target=\"_blank\" href=\"http://www.infoseek.com/Titles?qt={$the_query}\">Infoseek</a> - " . "<a target=\"_blank\" href=\"http://www.dejanews.com/dnquery.xp?QRY={$the_query}\">Deja News</a> - " . "<a target=\"_blank\" href=\"http://www.lycos.com/cgi-bin/pursuit?query={$the_query}&maxhits=20\">Lycos</a> - " . "<a target=\"_blank\" href=\"http://search.yahoo.com/bin/search?p={$the_query}\">Yahoo</a>" . "<br>" . "<a target=\"_blank\" href=\"http://es.linuxstart.com/cgi-bin/sqlsearch.cgi?pos=1&query={$the_query}&language=&advanced=&urlonly=&withid=\">LinuxStart</a> - " . "<a target=\"_blank\" href=\"http://search.1stlinuxsearch.com/compass?scope={$the_query}&ui=sr\">1stLinuxSearch</a> - " . "<a target=\"_blank\" href=\"http://www.google.com/search?q={$the_query}\">Google</a> - " . "<a target=\"_blank\" href=\"http://www.linuxdownloads.com/cgi-bin/search.cgi?query={$the_query}&engine=Downloads\">LinuxDownloads</a> - " . "<a target=\"_blank\" href=\"http://www.freshmeat.net/search/?q={$the_query}&section=projects\">Freshmeat</a> - " . "<a target=\"_blank\" href=\"http://www.justlinux.com/bin/search.pl?key={$the_query}\">JustLinux</a>" . "</font>"; } else { echo "<center><font class=\"option\"><b>" . _NOMATCHES . "</b></font></center><br><br>"; } CloseTable(); include "footer.php"; }
function edituser() { global $prefix, $db, $user, $userinfo, $cookie, $module_name, $bgcolor2, $bgcolor3; cookiedecode($user); getusrinfo($user); if (is_user($user) and strtolower($userinfo['username']) == strtolower($cookie[1]) and $userinfo['user_password'] == $cookie[2]) { include "header.php"; OpenTable(); echo "<center><font class=\"title\"><b>" . _PERSONALINFO . "</b></font></center>"; CloseTable(); echo "<br>"; OpenTable(); nav(); CloseTable(); echo "<br>"; if (!preg_match('#^http[s]?:\\/\\/#i', $userinfo['user_website'])) { $userinfo['user_website'] = "http://" . $userinfo['user_website']; } if (!preg_match('#^http[s]?\\:\\/\\/[a-z0-9\\-]+\\.([a-z0-9\\-]+\\.)?[a-z]+#i', $userinfo['user_website'])) { $userinfo['user_website'] = ''; } if (!preg_match('/^[0-9]+$/', $userinfo['user_icq'])) { $userinfo['user_icq'] = ""; } OpenTable(); echo "<table class=forumline cellpadding=\"3\" border=\"0\" width='100%'>" . "<form name=\"Register\" action=\"modules.php?name={$module_name}\" method=\"post\">" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _USRNICKNAME . "</b>:</td><td bgcolor='{$bgcolor3}'><b>" . $userinfo['username'] . "</b></td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _UREALNAME . "</b>:<br>" . _OPTIONAL . "</td><td bgcolor='{$bgcolor3}'>" . "<input type=\"text\" name=\"realname\" value=\"" . $userinfo['name'] . "\" size=\"50\" maxlength=\"60\"></td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _UREALEMAIL . ":</b><br>" . _REQUIRED . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"user_email\" value=\"" . $userinfo['user_email'] . "\" size=\"50\" maxlength=\"255\"><br>" . _EMAILNOTPUBLIC . "</td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _UFAKEMAIL . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"femail\" value=\"" . $userinfo['femail'] . "\" size=\"50\" maxlength=\"255\"><br>" . _EMAILPUBLIC . "</td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _YOURHOMEPAGE . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"user_website\" value=\"" . $userinfo['user_website'] . "\" size=\"50\" maxlength=\"255\"></td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _YICQ . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"user_icq\" value=\"" . $userinfo['user_icq'] . "\" size=\"30\" maxlength=\"100\"></td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _YAIM . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"user_aim\" value=\"" . $userinfo['user_aim'] . "\" size=\"30\" maxlength=\"100\"></td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _YYIM . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"user_yim\" value=\"" . $userinfo['user_yim'] . "\" size=\"30\" maxlength=\"100\"></td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _YMSNM . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"user_msnm\" value=\"" . $userinfo['user_msnm'] . "\" size=\"30\" maxlength=\"100\"></td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _YLOCATION . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"user_from\" value=\"" . $userinfo['user_from'] . "\" size=\"30\" maxlength=\"100\"></td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _YOCCUPATION . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"user_occ\" value=\"" . $userinfo['user_occ'] . "\" size=\"30\" maxlength=\"100\"></td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _YINTERESTS . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"user_interests\" value=\"" . $userinfo['user_interests'] . "\" size=\"30\" maxlength=\"100\"></td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _RECEIVENEWSLETTER . "</b></td><td bgcolor='{$bgcolor3}'>"; if ($userinfo['newsletter'] == 1) { echo "<input type=\"radio\" name=\"newsletter\" value=\"1\" checked>" . _YES . " " . "<input type=\"radio\" name=\"newsletter\" value=\"0\">" . _NO . ""; } elseif ($userinfo['newsletter'] == 0) { echo "<input type=\"radio\" name=\"newsletter\" value=\"1\">" . _YES . " " . "<input type=\"radio\" name=\"newsletter\" value=\"0\" checked>" . _NO . ""; } echo "</td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _ALWAYSSHOWEMAIL . ":</b></td><td bgcolor='{$bgcolor3}'>"; if ($userinfo['user_viewemail'] == 1) { echo "<input type=\"radio\" name=\"user_viewemail\" value=\"1\" checked>" . _YES . " " . "<input type=\"radio\" name=\"user_viewemail\" value=\"0\">" . _NO . ""; } elseif ($userinfo['user_viewemail'] == 0) { echo "<input type=\"radio\" name=\"user_viewemail\" value=\"1\">" . _YES . " " . "<input type=\"radio\" name=\"user_viewemail\" value=\"0\" checked>" . _NO . ""; } echo "</td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _HIDEONLINE . ":</b></td><td bgcolor='{$bgcolor3}'>"; if ($userinfo['user_allow_viewonline'] == 1) { echo "<input type=\"radio\" name=\"user_allow_viewonline\" value=\"0\">" . _YES . " " . "<input type=\"radio\" name=\"user_allow_viewonline\" value=\"1\" checked>" . _NO . ""; } elseif ($userinfo['user_allow_viewonline'] == 0) { echo "<input type=\"radio\" name=\"user_allow_viewonline\" value=\"0\" checked>" . _YES . " " . "<input type=\"radio\" name=\"user_allow_viewonline\" value=\"1\">" . _NO . ""; } echo "</td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _REPLYNOTIFY . ":</b><br>" . _REPLYNOTIFYMSG . "</td><td bgcolor='{$bgcolor3}'>"; if ($userinfo['user_notify'] == 1) { echo "<input type=\"radio\" name=\"user_notify\" value=\"1\" checked>" . _YES . " " . "<input type=\"radio\" name=\"user_notify\" value=\"0\">" . _NO . ""; } elseif ($userinfo['user_notify'] == 0) { echo "<input type=\"radio\" name=\"user_notify\" value=\"1\">" . _YES . " " . "<input type=\"radio\" name=\"user_notify\" value=\"0\" checked>" . _NO . ""; } echo "</td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _PMNOTIFY . ":</b></td><td bgcolor='{$bgcolor3}'>"; if ($userinfo['user_notify_pm'] == 1) { echo "<input type=\"radio\" name=\"user_notify_pm\" value=\"1\" checked>" . _YES . " " . "<input type=\"radio\" name=\"user_notify_pm\" value=\"0\">" . _NO . ""; } elseif ($userinfo['user_notify_pm'] == 0) { echo "<input type=\"radio\" name=\"user_notify_pm\" value=\"1\">" . _YES . " " . "<input type=\"radio\" name=\"user_notify_pm\" value=\"0\" checked>" . _NO . ""; } echo "</td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _POPPM . ":</b><br>" . _POPPMMSG . "</td><td bgcolor='{$bgcolor3}'>"; if ($userinfo['user_popup_pm'] == 1) { echo "<input type=\"radio\" name=\"user_popup_pm\" value=\"1\" checked>" . _YES . " " . "<input type=\"radio\" name=\"user_popup_pm\" value=\"0\">" . _NO . ""; } elseif ($userinfo['user_popup_pm'] == 0) { echo "<input type=\"radio\" name=\"user_popup_pm\" value=\"1\">" . _YES . " " . "<input type=\"radio\" name=\"user_popup_pm\" value=\"0\" checked>" . _NO . ""; } echo "</td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _ATTACHSIG . ":</b></td><td bgcolor='{$bgcolor3}'>"; if ($userinfo['user_attachsig'] == 1) { echo "<input type=\"radio\" name=\"user_attachsig\" value=\"1\" checked>" . _YES . " " . "<input type=\"radio\" name=\"user_attachsig\" value=\"0\">" . _NO . ""; } elseif ($userinfo['user_attachsig'] == 0) { echo "<input type=\"radio\" name=\"user_attachsig\" value=\"1\">" . _YES . " " . "<input type=\"radio\" name=\"user_attachsig\" value=\"0\" checked>" . _NO . ""; } echo "</td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _ALLOWBBCODE . "</b></td><td bgcolor='{$bgcolor3}'>"; if ($userinfo['user_allowbbcode'] == 1) { echo "<input type=\"radio\" name=\"user_allowbbcode\" value=\"1\" checked>" . _YES . " " . "<input type=\"radio\" name=\"user_allowbbcode\" value=\"0\">" . _NO . ""; } elseif ($userinfo['user_allowbbcode'] == 0) { echo "<input type=\"radio\" name=\"user_allowbbcode\" value=\"1\">" . _YES . " " . "<input type=\"radio\" name=\"user_allowbbcode\" value=\"0\" checked>" . _NO . ""; } echo "</td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _ALLOWHTMLCODE . "</b></td><td bgcolor='{$bgcolor3}'>"; if ($userinfo['user_allowhtml'] == 1) { echo "<input type=\"radio\" name=\"user_allowhtml\" value=\"1\" checked>" . _YES . " " . "<input type=\"radio\" name=\"user_allowhtml\" value=\"0\">" . _NO . ""; } elseif ($userinfo['user_allowhtml'] == 0) { echo "<input type=\"radio\" name=\"user_allowhtml\" value=\"1\">" . _YES . " " . "<input type=\"radio\" name=\"user_allowhtml\" value=\"0\" checked>" . _NO . ""; } echo "</td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _ALLOWSMILIES . "</b></td><td bgcolor='{$bgcolor3}'>"; if ($userinfo['user_allowsmile'] == 1) { echo "<input type=\"radio\" name=\"user_allowsmile\" value=\"1\" checked>" . _YES . " " . "<input type=\"radio\" name=\"user_allowsmile\" value=\"0\">" . _NO . ""; } elseif ($userinfo['user_allowsmile'] == 0) { echo "<input type=\"radio\" name=\"user_allowsmile\" value=\"1\">" . _YES . " " . "<input type=\"radio\" name=\"user_allowsmile\" value=\"0\" checked>" . _NO . ""; } echo "</td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _FORUMSTIME . "</b></td><td bgcolor='{$bgcolor3}'>"; echo "<select name='user_timezone'>"; for ($i = -12; $i < 13; $i++) { if ($i == 0) { $dummy = "GMT"; } else { if (!ereg("-", $i)) { $i = "+{$i}"; } $dummy = "GMT {$i} " . _HOURS . ""; } if ($userinfo['user_timezone'] == $i) { echo "<option name=\"user_timezone\" value=\"{$i}\" selected>{$dummy}</option>"; } else { echo "<option name=\"user_timezone\" value=\"{$i}\">{$dummy}</option>"; } } echo "</select>"; echo "</td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _FORUMSDATE . ":</b><br>" . _FORUMSDATEMSG . "</b></td><td bgcolor='{$bgcolor3}'>"; echo "<input size='15' maxlength='14' type=\"text\" name=\"user_dateformat\" value=\"" . $userinfo['user_dateformat'] . "\">"; echo "</td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _SIGNATURE . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><textarea wrap=\"virtual\" cols=\"70\" rows=\"15\" name=\"user_sig\">" . $userinfo['user_sig'] . "</textarea><br>" . _255CHARMAX . "</td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _EXTRAINFO . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><textarea wrap=\"virtual\" cols=\"70\" rows=\"15\" name=\"bio\">" . $userinfo['bio'] . "</textarea><br>" . _CANKNOWABOUT . "</td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _PASSWORD . "</b>:</td><br>" . "<td bgcolor='{$bgcolor3}'><input type=\"password\" name=\"user_password\" size=\"22\" maxlength=\"20\"> <input type=\"password\" name=\"vpass\" size=\"22\" maxlength=\"20\"><br>" . _TYPENEWPASSWORD . "</td></tr>" . "<tr><td bgcolor='{$bgcolor3}' colspan='2' align='center'>" . "<input type=\"hidden\" name=\"username\" value=\"" . $userinfo['username'] . "\">" . "<input type=\"hidden\" name=\"user_id\" value=\"" . intval($userinfo['user_id']) . "\">" . "<input type=\"hidden\" name=\"op\" value=\"saveuser\">" . "<input class=button type=\"submit\" value=\"" . _SAVECHANGES . "\">" . "</form></td></tr>"; $avatar_category = !empty($HTTP_POST_VARS['avatarcategory']) ? $HTTP_POST_VARS['avatarcategory'] : ''; $direktori = "modules/Forums/images/avatars"; $dir = @opendir($direktori); $avatar_images = array(); while ($file = @readdir($dir)) { if ($file != '.' && $file != '..' && !is_file($direktori . '/' . $file) && !is_link($direktori . '/' . $file)) { $sub_dir = @opendir($direktori . '/' . $file); $avatar_row_count = 0; $avatar_col_count = 0; while ($sub_file = @readdir($sub_dir)) { if (preg_match('/(\\.gif$|\\.png$|\\.jpg|\\.jpeg)$/is', $sub_file)) { $avatar_images[$file][$avatar_row_count][$avatar_col_count] = $file . '/' . $sub_file; $avatar_name[$file][$avatar_row_count][$avatar_col_count] = ucfirst(str_replace("_", " ", preg_replace('/^(.*)\\..*$/', '\\1', $sub_file))); $avatar_col_count++; if ($avatar_col_count == 5) { $avatar_row_count++; $avatar_col_count = 0; } } } } } @closedir($dir); @ksort($avatar_images); @reset($avatar_images); if (empty($category)) { list($category, ) = each($avatar_images); } @reset($avatar_images); $s_categories = '<select name="avatarcategory">'; while (list($key) = each($avatar_images)) { $selected = $key == $category ? ' selected="selected"' : ''; if (count($avatar_images[$key])) { $s_categories .= '<option value="' . $key . '"' . $selected . '>' . ucfirst($key) . '</option>'; } } $s_categories .= '</select>'; $sql = "SELECT * FROM " . $prefix . "_bbconfig"; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $board_config[$row['config_name']] = $row['config_value']; } if ($userinfo['user_avatar_type'] == 1) { $userinfo['user_avatar'] = $board_config['avatar_path'] . "/" . $userinfo['user_avatar']; } elseif ($userinfo['user_avatar_type'] == 2) { $userinfo['user_avatar'] = $userinfo['user_avatar']; } else { $userinfo['user_avatar'] = $board_config['avatar_gallery_path'] . "/" . $userinfo['user_avatar']; } echo "<tr><td bgcolor='{$bgcolor3}' colspan='2' align='center'>" . "<BR><b><h5>Avatar control panel</h5></b>" . "<tr><td bgcolor='{$bgcolor2}'>Displays a small graphic image below your details in forum posts and on your profile. Only one image can be displayed at a time, its width can be no greater than " . $board_config['avatar_max_width'] . " pixels, the height no greater than " . $board_config['avatar_max_height'] . " pixels, and the file size no more than " . CoolSize($board_config['avatar_filesize']) . ".</td>"; echo "<td bgcolor='{$bgcolor3}' align=center>Current Avatar<BR><BR><IMG alt=\"\" src=\"{$userinfo['user_avatar']}\"></td></tr><BR>"; if ($board_config['allow_avatar_local']) { echo "<form action=\"modules.php?name=Your_Account&op=avatarlist\" method=\"post\">" . "<tr><td bgcolor='{$bgcolor2}'><b>Select Avatar from gallery:</b></td>" . "<td bgcolor='{$bgcolor3}'>" . $s_categories . " <img src=\"images/right.gif\" align=middle> <INPUT class=button type=submit value=\"Show Gallery\"></td></tr>" . "</form>"; } else { echo "<tr><td bgcolor='{$bgcolor2}'><b>Select Avatar from gallery:</b></td>" . "<td bgcolor='{$bgcolor3}'><b>Gallery Avatars Currently Disabled</b></td></tr>"; } if ($board_config['allow_avatar_upload']) { echo "<tr><td bgcolor='{$bgcolor2}'><b>Upload Avatar from your machine:</b></td>" . "<td bgcolor='{$bgcolor3}'><a href=\"modules.php?name=Forums&file=profile&mode=editprofile\"><b>Upload Through Forum Profile</b></a></td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>Upload Avatar from a URL:</b><br><SPAN class=gensmall>Enter the URL of the location containing the Avatar image and click on the submit button below, the Avatar image will be copied to this site.</SPAN></td>" . "<td bgcolor='{$bgcolor3}'><a href=\"modules.php?name=Forums&file=profile&mode=editprofile\"><b>Upload Through Forum Profile</b></a></td></tr>"; } else { echo "<tr><td bgcolor='{$bgcolor2}'><b>Upload Avatar from your machine:</b></td>" . "<td bgcolor='{$bgcolor3}'><b>Currently Disabled</b></td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>Upload Avatar from a URL:</b><br><SPAN class=gensmall>Enter the URL of the location containing the Avatar image and click on the submit button below, the Avatar image will be copied to this site.</SPAN></td>" . "<td bgcolor='{$bgcolor3}'><b>Currently Disabled</b></td></tr>"; } if ($board_config['allow_avatar_remote']) { echo "<form action=\"modules.php?name=Your_Account&op=avatarlinksave\" method=\"post\">" . "<tr><td bgcolor='{$bgcolor2}'><b>Link to off-site Avatar:</b><br><SPAN class=gensmall>Enter the URL of the location containing the Avatar image you wish to link to and click on the submit button below.</SPAN></td>" . "<td bgcolor='{$bgcolor3}'><INPUT class=post style=\"WIDTH: 200px\" size=40 name=avatar></td></tr>"; } else { echo "<tr><td bgcolor='{$bgcolor2}'><b>Link to off-site Avatar:</b><br><SPAN class=gensmall>Enter the URL of the location containing the Avatar image you wish to link to and click on the submit button below.</SPAN></td>" . "<td bgcolor='{$bgcolor3}'><b>Currently Disabled</b></td></tr>"; } echo "<tr><td bgcolor='{$bgcolor3}' colspan='2' align='center'>" . "<INPUT class=mainoption type=submit value=Save Avatar>" . "</form></TD></TR></TABLE>"; CloseTable(); include "footer.php"; } else { main($user); } }
function NewDownloadsDate() { global $downloadsprefix, $db, $module_name; $selectdate = intval($_GET['selectdate']); $dateDB = date("d-M-Y", $selectdate); $dateView = date("F d, Y", $selectdate); include "header.php"; downl_menu_tpl(1); echo '<br />'; OpenTable(); $newdownloadDB = Date("Y-m-d", $selectdate); $totaldownloads = $db->sql_numrows($db->sql_query("SELECT * FROM " . $downloadsprefix . "_downloads WHERE date LIKE '%{$newdownloadDB}%'")); echo "<font class=\"option\"><b>{$dateView} - {$totaldownloads} " . _NEWDOWNLOADS . "</b></font>" . "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"10\" border=\"0\"><tr><td><font class=\"content\">"; $sql = "SELECT lid, cid, title, description, date, hits, url, downloadratingsummary, totalvotes, totalcomments, filesize, version, homepage FROM " . $downloadsprefix . "_downloads WHERE date LIKE '%{$newdownloadDB}%' ORDER BY title ASC"; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $lid = $row['lid']; $cid = $row['cid']; $title = $row['title']; $description = $row['description']; $time = $row['date']; $hits = $row['hits']; $url = $row['url']; $downloadratingsummary = $row['downloadratingsummary']; $totalvotes = $row['totalvotes']; $totalcomments = $row['totalcomments']; $filesize = $row['filesize']; $version = $row['version']; $homepage = $row['homepage']; $downloadratingsummary = number_format($downloadratingsummary, $mainvotedecimal); if (can_admin('downloads')) { if (eregi("http", $url)) { echo "<a href=\"" . adminlink("{$module_name}&mode=DownloadsModDownload&lid={$lid}") . "\"><img src=\"modules/{$module_name}/images/icon30.gif\" border=\"0\" alt=\"" . _EDIT . "\"></a>"; } else { echo "<a href=\"" . adminlink("{$module_name}&mode=DownloadsModDownload&lid={$lid}") . "\"><img src=\"modules/{$module_name}/images/download.gif\" border=\"0\" alt=\"" . _EDIT . "\"></a>"; } } else { if (eregi("http", $url)) { echo "<img src=\"modules/{$module_name}/images/icon30.gif\" border=\"0\" alt=\"\">"; } else { echo "<img src=\"modules/{$module_name}/images/download.gif\" border=\"0\" alt=\"\">"; } } echo " <a href=\"" . getlink("&d_op=getit&lid={$lid}") . "\" class=\"title\">{$title}</a>"; $datetime = formatDateTime($time . ' 00:00:00', _DATESTRING3); newdownloadgraphic($datetime); popgraphic($hits); detecteditorial($lid, 1); echo "<br /><b>" . _DESCRIPTION . ":</b> {$description}<br />"; echo "<b>" . _VERSION . ":</b> {$version} <b>" . _FILESIZE . ":</b> " . CoolSize($filesize) . "<br />"; echo "<b>" . _ADDEDON . ":</b> <b>{$datetime}</b> <b>" . _UDOWNLOADS . ":</b> {$hits}"; $transfertitle = str_replace(" ", "_", $title); /* voting & comments stats */ $votestring = $totalvotes == 1 ? _VOTE : _VOTES; if ($downloadratingsummary != "0" || $downloadratingsummary != "0.0") { echo " <b>" . _RATING . ":</b> {$downloadratingsummary} ({$totalvotes} {$votestring})"; } echo '<br />'; $sql2 = "SELECT title FROM " . $downloadsprefix . "_categories WHERE cid='{$cid}'"; $result2 = $db->sql_query($sql2); $row2 = $db->sql_fetchrow($result2); $ctitle = $row2[title]; $ctitle = getparent($cid, $ctitle); echo "<B>" . _CATEGORY . ":</B> <A HREF=\"" . getlink("&d_op=viewdownload&cid={$cid}") . "\">{$ctitle}</A><br />"; if ($homepage != "") { echo "<br /><a href=\"{$homepage}\" target=\"new\">" . _HOMEPAGE . "</a> | "; } echo "<a href=\"" . getlink("&d_op=ratedownload&lid={$lid}") . "\">" . _RATERESOURCE . "</a>"; if (is_user()) { echo " | <a href=\"" . getlink("&d_op=brokendownload&lid={$lid}") . "\">" . _REPORTBROKEN . "</a>"; } echo " | <a href=\"" . getlink("&d_op=viewdownloaddetails&lid={$lid}") . "\">" . _DETAILS . "</a>"; if ($totalcomments != 0) { echo " | <a href=\"" . getlink("&d_op=viewdownloadcomments&lid={$lid}") . "\">" . _SCOMMENTS . " ({$totalcomments})</a>"; } detecteditorial($lid, 0); echo "<br /><br />"; } echo "</font></td></tr></table>"; CloseTable(); include "footer.php"; }
function NewDownloadsDate($selectdate) { global $prefix, $db, $module_name, $admin, $user; $dateDB = date("d-M-Y", $selectdate); $dateView = date("F d, Y", $selectdate); include "header.php"; menu(1); echo "<br>"; OpenTable(); $newdownloadDB = Date("Y-m-d", $selectdate); $totaldownloads = $db->sql_numrows($db->sql_query("SELECT * FROM " . $prefix . "_downloads_downloads WHERE date LIKE '%{$newdownloadDB}%'")); echo "<font class=\"option\"><b>{$dateView} - {$totaldownloads} " . _NEWDOWNLOADS . "</b></font>" . "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"10\" border=\"0\"><tr><td><font class=\"content\">"; $sql = "SELECT lid, cid, title, description, date, hits, url, downloadratingsummary, totalvotes, totalcomments, filesize, version, homepage FROM " . $prefix . "_downloads_downloads WHERE date LIKE '%{$newdownloadDB}%' ORDER BY title ASC"; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $lid = $row[lid]; $cid = $row[cid]; $title = $row[title]; $description = $row[description]; $time = $row[date]; $hits = $row[hits]; $url = $row[url]; $downloadratingsummary = $row[downloadratingsummary]; $totalvotes = $row[totalvotes]; $totalcomments = $row[totalcomments]; $filesize = $row[filesize]; $version = $row[version]; $homepage = $row[homepage]; $downloadratingsummary = number_format($downloadratingsummary, $mainvotedecimal); $title = stripslashes($title); $description = stripslashes($description); if (is_admin($admin)) { if (eregi("http", $url)) { echo "<a href=\"admin.php?op=DownloadsModDownload&lid={$lid}\"><img src=\"modules/{$module_name}/images/icon30.gif\" border=\"0\" alt=\"" . _EDIT . "\"></a>"; } else { echo "<a href=\"admin.php?op=DownloadsModDownload&lid={$lid}\"><img src=\"modules/{$module_name}/images/download.gif\" border=\"0\" alt=\"" . _EDIT . "\"></a>"; } } else { if (eregi("http", $url)) { echo "<img src=\"modules/{$module_name}/images/icon30.gif\" border=\"0\" alt=\"\">"; } else { echo "<img src=\"modules/{$module_name}/images/download.gif\" border=\"0\" alt=\"\">"; } } echo " <a href=\"modules.php?name={$module_name}&d_op=getit&lid={$lid}\" TARGET=\"_blank\" CLASS=\"title\">{$title}</a>"; newdownloadgraphic($datetime, $time); popgraphic($hits); detecteditorial($lid, $transfertitle, 1); echo "<br><b>" . _DESCRIPTION . ":</b> {$description}<br>"; setlocale(LC_TIME, $locale); /* INSERT code for *editor review* here */ ereg("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime); $datetime = strftime("" . _LINKSDATESTRING . "", mktime($datetime[4], $datetime[5], $datetime[6], $datetime[2], $datetime[3], $datetime[1])); $datetime = ucfirst($datetime); echo "<b>" . _VERSION . ":</b> {$version} <b>" . _FILESIZE . ":</b> " . CoolSize($filesize) . "<br>"; echo "<b>" . _ADDEDON . ":</b> <b>{$datetime}</b> <b>" . _UDOWNLOADS . ":</b> {$hits}"; $transfertitle = str_replace(" ", "_", $title); /* voting & comments stats */ if ($totalvotes == 1) { $votestring = _VOTE; } else { $votestring = _VOTES; } if ($downloadratingsummary != "0" || $downloadratingsummary != "0.0") { echo " <b>" . _RATING . ":</b> {$downloadratingsummary} ({$totalvotes} {$votestring})"; } echo "<br>"; $sql2 = "SELECT title FROM " . $prefix . "_downloads_categories WHERE cid='{$cid}'"; $result2 = $db->sql_query($sql2); $row2 = $db->sql_fetchrow($result2); $ctitle = $row2[title]; $ctitle = getparent($cid, $ctitle); echo "<B>" . _CATEGORY . ":</B> <A HREF=\"modules.php?name=Downloads&d_op=viewdownload&cid={$cid}\">{$ctitle}</A>"; if ($homepage == "") { echo "<br>"; } else { echo "<br><a href=\"{$homepage}\" target=\"new\">" . _HOMEPAGE . "</a> | "; } echo "<a href=\"modules.php?name={$module_name}&d_op=ratedownload&lid={$lid}&ttitle={$transfertitle}\">" . _RATERESOURCE . "</a>"; if (is_user($user)) { echo " | <a href=\"modules.php?name={$module_name}&d_op=brokendownload&lid={$lid}\">" . _REPORTBROKEN . "</a>"; } echo " | <a href=\"modules.php?name={$module_name}&d_op=viewdownloaddetails&lid={$lid}&ttitle={$transfertitle}\">" . _DETAILS . "</a>"; if ($totalcomments != 0) { echo " | <a href=\"modules.php?name={$module_name}&d_op=viewdownloadcomments&lid={$lid}&ttitle={$transfertitle}\">" . _SCOMMENTS . " ({$totalcomments})</a>"; } detecteditorial($lid, $transfertitle, 0); echo "<br><br>"; } echo "</font></td></tr></table>"; CloseTable(); include "footer.php"; }
function viewsdownload($sid, $min, $orderby, $show) { global $prefix, $dbi, $admin, $module_name, $user; include "modules/{$module_name}/d_config.php"; include "header.php"; menu(1); if (!isset($min)) { $min = 0; } if (!isset($max)) { $max = $min + $perpage; } if (isset($orderby)) { $orderby = convertorderbyin($orderby); } else { $orderby = "title ASC"; } if ($show != "") { $perpage = $show; } else { $show = $perpage; } echo "<br>"; OpenTable(); $result = sql_query("SELECT title,parentid FROM " . $prefix . "_downloads_categories WHERE cid={$cid}", $dbi); list($title, $parentid) = sql_fetch_row($result, $dbi); $title = getparentlink($parentid, $title); $title = "<a href=modules.php?name={$module_name}>" . _MAIN . "</a>/{$title}"; echo "<center><font class=\"option\"><b>" . _CATEGORY . ": {$title}</b></font></center><br>"; echo "<table border=\"0\" cellspacing=\"10\" cellpadding=\"0\" align=\"center\"><tr>"; $result2 = sql_query("SELECT cid, title, cdescription FROM " . $prefix . "_downloads_categories WHERE parentid={$cid} order by title", $dbi); $count = 0; while (list($cid2, $title2, $cdescription2) = sql_fetch_row($result2, $dbi)) { echo "<td><font class=\"option\"><strong><big>·</big></strong> <a href=\"modules.php?name={$module_name}&d_op=viewdownload&cid={$cid2}\"><b>{$title2}</b></a></font>"; categorynewdownloadgraphic($cid2); if ($cdescription2) { echo "<font class=\"content\">{$cdescription2}</font><br>"; } else { echo "<br>"; } $result3 = sql_query("SELECT cid, title FROM " . $prefix . "_downloads_categories WHERE parentid={$cid2} order by title limit 0,3", $dbi); $space = 0; while (list($cid3, $title3) = sql_fetch_row($result3, $dbi)) { if ($space > 0) { echo ", "; } echo "<font class=\"content\"><a href=\"modules.php?name={$module_name}&d_op=viewdownload&cid={$cid3}\">{$title3}</a></font>"; $space++; } if ($count < 1) { echo "</td><td> </td>"; $dum = 1; } $count++; if ($count == 2) { echo "</td></tr><tr>"; $count = 0; $dum = 0; } } if ($dum == 1) { echo "</tr></table>"; } elseif ($dum == 0) { echo "<td></td></tr></table>"; } echo "<hr noshade size=\"1\">"; $orderbyTrans = convertorderbytrans($orderby); echo "<br><center><font class=\"content\">" . _SORTDOWNLOADSBY . ": " . "" . _TITLE . " (<a href=\"modules.php?name={$module_name}&d_op=viewdownload&sid={$sid}&orderby=titleA\">A</a>\\<a href=\"modules.php?name={$module_name}&d_op=viewdownload&sid={$sid}&orderby=titleD\">D</a>)" . " " . _DATE . " (<a href=\"modules.php?name={$module_name}&d_op=viewdownload&sid={$sid}&orderby=dateA\">A</a>\\<a href=\"modules.php?name={$module_name}&d_op=viewdownload&sid={$sid}&orderby=dateD\">D</a>)" . " " . _RATING . " (<a href=\"modules.php?name={$module_name}&d_op=viewdownload&sid={$sid}&orderby=ratingA\">A</a>\\<a href=\"modules.php?name={$module_name}&d_op=viewdownload&sid={$sid}&orderby=ratingD\">D</a>)" . " " . _POPULARITY . " (<a href=\"modules.php?name={$module_name}&d_op=viewdownload&sid={$sid}&orderby=hitsA\">A</a>\\<a href=\"modules.php?name={$module_name}&d_op=viewdownload&sid={$sid}&orderby=hitsD\">D</a>)" . "<br><b>" . _RESSORTED . ": {$orderbyTrans}</b></font></center><br><br>"; $result = sql_query("SELECT lid, url, title, description, date, hits, downloadratingsummary, totalvotes, totalcomments, filesize, version, homepage FROM " . $prefix . "_downloads_downloads WHERE sid={$sid} order by {$orderby} limit {$min},{$perpage}", $dbi); $fullcountresult = sql_query("SELECT lid, title, description, date, hits, downloadratingsummary, totalvotes, totalcomments FROM " . $prefix . "_downloads_downloads WHERE sid={$sid}", $dbi); $totalselecteddownloads = sql_num_rows($fullcountresult, $dbi); echo "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"10\" border=\"0\"><tr><td><font class=\"content\">"; $x = 0; while (list($lid, $url, $title, $description, $time, $hits, $downloadratingsummary, $totalvotes, $totalcomments, $filesize, $version, $homepage) = sql_fetch_row($result, $dbi)) { $downloadratingsummary = number_format($downloadratingsummary, $mainvotedecimal); $title = stripslashes($title); $description = stripslashes($description); global $prefix, $dbi, $admin; if (is_admin($admin)) { echo "<a href=\"admin.php?op=DownloadsModDownload&lid={$lid}\"><img src=\"modules/{$module_name}/images/lwin.gif\" border=\"0\" alt=\"" . _EDIT . "\"></a> "; } else { echo "<img src=\"modules/{$module_name}/images/lwin.gif\" border=\"0\" alt=\"\"> "; } echo "<a href=\"modules.php?name={$module_name}&d_op=getit&lid={$lid}\">{$title}</a>"; newdownloadgraphic($datetime, $time); popgraphic($hits); /* code for *editor review* insert here */ detecteditorial($lid, $transfertitle, 1); echo "<br><b>" . _DESCRIPTION . ":</b> {$description}<br>"; setlocale(LC_TIME, $locale); ereg("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime); $datetime = strftime("" . _LINKSDATESTRING . "", mktime($datetime[4], $datetime[5], $datetime[6], $datetime[2], $datetime[3], $datetime[1])); $datetime = ucfirst($datetime); echo "<b>" . _VERSION . ":</b> {$version} <b>" . _FILESIZE . ":</b> " . CoolSize($filesize) . "<br>"; echo "<b>" . _ADDEDON . ":</b> {$datetime} <b>" . _UDOWNLOADS . ":</b> {$hits}"; $transfertitle = str_replace(" ", "_", $title); /* voting & comments stats */ if ($totalvotes == 1) { $votestring = _VOTE; } else { $votestring = _VOTES; } if ($downloadratingsummary != "0" || $downloadratingsummary != "0.0") { echo " <b>" . _RATING . ":</b> {$downloadratingsummary} ({$totalvotes} {$votestring})"; } if ($homepage == "") { echo "<br>"; } else { echo "<br><a href=\"{$homepage}\" target=\"new\">" . _HOMEPAGE . "</a> | "; } echo "<a href=\"modules.php?name={$module_name}&d_op=ratedownload&lid={$lid}&ttitle={$transfertitle}\">" . _RATERESOURCE . "</a>"; if (is_user($user)) { echo " | <a href=\"modules.php?name={$module_name}&d_op=brokendownload&lid={$lid}\">" . _REPORTBROKEN . "</a>"; } echo " | <a href=\"modules.php?name={$module_name}&d_op=viewdownloaddetails&lid={$lid}&ttitle={$transfertitle}\">" . _DETAILS . "</a>"; if ($totalcomments != 0) { echo " | <a href=\"modules.php?name={$module_name}&d_op=viewdownloadcomments&lid={$lid}&ttitle={$transfertitle}\">" . _SCOMMENTS . " ({$totalcomments})</a>"; } detecteditorial($lid, $transfertitle, 0); echo "<br><br>"; $x++; } echo "</font>"; $orderby = convertorderbyout($orderby); /* Calculates how many pages exist. Which page one should be on, etc... */ $downloadpagesint = $totalselecteddownloads / $perpage; $downloadpageremainder = $totalselecteddownloads % $perpage; if ($downloadpageremainder != 0) { $downloadpages = ceil($downloadpagesint); if ($totalselecteddownloads < $perpage) { $downloadpageremainder = 0; } } else { $downloadpages = $downloadpagesint; } /* Page Numbering */ if ($downloadpages != 1 && $downloadpages != 0) { echo "<br><br>" . "" . _SELECTPAGE . ": "; $prev = $min - $perpage; if ($prev >= 0) { echo " <b>[ <a href=\"modules.php?name={$module_name}&d_op=viewdownload&sid={$sid}&min={$prev}&orderby={$orderby}&show={$show}\">" . " << " . _PREVIOUS . "</a> ]</b> "; } $counter = 1; $currentpage = $max / $perpage; while ($counter <= $downloadpages) { $cpage = $counter; $mintemp = $perpage * $counter - $perpage; if ($counter == $currentpage) { echo "<b>{$counter}</b> "; } else { echo "<a href=\"modules.php?name={$module_name}&d_op=viewdownload&sid={$sid}&min={$mintemp}&orderby={$orderby}&show={$show}\">{$counter}</a> "; } $counter++; } $next = $min + $perpage; if ($x >= $perpage) { echo " <b>[ <a href=\"modules.php?name={$module_name}&d_op=viewdownload&sid={$sid}&min={$max}&orderby={$orderby}&show={$show}\">" . " " . _NEXT . " >></a> ]</b> "; } } echo "</td></tr></table>"; CloseTable(); include "footer.php"; }
function edituser() { global $prefix, $db, $user, $userinfo, $cookie, $module_name, $bgcolor2, $bgcolor3; cookiedecode($user); getusrinfo($user); if (is_user($user) and strtolower($userinfo['username']) == strtolower($cookie[1]) and $userinfo['user_password'] == $cookie[2]) { include "header.php"; OpenTable(); echo "<center><font class=\"title\"><b>" . _PERSONALINFO . "</b></font></center>"; CloseTable(); echo "<br>"; OpenTable(); nav(); CloseTable(); echo "<br>"; if (!eregi("http://", $userinfo[user_website])) { $userinfo[user_website] = "http://{$userinfo['user_website']}"; } OpenTable(); echo "<table class=forumline cellpadding=\"3\" border=\"0\" width='100%'>" . "<form name=\"Register\" action=\"modules.php?name={$module_name}\" method=\"POST\">" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _USRNICKNAME . "</b>:</td><td bgcolor='{$bgcolor3}'><b>{$userinfo['username']}</b></td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _UREALNAME . "</b>:<br>" . _REQUIRED . "</td><td bgcolor='{$bgcolor3}'>" . "<input type=\"text\" name=\"realname\" value=\"{$userinfo['name']}\" size=\"50\" maxlength=\"60\"></td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _UREALEMAIL . ":</b><br>" . _REQUIRED . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"user_email\" value=\"{$userinfo['user_email']}\" size=\"50\" maxlength=\"255\"><br>" . _EMAILNOTPUBLIC . "</td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _UFAKEMAIL . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"femail\" value=\"{$userinfo['femail']}\" size=\"50\" maxlength=\"255\"><br>" . _EMAILPUBLIC . "</td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _REGNEWUSERTYPE . ":</b><br>" . _REQUIRED . "</td>" . "<td bgcolor='{$bgcolor3}'><select name=\"usertype\" size=1>" . getUserTypesOptionsWithSelected($userinfo[usertype]) . "</select></td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _REGNEWUSERGRADYEAR . ":</b><br>" . _REQUIRED . "</td>"; echo "<td bgcolor='{$bgcolor3}'><select name=\"gradyear\" size=1>" . getGraduationYears($userinfo[gradyear]) . "</select></td></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _SPECIALIZATION . ":</b><br>" . _REQUIRED . "</td>"; echo "<td bgcolor='{$bgcolor3}'><select name=\"specialization\" size=1>" . getSpecializationOptions($userinfo[specialization]) . "</select></td></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _SEX . ":</b><br>" . _OPTIONAL . "</td>"; echo "<td bgcolor='{$bgcolor3}'><select name=\"sex\" size=1>" . getSexTypesOptionsWithSelected($userinfo[sex]) . "</select></td></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _DOB . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"dob\" value=\"{$userinfo['dob']}\" size=\"12\" maxlength=\"10\"></td></tr>\n"; // is Married echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _MARTIALSTATUS . "</b></td><td bgcolor='{$bgcolor3}'>"; if ($userinfo[is_married] == 1) { echo "<input type=\"radio\" name=\"is_married\" value=\"1\" checked>" . _YES . " "; echo "<input type=\"radio\" name=\"is_married\" value=\"0\">" . _NO . ""; } else { echo "<input type=\"radio\" name=\"is_married\" value=\"1\">" . _YES . " "; echo "<input type=\"radio\" name=\"is_married\" value=\"0\" checked>" . _NO . ""; } echo "</td></tr>"; echo "" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _REGNEWUSERCOMPANY . ":</b><br>" . _REQUIRED . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"company\" value=\"{$userinfo['company']}\" size=\"50\" maxlength=\"50\"></td></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _REGNEWUSERDESGN . ":</b><br>" . _REQUIRED . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"designation\" value=\"{$userinfo['designation']}\" size=\"50\" maxlength=\"50\"></td></tr>\n" . "<tr><td bgcolor='{$bgcolor2}' colspan=2 align='center'><b>" . _COMPANYADDRESS . ":</b></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _ADDRESS1 . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"Company_Address_1\" value=\"{$userinfo['Company_Address_1']}\" size=\"50\" maxlength=\"50\"></td></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _ADDRESS2 . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"Company_Address_2\" value=\"{$userinfo['Company_Address_2']}\" size=\"50\" maxlength=\"50\"></td></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _CITY . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"Company_Address_CITY\" value=\"{$userinfo['Company_Address_CITY']}\" size=\"50\" maxlength=\"30\"></td></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _STATE . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"Company_Address_STATE\" value=\"{$userinfo['Company_Address_STATE']}\" size=\"50\" maxlength=\"30\"></td></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _COUNTRY . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><select name=\"Company_Address_COUNTRY\" size=1>" . getCountryOptionsWithSelectedOption($userinfo[Company_Address_COUNTRY]) . "</select></td></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _ZIP . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"Company_Address_ZIP\" value=\"{$userinfo['Company_Address_ZIP']}\" size=\"50\" maxlength=\"30\"></td></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _MOBILE . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"Company_Address_MOBILE\" value=\"{$userinfo['Company_Address_MOBILE']}\" size=\"50\" maxlength=\"30\"></td></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _PHONE . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"Company_Address_PHONE\" value=\"{$userinfo['Company_Address_PHONE']}\" size=\"50\" maxlength=\"30\"></td></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _FAX . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"Company_Address_FAX\" value=\"{$userinfo['Company_Address_FAX']}\" size=\"50\" maxlength=\"30\"></td></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _EMAIL . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"Company_Address_EMAIL\" value=\"{$userinfo['Company_Address_EMAIL']}\" size=\"50\" maxlength=\"50\"></td></tr>\n" . "<tr><td bgcolor='{$bgcolor2}' colspan=2 align='center'><b>" . _PERMANENTADDRESS . ":</b></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _ADDRESS1 . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"PERMANENT_Address_1\" value=\"{$userinfo['PERMANENT_Address_1']}\" size=\"50\" maxlength=\"50\"></td></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _ADDRESS2 . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"PERMANENT_Address_2\" value=\"{$userinfo['PERMANENT_Address_2']}\" size=\"50\" maxlength=\"50\"></td></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _CITY . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"PERMANENT_Address_CITY\" value=\"{$userinfo['PERMANENT_Address_CITY']}\" size=\"50\" maxlength=\"30\"></td></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _STATE . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"PERMANENT_Address_STATE\" value=\"{$userinfo['PERMANENT_Address_STATE']}\" size=\"50\" maxlength=\"30\"></td></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _COUNTRY . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><select name=\"PERMANENT_Address_COUNTRY\" size=1>" . getCountryOptionsWithSelectedOption($userinfo[PERMANENT_Address_COUNTRY]) . "</select></td></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _ZIP . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"PERMANENT_Address_ZIP\" value=\"{$userinfo['PERMANENT_Address_ZIP']}\" size=\"50\" maxlength=\"30\"></td></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _MOBILE . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"PERMANENT_Address_MOBILE\" value=\"{$userinfo['PERMANENT_Address_MOBILE']}\" size=\"50\" maxlength=\"30\"></td></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _PHONE . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"PERMANENT_Address_PHONE\" value=\"{$userinfo['PERMANENT_Address_PHONE']}\" size=\"50\" maxlength=\"30\"></td></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _FAX . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"PERMANENT_Address_FAX\" value=\"{$userinfo['PERMANENT_Address_FAX']}\" size=\"50\" maxlength=\"30\"></td></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _EMAIL . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"PERMANENT_Address_EMAIL\" value=\"{$userinfo['PERMANENT_Address_EMAIL']}\" size=\"50\" maxlength=\"50\"></td></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _YICQ . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"user_icq\" value=\"{$userinfo['user_icq']}\" size=\"30\" maxlength=\"100\"></td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _YAIM . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"user_aim\" value=\"{$userinfo['user_aim']}\" size=\"30\" maxlength=\"100\"></td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _YYIM . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"user_yim\" value=\"{$userinfo['user_yim']}\" size=\"30\" maxlength=\"100\"></td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _YMSNM . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"user_msnm\" value=\"{$userinfo['user_msnm']}\" size=\"30\" maxlength=\"100\"></td></tr>" . "<tr><td bgcolor='{$bgcolor2}' colspan=2 align='center'><b>" . _ALUMNIPREFERENCES . ":</b></tr>\n"; // DASF Membership echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _DASFMEMBER . "</b></td><td bgcolor='{$bgcolor3}'>"; if ($userinfo[dasf_member] == 1) { echo "<input type=\"radio\" name=\"dasf_member\" value=\"1\" checked>" . _YES . " " . "<input type=\"radio\" name=\"dasf_member\" value=\"0\">" . _NO . ""; } else { echo "<input type=\"radio\" name=\"dasf_member\" value=\"1\">" . _YES . " " . "<input type=\"radio\" name=\"dasf_member\" value=\"0\" checked>" . _NO . ""; } echo "</td></tr>"; // GUESTLECTURESOK echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _GUESTLECTURESOK . "</b></td><td bgcolor='{$bgcolor3}'>"; if ($userinfo[guest_lectures_ok] == 1) { echo "<input type=\"radio\" name=\"guest_lectures_ok\" value=\"1\" checked>" . _YES . " " . "<input type=\"radio\" name=\"guest_lectures_ok\" value=\"0\">" . _NO . ""; } else { echo "<input type=\"radio\" name=\"guest_lectures_ok\" value=\"1\">" . _YES . " " . "<input type=\"radio\" name=\"guest_lectures_ok\" value=\"0\" checked>" . _NO . ""; } echo "</td></tr>"; // GUEST LECTURE TOPICS echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _GUESTLECTURESTOPICS . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><textarea wrap=\"virtual\" cols=\"50\" rows=\"3\" name=\"guest_lectures_topics\">{$userinfo['guest_lectures_topics']}</textarea><br>150 characters max</td></tr>"; // SUMMERPROJECTSOK echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _SUMMERPROJECTSOK . "</b></td><td bgcolor='{$bgcolor3}'>"; if ($userinfo[summer_projects_ok] == 1) { echo "<input type=\"radio\" name=\"summer_projects_ok\" value=\"1\" checked>" . _YES . " " . "<input type=\"radio\" name=\"summer_projects_ok\" value=\"0\">" . _NO . ""; } else { echo "<input type=\"radio\" name=\"summer_projects_ok\" value=\"1\">" . _YES . " " . "<input type=\"radio\" name=\"summer_projects_ok\" value=\"0\" checked>" . _NO . ""; } echo "</td></tr>"; //PLACEMENTSOK echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _PLACEMENTSOK . "</b></td><td bgcolor='{$bgcolor3}'>"; if ($userinfo[placements_ok] == 1) { echo "<input type=\"radio\" name=\"placements_ok\" value=\"1\" checked>" . _YES . " " . "<input type=\"radio\" name=\"placements_ok\" value=\"0\">" . _NO . ""; } else { echo "<input type=\"radio\" name=\"placements_ok\" value=\"1\">" . _YES . " " . "<input type=\"radio\" name=\"placements_ok\" value=\"0\" checked>" . _NO . ""; } echo "</td></tr>"; //FINANCIALAID echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _FINANCIALAID . "</b></td><td bgcolor='{$bgcolor3}'>"; if ($userinfo[placements_ok] == 1) { echo "<input type=\"radio\" name=\"financial_help_ok\" value=\"1\" checked>" . _YES . " " . "<input type=\"radio\" name=\"financial_help_ok\" value=\"0\">" . _NO . ""; } else { echo "<input type=\"radio\" name=\"financial_help_ok\" value=\"1\">" . _YES . " " . "<input type=\"radio\" name=\"financial_help_ok\" value=\"0\" checked>" . _NO . ""; } echo "</td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}' colspan=2 align='center'><b>" . _PERSONALPREFERENCES . ":</b></tr>\n" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _YOURHOMEPAGE . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><input type=\"text\" name=\"user_website\" value=\"{$userinfo['user_website']}\" size=\"50\" maxlength=\"255\"></td></tr>"; //FIX:DOMSNITT /* echo "<tr><td bgcolor='$bgcolor2'><b>"._YICQ.":</b><br>"._OPTIONAL."</td>" ."<td bgcolor='$bgcolor3'><input type=\"text\" name=\"user_icq\" value=\"$userinfo[user_icq]\" size=\"30\" maxlength=\"100\"></td></tr>" ."<tr><td bgcolor='$bgcolor2'><b>"._YAIM.":</b><br>"._OPTIONAL."</td>" ."<td bgcolor='$bgcolor3'><input type=\"text\" name=\"user_aim\" value=\"$userinfo[user_aim]\" size=\"30\" maxlength=\"100\"></td></tr>" ."<tr><td bgcolor='$bgcolor2'><b>"._YYIM.":</b><br>"._OPTIONAL."</td>" ."<td bgcolor='$bgcolor3'><input type=\"text\" name=\"user_yim\" value=\"$userinfo[user_yim]\" size=\"30\" maxlength=\"100\"></td></tr>" ."<tr><td bgcolor='$bgcolor2'><b>"._YMSNM.":</b><br>"._OPTIONAL."</td>" ."<td bgcolor='$bgcolor3'><input type=\"text\" name=\"user_msnm\" value=\"$userinfo[user_msnm]\" size=\"30\" maxlength=\"100\"></td></tr>" ."<tr><td bgcolor='$bgcolor2'><b>"._YLOCATION.":</b><br>"._OPTIONAL."</td>" ."<td bgcolor='$bgcolor3'><input type=\"text\" name=\"user_from\" value=\"$userinfo[user_from]\" size=\"30\" maxlength=\"100\"></td></tr>" ."<tr><td bgcolor='$bgcolor2'><b>"._YOCCUPATION.":</b><br>"._OPTIONAL."</td>" ."<td bgcolor='$bgcolor3'><input type=\"text\" name=\"user_occ\" value=\"$userinfo[user_occ]\" size=\"30\" maxlength=\"100\"></td></tr>" ."<tr><td bgcolor='$bgcolor2'><b>"._YINTERESTS.":</b><br>"._OPTIONAL."</td>" ."<td bgcolor='$bgcolor3'><input type=\"text\" name=\"user_interests\" value=\"$userinfo[user_interests]\" size=\"30\" maxlength=\"100\"></td></tr>"; */ //FIX:DOMSNITT echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _RECEIVENEWSLETTER . "</b></td><td bgcolor='{$bgcolor3}'>"; if ($userinfo[newsletter] == 1) { echo "<input type=\"radio\" name=\"newsletter\" value=\"1\" checked>" . _YES . " " . "<input type=\"radio\" name=\"newsletter\" value=\"0\">" . _NO . ""; } elseif ($userinfo[newsletter] == 0) { echo "<input type=\"radio\" name=\"newsletter\" value=\"1\">" . _YES . " " . "<input type=\"radio\" name=\"newsletter\" value=\"0\" checked>" . _NO . ""; } echo "</td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _ALWAYSSHOWEMAIL . ":</b></td><td bgcolor='{$bgcolor3}'>"; if ($userinfo[user_viewemail] == 1) { echo "<input type=\"radio\" name=\"user_viewemail\" value=\"1\" checked>" . _YES . " " . "<input type=\"radio\" name=\"user_viewemail\" value=\"0\">" . _NO . ""; } elseif ($userinfo[user_viewemail] == 0) { echo "<input type=\"radio\" name=\"user_viewemail\" value=\"1\">" . _YES . " " . "<input type=\"radio\" name=\"user_viewemail\" value=\"0\" checked>" . _NO . ""; } echo "</td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _HIDEONLINE . ":</b></td><td bgcolor='{$bgcolor3}'>"; if ($userinfo[user_allow_viewonline] == 1) { echo "<input type=\"radio\" name=\"user_allow_viewonline\" value=\"0\">" . _YES . " " . "<input type=\"radio\" name=\"user_allow_viewonline\" value=\"1\" checked>" . _NO . ""; } elseif ($userinfo[user_allow_viewonline] == 0) { echo "<input type=\"radio\" name=\"user_allow_viewonline\" value=\"0\" checked>" . _YES . " " . "<input type=\"radio\" name=\"user_allow_viewonline\" value=\"1\">" . _NO . ""; } echo "</td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _REPLYNOTIFY . ":</b><br>" . _REPLYNOTIFYMSG . "</td><td bgcolor='{$bgcolor3}'>"; if ($userinfo[user_notify] == 1) { echo "<input type=\"radio\" name=\"user_notify\" value=\"1\" checked>" . _YES . " " . "<input type=\"radio\" name=\"user_notify\" value=\"0\">" . _NO . ""; } elseif ($userinfo[user_notify] == 0) { echo "<input type=\"radio\" name=\"user_notify\" value=\"1\">" . _YES . " " . "<input type=\"radio\" name=\"user_notify\" value=\"0\" checked>" . _NO . ""; } echo "</td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _PMNOTIFY . ":</b></td><td bgcolor='{$bgcolor3}'>"; if ($userinfo[user_notify_pm] == 1) { echo "<input type=\"radio\" name=\"user_notify_pm\" value=\"1\" checked>" . _YES . " " . "<input type=\"radio\" name=\"user_notify_pm\" value=\"0\">" . _NO . ""; } elseif ($userinfo[user_notify_pm] == 0) { echo "<input type=\"radio\" name=\"user_notify_pm\" value=\"1\">" . _YES . " " . "<input type=\"radio\" name=\"user_notify_pm\" value=\"0\" checked>" . _NO . ""; } echo "</td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _POPPM . ":</b><br>" . _POPPMMSG . "</td><td bgcolor='{$bgcolor3}'>"; if ($userinfo[user_popup_pm] == 1) { echo "<input type=\"radio\" name=\"user_popup_pm\" value=\"1\" checked>" . _YES . " " . "<input type=\"radio\" name=\"user_popup_pm\" value=\"0\">" . _NO . ""; } elseif ($userinfo[user_popup_pm] == 0) { echo "<input type=\"radio\" name=\"user_popup_pm\" value=\"1\">" . _YES . " " . "<input type=\"radio\" name=\"user_popup_pm\" value=\"0\" checked>" . _NO . ""; } echo "</td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _ATTACHSIG . ":</b></td><td bgcolor='{$bgcolor3}'>"; if ($userinfo[user_attachsig] == 1) { echo "<input type=\"radio\" name=\"user_attachsig\" value=\"1\" checked>" . _YES . " " . "<input type=\"radio\" name=\"user_attachsig\" value=\"0\">" . _NO . ""; } elseif ($userinfo[user_attachsig] == 0) { echo "<input type=\"radio\" name=\"user_attachsig\" value=\"1\">" . _YES . " " . "<input type=\"radio\" name=\"user_attachsig\" value=\"0\" checked>" . _NO . ""; } echo "</td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _ALLOWBBCODE . "</b></td><td bgcolor='{$bgcolor3}'>"; if ($userinfo[user_allowbbcode] == 1) { echo "<input type=\"radio\" name=\"user_allowbbcode\" value=\"1\" checked>" . _YES . " " . "<input type=\"radio\" name=\"user_allowbbcode\" value=\"0\">" . _NO . ""; } elseif ($userinfo[user_allowbbcode] == 0) { echo "<input type=\"radio\" name=\"user_allowbbcode\" value=\"1\">" . _YES . " " . "<input type=\"radio\" name=\"user_allowbbcode\" value=\"0\" checked>" . _NO . ""; } echo "</td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _ALLOWHTMLCODE . "</b></td><td bgcolor='{$bgcolor3}'>"; if ($userinfo[user_allowhtml] == 1) { echo "<input type=\"radio\" name=\"user_allowhtml\" value=\"1\" checked>" . _YES . " " . "<input type=\"radio\" name=\"user_allowhtml\" value=\"0\">" . _NO . ""; } elseif ($userinfo[user_allowhtml] == 0) { echo "<input type=\"radio\" name=\"user_allowhtml\" value=\"1\">" . _YES . " " . "<input type=\"radio\" name=\"user_allowhtml\" value=\"0\" checked>" . _NO . ""; } echo "</td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _ALLOWSMILIES . "</b></td><td bgcolor='{$bgcolor3}'>"; if ($userinfo[user_allowsmile] == 1) { echo "<input type=\"radio\" name=\"user_allowsmile\" value=\"1\" checked>" . _YES . " " . "<input type=\"radio\" name=\"user_allowsmile\" value=\"0\">" . _NO . ""; } elseif ($userinfo[user_allowsmile] == 0) { echo "<input type=\"radio\" name=\"user_allowsmile\" value=\"1\">" . _YES . " " . "<input type=\"radio\" name=\"user_allowsmile\" value=\"0\" checked>" . _NO . ""; } echo "</td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _FORUMSTIME . "</b></td><td bgcolor='{$bgcolor3}'>"; echo "<select name='user_timezone'>"; for ($i = -12; $i < 13; $i++) { if ($i == 0) { $dummy = "GMT"; } else { if (!ereg("-", $i)) { $i = "+{$i}"; } $dummy = "GMT {$i} " . _HOURS . ""; } if ($userinfo[user_timezone] == $i) { echo "<option name=\"user_timezone\" value=\"{$i}\" selected>{$dummy}</option>"; } else { echo "<option name=\"user_timezone\" value=\"{$i}\">{$dummy}</option>"; } } echo "</select>"; echo "</td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _FORUMSDATE . ":</b><br>" . _FORUMSDATEMSG . "</b></td><td bgcolor='{$bgcolor3}'>"; echo "<input size='15' maxlength='14' type=\"text\" name=\"user_dateformat\" value=\"{$userinfo['user_dateformat']}\">"; echo "</td></tr>"; echo "<tr><td bgcolor='{$bgcolor2}'><b>" . _SIGNATURE . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><textarea wrap=\"virtual\" cols=\"50\" rows=\"5\" name=\"user_sig\">{$userinfo['user_sig']}</textarea><br>" . _255CHARMAX . "</td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _EXTRAINFO . ":</b><br>" . _OPTIONAL . "</td>" . "<td bgcolor='{$bgcolor3}'><textarea wrap=\"virtual\" cols=\"50\" rows=\"5\" name=\"bio\">{$userinfo['bio']}</textarea><br>" . _CANKNOWABOUT . "</td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>" . _PASSWORD . "</b>:</td><br>" . "<td bgcolor='{$bgcolor3}'><input type=\"password\" name=\"user_password\" size=\"22\" maxlength=\"20\"> <input type=\"password\" name=\"vpass\" size=\"22\" maxlength=\"20\"><br>" . _TYPENEWPASSWORD . "</td></tr>" . "<tr><td bgcolor='{$bgcolor3}' colspan='2' align='center'>" . "<input type=\"hidden\" name=\"username\" value=\"{$userinfo['username']}\">" . "<input type=\"hidden\" name=\"user_id\" value=\"{$userinfo['user_id']}\">" . "<input type=\"hidden\" name=\"op\" value=\"saveuser\">" . "<input class=button type=\"submit\" value=\"" . _SAVECHANGES . "\">" . "</form></td></tr>"; $avatar_category = !empty($HTTP_POST_VARS['avatarcategory']) ? $HTTP_POST_VARS['avatarcategory'] : ''; $direktori = "modules/Forums/images/avatars"; $dir = @opendir($direktori); $avatar_images = array(); while ($file = @readdir($dir)) { if ($file != '.' && $file != '..' && !is_file($direktori . '/' . $file) && !is_link($direktori . '/' . $file)) { $sub_dir = @opendir($direktori . '/' . $file); $avatar_row_count = 0; $avatar_col_count = 0; while ($sub_file = @readdir($sub_dir)) { if (preg_match('/(\\.gif$|\\.png$|\\.jpg|\\.jpeg)$/is', $sub_file)) { $avatar_images[$file][$avatar_row_count][$avatar_col_count] = $file . '/' . $sub_file; $avatar_name[$file][$avatar_row_count][$avatar_col_count] = ucfirst(str_replace("_", " ", preg_replace('/^(.*)\\..*$/', '\\1', $sub_file))); $avatar_col_count++; if ($avatar_col_count == 5) { $avatar_row_count++; $avatar_col_count = 0; } } } } } @closedir($dir); @ksort($avatar_images); @reset($avatar_images); if (empty($category)) { list($category, ) = each($avatar_images); } @reset($avatar_images); $s_categories = '<select name="avatarcategory">'; while (list($key) = each($avatar_images)) { $selected = $key == $category ? ' selected="selected"' : ''; if (count($avatar_images[$key])) { $s_categories .= '<option value="' . $key . '"' . $selected . '>' . ucfirst($key) . '</option>'; } } $s_categories .= '</select>'; $sql = "SELECT * FROM " . $prefix . "_bbconfig"; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $board_config[$row['config_name']] = $row['config_value']; } if ($userinfo[user_avatar_type] == 1) { $userinfo[user_avatar] = $board_config['avatar_path'] . "/" . $userinfo[user_avatar]; } elseif ($userinfo[user_avatar_type] == 2) { $userinfo[user_avatar] = $userinfo[user_avatar]; } else { $userinfo[user_avatar] = $board_config[avatar_gallery_path] . "/" . $userinfo[user_avatar]; } echo "<tr><td bgcolor='{$bgcolor3}' colspan='2' align='center'>" . "<BR><b><h5>Avatar control panel</h5></b>" . "<tr><td bgcolor='{$bgcolor2}'>Displays a small graphic image below your details in forum posts and on your profile. Only one image can be displayed at a time, its width can be no greater than " . $board_config['avatar_max_width'] . " pixels, the height no greater than " . $board_config['avatar_max_height'] . " pixels, and the file size no more than " . CoolSize($board_config['avatar_filesize']) . ".</td>"; echo "<td bgcolor='{$bgcolor3}' align=center>Current Avatar<BR><IMG alt=\"\" src=\"{$userinfo['user_avatar']}\" width=\"40\" height=\"50\"></td></tr><BR>"; if ($board_config['allow_avatar_local']) { echo "<form action=\"modules.php?name=Your_Account&op=avatarlist\" method=\"post\">" . "<tr><td bgcolor='{$bgcolor2}'><b>Select Avatar from gallery:</b></td>" . "<td bgcolor='{$bgcolor3}'>" . $s_categories . " <img src=\"images/right.gif\" align=middle> <INPUT class=button type=submit value=\"Show Gallery\"></td></tr>" . "</form>"; } else { echo "<tr><td bgcolor='{$bgcolor2}'><b>Select Avatar from gallery:</b></td>" . "<td bgcolor='{$bgcolor3}'><b>Gallery Avatars Currently Disabled</b></td></tr>"; } if ($board_config['allow_avatar_upload']) { echo "<tr><td bgcolor='{$bgcolor2}'><b>Upload Avatar from your machine:</b></td>" . "<td bgcolor='{$bgcolor3}'><a href=\"modules.php?name=Forums&file=profile&mode=editprofile\"><b>Upload Through Forum Profile</b></a></td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>Upload Avatar from a URL:</b><br><SPAN class=gensmall>Enter the URL of the location containing the Avatar image and click on the submit button below, the Avatar image will be copied to this site.</SPAN></td>" . "<td bgcolor='{$bgcolor3}'><a href=\"modules.php?name=Forums&file=profile&mode=editprofile\"><b>Upload Through Forum Profile</b></a></td></tr>"; } else { echo "<tr><td bgcolor='{$bgcolor2}'><b>Upload Avatar from your machine:</b></td>" . "<td bgcolor='{$bgcolor3}'><b>Currently Disabled</b></td></tr>" . "<tr><td bgcolor='{$bgcolor2}'><b>Upload Avatar from a URL:</b><br><SPAN class=gensmall>Enter the URL of the location containing the Avatar image and click on the submit button below, the Avatar image will be copied to this site.</SPAN></td>" . "<td bgcolor='{$bgcolor3}'><b>Currently Disabled</b></td></tr>"; } if ($board_config['allow_avatar_remote']) { echo "<form action=\"modules.php?name=Your_Account&op=avatarlinksave\" method=\"post\">" . "<tr><td bgcolor='{$bgcolor2}'><b>Link to off-site Avatar:</b><br><SPAN class=gensmall>Enter the URL of the location containing the Avatar image you wish to link to and click on the submit button below.</SPAN></td>" . "<td bgcolor='{$bgcolor3}'><INPUT class=post style=\"WIDTH: 200px\" size=40 name=avatar></td></tr>"; } else { echo "<tr><td bgcolor='{$bgcolor2}'><b>Link to off-site Avatar:</b><br><SPAN class=gensmall>Enter the URL of the location containing the Avatar image you wish to link to and click on the submit button below.</SPAN></td>" . "<td bgcolor='{$bgcolor3}'><b>Currently Disabled</b></td></tr>"; } echo "<tr><td bgcolor='{$bgcolor3}' colspan='2' align='center'>" . "<INPUT class=mainoption type=submit value=Submit>" . "</form></TD></TR></TABLE>"; CloseTable(); include "footer.php"; } else { main($user); } }
function viewdownloaddetails() { global $downloadsprefix, $db, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $module_name; global $useoutsidevoting, $detailvotedecimal, $outsideweight, $anonymous, $userinfo; $lid = intval($_GET['lid']); include "header.php"; downl_menu_tpl(1); $voteresult = $db->sql_query("SELECT rating, ratinguser, ratingcomments FROM " . $downloadsprefix . "_votedata WHERE ratinglid = {$lid}"); $totalvotesDB = $db->sql_numrows($voteresult); $anonvotes = 0; $anonvoteval = 0; $outsidevotes = 0; $outsidevoteeval = 0; $regvoteval = 0; $topanon = 0; $bottomanon = 11; $topreg = 0; $bottomreg = 11; $topoutside = 0; $bottomoutside = 11; $avv = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $rvv = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $ovv = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $truecomments = $totalvotesDB; while (list($ratingDB, $ratinguserDB, $ratingcommentsDB) = $db->sql_fetchrow($voteresult)) { if ($ratingcommentsDB == "") { $truecomments--; } if ($ratinguserDB == $anonymous) { $anonvotes++; $anonvoteval += $ratingDB; } if ($useoutsidevoting == 1) { if ($ratinguserDB == 'outside') { $outsidevotes++; $outsidevoteval += $ratingDB; } } else { $outsidevotes = 0; } if ($ratinguserDB != $anonymous && $ratinguserDB != "outside") { $regvoteval += $ratingDB; } if ($ratinguserDB != $anonymous && $ratinguserDB != "outside") { if ($ratingDB > $topreg) { $topreg = $ratingDB; } if ($ratingDB < $bottomreg) { $bottomreg = $ratingDB; } for ($rcounter = 1; $rcounter < 11; $rcounter++) { if ($ratingDB == $rcounter) { $rvv[$rcounter]++; } } } if ($ratinguserDB == $anonymous) { if ($ratingDB > $topanon) { $topanon = $ratingDB; } if ($ratingDB < $bottomanon) { $bottomanon = $ratingDB; } for ($rcounter = 1; $rcounter < 11; $rcounter++) { if ($ratingDB == $rcounter) { $avv[$rcounter]++; } } } if ($ratinguserDB == "outside") { if ($ratingDB > $topoutside) { $topoutside = $ratingDB; } if ($ratingDB < $bottomoutside) { $bottomoutside = $ratingDB; } for ($rcounter = 1; $rcounter < 11; $rcounter++) { if ($ratingDB == $rcounter) { $ovv[$rcounter]++; } } } } $regvotes = $totalvotesDB - $anonvotes - $outsidevotes; if ($totalvotesDB == 0) { $finalrating = 0; } else { if ($anonvotes == 0 && $regvotes == 0) { /* Figure Outside Only Vote */ $finalrating = $outsidevoteval / $outsidevotes; $finalrating = number_format($finalrating, $detailvotedecimal); $avgOU = $outsidevoteval / $totalvotesDB; $avgOU = number_format($avgOU, $detailvotedecimal); } else { if ($outsidevotes == 0 && $regvotes == 0) { /* Figure Anon Only Vote */ $finalrating = $anonvoteval / $anonvotes; $finalrating = number_format($finalrating, $detailvotedecimal); $avgAU = $anonvoteval / $totalvotesDB; $avgAU = number_format($avgAU, $detailvotedecimal); } else { if ($outsidevotes == 0 && $anonvotes == 0) { /* Figure Reg Only Vote */ $finalrating = $regvoteval / $regvotes; $finalrating = number_format($finalrating, $detailvotedecimal); $avgRU = $regvoteval / $totalvotesDB; $avgRU = number_format($avgRU, $detailvotedecimal); } else { if ($regvotes == 0 && $useoutsidevoting == 1 && $outsidevotes != 0 && $anonvotes != 0) { /* Figure Reg and Anon Mix */ $avgAU = $anonvoteval / $anonvotes; $avgOU = $outsidevoteval / $outsidevotes; if ($anonweight > $outsideweight) { /* Anon is 'standard weight' */ $newimpact = $anonweight / $outsideweight; $impactAU = $anonvotes; $impactOU = $outsidevotes / $newimpact; } else { /* Outside is 'standard weight' */ $newimpact = $outsideweight / $anonweight; $impactOU = $outsidevotes; $impactAU = $anonvotes / $newimpact; } $finalrating = ($avgOU * $impactOU + $avgAU * $impactAU) / ($impactAU + $impactOU); $finalrating = number_format($finalrating, $detailvotedecimal); } else { /* REG User vs. Anonymous vs. Outside User Weight Calutions */ $impact = $anonweight; $outsideimpact = $outsideweight; if ($regvotes == 0) { $avgRU = 0; } else { $avgRU = $regvoteval / $regvotes; } if ($anonvotes == 0) { $avgAU = 0; } else { $avgAU = $anonvoteval / $anonvotes; } if ($outsidevotes == 0) { $avgOU = 0; } else { $avgOU = $outsidevoteval / $outsidevotes; } $impactRU = $regvotes; $impactAU = $anonvotes / $impact; $impactOU = $outsidevotes / $outsideimpact; $finalrating = ($avgRU * $impactRU + $avgAU * $impactAU + $avgOU * $impactOU) / ($impactRU + $impactAU + $impactOU); $finalrating = number_format($finalrating, $detailvotedecimal); } } } } } if (!isset($avgO)) { $avgOU = ""; } else { $avgOU = number_format($avgOU, $detailvotedecimal); } if (!isset($avgRU)) { $avgRU = ""; } else { $avgRU = number_format($avgRU, $detailvotedecimal); } if (!isset($avgAU)) { $avgAU = ""; } else { $avgAU = number_format($avgAU, $detailvotedecimal); } if ($topanon == 0) { $topanon = ""; } if ($bottomanon == 11) { $bottomanon = ""; } if ($topreg == 0) { $topreg = ""; } if ($bottomreg == 11) { $bottomreg = ""; } if ($topoutside == 0) { $topoutside = ""; } if ($bottomoutside == 11) { $bottomoutside = ""; } $totalchartheight = 70; $chartunits = $totalchartheight / 10; $avvper = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $rvvper = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $ovvper = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $avvpercent = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $rvvpercent = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $ovvpercent = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $avvchartheight = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $rvvchartheight = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $ovvchartheight = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $avvmultiplier = 0; $rvvmultiplier = 0; $ovvmultiplier = 0; for ($rcounter = 1; $rcounter < 11; $rcounter++) { if ($anonvotes != 0) { $avvper[$rcounter] = $avv[$rcounter] / $anonvotes; } if ($regvotes != 0) { $rvvper[$rcounter] = $rvv[$rcounter] / $regvotes; } if ($outsidevotes != 0) { $ovvper[$rcounter] = $ovv[$rcounter] / $outsidevotes; } $avvpercent[$rcounter] = number_format($avvper[$rcounter] * 100, 1); $rvvpercent[$rcounter] = number_format($rvvper[$rcounter] * 100, 1); $ovvpercent[$rcounter] = number_format($ovvper[$rcounter] * 100, 1); if ($avv[$rcounter] > $avvmultiplier) { $avvmultiplier = $avv[$rcounter]; } if ($rvv[$rcounter] > $rvvmultiplier) { $rvvmultiplier = $rvv[$rcounter]; } if ($ovv[$rcounter] > $ovvmultiplier) { $ovvmultiplier = $ovv[$rcounter]; } } if ($avvmultiplier != 0) { $avvmultiplier = 10 / $avvmultiplier; } if ($rvvmultiplier != 0) { $rvvmultiplier = 10 / $rvvmultiplier; } if ($ovvmultiplier != 0) { $ovvmultiplier = 10 / $ovvmultiplier; } for ($rcounter = 1; $rcounter < 11; $rcounter++) { $avvchartheight[$rcounter] = $avv[$rcounter] * $avvmultiplier * $chartunits; $rvvchartheight[$rcounter] = $rvv[$rcounter] * $rvvmultiplier * $chartunits; $ovvchartheight[$rcounter] = $ovv[$rcounter] * $ovvmultiplier * $chartunits; if ($avvchartheight[$rcounter] == 0) { $avvchartheight[$rcounter] = 1; } if ($rvvchartheight[$rcounter] == 0) { $rvvchartheight[$rcounter] = 1; } if ($ovvchartheight[$rcounter] == 0) { $ovvchartheight[$rcounter] = 1; } } $res = $db->sql_query("SELECT cid, date, hits, name, email, description, filesize, version, homepage, title FROM " . $downloadsprefix . "_downloads WHERE lid='{$lid}'"); list($cid, $time, $hits, $auth_name, $email, $description, $filesize, $version, $homepage, $ttitle) = $db->sql_fetchrow($res); $displaytitle = $ttitle; echo '<br />'; OpenTable(); echo "<center><font class=\"title\">" . _DOWNLOADPROFILE . ": <A HREF=\"" . getlink("&d_op=getit&lid={$lid}") . "\">{$displaytitle}</A>"; newdownloadgraphic(L10NTime::date('d-M-Y', $time . ' 00:00:00', $userinfo['user_dst'], $userinfo['user_timezone'])); popgraphic($hits); detecteditorial($lid, 1); $catResult = $db->sql_query("select title,cdescription,ldescription,parentid from " . $downloadsprefix . "_categories where cid='{$cid}'"); list($catTitle, $cdescription, $ldescription, $parentid) = $db->sql_fetchrow($catResult); $catTitle = getparent($parentid, $catTitle); $catTitle = _MAIN . "/{$catTitle}"; echo "</FONT><br /><br /><B>" . _CATEGORY . ":</B> <A HREF=\"" . getlink("&d_op=viewdownload&cid={$cid}") . "\">{$catTitle}</A></B><br />"; $ttitle = ereg_replace(" ", "_", $ttitle); downl_infomenu_tpl($lid, $ttitle); echo "<br /><br /><b><u>" . _DOWNLOADRATINGDET . "</u></b><br />" . "<b>" . _TOTALVOTES . "</B> {$totalvotesDB}<br />" . "<b>" . _OVERALLRATING . ":</B> {$finalrating}<br /><br />" . "<div align=\"justify\" class=\"content\">{$description}</div>"; if ($auth_name == "") { $auth_name = "<i>" . _UNKNOWN . "</i>"; } else { if ($email == "") { $auth_name = "{$auth_name}"; } else { $email = ereg_replace("@", " <i>at</i> ", $email); $email = ereg_replace("\\.", " <i>dot</i> ", $email); $auth_name = "{$auth_name} ({$email})"; } } echo "<br /><b>" . _CREDITS_AUTHORS . ":</b> {$auth_name}<br />" . "<b>" . _VERSION . ":</b> {$version} <b>" . _FILESIZE . ":</b> " . CoolSize($filesize) . "</font><br /><br />" . "[ <b><a href=\"" . getlink("&d_op=getit&lid={$lid}") . "\">" . _DOWNLOADNOW . "</a></b> "; if ($homepage == "" or $homepage == "http://") { echo "]<br /><br />"; } else { echo "| <a href=\"{$homepage}\" target=\"new\">" . _HOMEPAGE . "</a> ]<br /><br />"; } echo "<table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" width=\"455\">" . "<tr><td colspan=\"2\" bgcolor=\"{$bgcolor2}\">" . "<font class=\"content\"><b>" . _REGISTEREDUSERS . "</b></font>" . "</td></tr>" . "<tr>" . "<td bgcolor=\"{$bgcolor1}\">" . "<font class=\"content\">" . _NUMBEROFRATINGS . ": {$regvotes}</font>" . "</td>" . "<td rowspan=\"5\">"; if ($regvotes == 0) { echo "<center><font class=\"content\">" . _NOREGUSERSVOTES . "</font></center>"; } else { echo "<CENTER><table border=\"1\" WIDTH=\"200\">" . "<tr>" . "<td valign=\"top\" align=\"center\" colspan=\"10\" bgcolor=\"{$bgcolor2}\"><font class=\"content\">" . _BREAKDOWNBYVAL . "</font></td>" . "</tr>" . "<tr>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$rvv['1']} " . _LVOTES . " ({$rvvpercent['1']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$rvvchartheight['1']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$rvv['2']} " . _LVOTES . " ({$rvvpercent['2']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$rvvchartheight['2']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$rvv['3']} " . _LVOTES . " ({$rvvpercent['3']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$rvvchartheight['3']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$rvv['4']} " . _LVOTES . " ({$rvvpercent['4']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$rvvchartheight['4']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$rvv['5']} " . _LVOTES . " ({$rvvpercent['5']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$rvvchartheight['5']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$rvv['6']} " . _LVOTES . " ({$rvvpercent['6']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$rvvchartheight['6']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$rvv['7']} " . _LVOTES . " ({$rvvpercent['7']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$rvvchartheight['7']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$rvv['8']} " . _LVOTES . " ({$rvvpercent['8']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$rvvchartheight['8']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$rvv['9']} " . _LVOTES . " ({$rvvpercent['9']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$rvvchartheight['9']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$rvv['10']} " . _LVOTES . " ({$rvvpercent['10']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$rvvchartheight['10']}\"></td>" . "</tr>" . "<tr><td colspan=\"10\" bgcolor=\"{$bgcolor2}\" ALIGN=CENTER>" . "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"200\"><tr>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">1</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">2</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">3</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">4</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">5</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">6</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">7</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">8</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">9</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">10</font></td>" . "</tr></table></CENTER>" . "</td></tr></table>"; } echo "</td>" . "</tr>" . "<tr><td bgcolor=\"{$bgcolor2}\"><font class=\"content\">" . _DOWNLOADRATING . ": {$avgRU}</font></td></tr>" . "<tr><td bgcolor=\"{$bgcolor1}\"><font class=\"content\">" . _HIGHRATING . ": {$topreg}</font></td></tr>" . "<tr><td bgcolor=\"{$bgcolor2}\"><font class=\"content\">" . _LOWRATING . ": {$bottomreg}</font></td></tr>" . "<tr><td bgcolor=\"{$bgcolor1}\"><font class=\"content\">" . _NUMOFCOMMENTS . ": {$truecomments}</font></td></tr>" . "<tr><td></td></tr>"; if (isset($anonweight)) { echo "<tr><td valign=\"top\" colspan=\"2\"><font class=\"tiny\"><br /><br />" . $anonweight . ' ' . _TO . ' 1.</font></td></tr>'; } echo "<tr><td colspan=\"2\" bgcolor=\"{$bgcolor2}\"><font class=\"content\"><b>" . _UNREGISTEREDUSERS . "</b></font></td></tr>" . "<tr><td bgcolor=\"{$bgcolor1}\"><font class=\"content\">" . _NUMBEROFRATINGS . ": {$anonvotes}</font></td>" . "<td rowspan=\"5\">"; if ($anonvotes == 0) { echo "<center><font class=\"content\">" . _NOUNREGUSERSVOTES . "</font></center>"; } else { echo "<CENTER><table border=\"1\" width=\"200\">" . "<tr>" . "<td valign=\"top\" align=\"center\" colspan=\"10\" bgcolor=\"{$bgcolor2}\"><font class=\"content\">" . _BREAKDOWNBYVAL . "</font></td>" . "</tr>" . "<tr>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$avv['1']} " . _LVOTES . " ({$avvpercent['1']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$avvchartheight['1']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$avv['2']} " . _LVOTES . " ({$avvpercent['2']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$avvchartheight['2']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$avv['3']} " . _LVOTES . " ({$avvpercent['3']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$avvchartheight['3']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$avv['4']} " . _LVOTES . " ({$avvpercent['4']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$avvchartheight['4']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$avv['5']} " . _LVOTES . " ({$avvpercent['5']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$avvchartheight['5']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$avv['6']} " . _LVOTES . " ({$avvpercent['6']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$avvchartheight['6']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$avv['7']} " . _LVOTES . " ({$avvpercent['7']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$avvchartheight['7']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$avv['8']} " . _LVOTES . " ({$avvpercent['8']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$avvchartheight['8']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$avv['9']} " . _LVOTES . " ({$avvpercent['9']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$avvchartheight['9']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$avv['10']} " . _LVOTES . " ({$avvpercent['10']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$avvchartheight['10']}\"></td>" . "</tr>" . "<tr><td colspan=\"10\" bgcolor=\"{$bgcolor2}\">" . "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"200\"><tr>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">1</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">2</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">3</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">4</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">5</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">6</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">7</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">8</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">9</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">10</font></td>" . "</tr></table>" . "</td></tr></table></CENTER>"; } echo "</td>" . "</tr>" . "<tr><td bgcolor=\"{$bgcolor2}\"><font class=\"content\">" . _DOWNLOADRATING . ": {$avgAU}</font></td></tr>" . "<tr><td bgcolor=\"{$bgcolor1}\"><font class=\"content\">" . _HIGHRATING . ": {$topanon}</font></td></tr>" . "<tr><td bgcolor=\"{$bgcolor2}\"><font class=\"content\">" . _LOWRATING . ": {$bottomanon}</font></td></tr>" . "<tr><td bgcolor=\"{$bgcolor1}\"><font class=\"content\"> </font></td></tr>"; if (isset($useoutsidevoting) && $useoutsidevoting == 1) { echo "<tr><td valign=top colspan=\"2\"><font class=\"tiny\"><br /><br />" . _WEIGHOUTNOTE . " {$outsideweight} " . _TO . " 1.</font></td></tr>" . "<tr><td colspan=\"2\" bgcolor=\"{$bgcolor2}\"><font class=\"content\"><b>" . _OUTSIDEVOTERS . "</b></font></td></tr>" . "<tr><td bgcolor=\"{$bgcolor1}\"><font class=\"content\">" . _NUMBEROFRATINGS . ": {$outsidevotes}</font></td>" . "<td rowspan=\"5\">"; if ($outsidevotes == 0) { echo "<center><font class=\"content\">" . _NOOUTSIDEVOTES . "</font></center>"; } else { echo "<CENTER><table border=\"1\" width=\"200\">" . "<tr>" . "<td valign=\"top\" align=\"center\" colspan=\"10\" bgcolor=\"{$bgcolor2}\"><font class=\"content\">" . _BREAKDOWNBYVAL . "</font></td>" . "</tr>" . "<tr>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$ovv['1']} " . _LVOTES . " ({$ovvpercent['1']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$ovvchartheight['1']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$ovv['2']} " . _LVOTES . " ({$ovvpercent['2']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$ovvchartheight['2']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$ovv['3']} " . _LVOTES . " ({$ovvpercent['3']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$ovvchartheight['3']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$ovv['4']} " . _LVOTES . " ({$ovvpercent['4']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$ovvchartheight['4']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$ovv['5']} " . _LVOTES . " ({$ovvpercent['5']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$ovvchartheight['5']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$ovv['6']} " . _LVOTES . " ({$ovvpercent['6']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$ovvchartheight['6']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$ovv['7']} " . _LVOTES . " ({$ovvpercent['7']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$ovvchartheight['7']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$ovv['8']} " . _LVOTES . " ({$ovvpercent['8']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$ovvchartheight['8']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$ovv['9']} " . _LVOTES . " ({$ovvpercent['9']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$ovvchartheight['9']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$ovv['10']} " . _LVOTES . " ({$ovvpercent['10']}% " . _LTOTALVOTES . ")\" src=\"modules/{$module_name}/images/blackpixel.gif\" width=\"15\" height=\"{$ovvchartheight['10']}\"></td>" . "</tr>" . "<tr><td colspan=\"10\" bgcolor=\"{$bgcolor2}\">" . "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"200\"><tr>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">1</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">2</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">3</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">4</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">5</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">6</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">7</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">8</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">9</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">10</font></td>" . "</tr></table>" . "</td></tr></table></CENTER>"; } echo "</td>" . "</tr>" . "<tr><td bgcolor=\"{$bgcolor2}\"><font class=\"content\">" . _DOWNLOADRATING . ": {$avgOU}</font></td></tr>" . "<tr><td bgcolor=\"{$bgcolor1}\"><font class=\"content\">" . _HIGHRATING . ": {$topoutside}</font></td></tr>" . "<tr><td bgcolor=\"{$bgcolor2}\"><font class=\"content\">" . _LOWRATING . ": {$bottomoutside}</font></td></tr>" . "<tr><td bgcolor=\"{$bgcolor1}\"><font class=\"content\"> </font></td></tr>"; } echo "</table><br /><br /><center>"; downloadfooter($lid); echo "</center>"; CloseTable(); include "footer.php"; }
function viewdownload() { global $downloadsprefix, $db, $perpage, $module_name, $bgcolor1, $bgcolor3, $show_links_num; $cid = intval($_GET['cid']); $min = isset($_GET['min']) ? intval($_GET['min']) : 0; $orderby = convertorderbyin($_GET['orderby']); $max = $min + $perpage; include "header.php"; $result = $db->sql_query("SELECT title,cdescription,ldescription,parentid FROM " . $downloadsprefix . "_categories WHERE cid={$cid}"); list($title, $cdescription, $ldescription, $parentid) = $db->sql_fetchrow($result); $title = getparentlink($parentid, $title); $title = "<a href=" . getlink() . ">" . _MAIN . "</a>/{$title}"; downl_menu_tpl(1); echo '<br />'; if ($ldescription != '') { OpenTable2(); echo "{$ldescription}"; CloseTable2(); echo '<br />'; } OpenTable(); if ($cdescription != '') { $cdescription = "<br />" . $cdescription; } echo "<center><font class=\"title\"><b>" . _CATEGORY . ": {$title}</b></font>{$cdescription}</center>"; echo "<table border=\"0\" cellspacing=\"10\" cellpadding=\"0\" align=\"center\"><tr>"; $result2 = $db->sql_query("SELECT cid, title, cdescription FROM " . $downloadsprefix . "_categories WHERE parentid={$cid} order by title"); $count = 0; while (list($cid2, $title2, $cdescription2) = $db->sql_fetchrow($result2)) { if ($show_links_num == 1) { $cresult = $db->sql_query("SELECT * FROM " . $downloadsprefix . "_downloads WHERE cid={$cid2}"); $cnumrows = $db->sql_numrows($cresult); $cnumm = " ({$cnumrows})"; } else { $cnum = ""; } if ($cnumrows > 0) { $folder = "modules/Downloads/images/openfolder.gif"; } else { $folder = "modules/Downloads/images/closedfolder.gif"; } if (can_admin('downloads')) { $folderImg = "<A HREF=\"" . adminlink("{$module_name}&mode=DownloadsModCat&cat={$cid2}") . "\"><IMG SRC=\"{$folder}\" BORDER=0 ALT=\"" . _EDIT . "\"></A>"; } else { $folderImg = "<IMG SRC=\"{$folder}\" BORDER=0 ALT=\"{$title2}\">"; } echo "<td valign=\"top\"><font class=\"title\">{$folderImg} <a href=\"" . getlink("&d_op=viewdownload&cid={$cid2}") . "\"><b>{$title2}</b></a></font>{$cnumm}"; categorynewdownloadgraphic($cid2); if ($cdescription2) { echo "<br /><font class=\"content\">{$cdescription2}</font><br />"; } else { echo '<br />'; } $result3 = $db->sql_query("SELECT cid, title FROM " . $downloadsprefix . "_categories WHERE parentid={$cid2} order by title limit 0,3"); $space = 0; while (list($cid3, $title3) = $db->sql_fetchrow($result3)) { if ($space > 0) { echo ", "; } if ($show_links_num == 1) { $cresult2 = $db->sql_query("SELECT * FROM " . $downloadsprefix . "_downloads WHERE cid={$cid3}"); $cnumrows2 = $db->sql_numrows($cresult2); $cnum = " ({$cnumrows2})"; } else { $cnum = ""; } echo "<font class=\"content\"><a href=\"" . getlink("&d_op=viewdownload&cid={$cid3}") . "\">{$title3}</a></font>{$cnum}"; $space++; } if ($count < 1) { echo "</td><td> </td>"; $dum = 1; } $count++; if ($count == 2) { echo "</td></tr><tr>"; $count = 0; $dum = 0; } } if ($dum == 1) { echo "</tr></table>"; } elseif ($dum == 0) { echo "<td></td></tr></table>"; } echo "<hr noshade size=\"1\">"; $orderbyTrans = convertorderbytrans($orderby); echo "<center><font class=\"content\">" . _SORTDOWNLOADSBY . ": " . _TITLE . " (<a href=\"" . getlink("&d_op=viewdownload&cid={$cid}&orderby=titleA") . "\">A</a>\\<a href=\"" . getlink("&d_op=viewdownload&cid={$cid}&orderby=titleD") . "\">D</a>) " . _DATE . " (<a href=\"" . getlink("&d_op=viewdownload&cid={$cid}&orderby=dateA") . "\">A</a>\\<a href=\"" . getlink("&d_op=viewdownload&cid={$cid}&orderby=dateD") . "\">D</a>) " . _RATING . " (<a href=\"" . getlink("&d_op=viewdownload&cid={$cid}&orderby=ratingA") . "\">A</a>\\<a href=\"" . getlink("&d_op=viewdownload&cid={$cid}&orderby=ratingD") . "\">D</a>) " . _POPULARITY . " (<a href=\"" . getlink("&d_op=viewdownload&cid={$cid}&orderby=hitsA") . "\">A</a>\\<a href=\"" . getlink("&d_op=viewdownload&cid={$cid}&orderby=hitsD") . "\">D</a>)" . "<br /><b>" . _RESSORTED . ": {$orderbyTrans}</b></font></center>"; echo "<hr noshade size=\"1\">"; $result = $db->sql_query("SELECT lid, title, url, description, date, hits, downloadratingsummary, totalvotes, totalcomments, filesize, version, homepage FROM " . $downloadsprefix . "_downloads WHERE cid={$cid} order by {$orderby} limit {$min},{$perpage} "); $fullcountresult = $db->sql_query("SELECT lid FROM " . $downloadsprefix . "_downloads WHERE cid={$cid}"); $totalselecteddownloads = $db->sql_numrows($fullcountresult); echo "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"10\" border=\"0\"><tr><td><font class=\"content\">"; $x = 0; $color = $bgcolor3; while (list($lid, $title, $url, $description, $time, $hits, $downloadratingsummary, $totalvotes, $totalcomments, $filesize, $version, $homepage) = $db->sql_fetchrow($result)) { $downloadratingsummary = number_format($downloadratingsummary, $mainvotedecimal); $color = $color == $bgcolor3 ? $bgcolor1 : $bgcolor3; echo "<TABLE BORDER=0 CELLPADDING=2 CELLSPACING=0 WIDTH=100%><TR BGCOLOR=\"{$color}\"><TD>"; if (can_admin('downloads')) { if (eregi("http", $url)) { echo "<a href=\"" . adminlink("{$module_name}&mode=DownloadsModDownload&lid={$lid}") . "\"><img src=\"modules/{$module_name}/images/icon30.gif\" border=\"0\" alt=\"" . _EDIT . "\"></a>"; } else { echo "<a href=\"" . adminlink("{$module_name}&mode=DownloadsModDownload&lid={$lid}") . "\"><img src=\"modules/{$module_name}/images/download.gif\" border=\"0\" alt=\"" . _EDIT . "\"></a>"; } } else { if (eregi("http", $url)) { echo "<img src=\"modules/{$module_name}/images/icon30.gif\" border=\"0\" alt=\"\">"; } else { echo "<img src=\"modules/{$module_name}/images/download.gif\" border=\"0\" alt=\"\">"; } } echo "</td><td width=\"100%\" class=\"title\" valign=\"top\"><a href=\"" . getlink("&d_op=getit&lid={$lid}") . "\"><B>{$title}</b></a>"; $datetime = formatDateTime($time . ' 00:00:00', _DATESTRING3); newdownloadgraphic($datetime); popgraphic($hits); detecteditorial($lid, 1); echo "</td></tr><TR BGCOLOR=\"{$color}\"><TD COLSPAN=2>"; echo "<DIV ALIGN=\"JUSTIFY\"><b>" . _DESCRIPTION . ":</b> {$description}</td></tr><TR BGCOLOR=\"{$color}\"><TD COLSPAN=2>"; echo "<b>" . _VERSION . ":</b> {$version} <b>" . _FILESIZE . ":</b> " . CoolSize($filesize) . "<br />"; echo "<b>" . _ADDEDON . ":</b> {$datetime} <b>" . _UDOWNLOADS . ":</b> {$hits}"; $transfertitle = str_replace(" ", "_", $title); /* voting & comments stats */ if ($totalvotes == 1) { $votestring = _VOTE; } else { $votestring = _VOTES; } if ($downloadratingsummary != "0" || $downloadratingsummary != "0.0") { echo " <b>" . _RATING . ":</b> {$downloadratingsummary} ({$totalvotes} {$votestring})"; } if ($homepage == "") { echo '<br />'; } else { echo "<br /><a href=\"{$homepage}\" target=\"new\">" . _HOMEPAGE . "</a> | "; } echo "<a href=\"" . getlink("&d_op=ratedownload&lid={$lid}") . "\">" . _RATERESOURCE . "</a>"; if (is_user()) { echo " | <a href=\"" . getlink("&d_op=brokendownload&lid={$lid}") . "\">" . _REPORTBROKEN . "</a>"; } echo " | <a href=\"" . getlink("&d_op=viewdownloaddetails&lid={$lid}") . "\">" . _DETAILS . "</a>"; if ($totalcomments != 0) { echo " | <a href=\"" . getlink("&d_op=viewdownloadcomments&lid={$lid}") . "\">" . _SCOMMENTS . " ({$totalcomments})</a>"; } detecteditorial($lid, 0); echo "</div></td></tr></table><br />"; $x++; } echo "</font>"; $orderby = convertorderbyout($orderby); /* Calculates how many pages exist. Which page one should be on, etc... */ $downloadpagesint = $totalselecteddownloads / $perpage; $downloadpageremainder = $totalselecteddownloads % $perpage; if ($downloadpageremainder != 0) { $downloadpages = ceil($downloadpagesint); if ($totalselecteddownloads < $perpage) { $downloadpageremainder = 0; } } else { $downloadpages = $downloadpagesint; } /* Page Numbering */ if ($downloadpages != 1 && $downloadpages != 0) { echo "<br /><br />"; echo _SELECTPAGE . ": "; $prev = $min - $perpage; if ($prev >= 0) { echo " <b>[ <a href=\"" . getlink("&d_op=viewdownload&cid={$cid}&min={$prev}&orderby={$orderby}") . "\">"; echo " << " . _PREVIOUSPAGE . "</a> ]</b> "; } $counter = 1; $currentpage = $max / $perpage; while ($counter <= $downloadpages) { $cpage = $counter; $mintemp = $perpage * $counter - $perpage; if ($counter == $currentpage) { echo "<b>{$counter}</b> "; } else { echo "<a href=\"" . getlink("&d_op=viewdownload&cid={$cid}&min={$mintemp}&orderby={$orderby}") . "\">{$counter}</a> "; } $counter++; } $next = $min + $perpage; if ($x >= $perpage) { echo " <b>[ <a href=\"" . getlink("&d_op=viewdownload&cid={$cid}&min={$max}&orderby={$orderby}") . "\">" . _NEXTPAGE . " >></a> ]</b> "; } } echo "</td></tr></table>"; CloseTable(); include "footer.php"; }
function MostPopular() { global $downloadsprefix, $db, $module_name, $mainvotedecimal; include "header.php"; downl_menu_tpl(1); echo '<br />'; OpenTable(); echo "<table border=\"0\" width=\"100%\"><tr><td align=\"center\">"; $mostpopdownloads = isset($_GET['ratenum']) ? intval($_GET['ratenum']) : 10; if (isset($_GET['ratetype']) && $_GET['ratetype'] == 'percent') { $topdownloadspercent = $mostpopdownloads; list($totalmostpopdownloads) = $db->sql_ufetchrow("SELECT COUNT(*) FROM " . $downloadsprefix . "_downloads", SQL_NUM, __FILE__); $mostpopdownloads = $mostpopdownloads / 100; $mostpopdownloads = $totalmostpopdownloads * $mostpopdownloads; $mostpopdownloads = round($mostpopdownloads); echo "<center><font class=\"option\"><b>" . _MOSTPOPULAR . " {$topdownloadspercent}% (" . _OFALL . " {$totalmostpopdownloads} " . _DOWNLOADS . ")</b></font></center><br />"; } else { echo "<center><font class=\"option\"><b>" . _MOSTPOPULAR . " {$mostpopdownloads}</b></font></center><br />"; } echo "<center>" . _SHOWTOP . ": [ <a href=\"" . getlink("&d_op=MostPopular&ratenum=10&ratetype=num") . "\">10</a> - " . "<a href=\"" . getlink("&d_op=MostPopular&ratenum=25&ratetype=num") . "\">25</a> - " . "<a href=\"" . getlink("&d_op=MostPopular&ratenum=50&ratetype=num") . "\">50</a> | " . "<a href=\"" . getlink("&d_op=MostPopular&ratenum=1&ratetype=percent") . "\">1%</a> - " . "<a href=\"" . getlink("&d_op=MostPopular&ratenum=5&ratetype=percent") . "\">5%</a> - " . "<a href=\"" . getlink("&d_op=MostPopular&ratenum=10&ratetype=percent") . "\">10%</a> ]</center><br /><br /></td></tr>"; $result = $db->sql_query("SELECT lid, cid, title, description, date, hits, url, downloadratingsummary, totalvotes, totalcomments, filesize, version, homepage FROM " . $downloadsprefix . "_downloads order by hits DESC limit 0, {$mostpopdownloads}"); echo "<tr><td class=\"content\">"; while (list($lid, $cid, $title, $description, $time, $hits, $url, $downloadratingsummary, $totalvotes, $totalcomments, $filesize, $version, $homepage) = $db->sql_fetchrow($result)) { $downloadratingsummary = number_format($downloadratingsummary, $mainvotedecimal); if (can_admin('downloads')) { if (eregi("http", $url)) { echo "<a href=\"" . adminlink("{$module_name}&mode=DownloadsModDownload&lid={$lid}") . "\"><img src=\"modules/{$module_name}/images/icon30.gif\" border=\"0\" alt=\"" . _EDIT . "\" /></a>"; } else { echo "<a href=\"" . adminlink("{$module_name}&mode=DownloadsModDownload&lid={$lid}") . "\"><img src=\"modules/{$module_name}/images/download.gif\" border=\"0\" alt=\"" . _EDIT . "\" /></a>"; } } else { if (eregi("http", $url)) { echo "<img src=\"modules/{$module_name}/images/icon30.gif\" border=\"0\" alt=\"\" />"; } else { echo "<img src=\"modules/{$module_name}/images/download.gif\" border=\"0\" alt=\"\" />"; } } echo " <a href=\"" . getlink("&d_op=getit&lid={$lid}") . "\" class=\"title\">{$title}</a>"; $datetime = formatDateTime($time . ' 00:00:00', _DATESTRING3); newdownloadgraphic($datetime); popgraphic($hits); detecteditorial($lid, 1); echo '<br />'; echo "<b>" . _DESCRIPTION . ":</b> {$description}<br />"; echo "<b>" . _VERSION . ":</b> {$version} <b>" . _FILESIZE . ":</b> " . CoolSize($filesize) . "<br />"; echo "<b>" . _ADDEDON . ":</b> {$datetime} <b>" . _UDOWNLOADS . ":</b> <b>{$hits}</b>"; $transfertitle = str_replace(" ", "_", $title); /* voting & comments stats */ if ($totalvotes == 1) { $votestring = _VOTE; } else { $votestring = _VOTES; } if ($downloadratingsummary != "0" || $downloadratingsummary != "0.0") { echo " <b>" . _RATING . ":</b> {$downloadratingsummary} ({$totalvotes} {$votestring})"; } echo '<br />'; $result2 = $db->sql_query("SELECT title FROM " . $downloadsprefix . "_categories WHERE cid={$cid}"); list($ctitle) = $db->sql_fetchrow($result2); $ctitle = getparent($cid, $ctitle); echo "<b>" . _CATEGORY . ":</b> <a href=\"" . getlink("&d_op=viewdownload&cid={$cid}") . "\">{$ctitle}</a>"; if ($homepage == "") { echo '<br />'; } else { echo "<br /><a href=\"{$homepage}\" target=\"new\">" . _HOMEPAGE . "</a> | "; } echo "<a href=\"" . getlink("&d_op=ratedownload&lid={$lid}") . "\">" . _RATERESOURCE . "</a>"; if (is_user()) { echo " | <a href=\"" . getlink("&d_op=brokendownload&lid={$lid}") . "\">" . _REPORTBROKEN . "</a>"; } echo " | <a href=\"" . getlink("&d_op=viewdownloaddetails&lid={$lid}") . "\">" . _DETAILS . "</a>"; if ($totalcomments != 0) { echo " | <a href=\"" . getlink("&d_op=viewdownloadcomments&lid={$lid}") . "\">" . _SCOMMENTS . " ({$totalcomments})</a>"; } detecteditorial($lid, 0); echo "<br /><br />"; } echo "</td></tr></table>"; CloseTable(); include "footer.php"; }
function p_get_file($match, $directory, $level) { // $directory = str_replace (" ", "%20", $directory); global $config, $strS, $strConfirmEffacerFile, $s_joueur; $cur_dir = $config['download_path'] . "/{$match}/{$directory}"; $line_file = array(); $cur_dir = str_replace("//", "/", $cur_dir); $nb_file = get_nb_file($cur_dir); $i = 0; $handle = opendir($cur_dir); while ($file = readdir($handle)) { if ($file != "." && $file != "..") { // Que des fichiers $filelist[] = $file; } } closedir($handle); if ($filelist) { sort($filelist); } for ($f = 0; $f < count($filelist); $f++) { $file = $filelist[$f]; if (p_is_file($file)) { $i++; $file_name = $file; $file_path = $cur_dir . $file; $file_size = filesize($file_path); $file_size = CoolSize($file_size); if (p_is_last($i, $nb_file)) { $image_l = "images/browser/b_vert_last_file.gif"; } else { $image_l = "images/browser/b_vert_file.gif"; } $image = get_type($file_name); $b_vert = ""; $b_vert = p_level($b_vert, $level, $directory); $line_file[$level] .= "\r\n\t\t\t\t <tr align=\"left\" valign=\"middle\">\r\n\t\t\t\t <td nowrap valign=\"middle\" colspan=\"2\">{$b_vert}<font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"2\"><img src=\"{$image_l}\" width=\"15\" height=\"20\" align=\"absmiddle\" border=\"0\"><a href=\"{$file_path}\" target=\"_blank\">{$image}</a><a href=\"{$file_path}\" target=\"_blank\">{$file_name}</a>"; if ($grade['a'] == 'a' || $grade['b'] == 'b' || $grade['t'] == 't' || $grade['u'] == 'u') { $line_file[$level] .= " <a href=\"?page=matchs_browser&op=delete&filename={$file_name}&match={$match}&directory={$directory}&header=win\" onclick=\"return confirm('{$strConfirmEffacerFile}');\">[{$strS}]</a>"; } $line_file[$level] .= "</font></td>\r\n\t\t\t\t <td width=\"100\" align=\"left\"><font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"2\">{$file_size}</font></td>\r\n\t\t\t\t </tr>\r\n\t\t\t"; } } return $line_file; }
function TopRated() { global $downloadsprefix, $db, $module_name, $downloadvotemin, $topdownloads; include "header.php"; downl_menu_tpl(1); echo '<br />'; OpenTable(); echo "<table border=\"0\" width=\"100%\"><tr><td align=\"center\">"; if (isset($_GET['ratenum']) && isset($_GET['ratetype'])) { $topdownloads = intval($_GET['ratenum']); if ($_GET['ratetype'] == "percent") { $topdownloadspercentrigger = 1; } } if ($topdownloadspercentrigger == 1) { $topdownloadspercent = $topdownloads; list($totalrateddownloads) = $db->sql_ufetchrow("SELECT COUNT(*) FROM " . $downloadsprefix . "_downloads WHERE downloadratingsummary != 0", SQL_NUM, __FILE__); $topdownloads = $topdownloads / 100; $topdownloads = $totalrateddownloads * $topdownloads; $topdownloads = round($topdownloads); } if ($topdownloadspercentrigger == 1) { echo "<center><font class=\"option\"><b>" . _DBESTRATED . " {$topdownloadspercent}% (" . _OF . " {$totalrateddownloads} " . _TRATEDDOWNLOADS . ")</b></font></center><br />"; } else { echo "<center><font class=\"option\"><b>" . _DBESTRATED . " {$topdownloads} </b></font></center><br />"; } echo "</td></tr>" . "<tr><td><center>" . _NOTE . " {$downloadvotemin} " . _TVOTESREQ . "<br />" . _SHOWTOP . ": [ <a href=\"" . getlink("&d_op=TopRated&ratenum=10&ratetype=num") . "\">10</a> - " . "<a href=\"" . getlink("&d_op=TopRated&ratenum=25&ratetype=num") . "\">25</a> - " . "<a href=\"" . getlink("&d_op=TopRated&ratenum=50&ratetype=num") . "\">50</a> | " . "<a href=\"" . getlink("&d_op=TopRated&ratenum=1&ratetype=percent") . "\">1%</a> - " . "<a href=\"" . getlink("&d_op=TopRated&ratenum=5&ratetype=percent") . "\">5%</a> - " . "<a href=\"" . getlink("&d_op=TopRated&ratenum=10&ratetype=percent") . "\">10%</a> ]</center><br /><br /></td></tr>"; $sql = "SELECT lid, cid, title, description, date, hits, url, downloadratingsummary, totalvotes, totalcomments, filesize, version, homepage FROM " . $downloadsprefix . "_downloads WHERE downloadratingsummary != 0 AND totalvotes >= {$downloadvotemin} ORDER BY downloadratingsummary DESC LIMIT 0,{$topdownloads}"; $result = $db->sql_query($sql); echo '<tr><td>'; while ($row = $db->sql_fetchrow($result)) { $lid = $row['lid']; $cid = $row['cid']; $title = $row['title']; $description = $row['description']; $time = $row['date']; $hits = $row['hits']; $url = $row['url']; $downloadratingsummary = number_format($row['downloadratingsummary'], $mainvotedecimal); $totalvotes = $row['totalvotes']; $totalcomments = $row['totalcomments']; $filesize = $row['filesize']; $version = $row['version']; $homepage = $row['homepage']; if (can_admin('downloads')) { if (eregi("http", $url)) { echo "<a href=\"" . adminlink("{$module_name}&mode=DownloadsModDownload&lid={$lid}") . "\"><img src=\"modules/{$module_name}/images/icon30.gif\" border=\"0\" alt=\"" . _EDIT . "\"></a>"; } else { echo "<a href=\"" . adminlink("{$module_name}&mode=DownloadsModDownload&lid={$lid}") . "\"><img src=\"modules/{$module_name}/images/download.gif\" border=\"0\" alt=\"" . _EDIT . "\"></a>"; } } else { if (eregi("http", $url)) { echo "<img src=\"modules/{$module_name}/images/icon30.gif\" border=\"0\" alt=\"\">"; } else { echo "<img src=\"modules/{$module_name}/images/download.gif\" border=\"0\" alt=\"\">"; } } echo " <a href=\"" . getlink("&d_op=getit&lid={$lid}") . "\" class=\"title\">{$title}</a>"; $datetime = formatDateTime($time . ' 00:00:00', _DATESTRING3); newdownloadgraphic($datetime); popgraphic($hits); detecteditorial($lid, 1); echo '<br />'; echo "<b>" . _DESCRIPTION . ":</b> {$description}<br />"; echo "<b>" . _VERSION . ":</b> {$version} <b>" . _FILESIZE . ":</b> " . CoolSize($filesize) . "<br />"; echo "<b>" . _ADDEDON . ":</b> {$datetime} <b>" . _UDOWNLOADS . ":</b> {$hits}"; $transfertitle = str_replace(" ", "_", $title); /* voting & comments stats */ if ($totalvotes == 1) { $votestring = _VOTE; } else { $votestring = _VOTES; } if ($downloadratingsummary != "0" || $downloadratingsummary != "0.0") { echo " <b>" . _RATING . ":</b> <b>{$downloadratingsummary}</b> ({$totalvotes} {$votestring})"; } echo '<br />'; $sql2 = "SELECT title FROM " . $downloadsprefix . "_categories WHERE cid={$cid}"; $result2 = $db->sql_query($sql2); $row2 = $db->sql_fetchrow($result2); $ctitle = $row2[title]; $ctitle = getparent($cid, $ctitle); echo "<b>" . _CATEGORY . ":</b> <a href=\"" . getlink("&d_op=viewdownload&cid={$cid}") . "\">{$ctitle}</a><br />"; if ($homepage != "") { echo "<br /><a href=\"{$homepage}\" target=\"new\">" . _HOMEPAGE . "</a> | "; } echo "<a href=\"" . getlink("&d_op=ratedownload&lid={$lid}") . "\">" . _RATERESOURCE . "</a>"; if (is_user()) { echo " | <a href=\"" . getlink("&d_op=brokendownload&lid={$lid}") . "\">" . _REPORTBROKEN . "</a>"; } echo " | <a href=\"" . getlink("&d_op=viewdownloaddetails&lid={$lid}") . "\">" . _DETAILS . "</a>"; if ($totalcomments != 0) { echo " | <a href=\"" . getlink("&d_op=viewdownloadcomments&lid={$lid}") . "\">" . _SCOMMENTS . " ({$totalcomments})</a>"; } detecteditorial($lid, 0); echo "<br /><br />"; } echo "</td></tr></table>"; CloseTable(); require 'footer.php'; }
function search() { global $bgcolor2, $downloadsprefix, $downloadsresults, $db, $mainvotedecimal, $module_name; include "header.php"; $min = isset($_GET['min']) ? intval($_GET['min']) : 0; $orderby = convertorderbyin($_GET['orderby']); if (isset($_GET['show']) && intval($_GET['show']) != 0) { $downloadsresults = intval($_GET['show']); } else { $show = $downloadsresults; } $max = $min + $downloadsresults; $query = isset($_POST['query']) ? $_POST['query'] : $_GET['query']; $the_query = htmlprepare($query); $query = Fix_Quotes($query, true); $result = $db->sql_query("SELECT lid, cid, title, url, description, date, hits, downloadratingsummary, totalvotes, totalcomments, filesize, version, homepage FROM " . $downloadsprefix . "_downloads WHERE title LIKE '%{$query}%' OR description LIKE '%{$query}%' ORDER BY {$orderby} LIMIT {$min},{$downloadsresults}"); $fullcountresult = $db->sql_query("SELECT lid, title, description, date, hits, downloadratingsummary, totalvotes, totalcomments FROM " . $downloadsprefix . "_downloads WHERE title LIKE '%{$query}%' OR description LIKE '%{$query}%' "); $totalselecteddownloads = $db->sql_numrows($fullcountresult); $nrows = $db->sql_numrows($result); $x = 0; downl_menu_tpl(1); echo '<br />'; OpenTable(); if ($query != "") { if ($nrows > 0) { echo "<font class=\"option\">" . _SEARCHRESULTS4 . ": <b>{$the_query}</b></font><br /><br />" . "<table width=\"100%\" bgcolor=\"{$bgcolor2}\"><tr><td><font class=\"option\"><b>" . _USUBCATEGORIES . "</b></font></td></tr></table>"; $result2 = $db->sql_query("SELECT cid, title FROM " . $downloadsprefix . "_categories WHERE title LIKE '%{$query}%' ORDER BY title DESC"); while (list($cid, $stitle) = $db->sql_fetchrow($result2)) { $res = $db->sql_query("SELECT * FROM " . $downloadsprefix . "_downloads WHERE cid={$cid}"); $numrows = $db->sql_numrows($res); $result3 = $db->sql_query("SELECT cid,title,parentid FROM " . $downloadsprefix . "_categories WHERE cid={$cid}"); list($cid3, $title3, $parentid3) = $db->sql_fetchrow($result3); if ($parentid3 > 0) { $title3 = getparent($parentid3, $title3); } $title3 = ereg_replace($query, "<b>{$query}</b>", $title3); } echo "<br /><table width=\"100%\" bgcolor=\"{$bgcolor2}\"><tr><td><font class=\"option\"><b>" . _UDOWNLOADS . "</b></font></td></tr></table>"; $orderbyTrans = convertorderbytrans($orderby); echo "<center><font class=\"content\">" . _SORTDOWNLOADSBY . ": " . _TITLE . " (<a href=\"" . getlink("&d_op=search&query={$the_query}&orderby=titleA") . "\">A</a>\\<a href=\"" . getlink("&d_op=search&query={$the_query}&orderby=titleD") . "\">D</a>) " . _DATE . " (<a href=\"" . getlink("&d_op=search&query={$the_query}&orderby=dateA") . "\">A</a>\\<a href=\"" . getlink("&d_op=search&query={$the_query}&orderby=dateD") . "\">D</a>) " . _RATING . " (<a href=\"" . getlink("&d_op=search&query={$the_query}&orderby=ratingA") . "\">A</a>\\<a href=\"" . getlink("&d_op=search&query={$the_query}&orderby=ratingD") . "\">D</a>) " . _POPULARITY . " (<a href=\"" . getlink("&d_op=search&query={$the_query}&orderby=hitsA") . "\">A</a>\\<a href=\"" . getlink("&d_op=search&query={$the_query}&orderby=hitsD") . "\">D</a>)" . "<br />" . _RESSORTED . ": {$orderbyTrans}</center><br /><br /><br />"; while (list($lid, $cid, $title, $url, $description, $time, $hits, $downloadratingsummary, $totalvotes, $totalcomments, $filesize, $version, $homepage) = $db->sql_fetchrow($result)) { $downloadratingsummary = number_format($downloadratingsummary, $mainvotedecimal); $transfertitle = str_replace(" ", "_", $title); $title = ereg_replace($query, "<b>{$query}</b>", $title); if (can_admin('downloads')) { if (eregi("http", $url)) { echo "<a href=\"" . adminlink("{$module_name}&mode=DownloadsModDownload&lid={$lid}") . "\"><img src=\"modules/{$module_name}/images/icon30.gif\" border=\"0\" alt=\"" . _EDIT . "\"></a>"; } else { echo "<a href=\"" . adminlink("{$module_name}&mode=DownloadsModDownload&lid={$lid}") . "\"><img src=\"modules/{$module_name}/images/download.gif\" border=\"0\" alt=\"" . _EDIT . "\"></a>"; } } else { if (eregi("http", $url)) { echo "<img src=\"modules/{$module_name}/images/icon30.gif\" border=\"0\" alt=\"\">"; } else { echo "<img src=\"modules/{$module_name}/images/download.gif\" border=\"0\" alt=\"\">"; } } echo " <a href=\"" . getlink("&d_op=getit&lid={$lid}") . "\" class=\"title\">{$title}</a>"; $datetime = formatDateTime($time . ' 00:00:00', _DATESTRING3); newdownloadgraphic($datetime); popgraphic($hits); detecteditorial($lid, 1); echo '<br />'; $description = ereg_replace($query, "<b>{$query}</b>", $description); echo "<b>" . _DESCRIPTION . ":</b> {$description}<br />"; echo "<b>" . _VERSION . ":</b> {$version} <b>" . _FILESIZE . ":</b> " . CoolSize($filesize) . "<br />"; echo "<b>" . _ADDEDON . ":</b> {$datetime} <b>" . _UDOWNLOADS . ":</b> {$hits}"; /* voting & comments stats */ if ($totalvotes == 1) { $votestring = _VOTE; } else { $votestring = _VOTES; } if ($downloadratingsummary != "0" || $downloadratingsummary != "0.0") { echo " <b>" . _RATING . ":</b> {$downloadratingsummary} ({$totalvotes} {$votestring})"; } echo '<br />'; $result3 = $db->sql_query("SELECT cid,title,parentid FROM " . $downloadsprefix . "_categories WHERE cid={$cid}"); list($cid3, $title3, $parentid3) = $db->sql_fetchrow($result3); if ($parentid3 > 0) { $title3 = getparent($parentid3, $title3); } echo "<B>" . _CATEGORY . ":</B> <A HREF=\"" . getlink("&d_op=viewdownload&cid={$cid}") . "\">{$title3}</A>"; if ($homepage == "") { echo '<br />'; } else { echo "<br /><a href=\"{$homepage}\" target=\"new\">" . _HOMEPAGE . "</a> | "; } echo "<a href=\"" . getlink("&d_op=ratedownload&lid={$lid}") . "\">" . _RATERESOURCE . "</a>"; echo " | <a href=\"" . getlink("&d_op=viewdownloaddetails&lid={$lid}") . "\">" . _DETAILS . "</a>"; if ($totalcomments != 0) { echo " | <a href=\"" . getlink("&d_op=viewdownloadcomments&lid={$lid}") . "\">" . _SCOMMENTS . " ({$totalcomments})</a>"; } detecteditorial($lid, 0); echo "<br /><br />"; $x++; } echo "</font>"; $orderby = convertorderbyout($orderby); } else { echo "<br /><br /><center><font class=\"option\"><b>" . _NOMATCHES . "</b></font><br /><br />" . _GOBACK . "<br /></center>"; } /* Calculates how many pages exist. Which page one should be on, etc... */ $downloadpagesint = $totalselecteddownloads / $downloadsresults; $downloadpageremainder = $totalselecteddownloads % $downloadsresults; if ($downloadpageremainder != 0) { $downloadpages = ceil($downloadpagesint); if ($totalselecteddownloads < $downloadsresults) { $downloadpageremainder = 0; } } else { $downloadpages = $downloadpagesint; } /* Page Numbering */ if ($downloadpages != 1 && $downloadpages != 0) { echo "<br /><br />" . _SELECTPAGE . ": "; $prev = $min - $downloadsresults; if ($prev >= 0) { echo " <b>[ <a href=\"" . getlink("&d_op=search&query={$the_query}&min={$prev}&orderby={$orderby}&show={$show}") . "\">" . " << " . _PREVIOUSPAGE . "</a> ]</b> "; } $counter = 1; $currentpage = $max / $downloadsresults; while ($counter <= $downloadpages) { $cpage = $counter; $mintemp = $downloadsresults * $counter - $downloadsresults; if ($counter == $currentpage) { echo "<b>{$counter}</b> "; } else { echo "<a href=\"" . getlink("&d_op=search&query={$the_query}&min={$mintemp}&orderby={$orderby}&show={$show}") . "\">{$counter}</a> "; } $counter++; } $next = $min + $downloadsresults; if ($x >= $downloadsresults) { echo " <b>[ <a href=\"" . getlink("&d_op=search&query={$the_query}&min={$max}&orderby={$orderby}&show={$show}") . "\">" . _NEXTPAGE . " >></a> ]</b>"; } } echo "<br /><br /><center><font class=\"content\">" . _TRY2SEARCH . " \"{$the_query}\" " . _INOTHERSENGINES . "<br />" . "<a target=\"_blank\" href=\"http://www.altavista.com/cgi-bin/query?pg=q&sc=on&hl=on&act=2006&par=0&q={$the_query}&kl=XX&stype=stext\">Alta Vista</a> - " . "<a target=\"_blank\" href=\"http://www.hotbot.com/?MT={$the_query}&DU=days&SW=web\">HotBot</a> - " . "<a target=\"_blank\" href=\"http://www.infoseek.com/Titles?qt={$the_query}\">Infoseek</a> - " . "<a target=\"_blank\" href=\"http://www.dejanews.com/dnquery.xp?QRY={$the_query}\">Deja News</a> - " . "<a target=\"_blank\" href=\"http://www.lycos.com/cgi-bin/pursuit?query={$the_query}&maxhits=20\">Lycos</a> - " . "<a target=\"_blank\" href=\"http://search.yahoo.com/bin/search?p={$the_query}\">Yahoo</a>" . "<br />" . "<a target=\"_blank\" href=\"http://es.linuxstart.com/cgi-bin/sqlsearch.cgi?pos=1&query={$the_query}&language=&advanced=&urlonly=&withid=\">LinuxStart</a> - " . "<a target=\"_blank\" href=\"http://search.1stlinuxsearch.com/compass?scope={$the_query}&ui=sr\">1stLinuxSearch</a> - " . "<a target=\"_blank\" href=\"http://www.google.com/search?q={$the_query}\">Google</a> - " . "<a target=\"_blank\" href=\"http://www.linuxdownloads.com/cgi-bin/search.cgi?query={$the_query}&engine=Downloads\">LinuxDownloads</a> - " . "<a target=\"_blank\" href=\"http://www.freshmeat.net/search/?q={$the_query}&section=projects\">Freshmeat</a> - " . "<a target=\"_blank\" href=\"http://www.justlinux.com/bin/search.pl?key={$the_query}\">JustLinux</a>" . "</font>"; } else { echo "<center><font class=\"option\"><b>" . _NOMATCHES . "</b></font></center><br /><br />"; } CloseTable(); include "footer.php"; }
function avatar_upload($avatar_mode, &$current_avatar, &$current_type, $avatar_filename, $avatar_realname, $avatar_filesize, $avatar_filetype, &$avatar_error) { global $config, $db; global $strAvatarErreurUrl, $strAvatarErreurConnexion, $strAvatarErreurData, $strAvatarErreurWrite, $strAvatarErreurFileSize, $strAvatarErreurXYSize, $strAvatarErreurFileType; /*** si c'est un upload remote ***/ if ($avatar_mode == 'remote' && preg_match('/^(http:\\/\\/)?([\\w\\-\\.]+)\\:?([0-9]*)\\/(.*)$/', $avatar_filename, $url_ary)) { if (empty($url_ary[4])) { $avatar_error = true; show_erreur($strAvatarErreurUrl); return; } $base_get = '/' . $url_ary[4]; $port = !empty($url_ary[3]) ? $url_ary[3] : 80; if (!($fsock = @fsockopen($url_ary[2], $port, $errno, $errstr))) { $avatar_error = true; show_erreur($strAvatarErreurConnexion); return; } @fputs($fsock, "GET {$base_get} HTTP/1.1\r\n"); @fputs($fsock, "HOST: " . $url_ary[2] . "\r\n"); @fputs($fsock, "Connection: close\r\n\r\n"); unset($avatar_data); while (!@feof($fsock)) { $avatar_data .= @fread($fsock, $config['avatar_filesize_max']); } @fclose($fsock); if (!preg_match('#Content-Length\\: ([0-9]+)[^ /][\\s]+#i', $avatar_data, $file_data1) || !preg_match('#Content-Type\\: image/[x\\-]*([a-z]+)[\\s]+#i', $avatar_data, $file_data2)) { $avatar_error = true; show_erreur($strAvatarErreurData); return; } $avatar_filesize = $file_data1[1]; $avatar_filetype = $file_data2[1]; if ($avatar_filesize > 0 && $avatar_filesize < $config['avatar_filesize_max']) { $avatar_data = substr($avatar_data, strlen($avatar_data) - $avatar_filesize, $avatar_filesize); $tmp_path = $config['avatars_path'] . '/tmp'; $tmp_filename = tempnam($tmp_path, uniqid(rand()) . '-'); $fptr = @fopen($tmp_filename, 'wb'); $bytes_written = @fwrite($fptr, $avatar_data, $avatar_filesize); @fclose($fptr); if ($bytes_written != $avatar_filesize) { @unlink($tmp_filename); $avatar_error = true; show_erreur($strAvatarErreurWrite); return; } list($width, $height) = @getimagesize($tmp_filename); } else { $avatar_error = true; show_erreur("{$strAvatarErreurFileSize} (" . CoolSize($config['avatar_filesize_max']) . ")"); return; } } elseif ($avatar_mode == 'local' && file_exists($avatar_filename)) { if ($avatar_filesize <= $config['avatar_filesize_max'] && $avatar_filesize > 0) { preg_match('#image\\/[x\\-]*([a-z]+)#', $avatar_filetype, $avatar_filetype); $avatar_filetype = $avatar_filetype[1]; } else { $avatar_error = true; show_erreur("{$strAvatarErreurFileSize} (" . CoolSize($config['avatar_filesize_max']) . ")"); return; } list($width, $height) = @getimagesize($avatar_filename); } if (!($imgtype = check_image_type($avatar_filetype))) { $avatar_error = true; show_erreur("{$strAvatarErreurFileType} ({$avatar_filetype})"); return; } if ($width <= $config['avatar_x_max'] && $height <= $config['avatar_y_max']) { $new_filename = uniqid(rand()) . $imgtype; /*** si un avatar uploadé existe deja pour l'entité, on l'efface ***/ if ($current_type == 'U' && $current_avatar != '') { if (file_exists($config['avatars_path'] . "/{$current_avatar}")) { @unlink($config['avatars_path'] . "/{$current_avatar}"); } } if ($avatar_mode == 'remote') { @copy($tmp_filename, $config['avatars_path'] . "/{$new_filename}"); @unlink($tmp_filename); } elseif ($avatar_mode == 'local') { @move_uploaded_file($avatar_filename, $config['avatars_path'] . "/{$new_filename}"); } @chmod($config['avatars_path'] . "/{$new_filename}", 0777); $avatar_sql = "avatar = '{$new_filename}', avatar_type = 'U'"; } else { $avatar_error = true; show_erreur("{$strAvatarErreurXYSize} (" . $config['avatar_x_max'] . "x" . $config['avatar_y_max'] . ")"); } return $avatar_sql; }
function MostPopular($ratenum, $ratetype) { global $prefix, $dbi, $admin, $module_name, $user; include "header.php"; include "modules/{$module_name}/d_config.php"; menu(1); echo "<br>"; OpenTable(); echo "<table border=\"0\" width=\"100%\"><tr><td align=\"center\">"; if ($ratenum != "" && $ratetype != "") { $mostpopdownloads = $ratenum; if ($ratetype == "percent") { $mostpopdownloadspercentrigger = 1; } } if ($mostpopdownloadspercentrigger == 1) { $topdownloadspercent = $mostpopdownloads; $result = sql_query("SELECT * FROM " . $prefix . "_downloads_downloads", $dbi); $totalmostpopdownloads = sql_num_rows($result, $dbi); $mostpopdownloads = $mostpopdownloads / 100; $mostpopdownloads = $totalmostpopdownloads * $mostpopdownloads; $mostpopdownloads = round($mostpopdownloads); } if ($mostpopdownloadspercentrigger == 1) { echo "<center><font class=\"option\"><b>" . _MOSTPOPULAR . " {$topdownloadspercent}% (" . _OFALL . " {$totalmostpopdownloads} " . _DOWNLOADS . ")</b></font></center>"; } else { echo "<center><font class=\"option\"><b>" . _MOSTPOPULAR . " {$mostpopdownloads}</b></font></center>"; } echo "<tr><td><center>" . _SHOWTOP . ": [ <a href=\"modules.php?name={$module_name}&d_op=MostPopular&ratenum=10&ratetype=num\">10</a> - " . "<a href=\"modules.php?name={$module_name}&d_op=MostPopular&ratenum=25&ratetype=num\">25</a> - " . "<a href=\"modules.php?name={$module_name}&d_op=MostPopular&ratenum=50&ratetype=num\">50</a> | " . "<a href=\"modules.php?name={$module_name}&d_op=MostPopular&ratenum=1&ratetype=percent\">1%</a> - " . "<a href=\"modules.php?name={$module_name}&d_op=MostPopular&ratenum=5&ratetype=percent\">5%</a> - " . "<a href=\"modules.php?name={$module_name}&d_op=MostPopular&ratenum=10&ratetype=percent\">10%</a> ]</center><br><br></td></tr>"; $result = sql_query("SELECT lid, cid, title, description, date, hits, url, downloadratingsummary, totalvotes, totalcomments, filesize, version, homepage FROM " . $prefix . "_downloads_downloads order by hits DESC limit 0,{$mostpopdownloads} ", $dbi); echo "<tr><td>"; while (list($lid, $cid, $title, $description, $time, $hits, $url, $downloadratingsummary, $totalvotes, $totalcomments, $filesize, $version, $homepage) = sql_fetch_row($result, $dbi)) { $downloadratingsummary = number_format($downloadratingsummary, $mainvotedecimal); $title = stripslashes($title); $description = stripslashes($description); global $prefix, $dbi, $admin; if (is_admin($admin)) { if (eregi("http", $url)) { echo "<a href=\"admin.php?op=DownloadsModDownload&lid={$lid}\"><img src=\"modules/{$module_name}/images/icon30.gif\" border=\"0\" alt=\"" . _EDIT . "\"></a>"; } else { echo "<a href=\"admin.php?op=DownloadsModDownload&lid={$lid}\"><img src=\"modules/{$module_name}/images/download.gif\" border=\"0\" alt=\"" . _EDIT . "\"></a>"; } } else { if (eregi("http", $url)) { echo "<img src=\"modules/{$module_name}/images/icon30.gif\" border=\"0\" alt=\"\">"; } else { echo "<img src=\"modules/{$module_name}/images/download.gif\" border=\"0\" alt=\"\">"; } } echo " <font class=\"content\"><a href=\"modules.php?name={$module_name}&d_op=getit&lid={$lid}\" CLASS=\"title\" TARGET=\"_blank\">{$title}</a>"; newdownloadgraphic($datetime, $time); popgraphic($hits); detecteditorial($lid, $transfertitle, 1); echo "<br>"; echo "<b>" . _DESCRIPTION . ":</b> {$description}<br>"; setlocale(LC_TIME, $locale); ereg("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime); $datetime = strftime("" . _LINKSDATESTRING . "", mktime($datetime[4], $datetime[5], $datetime[6], $datetime[2], $datetime[3], $datetime[1])); $datetime = ucfirst($datetime); echo "<b>" . _VERSION . ":</b> {$version} <b>" . _FILESIZE . ":</b> " . CoolSize($filesize) . "<br>"; echo "<b>" . _ADDEDON . ":</b> {$datetime} <b>" . _UDOWNLOADS . ":</b> <b>{$hits}</b>"; $transfertitle = str_replace(" ", "_", $title); /* voting & comments stats */ if ($totalvotes == 1) { $votestring = _VOTE; } else { $votestring = _VOTES; } if ($downloadratingsummary != "0" || $downloadratingsummary != "0.0") { echo " <b>" . _RATING . ":</b> {$downloadratingsummary} ({$totalvotes} {$votestring})"; } echo "<br>"; $result2 = sql_query("SELECT title FROM " . $prefix . "_downloads_categories WHERE cid={$cid}", $dbi); list($ctitle) = sql_fetch_row($result2, $dbi); $ctitle = getparent($cid, $ctitle); echo "<B>" . _CATEGORY . ":</B> <A HREF=\"modules.php?name=Downloads&d_op=viewdownload&cid={$cid}\">{$ctitle}</A>"; if ($homepage == "") { echo "<br>"; } else { echo "<br><a href=\"{$homepage}\" target=\"new\">" . _HOMEPAGE . "</a> | "; } echo "<a href=\"modules.php?name={$module_name}&d_op=ratedownload&lid={$lid}&ttitle={$transfertitle}\">" . _RATERESOURCE . "</a>"; if (is_user($user)) { echo " | <a href=\"modules.php?name={$module_name}&d_op=brokendownload&lid={$lid}\">" . _REPORTBROKEN . "</a>"; } echo " | <a href=\"modules.php?name={$module_name}&d_op=viewdownloaddetails&lid={$lid}&ttitle={$transfertitle}\">" . _DETAILS . "</a>"; if ($totalcomments != 0) { echo " | <a href=\"modules.php?name={$module_name}&d_op=viewdownloadcomments&lid={$lid}&ttitle={$transfertitle}\">" . _SCOMMENTS . " ({$totalcomments})</a>"; } detecteditorial($lid, $transfertitle, 0); echo "<br><br>"; } echo "</font></td></tr></table>"; CloseTable(); include "footer.php"; }
function viewdownloaddetails($lid) { global $prefix, $db, $admin, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $module_name, $anonymous; include "header.php"; include "modules/{$module_name}/d_config.php"; menu(1); $lid = intval($lid); $voteresult = $db->sql_query("SELECT rating, ratinguser, ratingcomments FROM " . $prefix . "_downloads_votedata WHERE ratinglid = '{$lid}'"); $totalvotesDB = $db->sql_numrows($voteresult); $totalvotesDB = intval($totalvotesDB); $anonvotes = 0; $anonvoteval = 0; $outsidevotes = 0; $outsidevoteval = 0; $regvoteval = 0; $topanon = 0; $bottomanon = 11; $topreg = 0; $bottomreg = 11; $topoutside = 0; $bottomoutside = 11; $avv = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $rvv = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $ovv = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $truecomments = $totalvotesDB; while (list($ratingDB, $ratinguserDB, $ratingcommentsDB) = $voteresult->fetch_row()) { $ratingDB = intval($ratingDB); if (empty($ratingcommentsDB)) { $truecomments--; } if ($ratinguserDB == $anonymous) { $anonvotes++; $anonvoteval += $ratingDB; } if ($useoutsidevoting == 1) { if ($ratinguserDB == 'outside') { $outsidevotes++; $outsidevoteval += $ratingDB; } } else { $outsidevotes = 0; } if ($ratinguserDB != $anonymous && $ratinguserDB != "outside") { $regvoteval += $ratingDB; } if ($ratinguserDB != $anonymous && $ratinguserDB != "outside") { if ($ratingDB > $topreg) { $topreg = $ratingDB; } if ($ratingDB < $bottomreg) { $bottomreg = $ratingDB; } for ($rcounter = 1; $rcounter < 11; $rcounter++) { if ($ratingDB == $rcounter) { $rvv[$rcounter]++; } } } if ($ratinguserDB == $anonymous) { if ($ratingDB > $topanon) { $topanon = $ratingDB; } if ($ratingDB < $bottomanon) { $bottomanon = $ratingDB; } for ($rcounter = 1; $rcounter < 11; $rcounter++) { if ($ratingDB == $rcounter) { $avv[$rcounter]++; } } } if ($ratinguserDB == "outside") { if ($ratingDB > $topoutside) { $topoutside = $ratingDB; } if ($ratingDB < $bottomoutside) { $bottomoutside = $ratingDB; } for ($rcounter = 1; $rcounter < 11; $rcounter++) { if ($ratingDB == $rcounter) { $ovv[$rcounter]++; } } } } $regvotes = $totalvotesDB - $anonvotes - $outsidevotes; if ($totalvotesDB == 0) { $finalrating = 0; } else { if ($anonvotes == 0 && $regvotes == 0) { /* Figure Outside Only Vote */ $finalrating = $outsidevoteval / $outsidevotes; $finalrating = number_format($finalrating, $detailvotedecimal); $avgOU = $outsidevoteval / $totalvotesDB; $avgOU = number_format($avgOU, $detailvotedecimal); } else { if ($outsidevotes == 0 && $regvotes == 0) { /* Figure Anon Only Vote */ $finalrating = $anonvoteval / $anonvotes; $finalrating = number_format($finalrating, $detailvotedecimal); $avgAU = $anonvoteval / $totalvotesDB; $avgAU = number_format($avgAU, $detailvotedecimal); } else { if ($outsidevotes == 0 && $anonvotes == 0) { /* Figure Reg Only Vote */ $finalrating = $regvoteval / $regvotes; $finalrating = number_format($finalrating, $detailvotedecimal); $avgRU = $regvoteval / $totalvotesDB; $avgRU = number_format($avgRU, $detailvotedecimal); } else { if ($regvotes == 0 && $useoutsidevoting == 1 && $outsidevotes != 0 && $anonvotes != 0) { /* Figure Reg and Anon Mix */ $avgAU = $anonvoteval / $anonvotes; $avgOU = $outsidevoteval / $outsidevotes; if ($anonweight > $outsideweight) { /* Anon is 'standard weight' */ $newimpact = $anonweight / $outsideweight; $impactAU = $anonvotes; $impactOU = $outsidevotes / $newimpact; $finalrating = ($avgOU * $impactOU + $avgAU * $impactAU) / ($impactAU + $impactOU); $finalrating = number_format($finalrating, $detailvotedecimal); } else { /* Outside is 'standard weight' */ $newimpact = $outsideweight / $anonweight; $impactOU = $outsidevotes; $impactAU = $anonvotes / $newimpact; $finalrating = ($avgOU * $impactOU + $avgAU * $impactAU) / ($impactAU + $impactOU); $finalrating = number_format($finalrating, $detailvotedecimal); } } else { /* REG User vs. Anonymous vs. Outside User Weight Calutions */ $impact = $anonweight; $outsideimpact = $outsideweight; if ($regvotes == 0) { $avgRU = 0; } else { $avgRU = $regvoteval / $regvotes; } if ($anonvotes == 0) { $avgAU = 0; } else { $avgAU = $anonvoteval / $anonvotes; } if ($outsidevotes == 0) { $avgOU = 0; } else { $avgOU = $outsidevoteval / $outsidevotes; } $impactRU = $regvotes; $impactAU = $anonvotes / $impact; $impactOU = $outsidevotes / $outsideimpact; $finalrating = ($avgRU * $impactRU + $avgAU * $impactAU + $avgOU * $impactOU) / ($impactRU + $impactAU + $impactOU); $finalrating = number_format($finalrating, $detailvotedecimal); } } } } } if (!isset($avgOU) || $avgOU == 0 || $avgOU == "") { $avgOU = ""; } else { $avgOU = number_format($avgOU, $detailvotedecimal); } if (!isset($avgRU) || $avgRU == 0 || $avgRU == "") { $avgRU = ""; } else { $avgRU = number_format($avgRU, $detailvotedecimal); } if (!isset($avgAU) || $avgAU == 0 || $avgAU == "") { $avgAU = ""; } else { $avgAU = number_format($avgAU, $detailvotedecimal); } if ($topanon == 0) { $topanon = ""; } if ($bottomanon == 11) { $bottomanon = ""; } if ($topreg == 0) { $topreg = ""; } if ($bottomreg == 11) { $bottomreg = ""; } if ($topoutside == 0) { $topoutside = ""; } if ($bottomoutside == 11) { $bottomoutside = ""; } $totalchartheight = 70; $chartunits = $totalchartheight / 10; $avvper = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $rvvper = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $ovvper = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $avvpercent = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $rvvpercent = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $ovvpercent = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $avvchartheight = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $rvvchartheight = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $ovvchartheight = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); $avvmultiplier = 0; $rvvmultiplier = 0; $ovvmultiplier = 0; for ($rcounter = 1; $rcounter < 11; $rcounter++) { if ($anonvotes != 0) { $avvper[$rcounter] = $avv[$rcounter] / $anonvotes; } if ($regvotes != 0) { $rvvper[$rcounter] = $rvv[$rcounter] / $regvotes; } if ($outsidevotes != 0) { $ovvper[$rcounter] = $ovv[$rcounter] / $outsidevotes; } $avvpercent[$rcounter] = number_format($avvper[$rcounter] * 100, 1); $rvvpercent[$rcounter] = number_format($rvvper[$rcounter] * 100, 1); $ovvpercent[$rcounter] = number_format($ovvper[$rcounter] * 100, 1); if ($avv[$rcounter] > $avvmultiplier) { $avvmultiplier = $avv[$rcounter]; } if ($rvv[$rcounter] > $rvvmultiplier) { $rvvmultiplier = $rvv[$rcounter]; } if ($ovv[$rcounter] > $ovvmultiplier) { $ovvmultiplier = $ovv[$rcounter]; } } if ($avvmultiplier != 0) { $avvmultiplier = 10 / $avvmultiplier; } if ($rvvmultiplier != 0) { $rvvmultiplier = 10 / $rvvmultiplier; } if ($ovvmultiplier != 0) { $ovvmultiplier = 10 / $ovvmultiplier; } for ($rcounter = 1; $rcounter < 11; $rcounter++) { $avvchartheight[$rcounter] = $avv[$rcounter] * $avvmultiplier * $chartunits; $rvvchartheight[$rcounter] = $rvv[$rcounter] * $rvvmultiplier * $chartunits; $ovvchartheight[$rcounter] = $ovv[$rcounter] * $ovvmultiplier * $chartunits; if ($avvchartheight[$rcounter] == 0) { $avvchartheight[$rcounter] = 1; } if ($rvvchartheight[$rcounter] == 0) { $rvvchartheight[$rcounter] = 1; } if ($ovvchartheight[$rcounter] == 0) { $ovvchartheight[$rcounter] = 1; } } $ttitle = htmlentities($ttitle); $transfertitle = ereg_replace("_", " ", $ttitle); $displaytitle = stripslashes($transfertitle); $res = $db->sql_query("SELECT title, name, email, description, filesize, version, homepage FROM " . $prefix . "_downloads_downloads WHERE lid='{$lid}'"); list($title, $auth_name, $email, $description, $filesize, $version, $homepage) = $res->fetch_row(); $ttitle = filter($title, "nohtml"); $displaytitle = $ttitle; $auth_name = filter($auth_name, "nohtml"); $email = filter($email, "nohtml"); $description = filter($description); $homepage = filter($homepage, "nohtml"); echo "<br>"; OpenTable(); echo "<center><font class=\"option\"><b>" . _DOWNLOADPROFILE . ": {$displaytitle}</b></font><br><br>"; downloadinfomenu($lid); echo "<br><br>" . _DOWNLOADRATINGDET . "<br>" . "" . _TOTALVOTES . " {$totalvotesDB}<br>" . "" . _OVERALLRATING . ": {$finalrating}<br><br>" . "<font class=\"content\">{$description}<br>"; if (empty($auth_name)) { $auth_name = "<i>" . _UNKNOWN . "</i>"; } else { if (empty($email)) { $auth_name = "{$auth_name}"; } else { $email = ereg_replace("@", " <i>at</i> ", $email); $email = ereg_replace("\\.", " <i>dot</i> ", $email); $auth_name = "{$auth_name} ({$email})"; } } echo "<br><b>" . _AUTHOR . ":</b> {$auth_name}<br>" . "<b>" . _VERSION . ":</b> {$version} <b>" . _FILESIZE . ":</b> " . CoolSize($filesize) . "</font><br><br>" . "[ <b><a href=\"modules.php?name={$module_name}&d_op=getit&lid={$lid}\">" . _DOWNLOADNOW . "</a></b> "; if (empty($homepage) or $homepage == "http://") { echo "]<br><br>"; } else { echo "| <a href=\"{$homepage}\" target=\"new\">" . _HOMEPAGE . "</a> ]<br><br>"; } echo "<table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" width=\"455\">" . "<tr><td colspan=\"2\" bgcolor=\"{$bgcolor2}\">" . "<font class=\"content\"><b>" . _REGISTEREDUSERS . "</b></font>" . "</td></tr>" . "<tr>" . "<td bgcolor=\"{$bgcolor1}\">" . "<font class=\"content\">" . _NUMBEROFRATINGS . ": {$regvotes}</font>" . "</td>" . "<td rowspan=\"5\" width=\"200\">"; if ($regvotes == 0) { echo "<center><font class=\"content\">" . _NOREGUSERSVOTES . "</font></center>"; } else { echo "<table border=\"1\" width=\"200\">" . "<tr>" . "<td valign=\"top\" align=\"center\" colspan=\"10\" bgcolor=\"{$bgcolor2}\"><font class=\"content\">" . _BREAKDOWNBYVAL . "</font></td>" . "</tr>" . "<tr>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$rvv['1']} " . _LVOTES . " ({$rvvpercent['1']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$rvvchartheight['1']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$rvv['2']} " . _LVOTES . " ({$rvvpercent['2']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$rvvchartheight['2']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$rvv['3']} " . _LVOTES . " ({$rvvpercent['3']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$rvvchartheight['3']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$rvv['4']} " . _LVOTES . " ({$rvvpercent['4']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$rvvchartheight['4']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$rvv['5']} " . _LVOTES . " ({$rvvpercent['5']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$rvvchartheight['5']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$rvv['6']} " . _LVOTES . " ({$rvvpercent['6']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$rvvchartheight['6']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$rvv['7']} " . _LVOTES . " ({$rvvpercent['7']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$rvvchartheight['7']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$rvv['8']} " . _LVOTES . " ({$rvvpercent['8']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$rvvchartheight['8']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$rvv['9']} " . _LVOTES . " ({$rvvpercent['9']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$rvvchartheight['9']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$rvv['10']} " . _LVOTES . " ({$rvvpercent['10']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$rvvchartheight['10']}\"></td>" . "</tr>" . "<tr><td colspan=\"10\" bgcolor=\"{$bgcolor2}\">" . "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"200\"><tr>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">1</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">2</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">3</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">4</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">5</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">6</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">7</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">8</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">9</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">10</font></td>" . "</tr></table>" . "</td></tr></table>"; } echo "</td>" . "</tr>" . "<tr><td bgcolor=\"{$bgcolor2}\"><font class=\"content\">" . _DOWNLOADRATING . ": {$avgRU}</font></td></tr>" . "<tr><td bgcolor=\"{$bgcolor1}\"><font class=\"content\">" . _HIGHRATING . ": {$topreg}</font></td></tr>" . "<tr><td bgcolor=\"{$bgcolor2}\"><font class=\"content\">" . _LOWRATING . ": {$bottomreg}</font></td></tr>" . "<tr><td bgcolor=\"{$bgcolor1}\"><font class=\"content\">" . _NUMOFCOMMENTS . ": {$truecomments}</font></td></tr>" . "<tr><td></td></tr>" . "<tr><td valign=\"top\" colspan=\"2\"><font class=\"tiny\"><br><br>" . _WEIGHNOTE . " {$anonweight} " . _TO . " 1.</font></td></tr>" . "<tr><td colspan=\"2\" bgcolor=\"{$bgcolor2}\"><font class=\"content\"><b>" . _UNREGISTEREDUSERS . "</b></font></td></tr>" . "<tr><td bgcolor=\"{$bgcolor1}\"><font class=\"content\">" . _NUMBEROFRATINGS . ": {$anonvotes}</font></td>" . "<td rowspan=\"5\" width=\"200\">"; if ($anonvotes == 0) { echo "<center><font class=\"content\">" . _NOUNREGUSERSVOTES . "</font></center>"; } else { echo "<table border=\"1\" width=\"200\">" . "<tr>" . "<td valign=\"top\" align=\"center\" colspan=\"10\" bgcolor=\"{$bgcolor2}\"><font class=\"content\">" . _BREAKDOWNBYVAL . "</font></td>" . "</tr>" . "<tr>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$avv['1']} " . _LVOTES . " ({$avvpercent['1']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$avvchartheight['1']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$avv['2']} " . _LVOTES . " ({$avvpercent['2']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$avvchartheight['2']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$avv['3']} " . _LVOTES . " ({$avvpercent['3']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$avvchartheight['3']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$avv['4']} " . _LVOTES . " ({$avvpercent['4']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$avvchartheight['4']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$avv['5']} " . _LVOTES . " ({$avvpercent['5']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$avvchartheight['5']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$avv['6']} " . _LVOTES . " ({$avvpercent['6']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$avvchartheight['6']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$avv['7']} " . _LVOTES . " ({$avvpercent['7']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$avvchartheight['7']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$avv['8']} " . _LVOTES . " ({$avvpercent['8']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$avvchartheight['8']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$avv['9']} " . _LVOTES . " ({$avvpercent['9']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$avvchartheight['9']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$avv['10']} " . _LVOTES . " ({$avvpercent['10']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$avvchartheight['10']}\"></td>" . "</tr>" . "<tr><td colspan=\"10\" bgcolor=\"{$bgcolor2}\">" . "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"200\"><tr>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">1</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">2</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">3</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">4</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">5</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">6</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">7</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">8</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">9</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">10</font></td>" . "</tr></table>" . "</td></tr></table>"; } echo "</td>" . "</tr>" . "<tr><td bgcolor=\"{$bgcolor2}\"><font class=\"content\">" . _DOWNLOADRATING . ": {$avgAU}</font></td></tr>" . "<tr><td bgcolor=\"{$bgcolor1}\"><font class=\"content\">" . _HIGHRATING . ": {$topanon}</font></td></tr>" . "<tr><td bgcolor=\"{$bgcolor2}\"><font class=\"content\">" . _LOWRATING . ": {$bottomanon}</font></td></tr>" . "<tr><td bgcolor=\"{$bgcolor1}\"><font class=\"content\"> </font></td></tr>"; if ($useoutsidevoting == 1) { echo "<tr><td valign=top colspan=\"2\"><font class=\"tiny\"><br><br>" . _WEIGHOUTNOTE . " {$outsideweight} " . _TO . " 1.</font></td></tr>" . "<tr><td colspan=\"2\" bgcolor=\"{$bgcolor2}\"><font class=\"content\"><b>" . _OUTSIDEVOTERS . "</b></font></td></tr>" . "<tr><td bgcolor=\"{$bgcolor1}\"><font class=\"content\">" . _NUMBEROFRATINGS . ": {$outsidevotes}</font></td>" . "<td rowspan=\"5\" width=\"200\">"; if ($outsidevotes == 0) { echo "<center><font class=\"content\">" . _NOOUTSIDEVOTES . "</font></center>"; } else { echo "<table border=\"1\" width=\"200\">" . "<tr>" . "<td valign=\"top\" align=\"center\" colspan=\"10\" bgcolor=\"{$bgcolor2}\"><font class=\"content\">" . _BREAKDOWNBYVAL . "</font></td>" . "</tr>" . "<tr>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$ovv['1']} " . _LVOTES . " ({$ovvpercent['1']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$ovvchartheight['1']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$ovv['2']} " . _LVOTES . " ({$ovvpercent['2']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$ovvchartheight['2']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$ovv['3']} " . _LVOTES . " ({$ovvpercent['3']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$ovvchartheight['3']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$ovv['4']} " . _LVOTES . " ({$ovvpercent['4']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$ovvchartheight['4']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$ovv['5']} " . _LVOTES . " ({$ovvpercent['5']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$ovvchartheight['5']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$ovv['6']} " . _LVOTES . " ({$ovvpercent['6']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$ovvchartheight['6']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$ovv['7']} " . _LVOTES . " ({$ovvpercent['7']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$ovvchartheight['7']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$ovv['8']} " . _LVOTES . " ({$ovvpercent['8']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$ovvchartheight['8']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$ovv['9']} " . _LVOTES . " ({$ovvpercent['9']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$ovvchartheight['9']}\"></td>" . "<td bgcolor=\"{$bgcolor1}\" valign=\"bottom\"><img border=\"0\" alt=\"{$ovv['10']} " . _LVOTES . " ({$ovvpercent['10']}% " . _LTOTALVOTES . ")\" src=\"images/blackpixel.gif\" width=\"15\" height=\"{$ovvchartheight['10']}\"></td>" . "</tr>" . "<tr><td colspan=\"10\" bgcolor=\"{$bgcolor2}\">" . "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"200\"><tr>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">1</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">2</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">3</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">4</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">5</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">6</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">7</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">8</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">9</font></td>" . "<td width=\"10%\" valign=\"bottom\" align=\"center\"><font class=\"content\">10</font></td>" . "</tr></table>" . "</td></tr></table>"; } echo "</td>" . "</tr>" . "<tr><td bgcolor=\"{$bgcolor2}\"><font class=\"content\">" . _DOWNLOADRATING . ": {$avgOU}</font></td></tr>" . "<tr><td bgcolor=\"{$bgcolor1}\"><font class=\"content\">" . _HIGHRATING . ": {$topoutside}</font></td></tr>" . "<tr><td bgcolor=\"{$bgcolor2}\"><font class=\"content\">" . _LOWRATING . ": {$bottomoutside}</font></td></tr>" . "<tr><td bgcolor=\"{$bgcolor1}\"><font class=\"content\"> </font></td></tr>"; } echo "</table><br><br><center>"; downloadfooter($lid); echo "</center>"; CloseTable(); include "footer.php"; }
case "menu": menu($maindownload); break; case "AddDownload": AddDownload(); break; case "NewDownloads": require_once "new.php"; NewDownloads($newdownloadshowdays); break; case "NewDownloadsDate": require_once "new.php"; NewDownloadsDate($selectdate); break; case "CoolSize": CoolSize($size); break; case "TopRated": require_once "top.php"; TopRated($ratenum, $ratetype); break; case "MostPopular": require_once "pop.php"; MostPopular($ratenum, $ratetype); break; case "viewdownload": require_once "view.php"; viewdownload($cid, $min, $orderby, $show); break; case "viewsdownload": require_once "view.php";