-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.htm
More file actions
148 lines (143 loc) · 5.23 KB
/
index.htm
File metadata and controls
148 lines (143 loc) · 5.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<?xml version="1.0" encoding="UTF-8"?>
<%args>
$lang => ''
$cowc => 'XXXX'
$style => ''
</%args>
<%perl>
use lib '/var/www/ccow-m';
use Manatee;
use ManateeSQL;
$style = substr($style,0,3);
my $dbh = &ManateeSQL::getDB();
my %config = &Manatee::loadConfig($style);
my %var = &Manatee::helpVars($lang,$cowc,$dbh);
if (length($style)){ $var{style} = "style=$style"; }
my @crumbs;
my @subcats;
if (length($var{lang}) != 0) {
@crumbs = ManateeSQL::glotCrumbs($dbh,$var{code},$var{stage},$lang,$var{style});
$var{crumbs} = scalar(@crumbs); # how many crumbs?
$var{crumbdiv} = ($var{crumbs} > 0 and index("xX",substr($var{code},0,1)) eq -1) ? 1 : 0;
if ($var{showsubs}) {
@subcats = ManateeSQL::glotSubs($dbh,$var{code},$var{stage},$lang);
for (my $i = 0; $i < scalar(@subcats); $i++) {
if (substr($subcats[$i][2],0,1) eq '[') {
$var{suggsubs} = 1;
$i = 255;
}
}
}
}
my $qs = "";
if (length($var{lang})) { $qs = "?lang=".$var{lang}."&cowc=".$cowc; }
if (length($var{style})) { $qs = $qs."&".$var{style}; }
</%perl>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3c.org/1999/xhtml" lang="EN">
<head>
<title><% $config{site} %>: <% $var{title} %></title>
<link rel="stylesheet" type="text/css" href="static/main.css" />
% if(length($config{custom})){
<link rel="stylesheet" type="text/css" href="static/<% $config{custom} %>.css" />
%}
</head>
<body>
% if(length($config{logo})){
<div class="logo"><img src="img/<% $config{logo} %>" alt="<% $config{logodesc} %>" title="<% $config{logodesc} %>" /></div>
% }
% if ($var{crumbs}) {
<ul class="loaf" id="breadtrail">
% foreach my $i (0..$var{crumbs}-1){
<li class="crumb" id="sm0<% $crumbs[$i][0] %>"><a href="<% $crumbs[$i][1] %>"><% $crumbs[$i][2] %></a>
% if ($var{crumbdiv}) {
>
% }
</li>
% }
</ul>
% }
<p class="clearit"> </p>
<& ccowmenu.comp, 'uri'=>$var{uri}, 'query'=>$qs &>
% if (length($var{code})) {
% if (length($var{expl})) {
<h1 id="sm17"><% $var{catname} %></h1>
<div class="content" id="sm18">
<div class="menu" id="sm16">
% } else {
<h1 id="sm11">#<% $var{cattrim} %>: <% $var{catname} %></h1>
<div class="content" id="sm12">
<div class="menu" id="sm14" style="border-color: #<% $var{border} %>;">
% }
% if (-e "$config{localpath}/$var{catinf}") {
<& $var{catinf} &>
% } else {
<& cats/dhandler &>
% print $var{noinf};
% }
% if ($var{suggsubs} && length($config{sugurl})) {
You can help fill out this category. Visit <a href="<% $config{sugurl} %>?lang=<% $var{lang} %>&cowc=<% $var{code} %>
% if (length($var{style})) {
&<% $var{style} %>
% }
"><% $var{code} %> Divisions</a> to help.
% }
% if (length($var{cattrim}) and not $var{y}) {
<p class="note" id="sm01">If you are searching for <% $var{catname} %>, add <strong>cowc:#<% $var{cattrim} %></strong> to your search criteria.</p>
% }
% if ($var{dosnip} == 1) {
% if (length($var{catmul})) {
<p class="sugg" id="sm03">If the site/work covers multiple categories, its category might be <a href="?lang=<% $var{lang} %>&cowc=<% $var{catmul} %>
% if (length($var{style})) {
&<% $var{style} %>
% }
"> #<% $var{catmul} %>: <% $var{muldesc} %></a>, and the code to designate it as such would be <strong><meta name="cowc" content="#<% $var{catmul} %>" /></strong>.</p>
% } else {
<p class="note" id="sm13">The snippet for this category is: <strong><meta name="cowc" content="#<% $var{code} %>" /></strong></p>
% }
<p class="note" id="sm02">You can add this snippet to your HTML's head section to enable search engines that use CCOW to categorize your site.</p>
<p class="drill" id="sm15">If this is not correct, choose a more specific category from the list below:</p>
% }
% if ($var{showsubs}) {
<p class="clearit"> </p>
% for (my $i=0; $i < scalar(@subcats); $i++) {
<p class="subcat"><a href="?lang=<% $var{lang} %>&cowc=<% $subcats[$i][0] %>
% if (length($var{style})) {
&<% $var{style} %>
% }
"><% $subcats[$i][1] %>: <% $subcats[$i][2] %></a></p>
% }
% }
<p class="clearit"> </p>
</div>
</div>
% }
% if (length($var{lang}) == 0) {
<h1 id="sm10"><% $var{title} %></h1>
<div class="languages">
<p class="lingua"><a href="?lang=en
% if(length($var{style})){
&<% $var{style} %>
% }
">Language: English</a></p>
<p class="lingua"><a href="?lang=es
% if(length($var{style})){
&<% $var{style} %>
% }
">Idioma: Español</a></p>
</div>
% }
<a href="progress.htm"><% $var{progress} %></a>
% my $t = length($lang) ? $lang : "en";
<p class="clearit">Don't know what these categories mean? Check out <a href="?lang=<% $t %>&cowc=yxxx
% if(length($var{style})){
&<% $var{style} %>
% }
">Category Explanation</a>
<p class="clearit"> </p>
<div class="cc" id="sm11">This helper application is released under a <a href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-Share Alike</a> license.
<p>The contents of the translation and description files are released under a <a href="http://creativecommons.org/licenses/by-nd/3.0/">CC Attribution-No Derivative Works</a> license.</p> (C) copyright 2009-2013 by the Manatee Project Workgroup.</div>
<p class="source" id="sm12">You can obtain the source for this program at https://github.com/over2sd/Manatee/</p>
<& footer.comp &>
</body>
</html>