{php}
$category=$this->GetMysqlArray('*'," ".$this->GetTable('category')." WHERE type='$this->app' AND upid=0 ORDER BY displayorder ASC");
{/php}
{if $category}
{for $category $value}
{php}
$categorysubarr=$this->GetMysqlArray('*'," ".$this->GetTable('category')." WHERE type='$this->app' AND upid='$value[catid]' ORDER BY displayorder ASC");
{/php}
{if $categorysubarr}
{for $categorysubarr $categorysub}