Вход Регистрация
Файл: adultscript-2.0.3-pro/files/admin/templates/default/content_edit.tpl.php
Строк: 114
<?php defined('_VALID') or die('Restricted Access!'); ?>
    <?php echo $this->fetch('errors'); ?>
    <?php echo $this->fetch('messages'); ?>
    <?php echo $this->fetch('warnings'); ?>
    <script type="text/javascript">
    $(document).ready(function() {
        $("input[id='show_preview']").click(function() {
            $.ajax({
                url: base_url + '/ajax.php?s=static_preview&d=backend',
                cache: false,
                type: "POST",
                dataType: "json",
                data: {
                    title: $("input[id='title']").val(), 
                    content: CKEDITOR.instances.content_input.getData(),
                    meta_title: $("input[id='meta_title']").val(),
                    meta_desc: $("input[id='meta_desc']").val(),
                    meta_keys: $("input[id='meta_keys']").val()
                },
                success: function(response){
                    var preview = window.open("","wildebeast","width=980,height=600,scrollbars=1,resizable=1")
                    preview.document.open()
                    preview.document.write(response.code)
                    preview.document.close()
                }
            });
        });
    });
    </script>
    <?php if ($this->cfg['editor'] == 'ckeditor'): ?>
    <script type="text/javascript" src="<?php echo RELATIVE_URL?>/misc/ckeditor/ckeditor.js"></script>
    <?php endif; ?>    
    <div id="container" class="clearfix">
        <div id="page">
            <?php echo $this->fetch('main_menu'); ?>
            <div class="content clearfix">
                <?php echo $this->fetch('content_menu'); ?>
                <form name="content-edit-form" id="content-edit-form" method="post"  action="<?php echo ADMIN_URL?>/index.php?q=content/edit&amp;id=<?php echo $this->page['static_id']; ?>">
                    <fieldset>
                        <legend>Page Properties</legend>
                        <div class="required">
                            <label for="name">Name</label>
                            <input name="name" type="text" id="name" class="large" maxlength="99" value="<?php echo e($this->page['name']); ?>" />
                        </div>
                        <div class="optional">
                            <label for="status">Status</label>
                            <select name="status" id="status">
                            <option value="1"<?php if ($this->page['status'] == '1'): echo ' selected="selected"'; endif; ?>>Active</option>
                            <option value="0"<?php if ($this->page['status'] == '0'): echo ' selected="selected"'; endif; ?>>Suspended</option>
                            </select>
                        </div>
                    </fieldset>
                    <fieldset>
                        <legend>Meta Properties</legend>
                        <div class="required">
                            <label for="meta_title">Meta Title</label>
                            <input name="meta_title" type="text" id="meta_title" class="mega" maxlength="255" value="<?php echo e($this->page['meta_title']); ?>" />
                        </div>
                        <div class="required">
                            <label for="meta_desc">Meta Description</label>
                            <input name="meta_desc" type="text" id="meta_desc" class="mega" maxlength="255" value="<?php echo e($this->page['meta_desc']); ?>" />
                        </div>
                        <div class="required">
                            <label for="meta_keys">Meta Keywords</label>
                            <input name="meta_keys" type="text" id="meta_keys" class="mega" maxlength="255" value="<?php echo e($this->page['meta_keys']); ?>" />
                        </div>
                    </fieldset>
                   <fieldset>
                        <legend>Content</legend>
                        <div class="required">
                            <label for="title">Title</label>
                            <input name="title" type="text" id="title" class="mega" value="<?php echo e($this->page['title']); ?>" />
                        </div>
                        <div class="required noborder">
                            <textarea name="content" id="content_input" class="mega" rows="20"><?php echo e($this->page['content']); ?></textarea>
                        </div>
                        <?php if ($this->cfg['editor'] == 'ckeditor'): ?>
                        <script type="text/javascript">
                        CKEDITOR.replace('content_input', {customConfig : '<?php echo RELATIVE_URL?>/misc/ckeditor/config.js?v=1'});
                        </script>
                        <?php endif; ?>
                    </fieldset>                    
                    <div class="submit">
                        <input name="submit_content_edit" type="submit" id="submit_content_edit" class="button butDef" value=" Update Page " />
                        <input name="show_preview" type="button" id="show_preview" class="button butDef" value=" Preview " />
                    </div>
                </form>
            </div>
        </div>
    </div>
Онлайн: 3
Реклама