| 8 | | <p><a href="/vinculums/add/<?php echo $catfaq_id?>">Add acquaintance</a></p> |
| | 12 | var tr = document.getElementById('trh'); |
| | 13 | |
| | 14 | if (tr.style.display == 'none') |
| | 15 | { |
| | 16 | tr.style.display = 'table-row'; |
| | 17 | } else { |
| | 18 | tr.style.display = 'none'; |
| | 19 | } |
| | 20 | } |
| | 21 | --> |
| | 22 | </script> |
| | 23 | |
| | 24 | <p><?php echo $html->link($html->image('admin/new.gif', array("alt"=>"Add new link", "title"=>"Add new link")), '#', array("onclick"=>"hU()"), false, false); ?></p> |
| | 25 | |
| | 26 | <div id="trh" style="margin:0;padding:0;padding-left:40px;width:80%;display:none;"> |
| | 27 | <?php echo $html->formTag('/admin/acquaintances/add/','post'); ?> |
| | 28 | <fieldset> |
| | 29 | <legend>New Acquaintance</legend> |
| | 30 | <?php echo $form->labelTag('Acquaintance/name', 'Description:'); ?><br /> |
| | 31 | <?php echo $html->input('Acquaintance/name', array("size" => 30, "maxlength"=>50)); ?> |
| | 32 | <?php echo $html->tagErrorMsg('Acquaintance/name', 'A name is required.'); ?> |
| | 33 | <br /><br /> |
| | 34 | <?php echo $form->labelTag('Acquaintance/url', 'URL:') . "<br />"; ?> |
| | 35 | <?php echo $html->input('Acquaintance/url', array("size" => 60, "maxlength"=>300, "value"=>"http://")); ?> |
| | 36 | <?php echo $html->tagErrorMsg('Acquaintance/url', 'An author is required.'); ?> |
| | 37 | |
| | 38 | <div style="clear:both"></div> |
| | 39 | <?php echo $html->submit('Add') ?> |
| | 40 | </fieldset> |
| | 41 | </form> |
| | 42 | |
| | 43 | </div> |
| | 44 | <?php $session->flash(); ?> |
| | 45 | <table style="width:100%"> |
| 11 | | foreach ($data as $key => $val) { |
| 12 | | echo '<p><b>'.$data[$key]['Vinculum']['question'].'</b></p>'; |
| 13 | | echo '<p>'.$data[$key]['Vinculum']['answer'] . '</p><hr />'; |
| 14 | | echo '<p><a href="/vinculums/edit/'.$data[$key]['Vinculum']['id'].'">Edit</a></p><hr />'; |
| 15 | | } |
| | 50 | //var_dump($data); |
| | 51 | foreach ($data as $key=>$val) |
| | 52 | { |
| | 53 | $tr = array ( |
| | 54 | $gags->sendEdit($val['Acquaintance']['id'], 'acquaintances'), |
| | 55 | $val['Acquaintance']['name'], |
| | 56 | $html->link($val['Acquaintance']['url'], $val['Acquaintance']['url']), |
| | 57 | $gags->confirmDel($val['Acquaintance']['id'], 'acquaintances') |
| | 58 | ); |
| | 59 | |
| | 60 | echo $html->tableCells($tr, array("class"=>"altRow", "onmouseover"=>"this.className='highlight'", "onmouseout"=>"this.className='altRow'"), |
| | 61 | array('class'=>'evenRow',"onmouseover"=>"this.className='highlight'", "onmouseout"=>"this.className='evenRow'")); |
| | 62 | } |