function perehod(){
global $db, $prefix;
sp_tableopen();
$sqlinfo="SELECT c.id as cid, c.name as cname, c.stats as cstats, c.position as cposition, f.id as fid, f.name as fname, f.fdesc as ffdesc, f.cat as fcat, f.totaltopics as ftopics, f.last_post as flast_post, f.last_user as flast_user, f.last_topic as flast_topic, f.totalposts as fposts, f.last_tid as flast_tid, f.status as fstatus, f.position as fposition, f.moders as fmoders from ".$prefix."_forum_cats c, ".$prefix."_forum_forums f where f.cat=c.id order by c.position, f.position";