Файл: adultscript-2.0.3-pro/files/admin/templates/default/video_upload_ftp.tpl.php
Строк: 189
<?php defined('_VALID') or die('Restricted Access!'); ?>
<style type="text/css">
form fieldset.video {
background: #E0E0E0;
}
form fieldset label {
width: 120px;
}
form fieldset label.small {
width: 80px;
}
</style>
<script type="text/javascript">
var unique = "<?php echo $this->unique; ?>";
function update_upload_progress(import_id)
{
$.ajax({
url: base_url + '/ajax.php?s=mass_ftp_progress&d=backend',
cache: false,
type: "POST",
dataType: "json",
data: { import_id: import_id },
success: function(response){
$(".progress_msg").html('');
$(".bar").css('width', response.progress + '%');
$(".progress_msg").html(response.msg);
setTimeout("update_upload_progress('" + import_id + "')", 3600);
}
});
}
$(document).ready(function() {
$("input[name='convert']").click(function() {
var convert = $(this).val();
if (convert == '1') {
var inputs = $("input[name$='[convert]']");
$(inputs).removeAttr('checked');
jQuery.each(inputs, function() {
if ($(this).val() == '1') {
$(this).attr('checked', 'checked');
}
});
}
});
var import_id = $("input[name='unique']").val();
$("input[name='submit_add']").click(function(e) {
$.ajax({
url: base_url + '/ajax.php?s=mass_ftp_progress&d=backend',
cache: false,
type: "POST",
dataType: "json",
data: { import_id: unique },
success: function(response){
$("#progress_container").fadeIn();
setTimeout("update_upload_progress('" + import_id + "')", 1200);
$("#ftp-upload-form").submit();
}
});
});
});
</script>
<?php echo $this->fetch('errors'); ?>
<?php echo $this->fetch('messages'); ?>
<?php echo $this->fetch('warnings'); ?>
<div id="container" class="clearfix">
<div id="page">
<?php echo $this->fetch('video_menu'); ?>
<div class="content clearfix">
<?php echo $this->fetch('video_add_menu'); ?>
<form id="ftp-upload-form" method="post" enctype="multipart/form-data" action="<?php echo ADMIN_URL; ?>/index.php?q=video/upload_ftp">
<?php if ($this->loaded): ?>
<input name="submit_process" type="hidden" value="1" />
<input name="unique" type="hidden" value="<?php echo $this->unique; ?>" />
<fieldset>
<legend>Upload Properties</legend>
<div class="required">
<label for="username">Username:</label>
<input name="username" type="text" id="username" class="large" value="<?php echo e($this->username); ?>" />
</div>
<div class="required">
<label for="category">Categories:</label>
<div class="categs_ftp">
<?php echo p('categories_select', $this->categories, $this->category); ?>
<div class="clear-left"></div>
<i>Categories checked here will be assigned to all imported videos! Video can be edited later!</i>
</div>
<div class="clear"></div>
</div>
<div class="required">
<label for="type">Type:</label>
<input name="type" type="radio" id="type" class="radio" value="public"<?php if ($this->type == 'public'): echo ' checked="checked"'; endif;?> /> Public
<input name="type" type="radio" class="radio" value="private"<?php if ($this->type == 'private'): echo ' checked="checked"'; endif;?> /> Private
</div>
<?php if (VModule::enabled('premium')): ?>
<div class="required">
<label for="premium">Premium:</label>
<input name="premium" type="radio" id="premium" class="radio" value="1"<?php if ($this->premium == '1'): echo ' checked="checked"'; endif;?> /> Yes
<input name="premium" type="radio" class="radio" value="0"<?php if ($this->premium == '0'): echo ' checked="checked"'; endif;?> /> No
</div>
<?php endif; ?>
<div class="required">
<label for="queue">Queue:</label>
<select name="queue" id="queue">
<option value="1"<?php if ($this->queue == '1'): echo ' selected="selected"'; endif; ?>>Yes</option>
<option value="0"<?php if ($this->queue == '0'): echo ' selected="selected"'; endif; ?>>No</option>
</select>
</div>
<div class="required">
<label for="status">Status:</label>
<select name="status" id="status">
<?php foreach ($this->statuses as $key => $value): ?>
<option value="<?php echo $key; ?>"<?php if ($this->status == $key): echo ' selected="selected"'; endif; ?>><?php echo e($value); ?></option>
<?php endforeach; ?>
</select>
</div>
</fieldset>
<fieldset>
<legend>Video Properties</legend>
<?php if ($this->videos): ?>
<?php foreach ($this->videos as $key => $video): ?>
<fieldset class="video">
<legend><?php echo e(basename($video['path'])); ?></legend>
<input name="<?php echo $key; ?>[path]" type="hidden" value="<?php echo $video['path']; ?>" />
<input name="<?php echo $key; ?>[size]" type="hidden" value="<?php echo $video['size']; ?>" />
<input name="<?php echo $key; ?>[duration]" type="hidden" value="<?php echo $video['duration']; ?>" />
<input name="<?php echo $key; ?>[audio]" type="hidden" value="<?php echo $video['audio']; ?>" />
<input name="<?php echo $key; ?>[format]" type="hidden" value="<?php echo $video['format']; ?>" />
<input name="<?php echo $key; ?>[identify]" type="hidden" value="<?php echo $video['identify']; ?>" />
<div class="left" style="width: 54%; float: left;">
<div class="required">
<label for="title">Title:</label>
<input name="<?php echo $key; ?>[title]" type="text" class="large" value="<?php echo e($video['title']); ?>" />
</div>
<div class="required">
<label for="description">Description:</label>
<input name="<?php echo $key; ?>[description]" type="text" class="large" value="<?php echo e($video['description']); ?>" />
</div>
<div class="required">
<label for="tags">Tags:</label>
<input name="<?php echo $key; ?>[tags]" type="text" class="large" value="<?php echo e($video['tags']); ?>" />
</div>
</div>
<div class="right" style="width: 44%; float: right;">
<div class="required">
<label for="data" class="small">Data:</label>
<?php echo $video['format'],'/',$video['audio'],' - ',$video['duration'],' - ',$video['size']; ?>
</div>
<div class="required">
<label for="convert" class="small">Convert:</label>
<?php if ($this->convert == '1'): ?>
<input name="<?php echo $key; ?>[convert]" type="radio" class="radio" value="1" checked="checked" /> Yes
<input name="<?php echo $key; ?>[convert]" type="radio" class="radio" value="0" /> No
<?php else: ?>
<input name="<?php echo $key; ?>[convert]" type="radio" class="radio" value="1"<?php if (empty($video['identify'])): echo ' checked="checked"'; endif; ?> /> Yes
<input name="<?php echo $key; ?>[convert]" type="radio" class="radio" value="0"<?php if (!empty($video['identify'])): echo ' checked="checked"'; endif; ?> /> No
<?php endif; ?>
</div>
</div>
<div class="clear"></div>
</fieldset>
<?php endforeach; ?>
<div id="progress_container" style="display: none;">
<fieldset>
<legend>Upload FTP Import Progress</legend>
<div id="progress" style="width: 98%;"><div class="bar" style="width: 0;"> </div></div>
<div class="progress_msg">Processing...please wait!</div>
</fieldset>
</div>
<div class="submit">
<input name="submit_add" type="button" id="submit_add" class="button butDef" value=" Add Videos " />
</div>
<?php else: ?>
<div class="none">No videos found! Application error!?</div>
<?php endif; ?>
</fieldset>
<?php else: ?>
<fieldset>
<legend>Path Settings</legend>
<div class="required">
<label for="dir">Path: </label>
<input name="dir" type="text" id="dir" class="large" value="<?php echo e($this->dir); ?>" /> Full path for the video upload folder!
</div>
</fieldset>
<div class="submit">
<input name="submit_load" type="submit" id="submit_load" class="button butDef" value=" Load Videos " />
</div>
<?php endif; ?>
</form>
</div>
</div>
</div>