$result = $db->queryDirect("SELECT @@group_concat_max_len, @@max_allowed_packet"); $data = $db->getAssocArray($result); if ($data['@@group_concat_max_len'] < 8192) { $statusmsgs[] = addmsg("MySql my.cnf setting group_concat_max_len is too low, should be >= 8192.", "http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_group_concat_max_len"); } if ($data['@@max_allowed_packet'] < 12582912) { $statusmsgs[] = addmsg("MySql my.cnf setting max_allowed_packet is too low, should be >= 12582912.", "http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_max_allowed_packet"); } // // default keys not changed // if ($page->settings->getSetting('amazonpubkey') == "AKIAIPDNG5EU7LB4AD3Q" && $page->settings->getSetting('lookupmusic') + $page->settings->getSetting('lookupgames') + $page->settings->getSetting('lookupbooks') != 0) { $statusmsgs[] = addmsg("Amazon shared key in use. Not using your own Amazon API key will result in failed amazon lookups.", "http://newznab.readthedocs.org/en/latest/faq/"); } if ($page->settings->getSetting('rawretentiondays') > 10) { $statusmsgs[] = addmsg("Binary header retention is set at " . $page->settings->getSetting('rawretentiondays') . ". Having this value any higher than 2 can cause the database to grow very large.", "site-edit.php"); } // // database patches uptodate // /*$s = new Sites(); $st = new Settings(); if (!property_exists($page->settings, "dbversion")) { $db = new Settings(); $db->queryInsert('INSERT INTO settings (setting, value, updateddate ) VALUES (\'dbversion\', \'$Rev: 2248 $\', now())'); $page->settings = $st->getSetting(); } if (!preg_match("/\d+/", $page->settings->getSetting('dbversion'), $matches)) $statusmsgs[] = addmsg("Bad database version. ".$page->settings->getSetting('dbversio')." cannot be parsed.", "http://newznab.readthedocs.org/en/latest/install/#updating", "exclamation");
function admin_messages_admin_main($var) { $op = pnVarCleanFromInput('op'); if (!pnSecAuthAction(0, 'Messages::', '::', ACCESS_EDIT)) { include 'header.php'; echo _MESSAGESNOAUTH; include 'footer.php'; } else { switch ($op) { case "messages": messages(); break; case "editmsg": editmsg(); break; case "addmsg": addmsg(); break; case "deletemsg": deletemsg(); break; case "savemsg": savemsg(); break; default: messages(); break; } } }
OpenTable(); echo "<center><font size=\"4\"><b>" . _MESSAGESADMIN . "</b></font></center>"; CloseTable(); echo "<br>"; OpenTable(); echo "<center>" . _REMOVEMSG . ""; echo "<br><br>[ <a href=\"admin.php?op=messages\">" . _NO . "</a> | <a href=\"admin.php?op=deletemsg&mid={$mid}&ok=1\">" . _YES . "</a> ]</center>"; CloseTable(); include "footer.php"; } } switch ($op) { case "messages": messages(); break; case "editmsg": editmsg($mid, $title, $content, $mdate, $expire, $active, $view, $chng_date, $mlanguage); break; case "addmsg": addmsg($add_title, $add_content, $add_mdate, $add_expire, $add_active, $add_view, $add_mlanguage); break; case "deletemsg": deletemsg($mid, $ok); break; case "savemsg": savemsg($mid, $title, $content, $mdate, $expire, $active, $view, $chng_date, $mlanguage); break; } } else { echo "Access Denied"; }
} if ($page->site->rawretentiondays > 10) { $statusmsgs[] = addmsg("Binary header retention is set at " . $page->site->rawretentiondays . ". Having this value any higher than 2 can cause the database to grow very large.", "site-edit.php"); } if ($page->site->newznabID == "") { $statusmsgs[] = addmsg("Newznab ID missing. You have not entered a newznab ID, and will not be using the latest matching regex's.", "http://www.newznab.com/chat.html", "exclamation"); } // // database patches uptodate // $s = new Sites(); if (!property_exists($page->site, "dbversion")) { $db = new DB(); $db->queryInsert('INSERT INTO site (setting, value, updateddate ) VALUES (\'dbversion\', \'$Rev: 2248 $\', now())'); $page->site = $s->get(); } if (!preg_match("/\\d+/", $page->site->dbversion, $matches)) { $statusmsgs[] = addmsg("Bad database version. " . $page->site->dbversion . " cannot be parsed.", "http://newznab.readthedocs.org/en/latest/install/#updating", "exclamation"); } $patches = $s->getUnappliedPatches($page->site); $patches = array_map("basename", $patches); if (count($patches) > 0) { $statusmsgs[] = addmsg("Database out of date. Ensure all database patches in /db/patch/0.2.3/ are ran by using the script misc/update_scripts/update_database_version.php<br/><small>" . implode("<br/>", $patches) . "</small>", "http://newznab.readthedocs.org/en/latest/install/#updating", "exclamation"); } $page->smarty->assign('statusmsgs', $statusmsgs); $page->content = $page->smarty->fetch('index.tpl'); $page->render(); function addmsg($msg, $url = "", $icon = "") { return array('msg' => $msg, 'url' => $url, 'icon' => $icon == "" ? "information" : $icon); }
function de($method, $s) { switch ($method) { case 'snd': break; case 'bin': $s = bin_de($s); break; case 'dec': $s = dec_de($s); break; case 'oct': $s = oct_de($s); break; case 'hex': $s = hex_de($s); break; case 'rot': $s = rotate($s, 26 - $_POST['rot'], 10 - $_POST['nrot']); break; case 'url': $s = $_POST['url_raw'] == 'on' ? rawurldecode($s) : urldecode($s); break; case 'ur2': $s = urldecode($s); break; case 'raw': break; case 'stmwth': break; case 'rev': $s = str_rev($s); break; case 'spe': $s = html_entity_decode($s); break; case 'hen': break; case 'nbase': $s = base_conv($s, 1); break; case 'base': $s = base_de($s); break; case 'md5': addmsg(INFO, '<a href="http://gdataonline.com/seekhash.php" target="_blank">http://gdataonline.com/seekhash.php</a>'); break; case 'crypt': break; case 'stu': break; case 'crv': $s = case_rev($s); break; case 'stl': break; case 'ucw': break; case 'bbs': break; case 'bsd': break; case 'srt': $s = mysort($s, 1); break; case 'rpt': break; case 'unq': $s = uniq($s, 1); break; case 'rf': $s = sqr($s, 1); break; case 'pcr': break; case 'acc': $s = accumulation($s, 1); break; case 'uue': $s = convert_uudecode($s); break; case 'det': break; case 'ttb': break; case 'mut': break; case 'sha1': break; case 'msk': break; case 'ref': $s = sqr_reflect($s); break; case 'crc16': break; case 'crc32': break; case 'sta': break; case 'rep': $s = gen_rep_de($s); break; case 'cor': break; case 'pcm': break; case 'ascii': $s = ASCIIFilter_de($s); break; case 'ave': break; case 'miv': break; case 'mmtp': break; case 'mro': $s = matrix_rotate($s, 1); break; case 'mtr': $s = matrix_transpose($s); break; case 'cac': break; case 'ctr': break; case 'swd': break; case 'che': break; case 'key': $s = key_xor($_POST['key'], $s); break; case 'bre': $s = bit_rev($s); break; case 'bod': $s = bitorder_de($_POST['order'], $s); break; case 'tra': $s = tran(12 - $_POST['transpose'], $s, 1); break; case 'quot': break; default: addmsg(ERR, 'Undefined Method: ' . $method); } return $s; }