Файл: adultscript-2.0.3-pro/files/admin/templates/default/video_grab.tpl.php
Строк: 112
<?php defined('_VALID') or die('Restricted Access!'); ?>
<script type="text/javascript">
var unique = "<?php echo $this->unique; ?>";
function update_import_progress(import_id)
{
$.ajax({
url: base_url + '/ajax.php?s=mass_embed_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_import_progress('" + import_id + "')", 3600);
}
});
}
$(document).ready(function() {
var import_id = $("input[name='unique']").val();
$("input[name='submit_grab']").click(function(e) {
e.preventDefault();
$.ajax({
url: base_url + '/ajax.php?s=mass_embed_progress&d=backend',
cache: false,
type: "POST",
dataType: "json",
data: { import_id: unique },
success: function(response){
$("#progress_container").fadeIn();
setTimeout("update_import_progress('" + import_id + "')", 1200);
$("#video-grab-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 name="video-grab-form" id="video-grab-form" method="post" action="<?php echo ADMIN_URL; ?>/index.php?q=grab">
<input name="unique" type="hidden" value="<?php echo $this->unique; ?>" />
<input name="submitted" type="hidden" value="1" />
<fieldset>
<legend>Grab Properties</legend>
<div class="required">
<label for="url">URL:</label>
<input name="url" type="text" id="url" class="mega" value="<?php echo e($this->grab['url']); ?>" />
</div>
<div class="optional">
<label for="background"> </label>
<input name="background" type="checkbox" id="background" class="radio"<?php if ($this->grab['background'] == 'on'): echo ' checked="checked"'; endif; ?> /> Background grabbing?
</div>
</fieldset>
<fieldset>
<legend>Video Properties</legend>
<div class="required">
<label for="username">Username:</label>
<input name="username" type="text" id="username" class="large" value="<?php echo e($this->grab['username']); ?>" />
</div>
<div class="required">
<label for="category">Category: </label>
<select name="category" id="category">
<option value="">Autodetect</option>
<?php foreach ($this->categories as $category): ?>
<option value="<?php echo $category['cat_id']; ?>"<?php if ($this->grab['category'] == $category['cat_id']): echo ' selected="selected"'; endif; ?>><?php echo e($category['name']); ?></option>
<?php endforeach; ?>
</select>
</div>
<div class="required">
<label for="broadcast">Broadcast:</label>
<select name="broadcast" id="broadcast">
<option value="public"<?php if ($this->grab['broadcast'] == 'public'): echo ' selected="selected"'; endif; ?>>Public</option>
<option value="private"<?php if ($this->grab['broadcast'] == 'private'): echo ' selected="selected"'; endif; ?>>Private</option>
</select>
</div>
<div class="required">
<label for="status">Status:</label>
<select name="status" id="status">
<option value="0"<?php if ($this->grab['status'] == '0'): echo ' selected="selected"'; endif; ?>>Suspended</option>
<option value="1"<?php if ($this->grab['status'] == '1'): echo ' selected="selected"'; endif; ?>>Active</option>
</select>
</div>
</fieldset>
<div id="progress_container" style="display: none;">
<fieldset>
<legend>Embed 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_grab" type="button" id="submit_grab" class="button butDef" value=" Embed Videos " />
</div>
</form>
</div>
</div>
</div>