Файл: adultscript-2.0.3-pro/files/admin/templates/default/adv_add.tpl.php
Строк: 162
<?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 != 'html') {
$("#adv_container_url").show();
}
});
$("select[name='image_type']").change(function() {
$("div[id^='adv_image_container_']").hide();
$("#adv_image_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_manage_menu'); ?>
<?php echo $this->fetch('adv_search'); ?>
<form name="adv-add-form" id="adv-add-form" method="post" enctype="multipart/form-data" action="<?php echo ADMIN_URL; ?>/index.php?q=adv/add">
<fieldset>
<legend>Advertising Properties</legend>
<div class="required">
<label for="adv_group_id">Position</label>
<select name="adv_group_id" id="adv_group_id">
<option value="">Select Position</option>
<?php foreach ($this->groups as $group): ?>
<option value="<?php echo $group['adv_group_id']; ?>"<?php if ($this->adv['adv_group_id'] == $group['adv_group_id']): echo ' selected="selected"'; endif; ?>><?php echo e($group['adv_group_name']); ?></option>
<?php endforeach; ?>
</select>
</div>
<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="blank">Target</label>
<select name="blank" id="blank">
<option value="0"<?php if ($this->adv['blank'] == '0'): echo ' selected="selected"'; endif; ?>>Same Window or Tab</option>
<option value="1"<?php if ($this->adv['blank'] == '1'): echo ' selected="selected"'; endif; ?>>New Window or Tab</option>
</select>
(does not work with HTML/Javascript Banner)
</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->adv['status'] == '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 Banner</option>
<option value="image"<?php if ($this->adv['type'] == 'image'): echo ' selected="selected"'; endif; ?>>Image Banner</option>
<option value="html"<?php if ($this->adv['type'] == 'html'): echo ' selected="selected"'; endif; ?>>HTML/Javascript Banner</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 id="adv_container_url"<?php if ($this->adv['type'] == 'html'): echo ' style="display: none;"'; endif; ?>>
<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>
<div id="adv_container_html"<?php if ($this->adv['type'] != 'html'): echo ' style="display: none;"'; endif; ?>>
<div class="required">
<label for="code">HTML/Javascript Code</label>
<textarea name="code" id="code" class="mega" rows="6" cols="50"><?php echo e($this->adv['code']); ?></textarea>
</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['image_type'] == 'url'): echo ' selected="selected"'; endif; ?>>URL</option>
<option value="file"<?php if ($this->adv['image_type'] == 'file'): echo ' selected="selected"'; endif; ?>>File</option>
</select>
</div>
<div id="adv_image_container_url"<?php if ($this->adv['image_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['image_url']); ?>" />
</div>
</div>
<div id="adv_image_container_file"<?php if ($this->adv['image_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>
</fieldset>
<div class="submit">
<input name="submit_adv_add" type="submit" id="submit_adv_add" class="button butDef" value=" Add Advertising " />
</div>
</form>
</div>
</div>
</div>