PageSourceSearch

https://nbcc.co.uk/components/com_breezingforms/facileforms.js

js nbcc.co.uk collected 2026-10-02 14:50:24 UTC 3,272 bytes, 117 lines download raw bytes

1/**
2* BreezingForms - A Joomla Forms Application
3* @version 1.9
4* @package BreezingForms
5* @copyright (C) 2008-2020 by Markus Bopp
6* @license Released under the terms of the GNU General Public License
7**/
8function swal(msg){
9
10	alert(msg);
11
12}
13function ff_traceWindow()
14{
15       if(typeof console != "undefined" && typeof console.log == "function" ){
16           console.log("BF-Trace", ff_processor.traceBuffer);
17       }
18} // ff_traceWindow
19
20function ff_trim(s)
21{
22	var n = s.length;
23	if (n == 0) return '';
24	var b = 0;
25	var ws = ' \r\n\t';
26	while (b<n && ws.indexOf(s.charAt(b))>=0) b++;
27	if (b == n) return '';
28	while (ws.indexOf(s.charAt(n-1))>=0) n--;
29	return s.substring(b,n);
30} // ff_trim
31
32function ff_redirect(url)
33{
34	var target = 'self';
35	if (arguments.length>1) target = arguments[1].toLowerCase();
36	var method = 'post';
37	if (arguments.length>2) method = arguments[2].toLowerCase();
38	switch (method) {
39		case 'get':
40			switch (target) {
41				case 'top':
42					top.location.href = url;
43					break;
44				case 'parent':
45					parent.location.href = url;
46					break;
47				default: // self
48					document.location.href = url;
49			} // switch
50			break;
51		default: { // post
52			var f = document.createElement('form');
53			var pos = url.indexOf('?');
54			var params = new Array();
55			if (pos < 0) {
56				f.action = url;
57			} else {
58				f.action = url.substring(0, pos) +'?';
59				var pms = url.substring(pos+1, url.length).split('&');
60				for (var p = 0; p < pms.length; p++) {
61					var pm = pms[p].split('=');
62					var prop = '';
63					if (pm.length > 0) prop = ff_trim(pm[0]);
64					var val = '';
65					if (pm.length > 1 ) val = ff_trim(unescape(pm[1]));
66					if (prop!='' && val!='' && prop.indexOf('ff_')==0) {
67                                          params[params.length] = new Array(prop, val);
68                                        }
69                                        else if (prop!='' && val!='') {
70                                          f.action += '&' +prop +'=' +val;
71                                        }
72				} // for
73			} // if
74			f.name = 'ff_redirect';
75			f.method = 'post';
76			f.enctype = 'multipart/form-data';
77			switch (target) {
78				case 'blank' : f.target = '_blank';  break;
79				case 'top'   : f.target = '_top';    break;
80				case 'parent': f.target = '_parent'; break;
81				default      : f.target = '_self';
82			} // switch
83			var p;
84			for (p = 0; p < params.length; p++) {
85				var e = document.createElement('input');
86				e.type = 'hidden';
87				e.name = params[p][0];
88				e.value = params[p][1];
89				f.appendChild(e);
90			} // for
91			document.body.appendChild(f);
92			f.submit();
93		} // post
94	} // switch
95} // ff_redirect
96
97function ff_redirectParent(url)
98{
99	var method = 'post';
100	if (arguments.length>1) method = arguments[1].toLowerCase();
101	if (ff_processor.inframe)
102		ff_redirect(url, 'parent', method);
103	else
104		ff_redirect(url, 'self', method);
105} // ff_redirectParent
106
107function ff_redirectTop(url)
108{
109	var method = 'post';
110	if (arguments.length>1) method = arguments[1].toLowerCase();
111	ff_redirect(url, 'top', method);
112} // ff_redirectTop"
113
114function ff_returnHome()
115{
116	ff_redirectParent(ff_processor.homepage);
117} // ff_returnHome

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.