05.08
php
ionix
Note
ionix did not leave a note
ionix did not leave a note
- the link controller
- function search()
- {
- $this->Link->set($this->data);
- if(!$this->Link->validates())
- pr($this->Link->validationErrors);
- $this->set('searched',1);
- $url=$this->data['Link']['url'];
- $this->set('mylinks', $mylinks);
- $this->set('otherlinks', $otherlinks);
- return;
- }
- $this->set('searched', 0);
- }
- The model
- {
- var $name = 'Link';
- )
- );
- }
- And the view
- Searching!<br />
- <?php if($searched==1): ?>
- <table>
- <tr><td colspan="3" align="center"><strong>My sites</b></td></tr>
- <?php foreach($mylinks as $link): ?>
- <?php endforeach; ?>
- </table>
- <p>
- <?php endif;?>
- <table>
- <tr><td colspan="3" align="center"><strong>My sites</b></td></tr>
- <?php foreach($otherlinks as $link): ?>
- <?php endforeach; ?>
- </table>
- <div id="addsite">
- <p><h3>Add a site</h3></p>
- <?php
- ?>
- </div>
- <?php endif;?>
- <?php else: ?>
- <?php endif; ?>
Parsed in 0.271 seconds, using GeSHi 1.0.7.14