getLinhaCampo('categoria', 'permalink', $permalink); $tipo=$categoria['tipo1']; $nivel = 5; if (!$tipo){ $permalink="$arg1/$arg2/$arg3/$arg4/"; $categoria = $db->getLinhaCampo('categoria', 'permalink', $permalink); $tipo=$categoria['tipo1']; $nivel = 4; } if (!$tipo){ $permalink="$arg1/$arg2/$arg3/"; $categoria = $db->getLinhaCampo('categoria', 'permalink', $permalink); $tipo=$categoria['tipo1']; $nivel = 3; } if (!$tipo){ $permalink="$arg1/$arg2/"; $categoria = $db->getLinhaCampo('categoria', 'permalink', $permalink); $tipo=$categoria['tipo1']; $nivel = 2; } if (!$tipo){ $permalink="$arg1/"; $categoria = $db->getLinhaCampo('categoria', 'permalink', $permalink); $tipo=$categoria['tipo1']; $nivel = 1; } $seo_descricao = $categoria['tagdescricao']; $seo_palavras = $categoria['tagpalavras']; //print "link-> $permalink tipo-> $tipo 1-$arg1 2-$arg2 3-$arg3 4-$arg4 5-$arg5
"; //print "1-$arg1 2-$arg2 3-$arg3 4-$arg4 5-$arg5"; //echo $tipo; $narg4="arg".($nivel+3); $narg3="arg".($nivel+2); $narg2="arg".($nivel+1); $narg1="arg".($nivel); if ($arg1=='home'){ $fileinclude= "home.php"; } else if($tipo && $tipo != "nada"){ switch($tipo){ case 'noticia': case 'info': case 'artigo': case 'artigo2': case 'artigomini': if(!$$narg2 || is_numeric($$narg2)) $fileinclude= $tipo . "_lista.php"; else $fileinclude= $tipo . "_detalhe.php"; break; case 'video': case 'agenda': case 'paginas': case 'pagina_artigo': case 'pagina': case 'link': $fileinclude= "$tipo.php"; break; default: $fileinclude= "home.php"; } } else { $fileinclude= "$arg1.php"; } //print $fileinclude; include $fileinclude; //print "$tipo $nivel $arg1 $arg2 $arg3 $arg4 $arg5"; function print_rr($a){ print '
';
	print_r ($a);
	print '
'; } ?>