query('SELECT g_read_board FROM '.$db->prefix.'groups WHERE g_id=3') or error('Unable to fetch group info', __FILE__, __LINE__, $db->error()); if ($db->result($result) == '0') exit('No permission'); // Attempt to load the common language file @include PUN_ROOT.'lang/'.$pun_config['o_default_lang'].'/common.php'; if (!isset($lang_common)) exit('There is no valid language pack \''.$pun_config['o_default_lang'].'\' installed. Please reinstall a language of that name.'); // Check if we are to display a maintenance message if ($pun_config['o_maintenance'] && !defined('PUN_TURN_OFF_MAINT')) maintenance_message(); if (!isset($_GET['ttitle'])) exit('No parameters supplied. See redirect_stripit.php for instructions.'); $sql = 'SELECT t.id FROM '.$db->prefix.'topics AS t WHERE t.subject="'.utf8_decode($_GET['ttitle']).'";'; $res = $db->query( $sql ); if ($res != false && $db->num_rows($res) > 0) { $_tid = $db->fetch_row( $res ); $tid = intval( $_tid[0] ); } else { $tid = 0; } if( $tid > 0 ) { header('Location: viewtopic.php?id='.$tid); } else { header('Location: index.php'); } exit;