function getSingleOrListclass($class) { $table = get_table_from_class($class); $sq = new Sqlite(null, $table); $count = $sq->getCountWhere("parent_clname = '{$this->getClName()}'"); if ($count == 1 && $this->isGte('customer')) { $dlist = $this->getList($class); $d = getFirstFromList($dlist); $url = "a=show&l[class]={$class}&l[nname]={$d->nname}"; } else { $url = "a=list&c={$class}"; } return $url; }