<?php /** * Smiley helper * * Created on 2011. 11. 18. * @author 불의회상 <hoksi2k@hanmail.net> * @package helper * @subpackage controllers * @version 1.0 */ class Smiley_hlp extends CI_Controller { function __construct() { parent::__construct(); $this->load->helper('smiley'); $this->load->library('table'); } function index() { $smiley_imgs = site_url('sample/images/smileys/'); $image_array = get_clickable_smileys($smiley_imgs); $col_array = $this->table->make_columns($image_array, 11); $data['smiley_js'] = js_insert_smiley('blog', 'comments'); $data['smiley_table'] = $this->table->generate($col_array); $data['parse_smileys'] = parse_smileys($this->input->post('comments'), $smiley_imgs); $this->load->view('smiley_hlp_sample', $data); } }
<?php $this->load->view('inc/header')?> <?php echo js_insert_smiley('blog', 'comments'); ?> <table class="tablesorter" border="0" cellpadding="0" cellspacing="1"> <thead> <tr> <th style="text-align:center" width="20%">구분</th> <th width="80%">결과</th> </tr> </thead> <tr> <td>parse_smileys()</td> <td><?=$parse_smileys?></td> </tr> <form name="blog" method="post" action="<?=site_url('smiley_hlp')?>"> <tr> <td>Comment</td> <td> <textarea name="comments" cols="40" rows="4"></textarea><br/> <input type="submit" /> </td> </tr> </form> <tr> <td>Smiley Table</td> <td><?php echo $smiley_table?></td> </tr> </table> <?php $this->load->view('inc/footer')?>
© Copyright by hoksi(Page rendered in 0.0073 seconds)