Файл: adultscript-2.0.3-pro/files/admin/templates/default/adv_player_edit.tpl.php
Строк: 191
<?php defined('_VALID') or die('Restricted Access!'); ?>
<script type="text/javascript">
$(document).ready(function() {
$("select[name='type']").change(function() {
var type= $(this).val();
$("div[id^='adv_container_']").hide();
$("#adv_container_" + type).show();
if (type == 'image' || type == 'text') {
$("#adv_container_cuepoint").show();
}
});
$("select[name='image_type']").change(function() {
$("div[id^='adv_image_container_']").hide();
$("#adv_image_container_" + $(this).val()).show();
});
$("select[name='video_type']").change(function() {
$("div[id^='adv_video_container_']").hide();
$("#adv_video_container_" + $(this).val()).show();
});
});
</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('adv_menu'); ?>
<div class="content clearfix">
<?php echo $this->fetch('adv_player_menu'); ?>
<?php if ($this->adv): ?>
<form id="adv-player-form" method="post" enctype="multipart/form-data" action="<?php echo ADMIN_URL; ?>/index.php?q=adv/player/edit&id=<?php echo $this->adv['adv_id']; ?>">
<fieldset>
<legend>Advertising Properties</legend>
<div class="required">
<label for="adv_name">Name</label>
<input name="adv_name" type="text" id="adv_name" class="mega" value="<?php echo e($this->adv['adv_name']); ?>" />
</div>
<div class="required">
<label for="adv_desc">Description</label>
<input name="adv_desc" type="text" id="adv_desc" class="mega" value="<?php echo e($this->adv['adv_desc']); ?>" />
</div>
<div class="required">
<label for="expire">Expire Date</label>
<input name="expire" type="text" id="expire" class="medium" value="<?php echo e($this->adv['expire']); ?>" /> Leave empty for never!
</div>
<div class="required">
<label for="status">Status</label>
<input name="status" type="radio" id="status" class="radio" value="1"<?php if ($this->adv['status'] == '1'): echo ' checked="checked"'; endif; ?> /> Active
<input name="status" type="radio" class="radio" value="0"<?php if ($this->group['adv'] == '0'): echo ' checked="checked"'; endif; ?> /> Suspended
</div>
</fieldset>
<fieldset>
<legend>Banner Properties</legend>
<div class="required">
<label for="type">Type</label>
<select name="type" id="type">
<option value="text"<?php if ($this->adv['type'] == 'text'): echo ' selected="selected"'; endif; ?>>Text Overlay</option>
<option value="image"<?php if ($this->adv['type'] == 'image'): echo ' selected="selected"'; endif; ?>>Image Overlay</option>
<option value="video"<?php if ($this->adv['type'] == 'video'): echo ' selected="selected"'; endif; ?>>Media Instream</option>
</select>
</div>
<div id="adv_container_text"<?php if ($this->adv['type'] != 'text'): echo ' style="display: none;"'; endif; ?>>
<div class="required">
<label for="title">Title</label>
<input name="title" type="text" id="title" class="mega" value="<?php echo e($this->adv['title']); ?>" />
</div>
<div class="required">
<label for="description">Description</label>
<input name="description" type="text" id="description" class="mega" value="<?php echo e($this->adv['description']); ?>" />
</div>
</div>
<div class="required">
<label for="url">URL</label>
<input name="url" type="text" id="url" class="mega" value="<?php echo e($this->adv['url']); ?>" />
</div>
<div id="adv_container_cuepoint"<?php if ($this->adv['type'] == 'video'): echo ' style="display: none;"'; endif; ?>>
<div class="required">
<label for="cuepoint">Cuepoint</label>
<input name="cuepoint" type="text" id="cuepoint" class="small" value="<?php echo $this->adv['cuepoint']; ?>" />
</div>
</div>
<div id="adv_container_image"<?php if ($this->adv['type'] != 'image'): echo ' style="display: none;"'; endif; ?>>
<div class="required">
<label for="image_type">Image Type</label>
<select name="image_type" id="image_type">
<option value="url"<?php if ($this->adv['media_type'] == 'url'): echo ' selected="selected"'; endif; ?>>URL</option>
<option value="file"<?php if ($this->adv['media_type'] == 'file'): echo ' selected="selected"'; endif; ?>>File</option>
</select>
</div>
<div id="adv_image_container_url"<?php if ($this->adv['media_type'] == 'file'): echo ' style="display: none;"'; endif; ?>>
<div class="required">
<label for="image_url">Image URL</label>
<input name="image_url" type="text" id="image_url" class="mega" value="<?php echo e($this->adv['media_url']); ?>" />
</div>
</div>
<div id="adv_image_container_file"<?php if ($this->adv['media_type'] == 'url'): echo ' style="display: none;"'; endif; ?>>
<div class="required">
<label for="image_file">Image File</label>
<input name="image_file" type="file" id="image_file" />
</div>
</div>
</div>
<div id="adv_container_video"<?php if ($this->adv['type'] != 'video'): echo ' style="display: none;"'; endif; ?>>
<div class="required">
<label for="duration">Duration</label>
<input name="duration" type="text" id="duration" class="small" value="<?php echo $this->adv['duration']; ?>" />
</div>
<div class="required">
<label for="position">Position</label>
<input name="position" type="text" id="position" class="small" value="<?php echo $this->adv['position']; ?>" />
</div>
<div class="required">
<label for="video_type">Video Type</label>
<select name="video_type" id="video_type">
<option value="url"<?php if ($this->adv['media_type'] == 'url'): echo ' selected="selected"'; endif; ?>>URL</option>
<option value="file"<?php if ($this->adv['media_type'] == 'file'): echo ' selected="selected"'; endif; ?>>File</option>
</select>
</div>
<div id="adv_video_container_url"<?php if ($this->adv['media_type'] == 'file'): echo ' style="display: none;"'; endif; ?>>
<div class="required">
<label for="video_url">Media URL</label>
<input name="video_url" type="text" id="video_url" class="mega" value="<?php echo e($this->adv['media_url']); ?>" />
</div>
</div>
<div id="adv_video_container_file"<?php if ($this->adv['media_type'] == 'url'): echo ' style="display: none;"'; endif; ?>>
<?php if (!empty($this->adv['media_ext'])): ?>
<div class="required">
<label for="current_file">Current File</label>
<strong><?php echo $this->adv['adv_id'],'.',$this->adv['media_ext']; ?></strong> (<?php echo VText::bytes(filesize(BASE_DIR.'/media/player/'.$this->adv['adv_id'].'.'.$this->adv['media_ext'])); ?>)
</div>
<?php endif; ?>
<div class="required">
<label for="video_file">Media File</label>
<input name="video_file" type="file" id="video_file" />
</div>
</div>
</div>
</fieldset>
<div class="submit">
<input name="submit_adv_edit" type="submit" id="submit_adv_edit" class="button butDef" value=" Update Advertising " />
</div>
</form>
<?php else: ?>
<div class="none">Invalid player advertising id! Are you sure this advertising entry exists!?</div>
<?php endif; ?>
</div>
</div>
</div>