Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/AnonR/smanonr..../var/softacul.../fud
File: index.php
break;
[1000] Fix | Delete
[1001] Fix | Delete
case 'rp':
[1002] Fix | Delete
$_GET['t'] = 'rpasswd';
[1003] Fix | Delete
break;
[1004] Fix | Delete
[1005] Fix | Delete
case 'as':
[1006] Fix | Delete
$_GET['t'] = 'avatarsel';
[1007] Fix | Delete
break;
[1008] Fix | Delete
[1009] Fix | Delete
case 'sel':
[1010] Fix | Delete
$_GET['t'] = 'selmsg';
[1011] Fix | Delete
$c = count($p) - 1;
[1012] Fix | Delete
if ($c % 2) {
[1013] Fix | Delete
--$c;
[1014] Fix | Delete
}
[1015] Fix | Delete
$c /= 2;
[1016] Fix | Delete
$i = 0;
[1017] Fix | Delete
while ($c--) {
[1018] Fix | Delete
$_GET[$p[++$i]] = $p[++$i];
[1019] Fix | Delete
}
[1020] Fix | Delete
break;
[1021] Fix | Delete
[1022] Fix | Delete
case 'pml':
[1023] Fix | Delete
$_GET['t'] = 'pmuserloc';
[1024] Fix | Delete
$_GET['js_redr'] = $p[1];
[1025] Fix | Delete
if (isset($p[2])) {
[1026] Fix | Delete
$_GET['overwrite'] = 1;
[1027] Fix | Delete
}
[1028] Fix | Delete
break;
[1029] Fix | Delete
[1030] Fix | Delete
case 'rst':
[1031] Fix | Delete
$_GET['t'] = 'reset';
[1032] Fix | Delete
if (isset($p[1])) {
[1033] Fix | Delete
$_GET['email'] = urldecode($p[1]);
[1034] Fix | Delete
}
[1035] Fix | Delete
break;
[1036] Fix | Delete
[1037] Fix | Delete
case 'cpf':
[1038] Fix | Delete
$_GET['t'] = 'coppa_fax';
[1039] Fix | Delete
break;
[1040] Fix | Delete
[1041] Fix | Delete
case 'cp':
[1042] Fix | Delete
$_GET['t'] = 'coppa';
[1043] Fix | Delete
break;
[1044] Fix | Delete
[1045] Fix | Delete
case 'rc':
[1046] Fix | Delete
$_GET['t'] = 'reg_conf';
[1047] Fix | Delete
break;
[1048] Fix | Delete
[1049] Fix | Delete
case 'ma':
[1050] Fix | Delete
$_GET['t'] = 'mnav';
[1051] Fix | Delete
if (isset($p[1])) {
[1052] Fix | Delete
$_GET['rng'] = isset($p[1]) ? $p[1] : 0;
[1053] Fix | Delete
$_GET['rng2'] = isset($p[2]) ? $p[2] : 0;
[1054] Fix | Delete
$_GET['u'] = isset($p[3]) ? $p[3] : 0;
[1055] Fix | Delete
$_GET['start'] = isset($p[4]) ? $p[4] : 0;
[1056] Fix | Delete
$_GET['sub'] = !empty($p[5]);
[1057] Fix | Delete
}
[1058] Fix | Delete
break;
[1059] Fix | Delete
[1060] Fix | Delete
case 'ip':
[1061] Fix | Delete
$_GET['t'] = 'ip';
[1062] Fix | Delete
if (isset($p[1])) {
[1063] Fix | Delete
$_GET[($p[1][0] == 'i' ? 'ip' : 'user')] = isset($p[2]) ? $p[2] : '';
[1064] Fix | Delete
}
[1065] Fix | Delete
break;
[1066] Fix | Delete
[1067] Fix | Delete
case 'met':
[1068] Fix | Delete
$_GET['t'] = 'merge_th';
[1069] Fix | Delete
if (isset($p[1])) {
[1070] Fix | Delete
$_GET['frm_id'] = $p[1];
[1071] Fix | Delete
}
[1072] Fix | Delete
break;
[1073] Fix | Delete
[1074] Fix | Delete
case 'uc':
[1075] Fix | Delete
$_GET['t'] = 'uc';
[1076] Fix | Delete
if (isset($p[1], $p[2])) {
[1077] Fix | Delete
$_GET[$p[1]] = $p[2];
[1078] Fix | Delete
}
[1079] Fix | Delete
break;
[1080] Fix | Delete
[1081] Fix | Delete
case 'mmd':
[1082] Fix | Delete
$_GET['t'] = 'mmd';
[1083] Fix | Delete
break;
[1084] Fix | Delete
[1085] Fix | Delete
case 'cal': /* Calendar */
[1086] Fix | Delete
$_GET['t'] = 'calendar';
[1087] Fix | Delete
break;
[1088] Fix | Delete
[1089] Fix | Delete
case 'blog': /* Blog */
[1090] Fix | Delete
$_GET['t'] = 'blog';
[1091] Fix | Delete
if ($p[1] == 'u' && isset($p[2])) {
[1092] Fix | Delete
$_GET['user'] = $p[2];
[1093] Fix | Delete
$_GET['start'] = isset($p[3]) ? $p[3] : 0;
[1094] Fix | Delete
}
[1095] Fix | Delete
if ($p[1] == 'f' && isset($p[2])) {
[1096] Fix | Delete
$_GET['forum'] = $p[2];
[1097] Fix | Delete
$_GET['start'] = isset($p[3]) ? $p[3] : 0;
[1098] Fix | Delete
} else {
[1099] Fix | Delete
$_GET['start'] = $p[1];
[1100] Fix | Delete
}
[1101] Fix | Delete
break;
[1102] Fix | Delete
[1103] Fix | Delete
case 'page': /* Static page */
[1104] Fix | Delete
$_GET['t'] = 'page';
[1105] Fix | Delete
if (isset($p[1])) {
[1106] Fix | Delete
$_GET['id'] = $p[1];
[1107] Fix | Delete
}
[1108] Fix | Delete
break;
[1109] Fix | Delete
[1110] Fix | Delete
default:
[1111] Fix | Delete
// Page not specified, redirect to front page.
[1112] Fix | Delete
$_GET['t'] = 'index';
[1113] Fix | Delete
break;
[1114] Fix | Delete
}
[1115] Fix | Delete
$GLOBALS['t'] = $_GET['t'];
[1116] Fix | Delete
} else if (isset($_GET['t'])) {
[1117] Fix | Delete
$GLOBALS['t'] = (string) $_GET['t'];
[1118] Fix | Delete
} else if (isset($_POST['t'])) {
[1119] Fix | Delete
$GLOBALS['t'] = (string) $_POST['t'];
[1120] Fix | Delete
} else {
[1121] Fix | Delete
$GLOBALS['t'] = 'index';
[1122] Fix | Delete
}
[1123] Fix | Delete
[1124] Fix | Delete
if ($GLOBALS['t'] == 'register') {
[1125] Fix | Delete
$GLOBALS['THREADS_PER_PAGE_F'] = $GLOBALS['THREADS_PER_PAGE']; // Store old value.
[1126] Fix | Delete
}
[1127] Fix | Delete
[1128] Fix | Delete
header('P3P: CP="ALL CUR OUR IND UNI ONL INT CNT STA"'); /* P3P Policy. */
[1129] Fix | Delete
[1130] Fix | Delete
$sq = 0;
[1131] Fix | Delete
/* Fetch an object with the user's session, profile & theme info. */
[1132] Fix | Delete
if (!($u = ses_get()) && defined('plugins')) {
[1133] Fix | Delete
/* Call auto-login plugins. */
[1134] Fix | Delete
$u = plugin_call_hook('AUTO_LOGIN');
[1135] Fix | Delete
}
[1136] Fix | Delete
[1137] Fix | Delete
if (!$u) {
[1138] Fix | Delete
/* New anon user. */
[1139] Fix | Delete
$u = ses_anon_make();
[1140] Fix | Delete
} else if ($u->id != 1 && (!$GLOBALS['is_post'] || sq_check(1, $u->sq, $u->id, $u->ses_id))) {
[1141] Fix | Delete
/* Store the last visit date for registered user. */
[1142] Fix | Delete
q('UPDATE fud30_users SET last_visit='. __request_timestamp__ .' WHERE id='. $u->id);
[1143] Fix | Delete
if ($GLOBALS['FUD_OPT_3'] & 1) { // SESSION_COOKIES
[1144] Fix | Delete
setcookie($GLOBALS['COOKIE_NAME'], $u->ses_id, 0, $GLOBALS['COOKIE_PATH'], $GLOBALS['COOKIE_DOMAIN']);
[1145] Fix | Delete
}
[1146] Fix | Delete
if (!$u->sq || __request_timestamp__ - $u->last_visit > 180) { // 3 min.
[1147] Fix | Delete
$u->sq = $sq = regen_sq($u->id);
[1148] Fix | Delete
if (!$GLOBALS['is_post']) {
[1149] Fix | Delete
$_GET['SQ'] = $sq;
[1150] Fix | Delete
} else {
[1151] Fix | Delete
$_POST['SQ'] = $sq;
[1152] Fix | Delete
}
[1153] Fix | Delete
} else {
[1154] Fix | Delete
$sq =& $u->sq;
[1155] Fix | Delete
}
[1156] Fix | Delete
}
[1157] Fix | Delete
[1158] Fix | Delete
// Prevent spiders from doing funny stuff.
[1159] Fix | Delete
if (($u->users_opt & 1073741824) && $GLOBALS['is_post']) { // is_spider
[1160] Fix | Delete
die('Bad bot!');
[1161] Fix | Delete
}
[1162] Fix | Delete
[1163] Fix | Delete
/* Disable caching for registered users and POST requests. */
[1164] Fix | Delete
if ($GLOBALS['is_post'] || $u->id > 1) {
[1165] Fix | Delete
header('Cache-Control: no-store, private, must-revalidate, proxy-revalidate, post-check=0, pre-check=0, max-age=0, s-maxage=0');
[1166] Fix | Delete
header('Expires: Mon, 21 Jan 1980 06:01:01 GMT');
[1167] Fix | Delete
header('Pragma: no-cache');
[1168] Fix | Delete
}
[1169] Fix | Delete
[1170] Fix | Delete
if ($u->data) {
[1171] Fix | Delete
$u->data = unserialize($u->data);
[1172] Fix | Delete
}
[1173] Fix | Delete
$uo = $u->users_opt = (int)$u->users_opt;
[1174] Fix | Delete
[1175] Fix | Delete
/* This should allow path_info & normal themes to work properly within 1 forum. */
[1176] Fix | Delete
if ($o2 & 32768 && !($u->theme_opt & 4)) {
[1177] Fix | Delete
$o2 ^= 32768;
[1178] Fix | Delete
}
[1179] Fix | Delete
[1180] Fix | Delete
/* Handle PM disabling for users. */
[1181] Fix | Delete
if (!($GLOBALS['is_a'] = $uo & 1048576) && $uo & 33554432) {
[1182] Fix | Delete
$o1 = $o1 &~ 1024;
[1183] Fix | Delete
}
[1184] Fix | Delete
[1185] Fix | Delete
/* Set timezone. */
[1186] Fix | Delete
if (empty($u->time_zone) || @date_default_timezone_set($u->time_zone) === FALSE) {
[1187] Fix | Delete
date_default_timezone_set($GLOBALS['SERVER_TZ']);
[1188] Fix | Delete
}
[1189] Fix | Delete
[1190] Fix | Delete
/* Set locale. */
[1191] Fix | Delete
$GLOBALS['good_locale'] = setlocale(LC_ALL, $u->locale);
[1192] Fix | Delete
[1193] Fix | Delete
/* Call inituser plugins. */
[1194] Fix | Delete
if (defined('plugins')) {
[1195] Fix | Delete
plugin_call_hook('INITUSER', $u);
[1196] Fix | Delete
}
[1197] Fix | Delete
[1198] Fix | Delete
/* View format for threads & messages. */
[1199] Fix | Delete
define('d_thread_view', $uo & 256 ? 'msg' : 'tree');
[1200] Fix | Delete
define('t_thread_view', $uo & 128 ? 'thread' : 'threadt');
[1201] Fix | Delete
if ($GLOBALS['t'] === 0) {
[1202] Fix | Delete
$GLOBALS['t'] = $_GET['t'] = d_thread_view;
[1203] Fix | Delete
} else if ($GLOBALS['t'] === 1) {
[1204] Fix | Delete
$GLOBALS['t'] = $_GET['t'] = t_thread_view;
[1205] Fix | Delete
}
[1206] Fix | Delete
[1207] Fix | Delete
/* Define theme path, may already be set by a plugin. */
[1208] Fix | Delete
defined('fud_theme') or define('fud_theme', 'theme/'. ($u->theme_name ? $u->theme_name : 'default') .'/');
[1209] Fix | Delete
[1210] Fix | Delete
/* Define _uid, which, will tell us if this is a 'real' user or not. */
[1211] Fix | Delete
define('__fud_real_user__', ($u->id != 1 ? $u->id : 0));
[1212] Fix | Delete
define('_uid', __fud_real_user__ && ($uo & 131072) && !($uo & 2097152) ? $u->id : 0);
[1213] Fix | Delete
[1214] Fix | Delete
/* Allow user to set their own topics per page value, as long as it is smaller then the max. */
[1215] Fix | Delete
if (__fud_real_user__ && $GLOBALS['THREADS_PER_PAGE'] > $u->topics_per_page) {
[1216] Fix | Delete
$GLOBALS['THREADS_PER_PAGE'] = (int) $u->topics_per_page;
[1217] Fix | Delete
}
[1218] Fix | Delete
[1219] Fix | Delete
$GLOBALS['sq'] = $sq;
[1220] Fix | Delete
[1221] Fix | Delete
/* Define constants used to track URL sessions & referrals. */
[1222] Fix | Delete
if ($o1 & 128) {
[1223] Fix | Delete
define('s', $u->ses_id); define('_hs', '<input type="hidden" name="S" value="'. s .'" /><input type="hidden" name="SQ" value="'. $sq .'" />');
[1224] Fix | Delete
if ($o2 & 8192) {
[1225] Fix | Delete
if ($o2 & 32768) {
[1226] Fix | Delete
define('_rsid', __fud_real_user__ .'/'. s .'/');
[1227] Fix | Delete
} else {
[1228] Fix | Delete
define('_rsid', 'rid='. __fud_real_user__ .'&amp;S='. s);
[1229] Fix | Delete
}
[1230] Fix | Delete
} else {
[1231] Fix | Delete
if ($o2 & 32768) {
[1232] Fix | Delete
define('_rsid', s .'/');
[1233] Fix | Delete
} else {
[1234] Fix | Delete
define('_rsid', 'S='. s);
[1235] Fix | Delete
}
[1236] Fix | Delete
}
[1237] Fix | Delete
} else {
[1238] Fix | Delete
define('s', ''); define('_hs', '<input type="hidden" name="SQ" value="'. $sq .'" />');
[1239] Fix | Delete
if ($o2 & 8192) {
[1240] Fix | Delete
if ($o2 & 32768) {
[1241] Fix | Delete
define('_rsid', __fud_real_user__ .'/');
[1242] Fix | Delete
} else {
[1243] Fix | Delete
define('_rsid', 'rid='. __fud_real_user__);
[1244] Fix | Delete
}
[1245] Fix | Delete
} else {
[1246] Fix | Delete
define('_rsid', '');
[1247] Fix | Delete
}
[1248] Fix | Delete
}
[1249] Fix | Delete
define('_rsidl', ($o2 & 32768 ? _rsid : str_replace('&amp;', '&', _rsid)));
[1250] Fix | Delete
[1251] Fix | Delete
return $u;
[1252] Fix | Delete
}
[1253] Fix | Delete
[1254] Fix | Delete
function user_register_forum_view($frm_id)
[1255] Fix | Delete
{
[1256] Fix | Delete
if (__dbtype__ == 'mysql') { // MySQL optimization.
[1257] Fix | Delete
q('INSERT INTO fud30_forum_read (forum_id, user_id, last_view) VALUES ('. $frm_id .', '. _uid .', '. __request_timestamp__ .') ON DUPLICATE KEY UPDATE last_view=VALUES(last_view)');
[1258] Fix | Delete
return;
[1259] Fix | Delete
}
[1260] Fix | Delete
[1261] Fix | Delete
if (!db_li('INSERT INTO fud30_forum_read (forum_id, user_id, last_view) VALUES ('. $frm_id .', '. _uid .', '. __request_timestamp__ .')', $ef)) {
[1262] Fix | Delete
q('UPDATE fud30_forum_read SET last_view='. __request_timestamp__ .' WHERE forum_id='. $frm_id .' AND user_id='. _uid);
[1263] Fix | Delete
}
[1264] Fix | Delete
}
[1265] Fix | Delete
[1266] Fix | Delete
function user_register_thread_view($thread_id, $tm=__request_timestamp__, $msg_id=0)
[1267] Fix | Delete
{
[1268] Fix | Delete
if (__dbtype__ == 'mysql') { // MySQL optimization.
[1269] Fix | Delete
q('INSERT INTO fud30_read (last_view, msg_id, thread_id, user_id) VALUES('. $tm .', '. $msg_id .', '. $thread_id .', '. _uid .') ON DUPLICATE KEY UPDATE last_view=VALUES(last_view), msg_id=VALUES(msg_id)');
[1270] Fix | Delete
return;
[1271] Fix | Delete
}
[1272] Fix | Delete
[1273] Fix | Delete
if (!db_li('INSERT INTO fud30_read (last_view, msg_id, thread_id, user_id) VALUES('. $tm .', '. $msg_id .', '. $thread_id .', '. _uid .')', $ef)) {
[1274] Fix | Delete
q('UPDATE fud30_read SET last_view='. $tm .', msg_id='. $msg_id .' WHERE thread_id='. $thread_id .' AND user_id='. _uid);
[1275] Fix | Delete
}
[1276] Fix | Delete
}
[1277] Fix | Delete
[1278] Fix | Delete
function user_set_post_count($uid)
[1279] Fix | Delete
{
[1280] Fix | Delete
$pd = db_saq('SELECT MAX(id), count(*) FROM fud30_msg WHERE poster_id='. $uid .' AND apr=1');
[1281] Fix | Delete
$level_id = (int) q_singleval(q_limit('SELECT id FROM fud30_level WHERE post_count <= '. $pd[1] .' ORDER BY post_count DESC', 1));
[1282] Fix | Delete
q('UPDATE fud30_users SET u_last_post_id='. (int)$pd[0] .', posted_msg_count='. (int)$pd[1] .', level_id='. $level_id .' WHERE id='. $uid);
[1283] Fix | Delete
}
[1284] Fix | Delete
[1285] Fix | Delete
function user_mark_all_read($id)
[1286] Fix | Delete
{
[1287] Fix | Delete
q('UPDATE fud30_users SET last_read='. __request_timestamp__ .' WHERE id='. $id);
[1288] Fix | Delete
q('DELETE FROM fud30_read WHERE user_id='. $id);
[1289] Fix | Delete
q('DELETE FROM fud30_forum_read WHERE user_id='. $id);
[1290] Fix | Delete
}
[1291] Fix | Delete
[1292] Fix | Delete
function user_mark_forum_read($id, $fid, $last_view)
[1293] Fix | Delete
{
[1294] Fix | Delete
if (__dbtype__ == 'mysql') { // MySQL optimization.
[1295] Fix | Delete
q('INSERT INTO fud30_read (user_id, thread_id, msg_id, last_view) SELECT '. $id .', id, last_post_id, '. __request_timestamp__ .' FROM fud30_thread WHERE forum_id='. $fid .' AND last_post_date > '. $last_view .' ON DUPLICATE KEY UPDATE last_view=VALUES(last_view), msg_id=VALUES(msg_id)');
[1296] Fix | Delete
} else if (__dbtype__ == 'sqlite') { // SQLite optimization.
[1297] Fix | Delete
q('REPLACE INTO fud30_read (user_id, thread_id, msg_id, last_view) SELECT '. $id .', id, last_post_id, '. __request_timestamp__ .' FROM fud30_thread WHERE forum_id='. $fid .' AND last_post_date > '. $last_view);
[1298] Fix | Delete
} else { // Other databases.
[1299] Fix | Delete
if (!db_li('INSERT INTO fud30_read (user_id, thread_id, msg_id, last_view) SELECT '. $id .', id, last_post_id, '. __request_timestamp__ .' FROM fud30_thread WHERE forum_id='. $fid .' AND last_post_date > '. $last_view, $ef)) {
[1300] Fix | Delete
q('UPDATE fud30_read SET user_id='. $id .', msg_id=t.last_post_id, last_view='. __request_timestamp__ .' FROM (SELECT id, last_post_id FROM fud30_thread WHERE forum_id='. $fid .' AND last_post_date > '. $last_view .') t WHERE user_id='. $id .' AND thread_id=t.id');
[1301] Fix | Delete
}
[1302] Fix | Delete
}
[1303] Fix | Delete
user_register_forum_view($fid);
[1304] Fix | Delete
}
[1305] Fix | Delete
[1306] Fix | Delete
function sq_check($post, &$sq, $uid=__fud_real_user__, $ses=s)
[1307] Fix | Delete
{
[1308] Fix | Delete
/* No sequence # check for anonymous users. */
[1309] Fix | Delete
if (!$uid) {
[1310] Fix | Delete
return 1;
[1311] Fix | Delete
}
[1312] Fix | Delete
[1313] Fix | Delete
if ($post && isset($_POST['SQ'])) {
[1314] Fix | Delete
$s = $_POST['SQ'];
[1315] Fix | Delete
} else if (!$post && isset($_GET['SQ'])) {
[1316] Fix | Delete
$s = $_GET['SQ'];
[1317] Fix | Delete
} else {
[1318] Fix | Delete
$s = 0;
[1319] Fix | Delete
}
[1320] Fix | Delete
[1321] Fix | Delete
if ($sq !== $s) {
[1322] Fix | Delete
if ($GLOBALS['t'] == 'post' || $GLOBALS['t'] == 'ppost') {
[1323] Fix | Delete
define('fud_bad_sq', 1);
[1324] Fix | Delete
$sq = regen_sq($uid);
[1325] Fix | Delete
return 1;
[1326] Fix | Delete
}
[1327] Fix | Delete
header('Location: [[relativeurl]]/index.php?S='. $ses);
[1328] Fix | Delete
exit;
[1329] Fix | Delete
}
[1330] Fix | Delete
[1331] Fix | Delete
return 1;
[1332] Fix | Delete
}
[1333] Fix | Delete
[1334] Fix | Delete
function regen_sq($uid=__fud_real_user__)
[1335] Fix | Delete
{
[1336] Fix | Delete
$sq = md5(get_random_value(128));
[1337] Fix | Delete
q('UPDATE fud30_users SET sq=\''. $sq .'\' WHERE id='. $uid);
[1338] Fix | Delete
return $sq;
[1339] Fix | Delete
}
[1340] Fix | Delete
[1341] Fix | Delete
if (isset($_SERVER['REMOTE_ADDR']) && !defined('no_session')) {
[1342] Fix | Delete
$GLOBALS['usr'] = init_user();
[1343] Fix | Delete
}
[1344] Fix | Delete
[1345] Fix | Delete
[1346] Fix | Delete
fud_use('err.inc');
[1347] Fix | Delete
[1348] Fix | Delete
/* BUST_A_PUNK enabled. */
[1349] Fix | Delete
if ($FUD_OPT_2 & 524288 && isset($_COOKIE[$COOKIE_NAME .'1']) && $t != 'error') {
[1350] Fix | Delete
fud_use('errmsg.inc');
[1351] Fix | Delete
exit_user_banned();
[1352] Fix | Delete
}
[1353] Fix | Delete
[1354] Fix | Delete
/* Check PHP_COMPRESSION_ENABLE. */
[1355] Fix | Delete
if ($FUD_OPT_2 & 16384 && $t != 'getfile') {
[1356] Fix | Delete
ini_set('zlib.output_compression_level', (int)$PHP_COMPRESSION_LEVEL);
[1357] Fix | Delete
ob_start('ob_gzhandler');
[1358] Fix | Delete
}
[1359] Fix | Delete
[1360] Fix | Delete
if ($t == 'rview') {
[1361] Fix | Delete
if (isset($_GET['th']) || isset($_GET['goto'])) {
[1362] Fix | Delete
$t = $_GET['t'] = d_thread_view;
[1363] Fix | Delete
} else if (isset($_GET['frm_id'])) {
[1364] Fix | Delete
$t = $_GET['t'] = t_thread_view;
[1365] Fix | Delete
} else {
[1366] Fix | Delete
$t = $_GET['t'] = 'index';
[1367] Fix | Delete
}
[1368] Fix | Delete
} else if (preg_match('/[^a-z_]/', $t) || !@file_exists($WWW_ROOT_DISK . fud_theme . $t .'.php')) {
[1369] Fix | Delete
// Page not found, redirect to front page.
[1370] Fix | Delete
http_response_code(404);
[1371] Fix | Delete
$t = 'index';
[1372] Fix | Delete
}
[1373] Fix | Delete
[1374] Fix | Delete
/* Call themed template. */
[1375] Fix | Delete
if (defined('plugins')) {
[1376] Fix | Delete
$t = plugin_call_hook('PRE_TEMPLATE', $t);
[1377] Fix | Delete
if (isset($plugin_hooks['POST_TEMPLATE'])) {
[1378] Fix | Delete
ob_start(); // Start capturing output for POST_TEMPLATE plugins.
[1379] Fix | Delete
}
[1380] Fix | Delete
}
[1381] Fix | Delete
require($WWW_ROOT_DISK . fud_theme .'language.inc'); // Initialize theme's language helper functions.
[1382] Fix | Delete
require($WWW_ROOT_DISK . fud_theme . $t .'.php');
[1383] Fix | Delete
if (defined('plugins') && isset($plugin_hooks['POST_TEMPLATE'])) {
[1384] Fix | Delete
$template_data = ob_get_contents();
[1385] Fix | Delete
ob_end_clean();
[1386] Fix | Delete
echo plugin_call_hook('POST_TEMPLATE', $template_data);
[1387] Fix | Delete
}
[1388] Fix | Delete
[1389] Fix | Delete
/* Housekeeping. */
[1390] Fix | Delete
while (ob_get_level() > 0) ob_end_flush(); // Flush all output to browser.
[1391] Fix | Delete
switch ($t) {
[1392] Fix | Delete
case 'msg':
[1393] Fix | Delete
if (!isset($_GET['prevloaded'])) {
[1394] Fix | Delete
th_inc_view_count($frm->id);
[1395] Fix | Delete
}
[1396] Fix | Delete
if (_uid && $obj2) {
[1397] Fix | Delete
if ($frm->last_forum_view < $obj2->post_stamp) {
[1398] Fix | Delete
user_register_forum_view($frm->forum_id);
[1399] Fix | Delete
}
[1400] Fix | Delete
if ($frm->last_view < $obj2->post_stamp) {
[1401] Fix | Delete
user_register_thread_view($frm->id, $obj2->post_stamp, $obj2->id);
[1402] Fix | Delete
}
[1403] Fix | Delete
}
[1404] Fix | Delete
break;
[1405] Fix | Delete
case 'tree':
[1406] Fix | Delete
if (_uid && $msg_obj) {
[1407] Fix | Delete
th_inc_view_count($msg_obj->thread_id);
[1408] Fix | Delete
if ($frm->last_forum_view < $msg_obj->post_stamp) {
[1409] Fix | Delete
user_register_forum_view($msg_obj->forum_id);
[1410] Fix | Delete
}
[1411] Fix | Delete
if ($frm->last_view < $msg_obj->post_stamp) {
[1412] Fix | Delete
user_register_thread_view($msg_obj->thread_id, $msg_obj->post_stamp, $msg_obj->id);
[1413] Fix | Delete
}
[1414] Fix | Delete
}
[1415] Fix | Delete
break;
[1416] Fix | Delete
case 'login':
[1417] Fix | Delete
/* Clear expired sessions AND anonymous sessions older than 1 day. */
[1418] Fix | Delete
q('DELETE FROM fud30_ses WHERE time_sec<'. (__request_timestamp__- ($FUD_OPT_3 & 1 ? $SESSION_TIMEOUT : $COOKIE_TIMEOUT)) .' OR (user_id>2000000000 AND time_sec<'. (__request_timestamp__- 86400) .')');
[1419] Fix | Delete
break;
[1420] Fix | Delete
case 'thread':
[1421] Fix | Delete
case 'threadt':
[1422] Fix | Delete
if (_uid) {
[1423] Fix | Delete
user_register_forum_view($frm_id);
[1424] Fix | Delete
}
[1425] Fix | Delete
break;
[1426] Fix | Delete
}
[1427] Fix | Delete
[1428] Fix | Delete
?>
[1429] Fix | Delete
[1430] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function