Группа: Members
Сообщений: 92
Пользователь №: 1303
Регистрация: 24-December 07
QUOTE (Asid Storm @ Jan 10 2008, 07:17 AM)
Из школы приду... п оверю скрипт)
привет !!! Проверил скрипт ??? А то я уже в нем разочеровался !!! или подскажите где взять похожий только на 1000% рабочий не хочеться просто опять в пустую время тратить !!!
Группа: Super moderator
Сообщений: 895
Пользователь №: 39
Регистрация: 27-August 06
Вот... Меняй install.php
CODE
<?php function do_intro() { global $config; if ('4.2.0' <= phpversion()) { $phpver = '<img src="images/pass.gif" style="border:0;" />'; $passedphpver = true; } else { $phpver = '<img src="images/fail.gif" style="border:0;" />'; $passedphpver = false; } if (get_cfg_var('safe_mode') == 1) { $mode = 'Enabled'; $safeen = '<img src="images/fail.gif" style="border:0;" />'; $safe = false; } else { $mode = 'Disabled'; $safeen = '<img src="images/pass.gif" style="border:0;" />'; $safe = true; } if ((!$safe OR !$passedphpver)) { $msg = '<b><font color=\'Red\'>Your Server does NOT meet the requirments needed for ' . $config['name'] . '. However, the script may still function correctly so you may proceed with the installation.</font><br /><br />'; } else { $msg = '<b><font color=\'Green\'>Your Server is able to run ' . $config['name'] . '.</font><br /><br />'; } echo ' <div class="border"> <div class="maintitle">' . $config['main_title'] . ' - Step 1</div> <div class="main_content">
Welcome to the ' . $config['name'] . ' Installation File! <br /> Before starting, please take a look at the documentation for help and installation instructions. <br /><br />
</div> </div> '; } function do_site_setup() { global $config; $license_key = $_POST['license']; if (!isset($_POST['4_done'])) { echo 'Installation Exiting. Please do not skip steps.'; exit(); } require '../mysql.php'; if (isset($_POST['submit'])) { $sitename = $_POST['sitename']; $siteurl = $_POST['siteurl']; $sitepath = $_POST['sitepath']; $admin_email = $_POST['adminemail']; $admin_pass = $_POST['adminpass']; $license = $_POST['license']; $username = $_POST['username']; $password = md5($_POST['password']); $date = date('jS F Y'); $ip = $_SERVER['REMOTE_ADDR']; if (((((((empty($sitename) OR empty($admin_email)) OR empty($admin_pass)) OR empty($username)) OR empty($password)) OR empty($siteurl)) OR empty($sitepath))) { echo '<script>alert("One or more fields were left empty, please try again.");</script>'; echo '<script>history.back(1);</script>'; exit(); } $SETS[] = '' . 'INSERT INTO settings VALUES (1, \'Site URL\', \'siteurl\', \'' . $siteurl . '\', \'General Configuration\', \'The url of your website. (http://www.yoursite.com)\', \'input\', \'\', \'\');'; $SETS[] = '' . 'INSERT INTO settings VALUES (2, \'Site Name\', \'sitename\', \'' . $sitename . '\', \'General Configuration\', \'The name of your website.\', \'input\', \'\', \'\');'; $SETS[] = '' . 'INSERT INTO settings VALUES (3, \'Site Path\', \'sitepath\', \'' . $sitepath . '\', \'General Configuration\', \'The path of your website. (/home/user/public_html)\', \'input\', \'\', \'\');'; $SETS[] = '' . 'INSERT INTO settings VALUES (4, \'Admin Email\', \'adminemail\', \'' . $admin_email . '\', \'Admin\', \'Your Email Address. For best performance, <b>do not</b> use a hotmail, yahoo or gmail address.\', \'input\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (5, \'Media Shown Per Page (Detailed View)\', \'files_per_page\', \'10\', \'Media\', \'Number of files to show per page.\', \'input\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (6, \'Max File Size\', \'max_file_size\', \'104857600\', \'Media\', \'The max file size for files (In Bytes | 104857600 bytes = 100 megabytes)\', \'input\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (7, \'Avatar Width\', \'avatar_w\', \'120\', \'Users\', \'The width that user avatars are resized to.\', \'input\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (8, \'Avatar Height\', \'avatar_h\', \'90\', \'Users\', \'The height that user avatars are resized to.\', \'input\', \'\', \'\');'; $SETS[] = '' . 'INSERT INTO settings VALUES (9, \'Admin Password\', \'admin_password\', \'' . $admin_pass . '\', \'Admin\', \'The password needed to access the admin area.\', \'input\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (10, \'Max Avatar Size\', \'max_avatar_size\', \'921600\', \'Users\', \'The max file size for avatars (In Bytes | 921600 byes = 900 kilobytes)\', \'input\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (11, \'New Registration Email Validation?\', \'uemail_valid\', \'1\', \'Users\', \'Do users need to validate their account by email before logging in? \', \'yes_no\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (12, \'Meta Description Tag\', \'meta_desc\', \'Social media site.\', \'General Configuration\', \'Your website description.\', \'textarea\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (13, \'Meta Keywords Tag\', \'meta_keywords\', \'media, website, coding forums, php media script\', \'General Configuration\', \'These keywords will help in search engines.\', \'textarea\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (14, \'Enable BBCode In Comments?\', \'en_bbcode\', \'1\', \'Media Comments\', \'\', \'yes_no\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (15, \'Allowed File Types (Extensions)\', \'allowed_exttypes\', \'gif,jpg,bmp,png,swf,wmv,mpg,mov,avi\', \'Media\', \'Allowed file extensions (Seperate by commas, no spaces)\', \'textarea\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (16, \'Turn MediaDump Offline?\', \'md_offline\', \'0\', \'Offline / Online\', \'\', \'yes_no\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (17, \'Can Guests Post Comments?\', \'allow_g_comments\', \'0\', \'Media Comments\', \'\', \'yes_no\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (18, \'Submitting Media Terms & Rules\', \'submit_terms\', \'No Terms or Rules.\', \'Media Upload\', \'The user must agree to these terms before being able to submit a file.\', \'textarea\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (19, \'The Offline Message To Display\', \'offline_msg\', \'Sorry, we are currently offline!\', \'Offline / Online\', \'\', \'textarea\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (20, \'Users Must Agree To Terms & Rules Before Submitting Media?\', \'show_submit_terms\', \'0\', \'Media Upload\', \'\', \'yes_no\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (21, \'Disable New Registrations?\', \'disable_signups\', \'0\', \'Users\', \'If set to yes, guests will be restricted from registering an account on your site.\', \'yes_no\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (22, \'Template\', \'temp_dir\', \'Default\', \'General Configuration\', \'Choose a site template / theme.\', \'dropdown\', \'\', \'#show_tempdirs#\');'; $SETS[] = 'INSERT INTO settings VALUES (23, \'Can Guests Submit Media?\', \'allow_g_submit\', \'0\', \'Media Upload\', \'\', \'yes_no\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (24, \'Validation Email Template\', \'user_validation_email\', \'Hello [username]<br /> Thank you for registering at [sitename]<br /><br /> Username: [username]<br /> Password: [password]<br /> Before you can use your account, please use the following link to confirm your registration!<br /> [validation_link]<br /><br /> Please do not lose this information as it cannot be retrieved.<br /><br /> Regards,<br /> <a href=\'\'[siteurl]\'\'>[sitename]</a>\', \'Users\', \'The validation email that will be sent to new users.\', \'textarea\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (25, \'Show Commercials For Guests Only?\', \'gcommercials_only\', \'0\', \'Media Commercials\', \'If set to yes, video commercials will only be played for guests, otherwise all users will see commercials.\', \'yes_no\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (26, \'Max. Number of storable private messages?\', \'max_stored_pms\', \'50\', \'Users\', \'\', \'input\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (27, \'Members Shown Per Page\', \'members_per_page\', \'20\', \'Users\', \'Number of members to show per page.\', \'input\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (28, \'Groups Shown Per Page\', \'groups_per_page\', \'10\', \'Groups\', \'Number of groups to show per page.\', \'input\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (29, \'User Submissions Require Validation?\', \'upload_validation\', \'1\', \'Media\', \'If set to yes, all files submitted by users must be validated by an admin before appearing on your site.\', \'yes_no\', \'\', \'\');'; $SETS[] = '' . 'INSERT INTO settings VALUES (30, \'License Key\', \'your_license_key\', \'' . $license . '\', \'License Details\', \'Your Social Media license key.\', \'input\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (31, \'Automatic Video Thumbnail Generation?\', \'auto_thumb_gen\', \'0\', \'Media - Additional\', \'If set to yes, thumbnails will automatically be generated from all uploaded videos. Ffmpeg is required!\', \'yes_no\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (32, \'Enable FFMPEG?\', \'enable_ffmpeg\', \'0\', \'Media - Additional\', \'This setting must be set to yes if you intend on using ffmpeg.\', \'yes_no\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (33, \'Convert Videos To Flv Format?\', \'flv_conversion\', \'0\', \'Media - Additional\', \'If set to yes, all uploaded videos will automatically be converted to the flv format. Ffmpeg is required!\', \'yes_no\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (34, \'Media Thumbnail Width\', \'mthumb_width\', \'120\', \'Media\', \'The width that media thumbnails are resized to.\', \'input\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (35, \'Media Thumbnail Height\', \'mthumb_height\', \'90\', \'Media\', \'The height that media thumbnails are resized to.\', \'input\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (36, \'Watermark Videos?\', \'wm_videos\', \'0\', \'Media - Additional\', \'If set to yes, all uploaded videos will automatically be watermarked with a chosen graphic. Ffmpeg is required!\', \'yes_no\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (37, \'Watermark Image\', \'wm_image\', \'images/wm.gif\', \'Media - Additional\', \'The path to the image used as the watermark on videos.\', \'input\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (38, \'Allow Custom HTML In Profile Fields?\', \'enable_profile_html\', \'1\', \'Users\', \'If set to yes, users will have the ability to use their own html and css on their profile.\', \'yes_no\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (39, \'Media Shown Per Page (Basic View)\', \'files_per_page_basic\', \'20\', \'Media\', \'Number of files to show per page.\', \'input\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (40, \'Commercial Position\', \'com_position\', \'start\', \'Media Commercials\', \'Set whether a set commercial will play at the beginning or the end of a video.\', \'dropdown\', \'\', \'start=Start Of Video end=End Of Video\');'; $SETS[] = 'INSERT INTO settings VALUES (41, \'Friend Request PM Template\', \'frequest_pm\', \'Hello,
You have a pending friend request sent by <a href="[siteurl]/profile/[sender]/">[sender]</a>.
You may manage this request by visiting <a href="[siteurl]/my_friends/pending/"><b>My Friends</b></a>
<b>[sitename]</b>\', \'Users\', \'The message that will be sent to users who have an awaiting friend request.\', \'textarea\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (42, \'FFMPEG Path\', \'ffmpeg_path\', \'/usr/local/bin/ffmpeg\', \'Media - Additional\', \'The path of the directory that ffmpeg is installed in.\', \'input\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (43, \'Flvtool2 Path\', \'flvtool2_path\', \'flvtool2\', \'Media - Additional\', \'The path of the directory that flvtool2 is installed in.\', \'input\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (44, \'Autoplay\', \'flv_player_ap\', \'1\', \'FLV Player\', \'If set to no, the user must press the start button in order to play the video.\', \'yes_no\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (45, \'Buffer Time\', \'flv_player_buffer\', \'10\', \'FLV Player\', \'The amount of seconds the video will buffer for before playing.\', \'input\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (46, \'Rotation Interval\', \'flv_player_interval\', \'10000\', \'FLV Player\', \'The amount of time between each set of videos in the rotation. (5000 = 5 Seconds)\', \'input\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (47, \'Rotation Groups\', \'flv_player_groups\', \'3\', \'FLV Player\', \'Total number of groups in the rotation (Two videos per group)\', \'input\', \'\', \'\');'; $SETS[] = '' . 'INSERT INTO settings VALUES (48, \'Watermark\', \'flv_player_watermark\', \'<a href=\'\'' . $siteurl . '\'\'>' . $sitename . '</a>\', \'FLV Player\', \'The watermark displayed in the bottom right corner of the flv player.\', \'input\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (49, \'Use Flash Uploader?\', \'flash_uploader\', \'1\', \'Media Upload\', \'If set to yes, a flash uploader will be used. Advantages: Progress bar, no timeout problems.\', \'yes_no\', \'\', \'\');'; $SETS[] = 'INSERT INTO settings VALUES (50, \'Scroll Speed\', \'playlist_speed\', \'10\', \'Playlist\', \'The speed of the video scroller.\', \'input\', \'\', \'\');'; foreach ($SETS as $i) { if (!(mysql_query($i))) { exit(mysql_error()); ; } } if (!($query = mysql_query('' . 'INSERT INTO users (id, username, password, email, show_email, ip, reg_date, avatar, validated, user_group) VALUES (\'\',\'' . $username . '\',\'' . $password . '\',\'' . $admin_email . '\',\'no\',\'' . $ip . '\',\'' . $date . '\',\'no_image.gif\',\'1\',\'1\')'))) { exit(mysql_error()); ; } $user_id = mysql_insert_id(); if (!($query = mysql_query('' . 'INSERT INTO users_profile (mid) VALUES (\'' . $user_id . '\')'))) { exit(mysql_error()); ; } if (!($query = mysql_query('' . 'INSERT INTO users_theme (id, user_id) VALUES (\'' . $user_id . '\',\'' . $user_id . '\')'))) { exit(mysql_error()); ; } echo ' <div class="border"> <div class="maintitle">' . $config['main_title'] . ' - Step 5</div> <div class="main_content"> <center><b><span style="color: #008000">' . $config['name'] . ' has successfully been installed!</span></b></center><br /> <center><a href="' . $siteurl . '">Main Site</a></center> </div> </div> '; return null; } $this_url = str_replace('/Install/install.php', '', $_SERVER['HTTP_REFERER']); $this_url = str_replace('/Install/', '', $this_url); $this_url = str_replace('/Install', '', $this_url); $this_url = str_replace('install.php', '', $this_url); $this_url = preg_replace('' . '#/$#', '', str_replace('?step=4', '', $this_url)); $this_path = str_replace('/Install/install.php', '', $_SERVER['SCRIPT_FILENAME']); $this_path = str_replace('/Install/', '', $this_path); $this_path = str_replace('/Install', '', $this_path); $this_path = str_replace('install.php', '', $this_path); echo ' <div class="border"> <div class="maintitle">' . $config['main_title'] . ' - Step 5</div> <div class="main_content">