require_once 'session.ppp' ;
require_once 'local.ppp' ;
require_once 'conf.ppp' ;
require_once 'baselib.ppp' ;
require_once 'wwwsec.ppp' ;
require_once 'librepo.ppp' ;
# $DEBUG = 2 ;
get_config () ;
$conn = db_connect_or_die () ;
test_login () ;
if ( $ADM = GETVAR ( 'ADM' ) ) { switch_actv ( $ADM ) ; }
$USER_GROUPS = user_group_ids () ;
$TIT = REPO_TIT ( 'repository info' ) ;
$RID = GETVAR ( 'RID' ) ;
$repo = get_repo ( $RID ) ;
$name = $repo -> repo_name () ;
$stts = $repo -> cnt_stats () ;
if ( $repo -> has_public () )
{ $meta = meta_line
( 'description', "repocafe repository $name : {$repo->dscr}") ;
}
html_start ( $TIT, '', $meta ) ;
if ( ! $USER and ! $repo -> has_public () )
{ html_exit ( "repo isn't public" ) ; }
elseif ( $USER
and ! $repo -> has_reader ()
and ! $repo -> has_manager ()
)
{ html_exit ( "not your repo" ) ; }
if ( $stts > 1 )
{ echo BQ ( $repo -> plot_url ( '' ) ) ; }
echo H2 ( "repository $name" ) ;
echo BQ ( $repo -> show_top () ) ;
foreach ( $repo -> make_subs () as $sub )
{ if ( $sub -> is_reader () or $sub -> is_manager () )
{ $tag = $sub -> Path () -> tag () ;
$path = 'path ' . ( $path ? "$tag
" : ITA ( $tag ) ) ;
echo H3 ( $path ) ;
echo BQ ( $sub -> show_sub () ) ;
}
}
html_end () ;
?>