| 13 | | <div class="title_section">Quotes</div> |
| 14 | | <p> |
| 15 | | <?php echo $html->link($html->image('actions/new.png', array("alt"=>"Add new quote", "title"=>"Add new quote")), '#', array("onclick"=>"showhide('add')"), null, false); ?> |
| 16 | | </p> |
| 17 | | <div id="add" style="margin:0;padding:0;padding-left:40px;width:80%;display:none;"> |
| 18 | | <?php echo $html->formTag('/quotes/add/','post'); ?> |
| | 4 | <div class="title_section">Quick News</div> |
| | 5 | |
| | 6 | <script type="text/javascript"> |
| | 7 | <!-- |
| | 8 | function hU() { |
| | 9 | |
| | 10 | var tr = document.getElementById('trh'); |
| | 11 | |
| | 12 | if (tr.style.display == 'none') |
| | 13 | { |
| | 14 | tr.style.display = 'table-row'; |
| | 15 | } else { |
| | 16 | tr.style.display = 'none'; |
| | 17 | } |
| | 18 | } |
| | 19 | --> |
| | 20 | </script> |
| | 21 | |
| | 22 | <p><?php echo $html->link($html->image('admin/new.gif', array("alt"=>"Add new", "title"=>"Add new")), '#', array("onclick"=>"hU()"), false, false); ?></p> |
| | 23 | |
| | 24 | <div id="trh" style="margin:0;padding:0;padding-left:40px;width:80%;display:none;"> |
| | 25 | <?php echo $html->formTag('/admin/quotes/add/','post'); ?> |
| 42 | | foreach ($data as $key=>$val) { |
| 43 | | |
| 44 | | echo "<tr><td>"; |
| 45 | | echo $html->formTag('/quotes/edit/'.$data[$key]['Quote']['id'], 'get'); |
| 46 | | echo $html->submit('Edit'); |
| 47 | | echo "</form>"; |
| 48 | | echo "</td>"; |
| 49 | | |
| 50 | | echo "<td>" . $val['Quote']['quote'] . "</td>"; |
| 51 | | echo "<td>" . $val['Quote']['author'] . "</td>"; |
| 52 | | echo "<td>"; |
| 53 | | echo $html->formTag('/quotes/delete/', 'post', array("onsubmit"=>"return confirm('Are you sure?')")); |
| 54 | | echo $html->hidden('Quote/id', array("value"=>$data[$key]['Quote']['id'])); |
| 55 | | echo $html->submit('Delete'); |
| 56 | | echo "</form>"; |
| 57 | | echo "</td></tr>"; |
| | 49 | foreach ($data as $key=>$val) |
| | 50 | { |
| | 51 | $tr = array ( |
| | 52 | $gags->sendEdit($val['Quote']['id'], 'quotes'), |
| | 53 | $val['Quote']['quote'], |
| | 54 | $val['Quote']['author'], |
| | 55 | $gags->confirmDel($val['Quote']['id'], 'quotes') |
| | 56 | ); |
| | 57 | |
| | 58 | echo $html->tableCells($tr, array("class"=>"altRow", "onmouseover"=>"this.className='highlight'", "onmouseout"=>"this.className='altRow'"), |
| | 59 | array('class'=>'evenRow',"onmouseover"=>"this.className='highlight'", "onmouseout"=>"this.className='evenRow'")); |