function automatednews() { global $gmt; global $NPDS_Prefix; $today = getdate(time() + $gmt * 3600); $day = $today['mday']; if ($day < 10) { $day = "0{$day}"; } $month = $today['mon']; if ($month < 10) { $month = "0{$month}"; } $year = $today['year']; $hour = $today['hours']; $min = $today['minutes']; $result = sql_query("SELECT anid, date_debval FROM " . $NPDS_Prefix . "autonews WHERE date_debval LIKE '{$year}-{$month}%'"); while (list($anid, $date_debval) = sql_fetch_row($result)) { preg_match('#^(\\d{4})-(\\d{1,2})-(\\d{1,2}) (\\d{1,2}):(\\d{1,2}):(\\d{1,2})$#', $date_debval, $date); if ($date[1] <= $year and $date[2] <= $month and $date[3] <= $day) { if ($date[4] < $hour and $date[5] >= $min or $date[4] <= $hour and $date[5] <= $min or $day - $date[3] >= 1) { $result2 = sql_query("SELECT catid, aid, title, hometext, bodytext, topic, informant, notes, ihome, date_finval, auto_epur FROM " . $NPDS_Prefix . "autonews WHERE anid='{$anid}'"); while (list($catid, $aid, $title, $hometext, $bodytext, $topic, $author, $notes, $ihome, $date_finval, $epur) = sql_fetch_row($result2)) { $subject = stripslashes(FixQuotes($title)); $hometext = stripslashes(FixQuotes($hometext)); $bodytext = stripslashes(FixQuotes($bodytext)); $notes = stripslashes(FixQuotes($notes)); sql_query("INSERT INTO " . $NPDS_Prefix . "stories VALUES (NULL, '{$catid}', '{$aid}', '{$subject}', now(), '{$hometext}', '{$bodytext}', '0', '0', '{$topic}', '{$author}', '{$notes}', '{$ihome}', '0', '{$date_finval}', '{$epur}')"); sql_query("DELETE FROM " . $NPDS_Prefix . "autonews WHERE anid='{$anid}'"); global $subscribe; if ($subscribe) { subscribe_mail("topic", $topic, "", $subject, ""); } // Réseaux sociaux if (file_exists('modules/npds_twi/npds_to_twi.php')) { include 'modules/npds_twi/npds_to_twi.php'; } if (file_exists('modules/npds_fbk/npds_to_fbk.php')) { include 'modules/npds_twi/npds_to_fbk.php'; } // Réseaux sociaux } } } } // Purge automatique $result = sql_query("SELECT sid, date_finval, auto_epur FROM " . $NPDS_Prefix . "stories WHERE date_finval LIKE '{$year}-{$month}%'"); while (list($sid, $date_finval, $epur) = sql_fetch_row($result)) { preg_match('#^(\\d{4})-(\\d{1,2})-(\\d{1,2}) (\\d{1,2}):(\\d{1,2}):(\\d{1,2})$#', $date_finval, $date); if ($date[1] <= $year and $date[2] <= $month and $date[3] <= $day) { if ($date[4] < $hour and $date[5] >= $min or $date[4] <= $hour and $date[5] <= $min) { if ($epur == 1) { sql_query("DELETE FROM " . $NPDS_Prefix . "stories WHERE sid='{$sid}'"); } else { sql_query("UPDATE " . $NPDS_Prefix . "stories SET archive='1' WHERE sid='{$sid}'"); } } } } }
function PerSav() { $pmbperiod = $_REQUEST['pmbperiod']; $md = $_REQUEST['md'] + 0; $Nama = FixQuotes($_REQUEST['Nama']); $na = empty($_REQUEST['NA']) ? 'N' : $_REQUEST['NA']; $mul = "{$_REQUEST['TglMulai_y']}-{$_REQUEST['TglMulai_m']}-{$_REQUEST['TglMulai_d']}"; $sel = "{$_REQUEST['TglSelesai_y']}-{$_REQUEST['TglSelesai_m']}-{$_REQUEST['TglSelesai_d']}"; $umul = "{$_REQUEST['UjianMulai_y']}-{$_REQUEST['UjianMulai_m']}-{$_REQUEST['UjianMulai_d']}"; $usel = "{$_REQUEST['UjianSelesai_y']}-{$_REQUEST['UjianSelesai_m']}-{$_REQUEST['UjianSelesai_d']}"; $bmul = "{$_REQUEST['BayarMulai_y']}-{$_REQUEST['BayarMulai_m']}-{$_REQUEST['BayarMulai_d']}"; $bsel = "{$_REQUEST['BayarSelesai_y']}-{$_REQUEST['BayarSelesai_m']}-{$_REQUEST['BayarSelesai_d']}"; $_prodi = array(); $_prodi = $_REQUEST['ProdiID']; $ProdiID = !empty($_prodi) ? implode(',', $_prodi) : ''; // Simpan if ($md == 0) { $s = "update pmbperiod set Nama='{$Nama}', TglMulai='{$mul}', TglSelesai='{$sel}', \r\n BayarMulai='{$bmul}', BayarSelesai='{$bsel}', TelitiBayarProdi='{$ProdiID}',\r\n UjianMulai='{$umul}', UjianSelesai='{$usel}', NA='{$na}' where PMBPeriodID='{$pmbperiod}'"; _query($s); } else { $ada = GetFields('pmbperiod', 'PMBPeriodID', $pmbperiod, '*'); if (empty($ada)) { $s = "insert into pmbperiod(PMBPeriodID, Nama, KodeID, TglMulai, TglSelesai, UjianMulai, UjianSelesai, \r\n BayarMulai, BayarSelesai, TelitiBayarProdi, NA)\r\n Values('{$pmbperiod}', '{$Nama}', '{$_SESSION['KodeID']}', '{$mul}', '{$sel}', '{$umul}', '{$usel}', \r\n '{$bmul}', '{$bsel}', '{$ProdiID}', '{$na}')"; _query($s); } else { echo ErrorMsg('Periode Telah Ada', "Periode <b>{$pmbperiod}</b> tidak dapat ditambahkan\r\n karena Periode tersebut sudah dibuat."); } } // Tidak aktifkan if ($na == 'N') { $s = "update pmbperiod set NA='Y' where NA='N' and PMBPeriodID<>'{$pmbperiod}' "; _query($s); } DftrPer(); }
function SiteSent($fname) { include 'header.php'; $fname = stripslashes(FixQuotes(check_html(removecrlf($fname)))); OpenTable(); echo "<center><font class=\"content\">" . _FREFERENCE . " {$fname}...<br><br>" . _THANKSREC . "</font></center>"; CloseTable(); include 'footer.php'; }
function changemblock($title, $content) { global $NPDS_Prefix; $title = stripslashes(FixQuotes($title)); $content = stripslashes(FixQuotes($content)); sql_query("UPDATE " . $NPDS_Prefix . "mainblock SET title='{$title}', content='{$content}'"); global $aid; Ecr_Log("security", "ChangeMainBlock({$title}) by AID : {$aid}", ""); Header("Location: admin.php?op=adminMain"); }
function autoSaveEdit($anid, $title, $hometext, $bodytext, $topic, $notes, $catid, $ihome, $informant, $members, $Mmembers, $date_debval, $date_finval, $epur) { global $aid, $ultramode, $NPDS_Prefix; $title = stripslashes(FixQuotes(str_replace('"', '"', $title))); $hometext = stripslashes(FixQuotes($hometext)); $bodytext = stripslashes(FixQuotes($bodytext)); $notes = stripslashes(FixQuotes($notes)); if ($members == 1 and $Mmembers == '') { $ihome = "-127"; } if ($members == 1 and ($Mmembers > 1 and $Mmembers <= 127)) { $ihome = $Mmembers; } $result = sql_query("UPDATE " . $NPDS_Prefix . "autonews SET catid='{$catid}', title='{$title}', time=now(), hometext='{$hometext}', bodytext='{$bodytext}', topic='{$topic}', notes='{$notes}', ihome='{$ihome}', date_debval='{$date_debval}', date_finval='{$date_finval}', auto_epur='{$epur}' WHERE anid='{$anid}'"); if ($ultramode) { ultramode(); } Header("Location: admin.php?op=autoEdit&anid={$anid}"); }
function poll_SendEditPoll() { global $maxOptions, $pollTitle, $optionText, $poll_type, $pollID, $poll_close; global $NPDS_Prefix; $result = sql_query("UPDATE " . $NPDS_Prefix . "poll_desc SET pollTitle='{$pollTitle}' WHERE pollID='{$pollID}'"); $poll_type = $poll_type + 128 * $poll_close; for ($i = 1; $i <= sizeof($optionText); $i++) { if ($optionText[$i] != "") { $optionText[$i] = FixQuotes($optionText[$i]); } $result = sql_query("UPDATE " . $NPDS_Prefix . "poll_data SET optionText='{$optionText[$i]}', pollType='{$poll_type}' WHERE pollID='{$pollID}' and voteID='{$i}'"); } Header("Location: admin.php?op=create"); }
<TBODY> <TR> <TD width="10" vAlign=top></TD> <TD vAlign=top> <TABLE align=center cellSpacing=0 width="400" cellPadding=0 border=0> <?php $_GET['id'] = intval($_GET['id']); //с╩┤звш╥╟╩╥├/╗├╨к╥╩╤┴╛╤╣╕ь $db->connectdb(DB_NAME, DB_USERNAME, DB_PASSWORD); $res['news'] = $db->select_query("SELECT * FROM " . TB_NEWS . " WHERE id='" . $_GET['id'] . "' "); $arr['news'] = $db->fetch($res['news']); if (!$arr['news']['id']) { echo "<BR><BR><BR><BR><CENTER><IMG SRC=\"images/icon/notview.gif\" BORDER=\"0\" ><BR><BR><B>ф┴ш┴╒├╥┬б╥├вш╥╟╩╥├/╗├╨к╥╩╤┴╛╤╣╕ь╣╒щ</B></CENTER><BR><BR><BR><BR>"; } else { $content = $arr['news']['detail']; $Detail = stripslashes(FixQuotes($content)); //╖╙б╥├р╛╘ш┴и╙╣╟╣д╣рвщ╥к┴ $db->connectdb(DB_NAME, DB_USERNAME, DB_PASSWORD); //к╫ш═╦┴╟┤╦┴┘ш $res['category'] = $db->select_query("SELECT * FROM " . TB_NEWS_CAT . " WHERE id='" . $arr['news']['category'] . "' "); $arr['category'] = $db->fetch($res['category']); ?> <tr> <td><B><FONT COLOR="#990000"><h5><?php echo _FORM_CAT; ?> <FONT COLOR="#0066FF"><?php echo $arr['category']['category_name']; ?> </h>
function changeStory($sid, $subject, $hometext, $bodytext, $topic, $notes, $catid, $ihome, $members, $Mmembers, $Cdate, $Csid, $date_finval, $epur, $theme) { global $NPDS_Prefix; global $aid, $ultramode; $subject = stripslashes(FixQuotes(str_replace('"', '"', $subject))); $hometext = stripslashes(FixQuotes($hometext)); $bodytext = stripslashes(FixQuotes($bodytext)); $notes = stripslashes(FixQuotes($notes)); if ($members == 1 and $Mmembers == "") { $ihome = "-127"; } if ($members == 1 and ($Mmembers > 1 and $Mmembers <= 127)) { $ihome = $Mmembers; } if ($Cdate) { sql_query("UPDATE " . $NPDS_Prefix . "stories SET catid='{$catid}', title='{$subject}', hometext='{$hometext}', bodytext='{$bodytext}', topic='{$topic}', notes='{$notes}', ihome='{$ihome}',time=now(), date_finval='{$date_finval}', auto_epur='{$epur}', archive='0' WHERE sid='{$sid}'"); } else { sql_query("UPDATE " . $NPDS_Prefix . "stories SET catid='{$catid}', title='{$subject}', hometext='{$hometext}', bodytext='{$bodytext}', topic='{$topic}', notes='{$notes}', ihome='{$ihome}', date_finval='{$date_finval}', auto_epur='{$epur}' WHERE sid='{$sid}'"); } if ($Csid) { if ($ibid = theme_image("pick.gif")) { $imgtmp = $ibid; } else { $imgtmp = "images/pick.gif"; } sql_query("UPDATE " . $NPDS_Prefix . "stories SET hometext='<img src=\"" . $imgtmp . "\" border=\"0\" align=\"center\" alt=\"\" /> :: {$hometext}' WHERE sid='{$sid}'"); list($Lsid) = sql_fetch_row(sql_query("SELECT sid FROM " . $NPDS_Prefix . "stories ORDER BY sid DESC")); $Lsid++; sql_query("UPDATE " . $NPDS_Prefix . "stories SET sid='{$Lsid}' WHERE sid='{$sid}'"); // commentaires if (file_exists("modules/comments/article.conf.php")) { include "modules/comments/article.conf.php"; sql_query("UPDATE " . $NPDS_Prefix . "posts SET topic_id='{$Lsid}' WHERE forum_id='{$forum}' AND topic_id='{$topic}'"); } $sid = $Lsid; } global $aid; Ecr_Log("security", "changeStory({$sid}, {$subject}, hometext..., bodytext..., {$topic}, notes..., {$catid}, {$ihome}, {$members}, {$Mmembers}, {$Cdate}, {$Csid}, {$date_finval},{$epur},{$theme}) by AID : {$aid}", ""); if ($ultramode) { ultramode(); } // Cluster Paradise if (file_exists("modules/cluster-paradise/cluster-activate.php")) { include "modules/cluster-paradise/cluster-activate.php"; } if (file_exists("modules/cluster-paradise/cluster-M.php")) { include "modules/cluster-paradise/cluster-M.php"; } // Cluster Paradise // Réseaux sociaux if (file_exists('modules/npds_twi/npds_to_twi.php')) { include 'modules/npds_twi/npds_to_twi.php'; } if (file_exists('modules/npds_fbk/npds_to_fbk.php')) { include 'modules/npds_twi/npds_to_fbk.php'; } // Réseaux sociaux redirect_url("admin.php?op=EditStory&sid={$sid}"); }
function RecentForumPosts_fab($title, $maxforums, $maxtopics, $displayposter, $topicmaxchars, $hr) { global $parse, $user; global $NPDS_Prefix; $topics = 0; settype($maxforums, "integer"); if ($maxforums == 0) { $lim = ""; } else { $lim = " LIMIT {$maxforums}"; } if ($user) { $query = "SELECT * FROM " . $NPDS_Prefix . "forums ORDER BY cat_id,forum_index,forum_id" . $lim; } else { $query = "SELECT * FROM " . $NPDS_Prefix . "forums WHERE forum_type!='9' AND forum_type!='7' AND forum_type!='5' ORDER BY cat_id,forum_index,forum_id" . $lim; } $result = sql_query($query); if (!$result) { exit; } $premier = false; $boxstuff = "<ul>\n"; while ($row = sql_fetch_row($result)) { if ($row[6] == "5" or $row[6] == "7") { $ok_affich = false; $tab_groupe = valid_group($user); $ok_affich = groupe_forum($row[7], $tab_groupe); } else { $ok_affich = true; } if ($ok_affich) { $forumid = $row[0]; $forumname = $row[1]; $forum_desc = $row[2]; if ($hr) { $boxstuff .= "<hr class=\"titboxcont\" />"; } if ($parse == 0) { $forumname = FixQuotes($forumname); $forum_desc = FixQuotes($forum_desc); } else { $forumname = stripslashes($forumname); $forum_desc = stripslashes($forum_desc); } $res = sql_query("SELECT * FROM " . $NPDS_Prefix . "forumtopics WHERE forum_id = '{$forumid}' ORDER BY topic_time DESC"); $ibidx = sql_num_rows($res); $boxstuff .= "<li><a href=\"viewforum.php?forum={$forumid}\" title=\"" . strip_tags($forum_desc) . "\">{$forumname}</a> ({$ibidx}) </li>\n"; $topics = 0; while ($topics < $maxtopics && ($topicrow = sql_fetch_row($res))) { $topicid = $topicrow[0]; $tt = $topictitle = $topicrow[1]; $date = $topicrow[3]; $replies = 0; $postquery = "SELECT COUNT(*) AS total FROM " . $NPDS_Prefix . "posts WHERE topic_id = '{$topicid}'"; if ($pres = sql_query($postquery)) { if ($myrow = sql_fetch_assoc($pres)) { $replies = $myrow['total']; } } if (strlen($topictitle) > $topicmaxchars) { $topictitle = substr($topictitle, 0, $topicmaxchars); $topictitle .= ".."; } if ($displayposter) { $posterid = $topicrow[2]; $RowQ1 = Q_Select("SELECT uname FROM " . $NPDS_Prefix . "users WHERE uid = '{$posterid}'", 3600); list(, $myrow) = each($rowQ1); $postername = $myrow['uname']; } if ($parse == 0) { $tt = strip_tags(FixQuotes($tt)); $topictitle = FixQuotes($topictitle); } else { $tt = strip_tags(stripslashes($tt)); $topictitle = stripslashes($topictitle); } $boxstuff .= "<a href=\"viewtopic.php?topic={$topicid}&forum={$forumid}\" title=\"{$tt}\">\"{$topictitle}\"</a> ({$replies})"; $boxstuff .= "</li>"; if ($displayposter) { $boxstuff .= "<br /> - {$postername}"; } $topics++; } } } $boxstuff .= "</ul>\n"; return $boxstuff; }
function secartpublish($artid, $secid, $title, $content, $author, $members, $Mmembers) { global $NPDS_Prefix; if (is_array($Mmembers) and $members == 1) { $members = implode(',', $Mmembers); } $title = stripslashes(FixQuotes($title)); $content = stripslashes(FixQuotes($content)); if ($secid != '0') { sql_query("DELETE FROM " . $NPDS_Prefix . "seccont_tempo WHERE artid='{$artid}'"); $timestamp = time(); sql_query("INSERT INTO " . $NPDS_Prefix . "seccont VALUES (NULL,'{$secid}','{$title}','{$content}', '0', '{$author}', '99', '{$members}', '{$timestamp}')"); global $aid; Ecr_Log('security', "PublicateArticleSections({$artid}, {$secid}, {$title}) by AID : {$aid}", ''); $result = sql_query("SELECT email FROM authors WHERE aid='{$author}'"); list($lemail) = sql_fetch_row($result); $sujet = adm_translate("Validation de votre publication"); $message = adm_translate("La publication que vous aviez en attente vient d'être validée"); global $notify_from; send_email($lemail, $sujet, $message, $notify_from, true, "html"); } Header("Location: admin.php?op=sections"); }
function Ephemeridschange($eid, $did, $mid, $yid, $content) { global $hlpfile, $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg; $content = stripslashes(FixQuotes($content) . ""); sql_query("UPDATE " . $NPDS_Prefix . "ephem SET yid='{$yid}', content='{$content}' WHERE eid='{$eid}'"); Header("Location: admin.php?op=Ephemeridsmaintenance&did={$did}&mid={$mid}"); }
function CreateTopic($xanonpost, $subject, $comment, $pid, $pollID, $host_name, $mode, $order, $thold, $posttype) { global $user, $userinfo, $EditedMessage, $cookie, $prefix, $pollcomm, $anonpost, $db, $module_name; $author = FixQuotes($author); $subject = FixQuotes(filter_text($subject, "nohtml")); $comment = format_url($comment); if ($posttype == "exttrans") { $comment = FixQuotes(nl2br(htmlspecialchars(check_words($comment)))); } elseif ($posttype == "plaintext") { $comment = FixQuotes(nl2br(filter_text($comment))); } else { $comment = FixQuotes(filter_text($comment)); } if (is_user($user)) { getusrinfo($user); } if (is_user($user) && !$xanonpost) { getusrinfo($user); $name = $userinfo[username]; $email = $userinfo[femail]; $url = $userinfo[user_website]; $score = 1; } else { $name = ""; $email = ""; $url = ""; $score = 0; } $ip = $_SERVER["REMOTE_HOST"]; if (empty($ip)) { $ip = $_SERVER["REMOTE_ADDR"]; } $pollID = intval($pollID); $result = $db->sql_query("select count(*) from " . $prefix . "_poll_desc where pollID='{$pollID}'"); $fake = $db->sql_numrows($result); if ($fake == 1) { if ($anonpost == 0 and is_user($user) or $anonpost == 1) { $db->sql_query("insert into " . $prefix . "_pollcomments values (NULL, '{$pid}', '{$pollID}', now(), '{$name}', '{$email}', '{$url}', '{$ip}', '{$subject}', '{$comment}', '{$score}', '0')"); update_points(9); } else { echo "Nice try..."; die; } } else { include "header.php"; echo "According to my records, the topic you are trying " . "to reply to does not exist. If you're just trying to be " . "annoying, well then too bad."; include "footer.php"; die; } if ($pollcomm == 1) { if (isset($cookie[4])) { $options .= "&mode={$cookie['4']}"; } else { $options .= "&mode=thread"; } if (isset($cookie[5])) { $options .= "&order={$cookie['5']}"; } else { $options .= "&order=0"; } if (isset($cookie[6])) { $options .= "&thold={$cookie['6']}"; } else { $options .= "&thold=0"; } } else { $options = ""; } Header("Location: modules.php?name={$module_name}&op=results&pollID={$pollID}{$options}"); }
global $powerpack; $powerpack = true; settype($op, 'string'); switch ($op) { // Instant Members Message case "instant_message": Form_instant_message($to_userid); break; case "write_instant_message": if ($user) { $rowQ1 = Q_Select("SELECT uid FROM " . $NPDS_Prefix . "users WHERE uname='{$cookie['1']}'", 3600); list(, $uid) = each($rowQ1); $from_userid = $uid['uid']; if ($subject != "" or $message != "") { $subject = FixQuotes($subject) . ""; $messages = FixQuotes($messages) . ""; writeDB_private_message($to_userid, "", $subject, $from_userid, $message, $copie); } } Header("Location: index.php"); break; // Instant Members Message // Purge Chat Box // Instant Members Message // Purge Chat Box case "admin_chatbox_write": if ($admin) { if ($chatbox_clearDB == "OK") { sql_query("DELETE FROM " . $NPDS_Prefix . "chatbox WHERE date <= " . (time() - 60 * 5) . ""); } }
function add_review($id, $date, $title, $text, $reviewer, $email, $score, $cover, $url, $url_title, $rlanguage) { global $prefix, $db; $id = intval($id); $title = stripslashes(FixQuotes($title)); $text = stripslashes(FixQuotes($text)); $reviewer = stripslashes(FixQuotes($reviewer)); $email = stripslashes(FixQuotes($email)); $score = intval($score); $db->sql_query("insert into " . $prefix . "_reviews values (NULL, '{$date}', '{$title}', '{$text}', '{$reviewer}', '{$email}', '{$score}', '{$cover}', '{$url}', '{$url_title}', '1', '{$rlanguage}')"); $db->sql_query("delete from " . $prefix . "_reviews_add WHERE id = '{$id}'"); Header("Location: admin.php?op=reviews"); }
$ddate = date(d); $ydate = date(Y); $ndate = "{$mdate}-{$ddate}-{$ydate}"; $pdate = $ndate; $ptime = $mtime; if ($debug == "true") { echo "UserName:{$username}<br>SiteName: {$sitename}"; } startjournal($sitename, $user); echo "<br>"; OpenTable(); echo "<div align=center class=title>" . _ENTRYADDED . "</div><br><br>"; echo "<div align=center> [ <a href=\"modules.php?name={$module_name}&file=edit\">" . _RETURNJOURNAL . "</a> ]</div>"; CloseTable(); $title = stripslashes(FixQuotes($title)); $bodytext = stripslashes(FixQuotes($bodytext)); $sql = "INSERT INTO " . $prefix . "_journal (jid,aid,title,bodytext,mood,pdate,ptime,status,mtime,mdate) VALUES ('','{$username}','{$title}','{$bodytext}','{$mood}','{$pdate}','{$ptime}','{$status}','{$mtime}','{$ndate}')"; $db->sql_query($sql); update_points(1); $sql = "SELECT * FROM " . $prefix . "_journal_stats WHERE joid = '{$username}'"; $result = $db->sql_query($sql); $row_count = $db->sql_numrows($result); if ($row_count == 0) { $query = "INSERT INTO " . $prefix . "_journal_stats (id,joid,nop,ldp,ltp,micro) VALUES ('','{$username}','1',now(),'{$mtime}',now())"; $db->sql_query($query); } else { $row = $db->sql_fetchrow($result); $nnop = $row[nop]; $nnnop = $nnop + 1; $micro = date(U); $query = "UPDATE " . $prefix . "_journal_stats SET nop='{$nnnop}', ldp='{$ndate}', ltp='{$mtime}' micro='{$micro}' WHERE joid='{$username}'";
function search($query, $min, $orderby, $show) { global $prefix, $db, $admin, $bgcolor2, $module_name, $admin_file, $datetime, $transfertitle, $locale; include "modules/{$module_name}/d_config.php"; include "header.php"; if (!isset($min)) { $min = 0; } if (!isset($max)) { $max = $min + $downloadsresults; } if (!empty($orderby)) { $orderby = convertorderbyin($orderby); } else { $orderby = "title ASC"; } if ($show != "") { $downloadsresults = $show; } else { $show = $downloadsresults; } $query1 = filter($query, "nohtml", 1); $query1 = addslashes($query1); $query2 = filter($query, "", 1); if (!is_numeric($min)) { $min = 0; } $result = $db->sql_query("SELECT lid, cid, title, url, description, date, hits, downloadratingsummary, totalvotes, totalcomments, filesize, version, homepage FROM " . $prefix . "_downloads_downloads WHERE title LIKE '%{$query1}%' OR description LIKE '%{$query2}%' ORDER BY {$orderby} LIMIT {$min},{$downloadsresults}"); $fullcountresult = $db->sql_query("SELECT lid, title, description, date, hits, downloadratingsummary, totalvotes, totalcomments FROM " . $prefix . "_downloads_downloads WHERE title LIKE '%{$query1}%' OR description LIKE '%{$query2}%' "); $totalselecteddownloads = $db->sql_numrows($fullcountresult); $nrows = $db->sql_numrows($result); $x = 0; $the_query = filter($query, "nohtml"); $the_query = FixQuotes($the_query); menu(1); echo "<br>"; OpenTable(); if (!empty($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 " . $prefix . "_downloads_categories WHERE title LIKE '%{$query1}%' ORDER BY title DESC"); while (list($cid, $stitle) = $result2->fetch_row()) { $cid = intval($cid); $res = $db->sql_query("SELECT * FROM " . $prefix . "_downloads_downloads WHERE cid='{$cid}'"); $numrows = $db->sql_numrows($res); $result3 = $db->sql_query("SELECT cid,title,parentid FROM " . $prefix . "_downloads_categories WHERE cid='{$cid}'"); list($cid3, $title3, $parentid3) = $result3->fetch_row(); $cid3 = intval($cid3); $title3 = filter($title3, "nohtml"); $parentid3 = intval($parentid3); 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) = $result->fetch_row()) { $lid = intval($lid); $cid = intval(trim($cid)); $hits = intval($hits); $totalvotes = intval($totalvotes); $totalcomments = 0; $totalcomments = intval($totalcomments); $downloadratingsummary = number_format($downloadratingsummary, $mainvotedecimal); $title = filter($title, "nohtml"); $url = filter($url, "nohtml"); $description = filter($description); $transfertitle = str_replace(" ", "_", $title); $title = ereg_replace($query1, "<b>{$query1}</b>", $title); global $prefix, $db, $admin; if (is_admin($admin)) { echo "<a href=\"" . $admin_file . ".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); detecteditorial($lid, $transfertitle, 1); echo "<br>"; $description = ereg_replace($the_query, "<b>{$the_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})"; } if (empty($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}\">" . _RATERESOURCE . "</a>"; echo " | <a href=\"modules.php?name={$module_name}&d_op=viewdownloaddetails&lid={$lid}\">" . _DETAILS . "</a>"; if ($totalcomments != 0) { echo " | <a href=\"modules.php?name={$module_name}&d_op=viewdownloadcomments&lid={$lid}>" . _SCOMMENTS . " ({$totalcomments})</a>"; } detecteditorial($lid, $transfertitle, 0); echo "<br>"; $result3 = $db->sql_query("SELECT cid,title,parentid FROM " . $prefix . "_downloads_categories WHERE cid='{$cid}'"); list($cid3, $title3, $parentid3) = $result3->fetch_row(); $cid3 = intval($cid3); $title3 = filter($title3, "nohtml"); $parentid3 = intval($parentid3); if ($parentid3 > 0) { $title3 = getparent($parentid3, $title3); } echo "" . _CATEGORY . ": {$title3}<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://search.yahoo.com/bin/search?p={$the_query}\">Yahoo</a> - " . "<a target=\"_blank\" href=\"http://www.google.com/search?q={$the_query}\">Google</a>" . "</font>"; } else { echo "<center><font class=\"option\"><b>" . _NOMATCHES . "</b></font></center><br><br>"; } CloseTable(); include "footer.php"; }
} elseif ($getdate[2] == "11") { $month = _NOVEMBER; } elseif ($getdate[2] == "12") { $month = _DECEMBER; } if ($month != $thismonth) { $year = $getdate[1]; echo "<li><a href=\"modules.php?name={$module_name}&sa=show_month&year={$year}&month={$getdate['2']}&month_l={$month}\">{$month}, {$year}</a>"; $thismonth = $month; } } echo "</ul><br><br><center>" . "<form action=\"modules.php?name=Search\" method=\"post\">" . "<input type=\"text\" name=\"query\" size=\"30\"> " . "<input type=\"submit\" value=\"" . _SEARCH . "\">" . "</form>" . "[ <a href=\"modules.php?name={$module_name}\">" . _ARCHIVESINDEX . "</a> ]</center>"; CloseTable(); include "footer.php"; } $sa = isset($sa) ? $sa : ""; $min = isset($min) ? intval($min) : 0; $year = isset($year) && intval($year) > 0 ? intval($year) : gmdate('Y'); $month = isset($month) && intval($month) > 0 ? intval($month) : gmdate('m'); $month_l = isset($month_l) ? FixQuotes($month_l) : ""; switch ($sa) { case "show_all": show_all($min); break; case "show_month": show_month($year, $month, $month_l); break; default: select_month(); break; }
function savehome($user_id, $username, $storynum, $ublockon, $ublock, $broadcast) { global $user, $cookie, $userinfo, $user_prefix, $db, $module_name; cookiedecode($user); $check = $cookie[1]; $check = filter($check, "nohtml", 1); $check2 = $cookie[2]; $sql = "SELECT user_id, user_password FROM " . $user_prefix . "_users WHERE username='******'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $vuid = intval($row['user_id']); $ccpass = filter($row['user_password'], "nohtml", 1); if ($user_id == $vuid and $check2 == $ccpass) { if (isset($ublockon)) { $ublockon = 1; } else { $ublockon = 0; } $ublock = FixQuotes($ublock); $db->sql_query("UPDATE " . $user_prefix . "_users SET storynum='{$storynum}', ublockon='{$ublockon}', ublock='{$ublock}', broadcast='{$broadcast}' WHERE user_id='{$user_id}'"); getusrinfo($user); docookie($userinfo['user_id'], $userinfo['username'], $userinfo['user_password'], $userinfo['storynum'], $userinfo['umode'], $userinfo['uorder'], $userinfo['thold'], $userinfo['noscore'], $userinfo['ublockon'], $userinfo['theme'], $userinfo['commentmax']); Header("Location: modules.php?name={$module_name}"); } }
function changegaucherblock($id, $title, $content, $members, $Mmember, $Rindex, $Scache, $Sactif, $BRaide, $css) { global $NPDS_Prefix; if (is_array($Mmember) and $members == 1) { $members = implode(",", $Mmember); if ($members == 0) { $members = 1; } } if (empty($Rindex)) { $Rindex = 0; } $title = stripslashes(FixQuotes($title)); if ($Sactif == "ON") { $Sactif = 1; } else { $Sactif = 0; } $content = stripslashes(FixQuotes($content)); sql_query("INSERT INTO " . $NPDS_Prefix . "lblocks VALUES (NULL,'{$title}','{$content}','{$members}', '{$Rindex}', '{$Scache}', '{$Sactif}', '{$css}', '{$BRaide}')"); sql_query("DELETE FROM " . $NPDS_Prefix . "rblocks WHERE id='{$id}'"); global $aid; Ecr_Log("security", "MoveRightBlockToLeft({$title} - {$id}) by AID : {$aid}", ""); Header("Location: admin.php?op=blocks"); }
function topicchange($topicid, $topicname, $topicimage, $topictext, $name, $url) { global $prefix, $db; $topicname = stripslashes(FixQuotes($topicname)); $topicimage = stripslashes(FixQuotes($topicimage)); $topictext = stripslashes(FixQuotes($topictext)); $name = stripslashes(FixQuotes($name)); $url = stripslashes(FixQuotes($url)); $topicid = intval($topicid); $db->sql_query("update " . $prefix . "_topics set topicname='{$topicname}', topicimage='{$topicimage}', topictext='{$topictext}' where topicid='{$topicid}'"); if (!$name) { } else { $db->sql_query("insert into " . $prefix . "_related VALUES (NULL, '{$topicid}','{$name}','{$url}')"); } Header("Location: admin.php?op=topicedit&topicid={$topicid}"); }
function add_review($id, $date, $title, $text, $reviewer, $email, $score, $cover, $url, $url_title) { global $NPDS_Prefix; $title = stripslashes(FixQuotes($title)); $text = stripslashes(FixQuotes($text)); $reviewer = stripslashes(FixQuotes($reviewer)); $email = stripslashes(FixQuotes($email)); sql_query("INSERT INTO " . $NPDS_Prefix . "reviews VALUES (NULL, '{$date}', '{$title}', '{$text}', '{$reviewer}', '{$email}', '{$score}', '{$cover}', '{$url}', '{$url_title}', '1')"); sql_query("DELETE FROM " . $NPDS_Prefix . "reviews_add WHERE id = '{$id}'"); Header("Location: admin.php?op=reviews"); }
function content_save_edit($pid, $title, $subtitle, $page_header, $text, $page_footer, $signature, $clanguage, $active, $cid) { global $prefix, $db; $text = stripslashes(FixQuotes($text)); $title = stripslashes(FixQuotes($title)); $subtitle = stripslashes(FixQuotes($subtitle)); $pid = intval($pid); $db->sql_query("update " . $prefix . "_pages set cid='{$cid}', title='{$title}', subtitle='{$subtitle}', active='{$active}', page_header='{$page_header}', text='{$text}', page_footer='{$page_footer}', signature='{$signature}', clanguage='{$clanguage}' where pid='{$pid}'"); Header("Location: admin.php?op=content"); }
function Add($title, $url, $name, $cat, $description, $email, $topicL, $asb_question, $asb_reponse) { global $ModPath, $ModStart, $links_DB, $troll_limit, $anonymous, $user, $admin; if (!$user and !$admin) { //anti_spambot if (!R_spambot($asb_question, $asb_reponse, "")) { Ecr_Log("security", "Links Anti-Spam : url=" . $url, ""); redirect_url("index.php"); die; } } $result = sql_query("SELECT lid FROM " . $links_DB . "links_newlink"); $numrows = sql_num_rows($result); if ($numrows >= $troll_limit) { error_head("alert-danger"); echo translate("ERROR: This URL is already listed in the Database!") . "<br />"; error_foot(); exit; } global $user; if (isset($user)) { global $cookie; $submitter = $cookie[1]; } else { $submitter = $anonymous; } if ($title == '') { error_head("alert-danger"); echo translate("ERROR: You need to type a TITLE for your URL!") . "<br />"; error_foot(); exit; } if ($email == '') { error_head("alert-danger"); echo translate("ERROR: Invalid email") . "<br />"; error_foot(); exit; } global $links_url; if ($url == '' and $links_url == 1) { error_head("alert-danger"); echo translate("ERROR: You need to type a URL for your URL!") . "<br />"; error_foot(); exit; } if ($description == '') { error_head("alert-danger"); echo translate("ERROR: You need to type a DESCRIPTION for your URL!") . "<br />"; error_foot(); exit; } $cat = explode('-', $cat); if (!array_key_exists(1, $cat)) { $cat[1] = 0; } $title = removeHack(stripslashes(FixQuotes($title))); $url = removeHack(stripslashes(FixQuotes($url))); $description = removeHack(stripslashes(FixQuotes($description))); $name = removeHack(stripslashes(FixQuotes($name))); $email = removeHack(stripslashes(FixQuotes($email))); sql_query("INSERT INTO " . $links_DB . "links_newlink VALUES (NULL, '{$cat['0']}', '{$cat['1']}', '{$title}', '{$url}', '{$description}', '{$name}', '{$email}', '{$submitter}', '{$topicL}')"); error_head("alert-success"); echo translate("We received your Link submission. Thanks!") . "<br />"; echo translate("You'll receive and E-mail when it's approved.") . "<br />"; error_foot(); }
function savejournal($uid, $journal, $datetime) { global $NPDS_Prefix; global $user; $cookie = cookiedecode($user); $result = sql_query("SELECT uid FROM " . $NPDS_Prefix . "users WHERE uname='{$cookie['1']}'"); list($vuid) = sql_fetch_row($result); if ($uid == $vuid) { $journal = removeHack(stripslashes(FixQuotes($journal))); if ($datetime) { $journalentry = $journal; $journalentry .= "<br /><br />"; global $gmt; $journalentry .= date(translate("dateinternal"), time() + $gmt * 3600); sql_query("UPDATE " . $NPDS_Prefix . "users SET user_journal='{$journalentry}' WHERE uid='{$uid}'"); } else { sql_query("UPDATE " . $NPDS_Prefix . "users SET user_journal='{$journal}' WHERE uid='{$uid}'"); } $userinfo = getusrinfo($user); Header("Location: user.php"); } else { Header("Location: index.php"); } }
function send_review($date, $title, $text, $reviewer, $email, $score, $cover, $url, $url_title, $hits, $id, $asb_question, $asb_reponse) { global $admin, $user, $NPDS_Prefix; include 'header.php'; $date = reversedate($date); $title = stripslashes(FixQuotes(strip_tags($title))); $text = stripslashes(Fixquotes(urldecode(removeHack($text)))); if (!$user and !$admin) { //anti_spambot if (!R_spambot($asb_question, $asb_reponse, $text)) { Ecr_Log('security', 'Review Anti-Spam : title=' . $title, ''); redirect_url("index.php"); die; } } echo ' <h2>' . translate("Write a Review") . '</h2> <br /><p class="lead text-danger">' . translate("Thanks for submitting this review") . ''; if ($id != 0) { echo " " . translate("modification") . ""; } else { echo ", {$reviewer}"; } echo '<br /><br />'; if ($admin && $id == 0) { sql_query("INSERT INTO " . $NPDS_Prefix . "reviews VALUES (NULL, '{$date}', '{$title}', '{$text}', '{$reviewer}', '{$email}', '{$score}', '{$cover}', '{$url}', '{$url_title}', '1')"); echo translate("It is now available in the reviews database."); } else { if ($admin && $id != 0) { sql_query("UPDATE " . $NPDS_Prefix . "reviews SET date='{$date}', title='{$title}', text='{$text}', reviewer='{$reviewer}', email='{$email}', score='{$score}', cover='{$cover}', url='{$url}', url_title='{$url_title}', hits='{$hits}' WHERE id='{$id}'"); echo translate("It is now available in the reviews database."); } else { sql_query("INSERT INTO " . $NPDS_Prefix . "reviews_add VALUES (NULL, '{$date}', '{$title}', '{$text}', '{$reviewer}', '{$email}', '{$score}', '{$url}', '{$url_title}')"); echo translate("The editors will look at your submission. It should be available soon!"); } } echo '</p><a class="btn btn-default" role="button" href="reviews.php" title="' . translate("Back to Reviews Index") . '"><i class="fa fa-lg fa-undo"></i> </a>'; include "footer.php"; }
$result = sql_query("DELETE FROM " . $NPDS_Prefix . "wspad WHERE page='{$page}' AND member='{$member}'"); @unlink("modules/{$ModPath}/locks/{$page}-vgp-{$groupe}.txt"); break; case "renomer": // Filtre les caractères interdits dans les noms de pages $newpage = preg_replace('#[^a-zA-Z0-9\\s\\_\\.\\-]#i', '_', removeHack(stripslashes(urldecode($newpage)))); settype($member, 'integer'); $result = sql_query("UPDATE " . $NPDS_Prefix . "wspad SET page='{$newpage}', verrou='' WHERE page='{$page}' AND member='{$member}'"); @unlink("modules/{$ModPath}/locks/{$page}-vgp-{$groupe}.txt"); break; case "conv_new": $row = sql_fetch_assoc(sql_query("SELECT content FROM " . $NPDS_Prefix . "wspad WHERE page='{$page}' AND member='{$groupe}' AND ranq='{$ranq}'")); $date_debval = date("Y-d-m H:i:s", time()); $deb_year = substr($date_debval, 0, 4); $date_finval = $deb_year + 99 . "-01-01 00:00:00"; $result = sql_query("INSERT INTO " . $NPDS_Prefix . "queue VALUES (NULL, {$cookie['0']}, '{$auteur}', '{$page}', '" . FixQuotes($row['content']) . "', '', now(), '','{$date_debval}','{$date_finval}','0')"); break; } // For IE ---------------------- header("X-UA-Compatible: IE=8"); // For IE ---------------------- include 'header.php'; // Head banner de présentation if (file_exists("modules/{$ModPath}/html/head.html")) { $Xcontent = join('', file("modules/{$ModPath}/html/head.html")); $Xcontent = meta_lang(aff_langue($Xcontent)); echo $Xcontent; } switch ($op) { case 'sauve': Liste_Page();
function view_banner($cid, $bid) { global $prefix, $db, $module_name, $client, $bgcolor2, $sitename; if (!is_client($client)) { Header("Location: modules.php?name={$module_name}&op=client"); die; } else { $client = base64_decode($client); $client = addslashes($client); $client = explode(":", $client); $client_id = $client[0]; if ($cid != $client_id) { include "header.php"; title("{$sitename} " . _ADSYSTEM . ""); OpenTable(); echo "<center>" . _ADISNTYOUR . "<br><br>" . _GOBACK . "</center>"; CloseTable(); themenu(); include "footer.php"; die; } else { include "header.php"; title("{$sitename} " . _ADSYSTEM . ""); OpenTable(); $row = $db->sql_fetchrow($db->sql_query("SELECT * FROM " . $prefix . "_banner WHERE bid='{$bid}'")); $cid = intval($row['cid']); $imptotal = intval($row['imptotal']); $impmade = intval($row['impmade']); $clicks = intval($row['clicks']); $imageurl = $row['imageurl']; $clickurl = $row['clickurl']; $ad_class = $row['ad_class']; $ad_code = $row['ad_code']; $ad_width = $row['ad_width']; $ad_height = $row['ad_height']; $alttext = $row['alttext']; echo "<center><font class=\"title\"><b>" . _YOURBANNER . ": " . $row['name'] . "</b></font><br><br>"; if ($ad_class == "code") { $ad_code = stripslashes(FixQuotes($ad_code)); echo "<table border=\"0\" align=\"center\"><tr><td>{$ad_code}</td></tr></table><br><br>"; } elseif ($ad_class == "flash") { echo "<center>\n\t\t\t\t\t<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"\n\t\t\t\t\tcodebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0\"\n\t\t\t\t\tWIDTH=\"{$ad_width}\" HEIGHT=\"{$ad_height}\" id=\"{$bid}\">\n\t\t\t\t\t<PARAM NAME=movie VALUE=\"{$imageurl}\">\n\t\t\t\t\t<PARAM NAME=quality VALUE=high>\n\t\t\t\t\t<EMBED src=\"{$imageurl}\" quality=high WIDTH=\"{$ad_width}\" HEIGHT=\"{$ad_height}\"\n\t\t\t\t\tNAME=\"{$bid}\" ALIGN=\"\" TYPE=\"application/x-shockwave-flash\"\n\t\t\t\t\tPLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\">\n\t\t\t\t\t</EMBED>\n\t\t\t\t\t</OBJECT>\n\t\t\t\t\t</center><br><br>"; } else { echo "<center><img src=\"{$imageurl}\" border=\"1\" alt=\"{$alttext}\" title=\"{$alttext}\" width=\"{$ad_width}\" height=\"{$ad_height}\"></center><br><br>"; } echo "<center>Banner Information: " . $row['name'] . "</center><br>" . "<table width=\"100%\" border=\"1\"><tr>" . "<td bgcolor=\"{$bgcolor2}\" align=\"center\"><b>" . _NAME . "</b></td>" . "<td bgcolor=\"{$bgcolor2}\" align=\"center\"><b>" . _IMPMADE . "</b></td>" . "<td bgcolor=\"{$bgcolor2}\" align=\"center\"><b>" . _IMPTOTAL . "</b></td>" . "<td bgcolor=\"{$bgcolor2}\" align=\"center\"><b>" . _IMPLEFT . "</b></td>" . "<td bgcolor=\"{$bgcolor2}\" align=\"center\"><b>" . _CLICKS . "</b></td>" . "<td bgcolor=\"{$bgcolor2}\" align=\"center\"><b>% " . _CLICKS . "</b></td>" . "<td bgcolor=\"{$bgcolor2}\" align=\"center\"><b>" . _TYPE . "</b></td><tr>"; $bid = $row['bid']; $bid = intval($bid); $imptotal = $row['imptotal']; $imptotal = intval($imptotal); $impmade = $row['impmade']; $impmade = intval($impmade); $clicks = $row['clicks']; $clicks = intval($clicks); $date = $row['date']; if ($impmade == 0) { $percent = 0; } else { $percent = substr(100 * $clicks / $impmade, 0, 5); $percent = "{$percent}%"; } if ($imptotal == 0) { $left = _UNLIMITED; $imptotal = _UNLIMITED; } else { $left = $imptotal - $impmade; } if ($row['ad_class'] == "flash" || $row['ad_class'] == "code") { $clicks = "N/A"; $percent = "N/A"; } if ($row['name'] == "") { $row['name'] = _NONE; } if ($row['active'] == 1) { $status = _ACTIVE; } elseif ($row['active'] == 0) { $status = _INACTIVE; } echo "<td align=\"center\">" . $row['name'] . "</td>" . "<td align=\"center\">{$impmade}</td>" . "<td align=\"center\">{$imptotal}</td>" . "<td align=\"center\">{$left}</td>" . "<td align=\"center\">{$clicks}</td>" . "<td align=\"center\">{$percent}</td>" . "<td align=\"center\">" . ucFirst($row['ad_class']) . "</td></tr><tr>" . "<td align=\"center\" colspan=\"7\">" . _CURRENTSTATUS . " {$status}</td></tr>" . "</table><br><br>" . "[ <a href=\"modules.php?name={$module_name}&op=client_report&cid={$cid}&bid={$bid}\">" . _EMAILSTATS . "</a> | <a href=\"modules.php?name={$module_name}&op=logout\">" . _LOGOUT . "</a> ]"; CloseTable(); themenu(); include "footer.php"; } } }
function secartpublish($artid, $secid, $title, $content, $author, $members, $Mmembers, $crit1, $crit2, $crit3, $crit4, $crit5, $crit6, $crit7, $crit8, $crit9, $crit10, $crit11, $crit12, $crit13, $crit14, $crit15, $crit16, $crit17, $crit18, $crit19, $crit20) { global $NPDS_Prefix; if (is_array($Mmembers) and $members == 1) { $members = implode(",", $Mmembers); } $title = stripslashes(FixQuotes($title)); $content = stripslashes(FixQuotes($content)); $crit1 = stripslashes(FixQuotes($crit1)); $crit11 = stripslashes(FixQuotes($crit11)); $crit2 = stripslashes(FixQuotes($crit2)); $crit12 = stripslashes(FixQuotes($crit12)); $crit3 = stripslashes(FixQuotes($crit3)); $crit13 = stripslashes(FixQuotes($crit13)); $crit4 = stripslashes(FixQuotes($crit4)); $crit14 = stripslashes(FixQuotes($crit14)); $crit5 = stripslashes(FixQuotes($crit5)); $crit15 = stripslashes(FixQuotes($crit15)); $crit6 = stripslashes(FixQuotes($crit6)); $crit16 = stripslashes(FixQuotes($crit16)); $crit7 = stripslashes(FixQuotes($crit7)); $crit17 = stripslashes(FixQuotes($crit17)); $crit8 = stripslashes(FixQuotes($crit8)); $crit18 = stripslashes(FixQuotes($crit18)); $crit9 = stripslashes(FixQuotes($crit9)); $crit19 = stripslashes(FixQuotes($crit19)); $crit10 = stripslashes(FixQuotes($crit10)); $crit20 = stripslashes(FixQuotes($crit20)); if ($secid != "0") { sql_query("DELETE FROM " . $NPDS_Prefix . "seccont_tempo WHERE artid='{$artid}'"); $timestamp = time(); sql_query("INSERT INTO " . $NPDS_Prefix . "seccont VALUES (NULL,'{$secid}','{$title}','{$content}', '0', '{$author}', '99', '{$members}', '{$crit1}', '{$crit2}', '{$crit3}', '{$crit4}', '{$crit5}', '{$crit6}', '{$crit7}', '{$crit8}', '{$crit9}', '{$crit10}', '{$crit11}', '{$crit12}', '{$crit13}', '{$crit14}', '{$crit15}', '{$crit16}', '{$crit17}', '{$crit18}', '{$crit19}', '{$crit20}', '{$timestamp}')"); global $aid; Ecr_Log("security", "PublicateArticleSections({$artid}, {$secid}, {$title}) by AID : {$aid}", ""); $result = sql_query("SELECT email FROM authors WHERE aid='{$author}'"); list($lemail) = sql_fetch_row($result); $sujet = adm_translate("Validation de votre publication"); $message = adm_translate("La publication que vous aviez en attente vient d'être validée"); global $notify_from; send_email($lemail, $sujet, $message, $notify_from, true, "html"); } Header("Location: admin.php?op=sections"); }
function ConfigSave($xparse, $xsitename, $xnuke_url, $xsite_logo, $xslogan, $xstartdate, $xadminmail, $xtop, $xstoryhome, $xoldnum, $xultramode, $xanonpost, $xDefault_Theme, $xbanners, $xmyIP, $xfoot1, $xfoot2, $xfoot3, $xfoot4, $xbackend_title, $xbackend_language, $xbackend_image, $xbackend_width, $xbackend_height, $xlanguage, $xlocale, $xperpage, $xpopular, $xnewlinks, $xtoplinks, $xlinksresults, $xlinks_anonaddlinklock, $xnotify, $xnotify_email, $xnotify_subject, $xnotify_message, $xnotify_from, $xmoderate, $xanonymous, $xmaxOptions, $xsetCookies, $xtipath, $xuserimg, $xadminimg, $xadmingraphic, $xsite_font, $xadmart, $xminpass, $xhttpref, $xhttprefmax, $xpollcomm, $xlinkmainlogo, $xstart_page, $xsmilies, $xOnCatNewLink, $xEmailFooter, $xshort_user, $xgzhandler, $xrss_host_verif, $xcache_verif, $xmember_list, $xdownload_cat, $xmod_admin_news, $xgmt, $xAutoRegUser, $xTitlesitename, $xfilemanager, $xshort_review, $xnot_admin_count, $xadmin_cook_duration, $xuser_cook_duration, $xtroll_limit, $xsubscribe, $xCloseRegUser, $xshort_menu_admin, $xmail_fonction, $xmemberpass, $xshow_user, $xdns_verif, $xmember_invisible, $xavatar_size, $xlever, $xcoucher, $xmulti_langue, $xadmf_ext, $xsavemysql_size, $xsavemysql_mode, $xtiny_mce, $xnpds_twi, $xnpds_fcb) { include "config.php"; if ($xparse == 0) { $xsitename = FixQuotes($xsitename); $xTitlesitename = FixQuotes($xTitlesitename); } else { $xsitename = stripslashes($xsitename); $xTitlesitename = stripslashes($xTitlesitename); } $xnuke_url = FixQuotes($xnuke_url); $xsite_logo = FixQuotes($xsite_logo); if ($xparse == 0) { $xslogan = FixQuotes($xslogan); $xstartdate = FixQuotes($xstartdate); } else { $xslogan = stripslashes($xslogan); $xstartdate = stripslashes($xstartdate); } // Theme $xDefault_Theme = FixQuotes($xDefault_Theme); if ($xDefault_Theme != $Default_Theme) { include "cache.config.php"; $dh = opendir($CACHE_CONFIG['data_dir']); while (false !== ($filename = readdir($dh))) { if ($filename === '.' or $filename === '..' or $filename === 'ultramode.txt' or $filename === 'net2zone.txt' or $filename === 'sql') { continue; } unlink($CACHE_CONFIG['data_dir'] . $filename); } } $xmyIP = FixQuotes($xmyIP); $xfoot1 = str_replace(chr(13) . chr(10), "\n", $xfoot1); $xfoot2 = str_replace(chr(13) . chr(10), "\n", $xfoot2); $xfoot3 = str_replace(chr(13) . chr(10), "\n", $xfoot3); $xfoot4 = str_replace(chr(13) . chr(10), "\n", $xfoot4); if ($xparse == 0) { $xbackend_title = FixQuotes($xbackend_title); } else { $xbackend_title = stripslashes($xbackend_title); } $xbackend_language = FixQuotes($xbackend_language); $xbackend_image = FixQuotes($xbackend_image); $xbackend_width = FixQuotes($xbackend_width); $xbackend_height = FixQuotes($xbackend_height); $xlanguage = FixQuotes($xlanguage); $xlocale = FixQuotes($xlocale); $xnotify_email = FixQuotes($xnotify_email); if ($xparse == 0) { $xnotify_subject = FixQuotes($xnotify_subject); $xdownload_cat = FixQuotes($xdownload_cat); } else { $xnotify_subject = stripslashes($xnotify_subject); $xdownload_cat = stripslashes($xdownload_cat); } $xnotify_message = str_replace(chr(13) . chr(10), "\n", $xnotify_message); $xnotify_from = FixQuotes($xnotify_from); $xanonymous = FixQuotes($xanonymous); $xtipath = FixQuotes($xtipath); $xuserimg = FixQuotes($xuserimg); $xadminimg = FixQuotes($xadminimg); $xsite_font = FixQuotes($xsite_font); $file = fopen("config.php", "w"); $line = "######################################################################\n"; $content = "<?php\n"; $content .= "{$line}"; $content .= "# DUNE by NPDS : Net Portal Dynamic System\n"; $content .= "# ===================================================\n"; $content .= "#\n"; $content .= "# This version name NPDS Copyright (c) 2001-2015 by Philippe Brunier\n"; $content .= "#\n"; $content .= "# This module is to configure the main options for your site\n"; $content .= "#\n"; $content .= "# This program is free software. You can redistribute it and/or modify\n"; $content .= "# it under the terms of the GNU General Public License as published by\n"; $content .= "# the Free Software Foundation; either version 2 of the License.\n"; $content .= "{$line}"; $content .= "\n"; $content .= "{$line}"; $content .= "# ========================\n"; $content .= "# Database & System Config\n"; $content .= "# ========================\n"; $content .= "# dbhost: MySQL Database Hostname\n"; $content .= "# dbuname: MySQL Username\n"; $content .= "# dbpass: MySQL Password\n"; $content .= "# dbname: MySQL Database Name\n"; $content .= "# mysql_p: Persistent connection to MySQL Server (1) or Not (0)\n"; $content .= "# mysql_i: Use MySQLi (1) instead of MySQL interface (0)\n"; $content .= "# =======================\n"; $content .= "# system: 0 for Unix/Linux, 1 for Windows\n"; $content .= "# system_md5: 0 for NOT USED Authors' Password encryption / 1 for USED Author's Password Encryption\n"; $content .= "{$line}"; $content .= "\n"; $content .= "\$dbhost = \"{$dbhost}\";\n"; $content .= "\$dbuname = \"{$dbuname}\";\n"; $content .= "\$dbpass = \"{$dbpass}\";\n"; $content .= "\$dbname = \"{$dbname}\";\n"; if (!isset($mysql_p)) { $mysql_p = 1; } $content .= "\$mysql_p = {$mysql_p};\n"; if (!isset($mysql_i)) { $mysql_i = 0; } $content .= "\$mysql_i = {$mysql_i};\n"; $content .= "# =======================\n"; $content .= "\$system = {$system};\n"; if (!$system_md5) { $system_md5 = 0; } $content .= "\$system_md5 = {$system_md5};\n"; $content .= "\n"; $content .= "/*********************************************************************/\n"; $content .= "/* You finished to configure the Database. Now you can change all */\n"; $content .= "/* you want in the Administration Section. To enter just launch */\n"; $content .= "/* you web browser pointing to http://yourdomain.com/admin.php */\n"; $content .= "/* */\n"; $content .= "/* At the prompt use the following ID to login (case sensitive): */\n"; $content .= "/* */\n"; $content .= "/* AdminID: Root */\n"; $content .= "/* Password: Password */\n"; $content .= "/* */\n"; $content .= "/* Be sure to change inmediately the Root login & password clicking */\n"; $content .= "/* on Edit Admin in the Admin menu. After that, click on Preferences */\n"; $content .= "/* to configure your new site. In that menu you can change all you */\n"; $content .= "/* need to change. */\n"; $content .= "/* */\n"; $content .= "/*********************************************************************/\n"; $content .= "\n\n"; $content .= "\n"; $content .= "{$line}"; $content .= "# General Site Configuration\n"; $content .= "#\n"; $content .= "# \$parse: Select the parse function you want to use for preference\n"; $content .= "# \$gzhandler: PHP > 5.x : default 0 / PHP < 5.x sending compressed html with zlib : 1 - be careful\n"; $content .= "# \$admin_cook_duration : Duration in hour for Admin cookie (default 24)\n"; $content .= "# \$user_cook_duration: Duration in hour for Admin cookie (default 24)\n"; $content .= "# \$sitename: Your Site Name\n"; $content .= "# \$Titlesitename: Your Site Phrase for the Title (html Title Tag) off the HTML Page\n"; $content .= "# \$nuke_url: Complete URL for your site (Do not put / at end)\n"; $content .= "# \$site_logo: Logo for Printer Friendly Page (It's good to have a Black/White graphic)\n"; $content .= "# \$slogan: Your site's slogan\n"; $content .= "# \$startdate: Start Date to display in Statistic Page\n"; $content .= "# \$moderate: Moderation of comments\n"; $content .= "# \$anonpost: Allow Anonymous to Post Comments? (1=Yes 0=No)\n"; $content .= "# \$troll_limit: Maximum Number off Comments per user (24H)\n"; $content .= "# \$mod_admin_news Allow only Moderator and Admin to Post News? (1=Yes 0=No)\n"; $content .= "# \$not_admin_count Don't record Admin's Hits in stats (1=Yes=>don't rec 0=No=>rec)\n"; $content .= "# \$Default_Theme: Default Theme for your site (See /themes directory for the complete list, case sensitive!)\n"; $content .= "# \$Start_Page: Default Page for your site (default : index.php but you can use : topics.php, links.php ...)\n"; $content .= "# \$foot(x): Messages for all footer pages (Can include HTML code)\n"; $content .= "# \$anonymous: Anonymous users Default Name\n"; $content .= "# \$site_font: Font for your entire site (Comma separated for many fonts type)\n"; $content .= "# \$minpass: Minimum character for users passwords\n"; $content .= "# \$show_user: Number off user showed in memberslist page\n"; $content .= "{$line}"; $content .= "\n"; $content .= "\$parse = \"{$xparse}\";\n"; $content .= "\$gzhandler = \"{$xgzhandler}\";\n"; $content .= "\$admin_cook_duration = \"{$xadmin_cook_duration}\";\n"; $content .= "\$user_cook_duration = \"{$xuser_cook_duration}\";\n"; $content .= "\$sitename = \"{$xsitename}\";\n"; $content .= "\$Titlesitename = \"{$xTitlesitename}\";\n"; $content .= "\$nuke_url = \"{$xnuke_url}\";\n"; $content .= "\$site_logo = \"{$xsite_logo}\";\n"; $content .= "\$slogan = \"{$xslogan}\";\n"; $content .= "\$startdate = \"{$xstartdate}\";\n"; $content .= "\$anonpost = {$xanonpost};\n"; if (!$xtroll_limit) { $xtroll_limit = 6; } $content .= "\$troll_limit = {$xtroll_limit};\n"; $content .= "\$moderate = {$xmoderate};\n"; $content .= "\$mod_admin_news = {$xmod_admin_news};\n"; $content .= "\$not_admin_count = {$xnot_admin_count};\n"; $content .= "\$Default_Theme = \"{$xDefault_Theme}\";\n"; $content .= "\$Start_Page = \"{$xstart_page}\";\n"; $content .= "\$foot1 = \"{$xfoot1}\";\n"; $content .= "\$foot2 = \"{$xfoot2}\";\n"; $content .= "\$foot3 = \"{$xfoot3}\";\n"; $content .= "\$foot4 = \"{$xfoot4}\";\n"; $content .= "\$anonymous = \"{$xanonymous}\";\n"; $content .= "\$site_font = \"{$xsite_font}\";\n"; $content .= "\$minpass = {$xminpass};\n"; $content .= "\$show_user = {$xshow_user};\n"; $content .= "\n"; $content .= "{$line}"; $content .= "# General Stories Options\n"; $content .= "#\n"; $content .= "# \$top: How many items in Top Page?\n"; $content .= "# \$storyhome: How many stories to display in Home Page?\n"; $content .= "# \$oldnum: How many stories in Old Articles Box?\n"; $content .= "{$line}"; $content .= "\n"; if (!$xtop) { $xtop = 10; } $content .= "\$top = {$xtop};\n"; if (!$xstoryhome) { $xstoryhome = 10; } $content .= "\$storyhome = {$xstoryhome};\n"; if (!$xoldnum) { $xoldnum = 10; } $content .= "\$oldnum = {$xoldnum};\n"; $content .= "\n"; $content .= "{$line}"; $content .= "# Banners/Advertising Configuration\n"; $content .= "#\n"; $content .= "# \$banners: Activate Banners Ads for your site? (1=Yes 0=No)\n"; $content .= "# \$myIP: Write your IP number to not count impressions, be fair about this!\n"; $content .= "{$line}"; $content .= "\n"; $content .= "\$banners = {$xbanners};\n"; $content .= "\$myIP = \"{$xmyIP}\";\n"; $content .= "\n"; $content .= "{$line}"; $content .= "# XML/RDF Backend Configuration & Social Networks\n"; $content .= "#\n"; $content .= "# \$backend_title: Backend title, can be your site's name and slogan\n"; $content .= "# \$backend_language: Language format of your site\n"; $content .= "# \$backend_image: Image logo for your site\n"; $content .= "# \$backend_width: Image logo width\n"; $content .= "# \$backend_height: Image logo height\n"; $content .= "# \$ultramode: Activate ultramode plain text and XML files backend syndication? (1=Yes 0=No). locate in /cache directory\n"; $content .= "# \$npds_twi: Activate the Twitter syndication? (1=Yes 0=No).\n"; $content .= "# \$npds_fcb: Activate the Facebook syndication? (1=Yes 0=No).\n"; $content .= "{$line}"; $content .= "\n"; $content .= "\$backend_title = \"{$xbackend_title}\";\n"; $content .= "\$backend_language = \"{$xbackend_language}\";\n"; $content .= "\$backend_image = \"{$xbackend_image}\";\n"; $content .= "\$backend_width = \"{$xbackend_width}\";\n"; $content .= "\$backend_height = \"{$xbackend_height}\";\n"; $content .= "\$ultramode = {$xultramode};\n"; if (!$xnpds_twi) { $xnpds_twi = 0; } $content .= "\$npds_twi = {$xnpds_twi};\n"; if (!$xnpds_fcb) { $xnpds_fcb = 0; } $content .= "\$npds_fcb = {$xnpds_fcb};\n"; $content .= "\n"; $content .= "{$line}"; $content .= "# Site Language Preferences\n"; $content .= "#\n"; $content .= "# \$language: Language of your site (You need to have lang-xxxxxx.php file for your selected language in the /language directory of your site)\n"; $content .= "# \$locale: Locale configuration to correctly display date with your country format. (See /usr/share/locale)\n"; $content .= "# \$gmt: Locale configuration to correctly display date with your GMT offset.\n"; $content .= "# \$lever: HH:MM where Day become.\n"; $content .= "# \$coucher: HH:MM where Night become.\n"; $content .= "# \$multi_langue: Activate Multi-langue NPDS'capability.\n"; $content .= "{$line}"; $content .= "\n"; $content .= "\$language = \"{$xlanguage}\";\n"; $content .= "\$multi_langue = {$xmulti_langue};\n"; $content .= "\$locale = \"{$xlocale}\";\n"; $content .= "\$gmt = \"{$xgmt}\";\n"; $content .= "\$lever = \"{$xlever}\";\n"; $content .= "\$coucher = \"{$xcoucher}\";\n"; $content .= "\n"; $content .= "{$line}"; $content .= "# Web Links Preferences\n"; $content .= "#\n"; $content .= "# \$perpage: How many links to show on each page?\n"; $content .= "# \$popular: How many hits need a link to be listed as popular?\n"; $content .= "# \$newlinks: How many links to display in the New Links Page?\n"; $content .= "# \$toplinks: How many links to display in The Best Links Page? (Most Popular)\n"; $content .= "# \$linksresults: How many links to display on each search result page?\n"; $content .= "# \$links_anonaddlinklock: Is Anonymous autorise to post new links? (0=Yes 1=No)\n"; $content .= "# \$linkmainlogo: Activate Logo on Main web Links Page (1=Yes 0=No)\n"; $content .= "# \$OnCatNewLink: Activate Icon for New Categorie on Main web Links Page (1=Yes 0=No)\n"; $content .= "{$line}"; $content .= "\n"; $content .= "\$perpage = {$xperpage};\n"; $content .= "\$popular = {$xpopular};\n"; $content .= "\$newlinks = {$xnewlinks};\n"; $content .= "\$toplinks = {$xtoplinks};\n"; $content .= "\$linksresults = {$xlinksresults};\n"; $content .= "\$links_anonaddlinklock = {$xlinks_anonaddlinklock};\n"; $content .= "\$linkmainlogo = {$xlinkmainlogo};\n"; $content .= "\$OnCatNewLink = {$xOnCatNewLink};\n"; $content .= "\n"; $content .= "{$line}"; $content .= "# Function Mail and Notification of News Submissions\n"; $content .= "#\n"; $content .= "# \$adminmail: Site Administrator's Email\n"; $content .= "# \$mail_fonction: What Mail function to be used (1=mail, 2=email)\n"; $content .= "# \$notify: Notify you each time your site receives a news submission? (1=Yes 0=No)\n"; $content .= "# \$notify_email: Email, address to send the notification\n"; $content .= "# \$notify_subject: Email subject\n"; $content .= "# \$notify_message: Email body, message\n"; $content .= "# \$notify_from: account name to appear in From field of the Email\n"; $content .= "{$line}"; $content .= "\n"; $content .= "\$adminmail = \"{$xadminmail}\";\n"; $content .= "\$mail_fonction = \"{$xmail_fonction}\";\n"; $content .= "\$notify = {$xnotify};\n"; $content .= "\$notify_email = \"{$xnotify_email}\";\n"; $content .= "\$notify_subject = \"{$xnotify_subject}\";\n"; $content .= "\$notify_message = \"{$xnotify_message}\";\n"; $content .= "\$notify_from = \"{$xnotify_from}\";\n"; $content .= "\n"; $content .= "{$line}"; $content .= "# Survey/Polls Config\n"; $content .= "#\n"; $content .= "# \$maxOptions: Number of maximum options for each poll\n"; $content .= "# \$setCookies: Set cookies to prevent visitors vote twice in a period of 24 hours? (0=Yes 1=No)\n"; $content .= "# \$pollcomm: Activate comments in Polls? (1=Yes 0=No)\n"; $content .= "{$line}"; $content .= "\n"; $content .= "\$maxOptions = {$xmaxOptions};\n"; $content .= "\$setCookies = {$xsetCookies};\n"; $content .= "\$pollcomm = {$xpollcomm};\n"; $content .= "\n"; $content .= "{$line}"; $content .= "# Some Graphics Options\n"; $content .= "#\n"; $content .= "# \$tipath: Topics images path (put / only at the end, not at the begining)\n"; $content .= "# \$userimg: User images path (put / only at the end, not at the begining)\n"; $content .= "# \$adminimg: Administration system images path (put / only at the end, not at the begining)\n"; $content .= "# \$admingraphic: Activate graphic menu for Administration Menu? (1=Yes 0=No)\n"; $content .= "# \$short_menu_admin: Activate short Administration Menu? (1=Yes 0=No)\n"; $content .= "# \$admf_ext: Image Files'extesion for admin menu (default: gif)\n"; $content .= "# \$admart: How many articles to show in the admin section?\n"; $content .= "{$line}"; $content .= "\n"; $content .= "\$tipath = \"{$xtipath}\";\n"; $content .= "\$userimg = \"{$xuserimg}\";\n"; $content .= "\$adminimg = \"{$xadminimg}\";\n"; $content .= "\$short_menu_admin = {$xshort_menu_admin};\n"; $content .= "\$admingraphic = {$xadmingraphic};\n"; if (!$xadmf_ext) { $xadmf_ext = "gif"; } $content .= "\$admf_ext = \"{$xadmf_ext}\";\n"; $content .= "\$admart = {$xadmart};\n"; $content .= "\n"; $content .= "{$line}"; $content .= "# HTTP Referers Options\n"; $content .= "#\n"; $content .= "# \$httpref: Activate HTTP referer logs to know who is linking to our site? (1=Yes 0=No)"; $content .= "# \$httprefmax: Maximum number of HTTP referers to store in the Database (Try to not set this to a high number, 500 ~ 1000 is Ok)\n"; $content .= "{$line}"; $content .= "\n"; $content .= "\$httpref = {$xhttpref};\n"; $content .= "\$httprefmax = {$xhttprefmax};\n"; $content .= "\n"; $content .= "{$line}"; $content .= "# Miscelaneous Options\n"; $content .= "#\n"; $content .= "# \$smilies: Activate Avatar? (1=Yes 0=No)\n"; $content .= "# \$avatar_size: Maximum size for uploaded avatars in pixel (width*height) \n"; $content .= "# \$short_user: Activate Short User registration (without ICQ, MSN, ...)? (1=Yes 0=No)\n"; $content .= "# \$member_list: Make the members List Private (only for members) or Public (Private=Yes Public=No)\n"; $content .= "# \$download_cat: Witch category do you want to show first in download section?\n"; $content .= "# \$AutoRegUser: Allow automated new-user creation (sending email and allowed connection)\n"; $content .= "# \$short_review: For transform reviews like \"gold book\" (1=Yes, 0=no)\n"; $content .= "# \$subscribe: Allow your members to subscribe to topics, ... (1=Yes, 0=no)\n"; $content .= "# \$member_invisible: Allow members to hide from other members, ... (1=Yes, 0=no)\n"; $content .= "# \$CloseRegUser: Allow you to close New Member Registration (from Gawax Idea), ... (1=Yes, 0=no)\n"; $content .= "# \$memberpass: Allow user to choose alone the password (1=Yes, 0=no)\n"; $content .= "{$line}"; $content .= "\n"; $content .= "\$smilies = {$xsmilies};\n"; $content .= "\$avatar_size = \"{$xavatar_size}\";\n"; $content .= "\$short_user = {$xshort_user};\n"; $content .= "\$member_list = {$xmember_list};\n"; $content .= "\$download_cat = \"{$xdownload_cat}\";\n"; $content .= "\$AutoRegUser = {$xAutoRegUser};\n"; $content .= "\$short_review = {$xshort_review};\n"; $content .= "\$subscribe = {$xsubscribe};\n"; $content .= "\$member_invisible = {$xmember_invisible};\n"; $content .= "\$CloseRegUser = {$xCloseRegUser};\n"; $content .= "\$memberpass = {$xmemberpass};\n"; $content .= "\n"; $content .= "{$line}"; $content .= "# HTTP Miscelaneous Options\n"; $content .= "#\n"; $content .= "# \$rss_host_verif: Activate the validation of the existance of a web on Port 80 for Headlines (true=Yes false=No)\n"; $content .= "# \$cache_verif: Activate the Advance Caching Meta Tag (pragma ...) (true=Yes false=No)\n"; $content .= "# \$dns_verif: Activate the DNS resolution for posts (forum ...), IP-Ban, ... (true=Yes false=No)\n"; $content .= "{$line}"; $content .= "\n"; $content .= "\$rss_host_verif = {$xrss_host_verif};\n"; $content .= "\$cache_verif = {$xcache_verif};\n"; $content .= "\$dns_verif = {$xdns_verif};\n"; $content .= "\n"; $content .= "{$line}"; $content .= "# SYSTEM Miscelaneous Options\n"; $content .= "#\n"; $content .= "# \$savemysql_size: Determine the maximum size for one file in the SaveMysql process\n"; $content .= "# \$savemysql_mode: Type of Myql process (1, 2 or 3)\n"; $content .= "# \$tiny_mce: true=Yes or false=No to use tiny_mce Editor or standard Npds Editor\n"; $content .= "{$line}"; $content .= "\n"; $content .= "\$savemysql_size = {$xsavemysql_size};\n"; $content .= "\$savemysql_mode = {$xsavemysql_mode};\n"; $content .= "\$tiny_mce = {$xtiny_mce};\n"; $content .= "\n"; $content .= "{$line}"; $content .= "# Do not touch the following options !\n"; $content .= "{$line}"; $content .= "\n"; $content .= "\$NPDS_Prefix = \"{$NPDS_Prefix}\";\n"; if ($NPDS_Key == "") { $NPDS_Key = uniqid(""); } $content .= "\$NPDS_Key = \"{$NPDS_Key}\";\n"; $content .= "\$Version_Num = \"16\";\n"; $content .= "\$Version_Id = \"NPDS\";\n"; $content .= "\$Version_Sub = \"REvolution\";\n"; $content .= "\n"; $content .= "?>"; fwrite($file, $content); fclose($file); $file = fopen("filemanager.conf", "w"); $content = "<?php\n"; $content .= "# ========================================\n"; $content .= "# DUNE by NPDS : Net Portal Dynamic System\n"; $content .= "# ========================================\n"; $content .= "\$filemanager= {$xfilemanager};\n"; $content .= "?>"; fwrite($file, $content); fclose($file); $xEmailFooter = str_replace(chr(13) . chr(10), "\n", $xEmailFooter); $file = fopen("signat.php", "w"); $content = "<?php\n"; $content .= "{$line}"; $content .= "# DUNE by NPDS : Net Portal Dynamic System\n"; $content .= "# ===================================================\n"; $content .= "#\n"; $content .= "# This version name NPDS Copyright (c) 2001-2015 by Philippe Brunier\n"; $content .= "#\n"; $content .= "# This module is to configure Footer of Email send By NPDS\n"; $content .= "#\n"; $content .= "# This program is free software. You can redistribute it and/or modify\n"; $content .= "# it under the terms of the GNU General Public License as published by\n"; $content .= "# the Free Software Foundation; either version 2 of the License.\n"; $content .= "{$line}"; $content .= "\n"; $content .= "\$message .= \"{$xEmailFooter}\";\n"; $content .= "?>"; fwrite($file, $content); fclose($file); global $aid; Ecr_Log("security", "ConfigSave() by AID : {$aid}", ""); SC_Clean(); Header("Location: admin.php?op=AdminMain"); }
function SaveSetReseaux($ModPath, $ModStart) { global $cookie; $li_rs = ''; foreach ($_POST['rs'] as $v1) { if ($v1['uid'] !== '') { $li_rs .= $v1['id'] . '|' . $v1['uid'] . ';'; } } $li_rs = rtrim($li_rs, ';'); $li_rs = removeHack(stripslashes(FixQuotes($li_rs))); sql_query("UPDATE " . $NPDS_Prefix . "users_extend SET M2='{$li_rs}' WHERE uid='{$cookie['0']}'"); Header("Location: modules.php?&ModPath={$ModPath}&ModStart={$ModStart}"); }