if {[info exists login]} {
puts "Logged in as $login"
html " · Logout"
} else {
puts "Not logged in"
html " · Login"
}
set is_index [expr [string compare [string range $current_page 0 4] "index"]==0]
set is_home [expr [string compare [string range $current_page 0 [expr [string length $index_page]-1] ] $index_page]==0]
if {$is_index || $is_home} {
html "- Home
\n"
} else {
html "- Home
\n"
}
if {[hascap j]} {
if {[string compare [string range $current_page 0 3] "wiki"] == 0} {
html "- Wiki
\n"
} else {
html "- Wiki
\n"
}
}
if {[anycap jor]} {
if {[string compare $current_page "timeline"] == 0} {
html "- Timeline
\n"
} else {
html "- Timeline
\n"
}
}
if {[hascap oh]} {
if {[string compare [string range $current_page 0 2] "dir"] == 0} {
html "- Files
\n"
} else {
html "- Files
\n"
}
}
if {[hascap o]} {
if {[string compare $current_page "brlist"] == 0} {
html "- Branches
\n"
} else {
html "- Branches
\n"
}
if {[string compare $current_page "taglist"] == 0} {
html "- Tags
\n"
} else {
html "- Tags
\n"
}
}
if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
if {[string compare $current_page "forum"] == 0} {
html "- Forum
\n"
} else {
html "- Forum
\n"
}
}
if {[hascap r]} {
if {[string compare $current_page "reportlist"] == 0} {
html "- Tickets
\n"
} else {
html "- Tickets
\n"
}
}
if {[hascap s]} {
if {[string compare [string range $current_page 0 4] "setup"] == 0} {
html "- Admin
\n"
} else {
html "- Admin
\n"
}
} elseif {[hascap a]} {
if {[string compare [string range $current_page 0 4] "setup"] == 0} {
html "- Users
\n"
} else {
html "- Users
\n"
}
}