<?php echo $this->config->item('full_editor');?>
<!-- Form elements -->
<div class="grid_12">
<div class="float-right">
    <a href="<?= base_url() ?>articles/admin_articles/overview" class="button">
    	<span><?php echo $this->lang->line('button_articles');?></span>
    </a>
    <a href="<?= base_url() ?>articles/admin_articles_category/overview" class="button">
    	<span><?php echo $this->lang->line('button_categories');?></span>
    </a>
        <a href="<?= base_url() ?>articles/admin_comments/overview" class="button">
    	<span><?php echo $this->lang->line('button_comments');?></span>
    </a>
</div>
<div class="module">
    <h2><span><?php echo $this->lang->line('article_create');?></span></h2>
    <div class="module-body">
	        <?php echo form_open_multipart('articles/admin_articles/create', array('id' => 'new_article'))?>
                <?php echo $this->template->flash_msg(); ?>
             <p>
                <label><?php echo $this->lang->line('article_title');?></label>
                <input type="text" class="input-medium" name="article_title" value="<?= set_value('article_title')?>"  />
                <?php echo form_error('article_title'); ?>
            </p>
             <p>
                <label><?php echo $this->lang->line('article_desc');?></label>
                <textarea rows="5" cols="30" class="wysiwyg-simple" name="article_desc" ><?= set_value('article_desc')?></textarea>
                <?php echo form_error('article_desc'); ?>
            </p>
             <p>
                <label><?php echo $this->lang->line('article_topic');?></label>
                <textarea  rows="7" cols="90" class="simple-editor" name="article_topic"  ><?= set_value('article_topic')?></textarea>
                <?php echo form_error('article_topic'); ?>
            </p>
             <p>
                <label><?php echo $this->lang->line('article_category');?></label>
                <select name="article_category" class="input-short">
                    <?php foreach($categories as $cat):?>
                    <option value="<?php echo $cat['ac_id']?>"><?php echo $cat['ac_name']?></option>
                    <?php endforeach;?>
                </select>
                 <?php  echo form_error('category'); ?>
            </p>
             <p>
                <label><?php echo $this->lang->line('image_file');?></label>
                <input type="file" class="input-medium" name="image_file" value=""  />
                <?php echo form_error('image_file'); ?>
            </p>
            <label><?php echo $this->lang->line('or');?></label>
             <p>
                <label><?php echo $this->lang->line('link_img');?></label>
                <input type="text" class="input-medium" name="link_img" value="<?= set_value('ar_link_img')?>"  />
		<?php echo form_error('link_img'); ?>
            </p>
             <fieldset>
                 <ul>
                 <li><label><input type="checkbox" name="hide"  id="cb1" /><?php echo $this->lang->line('active');?></label></li>
                 </ul>
            </fieldset>
             <?php $lang_array=$this->config->item('supported_languages');
           $l=count($lang_array);
           if($l > 1){?>
            <p>
      <label><?php echo $this->lang->line('lang');?></label>
       <select class="input-short" name="lang">
           <?php foreach($lang_array as $l_a):?>
       <option class="input-medium" value="<?= $l_a['value']?>"><?php echo $l_a['name']?></option>
       <?php endforeach;?>
       </select>
    </p>
    <?php }else{?>
     <?php foreach($lang_array as $l_a):?>
    <input type="hidden" name="lang" value="<?= $l_a['value']?>"/>
     <?php endforeach;?>
    <?php }?>
            <fieldset>
                <input class="submit-silver" type="submit" name="save" value="<?php echo $this->lang->line('button_create');?>" />
            </fieldset>
   </div> <!-- End .module-body -->
</div>  <!-- End .module -->
<div style="clear:both;"></div>
</div> <!-- End .grid_12 -->