Вход Регистрация
Файл: adultscript-2.0.3-pro/files/admin/templates/default/adv_sponsor_add.tpl.php
Строк: 209
<?php defined('_VALID') or die('Restricted Access!'); ?>
    <script type="text/javascript">
    $(document).ready(function() {
        $("select[name='adv_type']").change(function() {
            $("div[id^='type_']").hide();
            $("#type_" + $(this).val()).show();
        });

        $("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_sponsor_menu'); ?>
                <form name="adv-sponsor-add-form" id="adv-sponsor-add-form" method="post" enctype="multipart/form-data" action="<?php echo ADMIN_URL?>/index.php?q=adv/sponsor_add">
                    <fieldset>
                        <legend>Sponsor Information</legend>
                        <div class="required">
                              <label for="sponsor_name">Name</label>
                            <input name="sponsor_name" type="text" id="name" class="mega" maxlength="255" value="<?php echo e($this->sponsor['sponsor_name']); ?>" />
                        </div>
                    </fieldset>
                    <fieldset>
                        <legend>Sponsor Properties</legend>
                        <div class="required">
                            <label for="adv_type">Advertising Type</label>
                            <select name="adv_type" id="adv_type">
                                <option value="assign">Assign Existing Advertising Banner</option>
                                <option value="create">Create New Advertising Banner</option>
                            </select>
                        </div>
                    </fieldset>
                    <div id="type_assign"<?php if ($this->sponsor['adv_type'] == 'create'): echo ' style="display: none;"'; endif; ?>>
                    <fieldset>
                        <legend>Assign Advertising Banner</legend>
                        <div class="required">
                            <label for="adv_id">Advertising</label>
                            <select name="adv_id" id="adv_id">
                                <option value="">Select Advertising Banner</option>
                                <?php foreach ($this->advs as $adv): ?>
                                <option value="<?php echo $adv['adv_id']; ?>"<?php if ($this->sponsor['adv_id'] == $adv['adv_id']): echo ' selected="selected"'; endif; ?>><?php echo e($adv['adv_name']); ?></option>
                                <?php endforeach; ?>
                            </select>
                        </div>
                    </fieldset>
                    </div>
                    <div id="type_create"<?php if ($this->sponsor['adv_type'] == 'assign'): echo ' style="display: none;"'; endif; ?>>
                    <fieldset>
                        <legend>Create Advertising Banner</legend>
                        <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="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 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>
                    </fieldset>
                    </div>
                    <div class="submit">
                        <input name="submit_sponsor_add" type="submit" id="submit_sponsor_add" class="button butDef" value=" Add Sponsor " />
                    </div>
                </form>
            </div>
        </div>
    </div>
Онлайн: 3
Реклама