forked from cl4u2/ninuxoo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ninuxoo.html
232 lines (227 loc) · 8.27 KB
/
ninuxoo.html
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<!-- outputhead -->
<!DOCTYPE html>
<html>
<head>
<title>NinuXoo! - Ninux.org</title>
<base href="./" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="author" content="Ninux.org Community - the Ninux Software Team" />
<meta name="description" content="Ninux.org search engine" />
<link rel="shortcut icon" href="common/media/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="common/css/main.css" type="text/css" media="screen" />
<script type="text/javascript" src="common/js/jquery-1.7.2.min.js"></script>
<link rel="stylesheet" href="common/js/jquery.treeview/jquery.treeview.css" type="text/css" media="screen" />
<script type="text/javascript" src="common/js/jquery.treeview/jquery.treeview.js"></script>
<link href="common/js/zoombox/zoombox.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="common/js/zoombox/zoombox.js"></script>
<script type="text/javascript" src="common/js/jquery.qtip-1.0.0-rc3.min.js"></script>
<script type="text/javascript" src="common/js/qtip-integration.js"></script>
<script type="text/javascript">
$.ultrie = function(resourcetrie, resuri, realuri) {
res = ""
res1 = ""
newli = false
fork = false
nres = resourcetrie.resources.length;
$.each(resourcetrie.children, function(index, child) {
if(child.resources.length < nres)
fork = true;
});
if(fork && (resourcetrie.label.indexOf('smb:') != 0 && resourcetrie.label.indexOf('ftp:') != 0)) {
res1 += "<li class='label collabsable folder'><span class='folder'><a href='"
res1 += "/cgi-bin/browse_share.cgi?url=" + realuri + "/";
res1 += "'>";
res1 += resuri;
res1 += "/ </a>";
res1 += "</span>"
newli = true
}
if(resourcetrie.resources.length > 0) {
if(!fork) {
res1 += "<li class='label collabsable folder'><span class='folder'><a href='";
res1 += "/cgi-bin/browse_share.cgi?url=" + realuri + "/";
res1 += "'>";
res1 += resuri;
res1 += "/ </a>";
res1 += "</span>"
}
res1 += "<ul>"
$.each(resourcetrie.resources, function(index, resource) {
res1 += '<li class="result"><span class="file"><a href="';
/*res1 += resource.uri;*/
res1 += "/cgi-bin/samba/smbfile.pl/"
res1 += resource.server + "/"
res1 += resource.share + "/"
res1 += resource.filesize + "/\\"
res1 += resource.path.replace("/", "\\")
res1 += "\\/" + resource.filename
res1 += '">'
res1 += resource.filename
res1 += '</a></span></li>'
});
res1 += "</ul>";
if(!fork) {
res1 += "</li>";
newli = true;
resuri = "";
}
}
$.each(resourcetrie.children, function(index, child) {
if(child.label.indexOf('smb:') != 0 && child.label.indexOf('ftp:') != 0) {
if(child.resources.length < nres) {
res1 += $.ultrie(child, "/" + child.label, realuri + "/" + child.label)
} else {
res1 += $.ultrie(child, resuri + "/" + child.label, realuri + "/" + child.label)
}
} else {
res1 += $.ultrie(child, "/", child.label + "/")
}
});
if(fork && (resourcetrie.label.indexOf('smb:') != 0 && resourcetrie.label.indexOf('ftp:') != 0)) {
res1 += "</li>"
}
if(newli)
res = "<ul>" + res1 + "</ul>\n"
else
res = res1
return res;
};
$(document).ready(function() {
$("#results").hide();
$("#resultstree").html("");
$("#searchform").submit(function(e) {
e.preventDefault();
$("#searchlabels").html("");
$("#resultstree").html("");
$.getJSON('/cgi-bin/json.cgi', $(this).serializeArray(), function(data) {
s = "Ricerca di "" + data.q + """;
$("#searchwhat").html(s);
s = data.nresults + " risultati trovati in " + Math.round(data.searchtime*100)/100 + " secondi";
$("#resstats").html(s);
i = 0;
$("#searchwhat").html(data.q);
$.each(data.results, function(index, value) {
if(data.exactresult)
s = "<li class='exactresult'>";
else
s = "<li class='otherresult'>";
s += "<a href='#res" + index + "'>";
s += value.resultlabel;
s += "</a><span>";
s += value.nresults;
s += " risultati</span></li>";
$("#searchlabels").append(s);
s = "<h1 class='resultlabel'>" + value.resultlabel + "</h1>";
$("#resultstree").append(s);
s = $.ultrie(value.resourcetrie, "", "");
$("#resultstree").append(s);
});
$("#results").show();
});
return false;
});
$("#whatsnew").click(function(e) {
e.preventDefault();
$.getJSON('/cgi-bin/json.cgi', 'op=whatsnew', function(data) {
$("#page_content_main").html(data.nresults);
});
return false;
});
$.getJSON('/cgi-bin/json.cgi', 'op=resourcestats', function(data) {
$("#resstats").html(data.result + " files indicizzati ");
$.getJSON('/cgi-bin/json.cgi', 'op=serverstats', function(data) {
$("#resstats").append("su " + data.result);
$("#resstats").append(" <a href='/cgi-bin/browse_share.cgi' title='Esplora i files i condivisione'>Server</a>");
});
});
});
</script>
</head>
<body>
<div id="top_menu">
<table>
<tr>
<td>
<ul>
<li><a href="#" id="whatsnew" title="Nuovi files indicizzati">Novità</a></li>
<li><a href="/cgi-bin/browse_share.cgi" title="Esplora i files i condivisione">Condivisioni</a></li>
<li><a href="http://10.168.177.178:8888/" title="Ascolta la musica in rete">Juke Box</a></li>
<li><a href="cgi-bin/proxy_wiki.cgi?url=Elenco_Telefonico_rete_VoIP_di_ninux.org" title="Elenco telefonico"><acronym title="Voice over IP">VoIP</acronym></a></li>
<li><a href="http://10.168.43.127/meteo/" title="Visualizza dati meteo in tempo reale">Meteo Roma</a></li>
<li class="separator"> </li>
<li><a href="http://blog.ninux.org/" title="Vai al nostro Blog">Blog</a></li>
<li><a href="http://wiki.ninux.org/" title="Vai al nostro Wiki">Wiki</a></li>
</ul>
</td>
<td>
<ul id="second_menu">
<li><a href="http://10.162.0.85/" title="Controlla la posta">Posta</a></li>
</ul>
</td>
</tr>
<tr><td> </td></tr>
</table>
</div>
<div id="main_container">
<div id="main_header">
<table>
<tr>
<td>
<a href="javascript:void(0);" onclick="load_content('home');">
<img src="common/media/img/logo.png" alt="Logo Ninuxoo" />
</a>
</td>
</tr>
</table>
</div>
<div id="container">
<div id="content">
<table id="main_search" cellspacing="0" cellpadding="0">
<tr>
<td>
<form id="searchform" action="#" method="get">
<input type="hidden" name="op" value="query" style="display: none;">
<input type="hidden" name="nresults" value="200" style="display: none;">
<input type="search" name="q" value="" placeholder="Cerca in Ninuxoo" >
<input type="submit" value="" style="display: none;">
</form>
</td>
<td>
<a href="Ricerca_avanzata" title="Ricerca avanzata"></a>
</td>
</tr>
</table>
<div id="page_content_main">
<div id="resstats" class="resstats"></div>
</div>
</div>
<div id="results">
<div id="page_content">
<h1 id="searchwhat"></h1>
<h2 id="resstats" class="resstats"></h2>
<div id="right_menu">
<h3>STATISTICHE<span>di ricerca</span></h3>
<ul id="searchlabels">
</ul>
</div>
<div class="search_results">
<ul id="research_term_control" class="treecontrol">
<li><a href="javascript:void(0);" title="Espandi tutti gli alberi" class="open"></a></li>
<li><a href="javascript:void(0);" title="Racchiudi tutti gli alberi" class="close"></a></li>
<li><a href="javascript:void(0);" title="Inverti modalità: se aperto chiudi, se chiuso apri" class="toggle"></a></li>
</ul>
<ul id="resultstree" class="exactresults filetree treeview">
</ul>
</div>
</div>
</div>
<!-- end outputhead -->
<!-- outputtail -->
<div id="footer">
Powered by Ninux Community ~ the Ninux Software & Communication Team :: used icons made by <a href="http://www.picol.org/" target="_blank" title="PIctorial COmmunication Language - Richiede inoltro a Internet">Picol project</a>
</div>
</div>
</div>
</body>
</html>
<!-- end outputtail -->