-
Notifications
You must be signed in to change notification settings - Fork 0
/
upload.php
79 lines (65 loc) · 2.16 KB
/
upload.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
/*
*******************************************************************
| Copyright (c) 2007-2016 Clip-Bucket.com. All rights reserved.
| @ Author : ArslanHassan
| @ Software : ClipBucket
| @ Modified : June 9, 2016 by Saqib Razzaq
*******************************************************************
*/
define("THIS_PAGE","upload");
define("PARENT_PAGE","upload");
require 'includes/config.inc.php';
$pages->page_redir();
subtitle('upload');
//Checking if user is guest
if(userid()) {
$verify_logged_user = true;
} else {
$verify_logged_user = false;
}
if(has_access('allow_video_upload',false,$verify_logged_user)) {
#pre_upload();
$file_name = time().RandomString(5);
assign('file_name',$file_name);
$step = 1;
if(isset($_POST['submit_data'])) {
$Upload->validate_video_upload_form();
if(empty($eh->error_list)) {
$step=2;
}
}
if(isset($_POST['submit_upload'])) {
if(!$_POST['file_name'])
$_POST['file_name'] = time().RandomString(5);
{
$file_directory = create_dated_folder(NULL,$_REQUEST['time_stamp']);
$vid = $Upload->submit_upload();
$Upload->do_after_video_upload($vid);
if(!error()){
e('Video has been Embeded succesfully ..','m');
$step=3;
}
}
}
//assigning Form Name [RECOMMEND for submitting purpose]
assign('upload_form_name','UploadForm');
//Adding Uploading JS Files
$Cbucket->add_js(array('swfupload/swfupload.js'=>'uploadactive'));
$Cbucket->add_js(array('swfupload/plugins/swfupload.queue.js'=>'uploadactive'));
$Cbucket->add_js(array('swfupload/plugins/handlers.js'=>'uploadactive'));
$Cbucket->add_js(array('swfupload/plugins/fileprogress.js'=>'uploadactive'));
} else {
$userquery->logincheck('allow_video_upload',true);
}
assign('step',$step);
assign('extensions', $Cbucket->get_extensions());
subtitle(lang('upload'));
//Displaying The Template
if ( !userid() ) {
echo '<div id="notlogged_err" class="container alert alert-danger" style="margin-top:70px">You must login to be able to upload content. Login if you have account or register</div>';
} else {
template_files('upload.html');
}
display_it();
?>