Add most necessary files for admin interface.
Add most necessary files for admin interface.

File last commit:

c1e4c31f199d
c1e4c31f199d
Show More
type.php
26 lines | 547 B | text/x-php | PhpLexer
<?php
/* Types */
function get_typeByID( $id ) {
global $mtdb;
$id = (int)$id;
$r = $mtdb->getRow( 'SELECT id, name, description FROM strip_t WHERE id=' . $id );
$r->meta = $mtdb->getAll( 'SELECT meta as id from meta where type=' . $id);
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;
}
?>