function putitems_more() { global $theme, $tmp_theme; if (stristr($_SERVER['PHP_SELF'], "more_emoticon.php")) { $theme = $tmp_theme; } echo "<p class=\"noir\" align=\"center\">" . translate("Click on Smilies to insert it on your Message") . "</p>"; if ($ibid = theme_image("forum/smilies/more/smilies.php")) { $imgtmp = "themes/{$theme}/images/forum/smilies/more/"; } else { $imgtmp = "images/forum/smilies/more/"; } if (file_exists($imgtmp . "smilies.php")) { include $imgtmp . "smilies.php"; $rowcolor = tablos(); echo "<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\">"; $i = 0; foreach ($smilies as $tab_smilies) { if ($tab_smilies[3]) { if ($i == 0) { echo "<tr {$rowcolor}>"; } echo "<td width=\"20%\" align=\"center\">\n <a href=\"javascript: DoAdd('true','message',' " . $tab_smilies[0] . " ');\"><img src=\"" . $imgtmp . $tab_smilies[1] . "\" width=\"32\" height=\"32\" border=\"0\" alt=\"{$tab_smilies['2']}"; if ($tab_smilies[2]) { echo " => "; } echo $tab_smilies[0] . "\" /></a></td>"; $i++; if ($i == 5) { $rowcolor = tablos(); echo "</tr>"; $i = 0; } } } if ($i > 0) { echo "<td colspan=\"" . (5 - $i) . "\"></td></tr></table>"; } else { echo "</table>"; } } }
function poll_removePoll() { global $hlpfile, $f_meta_nom, $f_titre, $adminimg; global $NPDS_Prefix; include 'header.php'; GraphicAdmin($hlpfile); adminhead($f_meta_nom, $f_titre, $adminimg); echo ' <h3>' . adm_translate("Retirer un Sondage existant") . '</h3> <span class="help-block">' . adm_translate("S.V.P. Choisissez un sondage dans la liste suivante.") . '</span> <p align="center"><span class="text-danger">' . adm_translate("ATTENTION : Le Sondage choisi va être supprimé IMMEDIATEMENT de la base de données !") . '</span></p> '; echo ' <form action="admin.php" method="post"> <input type="hidden" name="op" value="removePosted" /> <table id="tad_delepool" data-toggle="table" data-striped="true" data-show-toggle="true" data-search="true" data-mobile-responsive="true" data-icons="icons" data-icons-prefix="fa"> <thead> <tr> <th></th> <th data-sortable="true">' . adm_translate("Intitulé du Sondage") . '</th> <th data-sortable="true">ID</th> </tr> </thead> <tbody>'; echo ''; $result = sql_query("SELECT pollID, pollTitle FROM " . $NPDS_Prefix . "poll_desc ORDER BY timeStamp"); while ($object = sql_fetch_assoc($result)) { $rowcolor = tablos(); echo ' <tr> <td><input type="radio" name="id" value="' . $object['pollID'] . '" /></td> <td> ' . $object['pollTitle'] . '</td> <td>ID : ' . $object['pollID'] . '</td> </tr> '; } echo ' </tbody> </table> <br /> <div class="form-group"> <button class="btn btn-danger" type="submit">' . adm_translate("Retirer") . '</button> </div> </form>'; include 'footer.php'; }
$fp = fopen($fic, "r"); if (filesize($fic) > 0) { $contents = fread($fp, filesize($fic)); } fclose($fp); if (substr($contents, 0, 5) != "CRYPT") { $fp = fopen($fic, "w"); fwrite($fp, "CRYPT" . L_encrypt($contents)); fclose($fp); } else { $contents = decryptK(substr($contents, 5), substr($userdata[2], 8, 8)); } echo '<table width="100%">'; $contents = explode("\n", $contents); foreach ($contents as $tab) { $tabi = explode(';', $tab); if ($tabi[0] != '') { $rowcolor = tablos(); echo "\n <tr {$rowcolor}>\n <td nowrap=\"nowrap\"> <a href=\"javascript: DoAdd(1,'to_user','{$tabi['0']},')\";><b>{$tabi['0']}</b></a></td>\n <td nowrap=\"nowrap\"><a href=\"mailto:{$tabi['1']}\" class=\"noir\"><b>{$tabi['1']}</a></td>\n <td nowrap=\"nowrap\">{$tabi['2']} </td>\n </tr>\n"; } } echo '</table>'; } else { echo "<table width=\"100%\"><tr><td>"; echo "<span class=\"noir\">" . translate("You can upload a file carnet.txt in your Mini-Web site") . ".<br />" . translate("The data structure of any line : name_of_the_member;email;comments") . "</span>"; echo "</td></tr></table>"; } echo ' </body> </html>'; }
function publishrights($author) { global $NPDS_Prefix, $hlpfile, $radminsuper, $f_meta_nom, $f_titre, $adminimg; if ($radminsuper != 1) { Header("Location: admin.php?op=sections"); } include "header.php"; GraphicAdmin($hlpfile); adminhead($f_meta_nom, $f_titre, $adminimg); echo ' <h3>' . adm_translate("Droits des auteurs") . ' :: ' . $author . '</h3> <form action="admin.php" method="post">'; include_once "lib/togglediv.class.php"; $result1 = sql_query("SELECT rubid, rubname FROM " . $NPDS_Prefix . "rubriques ORDER BY ordre"); $numrow = sql_num_rows($result1); $toggle = new ToggleDiv($numrow); echo $toggle->All(); echo "<hr noshade=\"noshade\" class=\"ongl\" />"; $i = 0; while (list($rubid, $rubname) = sql_fetch_row($result1)) { echo "<table width=\"100%\" cellspacing=\"1\" cellpadding=\"0\" border=\"0\">\n <tr>\n <td class=\"header\" width=\"40%\">"; echo $toggle->Img(); echo aff_langue($rubname) . "</td>\n <td class=\"header\"align=\"center\" width=\"15%\">" . adm_translate("Créer") . "</td>\n <td class=\"header\"align=\"center\" width=\"15%\">" . adm_translate("Publier") . "</td>\n <td class=\"header\"align=\"center\" width=\"15%\">" . adm_translate("Modifier") . "</td>\n <td class=\"header\"align=\"center\" width=\"15%\">" . adm_translate("Supprimer") . "</td>\n </tr></table>"; echo $toggle->Begin(); $result2 = sql_query("SELECT secid, secname FROM " . $NPDS_Prefix . "sections WHERE rubid='{$rubid}' ORDER BY ordre"); echo "<table width=\"100%\" cellspacing=\"1\" cellpadding=\"2\" border=\"0\">"; $rowcolor = tablos(); while (list($secid, $secname) = sql_fetch_row($result2)) { $result3 = sql_query("SELECT type FROM " . $NPDS_Prefix . "publisujet WHERE secid2='{$secid}' and aid='{$author}'"); $i++; $crea = ""; $publi = ""; $modif = ""; $supp = ""; if (sql_num_rows($result3) > 0) { while (list($type) = sql_fetch_row($result3)) { if ($type == 1) { $crea = "checked=\"checked\""; } else { if ($type == 2) { $publi = "checked=\"checked\""; } else { if ($type == 3) { $modif = "checked=\"checked\""; } else { if ($type == 4) { $supp = "checked=\"checked\""; } } } } } } echo "<tr>\n <td width=\"40%\">" . aff_langue($secname) . "</td>\n <td align=\"center\" width=\"15%\"><input type=\"checkbox\" name=\"creation[{$i}]\" value=\"{$secid}\" {$crea} /></td>\n <td align=\"center\" width=\"15%\"><input type=\"checkbox\" name=\"publication[{$i}]\" value=\"{$secid}\" {$publi} /></td>\n <td align=\"center\" width=\"15%\"><input type=\"checkbox\" name=\"modification[{$i}]\" value=\"{$secid}\" {$modif} /></td>\n <td align=\"center\" width=\"15%\"><input type=\"checkbox\" name=\"suppression[{$i}]\" value=\"{$secid}\" {$supp} /></td>\n </tr>"; } echo '</table>'; echo $toggle->End(); echo '<br />'; } echo '<input type="hidden" name="chng_aid" value="' . $author . '" /> <input type="hidden" name="op" value="updatedroitauteurs" /> <input type="hidden" name="maxindex" value="' . $i . '" /> <input class="btn btn-primary" type="submit" value="' . adm_translate("Valider") . '" /> <input class="btn btn-secondary" type="button" onclick="javascript:history.back()" value="' . adm_translate("Retour en arrière") . '" /> </form>'; closetable(); include "footer.php"; }
function lnl_list() { global $hlpfile; global $NPDS_Prefix; include "header.php"; GraphicAdmin($hlpfile); opentable(); $result = sql_query("SELECT ref, header , body, footer, number_send, type_send, date, status FROM " . $NPDS_Prefix . "lnl_send ORDER BY date"); echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\"><tr><td class=\"header\">\n"; echo adm_translate("Liste des LNL envoyées"); echo "</td></tr></table>\n"; echo "<br /><table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" border=\"0\">"; echo "<tr>"; echo "<td class=\"ongl\">Num.</td>"; echo "<td class=\"ongl\">" . adm_translate("Entête") . "</td>"; echo "<td class=\"ongl\">" . adm_translate("Corps") . "</td>"; echo "<td class=\"ongl\">" . adm_translate("Pied") . "</td>"; echo "<td class=\"ongl\">" . adm_translate("Nbre d'envois effectués") . "</td>"; echo "<td class=\"ongl\">" . adm_translate("Type") . "</td>"; echo "<td class=\"ongl\">Date</td>"; echo "<td class=\"ongl\">Status</td>"; echo "</tr>"; while (list($ref, $header, $body, $footer, $number_send, $type_send, $date, $status) = sql_fetch_row($result)) { $rowcolor = tablos(); echo "<tr {$rowcolor}>"; echo "<td>{$ref}</td>"; echo "<td>{$header}</td>"; echo "<td>{$body}</td>"; echo "<td>{$footer}</td>"; echo "<td>{$number_send}</td>"; echo "<td>{$type_send}</td>"; echo "<td>{$date}</td>"; if ($status == "NOK") { echo "<td class=\"rouge\">{$status}</td>"; } else { echo "<td>{$status}</td>"; } echo "</tr>"; } echo "</table><br />"; echo "[ <a href=\"javascript:history.go(-1)\" class=\"noir\">" . adm_translate("Retour en arriére") . "</a> ]"; closetable(); include "footer.php"; }
function ForumMaintTopics($before, $forum_name) { global $hlpfile, $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg; include "header.php"; GraphicAdmin($hlpfile); adminhead($f_meta_nom, $f_titre, $adminimg); echo ' <hr /> <h3 class="text-danger">' . adm_translate("Supprimer massivement les Topics") . '</h3>'; if ($before != '') { echo ' <span class="text-danger">< ' . $before . '</span>'; $add_sql = "and topic_time<'{$before}'"; $topic_check = ' checked="checked"'; } else { $add_sql = ''; $topic_check = ''; } if ($forum_name != '') { $add_sql2 = "WHERE forum_name='{$forum_name}'"; } else { $add_sql2 = ''; } echo '<form action="admin.php" method="post">'; echo "<table>\n"; $resultF = sql_query("SELECT forum_id, forum_name FROM " . $NPDS_Prefix . "forums {$add_sql2} ORDER BY forum_id ASC"); while (list($forum_id, $forum_name) = sql_fetch_row($resultF)) { $rowcolor = tablos(); echo "<tr {$rowcolor}><td align=\"left\"><b>{$forum_name}</b></td>"; $resultT = sql_query("SELECT topic_id, topic_title FROM " . $NPDS_Prefix . "forumtopics WHERE forum_id='{$forum_id}' {$add_sql} ORDER BY topic_id ASC"); $ibid = 0; while (list($topic_id, $topic_title) = sql_fetch_row($resultT)) { if ($parse == 0) { $tt = FixQuotes($topic_title); } else { $tt = stripslashes($topic_title); } if ($ibid == 20) { echo "</tr><tr><td> </td>"; $ibid = 0; } $ibid++; echo "<td align=\"center\"><a href=\"admin.php?op=MaintForumTopicDetail&topic={$topic_id}&topic_title=" . urlencode($tt) . "\" title=\"{$tt}\" class=\"noir\">{$topic_id}</a><br />\n <input class=\"texbox\" type=\"checkbox\" name=\"topics[{$topic_id}]\" {$topic_check} /></td>"; } if ($ibid < 20) { echo "<td colspan=\"" . (20 - $ibid) . "\"> </td>"; } } echo ' </tr> </table> <input type="hidden" name="op" value="ForumMaintTopicMassiveSup" />'; echo "\n <input class=\"btn btn-danger\" type=\"submit\" name=\"Topics_Del\" value=\"" . adm_translate("Supprimer massivement les Topics") . "\" />"; echo '</form>'; sql_free_result; adminfoot('', '', '', ''); }
function bannerstats($login, $pass) { global $NPDS_Prefix; $result = sql_query("SELECT cid, name, passwd FROM " . $NPDS_Prefix . "bannerclient WHERE login='******'"); list($cid, $name, $passwd) = sql_fetch_row($result); if ($login == '' and $pass == '' or $pass == '') { IncorrectLogin(); } else { if ($pass == $passwd) { header_page(); echo ' <h3>' . translate("Current Active Banners for") . ' ' . $name . '</h3> <table data-toggle="table" data-search="true" data-striped="true" data-mobile-responsive="true" data-show-export="true" data-show-columns="true"> <thead> <tr> <th data-sortable="true">ID</th> <th data-sortable="true">' . translate("Made") . '</th> <th data-sortable="true">' . translate("Impressions") . '</th> <th data-sortable="true">' . translate("Imp. Left") . '</th> <th data-sortable="true">' . translate("Clicks") . '</th> <th data-sortable="true">% ' . translate("Clicks") . '</th> <th>' . translate("Functions") . '</th> </tr> </thead> <tbody>'; $result = sql_query("SELECT bid, imptotal, impmade, clicks, date FROM " . $NPDS_Prefix . "banner WHERE cid='{$cid}'"); while (list($bid, $imptotal, $impmade, $clicks, $date) = sql_fetch_row($result)) { $rowcolor = tablos(); if ($impmade == 0) { $percent = 0; } else { $percent = substr(100 * $clicks / $impmade, 0, 5); } if ($imptotal == 0) { $left = translate("Unlimited"); } else { $left = $imptotal - $impmade; } echo ' <tr> <td>' . $bid . '</td> <td>' . $impmade . '</td> <td>' . $imptotal . '</td> <td>' . $left . '</td> <td>' . $clicks . '</td> <td>' . $percent . '%</td> <td><a href="banners.php?op=EmailStats&login='******'&cid=' . $cid . '&bid=' . $bid . '">E-mail Stats</a></td> </tr>'; } global $nuke_url, $sitename; echo ' </tbody> </table> <a href="' . $nuke_url . '" class="header" target="_blank">' . $sitename . '</a>'; $result = sql_query("SELECT bid, imageurl, clickurl FROM " . $NPDS_Prefix . "banner WHERE cid='{$cid}'"); while (list($bid, $imageurl, $clickurl) = sql_fetch_row($result)) { $numrows = sql_num_rows($result); echo '<div class="card">'; if ($imageurl != '') { echo ' <p><img src="' . aff_langue($imageurl) . '" class="img-fluid" /> '; //pourquoi aff_langue ?? } else { echo '<p>'; echo $clickurl; } echo ' <h4>Banner ID : ' . $bid . '</h4>'; if ($imageurl != "") { echo translate("This Banners points to") . ' : <a href="' . aff_langue($clickurl) . '" target="_Blank" >[ URL ]</a>'; } echo ' <form action="banners.php" method="get">'; if ($imageurl != "") { echo ' <div class="form-group row"> <label class="control-label col-sm-12" for="url">' . translate("Change") . ' URL</label> <div class="col-sm-12"> <input class="form-control" type="text" name="url" maxlength="200" value="' . $clickurl . '" /> </div> </div>'; } else { echo ' <div class="form-group row"> <label class="control-label col-sm-12" for="url">' . translate("Change") . ' URL</label> <div class="col-sm-12"> <input class="form-control" type="text" name="url" maxlength="200" value="' . htmlentities($clickurl, ENT_QUOTES, cur_charset) . '" /> </div> </div>'; } echo ' <input type="hidden" name="login" value="' . $login . '" /> <input type="hidden" name="bid" value="' . $bid . '" /> <input type="hidden" name="pass" value="' . $pass . '" /> <input type="hidden" name="cid" value="' . $cid . '" /> <input class="btn btn-primary" type="submit" name="op" value="' . translate("Change") . '" /></td> </form> </p> </div>'; } // Finnished Banners echo "<br />"; echo ' <h3>' . translate("Banners Finished for") . ' ' . $name . '</h3> <table data-toggle="table" data-search="true" data-striped="true" data-mobile-responsive="true" data-show-export="true" data-show-columns="true"> <thead> <tr> <th data-sortable="true">ID</td> <th data-sortable="true">' . translate("Impressions") . '</th> <th data-sortable="true">' . translate("Clicks") . '</th> <th data-sortable="true">% ' . translate("Clicks") . '</th> <th data-sortable="true">' . translate("Start Date") . '</th> <th data-sortable="true">' . translate("End Date") . '</th> </tr> </thead> <tbody>'; $result = sql_query("SELECT bid, impressions, clicks, datestart, dateend FROM " . $NPDS_Prefix . "bannerfinish WHERE cid='{$cid}'"); while (list($bid, $impressions, $clicks, $datestart, $dateend) = sql_fetch_row($result)) { $percent = substr(100 * $clicks / $impressions, 0, 5); echo ' <tr> <td>' . $bid . '</td> <td>' . $impressions . '</td> <td>' . $clicks . '</td> <td>' . $percent . ' %</td> <td>' . $datestart . '</td> <td>' . $dateend . '</td> </tr>'; } echo ' </tbody> </table>'; adminfoot('fv', '', '', 'no'); footer_page(); } else { IncorrectLogin(); } } }
function LinksListModRequests() { global $NPDS_Prefix; global $hlpfile; $resultLink = sql_query("SELECT requestid, lid, cid, sid, title, url, description, modifysubmitter FROM " . $NPDS_Prefix . "links_modrequest WHERE brokenlink='0' ORDER BY requestid"); $totalmodrequests = sql_num_rows($resultLink); if ($totalmodrequests == 0) { header("location: admin.php?op=links"); } include "header.php"; GraphicAdmin($hlpfile); opentable(); echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\"><tr><td class=\"header\">\n"; echo adm_translate("Requête de modification d'un Lien Utilisateur") . " ({$totalmodrequests})"; echo "</td></tr></table>\n"; while (list($requestid, $lid, $cid, $sid, $title, $url, $description, $modifysubmitter) = sql_fetch_row($resultLink)) { $result2 = sql_query("SELECT cid, sid, title, url, description, submitter FROM " . $NPDS_Prefix . "links_links WHERE lid='{$lid}'"); list($origcid, $origsid, $origtitle, $origurl, $origdescription, $owner) = sql_fetch_row($result2); $result3 = sql_query("SELECT title FROM " . $NPDS_Prefix . "links_categories WHERE cid='{$cid}'"); $result4 = sql_query("SELECT title FROM " . $NPDS_Prefix . "links_subcategories WHERE cid='{$cid}' AND sid='{$sid}'"); $result5 = sql_query("SELECT title FROM " . $NPDS_Prefix . "links_categories WHERE cid='{$origcid}'"); $result6 = sql_query("SELECT title FROM " . $NPDS_Prefix . "links_subcategories WHERE cid='{$origcid}' AND sid='{$origsid}'"); $result7 = sql_query("SELECT email FROM " . $NPDS_Prefix . "users WHERE uname='{$modifysubmitter}'"); $result8 = sql_query("SELECT email FROM " . $NPDS_Prefix . "users WHERE uname='{$owner}'"); list($cidtitle) = sql_fetch_row($result3); list($sidtitle) = sql_fetch_row($result4); list($origcidtitle) = sql_fetch_row($result5); list($origsidtitle) = sql_fetch_row($result6); list($modifysubmitteremail) = sql_fetch_row($result7); list($owneremail) = sql_fetch_row($result8); $title = stripslashes($title); $description = stripslashes($description); if ($owner == "") { $owner = "administration"; } if ($origsidtitle == "") { $origsidtitle = "-----"; } if ($sidtitle == "") { $sidtitle = "-----"; } echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\">\n"; $rowcolor = tablos(); echo "<tr {$rowcolor}><td><hr noshade class=\"ongl\">\n <table width=\"100%\"><tr>\n <td valign=\"top\" width=\"45%\"><span class=\"noir\"><b>" . adm_translate("Original") . "</b></span></td>\n <td rowspan=\"5\" valign=\"top\" align=\"left\" valign=\"top\"><span class=\"noir\"><b>" . adm_translate("Description:") . "</b></span><br />{$origdescription}</td></tr>\n <tr><td valign=\"top\" width=\"45%\">" . adm_translate("Titre :") . " {$origtitle}</td></tr>\n <tr><td valign=\"top\" width=\"45%\">" . adm_translate("URL : ") . " <a href=\"{$origurl}\" target=\"_blank\" class=\"noir\">{$origurl}</a></td></tr>\n <tr><td valign=\"top\" width=\"45%\">" . adm_translate("Catégorie :") . " {$origcidtitle}</td></tr>\n <tr><td valign=\"top\" width=\"45%\">" . adm_translate("Sous-catégorie :") . " {$origsidtitle}</td></tr>\n </table>\n </td></tr>"; $rowcolor = tablos(); echo "<tr {$rowcolor}><td>\n <table width=\"100%\"><tr>\n <td valign=\"top\" width=\"45%\"><b>" . adm_translate("Proposé") . "</b></td>\n <td rowspan=\"5\" valign=\"top\" align=\"left\" valign=\"top\"><span class=\"noir\"><b>" . adm_translate("Description:") . "</b></span><br />{$description}</td></tr>\n <tr><td valign=\"top\" width=\"45%\">" . adm_translate("Titre :") . " {$title}</td></tr>\n <tr><td valign=\"top\" width=\"45%\">" . adm_translate("URL : ") . " <a href=\"{$url}\" target=\"_blank\" class=\"noir\">{$url}</a></td></tr>\n <tr><td valign=\"top\" width=\"45%\">" . adm_translate("Catégorie :") . " {$cidtitle}</td></tr>\n <tr><td valign=\"top\" width=\"45%\">" . adm_translate("Sous-catégorie :") . " {$sidtitle}</td></tr>\n </table>\n </td></tr>"; echo "</table>"; echo "<table width=\"100%\" callspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr><td class=\"header\">\n"; if ($modifysubmitteremail == "") { echo adm_translate("Auteur") . " : {$modifysubmitter}</td>"; } else { echo adm_translate("Auteur") . " : <a href=\"mailto:{$modifysubmitteremail}\" class=\"box\">{$modifysubmitter}</a></td>"; } echo "<td class=\"header\">"; if ($owneremail == "") { echo adm_translate("Propriétaire") . " : {$owner}</td>"; } else { echo adm_translate("Propriétaire") . " : <a href=\"mailto:{$owneremail}\" class=\"box\">{$owner}</a></td>"; } echo "<td align=\"right\">[ <a href=\"admin.php?op=LinksChangeModRequests&requestid={$requestid}\" class=\"rouge\">" . adm_translate("Accepter") . "</a> | <a href=\"admin.php?op=LinksChangeIgnoreRequests&requestid={$requestid}\" class=\"noir\">" . adm_translate("Ignorer") . "</a> ]</td>\n </tr></table><hr noshade class=\"ongl\"><br />\n"; } closetable(); include "footer.php"; }
function LinksListBrokenLinks() { global $ModPath, $ModStart, $links_DB, $NPDS_Prefix; $resultBrok = sql_query("SELECT requestid, lid, modifysubmitter FROM " . $links_DB . "links_modrequest WHERE brokenlink=1 ORDER BY requestid"); $totalbrokenlinks = sql_num_rows($resultBrok); if ($totalbrokenlinks == 0) { Header("Location: modules.php?ModStart={$ModStart}&ModPath={$ModPath}"); } else { include "header.php"; echo ' <h3>' . translate("User Reported Broken Links") . ' <span class="label label-default pull-right"> ' . $totalbrokenlinks . '</span></h3>'; echo "<br />\n " . translate("Ignore (Deletes all <strong>requests</strong> for a given link)") . "<br /><br />\n " . translate("Delete (Deletes <strong>broken link</strong> and <strong>requests</strong> for a given link)") . "<br /><br />"; echo ' <table data-toggle="table" > <thead> <tr> <th data-sortable="true" data-halign="center">' . translate("Links") . '</th> <th data-sortable="true" data-halign="center">' . translate("Submitter") . '</th> <th data-sortable="true" data-halign="center">' . translate("Owner") . '</th> <th data-halign="center" data-align="right">' . translate("Ignore") . '</th> <th data-halign="center" data-align="right">' . translate("Delete") . '</th> </tr> </thead> <tbody>'; while (list($requestid, $lid, $modifysubmitter) = sql_fetch_row($resultBrok)) { $rowcolor = tablos(); $result2 = sql_query("SELECT title, url, submitter FROM " . $links_DB . "links_links WHERE lid='{$lid}'"); if ($modifysubmitter != '$anonymous') { $result3 = sql_query("SELECT email FROM " . $NPDS_Prefix . "users WHERE uname='{$modifysubmitter}'"); list($email) = sql_fetch_row($result3); } list($title, $url, $owner) = sql_fetch_row($result2); $result4 = sql_query("SELECT email FROM " . $NPDS_Prefix . "users WHERE uname='{$owner}'"); list($owneremail) = sql_fetch_row($result4); echo ' <tr> <td><a href="' . $url . '" target="_blank">' . $title . '</a></td>'; if ($email == '') { echo ' <td>' . $modifysubmitter; } else { echo ' <td><a href="mailto:' . $email . '" >' . $modifysubmitter . '</a>'; } echo '</td>'; if ($owneremail == '') { echo ' <td>' . $owner; } else { echo ' <td><a href="mailto:' . $owneremail . '" >' . $owner . '</a>'; } echo '</td> <td><a href="modules.php?ModStart=' . $ModStart . '&ModPath=' . $ModPath . '&op=LinksIgnoreBrokenLinks&lid=' . $lid . '" >' . translate("Ignore") . '</a></td> <td><a href="modules.php?ModStart=' . $ModStart . '&ModPath=' . $ModPath . '&op=LinksDelBrokenLinks&lid=' . $lid . '" >' . translate("Delete") . '</a></td> </tr>'; } echo ' </tbody> </table>'; include "footer.php"; } }
function DownloadAdmin() { global $hlpfile, $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg; include "header.php"; include_once "lib/togglediv.class.php"; GraphicAdmin($hlpfile); adminhead($f_meta_nom, $f_titre, $adminimg); echo "<form action=\"admin.php\" method=\"post\">"; $resultX = sql_query("SELECT DISTINCT dcategory FROM " . $NPDS_Prefix . "downloads ORDER BY dcategory"); $num_row = sql_num_rows($resultX); $toggle = new ToggleDiv($num_row); echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\"><tr><td class=\"header\">\n"; echo adm_translate("Téléchargements"); echo "</td><td class=\"ongl\">" . $toggle->All() . "</td>"; echo "</td></tr></table>"; while (list($dcategory) = sql_fetch_row($resultX)) { echo "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" border=\"0\">"; echo "<tr><td class=\"ongl\">"; echo $toggle->Img(); echo adm_translate("Catégorie") . " : " . aff_langue(stripslashes($dcategory)); echo $toggle->Begin(); echo "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" border=\"0\">\n <tr>\n <td class=\"ongl\">" . adm_translate("ID") . "</td>\n <td class=\"ongl\">" . adm_translate("Compt.") . "</td>\n <td class=\"ongl\">Typ.</td>\n <td class=\"ongl\">" . adm_translate("URL") . "</td>\n <td class=\"ongl\">" . adm_translate("Nom de fichier") . "</td>\n <td class=\"ongl\" align=\"center\">" . adm_translate("Ver.") . "</td>\n <td class=\"ongl\" align=\"center\">" . adm_translate("Taille de fichier") . "</td>\n <td class=\"ongl\" align=\"center\">" . adm_translate("Date") . "</td>\n <td class=\"ongl\" align=\"center\">" . adm_translate("Fonctions") . "</td>\n </tr>"; $result = sql_query("SELECT did, dcounter, durl, dfilename, dfilesize, ddate, dver, perms FROM " . $NPDS_Prefix . "downloads WHERE dcategory='" . addslashes($dcategory) . "' ORDER BY did ASC"); while (list($did, $dcounter, $durl, $dfilename, $dfilesize, $ddate, $dver, $dperm) = sql_fetch_row($result)) { $rowcolor = tablos(); echo "<tr {$rowcolor}>\n <td align=\"center\">{$did}</td>\n <td align=\"center\">{$dcounter}</td>"; if ($dperm == 0) { $dperm = "Al"; } if ($dperm >= 1) { $dperm = "Mb"; } if ($dperm == -127) { $dperm = "Ad"; } if ($dperm == -1) { $dperm = "An"; } echo "<td align=\"left\">{$dperm}</td>\n <td><a href=\"{$durl}\" class=\"noir\">" . adm_translate("Téléchargements") . "</a></td>\n <td>{$dfilename}</td>\n <td align=\"center\"> {$dver}</td>\n <td align=\"center\">"; //$Fichier = new File($durl); $Fichier = new FileManagement(); // essai class if ($dfilesize != 0) { //echo $Fichier->Pretty_Size($dfilesize); echo $Fichier->file_size_auto($durl, 2); } else { //echo $Fichier->Affiche_Size(); echo $Fichier->file_size_auto($durl, 2); } echo "</td>\n <td align=\"center\">{$ddate}</td>\n <td align=\"center\"><a href=\"admin.php?op=DownloadEdit&did={$did}\" class=\"noir\">" . adm_translate("Editer") . "</a> |\n <a href=\"admin.php?op=DownloadDel&did={$did}&ok=0\" class=\"rouge\">" . adm_translate("Effacer") . "</a></td>\n </tr>"; } echo "</table>"; echo $toggle->End(); echo "</td></tr></table>"; } echo ' </form>'; echo ' <h3>' . adm_translate("Ajouter un Téléchargement") . '</h3> <form action="admin.php" method="post" name="adminForm"> <div class="form-group row"> <label class="form-control-label col-sm-4" for="durl">' . adm_translate("Télécharger URL") . '</label> <div class="col-sm-8"> <input class="form-control" type="url" id="durl" name="durl" maxlength="255" required="required" /> <a href="javascript:void(0);" onclick="window.open(\'admin.php?op=FileManagerDisplay\', \'wdir\', \'width=650, height=450, menubar=no, location=no, directories=no, status=no, copyhistory=no, toolbar=no, scrollbars=yes, resizable=yes\');"> <span class="">[' . adm_translate("Parcourir") . ']</span></a> <span class="help-block text-xs-right"><span id="countcar_durl"></span></span> </div> </div> <div class="form-group row"> <label class="form-control-label col-sm-4" for="dcounter">' . adm_translate("Compteur") . '</label> <div class="col-sm-8"> <input class="form-control" type="number" name="dcounter" maxlength="30" /> </div> </div> <div class="form-group row"> <label class="form-control-label col-sm-4" for="dfilename">' . adm_translate("Nom de fichier") . '</label> <div class="col-sm-8"> <input class="form-control" type="text" id="dfilename" name="dfilename" maxlength="255" /> <span class="help-block text-xs-right"><span id="countcar_dfilename"></span></span> </div> </div> <div class="form-group row"> <label class="form-control-label col-sm-4" for="dver">' . adm_translate("Version") . '</label> <div class="col-sm-8"> <input class="form-control" type="text" name="dver" maxlength="6" /> </div> </div> <div class="form-group row"> <label class="form-control-label col-sm-4" for="dfilesize">' . adm_translate("Taille de fichier") . ' (bytes)</label> <div class="col-sm-8"> <input class="form-control" type="text" name="dfilesize" maxlength="31" /> </div> </div> <div class="form-group row"> <label class="form-control-label col-sm-4" for="dweb">' . adm_translate("Propriétaire de la page Web") . '</label> <div class="col-sm-8"> <input class="form-control" type="text" id="dweb" name="dweb" maxlength="255" /> <span class="help-block text-xs-right"><span id="countcar_dweb"></span></span> </div> </div> <div class="form-group row"> <label class="form-control-label col-sm-4" for="duser">' . adm_translate("Propriétaire") . '</label> <div class="col-sm-8"> <input class="form-control" type="text" id="duser" name="duser" maxlength="30" /> <span class="help-block text-xs-right"><span id="countcar_duser"></span></span> </div> </div> <div class="form-group row"> <label class="form-control-label col-sm-4" for="dcategory">' . adm_translate("Catégorie") . '</label> <div class="col-sm-8"> <input class="form-control" type="text" id="dcategory" name="dcategory" maxlength="250" /> <span class="help-block text-xs-right"><span id="countcar_dcategory"></span></span> <select class="c-select form-control" name="sdcategory">'; $result = sql_query("SELECT DISTINCT dcategory FROM " . $NPDS_Prefix . "downloads ORDER BY dcategory"); while (list($dcategory) = sql_fetch_row($result)) { $dcategory = stripslashes($dcategory); echo ' <option ' . $sel . ' value="' . $dcategory . '">' . aff_langue($dcategory) . '</option>'; } echo ' </select> </div> </div> <div class="form-group row"> <label class="form-control-label col-sm-12" for="xtext">' . adm_translate("Description") . '</label> <div class="col-sm-12"> <textarea class="tin form-control" name="xtext" rows="20" ></textarea> </div> </div>'; echo aff_editeur('xtext', ''); echo ' <fieldset> <legend>' . adm_translate("Droits") . '</legend>'; droits(''); echo '</fieldset> <input type="hidden" name="op" value="DownloadAdd" /> <div class="form-group row"> <input class="btn btn-primary" type="submit" value="' . adm_translate("Ajouter") . '" /> </div> </form> <script type="text/javascript"> //<![CDATA[ $(document).ready(function() { inpandfieldlen("durl",255); inpandfieldlen("dfilename",255); inpandfieldlen("dver",6); inpandfieldlen("dfilesize",31); inpandfieldlen("dweb",255); inpandfieldlen("duser",30); inpandfieldlen("dcategory",250); }); //]]> </script>'; adminfoot('fv', '', '', ''); // include("footer.php"); }
function topdownload_data($form, $ordre) { global $NPDS_Prefix; global $top, $long_chain; if (!$long_chain) { $long_chain = 13; } settype($top, "integer"); $result = sql_query("SELECT did, dcounter, dfilename, dcategory, ddate, perms FROM " . $NPDS_Prefix . "downloads ORDER BY '{$ordre}' DESC LIMIT 0,{$top}"); $lugar = 1; $ibid = ""; while (list($did, $dcounter, $dfilename, $dcategory, $ddate, $dperm) = sql_fetch_row($result)) { $rowcolor = tablos(); if ($dcounter > 0) { $okfile = autorisation($dperm); if ($ordre == "dcounter") { $dd = "( " . wrh($dcounter) . " )"; } if ($ordre == "ddate") { $dd = translate("dateinternal"); $day = substr($ddate, 8, 2); $month = substr($ddate, 5, 2); $year = substr($ddate, 0, 4); $dd = str_replace("d", $day, $dd); $dd = str_replace("m", $month, $dd); $dd = str_replace("Y", $year, $dd); $dd = "(" . str_replace("H:i", "", $dd) . ")"; } $ori_dfilename = $dfilename; if (strlen($dfilename) > $long_chain) { $dfilename = substr($dfilename, 0, $long_chain) . " ..."; } if ($form == "short") { if ($okfile) { $ibid .= "" . $lugar . " <a href=\"download.php?op=geninfo&did={$did}\" title=\"" . $ori_dfilename . " " . $dd . "\" >" . $dfilename . "</a><br />"; } } else { if ($okfile) { $ibid .= "<tr " . $rowcolor . "><td>" . $lugar . ": <a href=\"download.php?op=geninfo&did={$did}\" class=\"noir\">" . $dfilename . "</a> (" . translate("Category") . " : " . aff_langue(stripslashes($dcategory)) . ")</td><td align=\"right\">" . wrh($dcounter) . "<br /></td></tr>"; } } if ($okfile) { $lugar++; } } } sql_free_result($result); return $ibid; }