forked from asxzy/Program-O
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.page.htm
More file actions
1454 lines (1442 loc) · 67.9 KB
/
default.page.htm
File metadata and controls
1454 lines (1442 loc) · 67.9 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
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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html>
<head>
<meta charset="[charset]">
<title>[pageTitle]</title>
<link rel="stylesheet" href="[styleSheet]" [mediaType] type="text/css"/>
[extraCSS][noLeftNav][noRightNav][upperScripts][errMsgStyle]
</head>
<!-- Section Header End -->
<!-- Section PageBody Start -->
[blank]
<body>
<div id="script_version">[version]</div>
<div id="wrapper">
[logo]
[topNav]
[leftNav]
[main]
[rightNav]
[footer]
</div>
[lowerScripts]
</body>
</html>
<!-- Section PageBody End -->
Individual sections are placed after this section. This comment should NEVER be visible on any page!
<!-- Section Logo Start -->
[blank]
<div id="logo">[pageTitleInfo]</div>
<!-- Section Logo End -->
<!-- Section TopNav Start -->
[blank]
<div id="top_nav">
[divDecoration]
<ul>
[topNavLinks]
</ul>
</div>
<!-- Section TopNav End -->
You don't even have to place documentation within comment tags, since the sections
between the start and end section tags are the only parts of the template that are displayed.
<!-- Section LeftNav Start -->
[blank]
<div id="left_nav">
[divDecoration]
[navHeader]
<ul>
[leftNavLinks]
</ul>
</div>
<!-- Section LeftNav End -->
<!-- Section Main Start -->
[blank]
<div id="errMsg" class="errMsg">
<div class="closeButton" id="closeButton" onclick="closeStatus('errMsg')" title="Click to hide"> </div>
[errMsg]
</div>
<div id="main">
[divDecoration]
<div id="main_title">
[mainTitle]
</div>
<div id="main_content">
[mainContent]
</div>
</div>
<!-- Section Main End -->
<!-- Section RightNav Start -->
[blank]
<div id="right_nav">
[divDecoration]
[navHeader]
[rightNavLinks]
</div>
<!-- Section RightNav End -->
<!-- Section Footer Start -->
[blank]
<div id="footer">
[divDecoration]
<div class="validXHTML">
<a href="http://validator.w3.org/check?uri=referer">
<img src="images/html5_valid.png" title="Valid HTML5" alt="Valid HTML5" height="31" width="88" style="border: none"/>
</a>
</div>
<div id="footer_content">
[FooterInfo]
</div>
<div class="validCSS">
<a href="http://jigsaw.w3.org/css-validator/check/referer">
<img style="border:0;width:88px;height:31px" src="images/vcss.gif" alt="Valid CSS!" title="Valid CSS!"/>
</a>
</div>
</div>
<!-- Section Footer End -->
<!-- Section NavHeader Start -->
[blank]
<div class="nav_header">[headerTitle]</div>
<!-- Section NavHeader End -->
<!-- Section NavLink Start -->
[blank]
<li>
<div [linkClass]>
[divDecoration]
<a [linkHref][linkOnclick][linkTitle]>
[linkLabel]
</a>
</div>
</li>
<!-- Section NavLink End -->
<!-- Section DivDecoration Start -->
[blank]
<div class="ul"></div>
<div class="ll"></div>
<div class="ur"></div>
<div class="lr"></div>
<!-- Section DivDecoration End -->
<!-- Section TitleSpan Start -->
[blank]
<div id="title">
<div id="titlespan">
[divDecoration]
<span class="orange">My</span> Program-O
</div>
</div>
<!-- Section TitleSpan End -->
<!-- Section NoRightNav Start -->
[blank]
<style type="text/css">
#right_nav {
display: none;
}
#main {
right: 25px;
}
</style>
<!-- Section NoRightNav End -->
<!-- Section NoLeftNav Start -->
[blank]
<style type="text/css">
#left_nav {
display: none;
}
#main {
left: 25px;
}
</style>
<!-- Section NoLeftNav End -->
<!-- Section ShowError Start -->
[blank]
<style type="text/css">
.errMsg {
display: block;
}
</style>
<!-- Section ShowError End -->
<!-- Section HideError Start -->
[blank]
<style type="text/css">
.errMsg {
display: none;
}
</style>
<!-- Section HideError End -->
<!-- Section ErrorMessage Start -->
[blank]
<div class="errMsg">[errorMessage]</div>
<!-- Section ErrorMessage End -->
<!-- Section LoginForm Start -->
[blank]
<div id="form_table">
<fieldset>
<legend>Login</legend>
<form id="fm-form" method="post" action="index.php?page=login">
<div class="row center">
<label for="user_name">Username:</label>
<input name="user_name" id="user_name" type="text" maxlength="255" size="15"/>
</div>
<div class="row">
<label for="pw">Password:</label>
<input name="pw" id="pw" type="password" autocomplete="off" maxlength="255" size="15"/><br/>
</div>
<div class="row">
<input value="Submit" type="submit"/>
</div>
</form>
</fieldset>
</div>
<!-- Section LoginForm End -->
<!-- Section ChangeBot Start -->
<!--fieldset-->
[blank]
<form id="changebot" action="index.php?page=select_bots" method="post">
<div>
<label>Change Active Bot</label>
<select name="bot_id" id="bot_id" onchange="submit()">
[options]
</select>
<input type="hidden" id="action" name="action" value="change"/>
Bot ID: <input style="text-align: center" type="text" size="1" disabled="disabled" value="[bot_id]"/> (Not
Editable)
</div>
</form>
<!--/fieldset-->
<!-- Section ChangeBot End -->
<!-- Section SelectBotForm Start -->
[blank]
<!--fieldset-->
<form id="botAttributes" action="index.php?page=select_bots" method="post">
<div class="leftHalf noBorder">
<table class="_formTable">
<tr>
<td width="40%"><label for="bot_name"><span class="label">Bot Name</span></label></td>
<td width="60%">
<span class="formw">
<input type="text" class="fm-req" id="bot_name" name="bot_name" value="[bot_name]"/>
</span>
</td>
</tr>
<tr>
<td><label for="bot_active"><span class="label">Bot Active</span></label></td>
<td>
<span class="formw">
<select name="bot_active" id="bot_active">
<option value="1" [sel_yes]>Yes</option>
<option value="0" [sel_no]>No</option>
</select>
</span>
</td>
</tr>
<tr>
<td><label for="format"><span class="label">Response Format</span></label></td>
<td>
<span class="formw">
<select name="format" id="format">
<option value="html" [sel_html]>HTML</option>
<option value="xml" [sel_xml]>XML</option>
<option value="json" [sel_json]>JSON</option>
</select>
</span>
</td>
</tr>
<tr>
<td><label for="unknown_user"><span class="label">Unknown User</span></label></td>
<td>
<span class="formw">
<input type="text" name="unknown_user" id="unknown_user" value="[bot_unknown_user]">
</span>
</td>
</tr>
<tr>
<td><label for="debugemail"><span class="label">Debug Email Address</span></label></td>
<td>
<span class="formw">
<input type="text" name="debugemail" id="debugemail" value="[bot_debugemail]"/>
</span>
</td>
</tr>
<tr>
<td>
<label for="default_aiml_pattern">
<span class="label">Default Pickup Line Pattern</span>
</label>
</td>
<td>
<span class="formw">
<input type="text" name="default_aiml_pattern" id="default_aiml_pattern" value="[bot_default_aiml_pattern]"/>
</span>
</td>
</tr>
<tr>
<td><label for="error_response"><span class="label">Error Response Message</span></label></td>
<td>
<span class="formw">
<input type="text" name="error_response" id="error_response" value="[bot_error_response]"/>
</span>
</td>
</tr>
<tr>
<td colspan="2" class="center">
<span class="label">The chatbot "[bot_name]" has [aiml_count] AIML categories in the database.</span>
</td>
</tr>
</table>
</div>
<div class="rightHalf noBorder">
<table class="_formTable">
<tr>
<td width="40%"><label for="bot_desc"><span class="label">Bot Description</span></label></td>
<td width="60%">
<span class="formw">
<textarea id="bot_desc" name="bot_desc">[bot_desc]</textarea>
</span>
</td>
</tr>
<tr>
<td><label for="bot_parent_id"><span class="label">Bot Parent Name</span></label></td>
<td>
<span class="formw">
<select name="bot_parent_id" id="bot_parent_id">
[parent_options]
</select>
</span>
</td>
</tr>
<tr>
<td><label for="save_state"><span class="label">Save State</span></label></td>
<td>
<span class="formw">
<select name="save_state" id="save_state">
<option value="session" [sel_session]>Session</option>
<option value="database" [sel_db]>Database</option>
</select>
</span>
</td>
</tr>
<tr>
<td><label for="default_remember_up_to"><span class="label">Bot History Lines</span></label></td>
<td>
<span class="formw">
<input type="text" class="fm-req" id="remember_up_to" name="remember_up_to" value="[remember_up_to]"/>
</span>
</td>
</tr>
<tr>
<td><label for="conversation_lines"><span class="label">Chat Lines To Display</span></label></td>
<td>
<span class="formw">
<input type="text" class="fm-req" id="conversation_lines" name="conversation_lines" value="[bot_conversation_lines]"/>
</span>
</td>
</tr>
<tr>
<td><label for="debugmode"><span class="label">Debug Mode</span></label></td>
<td>
<span class="formw">
<select name="debugmode" id="debugmode">
<option value="0" [dm_]>source code view - show debugging in source code</option>
<option value="1" [dm_i]>file log - log debugging to a file</option>
<option value="2" [dm_ii]>page view - display debugging on the webpage</option>
<option value="3" [dm_iii]>email each conversation line (not recommended)</option>
</select>
</span>
</td>
</tr>
<tr>
<td><label for="debugshow"><span class="label">Debug Level</span></label></td>
<td>
<span class="formw">
<select name="debugshow" id="debugshow">
<option value="0" [ds_]>Show no debugging</option>
<option value="1" [ds_i]>errors only</option>
<option value="2" [ds_ii]>general + errors</option>
<option value="3" [ds_iii]>general + errors + sql</option>
<option value="4" [ds_iv]>show everything</option>
</select>
</span>
</td>
</tr>
<tr>
<td>
<label for="useBranch">
<span class="label">GitHub Branch to Check for Updates</span><span class="big red bold">*</span>
</label>
</td>
<td>
<select name="useBranch" id="useBranch">
<option value="master" [bSelOptM]>Master</option>
<option value="dev" [bSelOptD]>Development</option>
</select>
</td>
</tr>
</table>
</div>
<input type="hidden" id="bot_id" name="bot_id" value="[bot_id]"/>
<div id="fm-submit" class="row fm-req center">
<input type="submit" name="action" id="action" value="[action]"/>
</div>
</form>
<div class="note">
<span class="big red bold">*</span>Chooses the update branch on GitHub to check against the current install's version.
</div>
<!--/fieldset-->
<!-- Section SelectBotForm End -->
<!-- Section FormRow Start -->
[blank]
<div class="[leftRight]">
<label for="[row_label]"><span class="label">[row_label]:</span></label>
<span class="formw"><input name="[row_label]" id="[row_label]" value="[row_value]"/></span>
</div>
<!-- Section FormRow End -->
<!-- Section ConversationLogs1 Start -->
[blank]
<div id="pTitle">[bot_name]'s Conversation Logs</div>
<p>[convo]</p>
<!-- Section ConversationLogs1 End -->
<!-- Section UnknownInputs Start -->
[blank]
<div id="pTitle">[bot_name]'s Unknown Inputs</div>
<p>[unk_inp]</p>
<!-- Section UnknownInputs End -->
<!-- Section SpellcheckForm Start -->
[blank]
<fieldset style="margin-bottom: 3px;">
<form id="spellCheck" action="index.php?page=spellcheck&group=[group]" method="post">
<div class="row bold">Add a Misspelled word and it's correction:</div>
<div class="row fm-opt">
<label for="missspell">Misspell: </label>
<input type="text" id="missspell" name="missspell"/>
</div>
<div class="row fm-opt">
<label for="correction">Correction: </label>
<input type="text" id="correction" name="correction"/>
</div>
<div id="row fm-submit" class="fm-req">
<input type="submit" name="action" id="action" value="add"/>
</div>
</form>
</fieldset>
<!-- Section SpellcheckForm End -->
<!-- Section SearchSpellForm Start -->
[blank]
<fieldset style="margin-bottom: 3px;">
<span>The Spell checker addon is <u>[sc_enabled]</u></span><br/>
<span>
<strong>Note:</strong>
To enable or disable the spell checker, you will need to edit the config file.
Please see the README file in the chatbot/addons/spell_checker folder for more details.
</span><br/>
<form id="search" action="index.php?page=spellcheck&group=[group]" method="post">
<div class="row bold">Search for a Misspelled word:</div>
<div class="row fm-req">
<input type="text" id="search" name="search"/>
<input type="submit" name="action" id="action" value="search"/>
</div>
</form>
</fieldset>
<!-- Section SearchSpellForm End -->
<!-- Section EditSpellForm Start -->
[blank]
<fieldset style="margin-bottom: 3px;">
<form id="spell" action="index.php?page=spellcheck&group=[group]" method="post">
<div class="row bold">Edit the entry for the Misspelled word [missspelling]:</div>
<div class="row fm-opt">
<label for="topic">Misspelling: </label>
<input type="text" id="missspelling" name="missspelling" value="[missspelling]"/>
</div>
<div class="row fm-opt">
<label for="correction">Correction: </label>
<input type="text" id="correction" name="correction" value="[correction]"/>
</div>
<div id="fm-submit" class="row fm-req">
<input type="hidden" name="id" id="id" value="[id]"/>
<input type="submit" name="action" id="action" value="update"/>
<input type="submit" name="action" id="action" value="Delete" onclick="return confirm('Are you sure you want to delete this entry?');"/>
</div>
</form>
</fieldset>
<!-- Section EditSpellForm End -->
<!-- Section WordCensorForm Start -->
[blank]
<fieldset style="margin-bottom: 3px;">
<form id="wordCensor" action="index.php?page=wordcensor&group=[group]" method="post">
<div class="row bold">Add an improper word and it's replacement:</div>
<div class="row fm-opt">
<label for="word_to_censor">Bad word: </label>
<input type="text" id="word_to_censor" name="word_to_censor"/>
</div>
<div class="row fm-opt">
<label for="replace_with">Replacement: </label>
<input type="text" id="replace_with" name="replace_with"/>
</div>
<div id="row fm-submit" class="fm-req">
<input type="hidden" name="censor_id" value="[censor_id]"/>
<input type="submit" name="action" id="action" value="add"/>
</div>
</form>
</fieldset>
<!-- Section WordCensorForm End -->
<!-- Section SearchWordCensorForm Start -->
[blank]
<fieldset style="margin-bottom: 3px;">
<form id="search" action="index.php?page=wordcensor&group=[group]" method="post">
<div class="row bold">Search for an improper word:</div>
<div class="row fm-req">
<input type="text" id="search" name="search"/>
<input type="submit" name="action" id="action" value="search"/>
</div>
</form>
</fieldset>
<!-- Section SearchWordCensorForm End -->
<!-- Section EditWordCensorForm Start -->
[blank]
<fieldset style="margin-bottom: 3px;">
<form id="wordCensor" action="index.php?page=wordcensor&group=[group]" method="post">
<div class="row bold">Edit the entry for the improper word [word_to_censor]:</div>
<div class="row fm-opt">
<label for="topic">Bad Word: </label>
<input type="text" id="word_to_censor" name="word_to_censor" value="[word_to_censor]"/>
</div>
<div class="row fm-opt">
<label for="replace_with">Replacement: </label>
<input type="text" id="replace_with" name="replace_with" value="[replace_with]"/>
</div>
<div id="fm-submit" class="row fm-req">
<input type="hidden" name="censor_id" id="censor_id" value="[censor_id]"/>
<input type="submit" name="action" id="action" value="update"/>
<input type="submit" name="action" id="action" value="Delete" onclick="return confirm('Are you sure you want to delete this entry?');"/>
</div>
</form>
</fieldset>
<!-- Section EditWordCensorForm End -->
<!-- Section TeachMain Start -->
[blank]
<div id="teachForm" class="fullWidth noBorder">
[teach_content]
</div>
<div id="help">
[showHelp]
</div>
<!-- Section TeachMain End -->
<!-- Section TeachBotForm Start -->
[blank]
<form id="teach" action="index.php?page=teach" method="post">
<fieldset>
<div class="row">
<label for="filename"><span class="twentyPercent">Filename: </span></label>
<span class="eightyPercent"><input name="filename" id="filename" class="wide" value="admin_added.aiml"/></span>
</div>
<div class="row">
<label for="topic"><span class="twentyPercent">Topic: </span></label>
<span class="eightyPercent"><input name="topic" id="topic" class="wide"/></span>
</div>
<div class="row fm-opt">
<label for="thatpattern"><span class="twentyPercent">Previous Bot Response (THAT): </span></label>
<span class="eightyPercent"><input id="thatpattern" name="thatpattern" class="wide"/></span>
</div>
<div class="row fm-opt">
<label for="pattern"><span class="twentyPercent">User Input: </span></label>
<span class="eightyPercent"><input id="pattern" name="pattern" class="wide"/></span>
</div>
<div class="row fm-opt">
<label for="template"><span class="twentyPercent">Bot Response: </span></label>
<span class="eightyPercent"><textarea id="template" name="template" class="wide"></textarea></span>
</div>
<div class="row">For help, click the icon in the title, above.</div>
<div id="row" class="fm-req">
<input type="submit" name="action" id="action" value="teach"/>
</div>
</fieldset>
</form>
<!-- Section TeachBotForm End -->
<!-- Section TeachShowHelp Start -->
[blank]
<div id="showHelp">
<h3>Help...</h3>
<dd>
Adding a 'Topic' means that the bot will only be able to access this response if a previous aiml category has
set this topic as it's current topic.
</dd>
<dd>The 'Previous Bot Response' means that the bot must have answered with this text in it's last response.</dd>
<dd>The 'User Input' is the the users input used to access the bots response.</dd>
<dd>The 'Bot Response' is the text the bot will output when the 'user Input' has been matched.</dd>
<br/>
<h3>Simple Example</h3>
<dd>User input: hello how are you</dd>
<dd>Bot Response: I am well thank you and you?</dd>
<br/>
<h3>Intermediate example:</h3>
<dd>Previous Bot Response: I am well thank you and you</dd>
<dd>User input: ok thanks</dd>
<dd>Bot Response: That is great to hear</dd>
<br/>
<h3>Advanced example:</h3>
<dd>1. First response <u>MUST</u> set the topic</dd>
<dd>User input: I like chatbots</dd>
<dd>
Bot Response: What do you like about them? <set topic="chatbots">
</dd>
<br/>
<dd>2. Second pattern can only be accessed because the topic has been set in the previous response</dd>
<dd>Topic: chatbots</dd>
<dd>User input: I just think they are cool</dd>
<dd>Bot Response: Yes chatbots are cool</dd>
<br/>
You can find alot of information on the net about writing well formed aiml.<br/>
If you want to learn more about writing AIML
<a href="https://pandorabots.com/docs/aiml/aiml-basics.html" target="_blank" class="hbox">
start here
</a>.
</div>
<!-- Section TeachShowHelp End -->
<!-- Section editAIMLShowHelp Start -->
[blank]
<div id="showHelp">
<h2>Help...</h2>
<h3>General/Searching</h3>
<dd>
Using the search/edit page is fairly straightforward. The page displays all of the available categories for the
selected chatbot 10 categories at a time by default, with options for displaying more, via a selectbox in the
upper lef corner of the main panel, up to 100 categories max. If the chatbot has more than 100 categories total
in the database, there is a set of links for additional pages in the lower right corner of the panel, so that
all stored AIML categories are accessible. The categories can be sorted by any of the visible fields, simply
by clicking on the header titles along the top of the table.
</dd>
<dd>
In order to quickly find the AIML category that you're looking for, simply use the search boxes along the top,
just below the field titles. Any combination of search fields can be used at any time to help narrow the search.
</dd>
<dd></dd>
<br/>
<h3>Editing</h3>
<dd>
Editing can be accomplished by simply clicking on the desired field and changing the contents of that field to
suit your needs. You can cancel the edit at any time by pressing the Escape ([ESC]) key, or by "clicking off"
the field without making any changes. To save your edit, simply "click off" the field once you're satisfied
with the changes you've made. Please note, however, that the new AIML code that was saved is
<strong>NOT</strong> checked for valid AIML code prior to saving, so it's up to you to make sure that the edited code is valid.
</dd>
<dd></dd>
<br/>
<h3>Deleting a Category (row)</h3>
<dd>
In order to delete an AIML category from the database, simply locate it using the search functionality, then
click on the DELETE icon (<img src="images/del.png" width="15" height="15" alt="">) to the left of the category.
You will get a confirmation dialog prior to the deletion. <strong class="red">WARNING!</strong> Once you confirm
that you want to delete the category, there is no going back! once deleted, that AIML category is gone and can only
be "brought back" by creating a new one in it's place.
</dd>
<dd></dd>
<br/>--You can find alot of information on the net about writing well formed aiml.<br/>--If you want to learn more about
writing AIML <a href="https://pandorabots.com/docs/aiml/aiml-basics.html" target="_blank" class="hbox">start here</a>.
</div>
<!-- Section editAIMLShowHelp End -->
<!-- Section ClearShowHelp Start -->
[blank]
<div id="showHelp">
<h3>Help...</h3>
<dd>This area allows you remove individual or ALL aiml entries for a specific bot.</dd>
<dd>Ideal if you want to start again with a blank chatbot and repopulate via the upload panel.</dd>
<dd><strong>BUT BE WARNED:</strong> This operation can not be undone so use with care.</dd>
<dd>--Ensure that the current bot is the correct bot.</dd>
<dd>--Select 'Clear categories from this AIML file' and choose the aiml file from the drop down.</dd>
<dd>--Or select 'Clear ALL AIML categories (Purge database)'.</dd>
<dd>--Then press 'Submit' to delete the entries for that file.</dd>
</div>
<!-- Section ClearShowHelp End -->
<!-- Section MembersShowHelp Start -->
[blank]
<div id="showHelp">
<h3>Help...</h3>
<dd>This area allows you edit or add users to the admin account area.</dd>
<dd>--Select a current user.</dd>
<dd>--Or enter the details for a new user.</dd>
<dd>--Then press 'Save' to update the user.</dd>
<dd>--Or press 'Delete' to remove the user.</dd>
</div>
<!-- Section MembersShowHelp End -->
<!-- Section UploadShowHelp Start -->
[blank]
<div id="showHelp">
<h3>Help...</h3>
<dd> If your aiml file will not upload you may want to check the following.</dd>
<dd>--Make sure the folder you are trying to upload to has read/write privs on it (CHMOD 755)</dd>
<dd>--Remove any comments from the aiml</dd>
<dd>--Replace everything above the first <cattegory> with a simple <aiml> tag</dd>
<br/>--You can find alot of information on the net about writing well formed aiml.
<br/>--If you want to learn more about writing AIML
<a href="https://pandorabots.com/docs/aiml/aiml-basics.html" target="_blank" class="hbox">start here</a>.
</div>
<!-- Section UploadShowHelp End -->
<!-- Section DownloadShowHelp Start -->
[blank]
<div id="showHelp">
<h3>Help...</h3>
<dd>
First, choose whether to download the files as AIML files (the default action) or as SQL files. Once you've
made all of your selections, simply click the Download button, and your request will be processed. This
processing should take only a few seconds. A link will be given on the off chance that your file doesn't
pop up for downloading.
</dd>
</div>
<!-- Section DownloadShowHelp End -->
<!-- Section HelpLink Start -->
[blank]
<img src="images/help.png" onclick="showHide();" title="Click to toggle help" alt="Click to toggle help" style="cursor: pointer"/>
<!-- Section HelpLink End -->
<!-- Section RSSItemTemplate Start -->
[blank]
<p>[rssRowTitle]</p>
<p>[rssRowContent]</p>
<br/>
<!-- Section RSSItemTemplate End -->
<!-- Section LogoLink Start -->
[blank]
<div id="logoLink" onclick="[showHide]Logo();">[showHide] Logo</div>
<!-- Section LogoLink End -->
<!-- Section LogoLinkScript Start -->
[blank]
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script type="text/javascript" src="//cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script>
[editScriptTag]
<script type="text/javascript" id="lowerScripts">
var vhSmall = '40vh';
var vhLarge = '51vh';
if (typeof getVhByScript !== 'undefined') {
getVhByScript();
}
(logoStatus === 'Show') ? ShowLogo() : HideLogo();
var mc_height = $('#main_content').height();
var readMe = $('#readMe');
if (readMe.length) {
var rm_top = readMe.position().top;
var rm_height = mc_height - rm_top;
readMe.height(rm_height);
}
function ShowLogo() {
var body = document.body;
body.style.backgroundImage = 'url(images/repeated_header2.jpg)';
var logo = document.getElementById('logo');
logo.style.display = "block";
var topNav = document.getElementById('top_nav');
if (topNav) topNav.style.top = '130px';
var leftNav = document.getElementById('left_nav');
if (leftNav) leftNav.style.top = '160px';
var main = document.getElementById('main');
main.style.top = '160px';
var rightNav = document.getElementById('right_nav');
if (rightNav) rightNav.style.top = '160px';
$('#script_version, #script_version div').removeClass('horiz').addClass('vert');
$('div.dataTables_scrollBody').css('height', vhSmall);
}
function HideLogo() {
var body = document.body;
body.style.backgroundImage = 'none';
var logo = document.getElementById('logo');
logo.style.display = "none";
var topNav = document.getElementById('top_nav');
topNav.style.top = '15px';
var leftNav = document.getElementById('left_nav');
if (leftNav) leftNav.style.top = '50px';
var main = document.getElementById('main');
main.style.top = '50px';
var rightNav = document.getElementById('right_nav');
if (rightNav) rightNav.style.top = '50px';
$('#script_version, #script_version div').removeClass('vert').addClass('horiz');
$('div.dataTables_scrollBody').css('height', vhLarge);
}
function toggleLogo() {
if (logoStatus == 'Hide') {
logoStatus = 'Show';
ShowLogo();
}
else {
logoStatus = 'Hide';
HideLogo();
}
setCookie('display', logoStatus);
}
function setCookie(name, value) {
document.cookie = name + '=' + escape(value) + ';path=/';
}
function getCookie(name) {
var dc = document.cookie;
var begin = dc.indexOf(name);
if (begin < 0) return false;
var end = (dc.indexOf(";", begin) == -1) ? dc.length : dc.indexOf(";", begin);
return unescape(dc.substring((begin + (name.length + 1)), end));
}
function closeStatus(element) {
var parent = document.getElementById(element);
parent.style.display = 'none';
}
function openStatus(element) {
var parent = document.getElementById(element);
parent.style.display = 'block';
}
function showProgressImg() {
var img = '<img src="images/progressbar.gif"/>';
var closeButton = '<div class="closeButton" id="closeButton" onclick="closeStatus(\'errMsg\')" title="Click to hide"> </div>';
var errMsg = document.getElementById('errMsg');
errMsg.style.display = 'block';
errMsg.innerHTML = '';
errMsg.innerHTML = closeButton + img + '<p>Please wait...</p>';
}
var logoStatus = getCookie('display');
logoStatus = (logoStatus == 'Hide' || logoStatus == 'Show') ? logoStatus : 'Show';
var func = logoStatus + 'Logo()';
setTimeout(function () {
eval(func);
}, 10);
</script>
<!-- Section LogoLinkScript End -->
<!-- Section CLScript Start -->
[blank]
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
$('a.cl_del').on('click', function(e){
e.preventDefault();
var data_sr = $(this).data('sr');
//console.log('data_sr =', data_sr);
//$('#errMsg').append('attr =' + info_id + "<br>\ndata =" + data_id).show();
var url = 'logs.php?action=clearLogs';
if (confirm('Are you sure you want to delete these conversation log entries? This cannot be undone.')) {
$.ajax({
url: url,
data: {
sr: data_sr,
},
dataType: 'json',
success: function(data){
console.log(data);
var cbDiv = $('#closeButton.closeButton');
var pre = $('<pre/>').text(data.message).css('whiteSpace', 'pre-wrap');
var dataDiv = $('<div></div>').append(pre);
$('#errMsg').empty().append(cbDiv).append(dataDiv).show();
setTimeout(function(){location.reload(true)}, 5000);
}
});
}
});
});
</script>
<!-- Section CLScript End -->
<!-- Section HideLogoCSS Start -->
[blank]
<style type="text/css">
body {
background-image: none;
}
#logo {
display: none;
}
#top_nav {
top: 15px;
}
#left_nav, #right_nav, #main {
top: 50px;
}
</style>
<!-- Section HideLogoCSS End -->
<!-- Section ChatDemo Start -->
[blank]
<div id="demoChatTitle">Talk to [bot_name] using the [format] interface:</div>
<div id="demoChatContainer">
<iframe id="demoChat" src="[pageSource]"></iframe>
</div>
<!-- Section ChatDemo End -->
<!-- Section DbStats Start -->
[blank]
<div id="dbStatsTitle">Database Stats for [dbn]</div>
<div id="dbStatsContainer">
<p>Uptime: [stats_uptime]</p>
<p>Threads: [stats_threads]</p>
<p>Queries: [stats_query_count]</p>
<p>Slow queries: [stats_slow_queries]</p>
<p>Flush table count: [stats_flush_count]</p>
<p>Tables Opened: [stats_tables_open]</p>
<p>Queries per second avg: [stats_qps]</p>
</div>
<!-- Section DbStats End -->
<!-- Section MembersMain Start -->
[blank]
<div id="membersForm" class="fullWidth noBorder">
<p>
Here's where you add, remove or edit admin accounts.
</p>
[members_list_form]
[members_content]
</div>
<div id="help">
[showHelp]
</div>
<!-- Section MembersMain End -->
<!-- Section MembersForm Start -->
[blank]
<p><strong>[action] Admin Account:</strong></p>
<form id="members" action="index.php?page=members" method="post">
<fieldset class="noBorder">
<div class="row">
<input name="id" id="id" value="[id]" autocomplete="off" disabled="disabled"/>
Account ID: (<u>not editable</u>)
</div>
<div class="row">
<input name="user_name" id="user_name" value="[user_name]"/>
<label for="user_name">Login Name: </label>
</div>
<div class="row">
<input name="password" id="password" type="password" autocomplete="off">
<label for="password">Password: </label>
</div>
<div class="row">
<input name="passwordConfirm" id="passwordConfirm" type="password" autocomplete="off">
<label for="passwordConfirm"> Confirm Password: </label>
</div>
<div class="row">
<input type="hidden" name="id" id="id" value="[id]"/>
<input type="submit" name="action" value="[action]"/>
<input type="submit" name="action" value="Delete"/>
</div>
</fieldset>
</form>
<!-- Section MembersForm End -->
<!-- Section MembersListForm Start -->
[blank]
<div class="row">
<form id="memberList" action="index.php?page=members" method="post">
<fieldset class="noBorder">
<label for="memberSelect">Current Admins: </label>
<select name="memberSelect" id="memberSelect" size="1">
<option value="-1">Select an Admin</option>
[adminList]
</select>
<input type="hidden" name="action" value="editfromlist"/>
<input type="submit" name="" value="Edit User"/>
</fieldset>
</form>
</div>
<!-- Section MembersListForm End -->
<!-- Section UploadMain Start -->
[blank]
<div id="uploadForm" class="fullWidth noBorder">
<p>
Use this uploader to add AIML categories to your chatbot's database. You have the option
to upload either individual AIML files, or ZIP archive files of up to [fs_limit_title] in size.
This uploader no longer performs XML validation, so you need to validate your AIML files prior to
uploading them. It's <strong><u>STRONGLY SUGGESTED</u></strong> that you use either W3School's
<a href="http://www.w3schools.com/xml/xml_validator.asp" target="_blank">XML Validator</a>,
or the <a href="validateAIML.php">Program O AIML Validator</a>. There are other XML validators
available, but the W3Schools validator works well, and the Program O Validator is specifically
designed to validate AIML files. Please note, however, that neither of the above mentioned
validators will work with zip files.
</p>
[upload_content]
<hr/>
<div id="AIML_List">
List of Currently Stored AIML files for [bot_name]:<br/>
[AIML_List]
</div>
<hr/>
</div>
<div id="help">
[showHelp]
</div>
<!-- Section UploadMain End -->
<!-- Section UploadAIMLForm Start -->
[blank]
<form id="upload" enctype="multipart/form-data" action="" method="post">
<table class="formTable">
<tr>
<td>
<label for="aimlfile">File:</label>
<input type="file" id="aimlfile" name="aimlfile" onchange="checkSize();"/>
</td>
<td>
<input type="checkbox" id="clearDB" name="clearDB" checked="checked"/>
<label for="clearDB">Clear the database of entries from this file</label>
</td>
</tr>
<tr>
<td>
<label for="bot_id">Apply this file to this bot: </label>
<select name="bot_id" id="bot_id" size="1">
[all_bots]
</select>
</td>
<td>
<input type="checkbox" id="skipVal" name="skipVal" value="1"/>
<label for="skipVal">Skip AIML Validation for this file</label>
</td>
</tr>
<tr>
<td colspan="2">
<input type="submit" name="action" id="action" value="upload" onclick="showProgressImg()"/>
</td>
</tr>
</table>
</form>
<!-- Section UploadAIMLForm End -->
<!-- Section editSRAIPage Start -->
[blank]
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.12/css/jquery.dataTables.min.css"/>
<style type="text/css">
.dataTables_wrapper .dataTables_paginate .paginate_button {
padding: 0;
}
table.dataTable tbody th, table.dataTable tbody td, table.dataTable thead th, table.dataTable thead td {
padding: 1px 2px 1px 0;
}