Welcome Guest, Not a member yet? Register   Sign In
scaffolding views
#1

[eluser]miramichi[/eluser]
Hi:

I have inherited a CI site to maintain. In the scaffolding folder there are pages/views that have forms for CRUD items in the db - but I can't figure out what the link to these forms should be.

I know, a vague question, but any tips on what to look for would be appreciated.
#2

[eluser]miramichi[/eluser]
Here is the code for the add.php view (scaffolding/views/add.php) I just need to know how to access this page.

Code:
<?php  $this->load->view('header');  ?>

<p>&lt;?php echo anchor(array($base_uri, 'view'), '&lt; '.$scaff_view_all); ?&gt;</p>


&lt;?php echo form_open($action); ?&gt;

<table border="0" cellpadding="3" cellspacing="1">
&lt;?php foreach($fields as $field): ?&gt;

&lt;?php if ($field->primary_key == 1) continue; ?&gt;

<tr>
    <td>&lt;?php echo $field->name; echo ' '.$field->default; ?&gt;</td>
    
    &lt;?php if ($field->type == 'blob'): ?&gt;
    <td>&lt;textarea class="textarea" name="&lt;?php echo $field-&gt;name; ?&gt;" cols="60" rows="10" >&lt;?php echo form_prep($field->default); ?&gt;&lt;/textarea&gt;&lt;/td>
    &lt;?php else : ?&gt;
    <td>&lt;input class="input" name="&lt;?php echo $field-&gt;name; ?&gt;" value="&lt;?php echo form_prep($field->default); ?&gt;" size="60" /></td>
    &lt;?php endif; ?&gt;
    
</tr>
&lt;?php endforeach; ?&gt;
</table>

&lt;input type="submit" class="submit" value="Insert" /&gt;

&lt;/form&gt;

&lt;?php $this->load->view('footer');
/* End of file add.php */
/* Location: ./system/scaffolding/views/add.php */




Theme © iAndrew 2016 - Forum software by © MyBB