Jump to content

dJtl

Members
  • Posts

    59
  • Joined

  • Last visited

    Never

Everything posted by dJtl

  1. No, the songs aren't on my server. they are from esnips.com I just search them and let you access them easily. Can everybody that sees blank on IE try a different web browser if you have one? Thanks
  2. Hi, Here is my site. http://www.musicunderworld.org I didn't make the whole thing alone. I payed for a lot of it. So some of my friends said that it doesn't show on their browser. It works for me. Fire Fox, IE, Safari, that's all I've tried. Anyways, please tell me what I could add to make it better (i.e. better graphics, features, etc.) I'm adding a forum. Thoughts? Thanks P.S. If it shows up as a blank screen please tell me what browser and OS you are using
  3. I think there should be an affiliate/link exchange forum for websites to get more traffic. Sound good?
  4. Thanks, lol that was easier that I thought I should've looked into it more before posting
  5. I have an SMF forum and I want to remove the confirmation image field so that you don't need to use it to sign up and it's not there. here's the code: <?php /********************************************************************************** * Register.php * *********************************************************************************** * SMF: Simple Machines Forum * * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * * =============================================================================== * * Software Version: SMF 1.1.2 * * Software by: Simple Machines (http://www.simplemachines.org) * * Copyright 2006-2007 by: Simple Machines LLC (http://www.simplemachines.org) * * 2001-2006 by: Lewis Media (http://www.lewismedia.com) * * Support, News, Updates at: http://www.simplemachines.org * *********************************************************************************** * This program is free software; you may redistribute it and/or modify it under * * the terms of the provided license as published by Simple Machines LLC. * * * * This program is distributed in the hope that it is and will be useful, but * * WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY * * or FITNESS FOR A PARTICULAR PURPOSE. * * * * See the "license.txt" file for details of the Simple Machines license. * * The latest version can always be found at http://www.simplemachines.org. * **********************************************************************************/ if (!defined('SMF')) die('Hacking attempt...'); /* This file has two main jobs, but they really are one. It registers new members, and it helps the administrator moderate member registrations. Similarly, it handles account activation as well. void Register() // !!! void Register2() // !!! void Activate() // !!! void CoppaForm() // !!! */ // Begin the registration process. function Register() { global $txt, $boarddir, $context, $settings, $modSettings, $user_info; global $db_prefix, $language, $scripturl, $func; // Check if the administrator has it disabled. if (!empty($modSettings['registration_method']) && $modSettings['registration_method'] == 3) fatal_lang_error('registration_disabled', false); // If this user is an admin - redirect them to the admin registration page. if (allowedTo('moderate_forum') && !$user_info['is_guest']) redirectexit('action=regcenter;sa=register'); // You are not a guest so you are a member - and members don't get to register twice! elseif (empty($user_info['is_guest'])) redirectexit(); loadLanguage('Login'); loadTemplate('Register'); // All the basic template information... $context['sub_template'] = 'before'; $context['allow_hide_email'] = !empty($modSettings['allow_hideEmail']); $context['require_agreement'] = !empty($modSettings['requireAgreement']); // Under age restrictions? if (!empty($modSettings['coppaAge'])) { $context['show_coppa'] = true; $context['coppa_desc'] = sprintf($txt['register_age_confirmation'], $modSettings['coppaAge']); } $context['page_title'] = $txt[97]; // If you have to agree to the agreement, it needs to be fetched from the file. if ($context['require_agreement']) $context['agreement'] = file_exists($boarddir . '/agreement.txt') ? parse_bbc(file_get_contents($boarddir . '/agreement.txt'), true, 'agreement') : ''; if (!empty($modSettings['userLanguage'])) { $selectedLanguage = empty($_SESSION['language']) ? $language : $_SESSION['language']; $language_directories = array( $settings['default_theme_dir'] . '/languages', $settings['actual_theme_dir'] . '/languages', ); if (!empty($settings['base_theme_dir'])) $language_directories[] = $settings['base_theme_dir'] . '/languages'; $language_directories = array_unique($language_directories); foreach ($language_directories as $language_dir) { // Can't look in here... doesn't exist! if (!file_exists($language_dir)) continue; $dir = dir($language_dir); while ($entry = $dir->read()) { // Look for the index language file.... if (preg_match('~^index\.(.+)\.php$~', $entry, $matches) == 0) continue; $context['languages'][] = array( 'name' => $func['ucwords'](strtr($matches[1], array('_' => ' ', '-utf8' => ''))), 'selected' => $selectedLanguage == $matches[1], 'filename' => $matches[1], ); } $dir->close(); } } // Generate a visual verification code to make sure the user is no bot. $context['visual_verification'] = empty($modSettings['disable_visual_verification']) || $modSettings['disable_visual_verification'] != 1; if ($context['visual_verification']) { $context['use_graphic_library'] = in_array('gd', get_loaded_extensions()); $context['verificiation_image_href'] = $scripturl . '?action=verificationcode;rand=' . md5(rand()); // Only generate a new code if one hasn't been set yet if (!isset($_SESSION['visual_verification_code'])) { // Skip I, J, L, O and Q. $character_range = array_merge(range('A', 'H'), array('K', 'M', 'N', 'P'), range('R', 'Z')); // Generate a new code. $_SESSION['visual_verification_code'] = ''; for ($i = 0; $i < 5; $i++) $_SESSION['visual_verification_code'] .= $character_range[array_rand($character_range)]; } } } // Actually register the member. function Register2() { global $scripturl, $txt, $modSettings, $db_prefix, $context, $sourcedir; global $user_info, $options, $settings, $func; // Well, if you don't agree, you can't register. if (!empty($modSettings['requireAgreement']) && (empty($_POST['regagree']) || $_POST['regagree'] == 'no')) redirectexit(); // Make sure they came from *somewhere*, have a session. if (!isset($_SESSION['old_url'])) redirectexit('action=register'); // You can't register if it's disabled. if (!empty($modSettings['registration_method']) && $modSettings['registration_method'] == 3) fatal_lang_error('registration_disabled', false); foreach ($_POST as $key => $value) { if (!is_array($_POST[$key])) $_POST[$key] = htmltrim__recursive(str_replace(array("\n", "\r"), '', $_POST[$key])); } // Are they under age, and under age users are banned? if (!empty($modSettings['coppaAge']) && empty($modSettings['coppaType']) && !isset($_POST['skip_coppa'])) { // !!! This should be put in Errors, imho. loadLanguage('Login'); fatal_lang_error('under_age_registration_prohibited', false, array($modSettings['coppaAge'])); } // Check whether the visual verification code was entered correctly. if ((empty($modSettings['disable_visual_verification']) || $modSettings['disable_visual_verification'] != 1) && (empty($_REQUEST['visual_verification_code']) || strtoupper($_REQUEST['visual_verification_code']) !== $_SESSION['visual_verification_code'])) { $_SESSION['visual_errors'] = isset($_SESSION['visual_errors']) ? $_SESSION['visual_errors'] + 1 : 1; if ($_SESSION['visual_errors'] > 3 && isset($_SESSION['visual_verification_code'])) unset($_SESSION['visual_verification_code']); fatal_lang_error('visual_verification_failed', false); } elseif (isset($_SESSION['visual_errors'])) unset($_SESSION['visual_errors']); // Collect all extra registration fields someone might have filled in. $possible_strings = array( 'websiteUrl', 'websiteTitle', 'AIM', 'YIM', 'location', 'birthdate', 'timeFormat', 'buddy_list', 'pm_ignore_list', 'smileySet', 'signature', 'personalText', 'avatar', 'lngfile', 'secretQuestion', 'secretAnswer', ); $possible_ints = array( 'pm_email_notify', 'notifyTypes', 'ICQ', 'gender', 'ID_THEME', ); $possible_floats = array( 'timeOffset', ); $possible_bools = array( 'notifyAnnouncements', 'notifyOnce', 'notifySendBody', 'hideEmail', 'showOnline', ); if (isset($_POST['secretAnswer']) && $_POST['secretAnswer'] != '') $_POST['secretAnswer'] = md5($_POST['secretAnswer']); // Needed for isReservedName() and registerMember(). require_once($sourcedir . '/Subs-Members.php'); // Validation... even if we're not a mall. if (isset($_POST['realName']) && (!empty($modSettings['allow_editDisplayName']) || allowedTo('moderate_forum'))) { $_POST['realName'] = trim(preg_replace('~[\s]~' . ($context['utf8'] ? 'u' : ''), ' ', $_POST['realName'])); if (trim($_POST['realName']) != '' && !isReservedName($_POST['realName'], $memID) && $func['strlen']($_POST['realName']) <= 60) $possible_strings[] = 'realName'; } if (isset($_POST['MSN']) && preg_match('~^[0-9A-Za-z=_+\-/][0-9A-Za-z=_\'+\-/\.]*@[\w\-]+(\.[\w\-]+)*(\.[\w]{2,6})$~', $_POST['MSN']) != 0) $profile_strings[] = 'MSN'; // Handle a string as a birthdate... if (isset($_POST['birthdate']) && $_POST['birthdate'] != '') $_POST['birthdate'] = strftime('%Y-%m-%d', strtotime($_POST['birthdate'])); // Or birthdate parts... elseif (!empty($_POST['bday1']) && !empty($_POST['bday2'])) $_POST['birthdate'] = sprintf('%04d-%02d-%02d', empty($_POST['bday3']) ? 0 : (int) $_POST['bday3'], (int) $_POST['bday1'], (int) $_POST['bday2']); // Validate the passed langauge file. if (isset($_POST['lngfile']) && !empty($modSettings['userLanguage'])) { $language_directories = array( $settings['default_theme_dir'] . '/languages', $settings['actual_theme_dir'] . '/languages', ); if (!empty($settings['base_theme_dir'])) $language_directories[] = $settings['base_theme_dir'] . '/languages'; $language_directories = array_unique($language_directories); foreach ($language_directories as $language_dir) { if (!file_exists($language_dir)) continue; $dir = dir($language_dir); while ($entry = $dir->read()) if (preg_match('~^index\.(.+)\.php$~', $entry, $matches) && $matches[1] == $_POST['lngfile']) { // Got it! $found = true; $_SESSION['language'] = $_POST['lngfile']; break 2; } $dir->close(); } if (empty($found)) unset($_POST['lngfile']); } else unset($_POST['lngfile']); // Set the options needed for registration. $regOptions = array( 'interface' => 'guest', 'username' => $_POST['user'], 'email' => $_POST['email'], 'password' => $_POST['passwrd1'], 'password_check' => $_POST['passwrd2'], 'check_reserved_name' => true, 'check_password_strength' => true, 'check_email_ban' => true, 'send_welcome_email' => !empty($modSettings['send_welcomeEmail']), 'require' => !empty($modSettings['coppaAge']) && !isset($_POST['skip_coppa']) ? 'coppa' : (empty($modSettings['registration_method']) ? 'nothing' : ($modSettings['registration_method'] == 1 ? 'activation' : 'approval')), 'extra_register_vars' => array(), 'theme_vars' => array(), ); // Include the additional options that might have been filled in. foreach ($possible_strings as $var) if (isset($_POST[$var])) $regOptions['extra_register_vars'][$var] = '\'' . $func['htmlspecialchars']($_POST[$var]) . '\''; foreach ($possible_ints as $var) if (isset($_POST[$var])) $regOptions['extra_register_vars'][$var] = (int) $_POST[$var]; foreach ($possible_floats as $var) if (isset($_POST[$var])) $regOptions['extra_register_vars'][$var] = (float) $_POST[$var]; foreach ($possible_bools as $var) if (isset($_POST[$var])) $regOptions['extra_register_vars'][$var] = empty($_POST[$var]) ? 0 : 1; // Registration options are always default options... if (isset($_POST['default_options'])) $_POST['options'] = isset($_POST['options']) ? $_POST['options'] + $_POST['default_options'] : $_POST['default_options']; $regOptions['theme_vars'] = isset($_POST['options']) && is_array($_POST['options']) ? $_POST['options'] : array(); $memberID = registerMember($regOptions); // If COPPA has been selected then things get complicated, setup the template. if (!empty($modSettings['coppaAge']) && !isset($_POST['skip_coppa'])) redirectexit('action=coppa;member=' . $memberID); // Basic template variable setup. elseif (!empty($modSettings['registration_method'])) { loadTemplate('Register'); $context += array( 'page_title' => &$txt[97], 'sub_template' => 'after', 'description' => $modSettings['registration_method'] == 2 ? $txt['approval_after_registration'] : $txt['activate_after_registration'] ); } else { setLoginCookie(60 * $modSettings['cookieTime'], $memberID, sha1(sha1(strtolower($regOptions['username']) . $regOptions['password']) . substr($regOptions['register_vars']['passwordSalt'], 1, -1))); redirectexit('action=login2;sa=check;member=' . $memberID, $context['server']['needs_login_fix']); } } function Activate() { global $db_prefix, $context, $txt, $modSettings, $scripturl, $sourcedir; loadLanguage('Login'); loadTemplate('Login'); if (empty($_REQUEST['u']) && empty($_POST['user'])) { if (empty($modSettings['registration_method']) || $modSettings['registration_method'] == 3) fatal_lang_error(1); $context['member_id'] = 0; $context['sub_template'] = 'resend'; $context['page_title'] = $txt['invalid_activation_resend']; $context['can_activate'] = empty($modSettings['registration_method']) || $modSettings['registration_method'] == 1; $context['default_username'] = isset($_GET['user']) ? $_GET['user'] : ''; return; } // Get the code from the database... $request = db_query(" SELECT ID_MEMBER, validation_code, memberName, realName, emailAddress, is_activated, passwd FROM {$db_prefix}members" . (empty($_REQUEST['u']) ? " WHERE memberName = '$_POST[user]' OR emailAddress = '$_POST[user]'" : " WHERE ID_MEMBER = " . (int) $_REQUEST['u']) . " LIMIT 1", __FILE__, __LINE__); // Does this user exist at all? if (mysql_num_rows($request) == 0) { $context['sub_template'] = 'retry_activate'; $context['page_title'] = $txt['invalid_userid']; $context['member_id'] = 0; return; } $row = mysql_fetch_assoc($request); mysql_free_result($request); // Change their email address? (they probably tried a fake one first .) if (isset($_POST['new_email'], $_REQUEST['passwd']) && sha1(strtolower($row['memberName']) . $_REQUEST['passwd']) == $row['passwd']) { if (empty($modSettings['registration_method']) || $modSettings['registration_method'] == 3) fatal_lang_error(1); // !!! Separate the sprintf? if (preg_match('~^[0-9A-Za-z=_+\-/][0-9A-Za-z=_\'+\-/\.]*@[\w\-]+(\.[\w\-]+)*(\.[\w]{2,6})$~', stripslashes($_POST['new_email'])) == 0) fatal_error(sprintf($txt[500], htmlspecialchars($_POST['new_email'])), false); // Make sure their email isn't banned. isBannedEmail($_POST['new_email'], 'cannot_register', $txt['ban_register_prohibited']); // Ummm... don't even dare try to take someone else's email!! $request = db_query(" SELECT ID_MEMBER FROM {$db_prefix}members WHERE emailAddress = '$_POST[new_email]' LIMIT 1", __FILE__, __LINE__); // !!! Separate the sprintf? if (mysql_num_rows($request) != 0) fatal_error(sprintf($txt[730], htmlspecialchars($_POST['new_email'])), false); mysql_free_result($request); updateMemberData($row['ID_MEMBER'], array('emailAddress' => "'$_POST[new_email]'")); $row['emailAddress'] = stripslashes($_POST['new_email']); $email_change = true; } // Resend the password, but only if the account wasn't activated yet. if (!empty($_REQUEST['sa']) && $_REQUEST['sa'] == 'resend' && ($row['is_activated'] == 0 || $row['is_activated'] == 2) && (!isset($_REQUEST['code']) || $_REQUEST['code'] == '')) { require_once($sourcedir . '/Subs-Post.php'); sendmail($row['emailAddress'], $txt['register_subject'], sprintf($txt[empty($modSettings['registration_method']) || $modSettings['registration_method'] == 1 ? 'resend_activate_message' : 'resend_pending_message'], $row['realName'], $row['memberName'], $row['validation_code'], $scripturl . '?action=activate;u=' . $row['ID_MEMBER'] . ';code=' . $row['validation_code'])); $context['page_title'] = $txt['invalid_activation_resend']; fatal_error(!empty($email_change) ? $txt['change_email_success'] : $txt['resend_email_success'], false); } // Quit if this code is not right. if (empty($_REQUEST['code']) || $row['validation_code'] != $_REQUEST['code']) { if (!empty($row['is_activated'])) fatal_lang_error('already_activated', false); elseif ($row['validation_code'] == '') { loadLanguage('Profile'); fatal_error($txt['registration_not_approved'] . ' <a href="' . $scripturl . '?action=activate;user=' . $row['memberName'] . '">' . $txt[662] . '</a>.', false); } $context['sub_template'] = 'retry_activate'; $context['page_title'] = $txt['invalid_activation_code']; $context['member_id'] = $row['ID_MEMBER']; return; } // Let the integration know that they've been activated! if (isset($modSettings['integrate_activate']) && function_exists($modSettings['integrate_activate'])) call_user_func($modSettings['integrate_activate'], $row['memberName']); // Validation complete - update the database! updateMemberData($row['ID_MEMBER'], array('is_activated' => 1, 'validation_code' => '\'\'')); // Also do a proper member stat re-evaluation. updateStats('member', false); if (!isset($_POST['new_email'])) { require_once($sourcedir . '/Subs-Post.php'); adminNotify('activation', $row['ID_MEMBER'], $row['memberName']); } $context += array( 'page_title' => &$txt[245], 'sub_template' => 'login', 'default_username' => $row['memberName'], 'default_password' => '', 'never_expire' => false, 'description' => &$txt['activate_success'] ); } // This function will display the contact information for the forum, as well a form to fill in. function CoppaForm() { global $context, $modSettings, $txt, $db_prefix; loadLanguage('Login'); loadTemplate('Register'); // No User ID?? if (!isset($_GET['member'])) fatal_lang_error(1); // Get the user details... $request = db_query(" SELECT memberName FROM {$db_prefix}members WHERE ID_MEMBER = " . (int) $_GET['member'] . " AND is_activated = 5", __FILE__, __LINE__); if (mysql_num_rows($request) == 0) fatal_lang_error(1); list ($username) = mysql_fetch_row($request); mysql_free_result($request); if (isset($_GET['form'])) { // Some simple contact stuff for the forum. $context['forum_contacts'] = (!empty($modSettings['coppaPost']) ? $modSettings['coppaPost'] . '<br /><br />' : '') . (!empty($modSettings['coppaFax']) ? $modSettings['coppaFax'] . '<br />' : ''); $context['forum_contacts'] = !empty($context['forum_contacts']) ? $context['forum_name'] . '<br />' . $context['forum_contacts'] : ''; // Showing template? if (!isset($_GET['dl'])) { // Shortcut for producing underlines. $context['ul'] = '<u> </u>'; $context['template_layers'] = array(); $context['sub_template'] = 'coppa_form'; $context['page_title'] = $txt['coppa_form_title']; $context['coppa_body'] = str_replace(array('{PARENT_NAME}', '{CHILD_NAME}', '{USER_NAME}'), array($context['ul'], $context['ul'], $username), $txt['coppa_form_body']); } // Downloading. else { // The data. $ul = ' '; $crlf = "\r\n"; $data = $context['forum_contacts'] . "$crlf" . $txt['coppa_form_address'] . ":$crlf" . $txt['coppa_form_date'] . ":$crlf$crlf$crlf" . $txt['coppa_form_body']; $data = str_replace(array('{PARENT_NAME}', '{CHILD_NAME}', '{USER_NAME}', '<br>', '<br />'), array($ul, $ul, $username, $crlf, $crlf), $data); // Send the headers. header('Connection: close'); header('Content-Disposition: attachment; filename="approval.txt"'); header('Content-Type: application/octet-stream'); header('Content-Length: ' . count($data)); echo $data; obExit(false); } } else { $context += array( 'page_title' => &$txt['coppa_title'], 'sub_template' => 'coppa', ); $context['coppa'] = array( 'body' => str_replace('{MINIMUM_AGE}', $modSettings['coppaAge'], $txt['coppa_after_registration']), 'many_options' => !empty($modSettings['coppaPost']) && !empty($modSettings['coppaFax']), 'post' => empty($modSettings['coppaPost']) ? '' : $modSettings['coppaPost'], 'fax' => empty($modSettings['coppaFax']) ? '' : $modSettings['coppaFax'], 'phone' => empty($modSettings['coppaPhone']) ? '' : str_replace('{PHONE_NUMBER}', $modSettings['coppaPhone'], $txt['coppa_send_by_phone']), 'id' => $_GET['member'], ); } } // Show the verification code or let it hear. function VerificationCode() { global $sourcedir, $modSettings, $context, $scripturl; // Somehow no code was generated or the session was lost. if (empty($_SESSION['visual_verification_code'])) header('HTTP/1.1 408 - Request Timeout'); // Show a window that will play the verification code. elseif (isset($_REQUEST['sound'])) { loadLanguage('Login'); loadTemplate('Register'); $context['verificiation_sound_href'] = $scripturl . '?action=verificationcode;rand=' . md5(rand()) . ';format=.wav'; $context['sub_template'] = 'verification_sound'; $context['template_layers'] = array(); obExit(); } // If we have GD, try the nice code. elseif (empty($_REQUEST['format'])) { require_once($sourcedir . '/Subs-Graphics.php'); if (in_array('gd', get_loaded_extensions()) && !showCodeImage($_SESSION['visual_verification_code'])) header('HTTP/1.1 400 Bad Request'); // Otherwise just show a pre-defined letter. elseif (isset($_REQUEST['letter'])) { $_REQUEST['letter'] = (int) $_REQUEST['letter']; if ($_REQUEST['letter'] > 0 && $_REQUEST['letter'] <= strlen($_SESSION['visual_verification_code']) && !showLetterImage(strtolower($_SESSION['visual_verification_code']{$_REQUEST['letter'] - 1}))) header('HTTP/1.1 400 Bad Request'); } // You must be up to no good. else header('HTTP/1.1 400 Bad Request'); } elseif ($_REQUEST['format'] === '.wav') { require_once($sourcedir . '/Subs-Sound.php'); if (!createWaveFile($_SESSION['visual_verification_code'])) header('HTTP/1.1 400 Bad Request'); } // We all die one day... die(); } ?> If somebody could do that simple task for me that would be great! If you want I'll give you $3 via paypal Thanks!
  6. I just need a small script I need it to detect: IP OS Browser Previously viewed web page URL I would like it to say: Your IP is: <insert IP here> Your Operating System is: <insert OS here> You are using: <insert browser here> You came here from: <insert URL here> If that's possible that would be great! Thanks
  7. here is the code <?php /********************************************************************************** * index.php * *********************************************************************************** * SMF: Simple Machines Forum * * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * * =============================================================================== * * Software Version: SMF 1.1.4 * * Software by: Simple Machines (http://www.simplemachines.org) * * Copyright 2006-2007 by: Simple Machines LLC (http://www.simplemachines.org) * * 2001-2006 by: Lewis Media (http://www.lewismedia.com) * * Support, News, Updates at: http://www.simplemachines.org * *********************************************************************************** * This program is free software; you may redistribute it and/or modify it under * * the terms of the provided license as published by Simple Machines LLC. * * * * This program is distributed in the hope that it is and will be useful, but * * WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY * * or FITNESS FOR A PARTICULAR PURPOSE. * * * * See the "license.txt" file for details of the Simple Machines license. * * The latest version can always be found at http://www.simplemachines.org. * **********************************************************************************/ /* This, as you have probably guessed, is the crux on which SMF functions. Everything should start here, so all the setup and security is done properly. The most interesting part of this file is the action array in the smf_main() function. It is formatted as so: 'action-in-url' => array('Source-File.php', 'FunctionToCall'), Then, you can access the FunctionToCall() function from Source-File.php with the URL index.php?action=action-in-url. Relatively simple, no? */ $forum_version = 'SMF 1.1.4'; // Get everything started up... define('SMF', 1); @set_magic_quotes_runtime(0); error_reporting(E_ALL); $time_start = microtime(); // Load the settings... require_once(dirname(__FILE__) . '/Settings.php'); // And important includes. require_once($sourcedir . '/QueryString.php'); require_once($sourcedir . '/Subs.php'); require_once($sourcedir . '/Errors.php'); require_once($sourcedir . '/Load.php'); require_once($sourcedir . '/Security.php'); // Using an old version of PHP? if (@version_compare(PHP_VERSION, '4.2.3') != 1) require_once($sourcedir . '/Subs-Compat.php'); // If $maintenance is set specifically to 2, then we're upgrading or something. if (!empty($maintenance) && $maintenance == 2) db_fatal_error(); // Connect to the MySQL database. if (empty($db_persist)) $db_connection = @mysql_connect($db_server, $db_user, $db_passwd); else $db_connection = @mysql_pconnect($db_server, $db_user, $db_passwd); // Show an error if the connection couldn't be made. if (!$db_connection || !@mysql_select_db($db_name, $db_connection)) db_fatal_error(); // Load the settings from the settings table, and perform operations like optimizing. reloadSettings(); // Clean the request variables, add slashes, etc. cleanRequest(); $context = array(); // Determine if this is using WAP, WAP2, or imode. Technically, we should check that wap comes before application/xhtml or text/html, but this doesn't work in practice as much as it should. if (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/vnd.wap.xhtml+xml') !== false) $_REQUEST['wap2'] = 1; elseif (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'text/vnd.wap.wml') !== false) { if (strpos($_SERVER['HTTP_USER_AGENT'], 'DoCoMo/') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'portalmmm/') !== false) $_REQUEST['imode'] = 1; else $_REQUEST['wap'] = 1; } if (!defined('WIRELESS')) define('WIRELESS', isset($_REQUEST['wap']) || isset($_REQUEST['wap2']) || isset($_REQUEST['imode'])); // Some settings and headers are different for wireless protocols. if (WIRELESS) { define('WIRELESS_PROTOCOL', isset($_REQUEST['wap']) ? 'wap' : (isset($_REQUEST['wap2']) ? 'wap2' : (isset($_REQUEST['imode']) ? 'imode' : ''))); // Some cellphones can't handle output compression... $modSettings['enableCompressedOutput'] = '0'; // !!! Do we want these hard coded? $modSettings['defaultMaxMessages'] = 5; $modSettings['defaultMaxTopics'] = 9; // Wireless protocol header. if (WIRELESS_PROTOCOL == 'wap') header('Content-Type: text/vnd.wap.wml'); } // Check if compressed output is enabled, supported, and not already being done. if (!empty($modSettings['enableCompressedOutput']) && !headers_sent() && ob_get_length() == 0) { // If zlib is being used, turn off output compression. if (@ini_get('zlib.output_compression') == '1' || @ini_get('output_handler') == 'ob_gzhandler' || @version_compare(PHP_VERSION, '4.2.0') == -1) $modSettings['enableCompressedOutput'] = '0'; else ob_start('ob_gzhandler'); } // This makes it so headers can be sent! if (empty($modSettings['enableCompressedOutput'])) ob_start(); // Register an error handler. set_error_handler('error_handler'); // Start the session. (assuming it hasn't already been.) loadSession(); // What function shall we execute? (done like this for memory's sake.) call_user_func(smf_main()); // Call obExit specially; we're coming from the main area . obExit(null, null, true); // The main controlling function. function smf_main() { global $modSettings, $settings, $user_info, $board, $topic, $maintenance, $sourcedir; // Special case: session keep-alive. if (isset($_GET['action']) && $_GET['action'] == 'keepalive') die; // Load the user's cookie (or set as guest) and load their settings. loadUserSettings(); // Load the current board's information. loadBoard(); // Load the current theme. (note that ?theme=1 will also work, may be used for guest theming.) loadTheme(); // Check if the user should be disallowed access. is_not_banned(); // Load the current user's permissions. loadPermissions(); // Do some logging, unless this is an attachment, avatar, theme option or XML feed. if (empty($_REQUEST['action']) || !in_array($_REQUEST['action'], array('dlattach', 'jsoption', '.xml'))) { // Log this user as online. writeLog(); // Track forum statistics and hits...? if (!empty($modSettings['hitStats'])) trackStats(array('hits' => '+')); } // Is the forum in maintenance mode? (doesn't apply to administrators.) if (!empty($maintenance) && !allowedTo('admin_forum')) { // You can only login.... otherwise, you're getting the "maintenance mode" display. if (isset($_REQUEST['action']) && ($_REQUEST['action'] == 'login2' || $_REQUEST['action'] == 'logout')) { require_once($sourcedir . '/LogInOut.php'); return $_REQUEST['action'] == 'login2' ? 'Login2' : 'Logout'; } // Don't even try it, sonny. else { require_once($sourcedir . '/Subs-Auth.php'); return 'InMaintenance'; } } // If guest access is off, a guest can only do one of the very few following actions. elseif (empty($modSettings['allow_guestAccess']) && $user_info['is_guest'] && (!isset($_REQUEST['action']) || !in_array($_REQUEST['action'], array('login', 'login2', 'register', 'register2', 'reminder', 'activate', 'smstats', 'help', '.xml', 'verificationcode')))) { require_once($sourcedir . '/Subs-Auth.php'); return 'KickGuest'; } elseif (empty($_REQUEST['action'])) { // Action and board are both empty... BoardIndex! if (empty($board) && empty($topic)) { require_once($sourcedir . '/BoardIndex.php'); return 'BoardIndex'; } // Topic is empty, and action is empty.... MessageIndex! elseif (empty($topic)) { require_once($sourcedir . '/MessageIndex.php'); return 'MessageIndex'; } // Board is not empty... topic is not empty... action is empty.. Display! else { require_once($sourcedir . '/Display.php'); return 'Display'; } } // Here's the monstrous $_REQUEST['action'] array - $_REQUEST['action'] => array($file, $function). $actionArray = array( 'activate' => array('Register.php', 'Activate'), 'admin' => array('Admin.php', 'Admin'), 'announce' => array('Post.php', 'AnnounceTopic'), 'ban' => array('ManageBans.php', 'Ban'), 'boardrecount' => array('Admin.php', 'AdminBoardRecount'), 'buddy' => array('Subs-Members.php', 'BuddyListToggle'), 'calendar' => array('Calendar.php', 'CalendarMain'), 'cleanperms' => array('Admin.php', 'CleanupPermissions'), 'collapse' => array('Subs-Boards.php', 'CollapseCategory'), 'convertentities' => array('Admin.php', 'ConvertEntities'), 'convertutf8' => array('Admin.php', 'ConvertUtf8'), 'coppa' => array('Register.php', 'CoppaForm'), 'deletemsg' => array('RemoveTopic.php', 'DeleteMessage'), 'detailedversion' => array('Admin.php', 'VersionDetail'), 'display' => array('Display.php', 'Display'), 'dlattach' => array('Display.php', 'Download'), 'dumpdb' => array('DumpDatabase.php', 'DumpDatabase2'), 'editpoll' => array('Poll.php', 'EditPoll'), 'editpoll2' => array('Poll.php', 'EditPoll2'), 'featuresettings' => array('ModSettings.php', 'ModifyFeatureSettings'), 'featuresettings2' => array('ModSettings.php', 'ModifyFeatureSettings2'), 'findmember' => array('Subs-Auth.php', 'JSMembers'), 'help' => array('Help.php', 'ShowHelp'), 'helpadmin' => array('Help.php', 'ShowAdminHelp'), 'im' => array('PersonalMessage.php', 'MessageMain'), 'jsoption' => array('Themes.php', 'SetJavaScript'), 'jsmodify' => array('Post.php', 'JavaScriptModify'), 'lock' => array('LockTopic.php', 'LockTopic'), 'lockVoting' => array('Poll.php', 'LockVoting'), 'login' => array('LogInOut.php', 'Login'), 'login2' => array('LogInOut.php', 'Login2'), 'logout' => array('LogInOut.php', 'Logout'), 'maintain' => array('Admin.php', 'Maintenance'), 'manageattachments' => array('ManageAttachments.php', 'ManageAttachments'), 'manageboards' => array('ManageBoards.php', 'ManageBoards'), 'managecalendar' => array('ManageCalendar.php', 'ManageCalendar'), 'managesearch' => array('ManageSearch.php', 'ManageSearch'), 'markasread' => array('Subs-Boards.php', 'MarkRead'), 'membergroups' => array('ManageMembergroups.php', 'ModifyMembergroups'), 'mergetopics' => array('SplitTopics.php', 'MergeTopics'), 'mlist' => array('Memberlist.php', 'Memberlist'), 'modifycat' => array('ManageBoards.php', 'ModifyCat'), 'modifykarma' => array('Karma.php', 'ModifyKarma'), 'modlog' => array('Modlog.php', 'ViewModlog'), 'movetopic' => array('MoveTopic.php', 'MoveTopic'), 'movetopic2' => array('MoveTopic.php', 'MoveTopic2'), 'news' => array('ManageNews.php', 'ManageNews'), 'notify' => array('Notify.php', 'Notify'), 'notifyboard' => array('Notify.php', 'BoardNotify'), 'optimizetables' => array('Admin.php', 'OptimizeTables'), 'packageget' => array('PackageGet.php', 'PackageGet'), 'packages' => array('Packages.php', 'Packages'), 'permissions' => array('ManagePermissions.php', 'ModifyPermissions'), 'pgdownload' => array('PackageGet.php', 'PackageGet'), 'pm' => array('PersonalMessage.php', 'MessageMain'), 'post' => array('Post.php', 'Post'), 'post2' => array('Post.php', 'Post2'), 'postsettings' => array('ManagePosts.php', 'ManagePostSettings'), 'printpage' => array('Printpage.php', 'PrintTopic'), 'profile' => array('Profile.php', 'ModifyProfile'), 'profile2' => array('Profile.php', 'ModifyProfile2'), 'quotefast' => array('Post.php', 'QuoteFast'), 'quickmod' => array('Subs-Boards.php', 'QuickModeration'), 'quickmod2' => array('Subs-Boards.php', 'QuickModeration2'), 'recent' => array('Recent.php', 'RecentPosts'), 'regcenter' => array('ManageRegistration.php', 'RegCenter'), 'register' => array('Register.php', 'Register'), 'register2' => array('Register.php', 'Register2'), 'reminder' => array('Reminder.php', 'RemindMe'), 'removetopic2' => array('RemoveTopic.php', 'RemoveTopic2'), 'removeoldtopics2' => array('RemoveTopic.php', 'RemoveOldTopics2'), 'removepoll' => array('Poll.php', 'RemovePoll'), 'repairboards' => array('RepairBoards.php', 'RepairBoards'), 'reporttm' => array('SendTopic.php', 'ReportToModerator'), 'reports' => array('Reports.php', 'ReportsMain'), 'requestmembers' => array('Subs-Auth.php', 'RequestMembers'), 'search' => array('Search.php', 'PlushSearch1'), 'search2' => array('Search.php', 'PlushSearch2'), 'sendtopic' => array('SendTopic.php', 'SendTopic'), 'serversettings' => array('ManageServer.php', 'ModifySettings'), 'serversettings2' => array('ManageServer.php', 'ModifySettings2'), 'smileys' => array('ManageSmileys.php', 'ManageSmileys'), 'smstats' => array('Stats.php', 'SMStats'), 'spellcheck' => array('Subs-Post.php', 'SpellCheck'), 'splittopics' => array('SplitTopics.php', 'SplitTopics'), 'stats' => array('Stats.php', 'DisplayStats'), 'sticky' => array('LockTopic.php', 'Sticky'), 'theme' => array('Themes.php', 'ThemesMain'), 'trackip' => array('Profile.php', 'trackIP'), 'about:mozilla' => array('Karma.php', 'BookOfUnknown'), 'about:unknown' => array('Karma.php', 'BookOfUnknown'), 'unread' => array('Recent.php', 'UnreadTopics'), 'unreadreplies' => array('Recent.php', 'UnreadTopics'), 'viewErrorLog' => array('ManageErrors.php', 'ViewErrorLog'), 'viewmembers' => array('ManageMembers.php', 'ViewMembers'), 'viewprofile' => array('Profile.php', 'ModifyProfile'), 'verificationcode' => array('Register.php', 'VerificationCode'), 'vote' => array('Poll.php', 'Vote'), 'viewquery' => array('ViewQuery.php', 'ViewQuery'), 'who' => array('Who.php', 'Who'), '.xml' => array('News.php', 'ShowXmlFeed'), ); // Get the function and file to include - if it's not there, do the board index. if (!isset($_REQUEST['action']) || !isset($actionArray[$_REQUEST['action']])) { // Catch the action with the theme? if (!empty($settings['catch_action'])) { require_once($sourcedir . '/Themes.php'); return 'WrapAction'; } // Fall through to the board index then... require_once($sourcedir . '/BoardIndex.php'); return 'BoardIndex'; } // Otherwise, it was set - so let's go to that action. require_once($sourcedir . '/' . $actionArray[$_REQUEST['action']][0]); return $actionArray[$_REQUEST['action']][1]; } ?> I want the ad in between the forum part and the top part that says Home, Help, Search, Profile, Logout
  8. how do I put ads on my SMF forum. Thanks!
  9. no offense but it's pretty ugly. I'd recommend getting someone else to do graphic for you.
  10. I don't know about any others, If there are other good ones please tell me, I want to know
  11. it lacks color... JK! I think it looks pretty good
  12. I think it's well done! But it should be easier to navigate. I suggest you make a really good looking nav bar. then it would look great!
  13. dJtl

    Different kinds

    at my school there is Linux on almost all the computers and they are Fedora. Are there multiple versions of Linux and if there are which is better?
  14. dJtl

    hobby?

    I'm just wondering.
  15. dJtl

    2 quick questions

    1) ya know how macs get less viruses than PCs? Well does Linux have lots of viruses like PCs or less like macs or in between? 2) can you have windows xp and linux on the same computer? thanks
  16. sorry for double post I have a new problem. What do I do? [attachment deleted by admin]
  17. can I get wampserver on a mac? I got it on my PC but I want to also get it on my mac and I don't want to install PHP and apache and MySQL. -Thanks
  18. I forget what it was lol... It was the WAMP server default value. I think that was it
  19. This shows up. What do I do? [attachment deleted by admin]
  20. Which one should I use? Right now I'm using dreamweaver because I can only make a .txt file w/ Notepad. Any suggestions?
  21. I think everything on the sides need to be redone.
  22. personally I don't like the template. I my opinion it even though it is a good look, it looks un-professional for the service you provide. I would suggest a different design look at some big-time host and use there type of templates.
  23. dJtl

    Proxy

    How an I make a proxy thing like in this site http://www.gang2.info? Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.