Wormy
Crazy Member

    
ჯგუფი: Members
წერილები: 2731
წევრი No.: 19311
რეგისტრ.: 15-April 06
|
#18491293 · 15 Mar 2010, 00:50 · · პროფილი · პირადი მიმოწერა · ჩატი
ეს კოდი
| CODE | <?php /************************************************************************************************** აპლოად მპ3
|**************************************************************************************************/
session_start(); include("include/config.php"); include("include/functions/import.php"); $thebaseurl = $config['baseurl'];
$isvideouploadpage = "1"; STemplate::assign('isvideouploadpage',$isvideouploadpage);
$mainmenu = "5"; STemplate::assign('mainmenu',$mainmenu);
$submenu = "11"; STemplate::assign('submenu',$submenu);
if ($_SESSION[USERID] != "" && $_SESSION[USERID] >= 0 && is_numeric($_SESSION[USERID])) { if ($config['verify_upload'] != "0") { if ($_SESSION[VERIFIED] != "1") { $error = "$lang[835]"; } } if ($error == "") { header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header('Cache-Control: no-store, no-cache, must-revаlidate'); header('Cache-Control: post-check=0, pre-check=0', FALSE); header('Pragma: no-cache');
include "uu_conlib_audios.php"; $tmp_sid = md5(uniqid(mt_rand(), true)); $config_file = $default_config_file; $path_to_upload_script .= '?tmp_sid=' . $tmp_sid; $path_to_ini_status_script .= '?tmp_sid=' . $tmp_sid; STemplate::assign('tmp_sid', $tmp_sid); STemplate::assign('disallow_extensions', $disallow_extensions); STemplate::assign('allow_extensions', $allow_extensions); STemplate::assign('path_to_ini_status_script', $path_to_ini_status_script); STemplate::assign('check_file_name_format', $check_file_name_format); STemplate::assign('check_disallow_extensions', $check_disallow_extensions); STemplate::assign('check_allow_extensions', $check_allow_extensions); STemplate::assign('check_null_file_count', $check_null_file_count); STemplate::assign('check_duplicate_file_count', $check_duplicate_file_count); STemplate::assign('max_upload_slots', $max_upload_slots); STemplate::assign('progress_bar_width', $progress_bar_width); STemplate::assign('path_to_upload_script', $path_to_upload_script); STemplate::assign('multi_upload_slots', $multi_upload_slots); if(isset($_GET['rnd_id'])) { $temp_dir = $_REQUEST['temp_dir']; $_POST_DATA = getPostData($temp_dir, $_REQUEST['tmp_sid']); $upload_dir = $_POST_DATA['upload_dir']; $upload_file = $_POST_DATA['upfile_0']; $upload_file_path = $upload_dir . $upload_file; if(!is_file($upload_file_path) || filesize($upload_file_path) < 0) { $error = '$lang[836]'; } $upload_file_size = filesize($uploaded_file_path); if($error == "") { $pos = strrpos($upload_file,"."); $ph = strtolower(substr($upload_file,$pos+1,strlen($upload_file)-$pos)); $space = round($upload_file_size/(1024*1024)); if ($ph!="mp3") $error = "$lang[837]"; } elseif ($space>$config[max_audio_size]) { $error = "$lang[838]"; } if($error == "") {
$approve_audios = $config[approve_audios]; if($approve_audios == 1) { $active = "active='0'"; } else { $active = "active='1'"; }
$thetitle = htmlentities(strip_tags($_POST_DATA[title]),ENT_QUOTES,'UTF-8'); $thetags = htmlentities(strip_tags($_POST_DATA[tags]),ENT_QUOTES,'UTF-8'); $thedesc = htmlentities(strip_tags($_POST_DATA[vwdescription]),ENT_QUOTES,'UTF-8'); $thecat = htmlentities(strip_tags($_POST_DATA[category]),ENT_QUOTES,'UTF-8'); $thepublic = htmlentities(strip_tags($_POST_DATA['public']),ENT_QUOTES,'UTF-8'); $theallowcomments = htmlentities(strip_tags($_POST_DATA[allowcomments]),ENT_QUOTES,'UTF-8'); $theallowratings = htmlentities(strip_tags($_POST_DATA[allowratings]),ENT_QUOTES,'UTF-8'); $theallowembeds = htmlentities(strip_tags($_POST_DATA[allowembeds]),ENT_QUOTES,'UTF-8'); $theallowdownloads = htmlentities(strip_tags($_POST_DATA[allowdownloads]),ENT_QUOTES,'UTF-8'); $themature = htmlentities(strip_tags($_POST_DATA[mature]),ENT_QUOTES,'UTF-8');
$query = "INSERT INTO audios SET USERID='$_SESSION[USERID]', title='".mysql_real_escape_string($thetitle)."', description='".mysql_real_escape_string($thedesc)."', tags='".mysql_real_escape_string($thetags)."', categories='".mysql_real_escape_string($thecat)."', filesize='$space', public='".mysql_real_escape_string($thepublic)."', time_added='".time()."', date_added='".date("Y-m-d")."', $active, allowcomments='".mysql_real_escape_string($theallowcomments)."', allowratings='".mysql_real_escape_string($theallowratings)."', allowembeds='".mysql_real_escape_string($theallowembeds)."', allowdownloads='".mysql_real_escape_string($theallowdownloads)."', mature='".mysql_real_escape_string($themature)."'";
$conn->execute($query); $audioid = mysql_insert_id(); $original = $audioid.".".$ph; $audior = $config['audiodir'].'/'.$original; if(rename($upload_file_path,$audior)) { exec("mplayer -vo null -ao null -frames 0 -identify $audior", $difh); while (list($k,$v)=each($difh)) { if ($length = strstr($v,'ID_LENGTH=')) break; } $lx = explode("=",$length); $runtime = $lx[1]; } else { $error = '$lang[839]'; } }
if($error == "") { if (file_exists($audior)) { $athumb = $config['athumbdir']."/default.png"; copy($athumb, $config['athumbdir']."/".$audioid."-1.png"); $athumb = $config['athumbdir']."/default2.png"; copy($athumb, $config['athumbdir']."/".$audioid."-2.png"); } } if($error == "") {
$query = "UPDATE audios SET original_audio='$original', audio_name='".$audioid.".".$ph."', extension='.".$ph."', runtime='$runtime' WHERE AUDIOID='$audioid'"; $conn->execute($query); header("Location:$config[baseurl]/upload_audio_complete.php?audioid=$audioid"); } } $templateselect = "uploadaudio.tpl"; } else { $templateselect = "empty.tpl"; } } else { header("Location:$config[baseurl]/login.php");exit; }
STemplate::assign('pagetitle',"$lang[797]");
//TEMPLATES BEGIN STemplate::assign('error',$error); STemplate::display('header.tpl'); STemplate::display($templateselect); STemplate::display('footer.tpl'); //TEMPLATES END ?>
|
მუშაობს და ვყელაფერი ამგრამ გლობალური ჰოსტინგი მაქვს და იკ უკვე პრობლემაა ერორზე გადის Error: returned status code 500 Internal Server Error << მდააა ეს ჩნდება როცა უკვე ვიწყებ უპლოადს ანუ როგორც კი უპლოადის ღილაკს დავაწვები . აპლოად_კომპლეიტედ.პჰპ -ს მაგივრად გამოდის ეს Premature end of script headers: uu_upload_audios.pl, referer: http://www.ჩემისაიტი.ც...uploadaudio.phpError 500: Script Execution Failure Description: The server encountered an internal error or misconfiguration and was unable to complete your request. Most common reasons for returning this error message are: • File Upload Mode When you upload Perl, CGI scripts via FTP you should use always ASCII mode. If you get "Error 500: Script Execution Failure" you should check whether your FTP client uses ASCII mode when uploading your scripts, because if it uses BINARY mode to upload your scripts they won't work on the server. The problem caused by wrong upload mode is associated with the way different operating systems handle the "end of line" character. Unix system uses a "line-feed" (LF), Windows uses a "carriage-return" (CR) and "line-feed" (LF) pair. That's why it is very important that you set the uploading mode to ASCII. • File Permissions When you upload scripts via FTP the file permissions are set by default to 755. If you get "Error 500: Script Execution Failure" you should check whether your scripts have 755 permissions. Otherwise your scripts have lower level of permissions and does not support execution upon request. The octal representation of the 755 permission is equal to the following textual format: -rwxr-xr-x Most FTP clients support the CHMOD command which is used for setting file permissions. In case you have set improper permissions to your scripts, use your FTP client and set "Read, Write, Execute" permissions for the owner, "Read, Execute" permissions for the group and everyone else. • Script Errors This is the third well known reason for getting "Error 500: Script Execution Failure" upon execution of your scripts. Check your scripts for any obvious syntax or programming errors to make sure your code is not broken. Remember: When you get a "Error 500: Script Execution Failure", you should always check for any file uploading problems (ASCII/BINARY) and the executable permission settings. Once those are checked and verified, it looks like there is a syntax error or some other problem in the script. არადა ჩმოდი ყველა სწორედ არის დაყენებული . . This post has been edited by Wormy on 15 Mar 2010, 00:51
--------------------
Unknown
|