Файл: adultscript-2.0.3-pro/files/admin/templates/default/kb_add.tpl.php
Строк: 90
<?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=kb_preview&d=admin',
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=966,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('kb_menu'); ?>
<div class="content clearfix">
<?php echo $this->fetch('kb_manage_menu'); ?>
<form name="kb-add-form" id="kb-add-form" method="post" action="<?php echo ADMIN_URL; ?>/index.php?q=kb/add">
<fieldset>
<legend>Article Properties</legend>
<div class="required">
<label for="kb_title">Title</label>
<input name="kb_title" type="text" id="kb_title" class="mega" value="<?php echo e($this->kb['kb_title']); ?>" />
</div>
<div class="required">
<label for="cat_id">Category</label>
<select name="cat_id" id="cat_id">
<option value="">----</option>
<?php foreach ($this->categories as $cat): ?>
<option value="<?php echo $cat['cat_id']; ?>"<?php if ($this->kb['cat_id'] == $cat['cat_id']): echo ' selected="selected"'; endif; ?>><?php echo e($cat['name']); ?></option>
<?php endforeach; ?>
</select>
</div>
<div class="optional">
<label for="status">Status</label>
<input name="status" type="radio" class="radio" value="1"<?php if ($this->kb['status'] == '1'): echo ' checked="checked"'; endif; ?> /> Published
<input name="status" type="radio" class="radio" value="0"<?php if ($this->kb['status'] == '0'): echo ' checked="checked"'; endif; ?> /> Suspended
</div>
</fieldset>
<fieldset>
<legend>Content</legend>
<div class="required noborder">
<textarea name="kb_content" id="kb_content_input" class="mega" rows="20"><?php echo e($this->kb['kb_content']); ?></textarea>
</div>
<?php if ($this->cfg['editor'] == 'ckeditor'): ?>
<script type="text/javascript">
CKEDITOR.replace('kb_content_input', {customConfig : '<?php echo RELATIVE_URL; ?>/misc/ckeditor/config.js?v=1'});
</script>
<?php endif; ?>
</fieldset>
<div class="submit">
<input name="submit_kb_add" type="submit" id="submit_kb_add" class="button butDef" value=" Add Article " />
<input name="show_preview" type="button" id="show_preview" class="button butDef" value=" Preview " />
</div>
</form>
</div>
</div>
</div>