<div id="content">                        
    <div class="wrap">

        <div class="head">
            <div class="info">
                <h1><?php echo element('compName', $this->session->userdata('logged_in')) ?> [ 
                    <?php echo element('compNo', $this->session->userdata('logged_in')) ?> ]</h1>
                <ul class="breadcrumb">
                    <li><a href="#"><?php echo $this->lang->line('dashboard') ?></a> <span class="divider">-</span></li>
                    <li><a href="#"><?php echo $this->lang->line('module') ?></a> <span class="divider">-</span></li>
                    <li class="active"><?php echo $this->lang->line('title') ?></li>
                </ul>
            </div>

        </div>  <!-- Head -->                                                                  

        <div class="content">
            <div style="overflow: scroll; height: 600px;">
                <form action="<?php echo base_url() ?>admin/sql" method="post">                              
					<textarea class="span8" rows="3" name="sql" type="text" placeholder="search..."><?php echo $sql; ?></textarea>
                    <button type="submit"><span class="i-magnifier"></span></button>
                </form>
			<?php echo 'result=';
				$i = 0; 
				echo '<table>';
				if (!empty($rs)) 
					foreach($rs as $row){
//						echo "<pre>";
//						print_r ($row);
//						echo "</pre>";
						echo '<tr>';
						foreach ($row as $col => $val){
								echo '<td>'.(($i==0)?$col:$val).'</td>';
						}
						$i++;
						echo '</tr>';
					}
				echo '</table>';
//				var_dump($rs);
//				var_dump($sql);
				?> 
            </div>                        
		</div>
	</div>
</div>
		