Файл: adultscript-2.0.3-pro/files/templates/defboot/user_banner.tpl.php
Строк: 142
<?php defined('_VALID') or die('Restricted Access!'); ?>
<script type="text/javascript">
$(document).ready(function() {
$("input[name='type']").change(function() {
var type= $(this).val();
$("div[id^='container-adv-']").hide();
$("#container-adv-" + type).show();
if (type != 'html') {
$("#container-adv-url").show();
}
});
$("input[name='image_type']").change(function() {
$("div[id^='container-image-']").hide();
$("#container-image-" + $(this).val()).show();
});
});
</script>
<?php echo $this->fetch('_user_header'); ?>
<form id="account-form" class="form-horizontal" method="post" enctype="multipart/form-data" action="<?php echo REL_URL; ?>/user/banner/">
<p class="lead"><?php echo __('banner-help'); ?></p>
<?php if ($this->added): ?>
<fieldset>
<div class="form-group">
<label for="current" class="col-sm-2 control-label"><?php echo __('current'); ?></label>
<div class="col-sm-10">
<?php if ($this->adv['status'] == '1'): ?>
<div class="ads-player">
<?php if ($this->adv['type'] == 'text'): ?>
<a href="<?php echo $this->adv['url']; ?>"<?php if ($this->adv['description'] != ''): echo ' title="',e($this->adv['description']),'"'; endif; ?>><?php echo e($this->adv['title']); ?></a>
<?php elseif ($this->adv['type'] == 'html'): ?>
<?php echo $this->adv['code']; ?>
<?php elseif ($this->adv['type'] == 'image'):
$image_url = ($this->adv['image_type'] == 'url') ? $this->adv['image_url'] : MEDIA_URL.'/banners/'.$this->adv['adv_id'].'.'.$this->adv['image_ext']; ?>
<a href="<?php echo BASE_URL,'/adv/',$this->adv['adv_id']; ?>/"><img src="<?php echo $image_url; ?>" alt="" /></a>
<?php endif; ?>
</div>
<?php else: echo __('banner-approve'); endif; ?>
</div>
</div>
</fieldset>
<?php endif; ?>
<fieldset>
<div class="form-group">
<label for="type" class="col-sm-2 control-label"><?php echo __('type'); ?></label>
<div class="col-sm-9">
<label class="radio-inline"><input name="type" type="radio" id="type_text" value="text"<?php if ($this->adv['type'] == 'text'): echo ' checked="checked"'; endif; echo '> ',__('text'); ?></label>
<label class="radio-inline"><input name="type" type="radio" id="type_image" value="image"<?php if ($this->adv['type'] == 'image'): echo ' checked="checked"'; endif; echo '> ',__('image'); ?></label>
<label class="radio-inline"><input name="type" type="radio" id="type_html" value="html"<?php if ($this->adv['type'] == 'html'): echo ' checked="checked"'; endif; echo '> ',__('html'); ?></label>
</div>
</div>
<div id="container-adv-text"<?php if ($this->adv['type'] != 'text'): echo ' style="display: none;"'; endif; ?>>
<div class="form-group">
<label for="title" class="col-sm-2 control-label"><?php echo __('title'); ?></label>
<div class="col-sm-10">
<input name="title" type="text" class="form-control" id="title" value="<?php echo e($this->adv['title']); ?>">
</div>
</div>
<div class="form-group">
<label for="description" class="col-sm-2 control-label"><?php echo __('description'); ?></label>
<div class="col-sm-10">
<input name="description" type="text" class="form-control" id="description" value="<?php echo e($this->adv['description']); ?>">
</div>
</div>
</div>
<div id="container-adv-url"<?php if ($this->adv['type'] == 'html'): echo ' style="display: none;"'; endif; ?>>
<div class="form-group">
<label for="url" class="col-sm-2 control-label"><?php echo __('url'); ?></label>
<div class="col-sm-10">
<input name="url" type="text" class="form-control" id="url" value="<?php echo e($this->adv['url']); ?>">
</div>
</div>
</div>
<div id="container-adv-html"<?php if ($this->adv['type'] != 'html'): echo ' style="display: none;"'; endif; ?>>
<div class="form-group">
<label for="code" class="col-sm-2 control-label"><?php echo __('code'); ?></label>
<div class="col-sm-10">
<textarea name="url" class="form-control" id="url" rows="5"><?php echo e($this->adv['url']); ?></textarea>
</div>
</div>
</div>
<div id="container-adv-image"<?php if ($this->adv['type'] != 'image'): echo ' style="display: none;"'; endif; ?>>
<div class="form-group">
<label for="image_type" class="col-sm-2 control-label"><?php echo __('image-type'); ?></label>
<div class="col-sm-9">
<label class="radio-inline"><input name="image_type" type="radio" id="image_type_url" value="url"<?php if ($this->adv['image_type'] == 'url'): echo ' checked="checked"'; endif; echo '> ',__('url'); ?></label>
<label class="radio-inline"><input name="image_type" type="radio" id="image_type_file" value="file"<?php if ($this->adv['image_type'] == 'file'): echo ' checked="checked"'; endif; echo '> ',__('file'); ?></label>
</div>
</div>
<div id="container-image-url"<?php if ($this->adv['image_type'] != 'url'): echo ' style="display: none;"'; endif; ?>>
<div class="form-group">
<label for="image_url" class="col-sm-2 control-label"><?php echo __('image-url'); ?></label>
<div class="col-sm-10">
<input name="image_url" type="text" class="form-control" id="image_url" value="<?php echo e($this->adv['image_url']); ?>">
</div>
</div>
</div>
<div id="container-image-file"<?php if ($this->adv['image_type'] != 'file'): echo ' style="display: none;"'; endif; ?>>
<div class="form-group">
<label for="image_file" class="col-sm-2 control-label"><?php echo __('image-file'); ?></label>
<div class="col-sm-6">
<input name="image_file" type="file" class="form-control" id="image_file">
</div>
</div>
</div>
</div>
</fieldset>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button name="submit-profile-edit" id="submit-profile-edit" class="btn btn-lg btn-default"><?php if ($this->added): echo 'banner-updated'; else: echo __('banner-add'); endif; ?></button>
</div>
</div>
</form>
<?php echo $this->fetch('_user_footer'); ?>