-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmv.js
257 lines (221 loc) · 8.76 KB
/
mv.js
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
function showLoad() {$('load').style.display = 'block';}
function hideLoad() {$('load').style.display = 'none';}
function clearTargets() {
clearTargetMessage();
clearTarget1();
clearTarget2();
clearTarget3();
clearTarget4();
clearTarget5();
hideLogo();
}
function hideLogo() {$('logo').style.display = 'none';}
function clearTargetMessage() {$('message').innerHTML = '';}
function clearTarget1() {$('one').innerHTML = '';}
function clearTarget2() {$('two').innerHTML = '';}
function clearTarget3() {$('three').innerHTML = '';}
function clearTarget4() {$('four').innerHTML = '';}
function clearTarget5() {$('five').innerHTML = '';}
function CreateMessage1() {
var url = 'cgi-bin/mv_create_message_1.cgi';
var pars = '';
var target = 'two';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function CreateMessage2() {
var url = 'cgi-bin/mv_create_message_2.cgi';
var pars = Form.serialize('create_message_1');
var target = 'message';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function PreviewMessage1() {
var url = 'cgi-bin/mv_preview_message_1.cgi';
var pars = '';
var target = 'one';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function PreviewMessage2() {
var url = 'cgi-bin/mv_preview_message_2.cgi';
var pars = Form.serialize('preview_message_1');
var target = 'two';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function EditMessage1() {
var url = 'cgi-bin/mv_edit_message_1.cgi';
var pars = '';
var target = 'one';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function EditMessage2() {
var url = 'cgi-bin/mv_edit_message_2.cgi';
var pars = Form.serialize('edit_message_1');
var target = 'two';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function DeleteMessage1() {
var url = 'cgi-bin/mv_delete_message_1.cgi';
var pars = '';
var target = 'one';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function DeleteMessage2() {
var url = 'cgi-bin/mv_delete_message_2.cgi';
var pars = Form.serialize('delete_message_1');
var target = 'message';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function CreateGroup1() {
var url = 'cgi-bin/mv_create_group_1.cgi';
var pars = '';
var target = 'one';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function CreateGroup2() {
var url = 'cgi-bin/mv_create_group_2.cgi';
var pars = Form.serialize('create_group_1');
var target = 'message';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function EditGroup1() {
var url = 'cgi-bin/mv_edit_group_1.cgi';
var pars = '';
var target = 'one';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function EditGroup2() {
var url = 'cgi-bin/mv_edit_group_2.cgi';
var pars = Form.serialize('edit_group_1');
var target = 'two';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function EditGroup3() {
var url = 'cgi-bin/mv_edit_group_3.cgi';
var pars = Form.serialize('edit_group_2');
var target = 'message';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function DeleteGroup1() {
var url = 'cgi-bin/mv_delete_group_1.cgi';
var pars = '';
var target = 'one';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function DeleteGroup2() {
var url = 'cgi-bin/mv_delete_group_2.cgi';
var pars = Form.serialize('delete_group_1');
var target = 'two';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function DeleteGroup3() {
var url = 'cgi-bin/mv_delete_group_3.cgi';
var pars = Form.serialize('delete_group_2');
var target = 'message';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function CreateSubscriber1() {
var url = 'cgi-bin/mv_create_subscriber_1.cgi';
var pars = '';
var target = 'one';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function CreateSubscriber2() {
var url = 'cgi-bin/mv_create_subscriber_2.cgi';
var pars = Form.serialize('create_subscriber_1');
var target = 'message';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function EditSubscriber1() {
var url = 'cgi-bin/mv_edit_subscriber_1.cgi';
var pars = '';
var target = 'one';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function EditSubscriber2() {
var url = 'cgi-bin/mv_edit_subscriber_2.cgi';
var pars = Form.serialize('edit_subscriber_1');
var target = 'two';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function EditSubscriber3() {
var url = 'cgi-bin/mv_edit_subscriber_3.cgi';
var pars = Form.serialize('edit_subscriber_2');
var target = 'message';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function DeleteSubscriber1() {
var url = 'cgi-bin/mv_delete_subscriber_1.cgi';
var pars = '';
var target = 'one';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function DeleteSubscriber2() {
var url = 'cgi-bin/mv_delete_subscriber_2.cgi';
var pars = Form.serialize('delete_subscriber_1');
var target = 'two';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function DeleteSubscriber3() {
var url = 'cgi-bin/mv_delete_subscriber_3.cgi';
var pars = Form.serialize('delete_subscriber_2');
var target = 'message';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function SendMessages1() {
var url = 'cgi-bin/mv_send_messages_1.cgi';
var pars = '';
var target = 'one';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function SendMessages2() {
var url = 'cgi-bin/mv_send_messages_2.cgi';
var pars = Form.serialize('send_messages_1');
var target = 'message';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function SendMessages3() {
var url = 'cgi-bin/mv_send_messages_3.cgi';
var pars = Form.serialize('send_messages_2');
var target = 'message';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function ViewHistory1() {
var url = 'cgi-bin/mv_view_message_history_1.cgi';
var pars = '';
var target = 'one';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function ViewHistory2() {
var url = 'cgi-bin/mv_view_message_history_2.cgi';
var pars = Form.serialize('view_history_1');
var target = 'two';
var myAjax = new Ajax.Updater( target, url, { method: 'post', parameters: pars, onLoading: showLoad, onComplete: hideLoad });
}
function copyToList(from,to) {
fromList = $(from);
toList = $(to);
var sel = false;
for (i=0;i<fromList.options.length;i++) {
var current = fromList.options[i];
if (current.selected) {
sel = true;
txt = current.text;
val = current.value;
toList.options[toList.length] = new Option(txt,val);
fromList.options[i] = null;
i--;
}
}
if (!sel) alert ('Select an option first!');
}
function allSelect(id) {
List = $(id);
if (List.length && List.options[0].value == 'temp') return;
for (i=0;i<List.length;i++) {
List.options[i].selected = true;
}
}
function allCheck(formname,checkname,thestate){
var el_collection=eval("document.forms."+formname+"."+checkname)
for (c=0;c<el_collection.length;c++)
el_collection[c].checked=thestate
}