public function CategoriesSL( $parent_id=0, $indent='' ) {
$where = 'WHERE ' . $this->System->db->parse( 'parent = ?i', $parent_id );
$sql_result = $this->System->db->query( "SELECT * FROM ?n " . $where, $this->categories_table );
while ( $row = $this->System->db->fetch( $sql_result ) ) {
$list .= '<option value="' . $row['id'] . '">' . $parent_id . ' ' . $indent . ' ' . $row['name'] . '</option>';
$this->CategoriesSL( $row['id'], $indent=$indent.'---' );
}
return $list;
}