type.php
27 lines
| 547 B
| text/x-php
|
PhpLexer
/ include / type.php
| r1 | <?php | |||
| /* Types */ | ||||
| function get_typeByID( $id ) { | ||||
| global $mtdb; | ||||
| $id = (int)$id; | ||||
| $r = $mtdb->getRow( 'SELECT id, name, description FROM strip_t WHERE id=' . $id ); | ||||
| r7 | $r->meta = $mtdb->getAll( 'SELECT meta as id from meta where type=' . $id); | |||
| r1 | return $r; | |||
| } | ||||
| function get_allTypes() { | ||||
| global $mtdb; | ||||
| return $mtdb->getRow( 'SELECT id, name, description, meta FROM strip_t' ); | ||||
| } | ||||
| function get_allMetaTypes() { | ||||
| global $mtdb; | ||||
| return $mtdb->getAll("SELECT id, name FROM meta_t"); | ||||
| } | ||||
| function _getMetaNameFromObject($obj) { | ||||
| return $obj->name; | ||||
| } | ||||
| r7 | ?> | |||
