Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- EntryForm.class.php
- public function assignVariables(){
- parent::assignVariables();
- $this->Template->assign( array('entrys' => self::entry()));
- }
- private function entry(){
- $entrys = array();
- $DBentrys = SystemCore::getDB()->sendQuery("SELECT name FROM photos");
- while( $item = SystemCore::getDB()->fetchArray($DBentrys) ){
- $entrys[] = $item['name'];
- }
- return $entrys;
- }
- }
- Entry.tpl
- {include file="header.tpl" title="Entry"}
- <form action="?form=Entry" method="post" >
- <table border="1">
- {foreach from=$entrys item=Entry}
- <tr>
- <th>{$entrys}</th>
- </table>
- {/foreach}
- </form>
- {include file="footer.tpl"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement