Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. EntryForm.class.php
  2.  
  3. public function assignVariables(){
  4. parent::assignVariables();
  5. $this->Template->assign( array('entrys' => self::entry()));
  6. }
  7.  
  8. private function entry(){
  9.  
  10. $entrys = array();
  11. $DBentrys = SystemCore::getDB()->sendQuery("SELECT name FROM photos");
  12. while( $item = SystemCore::getDB()->fetchArray($DBentrys) ){
  13. $entrys[] = $item['name'];
  14. }
  15. return $entrys;
  16. }
  17.  
  18. }
  19.  
  20.  
  21. Entry.tpl
  22.  
  23.  
  24. {include file="header.tpl" title="Entry"}
  25.  
  26.  
  27. <form action="?form=Entry" method="post" >
  28. <table border="1">
  29. {foreach from=$entrys item=Entry}
  30. <tr>
  31. <th>{$entrys}</th>
  32. </table>
  33. {/foreach}
  34. </form>
  35. {include file="footer.tpl"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement