{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}
{php} $uptask=$this->GetMysqlOne('hid,subject'," ".$this->GetTable('help')." WHERE hid<'$hid' ORDER BY hid DESC LIMIT 0,1"); {/php}
{php} $nexttask=$this->GetMysqlOne('hid,subject'," ".$this->GetTable('help')." WHERE hid>'$hid' LIMIT 0,1"); {/php}