Form Maker by WD – user-friendly drag & drop Form Builder plugin - Version 1.10.7

Version Description

  • Changed: Improved captcha security
  • Fixed: Bug on matrix field
  • Fixed: Bug on conditional fields (for date field)
  • Added: Notification about old forms
Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Form Maker by WD – user-friendly drag & drop Form Builder plugin
Version 1.10.7
Comparing to
See all releases

Code changes from version 1.10.6 to 1.10.7

Files changed (111) hide show
  1. admin/controllers/FMControllerBlocked_ips_fm.php +147 -147
  2. admin/controllers/FMControllerFormMakerEditCSS.php +97 -97
  3. admin/controllers/FMControllerFormMakerPreview.php +42 -42
  4. admin/controllers/FMControllerFormMakerSQLMapping.php +111 -111
  5. admin/controllers/FMControllerFormMakerSubmits.php +42 -42
  6. admin/controllers/FMControllerFormmakerwdcaptcha.php +42 -42
  7. admin/controllers/FMControllerFormmakerwdmathcaptcha.php +42 -42
  8. admin/controllers/FMControllerFormmakerwindow.php +42 -42
  9. admin/controllers/FMControllerFromeditcountryinpopup.php +42 -42
  10. admin/controllers/FMControllerFromipinfoinpopup.php +42 -42
  11. admin/controllers/FMControllerFrommapeditinpopup.php +42 -42
  12. admin/controllers/FMControllerGenerete_csv.php +42 -42
  13. admin/controllers/FMControllerGenerete_xml.php +42 -42
  14. admin/controllers/FMControllerSelect_data_from_db.php +69 -69
  15. admin/controllers/FMControllerShow_matrix.php +42 -42
  16. admin/controllers/FMControllerThemes_fm.php +188 -188
  17. admin/controllers/FMControllerUninstall_fm.php +57 -57
  18. admin/controllers/FMControllerWidget.php +60 -60
  19. admin/models/FMModelBlocked_ips_fm.php +74 -74
  20. admin/models/FMModelFormMakerEditCSS.php +41 -41
  21. admin/models/FMModelFormMakerPreview.php +41 -41
  22. admin/models/FMModelFormMakerSQLMapping.php +120 -120
  23. admin/models/FMModelFormMakerSubmits.php +42 -42
  24. admin/models/FMModelFormmakerwdcaptcha.php +30 -30
  25. admin/models/FMModelFormmakerwdmathcaptcha.php +30 -30
  26. admin/models/FMModelFromeditcountryinpopup.php +30 -30
  27. admin/models/FMModelFromipinfoinpopup.php +30 -30
  28. admin/models/FMModelFrommapeditinpopup.php +30 -30
  29. admin/models/FMModelGoptions_fm.php +29 -29
  30. admin/models/FMModelSelect_data_from_db.php +110 -110
  31. admin/models/FMModelShow_matrix.php +30 -30
  32. admin/models/FMModelThemes_fm.php +90 -90
  33. admin/models/FMModelUninstall_fm.php +1 -0
  34. admin/models/FMModelWidget.php +37 -37
  35. admin/views/FMViewFormMakerEditCSS.php +134 -134
  36. admin/views/FMViewFormMakerSQLMapping.php +1466 -1466
  37. admin/views/FMViewFormMakerSubmits.php +118 -118
  38. admin/views/FMViewFormmakerwdcaptcha.php +93 -93
  39. admin/views/FMViewFormmakerwdmathcaptcha.php +122 -122
  40. admin/views/FMViewFromeditcountryinpopup.php +184 -184
  41. admin/views/FMViewFromipinfoinpopup.php +100 -100
  42. admin/views/FMViewFrommapeditinpopup.php +65 -65
  43. admin/views/FMViewGenerete_csv.php +94 -94
  44. admin/views/FMViewGenerete_xml.php +85 -85
  45. admin/views/FMViewManage_fm.php +2 -1
  46. admin/views/FMViewShow_matrix.php +126 -126
  47. admin/views/FMViewSubmissions_fm.php +1 -1
  48. admin/views/FMViewWidget.php +82 -82
  49. css/calendar-jos.css +208 -208
  50. css/codemirror.css +168 -168
  51. css/form_maker_first.css +173 -173
  52. css/form_maker_layout.css +36 -36
  53. css/jquery-ui-1.10.3.custom.css +1177 -1177
  54. css/jquery-ui-spinner.css +1178 -1178
  55. css/notices.css +6 -0
  56. featured/admin.css +736 -736
  57. featured/featured_themes.css +177 -177
  58. featured/featured_themes.php +104 -104
  59. form-maker.php +2 -2
  60. form_maker_notices_class.php +269 -246
  61. frontend/controllers/FMControllerForm_maker.php +45 -45
  62. frontend/controllers/FMControllerForm_submissions.php +123 -123
  63. frontend/controllers/FMControllerVerify_email.php +53 -53
  64. frontend/models/FMModelForm_maker.php +9 -3
  65. frontend/models/FMModelForm_submissions.php +295 -295
  66. frontend/models/FMModelVerify_email.php +114 -114
  67. frontend/views/FMViewForm_maker.php +4 -1
  68. frontend/views/FMViewVerify_email.php +36 -36
  69. images/01/01/index.html +1 -1
  70. images/01/02/index.html +1 -1
  71. images/01/03/index.html +1 -1
  72. images/01/index.html +1 -1
  73. images/02/01/index.html +1 -1
  74. images/02/02/index.html +1 -1
  75. images/02/03/index.html +1 -1
  76. images/02/index.html +1 -1
  77. images/03/01/index.html +1 -1
  78. images/03/02/index.html +1 -1
  79. images/03/03/index.html +1 -1
  80. images/03/index.html +1 -1
  81. images/04/01/index.html +1 -1
  82. images/04/02/index.html +1 -1
  83. images/04/03/index.html +1 -1
  84. images/04/index.html +1 -1
  85. images/05/01/index.html +1 -1
  86. images/05/02/index.html +1 -1
  87. images/05/03/index.html +1 -1
  88. images/05/index.html +1 -1
  89. images/06/01/index.html +1 -1
  90. images/06/index.html +1 -1
  91. images/07/index.html +1 -1
  92. images/08/index.html +1 -1
  93. images/09/01/index.html +1 -1
  94. images/09/02/index.html +1 -1
  95. images/09/03/index.html +1 -1
  96. images/09/index.html +1 -1
  97. images/10/01/index.html +1 -1
  98. images/10/02/index.html +1 -1
  99. images/10/index.html +1 -1
  100. images/flags/index.html +1 -1
  101. images/logowd.png +0 -0
  102. js/calendar/calendar.js +35 -35
  103. js/fancybox/jquery.fancybox.css +273 -273
  104. js/fancybox/jquery.fancybox.pack.js +45 -45
  105. js/form_maker_editor_button.js +21 -21
  106. js/form_maker_manage.js +3 -0
  107. js/form_maker_submissions.js +94 -94
  108. js/if_gmap_back_end.js +226 -226
  109. js/if_gmap_front_end.js +177 -177
  110. js/layout/clike.js +271 -271
  111. js/layout/codemirror.js +0 -2331
admin/controllers/FMControllerBlocked_ips_fm.php CHANGED
@@ -1,148 +1,148 @@
1
- <?php
2
-
3
- class FMControllerBlocked_ips_fm {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute() {
22
- $task = WDW_FM_Library::get('task');
23
- $id = (int)WDW_FM_Library::get('current_id', 0);
24
- $message = WDW_FM_Library::get('message');
25
- echo WDW_FM_Library::message_id($message);
26
- if (method_exists($this, $task)) {
27
- check_admin_referer('nonce_fm', 'nonce_fm');
28
- $this->$task($id);
29
- }
30
- else {
31
- $this->display();
32
- }
33
- }
34
-
35
- public function display() {
36
- require_once WD_FM_DIR . "/admin/models/FMModelBlocked_ips_fm.php";
37
- $model = new FMModelBlocked_ips_fm();
38
-
39
- require_once WD_FM_DIR . "/admin/views/FMViewBlocked_ips_fm.php";
40
- $view = new FMViewBlocked_ips_fm($model);
41
- $view->display();
42
- }
43
-
44
- public function save() {
45
- $message = $this->save_db();
46
- // $this->display();
47
- $page = WDW_FM_Library::get('page');
48
- WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
49
- }
50
-
51
- public function save_db() {
52
- global $wpdb;
53
- $id = (isset($_POST['current_id']) ? (int) $_POST['current_id'] : 0);
54
- $ip = (isset($_POST['ip']) ? esc_html(stripslashes($_POST['ip'])) : '');
55
- if ($id != 0) {
56
- $save = $wpdb->update($wpdb->prefix . 'formmaker_blocked', array(
57
- 'ip' => $ip,
58
- ), array('id' => $id));
59
- }
60
- else {
61
- $save = $wpdb->insert($wpdb->prefix . 'formmaker_blocked', array(
62
- 'ip' => $ip,
63
- ), array(
64
- '%s',
65
- ));
66
- }
67
- if ($save !== FALSE) {
68
- $message = 1;
69
- }
70
- else {
71
- $message = 2;
72
- }
73
- }
74
-
75
- public function save_all() {
76
- global $wpdb;
77
- $flag = FALSE;
78
- $ips_id_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'formmaker_blocked');
79
- foreach ($ips_id_col as $ip_id) {
80
- if (isset($_POST['ip' . $ip_id])) {
81
- $ip = esc_html(stripslashes($_POST['ip' . $ip_id]));
82
- if ($ip == '') {
83
- $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_blocked WHERE id="%d"', $ip_id));
84
- }
85
- else {
86
- $flag = TRUE;
87
- $wpdb->update($wpdb->prefix . 'formmaker_blocked', array(
88
- 'ip' => $ip,
89
- ), array('id' => $ip_id));
90
- }
91
- }
92
- }
93
- if ($flag) {
94
- $message = 1;
95
- }
96
- else {
97
- $message = 0;
98
- }
99
- // $this->display();
100
- $page = WDW_FM_Library::get('page');
101
- WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
102
- }
103
-
104
- public function delete($id) {
105
- global $wpdb;
106
- $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_blocked WHERE id="%d"', $id);
107
- if ($wpdb->query($query)) {
108
- $message = 3;
109
- }
110
- else {
111
- $message = 2;
112
- }
113
- // $this->display();
114
- $page = WDW_FM_Library::get('page');
115
- WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
116
- }
117
-
118
- public function delete_all() {
119
- global $wpdb;
120
- $flag = FALSE;
121
- $ips_id_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'formmaker_blocked');
122
- foreach ($ips_id_col as $ip_id) {
123
- if (isset($_POST['check_' . $ip_id])) {
124
- $flag = TRUE;
125
- $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_blocked WHERE id="%d"', $ip_id));
126
- }
127
- }
128
- if ($flag) {
129
- $message = 5;
130
- }
131
- else {
132
- $message = 2;
133
- }
134
- // $this->display();
135
- $page = WDW_FM_Library::get('page');
136
- WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
137
- }
138
-
139
- ////////////////////////////////////////////////////////////////////////////////////////
140
- // Getters & Setters //
141
- ////////////////////////////////////////////////////////////////////////////////////////
142
- ////////////////////////////////////////////////////////////////////////////////////////
143
- // Private Methods //
144
- ////////////////////////////////////////////////////////////////////////////////////////
145
- ////////////////////////////////////////////////////////////////////////////////////////
146
- // Listeners //
147
- ////////////////////////////////////////////////////////////////////////////////////////
148
  }
1
+ <?php
2
+
3
+ class FMControllerBlocked_ips_fm {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function execute() {
22
+ $task = WDW_FM_Library::get('task');
23
+ $id = (int)WDW_FM_Library::get('current_id', 0);
24
+ $message = WDW_FM_Library::get('message');
25
+ echo WDW_FM_Library::message_id($message);
26
+ if (method_exists($this, $task)) {
27
+ check_admin_referer('nonce_fm', 'nonce_fm');
28
+ $this->$task($id);
29
+ }
30
+ else {
31
+ $this->display();
32
+ }
33
+ }
34
+
35
+ public function display() {
36
+ require_once WD_FM_DIR . "/admin/models/FMModelBlocked_ips_fm.php";
37
+ $model = new FMModelBlocked_ips_fm();
38
+
39
+ require_once WD_FM_DIR . "/admin/views/FMViewBlocked_ips_fm.php";
40
+ $view = new FMViewBlocked_ips_fm($model);
41
+ $view->display();
42
+ }
43
+
44
+ public function save() {
45
+ $message = $this->save_db();
46
+ // $this->display();
47
+ $page = WDW_FM_Library::get('page');
48
+ WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
49
+ }
50
+
51
+ public function save_db() {
52
+ global $wpdb;
53
+ $id = (isset($_POST['current_id']) ? (int) $_POST['current_id'] : 0);
54
+ $ip = (isset($_POST['ip']) ? esc_html(stripslashes($_POST['ip'])) : '');
55
+ if ($id != 0) {
56
+ $save = $wpdb->update($wpdb->prefix . 'formmaker_blocked', array(
57
+ 'ip' => $ip,
58
+ ), array('id' => $id));
59
+ }
60
+ else {
61
+ $save = $wpdb->insert($wpdb->prefix . 'formmaker_blocked', array(
62
+ 'ip' => $ip,
63
+ ), array(
64
+ '%s',
65
+ ));
66
+ }
67
+ if ($save !== FALSE) {
68
+ $message = 1;
69
+ }
70
+ else {
71
+ $message = 2;
72
+ }
73
+ }
74
+
75
+ public function save_all() {
76
+ global $wpdb;
77
+ $flag = FALSE;
78
+ $ips_id_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'formmaker_blocked');
79
+ foreach ($ips_id_col as $ip_id) {
80
+ if (isset($_POST['ip' . $ip_id])) {
81
+ $ip = esc_html(stripslashes($_POST['ip' . $ip_id]));
82
+ if ($ip == '') {
83
+ $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_blocked WHERE id="%d"', $ip_id));
84
+ }
85
+ else {
86
+ $flag = TRUE;
87
+ $wpdb->update($wpdb->prefix . 'formmaker_blocked', array(
88
+ 'ip' => $ip,
89
+ ), array('id' => $ip_id));
90
+ }
91
+ }
92
+ }
93
+ if ($flag) {
94
+ $message = 1;
95
+ }
96
+ else {
97
+ $message = 0;
98
+ }
99
+ // $this->display();
100
+ $page = WDW_FM_Library::get('page');
101
+ WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
102
+ }
103
+
104
+ public function delete($id) {
105
+ global $wpdb;
106
+ $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_blocked WHERE id="%d"', $id);
107
+ if ($wpdb->query($query)) {
108
+ $message = 3;
109
+ }
110
+ else {
111
+ $message = 2;
112
+ }
113
+ // $this->display();
114
+ $page = WDW_FM_Library::get('page');
115
+ WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
116
+ }
117
+
118
+ public function delete_all() {
119
+ global $wpdb;
120
+ $flag = FALSE;
121
+ $ips_id_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'formmaker_blocked');
122
+ foreach ($ips_id_col as $ip_id) {
123
+ if (isset($_POST['check_' . $ip_id])) {
124
+ $flag = TRUE;
125
+ $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_blocked WHERE id="%d"', $ip_id));
126
+ }
127
+ }
128
+ if ($flag) {
129
+ $message = 5;
130
+ }
131
+ else {
132
+ $message = 2;
133
+ }
134
+ // $this->display();
135
+ $page = WDW_FM_Library::get('page');
136
+ WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
137
+ }
138
+
139
+ ////////////////////////////////////////////////////////////////////////////////////////
140
+ // Getters & Setters //
141
+ ////////////////////////////////////////////////////////////////////////////////////////
142
+ ////////////////////////////////////////////////////////////////////////////////////////
143
+ // Private Methods //
144
+ ////////////////////////////////////////////////////////////////////////////////////////
145
+ ////////////////////////////////////////////////////////////////////////////////////////
146
+ // Listeners //
147
+ ////////////////////////////////////////////////////////////////////////////////////////
148
  }
admin/controllers/FMControllerFormMakerEditCSS.php CHANGED
@@ -1,98 +1,98 @@
1
- <?php
2
-
3
- class FMControllerFormMakerEditCSS {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute() {
22
- $task = ((isset($_POST['task'])) ? esc_html($_POST['task']) : '');
23
- $id = ((isset($_POST['current_id'])) ? (int)esc_html($_POST['current_id']) : 0);
24
- if (method_exists($this, $task)) {
25
- $this->$task($id);
26
- }
27
- else {
28
- $this->display();
29
- }
30
- }
31
-
32
- public function display() {
33
- require_once WD_FM_DIR . "/admin/models/FMModelFormMakerEditCSS.php";
34
- $model = new FMModelFormMakerEditCSS();
35
-
36
- require_once WD_FM_DIR . "/admin/views/FMViewFormMakerEditCSS.php";
37
- $view = new FMViewFormMakerEditCSS($model);
38
- $view->display();
39
- }
40
-
41
- public function save() {
42
- $this->update_db();
43
- }
44
-
45
- public function apply() {
46
- $this->update_db();
47
- $this->display();
48
- }
49
-
50
- public function save_as_new() {
51
- $this->insert_db();
52
- }
53
-
54
- public function insert_db() {
55
- global $wpdb;
56
- $title = (isset($_POST['title']) ? esc_html(stripslashes( $_POST['title'])) : '');
57
- $css = (isset($_POST['css']) ? stripslashes(preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $_POST['css'])) : '');
58
- $default = (isset($_POST['default']) ? esc_html(stripslashes( $_POST['default'])) : 0);
59
- $save = $wpdb->insert($wpdb->prefix . 'formmaker_themes', array(
60
- 'title' => $title,
61
- 'css' => $css,
62
- 'default' => $default,
63
- ), array(
64
- '%s',
65
- '%s',
66
- '%d',
67
- ));
68
- }
69
-
70
- public function update_db() {
71
- global $wpdb;
72
- $id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes( $_POST['current_id'])) : 0);
73
- $title = (isset($_POST['title']) ? esc_html(stripslashes( $_POST['title'])) : '');
74
- $css = (isset($_POST['css']) ? stripslashes(preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $_POST['css'])) : '');
75
- $default = (isset($_POST['default']) ? esc_html(stripslashes( $_POST['default'])) : 0);
76
- $save = $wpdb->update($wpdb->prefix . 'formmaker_themes', array(
77
- 'title' => $title,
78
- 'css' => $css,
79
- 'default' => $default,
80
- ), array('id' => $id));
81
- if ($save !== FALSE) {
82
- echo WDW_FM_Library::message('Item Succesfully Saved.', 'updated');
83
- }
84
- else {
85
- echo WDW_FM_Library::message('Error. Please install plugin again.', 'error');
86
- }
87
- }
88
-
89
- ////////////////////////////////////////////////////////////////////////////////////////
90
- // Getters & Setters //
91
- ////////////////////////////////////////////////////////////////////////////////////////
92
- ////////////////////////////////////////////////////////////////////////////////////////
93
- // Private Methods //
94
- ////////////////////////////////////////////////////////////////////////////////////////
95
- ////////////////////////////////////////////////////////////////////////////////////////
96
- // Listeners //
97
- ////////////////////////////////////////////////////////////////////////////////////////
98
  }
1
+ <?php
2
+
3
+ class FMControllerFormMakerEditCSS {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function execute() {
22
+ $task = ((isset($_POST['task'])) ? esc_html($_POST['task']) : '');
23
+ $id = ((isset($_POST['current_id'])) ? (int)esc_html($_POST['current_id']) : 0);
24
+ if (method_exists($this, $task)) {
25
+ $this->$task($id);
26
+ }
27
+ else {
28
+ $this->display();
29
+ }
30
+ }
31
+
32
+ public function display() {
33
+ require_once WD_FM_DIR . "/admin/models/FMModelFormMakerEditCSS.php";
34
+ $model = new FMModelFormMakerEditCSS();
35
+
36
+ require_once WD_FM_DIR . "/admin/views/FMViewFormMakerEditCSS.php";
37
+ $view = new FMViewFormMakerEditCSS($model);
38
+ $view->display();
39
+ }
40
+
41
+ public function save() {
42
+ $this->update_db();
43
+ }
44
+
45
+ public function apply() {
46
+ $this->update_db();
47
+ $this->display();
48
+ }
49
+
50
+ public function save_as_new() {
51
+ $this->insert_db();
52
+ }
53
+
54
+ public function insert_db() {
55
+ global $wpdb;
56
+ $title = (isset($_POST['title']) ? esc_html(stripslashes( $_POST['title'])) : '');
57
+ $css = (isset($_POST['css']) ? stripslashes(preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $_POST['css'])) : '');
58
+ $default = (isset($_POST['default']) ? esc_html(stripslashes( $_POST['default'])) : 0);
59
+ $save = $wpdb->insert($wpdb->prefix . 'formmaker_themes', array(
60
+ 'title' => $title,
61
+ 'css' => $css,
62
+ 'default' => $default,
63
+ ), array(
64
+ '%s',
65
+ '%s',
66
+ '%d',
67
+ ));
68
+ }
69
+
70
+ public function update_db() {
71
+ global $wpdb;
72
+ $id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes( $_POST['current_id'])) : 0);
73
+ $title = (isset($_POST['title']) ? esc_html(stripslashes( $_POST['title'])) : '');
74
+ $css = (isset($_POST['css']) ? stripslashes(preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $_POST['css'])) : '');
75
+ $default = (isset($_POST['default']) ? esc_html(stripslashes( $_POST['default'])) : 0);
76
+ $save = $wpdb->update($wpdb->prefix . 'formmaker_themes', array(
77
+ 'title' => $title,
78
+ 'css' => $css,
79
+ 'default' => $default,
80
+ ), array('id' => $id));
81
+ if ($save !== FALSE) {
82
+ echo WDW_FM_Library::message('Item Succesfully Saved.', 'updated');
83
+ }
84
+ else {
85
+ echo WDW_FM_Library::message('Error. Please install plugin again.', 'error');
86
+ }
87
+ }
88
+
89
+ ////////////////////////////////////////////////////////////////////////////////////////
90
+ // Getters & Setters //
91
+ ////////////////////////////////////////////////////////////////////////////////////////
92
+ ////////////////////////////////////////////////////////////////////////////////////////
93
+ // Private Methods //
94
+ ////////////////////////////////////////////////////////////////////////////////////////
95
+ ////////////////////////////////////////////////////////////////////////////////////////
96
+ // Listeners //
97
+ ////////////////////////////////////////////////////////////////////////////////////////
98
  }
admin/controllers/FMControllerFormMakerPreview.php CHANGED
@@ -1,43 +1,43 @@
1
- <?php
2
-
3
- class FMControllerFormMakerPreview {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute() {
22
- $this->display();
23
- }
24
-
25
- public function display() {
26
- require_once WD_FM_DIR . "/admin/models/FMModelFormMakerPreview.php";
27
- $model = new FMModelFormMakerPreview();
28
-
29
- require_once WD_FM_DIR . "/admin/views/FMViewFormMakerPreview.php";
30
- $view = new FMViewFormMakerPreview($model);
31
- $view->display();
32
- }
33
-
34
- ////////////////////////////////////////////////////////////////////////////////////////
35
- // Getters & Setters //
36
- ////////////////////////////////////////////////////////////////////////////////////////
37
- ////////////////////////////////////////////////////////////////////////////////////////
38
- // Private Methods //
39
- ////////////////////////////////////////////////////////////////////////////////////////
40
- ////////////////////////////////////////////////////////////////////////////////////////
41
- // Listeners //
42
- ////////////////////////////////////////////////////////////////////////////////////////
43
  }
1
+ <?php
2
+
3
+ class FMControllerFormMakerPreview {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function execute() {
22
+ $this->display();
23
+ }
24
+
25
+ public function display() {
26
+ require_once WD_FM_DIR . "/admin/models/FMModelFormMakerPreview.php";
27
+ $model = new FMModelFormMakerPreview();
28
+
29
+ require_once WD_FM_DIR . "/admin/views/FMViewFormMakerPreview.php";
30
+ $view = new FMViewFormMakerPreview($model);
31
+ $view->display();
32
+ }
33
+
34
+ ////////////////////////////////////////////////////////////////////////////////////////
35
+ // Getters & Setters //
36
+ ////////////////////////////////////////////////////////////////////////////////////////
37
+ ////////////////////////////////////////////////////////////////////////////////////////
38
+ // Private Methods //
39
+ ////////////////////////////////////////////////////////////////////////////////////////
40
+ ////////////////////////////////////////////////////////////////////////////////////////
41
+ // Listeners //
42
+ ////////////////////////////////////////////////////////////////////////////////////////
43
  }
admin/controllers/FMControllerFormMakerSQLMapping.php CHANGED
@@ -1,112 +1,112 @@
1
- <?php
2
-
3
- class FMControllerFormMakerSQLMapping {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute() {
22
- $task = ((isset($_GET['task'])) ? esc_html($_GET['task']) : 0);
23
- $id = ((isset($_GET['id'])) ? (int) $_GET['id'] : 0);
24
- $form_id = ((isset($_GET['form_id'])) ? (int) $_GET['form_id'] : 0);
25
- if ($task && method_exists($this, $task)) {
26
- $this->$task($form_id);
27
- }
28
- else {
29
- if ($id) {
30
- $this->edit_query($id, $form_id);
31
- }
32
- else {
33
- $this->add_query($form_id);
34
- }
35
- }
36
- }
37
-
38
- public function add_query($form_id) {
39
- require_once WD_FM_DIR . "/admin/models/FMModelFormMakerSQLMapping.php";
40
- $model = new FMModelFormMakerSQLMapping();
41
-
42
- require_once WD_FM_DIR . "/admin/views/FMViewFormMakerSQLMapping.php";
43
- $view = new FMViewFormMakerSQLMapping($model);
44
- $view->add_query($form_id);
45
- }
46
-
47
- public function edit_query($id, $form_id) {
48
- require_once WD_FM_DIR . "/admin/models/FMModelFormMakerSQLMapping.php";
49
- $model = new FMModelFormMakerSQLMapping();
50
-
51
- require_once WD_FM_DIR . "/admin/views/FMViewFormMakerSQLMapping.php";
52
- $view = new FMViewFormMakerSQLMapping($model);
53
- $view->edit_query($id, $form_id);
54
- }
55
-
56
- public function db_tables($form_id) {
57
- require_once WD_FM_DIR . "/admin/models/FMModelFormMakerSQLMapping.php";
58
- $model = new FMModelFormMakerSQLMapping();
59
-
60
- require_once WD_FM_DIR . "/admin/views/FMViewFormMakerSQLMapping.php";
61
- $view = new FMViewFormMakerSQLMapping($model);
62
- $view->db_tables($form_id);
63
- }
64
-
65
- public function db_table_struct($form_id) {
66
- require_once WD_FM_DIR . "/admin/models/FMModelFormMakerSQLMapping.php";
67
- $model = new FMModelFormMakerSQLMapping();
68
-
69
- require_once WD_FM_DIR . "/admin/views/FMViewFormMakerSQLMapping.php";
70
- $view = new FMViewFormMakerSQLMapping($model);
71
- $view->db_table_struct($form_id);
72
- }
73
-
74
- public function save_query() {
75
- global $wpdb;
76
- $form_id = ((isset($_GET['form_id'])) ? (int) $_GET['form_id'] : 0);
77
- $query = ((isset($_POST['query'])) ? stripslashes(wp_specialchars_decode($_POST['query'])) : "");
78
- $details = ((isset($_POST['details'])) ? esc_html($_POST['details']) : "");
79
- $save = $wpdb->insert($wpdb->prefix . 'formmaker_query', array(
80
- 'form_id' => $form_id,
81
- 'query' => $query,
82
- 'details' => $details,
83
- ), array(
84
- '%d',
85
- '%s',
86
- '%s',
87
- ));
88
- }
89
-
90
- public function update_query() {
91
- global $wpdb;
92
- $id = ((isset($_GET['id'])) ? (int) $_GET['id'] : 0);
93
- $form_id = ((isset($_GET['form_id'])) ? (int) $_GET['form_id'] : 0);
94
- $query = ((isset($_POST['query'])) ? stripslashes(wp_specialchars_decode($_POST['query'])) : "");
95
- $details = ((isset($_POST['details'])) ? esc_html($_POST['details']) : "");
96
- $save = $wpdb->update($wpdb->prefix . 'formmaker_query', array(
97
- 'form_id' => $form_id,
98
- 'query' => $query,
99
- 'details' => $details,
100
- ), array('id' => $id));
101
- }
102
-
103
- ////////////////////////////////////////////////////////////////////////////////////////
104
- // Getters & Setters //
105
- ////////////////////////////////////////////////////////////////////////////////////////
106
- ////////////////////////////////////////////////////////////////////////////////////////
107
- // Private Methods //
108
- ////////////////////////////////////////////////////////////////////////////////////////
109
- ////////////////////////////////////////////////////////////////////////////////////////
110
- // Listeners //
111
- ////////////////////////////////////////////////////////////////////////////////////////
112
  }
1
+ <?php
2
+
3
+ class FMControllerFormMakerSQLMapping {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function execute() {
22
+ $task = ((isset($_GET['task'])) ? esc_html($_GET['task']) : 0);
23
+ $id = ((isset($_GET['id'])) ? (int) $_GET['id'] : 0);
24
+ $form_id = ((isset($_GET['form_id'])) ? (int) $_GET['form_id'] : 0);
25
+ if ($task && method_exists($this, $task)) {
26
+ $this->$task($form_id);
27
+ }
28
+ else {
29
+ if ($id) {
30
+ $this->edit_query($id, $form_id);
31
+ }
32
+ else {
33
+ $this->add_query($form_id);
34
+ }
35
+ }
36
+ }
37
+
38
+ public function add_query($form_id) {
39
+ require_once WD_FM_DIR . "/admin/models/FMModelFormMakerSQLMapping.php";
40
+ $model = new FMModelFormMakerSQLMapping();
41
+
42
+ require_once WD_FM_DIR . "/admin/views/FMViewFormMakerSQLMapping.php";
43
+ $view = new FMViewFormMakerSQLMapping($model);
44
+ $view->add_query($form_id);
45
+ }
46
+
47
+ public function edit_query($id, $form_id) {
48
+ require_once WD_FM_DIR . "/admin/models/FMModelFormMakerSQLMapping.php";
49
+ $model = new FMModelFormMakerSQLMapping();
50
+
51
+ require_once WD_FM_DIR . "/admin/views/FMViewFormMakerSQLMapping.php";
52
+ $view = new FMViewFormMakerSQLMapping($model);
53
+ $view->edit_query($id, $form_id);
54
+ }
55
+
56
+ public function db_tables($form_id) {
57
+ require_once WD_FM_DIR . "/admin/models/FMModelFormMakerSQLMapping.php";
58
+ $model = new FMModelFormMakerSQLMapping();
59
+
60
+ require_once WD_FM_DIR . "/admin/views/FMViewFormMakerSQLMapping.php";
61
+ $view = new FMViewFormMakerSQLMapping($model);
62
+ $view->db_tables($form_id);
63
+ }
64
+
65
+ public function db_table_struct($form_id) {
66
+ require_once WD_FM_DIR . "/admin/models/FMModelFormMakerSQLMapping.php";
67
+ $model = new FMModelFormMakerSQLMapping();
68
+
69
+ require_once WD_FM_DIR . "/admin/views/FMViewFormMakerSQLMapping.php";
70
+ $view = new FMViewFormMakerSQLMapping($model);
71
+ $view->db_table_struct($form_id);
72
+ }
73
+
74
+ public function save_query() {
75
+ global $wpdb;
76
+ $form_id = ((isset($_GET['form_id'])) ? (int) $_GET['form_id'] : 0);
77
+ $query = ((isset($_POST['query'])) ? stripslashes(wp_specialchars_decode($_POST['query'])) : "");
78
+ $details = ((isset($_POST['details'])) ? esc_html($_POST['details']) : "");
79
+ $save = $wpdb->insert($wpdb->prefix . 'formmaker_query', array(
80
+ 'form_id' => $form_id,
81
+ 'query' => $query,
82
+ 'details' => $details,
83
+ ), array(
84
+ '%d',
85
+ '%s',
86
+ '%s',
87
+ ));
88
+ }
89
+
90
+ public function update_query() {
91
+ global $wpdb;
92
+ $id = ((isset($_GET['id'])) ? (int) $_GET['id'] : 0);
93
+ $form_id = ((isset($_GET['form_id'])) ? (int) $_GET['form_id'] : 0);
94
+ $query = ((isset($_POST['query'])) ? stripslashes(wp_specialchars_decode($_POST['query'])) : "");
95
+ $details = ((isset($_POST['details'])) ? esc_html($_POST['details']) : "");
96
+ $save = $wpdb->update($wpdb->prefix . 'formmaker_query', array(
97
+ 'form_id' => $form_id,
98
+ 'query' => $query,
99
+ 'details' => $details,
100
+ ), array('id' => $id));
101
+ }
102
+
103
+ ////////////////////////////////////////////////////////////////////////////////////////
104
+ // Getters & Setters //
105
+ ////////////////////////////////////////////////////////////////////////////////////////
106
+ ////////////////////////////////////////////////////////////////////////////////////////
107
+ // Private Methods //
108
+ ////////////////////////////////////////////////////////////////////////////////////////
109
+ ////////////////////////////////////////////////////////////////////////////////////////
110
+ // Listeners //
111
+ ////////////////////////////////////////////////////////////////////////////////////////
112
  }
admin/controllers/FMControllerFormMakerSubmits.php CHANGED
@@ -1,43 +1,43 @@
1
- <?php
2
-
3
- class FMControllerFormMakerSubmits {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute() {
22
- $this->display();
23
- }
24
-
25
- public function display() {
26
- require_once WD_FM_DIR . "/admin/models/FMModelFormMakerSubmits.php";
27
- $model = new FMModelFormMakerSubmits();
28
-
29
- require_once WD_FM_DIR . "/admin/views/FMViewFormMakerSubmits.php";
30
- $view = new FMViewFormMakerSubmits($model);
31
- $view->display();
32
- }
33
-
34
- ////////////////////////////////////////////////////////////////////////////////////////
35
- // Getters & Setters //
36
- ////////////////////////////////////////////////////////////////////////////////////////
37
- ////////////////////////////////////////////////////////////////////////////////////////
38
- // Private Methods //
39
- ////////////////////////////////////////////////////////////////////////////////////////
40
- ////////////////////////////////////////////////////////////////////////////////////////
41
- // Listeners //
42
- ////////////////////////////////////////////////////////////////////////////////////////
43
  }
1
+ <?php
2
+
3
+ class FMControllerFormMakerSubmits {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function execute() {
22
+ $this->display();
23
+ }
24
+
25
+ public function display() {
26
+ require_once WD_FM_DIR . "/admin/models/FMModelFormMakerSubmits.php";
27
+ $model = new FMModelFormMakerSubmits();
28
+
29
+ require_once WD_FM_DIR . "/admin/views/FMViewFormMakerSubmits.php";
30
+ $view = new FMViewFormMakerSubmits($model);
31
+ $view->display();
32
+ }
33
+
34
+ ////////////////////////////////////////////////////////////////////////////////////////
35
+ // Getters & Setters //
36
+ ////////////////////////////////////////////////////////////////////////////////////////
37
+ ////////////////////////////////////////////////////////////////////////////////////////
38
+ // Private Methods //
39
+ ////////////////////////////////////////////////////////////////////////////////////////
40
+ ////////////////////////////////////////////////////////////////////////////////////////
41
+ // Listeners //
42
+ ////////////////////////////////////////////////////////////////////////////////////////
43
  }
admin/controllers/FMControllerFormmakerwdcaptcha.php CHANGED
@@ -1,43 +1,43 @@
1
- <?php
2
-
3
- class FMControllerFormmakerwdcaptcha {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute() {
22
- $this->display();
23
- }
24
-
25
- public function display() {
26
- require_once WD_FM_DIR . "/admin/models/FMModelFormmakerwdcaptcha.php";
27
- $model = new FMModelFormmakerwdcaptcha();
28
-
29
- require_once WD_FM_DIR . "/admin/views/FMViewFormmakerwdcaptcha.php";
30
- $view = new FMViewFormmakerwdcaptcha($model);
31
- $view->display();
32
- }
33
-
34
- ////////////////////////////////////////////////////////////////////////////////////////
35
- // Getters & Setters //
36
- ////////////////////////////////////////////////////////////////////////////////////////
37
- ////////////////////////////////////////////////////////////////////////////////////////
38
- // Private Methods //
39
- ////////////////////////////////////////////////////////////////////////////////////////
40
- ////////////////////////////////////////////////////////////////////////////////////////
41
- // Listeners //
42
- ////////////////////////////////////////////////////////////////////////////////////////
43
  }
1
+ <?php
2
+
3
+ class FMControllerFormmakerwdcaptcha {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function execute() {
22
+ $this->display();
23
+ }
24
+
25
+ public function display() {
26
+ require_once WD_FM_DIR . "/admin/models/FMModelFormmakerwdcaptcha.php";
27
+ $model = new FMModelFormmakerwdcaptcha();
28
+
29
+ require_once WD_FM_DIR . "/admin/views/FMViewFormmakerwdcaptcha.php";
30
+ $view = new FMViewFormmakerwdcaptcha($model);
31
+ $view->display();
32
+ }
33
+
34
+ ////////////////////////////////////////////////////////////////////////////////////////
35
+ // Getters & Setters //
36
+ ////////////////////////////////////////////////////////////////////////////////////////
37
+ ////////////////////////////////////////////////////////////////////////////////////////
38
+ // Private Methods //
39
+ ////////////////////////////////////////////////////////////////////////////////////////
40
+ ////////////////////////////////////////////////////////////////////////////////////////
41
+ // Listeners //
42
+ ////////////////////////////////////////////////////////////////////////////////////////
43
  }
admin/controllers/FMControllerFormmakerwdmathcaptcha.php CHANGED
@@ -1,43 +1,43 @@
1
- <?php
2
-
3
- class FMControllerFormmakerwdmathcaptcha {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute() {
22
- $this->display();
23
- }
24
-
25
- public function display() {
26
- require_once WD_FM_DIR . "/admin/models/FMModelFormmakerwdmathcaptcha.php";
27
- $model = new FMModelFormmakerwdmathcaptcha();
28
-
29
- require_once WD_FM_DIR . "/admin/views/FMViewFormmakerwdmathcaptcha.php";
30
- $view = new FMViewFormmakerwdmathcaptcha($model);
31
- $view->display();
32
- }
33
-
34
- ////////////////////////////////////////////////////////////////////////////////////////
35
- // Getters & Setters //
36
- ////////////////////////////////////////////////////////////////////////////////////////
37
- ////////////////////////////////////////////////////////////////////////////////////////
38
- // Private Methods //
39
- ////////////////////////////////////////////////////////////////////////////////////////
40
- ////////////////////////////////////////////////////////////////////////////////////////
41
- // Listeners //
42
- ////////////////////////////////////////////////////////////////////////////////////////
43
  }
1
+ <?php
2
+
3
+ class FMControllerFormmakerwdmathcaptcha {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function execute() {
22
+ $this->display();
23
+ }
24
+
25
+ public function display() {
26
+ require_once WD_FM_DIR . "/admin/models/FMModelFormmakerwdmathcaptcha.php";
27
+ $model = new FMModelFormmakerwdmathcaptcha();
28
+
29
+ require_once WD_FM_DIR . "/admin/views/FMViewFormmakerwdmathcaptcha.php";
30
+ $view = new FMViewFormmakerwdmathcaptcha($model);
31
+ $view->display();
32
+ }
33
+
34
+ ////////////////////////////////////////////////////////////////////////////////////////
35
+ // Getters & Setters //
36
+ ////////////////////////////////////////////////////////////////////////////////////////
37
+ ////////////////////////////////////////////////////////////////////////////////////////
38
+ // Private Methods //
39
+ ////////////////////////////////////////////////////////////////////////////////////////
40
+ ////////////////////////////////////////////////////////////////////////////////////////
41
+ // Listeners //
42
+ ////////////////////////////////////////////////////////////////////////////////////////
43
  }
admin/controllers/FMControllerFormmakerwindow.php CHANGED
@@ -1,43 +1,43 @@
1
- <?php
2
-
3
- class FMControllerFormmakerwindow {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute() {
22
- $this->display();
23
- }
24
-
25
- public function display() {
26
- require_once WD_FM_DIR . "/admin/models/FMModelFormmakerwindow.php";
27
- $model = new FMModelFormmakerwindow();
28
-
29
- require_once WD_FM_DIR . "/admin/views/FMViewFormmakerwindow.php";
30
- $view = new FMViewFormmakerwindow($model);
31
- $view->display();
32
- }
33
-
34
- ////////////////////////////////////////////////////////////////////////////////////////
35
- // Getters & Setters //
36
- ////////////////////////////////////////////////////////////////////////////////////////
37
- ////////////////////////////////////////////////////////////////////////////////////////
38
- // Private Methods //
39
- ////////////////////////////////////////////////////////////////////////////////////////
40
- ////////////////////////////////////////////////////////////////////////////////////////
41
- // Listeners //
42
- ////////////////////////////////////////////////////////////////////////////////////////
43
  }
1
+ <?php
2
+
3
+ class FMControllerFormmakerwindow {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function execute() {
22
+ $this->display();
23
+ }
24
+
25
+ public function display() {
26
+ require_once WD_FM_DIR . "/admin/models/FMModelFormmakerwindow.php";
27
+ $model = new FMModelFormmakerwindow();
28
+
29
+ require_once WD_FM_DIR . "/admin/views/FMViewFormmakerwindow.php";
30
+ $view = new FMViewFormmakerwindow($model);
31
+ $view->display();
32
+ }
33
+
34
+ ////////////////////////////////////////////////////////////////////////////////////////
35
+ // Getters & Setters //
36
+ ////////////////////////////////////////////////////////////////////////////////////////
37
+ ////////////////////////////////////////////////////////////////////////////////////////
38
+ // Private Methods //
39
+ ////////////////////////////////////////////////////////////////////////////////////////
40
+ ////////////////////////////////////////////////////////////////////////////////////////
41
+ // Listeners //
42
+ ////////////////////////////////////////////////////////////////////////////////////////
43
  }
admin/controllers/FMControllerFromeditcountryinpopup.php CHANGED
@@ -1,43 +1,43 @@
1
- <?php
2
-
3
- class FMControllerFromeditcountryinpopup {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute() {
22
- $this->display();
23
- }
24
-
25
- public function display() {
26
- require_once WD_FM_DIR . "/admin/models/FMModelFromeditcountryinpopup.php";
27
- $model = new FMModelFromeditcountryinpopup();
28
-
29
- require_once WD_FM_DIR . "/admin/views/FMViewFromeditcountryinpopup.php";
30
- $view = new FMViewFromeditcountryinpopup($model);
31
- $view->display();
32
- }
33
-
34
- ////////////////////////////////////////////////////////////////////////////////////////
35
- // Getters & Setters //
36
- ////////////////////////////////////////////////////////////////////////////////////////
37
- ////////////////////////////////////////////////////////////////////////////////////////
38
- // Private Methods //
39
- ////////////////////////////////////////////////////////////////////////////////////////
40
- ////////////////////////////////////////////////////////////////////////////////////////
41
- // Listeners //
42
- ////////////////////////////////////////////////////////////////////////////////////////
43
  }
1
+ <?php
2
+
3
+ class FMControllerFromeditcountryinpopup {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function execute() {
22
+ $this->display();
23
+ }
24
+
25
+ public function display() {
26
+ require_once WD_FM_DIR . "/admin/models/FMModelFromeditcountryinpopup.php";
27
+ $model = new FMModelFromeditcountryinpopup();
28
+
29
+ require_once WD_FM_DIR . "/admin/views/FMViewFromeditcountryinpopup.php";
30
+ $view = new FMViewFromeditcountryinpopup($model);
31
+ $view->display();
32
+ }
33
+
34
+ ////////////////////////////////////////////////////////////////////////////////////////
35
+ // Getters & Setters //
36
+ ////////////////////////////////////////////////////////////////////////////////////////
37
+ ////////////////////////////////////////////////////////////////////////////////////////
38
+ // Private Methods //
39
+ ////////////////////////////////////////////////////////////////////////////////////////
40
+ ////////////////////////////////////////////////////////////////////////////////////////
41
+ // Listeners //
42
+ ////////////////////////////////////////////////////////////////////////////////////////
43
  }
admin/controllers/FMControllerFromipinfoinpopup.php CHANGED
@@ -1,43 +1,43 @@
1
- <?php
2
-
3
- class FMControllerFromipinfoinpopup {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute() {
22
- $this->display();
23
- }
24
-
25
- public function display() {
26
- require_once WD_FM_DIR . "/admin/models/FMModelFromipinfoinpopup.php";
27
- $model = new FMModelFromipinfoinpopup();
28
-
29
- require_once WD_FM_DIR . "/admin/views/FMViewFromipinfoinpopup.php";
30
- $view = new FMViewFromipinfoinpopup($model);
31
- $view->display();
32
- }
33
-
34
- ////////////////////////////////////////////////////////////////////////////////////////
35
- // Getters & Setters //
36
- ////////////////////////////////////////////////////////////////////////////////////////
37
- ////////////////////////////////////////////////////////////////////////////////////////
38
- // Private Methods //
39
- ////////////////////////////////////////////////////////////////////////////////////////
40
- ////////////////////////////////////////////////////////////////////////////////////////
41
- // Listeners //
42
- ////////////////////////////////////////////////////////////////////////////////////////
43
  }
1
+ <?php
2
+
3
+ class FMControllerFromipinfoinpopup {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function execute() {
22
+ $this->display();
23
+ }
24
+
25
+ public function display() {
26
+ require_once WD_FM_DIR . "/admin/models/FMModelFromipinfoinpopup.php";
27
+ $model = new FMModelFromipinfoinpopup();
28
+
29
+ require_once WD_FM_DIR . "/admin/views/FMViewFromipinfoinpopup.php";
30
+ $view = new FMViewFromipinfoinpopup($model);
31
+ $view->display();
32
+ }
33
+
34
+ ////////////////////////////////////////////////////////////////////////////////////////
35
+ // Getters & Setters //
36
+ ////////////////////////////////////////////////////////////////////////////////////////
37
+ ////////////////////////////////////////////////////////////////////////////////////////
38
+ // Private Methods //
39
+ ////////////////////////////////////////////////////////////////////////////////////////
40
+ ////////////////////////////////////////////////////////////////////////////////////////
41
+ // Listeners //
42
+ ////////////////////////////////////////////////////////////////////////////////////////
43
  }
admin/controllers/FMControllerFrommapeditinpopup.php CHANGED
@@ -1,43 +1,43 @@
1
- <?php
2
-
3
- class FMControllerFrommapeditinpopup {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute() {
22
- $this->display();
23
- }
24
-
25
- public function display() {
26
- require_once WD_FM_DIR . "/admin/models/FMModelFrommapeditinpopup.php";
27
- $model = new FMModelFrommapeditinpopup();
28
-
29
- require_once WD_FM_DIR . "/admin/views/FMViewFrommapeditinpopup.php";
30
- $view = new FMViewFrommapeditinpopup($model);
31
- $view->display();
32
- }
33
-
34
- ////////////////////////////////////////////////////////////////////////////////////////
35
- // Getters & Setters //
36
- ////////////////////////////////////////////////////////////////////////////////////////
37
- ////////////////////////////////////////////////////////////////////////////////////////
38
- // Private Methods //
39
- ////////////////////////////////////////////////////////////////////////////////////////
40
- ////////////////////////////////////////////////////////////////////////////////////////
41
- // Listeners //
42
- ////////////////////////////////////////////////////////////////////////////////////////
43
  }
1
+ <?php
2
+
3
+ class FMControllerFrommapeditinpopup {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function execute() {
22
+ $this->display();
23
+ }
24
+
25
+ public function display() {
26
+ require_once WD_FM_DIR . "/admin/models/FMModelFrommapeditinpopup.php";
27
+ $model = new FMModelFrommapeditinpopup();
28
+
29
+ require_once WD_FM_DIR . "/admin/views/FMViewFrommapeditinpopup.php";
30
+ $view = new FMViewFrommapeditinpopup($model);
31
+ $view->display();
32
+ }
33
+
34
+ ////////////////////////////////////////////////////////////////////////////////////////
35
+ // Getters & Setters //
36
+ ////////////////////////////////////////////////////////////////////////////////////////
37
+ ////////////////////////////////////////////////////////////////////////////////////////
38
+ // Private Methods //
39
+ ////////////////////////////////////////////////////////////////////////////////////////
40
+ ////////////////////////////////////////////////////////////////////////////////////////
41
+ // Listeners //
42
+ ////////////////////////////////////////////////////////////////////////////////////////
43
  }
admin/controllers/FMControllerGenerete_csv.php CHANGED
@@ -1,43 +1,43 @@
1
- <?php
2
-
3
- class FMControllerGenerete_csv {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute() {
22
- $this->display();
23
- }
24
-
25
- public function display() {
26
- require_once WD_FM_DIR . "/admin/models/FMModelGenerete_csv.php";
27
- $model = new FMModelGenerete_csv();
28
-
29
- require_once WD_FM_DIR . "/admin/views/FMViewGenerete_csv.php";
30
- $view = new FMViewGenerete_csv($model);
31
- $view->display();
32
- }
33
-
34
- ////////////////////////////////////////////////////////////////////////////////////////
35
- // Getters & Setters //
36
- ////////////////////////////////////////////////////////////////////////////////////////
37
- ////////////////////////////////////////////////////////////////////////////////////////
38
- // Private Methods //
39
- ////////////////////////////////////////////////////////////////////////////////////////
40
- ////////////////////////////////////////////////////////////////////////////////////////
41
- // Listeners //
42
- ////////////////////////////////////////////////////////////////////////////////////////
43
  }
1
+ <?php
2
+
3
+ class FMControllerGenerete_csv {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function execute() {
22
+ $this->display();
23
+ }
24
+
25
+ public function display() {
26
+ require_once WD_FM_DIR . "/admin/models/FMModelGenerete_csv.php";
27
+ $model = new FMModelGenerete_csv();
28
+
29
+ require_once WD_FM_DIR . "/admin/views/FMViewGenerete_csv.php";
30
+ $view = new FMViewGenerete_csv($model);
31
+ $view->display();
32
+ }
33
+
34
+ ////////////////////////////////////////////////////////////////////////////////////////
35
+ // Getters & Setters //
36
+ ////////////////////////////////////////////////////////////////////////////////////////
37
+ ////////////////////////////////////////////////////////////////////////////////////////
38
+ // Private Methods //
39
+ ////////////////////////////////////////////////////////////////////////////////////////
40
+ ////////////////////////////////////////////////////////////////////////////////////////
41
+ // Listeners //
42
+ ////////////////////////////////////////////////////////////////////////////////////////
43
  }
admin/controllers/FMControllerGenerete_xml.php CHANGED
@@ -1,43 +1,43 @@
1
- <?php
2
-
3
- class FMControllerGenerete_xml {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute() {
22
- $this->display();
23
- }
24
-
25
- public function display() {
26
- require_once WD_FM_DIR . "/admin/models/FMModelGenerete_xml.php";
27
- $model = new FMModelGenerete_xml();
28
-
29
- require_once WD_FM_DIR . "/admin/views/FMViewGenerete_xml.php";
30
- $view = new FMViewGenerete_xml($model);
31
- $view->display();
32
- }
33
-
34
- ////////////////////////////////////////////////////////////////////////////////////////
35
- // Getters & Setters //
36
- ////////////////////////////////////////////////////////////////////////////////////////
37
- ////////////////////////////////////////////////////////////////////////////////////////
38
- // Private Methods //
39
- ////////////////////////////////////////////////////////////////////////////////////////
40
- ////////////////////////////////////////////////////////////////////////////////////////
41
- // Listeners //
42
- ////////////////////////////////////////////////////////////////////////////////////////
43
  }
1
+ <?php
2
+
3
+ class FMControllerGenerete_xml {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function execute() {
22
+ $this->display();
23
+ }
24
+
25
+ public function display() {
26
+ require_once WD_FM_DIR . "/admin/models/FMModelGenerete_xml.php";
27
+ $model = new FMModelGenerete_xml();
28
+
29
+ require_once WD_FM_DIR . "/admin/views/FMViewGenerete_xml.php";
30
+ $view = new FMViewGenerete_xml($model);
31
+ $view->display();
32
+ }
33
+
34
+ ////////////////////////////////////////////////////////////////////////////////////////
35
+ // Getters & Setters //
36
+ ////////////////////////////////////////////////////////////////////////////////////////
37
+ ////////////////////////////////////////////////////////////////////////////////////////
38
+ // Private Methods //
39
+ ////////////////////////////////////////////////////////////////////////////////////////
40
+ ////////////////////////////////////////////////////////////////////////////////////////
41
+ // Listeners //
42
+ ////////////////////////////////////////////////////////////////////////////////////////
43
  }
admin/controllers/FMControllerSelect_data_from_db.php CHANGED
@@ -1,70 +1,70 @@
1
- <?php
2
-
3
- class FMControllerSelect_data_from_db {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute() {
22
- $task = ((isset($_GET['task'])) ? esc_html($_GET['task']) : 0);
23
- $id = ((isset($_GET['id'])) ? (int)esc_html($_GET['id']) : 0);
24
- $form_id = ((isset($_GET['form_id'])) ? (int)esc_html($_GET['form_id']) : 0);
25
- $field_id = ((isset($_GET['field_id'])) ? esc_html($_GET['field_id']) : 0);
26
- $field_type = ((isset($_GET['field_type'])) ? esc_html($_GET['field_type']) : 0);
27
- $value_disabled = ((isset($_GET['value_disabled'])) ? esc_html($_GET['value_disabled']) : 0);
28
- if ($task && method_exists($this, $task)) {
29
- $this->$task($form_id,$field_type="");
30
- }
31
- else
32
- $this->display($id, $field_id, $field_type, $value_disabled,$form_id);
33
- }
34
-
35
- public function display($id, $field_id, $field_type, $value_disabled,$form_id) {
36
- require_once WD_FM_DIR . "/admin/models/FMModelSelect_data_from_db.php";
37
- $model = new FMModelSelect_data_from_db();
38
-
39
- require_once WD_FM_DIR . "/admin/views/FMViewSelect_data_from_db.php";
40
- $view = new FMViewSelect_data_from_db($model);
41
- $view->display($id, $field_id, $field_type, $value_disabled,$form_id);
42
- }
43
-
44
- public function db_tables($form_id,$field_type) {
45
- require_once WD_FM_DIR . "/admin/models/FMModelSelect_data_from_db.php";
46
- $model = new FMModelSelect_data_from_db();
47
-
48
- require_once WD_FM_DIR . "/admin/views/FMViewSelect_data_from_db.php";
49
- $view = new FMViewSelect_data_from_db($model);
50
- $view->db_tables((int)$form_id, $field_type);
51
- }
52
- public function db_table_struct_select($form_id,$field_type) {
53
- require_once WD_FM_DIR . "/admin/models/FMModelSelect_data_from_db.php";
54
- $model = new FMModelSelect_data_from_db();
55
-
56
- require_once WD_FM_DIR . "/admin/views/FMViewSelect_data_from_db.php";
57
- $view = new FMViewSelect_data_from_db($model);
58
- $view->db_table_struct_select((int)$form_id,$field_type);
59
- }
60
-
61
- ////////////////////////////////////////////////////////////////////////////////////////
62
- // Getters & Setters //
63
- ////////////////////////////////////////////////////////////////////////////////////////
64
- ////////////////////////////////////////////////////////////////////////////////////////
65
- // Private Methods //
66
- ////////////////////////////////////////////////////////////////////////////////////////
67
- ////////////////////////////////////////////////////////////////////////////////////////
68
- // Listeners //
69
- ////////////////////////////////////////////////////////////////////////////////////////
70
  }
1
+ <?php
2
+
3
+ class FMControllerSelect_data_from_db {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function execute() {
22
+ $task = ((isset($_GET['task'])) ? esc_html($_GET['task']) : 0);
23
+ $id = ((isset($_GET['id'])) ? (int)esc_html($_GET['id']) : 0);
24
+ $form_id = ((isset($_GET['form_id'])) ? (int)esc_html($_GET['form_id']) : 0);
25
+ $field_id = ((isset($_GET['field_id'])) ? esc_html($_GET['field_id']) : 0);
26
+ $field_type = ((isset($_GET['field_type'])) ? esc_html($_GET['field_type']) : 0);
27
+ $value_disabled = ((isset($_GET['value_disabled'])) ? esc_html($_GET['value_disabled']) : 0);
28
+ if ($task && method_exists($this, $task)) {
29
+ $this->$task($form_id,$field_type="");
30
+ }
31
+ else
32
+ $this->display($id, $field_id, $field_type, $value_disabled,$form_id);
33
+ }
34
+
35
+ public function display($id, $field_id, $field_type, $value_disabled,$form_id) {
36
+ require_once WD_FM_DIR . "/admin/models/FMModelSelect_data_from_db.php";
37
+ $model = new FMModelSelect_data_from_db();
38
+
39
+ require_once WD_FM_DIR . "/admin/views/FMViewSelect_data_from_db.php";
40
+ $view = new FMViewSelect_data_from_db($model);
41
+ $view->display($id, $field_id, $field_type, $value_disabled,$form_id);
42
+ }
43
+
44
+ public function db_tables($form_id,$field_type) {
45
+ require_once WD_FM_DIR . "/admin/models/FMModelSelect_data_from_db.php";
46
+ $model = new FMModelSelect_data_from_db();
47
+
48
+ require_once WD_FM_DIR . "/admin/views/FMViewSelect_data_from_db.php";
49
+ $view = new FMViewSelect_data_from_db($model);
50
+ $view->db_tables((int)$form_id, $field_type);
51
+ }
52
+ public function db_table_struct_select($form_id,$field_type) {
53
+ require_once WD_FM_DIR . "/admin/models/FMModelSelect_data_from_db.php";
54
+ $model = new FMModelSelect_data_from_db();
55
+
56
+ require_once WD_FM_DIR . "/admin/views/FMViewSelect_data_from_db.php";
57
+ $view = new FMViewSelect_data_from_db($model);
58
+ $view->db_table_struct_select((int)$form_id,$field_type);
59
+ }
60
+
61
+ ////////////////////////////////////////////////////////////////////////////////////////
62
+ // Getters & Setters //
63
+ ////////////////////////////////////////////////////////////////////////////////////////
64
+ ////////////////////////////////////////////////////////////////////////////////////////
65
+ // Private Methods //
66
+ ////////////////////////////////////////////////////////////////////////////////////////
67
+ ////////////////////////////////////////////////////////////////////////////////////////
68
+ // Listeners //
69
+ ////////////////////////////////////////////////////////////////////////////////////////
70
  }
admin/controllers/FMControllerShow_matrix.php CHANGED
@@ -1,43 +1,43 @@
1
- <?php
2
-
3
- class FMControllerShow_matrix {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute() {
22
- $this->display();
23
- }
24
-
25
- public function display() {
26
- require_once WD_FM_DIR . "/admin/models/FMModelShow_matrix.php";
27
- $model = new FMModelShow_matrix();
28
-
29
- require_once WD_FM_DIR . "/admin/views/FMViewShow_matrix.php";
30
- $view = new FMViewShow_matrix($model);
31
- $view->display();
32
- }
33
-
34
- ////////////////////////////////////////////////////////////////////////////////////////
35
- // Getters & Setters //
36
- ////////////////////////////////////////////////////////////////////////////////////////
37
- ////////////////////////////////////////////////////////////////////////////////////////
38
- // Private Methods //
39
- ////////////////////////////////////////////////////////////////////////////////////////
40
- ////////////////////////////////////////////////////////////////////////////////////////
41
- // Listeners //
42
- ////////////////////////////////////////////////////////////////////////////////////////
43
  }
1
+ <?php
2
+
3
+ class FMControllerShow_matrix {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function execute() {
22
+ $this->display();
23
+ }
24
+
25
+ public function display() {
26
+ require_once WD_FM_DIR . "/admin/models/FMModelShow_matrix.php";
27
+ $model = new FMModelShow_matrix();
28
+
29
+ require_once WD_FM_DIR . "/admin/views/FMViewShow_matrix.php";
30
+ $view = new FMViewShow_matrix($model);
31
+ $view->display();
32
+ }
33
+
34
+ ////////////////////////////////////////////////////////////////////////////////////////
35
+ // Getters & Setters //
36
+ ////////////////////////////////////////////////////////////////////////////////////////
37
+ ////////////////////////////////////////////////////////////////////////////////////////
38
+ // Private Methods //
39
+ ////////////////////////////////////////////////////////////////////////////////////////
40
+ ////////////////////////////////////////////////////////////////////////////////////////
41
+ // Listeners //
42
+ ////////////////////////////////////////////////////////////////////////////////////////
43
  }
admin/controllers/FMControllerThemes_fm.php CHANGED
@@ -1,189 +1,189 @@
1
- <?php
2
-
3
- class FMControllerThemes_fm {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute() {
22
- $task = WDW_FM_Library::get('task');
23
- $id = (int)WDW_FM_Library::get('current_id', 0);
24
- $message = WDW_FM_Library::get('message');
25
- echo WDW_FM_Library::message_id($message);
26
- if (method_exists($this, $task)) {
27
- check_admin_referer('nonce_fm', 'nonce_fm');
28
- $this->$task($id);
29
- }
30
- else {
31
- $this->display();
32
- }
33
- }
34
-
35
- public function display() {
36
- require_once WD_FM_DIR . "/admin/models/FMModelThemes_fm.php";
37
- $model = new FMModelThemes_fm();
38
-
39
- require_once WD_FM_DIR . "/admin/views/FMViewThemes_fm.php";
40
- $view = new FMViewThemes_fm($model);
41
- $view->display();
42
- }
43
-
44
- public function add() {
45
- require_once WD_FM_DIR . "/admin/models/FMModelThemes_fm.php";
46
- $model = new FMModelThemes_fm();
47
-
48
- require_once WD_FM_DIR . "/admin/views/FMViewThemes_fm.php";
49
- $view = new FMViewThemes_fm($model);
50
- $view->edit(0, FALSE);
51
- }
52
-
53
- public function edit() {
54
- require_once WD_FM_DIR . "/admin/models/FMModelThemes_fm.php";
55
- $model = new FMModelThemes_fm();
56
-
57
- require_once WD_FM_DIR . "/admin/views/FMViewThemes_fm.php";
58
- $view = new FMViewThemes_fm($model);
59
- // $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? esc_html($_POST['current_id']) : 0);
60
- $id = (int)WDW_FM_Library::get('current_id', 0);
61
- $view->edit($id, FALSE);
62
- }
63
-
64
- public function save() {
65
- $message = $this->save_db();
66
- // $this->display();
67
- $page = WDW_FM_Library::get('page');
68
- WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
69
- }
70
-
71
- public function apply() {
72
- $message = $this->save_db();
73
- global $wpdb;
74
- // if (!isset($_POST['current_id']) || (esc_html($_POST['current_id']) == 0) || (esc_html($_POST['current_id']) == '')) {
75
-
76
- // }
77
- $id = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'formmaker_themes');
78
- $current_id = (int)WDW_FM_Library::get('current_id', $id);
79
- $page = WDW_FM_Library::get('page');
80
- WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'edit', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
81
- // $this->edit();
82
- }
83
-
84
- public function save_db() {
85
- global $wpdb;
86
- // $id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes( $_POST['current_id'])) : 0);
87
- $id = (int) WDW_FM_Library::get('current_id', 0);
88
- $title = (isset($_POST['title']) ? esc_html(stripslashes( $_POST['title'])) : '');
89
- $css = (isset($_POST['css']) ? stripslashes(preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $_POST['css'])) : '');
90
- $default = (isset($_POST['default']) ? esc_html(stripslashes( $_POST['default'])) : 0);
91
- if ($id != 0) {
92
- $save = $wpdb->update($wpdb->prefix . 'formmaker_themes', array(
93
- 'title' => $title,
94
- 'css' => $css,
95
- 'default' => $default,
96
- ), array('id' => $id));
97
- }
98
- else {
99
- $save = $wpdb->insert($wpdb->prefix . 'formmaker_themes', array(
100
- 'title' => $title,
101
- 'css' => $css,
102
- 'default' => $default,
103
- ), array(
104
- '%s',
105
- '%s',
106
- '%d',
107
- ));
108
- }
109
- if ($save !== FALSE) {
110
- return 1;
111
- }
112
- else {
113
- return 2;
114
- }
115
- }
116
-
117
- public function delete($id) {
118
- global $wpdb;
119
- $isDefault = $wpdb->get_var($wpdb->prepare('SELECT `default` FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $id));
120
- if ($isDefault) {
121
- $message = 4;
122
- }
123
- else {
124
- $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $id);
125
- if ($wpdb->query($query)) {
126
- $message = 3;
127
- }
128
- else {
129
- $message = 2;
130
- }
131
- }
132
- // $this->display();
133
- $page = WDW_FM_Library::get('page');
134
- WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
135
- }
136
-
137
- public function delete_all() {
138
- global $wpdb;
139
- $flag = FALSE;
140
- $isDefault = FALSE;
141
- $theme_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'formmaker_themes');
142
- foreach ($theme_ids_col as $theme_id) {
143
- if (isset($_POST['check_' . $theme_id])) {
144
- $isDefault = $wpdb->get_var($wpdb->prepare('SELECT `default` FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $theme_id));
145
- if ($isDefault) {
146
- $message = 4;
147
- }
148
- else {
149
- $flag = TRUE;
150
- $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $theme_id));
151
- }
152
- }
153
- }
154
- if ($flag) {
155
- $message = 5;
156
- }
157
- else {
158
- $message = 6;
159
- }
160
- // $this->display();
161
- $page = WDW_FM_Library::get('page');
162
- WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
163
- }
164
-
165
- public function setdefault($id) {
166
- global $wpdb;
167
- $wpdb->update($wpdb->prefix . 'formmaker_themes', array('default' => 0), array('default' => 1));
168
- $save = $wpdb->update($wpdb->prefix . 'formmaker_themes', array('default' => 1), array('id' => $id));
169
- if ($save !== FALSE) {
170
- $message = 7;
171
- }
172
- else {
173
- $message = 2;
174
- }
175
- // $this->display();
176
- $page = WDW_FM_Library::get('page');
177
- WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
178
- }
179
-
180
- ////////////////////////////////////////////////////////////////////////////////////////
181
- // Getters & Setters //
182
- ////////////////////////////////////////////////////////////////////////////////////////
183
- ////////////////////////////////////////////////////////////////////////////////////////
184
- // Private Methods //
185
- ////////////////////////////////////////////////////////////////////////////////////////
186
- ////////////////////////////////////////////////////////////////////////////////////////
187
- // Listeners //
188
- ////////////////////////////////////////////////////////////////////////////////////////
189
  }
1
+ <?php
2
+
3
+ class FMControllerThemes_fm {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function execute() {
22
+ $task = WDW_FM_Library::get('task');
23
+ $id = (int)WDW_FM_Library::get('current_id', 0);
24
+ $message = WDW_FM_Library::get('message');
25
+ echo WDW_FM_Library::message_id($message);
26
+ if (method_exists($this, $task)) {
27
+ check_admin_referer('nonce_fm', 'nonce_fm');
28
+ $this->$task($id);
29
+ }
30
+ else {
31
+ $this->display();
32
+ }
33
+ }
34
+
35
+ public function display() {
36
+ require_once WD_FM_DIR . "/admin/models/FMModelThemes_fm.php";
37
+ $model = new FMModelThemes_fm();
38
+
39
+ require_once WD_FM_DIR . "/admin/views/FMViewThemes_fm.php";
40
+ $view = new FMViewThemes_fm($model);
41
+ $view->display();
42
+ }
43
+
44
+ public function add() {
45
+ require_once WD_FM_DIR . "/admin/models/FMModelThemes_fm.php";
46
+ $model = new FMModelThemes_fm();
47
+
48
+ require_once WD_FM_DIR . "/admin/views/FMViewThemes_fm.php";
49
+ $view = new FMViewThemes_fm($model);
50
+ $view->edit(0, FALSE);
51
+ }
52
+
53
+ public function edit() {
54
+ require_once WD_FM_DIR . "/admin/models/FMModelThemes_fm.php";
55
+ $model = new FMModelThemes_fm();
56
+
57
+ require_once WD_FM_DIR . "/admin/views/FMViewThemes_fm.php";
58
+ $view = new FMViewThemes_fm($model);
59
+ // $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? esc_html($_POST['current_id']) : 0);
60
+ $id = (int)WDW_FM_Library::get('current_id', 0);
61
+ $view->edit($id, FALSE);
62
+ }
63
+
64
+ public function save() {
65
+ $message = $this->save_db();
66
+ // $this->display();
67
+ $page = WDW_FM_Library::get('page');
68
+ WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
69
+ }
70
+
71
+ public function apply() {
72
+ $message = $this->save_db();
73
+ global $wpdb;
74
+ // if (!isset($_POST['current_id']) || (esc_html($_POST['current_id']) == 0) || (esc_html($_POST['current_id']) == '')) {
75
+
76
+ // }
77
+ $id = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'formmaker_themes');
78
+ $current_id = (int)WDW_FM_Library::get('current_id', $id);
79
+ $page = WDW_FM_Library::get('page');
80
+ WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'edit', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
81
+ // $this->edit();
82
+ }
83
+
84
+ public function save_db() {
85
+ global $wpdb;
86
+ // $id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes( $_POST['current_id'])) : 0);
87
+ $id = (int) WDW_FM_Library::get('current_id', 0);
88
+ $title = (isset($_POST['title']) ? esc_html(stripslashes( $_POST['title'])) : '');
89
+ $css = (isset($_POST['css']) ? stripslashes(preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $_POST['css'])) : '');
90
+ $default = (isset($_POST['default']) ? esc_html(stripslashes( $_POST['default'])) : 0);
91
+ if ($id != 0) {
92
+ $save = $wpdb->update($wpdb->prefix . 'formmaker_themes', array(
93
+ 'title' => $title,
94
+ 'css' => $css,
95
+ 'default' => $default,
96
+ ), array('id' => $id));
97
+ }
98
+ else {
99
+ $save = $wpdb->insert($wpdb->prefix . 'formmaker_themes', array(
100
+ 'title' => $title,
101
+ 'css' => $css,
102
+ 'default' => $default,
103
+ ), array(
104
+ '%s',
105
+ '%s',
106
+ '%d',
107
+ ));
108
+ }
109
+ if ($save !== FALSE) {
110
+ return 1;
111
+ }
112
+ else {
113
+ return 2;
114
+ }
115
+ }
116
+
117
+ public function delete($id) {
118
+ global $wpdb;
119
+ $isDefault = $wpdb->get_var($wpdb->prepare('SELECT `default` FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $id));
120
+ if ($isDefault) {
121
+ $message = 4;
122
+ }
123
+ else {
124
+ $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $id);
125
+ if ($wpdb->query($query)) {
126
+ $message = 3;
127
+ }
128
+ else {
129
+ $message = 2;
130
+ }
131
+ }
132
+ // $this->display();
133
+ $page = WDW_FM_Library::get('page');
134
+ WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
135
+ }
136
+
137
+ public function delete_all() {
138
+ global $wpdb;
139
+ $flag = FALSE;
140
+ $isDefault = FALSE;
141
+ $theme_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'formmaker_themes');
142
+ foreach ($theme_ids_col as $theme_id) {
143
+ if (isset($_POST['check_' . $theme_id])) {
144
+ $isDefault = $wpdb->get_var($wpdb->prepare('SELECT `default` FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $theme_id));
145
+ if ($isDefault) {
146
+ $message = 4;
147
+ }
148
+ else {
149
+ $flag = TRUE;
150
+ $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $theme_id));
151
+ }
152
+ }
153
+ }
154
+ if ($flag) {
155
+ $message = 5;
156
+ }
157
+ else {
158
+ $message = 6;
159
+ }
160
+ // $this->display();
161
+ $page = WDW_FM_Library::get('page');
162
+ WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
163
+ }
164
+
165
+ public function setdefault($id) {
166
+ global $wpdb;
167
+ $wpdb->update($wpdb->prefix . 'formmaker_themes', array('default' => 0), array('default' => 1));
168
+ $save = $wpdb->update($wpdb->prefix . 'formmaker_themes', array('default' => 1), array('id' => $id));
169
+ if ($save !== FALSE) {
170
+ $message = 7;
171
+ }
172
+ else {
173
+ $message = 2;
174
+ }
175
+ // $this->display();
176
+ $page = WDW_FM_Library::get('page');
177
+ WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
178
+ }
179
+
180
+ ////////////////////////////////////////////////////////////////////////////////////////
181
+ // Getters & Setters //
182
+ ////////////////////////////////////////////////////////////////////////////////////////
183
+ ////////////////////////////////////////////////////////////////////////////////////////
184
+ // Private Methods //
185
+ ////////////////////////////////////////////////////////////////////////////////////////
186
+ ////////////////////////////////////////////////////////////////////////////////////////
187
+ // Listeners //
188
+ ////////////////////////////////////////////////////////////////////////////////////////
189
  }
admin/controllers/FMControllerUninstall_fm.php CHANGED
@@ -1,58 +1,58 @@
1
- <?php
2
-
3
- class FMControllerUninstall_fm {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute() {
22
- $task = ((isset($_POST['task'])) ? esc_html(stripslashes($_POST['task'])) : '');
23
- if (method_exists($this, $task)) {
24
- check_admin_referer('nonce_fm', 'nonce_fm');
25
- $this->$task();
26
- }
27
- else {
28
- $this->display();
29
- }
30
- }
31
-
32
- public function display() {
33
- require_once WD_FM_DIR . "/admin/models/FMModelUninstall_fm.php";
34
- $model = new FMModelUninstall_fm();
35
-
36
- require_once WD_FM_DIR . "/admin/views/FMViewUninstall_fm.php";
37
- $view = new FMViewUninstall_fm($model);
38
- $view->display();
39
- }
40
-
41
- public function uninstall() {
42
- require_once WD_FM_DIR . "/admin/models/FMModelUninstall_fm.php";
43
- $model = new FMModelUninstall_fm();
44
-
45
- require_once WD_FM_DIR . "/admin/views/FMViewUninstall_fm.php";
46
- $view = new FMViewUninstall_fm($model);
47
- $view->uninstall();
48
- }
49
- ////////////////////////////////////////////////////////////////////////////////////////
50
- // Getters & Setters //
51
- ////////////////////////////////////////////////////////////////////////////////////////
52
- ////////////////////////////////////////////////////////////////////////////////////////
53
- // Private Methods //
54
- ////////////////////////////////////////////////////////////////////////////////////////
55
- ////////////////////////////////////////////////////////////////////////////////////////
56
- // Listeners //
57
- ////////////////////////////////////////////////////////////////////////////////////////
58
  }
1
+ <?php
2
+
3
+ class FMControllerUninstall_fm {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function execute() {
22
+ $task = ((isset($_POST['task'])) ? esc_html(stripslashes($_POST['task'])) : '');
23
+ if (method_exists($this, $task)) {
24
+ check_admin_referer('nonce_fm', 'nonce_fm');
25
+ $this->$task();
26
+ }
27
+ else {
28
+ $this->display();
29
+ }
30
+ }
31
+
32
+ public function display() {
33
+ require_once WD_FM_DIR . "/admin/models/FMModelUninstall_fm.php";
34
+ $model = new FMModelUninstall_fm();
35
+
36
+ require_once WD_FM_DIR . "/admin/views/FMViewUninstall_fm.php";
37
+ $view = new FMViewUninstall_fm($model);
38
+ $view->display();
39
+ }
40
+
41
+ public function uninstall() {
42
+ require_once WD_FM_DIR . "/admin/models/FMModelUninstall_fm.php";
43
+ $model = new FMModelUninstall_fm();
44
+
45
+ require_once WD_FM_DIR . "/admin/views/FMViewUninstall_fm.php";
46
+ $view = new FMViewUninstall_fm($model);
47
+ $view->uninstall();
48
+ }
49
+ ////////////////////////////////////////////////////////////////////////////////////////
50
+ // Getters & Setters //
51
+ ////////////////////////////////////////////////////////////////////////////////////////
52
+ ////////////////////////////////////////////////////////////////////////////////////////
53
+ // Private Methods //
54
+ ////////////////////////////////////////////////////////////////////////////////////////
55
+ ////////////////////////////////////////////////////////////////////////////////////////
56
+ // Listeners //
57
+ ////////////////////////////////////////////////////////////////////////////////////////
58
  }
admin/controllers/FMControllerWidget.php CHANGED
@@ -1,61 +1,61 @@
1
- <?php
2
-
3
- class FMControllerWidget extends WP_Widget {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $view;
14
- private $model;
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- // Constructor & Destructor //
17
- ////////////////////////////////////////////////////////////////////////////////////////
18
- public function __construct() {
19
- $widget_ops = array(
20
- 'classname' => 'form_maker_widget',
21
- 'description' => 'Add Form Maker widget.'
22
- );
23
- // Widget Control Settings.
24
- $control_ops = array('id_base' => 'form_maker_widget');
25
- // Create the widget.
26
- parent::__construct('form_maker_widget', 'Form Maker', $widget_ops, $control_ops);
27
- require_once WD_FM_DIR . "/admin/models/FMModelWidget.php";
28
- $this->model = new FMModelWidget();
29
-
30
- require_once WD_FM_DIR . "/admin/views/FMViewWidget.php";
31
- $this->view = new FMViewWidget($this->model);
32
- }
33
- ////////////////////////////////////////////////////////////////////////////////////////
34
- // Public Methods //
35
- ////////////////////////////////////////////////////////////////////////////////////////
36
-
37
- public function widget($args, $instance) {
38
- $this->view->widget($args, $instance);
39
- }
40
-
41
- public function form( $instance ) {
42
- $this->view->form($instance, parent::get_field_id('title'), parent::get_field_name('title'), parent::get_field_id('form_id'), parent::get_field_name('form_id'));
43
- }
44
-
45
- // Update Settings.
46
- public function update($new_instance, $old_instance) {
47
- $instance['title'] = $new_instance['title'];
48
- $instance['form_id'] = $new_instance['form_id'];
49
- return $instance;
50
- }
51
-
52
- ////////////////////////////////////////////////////////////////////////////////////////
53
- // Getters & Setters //
54
- ////////////////////////////////////////////////////////////////////////////////////////
55
- ////////////////////////////////////////////////////////////////////////////////////////
56
- // Private Methods //
57
- ////////////////////////////////////////////////////////////////////////////////////////
58
- ////////////////////////////////////////////////////////////////////////////////////////
59
- // Listeners //
60
- ////////////////////////////////////////////////////////////////////////////////////////
61
  }
1
+ <?php
2
+
3
+ class FMControllerWidget extends WP_Widget {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ private $view;
14
+ private $model;
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ // Constructor & Destructor //
17
+ ////////////////////////////////////////////////////////////////////////////////////////
18
+ public function __construct() {
19
+ $widget_ops = array(
20
+ 'classname' => 'form_maker_widget',
21
+ 'description' => 'Add Form Maker widget.'
22
+ );
23
+ // Widget Control Settings.
24
+ $control_ops = array('id_base' => 'form_maker_widget');
25
+ // Create the widget.
26
+ parent::__construct('form_maker_widget', 'Form Maker', $widget_ops, $control_ops);
27
+ require_once WD_FM_DIR . "/admin/models/FMModelWidget.php";
28
+ $this->model = new FMModelWidget();
29
+
30
+ require_once WD_FM_DIR . "/admin/views/FMViewWidget.php";
31
+ $this->view = new FMViewWidget($this->model);
32
+ }
33
+ ////////////////////////////////////////////////////////////////////////////////////////
34
+ // Public Methods //
35
+ ////////////////////////////////////////////////////////////////////////////////////////
36
+
37
+ public function widget($args, $instance) {
38
+ $this->view->widget($args, $instance);
39
+ }
40
+
41
+ public function form( $instance ) {
42
+ $this->view->form($instance, parent::get_field_id('title'), parent::get_field_name('title'), parent::get_field_id('form_id'), parent::get_field_name('form_id'));
43
+ }
44
+
45
+ // Update Settings.
46
+ public function update($new_instance, $old_instance) {
47
+ $instance['title'] = $new_instance['title'];
48
+ $instance['form_id'] = $new_instance['form_id'];
49
+ return $instance;
50
+ }
51
+
52
+ ////////////////////////////////////////////////////////////////////////////////////////
53
+ // Getters & Setters //
54
+ ////////////////////////////////////////////////////////////////////////////////////////
55
+ ////////////////////////////////////////////////////////////////////////////////////////
56
+ // Private Methods //
57
+ ////////////////////////////////////////////////////////////////////////////////////////
58
+ ////////////////////////////////////////////////////////////////////////////////////////
59
+ // Listeners //
60
+ ////////////////////////////////////////////////////////////////////////////////////////
61
  }
admin/models/FMModelBlocked_ips_fm.php CHANGED
@@ -1,75 +1,75 @@
1
- <?php
2
-
3
- class FMModelBlocked_ips_fm {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function get_rows_data() {
22
- global $wpdb;
23
- $where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE `ip` LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
24
- $asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'desc') ? 'desc' : 'asc');
25
- $order_by_array = array('id', 'ip');
26
- $order_by = isset($_POST['order_by']) && in_array(esc_html(stripslashes($_POST['order_by'])), $order_by_array) ? esc_html(stripslashes($_POST['order_by'])) : 'id';
27
- $order_by = ' ORDER BY `' . $order_by . '` ' . $asc_or_desc;
28
- if (isset($_POST['page_number']) && $_POST['page_number']) {
29
- $limit = ((int) $_POST['page_number'] - 1) * 20;
30
- }
31
- else {
32
- $limit = 0;
33
- }
34
- $query = "SELECT * FROM " . $wpdb->prefix . "formmaker_blocked " . $where . $order_by . " LIMIT " . $limit . ",20";
35
- $rows = $wpdb->get_results($query);
36
- return $rows;
37
- }
38
-
39
- public function get_row_data($id) {
40
- global $wpdb;
41
- if ($id != 0) {
42
- $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_blocked WHERE id="%d"', $id));
43
- }
44
- else {
45
- $row->id = 0;
46
- $row->ip = '';
47
- }
48
- return $row;
49
- }
50
-
51
- public function page_nav() {
52
- global $wpdb;
53
- $where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE `ip` LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
54
- $query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "formmaker_blocked " . $where;
55
- $total = $wpdb->get_var($query);
56
- $page_nav['total'] = $total;
57
- if (isset($_POST['page_number']) && $_POST['page_number']) {
58
- $limit = ((int) $_POST['page_number'] - 1) * 20;
59
- }
60
- else {
61
- $limit = 0;
62
- }
63
- $page_nav['limit'] = (int) ($limit / 20 + 1);
64
- return $page_nav;
65
- }
66
- ////////////////////////////////////////////////////////////////////////////////////////
67
- // Getters & Setters //
68
- ////////////////////////////////////////////////////////////////////////////////////////
69
- ////////////////////////////////////////////////////////////////////////////////////////
70
- // Private Methods //
71
- ////////////////////////////////////////////////////////////////////////////////////////
72
- ////////////////////////////////////////////////////////////////////////////////////////
73
- // Listeners //
74
- ////////////////////////////////////////////////////////////////////////////////////////
75
  }
1
+ <?php
2
+
3
+ class FMModelBlocked_ips_fm {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function get_rows_data() {
22
+ global $wpdb;
23
+ $where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE `ip` LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
24
+ $asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'desc') ? 'desc' : 'asc');
25
+ $order_by_array = array('id', 'ip');
26
+ $order_by = isset($_POST['order_by']) && in_array(esc_html(stripslashes($_POST['order_by'])), $order_by_array) ? esc_html(stripslashes($_POST['order_by'])) : 'id';
27
+ $order_by = ' ORDER BY `' . $order_by . '` ' . $asc_or_desc;
28
+ if (isset($_POST['page_number']) && $_POST['page_number']) {
29
+ $limit = ((int) $_POST['page_number'] - 1) * 20;
30
+ }
31
+ else {
32
+ $limit = 0;
33
+ }
34
+ $query = "SELECT * FROM " . $wpdb->prefix . "formmaker_blocked " . $where . $order_by . " LIMIT " . $limit . ",20";
35
+ $rows = $wpdb->get_results($query);
36
+ return $rows;
37
+ }
38
+
39
+ public function get_row_data($id) {
40
+ global $wpdb;
41
+ if ($id != 0) {
42
+ $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_blocked WHERE id="%d"', $id));
43
+ }
44
+ else {
45
+ $row->id = 0;
46
+ $row->ip = '';
47
+ }
48
+ return $row;
49
+ }
50
+
51
+ public function page_nav() {
52
+ global $wpdb;
53
+ $where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE `ip` LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
54
+ $query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "formmaker_blocked " . $where;
55
+ $total = $wpdb->get_var($query);
56
+ $page_nav['total'] = $total;
57
+ if (isset($_POST['page_number']) && $_POST['page_number']) {
58
+ $limit = ((int) $_POST['page_number'] - 1) * 20;
59
+ }
60
+ else {
61
+ $limit = 0;
62
+ }
63
+ $page_nav['limit'] = (int) ($limit / 20 + 1);
64
+ return $page_nav;
65
+ }
66
+ ////////////////////////////////////////////////////////////////////////////////////////
67
+ // Getters & Setters //
68
+ ////////////////////////////////////////////////////////////////////////////////////////
69
+ ////////////////////////////////////////////////////////////////////////////////////////
70
+ // Private Methods //
71
+ ////////////////////////////////////////////////////////////////////////////////////////
72
+ ////////////////////////////////////////////////////////////////////////////////////////
73
+ // Listeners //
74
+ ////////////////////////////////////////////////////////////////////////////////////////
75
  }
admin/models/FMModelFormMakerEditCSS.php CHANGED
@@ -1,42 +1,42 @@
1
- <?php
2
-
3
- class FMModelFormMakerEditCSS {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
-
22
- public function get_theme_row($id) {
23
- global $wpdb;
24
- $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $id));
25
- return $row;
26
- }
27
-
28
- /*public function get_form($form_id) {
29
- global $wpdb;
30
- $form = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $form_id));
31
- return $form;
32
- }*/
33
- ////////////////////////////////////////////////////////////////////////////////////////
34
- // Getters & Setters //
35
- ////////////////////////////////////////////////////////////////////////////////////////
36
- ////////////////////////////////////////////////////////////////////////////////////////
37
- // Private Methods //
38
- ////////////////////////////////////////////////////////////////////////////////////////
39
- ////////////////////////////////////////////////////////////////////////////////////////
40
- // Listeners //
41
- ////////////////////////////////////////////////////////////////////////////////////////
42
  }
1
+ <?php
2
+
3
+ class FMModelFormMakerEditCSS {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+
22
+ public function get_theme_row($id) {
23
+ global $wpdb;
24
+ $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $id));
25
+ return $row;
26
+ }
27
+
28
+ /*public function get_form($form_id) {
29
+ global $wpdb;
30
+ $form = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $form_id));
31
+ return $form;
32
+ }*/
33
+ ////////////////////////////////////////////////////////////////////////////////////////
34
+ // Getters & Setters //
35
+ ////////////////////////////////////////////////////////////////////////////////////////
36
+ ////////////////////////////////////////////////////////////////////////////////////////
37
+ // Private Methods //
38
+ ////////////////////////////////////////////////////////////////////////////////////////
39
+ ////////////////////////////////////////////////////////////////////////////////////////
40
+ // Listeners //
41
+ ////////////////////////////////////////////////////////////////////////////////////////
42
  }
admin/models/FMModelFormMakerPreview.php CHANGED
@@ -1,42 +1,42 @@
1
- <?php
2
-
3
- class FMModelFormMakerPreview {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
-
22
- public function get_theme_css($id) {
23
- global $wpdb;
24
- $css = $wpdb->get_var($wpdb->prepare('SELECT css FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $id));
25
- return $css;
26
- }
27
-
28
- public function get_form($form_id) {
29
- global $wpdb;
30
- $form = $wpdb->get_var($wpdb->prepare('SELECT form_front FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $form_id));
31
- return $form;
32
- }
33
- ////////////////////////////////////////////////////////////////////////////////////////
34
- // Getters & Setters //
35
- ////////////////////////////////////////////////////////////////////////////////////////
36
- ////////////////////////////////////////////////////////////////////////////////////////
37
- // Private Methods //
38
- ////////////////////////////////////////////////////////////////////////////////////////
39
- ////////////////////////////////////////////////////////////////////////////////////////
40
- // Listeners //
41
- ////////////////////////////////////////////////////////////////////////////////////////
42
  }
1
+ <?php
2
+
3
+ class FMModelFormMakerPreview {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+
22
+ public function get_theme_css($id) {
23
+ global $wpdb;
24
+ $css = $wpdb->get_var($wpdb->prepare('SELECT css FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $id));
25
+ return $css;
26
+ }
27
+
28
+ public function get_form($form_id) {
29
+ global $wpdb;
30
+ $form = $wpdb->get_var($wpdb->prepare('SELECT form_front FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $form_id));
31
+ return $form;
32
+ }
33
+ ////////////////////////////////////////////////////////////////////////////////////////
34
+ // Getters & Setters //
35
+ ////////////////////////////////////////////////////////////////////////////////////////
36
+ ////////////////////////////////////////////////////////////////////////////////////////
37
+ // Private Methods //
38
+ ////////////////////////////////////////////////////////////////////////////////////////
39
+ ////////////////////////////////////////////////////////////////////////////////////////
40
+ // Listeners //
41
+ ////////////////////////////////////////////////////////////////////////////////////////
42
  }
admin/models/FMModelFormMakerSQLMapping.php CHANGED
@@ -1,121 +1,121 @@
1
- <?php
2
-
3
- class FMModelFormMakerSQLMapping {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
-
22
- function get_query($id) {
23
- global $wpdb;
24
- $rows = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "formmaker_query where id=" . $id);
25
- return $rows;
26
- }
27
-
28
- function get_labels($form_id) {
29
- global $wpdb;
30
- // $wpdb = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
31
- // wp_set_wpdb_vars();
32
- $rows = $wpdb->get_var("SELECT label_order_current FROM " . $wpdb->prefix . "formmaker where id=" . $form_id);
33
- return $rows;
34
- }
35
-
36
- function get_tables() {
37
- global $wpdb;
38
- $con_type = $_POST['con_type'];
39
-
40
- if($con_type == 'local') {
41
- $query = "SHOW TABLES";
42
- $tables = $wpdb->get_col($query);
43
- }
44
- else if($con_type == 'remote') {
45
- $username = isset($_POST['username']) ? $_POST['username'] : '';
46
- $password = isset($_POST['password']) ? $_POST['password'] : '';
47
- $database = isset($_POST['database']) ? $_POST['database'] : '';
48
- $host = isset($_POST['host']) ? $_POST['host'] : '';
49
- $wpdb_temp = new wpdb($username, $password, $database, $host);
50
- $query = "SHOW TABLES";
51
- $tables = $wpdb_temp->get_col($query);
52
- }
53
- //$wpdb= new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
54
- return $tables;
55
- }
56
-
57
- function get_tables_saved($con_type, $username, $password, $database, $host) {
58
- global $wpdb;
59
-
60
- if($con_type == 'local') {
61
- $query = "SHOW TABLES";
62
- $tables = $wpdb->get_col($query);
63
- }
64
- else if($con_type == 'remote') {
65
- $wpdb_temp = new wpdb($username, $password, $database, $host);
66
- $query = "SHOW TABLES";
67
- $tables = $wpdb_temp->get_col($query);
68
- }
69
- //$wpdb= new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
70
- return $tables;
71
- }
72
-
73
- function get_table_struct() {
74
- global $wpdb;
75
- $name = isset($_POST['name']) ? $_POST['name'] : NULL;
76
- if(!$name)
77
- return array();
78
- $con_method = $_POST['con_method'];
79
- $con_type = $_POST['con_type'];
80
- $query = "SHOW COLUMNS FROM " . $name;
81
- if($con_type == 'remote') {
82
- $username = isset($_POST['username']) ? $_POST['username'] : '';
83
- $password = isset($_POST['password']) ? $_POST['password'] : '';
84
- $database = isset($_POST['database']) ? $_POST['database'] : '';
85
- $host = isset($_POST['host']) ? $_POST['host'] : '';
86
- $wpdb_temp = new wpdb($username, $password, $database, $host);
87
- $table_struct = $wpdb_temp->get_results($query);
88
- }
89
- else {
90
- $table_struct = $wpdb->get_results($query);
91
- }
92
- //$wpdb= new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
93
- return $table_struct;
94
- }
95
-
96
- function get_table_struct_saved($con_type, $username, $password, $database, $host, $name, $con_method) {
97
- global $wpdb;
98
- if(!$name)
99
- return array();
100
- $query = "SHOW COLUMNS FROM " . $name;
101
- if($con_type == 'remote') {
102
- $wpdb_temp = new wpdb($username, $password, $database, $host);
103
- $table_struct = $wpdb_temp->get_results($query);
104
- }
105
- else {
106
- $table_struct = $wpdb->get_results($query);
107
- }
108
- //$wpdb= new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
109
- return $table_struct;
110
- }
111
-
112
- ////////////////////////////////////////////////////////////////////////////////////////
113
- // Getters & Setters //
114
- ////////////////////////////////////////////////////////////////////////////////////////
115
- ////////////////////////////////////////////////////////////////////////////////////////
116
- // Private Methods //
117
- ////////////////////////////////////////////////////////////////////////////////////////
118
- ////////////////////////////////////////////////////////////////////////////////////////
119
- // Listeners //
120
- ////////////////////////////////////////////////////////////////////////////////////////
121
  }
1
+ <?php
2
+
3
+ class FMModelFormMakerSQLMapping {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+
22
+ function get_query($id) {
23
+ global $wpdb;
24
+ $rows = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "formmaker_query where id=" . $id);
25
+ return $rows;
26
+ }
27
+
28
+ function get_labels($form_id) {
29
+ global $wpdb;
30
+ // $wpdb = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
31
+ // wp_set_wpdb_vars();
32
+ $rows = $wpdb->get_var("SELECT label_order_current FROM " . $wpdb->prefix . "formmaker where id=" . $form_id);
33
+ return $rows;
34
+ }
35
+
36
+ function get_tables() {
37
+ global $wpdb;
38
+ $con_type = $_POST['con_type'];
39
+
40
+ if($con_type == 'local') {
41
+ $query = "SHOW TABLES";
42
+ $tables = $wpdb->get_col($query);
43
+ }
44
+ else if($con_type == 'remote') {
45
+ $username = isset($_POST['username']) ? $_POST['username'] : '';
46
+ $password = isset($_POST['password']) ? $_POST['password'] : '';
47
+ $database = isset($_POST['database']) ? $_POST['database'] : '';
48
+ $host = isset($_POST['host']) ? $_POST['host'] : '';
49
+ $wpdb_temp = new wpdb($username, $password, $database, $host);
50
+ $query = "SHOW TABLES";
51
+ $tables = $wpdb_temp->get_col($query);
52
+ }
53
+ //$wpdb= new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
54
+ return $tables;
55
+ }
56
+
57
+ function get_tables_saved($con_type, $username, $password, $database, $host) {
58
+ global $wpdb;
59
+
60
+ if($con_type == 'local') {
61
+ $query = "SHOW TABLES";
62
+ $tables = $wpdb->get_col($query);
63
+ }
64
+ else if($con_type == 'remote') {
65
+ $wpdb_temp = new wpdb($username, $password, $database, $host);
66
+ $query = "SHOW TABLES";
67
+ $tables = $wpdb_temp->get_col($query);
68
+ }
69
+ //$wpdb= new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
70
+ return $tables;
71
+ }
72
+
73
+ function get_table_struct() {
74
+ global $wpdb;
75
+ $name = isset($_POST['name']) ? $_POST['name'] : NULL;
76
+ if(!$name)
77
+ return array();
78
+ $con_method = $_POST['con_method'];
79
+ $con_type = $_POST['con_type'];
80
+ $query = "SHOW COLUMNS FROM " . $name;
81
+ if($con_type == 'remote') {
82
+ $username = isset($_POST['username']) ? $_POST['username'] : '';
83
+ $password = isset($_POST['password']) ? $_POST['password'] : '';
84
+ $database = isset($_POST['database']) ? $_POST['database'] : '';
85
+ $host = isset($_POST['host']) ? $_POST['host'] : '';
86
+ $wpdb_temp = new wpdb($username, $password, $database, $host);
87
+ $table_struct = $wpdb_temp->get_results($query);
88
+ }
89
+ else {
90
+ $table_struct = $wpdb->get_results($query);
91
+ }
92
+ //$wpdb= new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
93
+ return $table_struct;
94
+ }
95
+
96
+ function get_table_struct_saved($con_type, $username, $password, $database, $host, $name, $con_method) {
97
+ global $wpdb;
98
+ if(!$name)
99
+ return array();
100
+ $query = "SHOW COLUMNS FROM " . $name;
101
+ if($con_type == 'remote') {
102
+ $wpdb_temp = new wpdb($username, $password, $database, $host);
103
+ $table_struct = $wpdb_temp->get_results($query);
104
+ }
105
+ else {
106
+ $table_struct = $wpdb->get_results($query);
107
+ }
108
+ //$wpdb= new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
109
+ return $table_struct;
110
+ }
111
+
112
+ ////////////////////////////////////////////////////////////////////////////////////////
113
+ // Getters & Setters //
114
+ ////////////////////////////////////////////////////////////////////////////////////////
115
+ ////////////////////////////////////////////////////////////////////////////////////////
116
+ // Private Methods //
117
+ ////////////////////////////////////////////////////////////////////////////////////////
118
+ ////////////////////////////////////////////////////////////////////////////////////////
119
+ // Listeners //
120
+ ////////////////////////////////////////////////////////////////////////////////////////
121
  }
admin/models/FMModelFormMakerSubmits.php CHANGED
@@ -1,43 +1,43 @@
1
- <?php
2
-
3
- class FMModelFormMakerSubmits {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
-
22
- public function get_from_label_order($form_id) {
23
- global $wpdb;
24
- $label_order = $wpdb->get_var($wpdb->prepare('SELECT `label_order` FROM `' . $wpdb->prefix . 'formmaker` WHERE id="%d"', $form_id));
25
- return $label_order;
26
- }
27
-
28
- public function get_submissions($group_id) {
29
- global $wpdb;
30
- $row = $wpdb->get_results($wpdb->prepare('SELECT * FROM `' . $wpdb->prefix . 'formmaker_submits` WHERE group_id="%d"', $group_id));
31
- return $row;
32
- }
33
-
34
- ////////////////////////////////////////////////////////////////////////////////////////
35
- // Getters & Setters //
36
- ////////////////////////////////////////////////////////////////////////////////////////
37
- ////////////////////////////////////////////////////////////////////////////////////////
38
- // Private Methods //
39
- ////////////////////////////////////////////////////////////////////////////////////////
40
- ////////////////////////////////////////////////////////////////////////////////////////
41
- // Listeners //
42
- ////////////////////////////////////////////////////////////////////////////////////////
43
  }
1
+ <?php
2
+
3
+ class FMModelFormMakerSubmits {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+
22
+ public function get_from_label_order($form_id) {
23
+ global $wpdb;
24
+ $label_order = $wpdb->get_var($wpdb->prepare('SELECT `label_order` FROM `' . $wpdb->prefix . 'formmaker` WHERE id="%d"', $form_id));
25
+ return $label_order;
26
+ }
27
+
28
+ public function get_submissions($group_id) {
29
+ global $wpdb;
30
+ $row = $wpdb->get_results($wpdb->prepare('SELECT * FROM `' . $wpdb->prefix . 'formmaker_submits` WHERE group_id="%d"', $group_id));
31
+ return $row;
32
+ }
33
+
34
+ ////////////////////////////////////////////////////////////////////////////////////////
35
+ // Getters & Setters //
36
+ ////////////////////////////////////////////////////////////////////////////////////////
37
+ ////////////////////////////////////////////////////////////////////////////////////////
38
+ // Private Methods //
39
+ ////////////////////////////////////////////////////////////////////////////////////////
40
+ ////////////////////////////////////////////////////////////////////////////////////////
41
+ // Listeners //
42
+ ////////////////////////////////////////////////////////////////////////////////////////
43
  }
admin/models/FMModelFormmakerwdcaptcha.php CHANGED
@@ -1,31 +1,31 @@
1
- <?php
2
-
3
- class FMModelFormmakerwdcaptcha {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
-
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Getters & Setters //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
- ////////////////////////////////////////////////////////////////////////////////////////
26
- // Private Methods //
27
- ////////////////////////////////////////////////////////////////////////////////////////
28
- ////////////////////////////////////////////////////////////////////////////////////////
29
- // Listeners //
30
- ////////////////////////////////////////////////////////////////////////////////////////
31
  }
1
+ <?php
2
+
3
+ class FMModelFormmakerwdcaptcha {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+
22
+ ////////////////////////////////////////////////////////////////////////////////////////
23
+ // Getters & Setters //
24
+ ////////////////////////////////////////////////////////////////////////////////////////
25
+ ////////////////////////////////////////////////////////////////////////////////////////
26
+ // Private Methods //
27
+ ////////////////////////////////////////////////////////////////////////////////////////
28
+ ////////////////////////////////////////////////////////////////////////////////////////
29
+ // Listeners //
30
+ ////////////////////////////////////////////////////////////////////////////////////////
31
  }
admin/models/FMModelFormmakerwdmathcaptcha.php CHANGED
@@ -1,31 +1,31 @@
1
- <?php
2
-
3
- class FMModelFormmakerwdmathcaptcha {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
-
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Getters & Setters //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
- ////////////////////////////////////////////////////////////////////////////////////////
26
- // Private Methods //
27
- ////////////////////////////////////////////////////////////////////////////////////////
28
- ////////////////////////////////////////////////////////////////////////////////////////
29
- // Listeners //
30
- ////////////////////////////////////////////////////////////////////////////////////////
31
  }
1
+ <?php
2
+
3
+ class FMModelFormmakerwdmathcaptcha {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+
22
+ ////////////////////////////////////////////////////////////////////////////////////////
23
+ // Getters & Setters //
24
+ ////////////////////////////////////////////////////////////////////////////////////////
25
+ ////////////////////////////////////////////////////////////////////////////////////////
26
+ // Private Methods //
27
+ ////////////////////////////////////////////////////////////////////////////////////////
28
+ ////////////////////////////////////////////////////////////////////////////////////////
29
+ // Listeners //
30
+ ////////////////////////////////////////////////////////////////////////////////////////
31
  }
admin/models/FMModelFromeditcountryinpopup.php CHANGED
@@ -1,31 +1,31 @@
1
- <?php
2
-
3
- class FMModelFromeditcountryinpopup {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
-
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Getters & Setters //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
- ////////////////////////////////////////////////////////////////////////////////////////
26
- // Private Methods //
27
- ////////////////////////////////////////////////////////////////////////////////////////
28
- ////////////////////////////////////////////////////////////////////////////////////////
29
- // Listeners //
30
- ////////////////////////////////////////////////////////////////////////////////////////
31
  }
1
+ <?php
2
+
3
+ class FMModelFromeditcountryinpopup {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+
22
+ ////////////////////////////////////////////////////////////////////////////////////////
23
+ // Getters & Setters //
24
+ ////////////////////////////////////////////////////////////////////////////////////////
25
+ ////////////////////////////////////////////////////////////////////////////////////////
26
+ // Private Methods //
27
+ ////////////////////////////////////////////////////////////////////////////////////////
28
+ ////////////////////////////////////////////////////////////////////////////////////////
29
+ // Listeners //
30
+ ////////////////////////////////////////////////////////////////////////////////////////
31
  }
admin/models/FMModelFromipinfoinpopup.php CHANGED
@@ -1,31 +1,31 @@
1
- <?php
2
-
3
- class FMModelFromipinfoinpopup {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
-
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Getters & Setters //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
- ////////////////////////////////////////////////////////////////////////////////////////
26
- // Private Methods //
27
- ////////////////////////////////////////////////////////////////////////////////////////
28
- ////////////////////////////////////////////////////////////////////////////////////////
29
- // Listeners //
30
- ////////////////////////////////////////////////////////////////////////////////////////
31
  }
1
+ <?php
2
+
3
+ class FMModelFromipinfoinpopup {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+
22
+ ////////////////////////////////////////////////////////////////////////////////////////
23
+ // Getters & Setters //
24
+ ////////////////////////////////////////////////////////////////////////////////////////
25
+ ////////////////////////////////////////////////////////////////////////////////////////
26
+ // Private Methods //
27
+ ////////////////////////////////////////////////////////////////////////////////////////
28
+ ////////////////////////////////////////////////////////////////////////////////////////
29
+ // Listeners //
30
+ ////////////////////////////////////////////////////////////////////////////////////////
31
  }
admin/models/FMModelFrommapeditinpopup.php CHANGED
@@ -1,31 +1,31 @@
1
- <?php
2
-
3
- class FMModelFrommapeditinpopup {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
-
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Getters & Setters //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
- ////////////////////////////////////////////////////////////////////////////////////////
26
- // Private Methods //
27
- ////////////////////////////////////////////////////////////////////////////////////////
28
- ////////////////////////////////////////////////////////////////////////////////////////
29
- // Listeners //
30
- ////////////////////////////////////////////////////////////////////////////////////////
31
  }
1
+ <?php
2
+
3
+ class FMModelFrommapeditinpopup {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+
22
+ ////////////////////////////////////////////////////////////////////////////////////////
23
+ // Getters & Setters //
24
+ ////////////////////////////////////////////////////////////////////////////////////////
25
+ ////////////////////////////////////////////////////////////////////////////////////////
26
+ // Private Methods //
27
+ ////////////////////////////////////////////////////////////////////////////////////////
28
+ ////////////////////////////////////////////////////////////////////////////////////////
29
+ // Listeners //
30
+ ////////////////////////////////////////////////////////////////////////////////////////
31
  }
admin/models/FMModelGoptions_fm.php CHANGED
@@ -1,30 +1,30 @@
1
- <?php
2
-
3
- class FMModelGoptions_fm {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- ////////////////////////////////////////////////////////////////////////////////////////
22
- // Getters & Setters //
23
- ////////////////////////////////////////////////////////////////////////////////////////
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
- // Private Methods //
26
- ////////////////////////////////////////////////////////////////////////////////////////
27
- ////////////////////////////////////////////////////////////////////////////////////////
28
- // Listeners //
29
- ////////////////////////////////////////////////////////////////////////////////////////
30
  }
1
+ <?php
2
+
3
+ class FMModelGoptions_fm {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ ////////////////////////////////////////////////////////////////////////////////////////
22
+ // Getters & Setters //
23
+ ////////////////////////////////////////////////////////////////////////////////////////
24
+ ////////////////////////////////////////////////////////////////////////////////////////
25
+ // Private Methods //
26
+ ////////////////////////////////////////////////////////////////////////////////////////
27
+ ////////////////////////////////////////////////////////////////////////////////////////
28
+ // Listeners //
29
+ ////////////////////////////////////////////////////////////////////////////////////////
30
  }
admin/models/FMModelSelect_data_from_db.php CHANGED
@@ -1,111 +1,111 @@
1
- <?php
2
-
3
- class FMModelSelect_data_from_db {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
-
22
- function get_labels($form_id) {
23
- global $wpdb;
24
- $rows = $wpdb->get_var("SELECT label_order_current FROM " . $wpdb->prefix . "formmaker where id=" . $form_id);
25
- return $rows;
26
- }
27
- function get_tables() {
28
- global $wpdb;
29
- $con_type = $_POST['con_type'];
30
-
31
- if($con_type == 'local') {
32
- $query = "SHOW TABLES";
33
- $tables = $wpdb->get_col($query);
34
- }
35
- else if($con_type == 'remote') {
36
- $username = isset($_POST['username']) ? $_POST['username'] : '';
37
- $password = isset($_POST['password']) ? $_POST['password'] : '';
38
- $database = isset($_POST['database']) ? $_POST['database'] : '';
39
- $host = isset($_POST['host']) ? $_POST['host'] : '';
40
- $wpdb_temp = new wpdb($username, $password, $database, $host);
41
- $query = "SHOW TABLES";
42
- $tables = $wpdb_temp->get_col($query);
43
- }
44
- //$wpdb= new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
45
- return $tables;
46
- }
47
-
48
- function get_tables_saved($con_type, $username, $password, $database, $host) {
49
- global $wpdb;
50
-
51
- if($con_type == 'local') {
52
- $query = "SHOW TABLES";
53
- $tables = $wpdb->get_col($query);
54
- }
55
- else if($con_type == 'remote') {
56
- $wpdb_temp = new wpdb($username, $password, $database, $host);
57
- $query = "SHOW TABLES";
58
- $tables = $wpdb_temp->get_col($query);
59
- }
60
- //$wpdb= new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
61
- return $tables;
62
- }
63
-
64
- function get_table_struct() {
65
- global $wpdb;
66
- $name = isset($_POST['name']) ? $_POST['name'] : NULL;
67
- if(!$name)
68
- return array();
69
- $con_method = $_POST['con_method'];
70
- $con_type = $_POST['con_type'];
71
- $query = "SHOW COLUMNS FROM " . $name;
72
- if($con_type == 'remote') {
73
- $username = isset($_POST['username']) ? $_POST['username'] : '';
74
- $password = isset($_POST['password']) ? $_POST['password'] : '';
75
- $database = isset($_POST['database']) ? $_POST['database'] : '';
76
- $host = isset($_POST['host']) ? $_POST['host'] : '';
77
- $wpdb_temp = new wpdb($username, $password, $database, $host);
78
- $table_struct = $wpdb_temp->get_results($query);
79
- }
80
- else {
81
- $table_struct = $wpdb->get_results($query);
82
- }
83
- //$wpdb= new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
84
- return $table_struct;
85
- }
86
-
87
- function get_table_struct_saved($con_type, $username, $password, $database, $host, $name, $con_method) {
88
- global $wpdb;
89
- if(!$name)
90
- return array();
91
- $query = "SHOW COLUMNS FROM " . $name;
92
- if($con_type == 'remote') {
93
- $wpdb_temp = new wpdb($username, $password, $database, $host);
94
- $table_struct = $wpdb_temp->get_results($query);
95
- }
96
- else {
97
- $table_struct = $wpdb->get_results($query);
98
- }
99
- //$wpdb= new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
100
- return $table_struct;
101
- }
102
- ////////////////////////////////////////////////////////////////////////////////////////
103
- // Getters & Setters //
104
- ////////////////////////////////////////////////////////////////////////////////////////
105
- ////////////////////////////////////////////////////////////////////////////////////////
106
- // Private Methods //
107
- ////////////////////////////////////////////////////////////////////////////////////////
108
- ////////////////////////////////////////////////////////////////////////////////////////
109
- // Listeners //
110
- ////////////////////////////////////////////////////////////////////////////////////////
111
  }
1
+ <?php
2
+
3
+ class FMModelSelect_data_from_db {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+
22
+ function get_labels($form_id) {
23
+ global $wpdb;
24
+ $rows = $wpdb->get_var("SELECT label_order_current FROM " . $wpdb->prefix . "formmaker where id=" . $form_id);
25
+ return $rows;
26
+ }
27
+ function get_tables() {
28
+ global $wpdb;
29
+ $con_type = $_POST['con_type'];
30
+
31
+ if($con_type == 'local') {
32
+ $query = "SHOW TABLES";
33
+ $tables = $wpdb->get_col($query);
34
+ }
35
+ else if($con_type == 'remote') {
36
+ $username = isset($_POST['username']) ? $_POST['username'] : '';
37
+ $password = isset($_POST['password']) ? $_POST['password'] : '';
38
+ $database = isset($_POST['database']) ? $_POST['database'] : '';
39
+ $host = isset($_POST['host']) ? $_POST['host'] : '';
40
+ $wpdb_temp = new wpdb($username, $password, $database, $host);
41
+ $query = "SHOW TABLES";
42
+ $tables = $wpdb_temp->get_col($query);
43
+ }
44
+ //$wpdb= new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
45
+ return $tables;
46
+ }
47
+
48
+ function get_tables_saved($con_type, $username, $password, $database, $host) {
49
+ global $wpdb;
50
+
51
+ if($con_type == 'local') {
52
+ $query = "SHOW TABLES";
53
+ $tables = $wpdb->get_col($query);
54
+ }
55
+ else if($con_type == 'remote') {
56
+ $wpdb_temp = new wpdb($username, $password, $database, $host);
57
+ $query = "SHOW TABLES";
58
+ $tables = $wpdb_temp->get_col($query);
59
+ }
60
+ //$wpdb= new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
61
+ return $tables;
62
+ }
63
+
64
+ function get_table_struct() {
65
+ global $wpdb;
66
+ $name = isset($_POST['name']) ? $_POST['name'] : NULL;
67
+ if(!$name)
68
+ return array();
69
+ $con_method = $_POST['con_method'];
70
+ $con_type = $_POST['con_type'];
71
+ $query = "SHOW COLUMNS FROM " . $name;
72
+ if($con_type == 'remote') {
73
+ $username = isset($_POST['username']) ? $_POST['username'] : '';
74
+ $password = isset($_POST['password']) ? $_POST['password'] : '';
75
+ $database = isset($_POST['database']) ? $_POST['database'] : '';
76
+ $host = isset($_POST['host']) ? $_POST['host'] : '';
77
+ $wpdb_temp = new wpdb($username, $password, $database, $host);
78
+ $table_struct = $wpdb_temp->get_results($query);
79
+ }
80
+ else {
81
+ $table_struct = $wpdb->get_results($query);
82
+ }
83
+ //$wpdb= new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
84
+ return $table_struct;
85
+ }
86
+
87
+ function get_table_struct_saved($con_type, $username, $password, $database, $host, $name, $con_method) {
88
+ global $wpdb;
89
+ if(!$name)
90
+ return array();
91
+ $query = "SHOW COLUMNS FROM " . $name;
92
+ if($con_type == 'remote') {
93
+ $wpdb_temp = new wpdb($username, $password, $database, $host);
94
+ $table_struct = $wpdb_temp->get_results($query);
95
+ }
96
+ else {
97
+ $table_struct = $wpdb->get_results($query);
98
+ }
99
+ //$wpdb= new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
100
+ return $table_struct;
101
+ }
102
+ ////////////////////////////////////////////////////////////////////////////////////////
103
+ // Getters & Setters //
104
+ ////////////////////////////////////////////////////////////////////////////////////////
105
+ ////////////////////////////////////////////////////////////////////////////////////////
106
+ // Private Methods //
107
+ ////////////////////////////////////////////////////////////////////////////////////////
108
+ ////////////////////////////////////////////////////////////////////////////////////////
109
+ // Listeners //
110
+ ////////////////////////////////////////////////////////////////////////////////////////
111
  }
admin/models/FMModelShow_matrix.php CHANGED
@@ -1,31 +1,31 @@
1
- <?php
2
-
3
- class FMModelShow_matrix {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
-
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Getters & Setters //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
- ////////////////////////////////////////////////////////////////////////////////////////
26
- // Private Methods //
27
- ////////////////////////////////////////////////////////////////////////////////////////
28
- ////////////////////////////////////////////////////////////////////////////////////////
29
- // Listeners //
30
- ////////////////////////////////////////////////////////////////////////////////////////
31
  }
1
+ <?php
2
+
3
+ class FMModelShow_matrix {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+
22
+ ////////////////////////////////////////////////////////////////////////////////////////
23
+ // Getters & Setters //
24
+ ////////////////////////////////////////////////////////////////////////////////////////
25
+ ////////////////////////////////////////////////////////////////////////////////////////
26
+ // Private Methods //
27
+ ////////////////////////////////////////////////////////////////////////////////////////
28
+ ////////////////////////////////////////////////////////////////////////////////////////
29
+ // Listeners //
30
+ ////////////////////////////////////////////////////////////////////////////////////////
31
  }
admin/models/FMModelThemes_fm.php CHANGED
@@ -1,91 +1,91 @@
1
- <?php
2
-
3
- class FMModelThemes_fm {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function get_rows_data() {
22
- global $wpdb;
23
- $where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE title LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
24
- $asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'desc') ? 'desc' : 'asc');
25
- $order_by_array = array('id', 'title', 'default');
26
- $order_by = isset($_POST['order_by']) && in_array(esc_html(stripslashes($_POST['order_by'])), $order_by_array) ? esc_html(stripslashes($_POST['order_by'])) : 'id';
27
- $order_by = ' ORDER BY `' . $order_by . '` ' . $asc_or_desc;
28
- if (isset($_POST['page_number']) && $_POST['page_number']) {
29
- $limit = ((int) $_POST['page_number'] - 1) * 20;
30
- }
31
- else {
32
- $limit = 0;
33
- }
34
- $query = "SELECT * FROM " . $wpdb->prefix . "formmaker_themes " . $where . $order_by . " LIMIT " . $limit . ",20";
35
- $rows = $wpdb->get_results($query);
36
- return $rows;
37
- }
38
-
39
- public function get_row_data($id, $reset) {
40
- global $wpdb;
41
- if ($id != 0) {
42
- $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $id));
43
- if ($reset) {
44
- if (!$row->default) {
45
- $row_id = $row->id;
46
- $row_title = $row->title;
47
- $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_themes WHERE default="%d"', 1));
48
- $row->id = $row_id;
49
- $row->title = $row_title;
50
- $row->default = FALSE;
51
- }
52
- else {
53
- $row->css = '';
54
- }
55
- }
56
- }
57
- else {
58
- $row = new stdClass();
59
- $row->id = 0;
60
- $row->title = '';
61
- $row->css = '';
62
- $row->default = 0;
63
- }
64
- return $row;
65
- }
66
-
67
- public function page_nav() {
68
- global $wpdb;
69
- $where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE title LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
70
- $query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "formmaker_themes " . $where;
71
- $total = $wpdb->get_var($query);
72
- $page_nav['total'] = $total;
73
- if (isset($_POST['page_number']) && $_POST['page_number']) {
74
- $limit = ((int) $_POST['page_number'] - 1) * 20;
75
- }
76
- else {
77
- $limit = 0;
78
- }
79
- $page_nav['limit'] = (int) ($limit / 20 + 1);
80
- return $page_nav;
81
- }
82
- ////////////////////////////////////////////////////////////////////////////////////////
83
- // Getters & Setters //
84
- ////////////////////////////////////////////////////////////////////////////////////////
85
- ////////////////////////////////////////////////////////////////////////////////////////
86
- // Private Methods //
87
- ////////////////////////////////////////////////////////////////////////////////////////
88
- ////////////////////////////////////////////////////////////////////////////////////////
89
- // Listeners //
90
- ////////////////////////////////////////////////////////////////////////////////////////
91
  }
1
+ <?php
2
+
3
+ class FMModelThemes_fm {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function get_rows_data() {
22
+ global $wpdb;
23
+ $where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE title LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
24
+ $asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'desc') ? 'desc' : 'asc');
25
+ $order_by_array = array('id', 'title', 'default');
26
+ $order_by = isset($_POST['order_by']) && in_array(esc_html(stripslashes($_POST['order_by'])), $order_by_array) ? esc_html(stripslashes($_POST['order_by'])) : 'id';
27
+ $order_by = ' ORDER BY `' . $order_by . '` ' . $asc_or_desc;
28
+ if (isset($_POST['page_number']) && $_POST['page_number']) {
29
+ $limit = ((int) $_POST['page_number'] - 1) * 20;
30
+ }
31
+ else {
32
+ $limit = 0;
33
+ }
34
+ $query = "SELECT * FROM " . $wpdb->prefix . "formmaker_themes " . $where . $order_by . " LIMIT " . $limit . ",20";
35
+ $rows = $wpdb->get_results($query);
36
+ return $rows;
37
+ }
38
+
39
+ public function get_row_data($id, $reset) {
40
+ global $wpdb;
41
+ if ($id != 0) {
42
+ $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $id));
43
+ if ($reset) {
44
+ if (!$row->default) {
45
+ $row_id = $row->id;
46
+ $row_title = $row->title;
47
+ $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_themes WHERE default="%d"', 1));
48
+ $row->id = $row_id;
49
+ $row->title = $row_title;
50
+ $row->default = FALSE;
51
+ }
52
+ else {
53
+ $row->css = '';
54
+ }
55
+ }
56
+ }
57
+ else {
58
+ $row = new stdClass();
59
+ $row->id = 0;
60
+ $row->title = '';
61
+ $row->css = '';
62
+ $row->default = 0;
63
+ }
64
+ return $row;
65
+ }
66
+
67
+ public function page_nav() {
68
+ global $wpdb;
69
+ $where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE title LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
70
+ $query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "formmaker_themes " . $where;
71
+ $total = $wpdb->get_var($query);
72
+ $page_nav['total'] = $total;
73
+ if (isset($_POST['page_number']) && $_POST['page_number']) {
74
+ $limit = ((int) $_POST['page_number'] - 1) * 20;
75
+ }
76
+ else {
77
+ $limit = 0;
78
+ }
79
+ $page_nav['limit'] = (int) ($limit / 20 + 1);
80
+ return $page_nav;
81
+ }
82
+ ////////////////////////////////////////////////////////////////////////////////////////
83
+ // Getters & Setters //
84
+ ////////////////////////////////////////////////////////////////////////////////////////
85
+ ////////////////////////////////////////////////////////////////////////////////////////
86
+ // Private Methods //
87
+ ////////////////////////////////////////////////////////////////////////////////////////
88
+ ////////////////////////////////////////////////////////////////////////////////////////
89
+ // Listeners //
90
+ ////////////////////////////////////////////////////////////////////////////////////////
91
  }
admin/models/FMModelUninstall_fm.php CHANGED
@@ -44,6 +44,7 @@ class FMModelUninstall_fm {
44
  delete_option('formmaker_cureent_version');
45
  delete_option('fm_emailverification');
46
  delete_option('form_maker_pro_active');
 
47
  delete_option('fm_settings');
48
  }
49
  }
44
  delete_option('formmaker_cureent_version');
45
  delete_option('fm_emailverification');
46
  delete_option('form_maker_pro_active');
47
+ delete_option('fm_admin_notice');
48
  delete_option('fm_settings');
49
  }
50
  }
admin/models/FMModelWidget.php CHANGED
@@ -1,38 +1,38 @@
1
- <?php
2
-
3
- class FMModelWidget {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
-
22
- public function get_gallery_rows_data() {
23
- global $wpdb;
24
- $query = "SELECT * FROM " . $wpdb->prefix . "formmaker order by `title`";
25
- $rows = $wpdb->get_results($query);
26
- return $rows;
27
- }
28
-
29
- ////////////////////////////////////////////////////////////////////////////////////////
30
- // Getters & Setters //
31
- ////////////////////////////////////////////////////////////////////////////////////////
32
- ////////////////////////////////////////////////////////////////////////////////////////
33
- // Private Methods //
34
- ////////////////////////////////////////////////////////////////////////////////////////
35
- ////////////////////////////////////////////////////////////////////////////////////////
36
- // Listeners //
37
- ////////////////////////////////////////////////////////////////////////////////////////
38
  }
1
+ <?php
2
+
3
+ class FMModelWidget {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+
22
+ public function get_gallery_rows_data() {
23
+ global $wpdb;
24
+ $query = "SELECT * FROM " . $wpdb->prefix . "formmaker order by `title`";
25
+ $rows = $wpdb->get_results($query);
26
+ return $rows;
27
+ }
28
+
29
+ ////////////////////////////////////////////////////////////////////////////////////////
30
+ // Getters & Setters //
31
+ ////////////////////////////////////////////////////////////////////////////////////////
32
+ ////////////////////////////////////////////////////////////////////////////////////////
33
+ // Private Methods //
34
+ ////////////////////////////////////////////////////////////////////////////////////////
35
+ ////////////////////////////////////////////////////////////////////////////////////////
36
+ // Listeners //
37
+ ////////////////////////////////////////////////////////////////////////////////////////
38
  }
admin/views/FMViewFormMakerEditCSS.php CHANGED
@@ -1,135 +1,135 @@
1
- <?php
2
-
3
- class FMViewFormMakerEditCSS {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $model;
14
-
15
-
16
- ////////////////////////////////////////////////////////////////////////////////////////
17
- // Constructor & Destructor //
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- public function __construct($model) {
20
- $this->model = $model;
21
- }
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Public Methods //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
- public function display() {
26
- $theme_id = ((isset($_GET['id'])) ? esc_html(stripslashes($_GET['id'])) : '');
27
- $form_id = ((isset($_GET['form_id'])) ? esc_html(stripslashes($_GET['form_id'])) : 0);
28
- $row = $this->model->get_theme_row($theme_id);
29
- wp_print_scripts('jquery');
30
-
31
- ?>
32
- <link media="all" type="text/css" href="<?php echo get_admin_url(); ?>load-styles.php?c=1&amp;dir=ltr&amp;load=admin-bar,dashicons,wp-admin,buttons,wp-auth-check" rel="stylesheet">
33
- <link media="all" type="text/css" href="<?php echo get_admin_url(); ?>css/colors<?php echo ((get_bloginfo('version') < '3.8') ? '-fresh' : ''); ?>.min.css" id="colors-css" rel="stylesheet">
34
- <link media="all" type="text/css" href="<?php echo WD_FM_URL . '/css/form_maker_tables.css'; ?>" rel="stylesheet">
35
- <script src="<?php echo WD_FM_URL . '/js/form_maker_admin.js'; ?>" type="text/javascript"></script>
36
- <script src="<?php echo WD_FM_URL . '/js/layout/codemirror.js'; ?>" type="text/javascript"></script>
37
- <script src="<?php echo WD_FM_URL . '/js/layout/formatting.js'; ?>" type="text/javascript"></script>
38
- <script src="<?php echo WD_FM_URL . '/js/layout/css.js'; ?>" type="text/javascript"></script>
39
- <script src="<?php echo WD_FM_URL . '/js/layout/clike.js'; ?>" type="text/javascript"></script>
40
- <script src="<?php echo WD_FM_URL . '/js/layout/javascript.js'; ?>" type="text/javascript"></script>
41
- <script src="<?php echo WD_FM_URL . '/js/layout/htmlmixed.js'; ?>" type="text/javascript"></script>
42
- <script src="<?php echo WD_FM_URL . '/js/layout/xml.js'; ?>" type="text/javascript"></script>
43
- <script src="<?php echo WD_FM_URL . '/js/layout/php.js'; ?>" type="text/javascript"></script>
44
- <link media="all" type="text/css" href="<?php echo WD_FM_URL . '/css/codemirror.css'; ?>" rel="stylesheet">
45
-
46
- <style>
47
- .CodeMirror {
48
- border: 1px solid #ccc;
49
- font-size: 12px;
50
- margin-bottom: 6px;
51
- background: white;
52
- }
53
- </style>
54
-
55
- <form id="fm_theme" class="wrap wp-core-ui" method="post" action="#" style="width: 99%; padding-left:3px;">
56
- <div class="fm-page-header">
57
- <div class="fm-page-actions">
58
- <button class="fm-button save-button small" onclick="if (fm_check_required('title', 'Theme title')) {return false;}; fm_save_theme('save'); window.parent.jQuery('#theme option[value=<?php echo $theme_id; ?>]').html(jQuery('#title').val()); window.parent.tb_remove();">
59
- <span></span>
60
- Save
61
- </button>
62
- <button class="fm-button apply-button small" onclick="if (fm_check_required('title', 'Theme title')) {return false;}; fm_save_theme('apply'); window.parent.jQuery('#theme option[value=<?php echo $theme_id; ?>]').html(jQuery('#title').val()); return false;">
63
- <span></span>
64
- Apply
65
- </button>
66
- <button class="fm-button save-as-copy-button medium" onclick="if (fm_check_required('title', 'Theme title')) {return false;}; fm_save_theme('save_as_new'); window.parent.jQuery('#theme').append('<option value=0>' + jQuery('#title').val() + '</option>'); window.parent.tb_remove(); return false;">
67
- <span></span>
68
- Save as New
69
- </button>
70
- <button class="fm-button undo-button small" onclick="fm_reset_theme(); return false;">
71
- <span></span>
72
- Reset
73
- </button>
74
- <button class="fm-button cancel-button small" onclick="window.parent.tb_remove();">
75
- <span></span>
76
- Cancel
77
- </button>
78
- </div>
79
- <div class="fm-clear"></div>
80
- </div>
81
- <table style="clear: both;">
82
- <tbody>
83
- <tr>
84
- <td class="fm_label"><label for="title">Theme title: <span style="color:#FF0000;"> * </span> </label></td>
85
- <td><input type="text" id="title" name="title" value="<?php echo $row->title; ?>" class="fm_text_input" /></td>
86
- </tr>
87
- <tr>
88
- <td class="fm_label"><label for="css">Css: </label></td>
89
- <td style="width: 90%;"><textarea id="css" name="css" rows="25" style="width: 100%;"><?php echo htmlspecialchars($row->css); ?></textarea></td>
90
- </tr>
91
- </tbody>
92
- </table>
93
- <div style="display: none;" id="main_theme"><?php echo str_replace('"', '\"', $row->css); ?></div>
94
- <input type="hidden" id="task" name="task" value="" />
95
- <input type="hidden" id="current_id" name="current_id" value="<?php echo $row->id; ?>" />
96
- <input type="hidden" id="default" name="default" value="<?php echo $row->default; ?>" />
97
- <input type="hidden" name="form_id" id="form_id" value="<?php echo $form_id; ?>" />
98
- </form>
99
- <script>
100
- var editor = CodeMirror.fromTextArea(
101
- document.getElementById("css"), {
102
- lineNumbers: true,
103
- lineWrapping: true,
104
- mode: "css"
105
- });
106
-
107
- CodeMirror.commands["selectAll"](editor);
108
- editor.autoFormatRange(editor.getCursor(true), editor.getCursor(false));
109
- editor.scrollTo(0,0);
110
-
111
- function fm_save_theme(task) {
112
- fm_set_input_value('task', task);
113
- document.getElementById('fm_theme').submit();
114
- }
115
-
116
- function fm_reset_theme() {
117
- editor.setValue(jQuery('#main_theme').html())
118
- jQuery('#css').val(jQuery('#main_theme').html());
119
- }
120
-
121
- </script>
122
- <?php
123
- die();
124
- }
125
-
126
- ////////////////////////////////////////////////////////////////////////////////////////
127
- // Getters & Setters //
128
- ////////////////////////////////////////////////////////////////////////////////////////
129
- ////////////////////////////////////////////////////////////////////////////////////////
130
- // Private Methods //
131
- ////////////////////////////////////////////////////////////////////////////////////////
132
- ////////////////////////////////////////////////////////////////////////////////////////
133
- // Listeners //
134
- ////////////////////////////////////////////////////////////////////////////////////////
135
  }
1
+ <?php
2
+
3
+ class FMViewFormMakerEditCSS {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ private $model;
14
+
15
+
16
+ ////////////////////////////////////////////////////////////////////////////////////////
17
+ // Constructor & Destructor //
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ public function __construct($model) {
20
+ $this->model = $model;
21
+ }
22
+ ////////////////////////////////////////////////////////////////////////////////////////
23
+ // Public Methods //
24
+ ////////////////////////////////////////////////////////////////////////////////////////
25
+ public function display() {
26
+ $theme_id = ((isset($_GET['id'])) ? esc_html(stripslashes($_GET['id'])) : '');
27
+ $form_id = ((isset($_GET['form_id'])) ? esc_html(stripslashes($_GET['form_id'])) : 0);
28
+ $row = $this->model->get_theme_row($theme_id);
29
+ wp_print_scripts('jquery');
30
+
31
+ ?>
32
+ <link media="all" type="text/css" href="<?php echo get_admin_url(); ?>load-styles.php?c=1&amp;dir=ltr&amp;load=admin-bar,dashicons,wp-admin,buttons,wp-auth-check" rel="stylesheet">
33
+ <link media="all" type="text/css" href="<?php echo get_admin_url(); ?>css/colors<?php echo ((get_bloginfo('version') < '3.8') ? '-fresh' : ''); ?>.min.css" id="colors-css" rel="stylesheet">
34
+ <link media="all" type="text/css" href="<?php echo WD_FM_URL . '/css/form_maker_tables.css'; ?>" rel="stylesheet">
35
+ <script src="<?php echo WD_FM_URL . '/js/form_maker_admin.js'; ?>" type="text/javascript"></script>
36
+ <script src="<?php echo WD_FM_URL . '/js/layout/codemirror.js'; ?>" type="text/javascript"></script>
37
+ <script src="<?php echo WD_FM_URL . '/js/layout/formatting.js'; ?>" type="text/javascript"></script>
38
+ <script src="<?php echo WD_FM_URL . '/js/layout/css.js'; ?>" type="text/javascript"></script>
39
+ <script src="<?php echo WD_FM_URL . '/js/layout/clike.js'; ?>" type="text/javascript"></script>
40
+ <script src="<?php echo WD_FM_URL . '/js/layout/javascript.js'; ?>" type="text/javascript"></script>
41
+ <script src="<?php echo WD_FM_URL . '/js/layout/htmlmixed.js'; ?>" type="text/javascript"></script>
42
+ <script src="<?php echo WD_FM_URL . '/js/layout/xml.js'; ?>" type="text/javascript"></script>
43
+ <script src="<?php echo WD_FM_URL . '/js/layout/php.js'; ?>" type="text/javascript"></script>
44
+ <link media="all" type="text/css" href="<?php echo WD_FM_URL . '/css/codemirror.css'; ?>" rel="stylesheet">
45
+
46
+ <style>
47
+ .CodeMirror {
48
+ border: 1px solid #ccc;
49
+ font-size: 12px;
50
+ margin-bottom: 6px;
51
+ background: white;
52
+ }
53
+ </style>
54
+
55
+ <form id="fm_theme" class="wrap wp-core-ui" method="post" action="#" style="width: 99%; padding-left:3px;">
56
+ <div class="fm-page-header">
57
+ <div class="fm-page-actions">
58
+ <button class="fm-button save-button small" onclick="if (fm_check_required('title', 'Theme title')) {return false;}; fm_save_theme('save'); window.parent.jQuery('#theme option[value=<?php echo $theme_id; ?>]').html(jQuery('#title').val()); window.parent.tb_remove();">
59
+ <span></span>
60
+ Save
61
+ </button>
62
+ <button class="fm-button apply-button small" onclick="if (fm_check_required('title', 'Theme title')) {return false;}; fm_save_theme('apply'); window.parent.jQuery('#theme option[value=<?php echo $theme_id; ?>]').html(jQuery('#title').val()); return false;">
63
+ <span></span>
64
+ Apply
65
+ </button>
66
+ <button class="fm-button save-as-copy-button medium" onclick="if (fm_check_required('title', 'Theme title')) {return false;}; fm_save_theme('save_as_new'); window.parent.jQuery('#theme').append('<option value=0>' + jQuery('#title').val() + '</option>'); window.parent.tb_remove(); return false;">
67
+ <span></span>
68
+ Save as New
69
+ </button>
70
+ <button class="fm-button undo-button small" onclick="fm_reset_theme(); return false;">
71
+ <span></span>
72
+ Reset
73
+ </button>
74
+ <button class="fm-button cancel-button small" onclick="window.parent.tb_remove();">
75
+ <span></span>
76
+ Cancel
77
+ </button>
78
+ </div>
79
+ <div class="fm-clear"></div>
80
+ </div>
81
+ <table style="clear: both;">
82
+ <tbody>
83
+ <tr>
84
+ <td class="fm_label"><label for="title">Theme title: <span style="color:#FF0000;"> * </span> </label></td>
85
+ <td><input type="text" id="title" name="title" value="<?php echo $row->title; ?>" class="fm_text_input" /></td>
86
+ </tr>
87
+ <tr>
88
+ <td class="fm_label"><label for="css">Css: </label></td>
89
+ <td style="width: 90%;"><textarea id="css" name="css" rows="25" style="width: 100%;"><?php echo htmlspecialchars($row->css); ?></textarea></td>
90
+ </tr>
91
+ </tbody>
92
+ </table>
93
+ <div style="display: none;" id="main_theme"><?php echo str_replace('"', '\"', $row->css); ?></div>
94
+ <input type="hidden" id="task" name="task" value="" />
95
+ <input type="hidden" id="current_id" name="current_id" value="<?php echo $row->id; ?>" />
96
+ <input type="hidden" id="default" name="default" value="<?php echo $row->default; ?>" />
97
+ <input type="hidden" name="form_id" id="form_id" value="<?php echo $form_id; ?>" />
98
+ </form>
99
+ <script>
100
+ var editor = CodeMirror.fromTextArea(
101
+ document.getElementById("css"), {
102
+ lineNumbers: true,
103
+ lineWrapping: true,
104
+ mode: "css"
105
+ });
106
+
107
+ CodeMirror.commands["selectAll"](editor);
108
+ editor.autoFormatRange(editor.getCursor(true), editor.getCursor(false));
109
+ editor.scrollTo(0,0);
110
+
111
+ function fm_save_theme(task) {
112
+ fm_set_input_value('task', task);
113
+ document.getElementById('fm_theme').submit();
114
+ }
115
+
116
+ function fm_reset_theme() {
117
+ editor.setValue(jQuery('#main_theme').html())
118
+ jQuery('#css').val(jQuery('#main_theme').html());
119
+ }
120
+
121
+ </script>
122
+ <?php
123
+ die();
124
+ }
125
+
126
+ ////////////////////////////////////////////////////////////////////////////////////////
127
+ // Getters & Setters //
128
+ ////////////////////////////////////////////////////////////////////////////////////////
129
+ ////////////////////////////////////////////////////////////////////////////////////////
130
+ // Private Methods //
131
+ ////////////////////////////////////////////////////////////////////////////////////////
132
+ ////////////////////////////////////////////////////////////////////////////////////////
133
+ // Listeners //
134
+ ////////////////////////////////////////////////////////////////////////////////////////
135
  }
admin/views/FMViewFormMakerSQLMapping.php CHANGED
@@ -1,1467 +1,1467 @@
1
- <?php
2
-
3
- class FMViewFormMakerSQLMapping {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $model;
14
-
15
-
16
- ////////////////////////////////////////////////////////////////////////////////////////
17
- // Constructor & Destructor //
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- public function __construct($model) {
20
- $this->model = $model;
21
- }
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Public Methods //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
-
26
- public function edit_query($id, $form_id) {
27
- wp_print_scripts('jquery');
28
- wp_print_scripts('jquery-ui-tooltip');
29
- ?>
30
- <link media="all" type="text/css" href="<?php echo WD_FM_URL . '/css/style.css'; ?>" rel="stylesheet">
31
- <link rel="stylesheet" href="<?php echo WD_FM_URL . '/css/jquery-ui-1.10.3.custom.css'; ?>">
32
- <?php
33
- $label = $this->model->get_labels($form_id);
34
- $query_obj = $this->model->get_query($id);
35
-
36
- $temp = explode('***wdfcon_typewdf***',$query_obj->details);
37
- $con_type = $temp[0];
38
- $temp = explode('***wdfcon_methodwdf***',$temp[1]);
39
- $con_method = $temp[0];
40
- $temp = explode('***wdftablewdf***',$temp[1]);
41
- $table_cur = $temp[0];
42
- $temp = explode('***wdfhostwdf***',$temp[1]);
43
- $host = $temp[0];
44
- $temp = explode('***wdfportwdf***',$temp[1]);
45
- $port = $temp[0];
46
- $temp = explode('***wdfusernamewdf***',$temp[1]);
47
- $username = $temp[0];
48
- $temp = explode('***wdfpasswordwdf***',$temp[1]);
49
- $password = $temp[0];
50
- $temp = explode('***wdfdatabasewdf***',$temp[1]);
51
- $database = $temp[0];
52
- $details = $temp[1];
53
-
54
- $tables = $this->model->get_tables_saved($con_type, $username, $password, $database, $host);
55
- $table_struct = $this->model->get_table_struct_saved($con_type, $username, $password, $database, $host, $table_cur, $con_method);
56
-
57
- $filter_types=array("type_submit_reset", "type_map", "type_editor", "type_captcha", "type_recaptcha", "type_button", "type_paypal_total", "type_send_copy");
58
- $label_id= array();
59
- $label_order= array();
60
- $label_order_original= array();
61
- $label_type= array();
62
-
63
- $label_all = explode('#****#',$label);
64
- $label_all = array_slice($label_all,0, count($label_all)-1);
65
-
66
- foreach($label_all as $key => $label_each) {
67
- $label_id_each=explode('#**id**#',$label_each);
68
- $label_oder_each=explode('#**label**#', $label_id_each[1]);
69
-
70
- if(in_array($label_oder_each[1],$filter_types))
71
- continue;
72
-
73
- array_push($label_id, $label_id_each[0]);
74
- array_push($label_order_original, $label_oder_each[0]);
75
- $ptn = "/[^a-zA-Z0-9_]/";
76
- $rpltxt = "";
77
- $label_temp=preg_replace($ptn, $rpltxt, $label_oder_each[0]);
78
- array_push($label_order, $label_temp);
79
- array_push($label_type, $label_oder_each[1]);
80
- }
81
-
82
- $form_fields='';
83
- foreach($label_id as $key => $lid) {
84
- $form_fields.='<a onclick="insert_field('.$lid.'); jQuery(\'#fieldlist\').hide();" style="display:block; text-decoration:none;">'.$label_order_original[$key].'</a>';
85
- }
86
- $user_fields = array("subid"=>"Submission ID", "ip"=>"Submitter's IP", "userid"=>"User ID", "username"=>"Username", "useremail"=>"User Email");
87
- foreach($user_fields as $user_key=>$user_field) {
88
- $form_fields.='<a onclick="insert_field(\''.$user_key.'\'); jQuery(\'#fieldlist\').hide();" style="display:block; text-decoration:none;">'.$user_field.'</a>';
89
- }
90
-
91
- $cond='<div id="condid"><select id="sel_condid" style="width: 160px">';
92
- foreach($table_struct as $col) {
93
- $cond.='<option>'.str_replace("'", "SingleQuot", $col->Field).'</option>';
94
- }
95
- $cond.='</select>';
96
- $cond.='<select id="op_condid"><option value="=" selected="selected">=</option><option value="!=">!=</option><option value=">">&gt;</option><option value="<">&lt;</option><option value=">=">&gt;=</option><option value="<=">&lt;=</option><option value="%..%">Like</option><option value="%..">Starts with</option><option value="..%">Ends with</option></select><input id="val_condid" style="width:170px" type="text" /><select id="andor_condid" style="visibility: hidden;"><option value="AND">AND</option><option value="OR">OR</option></select><img src="' . WD_FM_URL . '/images/delete.png?ver='. get_option("wd_form_maker_version").'" onclick="delete_cond(&quot;condid&quot;)" style="vertical-align: middle;"></div>';
97
- ?>
98
- <script>
99
- function connect() {
100
- jQuery("input[type='radio']").attr('disabled','');
101
- jQuery('#struct').html('<div class="fm-loading-container"><div class="fm-loading-content"></div></div>');
102
- jQuery("#struct").load('index.php?option=com_formmaker&task=db_tables&con_type='+jQuery('input[name=con_type]:checked').val()+'&con_method='+jQuery('input[name=con_method]:checked').val()+'&format=row');
103
- }
104
- jQuery(document).ready(function() {
105
- jQuery("#tables").change(function (){
106
- jQuery("#struct").removeClass("fm_loading");
107
- jQuery("#table_struct").load('index.php?option=com_formmaker&task=db_table_struct&name='+jQuery(this).val()+'&con_type='+jQuery('input[name=con_type]:checked').val()+'&con_method='+jQuery('input[name=con_method]:checked').val()+'&host='+jQuery('#host_rem').val()+'&port='+jQuery('#port_rem').val()+'&username='+jQuery('#username_rem').val()+'&password='+jQuery('#password_rem').val()+'&database='+jQuery('#database_rem').val()+'&format=row&id='+jQuery("#form_id").val());
108
- });
109
- jQuery('html').click(function() {
110
- if(jQuery("#fieldlist").css('display')=="block") {
111
- jQuery("#fieldlist").hide();
112
- }
113
- });
114
- jQuery('.cols input[type="text"]').on('click', function(event) {
115
- event.stopPropagation();
116
- jQuery("#fieldlist").css("top",jQuery(this).offset().top+jQuery(this).height()+2);
117
- jQuery("#fieldlist").css("left",jQuery(this).offset().left);
118
- jQuery("#fieldlist").slideDown('fast');
119
- selected_field=this.id;
120
- });
121
- jQuery('#query_txt').click(function(event) {
122
- event.stopPropagation();
123
- jQuery("#fieldlist").css("top",jQuery(this).offset().top+jQuery(this).height()+2);
124
- jQuery("#fieldlist").css("left",jQuery(this).offset().left);
125
- jQuery("#fieldlist").slideDown('fast');
126
- selected_field=this.id;
127
- });
128
- jQuery('#fieldlist').click(function(event){
129
- event.stopPropagation();
130
- });
131
- jQuery('.add_cond').click( function() {
132
- jQuery('.cols').append(conds.replace(/condid/g, cond_id++).replace('SingleQuot', "'"));
133
- update_vis();
134
- });
135
- });
136
- var selected_field ='';
137
- var isvisible = 1;
138
- var cond_id = 1;
139
- conds='<?php echo $cond ?>';
140
- fields=new Array(<?php
141
- $fields = "";
142
- if($table_struct) {
143
- foreach($table_struct as $col) {
144
- $fields.=' "'.$col->Field.'",';
145
- }
146
- echo substr($fields, 0, -1);
147
- }
148
- ?>);
149
-
150
- function dis(id, x) {
151
- if(x)
152
- jQuery('#'+id).removeAttr('disabled');
153
- else
154
- jQuery('#'+id).attr('disabled','disabled');
155
- }
156
- function update_vis() {
157
- previous=0;
158
- for(i=1; i<cond_id; i++) {
159
- if(jQuery('#'+i).html()) {
160
- jQuery('#andor_'+i).css('visibility', 'hidden');
161
- if(previous)
162
- jQuery('#andor_'+previous).css('visibility', 'visible');
163
- previous=i;
164
- }
165
- }
166
- }
167
- function delete_cond(id) {
168
- jQuery('#'+id).remove();
169
- update_vis();
170
- }
171
- function save_query() {
172
- con_type =jQuery('input[name=con_type]:checked').val();
173
- con_method =jQuery('input[name=con_method]:checked').val();
174
- table =jQuery('#tables').val();
175
- host =jQuery('#host_rem').val();
176
- port =jQuery('#port_rem').val();
177
- username =jQuery('#username_rem').val();
178
- password =jQuery('#password_rem').val();
179
- database =jQuery('#database_rem').val();
180
-
181
- str=con_type+"***wdfcon_typewdf***"+con_method+"***wdfcon_methodwdf***"+table+"***wdftablewdf***"+host+"***wdfhostwdf***"+port+"***wdfportwdf***"+username+"***wdfusernamewdf***"+password+"***wdfpasswordwdf***"+database+"***wdfdatabasewdf***";
182
-
183
- if(fields.length) {
184
- for(i=0; i<fields.length; i++) {
185
- str+=fields[i]+'***wdfnamewdf***'+jQuery('#'+fields[i]).val()+'***wdfvaluewdf***'+jQuery('#ch_'+fields[i]+":checked" ).length+'***wdffieldwdf***';
186
- }
187
- }
188
-
189
- for(i=1; i<cond_id; i++) {
190
- if(jQuery('#'+i).html()) {
191
- str+=jQuery('#sel_'+i).val()+'***sel***'+jQuery('#op_'+i).val()+'***op***'+jQuery('#val_'+i).val()+'***val***'+jQuery('#andor_'+i).val()+'***where***';
192
- }
193
- }
194
- if(!jQuery('#query_txt').val()) {
195
- gen_query();
196
- }
197
- jQuery('#details').val(str);
198
- var datatxt = jQuery("#query_form").serialize()+'&form_id='+jQuery("#form_id").val();
199
-
200
- if(jQuery('#query_txt').val()) {
201
- jQuery('.c1').html('<div class="fm-loading-container"><div class="fm-loading-content"></div></div>');
202
-
203
- jQuery.ajax({
204
- type: "POST",
205
- url: "<?php echo add_query_arg(array('action' => 'FormMakerSQLMapping', 'id' => $id, 'form_id' => $form_id, 'task' => 'update_query', 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>",
206
- data: datatxt,
207
- success: function(data) {
208
- window.parent.wd_fm_apply_options('apply_options');
209
- window.parent.tb_remove();
210
- }
211
- });
212
- }
213
- else {
214
- alert('The query is empty.');
215
- }
216
- return false;
217
- }
218
-
219
- function gen_query() {
220
- if(jQuery('#query_txt').val())
221
- if(!confirm('Are you sure you want to replace the Query? All the modifications to the Query will be lost.'))
222
- return;
223
- query="";
224
- fields=new Array(<?php
225
- $fields = "";
226
- if($table_struct) {
227
- foreach($table_struct as $col) {
228
- $fields.=' "'.str_replace("'", "SingleQuot", $col->Field).'",';
229
- }
230
- echo substr($fields, 0, -1);
231
- }
232
- ?>);
233
-
234
- con_type =jQuery('input[name=con_type]:checked').val();
235
- con_method =jQuery('input[name=con_method]:checked').val();
236
- table =jQuery('#tables').val();
237
- fls='';
238
- vals='';
239
- valsA=new Array();
240
- flsA=new Array();
241
-
242
- if(fields.length) {
243
- for(i=0; i<fields.length; i++) {
244
- if(jQuery('#ch_'+fields[i]+":checked" ).length) {
245
- flsA.push(fields[i]);
246
- valsA.push(jQuery('#'+fields[i]).val());
247
- }
248
- }
249
- }
250
- if(con_method=="insert") {
251
- if(flsA.length) {
252
- for(i=0; i<flsA.length-1; i++) {
253
- fls+= '`'+flsA[i]+'`, ';
254
- vals+= '"'+valsA[i]+'", ';
255
- }
256
- fls+= '`'+flsA[i]+'`';
257
- vals+= '"'+valsA[i]+'"';
258
- }
259
- if(fls)
260
- query="INSERT INTO "+jQuery('#tables').val()+" (" +fls+") VALUES ("+vals+")";
261
- }
262
-
263
- if(con_method=="update") {
264
- if(flsA.length) {
265
- for(i=0; i<flsA.length-1; i++) {
266
- vals+= '`'+flsA[i]+'`="'+valsA[i]+'", ';
267
- }
268
- vals+= '`'+flsA[i]+'`="'+valsA[i]+'"';
269
- }
270
- where="";
271
- previous='';
272
-
273
- for(i=1; i<cond_id; i++) {
274
- if(jQuery('#'+i).html()) {
275
- if(jQuery('#op_'+i).val()=="%..%")
276
- op_val=' LIKE "%'+jQuery('#val_'+i).val()+'%"';
277
- else if(jQuery('#op_'+i).val()=="%..")
278
- op_val=' LIKE "%'+jQuery('#val_'+i).val()+'"';
279
- else if(jQuery('#op_'+i).val()=="..%")
280
- op_val=' LIKE "'+jQuery('#val_'+i).val()+'%"';
281
- else
282
- op_val=' '+jQuery('#op_'+i).val()+' "'+jQuery('#val_'+i).val()+'"';
283
- where+=previous+' `'+jQuery('#sel_'+i).val()+'`'+op_val;
284
- previous=' '+ jQuery('#andor_'+i).val();
285
- }
286
- }
287
- if(vals)
288
- query="UPDATE "+jQuery('#tables').val()+" SET " + vals+(where? ' WHERE'+where: '') ;
289
- }
290
- if(con_method=="delete") {
291
- where="";
292
- previous='';
293
- for(i=1; i<cond_id; i++) {
294
- if(jQuery('#'+i).html()) {
295
- if(jQuery('#op_'+i).val()=="%..%")
296
- op_val=' LIKE "%'+jQuery('#val_'+i).val()+'%"';
297
- else if(jQuery('#op_'+i).val()=="%..")
298
- op_val=' LIKE "%'+jQuery('#val_'+i).val()+'"';
299
- else if(jQuery('#op_'+i).val()=="..%")
300
- op_val=' LIKE "'+jQuery('#val_'+i).val()+'%"';
301
- else
302
- op_val=' '+jQuery('#op_'+i).val()+' "'+jQuery('#val_'+i).val()+'"';
303
- where+=previous+' '+jQuery('#sel_'+i).val()+op_val;
304
- previous=' '+ jQuery('#andor_'+i).val();
305
- }
306
- }
307
- if(where)
308
- query="DELETE FROM "+jQuery('#tables').val()+ ' WHERE'+where ;
309
- }
310
- jQuery('#query_txt').val(query.replace("SingleQuot", "'"));
311
- }
312
-
313
- jQuery(document).ready(function () {
314
- jQuery(".hasTip").tooltip({
315
- track: true,
316
- content: function () {
317
- return jQuery(this).prop('title');
318
- }
319
- });
320
- });
321
-
322
- function insert_field(myValue) {
323
- if(!selected_field)
324
- return;
325
- myField=document.getElementById(selected_field);
326
- if (document.selection) {
327
- myField.focus();
328
- sel = document.selection.createRange();
329
- sel.text = myValue;
330
- }
331
- else {
332
- if (myField.selectionStart || myField.selectionStart == '0') {
333
- var startPos = myField.selectionStart;
334
- var endPos = myField.selectionEnd;
335
- myField.value = myField.value.substring(0, startPos)
336
- + "{"+myValue+"}"
337
- + myField.value.substring(endPos, myField.value.length);
338
- }
339
- else {
340
- myField.value += "{"+myValue+"}";
341
- }
342
- }
343
- }
344
- </script>
345
- <style>
346
- .c1 {
347
- padding: 0 10px;
348
- }
349
-
350
- .main_func{
351
- font-family: Segoe UI;
352
- display: inline-block;
353
- width: 550px;
354
- }
355
-
356
- .main_func .admintable {
357
- width: 100%;
358
- padding: 10px 0;
359
- margin-bottom: 15px;
360
- }
361
-
362
- .main_func .admintable .key{
363
- width: 36%;
364
- }
365
-
366
- .main_func .admintable input[type='text'],
367
- .main_func .admintable input[type='password']{
368
- padding: 4px 6px;
369
- width:244px;
370
- }
371
-
372
- .btn.connect {
373
- background:#4EC0D9;
374
- width:78px;
375
- height:32px;
376
- border:1px solid #4EC0D9;
377
- border-radius:0px;
378
- color:#fff;
379
- cursor:pointer;
380
- }
381
-
382
- .desc {
383
- font-size: 13px;
384
- display: inline-block;
385
- width: 265px;
386
- position: fixed;
387
- margin: 15px;
388
- margin-left: 45px;
389
- }
390
-
391
- .desc > div {
392
- margin-top:3px;
393
- }
394
-
395
- .desc div span {
396
- width: 62px;
397
- display: inline-block;
398
- }
399
-
400
- .desc button {
401
- max-width: 190px;
402
- overflow: hidden;
403
- white-space: nowrap;
404
- text-overflow: ellipsis;
405
- padding: 4px;
406
- background: #eee;
407
- border: 1px solid #ccc;
408
- border-radius:0px;
409
- height:27px;
410
- }
411
-
412
- .key label {
413
- display:inline-block;
414
- width:150px;
415
- }
416
-
417
- .select-db-label {
418
- display: inline-block;
419
- font-size: 16px;
420
- width: 201px;
421
-
422
- }
423
-
424
- .select-db-select {
425
- width:325px;
426
- padding:6px;
427
- }
428
-
429
- .struct {
430
- border: 3px solid red;
431
- padding: 4px 6px;
432
- display: inline-block;
433
- margin-top:10px;
434
- }
435
-
436
- .cols div:nth-child(even) {background: #FFF}
437
- .cols div:nth-child(odd) {background: #F5F5F5}
438
- .cols div {
439
- height: 28px;
440
- padding: 5px
441
- }
442
-
443
- .cols label {
444
- display: inline-block;
445
- width: 175px;
446
- font-size: 15px;
447
- overflow: hidden;
448
- white-space: nowrap;
449
- text-overflow: ellipsis;
450
- vertical-align: middle;
451
- }
452
-
453
- .cols input[type="text"] {
454
- width: 295px;
455
- line-height: 18px;
456
- height: 28px;
457
- border: 1px solid #ccc;
458
- padding: 0 3px;
459
- margin-right: 2px;
460
- }
461
-
462
- .cols input[type="text"]:disabled {
463
- cursor: not-allowed;
464
- background-color: #eee;
465
- }
466
-
467
- .cols input[type="checkbox"] {
468
- width: 20px;
469
- line-height: 18px;
470
- height: 20px;
471
- vertical-align: middle;
472
- }
473
-
474
- .cols select {
475
- line-height: 18px;
476
- height: 28px;
477
- margin-right: 2px;
478
- }
479
-
480
- #fieldlist {
481
- position: absolute;
482
- width:225px;
483
- background: #fff;
484
- border: solid 1px #c7c7c7;
485
- top: 0;
486
- left: 0;
487
- z-index: 1000;
488
- }
489
-
490
- #fieldlist a {
491
- padding: 5px;
492
- cursor:pointer;
493
- overflow: hidden;
494
- white-space: nowrap;
495
- text-overflow: ellipsis;
496
- }
497
-
498
- #fieldlist a:hover {
499
- background: #ccc;
500
- }
501
-
502
- .gen_query, .gen_query:focus {
503
- width: 148px;
504
- height: 38px;
505
- background: #4EC0D9;
506
- color: white;
507
- cursor: pointer;
508
- border: 0px;
509
- font-size: 14px;
510
- font-weight: bold;
511
- margin: 20px 0;
512
- border-radius: 0px;
513
- }
514
-
515
- .gen_query:active {
516
- background: #ccc;
517
- }
518
-
519
- .fm-query-save {
520
- float: right;
521
- font-size: 13px;
522
- margin: 0 20px;
523
- background: #4EC0D9;
524
- width: 83px;
525
- height: 34px;
526
- border: 1px solid #4EC0D9;
527
- border-radius: 0px;
528
- color: #fff;
529
- cursor: pointer;
530
- }
531
-
532
- .select-db-op {
533
- display: inline-block;
534
- text-align: right;
535
- font-weight: bold;
536
- font-size: 18px;
537
- padding: 5px 0;
538
- margin: 5px 0;
539
- background:none !important;
540
- }
541
-
542
- .select-db-op.where{
543
- width: 272px;
544
- }
545
-
546
- .select-db-op img{
547
- float:left;
548
- }
549
-
550
- .select-db-label {
551
- display: inline-block;
552
- font-size: 16px;
553
- width: 201px;
554
-
555
- }
556
- .select-db-select {
557
- width:325px;
558
- padding:6px;
559
- }
560
-
561
- .fm-query-save {
562
- float: right;
563
- font-size: 13px;
564
- margin: 0 20px;
565
- background: #4EC0D9;
566
- width: 83px;
567
- height: 34px;
568
- border: 1px solid #4EC0D9;
569
- border-radius: 0px;
570
- color: #fff;
571
- cursor: pointer;
572
- }
573
- </style>
574
- <div class="c1">
575
- <div class="main_func">
576
- <table class="admintable">
577
- <tr valign="top">
578
- <td class="key">
579
- <label style="font-size:20px;">Connection type: </label>
580
- </td>
581
- <td>
582
- <input type="radio" name="con_type" id="local" value="local" <?php if($con_type=='local') echo 'checked="checked"'?> disabled>
583
- <label for="local">Local</label>
584
- <input type="radio" name="con_type" id="remote" value="remote" <?php if($con_type=='remote') echo 'checked="checked"'?> disabled>
585
- <label for="remote">Remote</label>
586
- </td>
587
- <td rowspan="2">
588
- <input type="button" value="Connect" onclick="connect()" class="btn connect" disabled>
589
- </td>
590
- </tr>
591
- <tr class="remote_info" <?php if($con_type=='local') echo 'style="display:none"'?>>
592
- <td class="key">Host</td>
593
- <td>
594
- <input type="text" name="host" id="host_rem" style="width:150px" value="<?php echo $host; ?>" disabled>
595
- Port : <input type="text" name="port" id="port_rem" value="<?php echo $port; ?>" style="width:48px" disabled>
596
- </td>
597
- </tr>
598
- <tr class="remote_info" <?php if($con_type=='local') echo 'style="display:none"'?>>
599
- <td class="key">Username</td>
600
- <td>
601
- <input type="text" name="username" id="username_rem" value="<?php echo $username; ?>" disabled>
602
- </td>
603
- </tr>
604
- <tr class="remote_info" <?php if($con_type=='local') echo 'style="display:none"'?>>
605
- <td class="key">Password</td>
606
- <td>
607
- <input type="password" name="password" id="password_rem" value="<?php echo $password; ?>" disabled>
608
- </td>
609
- </tr>
610
- <tr class="remote_info" <?php if($con_type=='local') echo 'style="display:none"'?>>
611
- <td class="key">Database</td>
612
- <td>
613
- <input type="text"name="database" id="database_rem" value="<?php echo $database; ?>" disabled>
614
- </td>
615
- </tr>
616
- <tr valign="top">
617
- <td class="key">
618
- <label style="font-size:20px;">Type: </label>
619
- </td>
620
- <td>
621
- <input type="radio" name="con_method" id="insert" value="insert" <?php if($con_method=='insert') echo 'checked="checked"'?> disabled>
622
- <label for="insert">Insert</label>
623
- <input type="radio" name="con_method" id="update" value="update" <?php if($con_method=='update') echo 'checked="checked"'?> disabled>
624
- <label for="update">Update</label>
625
- <input type="radio" name="con_method" id="delete" value="delete" <?php if($con_method=='delete') echo 'checked="checked"'?> disabled>
626
- <label for="delete">Delete</label>
627
- </td>
628
- </tr>
629
- </table>
630
- <div id="struct">
631
- <label for="tables" class="select-db-label">Select a table</label>
632
- <select name="tables" id="tables" class="select-db-select" disabled>
633
- <option value="" ></option>
634
- <?php
635
- foreach($tables as $table) {
636
- echo '<option value="'.$table.'" '.($table_cur==$table ? 'selected' : '').' >'.$table.'</option>';
637
- }
638
- ?>
639
- </select>
640
- <br/>
641
- <div id="table_struct">
642
- <?php
643
- if($table_struct) {
644
- ?>
645
- <div class="struct">
646
- <div class="cols">
647
- <?php
648
- $temps=explode('***wdffieldwdf***',$details);
649
- $wheres = $temps[count($temps)-1];
650
- $temps = array_slice($temps,0, count($temps)-1);
651
- $col_names= array();
652
- $col_vals= array();
653
- $col_checks= array();
654
-
655
- foreach($temps as $temp) {
656
- $temp=explode('***wdfnamewdf***',$temp);
657
- array_push($col_names, $temp[0]);
658
- $temp=explode('***wdfvaluewdf***',$temp[1]);
659
- array_push($col_vals, $temp[0]);
660
- array_push($col_checks, $temp[1]);
661
- }
662
- if($con_method=='insert' or $con_method=='update') {
663
- echo '<div style="background: none;text-align: center;font-size: 20px;color: #000;font-weight: bold;"> SET </div>';
664
-
665
- foreach($table_struct as $key =>$col) {
666
- $title=' '.$col->Field;
667
- $title.="<ul style='padding-left: 17px;'>";
668
- $title.="<li>Type - ".$col->Type."</li>";
669
- $title.="<li>Null - ".$col->Null."</li>";
670
- $title.="<li>Key - ".$col->Key."</li>";
671
- $title.="<li>Default - ".$col->Default."</li>";
672
- $title.="<li>Extra - ".$col->Extra."</li>";
673
- $title.="</ul>";
674
- ?>
675
- <div><label title="<?php echo $title; ?>" class="hasTip"><b><?php echo $col->Field; ?></b><img src="<?php echo WD_FM_URL . '/images/info.png?ver='. get_option("wd_form_maker_version").''; ?>" style="width:20px; vertical-align:middle;padding-left: 10px;" /></label><input type="text" id="<?php echo str_replace("'", "SingleQuot", $col->Field); ?>" <?php if(!$col_checks[$key]) echo 'disabled="disabled"'?> value="<?php echo $col_vals[$key]; ?>" /><input id="ch_<?php echo str_replace("'", "SingleQuot", $col->Field); ?>" type="checkbox" onClick="dis('<?php echo str_replace("'", "SingleQuot", $col->Field); ?>', this.checked)" <?php if($col_checks[$key]) echo 'checked="checked"'?> /></div>
676
- <?php
677
- }
678
- }
679
-
680
- if($con_method=='delete' or $con_method=='update') {
681
- echo '<div class="select-db-op where"><img src="'.WD_FM_URL . '/images/add_condition.png?ver='. get_option("wd_form_maker_version").'" title="ADD" class="add_cond"/>WHERE</div>';
682
- if($wheres) {
683
- echo '<script>';
684
-
685
- $wheres = explode('***where***',$wheres);
686
- $wheres = array_slice($wheres,0, count($wheres)-1);
687
- foreach($wheres as $where) {
688
- $temp=explode('***sel***',$where);
689
- $sel = $temp[0];
690
- $temp=explode('***op***',$temp[1]);
691
- $op = $temp[0];
692
- $temp=explode('***val***',$temp[1]);
693
- $val = $temp[0];
694
- $andor = $temp[1];
695
- echo 'jQuery(".cols").append(conds.replace(/condid/g, cond_id++).replace(\'SingleQuot\', "\'")); update_vis();
696
- jQuery("#sel_"+(cond_id-1)).val("'.html_entity_decode($sel, ENT_QUOTES).'");
697
- jQuery("#op_"+(cond_id-1)).val("'.$op.'");
698
- jQuery("#val_"+(cond_id-1)).val("'.$val.'");
699
- jQuery("#andor_"+(cond_id-1)).val("'.$andor.'");';
700
- }
701
- echo '</script>';
702
- }
703
- }
704
- ?>
705
- </div>
706
- <div style="color:red; background: none">The changes above will not affect the query until you click "Generate query".</div>
707
- </div>
708
- <br/>
709
- <input type="button" value="Generate Query" class="gen_query" onclick="gen_query()">
710
- <br/>
711
- <form name="query_form" id="query_form" >
712
- <label style="vertical-align: top; width: 102px; display: inline-block;" for="query_txt" > Query: </label><textarea id="query_txt" name="query" rows=5 style="width:428px" ><?php echo $query_obj->query; ?></textarea>
713
- <input type="hidden" name="details" id="details">
714
- <input type="hidden" name="id" value="<?php echo $query_obj->id; ?>">
715
- </form>
716
- <input type="button" value="Save" class="fm-query-save" onclick="save_query()">
717
- <div id="fieldlist" style="display: none;">
718
- <?php echo $form_fields; ?>
719
- </div>
720
- <?php
721
- }
722
- ?>
723
- </div>
724
- </div>
725
- <input type="hidden" value="<?php echo $form_id ?>" id="form_id">
726
- </div>
727
- <div class="desc">
728
- <?php
729
- foreach($label_id as $key => $lid) {
730
- echo '<div>{'.$lid.'} - <button onclick="insert_field('.$lid.');">'.$label_order_original[$key].'</button></div>';
731
- }
732
- $user_fields = array("subid"=>"Submission ID", "ip"=>"Submitter's IP", "userid"=>"User ID", "username"=>"Username", "useremail"=>"User Email");
733
- foreach($user_fields as $user_key=>$user_field) {
734
- echo '<div>{'.$user_key.'} - <button onclick="insert_field(\''.$user_key.'\');">'.$user_field.'</button></div>';
735
- }
736
- ?>
737
- </div>
738
- </div>
739
- <?php
740
- die();
741
- }
742
-
743
- public function add_query($form_id){
744
- wp_print_scripts('jquery');
745
- wp_print_scripts('jquery-ui-tooltip');
746
- ?>
747
- <link media="all" type="text/css" href="<?php echo WD_FM_URL . '/css/style.css'; ?>" rel="stylesheet">
748
- <link rel="stylesheet" href="<?php echo WD_FM_URL . '/css/jquery-ui-1.10.3.custom.css'; ?>">
749
- <?php
750
- $label = $this->model->get_labels($form_id);
751
-
752
- $filter_types=array("type_submit_reset", "type_map", "type_editor", "type_captcha", "type_recaptcha", "type_button", "type_paypal_total", "type_send_copy");
753
- $label_id= array();
754
- $label_order= array();
755
- $label_order_original= array();
756
- $label_type= array();
757
-
758
- $label_all = explode('#****#',$label);
759
- $label_all = array_slice($label_all,0, count($label_all)-1);
760
- foreach($label_all as $key => $label_each) {
761
- $label_id_each=explode('#**id**#',$label_each);
762
- $label_oder_each=explode('#**label**#', $label_id_each[1]);
763
-
764
- if(in_array($label_oder_each[1],$filter_types))
765
- continue;
766
- array_push($label_id, $label_id_each[0]);
767
- array_push($label_order_original, $label_oder_each[0]);
768
- $ptn = "/[^a-zA-Z0-9_]/";
769
- $rpltxt = "";
770
- $label_temp=preg_replace($ptn, $rpltxt, $label_oder_each[0]);
771
- array_push($label_order, $label_temp);
772
- array_push($label_type, $label_oder_each[1]);
773
- }
774
- ?>
775
- <script>
776
- function insert_field(){}
777
-
778
- function connect() {
779
- jQuery("input[type='radio']").attr('disabled','');
780
- jQuery(".connect").attr('disabled','');
781
- jQuery('#struct').html('<div class="fm-loading-container"><div class="fm-loading-content"></div></div>');
782
- jQuery.ajax({
783
- type: "POST",
784
- url: "<?php echo add_query_arg(array('action' => 'FormMakerSQLMapping', 'id' => 0, 'form_id' => $form_id, 'task' => 'db_tables', 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>",
785
- data: 'con_type='+jQuery('input[name=con_type]:checked').val()+'&con_method='+jQuery('input[name=con_method]:checked').val()+'&host='+jQuery('#host_rem').val()+'&port='+jQuery('#port_rem').val()+'&username='+jQuery('#username_rem').val()+'&password='+jQuery('#password_rem').val()+'&database='+jQuery('#database_rem').val()+'&format=row',
786
- success: function(data) {
787
- jQuery("#struct").removeClass("fm_loading");
788
- if(data==1) {
789
- jQuery("#struct").html('<div style="font-size: 22px; text-align: center; padding-top: 15px;">Could not connect to MySQL.</div>')
790
- jQuery(".connect").removeAttr('disabled');
791
- jQuery("input[type='radio']").removeAttr('disabled','');
792
- }
793
- else {
794
- jQuery("#struct").html(data);
795
- }
796
-
797
- }
798
- });
799
- }
800
-
801
- function shh(x) {
802
- if(x)
803
- jQuery(".remote_info").show();
804
- else
805
- jQuery(".remote_info").hide();
806
- }
807
- </script>
808
- <style>
809
- .c1 {
810
- padding: 0 10px;
811
- }
812
-
813
- .main_func{
814
- font-family: Segoe UI;
815
- display: inline-block;
816
- width: 550px;
817
- }
818
-
819
- .main_func .admintable {
820
- width: 100%;
821
- padding: 10px 0;
822
- margin-bottom: 15px;
823
- }
824
-
825
- .main_func .admintable .key{
826
- width: 36%;
827
- }
828
-
829
- .main_func .admintable input[type='text'],
830
- .main_func .admintable input[type='password']{
831
- padding: 4px 6px;
832
- width:244px;
833
- }
834
-
835
- .btn.connect {
836
- background:#4EC0D9;
837
- width:78px;
838
- height:32px;
839
- border:1px solid #4EC0D9;
840
- border-radius:0px;
841
- color:#fff;
842
- cursor:pointer;
843
- }
844
-
845
- .desc {
846
- font-size: 13px;
847
- display: inline-block;
848
- width: 265px;
849
- position: fixed;
850
- margin: 15px;
851
- margin-left: 45px;
852
- }
853
-
854
- .desc > div {
855
- margin-top:3px;
856
- }
857
-
858
- .desc div span {
859
- width: 62px;
860
- display: inline-block;
861
- }
862
-
863
- .desc button {
864
- max-width: 190px;
865
- overflow: hidden;
866
- white-space: nowrap;
867
- text-overflow: ellipsis;
868
- padding: 4px;
869
- background: #eee;
870
- border: 1px solid #ccc;
871
- border-radius:0px;
872
- height:27px;
873
- }
874
-
875
- .key label {
876
- display:inline-block;
877
- width:150px;
878
- }
879
-
880
- .select-db-label {
881
- display: inline-block;
882
- font-size: 16px;
883
- width: 201px;
884
-
885
- }
886
-
887
- .select-db-select {
888
- width:325px;
889
- padding:6px;
890
- }
891
- </style>
892
- <div class="c1">
893
- <div class="main_func">
894
- <table class="admintable">
895
- <tr valign="top">
896
- <td class="key">
897
- <label style="font-size:20px;">Connection type: </label>
898
- </td>
899
- <td>
900
- <input type="radio" name="con_type" id="local" value="local" checked="checked" onclick="shh(false)">
901
- <label for="local">Local</label>
902
- <input type="radio" name="con_type" id="remote" value="remote" onclick="shh(true)">
903
- <label for="remote">Remote</label>
904
- </td>
905
- <td rowspan="2">
906
- <input type="button" value="Connect" onclick="connect()" class="btn connect">
907
- </td>
908
- </tr>
909
- <tr class="remote_info" style="display:none">
910
- <td class="key">Host</td>
911
- <td>
912
- <input type="text" name="host" id="host_rem" style="width:150px">
913
- Port : <input type="text" name="port" id="port_rem" value="3306" style="width:48px">
914
- </td>
915
- </tr>
916
- <tr class="remote_info" style="display:none">
917
- <td class="key">Username</td>
918
- <td>
919
- <input type="text" name="username" id="username_rem">
920
- </td>
921
- </tr>
922
- <tr class="remote_info" style="display:none">
923
- <td class="key">Password</td>
924
- <td>
925
- <input type="password" name="password" id="password_rem">
926
- </td>
927
- </tr>
928
- <tr class="remote_info" style="display:none">
929
- <td class="key">Database</td>
930
- <td>
931
- <input type="text"name="database" id="database_rem">
932
- </td>
933
- </tr>
934
- <tr valign="top">
935
- <td class="key">
936
- <label style="font-size:20px;">Type: </label>
937
- </td>
938
- <td >
939
- <input type="radio" name="con_method" id="insert" value="insert" checked="checked">
940
- <label for="insert">Insert</label>
941
- <input type="radio" name="con_method" id="update" value="update">
942
- <label for="update">Update</label>
943
- <input type="radio" name="con_method" id="delete" value="delete">
944
- <label for="delete">Delete</label>
945
- </td>
946
- </tr>
947
- </table>
948
- <div id="struct">
949
- </div>
950
- <input type="hidden" value="<?php echo $form_id ?>" id="form_id">
951
- </div>
952
- <div class="desc">
953
- <?php
954
- foreach($label_id as $key => $lid) {
955
- echo '<div><span>{'.$lid.'}</span> - <button onclick="insert_field('.$lid.');">'.$label_order_original[$key].'</button></div>';
956
- }
957
-
958
- $user_fields = array("subid"=>"Submission ID", "ip"=>"Submitter's IP", "userid"=>"User ID", "username"=>"Username", "useremail"=>"User Email");
959
- foreach($user_fields as $user_key=>$user_field) {
960
- echo '<div><span>{'.$user_key.'}</span> - <button onclick="insert_field(\''.$user_key.'\');">'.$user_field.'</button></div>';
961
- }
962
- ?>
963
- </div>
964
- </div>
965
- <?php
966
- die();
967
- }
968
-
969
- public function db_tables($form_id){
970
- $tables = $this->model->get_tables();
971
- ?>
972
- <label for="tables" class="select-db-label">Select a table</label>
973
- <select name="tables" id="tables" class="select-db-select">
974
- <option value="" ></option>
975
- <?php
976
- foreach($tables as $table) {
977
- echo '<option value="' . $table . '" >' . $table . '</option>';
978
- }
979
- ?>
980
- </select>
981
- <br/>
982
- <div id="table_struct">
983
- </div>
984
- <script>
985
- jQuery("#tables").change(function (){
986
- jQuery('#table_struct').html('<div class="fm-loading-container"><div class="fm-loading-content"></div></div>');
987
- jQuery.ajax({
988
- type: "POST",
989
- url: "<?php echo add_query_arg(array('action' => 'FormMakerSQLMapping', 'id' => 0, 'form_id' => $form_id, 'task' => 'db_table_struct', 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>",
990
- data: 'name='+jQuery(this).val()+'&con_type='+jQuery('input[name=con_type]:checked').val()+'&con_method='+jQuery('input[name=con_method]:checked').val()+'&host='+jQuery('#host_rem').val()+'&port='+jQuery('#port_rem').val()+'&username='+jQuery('#username_rem').val()+'&password='+jQuery('#password_rem').val()+'&database='+jQuery('#database_rem').val()+'&format=row',
991
- success: function(data) {
992
- jQuery("#table_struct").removeClass("fm_loading");
993
- jQuery("#table_struct").html(data);
994
- }
995
- });
996
- })
997
- </script>
998
- <?php
999
- die();
1000
- }
1001
-
1002
- public function db_table_struct ($form_id) {
1003
- $table_struct = $this->model->get_table_struct();
1004
- $label = $this->model->get_labels($form_id);
1005
- $con_method = isset($_POST['con_method']) ? $_POST['con_method'] : '';
1006
- $filter_types=array("type_submit_reset", "type_map", "type_editor", "type_captcha", "type_recaptcha", "type_button", "type_paypal_total", "type_send_copy");
1007
- $label_id= array();
1008
- $label_order= array();
1009
- $label_order_original= array();
1010
- $label_type= array();
1011
-
1012
- ///stexic
1013
- $label_all = explode('#****#',$label);
1014
- $label_all = array_slice($label_all,0, count($label_all)-1);
1015
-
1016
- foreach($label_all as $key => $label_each) {
1017
- $label_id_each=explode('#**id**#',$label_each);
1018
- $label_oder_each=explode('#**label**#', $label_id_each[1]);
1019
-
1020
- if(in_array($label_oder_each[1],$filter_types)) {
1021
- continue;
1022
- }
1023
- array_push($label_id, $label_id_each[0]);
1024
- array_push($label_order_original, $label_oder_each[0]);
1025
- $ptn = "/[^a-zA-Z0-9_]/";
1026
- $rpltxt = "";
1027
- $label_temp=preg_replace($ptn, $rpltxt, $label_oder_each[0]);
1028
- array_push($label_order, $label_temp);
1029
- array_push($label_type, $label_oder_each[1]);
1030
- }
1031
- $form_fields='';
1032
- foreach($label_id as $key => $id) {
1033
- $form_fields.='<a onclick="insert_field('.$id.'); jQuery(\'#fieldlist\').hide();" style="display:block; text-decoration:none;">'.$label_order_original[$key].'</a>';
1034
- }
1035
- $user_fields = array("subid"=>"Submission ID", "ip"=>"Submitter's IP", "userid"=>"User ID", "username"=>"Username", "useremail"=>"User Email");
1036
- foreach($user_fields as $user_key=>$user_field) {
1037
- $form_fields.='<a onclick="insert_field(\''.$user_key.'\'); jQuery(\'#fieldlist\').hide();" style="display:block; text-decoration:none;">'.$user_field.'</a>';
1038
- }
1039
- $cond='<div id="condid"><select id="sel_condid" style="width: 160px">';
1040
- foreach($table_struct as $col) {
1041
- $cond.='<option>'.str_replace("'", "SingleQuot", $col->Field).'</option>';
1042
- }
1043
- $cond.='</select>';
1044
-
1045
- $cond.='<select id="op_condid"><option value="=" selected="selected">=</option><option value="!=">!=</option><option value=">">&gt;</option><option value="<">&lt;</option><option value=">=">&gt;=</option><option value="<=">&lt;=</option><option value="%..%">Like</option><option value="%..">Starts with</option><option value="..%">Ends with</option></select><input id="val_condid" style="width:170px" type="text" /><select id="andor_condid" style="visibility: hidden;"><option value="AND">AND</option><option value="OR">OR</option></select><img src="' . WD_FM_URL . '/images/delete.png?ver='. get_option("wd_form_maker_version").'" onclick="delete_cond(&quot;condid&quot;)" style="vertical-align: middle;"></div>';
1046
- ?>
1047
- <script>
1048
- var selected_field ='';
1049
- var isvisible = 1;
1050
- var cond_id = 1;
1051
-
1052
- conds='<?php echo $cond ?>';
1053
- fields=new Array(<?php
1054
- $fields = "";
1055
- if($table_struct) {
1056
- foreach($table_struct as $col) {
1057
- $fields.=' "'.$col->Field.'",';
1058
- }
1059
- echo substr($fields, 0, -1);
1060
- }
1061
- ?>);
1062
- function dis(id, x) {
1063
- if(x)
1064
- jQuery('#'+id).removeAttr('disabled');
1065
- else
1066
- jQuery('#'+id).attr('disabled','disabled');
1067
- }
1068
-
1069
- function update_vis() {
1070
- previous=0;
1071
- for(i=1; i<cond_id; i++) {
1072
- if(jQuery('#'+i).html()) {
1073
- jQuery('#andor_'+i).css('visibility', 'hidden');
1074
- if(previous) {
1075
- jQuery('#andor_'+previous).css('visibility', 'visible');
1076
- }
1077
- previous=i;
1078
- }
1079
- }
1080
- }
1081
-
1082
- function delete_cond(id) {
1083
- jQuery('#'+id).remove();
1084
- update_vis();
1085
- }
1086
-
1087
- jQuery('.add_cond').click( function() {
1088
- jQuery('.cols').append(conds.replace(/condid/g, cond_id++).replace('SingleQuot', "'"));
1089
- update_vis();
1090
- });
1091
-
1092
- jQuery('html').click(function() {
1093
- if(jQuery("#fieldlist").css('display')=="block") {
1094
- jQuery("#fieldlist").hide();
1095
- }
1096
- });
1097
-
1098
- jQuery('.cols input[type="text"]').on('click', function(event) {
1099
- event.stopPropagation();
1100
- jQuery("#fieldlist").css("top",jQuery(this).offset().top+jQuery(this).height()+2);
1101
- jQuery("#fieldlist").css("left",jQuery(this).offset().left);
1102
- jQuery("#fieldlist").slideDown('fast');
1103
- selected_field=this.id;
1104
- });
1105
-
1106
- jQuery('#query_txt').click(function(event) {
1107
- event.stopPropagation();
1108
- jQuery("#fieldlist").css("top",jQuery(this).offset().top+jQuery(this).height()+2);
1109
- jQuery("#fieldlist").css("left",jQuery(this).offset().left);
1110
- jQuery("#fieldlist").slideDown('fast');
1111
- selected_field=this.id;
1112
- });
1113
-
1114
- jQuery('#fieldlist').click(function(event){
1115
- event.stopPropagation();
1116
- });
1117
-
1118
- function save_query() {
1119
- con_type =jQuery('input[name=con_type]:checked').val();
1120
- con_method =jQuery('input[name=con_method]:checked').val();
1121
- table =jQuery('#tables').val();
1122
- table =jQuery('#tables').val();
1123
- host =jQuery('#host_rem').val();
1124
- port =jQuery('#port_rem').val();
1125
- username =jQuery('#username_rem').val();
1126
- password =jQuery('#password_rem').val();
1127
- database =jQuery('#database_rem').val();
1128
-
1129
- str=con_type+"***wdfcon_typewdf***"+con_method+"***wdfcon_methodwdf***"+table+"***wdftablewdf***"+host+"***wdfhostwdf***"+port+"***wdfportwdf***"+username+"***wdfusernamewdf***"+password+"***wdfpasswordwdf***"+database+"***wdfdatabasewdf***";
1130
-
1131
- if(fields.length) {
1132
- for(i=0; i<fields.length; i++) {
1133
- str+=fields[i]+'***wdfnamewdf***'+jQuery('#'+fields[i]).val()+'***wdfvaluewdf***'+jQuery('#ch_'+fields[i]+":checked" ).length+'***wdffieldwdf***';
1134
- }
1135
- }
1136
-
1137
- for(i=1; i<cond_id; i++) {
1138
- if(jQuery('#'+i).html()) {
1139
- str+=jQuery('#sel_'+i).val()+'***sel***'+jQuery('#op_'+i).val()+'***op***'+jQuery('#val_'+i).val()+'***val***'+jQuery('#andor_'+i).val()+'***where***';
1140
- }
1141
- }
1142
-
1143
- if(!jQuery('#query_txt').val()) {
1144
- gen_query();
1145
- }
1146
-
1147
- jQuery('#details').val(str);
1148
-
1149
- var datatxt = jQuery("#query_form").serialize()+'&form_id='+jQuery("#form_id").val();
1150
- if(jQuery('#query_txt').val()) {
1151
- jQuery('.c1').html('<div class="fm-loading-container"><div class="fm-loading-content"></div></div>');
1152
- jQuery.ajax({
1153
- type: "POST",
1154
- url: "<?php echo add_query_arg(array('action' => 'FormMakerSQLMapping', 'id' => 0, 'form_id' => $form_id, 'task' => 'save_query', 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>",
1155
- data: datatxt,
1156
- success: function(data) {
1157
- window.parent.wd_fm_apply_options('apply_options');
1158
- window.parent.tb_remove();
1159
- }
1160
- });
1161
- }
1162
- else {
1163
- alert('The query is empty.');
1164
- }
1165
- return false;
1166
- }
1167
-
1168
- function gen_query() {
1169
- if(jQuery('#query_txt').val()) {
1170
- if(!confirm('Are you sure you want to replace the Query? All the modifications to the Query will be lost.')) {
1171
- return;
1172
- }
1173
- }
1174
- query="";
1175
- fields=new Array(<?php
1176
- $fields = "";
1177
- if($table_struct) {
1178
- foreach($table_struct as $col) {
1179
- $fields.=' "'.str_replace("'", "SingleQuot", $col->Field).'",';
1180
- }
1181
- echo substr($fields, 0, -1);
1182
- }
1183
- ?>);
1184
-
1185
- con_type =jQuery('input[name=con_type]:checked').val();
1186
- con_method =jQuery('input[name=con_method]:checked').val();
1187
- table =jQuery('#tables').val();
1188
- fls='';
1189
- vals='';
1190
- valsA=new Array();
1191
- flsA=new Array();
1192
-
1193
- if(fields.length) {
1194
- for(i=0; i<fields.length; i++) {
1195
- if(jQuery('#ch_'+fields[i]+":checked" ).length) {
1196
- flsA.push(fields[i]);
1197
- valsA.push(jQuery('#'+fields[i]).val());
1198
- }
1199
- }
1200
- }
1201
-
1202
- if(con_method=="insert") {
1203
- if(flsA.length) {
1204
- for(i=0; i<flsA.length-1; i++) {
1205
- fls+= '`'+flsA[i]+'`, ';
1206
- vals+= '"'+valsA[i]+'", ';
1207
- }
1208
- fls+= '`'+flsA[i]+'`';
1209
- vals+= '"'+valsA[i]+'"';
1210
- }
1211
- if(fls) {
1212
- query="INSERT INTO "+jQuery('#tables').val()+" (" +fls+") VALUES ("+vals+")";
1213
- }
1214
- }
1215
-
1216
- if(con_method=="update") {
1217
- if(flsA.length) {
1218
- for(i=0; i<flsA.length-1; i++) {
1219
- vals+= '`'+flsA[i]+'`="'+valsA[i]+'", ';
1220
- }
1221
- vals+= '`'+flsA[i]+'`="'+valsA[i]+'"';
1222
- }
1223
- where="";
1224
- previous='';
1225
- for(i=1; i<cond_id; i++) {
1226
- if(jQuery('#'+i).html()) {
1227
- if(jQuery('#op_'+i).val()=="%..%")
1228
- op_val=' LIKE "%'+jQuery('#val_'+i).val()+'%"';
1229
- else if(jQuery('#op_'+i).val()=="%..")
1230
- op_val=' LIKE "%'+jQuery('#val_'+i).val()+'"';
1231
- else if(jQuery('#op_'+i).val()=="..%")
1232
- op_val=' LIKE "'+jQuery('#val_'+i).val()+'%"';
1233
- else
1234
- op_val=' '+jQuery('#op_'+i).val()+' "'+jQuery('#val_'+i).val()+'"';
1235
- where+=previous+' `'+jQuery('#sel_'+i).val()+'`'+op_val;
1236
- previous=' '+ jQuery('#andor_'+i).val();
1237
- }
1238
- }
1239
- if(vals) {
1240
- query="UPDATE "+jQuery('#tables').val()+" SET " + vals+(where? ' WHERE'+where: '') ;
1241
- }
1242
- }
1243
-
1244
- if(con_method=="delete") {
1245
- where="";
1246
- previous='';
1247
- for(i=1; i<cond_id; i++) {
1248
- if(jQuery('#'+i).html()) {
1249
- if(jQuery('#op_'+i).val()=="%..%")
1250
- op_val=' LIKE "%'+jQuery('#val_'+i).val()+'%"';
1251
- else if(jQuery('#op_'+i).val()=="%..")
1252
- op_val=' LIKE "%'+jQuery('#val_'+i).val()+'"';
1253
- else if(jQuery('#op_'+i).val()=="..%")
1254
- op_val=' LIKE "'+jQuery('#val_'+i).val()+'%"';
1255
- else
1256
- op_val=' '+jQuery('#op_'+i).val()+' "'+jQuery('#val_'+i).val()+'"';
1257
- where+=previous+' '+jQuery('#sel_'+i).val()+op_val;
1258
- previous=' '+ jQuery('#andor_'+i).val();
1259
- }
1260
- }
1261
- if(where) {
1262
- query="DELETE FROM "+jQuery('#tables').val()+ ' WHERE'+where ;
1263
- }
1264
- }
1265
- jQuery('#query_txt').val(query.replace("SingleQuot", "'"));
1266
- }
1267
-
1268
- jQuery(document).ready(function () {
1269
- jQuery(".hasTip").tooltip({
1270
- track: true,
1271
- content: function () {
1272
- return jQuery(this).prop('title');
1273
- }
1274
- });
1275
- });
1276
-
1277
- function insert_field(myValue) {
1278
- if(!selected_field)
1279
- return;
1280
- myField=document.getElementById(selected_field);
1281
- if (document.selection) {
1282
- myField.focus();
1283
- sel = document.selection.createRange();
1284
- sel.text = myValue;
1285
- }
1286
- else {
1287
- if (myField.selectionStart || myField.selectionStart == '0') {
1288
- var startPos = myField.selectionStart;
1289
- var endPos = myField.selectionEnd;
1290
- myField.value = myField.value.substring(0, startPos)
1291
- + "{"+myValue+"}"
1292
- + myField.value.substring(endPos, myField.value.length);
1293
- }
1294
- else {
1295
- myField.value += "{"+myValue+"}";
1296
- }
1297
- }
1298
- }
1299
- </script>
1300
- <style>
1301
- .cols div:nth-child(even) {background: #FFF;}
1302
- .cols div:nth-child(odd) {background: #F5F5F5;}
1303
- .cols div {
1304
- height: 28px;
1305
- padding: 5px;
1306
- }
1307
-
1308
- .cols {
1309
- display: inline-block;
1310
- }
1311
-
1312
- .cols label {
1313
- display: inline-block;
1314
- width: 200px;
1315
- font-size: 15px;
1316
- overflow: hidden;
1317
- white-space: nowrap;
1318
- text-overflow: ellipsis;
1319
- vertical-align: middle;
1320
- }
1321
-
1322
- .cols input[type="text"] {
1323
- width: 295px;
1324
- line-height: 18px;
1325
- height: 28px;
1326
- border: 1px solid #ccc;
1327
- padding: 0 3px;
1328
- margin-right: 2px;
1329
- }
1330
-
1331
- .cols input[type="text"]:disabled {
1332
- cursor: not-allowed;
1333
- background-color: #eee;
1334
- }
1335
-
1336
- .cols input[type="checkbox"] {
1337
- width: 20px;
1338
- line-height: 18px;
1339
- height: 20px;
1340
- vertical-align: middle;
1341
- }
1342
-
1343
- .cols select {
1344
- line-height: 18px;
1345
- height: 28px;
1346
- margin-right: 2px;
1347
- }
1348
-
1349
- #fieldlist {
1350
- position: absolute;
1351
- width:225px;
1352
- background: #fff;
1353
- border: solid 1px #c7c7c7;
1354
- top: 0;
1355
- left: 0;
1356
- z-index: 1000;
1357
- }
1358
-
1359
- #fieldlist a {
1360
- padding: 5px;
1361
- cursor:pointer;
1362
- overflow: hidden;
1363
- white-space: nowrap;
1364
- text-overflow: ellipsis;
1365
- }
1366
-
1367
- #fieldlist a:hover {
1368
- background: #ccc;
1369
- }
1370
- .gen_query, .gen_query:focus {
1371
- width: 148px;
1372
- height: 38px;
1373
- background: #4EC0D9;
1374
- color: white;
1375
- cursor: pointer;
1376
- border: 0px;
1377
- font-size: 14px;
1378
- font-weight: bold;
1379
- margin: 20px 0;
1380
- border-radius: 0px;
1381
- }
1382
- .gen_query:active {
1383
- background: #ccc;
1384
- }
1385
-
1386
- .fm-query-save {
1387
- float: right;
1388
- font-size: 13px;
1389
- margin: 0 20px;
1390
- background: #4EC0D9;
1391
- width: 83px;
1392
- height: 34px;
1393
- border: 1px solid #4EC0D9;
1394
- border-radius: 0px;
1395
- color: #fff;
1396
- cursor: pointer;
1397
- }
1398
-
1399
- .select-db-op {
1400
- display: inline-block;
1401
- text-align: right;
1402
- font-weight: bold;
1403
- font-size: 18px;
1404
- padding: 5px 0;
1405
- margin: 5px 0;
1406
- background:none !important;
1407
- }
1408
-
1409
- .select-db-op.where{
1410
- width: 272px;
1411
- }
1412
-
1413
- .select-db-op img{
1414
- float:left;
1415
- }
1416
- </style>
1417
- <?php
1418
- if($table_struct) { ?>
1419
- <div class="cols">
1420
- <?php
1421
- if($con_method=='insert' or $con_method=='update') {
1422
- echo '<div style="background: none;text-align: center;font-size: 20px;color: #000;font-weight: bold;"> SET </div>';
1423
- foreach($table_struct as $col) {
1424
- $title=' '.$col->Field;
1425
- $title.="<ul style='padding-left: 17px;'>";
1426
- $title.="<li>Type - ".$col->Type."</li>";
1427
- $title.="<li>Null - ".$col->Null."</li>";
1428
- $title.="<li>Key - ".$col->Key."</li>";
1429
- $title.="<li>Default - ".$col->Default."</li>";
1430
- $title.="<li>Extra - ".$col->Extra."</li>";
1431
- $title.="</ul>";
1432
- ?>
1433
- <div><label title="<?php echo $title; ?>" class="hasTip"><b><?php echo $col->Field; ?></b><img src="<?php echo WD_FM_URL . '/images/info.png?ver='. get_option("wd_form_maker_version").''; ?>" style="width:20px; vertical-align:middle;padding-left: 10px;" /></label><input type="text" id="<?php echo str_replace("'", "SingleQuot", $col->Field); ?>" disabled="disabled"/><input id="ch_<?php echo str_replace("'", "SingleQuot", $col->Field); ?>" type="checkbox" onClick="dis('<?php echo str_replace("'", "SingleQuot", $col->Field); ?>', this.checked)"/></div>
1434
- <?php
1435
- }
1436
- }
1437
- if($con_method=='delete' or $con_method=='update') {
1438
- echo '<div class="select-db-op where"><img src="'.WD_FM_URL . '/images/add_condition.png?ver='. get_option("wd_form_maker_version").'" title="ADD" class="add_cond"/>WHERE</div>';
1439
- }
1440
- ?>
1441
- </div>
1442
- <br/>
1443
- <input type="button" value="Generate Query" class="gen_query" onclick="gen_query()">
1444
- <br/>
1445
- <form name="query_form" id="query_form" >
1446
- <label style="vertical-align: top; width: 102px; display: inline-block;" for="query_txt" > Query: </label><textarea id="query_txt" name="query" rows=5 style="width:428px"></textarea>
1447
- <input type="hidden" name="details" id="details">
1448
- </form>
1449
- <input type="button" value="Save" class="fm-query-save" onclick="save_query()">
1450
- <div id="fieldlist" style="display: none;">
1451
- <?php echo $form_fields ?>
1452
- </div>
1453
- <?php
1454
- }
1455
- die();
1456
- }
1457
-
1458
- ////////////////////////////////////////////////////////////////////////////////////////
1459
- // Getters & Setters //
1460
- ////////////////////////////////////////////////////////////////////////////////////////
1461
- ////////////////////////////////////////////////////////////////////////////////////////
1462
- // Private Methods //
1463
- ////////////////////////////////////////////////////////////////////////////////////////
1464
- ////////////////////////////////////////////////////////////////////////////////////////
1465
- // Listeners //
1466
- ////////////////////////////////////////////////////////////////////////////////////////
1467
  }
1
+ <?php
2
+
3
+ class FMViewFormMakerSQLMapping {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ private $model;
14
+
15
+
16
+ ////////////////////////////////////////////////////////////////////////////////////////
17
+ // Constructor & Destructor //
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ public function __construct($model) {
20
+ $this->model = $model;
21
+ }
22
+ ////////////////////////////////////////////////////////////////////////////////////////
23
+ // Public Methods //
24
+ ////////////////////////////////////////////////////////////////////////////////////////
25
+
26
+ public function edit_query($id, $form_id) {
27
+ wp_print_scripts('jquery');
28
+ wp_print_scripts('jquery-ui-tooltip');
29
+ ?>
30
+ <link media="all" type="text/css" href="<?php echo WD_FM_URL . '/css/style.css'; ?>" rel="stylesheet">
31
+ <link rel="stylesheet" href="<?php echo WD_FM_URL . '/css/jquery-ui-1.10.3.custom.css'; ?>">
32
+ <?php
33
+ $label = $this->model->get_labels($form_id);
34
+ $query_obj = $this->model->get_query($id);
35
+
36
+ $temp = explode('***wdfcon_typewdf***',$query_obj->details);
37
+ $con_type = $temp[0];
38
+ $temp = explode('***wdfcon_methodwdf***',$temp[1]);
39
+ $con_method = $temp[0];
40
+ $temp = explode('***wdftablewdf***',$temp[1]);
41
+ $table_cur = $temp[0];
42
+ $temp = explode('***wdfhostwdf***',$temp[1]);
43
+ $host = $temp[0];
44
+ $temp = explode('***wdfportwdf***',$temp[1]);
45
+ $port = $temp[0];
46
+ $temp = explode('***wdfusernamewdf***',$temp[1]);
47
+ $username = $temp[0];
48
+ $temp = explode('***wdfpasswordwdf***',$temp[1]);
49
+ $password = $temp[0];
50
+ $temp = explode('***wdfdatabasewdf***',$temp[1]);
51
+ $database = $temp[0];
52
+ $details = $temp[1];
53
+
54
+ $tables = $this->model->get_tables_saved($con_type, $username, $password, $database, $host);
55
+ $table_struct = $this->model->get_table_struct_saved($con_type, $username, $password, $database, $host, $table_cur, $con_method);
56
+
57
+ $filter_types=array("type_submit_reset", "type_map", "type_editor", "type_captcha", "type_recaptcha", "type_button", "type_paypal_total", "type_send_copy");
58
+ $label_id= array();
59
+ $label_order= array();
60
+ $label_order_original= array();
61
+ $label_type= array();
62
+
63
+ $label_all = explode('#****#',$label);
64
+ $label_all = array_slice($label_all,0, count($label_all)-1);
65
+
66
+ foreach($label_all as $key => $label_each) {
67
+ $label_id_each=explode('#**id**#',$label_each);
68
+ $label_oder_each=explode('#**label**#', $label_id_each[1]);
69
+
70
+ if(in_array($label_oder_each[1],$filter_types))
71
+ continue;
72
+
73
+ array_push($label_id, $label_id_each[0]);
74
+ array_push($label_order_original, $label_oder_each[0]);
75
+ $ptn = "/[^a-zA-Z0-9_]/";
76
+ $rpltxt = "";
77
+ $label_temp=preg_replace($ptn, $rpltxt, $label_oder_each[0]);
78
+ array_push($label_order, $label_temp);
79
+ array_push($label_type, $label_oder_each[1]);
80
+ }
81
+
82
+ $form_fields='';
83
+ foreach($label_id as $key => $lid) {
84
+ $form_fields.='<a onclick="insert_field('.$lid.'); jQuery(\'#fieldlist\').hide();" style="display:block; text-decoration:none;">'.$label_order_original[$key].'</a>';
85
+ }
86
+ $user_fields = array("subid"=>"Submission ID", "ip"=>"Submitter's IP", "userid"=>"User ID", "username"=>"Username", "useremail"=>"User Email");
87
+ foreach($user_fields as $user_key=>$user_field) {
88
+ $form_fields.='<a onclick="insert_field(\''.$user_key.'\'); jQuery(\'#fieldlist\').hide();" style="display:block; text-decoration:none;">'.$user_field.'</a>';
89
+ }
90
+
91
+ $cond='<div id="condid"><select id="sel_condid" style="width: 160px">';
92
+ foreach($table_struct as $col) {
93
+ $cond.='<option>'.str_replace("'", "SingleQuot", $col->Field).'</option>';
94
+ }
95
+ $cond.='</select>';
96
+ $cond.='<select id="op_condid"><option value="=" selected="selected">=</option><option value="!=">!=</option><option value=">">&gt;</option><option value="<">&lt;</option><option value=">=">&gt;=</option><option value="<=">&lt;=</option><option value="%..%">Like</option><option value="%..">Starts with</option><option value="..%">Ends with</option></select><input id="val_condid" style="width:170px" type="text" /><select id="andor_condid" style="visibility: hidden;"><option value="AND">AND</option><option value="OR">OR</option></select><img src="' . WD_FM_URL . '/images/delete.png?ver='. get_option("wd_form_maker_version").'" onclick="delete_cond(&quot;condid&quot;)" style="vertical-align: middle;"></div>';
97
+ ?>
98
+ <script>
99
+ function connect() {
100
+ jQuery("input[type='radio']").attr('disabled','');
101
+ jQuery('#struct').html('<div class="fm-loading-container"><div class="fm-loading-content"></div></div>');
102
+ jQuery("#struct").load('index.php?option=com_formmaker&task=db_tables&con_type='+jQuery('input[name=con_type]:checked').val()+'&con_method='+jQuery('input[name=con_method]:checked').val()+'&format=row');
103
+ }
104
+ jQuery(document).ready(function() {
105
+ jQuery("#tables").change(function (){
106
+ jQuery("#struct").removeClass("fm_loading");
107
+ jQuery("#table_struct").load('index.php?option=com_formmaker&task=db_table_struct&name='+jQuery(this).val()+'&con_type='+jQuery('input[name=con_type]:checked').val()+'&con_method='+jQuery('input[name=con_method]:checked').val()+'&host='+jQuery('#host_rem').val()+'&port='+jQuery('#port_rem').val()+'&username='+jQuery('#username_rem').val()+'&password='+jQuery('#password_rem').val()+'&database='+jQuery('#database_rem').val()+'&format=row&id='+jQuery("#form_id").val());
108
+ });
109
+ jQuery('html').click(function() {
110
+ if(jQuery("#fieldlist").css('display')=="block") {
111
+ jQuery("#fieldlist").hide();
112
+ }
113
+ });
114
+ jQuery('.cols input[type="text"]').on('click', function(event) {
115
+ event.stopPropagation();
116
+ jQuery("#fieldlist").css("top",jQuery(this).offset().top+jQuery(this).height()+2);
117
+ jQuery("#fieldlist").css("left",jQuery(this).offset().left);
118
+ jQuery("#fieldlist").slideDown('fast');
119
+ selected_field=this.id;
120
+ });
121
+ jQuery('#query_txt').click(function(event) {
122
+ event.stopPropagation();
123
+ jQuery("#fieldlist").css("top",jQuery(this).offset().top+jQuery(this).height()+2);
124
+ jQuery("#fieldlist").css("left",jQuery(this).offset().left);
125
+ jQuery("#fieldlist").slideDown('fast');
126
+ selected_field=this.id;
127
+ });
128
+ jQuery('#fieldlist').click(function(event){
129
+ event.stopPropagation();
130
+ });
131
+ jQuery('.add_cond').click( function() {
132
+ jQuery('.cols').append(conds.replace(/condid/g, cond_id++).replace('SingleQuot', "'"));
133
+ update_vis();
134
+ });
135
+ });
136
+ var selected_field ='';
137
+ var isvisible = 1;
138
+ var cond_id = 1;
139
+ conds='<?php echo $cond ?>';
140
+ fields=new Array(<?php
141
+ $fields = "";
142
+ if($table_struct) {
143
+ foreach($table_struct as $col) {
144
+ $fields.=' "'.$col->Field.'",';
145
+ }
146
+ echo substr($fields, 0, -1);
147
+ }
148
+ ?>);
149
+
150
+ function dis(id, x) {
151
+ if(x)
152
+ jQuery('#'+id).removeAttr('disabled');
153
+ else
154
+ jQuery('#'+id).attr('disabled','disabled');
155
+ }
156
+ function update_vis() {
157
+ previous=0;
158
+ for(i=1; i<cond_id; i++) {
159
+ if(jQuery('#'+i).html()) {
160
+ jQuery('#andor_'+i).css('visibility', 'hidden');
161
+ if(previous)
162
+ jQuery('#andor_'+previous).css('visibility', 'visible');
163
+ previous=i;
164
+ }
165
+ }
166
+ }
167
+ function delete_cond(id) {
168
+ jQuery('#'+id).remove();
169
+ update_vis();
170
+ }
171
+ function save_query() {
172
+ con_type =jQuery('input[name=con_type]:checked').val();
173
+ con_method =jQuery('input[name=con_method]:checked').val();
174
+ table =jQuery('#tables').val();
175
+ host =jQuery('#host_rem').val();
176
+ port =jQuery('#port_rem').val();
177
+ username =jQuery('#username_rem').val();
178
+ password =jQuery('#password_rem').val();
179
+ database =jQuery('#database_rem').val();
180
+
181
+ str=con_type+"***wdfcon_typewdf***"+con_method+"***wdfcon_methodwdf***"+table+"***wdftablewdf***"+host+"***wdfhostwdf***"+port+"***wdfportwdf***"+username+"***wdfusernamewdf***"+password+"***wdfpasswordwdf***"+database+"***wdfdatabasewdf***";
182
+
183
+ if(fields.length) {
184
+ for(i=0; i<fields.length; i++) {
185
+ str+=fields[i]+'***wdfnamewdf***'+jQuery('#'+fields[i]).val()+'***wdfvaluewdf***'+jQuery('#ch_'+fields[i]+":checked" ).length+'***wdffieldwdf***';
186
+ }
187
+ }
188
+
189
+ for(i=1; i<cond_id; i++) {
190
+ if(jQuery('#'+i).html()) {
191
+ str+=jQuery('#sel_'+i).val()+'***sel***'+jQuery('#op_'+i).val()+'***op***'+jQuery('#val_'+i).val()+'***val***'+jQuery('#andor_'+i).val()+'***where***';
192
+ }
193
+ }
194
+ if(!jQuery('#query_txt').val()) {
195
+ gen_query();
196
+ }
197
+ jQuery('#details').val(str);
198
+ var datatxt = jQuery("#query_form").serialize()+'&form_id='+jQuery("#form_id").val();
199
+
200
+ if(jQuery('#query_txt').val()) {
201
+ jQuery('.c1').html('<div class="fm-loading-container"><div class="fm-loading-content"></div></div>');
202
+
203
+ jQuery.ajax({
204
+ type: "POST",
205
+ url: "<?php echo add_query_arg(array('action' => 'FormMakerSQLMapping', 'id' => $id, 'form_id' => $form_id, 'task' => 'update_query', 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>",
206
+ data: datatxt,
207
+ success: function(data) {
208
+ window.parent.wd_fm_apply_options('apply_options');
209
+ window.parent.tb_remove();
210
+ }
211
+ });
212
+ }
213
+ else {
214
+ alert('The query is empty.');
215
+ }
216
+ return false;
217
+ }
218
+
219
+ function gen_query() {
220
+ if(jQuery('#query_txt').val())
221
+ if(!confirm('Are you sure you want to replace the Query? All the modifications to the Query will be lost.'))
222
+ return;
223
+ query="";
224
+ fields=new Array(<?php
225
+ $fields = "";
226
+ if($table_struct) {
227
+ foreach($table_struct as $col) {
228
+ $fields.=' "'.str_replace("'", "SingleQuot", $col->Field).'",';
229
+ }
230
+ echo substr($fields, 0, -1);
231
+ }
232
+ ?>);
233
+
234
+ con_type =jQuery('input[name=con_type]:checked').val();
235
+ con_method =jQuery('input[name=con_method]:checked').val();
236
+ table =jQuery('#tables').val();
237
+ fls='';
238
+ vals='';
239
+ valsA=new Array();
240
+ flsA=new Array();
241
+
242
+ if(fields.length) {
243
+ for(i=0; i<fields.length; i++) {
244
+ if(jQuery('#ch_'+fields[i]+":checked" ).length) {
245
+ flsA.push(fields[i]);
246
+ valsA.push(jQuery('#'+fields[i]).val());
247
+ }
248
+ }
249
+ }
250
+ if(con_method=="insert") {
251
+ if(flsA.length) {
252
+ for(i=0; i<flsA.length-1; i++) {
253
+ fls+= '`'+flsA[i]+'`, ';
254
+ vals+= '"'+valsA[i]+'", ';
255
+ }
256
+ fls+= '`'+flsA[i]+'`';
257
+ vals+= '"'+valsA[i]+'"';
258
+ }
259
+ if(fls)
260
+ query="INSERT INTO "+jQuery('#tables').val()+" (" +fls+") VALUES ("+vals+")";
261
+ }
262
+
263
+ if(con_method=="update") {
264
+ if(flsA.length) {
265
+ for(i=0; i<flsA.length-1; i++) {
266
+ vals+= '`'+flsA[i]+'`="'+valsA[i]+'", ';
267
+ }
268
+ vals+= '`'+flsA[i]+'`="'+valsA[i]+'"';
269
+ }
270
+ where="";
271
+ previous='';
272
+
273
+ for(i=1; i<cond_id; i++) {
274
+ if(jQuery('#'+i).html()) {
275
+ if(jQuery('#op_'+i).val()=="%..%")
276
+ op_val=' LIKE "%'+jQuery('#val_'+i).val()+'%"';
277
+ else if(jQuery('#op_'+i).val()=="%..")
278
+ op_val=' LIKE "%'+jQuery('#val_'+i).val()+'"';
279
+ else if(jQuery('#op_'+i).val()=="..%")
280
+ op_val=' LIKE "'+jQuery('#val_'+i).val()+'%"';
281
+ else
282
+ op_val=' '+jQuery('#op_'+i).val()+' "'+jQuery('#val_'+i).val()+'"';
283
+ where+=previous+' `'+jQuery('#sel_'+i).val()+'`'+op_val;
284
+ previous=' '+ jQuery('#andor_'+i).val();
285
+ }
286
+ }
287
+ if(vals)
288
+ query="UPDATE "+jQuery('#tables').val()+" SET " + vals+(where? ' WHERE'+where: '') ;
289
+ }
290
+ if(con_method=="delete") {
291
+ where="";
292
+ previous='';
293
+ for(i=1; i<cond_id; i++) {
294
+ if(jQuery('#'+i).html()) {
295
+ if(jQuery('#op_'+i).val()=="%..%")
296
+ op_val=' LIKE "%'+jQuery('#val_'+i).val()+'%"';
297
+ else if(jQuery('#op_'+i).val()=="%..")
298
+ op_val=' LIKE "%'+jQuery('#val_'+i).val()+'"';
299
+ else if(jQuery('#op_'+i).val()=="..%")
300
+ op_val=' LIKE "'+jQuery('#val_'+i).val()+'%"';
301
+ else
302
+ op_val=' '+jQuery('#op_'+i).val()+' "'+jQuery('#val_'+i).val()+'"';
303
+ where+=previous+' '+jQuery('#sel_'+i).val()+op_val;
304
+ previous=' '+ jQuery('#andor_'+i).val();
305
+ }
306
+ }
307
+ if(where)
308
+ query="DELETE FROM "+jQuery('#tables').val()+ ' WHERE'+where ;
309
+ }
310
+ jQuery('#query_txt').val(query.replace("SingleQuot", "'"));
311
+ }
312
+
313
+ jQuery(document).ready(function () {
314
+ jQuery(".hasTip").tooltip({
315
+ track: true,
316
+ content: function () {
317
+ return jQuery(this).prop('title');
318
+ }
319
+ });
320
+ });
321
+
322
+ function insert_field(myValue) {
323
+ if(!selected_field)
324
+ return;
325
+ myField=document.getElementById(selected_field);
326
+ if (document.selection) {
327
+ myField.focus();
328
+ sel = document.selection.createRange();
329
+ sel.text = myValue;
330
+ }
331
+ else {
332
+ if (myField.selectionStart || myField.selectionStart == '0') {
333
+ var startPos = myField.selectionStart;
334
+ var endPos = myField.selectionEnd;
335
+ myField.value = myField.value.substring(0, startPos)
336
+ + "{"+myValue+"}"
337
+ + myField.value.substring(endPos, myField.value.length);
338
+ }
339
+ else {
340
+ myField.value += "{"+myValue+"}";
341
+ }
342
+ }
343
+ }
344
+ </script>
345
+ <style>
346
+ .c1 {
347
+ padding: 0 10px;
348
+ }
349
+
350
+ .main_func{
351
+ font-family: Segoe UI;
352
+ display: inline-block;
353
+ width: 550px;
354
+ }
355
+
356
+ .main_func .admintable {
357
+ width: 100%;
358
+ padding: 10px 0;
359
+ margin-bottom: 15px;
360
+ }
361
+
362
+ .main_func .admintable .key{
363
+ width: 36%;
364
+ }
365
+
366
+ .main_func .admintable input[type='text'],
367
+ .main_func .admintable input[type='password']{
368
+ padding: 4px 6px;
369
+ width:244px;
370
+ }
371
+
372
+ .btn.connect {
373
+ background:#4EC0D9;
374
+ width:78px;
375
+ height:32px;
376
+ border:1px solid #4EC0D9;
377
+ border-radius:0px;
378
+ color:#fff;
379
+ cursor:pointer;
380
+ }
381
+
382
+ .desc {
383
+ font-size: 13px;
384
+ display: inline-block;
385
+ width: 265px;
386
+ position: fixed;
387
+ margin: 15px;
388
+ margin-left: 45px;
389
+ }
390
+
391
+ .desc > div {
392
+ margin-top:3px;
393
+ }
394
+
395
+ .desc div span {
396
+ width: 62px;
397
+ display: inline-block;
398
+ }
399
+
400
+ .desc button {
401
+ max-width: 190px;
402
+ overflow: hidden;
403
+ white-space: nowrap;
404
+ text-overflow: ellipsis;
405
+ padding: 4px;
406
+ background: #eee;
407
+ border: 1px solid #ccc;
408
+ border-radius:0px;
409
+ height:27px;
410
+ }
411
+
412
+ .key label {
413
+ display:inline-block;
414
+ width:150px;
415
+ }
416
+
417
+ .select-db-label {
418
+ display: inline-block;
419
+ font-size: 16px;
420
+ width: 201px;
421
+
422
+ }
423
+
424
+ .select-db-select {
425
+ width:325px;
426
+ padding:6px;
427
+ }
428
+
429
+ .struct {
430
+ border: 3px solid red;
431
+ padding: 4px 6px;
432
+ display: inline-block;
433
+ margin-top:10px;
434
+ }
435
+
436
+ .cols div:nth-child(even) {background: #FFF}
437
+ .cols div:nth-child(odd) {background: #F5F5F5}
438
+ .cols div {
439
+ height: 28px;
440
+ padding: 5px
441
+ }
442
+
443
+ .cols label {
444
+ display: inline-block;
445
+ width: 175px;
446
+ font-size: 15px;
447
+ overflow: hidden;
448
+ white-space: nowrap;
449
+ text-overflow: ellipsis;
450
+ vertical-align: middle;
451
+ }
452
+
453
+ .cols input[type="text"] {
454
+ width: 295px;
455
+ line-height: 18px;
456
+ height: 28px;
457
+ border: 1px solid #ccc;
458
+ padding: 0 3px;
459
+ margin-right: 2px;
460
+ }
461
+
462
+ .cols input[type="text"]:disabled {
463
+ cursor: not-allowed;
464
+ background-color: #eee;
465
+ }
466
+
467
+ .cols input[type="checkbox"] {
468
+ width: 20px;
469
+ line-height: 18px;
470
+ height: 20px;
471
+ vertical-align: middle;
472
+ }
473
+
474
+ .cols select {
475
+ line-height: 18px;
476
+ height: 28px;
477
+ margin-right: 2px;
478
+ }
479
+
480
+ #fieldlist {
481
+ position: absolute;
482
+ width:225px;
483
+ background: #fff;
484
+ border: solid 1px #c7c7c7;
485
+ top: 0;
486
+ left: 0;
487
+ z-index: 1000;
488
+ }
489
+
490
+ #fieldlist a {
491
+ padding: 5px;
492
+ cursor:pointer;
493
+ overflow: hidden;
494
+ white-space: nowrap;
495
+ text-overflow: ellipsis;
496
+ }
497
+
498
+ #fieldlist a:hover {
499
+ background: #ccc;
500
+ }
501
+
502
+ .gen_query, .gen_query:focus {
503
+ width: 148px;
504
+ height: 38px;
505
+ background: #4EC0D9;
506
+ color: white;
507
+ cursor: pointer;
508
+ border: 0px;
509
+ font-size: 14px;
510
+ font-weight: bold;
511
+ margin: 20px 0;
512
+ border-radius: 0px;
513
+ }
514
+
515
+ .gen_query:active {
516
+ background: #ccc;
517
+ }
518
+
519
+ .fm-query-save {
520
+ float: right;
521
+ font-size: 13px;
522
+ margin: 0 20px;
523
+ background: #4EC0D9;
524
+ width: 83px;
525
+ height: 34px;
526
+ border: 1px solid #4EC0D9;
527
+ border-radius: 0px;
528
+ color: #fff;
529
+ cursor: pointer;
530
+ }
531
+
532
+ .select-db-op {
533
+ display: inline-block;
534
+ text-align: right;
535
+ font-weight: bold;
536
+ font-size: 18px;
537
+ padding: 5px 0;
538
+ margin: 5px 0;
539
+ background:none !important;
540
+ }
541
+
542
+ .select-db-op.where{
543
+ width: 272px;
544
+ }
545
+
546
+ .select-db-op img{
547
+ float:left;
548
+ }
549
+
550
+ .select-db-label {
551
+ display: inline-block;
552
+ font-size: 16px;
553
+ width: 201px;
554
+
555
+ }
556
+ .select-db-select {
557
+ width:325px;
558
+ padding:6px;
559
+ }
560
+
561
+ .fm-query-save {
562
+ float: right;
563
+ font-size: 13px;
564
+ margin: 0 20px;
565
+ background: #4EC0D9;
566
+ width: 83px;
567
+ height: 34px;
568
+ border: 1px solid #4EC0D9;
569
+ border-radius: 0px;
570
+ color: #fff;
571
+ cursor: pointer;
572
+ }
573
+ </style>
574
+ <div class="c1">
575
+ <div class="main_func">
576
+ <table class="admintable">
577
+ <tr valign="top">
578
+ <td class="key">
579
+ <label style="font-size:20px;">Connection type: </label>
580
+ </td>
581
+ <td>
582
+ <input type="radio" name="con_type" id="local" value="local" <?php if($con_type=='local') echo 'checked="checked"'?> disabled>
583
+ <label for="local">Local</label>
584
+ <input type="radio" name="con_type" id="remote" value="remote" <?php if($con_type=='remote') echo 'checked="checked"'?> disabled>
585
+ <label for="remote">Remote</label>
586
+ </td>
587
+ <td rowspan="2">
588
+ <input type="button" value="Connect" onclick="connect()" class="btn connect" disabled>
589
+ </td>
590
+ </tr>
591
+ <tr class="remote_info" <?php if($con_type=='local') echo 'style="display:none"'?>>
592
+ <td class="key">Host</td>
593
+ <td>
594
+ <input type="text" name="host" id="host_rem" style="width:150px" value="<?php echo $host; ?>" disabled>
595
+ Port : <input type="text" name="port" id="port_rem" value="<?php echo $port; ?>" style="width:48px" disabled>
596
+ </td>
597
+ </tr>
598
+ <tr class="remote_info" <?php if($con_type=='local') echo 'style="display:none"'?>>
599
+ <td class="key">Username</td>
600
+ <td>
601
+ <input type="text" name="username" id="username_rem" value="<?php echo $username; ?>" disabled>
602
+ </td>
603
+ </tr>
604
+ <tr class="remote_info" <?php if($con_type=='local') echo 'style="display:none"'?>>
605
+ <td class="key">Password</td>
606
+ <td>
607
+ <input type="password" name="password" id="password_rem" value="<?php echo $password; ?>" disabled>
608
+ </td>
609
+ </tr>
610
+ <tr class="remote_info" <?php if($con_type=='local') echo 'style="display:none"'?>>
611
+ <td class="key">Database</td>
612
+ <td>
613
+ <input type="text"name="database" id="database_rem" value="<?php echo $database; ?>" disabled>
614
+ </td>
615
+ </tr>
616
+ <tr valign="top">
617
+ <td class="key">
618
+ <label style="font-size:20px;">Type: </label>
619
+ </td>
620
+ <td>
621
+ <input type="radio" name="con_method" id="insert" value="insert" <?php if($con_method=='insert') echo 'checked="checked"'?> disabled>
622
+ <label for="insert">Insert</label>
623
+ <input type="radio" name="con_method" id="update" value="update" <?php if($con_method=='update') echo 'checked="checked"'?> disabled>
624
+ <label for="update">Update</label>
625
+ <input type="radio" name="con_method" id="delete" value="delete" <?php if($con_method=='delete') echo 'checked="checked"'?> disabled>
626
+ <label for="delete">Delete</label>
627
+ </td>
628
+ </tr>
629
+ </table>
630
+ <div id="struct">
631
+ <label for="tables" class="select-db-label">Select a table</label>
632
+ <select name="tables" id="tables" class="select-db-select" disabled>
633
+ <option value="" ></option>
634
+ <?php
635
+ foreach($tables as $table) {
636
+ echo '<option value="'.$table.'" '.($table_cur==$table ? 'selected' : '').' >'.$table.'</option>';
637
+ }
638
+ ?>
639
+ </select>
640
+ <br/>
641
+ <div id="table_struct">
642
+ <?php
643
+ if($table_struct) {
644
+ ?>
645
+ <div class="struct">
646
+ <div class="cols">
647
+ <?php
648
+ $temps=explode('***wdffieldwdf***',$details);
649
+ $wheres = $temps[count($temps)-1];
650
+ $temps = array_slice($temps,0, count($temps)-1);
651
+ $col_names= array();
652
+ $col_vals= array();
653
+ $col_checks= array();
654
+
655
+ foreach($temps as $temp) {
656
+ $temp=explode('***wdfnamewdf***',$temp);
657
+ array_push($col_names, $temp[0]);
658
+ $temp=explode('***wdfvaluewdf***',$temp[1]);
659
+ array_push($col_vals, $temp[0]);
660
+ array_push($col_checks, $temp[1]);
661
+ }
662
+ if($con_method=='insert' or $con_method=='update') {
663
+ echo '<div style="background: none;text-align: center;font-size: 20px;color: #000;font-weight: bold;"> SET </div>';
664
+
665
+ foreach($table_struct as $key =>$col) {
666
+ $title=' '.$col->Field;
667
+ $title.="<ul style='padding-left: 17px;'>";
668
+ $title.="<li>Type - ".$col->Type."</li>";
669
+ $title.="<li>Null - ".$col->Null."</li>";
670
+ $title.="<li>Key - ".$col->Key."</li>";
671
+ $title.="<li>Default - ".$col->Default."</li>";
672
+ $title.="<li>Extra - ".$col->Extra."</li>";
673
+ $title.="</ul>";
674
+ ?>
675
+ <div><label title="<?php echo $title; ?>" class="hasTip"><b><?php echo $col->Field; ?></b><img src="<?php echo WD_FM_URL . '/images/info.png?ver='. get_option("wd_form_maker_version").''; ?>" style="width:20px; vertical-align:middle;padding-left: 10px;" /></label><input type="text" id="<?php echo str_replace("'", "SingleQuot", $col->Field); ?>" <?php if(!$col_checks[$key]) echo 'disabled="disabled"'?> value="<?php echo $col_vals[$key]; ?>" /><input id="ch_<?php echo str_replace("'", "SingleQuot", $col->Field); ?>" type="checkbox" onClick="dis('<?php echo str_replace("'", "SingleQuot", $col->Field); ?>', this.checked)" <?php if($col_checks[$key]) echo 'checked="checked"'?> /></div>
676
+ <?php
677
+ }
678
+ }
679
+
680
+ if($con_method=='delete' or $con_method=='update') {
681
+ echo '<div class="select-db-op where"><img src="'.WD_FM_URL . '/images/add_condition.png?ver='. get_option("wd_form_maker_version").'" title="ADD" class="add_cond"/>WHERE</div>';
682
+ if($wheres) {
683
+ echo '<script>';
684
+
685
+ $wheres = explode('***where***',$wheres);
686
+ $wheres = array_slice($wheres,0, count($wheres)-1);
687
+ foreach($wheres as $where) {
688
+ $temp=explode('***sel***',$where);
689
+ $sel = $temp[0];
690
+ $temp=explode('***op***',$temp[1]);
691
+ $op = $temp[0];
692
+ $temp=explode('***val***',$temp[1]);
693
+ $val = $temp[0];
694
+ $andor = $temp[1];
695
+ echo 'jQuery(".cols").append(conds.replace(/condid/g, cond_id++).replace(\'SingleQuot\', "\'")); update_vis();
696
+ jQuery("#sel_"+(cond_id-1)).val("'.html_entity_decode($sel, ENT_QUOTES).'");
697
+ jQuery("#op_"+(cond_id-1)).val("'.$op.'");
698
+ jQuery("#val_"+(cond_id-1)).val("'.$val.'");
699
+ jQuery("#andor_"+(cond_id-1)).val("'.$andor.'");';
700
+ }
701
+ echo '</script>';
702
+ }
703
+ }
704
+ ?>
705
+ </div>
706
+ <div style="color:red; background: none">The changes above will not affect the query until you click "Generate query".</div>
707
+ </div>
708
+ <br/>
709
+ <input type="button" value="Generate Query" class="gen_query" onclick="gen_query()">
710
+ <br/>
711
+ <form name="query_form" id="query_form" >
712
+ <label style="vertical-align: top; width: 102px; display: inline-block;" for="query_txt" > Query: </label><textarea id="query_txt" name="query" rows=5 style="width:428px" ><?php echo $query_obj->query; ?></textarea>
713
+ <input type="hidden" name="details" id="details">
714
+ <input type="hidden" name="id" value="<?php echo $query_obj->id; ?>">
715
+ </form>
716
+ <input type="button" value="Save" class="fm-query-save" onclick="save_query()">
717
+ <div id="fieldlist" style="display: none;">
718
+ <?php echo $form_fields; ?>
719
+ </div>
720
+ <?php
721
+ }
722
+ ?>
723
+ </div>
724
+ </div>
725
+ <input type="hidden" value="<?php echo $form_id ?>" id="form_id">
726
+ </div>
727
+ <div class="desc">
728
+ <?php
729
+ foreach($label_id as $key => $lid) {
730
+ echo '<div>{'.$lid.'} - <button onclick="insert_field('.$lid.');">'.$label_order_original[$key].'</button></div>';
731
+ }
732
+ $user_fields = array("subid"=>"Submission ID", "ip"=>"Submitter's IP", "userid"=>"User ID", "username"=>"Username", "useremail"=>"User Email");
733
+ foreach($user_fields as $user_key=>$user_field) {
734
+ echo '<div>{'.$user_key.'} - <button onclick="insert_field(\''.$user_key.'\');">'.$user_field.'</button></div>';
735
+ }
736
+ ?>
737
+ </div>
738
+ </div>
739
+ <?php
740
+ die();
741
+ }
742
+
743
+ public function add_query($form_id){
744
+ wp_print_scripts('jquery');
745
+ wp_print_scripts('jquery-ui-tooltip');
746
+ ?>
747
+ <link media="all" type="text/css" href="<?php echo WD_FM_URL . '/css/style.css'; ?>" rel="stylesheet">
748
+ <link rel="stylesheet" href="<?php echo WD_FM_URL . '/css/jquery-ui-1.10.3.custom.css'; ?>">
749
+ <?php
750
+ $label = $this->model->get_labels($form_id);
751
+
752
+ $filter_types=array("type_submit_reset", "type_map", "type_editor", "type_captcha", "type_recaptcha", "type_button", "type_paypal_total", "type_send_copy");
753
+ $label_id= array();
754
+ $label_order= array();
755
+ $label_order_original= array();
756
+ $label_type= array();
757
+
758
+ $label_all = explode('#****#',$label);
759
+ $label_all = array_slice($label_all,0, count($label_all)-1);
760
+ foreach($label_all as $key => $label_each) {
761
+ $label_id_each=explode('#**id**#',$label_each);
762
+ $label_oder_each=explode('#**label**#', $label_id_each[1]);
763
+
764
+ if(in_array($label_oder_each[1],$filter_types))
765
+ continue;
766
+ array_push($label_id, $label_id_each[0]);
767
+ array_push($label_order_original, $label_oder_each[0]);
768
+ $ptn = "/[^a-zA-Z0-9_]/";
769
+ $rpltxt = "";
770
+ $label_temp=preg_replace($ptn, $rpltxt, $label_oder_each[0]);
771
+ array_push($label_order, $label_temp);
772
+ array_push($label_type, $label_oder_each[1]);
773
+ }
774
+ ?>
775
+ <script>
776
+ function insert_field(){}
777
+
778
+ function connect() {
779
+ jQuery("input[type='radio']").attr('disabled','');
780
+ jQuery(".connect").attr('disabled','');
781
+ jQuery('#struct').html('<div class="fm-loading-container"><div class="fm-loading-content"></div></div>');
782
+ jQuery.ajax({
783
+ type: "POST",
784
+ url: "<?php echo add_query_arg(array('action' => 'FormMakerSQLMapping', 'id' => 0, 'form_id' => $form_id, 'task' => 'db_tables', 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>",
785
+ data: 'con_type='+jQuery('input[name=con_type]:checked').val()+'&con_method='+jQuery('input[name=con_method]:checked').val()+'&host='+jQuery('#host_rem').val()+'&port='+jQuery('#port_rem').val()+'&username='+jQuery('#username_rem').val()+'&password='+jQuery('#password_rem').val()+'&database='+jQuery('#database_rem').val()+'&format=row',
786
+ success: function(data) {
787
+ jQuery("#struct").removeClass("fm_loading");
788
+ if(data==1) {
789
+ jQuery("#struct").html('<div style="font-size: 22px; text-align: center; padding-top: 15px;">Could not connect to MySQL.</div>')
790
+ jQuery(".connect").removeAttr('disabled');
791
+ jQuery("input[type='radio']").removeAttr('disabled','');
792
+ }
793
+ else {
794
+ jQuery("#struct").html(data);
795
+ }
796
+
797
+ }
798
+ });
799
+ }
800
+
801
+ function shh(x) {
802
+ if(x)
803
+ jQuery(".remote_info").show();
804
+ else
805
+ jQuery(".remote_info").hide();
806
+ }
807
+ </script>
808
+ <style>
809
+ .c1 {
810
+ padding: 0 10px;
811
+ }
812
+
813
+ .main_func{
814
+ font-family: Segoe UI;
815
+ display: inline-block;
816
+ width: 550px;
817
+ }
818
+
819
+ .main_func .admintable {
820
+ width: 100%;
821
+ padding: 10px 0;
822
+ margin-bottom: 15px;
823
+ }
824
+
825
+ .main_func .admintable .key{
826
+ width: 36%;
827
+ }
828
+
829
+ .main_func .admintable input[type='text'],
830
+ .main_func .admintable input[type='password']{
831
+ padding: 4px 6px;
832
+ width:244px;
833
+ }
834
+
835
+ .btn.connect {
836
+ background:#4EC0D9;
837
+ width:78px;
838
+ height:32px;
839
+ border:1px solid #4EC0D9;
840
+ border-radius:0px;
841
+ color:#fff;
842
+ cursor:pointer;
843
+ }
844
+
845
+ .desc {
846
+ font-size: 13px;
847
+ display: inline-block;
848
+ width: 265px;
849
+ position: fixed;
850
+ margin: 15px;
851
+ margin-left: 45px;
852
+ }
853
+
854
+ .desc > div {
855
+ margin-top:3px;
856
+ }
857
+
858
+ .desc div span {
859
+ width: 62px;
860
+ display: inline-block;
861
+ }
862
+
863
+ .desc button {
864
+ max-width: 190px;
865
+ overflow: hidden;
866
+ white-space: nowrap;
867
+ text-overflow: ellipsis;
868
+ padding: 4px;
869
+ background: #eee;
870
+ border: 1px solid #ccc;
871
+ border-radius:0px;
872
+ height:27px;
873
+ }
874
+
875
+ .key label {
876
+ display:inline-block;
877
+ width:150px;
878
+ }
879
+
880
+ .select-db-label {
881
+ display: inline-block;
882
+ font-size: 16px;
883
+ width: 201px;
884
+
885
+ }
886
+
887
+ .select-db-select {
888
+ width:325px;
889
+ padding:6px;
890
+ }
891
+ </style>
892
+ <div class="c1">
893
+ <div class="main_func">
894
+ <table class="admintable">
895
+ <tr valign="top">
896
+ <td class="key">
897
+ <label style="font-size:20px;">Connection type: </label>
898
+ </td>
899
+ <td>
900
+ <input type="radio" name="con_type" id="local" value="local" checked="checked" onclick="shh(false)">
901
+ <label for="local">Local</label>
902
+ <input type="radio" name="con_type" id="remote" value="remote" onclick="shh(true)">
903
+ <label for="remote">Remote</label>
904
+ </td>
905
+ <td rowspan="2">
906
+ <input type="button" value="Connect" onclick="connect()" class="btn connect">
907
+ </td>
908
+ </tr>
909
+ <tr class="remote_info" style="display:none">
910
+ <td class="key">Host</td>
911
+ <td>
912
+ <input type="text" name="host" id="host_rem" style="width:150px">
913
+ Port : <input type="text" name="port" id="port_rem" value="3306" style="width:48px">
914
+ </td>
915
+ </tr>
916
+ <tr class="remote_info" style="display:none">
917
+ <td class="key">Username</td>
918
+ <td>
919
+ <input type="text" name="username" id="username_rem">
920
+ </td>
921
+ </tr>
922
+ <tr class="remote_info" style="display:none">
923
+ <td class="key">Password</td>
924
+ <td>
925
+ <input type="password" name="password" id="password_rem">
926
+ </td>
927
+ </tr>
928
+ <tr class="remote_info" style="display:none">
929
+ <td class="key">Database</td>
930
+ <td>
931
+ <input type="text"name="database" id="database_rem">
932
+ </td>
933
+ </tr>
934
+ <tr valign="top">
935
+ <td class="key">
936
+ <label style="font-size:20px;">Type: </label>
937
+ </td>
938
+ <td >
939
+ <input type="radio" name="con_method" id="insert" value="insert" checked="checked">
940
+ <label for="insert">Insert</label>
941
+ <input type="radio" name="con_method" id="update" value="update">
942
+ <label for="update">Update</label>
943
+ <input type="radio" name="con_method" id="delete" value="delete">
944
+ <label for="delete">Delete</label>
945
+ </td>
946
+ </tr>
947
+ </table>
948
+ <div id="struct">
949
+ </div>
950
+ <input type="hidden" value="<?php echo $form_id ?>" id="form_id">
951
+ </div>
952
+ <div class="desc">
953
+ <?php
954
+ foreach($label_id as $key => $lid) {
955
+ echo '<div><span>{'.$lid.'}</span> - <button onclick="insert_field('.$lid.');">'.$label_order_original[$key].'</button></div>';
956
+ }
957
+
958
+ $user_fields = array("subid"=>"Submission ID", "ip"=>"Submitter's IP", "userid"=>"User ID", "username"=>"Username", "useremail"=>"User Email");
959
+ foreach($user_fields as $user_key=>$user_field) {
960
+ echo '<div><span>{'.$user_key.'}</span> - <button onclick="insert_field(\''.$user_key.'\');">'.$user_field.'</button></div>';
961
+ }
962
+ ?>
963
+ </div>
964
+ </div>
965
+ <?php
966
+ die();
967
+ }
968
+
969
+ public function db_tables($form_id){
970
+ $tables = $this->model->get_tables();
971
+ ?>
972
+ <label for="tables" class="select-db-label">Select a table</label>
973
+ <select name="tables" id="tables" class="select-db-select">
974
+ <option value="" ></option>
975
+ <?php
976
+ foreach($tables as $table) {
977
+ echo '<option value="' . $table . '" >' . $table . '</option>';
978
+ }
979
+ ?>
980
+ </select>
981
+ <br/>
982
+ <div id="table_struct">
983
+ </div>
984
+ <script>
985
+ jQuery("#tables").change(function (){
986
+ jQuery('#table_struct').html('<div class="fm-loading-container"><div class="fm-loading-content"></div></div>');
987
+ jQuery.ajax({
988
+ type: "POST",
989
+ url: "<?php echo add_query_arg(array('action' => 'FormMakerSQLMapping', 'id' => 0, 'form_id' => $form_id, 'task' => 'db_table_struct', 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>",
990
+ data: 'name='+jQuery(this).val()+'&con_type='+jQuery('input[name=con_type]:checked').val()+'&con_method='+jQuery('input[name=con_method]:checked').val()+'&host='+jQuery('#host_rem').val()+'&port='+jQuery('#port_rem').val()+'&username='+jQuery('#username_rem').val()+'&password='+jQuery('#password_rem').val()+'&database='+jQuery('#database_rem').val()+'&format=row',
991
+ success: function(data) {
992
+ jQuery("#table_struct").removeClass("fm_loading");
993
+ jQuery("#table_struct").html(data);
994
+ }
995
+ });
996
+ })
997
+ </script>
998
+ <?php
999
+ die();
1000
+ }
1001
+
1002
+ public function db_table_struct ($form_id) {
1003
+ $table_struct = $this->model->get_table_struct();
1004
+ $label = $this->model->get_labels($form_id);
1005
+ $con_method = isset($_POST['con_method']) ? $_POST['con_method'] : '';
1006
+ $filter_types=array("type_submit_reset", "type_map", "type_editor", "type_captcha", "type_recaptcha", "type_button", "type_paypal_total", "type_send_copy");
1007
+ $label_id= array();
1008
+ $label_order= array();
1009
+ $label_order_original= array();
1010
+ $label_type= array();
1011
+
1012
+ ///stexic
1013
+ $label_all = explode('#****#',$label);
1014
+ $label_all = array_slice($label_all,0, count($label_all)-1);
1015
+
1016
+ foreach($label_all as $key => $label_each) {
1017
+ $label_id_each=explode('#**id**#',$label_each);
1018
+ $label_oder_each=explode('#**label**#', $label_id_each[1]);
1019
+
1020
+ if(in_array($label_oder_each[1],$filter_types)) {
1021
+ continue;
1022
+ }
1023
+ array_push($label_id, $label_id_each[0]);
1024
+ array_push($label_order_original, $label_oder_each[0]);
1025
+ $ptn = "/[^a-zA-Z0-9_]/";
1026
+ $rpltxt = "";
1027
+ $label_temp=preg_replace($ptn, $rpltxt, $label_oder_each[0]);
1028
+ array_push($label_order, $label_temp);
1029
+ array_push($label_type, $label_oder_each[1]);
1030
+ }
1031
+ $form_fields='';
1032
+ foreach($label_id as $key => $id) {
1033
+ $form_fields.='<a onclick="insert_field('.$id.'); jQuery(\'#fieldlist\').hide();" style="display:block; text-decoration:none;">'.$label_order_original[$key].'</a>';
1034
+ }
1035
+ $user_fields = array("subid"=>"Submission ID", "ip"=>"Submitter's IP", "userid"=>"User ID", "username"=>"Username", "useremail"=>"User Email");
1036
+ foreach($user_fields as $user_key=>$user_field) {
1037
+ $form_fields.='<a onclick="insert_field(\''.$user_key.'\'); jQuery(\'#fieldlist\').hide();" style="display:block; text-decoration:none;">'.$user_field.'</a>';
1038
+ }
1039
+ $cond='<div id="condid"><select id="sel_condid" style="width: 160px">';
1040
+ foreach($table_struct as $col) {
1041
+ $cond.='<option>'.str_replace("'", "SingleQuot", $col->Field).'</option>';
1042
+ }
1043
+ $cond.='</select>';
1044
+
1045
+ $cond.='<select id="op_condid"><option value="=" selected="selected">=</option><option value="!=">!=</option><option value=">">&gt;</option><option value="<">&lt;</option><option value=">=">&gt;=</option><option value="<=">&lt;=</option><option value="%..%">Like</option><option value="%..">Starts with</option><option value="..%">Ends with</option></select><input id="val_condid" style="width:170px" type="text" /><select id="andor_condid" style="visibility: hidden;"><option value="AND">AND</option><option value="OR">OR</option></select><img src="' . WD_FM_URL . '/images/delete.png?ver='. get_option("wd_form_maker_version").'" onclick="delete_cond(&quot;condid&quot;)" style="vertical-align: middle;"></div>';
1046
+ ?>
1047
+ <script>
1048
+ var selected_field ='';
1049
+ var isvisible = 1;
1050
+ var cond_id = 1;
1051
+
1052
+ conds='<?php echo $cond ?>';
1053
+ fields=new Array(<?php
1054
+ $fields = "";
1055
+ if($table_struct) {
1056
+ foreach($table_struct as $col) {
1057
+ $fields.=' "'.$col->Field.'",';
1058
+ }
1059
+ echo substr($fields, 0, -1);
1060
+ }
1061
+ ?>);
1062
+ function dis(id, x) {
1063
+ if(x)
1064
+ jQuery('#'+id).removeAttr('disabled');
1065
+ else
1066
+ jQuery('#'+id).attr('disabled','disabled');
1067
+ }
1068
+
1069
+ function update_vis() {
1070
+ previous=0;
1071
+ for(i=1; i<cond_id; i++) {
1072
+ if(jQuery('#'+i).html()) {
1073
+ jQuery('#andor_'+i).css('visibility', 'hidden');
1074
+ if(previous) {
1075
+ jQuery('#andor_'+previous).css('visibility', 'visible');
1076
+ }
1077
+ previous=i;
1078
+ }
1079
+ }
1080
+ }
1081
+
1082
+ function delete_cond(id) {
1083
+ jQuery('#'+id).remove();
1084
+ update_vis();
1085
+ }
1086
+
1087
+ jQuery('.add_cond').click( function() {
1088
+ jQuery('.cols').append(conds.replace(/condid/g, cond_id++).replace('SingleQuot', "'"));
1089
+ update_vis();
1090
+ });
1091
+
1092
+ jQuery('html').click(function() {
1093
+ if(jQuery("#fieldlist").css('display')=="block") {
1094
+ jQuery("#fieldlist").hide();
1095
+ }
1096
+ });
1097
+
1098
+ jQuery('.cols input[type="text"]').on('click', function(event) {
1099
+ event.stopPropagation();
1100
+ jQuery("#fieldlist").css("top",jQuery(this).offset().top+jQuery(this).height()+2);
1101
+ jQuery("#fieldlist").css("left",jQuery(this).offset().left);
1102
+ jQuery("#fieldlist").slideDown('fast');
1103
+ selected_field=this.id;
1104
+ });
1105
+
1106
+ jQuery('#query_txt').click(function(event) {
1107
+ event.stopPropagation();
1108
+ jQuery("#fieldlist").css("top",jQuery(this).offset().top+jQuery(this).height()+2);
1109
+ jQuery("#fieldlist").css("left",jQuery(this).offset().left);
1110
+ jQuery("#fieldlist").slideDown('fast');
1111
+ selected_field=this.id;
1112
+ });
1113
+
1114
+ jQuery('#fieldlist').click(function(event){
1115
+ event.stopPropagation();
1116
+ });
1117
+
1118
+ function save_query() {
1119
+ con_type =jQuery('input[name=con_type]:checked').val();
1120
+ con_method =jQuery('input[name=con_method]:checked').val();
1121
+ table =jQuery('#tables').val();
1122
+ table =jQuery('#tables').val();
1123
+ host =jQuery('#host_rem').val();
1124
+ port =jQuery('#port_rem').val();
1125
+ username =jQuery('#username_rem').val();
1126
+ password =jQuery('#password_rem').val();
1127
+ database =jQuery('#database_rem').val();
1128
+
1129
+ str=con_type+"***wdfcon_typewdf***"+con_method+"***wdfcon_methodwdf***"+table+"***wdftablewdf***"+host+"***wdfhostwdf***"+port+"***wdfportwdf***"+username+"***wdfusernamewdf***"+password+"***wdfpasswordwdf***"+database+"***wdfdatabasewdf***";
1130
+
1131
+ if(fields.length) {
1132
+ for(i=0; i<fields.length; i++) {
1133
+ str+=fields[i]+'***wdfnamewdf***'+jQuery('#'+fields[i]).val()+'***wdfvaluewdf***'+jQuery('#ch_'+fields[i]+":checked" ).length+'***wdffieldwdf***';
1134
+ }
1135
+ }
1136
+
1137
+ for(i=1; i<cond_id; i++) {
1138
+ if(jQuery('#'+i).html()) {
1139
+ str+=jQuery('#sel_'+i).val()+'***sel***'+jQuery('#op_'+i).val()+'***op***'+jQuery('#val_'+i).val()+'***val***'+jQuery('#andor_'+i).val()+'***where***';
1140
+ }
1141
+ }
1142
+
1143
+ if(!jQuery('#query_txt').val()) {
1144
+ gen_query();
1145
+ }
1146
+
1147
+ jQuery('#details').val(str);
1148
+
1149
+ var datatxt = jQuery("#query_form").serialize()+'&form_id='+jQuery("#form_id").val();
1150
+ if(jQuery('#query_txt').val()) {
1151
+ jQuery('.c1').html('<div class="fm-loading-container"><div class="fm-loading-content"></div></div>');
1152
+ jQuery.ajax({
1153
+ type: "POST",
1154
+ url: "<?php echo add_query_arg(array('action' => 'FormMakerSQLMapping', 'id' => 0, 'form_id' => $form_id, 'task' => 'save_query', 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>",
1155
+ data: datatxt,
1156
+ success: function(data) {
1157
+ window.parent.wd_fm_apply_options('apply_options');
1158
+ window.parent.tb_remove();
1159
+ }
1160
+ });
1161
+ }
1162
+ else {
1163
+ alert('The query is empty.');
1164
+ }
1165
+ return false;
1166
+ }
1167
+
1168
+ function gen_query() {
1169
+ if(jQuery('#query_txt').val()) {
1170
+ if(!confirm('Are you sure you want to replace the Query? All the modifications to the Query will be lost.')) {
1171
+ return;
1172
+ }
1173
+ }
1174
+ query="";
1175
+ fields=new Array(<?php
1176
+ $fields = "";
1177
+ if($table_struct) {
1178
+ foreach($table_struct as $col) {
1179
+ $fields.=' "'.str_replace("'", "SingleQuot", $col->Field).'",';
1180
+ }
1181
+ echo substr($fields, 0, -1);
1182
+ }
1183
+ ?>);
1184
+
1185
+ con_type =jQuery('input[name=con_type]:checked').val();
1186
+ con_method =jQuery('input[name=con_method]:checked').val();
1187
+ table =jQuery('#tables').val();
1188
+ fls='';
1189
+ vals='';
1190
+ valsA=new Array();
1191
+ flsA=new Array();
1192
+
1193
+ if(fields.length) {
1194
+ for(i=0; i<fields.length; i++) {
1195
+ if(jQuery('#ch_'+fields[i]+":checked" ).length) {
1196
+ flsA.push(fields[i]);
1197
+ valsA.push(jQuery('#'+fields[i]).val());
1198
+ }
1199
+ }
1200
+ }
1201
+
1202
+ if(con_method=="insert") {
1203
+ if(flsA.length) {
1204
+ for(i=0; i<flsA.length-1; i++) {
1205
+ fls+= '`'+flsA[i]+'`, ';
1206
+ vals+= '"'+valsA[i]+'", ';
1207
+ }
1208
+ fls+= '`'+flsA[i]+'`';
1209
+ vals+= '"'+valsA[i]+'"';
1210
+ }
1211
+ if(fls) {
1212
+ query="INSERT INTO "+jQuery('#tables').val()+" (" +fls+") VALUES ("+vals+")";
1213
+ }
1214
+ }
1215
+
1216
+ if(con_method=="update") {
1217
+ if(flsA.length) {
1218
+ for(i=0; i<flsA.length-1; i++) {
1219
+ vals+= '`'+flsA[i]+'`="'+valsA[i]+'", ';
1220
+ }
1221
+ vals+= '`'+flsA[i]+'`="'+valsA[i]+'"';
1222
+ }
1223
+ where="";
1224
+ previous='';
1225
+ for(i=1; i<cond_id; i++) {
1226
+ if(jQuery('#'+i).html()) {
1227
+ if(jQuery('#op_'+i).val()=="%..%")
1228
+ op_val=' LIKE "%'+jQuery('#val_'+i).val()+'%"';
1229
+ else if(jQuery('#op_'+i).val()=="%..")
1230
+ op_val=' LIKE "%'+jQuery('#val_'+i).val()+'"';
1231
+ else if(jQuery('#op_'+i).val()=="..%")
1232
+ op_val=' LIKE "'+jQuery('#val_'+i).val()+'%"';
1233
+ else
1234
+ op_val=' '+jQuery('#op_'+i).val()+' "'+jQuery('#val_'+i).val()+'"';
1235
+ where+=previous+' `'+jQuery('#sel_'+i).val()+'`'+op_val;
1236
+ previous=' '+ jQuery('#andor_'+i).val();
1237
+ }
1238
+ }
1239
+ if(vals) {
1240
+ query="UPDATE "+jQuery('#tables').val()+" SET " + vals+(where? ' WHERE'+where: '') ;
1241
+ }
1242
+ }
1243
+
1244
+ if(con_method=="delete") {
1245
+ where="";
1246
+ previous='';
1247
+ for(i=1; i<cond_id; i++) {
1248
+ if(jQuery('#'+i).html()) {
1249
+ if(jQuery('#op_'+i).val()=="%..%")
1250
+ op_val=' LIKE "%'+jQuery('#val_'+i).val()+'%"';
1251
+ else if(jQuery('#op_'+i).val()=="%..")
1252
+ op_val=' LIKE "%'+jQuery('#val_'+i).val()+'"';
1253
+ else if(jQuery('#op_'+i).val()=="..%")
1254
+ op_val=' LIKE "'+jQuery('#val_'+i).val()+'%"';
1255
+ else
1256
+ op_val=' '+jQuery('#op_'+i).val()+' "'+jQuery('#val_'+i).val()+'"';
1257
+ where+=previous+' '+jQuery('#sel_'+i).val()+op_val;
1258
+ previous=' '+ jQuery('#andor_'+i).val();
1259
+ }
1260
+ }
1261
+ if(where) {
1262
+ query="DELETE FROM "+jQuery('#tables').val()+ ' WHERE'+where ;
1263
+ }
1264
+ }
1265
+ jQuery('#query_txt').val(query.replace("SingleQuot", "'"));
1266
+ }
1267
+
1268
+ jQuery(document).ready(function () {
1269
+ jQuery(".hasTip").tooltip({
1270
+ track: true,
1271
+ content: function () {
1272
+ return jQuery(this).prop('title');
1273
+ }
1274
+ });
1275
+ });
1276
+
1277
+ function insert_field(myValue) {
1278
+ if(!selected_field)
1279
+ return;
1280
+ myField=document.getElementById(selected_field);
1281
+ if (document.selection) {
1282
+ myField.focus();
1283
+ sel = document.selection.createRange();
1284
+ sel.text = myValue;
1285
+ }
1286
+ else {
1287
+ if (myField.selectionStart || myField.selectionStart == '0') {
1288
+ var startPos = myField.selectionStart;
1289
+ var endPos = myField.selectionEnd;
1290
+ myField.value = myField.value.substring(0, startPos)
1291
+ + "{"+myValue+"}"
1292
+ + myField.value.substring(endPos, myField.value.length);
1293
+ }
1294
+ else {
1295
+ myField.value += "{"+myValue+"}";
1296
+ }
1297
+ }
1298
+ }
1299
+ </script>
1300
+ <style>
1301
+ .cols div:nth-child(even) {background: #FFF;}
1302
+ .cols div:nth-child(odd) {background: #F5F5F5;}
1303
+ .cols div {
1304
+ height: 28px;
1305
+ padding: 5px;
1306
+ }
1307
+
1308
+ .cols {
1309
+ display: inline-block;
1310
+ }
1311
+
1312
+ .cols label {
1313
+ display: inline-block;
1314
+ width: 200px;
1315
+ font-size: 15px;
1316
+ overflow: hidden;
1317
+ white-space: nowrap;
1318
+ text-overflow: ellipsis;
1319
+ vertical-align: middle;
1320
+ }
1321
+
1322
+ .cols input[type="text"] {
1323
+ width: 295px;
1324
+ line-height: 18px;
1325
+ height: 28px;
1326
+ border: 1px solid #ccc;
1327
+ padding: 0 3px;
1328
+ margin-right: 2px;
1329
+ }
1330
+
1331
+ .cols input[type="text"]:disabled {
1332
+ cursor: not-allowed;
1333
+ background-color: #eee;
1334
+ }
1335
+
1336
+ .cols input[type="checkbox"] {
1337
+ width: 20px;
1338
+ line-height: 18px;
1339
+ height: 20px;
1340
+ vertical-align: middle;
1341
+ }
1342
+
1343
+ .cols select {
1344
+ line-height: 18px;
1345
+ height: 28px;
1346
+ margin-right: 2px;
1347
+ }
1348
+
1349
+ #fieldlist {
1350
+ position: absolute;
1351
+ width:225px;
1352
+ background: #fff;
1353
+ border: solid 1px #c7c7c7;
1354
+ top: 0;
1355
+ left: 0;
1356
+ z-index: 1000;
1357
+ }
1358
+
1359
+ #fieldlist a {
1360
+ padding: 5px;
1361
+ cursor:pointer;
1362
+ overflow: hidden;
1363
+ white-space: nowrap;
1364
+ text-overflow: ellipsis;
1365
+ }
1366
+
1367
+ #fieldlist a:hover {
1368
+ background: #ccc;
1369
+ }
1370
+ .gen_query, .gen_query:focus {
1371
+ width: 148px;
1372
+ height: 38px;
1373
+ background: #4EC0D9;
1374
+ color: white;
1375
+ cursor: pointer;
1376
+ border: 0px;
1377
+ font-size: 14px;
1378
+ font-weight: bold;
1379
+ margin: 20px 0;
1380
+ border-radius: 0px;
1381
+ }
1382
+ .gen_query:active {
1383
+ background: #ccc;
1384
+ }
1385
+
1386
+ .fm-query-save {
1387
+ float: right;
1388
+ font-size: 13px;
1389
+ margin: 0 20px;
1390
+ background: #4EC0D9;
1391
+ width: 83px;
1392
+ height: 34px;
1393
+ border: 1px solid #4EC0D9;
1394
+ border-radius: 0px;
1395
+ color: #fff;
1396
+ cursor: pointer;
1397
+ }
1398
+
1399
+ .select-db-op {
1400
+ display: inline-block;
1401
+ text-align: right;
1402
+ font-weight: bold;
1403
+ font-size: 18px;
1404
+ padding: 5px 0;
1405
+ margin: 5px 0;
1406
+ background:none !important;
1407
+ }
1408
+
1409
+ .select-db-op.where{
1410
+ width: 272px;
1411
+ }
1412
+
1413
+ .select-db-op img{
1414
+ float:left;
1415
+ }
1416
+ </style>
1417
+ <?php
1418
+ if($table_struct) { ?>
1419
+ <div class="cols">
1420
+ <?php
1421
+ if($con_method=='insert' or $con_method=='update') {
1422
+ echo '<div style="background: none;text-align: center;font-size: 20px;color: #000;font-weight: bold;"> SET </div>';
1423
+ foreach($table_struct as $col) {
1424
+ $title=' '.$col->Field;
1425
+ $title.="<ul style='padding-left: 17px;'>";
1426
+ $title.="<li>Type - ".$col->Type."</li>";
1427
+ $title.="<li>Null - ".$col->Null."</li>";
1428
+ $title.="<li>Key - ".$col->Key."</li>";
1429
+ $title.="<li>Default - ".$col->Default."</li>";
1430
+ $title.="<li>Extra - ".$col->Extra."</li>";
1431
+ $title.="</ul>";
1432
+ ?>
1433
+ <div><label title="<?php echo $title; ?>" class="hasTip"><b><?php echo $col->Field; ?></b><img src="<?php echo WD_FM_URL . '/images/info.png?ver='. get_option("wd_form_maker_version").''; ?>" style="width:20px; vertical-align:middle;padding-left: 10px;" /></label><input type="text" id="<?php echo str_replace("'", "SingleQuot", $col->Field); ?>" disabled="disabled"/><input id="ch_<?php echo str_replace("'", "SingleQuot", $col->Field); ?>" type="checkbox" onClick="dis('<?php echo str_replace("'", "SingleQuot", $col->Field); ?>', this.checked)"/></div>
1434
+ <?php
1435
+ }
1436
+ }
1437
+ if($con_method=='delete' or $con_method=='update') {
1438
+ echo '<div class="select-db-op where"><img src="'.WD_FM_URL . '/images/add_condition.png?ver='. get_option("wd_form_maker_version").'" title="ADD" class="add_cond"/>WHERE</div>';
1439
+ }
1440
+ ?>
1441
+ </div>
1442
+ <br/>
1443
+ <input type="button" value="Generate Query" class="gen_query" onclick="gen_query()">
1444
+ <br/>
1445
+ <form name="query_form" id="query_form" >
1446
+ <label style="vertical-align: top; width: 102px; display: inline-block;" for="query_txt" > Query: </label><textarea id="query_txt" name="query" rows=5 style="width:428px"></textarea>
1447
+ <input type="hidden" name="details" id="details">
1448
+ </form>
1449
+ <input type="button" value="Save" class="fm-query-save" onclick="save_query()">
1450
+ <div id="fieldlist" style="display: none;">
1451
+ <?php echo $form_fields ?>
1452
+ </div>
1453
+ <?php
1454
+ }
1455
+ die();
1456
+ }
1457
+
1458
+ ////////////////////////////////////////////////////////////////////////////////////////
1459
+ // Getters & Setters //
1460
+ ////////////////////////////////////////////////////////////////////////////////////////
1461
+ ////////////////////////////////////////////////////////////////////////////////////////
1462
+ // Private Methods //
1463
+ ////////////////////////////////////////////////////////////////////////////////////////
1464
+ ////////////////////////////////////////////////////////////////////////////////////////
1465
+ // Listeners //
1466
+ ////////////////////////////////////////////////////////////////////////////////////////
1467
  }
admin/views/FMViewFormMakerSubmits.php CHANGED
@@ -1,119 +1,119 @@
1
- <?php
2
-
3
- class FMViewFormMakerSubmits {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $model;
14
-
15
-
16
- ////////////////////////////////////////////////////////////////////////////////////////
17
- // Constructor & Destructor //
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- public function __construct($model) {
20
- $this->model = $model;
21
- }
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Public Methods //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
- public function display() {
26
- if (isset($_GET['form_id']) && isset($_GET['group_id'])) {
27
- $form_id = esc_html(stripslashes($_GET['form_id']));
28
- $label_order = $this->model->get_from_label_order($form_id);
29
- $group_id = esc_html(stripslashes($_GET['group_id']));
30
- $rows = $this->model->get_submissions($group_id);
31
- $labels_id = array();
32
- $labels_name = array();
33
- $labels_type = array();
34
- $label_all = explode('#****#', $label_order);
35
- $label_all = array_slice($label_all, 0, count($label_all) - 1);
36
- foreach ($label_all as $key => $label_each) {
37
- $label_id_each = explode('#**id**#', $label_each);
38
- array_push($labels_id, $label_id_each[0]);
39
- $label_oder_each = explode('#**label**#', $label_id_each[1]);
40
- array_push($labels_name, $label_oder_each[0]);
41
- array_push($labels_type, $label_oder_each[1]);
42
- }
43
- ?>
44
- <style>
45
- table.submit_table {
46
- font-family: verdana,arial,sans-serif;
47
- border-width: 1px;
48
- border-color: #999999;
49
- border-collapse: collapse;
50
- }
51
- table.submit_table td {
52
- padding: 6px;
53
- border: 1px solid #fff;
54
- font-size: 13px;
55
- }
56
- .field_label {
57
- background: #E4E4E4;
58
- font-weight: bold;
59
- }
60
- .field_value {
61
- background: #f0f0ee;
62
- }
63
- </style>
64
- <table class="submit_table">
65
- <tr>
66
- <td class="field_label">ID: </td>
67
- <td class="field_value"><?php echo $rows[0]->group_id; ?></td>
68
- </tr>
69
- <tr>
70
- <td class="field_label"><?php echo __("Date","form_maker"); ?>: </td>
71
- <td class="field_value"><?php echo $rows[0]->date; ?></td>
72
- </tr>
73
- <tr>
74
- <td class="field_label">IP: </td>
75
- <td class="field_value"><?php echo $rows[0]->ip; ?></td>
76
- </tr>
77
- <?php
78
- foreach ($labels_id as $key => $label_id) {
79
- if ($labels_type[$key] != '' and $labels_type[$key] != 'type_editor' and $labels_type[$key] != 'type_submit_reset' and $labels_type[$key] != 'type_map' and $labels_type[$key] != 'type_captcha') {
80
- $element_value = '';
81
- foreach ($rows as $row) {
82
- if ($row->element_label == $label_id) {
83
- $element_value = $row->element_value;
84
- break;
85
- }
86
- else {
87
- $element_value = 'element_valueelement_valueelement_value';
88
- }
89
- }
90
- if($labels_type[$key] == "type_name")
91
- $element_value = str_replace("@@@", " ", $element_value);
92
- if ($element_value == "element_valueelement_valueelement_value") {
93
- continue;
94
- }
95
- ?>
96
- <tr>
97
- <td class="field_label"><?php echo $labels_name[$key]; ?></td>
98
- <td class="field_value"><?php echo str_replace("***br***", '<br>', $element_value); ?></td>
99
- </tr>
100
- <?php
101
- }
102
- }
103
- ?>
104
- </table>
105
- <?php
106
- }
107
- die();
108
- }
109
-
110
- ////////////////////////////////////////////////////////////////////////////////////////
111
- // Getters & Setters //
112
- ////////////////////////////////////////////////////////////////////////////////////////
113
- ////////////////////////////////////////////////////////////////////////////////////////
114
- // Private Methods //
115
- ////////////////////////////////////////////////////////////////////////////////////////
116
- ////////////////////////////////////////////////////////////////////////////////////////
117
- // Listeners //
118
- ////////////////////////////////////////////////////////////////////////////////////////
119
  }
1
+ <?php
2
+
3
+ class FMViewFormMakerSubmits {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ private $model;
14
+
15
+
16
+ ////////////////////////////////////////////////////////////////////////////////////////
17
+ // Constructor & Destructor //
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ public function __construct($model) {
20
+ $this->model = $model;
21
+ }
22
+ ////////////////////////////////////////////////////////////////////////////////////////
23
+ // Public Methods //
24
+ ////////////////////////////////////////////////////////////////////////////////////////
25
+ public function display() {
26
+ if (isset($_GET['form_id']) && isset($_GET['group_id'])) {
27
+ $form_id = esc_html(stripslashes($_GET['form_id']));
28
+ $label_order = $this->model->get_from_label_order($form_id);
29
+ $group_id = esc_html(stripslashes($_GET['group_id']));
30
+ $rows = $this->model->get_submissions($group_id);
31
+ $labels_id = array();
32
+ $labels_name = array();
33
+ $labels_type = array();
34
+ $label_all = explode('#****#', $label_order);
35
+ $label_all = array_slice($label_all, 0, count($label_all) - 1);
36
+ foreach ($label_all as $key => $label_each) {
37
+ $label_id_each = explode('#**id**#', $label_each);
38
+ array_push($labels_id, $label_id_each[0]);
39
+ $label_oder_each = explode('#**label**#', $label_id_each[1]);
40
+ array_push($labels_name, $label_oder_each[0]);
41
+ array_push($labels_type, $label_oder_each[1]);
42
+ }
43
+ ?>
44
+ <style>
45
+ table.submit_table {
46
+ font-family: verdana,arial,sans-serif;
47
+ border-width: 1px;
48
+ border-color: #999999;
49
+ border-collapse: collapse;
50
+ }
51
+ table.submit_table td {
52
+ padding: 6px;
53
+ border: 1px solid #fff;
54
+ font-size: 13px;
55
+ }
56
+ .field_label {
57
+ background: #E4E4E4;
58
+ font-weight: bold;
59
+ }
60
+ .field_value {
61
+ background: #f0f0ee;
62
+ }
63
+ </style>
64
+ <table class="submit_table">
65
+ <tr>
66
+ <td class="field_label">ID: </td>
67
+ <td class="field_value"><?php echo $rows[0]->group_id; ?></td>
68
+ </tr>
69
+ <tr>
70
+ <td class="field_label"><?php echo __("Date","form_maker"); ?>: </td>
71
+ <td class="field_value"><?php echo $rows[0]->date; ?></td>
72
+ </tr>
73
+ <tr>
74
+ <td class="field_label">IP: </td>
75
+ <td class="field_value"><?php echo $rows[0]->ip; ?></td>
76
+ </tr>
77
+ <?php
78
+ foreach ($labels_id as $key => $label_id) {
79
+ if ($labels_type[$key] != '' and $labels_type[$key] != 'type_editor' and $labels_type[$key] != 'type_submit_reset' and $labels_type[$key] != 'type_map' and $labels_type[$key] != 'type_captcha') {
80
+ $element_value = '';
81
+ foreach ($rows as $row) {
82
+ if ($row->element_label == $label_id) {
83
+ $element_value = $row->element_value;
84
+ break;
85
+ }
86
+ else {
87
+ $element_value = 'element_valueelement_valueelement_value';
88
+ }
89
+ }
90
+ if($labels_type[$key] == "type_name")
91
+ $element_value = str_replace("@@@", " ", $element_value);
92
+ if ($element_value == "element_valueelement_valueelement_value") {
93
+ continue;
94
+ }
95
+ ?>
96
+ <tr>
97
+ <td class="field_label"><?php echo $labels_name[$key]; ?></td>
98
+ <td class="field_value"><?php echo str_replace("***br***", '<br>', $element_value); ?></td>
99
+ </tr>
100
+ <?php
101
+ }
102
+ }
103
+ ?>
104
+ </table>
105
+ <?php
106
+ }
107
+ die();
108
+ }
109
+
110
+ ////////////////////////////////////////////////////////////////////////////////////////
111
+ // Getters & Setters //
112
+ ////////////////////////////////////////////////////////////////////////////////////////
113
+ ////////////////////////////////////////////////////////////////////////////////////////
114
+ // Private Methods //
115
+ ////////////////////////////////////////////////////////////////////////////////////////
116
+ ////////////////////////////////////////////////////////////////////////////////////////
117
+ // Listeners //
118
+ ////////////////////////////////////////////////////////////////////////////////////////
119
  }
admin/views/FMViewFormmakerwdcaptcha.php CHANGED
@@ -1,94 +1,94 @@
1
- <?php
2
-
3
- class FMViewFormmakerwdcaptcha {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $model;
14
-
15
-
16
- ////////////////////////////////////////////////////////////////////////////////////////
17
- // Constructor & Destructor //
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- public function __construct($model) {
20
- $this->model = $model;
21
- }
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Public Methods //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
- public function display() {
26
- if (isset($_GET['action']) && esc_html($_GET['action']) == 'formmakerwdcaptcha') {
27
- $i = (isset($_GET["i"]) ? esc_html($_GET["i"]) : '');
28
- $r2 = (isset($_GET["r2"]) ? (int) $_GET["r2"] : 0);
29
- $rrr = (isset($_GET["rrr"]) ? (int) $_GET["rrr"] : 0);
30
- $randNum = 0 + $r2 + $rrr;
31
- $digit = (isset($_GET["digit"]) ? (int) $_GET["digit"] : 6);
32
- $cap_width = $digit * 10 + 15;
33
- $cap_height = 26;
34
- $cap_quality = 100;
35
- $cap_length_min = $digit;
36
- $cap_length_max = $digit;
37
- $cap_digital = 1;
38
- $cap_latin_char = 1;
39
- function code_generic($_length, $_digital = 1, $_latin_char = 1) {
40
- $dig = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
41
- $lat = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z');
42
- $main = array();
43
- if ($_digital) {
44
- $main = array_merge($main, $dig);
45
- }
46
- if ($_latin_char) {
47
- $main = array_merge($main, $lat);
48
- }
49
- shuffle($main);
50
- $pass = substr(implode('', $main), 0, $_length);
51
- return $pass;
52
- }
53
- $l = rand($cap_length_min, $cap_length_max);
54
- $code = code_generic($l, $cap_digital, $cap_latin_char);
55
- if (session_id() == '' || (function_exists('session_status') && (session_status() == PHP_SESSION_NONE))) {
56
- @session_start();
57
- }
58
-
59
- $_SESSION[$i . '_wd_captcha_code'] = md5($code);
60
- $canvas = imagecreatetruecolor($cap_width, $cap_height);
61
- $c = imagecolorallocate($canvas, rand(150, 255), rand(150, 255), rand(150, 255));
62
- imagefilledrectangle($canvas, 0, 0, $cap_width, $cap_height, $c);
63
- $count = strlen($code);
64
- $color_text = imagecolorallocate($canvas, 0, 0, 0);
65
- for ($it = 0; $it < $count; $it++) {
66
- $letter = $code[$it];
67
- imagestring($canvas, 6, (10 * $it + 10), $cap_height / 4, $letter, $color_text);
68
- }
69
- for ($c = 0; $c < 150; $c++) {
70
- $x = rand(0, $cap_width - 1);
71
- $y = rand(0, 29);
72
- $col = '0x' . rand(0, 9) . '0' . rand(0, 9) . '0' . rand(0, 9) . '0';
73
- imagesetpixel($canvas, $x, $y, $col);
74
- }
75
- header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
76
- header('Cache-Control: no-store, no-cache, must-revalidate');
77
- header('Cache-Control: post-check=0, pre-check=0', FALSE);
78
- header('Pragma: no-cache');
79
- header('Content-Type: image/jpeg');
80
- imagejpeg($canvas, NULL, $cap_quality);
81
- }
82
- die('');
83
- }
84
-
85
- ////////////////////////////////////////////////////////////////////////////////////////
86
- // Getters & Setters //
87
- ////////////////////////////////////////////////////////////////////////////////////////
88
- ////////////////////////////////////////////////////////////////////////////////////////
89
- // Private Methods //
90
- ////////////////////////////////////////////////////////////////////////////////////////
91
- ////////////////////////////////////////////////////////////////////////////////////////
92
- // Listeners //
93
- ////////////////////////////////////////////////////////////////////////////////////////
94
  }
1
+ <?php
2
+
3
+ class FMViewFormmakerwdcaptcha {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ private $model;
14
+
15
+
16
+ ////////////////////////////////////////////////////////////////////////////////////////
17
+ // Constructor & Destructor //
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ public function __construct($model) {
20
+ $this->model = $model;
21
+ }
22
+ ////////////////////////////////////////////////////////////////////////////////////////
23
+ // Public Methods //
24
+ ////////////////////////////////////////////////////////////////////////////////////////
25
+ public function display() {
26
+ if (isset($_GET['action']) && esc_html($_GET['action']) == 'formmakerwdcaptcha') {
27
+ $i = (isset($_GET["i"]) ? esc_html($_GET["i"]) : '');
28
+ $r2 = (isset($_GET["r2"]) ? (int) $_GET["r2"] : 0);
29
+ $rrr = (isset($_GET["rrr"]) ? (int) $_GET["rrr"] : 0);
30
+ $randNum = 0 + $r2 + $rrr;
31
+ $digit = (isset($_GET["digit"]) ? (int) $_GET["digit"] : 6);
32
+ $cap_width = $digit * 10 + 15;
33
+ $cap_height = 26;
34
+ $cap_quality = 100;
35
+ $cap_length_min = $digit;
36
+ $cap_length_max = $digit;
37
+ $cap_digital = 1;
38
+ $cap_latin_char = 1;
39
+ function code_generic($_length, $_digital = 1, $_latin_char = 1) {
40
+ $dig = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
41
+ $lat = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z');
42
+ $main = array();
43
+ if ($_digital) {
44
+ $main = array_merge($main, $dig);
45
+ }
46
+ if ($_latin_char) {
47
+ $main = array_merge($main, $lat);
48
+ }
49
+ shuffle($main);
50
+ $pass = substr(implode('', $main), 0, $_length);
51
+ return $pass;
52
+ }
53
+ $l = rand($cap_length_min, $cap_length_max);
54
+ $code = code_generic($l, $cap_digital, $cap_latin_char);
55
+ if (session_id() == '' || (function_exists('session_status') && (session_status() == PHP_SESSION_NONE))) {
56
+ @session_start();
57
+ }
58
+
59
+ $_SESSION[$i . '_wd_captcha_code'] = md5($code);
60
+ $canvas = imagecreatetruecolor($cap_width, $cap_height);
61
+ $c = imagecolorallocate($canvas, rand(150, 255), rand(150, 255), rand(150, 255));
62
+ imagefilledrectangle($canvas, 0, 0, $cap_width, $cap_height, $c);
63
+ $count = strlen($code);
64
+ $color_text = imagecolorallocate($canvas, 0, 0, 0);
65
+ for ($it = 0; $it < $count; $it++) {
66
+ $letter = $code[$it];
67
+ imagestring($canvas, 6, (10 * $it + 10), $cap_height / 4, $letter, $color_text);
68
+ }
69
+ for ($c = 0; $c < 150; $c++) {
70
+ $x = rand(0, $cap_width - 1);
71
+ $y = rand(0, 29);
72
+ $col = '0x' . rand(0, 9) . '0' . rand(0, 9) . '0' . rand(0, 9) . '0';
73
+ imagesetpixel($canvas, $x, $y, $col);
74
+ }
75
+ header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
76
+ header('Cache-Control: no-store, no-cache, must-revalidate');
77
+ header('Cache-Control: post-check=0, pre-check=0', FALSE);
78
+ header('Pragma: no-cache');
79
+ header('Content-Type: image/jpeg');
80
+ imagejpeg($canvas, NULL, $cap_quality);
81
+ }
82
+ die('');
83
+ }
84
+
85
+ ////////////////////////////////////////////////////////////////////////////////////////
86
+ // Getters & Setters //
87
+ ////////////////////////////////////////////////////////////////////////////////////////
88
+ ////////////////////////////////////////////////////////////////////////////////////////
89
+ // Private Methods //
90
+ ////////////////////////////////////////////////////////////////////////////////////////
91
+ ////////////////////////////////////////////////////////////////////////////////////////
92
+ // Listeners //
93
+ ////////////////////////////////////////////////////////////////////////////////////////
94
  }
admin/views/FMViewFormmakerwdmathcaptcha.php CHANGED
@@ -1,123 +1,123 @@
1
- <?php
2
-
3
- class FMViewFormmakerwdmathcaptcha {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $model;
14
-
15
-
16
- ////////////////////////////////////////////////////////////////////////////////////////
17
- // Constructor & Destructor //
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- public function __construct($model) {
20
- $this->model = $model;
21
- }
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Public Methods //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
- public function display() {
26
- if (isset($_GET['action']) && esc_html($_GET['action']) == 'formmakerwdmathcaptcha') {
27
- $i = (isset($_GET["i"]) ? esc_html($_GET["i"]) : '');
28
- $r2 = (isset($_GET["r2"]) ? (int) $_GET["r2"] : 0);
29
- $rrr = (isset($_GET["rrr"]) ? (int) $_GET["rrr"] : 0);
30
- $randNum = 0 + $r2 + $rrr;
31
- $operations_count = ((isset($_GET["operations_count"]) && (int)$_GET["operations_count"]) ? ((int)$_GET["operations_count"] > 5 ? 5 : (int)$_GET["operations_count"]) : 1);
32
- $operations = (isset($_GET["operations"]) ? str_replace('@', '+', $_GET["operations"]) : '+,-');
33
- $operations = preg_replace('/\s+/', '', $operations);
34
- $cap_width = 2*($operations_count+1) * 20 + 10;
35
- $cap_height = 26;
36
- $cap_quality = 100;
37
-
38
- $code = $this->code_generic($operations_count, $operations);
39
- if (session_id() == '' || (function_exists('session_status') && (session_status() == PHP_SESSION_NONE))) {
40
- @session_start();
41
- }
42
-
43
- $_SESSION[$i . '_wd_arithmetic_captcha_code'] = md5($code[1]);
44
- $canvas = imagecreatetruecolor($cap_width, $cap_height);
45
-
46
- $c = imagecolorallocate($canvas, rand(150, 255), rand(150, 255), rand(150, 255));
47
- imagefilledrectangle($canvas, 0, 0, $cap_width, $cap_height, $c);
48
- $code = $code[0];
49
- $count = strlen($code);
50
- $color_text = imagecolorallocate($canvas, 0, 0, 0);
51
- for ($it = 0; $it < $count; $it++) {
52
- $letter = $code[$it];
53
- imagestring($canvas, 6, (10 * $it + 10), $cap_height / 4, $letter, $color_text);
54
- }
55
- for ($c = 0; $c < 150; $c++) {
56
- $x = rand(0, $cap_width - 1);
57
- $y = rand(0, 29);
58
- $col = '0x' . rand(0, 9) . '0' . rand(0, 9) . '0' . rand(0, 9) . '0';
59
- imagesetpixel($canvas, $x, $y, $col);
60
- }
61
- header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
62
- header('Cache-Control: no-store, no-cache, must-revalidate');
63
- header('Cache-Control: post-check=0, pre-check=0', FALSE);
64
- header('Pragma: no-cache');
65
- header('Content-Type: image/jpeg');
66
- imagejpeg($canvas, NULL, $cap_quality);
67
- }
68
- die('');
69
- }
70
-
71
- private function code_generic($_length, $_operations) {
72
- $cap = '';
73
- $dig = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
74
- $valid_oprations = array('+', '-', '*', '/');
75
- $operations_array = array_filter(explode(',', $_operations));
76
- foreach($operations_array as $key => $operation) {
77
- if(!in_array($operation, $valid_oprations))
78
- unset($operations_array[$key]);
79
- }
80
-
81
- for($k=0; $k <= $_length; $k++) {
82
- if(substr($cap, -1) == '/' ) {
83
- $operations_array = array_diff($operations_array, array('/'));
84
- $num_divisors = $this->arrayOfNumberDivisors(substr($cap, -2, 1));
85
- $cap .= $num_divisors[array_rand($num_divisors)];
86
- }
87
- else
88
- $cap .= $dig[array_rand($dig)];
89
-
90
- if($k != $_length)
91
- $cap .= $operations_array[array_rand($operations_array)];
92
- }
93
- $pass = eval('return '.$cap.';');
94
- if($pass < 0)
95
- return $this->code_generic($_length, $_operations);
96
- $cap .= '=';
97
- $cap = implode(' ',str_split($cap));
98
-
99
- return array($cap, $pass);
100
- }
101
-
102
- public function arrayOfNumberDivisors($x) {
103
- $divisors = array ();
104
- if($x == 0)
105
- $divisors[] = rand(1, 9);
106
-
107
- for($i = 1; $i <= $x; $i ++) {
108
- if ($x % $i == 0) {
109
- $divisors [] = $i;
110
- }
111
- }
112
- return $divisors;
113
- }
114
- ////////////////////////////////////////////////////////////////////////////////////////
115
- // Getters & Setters //
116
- ////////////////////////////////////////////////////////////////////////////////////////
117
- ////////////////////////////////////////////////////////////////////////////////////////
118
- // Private Methods //
119
- ////////////////////////////////////////////////////////////////////////////////////////
120
- ////////////////////////////////////////////////////////////////////////////////////////
121
- // Listeners //
122
- ////////////////////////////////////////////////////////////////////////////////////////
123
  }
1
+ <?php
2
+
3
+ class FMViewFormmakerwdmathcaptcha {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ private $model;
14
+
15
+
16
+ ////////////////////////////////////////////////////////////////////////////////////////
17
+ // Constructor & Destructor //
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ public function __construct($model) {
20
+ $this->model = $model;
21
+ }
22
+ ////////////////////////////////////////////////////////////////////////////////////////
23
+ // Public Methods //
24
+ ////////////////////////////////////////////////////////////////////////////////////////
25
+ public function display() {
26
+ if (isset($_GET['action']) && esc_html($_GET['action']) == 'formmakerwdmathcaptcha') {
27
+ $i = (isset($_GET["i"]) ? esc_html($_GET["i"]) : '');
28
+ $r2 = (isset($_GET["r2"]) ? (int) $_GET["r2"] : 0);
29
+ $rrr = (isset($_GET["rrr"]) ? (int) $_GET["rrr"] : 0);
30
+ $randNum = 0 + $r2 + $rrr;
31
+ $operations_count = ((isset($_GET["operations_count"]) && (int)$_GET["operations_count"]) ? ((int)$_GET["operations_count"] > 5 ? 5 : (int)$_GET["operations_count"]) : 1);
32
+ $operations = (isset($_GET["operations"]) ? str_replace('@', '+', $_GET["operations"]) : '+,-');
33
+ $operations = preg_replace('/\s+/', '', $operations);
34
+ $cap_width = 2*($operations_count+1) * 20 + 10;
35
+ $cap_height = 26;
36
+ $cap_quality = 100;
37
+
38
+ $code = $this->code_generic($operations_count, $operations);
39
+ if (session_id() == '' || (function_exists('session_status') && (session_status() == PHP_SESSION_NONE))) {
40
+ @session_start();
41
+ }
42
+
43
+ $_SESSION[$i . '_wd_arithmetic_captcha_code'] = md5($code[1]);
44
+ $canvas = imagecreatetruecolor($cap_width, $cap_height);
45
+
46
+ $c = imagecolorallocate($canvas, rand(150, 255), rand(150, 255), rand(150, 255));
47
+ imagefilledrectangle($canvas, 0, 0, $cap_width, $cap_height, $c);
48
+ $code = $code[0];
49
+ $count = strlen($code);
50
+ $color_text = imagecolorallocate($canvas, 0, 0, 0);
51
+ for ($it = 0; $it < $count; $it++) {
52
+ $letter = $code[$it];
53
+ imagestring($canvas, 6, (10 * $it + 10), $cap_height / 4, $letter, $color_text);
54
+ }
55
+ for ($c = 0; $c < 150; $c++) {
56
+ $x = rand(0, $cap_width - 1);
57
+ $y = rand(0, 29);
58
+ $col = '0x' . rand(0, 9) . '0' . rand(0, 9) . '0' . rand(0, 9) . '0';
59
+ imagesetpixel($canvas, $x, $y, $col);
60
+ }
61
+ header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
62
+ header('Cache-Control: no-store, no-cache, must-revalidate');
63
+ header('Cache-Control: post-check=0, pre-check=0', FALSE);
64
+ header('Pragma: no-cache');
65
+ header('Content-Type: image/jpeg');
66
+ imagejpeg($canvas, NULL, $cap_quality);
67
+ }
68
+ die('');
69
+ }
70
+
71
+ private function code_generic($_length, $_operations) {
72
+ $cap = '';
73
+ $dig = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
74
+ $valid_oprations = array('+', '-', '*', '/');
75
+ $operations_array = array_filter(explode(',', $_operations));
76
+ foreach($operations_array as $key => $operation) {
77
+ if(!in_array($operation, $valid_oprations))
78
+ unset($operations_array[$key]);
79
+ }
80
+
81
+ for($k=0; $k <= $_length; $k++) {
82
+ if(substr($cap, -1) == '/' ) {
83
+ $operations_array = array_diff($operations_array, array('/'));
84
+ $num_divisors = $this->arrayOfNumberDivisors(substr($cap, -2, 1));
85
+ $cap .= $num_divisors[array_rand($num_divisors)];
86
+ }
87
+ else
88
+ $cap .= $dig[array_rand($dig)];
89
+
90
+ if($k != $_length)
91
+ $cap .= $operations_array[array_rand($operations_array)];
92
+ }
93
+ $pass = eval('return '.$cap.';');
94
+ if($pass < 0)
95
+ return $this->code_generic($_length, $_operations);
96
+ $cap .= '=';
97
+ $cap = implode(' ',str_split($cap));
98
+
99
+ return array($cap, $pass);
100
+ }
101
+
102
+ public function arrayOfNumberDivisors($x) {
103
+ $divisors = array ();
104
+ if($x == 0)
105
+ $divisors[] = rand(1, 9);
106
+
107
+ for($i = 1; $i <= $x; $i ++) {
108
+ if ($x % $i == 0) {
109
+ $divisors [] = $i;
110
+ }
111
+ }
112
+ return $divisors;
113
+ }
114
+ ////////////////////////////////////////////////////////////////////////////////////////
115
+ // Getters & Setters //
116
+ ////////////////////////////////////////////////////////////////////////////////////////
117
+ ////////////////////////////////////////////////////////////////////////////////////////
118
+ // Private Methods //
119
+ ////////////////////////////////////////////////////////////////////////////////////////
120
+ ////////////////////////////////////////////////////////////////////////////////////////
121
+ // Listeners //
122
+ ////////////////////////////////////////////////////////////////////////////////////////
123
  }
admin/views/FMViewFromeditcountryinpopup.php CHANGED
@@ -1,185 +1,185 @@
1
- <?php
2
-
3
- class FMViewFromeditcountryinpopup {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $model;
14
-
15
-
16
- ////////////////////////////////////////////////////////////////////////////////////////
17
- // Constructor & Destructor //
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- public function __construct($model) {
20
- $this->model = $model;
21
- }
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Public Methods //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
- public function display() {
26
- $id = ((isset($_GET['field_id'])) ? esc_html(stripslashes($_GET['field_id'])) : 0);
27
- wp_print_scripts('jquery');
28
- wp_print_scripts('jquery-ui-core');
29
- wp_print_scripts('jquery-ui-widget');
30
- wp_print_scripts('jquery-ui-mouse');
31
- wp_print_scripts('jquery-ui-slider');
32
- wp_print_scripts('jquery-ui-sortable');
33
-
34
- ?>
35
- <style>
36
- .country-list {
37
- padding:10px 0;
38
- }
39
-
40
- .country-list ul {
41
- font-family: Segoe UI !important;
42
- font-size:13px;
43
- }
44
- .country-list > div {
45
- display:inline-block;
46
- }
47
-
48
- .save-cancel {
49
- float:right;
50
- }
51
-
52
- .fm-select-remove {
53
- background: #4EC0D9;
54
- width: 78px;
55
- height: 32px;
56
- border: 1px solid #4EC0D9;
57
- border-radius: 6px;
58
- color: #fff;
59
- cursor:pointer;
60
- }
61
-
62
- .fm-select-remove.large {
63
- width: 90px;
64
- }
65
- </style>
66
- <div class="country-list">
67
- <div class="select-remove">
68
- <button class="fm-select-remove large" onclick="select_all(); return false;">
69
- Select all
70
- <span></span>
71
- </button>
72
- <button class="fm-select-remove large" onclick="remove_all(); return false;">
73
- Remove all
74
- <span></span>
75
- </button>
76
- </div>
77
- <div class="save-cancel">
78
- <button class="fm-select-remove" onclick="save_list(); return false;">
79
- Save
80
- <span></span>
81
- </button>
82
- </div>
83
- <ul id="countries_list" style="list-style: none; padding: 0px;"></ul>
84
- </div>
85
- <script>
86
- selec_coutries = [];
87
- coutries = ["", "Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bhutan", "Bolivia", "Bosnia and Herzegovina", "Botswana", "Brazil", "Brunei", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Central African Republic", "Chad", "Chile", "China", "Colombia", "Comoros", "Congo (Brazzaville)", "Congo", "Costa Rica", "Cote d'Ivoire", "Croatia", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor (Timor Timur)", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Fiji", "Finland", "France", "Gabon", "Gambia, The", "Georgia", "Germany", "Ghana", "Greece", "Grenada", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Honduras", "Hungary", "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea, North", "Korea, South", "Kuwait", "Kyrgyzstan", "Laos", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", "Macedonia", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Mauritania", "Mauritius", "Mexico", "Micronesia", "Moldova", "Monaco", "Mongolia", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nauru", "Nepal", "Netherlands", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Poland", "Portugal", "Qatar", "Romania", "Russia", "Rwanda", "Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Serbia and Montenegro", "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "Spain", "Sri Lanka", "Sudan", "Suriname", "Swaziland", "Sweden", "Switzerland", "Syria", "Taiwan", "Tajikistan", "Tanzania", "Thailand", "Togo", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "Uruguay", "Uzbekistan", "Vanuatu", "Vatican City", "Venezuela", "Vietnam", "Yemen", "Zambia", "Zimbabwe"];
88
- select_ = window.parent.document.getElementById('<?php echo $id ?>_elementform_id_temp');
89
- n = select_.childNodes.length;
90
- for (i = 0; i < n; i++) {
91
- selec_coutries.push(select_.childNodes[i].value);
92
- var ch = document.createElement('input');
93
- ch.setAttribute("type", "checkbox");
94
- ch.setAttribute("checked", "checked");
95
- ch.value = select_.childNodes[i].value;
96
- ch.id = i + "ch";
97
-
98
- var p = document.createElement('span');
99
- p.style.cssText = "color:#000000; font-size: 13px; cursor:move";
100
- p.innerHTML = select_.childNodes[i].value;
101
- var li = document.createElement('li');
102
- li.style.cssText = "margin:3px; vertical-align:middle";
103
- li.id = i;
104
- li.appendChild(ch);
105
- li.appendChild(p);
106
- document.getElementById('countries_list').appendChild(li);
107
- }
108
- cur = i;
109
- m = coutries.length;
110
- for (i = 0; i < m; i++) {
111
- isin = isValueInArray(selec_coutries, coutries[i]);
112
- if (!isin) {
113
- var ch = document.createElement('input');
114
- ch.setAttribute("type", "checkbox");
115
- ch.value = coutries[i];
116
- ch.id = cur + "ch";
117
-
118
- var p = document.createElement('span');
119
- p.style.cssText = "color:#000000; font-size: 13px; cursor:move";
120
- p.innerHTML = coutries[i];
121
- var li = document.createElement('li');
122
- li.style.cssText = "margin:3px; vertical-align:middle";
123
- li.id = cur;
124
- li.appendChild(ch);
125
- li.appendChild(p);
126
- document.getElementById('countries_list').appendChild(li);
127
- cur++;
128
- }
129
- }
130
- jQuery(function () {
131
- jQuery("#countries_list").sortable();
132
- jQuery("#countries_list").disableSelection();
133
- });
134
-
135
- function isValueInArray(arr, val) {
136
- inArray = false;
137
- for (x = 0; x < arr.length; x++) {
138
- if (val == arr[x]) {
139
- inArray = true;
140
- }
141
- }
142
- return inArray;
143
- }
144
- function save_list() {
145
- select_.innerHTML = ""
146
- ul = document.getElementById('countries_list');
147
- n = ul.childNodes.length;
148
- for (i = 0; i < n; i++) {
149
- if (ul.childNodes[i].tagName == "LI") {
150
- id = ul.childNodes[i].id;
151
- if (document.getElementById(id + 'ch').checked) {
152
- var option_ = document.createElement('option');
153
- option_.setAttribute("value", document.getElementById(id + 'ch').value);
154
- option_.innerHTML = document.getElementById(id + 'ch').value;
155
- select_.appendChild(option_);
156
- }
157
- }
158
- }
159
- window.parent.tb_remove();
160
- }
161
- function select_all() {
162
- for (i = 0; i < 194; i++) {
163
- document.getElementById(i + 'ch').checked = true;
164
- }
165
- }
166
- function remove_all() {
167
- for (i = 0; i < 194; i++) {
168
- document.getElementById(i + 'ch').checked = false;
169
- }
170
- }
171
- </script>
172
- <?php
173
- die();
174
- }
175
-
176
- ////////////////////////////////////////////////////////////////////////////////////////
177
- // Getters & Setters //
178
- ////////////////////////////////////////////////////////////////////////////////////////
179
- ////////////////////////////////////////////////////////////////////////////////////////
180
- // Private Methods //
181
- ////////////////////////////////////////////////////////////////////////////////////////
182
- ////////////////////////////////////////////////////////////////////////////////////////
183
- // Listeners //
184
- ////////////////////////////////////////////////////////////////////////////////////////
185
  }
1
+ <?php
2
+
3
+ class FMViewFromeditcountryinpopup {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ private $model;
14
+
15
+
16
+ ////////////////////////////////////////////////////////////////////////////////////////
17
+ // Constructor & Destructor //
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ public function __construct($model) {
20
+ $this->model = $model;
21
+ }
22
+ ////////////////////////////////////////////////////////////////////////////////////////
23
+ // Public Methods //
24
+ ////////////////////////////////////////////////////////////////////////////////////////
25
+ public function display() {
26
+ $id = ((isset($_GET['field_id'])) ? esc_html(stripslashes($_GET['field_id'])) : 0);
27
+ wp_print_scripts('jquery');
28
+ wp_print_scripts('jquery-ui-core');
29
+ wp_print_scripts('jquery-ui-widget');
30
+ wp_print_scripts('jquery-ui-mouse');
31
+ wp_print_scripts('jquery-ui-slider');
32
+ wp_print_scripts('jquery-ui-sortable');
33
+
34
+ ?>
35
+ <style>
36
+ .country-list {
37
+ padding:10px 0;
38
+ }
39
+
40
+ .country-list ul {
41
+ font-family: Segoe UI !important;
42
+ font-size:13px;
43
+ }
44
+ .country-list > div {
45
+ display:inline-block;
46
+ }
47
+
48
+ .save-cancel {
49
+ float:right;
50
+ }
51
+
52
+ .fm-select-remove {
53
+ background: #4EC0D9;
54
+ width: 78px;
55
+ height: 32px;
56
+ border: 1px solid #4EC0D9;
57
+ border-radius: 6px;
58
+ color: #fff;
59
+ cursor:pointer;
60
+ }
61
+
62
+ .fm-select-remove.large {
63
+ width: 90px;
64
+ }
65
+ </style>
66
+ <div class="country-list">
67
+ <div class="select-remove">
68
+ <button class="fm-select-remove large" onclick="select_all(); return false;">
69
+ Select all
70
+ <span></span>
71
+ </button>
72
+ <button class="fm-select-remove large" onclick="remove_all(); return false;">
73
+ Remove all
74
+ <span></span>
75
+ </button>
76
+ </div>
77
+ <div class="save-cancel">
78
+ <button class="fm-select-remove" onclick="save_list(); return false;">
79
+ Save
80
+ <span></span>
81
+ </button>
82
+ </div>
83
+ <ul id="countries_list" style="list-style: none; padding: 0px;"></ul>
84
+ </div>
85
+ <script>
86
+ selec_coutries = [];
87
+ coutries = ["", "Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bhutan", "Bolivia", "Bosnia and Herzegovina", "Botswana", "Brazil", "Brunei", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Central African Republic", "Chad", "Chile", "China", "Colombia", "Comoros", "Congo (Brazzaville)", "Congo", "Costa Rica", "Cote d'Ivoire", "Croatia", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor (Timor Timur)", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Fiji", "Finland", "France", "Gabon", "Gambia, The", "Georgia", "Germany", "Ghana", "Greece", "Grenada", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Honduras", "Hungary", "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea, North", "Korea, South", "Kuwait", "Kyrgyzstan", "Laos", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", "Macedonia", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Mauritania", "Mauritius", "Mexico", "Micronesia", "Moldova", "Monaco", "Mongolia", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nauru", "Nepal", "Netherlands", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Poland", "Portugal", "Qatar", "Romania", "Russia", "Rwanda", "Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Serbia and Montenegro", "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "Spain", "Sri Lanka", "Sudan", "Suriname", "Swaziland", "Sweden", "Switzerland", "Syria", "Taiwan", "Tajikistan", "Tanzania", "Thailand", "Togo", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "Uruguay", "Uzbekistan", "Vanuatu", "Vatican City", "Venezuela", "Vietnam", "Yemen", "Zambia", "Zimbabwe"];
88
+ select_ = window.parent.document.getElementById('<?php echo $id ?>_elementform_id_temp');
89
+ n = select_.childNodes.length;
90
+ for (i = 0; i < n; i++) {
91
+ selec_coutries.push(select_.childNodes[i].value);
92
+ var ch = document.createElement('input');
93
+ ch.setAttribute("type", "checkbox");
94
+ ch.setAttribute("checked", "checked");
95
+ ch.value = select_.childNodes[i].value;
96
+ ch.id = i + "ch";
97
+
98
+ var p = document.createElement('span');
99
+ p.style.cssText = "color:#000000; font-size: 13px; cursor:move";
100
+ p.innerHTML = select_.childNodes[i].value;
101
+ var li = document.createElement('li');
102
+ li.style.cssText = "margin:3px; vertical-align:middle";
103
+ li.id = i;
104
+ li.appendChild(ch);
105
+ li.appendChild(p);
106
+ document.getElementById('countries_list').appendChild(li);
107
+ }
108
+ cur = i;
109
+ m = coutries.length;
110
+ for (i = 0; i < m; i++) {
111
+ isin = isValueInArray(selec_coutries, coutries[i]);
112
+ if (!isin) {
113
+ var ch = document.createElement('input');
114
+ ch.setAttribute("type", "checkbox");
115
+ ch.value = coutries[i];
116
+ ch.id = cur + "ch";
117
+
118
+ var p = document.createElement('span');
119
+ p.style.cssText = "color:#000000; font-size: 13px; cursor:move";
120
+ p.innerHTML = coutries[i];
121
+ var li = document.createElement('li');
122
+ li.style.cssText = "margin:3px; vertical-align:middle";
123
+ li.id = cur;
124
+ li.appendChild(ch);
125
+ li.appendChild(p);
126
+ document.getElementById('countries_list').appendChild(li);
127
+ cur++;
128
+ }
129
+ }
130
+ jQuery(function () {
131
+ jQuery("#countries_list").sortable();
132
+ jQuery("#countries_list").disableSelection();
133
+ });
134
+
135
+ function isValueInArray(arr, val) {
136
+ inArray = false;
137
+ for (x = 0; x < arr.length; x++) {
138
+ if (val == arr[x]) {
139
+ inArray = true;
140
+ }
141
+ }
142
+ return inArray;
143
+ }
144
+ function save_list() {
145
+ select_.innerHTML = ""
146
+ ul = document.getElementById('countries_list');
147
+ n = ul.childNodes.length;
148
+ for (i = 0; i < n; i++) {
149
+ if (ul.childNodes[i].tagName == "LI") {
150
+ id = ul.childNodes[i].id;
151
+ if (document.getElementById(id + 'ch').checked) {
152
+ var option_ = document.createElement('option');
153
+ option_.setAttribute("value", document.getElementById(id + 'ch').value);
154
+ option_.innerHTML = document.getElementById(id + 'ch').value;
155
+ select_.appendChild(option_);
156
+ }
157
+ }
158
+ }
159
+ window.parent.tb_remove();
160
+ }
161
+ function select_all() {
162
+ for (i = 0; i < 194; i++) {
163
+ document.getElementById(i + 'ch').checked = true;
164
+ }
165
+ }
166
+ function remove_all() {
167
+ for (i = 0; i < 194; i++) {
168
+ document.getElementById(i + 'ch').checked = false;
169
+ }
170
+ }
171
+ </script>
172
+ <?php
173
+ die();
174
+ }
175
+
176
+ ////////////////////////////////////////////////////////////////////////////////////////
177
+ // Getters & Setters //
178
+ ////////////////////////////////////////////////////////////////////////////////////////
179
+ ////////////////////////////////////////////////////////////////////////////////////////
180
+ // Private Methods //
181
+ ////////////////////////////////////////////////////////////////////////////////////////
182
+ ////////////////////////////////////////////////////////////////////////////////////////
183
+ // Listeners //
184
+ ////////////////////////////////////////////////////////////////////////////////////////
185
  }
admin/views/FMViewFromipinfoinpopup.php CHANGED
@@ -1,101 +1,101 @@
1
- <?php
2
-
3
- class FMViewFromipinfoinpopup {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $model;
14
-
15
-
16
- ////////////////////////////////////////////////////////////////////////////////////////
17
- // Constructor & Destructor //
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- public function __construct($model) {
20
- $this->model = $model;
21
- }
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Public Methods //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
- public function display() {
26
- $data_ip = ((isset($_GET['data_ip'])) ? esc_html(stripslashes($_GET['data_ip'])) : 0);
27
- $query = @unserialize(file_get_contents('http://ip-api.com/php/' . $data_ip));
28
- if ($query && $query['status'] == 'success' && $query['countryCode']) {
29
- $country_flag = '<img width="16px" src="' . WD_FM_URL . '/images/flags/' . strtolower($query['countryCode']) . '.png" class="sub-align" alt="' . $query['country'] . '" title="' . $query['country'] . '" />';
30
- $country = $query['country'] ;
31
- $countryCode = $query['countryCode'] ;
32
- $city = $query['city'];
33
- $timezone = $query['timezone'];
34
- $lat = $query['lat'];
35
- $lon = $query['lon'];
36
- }
37
- else {
38
- $country_flag = '';
39
- $country = '';
40
- $countryCode = '';
41
- $city = '';
42
- $timezone = '';
43
- $lat = '';
44
- $lon = '';
45
- }
46
- ?>
47
- <style>
48
- .admintable {
49
- height: 100%;
50
- margin: 0 auto;
51
- padding: 0;
52
- width: 100%;
53
- }
54
- table.admintable td.key, table.admintable td.paramlist_key {
55
- background-color: #F6F6F6;
56
- border-bottom: 1px solid #E9E9E9;
57
- border-right: 1px solid #E9E9E9;
58
- color: #666666;
59
- font-weight: bold;
60
- margin-right: 10px;
61
- text-align: right;
62
- width: 140px;
63
- }
64
- </style>
65
- <table class="admintable">
66
- <tr>
67
- <td class="key"><b>IP:</b></td><td><?php echo $data_ip; ?></td>
68
- </tr>
69
- <tr>
70
- <td class="key"><b>Country:</b></td><td><?php echo $country . ' ' . $country_flag; ?></td>
71
- </tr>
72
- <tr>
73
- <td class="key"><b>CountryCode:</b></td><td><?php echo $countryCode; ?></td>
74
- </tr>
75
- <tr>
76
- <td class="key"><b>City:</b></td><td><?php echo $city; ?></td>
77
- </tr>
78
- <tr>
79
- <td class="key"><b>Timezone:</b></td><td><?php echo $timezone; ?></td>
80
- </tr>
81
- <tr>
82
- <td class="key"><b>Latitude:</b></td><td><?php echo $lat; ?></td>
83
- </tr>
84
- <tr>
85
- <td class="key"><b>Longitude:</b></td><td><?php echo $lon; ?></td>
86
- </tr>
87
- </table>
88
- <?php
89
- die();
90
- }
91
-
92
- ////////////////////////////////////////////////////////////////////////////////////////
93
- // Getters & Setters //
94
- ////////////////////////////////////////////////////////////////////////////////////////
95
- ////////////////////////////////////////////////////////////////////////////////////////
96
- // Private Methods //
97
- ////////////////////////////////////////////////////////////////////////////////////////
98
- ////////////////////////////////////////////////////////////////////////////////////////
99
- // Listeners //
100
- ////////////////////////////////////////////////////////////////////////////////////////
101
  }
1
+ <?php
2
+
3
+ class FMViewFromipinfoinpopup {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ private $model;
14
+
15
+
16
+ ////////////////////////////////////////////////////////////////////////////////////////
17
+ // Constructor & Destructor //
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ public function __construct($model) {
20
+ $this->model = $model;
21
+ }
22
+ ////////////////////////////////////////////////////////////////////////////////////////
23
+ // Public Methods //
24
+ ////////////////////////////////////////////////////////////////////////////////////////
25
+ public function display() {
26
+ $data_ip = ((isset($_GET['data_ip'])) ? esc_html(stripslashes($_GET['data_ip'])) : 0);
27
+ $query = @unserialize(file_get_contents('http://ip-api.com/php/' . $data_ip));
28
+ if ($query && $query['status'] == 'success' && $query['countryCode']) {
29
+ $country_flag = '<img width="16px" src="' . WD_FM_URL . '/images/flags/' . strtolower($query['countryCode']) . '.png" class="sub-align" alt="' . $query['country'] . '" title="' . $query['country'] . '" />';
30
+ $country = $query['country'] ;
31
+ $countryCode = $query['countryCode'] ;
32
+ $city = $query['city'];
33
+ $timezone = $query['timezone'];
34
+ $lat = $query['lat'];
35
+ $lon = $query['lon'];
36
+ }
37
+ else {
38
+ $country_flag = '';
39
+ $country = '';
40
+ $countryCode = '';
41
+ $city = '';
42
+ $timezone = '';
43
+ $lat = '';
44
+ $lon = '';
45
+ }
46
+ ?>
47
+ <style>
48
+ .admintable {
49
+ height: 100%;
50
+ margin: 0 auto;
51
+ padding: 0;
52
+ width: 100%;
53
+ }
54
+ table.admintable td.key, table.admintable td.paramlist_key {
55
+ background-color: #F6F6F6;
56
+ border-bottom: 1px solid #E9E9E9;
57
+ border-right: 1px solid #E9E9E9;
58
+ color: #666666;
59
+ font-weight: bold;
60
+ margin-right: 10px;
61
+ text-align: right;
62
+ width: 140px;
63
+ }
64
+ </style>
65
+ <table class="admintable">
66
+ <tr>
67
+ <td class="key"><b>IP:</b></td><td><?php echo $data_ip; ?></td>
68
+ </tr>
69
+ <tr>
70
+ <td class="key"><b>Country:</b></td><td><?php echo $country . ' ' . $country_flag; ?></td>
71
+ </tr>
72
+ <tr>
73
+ <td class="key"><b>CountryCode:</b></td><td><?php echo $countryCode; ?></td>
74
+ </tr>
75
+ <tr>
76
+ <td class="key"><b>City:</b></td><td><?php echo $city; ?></td>
77
+ </tr>
78
+ <tr>
79
+ <td class="key"><b>Timezone:</b></td><td><?php echo $timezone; ?></td>
80
+ </tr>
81
+ <tr>
82
+ <td class="key"><b>Latitude:</b></td><td><?php echo $lat; ?></td>
83
+ </tr>
84
+ <tr>
85
+ <td class="key"><b>Longitude:</b></td><td><?php echo $lon; ?></td>
86
+ </tr>
87
+ </table>
88
+ <?php
89
+ die();
90
+ }
91
+
92
+ ////////////////////////////////////////////////////////////////////////////////////////
93
+ // Getters & Setters //
94
+ ////////////////////////////////////////////////////////////////////////////////////////
95
+ ////////////////////////////////////////////////////////////////////////////////////////
96
+ // Private Methods //
97
+ ////////////////////////////////////////////////////////////////////////////////////////
98
+ ////////////////////////////////////////////////////////////////////////////////////////
99
+ // Listeners //
100
+ ////////////////////////////////////////////////////////////////////////////////////////
101
  }
admin/views/FMViewFrommapeditinpopup.php CHANGED
@@ -1,66 +1,66 @@
1
- <?php
2
-
3
- class FMViewFrommapeditinpopup {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $model;
14
-
15
-
16
- ////////////////////////////////////////////////////////////////////////////////////////
17
- // Constructor & Destructor //
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- public function __construct($model) {
20
- $this->model = $model;
21
- }
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Public Methods //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
- public function display() {
26
- $fm_settings = get_option('fm_settings');
27
- $map_key = isset($fm_settings['map_key']) ? $fm_settings['map_key'] : '';
28
- $long = ((isset($_GET['long'])) ? esc_html(stripslashes($_GET['long'])) : 0);
29
- $lat = ((isset($_GET['lat'])) ? esc_html(stripslashes($_GET['lat'])) : 0);
30
- ?>
31
- <script src="<?php echo WD_FM_URL . '/js/main_front_end.js'; ?>"></script>
32
- <script src="<?php echo WD_FM_URL . '/js/if_gmap_back_end.js'; ?>"></script>
33
- <script src="https://maps.google.com/maps/api/js?v=3.exp&key=<?php echo $map_key ?>"></script>
34
- <table style="margin:0px; padding:0px">
35
- <tr>
36
- <td><b>Address:</b></td>
37
- <td><input type="text" id="addrval0" style="border:0px; background:none" size="80" readonly/></td>
38
- </tr>
39
- <tr>
40
- <td><b>Longitude:</b></td>
41
- <td><input type="text" id="longval0" style="border:0px; background:none" size="80" readonly/></td>
42
- </tr>
43
- <tr>
44
- <td><b>Latitude:</b></td>
45
- <td><input type="text" id="latval0" style="border:0px; background:none" size="80" readonly/></td>
46
- </tr>
47
- </table>
48
- <div id="0_elementform_id_temp" long="<?php echo $long ?>" center_x="<?php echo $long ?>" center_y="<?php echo $lat ?>" lat="<?php echo $lat ?>" zoom="8" info="" style="width:600px; height:400px; "></div>
49
- <script>
50
- if_gmap_init("0");
51
- add_marker_on_map(0, 0, "<?php echo $long; ?>", "<?php echo $lat; ?>", "");
52
- </script>
53
- <?php
54
- die();
55
- }
56
-
57
- ////////////////////////////////////////////////////////////////////////////////////////
58
- // Getters & Setters //
59
- ////////////////////////////////////////////////////////////////////////////////////////
60
- ////////////////////////////////////////////////////////////////////////////////////////
61
- // Private Methods //
62
- ////////////////////////////////////////////////////////////////////////////////////////
63
- ////////////////////////////////////////////////////////////////////////////////////////
64
- // Listeners //
65
- ////////////////////////////////////////////////////////////////////////////////////////
66
  }
1
+ <?php
2
+
3
+ class FMViewFrommapeditinpopup {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ private $model;
14
+
15
+
16
+ ////////////////////////////////////////////////////////////////////////////////////////
17
+ // Constructor & Destructor //
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ public function __construct($model) {
20
+ $this->model = $model;
21
+ }
22
+ ////////////////////////////////////////////////////////////////////////////////////////
23
+ // Public Methods //
24
+ ////////////////////////////////////////////////////////////////////////////////////////
25
+ public function display() {
26
+ $fm_settings = get_option('fm_settings');
27
+ $map_key = isset($fm_settings['map_key']) ? $fm_settings['map_key'] : '';
28
+ $long = ((isset($_GET['long'])) ? esc_html(stripslashes($_GET['long'])) : 0);
29
+ $lat = ((isset($_GET['lat'])) ? esc_html(stripslashes($_GET['lat'])) : 0);
30
+ ?>
31
+ <script src="<?php echo WD_FM_URL . '/js/main_front_end.js'; ?>"></script>
32
+ <script src="<?php echo WD_FM_URL . '/js/if_gmap_back_end.js'; ?>"></script>
33
+ <script src="https://maps.google.com/maps/api/js?v=3.exp&key=<?php echo $map_key ?>"></script>
34
+ <table style="margin:0px; padding:0px">
35
+ <tr>
36
+ <td><b>Address:</b></td>
37
+ <td><input type="text" id="addrval0" style="border:0px; background:none" size="80" readonly/></td>
38
+ </tr>
39
+ <tr>
40
+ <td><b>Longitude:</b></td>
41
+ <td><input type="text" id="longval0" style="border:0px; background:none" size="80" readonly/></td>
42
+ </tr>
43
+ <tr>
44
+ <td><b>Latitude:</b></td>
45
+ <td><input type="text" id="latval0" style="border:0px; background:none" size="80" readonly/></td>
46
+ </tr>
47
+ </table>
48
+ <div id="0_elementform_id_temp" long="<?php echo $long ?>" center_x="<?php echo $long ?>" center_y="<?php echo $lat ?>" lat="<?php echo $lat ?>" zoom="8" info="" style="width:600px; height:400px; "></div>
49
+ <script>
50
+ if_gmap_init("0");
51
+ add_marker_on_map(0, 0, "<?php echo $long; ?>", "<?php echo $lat; ?>", "");
52
+ </script>
53
+ <?php
54
+ die();
55
+ }
56
+
57
+ ////////////////////////////////////////////////////////////////////////////////////////
58
+ // Getters & Setters //
59
+ ////////////////////////////////////////////////////////////////////////////////////////
60
+ ////////////////////////////////////////////////////////////////////////////////////////
61
+ // Private Methods //
62
+ ////////////////////////////////////////////////////////////////////////////////////////
63
+ ////////////////////////////////////////////////////////////////////////////////////////
64
+ // Listeners //
65
+ ////////////////////////////////////////////////////////////////////////////////////////
66
  }
admin/views/FMViewGenerete_csv.php CHANGED
@@ -1,95 +1,95 @@
1
- <?php
2
-
3
- class FMViewGenerete_csv {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $model;
14
-
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- // Constructor & Destructor //
17
- ////////////////////////////////////////////////////////////////////////////////////////
18
- public function __construct($model) {
19
- $this->model = $model;
20
- }
21
-
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Public Methods //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
- public function display() {
26
- $fm_settings = get_option('fm_settings');
27
- $csv_delimiter = isset($fm_settings['csv_delimiter']) ? $fm_settings['csv_delimiter'] : ',';
28
- $form_id = (int)$_REQUEST['form_id'];
29
- $params = $this->model->get_data();
30
- $limitstart = (int)$_REQUEST['limitstart'];
31
- $send_header = (int)$_REQUEST['send_header'];
32
- $data = $params[0];
33
- $title = $params[1];
34
- $is_paypal_info = $params[2];
35
-
36
- $all_keys = array();
37
- foreach ($data as $row) {
38
- $all_keys = array_merge($all_keys, $row);
39
- }
40
-
41
- $keys_array = array_keys($all_keys);
42
- foreach ($data as $key => $row) {
43
- foreach ($keys_array as $key1 => $value) {
44
- if(!array_key_exists ( $value , $row ))
45
- array_splice($row, $key1, 0, '');
46
- }
47
- $data[$key] = $row;
48
- }
49
-
50
- $upload_dir = wp_upload_dir();
51
- $file_path = $upload_dir['basedir'] . '/form-maker';
52
- if (!is_dir($file_path)) {
53
- mkdir($file_path, 0777);
54
- }
55
- $tempfile = $file_path.'/export'.$form_id.'.txt';
56
- if($limitstart == 0 && file_exists ($tempfile))
57
- unlink($tempfile);
58
-
59
- $output = fopen($tempfile, "a");
60
- if($limitstart == 0) {
61
- fputcsv($output, str_replace('PAYPAL_', '', $keys_array), $csv_delimiter);
62
- }
63
-
64
- foreach ($data as $record) {
65
- fputcsv($output, $record, $csv_delimiter);
66
- }
67
- fclose($output);
68
-
69
- if($send_header == 1){
70
- $txtfile = fopen($tempfile, "r");
71
- $txtfilecontent = fread($txtfile, filesize($tempfile));
72
- fclose($txtfile);
73
-
74
- $filename = $title . "_" . date('Ymd') . ".csv";
75
- header('Content-Encoding: Windows-1252');
76
- header('Content-type: text/csv; charset=Windows-1252');
77
- header("Content-Disposition: attachment; filename=\"$filename\"");
78
-
79
- echo $txtfilecontent;
80
- unlink($tempfile);
81
- die();
82
- }
83
-
84
- }
85
-
86
- ////////////////////////////////////////////////////////////////////////////////////////
87
- // Getters & Setters //
88
- ////////////////////////////////////////////////////////////////////////////////////////
89
- ////////////////////////////////////////////////////////////////////////////////////////
90
- // Private Methods //
91
- ////////////////////////////////////////////////////////////////////////////////////////
92
- ////////////////////////////////////////////////////////////////////////////////////////
93
- // Listeners //
94
- ////////////////////////////////////////////////////////////////////////////////////////
95
  }
1
+ <?php
2
+
3
+ class FMViewGenerete_csv {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ private $model;
14
+
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ // Constructor & Destructor //
17
+ ////////////////////////////////////////////////////////////////////////////////////////
18
+ public function __construct($model) {
19
+ $this->model = $model;
20
+ }
21
+
22
+ ////////////////////////////////////////////////////////////////////////////////////////
23
+ // Public Methods //
24
+ ////////////////////////////////////////////////////////////////////////////////////////
25
+ public function display() {
26
+ $fm_settings = get_option('fm_settings');
27
+ $csv_delimiter = isset($fm_settings['csv_delimiter']) ? $fm_settings['csv_delimiter'] : ',';
28
+ $form_id = (int)$_REQUEST['form_id'];
29
+ $params = $this->model->get_data();
30
+ $limitstart = (int)$_REQUEST['limitstart'];
31
+ $send_header = (int)$_REQUEST['send_header'];
32
+ $data = $params[0];
33
+ $title = $params[1];
34
+ $is_paypal_info = $params[2];
35
+
36
+ $all_keys = array();
37
+ foreach ($data as $row) {
38
+ $all_keys = array_merge($all_keys, $row);
39
+ }
40
+
41
+ $keys_array = array_keys($all_keys);
42
+ foreach ($data as $key => $row) {
43
+ foreach ($keys_array as $key1 => $value) {
44
+ if(!array_key_exists ( $value , $row ))
45
+ array_splice($row, $key1, 0, '');
46
+ }
47
+ $data[$key] = $row;
48
+ }
49
+
50
+ $upload_dir = wp_upload_dir();
51
+ $file_path = $upload_dir['basedir'] . '/form-maker';
52
+ if (!is_dir($file_path)) {
53
+ mkdir($file_path, 0777);
54
+ }
55
+ $tempfile = $file_path.'/export'.$form_id.'.txt';
56
+ if($limitstart == 0 && file_exists ($tempfile))
57
+ unlink($tempfile);
58
+
59
+ $output = fopen($tempfile, "a");
60
+ if($limitstart == 0) {
61
+ fputcsv($output, str_replace('PAYPAL_', '', $keys_array), $csv_delimiter);
62
+ }
63
+
64
+ foreach ($data as $record) {
65
+ fputcsv($output, $record, $csv_delimiter);
66
+ }
67
+ fclose($output);
68
+
69
+ if($send_header == 1){
70
+ $txtfile = fopen($tempfile, "r");
71
+ $txtfilecontent = fread($txtfile, filesize($tempfile));
72
+ fclose($txtfile);
73
+
74
+ $filename = $title . "_" . date('Ymd') . ".csv";
75
+ header('Content-Encoding: Windows-1252');
76
+ header('Content-type: text/csv; charset=Windows-1252');
77
+ header("Content-Disposition: attachment; filename=\"$filename\"");
78
+
79
+ echo $txtfilecontent;
80
+ unlink($tempfile);
81
+ die();
82
+ }
83
+
84
+ }
85
+
86
+ ////////////////////////////////////////////////////////////////////////////////////////
87
+ // Getters & Setters //
88
+ ////////////////////////////////////////////////////////////////////////////////////////
89
+ ////////////////////////////////////////////////////////////////////////////////////////
90
+ // Private Methods //
91
+ ////////////////////////////////////////////////////////////////////////////////////////
92
+ ////////////////////////////////////////////////////////////////////////////////////////
93
+ // Listeners //
94
+ ////////////////////////////////////////////////////////////////////////////////////////
95
  }
admin/views/FMViewGenerete_xml.php CHANGED
@@ -1,86 +1,86 @@
1
- <?php
2
-
3
- class FMViewGenerete_xml {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $model;
14
-
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- // Constructor & Destructor //
17
- ////////////////////////////////////////////////////////////////////////////////////////
18
- public function __construct($model) {
19
- $this->model = $model;
20
- }
21
-
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Public Methods //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
- public function display() {
26
- $form_id = (int)$_REQUEST['form_id'];
27
- $params = $this->model->get_data();
28
- $limitstart = (int)$_REQUEST['limitstart'];
29
- $send_header = (int)$_REQUEST['send_header'];
30
- $data = $params[0];
31
- $title = $params[1];
32
- define('PHP_TAB', "\t");
33
-
34
- $upload_dir = wp_upload_dir();
35
- $file_path = $upload_dir['basedir'] . '/form-maker';
36
- if (!is_dir($file_path)) {
37
- mkdir($file_path, 0777);
38
- }
39
- $tempfile = $file_path.'/export'.$form_id.'.txt';
40
- if($limitstart == 0 && file_exists ($tempfile))
41
- unlink($tempfile);
42
- $output = fopen($tempfile, "a");
43
- if($limitstart == 0) {
44
- fwrite($output, '<?xml version="1.0" encoding="utf-8" ?>'.PHP_EOL);
45
- fwrite($output, '<form title="'.$title.'">'.PHP_EOL);
46
- }
47
-
48
- foreach ($data as $key1 => $value1) {
49
- fwrite($output, PHP_TAB.'<submission id="'.$key1.'">'.PHP_EOL);
50
- foreach ($value1 as $key => $value) {
51
- fwrite($output, PHP_TAB.PHP_TAB.'<field title="'.$key.'">'.PHP_EOL);
52
- fwrite($output, PHP_TAB.PHP_TAB.PHP_TAB.'<![CDATA['.$value.']]>'.PHP_EOL);
53
- fwrite($output, PHP_TAB.PHP_TAB.'</field>'.PHP_EOL);
54
- }
55
- fwrite($output, PHP_TAB.'</submission>'.PHP_EOL);
56
- }
57
-
58
- if($send_header == 1){
59
- fwrite($output, '</form>');
60
- fclose($output);
61
-
62
- $txtfile = fopen($tempfile, "r");
63
- $txtfilecontent = fread($txtfile, filesize($tempfile));
64
- fclose($txtfile);
65
- $filename = $title . "_" . date('Ymd') . ".xml";
66
- header('Content-Encoding: Windows-1252');
67
- header('Content-type: text/xml; charset=utf-8');
68
- header("Content-Disposition: attachment; filename=\"$filename\"");
69
-
70
- echo $txtfilecontent;
71
- unlink($tempfile);
72
- die();
73
- }
74
-
75
- }
76
-
77
- ////////////////////////////////////////////////////////////////////////////////////////
78
- // Getters & Setters //
79
- ////////////////////////////////////////////////////////////////////////////////////////
80
- ////////////////////////////////////////////////////////////////////////////////////////
81
- // Private Methods //
82
- ////////////////////////////////////////////////////////////////////////////////////////
83
- ////////////////////////////////////////////////////////////////////////////////////////
84
- // Listeners //
85
- ////////////////////////////////////////////////////////////////////////////////////////
86
  }
1
+ <?php
2
+
3
+ class FMViewGenerete_xml {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ private $model;
14
+
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ // Constructor & Destructor //
17
+ ////////////////////////////////////////////////////////////////////////////////////////
18
+ public function __construct($model) {
19
+ $this->model = $model;
20
+ }
21
+
22
+ ////////////////////////////////////////////////////////////////////////////////////////
23
+ // Public Methods //
24
+ ////////////////////////////////////////////////////////////////////////////////////////
25
+ public function display() {
26
+ $form_id = (int)$_REQUEST['form_id'];
27
+ $params = $this->model->get_data();
28
+ $limitstart = (int)$_REQUEST['limitstart'];
29
+ $send_header = (int)$_REQUEST['send_header'];
30
+ $data = $params[0];
31
+ $title = $params[1];
32
+ define('PHP_TAB', "\t");
33
+
34
+ $upload_dir = wp_upload_dir();
35
+ $file_path = $upload_dir['basedir'] . '/form-maker';
36
+ if (!is_dir($file_path)) {
37
+ mkdir($file_path, 0777);
38
+ }
39
+ $tempfile = $file_path.'/export'.$form_id.'.txt';
40
+ if($limitstart == 0 && file_exists ($tempfile))
41
+ unlink($tempfile);
42
+ $output = fopen($tempfile, "a");
43
+ if($limitstart == 0) {
44
+ fwrite($output, '<?xml version="1.0" encoding="utf-8" ?>'.PHP_EOL);
45
+ fwrite($output, '<form title="'.$title.'">'.PHP_EOL);
46
+ }
47
+
48
+ foreach ($data as $key1 => $value1) {
49
+ fwrite($output, PHP_TAB.'<submission id="'.$key1.'">'.PHP_EOL);
50
+ foreach ($value1 as $key => $value) {
51
+ fwrite($output, PHP_TAB.PHP_TAB.'<field title="'.$key.'">'.PHP_EOL);
52
+ fwrite($output, PHP_TAB.PHP_TAB.PHP_TAB.'<![CDATA['.$value.']]>'.PHP_EOL);
53
+ fwrite($output, PHP_TAB.PHP_TAB.'</field>'.PHP_EOL);
54
+ }
55
+ fwrite($output, PHP_TAB.'</submission>'.PHP_EOL);
56
+ }
57
+
58
+ if($send_header == 1){
59
+ fwrite($output, '</form>');
60
+ fclose($output);
61
+
62
+ $txtfile = fopen($tempfile, "r");
63
+ $txtfilecontent = fread($txtfile, filesize($tempfile));
64
+ fclose($txtfile);
65
+ $filename = $title . "_" . date('Ymd') . ".xml";
66
+ header('Content-Encoding: Windows-1252');
67
+ header('Content-type: text/xml; charset=utf-8');
68
+ header("Content-Disposition: attachment; filename=\"$filename\"");
69
+
70
+ echo $txtfilecontent;
71
+ unlink($tempfile);
72
+ die();
73
+ }
74
+
75
+ }
76
+
77
+ ////////////////////////////////////////////////////////////////////////////////////////
78
+ // Getters & Setters //
79
+ ////////////////////////////////////////////////////////////////////////////////////////
80
+ ////////////////////////////////////////////////////////////////////////////////////////
81
+ // Private Methods //
82
+ ////////////////////////////////////////////////////////////////////////////////////////
83
+ ////////////////////////////////////////////////////////////////////////////////////////
84
+ // Listeners //
85
+ ////////////////////////////////////////////////////////////////////////////////////////
86
  }
admin/views/FMViewManage_fm.php CHANGED
@@ -3886,7 +3886,8 @@ class FMViewManage_fm {
3886
  $all_ids = array();
3887
  $all_labels = array();
3888
 
3889
- $select_and_input = array("type_text", "type_password", "type_textarea", "type_name", "type_number", "type_phone", "type_submitter_mail", "type_address", "type_spinner", "type_checkbox", "type_radio", "type_own_select", "type_paypal_price", "type_paypal_select", "type_paypal_checkbox", "type_paypal_radio", "type_paypal_shipping");
 
3890
  $select_type_fields = array("type_address", "type_checkbox", "type_radio", "type_own_select", "type_paypal_select", "type_paypal_checkbox", "type_paypal_radio", "type_paypal_shipping");
3891
 
3892
  $fields=explode('*:*new_field*:*',$row->form_fields);
3886
  $all_ids = array();
3887
  $all_labels = array();
3888
 
3889
+ $select_and_input = array("type_text", "type_password", "type_textarea", "type_name", "type_number", "type_phone", "type_submitter_mail", "type_address", "type_spinner", "type_checkbox", "type_radio", "type_own_select", "type_paypal_price", "type_paypal_select", "type_paypal_checkbox", "type_paypal_radio", "type_paypal_shipping", "type_date_new");
3890
+
3891
  $select_type_fields = array("type_address", "type_checkbox", "type_radio", "type_own_select", "type_paypal_select", "type_paypal_checkbox", "type_paypal_radio", "type_paypal_shipping");
3892
 
3893
  $fields=explode('*:*new_field*:*',$row->form_fields);
admin/views/FMViewShow_matrix.php CHANGED
@@ -1,127 +1,127 @@
1
- <?php
2
-
3
- class FMViewShow_matrix {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $model;
14
-
15
-
16
- ////////////////////////////////////////////////////////////////////////////////////////
17
- // Constructor & Destructor //
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- public function __construct($model) {
20
- $this->model = $model;
21
- }
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Public Methods //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
- public function display() {
26
- $matrix_params = ((isset($_GET['matrix_params'])) ? esc_html(stripslashes($_GET['matrix_params'])) : 0);
27
- $new_filename = str_replace("***matrix***", '', $matrix_params);
28
- $new_filename = explode('***', $matrix_params);
29
- $mat_params = array_slice($new_filename, 0, count($new_filename) - 1);
30
- $mat_rows = $mat_params[0];
31
- $mat_columns = $mat_params[$mat_rows + 1];
32
- ?>
33
- <table style="margin: 0 auto;">
34
- <tr>
35
- <td></td>
36
- <?php
37
- for ($k = 1; $k <= $mat_columns; $k++) {
38
- ?>
39
- <td style="background-color: #BBBBBB; padding: 5px;"><?php echo $mat_params[$mat_rows + 1 + $k]; ?></td>
40
- <?php
41
- }
42
- ?>
43
- </tr>
44
- <?php
45
- $aaa = Array();
46
- $var_checkbox = 1;
47
- for ($k = 1; $k <= $mat_rows; $k++) {
48
- ?>
49
- <tr>
50
- <td style="background-color: #BBBBBB; padding: 5px; "><?php echo $mat_params[$k]; ?></td>
51
- <?php
52
- if ($mat_params[$mat_rows + $mat_columns + 2] == "radio") {
53
- if ($mat_params[$mat_rows + $mat_columns + 2 + $k] == 0) {
54
- $checked = 0;
55
- $aaa[1] = "";
56
- }
57
- else {
58
- $aaa = explode("_", $mat_params[$mat_rows + $mat_columns + 2 + $k]);
59
- }
60
- for ($l = 1; $l <= $mat_columns; $l++) {
61
- if ($aaa[1] == $l) {
62
- $checked = "checked";
63
- }
64
- else {
65
- $checked = "";
66
- }
67
- ?>
68
- <td style="text-align: center;"><input type="radio" <?php echo $checked; ?> disabled /></td>
69
- <?php
70
- }
71
- }
72
- else {
73
- if ($mat_params[$mat_rows + $mat_columns + 2] == "checkbox") {
74
- for ($l = 1; $l <= $mat_columns; $l++) {
75
- if ($mat_params[$mat_rows+$mat_columns + 2 + $var_checkbox] == "1") {
76
- $checked = "checked";
77
- }
78
- else {
79
- $checked = "";
80
- }
81
- ?>
82
- <td style="text-align:center"><input type="checkbox" <?php echo $checked; ?> disabled /></td>
83
- <?php
84
- $var_checkbox++;
85
- }
86
- }
87
- else {
88
- if ($mat_params[$mat_rows + $mat_columns + 2] == "text") {
89
- for ($l = 1; $l <= $mat_columns; $l++) {
90
- $checked = $mat_params[$mat_rows + $mat_columns + 2 + $var_checkbox];
91
- ?>
92
- <td style="text-align:center"><input type="text" value="<?php echo $checked; ?>" disabled /></td>
93
- <?php
94
- $var_checkbox++;
95
- }
96
- }
97
- else {
98
- for ($l = 1; $l <= $mat_columns; $l++) {
99
- $checked = $mat_params[$mat_rows + $mat_columns + 2 + $var_checkbox];
100
- ?>
101
- <td style="text-align: center;"><?php echo $checked; ?></td>
102
- <?php
103
- $var_checkbox++;
104
- }
105
- }
106
- }
107
- }
108
- ?>
109
- </tr>
110
- <?php
111
- }
112
- ?>
113
- </table>
114
- <?php
115
- die();
116
- }
117
-
118
- ////////////////////////////////////////////////////////////////////////////////////////
119
- // Getters & Setters //
120
- ////////////////////////////////////////////////////////////////////////////////////////
121
- ////////////////////////////////////////////////////////////////////////////////////////
122
- // Private Methods //
123
- ////////////////////////////////////////////////////////////////////////////////////////
124
- ////////////////////////////////////////////////////////////////////////////////////////
125
- // Listeners //
126
- ////////////////////////////////////////////////////////////////////////////////////////
127
  }
1
+ <?php
2
+
3
+ class FMViewShow_matrix {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ private $model;
14
+
15
+
16
+ ////////////////////////////////////////////////////////////////////////////////////////
17
+ // Constructor & Destructor //
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ public function __construct($model) {
20
+ $this->model = $model;
21
+ }
22
+ ////////////////////////////////////////////////////////////////////////////////////////
23
+ // Public Methods //
24
+ ////////////////////////////////////////////////////////////////////////////////////////
25
+ public function display() {
26
+ $matrix_params = ((isset($_GET['matrix_params'])) ? esc_html(stripslashes($_GET['matrix_params'])) : 0);
27
+ $new_filename = str_replace("***matrix***", '', $matrix_params);
28
+ $new_filename = explode('***', $matrix_params);
29
+ $mat_params = array_slice($new_filename, 0, count($new_filename) - 1);
30
+ $mat_rows = $mat_params[0];
31
+ $mat_columns = $mat_params[$mat_rows + 1];
32
+ ?>
33
+ <table style="margin: 0 auto;">
34
+ <tr>
35
+ <td></td>
36
+ <?php
37
+ for ($k = 1; $k <= $mat_columns; $k++) {
38
+ ?>
39
+ <td style="background-color: #BBBBBB; padding: 5px;"><?php echo $mat_params[$mat_rows + 1 + $k]; ?></td>
40
+ <?php
41
+ }
42
+ ?>
43
+ </tr>
44
+ <?php
45
+ $aaa = Array();
46
+ $var_checkbox = 1;
47
+ for ($k = 1; $k <= $mat_rows; $k++) {
48
+ ?>
49
+ <tr>
50
+ <td style="background-color: #BBBBBB; padding: 5px; "><?php echo $mat_params[$k]; ?></td>
51
+ <?php
52
+ if ($mat_params[$mat_rows + $mat_columns + 2] == "radio") {
53
+ if ($mat_params[$mat_rows + $mat_columns + 2 + $k] == 0) {
54
+ $checked = 0;
55
+ $aaa[1] = "";
56
+ }
57
+ else {
58
+ $aaa = explode("_", $mat_params[$mat_rows + $mat_columns + 2 + $k]);
59
+ }
60
+ for ($l = 1; $l <= $mat_columns; $l++) {
61
+ if ($aaa[1] == $l) {
62
+ $checked = "checked";
63
+ }
64
+ else {
65
+ $checked = "";
66
+ }
67
+ ?>
68
+ <td style="text-align: center;"><input type="radio" <?php echo $checked; ?> disabled /></td>
69
+ <?php
70
+ }
71
+ }
72
+ else {
73
+ if ($mat_params[$mat_rows + $mat_columns + 2] == "checkbox") {
74
+ for ($l = 1; $l <= $mat_columns; $l++) {
75
+ if ($mat_params[$mat_rows+$mat_columns + 2 + $var_checkbox] == "1") {
76
+ $checked = "checked";
77
+ }
78
+ else {
79
+ $checked = "";
80
+ }
81
+ ?>
82
+ <td style="text-align:center"><input type="checkbox" <?php echo $checked; ?> disabled /></td>
83
+ <?php
84
+ $var_checkbox++;
85
+ }
86
+ }
87
+ else {
88
+ if ($mat_params[$mat_rows + $mat_columns + 2] == "text") {
89
+ for ($l = 1; $l <= $mat_columns; $l++) {
90
+ $checked = $mat_params[$mat_rows + $mat_columns + 2 + $var_checkbox];
91
+ ?>
92
+ <td style="text-align:center"><input type="text" value="<?php echo $checked; ?>" disabled /></td>
93
+ <?php
94
+ $var_checkbox++;
95
+ }
96
+ }
97
+ else {
98
+ for ($l = 1; $l <= $mat_columns; $l++) {
99
+ $checked = $mat_params[$mat_rows + $mat_columns + 2 + $var_checkbox];
100
+ ?>
101
+ <td style="text-align: center;"><?php echo $checked; ?></td>
102
+ <?php
103
+ $var_checkbox++;
104
+ }
105
+ }
106
+ }
107
+ }
108
+ ?>
109
+ </tr>
110
+ <?php
111
+ }
112
+ ?>
113
+ </table>
114
+ <?php
115
+ die();
116
+ }
117
+
118
+ ////////////////////////////////////////////////////////////////////////////////////////
119
+ // Getters & Setters //
120
+ ////////////////////////////////////////////////////////////////////////////////////////
121
+ ////////////////////////////////////////////////////////////////////////////////////////
122
+ // Private Methods //
123
+ ////////////////////////////////////////////////////////////////////////////////////////
124
+ ////////////////////////////////////////////////////////////////////////////////////////
125
+ // Listeners //
126
+ ////////////////////////////////////////////////////////////////////////////////////////
127
  }
admin/views/FMViewSubmissions_fm.php CHANGED
@@ -679,7 +679,7 @@ class FMViewSubmissions_fm {
679
  elseif (strpos($temp[$g]->element_value, "***matrix***")) {
680
  ?>
681
  <td class="table_large_col <?php echo $sorted_labels_id[$h];?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?>>
682
- <a class="thickbox-preview" href="<?php echo add_query_arg(array('action' => 'show_matrix', 'matrix_params' => str_replace('#','%23',$temp[$g]->element_value), 'width' => '620', 'height' => '550', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" title="Show Matrix">Show Matrix</a>
683
  </td>
684
  <?php
685
  }
679
  elseif (strpos($temp[$g]->element_value, "***matrix***")) {
680
  ?>
681
  <td class="table_large_col <?php echo $sorted_labels_id[$h];?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?>>
682
+ <a class="thickbox-preview" href="<?php echo add_query_arg(array('action' => 'show_matrix', 'matrix_params' => str_replace('#','%23', urlencode($temp[$g]->element_value)), 'width' => '620', 'height' => '550', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" title="Show Matrix">Show Matrix</a>
683
  </td>
684
  <?php
685
  }
admin/views/FMViewWidget.php CHANGED
@@ -1,83 +1,83 @@
1
- <?php
2
-
3
- class FMViewWidget {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $model;
14
-
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- // Constructor & Destructor //
17
- ////////////////////////////////////////////////////////////////////////////////////////
18
- public function __construct($model) {
19
- $this->model = $model;
20
- }
21
- ////////////////////////////////////////////////////////////////////////////////////////
22
- // Public Methods //
23
- ////////////////////////////////////////////////////////////////////////////////////////
24
-
25
- public function display() {
26
- }
27
-
28
- function widget($args, $instance) {
29
- extract($args);
30
- $title = $instance['title'];
31
- $form_id = (isset($instance['form_id']) ? $instance['form_id'] : 0);
32
- // Before widget.
33
- echo $before_widget;
34
- // Title of widget.
35
- if ($title) {
36
- echo $before_title . $title . $after_title;
37
- }
38
- // Widget output.
39
- require_once(WD_FM_DIR . '/frontend/controllers/FMControllerForm_maker.php');
40
- $controller_class = 'FMControllerForm_maker';
41
- $controller = new $controller_class();
42
- echo $controller->execute($instance['form_id']);
43
- // After widget.
44
- echo $after_widget;
45
- }
46
-
47
- // Widget Control Panel.
48
- function form($instance, $id_title, $name_title, $id_form_id, $name_form_id) {
49
- $defaults = array(
50
- 'title' => '',
51
- 'form_id' => 0
52
- );
53
- $instance = wp_parse_args((array)$instance, $defaults);
54
- global $wpdb; ?>
55
- <p>
56
- <label for="<?php echo $id_title; ?>">Title:</label>
57
- <input class="widefat" id="<?php echo $id_title; ?>" name="<?php echo $name_title; ?>" type="text" value="<?php echo $instance['title']; ?>"/>
58
- <label for="<?php echo $id_form_id; ?>">Select a form:</label>
59
- <select name="<?php echo $name_form_id; ?>" id="<?php echo $id_form_id; ?>" style="width:225px;text-align:center;">
60
- <option style="text-align:center" value="0">- Select a Form -</option>
61
- <?php
62
- $ids_Form_Maker = $this->model->get_gallery_rows_data();
63
- foreach ($ids_Form_Maker as $arr_Form_Maker) {
64
- ?>
65
- <option value="<?php echo $arr_Form_Maker->id; ?>" <?php if ($arr_Form_Maker->id == $instance['form_id']) {
66
- echo "SELECTED";
67
- } ?>><?php echo $arr_Form_Maker->title; ?></option>
68
- <?php }?>
69
- </select>
70
- </p>
71
- <?php
72
- }
73
-
74
- ////////////////////////////////////////////////////////////////////////////////////////
75
- // Getters & Setters //
76
- ////////////////////////////////////////////////////////////////////////////////////////
77
- ////////////////////////////////////////////////////////////////////////////////////////
78
- // Private Methods //
79
- ////////////////////////////////////////////////////////////////////////////////////////
80
- ////////////////////////////////////////////////////////////////////////////////////////
81
- // Listeners //
82
- ////////////////////////////////////////////////////////////////////////////////////////
83
  }
1
+ <?php
2
+
3
+ class FMViewWidget {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ private $model;
14
+
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ // Constructor & Destructor //
17
+ ////////////////////////////////////////////////////////////////////////////////////////
18
+ public function __construct($model) {
19
+ $this->model = $model;
20
+ }
21
+ ////////////////////////////////////////////////////////////////////////////////////////
22
+ // Public Methods //
23
+ ////////////////////////////////////////////////////////////////////////////////////////
24
+
25
+ public function display() {
26
+ }
27
+
28
+ function widget($args, $instance) {
29
+ extract($args);
30
+ $title = $instance['title'];
31
+ $form_id = (isset($instance['form_id']) ? $instance['form_id'] : 0);
32
+ // Before widget.
33
+ echo $before_widget;
34
+ // Title of widget.
35
+ if ($title) {
36
+ echo $before_title . $title . $after_title;
37
+ }
38
+ // Widget output.
39
+ require_once(WD_FM_DIR . '/frontend/controllers/FMControllerForm_maker.php');
40
+ $controller_class = 'FMControllerForm_maker';
41
+ $controller = new $controller_class();
42
+ echo $controller->execute($instance['form_id']);
43
+ // After widget.
44
+ echo $after_widget;
45
+ }
46
+
47
+ // Widget Control Panel.
48
+ function form($instance, $id_title, $name_title, $id_form_id, $name_form_id) {
49
+ $defaults = array(
50
+ 'title' => '',
51
+ 'form_id' => 0
52
+ );
53
+ $instance = wp_parse_args((array)$instance, $defaults);
54
+ global $wpdb; ?>
55
+ <p>
56
+ <label for="<?php echo $id_title; ?>">Title:</label>
57
+ <input class="widefat" id="<?php echo $id_title; ?>" name="<?php echo $name_title; ?>" type="text" value="<?php echo $instance['title']; ?>"/>
58
+ <label for="<?php echo $id_form_id; ?>">Select a form:</label>
59
+ <select name="<?php echo $name_form_id; ?>" id="<?php echo $id_form_id; ?>" style="width:225px;text-align:center;">
60
+ <option style="text-align:center" value="0">- Select a Form -</option>
61
+ <?php
62
+ $ids_Form_Maker = $this->model->get_gallery_rows_data();
63
+ foreach ($ids_Form_Maker as $arr_Form_Maker) {
64
+ ?>
65
+ <option value="<?php echo $arr_Form_Maker->id; ?>" <?php if ($arr_Form_Maker->id == $instance['form_id']) {
66
+ echo "SELECTED";
67
+ } ?>><?php echo $arr_Form_Maker->title; ?></option>
68
+ <?php }?>
69
+ </select>
70
+ </p>
71
+ <?php
72
+ }
73
+
74
+ ////////////////////////////////////////////////////////////////////////////////////////
75
+ // Getters & Setters //
76
+ ////////////////////////////////////////////////////////////////////////////////////////
77
+ ////////////////////////////////////////////////////////////////////////////////////////
78
+ // Private Methods //
79
+ ////////////////////////////////////////////////////////////////////////////////////////
80
+ ////////////////////////////////////////////////////////////////////////////////////////
81
+ // Listeners //
82
+ ////////////////////////////////////////////////////////////////////////////////////////
83
  }
css/calendar-jos.css CHANGED
@@ -1,208 +1,208 @@
1
- /* The main calendar widget. DIV containing a table. */
2
-
3
- /* Form Wordpress. */
4
- .calendar .button {
5
- display: table-cell !important;
6
- }
7
-
8
- div.calendar {
9
- position: relative;
10
- z-index: 100;
11
- width: 326px;
12
- }
13
-
14
- .calendar,
15
- .calendar table {
16
- border: 1px solid #cccccc;
17
- font-size: 11px;
18
- color: #000;
19
- cursor: default;
20
- background: #efefef;
21
- font-family: arial,verdana,sans-serif;
22
- margin: 0;
23
- line-height: 1.7;
24
- }
25
-
26
- /* Header part -- contains navigation buttons and day names. */
27
- .calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
28
- text-align: center; /* They are the navigation buttons */
29
- padding: 2px; /* Make the buttons seem like they're pressing */
30
- border:0px;
31
- height:inherit;
32
-
33
- }
34
-
35
- .wdform_table1 .button,
36
- #formMakerDiv1 .button,
37
- .submitdate_fc .button,
38
- .main .button {
39
- -webkit-border-radius: 11px !important;;
40
- border-radius: 11px !important;;
41
- text-shadow: white 0px 1px 0px;
42
- background-origin: padding-box;
43
- border-bottom-width: 1px;
44
- border-left-width: 1px;
45
- border-right-width: 1px;
46
- border-top-width: 1px;
47
- }
48
-
49
- .calendar thead .title { /* This holds the current "month, year" */
50
- font-weight: bold; /* Pressing it will take you to the current date */
51
- text-align: center;
52
- background: #333333;
53
- color: #ffffff;
54
- padding: 2px;
55
- }
56
-
57
- .calendar thead .headrow { /* Row <TR> containing navigation buttons */
58
- background: #dedede;
59
- color: #000;
60
- }
61
-
62
- .calendar thead .name { /* Cells <TD> containing the day names */
63
- border-bottom: 1px solid #cccccc;
64
- padding: 2px;
65
- text-align: center;
66
- color: #000;
67
- }
68
-
69
- .calendar thead .weekend { /* How a weekend day name shows in header */
70
- color:#666666 !important;
71
- }
72
-
73
- .calendar thead .hilite { /* How do the buttons in header appear when hover */
74
- background: #bbbbbb;
75
- color: #000000;
76
- border: 1px solid #cccccc;
77
- padding: 1px;
78
- }
79
-
80
- .calendar thead .active { /* Active (pressed) buttons in header */
81
- background: #c77;
82
- padding: 2px 0px 0px 2px;
83
- }
84
-
85
- .calendar thead .daynames { /* Row <TR> containing the day names */
86
- background: #dddddd;
87
- }
88
-
89
- /* The body part -- contains all the days in month. */
90
-
91
- .calendar tbody .day { /* Cells <TD> containing month days dates */
92
- width: 2em;
93
- text-align: right;
94
- padding: 2px 4px 2px 2px;
95
- }
96
-
97
- .calendar table .wn {
98
- padding: 2px 3px 2px 2px;
99
- border-right: 1px solid #cccccc;
100
- background: #dddddd;
101
- }
102
-
103
- .calendar tbody .rowhilite td {
104
- background: #666666;
105
- color: #ffffff;
106
- }
107
-
108
- .calendar tbody .rowhilite td.wn {
109
- background: #666666;
110
- color: #ffffff;
111
- }
112
- .calendar table
113
- {
114
- border-collapse:inherit !important;
115
- }
116
-
117
- .calendar tbody td.hilite { /* Hovered cells <TD> */
118
- background: #999999;
119
- padding: 1px 3px 1px 1px;
120
- border: 1px solid #666666;
121
- }
122
-
123
- .calendar tbody td.active { /* Active (pressed) cells <TD> */
124
- background: #000000;
125
- color: #ffffff;
126
- padding: 2px 2px 0px 2px;
127
- }
128
-
129
- .calendar tbody td.selected { /* Cell showing today date */
130
- font-weight: bold;
131
- border: 1px solid #000;
132
- padding: 1px 3px 1px 1px;
133
- background: #000000;
134
- color: #ffffff;
135
- }
136
-
137
- .calendar tbody td.weekend { /* Cells showing weekend days */
138
- color: #cccccc;
139
- }
140
-
141
- .calendar tbody td.today { font-weight: bold; }
142
-
143
- .calendar tbody .disabled { color: #999; }
144
-
145
- .calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
146
- visibility: hidden;
147
- padding: 0;
148
- }
149
-
150
- .calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
151
- display: none;
152
- }
153
-
154
- /* The footer part -- status bar and "Close" button */
155
-
156
- .calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
157
- text-align: center;
158
- background: #cccccc;
159
- color: #000;
160
- }
161
-
162
- .calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
163
- border-top: 1px solid #cccccc;
164
- background: #efefef;
165
- color: #000000;
166
- }
167
-
168
- .calendar tfoot .hilite { /* Hover style for buttons in footer */
169
- background: #666666;
170
- border: 1px solid #f40;
171
- padding: 1px;
172
- }
173
-
174
- .calendar tfoot .active { /* Active (pressed) style for buttons in footer */
175
- background: #999999;
176
- padding: 2px 0px 0px 2px;
177
- }
178
-
179
- /* Combo boxes (menus that display months/years for direct selection) */
180
- .combo {
181
- position: absolute;
182
- display: none;
183
- top: 0px;
184
- left: 0px;
185
- width: 4em;
186
- cursor: default;
187
- border: 1px solid #655;
188
- background: #ffffff;
189
- color: #000;
190
- font-size: smaller;
191
- }
192
-
193
- .combo .label {
194
- width: 100%;
195
- text-align: center;
196
- }
197
-
198
- .combo .hilite {
199
- background: #fc8;
200
- }
201
-
202
- .combo .active {
203
- border-top: 1px solid #cccccc;
204
- border-bottom: 1px solid #cccccc;
205
- background: #efefef;
206
- font-weight: bold;
207
-
208
- }
1
+ /* The main calendar widget. DIV containing a table. */
2
+
3
+ /* Form Wordpress. */
4
+ .calendar .button {
5
+ display: table-cell !important;
6
+ }
7
+
8
+ div.calendar {
9
+ position: relative;
10
+ z-index: 100;
11
+ width: 326px;
12
+ }
13
+
14
+ .calendar,
15
+ .calendar table {
16
+ border: 1px solid #cccccc;
17
+ font-size: 11px;
18
+ color: #000;
19
+ cursor: default;
20
+ background: #efefef;
21
+ font-family: arial,verdana,sans-serif;
22
+ margin: 0;
23
+ line-height: 1.7;
24
+ }
25
+
26
+ /* Header part -- contains navigation buttons and day names. */
27
+ .calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
28
+ text-align: center; /* They are the navigation buttons */
29
+ padding: 2px; /* Make the buttons seem like they're pressing */
30
+ border:0px;
31
+ height:inherit;
32
+
33
+ }
34
+
35
+ .wdform_table1 .button,
36
+ #formMakerDiv1 .button,
37
+ .submitdate_fc .button,
38
+ .main .button {
39
+ -webkit-border-radius: 11px !important;;
40
+ border-radius: 11px !important;;
41
+ text-shadow: white 0px 1px 0px;
42
+ background-origin: padding-box;
43
+ border-bottom-width: 1px;
44
+ border-left-width: 1px;
45
+ border-right-width: 1px;
46
+ border-top-width: 1px;
47
+ }
48
+
49
+ .calendar thead .title { /* This holds the current "month, year" */
50
+ font-weight: bold; /* Pressing it will take you to the current date */
51
+ text-align: center;
52
+ background: #333333;
53
+ color: #ffffff;
54
+ padding: 2px;
55
+ }
56
+
57
+ .calendar thead .headrow { /* Row <TR> containing navigation buttons */
58
+ background: #dedede;
59
+ color: #000;
60
+ }
61
+
62
+ .calendar thead .name { /* Cells <TD> containing the day names */
63
+ border-bottom: 1px solid #cccccc;
64
+ padding: 2px;
65
+ text-align: center;
66
+ color: #000;
67
+ }
68
+
69
+ .calendar thead .weekend { /* How a weekend day name shows in header */
70
+ color:#666666 !important;
71
+ }
72
+
73
+ .calendar thead .hilite { /* How do the buttons in header appear when hover */
74
+ background: #bbbbbb;
75
+ color: #000000;
76
+ border: 1px solid #cccccc;
77
+ padding: 1px;
78
+ }
79
+
80
+ .calendar thead .active { /* Active (pressed) buttons in header */
81
+ background: #c77;
82
+ padding: 2px 0px 0px 2px;
83
+ }
84
+
85
+ .calendar thead .daynames { /* Row <TR> containing the day names */
86
+ background: #dddddd;
87
+ }
88
+
89
+ /* The body part -- contains all the days in month. */
90
+
91
+ .calendar tbody .day { /* Cells <TD> containing month days dates */
92
+ width: 2em;
93
+ text-align: right;
94
+ padding: 2px 4px 2px 2px;
95
+ }
96
+
97
+ .calendar table .wn {
98
+ padding: 2px 3px 2px 2px;
99
+ border-right: 1px solid #cccccc;
100
+ background: #dddddd;
101
+ }
102
+
103
+ .calendar tbody .rowhilite td {
104
+ background: #666666;
105
+ color: #ffffff;
106
+ }
107
+
108
+ .calendar tbody .rowhilite td.wn {
109
+ background: #666666;
110
+ color: #ffffff;
111
+ }
112
+ .calendar table
113
+ {
114
+ border-collapse:inherit !important;
115
+ }
116
+
117
+ .calendar tbody td.hilite { /* Hovered cells <TD> */
118
+ background: #999999;
119
+ padding: 1px 3px 1px 1px;
120
+ border: 1px solid #666666;
121
+ }
122
+
123
+ .calendar tbody td.active { /* Active (pressed) cells <TD> */
124
+ background: #000000;
125
+ color: #ffffff;
126
+ padding: 2px 2px 0px 2px;
127
+ }
128
+
129
+ .calendar tbody td.selected { /* Cell showing today date */
130
+ font-weight: bold;
131
+ border: 1px solid #000;
132
+ padding: 1px 3px 1px 1px;
133
+ background: #000000;
134
+ color: #ffffff;
135
+ }
136
+
137
+ .calendar tbody td.weekend { /* Cells showing weekend days */
138
+ color: #cccccc;
139
+ }
140
+
141
+ .calendar tbody td.today { font-weight: bold; }
142
+
143
+ .calendar tbody .disabled { color: #999; }
144
+
145
+ .calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
146
+ visibility: hidden;
147
+ padding: 0;
148
+ }
149
+
150
+ .calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
151
+ display: none;
152
+ }
153
+
154
+ /* The footer part -- status bar and "Close" button */
155
+
156
+ .calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
157
+ text-align: center;
158
+ background: #cccccc;
159
+ color: #000;
160
+ }
161
+
162
+ .calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
163
+ border-top: 1px solid #cccccc;
164
+ background: #efefef;
165
+ color: #000000;
166
+ }
167
+
168
+ .calendar tfoot .hilite { /* Hover style for buttons in footer */
169
+ background: #666666;
170
+ border: 1px solid #f40;
171
+ padding: 1px;
172
+ }
173
+
174
+ .calendar tfoot .active { /* Active (pressed) style for buttons in footer */
175
+ background: #999999;
176
+ padding: 2px 0px 0px 2px;
177
+ }
178
+
179
+ /* Combo boxes (menus that display months/years for direct selection) */
180
+ .combo {
181
+ position: absolute;
182
+ display: none;
183
+ top: 0px;
184
+ left: 0px;
185
+ width: 4em;
186
+ cursor: default;
187
+ border: 1px solid #655;
188
+ background: #ffffff;
189
+ color: #000;
190
+ font-size: smaller;
191
+ }
192
+
193
+ .combo .label {
194
+ width: 100%;
195
+ text-align: center;
196
+ }
197
+
198
+ .combo .hilite {
199
+ background: #fc8;
200
+ }
201
+
202
+ .combo .active {
203
+ border-top: 1px solid #cccccc;
204
+ border-bottom: 1px solid #cccccc;
205
+ background: #efefef;
206
+ font-weight: bold;
207
+
208
+ }
css/codemirror.css CHANGED
@@ -1,168 +1,168 @@
1
- .CodeMirror {
2
- line-height: 1em;
3
- font-family: monospace;
4
-
5
- /* Necessary so the scrollbar can be absolutely positioned within the wrapper on Lion. */
6
- position: relative;
7
- /* This prevents unwanted scrollbars from showing up on the body and wrapper in IE. */
8
- overflow: hidden;
9
- }
10
-
11
- .CodeMirror-scroll {
12
- overflow-x: auto;
13
- overflow-y: hidden;
14
- height: 400px;
15
- /* This is needed to prevent an IE[67] bug where the scrolled content
16
- is visible outside of the scrolling box. */
17
- position: relative;
18
- outline: none;
19
- }
20
-
21
- /* Vertical scrollbar */
22
- .CodeMirror-scrollbar {
23
- float: right;
24
- overflow-x: hidden;
25
- overflow-y: scroll;
26
-
27
- /* This corrects for the 1px gap introduced to the left of the scrollbar
28
- by the rule for .CodeMirror-scrollbar-inner. */
29
- margin-left: -1px;
30
- }
31
- .CodeMirror-scrollbar-inner {
32
- /* This needs to have a nonzero width in order for the scrollbar to appear
33
- in Firefox and IE9. */
34
- width: 1px;
35
- }
36
- .CodeMirror-scrollbar.cm-sb-overlap {
37
- /* Ensure that the scrollbar appears in Lion, and that it overlaps the content
38
- rather than sitting to the right of it. */
39
- position: absolute;
40
- z-index: 1;
41
- float: none;
42
- right: 0;
43
- min-width: 12px;
44
- }
45
- .CodeMirror-scrollbar.cm-sb-nonoverlap {
46
- min-width: 12px;
47
- }
48
- .CodeMirror-scrollbar.cm-sb-ie7 {
49
- min-width: 18px;
50
- }
51
-
52
- .CodeMirror-gutter {
53
- position: absolute; left: 0; top: 0;
54
- z-index: 10;
55
- background-color: #f7f7f7;
56
- border-right: 1px solid #eee;
57
- min-width: 2em;
58
- height: 100%;
59
- }
60
- .CodeMirror-gutter-text {
61
- color: #aaa;
62
- text-align: right;
63
- padding: .4em .2em .4em .4em;
64
- white-space: pre !important;
65
- }
66
- .CodeMirror-lines {
67
- padding: .4em;
68
- white-space: pre;
69
- cursor: text;
70
- }
71
- .CodeMirror-lines * {
72
- /* Necessary for throw-scrolling to decelerate properly on Safari. */
73
- pointer-events: none;
74
- }
75
-
76
- .CodeMirror pre {
77
- -moz-border-radius: 0;
78
- -webkit-border-radius: 0;
79
- -o-border-radius: 0;
80
- border-radius: 0;
81
- border-width: 0; margin: 0; padding: 0; background: transparent;
82
- font-family: inherit;
83
- font-size: inherit;
84
- padding: 0; margin: 0;
85
- white-space: pre;
86
- word-wrap: normal;
87
- line-height: inherit;
88
- color: inherit;
89
- }
90
-
91
- .CodeMirror-wrap pre {
92
- word-wrap: break-word;
93
- white-space: pre-wrap;
94
- word-break: normal;
95
- }
96
- .CodeMirror-wrap .CodeMirror-scroll {
97
- overflow-x: hidden;
98
- }
99
-
100
- .CodeMirror textarea {
101
- outline: none !important;
102
- }
103
-
104
- .CodeMirror pre.CodeMirror-cursor {
105
- z-index: 10;
106
- position: absolute;
107
- visibility: hidden;
108
- border-left: 1px solid black;
109
- border-right: none;
110
- width: 0;
111
- }
112
- .cm-keymap-fat-cursor pre.CodeMirror-cursor {
113
- width: auto;
114
- border: 0;
115
- background: transparent;
116
- background: rgba(0, 200, 0, .4);
117
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#6600c800, endColorstr=#4c00c800);
118
- }
119
- /* Kludge to turn off filter in ie9+, which also accepts rgba */
120
- .cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id) {
121
- filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
122
- }
123
- .CodeMirror pre.CodeMirror-cursor.CodeMirror-overwrite {}
124
- .CodeMirror-focused pre.CodeMirror-cursor {
125
- visibility: visible;
126
- }
127
-
128
- div.CodeMirror-selected { background: #d9d9d9; }
129
- .CodeMirror-focused div.CodeMirror-selected { background: #d7d4f0; }
130
-
131
- .CodeMirror-searching {
132
- background: #ffa;
133
- background: rgba(255, 255, 0, .4);
134
- }
135
-
136
- /* Default theme */
137
-
138
- span.cm-keyword {color: #708;}
139
- span.cm-atom {color: #219;}
140
- span.cm-number {color: #164;}
141
- span.cm-def {color: #00f;}
142
- span.cm-variable {color: black;}
143
- span.cm-variable-2 {color: #05a;}
144
- span.cm-variable-3 {color: #085;}
145
- span.cm-property {color: black;}
146
- span.cm-operator {color: black;}
147
- span.cm-comment {color: #a50;}
148
- span.cm-string {color: #a11;}
149
- span.cm-string-2 {color: #f50;}
150
- span.cm-meta {color: #555;}
151
- span.cm-error {color: #f00;}
152
- span.cm-qualifier {color: #555;}
153
- span.cm-builtin {color: #30a;}
154
- span.cm-bracket {color: #cc7;}
155
- span.cm-tag {color: #170;}
156
- span.cm-attribute {color: #00c;}
157
- span.cm-header {color: blue;}
158
- span.cm-quote {color: #090;}
159
- span.cm-hr {color: #999;}
160
- span.cm-link {color: #00c;}
161
-
162
- span.cm-header, span.cm-strong {font-weight: bold;}
163
- span.cm-em {font-style: italic;}
164
- span.cm-emstrong {font-style: italic; font-weight: bold;}
165
- span.cm-link {text-decoration: underline;}
166
-
167
- div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
168
- div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
1
+ .CodeMirror {
2
+ line-height: 1em;
3
+ font-family: monospace;
4
+
5
+ /* Necessary so the scrollbar can be absolutely positioned within the wrapper on Lion. */
6
+ position: relative;
7
+ /* This prevents unwanted scrollbars from showing up on the body and wrapper in IE. */
8
+ overflow: hidden;
9
+ }
10
+
11
+ .CodeMirror-scroll {
12
+ overflow-x: auto;
13
+ overflow-y: hidden;
14
+ height: 400px;
15
+ /* This is needed to prevent an IE[67] bug where the scrolled content
16
+ is visible outside of the scrolling box. */
17
+ position: relative;
18
+ outline: none;
19
+ }
20
+
21
+ /* Vertical scrollbar */
22
+ .CodeMirror-scrollbar {
23
+ float: right;
24
+ overflow-x: hidden;
25
+ overflow-y: scroll;
26
+
27
+ /* This corrects for the 1px gap introduced to the left of the scrollbar
28
+ by the rule for .CodeMirror-scrollbar-inner. */
29
+ margin-left: -1px;
30
+ }
31
+ .CodeMirror-scrollbar-inner {
32
+ /* This needs to have a nonzero width in order for the scrollbar to appear
33
+ in Firefox and IE9. */
34
+ width: 1px;
35
+ }
36
+ .CodeMirror-scrollbar.cm-sb-overlap {
37
+ /* Ensure that the scrollbar appears in Lion, and that it overlaps the content
38
+ rather than sitting to the right of it. */
39
+ position: absolute;
40
+ z-index: 1;
41
+ float: none;
42
+ right: 0;
43
+ min-width: 12px;
44
+ }
45
+ .CodeMirror-scrollbar.cm-sb-nonoverlap {
46
+ min-width: 12px;
47
+ }
48
+ .CodeMirror-scrollbar.cm-sb-ie7 {
49
+ min-width: 18px;
50
+ }
51
+
52
+ .CodeMirror-gutter {
53
+ position: absolute; left: 0; top: 0;
54
+ z-index: 10;
55
+ background-color: #f7f7f7;
56
+ border-right: 1px solid #eee;
57
+ min-width: 2em;
58
+ height: 100%;
59
+ }
60
+ .CodeMirror-gutter-text {
61
+ color: #aaa;
62
+ text-align: right;
63
+ padding: .4em .2em .4em .4em;
64
+ white-space: pre !important;
65
+ }
66
+ .CodeMirror-lines {
67
+ padding: .4em;
68
+ white-space: pre;
69
+ cursor: text;
70
+ }
71
+ .CodeMirror-lines * {
72
+ /* Necessary for throw-scrolling to decelerate properly on Safari. */
73
+ pointer-events: none;
74
+ }
75
+
76
+ .CodeMirror pre {
77
+ -moz-border-radius: 0;
78
+ -webkit-border-radius: 0;
79
+ -o-border-radius: 0;
80
+ border-radius: 0;
81
+ border-width: 0; margin: 0; padding: 0; background: transparent;
82
+ font-family: inherit;
83
+ font-size: inherit;
84
+ padding: 0; margin: 0;
85
+ white-space: pre;
86
+ word-wrap: normal;
87
+ line-height: inherit;
88
+ color: inherit;
89
+ }
90
+
91
+ .CodeMirror-wrap pre {
92
+ word-wrap: break-word;
93
+ white-space: pre-wrap;
94
+ word-break: normal;
95
+ }
96
+ .CodeMirror-wrap .CodeMirror-scroll {
97
+ overflow-x: hidden;
98
+ }
99
+
100
+ .CodeMirror textarea {
101
+ outline: none !important;
102
+ }
103
+
104
+ .CodeMirror pre.CodeMirror-cursor {
105
+ z-index: 10;
106
+ position: absolute;
107
+ visibility: hidden;
108
+ border-left: 1px solid black;
109
+ border-right: none;
110
+ width: 0;
111
+ }
112
+ .cm-keymap-fat-cursor pre.CodeMirror-cursor {
113
+ width: auto;
114
+ border: 0;
115
+ background: transparent;
116
+ background: rgba(0, 200, 0, .4);
117
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#6600c800, endColorstr=#4c00c800);
118
+ }
119
+ /* Kludge to turn off filter in ie9+, which also accepts rgba */
120
+ .cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id) {
121
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
122
+ }
123
+ .CodeMirror pre.CodeMirror-cursor.CodeMirror-overwrite {}
124
+ .CodeMirror-focused pre.CodeMirror-cursor {
125
+ visibility: visible;
126
+ }
127
+
128
+ div.CodeMirror-selected { background: #d9d9d9; }
129
+ .CodeMirror-focused div.CodeMirror-selected { background: #d7d4f0; }
130
+
131
+ .CodeMirror-searching {
132
+ background: #ffa;
133
+ background: rgba(255, 255, 0, .4);
134
+ }
135
+
136
+ /* Default theme */
137
+
138
+ span.cm-keyword {color: #708;}
139
+ span.cm-atom {color: #219;}
140
+ span.cm-number {color: #164;}
141
+ span.cm-def {color: #00f;}
142
+ span.cm-variable {color: black;}
143
+ span.cm-variable-2 {color: #05a;}
144
+ span.cm-variable-3 {color: #085;}
145
+ span.cm-property {color: black;}
146
+ span.cm-operator {color: black;}
147
+ span.cm-comment {color: #a50;}
148
+ span.cm-string {color: #a11;}
149
+ span.cm-string-2 {color: #f50;}
150
+ span.cm-meta {color: #555;}
151
+ span.cm-error {color: #f00;}
152
+ span.cm-qualifier {color: #555;}
153
+ span.cm-builtin {color: #30a;}
154
+ span.cm-bracket {color: #cc7;}
155
+ span.cm-tag {color: #170;}
156
+ span.cm-attribute {color: #00c;}
157
+ span.cm-header {color: blue;}
158
+ span.cm-quote {color: #090;}
159
+ span.cm-hr {color: #999;}
160
+ span.cm-link {color: #00c;}
161
+
162
+ span.cm-header, span.cm-strong {font-weight: bold;}
163
+ span.cm-em {font-style: italic;}
164
+ span.cm-emstrong {font-style: italic; font-weight: bold;}
165
+ span.cm-link {text-decoration: underline;}
166
+
167
+ div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
168
+ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
css/form_maker_first.css CHANGED
@@ -1,174 +1,174 @@
1
- .wdform-page-and-images {
2
- color: #000000;
3
- font-size: 14px;
4
- font-weight: normal;
5
- width: 100%;
6
- }
7
-
8
- .wdform_table1 {
9
- color: #000000;
10
- font-size: 14px;
11
- font-weight: normal;
12
- width: 100%;
13
- }
14
-
15
- .wdform_tbody1 {
16
- float: left;
17
- }
18
-
19
- .wdform_table2 {
20
- border-collapse: separate !important;
21
- border-spacing: 0px;
22
- float: left;
23
- padding-right: 50px !important;
24
- }
25
-
26
- .time_box {
27
- border-width: 1px;
28
- margin: 0px;
29
- padding: 2px;
30
- text-align: right;
31
- vertical-align: middle;
32
- width: 30px !important;
33
- }
34
-
35
- .wdform-date {
36
- width: 100px !important;
37
- }
38
-
39
- .mini_label {
40
- font-family: 'Lucida Grande', Tahoma, Arial, Verdana, sans-serif;
41
- font-size: 10px;
42
- }
43
-
44
- .label {
45
- border: none;
46
- }
47
-
48
- .td_am_pm_select {
49
- padding-left: 5px;
50
- }
51
-
52
- .am_pm_select {
53
- height: 16px;
54
- margin: 0;
55
- padding: 0
56
- }
57
-
58
- .input_deactive {
59
- border-width: 1px;
60
- color: #999999;
61
- font-style: italic;
62
- }
63
-
64
- .input_active {
65
- border-width: 1px;
66
- color: #000000;
67
- font-style: normal;
68
- }
69
-
70
- .required {
71
- border: none;
72
- color: red
73
- }
74
-
75
- .captcha_img {
76
- border-width: 0px;
77
- cursor: pointer;
78
- margin: 0px;
79
- padding: 0px;
80
- }
81
-
82
- .captcha_refresh {
83
- background-image: url("../images/refresh_black.png");
84
- border-width: 0px;
85
- cursor: pointer;
86
- height: 30px;
87
- margin: 0px;
88
- padding: 0px;
89
- vertical-align: middle;
90
- width: 30px;
91
- }
92
-
93
- .captcha_input {
94
- border-width: 1px;
95
- height: 20px;
96
- margin: 0px;
97
- padding: 0px;
98
- vertical-align: middle;
99
- }
100
-
101
- .arithmetic_captcha_img {
102
- border-width: 0px;
103
- cursor: pointer;
104
- margin: 0px;
105
- padding: 0px;
106
- vertical-align: middle;
107
- }
108
-
109
- .arithmetic_captcha_input {
110
- border-width: 1px;
111
- height: 25px;
112
- margin-left: 3px;
113
- padding: 0px;
114
- vertical-align: middle;
115
- }
116
-
117
- .file_upload {
118
- border-width: 1px;
119
- margin: 0px;
120
- padding: 0px;
121
- }
122
-
123
- .page_deactive {
124
- border: 1px solid #BFBEBE;
125
- cursor: pointer;
126
- border-radius: 15px;
127
- padding: 2px 8px;
128
- }
129
-
130
- .page_deactive:hover {
131
- background-color: #F0F0F0;
132
- }
133
-
134
- .page_active {
135
- background-color: #4EC0D9;
136
- cursor: pointer;
137
- padding: 2px 8px;
138
- margin: 4px;
139
- cursor: pointer;
140
- border-radius: 15px;
141
- padding: 3px 9px;
142
- color: #fff;
143
- }
144
-
145
- .page_percentage_active {
146
- background-color: #4EC0D9;
147
- border-radius: 30px;
148
- border-spacing: 0px;
149
- height: 30px;
150
- line-height: 29px;
151
- float: left;
152
- font-size: 15px;
153
- margin: 0px;
154
- padding: 0px;
155
- text-align: right !important;
156
- color: #4EC0D9;
157
- }
158
-
159
- .page_percentage_active b{
160
- padding: 4px 15px;
161
- background: #fff;
162
- border-radius: 18px;
163
- margin: 3px;
164
- }
165
-
166
- .page_percentage_deactive {
167
- background-color: white;
168
- border: 1px solid #ABA8A8;
169
- border-radius: 30px;
170
- height: 30px;
171
- line-height: 30px;
172
- text-align: left !important;
173
- width: 100%;
174
  }
1
+ .wdform-page-and-images {
2
+ color: #000000;
3
+ font-size: 14px;
4
+ font-weight: normal;
5
+ width: 100%;
6
+ }
7
+
8
+ .wdform_table1 {
9
+ color: #000000;
10
+ font-size: 14px;
11
+ font-weight: normal;
12
+ width: 100%;
13
+ }
14
+
15
+ .wdform_tbody1 {
16
+ float: left;
17
+ }
18
+
19
+ .wdform_table2 {
20
+ border-collapse: separate !important;
21
+ border-spacing: 0px;
22
+ float: left;
23
+ padding-right: 50px !important;
24
+ }
25
+
26
+ .time_box {
27
+ border-width: 1px;
28
+ margin: 0px;
29
+ padding: 2px;
30
+ text-align: right;
31
+ vertical-align: middle;
32
+ width: 30px !important;
33
+ }
34
+
35
+ .wdform-date {
36
+ width: 100px !important;
37
+ }
38
+
39
+ .mini_label {
40
+ font-family: 'Lucida Grande', Tahoma, Arial, Verdana, sans-serif;
41
+ font-size: 10px;
42
+ }
43
+
44
+ .label {
45
+ border: none;
46
+ }
47
+
48
+ .td_am_pm_select {
49
+ padding-left: 5px;
50
+ }
51
+
52
+ .am_pm_select {
53
+ height: 16px;
54
+ margin: 0;
55
+ padding: 0
56
+ }
57
+
58
+ .input_deactive {
59
+ border-width: 1px;
60
+ color: #999999;
61
+ font-style: italic;
62
+ }
63
+
64
+ .input_active {
65
+ border-width: 1px;
66
+ color: #000000;
67
+ font-style: normal;
68
+ }
69
+
70
+ .required {
71
+ border: none;
72
+ color: red
73
+ }
74
+
75
+ .captcha_img {
76
+ border-width: 0px;
77
+ cursor: pointer;
78
+ margin: 0px;
79
+ padding: 0px;
80
+ }
81
+
82
+ .captcha_refresh {
83
+ background-image: url("../images/refresh_black.png");
84
+ border-width: 0px;
85
+ cursor: pointer;
86
+ height: 30px;
87
+ margin: 0px;
88
+ padding: 0px;
89
+ vertical-align: middle;
90
+ width: 30px;
91
+ }
92
+
93
+ .captcha_input {
94
+ border-width: 1px;
95
+ height: 20px;
96
+ margin: 0px;
97
+ padding: 0px;
98
+ vertical-align: middle;
99
+ }
100
+
101
+ .arithmetic_captcha_img {
102
+ border-width: 0px;
103
+ cursor: pointer;
104
+ margin: 0px;
105
+ padding: 0px;
106
+ vertical-align: middle;
107
+ }
108
+
109
+ .arithmetic_captcha_input {
110
+ border-width: 1px;
111
+ height: 25px;
112
+ margin-left: 3px;
113
+ padding: 0px;
114
+ vertical-align: middle;
115
+ }
116
+
117
+ .file_upload {
118
+ border-width: 1px;
119
+ margin: 0px;
120
+ padding: 0px;
121
+ }
122
+
123
+ .page_deactive {
124
+ border: 1px solid #BFBEBE;
125
+ cursor: pointer;
126
+ border-radius: 15px;
127
+ padding: 2px 8px;
128
+ }
129
+
130
+ .page_deactive:hover {
131
+ background-color: #F0F0F0;
132
+ }
133
+
134
+ .page_active {
135
+ background-color: #4EC0D9;
136
+ cursor: pointer;
137
+ padding: 2px 8px;
138
+ margin: 4px;
139
+ cursor: pointer;
140
+ border-radius: 15px;
141
+ padding: 3px 9px;
142
+ color: #fff;
143
+ }
144
+
145
+ .page_percentage_active {
146
+ background-color: #4EC0D9;
147
+ border-radius: 30px;
148
+ border-spacing: 0px;
149
+ height: 30px;
150
+ line-height: 29px;
151
+ float: left;
152
+ font-size: 15px;
153
+ margin: 0px;
154
+ padding: 0px;
155
+ text-align: right !important;
156
+ color: #4EC0D9;
157
+ }
158
+
159
+ .page_percentage_active b{
160
+ padding: 4px 15px;
161
+ background: #fff;
162
+ border-radius: 18px;
163
+ margin: 3px;
164
+ }
165
+
166
+ .page_percentage_deactive {
167
+ background-color: white;
168
+ border: 1px solid #ABA8A8;
169
+ border-radius: 30px;
170
+ height: 30px;
171
+ line-height: 30px;
172
+ text-align: left !important;
173
+ width: 100%;
174
  }
css/form_maker_layout.css CHANGED
@@ -1,36 +1,36 @@
1
- .fm_submit_layout {
2
- border-radius: 3px !important;
3
- width: 100%;
4
- }
5
-
6
- .fm_submit_layout em {
7
- color: #999;
8
- font-size: 11px;
9
- font-style: normal;
10
- }
11
-
12
- .CodeMirror {
13
- background: white;
14
- border: 1px solid #ccc;
15
- font-size: 12px;
16
- margin-bottom: 6px;
17
- }
18
-
19
- .fm_label_buttons {
20
- border: 1px solid #C0C0C0;
21
- cursor: pointer;
22
- font-weight: bold;
23
- max-width: 200px;
24
- overflow: hidden;
25
- padding: 4px 15px;
26
- text-overflow: ellipsis;
27
- white-space: nowrap;
28
- word-break: break-all;
29
- word-wrap: break-word;
30
- }
31
-
32
- .fm_layout p {
33
- font-size: 14px;
34
- font-family: segoe ui;
35
- text-shadow: 0px 0px 1px rgb(202, 202, 202);
36
- }
1
+ .fm_submit_layout {
2
+ border-radius: 3px !important;
3
+ width: 100%;
4
+ }
5
+
6
+ .fm_submit_layout em {
7
+ color: #999;
8
+ font-size: 11px;
9
+ font-style: normal;
10
+ }
11
+
12
+ .CodeMirror {
13
+ background: white;
14
+ border: 1px solid #ccc;
15
+ font-size: 12px;
16
+ margin-bottom: 6px;
17
+ }
18
+
19
+ .fm_label_buttons {
20
+ border: 1px solid #C0C0C0;
21
+ cursor: pointer;
22
+ font-weight: bold;
23
+ max-width: 200px;
24
+ overflow: hidden;
25
+ padding: 4px 15px;
26
+ text-overflow: ellipsis;
27
+ white-space: nowrap;
28
+ word-break: break-all;
29
+ word-wrap: break-word;
30
+ }
31
+
32
+ .fm_layout p {
33
+ font-size: 14px;
34
+ font-family: segoe ui;
35
+ text-shadow: 0px 0px 1px rgb(202, 202, 202);
36
+ }
css/jquery-ui-1.10.3.custom.css CHANGED
@@ -1,1177 +1,1177 @@
1
- /*! jQuery UI - v1.10.3 - 2013-10-19
2
- * http://jqueryui.com
3
- * Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css, jquery.ui.theme.css
4
- * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=gloss_wave&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=highlight_soft&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=glass&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=diagonals_thick&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=diagonals_thick&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=flat&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px
5
- * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
6
-
7
- /* Layout helpers
8
- ----------------------------------*/
9
- .ui-helper-hidden {
10
- display: none;
11
- }
12
- .ui-helper-hidden-accessible {
13
- border: 0;
14
- clip: rect(0 0 0 0);
15
- height: 1px;
16
- margin: -1px;
17
- overflow: hidden;
18
- padding: 0;
19
- position: absolute;
20
- width: 1px;
21
- }
22
- .ui-helper-reset {
23
- margin: 0;
24
- padding: 0;
25
- border: 0;
26
- outline: 0;
27
- line-height: 1.3;
28
- text-decoration: none;
29
- font-size: 100%;
30
- list-style: none;
31
- }
32
- .ui-helper-clearfix:before,
33
- .ui-helper-clearfix:after {
34
- content: "";
35
- display: table;
36
- border-collapse: collapse;
37
- }
38
- .ui-helper-clearfix:after {
39
- clear: both;
40
- }
41
- .ui-helper-clearfix {
42
- min-height: 0; /* support: IE7 */
43
- }
44
- .ui-helper-zfix {
45
- width: 100%;
46
- height: 100%;
47
- top: 0;
48
- left: 0;
49
- position: absolute;
50
- opacity: 0;
51
- filter:Alpha(Opacity=0);
52
- }
53
-
54
- .ui-front {
55
- z-index: 100;
56
- }
57
-
58
-
59
- /* Interaction Cues
60
- ----------------------------------*/
61
- .ui-state-disabled {
62
- cursor: default !important;
63
- }
64
-
65
-
66
- /* Icons
67
- ----------------------------------*/
68
-
69
- /* states and images */
70
- .ui-icon {
71
- display: block;
72
- text-indent: -99999px;
73
- overflow: hidden;
74
- background-repeat: no-repeat;
75
- }
76
-
77
-
78
- /* Misc visuals
79
- ----------------------------------*/
80
-
81
- /* Overlays */
82
- .ui-widget-overlay {
83
- position: fixed;
84
- top: 0;
85
- left: 0;
86
- width: 100%;
87
- height: 100%;
88
- }
89
- .ui-resizable {
90
- position: relative;
91
- }
92
- .ui-resizable-handle {
93
- position: absolute;
94
- font-size: 0.1px;
95
- display: block;
96
- }
97
- .ui-resizable-disabled .ui-resizable-handle,
98
- .ui-resizable-autohide .ui-resizable-handle {
99
- display: none;
100
- }
101
- .ui-resizable-n {
102
- cursor: n-resize;
103
- height: 7px;
104
- width: 100%;
105
- top: -5px;
106
- left: 0;
107
- }
108
- .ui-resizable-s {
109
- cursor: s-resize;
110
- height: 7px;
111
- width: 100%;
112
- bottom: -5px;
113
- left: 0;
114
- }
115
- .ui-resizable-e {
116
- cursor: e-resize;
117
- width: 7px;
118
- right: -5px;
119
- top: 0;
120
- height: 100%;
121
- }
122
- .ui-resizable-w {
123
- cursor: w-resize;
124
- width: 7px;
125
- left: -5px;
126
- top: 0;
127
- height: 100%;
128
- }
129
- .ui-resizable-se {
130
- cursor: se-resize;
131
- width: 12px;
132
- height: 12px;
133
- right: 1px;
134
- bottom: 1px;
135
- }
136
- .ui-resizable-sw {
137
- cursor: sw-resize;
138
- width: 9px;
139
- height: 9px;
140
- left: -5px;
141
- bottom: -5px;
142
- }
143
- .ui-resizable-nw {
144
- cursor: nw-resize;
145
- width: 9px;
146
- height: 9px;
147
- left: -5px;
148
- top: -5px;
149
- }
150
- .ui-resizable-ne {
151
- cursor: ne-resize;
152
- width: 9px;
153
- height: 9px;
154
- right: -5px;
155
- top: -5px;
156
- }
157
- .ui-selectable-helper {
158
- position: absolute;
159
- z-index: 100;
160
- border: 1px dotted black;
161
- }
162
- .ui-accordion .ui-accordion-header {
163
- display: block;
164
- cursor: pointer;
165
- position: relative;
166
- margin-top: 2px;
167
- padding: .5em .5em .5em .7em;
168
- min-height: 0; /* support: IE7 */
169
- }
170
- .ui-accordion .ui-accordion-icons {
171
- padding-left: 2.2em;
172
- }
173
- .ui-accordion .ui-accordion-noicons {
174
- padding-left: .7em;
175
- }
176
- .ui-accordion .ui-accordion-icons .ui-accordion-icons {
177
- padding-left: 2.2em;
178
- }
179
- .ui-accordion .ui-accordion-header .ui-accordion-header-icon {
180
- position: absolute;
181
- left: .5em;
182
- top: 50%;
183
- margin-top: -8px;
184
- }
185
- .ui-accordion .ui-accordion-content {
186
- padding: 1em 2.2em;
187
- border-top: 0;
188
- overflow: auto;
189
- }
190
- .ui-autocomplete {
191
- position: absolute;
192
- top: 0;
193
- left: 0;
194
- cursor: default;
195
- }
196
- .ui-button {
197
- display: inline-block;
198
- position: relative;
199
- padding: 0;
200
- line-height: normal;
201
- margin-right: .1em;
202
- cursor: pointer;
203
- vertical-align: middle;
204
- text-align: center;
205
- overflow: visible; /* removes extra width in IE */
206
- }
207
- .ui-button,
208
- .ui-button:link,
209
- .ui-button:visited,
210
- .ui-button:hover,
211
- .ui-button:active {
212
- text-decoration: none;
213
- }
214
- /* to make room for the icon, a width needs to be set here */
215
- .ui-button-icon-only {
216
- width: 2.2em;
217
- }
218
- /* button elements seem to need a little more width */
219
- button.ui-button-icon-only {
220
- width: 2.4em;
221
- }
222
- .ui-button-icons-only {
223
- width: 3.4em;
224
- }
225
- button.ui-button-icons-only {
226
- width: 3.7em;
227
- }
228
-
229
- /* button text element */
230
- .ui-button .ui-button-text {
231
- display: block;
232
- line-height: normal;
233
- }
234
- .ui-button-text-only .ui-button-text {
235
- padding: .4em 1em;
236
- }
237
- .ui-button-icon-only .ui-button-text,
238
- .ui-button-icons-only .ui-button-text {
239
- padding: .4em;
240
- text-indent: -9999999px;
241
- }
242
- .ui-button-text-icon-primary .ui-button-text,
243
- .ui-button-text-icons .ui-button-text {
244
- padding: .4em 1em .4em 2.1em;
245
- }
246
- .ui-button-text-icon-secondary .ui-button-text,
247
- .ui-button-text-icons .ui-button-text {
248
- padding: .4em 2.1em .4em 1em;
249
- }
250
- .ui-button-text-icons .ui-button-text {
251
- padding-left: 2.1em;
252
- padding-right: 2.1em;
253
- }
254
- /* no icon support for input elements, provide padding by default */
255
- input.ui-button {
256
- padding: .4em 1em;
257
- }
258
-
259
- /* button icon element(s) */
260
- .ui-button-icon-only .ui-icon,
261
- .ui-button-text-icon-primary .ui-icon,
262
- .ui-button-text-icon-secondary .ui-icon,
263
- .ui-button-text-icons .ui-icon,
264
- .ui-button-icons-only .ui-icon {
265
- position: absolute;
266
- top: 50%;
267
- margin-top: -8px;
268
- }
269
- .ui-button-icon-only .ui-icon {
270
- left: 50%;
271
- margin-left: -8px;
272
- }
273
- .ui-button-text-icon-primary .ui-button-icon-primary,
274
- .ui-button-text-icons .ui-button-icon-primary,
275
- .ui-button-icons-only .ui-button-icon-primary {
276
- left: .5em;
277
- }
278
- .ui-button-text-icon-secondary .ui-button-icon-secondary,
279
- .ui-button-text-icons .ui-button-icon-secondary,
280
- .ui-button-icons-only .ui-button-icon-secondary {
281
- right: .5em;
282
- }
283
-
284
- /* button sets */
285
- .ui-buttonset {
286
- margin-right: 7px;
287
- }
288
- .ui-buttonset .ui-button {
289
- margin-left: 0;
290
- margin-right: -.3em;
291
- }
292
-
293
- /* workarounds */
294
- /* reset extra padding in Firefox, see h5bp.com/l */
295
- input.ui-button::-moz-focus-inner,
296
- button.ui-button::-moz-focus-inner {
297
- border: 0;
298
- padding: 0;
299
- }
300
- .ui-datepicker {
301
- width: 17em;
302
- padding: .2em .2em 0;
303
- display: none;
304
- }
305
- .ui-datepicker .ui-datepicker-header {
306
- position: relative;
307
- padding: .2em 0;
308
- }
309
- .ui-datepicker .ui-datepicker-prev,
310
- .ui-datepicker .ui-datepicker-next {
311
- position: absolute;
312
- top: 2px;
313
- width: 1.8em;
314
- height: 1.8em;
315
- }
316
- .ui-datepicker .ui-datepicker-prev-hover,
317
- .ui-datepicker .ui-datepicker-next-hover {
318
- top: 1px;
319
- }
320
- .ui-datepicker .ui-datepicker-prev {
321
- left: 2px;
322
- }
323
- .ui-datepicker .ui-datepicker-next {
324
- right: 2px;
325
- }
326
- .ui-datepicker .ui-datepicker-prev-hover {
327
- left: 1px;
328
- }
329
- .ui-datepicker .ui-datepicker-next-hover {
330
- right: 1px;
331
- }
332
- .ui-datepicker .ui-datepicker-prev span,
333
- .ui-datepicker .ui-datepicker-next span {
334
- display: block;
335
- position: absolute;
336
- left: 50%;
337
- margin-left: -8px;
338
- top: 50%;
339
- margin-top: -8px;
340
- }
341
- .ui-datepicker .ui-datepicker-title {
342
- margin: 0 2.3em;
343
- line-height: 1.8em;
344
- text-align: center;
345
- }
346
- .ui-datepicker .ui-datepicker-title select {
347
- font-size: 1em;
348
- margin: 1px 0;
349
- }
350
- .ui-datepicker select.ui-datepicker-month-year {
351
- width: 100%;
352
- }
353
- .ui-datepicker select.ui-datepicker-month,
354
- .ui-datepicker select.ui-datepicker-year {
355
- width: 49%;
356
- }
357
- .ui-datepicker table {
358
- width: 100%;
359
- font-size: .9em;
360
- border-collapse: collapse;
361
- margin: 0 0 .4em;
362
- }
363
- .ui-datepicker th {
364
- padding: .7em .3em;
365
- text-align: center;
366
- font-weight: bold;
367
- border: 0;
368
- }
369
- .ui-datepicker td {
370
- border: 0;
371
- padding: 1px;
372
- }
373
- .ui-datepicker td span,
374
- .ui-datepicker td a {
375
- display: block;
376
- padding: .2em;
377
- text-align: right;
378
- text-decoration: none;
379
- }
380
- .ui-datepicker .ui-datepicker-buttonpane {
381
- background-image: none;
382
- margin: .7em 0 0 0;
383
- padding: 0 .2em;
384
- border-left: 0;
385
- border-right: 0;
386
- border-bottom: 0;
387
- }
388
- .ui-datepicker .ui-datepicker-buttonpane button {
389
- float: right;
390
- margin: .5em .2em .4em;
391
- cursor: pointer;
392
- padding: .2em .6em .3em .6em;
393
- width: auto;
394
- overflow: visible;
395
- }
396
- .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
397
- float: left;
398
- }
399
-
400
- /* with multiple calendars */
401
- .ui-datepicker.ui-datepicker-multi {
402
- width: auto;
403
- }
404
- .ui-datepicker-multi .ui-datepicker-group {
405
- float: left;
406
- }
407
- .ui-datepicker-multi .ui-datepicker-group table {
408
- width: 95%;
409
- margin: 0 auto .4em;
410
- }
411
- .ui-datepicker-multi-2 .ui-datepicker-group {
412
- width: 50%;
413
- }
414
- .ui-datepicker-multi-3 .ui-datepicker-group {
415
- width: 33.3%;
416
- }
417
- .ui-datepicker-multi-4 .ui-datepicker-group {
418
- width: 25%;
419
- }
420
- .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
421
- .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
422
- border-left-width: 0;
423
- }
424
- .ui-datepicker-multi .ui-datepicker-buttonpane {
425
- clear: left;
426
- }
427
- .ui-datepicker-row-break {
428
- clear: both;
429
- width: 100%;
430
- font-size: 0;
431
- }
432
-
433
- /* RTL support */
434
- .ui-datepicker-rtl {
435
- direction: rtl;
436
- }
437
- .ui-datepicker-rtl .ui-datepicker-prev {
438
- right: 2px;
439
- left: auto;
440
- }
441
- .ui-datepicker-rtl .ui-datepicker-next {
442
- left: 2px;
443
- right: auto;
444
- }
445
- .ui-datepicker-rtl .ui-datepicker-prev:hover {
446
- right: 1px;
447
- left: auto;
448
- }
449
- .ui-datepicker-rtl .ui-datepicker-next:hover {
450
- left: 1px;
451
- right: auto;
452
- }
453
- .ui-datepicker-rtl .ui-datepicker-buttonpane {
454
- clear: right;
455
- }
456
- .ui-datepicker-rtl .ui-datepicker-buttonpane button {
457
- float: left;
458
- }
459
- .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
460
- .ui-datepicker-rtl .ui-datepicker-group {
461
- float: right;
462
- }
463
- .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
464
- .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
465
- border-right-width: 0;
466
- border-left-width: 1px;
467
- }
468
- .ui-dialog {
469
- position: absolute;
470
- top: 0;
471
- left: 0;
472
- padding: .2em;
473
- outline: 0;
474
- }
475
- .ui-dialog .ui-dialog-titlebar {
476
- padding: .4em 1em;
477
- position: relative;
478
- }
479
- .ui-dialog .ui-dialog-title {
480
- float: left;
481
- margin: .1em 0;
482
- white-space: nowrap;
483
- width: 90%;
484
- overflow: hidden;
485
- text-overflow: ellipsis;
486
- }
487
- .ui-dialog .ui-dialog-titlebar-close {
488
- position: absolute;
489
- right: .3em;
490
- top: 50%;
491
- width: 21px;
492
- margin: -10px 0 0 0;
493
- padding: 1px;
494
- height: 20px;
495
- }
496
- .ui-dialog .ui-dialog-content {
497
- position: relative;
498
- border: 0;
499
- padding: .5em 1em;
500
- background: none;
501
- overflow: auto;
502
- }
503
- .ui-dialog .ui-dialog-buttonpane {
504
- text-align: left;
505
- border-width: 1px 0 0 0;
506
- background-image: none;
507
- margin-top: .5em;
508
- padding: .3em 1em .5em .4em;
509
- }
510
- .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
511
- float: right;
512
- }
513
- .ui-dialog .ui-dialog-buttonpane button {
514
- margin: .5em .4em .5em 0;
515
- cursor: pointer;
516
- }
517
- .ui-dialog .ui-resizable-se {
518
- width: 12px;
519
- height: 12px;
520
- right: -5px;
521
- bottom: -5px;
522
- background-position: 16px 16px;
523
- }
524
- .ui-draggable .ui-dialog-titlebar {
525
- cursor: move;
526
- }
527
- .ui-menu {
528
- list-style: none;
529
- padding: 2px;
530
- margin: 0;
531
- display: block;
532
- outline: none;
533
- }
534
- .ui-menu .ui-menu {
535
- margin-top: -3px;
536
- position: absolute;
537
- }
538
- .ui-menu .ui-menu-item {
539
- margin: 0;
540
- padding: 0;
541
- width: 100%;
542
- /* support: IE10, see #8844 */
543
- list-style-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);
544
- }
545
- .ui-menu .ui-menu-divider {
546
- margin: 5px -2px 5px -2px;
547
- height: 0;
548
- font-size: 0;
549
- line-height: 0;
550
- border-width: 1px 0 0 0;
551
- }
552
- .ui-menu .ui-menu-item a {
553
- text-decoration: none;
554
- display: block;
555
- padding: 2px .4em;
556
- line-height: 1.5;
557
- min-height: 0; /* support: IE7 */
558
- font-weight: normal;
559
- }
560
- .ui-menu .ui-menu-item a.ui-state-focus,
561
- .ui-menu .ui-menu-item a.ui-state-active {
562
- font-weight: normal;
563
- margin: -1px;
564
- }
565
-
566
- .ui-menu .ui-state-disabled {
567
- font-weight: normal;
568
- margin: .4em 0 .2em;
569
- line-height: 1.5;
570
- }
571
- .ui-menu .ui-state-disabled a {
572
- cursor: default;
573
- }
574
-
575
- /* icon support */
576
- .ui-menu-icons {
577
- position: relative;
578
- }
579
- .ui-menu-icons .ui-menu-item a {
580
- position: relative;
581
- padding-left: 2em;
582
- }
583
-
584
- /* left-aligned */
585
- .ui-menu .ui-icon {
586
- position: absolute;
587
- top: .2em;
588
- left: .2em;
589
- }
590
-
591
- /* right-aligned */
592
- .ui-menu .ui-menu-icon {
593
- position: static;
594
- float: right;
595
- }
596
- .ui-progressbar {
597
- height: 2em;
598
- text-align: left;
599
- overflow: hidden;
600
- }
601
- .ui-progressbar .ui-progressbar-value {
602
- margin: -1px;
603
- height: 100%;
604
- }
605
- .ui-progressbar .ui-progressbar-overlay {
606
- background: url("images/animated-overlay.gif");
607
- height: 100%;
608
- filter: alpha(opacity=25);
609
- opacity: 0.25;
610
- }
611
- .ui-progressbar-indeterminate .ui-progressbar-value {
612
- background-image: none;
613
- }
614
- .ui-slider {
615
- position: relative;
616
- text-align: left;
617
- }
618
- .ui-slider .ui-slider-handle {
619
- position: absolute;
620
- z-index: 2;
621
- width: 1.2em;
622
- height: 1.2em;
623
- cursor: default;
624
- }
625
- .ui-slider .ui-slider-range {
626
- position: absolute;
627
- z-index: 1;
628
- font-size: .7em;
629
- display: block;
630
- border: 0;
631
- background-position: 0 0;
632
- }
633
-
634
- /* For IE8 - See #6727 */
635
- .ui-slider.ui-state-disabled .ui-slider-handle,
636
- .ui-slider.ui-state-disabled .ui-slider-range {
637
- filter: inherit;
638
- }
639
-
640
- .ui-slider-horizontal {
641
- height: .8em;
642
- }
643
- .ui-slider-horizontal .ui-slider-handle {
644
- top: -.3em;
645
- margin-left: -.6em;
646
- }
647
- .ui-slider-horizontal .ui-slider-range {
648
- top: 0;
649
- height: 100%;
650
- }
651
- .ui-slider-horizontal .ui-slider-range-min {
652
- left: 0;
653
- }
654
- .ui-slider-horizontal .ui-slider-range-max {
655
- right: 0;
656
- }
657
-
658
- .ui-slider-vertical {
659
- width: .8em;
660
- height: 100px;
661
- }
662
- .ui-slider-vertical .ui-slider-handle {
663
- left: -.3em;
664
- margin-left: 0;
665
- margin-bottom: -.6em;
666
- }
667
- .ui-slider-vertical .ui-slider-range {
668
- left: 0;
669
- width: 100%;
670
- }
671
- .ui-slider-vertical .ui-slider-range-min {
672
- bottom: 0;
673
- }
674
- .ui-slider-vertical .ui-slider-range-max {
675
- top: 0;
676
- }
677
- .ui-spinner {
678
- position: relative;
679
- display: inline-block;
680
- overflow: hidden;
681
- padding: 0;
682
- vertical-align: middle;
683
- }
684
- .ui-spinner-input {
685
- border: none;
686
- background: none;
687
- color: inherit;
688
- padding: 0;
689
- margin: .2em 0;
690
- vertical-align: middle;
691
- margin-left: .4em;
692
- margin-right: 22px;
693
- }
694
- .ui-spinner-button {
695
- width: 16px;
696
- height: 50%;
697
- font-size: .5em;
698
- padding: 0;
699
- margin: 0;
700
- text-align: center;
701
- position: absolute;
702
- cursor: default;
703
- display: block;
704
- overflow: hidden;
705
- right: 0;
706
- }
707
- /* more specificity required here to overide default borders */
708
- .ui-spinner a.ui-spinner-button {
709
- border-top: none;
710
- border-bottom: none;
711
- border-right: none;
712
- }
713
- /* vertical centre icon */
714
- .ui-spinner .ui-icon {
715
- position: absolute;
716
- margin-top: -8px;
717
- top: 50%;
718
- left: 0;
719
- }
720
- .ui-spinner-up {
721
- top: 0;
722
- }
723
- .ui-spinner-down {
724
- bottom: 0;
725
- }
726
-
727
- /* TR overrides */
728
- .ui-spinner .ui-icon-triangle-1-s {
729
- /* need to fix icons sprite */
730
- background-position: -65px -16px;
731
- }
732
- .ui-tabs {
733
- position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
734
- padding: .2em;
735
- }
736
- .ui-tabs .ui-tabs-nav {
737
- margin: 0;
738
- padding: .2em .2em 0;
739
- }
740
- .ui-tabs .ui-tabs-nav li {
741
- list-style: none;
742
- float: left;
743
- position: relative;
744
- top: 0;
745
- margin: 1px .2em 0 0;
746
- border-bottom-width: 0;
747
- padding: 0;
748
- white-space: nowrap;
749
- }
750
- .ui-tabs .ui-tabs-nav li a {
751
- float: left;
752
- padding: .5em 1em;
753
- text-decoration: none;
754
- }
755
- .ui-tabs .ui-tabs-nav li.ui-tabs-active {
756
- margin-bottom: -1px;
757
- padding-bottom: 1px;
758
- }
759
- .ui-tabs .ui-tabs-nav li.ui-tabs-active a,
760
- .ui-tabs .ui-tabs-nav li.ui-state-disabled a,
761
- .ui-tabs .ui-tabs-nav li.ui-tabs-loading a {
762
- cursor: text;
763
- }
764
- .ui-tabs .ui-tabs-nav li a, /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
765
- .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a {
766
- cursor: pointer;
767
- }
768
- .ui-tabs .ui-tabs-panel {
769
- display: block;
770
- border-width: 0;
771
- padding: 1em 1.4em;
772
- background: none;
773
- }
774
- .ui-tooltip {
775
- padding: 8px;
776
- position: absolute;
777
- z-index: 9999;
778
- max-width: 300px;
779
- -webkit-box-shadow: 0 0 5px #aaa;
780
- box-shadow: 0 0 5px #aaa;
781
- }
782
- body .ui-tooltip {
783
- border-width: 2px;
784
- }
785
-
786
- /* Component containers
787
- ----------------------------------*/
788
- .ui-widget {
789
- font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;
790
- font-size: 1.1em;
791
- }
792
- .ui-widget .ui-widget {
793
- font-size: 1em;
794
- }
795
- .ui-widget input,
796
- .ui-widget select,
797
- .ui-widget textarea,
798
- .ui-widget button {
799
- font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;
800
- font-size: 1em;
801
- }
802
- .ui-widget-content {
803
- border: 1px solid #dddddd;
804
- background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x;
805
- color: #333333;
806
- }
807
- .ui-widget-content a {
808
- color: #333333;
809
- }
810
- .ui-widget-header {
811
- border: 1px solid #e78f08;
812
- background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x;
813
- color: #ffffff;
814
- font-weight: bold;
815
- }
816
- .ui-widget-header a {
817
- color: #ffffff;
818
- }
819
-
820
- /* Interaction states
821
- ----------------------------------*/
822
- .ui-state-default,
823
- .ui-widget-content .ui-state-default,
824
- .ui-widget-header .ui-state-default {
825
- border: 1px solid #cccccc;
826
- background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x;
827
- font-weight: bold;
828
- color: #1c94c4;
829
- }
830
- .ui-state-default a,
831
- .ui-state-default a:link,
832
- .ui-state-default a:visited {
833
- color: #1c94c4;
834
- text-decoration: none;
835
- }
836
- .ui-state-hover,
837
- .ui-widget-content .ui-state-hover,
838
- .ui-widget-header .ui-state-hover,
839
- .ui-state-focus,
840
- .ui-widget-content .ui-state-focus,
841
- .ui-widget-header .ui-state-focus {
842
- border: 1px solid #fbcb09;
843
- background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x;
844
- font-weight: bold;
845
- color: #c77405;
846
- }
847
- .ui-state-hover a,
848
- .ui-state-hover a:hover,
849
- .ui-state-hover a:link,
850
- .ui-state-hover a:visited {
851
- color: #c77405;
852
- text-decoration: none;
853
- }
854
- .ui-state-active,
855
- .ui-widget-content .ui-state-active,
856
- .ui-widget-header .ui-state-active {
857
- border: 1px solid #fbd850;
858
- background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;
859
- font-weight: bold;
860
- color: #eb8f00;
861
- }
862
- .ui-state-active a,
863
- .ui-state-active a:link,
864
- .ui-state-active a:visited {
865
- color: #eb8f00;
866
- text-decoration: none;
867
- }
868
-
869
- /* Interaction Cues
870
- ----------------------------------*/
871
- .ui-state-highlight,
872
- .ui-widget-content .ui-state-highlight,
873
- .ui-widget-header .ui-state-highlight {
874
- border: 1px solid #fed22f;
875
- background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x;
876
- color: #363636;
877
- }
878
- .ui-state-highlight a,
879
- .ui-widget-content .ui-state-highlight a,
880
- .ui-widget-header .ui-state-highlight a {
881
- color: #363636;
882
- }
883
- .ui-state-error,
884
- .ui-widget-content .ui-state-error,
885
- .ui-widget-header .ui-state-error {
886
- border: 1px solid #cd0a0a;
887
- background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat;
888
- color: #ffffff;
889
- }
890
- .ui-state-error a,
891
- .ui-widget-content .ui-state-error a,
892
- .ui-widget-header .ui-state-error a {
893
- color: #ffffff;
894
- }
895
- .ui-state-error-text,
896
- .ui-widget-content .ui-state-error-text,
897
- .ui-widget-header .ui-state-error-text {
898
- color: #ffffff;
899
- }
900
- .ui-priority-primary,
901
- .ui-widget-content .ui-priority-primary,
902
- .ui-widget-header .ui-priority-primary {
903
- font-weight: bold;
904
- }
905
- .ui-priority-secondary,
906
- .ui-widget-content .ui-priority-secondary,
907
- .ui-widget-header .ui-priority-secondary {
908
- opacity: .7;
909
- filter:Alpha(Opacity=70);
910
- font-weight: normal;
911
- }
912
- .ui-state-disabled,
913
- .ui-widget-content .ui-state-disabled,
914
- .ui-widget-header .ui-state-disabled {
915
- opacity: .35;
916
- filter:Alpha(Opacity=35);
917
- background-image: none;
918
- }
919
- .ui-state-disabled .ui-icon {
920
- filter:Alpha(Opacity=35); /* For IE8 - See #6059 */
921
- }
922
-
923
- /* Icons
924
- ----------------------------------*/
925
-
926
- /* states and images */
927
- .ui-icon {
928
- width: 16px;
929
- height: 16px;
930
- }
931
- .ui-icon,
932
- .ui-widget-content .ui-icon {
933
- background-image: url(images/ui-icons_222222_256x240.png);
934
- }
935
- .ui-widget-header .ui-icon {
936
- background-image: url(images/ui-icons_ffffff_256x240.png);
937
- }
938
- .ui-state-default .ui-icon {
939
- background-image: url(images/ui-icons_ef8c08_256x240.png);
940
- }
941
- .ui-state-hover .ui-icon,
942
- .ui-state-focus .ui-icon {
943
- background-image: url(images/ui-icons_ef8c08_256x240.png);
944
- }
945
- .ui-state-active .ui-icon {
946
- background-image: url(images/ui-icons_ef8c08_256x240.png);
947
- }
948
- .ui-state-highlight .ui-icon {
949
- background-image: url(images/ui-icons_228ef1_256x240.png);
950
- }
951
- .ui-state-error .ui-icon,
952
- .ui-state-error-text .ui-icon {
953
- background-image: url(images/ui-icons_ffd27a_256x240.png);
954
- }
955
-
956
- /* positioning */
957
- .ui-icon-blank { background-position: 16px 16px; }
958
- .ui-icon-carat-1-n { background-position: 0 0; }
959
- .ui-icon-carat-1-ne { background-position: -16px 0; }
960
- .ui-icon-carat-1-e { background-position: -32px 0; }
961
- .ui-icon-carat-1-se { background-position: -48px 0; }
962
- .ui-icon-carat-1-s { background-position: -64px 0; }
963
- .ui-icon-carat-1-sw { background-position: -80px 0; }
964
- .ui-icon-carat-1-w { background-position: -96px 0; }
965
- .ui-icon-carat-1-nw { background-position: -112px 0; }
966
- .ui-icon-carat-2-n-s { background-position: -128px 0; }
967
- .ui-icon-carat-2-e-w { background-position: -144px 0; }
968
- .ui-icon-triangle-1-n { background-position: 0 -16px; }
969
- .ui-icon-triangle-1-ne { background-position: -16px -16px; }
970
- .ui-icon-triangle-1-e { background-position: -32px -16px; }
971
- .ui-icon-triangle-1-se { background-position: -48px -16px; }
972
- .ui-icon-triangle-1-s { background-position: -64px -16px; }
973
- .ui-icon-triangle-1-sw { background-position: -80px -16px; }
974
- .ui-icon-triangle-1-w { background-position: -96px -16px; }
975
- .ui-icon-triangle-1-nw { background-position: -112px -16px; }
976
- .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
977
- .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
978
- .ui-icon-arrow-1-n { background-position: 0 -32px; }
979
- .ui-icon-arrow-1-ne { background-position: -16px -32px; }
980
- .ui-icon-arrow-1-e { background-position: -32px -32px; }
981
- .ui-icon-arrow-1-se { background-position: -48px -32px; }
982
- .ui-icon-arrow-1-s { background-position: -64px -32px; }
983
- .ui-icon-arrow-1-sw { background-position: -80px -32px; }
984
- .ui-icon-arrow-1-w { background-position: -96px -32px; }
985
- .ui-icon-arrow-1-nw { background-position: -112px -32px; }
986
- .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
987
- .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
988
- .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
989
- .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
990
- .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
991
- .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
992
- .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
993
- .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
994
- .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
995
- .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
996
- .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
997
- .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
998
- .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
999
- .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
1000
- .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
1001
- .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
1002
- .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
1003
- .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
1004
- .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
1005
- .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
1006
- .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
1007
- .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
1008
- .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
1009
- .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
1010
- .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
1011
- .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
1012
- .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
1013
- .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
1014
- .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
1015
- .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
1016
- .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
1017
- .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
1018
- .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
1019
- .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
1020
- .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
1021
- .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
1022
- .ui-icon-arrow-4 { background-position: 0 -80px; }
1023
- .ui-icon-arrow-4-diag { background-position: -16px -80px; }
1024
- .ui-icon-extlink { background-position: -32px -80px; }
1025
- .ui-icon-newwin { background-position: -48px -80px; }
1026
- .ui-icon-refresh { background-position: -64px -80px; }
1027
- .ui-icon-shuffle { background-position: -80px -80px; }
1028
- .ui-icon-transfer-e-w { background-position: -96px -80px; }
1029
- .ui-icon-transferthick-e-w { background-position: -112px -80px; }
1030
- .ui-icon-folder-collapsed { background-position: 0 -96px; }
1031
- .ui-icon-folder-open { background-position: -16px -96px; }
1032
- .ui-icon-document { background-position: -32px -96px; }
1033
- .ui-icon-document-b { background-position: -48px -96px; }
1034
- .ui-icon-note { background-position: -64px -96px; }
1035
- .ui-icon-mail-closed { background-position: -80px -96px; }
1036
- .ui-icon-mail-open { background-position: -96px -96px; }
1037
- .ui-icon-suitcase { background-position: -112px -96px; }
1038
- .ui-icon-comment { background-position: -128px -96px; }
1039
- .ui-icon-person { background-position: -144px -96px; }
1040
- .ui-icon-print { background-position: -160px -96px; }
1041
- .ui-icon-trash { background-position: -176px -96px; }
1042
- .ui-icon-locked { background-position: -192px -96px; }
1043
- .ui-icon-unlocked { background-position: -208px -96px; }
1044
- .ui-icon-bookmark { background-position: -224px -96px; }
1045
- .ui-icon-tag { background-position: -240px -96px; }
1046
- .ui-icon-home { background-position: 0 -112px; }
1047
- .ui-icon-flag { background-position: -16px -112px; }
1048
- .ui-icon-calendar { background-position: -32px -112px; }
1049
- .ui-icon-cart { background-position: -48px -112px; }
1050
- .ui-icon-pencil { background-position: -64px -112px; }
1051
- .ui-icon-clock { background-position: -80px -112px; }
1052
- .ui-icon-disk { background-position: -96px -112px; }
1053
- .ui-icon-calculator { background-position: -112px -112px; }
1054
- .ui-icon-zoomin { background-position: -128px -112px; }
1055
- .ui-icon-zoomout { background-position: -144px -112px; }
1056
- .ui-icon-search { background-position: -160px -112px; }
1057
- .ui-icon-wrench { background-position: -176px -112px; }
1058
- .ui-icon-gear { background-position: -192px -112px; }
1059
- .ui-icon-heart { background-position: -208px -112px; }
1060
- .ui-icon-star { background-position: -224px -112px; }
1061
- .ui-icon-link { background-position: -240px -112px; }
1062
- .ui-icon-cancel { background-position: 0 -128px; }
1063
- .ui-icon-plus { background-position: -16px -128px; }
1064
- .ui-icon-plusthick { background-position: -32px -128px; }
1065
- .ui-icon-minus { background-position: -48px -128px; }
1066
- .ui-icon-minusthick { background-position: -64px -128px; }
1067
- .ui-icon-close { background-position: -80px -128px; }
1068
- .ui-icon-closethick { background-position: -96px -128px; }
1069
- .ui-icon-key { background-position: -112px -128px; }
1070
- .ui-icon-lightbulb { background-position: -128px -128px; }
1071
- .ui-icon-scissors { background-position: -144px -128px; }
1072
- .ui-icon-clipboard { background-position: -160px -128px; }
1073
- .ui-icon-copy { background-position: -176px -128px; }
1074
- .ui-icon-contact { background-position: -192px -128px; }
1075
- .ui-icon-image { background-position: -208px -128px; }
1076
- .ui-icon-video { background-position: -224px -128px; }
1077
- .ui-icon-script { background-position: -240px -128px; }
1078
- .ui-icon-alert { background-position: 0 -144px; }
1079
- .ui-icon-info { background-position: -16px -144px; }
1080
- .ui-icon-notice { background-position: -32px -144px; }
1081
- .ui-icon-help { background-position: -48px -144px; }
1082
- .ui-icon-check { background-position: -64px -144px; }
1083
- .ui-icon-bullet { background-position: -80px -144px; }
1084
- .ui-icon-radio-on { background-position: -96px -144px; }
1085
- .ui-icon-radio-off { background-position: -112px -144px; }
1086
- .ui-icon-pin-w { background-position: -128px -144px; }
1087
- .ui-icon-pin-s { background-position: -144px -144px; }
1088
- .ui-icon-play { background-position: 0 -160px; }
1089
- .ui-icon-pause { background-position: -16px -160px; }
1090
- .ui-icon-seek-next { background-position: -32px -160px; }
1091
- .ui-icon-seek-prev { background-position: -48px -160px; }
1092
- .ui-icon-seek-end { background-position: -64px -160px; }
1093
- .ui-icon-seek-start { background-position: -80px -160px; }
1094
- /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
1095
- .ui-icon-seek-first { background-position: -80px -160px; }
1096
- .ui-icon-stop { background-position: -96px -160px; }
1097
- .ui-icon-eject { background-position: -112px -160px; }
1098
- .ui-icon-volume-off { background-position: -128px -160px; }
1099
- .ui-icon-volume-on { background-position: -144px -160px; }
1100
- .ui-icon-power { background-position: 0 -176px; }
1101
- .ui-icon-signal-diag { background-position: -16px -176px; }
1102
- .ui-icon-signal { background-position: -32px -176px; }
1103
- .ui-icon-battery-0 { background-position: -48px -176px; }
1104
- .ui-icon-battery-1 { background-position: -64px -176px; }
1105
- .ui-icon-battery-2 { background-position: -80px -176px; }
1106
- .ui-icon-battery-3 { background-position: -96px -176px; }
1107
- .ui-icon-circle-plus { background-position: 0 -192px; }
1108
- .ui-icon-circle-minus { background-position: -16px -192px; }
1109
- .ui-icon-circle-close { background-position: -32px -192px; }
1110
- .ui-icon-circle-triangle-e { background-position: -48px -192px; }
1111
- .ui-icon-circle-triangle-s { background-position: -64px -192px; }
1112
- .ui-icon-circle-triangle-w { background-position: -80px -192px; }
1113
- .ui-icon-circle-triangle-n { background-position: -96px -192px; }
1114
- .ui-icon-circle-arrow-e { background-position: -112px -192px; }
1115
- .ui-icon-circle-arrow-s { background-position: -128px -192px; }
1116
- .ui-icon-circle-arrow-w { background-position: -144px -192px; }
1117
- .ui-icon-circle-arrow-n { background-position: -160px -192px; }
1118
- .ui-icon-circle-zoomin { background-position: -176px -192px; }
1119
- .ui-icon-circle-zoomout { background-position: -192px -192px; }
1120
- .ui-icon-circle-check { background-position: -208px -192px; }
1121
- .ui-icon-circlesmall-plus { background-position: 0 -208px; }
1122
- .ui-icon-circlesmall-minus { background-position: -16px -208px; }
1123
- .ui-icon-circlesmall-close { background-position: -32px -208px; }
1124
- .ui-icon-squaresmall-plus { background-position: -48px -208px; }
1125
- .ui-icon-squaresmall-minus { background-position: -64px -208px; }
1126
- .ui-icon-squaresmall-close { background-position: -80px -208px; }
1127
- .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
1128
- .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
1129
- .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
1130
- .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
1131
- .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
1132
- .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
1133
-
1134
-
1135
- /* Misc visuals
1136
- ----------------------------------*/
1137
-
1138
- /* Corner radius */
1139
- .ui-corner-all,
1140
- .ui-corner-top,
1141
- .ui-corner-left,
1142
- .ui-corner-tl {
1143
- border-top-left-radius: 4px;
1144
- }
1145
- .ui-corner-all,
1146
- .ui-corner-top,
1147
- .ui-corner-right,
1148
- .ui-corner-tr {
1149
- border-top-right-radius: 4px;
1150
- }
1151
- .ui-corner-all,
1152
- .ui-corner-bottom,
1153
- .ui-corner-left,
1154
- .ui-corner-bl {
1155
- border-bottom-left-radius: 4px;
1156
- }
1157
- .ui-corner-all,
1158
- .ui-corner-bottom,
1159
- .ui-corner-right,
1160
- .ui-corner-br {
1161
- border-bottom-right-radius: 4px;
1162
- }
1163
-
1164
- /* Overlays */
1165
- .ui-widget-overlay {
1166
- background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat;
1167
- opacity: .5;
1168
- filter: Alpha(Opacity=50);
1169
- }
1170
- .ui-widget-shadow {
1171
- margin: -5px 0 0 -5px;
1172
- padding: 5px;
1173
- background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x;
1174
- opacity: .2;
1175
- filter: Alpha(Opacity=20);
1176
- border-radius: 5px;
1177
- }
1
+ /*! jQuery UI - v1.10.3 - 2013-10-19
2
+ * http://jqueryui.com
3
+ * Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css, jquery.ui.theme.css
4
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=gloss_wave&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=highlight_soft&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=glass&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=diagonals_thick&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=diagonals_thick&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=flat&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px
5
+ * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
6
+
7
+ /* Layout helpers
8
+ ----------------------------------*/
9
+ .ui-helper-hidden {
10
+ display: none;
11
+ }
12
+ .ui-helper-hidden-accessible {
13
+ border: 0;
14
+ clip: rect(0 0 0 0);
15
+ height: 1px;
16
+ margin: -1px;
17
+ overflow: hidden;
18
+ padding: 0;
19
+ position: absolute;
20
+ width: 1px;
21
+ }
22
+ .ui-helper-reset {
23
+ margin: 0;
24
+ padding: 0;
25
+ border: 0;
26
+ outline: 0;
27
+ line-height: 1.3;
28
+ text-decoration: none;
29
+ font-size: 100%;
30
+ list-style: none;
31
+ }
32
+ .ui-helper-clearfix:before,
33
+ .ui-helper-clearfix:after {
34
+ content: "";
35
+ display: table;
36
+ border-collapse: collapse;
37
+ }
38
+ .ui-helper-clearfix:after {
39
+ clear: both;
40
+ }
41
+ .ui-helper-clearfix {
42
+ min-height: 0; /* support: IE7 */
43
+ }
44
+ .ui-helper-zfix {
45
+ width: 100%;
46
+ height: 100%;
47
+ top: 0;
48
+ left: 0;
49
+ position: absolute;
50
+ opacity: 0;
51
+ filter:Alpha(Opacity=0);
52
+ }
53
+
54
+ .ui-front {
55
+ z-index: 100;
56
+ }
57
+
58
+
59
+ /* Interaction Cues
60
+ ----------------------------------*/
61
+ .ui-state-disabled {
62
+ cursor: default !important;
63
+ }
64
+
65
+
66
+ /* Icons
67
+ ----------------------------------*/
68
+
69
+ /* states and images */
70
+ .ui-icon {
71
+ display: block;
72
+ text-indent: -99999px;
73
+ overflow: hidden;
74
+ background-repeat: no-repeat;
75
+ }
76
+
77
+
78
+ /* Misc visuals
79
+ ----------------------------------*/
80
+
81
+ /* Overlays */
82
+ .ui-widget-overlay {
83
+ position: fixed;
84
+ top: 0;
85
+ left: 0;
86
+ width: 100%;
87
+ height: 100%;
88
+ }
89
+ .ui-resizable {
90
+ position: relative;
91
+ }
92
+ .ui-resizable-handle {
93
+ position: absolute;
94
+ font-size: 0.1px;
95
+ display: block;
96
+ }
97
+ .ui-resizable-disabled .ui-resizable-handle,
98
+ .ui-resizable-autohide .ui-resizable-handle {
99
+ display: none;
100
+ }
101
+ .ui-resizable-n {
102
+ cursor: n-resize;
103
+ height: 7px;
104
+ width: 100%;
105
+ top: -5px;
106
+ left: 0;
107
+ }
108
+ .ui-resizable-s {
109
+ cursor: s-resize;
110
+ height: 7px;
111
+ width: 100%;
112
+ bottom: -5px;
113
+ left: 0;
114
+ }
115
+ .ui-resizable-e {
116
+ cursor: e-resize;
117
+ width: 7px;
118
+ right: -5px;
119
+ top: 0;
120
+ height: 100%;
121
+ }
122
+ .ui-resizable-w {
123
+ cursor: w-resize;
124
+ width: 7px;
125
+ left: -5px;
126
+ top: 0;
127
+ height: 100%;
128
+ }
129
+ .ui-resizable-se {
130
+ cursor: se-resize;
131
+ width: 12px;
132
+ height: 12px;
133
+ right: 1px;
134
+ bottom: 1px;
135
+ }
136
+ .ui-resizable-sw {
137
+ cursor: sw-resize;
138
+ width: 9px;
139
+ height: 9px;
140
+ left: -5px;
141
+ bottom: -5px;
142
+ }
143
+ .ui-resizable-nw {
144
+ cursor: nw-resize;
145
+ width: 9px;
146
+ height: 9px;
147
+ left: -5px;
148
+ top: -5px;
149
+ }
150
+ .ui-resizable-ne {
151
+ cursor: ne-resize;
152
+ width: 9px;
153
+ height: 9px;
154
+ right: -5px;
155
+ top: -5px;
156
+ }
157
+ .ui-selectable-helper {
158
+ position: absolute;
159
+ z-index: 100;
160
+ border: 1px dotted black;
161
+ }
162
+ .ui-accordion .ui-accordion-header {
163
+ display: block;
164
+ cursor: pointer;
165
+ position: relative;
166
+ margin-top: 2px;
167
+ padding: .5em .5em .5em .7em;
168
+ min-height: 0; /* support: IE7 */
169
+ }
170
+ .ui-accordion .ui-accordion-icons {
171
+ padding-left: 2.2em;
172
+ }
173
+ .ui-accordion .ui-accordion-noicons {
174
+ padding-left: .7em;
175
+ }
176
+ .ui-accordion .ui-accordion-icons .ui-accordion-icons {
177
+ padding-left: 2.2em;
178
+ }
179
+ .ui-accordion .ui-accordion-header .ui-accordion-header-icon {
180
+ position: absolute;
181
+ left: .5em;
182
+ top: 50%;
183
+ margin-top: -8px;
184
+ }
185
+ .ui-accordion .ui-accordion-content {
186
+ padding: 1em 2.2em;
187
+ border-top: 0;
188
+ overflow: auto;
189
+ }
190
+ .ui-autocomplete {
191
+ position: absolute;
192
+ top: 0;
193
+ left: 0;
194
+ cursor: default;
195
+ }
196
+ .ui-button {
197
+ display: inline-block;
198
+ position: relative;
199
+ padding: 0;
200
+ line-height: normal;
201
+ margin-right: .1em;
202
+ cursor: pointer;
203
+ vertical-align: middle;
204
+ text-align: center;
205
+ overflow: visible; /* removes extra width in IE */
206
+ }
207
+ .ui-button,
208
+ .ui-button:link,
209
+ .ui-button:visited,
210
+ .ui-button:hover,
211
+ .ui-button:active {
212
+ text-decoration: none;
213
+ }
214
+ /* to make room for the icon, a width needs to be set here */
215
+ .ui-button-icon-only {
216
+ width: 2.2em;
217
+ }
218
+ /* button elements seem to need a little more width */
219
+ button.ui-button-icon-only {
220
+ width: 2.4em;
221
+ }
222
+ .ui-button-icons-only {
223
+ width: 3.4em;
224
+ }
225
+ button.ui-button-icons-only {
226
+ width: 3.7em;
227
+ }
228
+
229
+ /* button text element */
230
+ .ui-button .ui-button-text {
231
+ display: block;
232
+ line-height: normal;
233
+ }
234
+ .ui-button-text-only .ui-button-text {
235
+ padding: .4em 1em;
236
+ }
237
+ .ui-button-icon-only .ui-button-text,
238
+ .ui-button-icons-only .ui-button-text {
239
+ padding: .4em;
240
+ text-indent: -9999999px;
241
+ }
242
+ .ui-button-text-icon-primary .ui-button-text,
243
+ .ui-button-text-icons .ui-button-text {
244
+ padding: .4em 1em .4em 2.1em;
245
+ }
246
+ .ui-button-text-icon-secondary .ui-button-text,
247
+ .ui-button-text-icons .ui-button-text {
248
+ padding: .4em 2.1em .4em 1em;
249
+ }
250
+ .ui-button-text-icons .ui-button-text {
251
+ padding-left: 2.1em;
252
+ padding-right: 2.1em;
253
+ }
254
+ /* no icon support for input elements, provide padding by default */
255
+ input.ui-button {
256
+ padding: .4em 1em;
257
+ }
258
+
259
+ /* button icon element(s) */
260
+ .ui-button-icon-only .ui-icon,
261
+ .ui-button-text-icon-primary .ui-icon,
262
+ .ui-button-text-icon-secondary .ui-icon,
263
+ .ui-button-text-icons .ui-icon,
264
+ .ui-button-icons-only .ui-icon {
265
+ position: absolute;
266
+ top: 50%;
267
+ margin-top: -8px;
268
+ }
269
+ .ui-button-icon-only .ui-icon {
270
+ left: 50%;
271
+ margin-left: -8px;
272
+ }
273
+ .ui-button-text-icon-primary .ui-button-icon-primary,
274
+ .ui-button-text-icons .ui-button-icon-primary,
275
+ .ui-button-icons-only .ui-button-icon-primary {
276
+ left: .5em;
277
+ }
278
+ .ui-button-text-icon-secondary .ui-button-icon-secondary,
279
+ .ui-button-text-icons .ui-button-icon-secondary,
280
+ .ui-button-icons-only .ui-button-icon-secondary {
281
+ right: .5em;
282
+ }
283
+
284
+ /* button sets */
285
+ .ui-buttonset {
286
+ margin-right: 7px;
287
+ }
288
+ .ui-buttonset .ui-button {
289
+ margin-left: 0;
290
+ margin-right: -.3em;
291
+ }
292
+
293
+ /* workarounds */
294
+ /* reset extra padding in Firefox, see h5bp.com/l */
295
+ input.ui-button::-moz-focus-inner,
296
+ button.ui-button::-moz-focus-inner {
297
+ border: 0;
298
+ padding: 0;
299
+ }
300
+ .ui-datepicker {
301
+ width: 17em;
302
+ padding: .2em .2em 0;
303
+ display: none;
304
+ }
305
+ .ui-datepicker .ui-datepicker-header {
306
+ position: relative;
307
+ padding: .2em 0;
308
+ }
309
+ .ui-datepicker .ui-datepicker-prev,
310
+ .ui-datepicker .ui-datepicker-next {
311
+ position: absolute;
312
+ top: 2px;
313
+ width: 1.8em;
314
+ height: 1.8em;
315
+ }
316
+ .ui-datepicker .ui-datepicker-prev-hover,
317
+ .ui-datepicker .ui-datepicker-next-hover {
318
+ top: 1px;
319
+ }
320
+ .ui-datepicker .ui-datepicker-prev {
321
+ left: 2px;
322
+ }
323
+ .ui-datepicker .ui-datepicker-next {
324
+ right: 2px;
325
+ }
326
+ .ui-datepicker .ui-datepicker-prev-hover {
327
+ left: 1px;
328
+ }
329
+ .ui-datepicker .ui-datepicker-next-hover {
330
+ right: 1px;
331
+ }
332
+ .ui-datepicker .ui-datepicker-prev span,
333
+ .ui-datepicker .ui-datepicker-next span {
334
+ display: block;
335
+ position: absolute;
336
+ left: 50%;
337
+ margin-left: -8px;
338
+ top: 50%;
339
+ margin-top: -8px;
340
+ }
341
+ .ui-datepicker .ui-datepicker-title {
342
+ margin: 0 2.3em;
343
+ line-height: 1.8em;
344
+ text-align: center;
345
+ }
346
+ .ui-datepicker .ui-datepicker-title select {
347
+ font-size: 1em;
348
+ margin: 1px 0;
349
+ }
350
+ .ui-datepicker select.ui-datepicker-month-year {
351
+ width: 100%;
352
+ }
353
+ .ui-datepicker select.ui-datepicker-month,
354
+ .ui-datepicker select.ui-datepicker-year {
355
+ width: 49%;
356
+ }
357
+ .ui-datepicker table {
358
+ width: 100%;
359
+ font-size: .9em;
360
+ border-collapse: collapse;
361
+ margin: 0 0 .4em;
362
+ }
363
+ .ui-datepicker th {
364
+ padding: .7em .3em;
365
+ text-align: center;
366
+ font-weight: bold;
367
+ border: 0;
368
+ }
369
+ .ui-datepicker td {
370
+ border: 0;
371
+ padding: 1px;
372
+ }
373
+ .ui-datepicker td span,
374
+ .ui-datepicker td a {
375
+ display: block;
376
+ padding: .2em;
377
+ text-align: right;
378
+ text-decoration: none;
379
+ }
380
+ .ui-datepicker .ui-datepicker-buttonpane {
381
+ background-image: none;
382
+ margin: .7em 0 0 0;
383
+ padding: 0 .2em;
384
+ border-left: 0;
385
+ border-right: 0;
386
+ border-bottom: 0;
387
+ }
388
+ .ui-datepicker .ui-datepicker-buttonpane button {
389
+ float: right;
390
+ margin: .5em .2em .4em;
391
+ cursor: pointer;
392
+ padding: .2em .6em .3em .6em;
393
+ width: auto;
394
+ overflow: visible;
395
+ }
396
+ .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
397
+ float: left;
398
+ }
399
+
400
+ /* with multiple calendars */
401
+ .ui-datepicker.ui-datepicker-multi {
402
+ width: auto;
403
+ }
404
+ .ui-datepicker-multi .ui-datepicker-group {
405
+ float: left;
406
+ }
407
+ .ui-datepicker-multi .ui-datepicker-group table {
408
+ width: 95%;
409
+ margin: 0 auto .4em;
410
+ }
411
+ .ui-datepicker-multi-2 .ui-datepicker-group {
412
+ width: 50%;
413
+ }
414
+ .ui-datepicker-multi-3 .ui-datepicker-group {
415
+ width: 33.3%;
416
+ }
417
+ .ui-datepicker-multi-4 .ui-datepicker-group {
418
+ width: 25%;
419
+ }
420
+ .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
421
+ .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
422
+ border-left-width: 0;
423
+ }
424
+ .ui-datepicker-multi .ui-datepicker-buttonpane {
425
+ clear: left;
426
+ }
427
+ .ui-datepicker-row-break {
428
+ clear: both;
429
+ width: 100%;
430
+ font-size: 0;
431
+ }
432
+
433
+ /* RTL support */
434
+ .ui-datepicker-rtl {
435
+ direction: rtl;
436
+ }
437
+ .ui-datepicker-rtl .ui-datepicker-prev {
438
+ right: 2px;
439
+ left: auto;
440
+ }
441
+ .ui-datepicker-rtl .ui-datepicker-next {
442
+ left: 2px;
443
+ right: auto;
444
+ }
445
+ .ui-datepicker-rtl .ui-datepicker-prev:hover {
446
+ right: 1px;
447
+ left: auto;
448
+ }
449
+ .ui-datepicker-rtl .ui-datepicker-next:hover {
450
+ left: 1px;
451
+ right: auto;
452
+ }
453
+ .ui-datepicker-rtl .ui-datepicker-buttonpane {
454
+ clear: right;
455
+ }
456
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button {
457
+ float: left;
458
+ }
459
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
460
+ .ui-datepicker-rtl .ui-datepicker-group {
461
+ float: right;
462
+ }
463
+ .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
464
+ .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
465
+ border-right-width: 0;
466
+ border-left-width: 1px;
467
+ }
468
+ .ui-dialog {
469
+ position: absolute;
470
+ top: 0;
471
+ left: 0;
472
+ padding: .2em;
473
+ outline: 0;
474
+ }
475
+ .ui-dialog .ui-dialog-titlebar {
476
+ padding: .4em 1em;
477
+ position: relative;
478
+ }
479
+ .ui-dialog .ui-dialog-title {
480
+ float: left;
481
+ margin: .1em 0;
482
+ white-space: nowrap;
483
+ width: 90%;
484
+ overflow: hidden;
485
+ text-overflow: ellipsis;
486
+ }
487
+ .ui-dialog .ui-dialog-titlebar-close {
488
+ position: absolute;
489
+ right: .3em;
490
+ top: 50%;
491
+ width: 21px;
492
+ margin: -10px 0 0 0;
493
+ padding: 1px;
494
+ height: 20px;
495
+ }
496
+ .ui-dialog .ui-dialog-content {
497
+ position: relative;
498
+ border: 0;
499
+ padding: .5em 1em;
500
+ background: none;
501
+ overflow: auto;
502
+ }
503
+ .ui-dialog .ui-dialog-buttonpane {
504
+ text-align: left;
505
+ border-width: 1px 0 0 0;
506
+ background-image: none;
507
+ margin-top: .5em;
508
+ padding: .3em 1em .5em .4em;
509
+ }
510
+ .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
511
+ float: right;
512
+ }
513
+ .ui-dialog .ui-dialog-buttonpane button {
514
+ margin: .5em .4em .5em 0;
515
+ cursor: pointer;
516
+ }
517
+ .ui-dialog .ui-resizable-se {
518
+ width: 12px;
519
+ height: 12px;
520
+ right: -5px;
521
+ bottom: -5px;
522
+ background-position: 16px 16px;
523
+ }
524
+ .ui-draggable .ui-dialog-titlebar {
525
+ cursor: move;
526
+ }
527
+ .ui-menu {
528
+ list-style: none;
529
+ padding: 2px;
530
+ margin: 0;
531
+ display: block;
532
+ outline: none;
533
+ }
534
+ .ui-menu .ui-menu {
535
+ margin-top: -3px;
536
+ position: absolute;
537
+ }
538
+ .ui-menu .ui-menu-item {
539
+ margin: 0;
540
+ padding: 0;
541
+ width: 100%;
542
+ /* support: IE10, see #8844 */
543
+ list-style-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);
544
+ }
545
+ .ui-menu .ui-menu-divider {
546
+ margin: 5px -2px 5px -2px;
547
+ height: 0;
548
+ font-size: 0;
549
+ line-height: 0;
550
+ border-width: 1px 0 0 0;
551
+ }
552
+ .ui-menu .ui-menu-item a {
553
+ text-decoration: none;
554
+ display: block;
555
+ padding: 2px .4em;
556
+ line-height: 1.5;
557
+ min-height: 0; /* support: IE7 */
558
+ font-weight: normal;
559
+ }
560
+ .ui-menu .ui-menu-item a.ui-state-focus,
561
+ .ui-menu .ui-menu-item a.ui-state-active {
562
+ font-weight: normal;
563
+ margin: -1px;
564
+ }
565
+
566
+ .ui-menu .ui-state-disabled {
567
+ font-weight: normal;
568
+ margin: .4em 0 .2em;
569
+ line-height: 1.5;
570
+ }
571
+ .ui-menu .ui-state-disabled a {
572
+ cursor: default;
573
+ }
574
+
575
+ /* icon support */
576
+ .ui-menu-icons {
577
+ position: relative;
578
+ }
579
+ .ui-menu-icons .ui-menu-item a {
580
+ position: relative;
581
+ padding-left: 2em;
582
+ }
583
+
584
+ /* left-aligned */
585
+ .ui-menu .ui-icon {
586
+ position: absolute;
587
+ top: .2em;
588
+ left: .2em;
589
+ }
590
+
591
+ /* right-aligned */
592
+ .ui-menu .ui-menu-icon {
593
+ position: static;
594
+ float: right;
595
+ }
596
+ .ui-progressbar {
597
+ height: 2em;
598
+ text-align: left;
599
+ overflow: hidden;
600
+ }
601
+ .ui-progressbar .ui-progressbar-value {
602
+ margin: -1px;
603
+ height: 100%;
604
+ }
605
+ .ui-progressbar .ui-progressbar-overlay {
606
+ background: url("images/animated-overlay.gif");
607
+ height: 100%;
608
+ filter: alpha(opacity=25);
609
+ opacity: 0.25;
610
+ }
611
+ .ui-progressbar-indeterminate .ui-progressbar-value {
612
+ background-image: none;
613
+ }
614
+ .ui-slider {
615
+ position: relative;
616
+ text-align: left;
617
+ }
618
+ .ui-slider .ui-slider-handle {
619
+ position: absolute;
620
+ z-index: 2;
621
+ width: 1.2em;
622
+ height: 1.2em;
623
+ cursor: default;
624
+ }
625
+ .ui-slider .ui-slider-range {
626
+ position: absolute;
627
+ z-index: 1;
628
+ font-size: .7em;
629
+ display: block;
630
+ border: 0;
631
+ background-position: 0 0;
632
+ }
633
+
634
+ /* For IE8 - See #6727 */
635
+ .ui-slider.ui-state-disabled .ui-slider-handle,
636
+ .ui-slider.ui-state-disabled .ui-slider-range {
637
+ filter: inherit;
638
+ }
639
+
640
+ .ui-slider-horizontal {
641
+ height: .8em;
642
+ }
643
+ .ui-slider-horizontal .ui-slider-handle {
644
+ top: -.3em;
645
+ margin-left: -.6em;
646
+ }
647
+ .ui-slider-horizontal .ui-slider-range {
648
+ top: 0;
649
+ height: 100%;
650
+ }
651
+ .ui-slider-horizontal .ui-slider-range-min {
652
+ left: 0;
653
+ }
654
+ .ui-slider-horizontal .ui-slider-range-max {
655
+ right: 0;
656
+ }
657
+
658
+ .ui-slider-vertical {
659
+ width: .8em;
660
+ height: 100px;
661
+ }
662
+ .ui-slider-vertical .ui-slider-handle {
663
+ left: -.3em;
664
+ margin-left: 0;
665
+ margin-bottom: -.6em;
666
+ }
667
+ .ui-slider-vertical .ui-slider-range {
668
+ left: 0;
669
+ width: 100%;
670
+ }
671
+ .ui-slider-vertical .ui-slider-range-min {
672
+ bottom: 0;
673
+ }
674
+ .ui-slider-vertical .ui-slider-range-max {
675
+ top: 0;
676
+ }
677
+ .ui-spinner {
678
+ position: relative;
679
+ display: inline-block;
680
+ overflow: hidden;
681
+ padding: 0;
682
+ vertical-align: middle;
683
+ }
684
+ .ui-spinner-input {
685
+ border: none;
686
+ background: none;
687
+ color: inherit;
688
+ padding: 0;
689
+ margin: .2em 0;
690
+ vertical-align: middle;
691
+ margin-left: .4em;
692
+ margin-right: 22px;
693
+ }
694
+ .ui-spinner-button {
695
+ width: 16px;
696
+ height: 50%;
697
+ font-size: .5em;
698
+ padding: 0;
699
+ margin: 0;
700
+ text-align: center;
701
+ position: absolute;
702
+ cursor: default;
703
+ display: block;
704
+ overflow: hidden;
705
+ right: 0;
706
+ }
707
+ /* more specificity required here to overide default borders */
708
+ .ui-spinner a.ui-spinner-button {
709
+ border-top: none;
710
+ border-bottom: none;
711
+ border-right: none;
712
+ }
713
+ /* vertical centre icon */
714
+ .ui-spinner .ui-icon {
715
+ position: absolute;
716
+ margin-top: -8px;
717
+ top: 50%;
718
+ left: 0;
719
+ }
720
+ .ui-spinner-up {
721
+ top: 0;
722
+ }
723
+ .ui-spinner-down {
724
+ bottom: 0;
725
+ }
726
+
727
+ /* TR overrides */
728
+ .ui-spinner .ui-icon-triangle-1-s {
729
+ /* need to fix icons sprite */
730
+ background-position: -65px -16px;
731
+ }
732
+ .ui-tabs {
733
+ position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
734
+ padding: .2em;
735
+ }
736
+ .ui-tabs .ui-tabs-nav {
737
+ margin: 0;
738
+ padding: .2em .2em 0;
739
+ }
740
+ .ui-tabs .ui-tabs-nav li {
741
+ list-style: none;
742
+ float: left;
743
+ position: relative;
744
+ top: 0;
745
+ margin: 1px .2em 0 0;
746
+ border-bottom-width: 0;
747
+ padding: 0;
748
+ white-space: nowrap;
749
+ }
750
+ .ui-tabs .ui-tabs-nav li a {
751
+ float: left;
752
+ padding: .5em 1em;
753
+ text-decoration: none;
754
+ }
755
+ .ui-tabs .ui-tabs-nav li.ui-tabs-active {
756
+ margin-bottom: -1px;
757
+ padding-bottom: 1px;
758
+ }
759
+ .ui-tabs .ui-tabs-nav li.ui-tabs-active a,
760
+ .ui-tabs .ui-tabs-nav li.ui-state-disabled a,
761
+ .ui-tabs .ui-tabs-nav li.ui-tabs-loading a {
762
+ cursor: text;
763
+ }
764
+ .ui-tabs .ui-tabs-nav li a, /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
765
+ .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a {
766
+ cursor: pointer;
767
+ }
768
+ .ui-tabs .ui-tabs-panel {
769
+ display: block;
770
+ border-width: 0;
771
+ padding: 1em 1.4em;
772
+ background: none;
773
+ }
774
+ .ui-tooltip {
775
+ padding: 8px;
776
+ position: absolute;
777
+ z-index: 9999;
778
+ max-width: 300px;
779
+ -webkit-box-shadow: 0 0 5px #aaa;
780
+ box-shadow: 0 0 5px #aaa;
781
+ }
782
+ body .ui-tooltip {
783
+ border-width: 2px;
784
+ }
785
+
786
+ /* Component containers
787
+ ----------------------------------*/
788
+ .ui-widget {
789
+ font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;
790
+ font-size: 1.1em;
791
+ }
792
+ .ui-widget .ui-widget {
793
+ font-size: 1em;
794
+ }
795
+ .ui-widget input,
796
+ .ui-widget select,
797
+ .ui-widget textarea,
798
+ .ui-widget button {
799
+ font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;
800
+ font-size: 1em;
801
+ }
802
+ .ui-widget-content {
803
+ border: 1px solid #dddddd;
804
+ background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x;
805
+ color: #333333;
806
+ }
807
+ .ui-widget-content a {
808
+ color: #333333;
809
+ }
810
+ .ui-widget-header {
811
+ border: 1px solid #e78f08;
812
+ background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x;
813
+ color: #ffffff;
814
+ font-weight: bold;
815
+ }
816
+ .ui-widget-header a {
817
+ color: #ffffff;
818
+ }
819
+
820
+ /* Interaction states
821
+ ----------------------------------*/
822
+ .ui-state-default,
823
+ .ui-widget-content .ui-state-default,
824
+ .ui-widget-header .ui-state-default {
825
+ border: 1px solid #cccccc;
826
+ background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x;
827
+ font-weight: bold;
828
+ color: #1c94c4;
829
+ }
830
+ .ui-state-default a,
831
+ .ui-state-default a:link,
832
+ .ui-state-default a:visited {
833
+ color: #1c94c4;
834
+ text-decoration: none;
835
+ }
836
+ .ui-state-hover,
837
+ .ui-widget-content .ui-state-hover,
838
+ .ui-widget-header .ui-state-hover,
839
+ .ui-state-focus,
840
+ .ui-widget-content .ui-state-focus,
841
+ .ui-widget-header .ui-state-focus {
842
+ border: 1px solid #fbcb09;
843
+ background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x;
844
+ font-weight: bold;
845
+ color: #c77405;
846
+ }
847
+ .ui-state-hover a,
848
+ .ui-state-hover a:hover,
849
+ .ui-state-hover a:link,
850
+ .ui-state-hover a:visited {
851
+ color: #c77405;
852
+ text-decoration: none;
853
+ }
854
+ .ui-state-active,
855
+ .ui-widget-content .ui-state-active,
856
+ .ui-widget-header .ui-state-active {
857
+ border: 1px solid #fbd850;
858
+ background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;
859
+ font-weight: bold;
860
+ color: #eb8f00;
861
+ }
862
+ .ui-state-active a,
863
+ .ui-state-active a:link,
864
+ .ui-state-active a:visited {
865
+ color: #eb8f00;
866
+ text-decoration: none;
867
+ }
868
+
869
+ /* Interaction Cues
870
+ ----------------------------------*/
871
+ .ui-state-highlight,
872
+ .ui-widget-content .ui-state-highlight,
873
+ .ui-widget-header .ui-state-highlight {
874
+ border: 1px solid #fed22f;
875
+ background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x;
876
+ color: #363636;
877
+ }
878
+ .ui-state-highlight a,
879
+ .ui-widget-content .ui-state-highlight a,
880
+ .ui-widget-header .ui-state-highlight a {
881
+ color: #363636;
882
+ }
883
+ .ui-state-error,
884
+ .ui-widget-content .ui-state-error,
885
+ .ui-widget-header .ui-state-error {
886
+ border: 1px solid #cd0a0a;
887
+ background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat;
888
+ color: #ffffff;
889
+ }
890
+ .ui-state-error a,
891
+ .ui-widget-content .ui-state-error a,
892
+ .ui-widget-header .ui-state-error a {
893
+ color: #ffffff;
894
+ }
895
+ .ui-state-error-text,
896
+ .ui-widget-content .ui-state-error-text,
897
+ .ui-widget-header .ui-state-error-text {
898
+ color: #ffffff;
899
+ }
900
+ .ui-priority-primary,
901
+ .ui-widget-content .ui-priority-primary,
902
+ .ui-widget-header .ui-priority-primary {
903
+ font-weight: bold;
904
+ }
905
+ .ui-priority-secondary,
906
+ .ui-widget-content .ui-priority-secondary,
907
+ .ui-widget-header .ui-priority-secondary {
908
+ opacity: .7;
909
+ filter:Alpha(Opacity=70);
910
+ font-weight: normal;
911
+ }
912
+ .ui-state-disabled,
913
+ .ui-widget-content .ui-state-disabled,
914
+ .ui-widget-header .ui-state-disabled {
915
+ opacity: .35;
916
+ filter:Alpha(Opacity=35);
917
+ background-image: none;
918
+ }
919
+ .ui-state-disabled .ui-icon {
920
+ filter:Alpha(Opacity=35); /* For IE8 - See #6059 */
921
+ }
922
+
923
+ /* Icons
924
+ ----------------------------------*/
925
+
926
+ /* states and images */
927
+ .ui-icon {
928
+ width: 16px;
929
+ height: 16px;
930
+ }
931
+ .ui-icon,
932
+ .ui-widget-content .ui-icon {
933
+ background-image: url(images/ui-icons_222222_256x240.png);
934
+ }
935
+ .ui-widget-header .ui-icon {
936
+ background-image: url(images/ui-icons_ffffff_256x240.png);
937
+ }
938
+ .ui-state-default .ui-icon {
939
+ background-image: url(images/ui-icons_ef8c08_256x240.png);
940
+ }
941
+ .ui-state-hover .ui-icon,
942
+ .ui-state-focus .ui-icon {
943
+ background-image: url(images/ui-icons_ef8c08_256x240.png);
944
+ }
945
+ .ui-state-active .ui-icon {
946
+ background-image: url(images/ui-icons_ef8c08_256x240.png);
947
+ }
948
+ .ui-state-highlight .ui-icon {
949
+ background-image: url(images/ui-icons_228ef1_256x240.png);
950
+ }
951
+ .ui-state-error .ui-icon,
952
+ .ui-state-error-text .ui-icon {
953
+ background-image: url(images/ui-icons_ffd27a_256x240.png);
954
+ }
955
+
956
+ /* positioning */
957
+ .ui-icon-blank { background-position: 16px 16px; }
958
+ .ui-icon-carat-1-n { background-position: 0 0; }
959
+ .ui-icon-carat-1-ne { background-position: -16px 0; }
960
+ .ui-icon-carat-1-e { background-position: -32px 0; }
961
+ .ui-icon-carat-1-se { background-position: -48px 0; }
962
+ .ui-icon-carat-1-s { background-position: -64px 0; }
963
+ .ui-icon-carat-1-sw { background-position: -80px 0; }
964
+ .ui-icon-carat-1-w { background-position: -96px 0; }
965
+ .ui-icon-carat-1-nw { background-position: -112px 0; }
966
+ .ui-icon-carat-2-n-s { background-position: -128px 0; }
967
+ .ui-icon-carat-2-e-w { background-position: -144px 0; }
968
+ .ui-icon-triangle-1-n { background-position: 0 -16px; }
969
+ .ui-icon-triangle-1-ne { background-position: -16px -16px; }
970
+ .ui-icon-triangle-1-e { background-position: -32px -16px; }
971
+ .ui-icon-triangle-1-se { background-position: -48px -16px; }
972
+ .ui-icon-triangle-1-s { background-position: -64px -16px; }
973
+ .ui-icon-triangle-1-sw { background-position: -80px -16px; }
974
+ .ui-icon-triangle-1-w { background-position: -96px -16px; }
975
+ .ui-icon-triangle-1-nw { background-position: -112px -16px; }
976
+ .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
977
+ .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
978
+ .ui-icon-arrow-1-n { background-position: 0 -32px; }
979
+ .ui-icon-arrow-1-ne { background-position: -16px -32px; }
980
+ .ui-icon-arrow-1-e { background-position: -32px -32px; }
981
+ .ui-icon-arrow-1-se { background-position: -48px -32px; }
982
+ .ui-icon-arrow-1-s { background-position: -64px -32px; }
983
+ .ui-icon-arrow-1-sw { background-position: -80px -32px; }
984
+ .ui-icon-arrow-1-w { background-position: -96px -32px; }
985
+ .ui-icon-arrow-1-nw { background-position: -112px -32px; }
986
+ .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
987
+ .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
988
+ .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
989
+ .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
990
+ .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
991
+ .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
992
+ .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
993
+ .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
994
+ .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
995
+ .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
996
+ .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
997
+ .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
998
+ .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
999
+ .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
1000
+ .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
1001
+ .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
1002
+ .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
1003
+ .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
1004
+ .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
1005
+ .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
1006
+ .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
1007
+ .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
1008
+ .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
1009
+ .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
1010
+ .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
1011
+ .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
1012
+ .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
1013
+ .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
1014
+ .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
1015
+ .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
1016
+ .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
1017
+ .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
1018
+ .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
1019
+ .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
1020
+ .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
1021
+ .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
1022
+ .ui-icon-arrow-4 { background-position: 0 -80px; }
1023
+ .ui-icon-arrow-4-diag { background-position: -16px -80px; }
1024
+ .ui-icon-extlink { background-position: -32px -80px; }
1025
+ .ui-icon-newwin { background-position: -48px -80px; }
1026
+ .ui-icon-refresh { background-position: -64px -80px; }
1027
+ .ui-icon-shuffle { background-position: -80px -80px; }
1028
+ .ui-icon-transfer-e-w { background-position: -96px -80px; }
1029
+ .ui-icon-transferthick-e-w { background-position: -112px -80px; }
1030
+ .ui-icon-folder-collapsed { background-position: 0 -96px; }
1031
+ .ui-icon-folder-open { background-position: -16px -96px; }
1032
+ .ui-icon-document { background-position: -32px -96px; }
1033
+ .ui-icon-document-b { background-position: -48px -96px; }
1034
+ .ui-icon-note { background-position: -64px -96px; }
1035
+ .ui-icon-mail-closed { background-position: -80px -96px; }
1036
+ .ui-icon-mail-open { background-position: -96px -96px; }
1037
+ .ui-icon-suitcase { background-position: -112px -96px; }
1038
+ .ui-icon-comment { background-position: -128px -96px; }
1039
+ .ui-icon-person { background-position: -144px -96px; }
1040
+ .ui-icon-print { background-position: -160px -96px; }
1041
+ .ui-icon-trash { background-position: -176px -96px; }
1042
+ .ui-icon-locked { background-position: -192px -96px; }
1043
+ .ui-icon-unlocked { background-position: -208px -96px; }
1044
+ .ui-icon-bookmark { background-position: -224px -96px; }
1045
+ .ui-icon-tag { background-position: -240px -96px; }
1046
+ .ui-icon-home { background-position: 0 -112px; }
1047
+ .ui-icon-flag { background-position: -16px -112px; }
1048
+ .ui-icon-calendar { background-position: -32px -112px; }
1049
+ .ui-icon-cart { background-position: -48px -112px; }
1050
+ .ui-icon-pencil { background-position: -64px -112px; }
1051
+ .ui-icon-clock { background-position: -80px -112px; }
1052
+ .ui-icon-disk { background-position: -96px -112px; }
1053
+ .ui-icon-calculator { background-position: -112px -112px; }
1054
+ .ui-icon-zoomin { background-position: -128px -112px; }
1055
+ .ui-icon-zoomout { background-position: -144px -112px; }
1056
+ .ui-icon-search { background-position: -160px -112px; }
1057
+ .ui-icon-wrench { background-position: -176px -112px; }
1058
+ .ui-icon-gear { background-position: -192px -112px; }
1059
+ .ui-icon-heart { background-position: -208px -112px; }
1060
+ .ui-icon-star { background-position: -224px -112px; }
1061
+ .ui-icon-link { background-position: -240px -112px; }
1062
+ .ui-icon-cancel { background-position: 0 -128px; }
1063
+ .ui-icon-plus { background-position: -16px -128px; }
1064
+ .ui-icon-plusthick { background-position: -32px -128px; }
1065
+ .ui-icon-minus { background-position: -48px -128px; }
1066
+ .ui-icon-minusthick { background-position: -64px -128px; }
1067
+ .ui-icon-close { background-position: -80px -128px; }
1068
+ .ui-icon-closethick { background-position: -96px -128px; }
1069
+ .ui-icon-key { background-position: -112px -128px; }
1070
+ .ui-icon-lightbulb { background-position: -128px -128px; }
1071
+ .ui-icon-scissors { background-position: -144px -128px; }
1072
+ .ui-icon-clipboard { background-position: -160px -128px; }
1073
+ .ui-icon-copy { background-position: -176px -128px; }
1074
+ .ui-icon-contact { background-position: -192px -128px; }
1075
+ .ui-icon-image { background-position: -208px -128px; }
1076
+ .ui-icon-video { background-position: -224px -128px; }
1077
+ .ui-icon-script { background-position: -240px -128px; }
1078
+ .ui-icon-alert { background-position: 0 -144px; }
1079
+ .ui-icon-info { background-position: -16px -144px; }
1080
+ .ui-icon-notice { background-position: -32px -144px; }
1081
+ .ui-icon-help { background-position: -48px -144px; }
1082
+ .ui-icon-check { background-position: -64px -144px; }
1083
+ .ui-icon-bullet { background-position: -80px -144px; }
1084
+ .ui-icon-radio-on { background-position: -96px -144px; }
1085
+ .ui-icon-radio-off { background-position: -112px -144px; }
1086
+ .ui-icon-pin-w { background-position: -128px -144px; }
1087
+ .ui-icon-pin-s { background-position: -144px -144px; }
1088
+ .ui-icon-play { background-position: 0 -160px; }
1089
+ .ui-icon-pause { background-position: -16px -160px; }
1090
+ .ui-icon-seek-next { background-position: -32px -160px; }
1091
+ .ui-icon-seek-prev { background-position: -48px -160px; }
1092
+ .ui-icon-seek-end { background-position: -64px -160px; }
1093
+ .ui-icon-seek-start { background-position: -80px -160px; }
1094
+ /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
1095
+ .ui-icon-seek-first { background-position: -80px -160px; }
1096
+ .ui-icon-stop { background-position: -96px -160px; }
1097
+ .ui-icon-eject { background-position: -112px -160px; }
1098
+ .ui-icon-volume-off { background-position: -128px -160px; }
1099
+ .ui-icon-volume-on { background-position: -144px -160px; }
1100
+ .ui-icon-power { background-position: 0 -176px; }
1101
+ .ui-icon-signal-diag { background-position: -16px -176px; }
1102
+ .ui-icon-signal { background-position: -32px -176px; }
1103
+ .ui-icon-battery-0 { background-position: -48px -176px; }
1104
+ .ui-icon-battery-1 { background-position: -64px -176px; }
1105
+ .ui-icon-battery-2 { background-position: -80px -176px; }
1106
+ .ui-icon-battery-3 { background-position: -96px -176px; }
1107
+ .ui-icon-circle-plus { background-position: 0 -192px; }
1108
+ .ui-icon-circle-minus { background-position: -16px -192px; }
1109
+ .ui-icon-circle-close { background-position: -32px -192px; }
1110
+ .ui-icon-circle-triangle-e { background-position: -48px -192px; }
1111
+ .ui-icon-circle-triangle-s { background-position: -64px -192px; }
1112
+ .ui-icon-circle-triangle-w { background-position: -80px -192px; }
1113
+ .ui-icon-circle-triangle-n { background-position: -96px -192px; }
1114
+ .ui-icon-circle-arrow-e { background-position: -112px -192px; }
1115
+ .ui-icon-circle-arrow-s { background-position: -128px -192px; }
1116
+ .ui-icon-circle-arrow-w { background-position: -144px -192px; }
1117
+ .ui-icon-circle-arrow-n { background-position: -160px -192px; }
1118
+ .ui-icon-circle-zoomin { background-position: -176px -192px; }
1119
+ .ui-icon-circle-zoomout { background-position: -192px -192px; }
1120
+ .ui-icon-circle-check { background-position: -208px -192px; }
1121
+ .ui-icon-circlesmall-plus { background-position: 0 -208px; }
1122
+ .ui-icon-circlesmall-minus { background-position: -16px -208px; }
1123
+ .ui-icon-circlesmall-close { background-position: -32px -208px; }
1124
+ .ui-icon-squaresmall-plus { background-position: -48px -208px; }
1125
+ .ui-icon-squaresmall-minus { background-position: -64px -208px; }
1126
+ .ui-icon-squaresmall-close { background-position: -80px -208px; }
1127
+ .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
1128
+ .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
1129
+ .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
1130
+ .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
1131
+ .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
1132
+ .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
1133
+
1134
+
1135
+ /* Misc visuals
1136
+ ----------------------------------*/
1137
+
1138
+ /* Corner radius */
1139
+ .ui-corner-all,
1140
+ .ui-corner-top,
1141
+ .ui-corner-left,
1142
+ .ui-corner-tl {
1143
+ border-top-left-radius: 4px;
1144
+ }
1145
+ .ui-corner-all,
1146
+ .ui-corner-top,
1147
+ .ui-corner-right,
1148
+ .ui-corner-tr {
1149
+ border-top-right-radius: 4px;
1150
+ }
1151
+ .ui-corner-all,
1152
+ .ui-corner-bottom,
1153
+ .ui-corner-left,
1154
+ .ui-corner-bl {
1155
+ border-bottom-left-radius: 4px;
1156
+ }
1157
+ .ui-corner-all,
1158
+ .ui-corner-bottom,
1159
+ .ui-corner-right,
1160
+ .ui-corner-br {
1161
+ border-bottom-right-radius: 4px;
1162
+ }
1163
+
1164
+ /* Overlays */
1165
+ .ui-widget-overlay {
1166
+ background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat;
1167
+ opacity: .5;
1168
+ filter: Alpha(Opacity=50);
1169
+ }
1170
+ .ui-widget-shadow {
1171
+ margin: -5px 0 0 -5px;
1172
+ padding: 5px;
1173
+ background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x;
1174
+ opacity: .2;
1175
+ filter: Alpha(Opacity=20);
1176
+ border-radius: 5px;
1177
+ }
css/jquery-ui-spinner.css CHANGED
@@ -1,1178 +1,1178 @@
1
- /*! jQuery UI - v1.10.3 - 2013-05-03
2
- * http://jqueryui.com
3
- * Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css
4
- * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
5
- * Copyright 2013 jQuery Foundation and other contributors Licensed MIT */
6
-
7
- /* Layout helpers
8
- ----------------------------------*/
9
- .wdform-field .ui-spinner-input {
10
- background-color: #FFFFFF;
11
- height: 30px !important;
12
- }
13
- .wdform_table1 .ui-helper-hidden {
14
- display: none;
15
- }
16
- .wdform_table1 .ui-helper-hidden-accessible {
17
- border: 0;
18
- clip: rect(0 0 0 0);
19
- height: 1px;
20
- margin: -1px;
21
- overflow: hidden;
22
- padding: 0;
23
- position: absolute;
24
- width: 1px;
25
- }
26
- .wdform_table1 .ui-helper-reset {
27
- margin: 0;
28
- padding: 0;
29
- border: 0;
30
- outline: 0;
31
- line-height: 1.3;
32
- text-decoration: none;
33
- font-size: 100%;
34
- list-style: none;
35
- }
36
- .wdform_table1 .ui-helper-clearfix:before,
37
- .wdform_table1 .ui-helper-clearfix:after {
38
- content: "";
39
- display: table;
40
- border-collapse: collapse;
41
- }
42
- .wdform_table1 .ui-helper-clearfix:after {
43
- clear: both;
44
- }
45
- .wdform_table1 .ui-helper-clearfix {
46
- min-height: 0; /* support: IE7 */
47
- }
48
- .wdform_table1 .ui-helper-zfix {
49
- width: 100%;
50
- height: 100%;
51
- top: 0;
52
- left: 0;
53
- position: absolute;
54
- opacity: 0;
55
- filter:Alpha(Opacity=0);
56
- }
57
- .wdform_table1 .ui-front {
58
- z-index: 100;
59
- }
60
-
61
-
62
- /* Interaction Cues
63
- ----------------------------------*/
64
- .wdform_table1 .ui-state-disabled {
65
- cursor: default !important;
66
- }
67
-
68
-
69
- /* Icons
70
- ----------------------------------*/
71
-
72
- /* states and images */
73
- .wdform_table1 .ui-icon {
74
- display: block;
75
- text-indent: -99999px;
76
- overflow: hidden;
77
- background-repeat: no-repeat;
78
- }
79
-
80
-
81
- /* Misc visuals
82
- ----------------------------------*/
83
-
84
- /* Overlays */
85
- .wdform_table1 .ui-widget-overlay {
86
- position: fixed;
87
- top: 0;
88
- left: 0;
89
- width: 100%;
90
- height: 100%;
91
- }
92
- .wdform_table1 .ui-accordion .ui-accordion-header {
93
- display: block;
94
- cursor: pointer;
95
- position: relative;
96
- margin-top: 2px;
97
- padding: .5em .5em .5em .7em;
98
- min-height: 0; /* support: IE7 */
99
- }
100
- .wdform_table1 .ui-accordion .ui-accordion-icons {
101
- padding-left: 2.2em;
102
- }
103
- .wdform_table1 .ui-accordion .ui-accordion-noicons {
104
- padding-left: .7em;
105
- }
106
- .wdform_table1 .ui-accordion .ui-accordion-icons .ui-accordion-icons {
107
- padding-left: 2.2em;
108
- }
109
- .wdform_table1 .ui-accordion .ui-accordion-header .ui-accordion-header-icon {
110
- position: absolute;
111
- left: .5em;
112
- top: 50%;
113
- margin-top: -8px;
114
- }
115
- .wdform_table1 .ui-accordion .ui-accordion-content {
116
- padding: 1em 2.2em;
117
- border-top: 0;
118
- overflow: auto;
119
- }
120
- .wdform_table1 .ui-autocomplete {
121
- position: absolute;
122
- top: 0;
123
- left: 0;
124
- cursor: default;
125
- }
126
- .wdform_table1 .ui-button {
127
- display: inline-block;
128
- position: relative;
129
- padding: 0;
130
- line-height: normal;
131
- margin-right: .1em;
132
- cursor: pointer;
133
- vertical-align: middle;
134
- text-align: center;
135
- overflow: visible; /* removes extra width in IE */
136
- }
137
- .wdform_table1 .ui-button,
138
- .ui-button:link,
139
- .ui-button:visited,
140
- .ui-button:hover,
141
- .ui-button:active {
142
- text-decoration: none;
143
- }
144
- /* to make room for the icon, a width needs to be set here */
145
- .wdform_table1 .ui-button-icon-only {
146
- width: 2.2em;
147
- }
148
- /* button elements seem to need a little more width */
149
- .wdform_table1 button.ui-button-icon-only {
150
- width: 2.4em;
151
- }
152
- .wdform_table1 .ui-button-icons-only {
153
- width: 3.4em;
154
- }
155
- .wdform_table1 button.ui-button-icons-only {
156
- width: 3.7em;
157
- }
158
-
159
- /* button text element */
160
- .wdform_table1 .ui-button .ui-button-text {
161
- display: block;
162
- line-height: normal;
163
- }
164
- .wdform_table1 .ui-button-text-only .ui-button-text {
165
- padding: .4em 1em;
166
- }
167
- .wdform_table1 .ui-button-icon-only .ui-button-text,
168
- .wdform_table1 .ui-button-icons-only .ui-button-text {
169
- padding: .4em;
170
- text-indent: -9999999px;
171
- }
172
- .wdform_table1 .ui-button-text-icon-primary .ui-button-text,
173
- .wdform_table1 .ui-button-text-icons .ui-button-text {
174
- padding: .4em 1em .4em 2.1em;
175
- }
176
- .wdform_table1 .ui-button-text-icon-secondary .ui-button-text,
177
- .wdform_table1 .ui-button-text-icons .ui-button-text {
178
- padding: .4em 2.1em .4em 1em;
179
- }
180
- .wdform_table1 .ui-button-text-icons .ui-button-text {
181
- padding-left: 2.1em;
182
- padding-right: 2.1em;
183
- }
184
- /* no icon support for input elements, provide padding by default */
185
- .wdform_table1 input.ui-button {
186
- padding: .4em 1em;
187
- }
188
-
189
- /* button icon element(s) */
190
- .wdform_table1 .ui-button-icon-only .ui-icon,
191
- .wdform_table1 .ui-button-text-icon-primary .ui-icon,
192
- .wdform_table1 .ui-button-text-icon-secondary .ui-icon,
193
- .wdform_table1 .ui-button-text-icons .ui-icon,
194
- .wdform_table1 .ui-button-icons-only .ui-icon {
195
- position: absolute;
196
- top: 50%;
197
- margin-top: -8px;
198
- }
199
- .wdform_table1 .ui-button-icon-only .ui-icon {
200
- left: 50%;
201
- margin-left: -8px;
202
- }
203
- .wdform_table1 .ui-button-text-icon-primary .ui-button-icon-primary,
204
- .wdform_table1 .ui-button-text-icons .ui-button-icon-primary,
205
- .wdform_table1 .ui-button-icons-only .ui-button-icon-primary {
206
- left: .5em;
207
- }
208
- .wdform_table1 .ui-button-text-icon-secondary .ui-button-icon-secondary,
209
- .wdform_table1 .ui-button-text-icons .ui-button-icon-secondary,
210
- .wdform_table1 .ui-button-icons-only .ui-button-icon-secondary {
211
- right: .5em;
212
- }
213
-
214
- /* button sets */
215
- .wdform_table1 .ui-buttonset {
216
- margin-right: 7px;
217
- }
218
- .wdform_table1 .ui-buttonset .ui-button {
219
- margin-left: 0;
220
- margin-right: -.3em;
221
- }
222
-
223
- /* workarounds */
224
- /* reset extra padding in Firefox, see h5bp.com/l */
225
- .wdform_table1 input.ui-button::-moz-focus-inner,
226
- .wdform_table1 button.ui-button::-moz-focus-inner {
227
- border: 0;
228
- padding: 0;
229
- }
230
- .wdform_table1 .ui-datepicker {
231
- width: 17em;
232
- padding: .2em .2em 0;
233
- display: none;
234
- }
235
- .wdform_table1 .ui-datepicker .ui-datepicker-header {
236
- position: relative;
237
- padding: .2em 0;
238
- }
239
- .wdform_table1 .ui-datepicker .ui-datepicker-prev,
240
- .wdform_table1 .ui-datepicker .ui-datepicker-next {
241
- position: absolute;
242
- top: 2px;
243
- width: 1.8em;
244
- height: 1.8em;
245
- }
246
- .wdform_table1 .ui-datepicker .ui-datepicker-prev-hover,
247
- .wdform_table1 .ui-datepicker .ui-datepicker-next-hover {
248
- top: 1px;
249
- }
250
- .wdform_table1 .ui-datepicker .ui-datepicker-prev {
251
- left: 2px;
252
- }
253
- .wdform_table1 .ui-datepicker .ui-datepicker-next {
254
- right: 2px;
255
- }
256
- .wdform_table1 .ui-datepicker .ui-datepicker-prev-hover {
257
- left: 1px;
258
- }
259
- .wdform_table1 .ui-datepicker .ui-datepicker-next-hover {
260
- right: 1px;
261
- }
262
- .wdform_table1 .ui-datepicker .ui-datepicker-prev span,
263
- .ui-datepicker .ui-datepicker-next span {
264
- display: block;
265
- position: absolute;
266
- left: 50%;
267
- margin-left: -8px;
268
- top: 50%;
269
- margin-top: -8px;
270
- }
271
- .wdform_table1 .ui-datepicker .ui-datepicker-title {
272
- margin: 0 2.3em;
273
- line-height: 1.8em;
274
- text-align: center;
275
- }
276
- .wdform_table1 .ui-datepicker .ui-datepicker-title select {
277
- font-size: 1em;
278
- margin: 1px 0;
279
- }
280
- .wdform_table1 .ui-datepicker select.ui-datepicker-month-year {
281
- width: 100%;
282
- }
283
- .wdform_table1 .ui-datepicker select.ui-datepicker-month,
284
- .wdform_table1 .ui-datepicker select.ui-datepicker-year {
285
- width: 49%;
286
- }
287
- .wdform_table1 .ui-datepicker table {
288
- width: 100%;
289
- font-size: .9em;
290
- border-collapse: collapse;
291
- margin: 0 0 .4em;
292
- }
293
- .wdform_table1 .ui-datepicker th {
294
- padding: .7em .3em;
295
- text-align: center;
296
- font-weight: bold;
297
- border: 0;
298
- }
299
- .wdform_table1 .ui-datepicker td {
300
- border: 0;
301
- padding: 1px;
302
- }
303
- .wdform_table1 .ui-datepicker td span,
304
- .wdform_table1 .ui-datepicker td a {
305
- display: block;
306
- padding: .2em;
307
- text-align: right;
308
- text-decoration: none;
309
- }
310
- .wdform_table1 .ui-datepicker .ui-datepicker-buttonpane {
311
- background-image: none;
312
- margin: .7em 0 0 0;
313
- padding: 0 .2em;
314
- border-left: 0;
315
- border-right: 0;
316
- border-bottom: 0;
317
- }
318
- .wdform_table1 .ui-datepicker .ui-datepicker-buttonpane button {
319
- float: right;
320
- margin: .5em .2em .4em;
321
- cursor: pointer;
322
- padding: .2em .6em .3em .6em;
323
- width: auto;
324
- overflow: visible;
325
- }
326
- .wdform_table1 .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
327
- float: left;
328
- }
329
-
330
- /* with multiple calendars */
331
- .wdform_table1 .ui-datepicker.ui-datepicker-multi {
332
- width: auto;
333
- }
334
- .wdform_table1 .ui-datepicker-multi .ui-datepicker-group {
335
- float: left;
336
- }
337
- .wdform_table1 .ui-datepicker-multi .ui-datepicker-group table {
338
- width: 95%;
339
- margin: 0 auto .4em;
340
- }
341
- .wdform_table1 .ui-datepicker-multi-2 .ui-datepicker-group {
342
- width: 50%;
343
- }
344
- .wdform_table1 .ui-datepicker-multi-3 .ui-datepicker-group {
345
- width: 33.3%;
346
- }
347
- .wdform_table1 .ui-datepicker-multi-4 .ui-datepicker-group {
348
- width: 25%;
349
- }
350
- .wdform_table1 .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
351
- .wdform_table1 .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
352
- border-left-width: 0;
353
- }
354
- .wdform_table1 .ui-datepicker-multi .ui-datepicker-buttonpane {
355
- clear: left;
356
- }
357
- .wdform_table1 .ui-datepicker-row-break {
358
- clear: both;
359
- width: 100%;
360
- font-size: 0;
361
- }
362
-
363
- /* RTL support */
364
- .wdform_table1 .ui-datepicker-rtl {
365
- direction: rtl;
366
- }
367
- .wdform_table1 .ui-datepicker-rtl .ui-datepicker-prev {
368
- right: 2px;
369
- left: auto;
370
- }
371
- .wdform_table1 .ui-datepicker-rtl .ui-datepicker-next {
372
- left: 2px;
373
- right: auto;
374
- }
375
- .wdform_table1 .ui-datepicker-rtl .ui-datepicker-prev:hover {
376
- right: 1px;
377
- left: auto;
378
- }
379
- .wdform_table1 .ui-datepicker-rtl .ui-datepicker-next:hover {
380
- left: 1px;
381
- right: auto;
382
- }
383
- .wdform_table1 .ui-datepicker-rtl .ui-datepicker-buttonpane {
384
- clear: right;
385
- }
386
- .wdform_table1 .ui-datepicker-rtl .ui-datepicker-buttonpane button {
387
- float: left;
388
- }
389
- .wdform_table1 .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
390
- .wdform_table1 .ui-datepicker-rtl .ui-datepicker-group {
391
- float: right;
392
- }
393
- .wdform_table1 .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
394
- .wdform_table1 .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
395
- border-right-width: 0;
396
- border-left-width: 1px;
397
- }
398
- .wdform_table1 .ui-dialog {
399
- position: absolute;
400
- top: 0;
401
- left: 0;
402
- padding: .2em;
403
- outline: 0;
404
- }
405
- .wdform_table1 .ui-dialog .ui-dialog-titlebar {
406
- padding: .4em 1em;
407
- position: relative;
408
- }
409
- .wdform_table1 .ui-dialog .ui-dialog-title {
410
- float: left;
411
- margin: .1em 0;
412
- white-space: nowrap;
413
- width: 90%;
414
- overflow: hidden;
415
- text-overflow: ellipsis;
416
- }
417
- .wdform_table1 .ui-dialog .ui-dialog-titlebar-close {
418
- position: absolute;
419
- right: .3em;
420
- top: 50%;
421
- width: 21px;
422
- margin: -10px 0 0 0;
423
- padding: 1px;
424
- height: 20px;
425
- }
426
- .wdform_table1 .ui-dialog .ui-dialog-content {
427
- position: relative;
428
- border: 0;
429
- padding: .5em 1em;
430
- background: none;
431
- overflow: auto;
432
- }
433
- .wdform_table1 .ui-dialog .ui-dialog-buttonpane {
434
- text-align: left;
435
- border-width: 1px 0 0 0;
436
- background-image: none;
437
- margin-top: .5em;
438
- padding: .3em 1em .5em .4em;
439
- }
440
- .wdform_table1 .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
441
- float: right;
442
- }
443
- .wdform_table1 .ui-dialog .ui-dialog-buttonpane button {
444
- margin: .5em .4em .5em 0;
445
- cursor: pointer;
446
- }
447
- .wdform_table1 .ui-dialog .ui-resizable-se {
448
- width: 12px;
449
- height: 12px;
450
- right: -5px;
451
- bottom: -5px;
452
- background-position: 16px 16px;
453
- }
454
- .wdform_table1 .ui-draggable .ui-dialog-titlebar {
455
- cursor: move;
456
- }
457
- .wdform_table1 .ui-menu {
458
- list-style: none;
459
- padding: 2px;
460
- margin: 0;
461
- display: block;
462
- outline: none;
463
- }
464
- .wdform_table1 .ui-menu .ui-menu {
465
- margin-top: -3px;
466
- position: absolute;
467
- }
468
- .wdform_table1 .ui-menu .ui-menu-item {
469
- margin: 0;
470
- padding: 0;
471
- width: 100%;
472
- /* support: IE10, see #8844 */
473
- list-style-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);
474
- }
475
- .wdform_table1 .ui-menu .ui-menu-divider {
476
- margin: 5px -2px 5px -2px;
477
- height: 0;
478
- font-size: 0;
479
- line-height: 0;
480
- border-width: 1px 0 0 0;
481
- }
482
- .wdform_table1 .ui-menu .ui-menu-item a {
483
- text-decoration: none;
484
- display: block;
485
- padding: 2px .4em;
486
- line-height: 1.5;
487
- min-height: 0; /* support: IE7 */
488
- font-weight: normal;
489
- }
490
- .wdform_table1 .ui-menu .ui-menu-item a.ui-state-focus,
491
- .wdform_table1 .ui-menu .ui-menu-item a.ui-state-active {
492
- font-weight: normal;
493
- margin: -1px;
494
- }
495
-
496
- .wdform_table1 .ui-menu .ui-state-disabled {
497
- font-weight: normal;
498
- margin: .4em 0 .2em;
499
- line-height: 1.5;
500
- }
501
- .wdform_table1 .ui-menu .ui-state-disabled a {
502
- cursor: default;
503
- }
504
-
505
- /* icon support */
506
- .wdform_table1 .ui-menu-icons {
507
- position: relative;
508
- }
509
- .wdform_table1 .ui-menu-icons .ui-menu-item a {
510
- position: relative;
511
- padding-left: 2em;
512
- }
513
-
514
- /* left-aligned */
515
- .wdform_table1 .ui-menu .ui-icon {
516
- position: absolute;
517
- top: .2em;
518
- left: .2em;
519
- }
520
-
521
- /* right-aligned */
522
- .wdform_table1 .ui-menu .ui-menu-icon {
523
- position: static;
524
- float: right;
525
- }
526
- .wdform_table1 .ui-progressbar {
527
- height: 2em;
528
- text-align: left;
529
- overflow: hidden;
530
- }
531
- .wdform_table1 .ui-progressbar .ui-progressbar-value {
532
- margin: -1px;
533
- height: 100%;
534
- }
535
- .wdform_table1 .ui-progressbar .ui-progressbar-overlay {
536
- background: url("images/animated-overlay.gif");
537
- height: 100%;
538
- filter: alpha(opacity=25);
539
- opacity: 0.25;
540
- }
541
- .wdform_table1 .ui-progressbar-indeterminate .ui-progressbar-value {
542
- background-image: none;
543
- }
544
- .wdform_table1 .ui-resizable {
545
- position: relative;
546
- }
547
- .wdform_table1 .ui-resizable-handle {
548
- position: absolute;
549
- font-size: 0.1px;
550
- display: block;
551
- }
552
- .wdform_table1 .ui-resizable-disabled .ui-resizable-handle,
553
- .wdform_table1 .ui-resizable-autohide .ui-resizable-handle {
554
- display: none;
555
- }
556
- .wdform_table1 .ui-resizable-n {
557
- cursor: n-resize;
558
- height: 7px;
559
- width: 100%;
560
- top: -5px;
561
- left: 0;
562
- }
563
- .wdform_table1 .ui-resizable-s {
564
- cursor: s-resize;
565
- height: 7px;
566
- width: 100%;
567
- bottom: -5px;
568
- left: 0;
569
- }
570
- .wdform_table1 .ui-resizable-e {
571
- cursor: e-resize;
572
- width: 7px;
573
- right: -5px;
574
- top: 0;
575
- height: 100%;
576
- }
577
- .wdform_table1 .ui-resizable-w {
578
- cursor: w-resize;
579
- width: 7px;
580
- left: -5px;
581
- top: 0;
582
- height: 100%;
583
- }
584
- .wdform_table1 .ui-resizable-se {
585
- cursor: se-resize;
586
- width: 12px;
587
- height: 12px;
588
- right: 1px;
589
- bottom: 1px;
590
- }
591
- .wdform_table1 .ui-resizable-sw {
592
- cursor: sw-resize;
593
- width: 9px;
594
- height: 9px;
595
- left: -5px;
596
- bottom: -5px;
597
- }
598
- .wdform_table1 .ui-resizable-nw {
599
- cursor: nw-resize;
600
- width: 9px;
601
- height: 9px;
602
- left: -5px;
603
- top: -5px;
604
- }
605
- .wdform_table1 .ui-resizable-ne {
606
- cursor: ne-resize;
607
- width: 9px;
608
- height: 9px;
609
- right: -5px;
610
- top: -5px;
611
- }
612
- .wdform_table1 .ui-selectable-helper {
613
- position: absolute;
614
- z-index: 100;
615
- border: 1px dotted black;
616
- }
617
- .wdform_table1 .ui-slider {
618
- position: relative;
619
- text-align: left;
620
- }
621
- .wdform_table1 .ui-slider .ui-slider-handle {
622
- position: absolute;
623
- z-index: 2;
624
- width: 1.2em;
625
- height: 1.2em;
626
- cursor: default;
627
- }
628
- .wdform_table1 .ui-slider .ui-slider-range {
629
- position: absolute;
630
- z-index: 1;
631
- font-size: .7em;
632
- display: block;
633
- border: 0;
634
- background-position: 0 0;
635
- }
636
-
637
- /* For IE8 - See #6727 */
638
- .wdform_table1 .ui-slider.ui-state-disabled .ui-slider-handle,
639
- .wdform_table1 .ui-slider.ui-state-disabled .ui-slider-range {
640
- filter: inherit;
641
- }
642
- .wdform_table1 .ui-slider-horizontal {
643
- height: .8em;
644
- }
645
- .wdform_table1 .ui-slider-horizontal .ui-slider-handle {
646
- top: -.3em;
647
- margin-left: -.6em;
648
- }
649
- .wdform_table1 .ui-slider-horizontal .ui-slider-range {
650
- top: 0;
651
- height: 100%;
652
- }
653
- .wdform_table1 .ui-slider-horizontal .ui-slider-range-min {
654
- left: 0;
655
- }
656
- .wdform_table1 .ui-slider-horizontal .ui-slider-range-max {
657
- right: 0;
658
- }
659
-
660
- .wdform_table1 .ui-slider-vertical {
661
- width: .8em;
662
- height: 100px;
663
- }
664
- .wdform_table1 .ui-slider-vertical .ui-slider-handle {
665
- left: -.3em;
666
- margin-left: 0;
667
- margin-bottom: -.6em;
668
- }
669
- .wdform_table1 .ui-slider-vertical .ui-slider-range {
670
- left: 0;
671
- width: 100%;
672
- }
673
- .wdform_table1 .ui-slider-vertical .ui-slider-range-min {
674
- bottom: 0;
675
- }
676
- .wdform_table1 .ui-slider-vertical .ui-slider-range-max {
677
- top: 0;
678
- }
679
- .wdform_table1 .ui-spinner {
680
- position: relative;
681
- display: inline-block;
682
- overflow: hidden;
683
- padding: 0;
684
- vertical-align: middle;
685
- }
686
- .wdform_table1 .ui-spinner-input {
687
- border: none;
688
- background: none;
689
- color: inherit;
690
- padding: .2em 0 !important;
691
- vertical-align: middle;
692
- padding-left: .4em !important;
693
- padding-right: 22px !important;
694
- }
695
- .wdform_table1 .ui-spinner-button {
696
- width: 16px;
697
- height: 50%;
698
- font-size: .5em;
699
- padding: 0;
700
- margin: 0;
701
- text-align: center;
702
- position: absolute;
703
- cursor: default;
704
- display: block;
705
- overflow: hidden;
706
- right: 0;
707
- }
708
- /* more specificity required here to overide default borders */
709
- .wdform_table1 .ui-spinner a.ui-spinner-button {
710
- border-top: none;
711
- border-bottom: none;
712
- border-right: none;
713
- }
714
- /* vertical centre icon */
715
- .wdform_table1 .ui-spinner .ui-icon {
716
- position: absolute;
717
- margin-top: -8px;
718
- top: 50%;
719
- left: 0;
720
- }
721
- .wdform_table1 .ui-spinner-up {
722
- top: 0;
723
- }
724
- .wdform_table1 .ui-spinner-down {
725
- bottom: 0;
726
- }
727
-
728
- /* TR overrides */
729
- .wdform_table1 .ui-spinner .ui-icon-triangle-1-s {
730
- /* need to fix icons sprite */
731
- background-position: -65px -16px;
732
- }
733
- .wdform_table1 .ui-tabs {
734
- position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
735
- padding: .2em;
736
- }
737
- .wdform_table1 .ui-tabs .ui-tabs-nav {
738
- margin: 0;
739
- padding: .2em .2em 0;
740
- }
741
- .wdform_table1 .ui-tabs .ui-tabs-nav li {
742
- list-style: none;
743
- float: left;
744
- position: relative;
745
- top: 0;
746
- margin: 1px .2em 0 0;
747
- border-bottom-width: 0;
748
- padding: 0;
749
- white-space: nowrap;
750
- }
751
- .wdform_table1 .ui-tabs .ui-tabs-nav li a {
752
- float: left;
753
- padding: .5em 1em;
754
- text-decoration: none;
755
- }
756
- .wdform_table1 .ui-tabs .ui-tabs-nav li.ui-tabs-active {
757
- margin-bottom: -1px;
758
- padding-bottom: 1px;
759
- }
760
- .wdform_table1 .ui-tabs .ui-tabs-nav li.ui-tabs-active a,
761
- .wdform_table1 .ui-tabs .ui-tabs-nav li.ui-state-disabled a,
762
- .wdform_table1 .ui-tabs .ui-tabs-nav li.ui-tabs-loading a {
763
- cursor: text;
764
- }
765
- .wdform_table1 .ui-tabs .ui-tabs-nav li a, /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
766
- .wdform_table1 .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a {
767
- cursor: pointer;
768
- }
769
- .wdform_table1 .ui-tabs .ui-tabs-panel {
770
- display: block;
771
- border-width: 0;
772
- padding: 1em 1.4em;
773
- background: none;
774
- }
775
- .wdform_table1 .ui-tooltip {
776
- padding: 8px;
777
- position: absolute;
778
- z-index: 9999;
779
- max-width: 300px;
780
- -webkit-box-shadow: 0 0 5px #aaa;
781
- box-shadow: 0 0 5px #aaa;
782
- }
783
- .wdform_table1 body .ui-tooltip {
784
- border-width: 2px;
785
- }
786
-
787
- /* Component containers
788
- ----------------------------------*/
789
- .wdform_table1 .ui-widget {
790
- font-family: Verdana,Arial,sans-serif;
791
- font-size: 1.1em;
792
- }
793
- .wdform_table1 .ui-widget .ui-widget {
794
- font-size: 1em;
795
- }
796
- .wdform_table1 .ui-widget input,
797
- .wdform_table1 .ui-widget select,
798
- .wdform_table1 .ui-widget textarea,
799
- .wdform_table1 .ui-widget button {
800
- font-family: Verdana,Arial,sans-serif;
801
- font-size: 1em;
802
- }
803
- .wdform_table1 .ui-widget-content {
804
- border: 1px solid #aaaaaa;
805
- background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;
806
- color: #222222;
807
- }
808
- .wdform_table1 .ui-widget-content a {
809
- color: #222222;
810
- }
811
- .wdform_table1 .ui-widget-header {
812
- border: 1px solid #aaaaaa;
813
- background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;
814
- color: #222222;
815
- font-weight: bold;
816
- }
817
- .wdform_table1 .ui-widget-header a {
818
- color: #222222;
819
- }
820
-
821
- /* Interaction states
822
- ----------------------------------*/
823
- .wdform_table1 .ui-state-default,
824
- .wdform_table1 .ui-widget-content .ui-state-default,
825
- .wdform_table1 .ui-widget-header .ui-state-default {
826
- border: 1px solid #d3d3d3;
827
- background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;
828
- font-weight: normal;
829
- color: #555555;
830
- }
831
- .wdform_table1 .ui-state-default a,
832
- .wdform_table1 .ui-state-default a:link,
833
- .wdform_table1 .ui-state-default a:visited {
834
- color: #555555;
835
- text-decoration: none;
836
- }
837
- .wdform_table1 .ui-state-hover,
838
- .wdform_table1 .ui-widget-content .ui-state-hover,
839
- .wdform_table1 .ui-widget-header .ui-state-hover,
840
- .wdform_table1 .ui-state-focus,
841
- .wdform_table1 .ui-widget-content .ui-state-focus,
842
- .wdform_table1 .ui-widget-header .ui-state-focus {
843
- border: 1px solid #999999;
844
- background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;
845
- font-weight: normal;
846
- color: #212121;
847
- }
848
- .wdform_table1 .ui-state-hover a,
849
- .wdform_table1 .ui-state-hover a:hover,
850
- .wdform_table1 .ui-state-hover a:link,
851
- .wdform_table1 .ui-state-hover a:visited {
852
- color: #212121;
853
- text-decoration: none;
854
- }
855
- .wdform_table1 .ui-state-active,
856
- .wdform_table1 .ui-widget-content .ui-state-active,
857
- .wdform_table1 .ui-widget-header .ui-state-active {
858
- border: 1px solid #aaaaaa;
859
- background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;
860
- font-weight: normal;
861
- color: #212121;
862
- }
863
- .wdform_table1 .ui-state-active a,
864
- .wdform_table1 .ui-state-active a:link,
865
- .wdform_table1 .ui-state-active a:visited {
866
- color: #212121;
867
- text-decoration: none;
868
- }
869
-
870
- /* Interaction Cues
871
- ----------------------------------*/
872
- .wdform_table1 .ui-state-highlight,
873
- .wdform_table1 .ui-widget-content .ui-state-highlight,
874
- .wdform_table1 .ui-widget-header .ui-state-highlight {
875
- border: 1px solid #fcefa1;
876
- background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;
877
- color: #363636;
878
- }
879
- .wdform_table1 .ui-state-highlight a,
880
- .wdform_table1 .ui-widget-content .ui-state-highlight a,
881
- .wdform_table1 .ui-widget-header .ui-state-highlight a {
882
- color: #363636;
883
- }
884
- .wdform_table1 .ui-state-error,
885
- .wdform_table1 .ui-widget-content .ui-state-error,
886
- .wdform_table1 .ui-widget-header .ui-state-error {
887
- border: 1px solid #cd0a0a;
888
- background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;
889
- color: #cd0a0a;
890
- }
891
- .wdform_table1 .ui-state-error a,
892
- .wdform_table1 .ui-widget-content .ui-state-error a,
893
- .wdform_table1 .ui-widget-header .ui-state-error a {
894
- color: #cd0a0a;
895
- }
896
- .wdform_table1 .ui-state-error-text,
897
- .wdform_table1 .ui-widget-content .ui-state-error-text,
898
- .wdform_table1 .ui-widget-header .ui-state-error-text {
899
- color: #cd0a0a;
900
- }
901
- .wdform_table1 .ui-priority-primary,
902
- .wdform_table1 .ui-widget-content .ui-priority-primary,
903
- .wdform_table1 .ui-widget-header .ui-priority-primary {
904
- font-weight: bold;
905
- }
906
- .wdform_table1 .ui-priority-secondary,
907
- .wdform_table1 .ui-widget-content .ui-priority-secondary,
908
- .wdform_table1 .ui-widget-header .ui-priority-secondary {
909
- opacity: .7;
910
- filter:Alpha(Opacity=70);
911
- font-weight: normal;
912
- }
913
- .wdform_table1 .ui-state-disabled,
914
- .wdform_table1 .ui-widget-content .ui-state-disabled,
915
- .wdform_table1 .ui-widget-header .ui-state-disabled {
916
- opacity: .35;
917
- filter:Alpha(Opacity=35);
918
- background-image: none;
919
- }
920
- .wdform_table1 .ui-state-disabled .ui-icon {
921
- filter:Alpha(Opacity=35); /* For IE8 - See #6059 */
922
- }
923
-
924
- /* Icons
925
- ----------------------------------*/
926
-
927
- /* states and images */
928
- .wdform_table1 .ui-icon {
929
- width: 16px;
930
- height: 16px;
931
- }
932
- .wdform_table1 .ui-icon,
933
- .wdform_table1 .ui-widget-content .ui-icon {
934
- background-image: url(images/ui-icons_222222_256x240.png);
935
- }
936
- .wdform_table1 .ui-widget-header .ui-icon {
937
- background-image: url(images/ui-icons_222222_256x240.png);
938
- }
939
- .wdform_table1 .ui-state-default .ui-icon {
940
- background-image: url(images/ui-icons_888888_256x240.png) !important;
941
- }
942
- .wdform_table1 .ui-state-hover .ui-icon,
943
- .wdform_table1 .ui-state-focus .ui-icon {
944
- background-image: url(images/ui-icons_454545_256x240.png);
945
- }
946
- .wdform_table1 .ui-state-active .ui-icon {
947
- background-image: url(images/ui-icons_454545_256x240.png);
948
- }
949
- .wdform_table1 .ui-state-highlight .ui-icon {
950
- background-image: url(images/ui-icons_2e83ff_256x240.png);
951
- }
952
- .wdform_table1 .ui-state-error .ui-icon,
953
- .wdform_table1 .ui-state-error-text .ui-icon {
954
- background-image: url(images/ui-icons_cd0a0a_256x240.png);
955
- }
956
-
957
- /* positioning */
958
- .wdform_table1 .ui-icon-blank { background-position: 16px 16px; }
959
- .wdform_table1 .ui-icon-carat-1-n { background-position: 0 0; }
960
- .wdform_table1 .ui-icon-carat-1-ne { background-position: -16px 0; }
961
- .wdform_table1 .ui-icon-carat-1-e { background-position: -32px 0; }
962
- .wdform_table1 .ui-icon-carat-1-se { background-position: -48px 0; }
963
- .wdform_table1 .ui-icon-carat-1-s { background-position: -64px 0; }
964
- .wdform_table1 .ui-icon-carat-1-sw { background-position: -80px 0; }
965
- .wdform_table1 .ui-icon-carat-1-w { background-position: -96px 0; }
966
- .wdform_table1 .ui-icon-carat-1-nw { background-position: -112px 0; }
967
- .wdform_table1 .ui-icon-carat-2-n-s { background-position: -128px 0; }
968
- .wdform_table1 .ui-icon-carat-2-e-w { background-position: -144px 0; }
969
- .wdform_table1 .ui-icon-triangle-1-n { background-position: 0 -16px; }
970
- .wdform_table1 .ui-icon-triangle-1-ne { background-position: -16px -16px; }
971
- .wdform_table1 .ui-icon-triangle-1-e { background-position: -32px -16px; }
972
- .wdform_table1 .ui-icon-triangle-1-se { background-position: -48px -16px; }
973
- .wdform_table1 .ui-icon-triangle-1-s { background-position: -64px -16px; }
974
- .wdform_table1 .ui-icon-triangle-1-sw { background-position: -80px -16px; }
975
- .wdform_table1 .ui-icon-triangle-1-w { background-position: -96px -16px; }
976
- .wdform_table1 .ui-icon-triangle-1-nw { background-position: -112px -16px; }
977
- .wdform_table1 .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
978
- .wdform_table1 .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
979
- .wdform_table1 .ui-icon-arrow-1-n { background-position: 0 -32px; }
980
- .wdform_table1 .ui-icon-arrow-1-ne { background-position: -16px -32px; }
981
- .wdform_table1 .ui-icon-arrow-1-e { background-position: -32px -32px; }
982
- .wdform_table1 .ui-icon-arrow-1-se { background-position: -48px -32px; }
983
- .wdform_table1 .ui-icon-arrow-1-s { background-position: -64px -32px; }
984
- .wdform_table1 .ui-icon-arrow-1-sw { background-position: -80px -32px; }
985
- .wdform_table1 .ui-icon-arrow-1-w { background-position: -96px -32px; }
986
- .wdform_table1 .ui-icon-arrow-1-nw { background-position: -112px -32px; }
987
- .wdform_table1 .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
988
- .wdform_table1 .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
989
- .wdform_table1 .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
990
- .wdform_table1 .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
991
- .wdform_table1 .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
992
- .wdform_table1 .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
993
- .wdform_table1 .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
994
- .wdform_table1 .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
995
- .wdform_table1 .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
996
- .wdform_table1 .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
997
- .wdform_table1 .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
998
- .wdform_table1 .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
999
- .wdform_table1 .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
1000
- .wdform_table1 .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
1001
- .wdform_table1 .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
1002
- .wdform_table1 .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
1003
- .wdform_table1 .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
1004
- .wdform_table1 .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
1005
- .wdform_table1 .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
1006
- .wdform_table1 .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
1007
- .wdform_table1 .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
1008
- .wdform_table1 .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
1009
- .wdform_table1 .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
1010
- .wdform_table1 .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
1011
- .wdform_table1 .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
1012
- .wdform_table1 .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
1013
- .wdform_table1 .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
1014
- .wdform_table1 .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
1015
- .wdform_table1 .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
1016
- .wdform_table1 .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
1017
- .wdform_table1 .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
1018
- .wdform_table1 .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
1019
- .wdform_table1 .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
1020
- .wdform_table1 .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
1021
- .wdform_table1 .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
1022
- .wdform_table1 .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
1023
- .wdform_table1 .ui-icon-arrow-4 { background-position: 0 -80px; }
1024
- .wdform_table1 .ui-icon-arrow-4-diag { background-position: -16px -80px; }
1025
- .wdform_table1 .ui-icon-extlink { background-position: -32px -80px; }
1026
- .wdform_table1 .ui-icon-newwin { background-position: -48px -80px; }
1027
- .wdform_table1 .ui-icon-refresh { background-position: -64px -80px; }
1028
- .wdform_table1 .ui-icon-shuffle { background-position: -80px -80px; }
1029
- .wdform_table1 .ui-icon-transfer-e-w { background-position: -96px -80px; }
1030
- .wdform_table1 .ui-icon-transferthick-e-w { background-position: -112px -80px; }
1031
- .wdform_table1 .ui-icon-folder-collapsed { background-position: 0 -96px; }
1032
- .wdform_table1 .ui-icon-folder-open { background-position: -16px -96px; }
1033
- .wdform_table1 .ui-icon-document { background-position: -32px -96px; }
1034
- .wdform_table1 .ui-icon-document-b { background-position: -48px -96px; }
1035
- .wdform_table1 .ui-icon-note { background-position: -64px -96px; }
1036
- .wdform_table1 .ui-icon-mail-closed { background-position: -80px -96px; }
1037
- .wdform_table1 .ui-icon-mail-open { background-position: -96px -96px; }
1038
- .wdform_table1 .ui-icon-suitcase { background-position: -112px -96px; }
1039
- .wdform_table1 .ui-icon-comment { background-position: -128px -96px; }
1040
- .wdform_table1 .ui-icon-person { background-position: -144px -96px; }
1041
- .wdform_table1 .ui-icon-print { background-position: -160px -96px; }
1042
- .wdform_table1 .ui-icon-trash { background-position: -176px -96px; }
1043
- .wdform_table1 .ui-icon-locked { background-position: -192px -96px; }
1044
- .wdform_table1 .ui-icon-unlocked { background-position: -208px -96px; }
1045
- .wdform_table1 .ui-icon-bookmark { background-position: -224px -96px; }
1046
- .wdform_table1 .ui-icon-tag { background-position: -240px -96px; }
1047
- .wdform_table1 .ui-icon-home { background-position: 0 -112px; }
1048
- .wdform_table1 .ui-icon-flag { background-position: -16px -112px; }
1049
- .wdform_table1 .ui-icon-calendar { background-position: -32px -112px; }
1050
- .wdform_table1 .ui-icon-cart { background-position: -48px -112px; }
1051
- .wdform_table1 .ui-icon-pencil { background-position: -64px -112px; }
1052
- .wdform_table1 .ui-icon-clock { background-position: -80px -112px; }
1053
- .wdform_table1 .ui-icon-disk { background-position: -96px -112px; }
1054
- .wdform_table1 .ui-icon-calculator { background-position: -112px -112px; }
1055
- .wdform_table1 .ui-icon-zoomin { background-position: -128px -112px; }
1056
- .wdform_table1 .ui-icon-zoomout { background-position: -144px -112px; }
1057
- .wdform_table1 .ui-icon-search { background-position: -160px -112px; }
1058
- .wdform_table1 .ui-icon-wrench { background-position: -176px -112px; }
1059
- .wdform_table1 .ui-icon-gear { background-position: -192px -112px; }
1060
- .wdform_table1 .ui-icon-heart { background-position: -208px -112px; }
1061
- .wdform_table1 .ui-icon-star { background-position: -224px -112px; }
1062
- .wdform_table1 .ui-icon-link { background-position: -240px -112px; }
1063
- .wdform_table1 .ui-icon-cancel { background-position: 0 -128px; }
1064
- .wdform_table1 .ui-icon-plus { background-position: -16px -128px; }
1065
- .wdform_table1 .ui-icon-plusthick { background-position: -32px -128px; }
1066
- .wdform_table1 .ui-icon-minus { background-position: -48px -128px; }
1067
- .wdform_table1 .ui-icon-minusthick { background-position: -64px -128px; }
1068
- .wdform_table1 .ui-icon-close { background-position: -80px -128px; }
1069
- .wdform_table1 .ui-icon-closethick { background-position: -96px -128px; }
1070
- .wdform_table1 .ui-icon-key { background-position: -112px -128px; }
1071
- .wdform_table1 .ui-icon-lightbulb { background-position: -128px -128px; }
1072
- .wdform_table1 .ui-icon-scissors { background-position: -144px -128px; }
1073
- .wdform_table1 .ui-icon-clipboard { background-position: -160px -128px; }
1074
- .wdform_table1 .ui-icon-copy { background-position: -176px -128px; }
1075
- .wdform_table1 .ui-icon-contact { background-position: -192px -128px; }
1076
- .wdform_table1 .ui-icon-image { background-position: -208px -128px; }
1077
- .wdform_table1 .ui-icon-video { background-position: -224px -128px; }
1078
- .wdform_table1 .ui-icon-script { background-position: -240px -128px; }
1079
- .wdform_table1 .ui-icon-alert { background-position: 0 -144px; }
1080
- .wdform_table1 .ui-icon-info { background-position: -16px -144px; }
1081
- .wdform_table1 .ui-icon-notice { background-position: -32px -144px; }
1082
- .wdform_table1 .ui-icon-help { background-position: -48px -144px; }
1083
- .wdform_table1 .ui-icon-check { background-position: -64px -144px; }
1084
- .wdform_table1 .ui-icon-bullet { background-position: -80px -144px; }
1085
- .wdform_table1 .ui-icon-radio-on { background-position: -96px -144px; }
1086
- .wdform_table1 .ui-icon-radio-off { background-position: -112px -144px; }
1087
- .wdform_table1 .ui-icon-pin-w { background-position: -128px -144px; }
1088
- .wdform_table1 .ui-icon-pin-s { background-position: -144px -144px; }
1089
- .wdform_table1 .ui-icon-play { background-position: 0 -160px; }
1090
- .wdform_table1 .ui-icon-pause { background-position: -16px -160px; }
1091
- .wdform_table1 .ui-icon-seek-next { background-position: -32px -160px; }
1092
- .wdform_table1 .ui-icon-seek-prev { background-position: -48px -160px; }
1093
- .wdform_table1 .ui-icon-seek-end { background-position: -64px -160px; }
1094
- .wdform_table1 .ui-icon-seek-start { background-position: -80px -160px; }
1095
- /* .wdform_table1 ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
1096
- .wdform_table1 .ui-icon-seek-first { background-position: -80px -160px; }
1097
- .wdform_table1 .ui-icon-stop { background-position: -96px -160px; }
1098
- .wdform_table1 .ui-icon-eject { background-position: -112px -160px; }
1099
- .wdform_table1 .ui-icon-volume-off { background-position: -128px -160px; }
1100
- .wdform_table1 .ui-icon-volume-on { background-position: -144px -160px; }
1101
- .wdform_table1 .ui-icon-power { background-position: 0 -176px; }
1102
- .wdform_table1 .ui-icon-signal-diag { background-position: -16px -176px; }
1103
- .wdform_table1 .ui-icon-signal { background-position: -32px -176px; }
1104
- .wdform_table1 .ui-icon-battery-0 { background-position: -48px -176px; }
1105
- .wdform_table1 .ui-icon-battery-1 { background-position: -64px -176px; }
1106
- .wdform_table1 .ui-icon-battery-2 { background-position: -80px -176px; }
1107
- .wdform_table1 .ui-icon-battery-3 { background-position: -96px -176px; }
1108
- .wdform_table1 .ui-icon-circle-plus { background-position: 0 -192px; }
1109
- .wdform_table1 .ui-icon-circle-minus { background-position: -16px -192px; }
1110
- .wdform_table1 .ui-icon-circle-close { background-position: -32px -192px; }
1111
- .wdform_table1 .ui-icon-circle-triangle-e { background-position: -48px -192px; }
1112
- .wdform_table1 .ui-icon-circle-triangle-s { background-position: -64px -192px; }
1113
- .wdform_table1 .ui-icon-circle-triangle-w { background-position: -80px -192px; }
1114
- .wdform_table1 .ui-icon-circle-triangle-n { background-position: -96px -192px; }
1115
- .wdform_table1 .ui-icon-circle-arrow-e { background-position: -112px -192px; }
1116
- .wdform_table1 .ui-icon-circle-arrow-s { background-position: -128px -192px; }
1117
- .wdform_table1 .ui-icon-circle-arrow-w { background-position: -144px -192px; }
1118
- .wdform_table1 .ui-icon-circle-arrow-n { background-position: -160px -192px; }
1119
- .wdform_table1 .ui-icon-circle-zoomin { background-position: -176px -192px; }
1120
- .wdform_table1 .ui-icon-circle-zoomout { background-position: -192px -192px; }
1121
- .wdform_table1 .ui-icon-circle-check { background-position: -208px -192px; }
1122
- .wdform_table1 .ui-icon-circlesmall-plus { background-position: 0 -208px; }
1123
- .wdform_table1 .ui-icon-circlesmall-minus { background-position: -16px -208px; }
1124
- .wdform_table1 .ui-icon-circlesmall-close { background-position: -32px -208px; }
1125
- .wdform_table1 .ui-icon-squaresmall-plus { background-position: -48px -208px; }
1126
- .wdform_table1 .ui-icon-squaresmall-minus { background-position: -64px -208px; }
1127
- .wdform_table1 .ui-icon-squaresmall-close { background-position: -80px -208px; }
1128
- .wdform_table1 .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
1129
- .wdform_table1 .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
1130
- .wdform_table1 .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
1131
- .wdform_table1 .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
1132
- .wdform_table1 .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
1133
- .wdform_table1 .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
1134
-
1135
-
1136
- /* Misc visuals
1137
- ----------------------------------*/
1138
-
1139
- /* Corner radius */
1140
- .wdform_table1 .ui-corner-all,
1141
- .wdform_table1 .ui-corner-top,
1142
- .wdform_table1 .ui-corner-left,
1143
- .wdform_table1 .ui-corner-tl {
1144
- border-top-left-radius: 4px;
1145
- }
1146
- .wdform_table1 .ui-corner-all,
1147
- .wdform_table1 .ui-corner-top,
1148
- .wdform_table1 .ui-corner-right,
1149
- .wdform_table1 .ui-corner-tr {
1150
- border-top-right-radius: 4px;
1151
- }
1152
- .wdform_table1 .ui-corner-all,
1153
- .wdform_table1 .ui-corner-bottom,
1154
- .wdform_table1 .ui-corner-left,
1155
- .wdform_table1 .ui-corner-bl {
1156
- border-bottom-left-radius: 4px;
1157
- }
1158
- .wdform_table1 .ui-corner-all,
1159
- .wdform_table1 .ui-corner-bottom,
1160
- .wdform_table1 .ui-corner-right,
1161
- .wdform_table1 .ui-corner-br {
1162
- border-bottom-right-radius: 4px;
1163
- }
1164
-
1165
- /* Overlays */
1166
- .wdform_table1 .ui-widget-overlay {
1167
- background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
1168
- opacity: .3;
1169
- filter: Alpha(Opacity=30);
1170
- }
1171
- .wdform_table1 .ui-widget-shadow {
1172
- margin: -8px 0 0 -8px;
1173
- padding: 8px;
1174
- background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
1175
- opacity: .3;
1176
- filter: Alpha(Opacity=30);
1177
- border-radius: 8px;
1178
- }
1
+ /*! jQuery UI - v1.10.3 - 2013-05-03
2
+ * http://jqueryui.com
3
+ * Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css
4
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
5
+ * Copyright 2013 jQuery Foundation and other contributors Licensed MIT */
6
+
7
+ /* Layout helpers
8
+ ----------------------------------*/
9
+ .wdform-field .ui-spinner-input {
10
+ background-color: #FFFFFF;
11
+ height: 30px !important;
12
+ }
13
+ .wdform_table1 .ui-helper-hidden {
14
+ display: none;
15
+ }
16
+ .wdform_table1 .ui-helper-hidden-accessible {
17
+ border: 0;
18
+ clip: rect(0 0 0 0);
19
+ height: 1px;
20
+ margin: -1px;
21
+ overflow: hidden;
22
+ padding: 0;
23
+ position: absolute;
24
+ width: 1px;
25
+ }
26
+ .wdform_table1 .ui-helper-reset {
27
+ margin: 0;
28
+ padding: 0;
29
+ border: 0;
30
+ outline: 0;
31
+ line-height: 1.3;
32
+ text-decoration: none;
33
+ font-size: 100%;
34
+ list-style: none;
35
+ }
36
+ .wdform_table1 .ui-helper-clearfix:before,
37
+ .wdform_table1 .ui-helper-clearfix:after {
38
+ content: "";
39
+ display: table;
40
+ border-collapse: collapse;
41
+ }
42
+ .wdform_table1 .ui-helper-clearfix:after {
43
+ clear: both;
44
+ }
45
+ .wdform_table1 .ui-helper-clearfix {
46
+ min-height: 0; /* support: IE7 */
47
+ }
48
+ .wdform_table1 .ui-helper-zfix {
49
+ width: 100%;
50
+ height: 100%;
51
+ top: 0;
52
+ left: 0;
53
+ position: absolute;
54
+ opacity: 0;
55
+ filter:Alpha(Opacity=0);
56
+ }
57
+ .wdform_table1 .ui-front {
58
+ z-index: 100;
59
+ }
60
+
61
+
62
+ /* Interaction Cues
63
+ ----------------------------------*/
64
+ .wdform_table1 .ui-state-disabled {
65
+ cursor: default !important;
66
+ }
67
+
68
+
69
+ /* Icons
70
+ ----------------------------------*/
71
+
72
+ /* states and images */
73
+ .wdform_table1 .ui-icon {
74
+ display: block;
75
+ text-indent: -99999px;
76
+ overflow: hidden;
77
+ background-repeat: no-repeat;
78
+ }
79
+
80
+
81
+ /* Misc visuals
82
+ ----------------------------------*/
83
+
84
+ /* Overlays */
85
+ .wdform_table1 .ui-widget-overlay {
86
+ position: fixed;
87
+ top: 0;
88
+ left: 0;
89
+ width: 100%;
90
+ height: 100%;
91
+ }
92
+ .wdform_table1 .ui-accordion .ui-accordion-header {
93
+ display: block;
94
+ cursor: pointer;
95
+ position: relative;
96
+ margin-top: 2px;
97
+ padding: .5em .5em .5em .7em;
98
+ min-height: 0; /* support: IE7 */
99
+ }
100
+ .wdform_table1 .ui-accordion .ui-accordion-icons {
101
+ padding-left: 2.2em;
102
+ }
103
+ .wdform_table1 .ui-accordion .ui-accordion-noicons {
104
+ padding-left: .7em;
105
+ }
106
+ .wdform_table1 .ui-accordion .ui-accordion-icons .ui-accordion-icons {
107
+ padding-left: 2.2em;
108
+ }
109
+ .wdform_table1 .ui-accordion .ui-accordion-header .ui-accordion-header-icon {
110
+ position: absolute;
111
+ left: .5em;
112
+ top: 50%;
113
+ margin-top: -8px;
114
+ }
115
+ .wdform_table1 .ui-accordion .ui-accordion-content {
116
+ padding: 1em 2.2em;
117
+ border-top: 0;
118
+ overflow: auto;
119
+ }
120
+ .wdform_table1 .ui-autocomplete {
121
+ position: absolute;
122
+ top: 0;
123
+ left: 0;
124
+ cursor: default;
125
+ }
126
+ .wdform_table1 .ui-button {
127
+ display: inline-block;
128
+ position: relative;
129
+ padding: 0;
130
+ line-height: normal;
131
+ margin-right: .1em;
132
+ cursor: pointer;
133
+ vertical-align: middle;
134
+ text-align: center;
135
+ overflow: visible; /* removes extra width in IE */
136
+ }
137
+ .wdform_table1 .ui-button,
138
+ .ui-button:link,
139
+ .ui-button:visited,
140
+ .ui-button:hover,
141
+ .ui-button:active {
142
+ text-decoration: none;
143
+ }
144
+ /* to make room for the icon, a width needs to be set here */
145
+ .wdform_table1 .ui-button-icon-only {
146
+ width: 2.2em;
147
+ }
148
+ /* button elements seem to need a little more width */
149
+ .wdform_table1 button.ui-button-icon-only {
150
+ width: 2.4em;
151
+ }
152
+ .wdform_table1 .ui-button-icons-only {
153
+ width: 3.4em;
154
+ }
155
+ .wdform_table1 button.ui-button-icons-only {
156
+ width: 3.7em;
157
+ }
158
+
159
+ /* button text element */
160
+ .wdform_table1 .ui-button .ui-button-text {
161
+ display: block;
162
+ line-height: normal;
163
+ }
164
+ .wdform_table1 .ui-button-text-only .ui-button-text {
165
+ padding: .4em 1em;
166
+ }
167
+ .wdform_table1 .ui-button-icon-only .ui-button-text,
168
+ .wdform_table1 .ui-button-icons-only .ui-button-text {
169
+ padding: .4em;
170
+ text-indent: -9999999px;
171
+ }
172
+ .wdform_table1 .ui-button-text-icon-primary .ui-button-text,
173
+ .wdform_table1 .ui-button-text-icons .ui-button-text {
174
+ padding: .4em 1em .4em 2.1em;
175
+ }
176
+ .wdform_table1 .ui-button-text-icon-secondary .ui-button-text,
177
+ .wdform_table1 .ui-button-text-icons .ui-button-text {
178
+ padding: .4em 2.1em .4em 1em;
179
+ }
180
+ .wdform_table1 .ui-button-text-icons .ui-button-text {
181
+ padding-left: 2.1em;
182
+ padding-right: 2.1em;
183
+ }
184
+ /* no icon support for input elements, provide padding by default */
185
+ .wdform_table1 input.ui-button {
186
+ padding: .4em 1em;
187
+ }
188
+
189
+ /* button icon element(s) */
190
+ .wdform_table1 .ui-button-icon-only .ui-icon,
191
+ .wdform_table1 .ui-button-text-icon-primary .ui-icon,
192
+ .wdform_table1 .ui-button-text-icon-secondary .ui-icon,
193
+ .wdform_table1 .ui-button-text-icons .ui-icon,
194
+ .wdform_table1 .ui-button-icons-only .ui-icon {
195
+ position: absolute;
196
+ top: 50%;
197
+ margin-top: -8px;
198
+ }
199
+ .wdform_table1 .ui-button-icon-only .ui-icon {
200
+ left: 50%;
201
+ margin-left: -8px;
202
+ }
203
+ .wdform_table1 .ui-button-text-icon-primary .ui-button-icon-primary,
204
+ .wdform_table1 .ui-button-text-icons .ui-button-icon-primary,
205
+ .wdform_table1 .ui-button-icons-only .ui-button-icon-primary {
206
+ left: .5em;
207
+ }
208
+ .wdform_table1 .ui-button-text-icon-secondary .ui-button-icon-secondary,
209
+ .wdform_table1 .ui-button-text-icons .ui-button-icon-secondary,
210
+ .wdform_table1 .ui-button-icons-only .ui-button-icon-secondary {
211
+ right: .5em;
212
+ }
213
+
214
+ /* button sets */
215
+ .wdform_table1 .ui-buttonset {
216
+ margin-right: 7px;
217
+ }
218
+ .wdform_table1 .ui-buttonset .ui-button {
219
+ margin-left: 0;
220
+ margin-right: -.3em;
221
+ }
222
+
223
+ /* workarounds */
224
+ /* reset extra padding in Firefox, see h5bp.com/l */
225
+ .wdform_table1 input.ui-button::-moz-focus-inner,
226
+ .wdform_table1 button.ui-button::-moz-focus-inner {
227
+ border: 0;
228
+ padding: 0;
229
+ }
230
+ .wdform_table1 .ui-datepicker {
231
+ width: 17em;
232
+ padding: .2em .2em 0;
233
+ display: none;
234
+ }
235
+ .wdform_table1 .ui-datepicker .ui-datepicker-header {
236
+ position: relative;
237
+ padding: .2em 0;
238
+ }
239
+ .wdform_table1 .ui-datepicker .ui-datepicker-prev,
240
+ .wdform_table1 .ui-datepicker .ui-datepicker-next {
241
+ position: absolute;
242
+ top: 2px;
243
+ width: 1.8em;
244
+ height: 1.8em;
245
+ }
246
+ .wdform_table1 .ui-datepicker .ui-datepicker-prev-hover,
247
+ .wdform_table1 .ui-datepicker .ui-datepicker-next-hover {
248
+ top: 1px;
249
+ }
250
+ .wdform_table1 .ui-datepicker .ui-datepicker-prev {
251
+ left: 2px;
252
+ }
253
+ .wdform_table1 .ui-datepicker .ui-datepicker-next {
254
+ right: 2px;
255
+ }
256
+ .wdform_table1 .ui-datepicker .ui-datepicker-prev-hover {
257
+ left: 1px;
258
+ }
259
+ .wdform_table1 .ui-datepicker .ui-datepicker-next-hover {
260
+ right: 1px;
261
+ }
262
+ .wdform_table1 .ui-datepicker .ui-datepicker-prev span,
263
+ .ui-datepicker .ui-datepicker-next span {
264
+ display: block;
265
+ position: absolute;
266
+ left: 50%;
267
+ margin-left: -8px;
268
+ top: 50%;
269
+ margin-top: -8px;
270
+ }
271
+ .wdform_table1 .ui-datepicker .ui-datepicker-title {
272
+ margin: 0 2.3em;
273
+ line-height: 1.8em;
274
+ text-align: center;
275
+ }
276
+ .wdform_table1 .ui-datepicker .ui-datepicker-title select {
277
+ font-size: 1em;
278
+ margin: 1px 0;
279
+ }
280
+ .wdform_table1 .ui-datepicker select.ui-datepicker-month-year {
281
+ width: 100%;
282
+ }
283
+ .wdform_table1 .ui-datepicker select.ui-datepicker-month,
284
+ .wdform_table1 .ui-datepicker select.ui-datepicker-year {
285
+ width: 49%;
286
+ }
287
+ .wdform_table1 .ui-datepicker table {
288
+ width: 100%;
289
+ font-size: .9em;
290
+ border-collapse: collapse;
291
+ margin: 0 0 .4em;
292
+ }
293
+ .wdform_table1 .ui-datepicker th {
294
+ padding: .7em .3em;
295
+ text-align: center;
296
+ font-weight: bold;
297
+ border: 0;
298
+ }
299
+ .wdform_table1 .ui-datepicker td {
300
+ border: 0;
301
+ padding: 1px;
302
+ }
303
+ .wdform_table1 .ui-datepicker td span,
304
+ .wdform_table1 .ui-datepicker td a {
305
+ display: block;
306
+ padding: .2em;
307
+ text-align: right;
308
+ text-decoration: none;
309
+ }
310
+ .wdform_table1 .ui-datepicker .ui-datepicker-buttonpane {
311
+ background-image: none;
312
+ margin: .7em 0 0 0;
313
+ padding: 0 .2em;
314
+ border-left: 0;
315
+ border-right: 0;
316
+ border-bottom: 0;
317
+ }
318
+ .wdform_table1 .ui-datepicker .ui-datepicker-buttonpane button {
319
+ float: right;
320
+ margin: .5em .2em .4em;
321
+ cursor: pointer;
322
+ padding: .2em .6em .3em .6em;
323
+ width: auto;
324
+ overflow: visible;
325
+ }
326
+ .wdform_table1 .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
327
+ float: left;
328
+ }
329
+
330
+ /* with multiple calendars */
331
+ .wdform_table1 .ui-datepicker.ui-datepicker-multi {
332
+ width: auto;
333
+ }
334
+ .wdform_table1 .ui-datepicker-multi .ui-datepicker-group {
335
+ float: left;
336
+ }
337
+ .wdform_table1 .ui-datepicker-multi .ui-datepicker-group table {
338
+ width: 95%;
339
+ margin: 0 auto .4em;
340
+ }
341
+ .wdform_table1 .ui-datepicker-multi-2 .ui-datepicker-group {
342
+ width: 50%;
343
+ }
344
+ .wdform_table1 .ui-datepicker-multi-3 .ui-datepicker-group {
345
+ width: 33.3%;
346
+ }
347
+ .wdform_table1 .ui-datepicker-multi-4 .ui-datepicker-group {
348
+ width: 25%;
349
+ }
350
+ .wdform_table1 .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
351
+ .wdform_table1 .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
352
+ border-left-width: 0;
353
+ }
354
+ .wdform_table1 .ui-datepicker-multi .ui-datepicker-buttonpane {
355
+ clear: left;
356
+ }
357
+ .wdform_table1 .ui-datepicker-row-break {
358
+ clear: both;
359
+ width: 100%;
360
+ font-size: 0;
361
+ }
362
+
363
+ /* RTL support */
364
+ .wdform_table1 .ui-datepicker-rtl {
365
+ direction: rtl;
366
+ }
367
+ .wdform_table1 .ui-datepicker-rtl .ui-datepicker-prev {
368
+ right: 2px;
369
+ left: auto;
370
+ }
371
+ .wdform_table1 .ui-datepicker-rtl .ui-datepicker-next {
372
+ left: 2px;
373
+ right: auto;
374
+ }
375
+ .wdform_table1 .ui-datepicker-rtl .ui-datepicker-prev:hover {
376
+ right: 1px;
377
+ left: auto;
378
+ }
379
+ .wdform_table1 .ui-datepicker-rtl .ui-datepicker-next:hover {
380
+ left: 1px;
381
+ right: auto;
382
+ }
383
+ .wdform_table1 .ui-datepicker-rtl .ui-datepicker-buttonpane {
384
+ clear: right;
385
+ }
386
+ .wdform_table1 .ui-datepicker-rtl .ui-datepicker-buttonpane button {
387
+ float: left;
388
+ }
389
+ .wdform_table1 .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
390
+ .wdform_table1 .ui-datepicker-rtl .ui-datepicker-group {
391
+ float: right;
392
+ }
393
+ .wdform_table1 .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
394
+ .wdform_table1 .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
395
+ border-right-width: 0;
396
+ border-left-width: 1px;
397
+ }
398
+ .wdform_table1 .ui-dialog {
399
+ position: absolute;
400
+ top: 0;
401
+ left: 0;
402
+ padding: .2em;
403
+ outline: 0;
404
+ }
405
+ .wdform_table1 .ui-dialog .ui-dialog-titlebar {
406
+ padding: .4em 1em;
407
+ position: relative;
408
+ }
409
+ .wdform_table1 .ui-dialog .ui-dialog-title {
410
+ float: left;
411
+ margin: .1em 0;
412
+ white-space: nowrap;
413
+ width: 90%;
414
+ overflow: hidden;
415
+ text-overflow: ellipsis;
416
+ }
417
+ .wdform_table1 .ui-dialog .ui-dialog-titlebar-close {
418
+ position: absolute;
419
+ right: .3em;
420
+ top: 50%;
421
+ width: 21px;
422
+ margin: -10px 0 0 0;
423
+ padding: 1px;
424
+ height: 20px;
425
+ }
426
+ .wdform_table1 .ui-dialog .ui-dialog-content {
427
+ position: relative;
428
+ border: 0;
429
+ padding: .5em 1em;
430
+ background: none;
431
+ overflow: auto;
432
+ }
433
+ .wdform_table1 .ui-dialog .ui-dialog-buttonpane {
434
+ text-align: left;
435
+ border-width: 1px 0 0 0;
436
+ background-image: none;
437
+ margin-top: .5em;
438
+ padding: .3em 1em .5em .4em;
439
+ }
440
+ .wdform_table1 .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
441
+ float: right;
442
+ }
443
+ .wdform_table1 .ui-dialog .ui-dialog-buttonpane button {
444
+ margin: .5em .4em .5em 0;
445
+ cursor: pointer;
446
+ }
447
+ .wdform_table1 .ui-dialog .ui-resizable-se {
448
+ width: 12px;
449
+ height: 12px;
450
+ right: -5px;
451
+ bottom: -5px;
452
+ background-position: 16px 16px;
453
+ }
454
+ .wdform_table1 .ui-draggable .ui-dialog-titlebar {
455
+ cursor: move;
456
+ }
457
+ .wdform_table1 .ui-menu {
458
+ list-style: none;
459
+ padding: 2px;
460
+ margin: 0;
461
+ display: block;
462
+ outline: none;
463
+ }
464
+ .wdform_table1 .ui-menu .ui-menu {
465
+ margin-top: -3px;
466
+ position: absolute;
467
+ }
468
+ .wdform_table1 .ui-menu .ui-menu-item {
469
+ margin: 0;
470
+ padding: 0;
471
+ width: 100%;
472
+ /* support: IE10, see #8844 */
473
+ list-style-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);
474
+ }
475
+ .wdform_table1 .ui-menu .ui-menu-divider {
476
+ margin: 5px -2px 5px -2px;
477
+ height: 0;
478
+ font-size: 0;
479
+ line-height: 0;
480
+ border-width: 1px 0 0 0;
481
+ }
482
+ .wdform_table1 .ui-menu .ui-menu-item a {
483
+ text-decoration: none;
484
+ display: block;
485
+ padding: 2px .4em;
486
+ line-height: 1.5;
487
+ min-height: 0; /* support: IE7 */
488
+ font-weight: normal;
489
+ }
490
+ .wdform_table1 .ui-menu .ui-menu-item a.ui-state-focus,
491
+ .wdform_table1 .ui-menu .ui-menu-item a.ui-state-active {
492
+ font-weight: normal;
493
+ margin: -1px;
494
+ }
495
+
496
+ .wdform_table1 .ui-menu .ui-state-disabled {
497
+ font-weight: normal;
498
+ margin: .4em 0 .2em;
499
+ line-height: 1.5;
500
+ }
501
+ .wdform_table1 .ui-menu .ui-state-disabled a {
502
+ cursor: default;
503
+ }
504
+
505
+ /* icon support */
506
+ .wdform_table1 .ui-menu-icons {
507
+ position: relative;
508
+ }
509
+ .wdform_table1 .ui-menu-icons .ui-menu-item a {
510
+ position: relative;
511
+ padding-left: 2em;
512
+ }
513
+
514
+ /* left-aligned */
515
+ .wdform_table1 .ui-menu .ui-icon {
516
+ position: absolute;
517
+ top: .2em;
518
+ left: .2em;
519
+ }
520
+
521
+ /* right-aligned */
522
+ .wdform_table1 .ui-menu .ui-menu-icon {
523
+ position: static;
524
+ float: right;
525
+ }
526
+ .wdform_table1 .ui-progressbar {
527
+ height: 2em;
528
+ text-align: left;
529
+ overflow: hidden;
530
+ }
531
+ .wdform_table1 .ui-progressbar .ui-progressbar-value {
532
+ margin: -1px;
533
+ height: 100%;
534
+ }
535
+ .wdform_table1 .ui-progressbar .ui-progressbar-overlay {
536
+ background: url("images/animated-overlay.gif");
537
+ height: 100%;
538
+ filter: alpha(opacity=25);
539
+ opacity: 0.25;
540
+ }
541
+ .wdform_table1 .ui-progressbar-indeterminate .ui-progressbar-value {
542
+ background-image: none;
543
+ }
544
+ .wdform_table1 .ui-resizable {
545
+ position: relative;
546
+ }
547
+ .wdform_table1 .ui-resizable-handle {
548
+ position: absolute;
549
+ font-size: 0.1px;
550
+ display: block;
551
+ }
552
+ .wdform_table1 .ui-resizable-disabled .ui-resizable-handle,
553
+ .wdform_table1 .ui-resizable-autohide .ui-resizable-handle {
554
+ display: none;
555
+ }
556
+ .wdform_table1 .ui-resizable-n {
557
+ cursor: n-resize;
558
+ height: 7px;
559
+ width: 100%;
560
+ top: -5px;
561
+ left: 0;
562
+ }
563
+ .wdform_table1 .ui-resizable-s {
564
+ cursor: s-resize;
565
+ height: 7px;
566
+ width: 100%;
567
+ bottom: -5px;
568
+ left: 0;
569
+ }
570
+ .wdform_table1 .ui-resizable-e {
571
+ cursor: e-resize;
572
+ width: 7px;
573
+ right: -5px;
574
+ top: 0;
575
+ height: 100%;
576
+ }
577
+ .wdform_table1 .ui-resizable-w {
578
+ cursor: w-resize;
579
+ width: 7px;
580
+ left: -5px;
581
+ top: 0;
582
+ height: 100%;
583
+ }
584
+ .wdform_table1 .ui-resizable-se {
585
+ cursor: se-resize;
586
+ width: 12px;
587
+ height: 12px;
588
+ right: 1px;
589
+ bottom: 1px;
590
+ }
591
+ .wdform_table1 .ui-resizable-sw {
592
+ cursor: sw-resize;
593
+ width: 9px;
594
+ height: 9px;
595
+ left: -5px;
596
+ bottom: -5px;
597
+ }
598
+ .wdform_table1 .ui-resizable-nw {
599
+ cursor: nw-resize;
600
+ width: 9px;
601
+ height: 9px;
602
+ left: -5px;
603
+ top: -5px;
604
+ }
605
+ .wdform_table1 .ui-resizable-ne {
606
+ cursor: ne-resize;
607
+ width: 9px;
608
+ height: 9px;
609
+ right: -5px;
610
+ top: -5px;
611
+ }
612
+ .wdform_table1 .ui-selectable-helper {
613
+ position: absolute;
614
+ z-index: 100;
615
+ border: 1px dotted black;
616
+ }
617
+ .wdform_table1 .ui-slider {
618
+ position: relative;
619
+ text-align: left;
620
+ }
621
+ .wdform_table1 .ui-slider .ui-slider-handle {
622
+ position: absolute;
623
+ z-index: 2;
624
+ width: 1.2em;
625
+ height: 1.2em;
626
+ cursor: default;
627
+ }
628
+ .wdform_table1 .ui-slider .ui-slider-range {
629
+ position: absolute;
630
+ z-index: 1;
631
+ font-size: .7em;
632
+ display: block;
633
+ border: 0;
634
+ background-position: 0 0;
635
+ }
636
+
637
+ /* For IE8 - See #6727 */
638
+ .wdform_table1 .ui-slider.ui-state-disabled .ui-slider-handle,
639
+ .wdform_table1 .ui-slider.ui-state-disabled .ui-slider-range {
640
+ filter: inherit;
641
+ }
642
+ .wdform_table1 .ui-slider-horizontal {
643
+ height: .8em;
644
+ }
645
+ .wdform_table1 .ui-slider-horizontal .ui-slider-handle {
646
+ top: -.3em;
647
+ margin-left: -.6em;
648
+ }
649
+ .wdform_table1 .ui-slider-horizontal .ui-slider-range {
650
+ top: 0;
651
+ height: 100%;
652
+ }
653
+ .wdform_table1 .ui-slider-horizontal .ui-slider-range-min {
654
+ left: 0;
655
+ }
656
+ .wdform_table1 .ui-slider-horizontal .ui-slider-range-max {
657
+ right: 0;
658
+ }
659
+
660
+ .wdform_table1 .ui-slider-vertical {
661
+ width: .8em;
662
+ height: 100px;
663
+ }
664
+ .wdform_table1 .ui-slider-vertical .ui-slider-handle {
665
+ left: -.3em;
666
+ margin-left: 0;
667
+ margin-bottom: -.6em;
668
+ }
669
+ .wdform_table1 .ui-slider-vertical .ui-slider-range {
670
+ left: 0;
671
+ width: 100%;
672
+ }
673
+ .wdform_table1 .ui-slider-vertical .ui-slider-range-min {
674
+ bottom: 0;
675
+ }
676
+ .wdform_table1 .ui-slider-vertical .ui-slider-range-max {
677
+ top: 0;
678
+ }
679
+ .wdform_table1 .ui-spinner {
680
+ position: relative;
681
+ display: inline-block;
682
+ overflow: hidden;
683
+ padding: 0;
684
+ vertical-align: middle;
685
+ }
686
+ .wdform_table1 .ui-spinner-input {
687
+ border: none;
688
+ background: none;
689
+ color: inherit;
690
+ padding: .2em 0 !important;
691
+ vertical-align: middle;
692
+ padding-left: .4em !important;
693
+ padding-right: 22px !important;
694
+ }
695
+ .wdform_table1 .ui-spinner-button {
696
+ width: 16px;
697
+ height: 50%;
698
+ font-size: .5em;
699
+ padding: 0;
700
+ margin: 0;
701
+ text-align: center;
702
+ position: absolute;
703
+ cursor: default;
704
+ display: block;
705
+ overflow: hidden;
706
+ right: 0;
707
+ }
708
+ /* more specificity required here to overide default borders */
709
+ .wdform_table1 .ui-spinner a.ui-spinner-button {
710
+ border-top: none;
711
+ border-bottom: none;
712
+ border-right: none;
713
+ }
714
+ /* vertical centre icon */
715
+ .wdform_table1 .ui-spinner .ui-icon {
716
+ position: absolute;
717
+ margin-top: -8px;
718
+ top: 50%;
719
+ left: 0;
720
+ }
721
+ .wdform_table1 .ui-spinner-up {
722
+ top: 0;
723
+ }
724
+ .wdform_table1 .ui-spinner-down {
725
+ bottom: 0;
726
+ }
727
+
728
+ /* TR overrides */
729
+ .wdform_table1 .ui-spinner .ui-icon-triangle-1-s {
730
+ /* need to fix icons sprite */
731
+ background-position: -65px -16px;
732
+ }
733
+ .wdform_table1 .ui-tabs {
734
+ position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
735
+ padding: .2em;
736
+ }
737
+ .wdform_table1 .ui-tabs .ui-tabs-nav {
738
+ margin: 0;
739
+ padding: .2em .2em 0;
740
+ }
741
+ .wdform_table1 .ui-tabs .ui-tabs-nav li {
742
+ list-style: none;
743
+ float: left;
744
+ position: relative;
745
+ top: 0;
746
+ margin: 1px .2em 0 0;
747
+ border-bottom-width: 0;
748
+ padding: 0;
749
+ white-space: nowrap;
750
+ }
751
+ .wdform_table1 .ui-tabs .ui-tabs-nav li a {
752
+ float: left;
753
+ padding: .5em 1em;
754
+ text-decoration: none;
755
+ }
756
+ .wdform_table1 .ui-tabs .ui-tabs-nav li.ui-tabs-active {
757
+ margin-bottom: -1px;
758
+ padding-bottom: 1px;
759
+ }
760
+ .wdform_table1 .ui-tabs .ui-tabs-nav li.ui-tabs-active a,
761
+ .wdform_table1 .ui-tabs .ui-tabs-nav li.ui-state-disabled a,
762
+ .wdform_table1 .ui-tabs .ui-tabs-nav li.ui-tabs-loading a {
763
+ cursor: text;
764
+ }
765
+ .wdform_table1 .ui-tabs .ui-tabs-nav li a, /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
766
+ .wdform_table1 .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a {
767
+ cursor: pointer;
768
+ }
769
+ .wdform_table1 .ui-tabs .ui-tabs-panel {
770
+ display: block;
771
+ border-width: 0;
772
+ padding: 1em 1.4em;
773
+ background: none;
774
+ }
775
+ .wdform_table1 .ui-tooltip {
776
+ padding: 8px;
777
+ position: absolute;
778
+ z-index: 9999;
779
+ max-width: 300px;
780
+ -webkit-box-shadow: 0 0 5px #aaa;
781
+ box-shadow: 0 0 5px #aaa;
782
+ }
783
+ .wdform_table1 body .ui-tooltip {
784
+ border-width: 2px;
785
+ }
786
+
787
+ /* Component containers
788
+ ----------------------------------*/
789
+ .wdform_table1 .ui-widget {
790
+ font-family: Verdana,Arial,sans-serif;
791
+ font-size: 1.1em;
792
+ }
793
+ .wdform_table1 .ui-widget .ui-widget {
794
+ font-size: 1em;
795
+ }
796
+ .wdform_table1 .ui-widget input,
797
+ .wdform_table1 .ui-widget select,
798
+ .wdform_table1 .ui-widget textarea,
799
+ .wdform_table1 .ui-widget button {
800
+ font-family: Verdana,Arial,sans-serif;
801
+ font-size: 1em;
802
+ }
803
+ .wdform_table1 .ui-widget-content {
804
+ border: 1px solid #aaaaaa;
805
+ background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;
806
+ color: #222222;
807
+ }
808
+ .wdform_table1 .ui-widget-content a {
809
+ color: #222222;
810
+ }
811
+ .wdform_table1 .ui-widget-header {
812
+ border: 1px solid #aaaaaa;
813
+ background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;
814
+ color: #222222;
815
+ font-weight: bold;
816
+ }
817
+ .wdform_table1 .ui-widget-header a {
818
+ color: #222222;
819
+ }
820
+
821
+ /* Interaction states
822
+ ----------------------------------*/
823
+ .wdform_table1 .ui-state-default,
824
+ .wdform_table1 .ui-widget-content .ui-state-default,
825
+ .wdform_table1 .ui-widget-header .ui-state-default {
826
+ border: 1px solid #d3d3d3;
827
+ background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;
828
+ font-weight: normal;
829
+ color: #555555;
830
+ }
831
+ .wdform_table1 .ui-state-default a,
832
+ .wdform_table1 .ui-state-default a:link,
833
+ .wdform_table1 .ui-state-default a:visited {
834
+ color: #555555;
835
+ text-decoration: none;
836
+ }
837
+ .wdform_table1 .ui-state-hover,
838
+ .wdform_table1 .ui-widget-content .ui-state-hover,
839
+ .wdform_table1 .ui-widget-header .ui-state-hover,
840
+ .wdform_table1 .ui-state-focus,
841
+ .wdform_table1 .ui-widget-content .ui-state-focus,
842
+ .wdform_table1 .ui-widget-header .ui-state-focus {
843
+ border: 1px solid #999999;
844
+ background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;
845
+ font-weight: normal;
846
+ color: #212121;
847
+ }
848
+ .wdform_table1 .ui-state-hover a,
849
+ .wdform_table1 .ui-state-hover a:hover,
850
+ .wdform_table1 .ui-state-hover a:link,
851
+ .wdform_table1 .ui-state-hover a:visited {
852
+ color: #212121;
853
+ text-decoration: none;
854
+ }
855
+ .wdform_table1 .ui-state-active,
856
+ .wdform_table1 .ui-widget-content .ui-state-active,
857
+ .wdform_table1 .ui-widget-header .ui-state-active {
858
+ border: 1px solid #aaaaaa;
859
+ background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;
860
+ font-weight: normal;
861
+ color: #212121;
862
+ }
863
+ .wdform_table1 .ui-state-active a,
864
+ .wdform_table1 .ui-state-active a:link,
865
+ .wdform_table1 .ui-state-active a:visited {
866
+ color: #212121;
867
+ text-decoration: none;
868
+ }
869
+
870
+ /* Interaction Cues
871
+ ----------------------------------*/
872
+ .wdform_table1 .ui-state-highlight,
873
+ .wdform_table1 .ui-widget-content .ui-state-highlight,
874
+ .wdform_table1 .ui-widget-header .ui-state-highlight {
875
+ border: 1px solid #fcefa1;
876
+ background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;
877
+ color: #363636;
878
+ }
879
+ .wdform_table1 .ui-state-highlight a,
880
+ .wdform_table1 .ui-widget-content .ui-state-highlight a,
881
+ .wdform_table1 .ui-widget-header .ui-state-highlight a {
882
+ color: #363636;
883
+ }
884
+ .wdform_table1 .ui-state-error,
885
+ .wdform_table1 .ui-widget-content .ui-state-error,
886
+ .wdform_table1 .ui-widget-header .ui-state-error {
887
+ border: 1px solid #cd0a0a;
888
+ background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;
889
+ color: #cd0a0a;
890
+ }
891
+ .wdform_table1 .ui-state-error a,
892
+ .wdform_table1 .ui-widget-content .ui-state-error a,
893
+ .wdform_table1 .ui-widget-header .ui-state-error a {
894
+ color: #cd0a0a;
895
+ }
896
+ .wdform_table1 .ui-state-error-text,
897
+ .wdform_table1 .ui-widget-content .ui-state-error-text,
898
+ .wdform_table1 .ui-widget-header .ui-state-error-text {
899
+ color: #cd0a0a;
900
+ }
901
+ .wdform_table1 .ui-priority-primary,
902
+ .wdform_table1 .ui-widget-content .ui-priority-primary,
903
+ .wdform_table1 .ui-widget-header .ui-priority-primary {
904
+ font-weight: bold;
905
+ }
906
+ .wdform_table1 .ui-priority-secondary,
907
+ .wdform_table1 .ui-widget-content .ui-priority-secondary,
908
+ .wdform_table1 .ui-widget-header .ui-priority-secondary {
909
+ opacity: .7;
910
+ filter:Alpha(Opacity=70);
911
+ font-weight: normal;
912
+ }
913
+ .wdform_table1 .ui-state-disabled,
914
+ .wdform_table1 .ui-widget-content .ui-state-disabled,
915
+ .wdform_table1 .ui-widget-header .ui-state-disabled {
916
+ opacity: .35;
917
+ filter:Alpha(Opacity=35);
918
+ background-image: none;
919
+ }
920
+ .wdform_table1 .ui-state-disabled .ui-icon {
921
+ filter:Alpha(Opacity=35); /* For IE8 - See #6059 */
922
+ }
923
+
924
+ /* Icons
925
+ ----------------------------------*/
926
+
927
+ /* states and images */
928
+ .wdform_table1 .ui-icon {
929
+ width: 16px;
930
+ height: 16px;
931
+ }
932
+ .wdform_table1 .ui-icon,
933
+ .wdform_table1 .ui-widget-content .ui-icon {
934
+ background-image: url(images/ui-icons_222222_256x240.png);
935
+ }
936
+ .wdform_table1 .ui-widget-header .ui-icon {
937
+ background-image: url(images/ui-icons_222222_256x240.png);
938
+ }
939
+ .wdform_table1 .ui-state-default .ui-icon {
940
+ background-image: url(images/ui-icons_888888_256x240.png) !important;
941
+ }
942
+ .wdform_table1 .ui-state-hover .ui-icon,
943
+ .wdform_table1 .ui-state-focus .ui-icon {
944
+ background-image: url(images/ui-icons_454545_256x240.png);
945
+ }
946
+ .wdform_table1 .ui-state-active .ui-icon {
947
+ background-image: url(images/ui-icons_454545_256x240.png);
948
+ }
949
+ .wdform_table1 .ui-state-highlight .ui-icon {
950
+ background-image: url(images/ui-icons_2e83ff_256x240.png);
951
+ }
952
+ .wdform_table1 .ui-state-error .ui-icon,
953
+ .wdform_table1 .ui-state-error-text .ui-icon {
954
+ background-image: url(images/ui-icons_cd0a0a_256x240.png);
955
+ }
956
+
957
+ /* positioning */
958
+ .wdform_table1 .ui-icon-blank { background-position: 16px 16px; }
959
+ .wdform_table1 .ui-icon-carat-1-n { background-position: 0 0; }
960
+ .wdform_table1 .ui-icon-carat-1-ne { background-position: -16px 0; }
961
+ .wdform_table1 .ui-icon-carat-1-e { background-position: -32px 0; }
962
+ .wdform_table1 .ui-icon-carat-1-se { background-position: -48px 0; }
963
+ .wdform_table1 .ui-icon-carat-1-s { background-position: -64px 0; }
964
+ .wdform_table1 .ui-icon-carat-1-sw { background-position: -80px 0; }
965
+ .wdform_table1 .ui-icon-carat-1-w { background-position: -96px 0; }
966
+ .wdform_table1 .ui-icon-carat-1-nw { background-position: -112px 0; }
967
+ .wdform_table1 .ui-icon-carat-2-n-s { background-position: -128px 0; }
968
+ .wdform_table1 .ui-icon-carat-2-e-w { background-position: -144px 0; }
969
+ .wdform_table1 .ui-icon-triangle-1-n { background-position: 0 -16px; }
970
+ .wdform_table1 .ui-icon-triangle-1-ne { background-position: -16px -16px; }
971
+ .wdform_table1 .ui-icon-triangle-1-e { background-position: -32px -16px; }
972
+ .wdform_table1 .ui-icon-triangle-1-se { background-position: -48px -16px; }
973
+ .wdform_table1 .ui-icon-triangle-1-s { background-position: -64px -16px; }
974
+ .wdform_table1 .ui-icon-triangle-1-sw { background-position: -80px -16px; }
975
+ .wdform_table1 .ui-icon-triangle-1-w { background-position: -96px -16px; }
976
+ .wdform_table1 .ui-icon-triangle-1-nw { background-position: -112px -16px; }
977
+ .wdform_table1 .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
978
+ .wdform_table1 .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
979
+ .wdform_table1 .ui-icon-arrow-1-n { background-position: 0 -32px; }
980
+ .wdform_table1 .ui-icon-arrow-1-ne { background-position: -16px -32px; }
981
+ .wdform_table1 .ui-icon-arrow-1-e { background-position: -32px -32px; }
982
+ .wdform_table1 .ui-icon-arrow-1-se { background-position: -48px -32px; }
983
+ .wdform_table1 .ui-icon-arrow-1-s { background-position: -64px -32px; }
984
+ .wdform_table1 .ui-icon-arrow-1-sw { background-position: -80px -32px; }
985
+ .wdform_table1 .ui-icon-arrow-1-w { background-position: -96px -32px; }
986
+ .wdform_table1 .ui-icon-arrow-1-nw { background-position: -112px -32px; }
987
+ .wdform_table1 .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
988
+ .wdform_table1 .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
989
+ .wdform_table1 .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
990
+ .wdform_table1 .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
991
+ .wdform_table1 .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
992
+ .wdform_table1 .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
993
+ .wdform_table1 .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
994
+ .wdform_table1 .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
995
+ .wdform_table1 .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
996
+ .wdform_table1 .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
997
+ .wdform_table1 .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
998
+ .wdform_table1 .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
999
+ .wdform_table1 .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
1000
+ .wdform_table1 .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
1001
+ .wdform_table1 .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
1002
+ .wdform_table1 .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
1003
+ .wdform_table1 .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
1004
+ .wdform_table1 .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
1005
+ .wdform_table1 .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
1006
+ .wdform_table1 .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
1007
+ .wdform_table1 .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
1008
+ .wdform_table1 .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
1009
+ .wdform_table1 .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
1010
+ .wdform_table1 .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
1011
+ .wdform_table1 .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
1012
+ .wdform_table1 .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
1013
+ .wdform_table1 .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
1014
+ .wdform_table1 .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
1015
+ .wdform_table1 .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
1016
+ .wdform_table1 .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
1017
+ .wdform_table1 .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
1018
+ .wdform_table1 .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
1019
+ .wdform_table1 .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
1020
+ .wdform_table1 .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
1021
+ .wdform_table1 .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
1022
+ .wdform_table1 .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
1023
+ .wdform_table1 .ui-icon-arrow-4 { background-position: 0 -80px; }
1024
+ .wdform_table1 .ui-icon-arrow-4-diag { background-position: -16px -80px; }
1025
+ .wdform_table1 .ui-icon-extlink { background-position: -32px -80px; }
1026
+ .wdform_table1 .ui-icon-newwin { background-position: -48px -80px; }
1027
+ .wdform_table1 .ui-icon-refresh { background-position: -64px -80px; }
1028
+ .wdform_table1 .ui-icon-shuffle { background-position: -80px -80px; }
1029
+ .wdform_table1 .ui-icon-transfer-e-w { background-position: -96px -80px; }
1030
+ .wdform_table1 .ui-icon-transferthick-e-w { background-position: -112px -80px; }
1031
+ .wdform_table1 .ui-icon-folder-collapsed { background-position: 0 -96px; }
1032
+ .wdform_table1 .ui-icon-folder-open { background-position: -16px -96px; }
1033
+ .wdform_table1 .ui-icon-document { background-position: -32px -96px; }
1034
+ .wdform_table1 .ui-icon-document-b { background-position: -48px -96px; }
1035
+ .wdform_table1 .ui-icon-note { background-position: -64px -96px; }
1036
+ .wdform_table1 .ui-icon-mail-closed { background-position: -80px -96px; }
1037
+ .wdform_table1 .ui-icon-mail-open { background-position: -96px -96px; }
1038
+ .wdform_table1 .ui-icon-suitcase { background-position: -112px -96px; }
1039
+ .wdform_table1 .ui-icon-comment { background-position: -128px -96px; }
1040
+ .wdform_table1 .ui-icon-person { background-position: -144px -96px; }
1041
+ .wdform_table1 .ui-icon-print { background-position: -160px -96px; }
1042
+ .wdform_table1 .ui-icon-trash { background-position: -176px -96px; }
1043
+ .wdform_table1 .ui-icon-locked { background-position: -192px -96px; }
1044
+ .wdform_table1 .ui-icon-unlocked { background-position: -208px -96px; }
1045
+ .wdform_table1 .ui-icon-bookmark { background-position: -224px -96px; }
1046
+ .wdform_table1 .ui-icon-tag { background-position: -240px -96px; }
1047
+ .wdform_table1 .ui-icon-home { background-position: 0 -112px; }
1048
+ .wdform_table1 .ui-icon-flag { background-position: -16px -112px; }
1049
+ .wdform_table1 .ui-icon-calendar { background-position: -32px -112px; }
1050
+ .wdform_table1 .ui-icon-cart { background-position: -48px -112px; }
1051
+ .wdform_table1 .ui-icon-pencil { background-position: -64px -112px; }
1052
+ .wdform_table1 .ui-icon-clock { background-position: -80px -112px; }
1053
+ .wdform_table1 .ui-icon-disk { background-position: -96px -112px; }
1054
+ .wdform_table1 .ui-icon-calculator { background-position: -112px -112px; }
1055
+ .wdform_table1 .ui-icon-zoomin { background-position: -128px -112px; }
1056
+ .wdform_table1 .ui-icon-zoomout { background-position: -144px -112px; }
1057
+ .wdform_table1 .ui-icon-search { background-position: -160px -112px; }
1058
+ .wdform_table1 .ui-icon-wrench { background-position: -176px -112px; }
1059
+ .wdform_table1 .ui-icon-gear { background-position: -192px -112px; }
1060
+ .wdform_table1 .ui-icon-heart { background-position: -208px -112px; }
1061
+ .wdform_table1 .ui-icon-star { background-position: -224px -112px; }
1062
+ .wdform_table1 .ui-icon-link { background-position: -240px -112px; }
1063
+ .wdform_table1 .ui-icon-cancel { background-position: 0 -128px; }
1064
+ .wdform_table1 .ui-icon-plus { background-position: -16px -128px; }
1065
+ .wdform_table1 .ui-icon-plusthick { background-position: -32px -128px; }
1066
+ .wdform_table1 .ui-icon-minus { background-position: -48px -128px; }
1067
+ .wdform_table1 .ui-icon-minusthick { background-position: -64px -128px; }
1068
+ .wdform_table1 .ui-icon-close { background-position: -80px -128px; }
1069
+ .wdform_table1 .ui-icon-closethick { background-position: -96px -128px; }
1070
+ .wdform_table1 .ui-icon-key { background-position: -112px -128px; }
1071
+ .wdform_table1 .ui-icon-lightbulb { background-position: -128px -128px; }
1072
+ .wdform_table1 .ui-icon-scissors { background-position: -144px -128px; }
1073
+ .wdform_table1 .ui-icon-clipboard { background-position: -160px -128px; }
1074
+ .wdform_table1 .ui-icon-copy { background-position: -176px -128px; }
1075
+ .wdform_table1 .ui-icon-contact { background-position: -192px -128px; }
1076
+ .wdform_table1 .ui-icon-image { background-position: -208px -128px; }
1077
+ .wdform_table1 .ui-icon-video { background-position: -224px -128px; }
1078
+ .wdform_table1 .ui-icon-script { background-position: -240px -128px; }
1079
+ .wdform_table1 .ui-icon-alert { background-position: 0 -144px; }
1080
+ .wdform_table1 .ui-icon-info { background-position: -16px -144px; }
1081
+ .wdform_table1 .ui-icon-notice { background-position: -32px -144px; }
1082
+ .wdform_table1 .ui-icon-help { background-position: -48px -144px; }
1083
+ .wdform_table1 .ui-icon-check { background-position: -64px -144px; }
1084
+ .wdform_table1 .ui-icon-bullet { background-position: -80px -144px; }
1085
+ .wdform_table1 .ui-icon-radio-on { background-position: -96px -144px; }
1086
+ .wdform_table1 .ui-icon-radio-off { background-position: -112px -144px; }
1087
+ .wdform_table1 .ui-icon-pin-w { background-position: -128px -144px; }
1088
+ .wdform_table1 .ui-icon-pin-s { background-position: -144px -144px; }
1089
+ .wdform_table1 .ui-icon-play { background-position: 0 -160px; }
1090
+ .wdform_table1 .ui-icon-pause { background-position: -16px -160px; }
1091
+ .wdform_table1 .ui-icon-seek-next { background-position: -32px -160px; }
1092
+ .wdform_table1 .ui-icon-seek-prev { background-position: -48px -160px; }
1093
+ .wdform_table1 .ui-icon-seek-end { background-position: -64px -160px; }
1094
+ .wdform_table1 .ui-icon-seek-start { background-position: -80px -160px; }
1095
+ /* .wdform_table1 ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
1096
+ .wdform_table1 .ui-icon-seek-first { background-position: -80px -160px; }
1097
+ .wdform_table1 .ui-icon-stop { background-position: -96px -160px; }
1098
+ .wdform_table1 .ui-icon-eject { background-position: -112px -160px; }
1099
+ .wdform_table1 .ui-icon-volume-off { background-position: -128px -160px; }
1100
+ .wdform_table1 .ui-icon-volume-on { background-position: -144px -160px; }
1101
+ .wdform_table1 .ui-icon-power { background-position: 0 -176px; }
1102
+ .wdform_table1 .ui-icon-signal-diag { background-position: -16px -176px; }
1103
+ .wdform_table1 .ui-icon-signal { background-position: -32px -176px; }
1104
+ .wdform_table1 .ui-icon-battery-0 { background-position: -48px -176px; }
1105
+ .wdform_table1 .ui-icon-battery-1 { background-position: -64px -176px; }
1106
+ .wdform_table1 .ui-icon-battery-2 { background-position: -80px -176px; }
1107
+ .wdform_table1 .ui-icon-battery-3 { background-position: -96px -176px; }
1108
+ .wdform_table1 .ui-icon-circle-plus { background-position: 0 -192px; }
1109
+ .wdform_table1 .ui-icon-circle-minus { background-position: -16px -192px; }
1110
+ .wdform_table1 .ui-icon-circle-close { background-position: -32px -192px; }
1111
+ .wdform_table1 .ui-icon-circle-triangle-e { background-position: -48px -192px; }
1112
+ .wdform_table1 .ui-icon-circle-triangle-s { background-position: -64px -192px; }
1113
+ .wdform_table1 .ui-icon-circle-triangle-w { background-position: -80px -192px; }
1114
+ .wdform_table1 .ui-icon-circle-triangle-n { background-position: -96px -192px; }
1115
+ .wdform_table1 .ui-icon-circle-arrow-e { background-position: -112px -192px; }
1116
+ .wdform_table1 .ui-icon-circle-arrow-s { background-position: -128px -192px; }
1117
+ .wdform_table1 .ui-icon-circle-arrow-w { background-position: -144px -192px; }
1118
+ .wdform_table1 .ui-icon-circle-arrow-n { background-position: -160px -192px; }
1119
+ .wdform_table1 .ui-icon-circle-zoomin { background-position: -176px -192px; }
1120
+ .wdform_table1 .ui-icon-circle-zoomout { background-position: -192px -192px; }
1121
+ .wdform_table1 .ui-icon-circle-check { background-position: -208px -192px; }
1122
+ .wdform_table1 .ui-icon-circlesmall-plus { background-position: 0 -208px; }
1123
+ .wdform_table1 .ui-icon-circlesmall-minus { background-position: -16px -208px; }
1124
+ .wdform_table1 .ui-icon-circlesmall-close { background-position: -32px -208px; }
1125
+ .wdform_table1 .ui-icon-squaresmall-plus { background-position: -48px -208px; }
1126
+ .wdform_table1 .ui-icon-squaresmall-minus { background-position: -64px -208px; }
1127
+ .wdform_table1 .ui-icon-squaresmall-close { background-position: -80px -208px; }
1128
+ .wdform_table1 .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
1129
+ .wdform_table1 .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
1130
+ .wdform_table1 .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
1131
+ .wdform_table1 .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
1132
+ .wdform_table1 .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
1133
+ .wdform_table1 .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
1134
+
1135
+
1136
+ /* Misc visuals
1137
+ ----------------------------------*/
1138
+
1139
+ /* Corner radius */
1140
+ .wdform_table1 .ui-corner-all,
1141
+ .wdform_table1 .ui-corner-top,
1142
+ .wdform_table1 .ui-corner-left,
1143
+ .wdform_table1 .ui-corner-tl {
1144
+ border-top-left-radius: 4px;
1145
+ }
1146
+ .wdform_table1 .ui-corner-all,
1147
+ .wdform_table1 .ui-corner-top,
1148
+ .wdform_table1 .ui-corner-right,
1149
+ .wdform_table1 .ui-corner-tr {
1150
+ border-top-right-radius: 4px;
1151
+ }
1152
+ .wdform_table1 .ui-corner-all,
1153
+ .wdform_table1 .ui-corner-bottom,
1154
+ .wdform_table1 .ui-corner-left,
1155
+ .wdform_table1 .ui-corner-bl {
1156
+ border-bottom-left-radius: 4px;
1157
+ }
1158
+ .wdform_table1 .ui-corner-all,
1159
+ .wdform_table1 .ui-corner-bottom,
1160
+ .wdform_table1 .ui-corner-right,
1161
+ .wdform_table1 .ui-corner-br {
1162
+ border-bottom-right-radius: 4px;
1163
+ }
1164
+
1165
+ /* Overlays */
1166
+ .wdform_table1 .ui-widget-overlay {
1167
+ background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
1168
+ opacity: .3;
1169
+ filter: Alpha(Opacity=30);
1170
+ }
1171
+ .wdform_table1 .ui-widget-shadow {
1172
+ margin: -8px 0 0 -8px;
1173
+ padding: 8px;
1174
+ background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
1175
+ opacity: .3;
1176
+ filter: Alpha(Opacity=30);
1177
+ border-radius: 8px;
1178
+ }
css/notices.css CHANGED
@@ -49,3 +49,9 @@
49
  .fm-blue {
50
  color: #10738B;
51
  }
 
 
 
 
 
 
49
  .fm-blue {
50
  color: #10738B;
51
  }
52
+ .fm-notice-old-form .fm-notice-logo{
53
+ background: url(../images/logowd.png) no-repeat 50% 20% !important;
54
+ }
55
+ .fm-notice-old-form .fm-notice-body{
56
+ padding-right: 15px !important;
57
+ }
featured/admin.css CHANGED
@@ -1,737 +1,737 @@
1
- /**
2
- * Admin CSS file
3
- */
4
- #fm-tabs > div{
5
- display:none;
6
- }
7
- #fm-settings{
8
- background: #ffffff;
9
- padding: 15px;
10
- }
11
- .fm-meta-control {
12
- margin-bottom: 15px;
13
- }
14
-
15
- .fm-meta-control label {
16
- display: block;
17
- font-weight: bold;
18
- }
19
-
20
- #fm-admin-promo {
21
- background-color: #fcf8e3;
22
- border: 1px solid #faebbe;
23
- color: #8a6d3b;
24
- padding: 15px;
25
- }
26
-
27
- #fm_event_meta .inside code {
28
- word-break: break-all;
29
- }
30
-
31
- .border{
32
- border: 1px solid red;
33
- }
34
-
35
- /*Spider events*/
36
- .fm_repeat_type_list{
37
- float: left;
38
- width: 30%;
39
- }
40
- .fm_repeat_advanced{
41
- float: left;
42
- width: 68%;
43
- }
44
- #fm_choose_day_container div label{
45
- width: 120px;
46
- display: inline-block;
47
- }
48
- #fm_choose_day_container div label:after{
49
- clear: both;
50
- }
51
- #fm_choose_day_container div label input{
52
- float: right;
53
- margin: 1px;
54
- }
55
- .fm_icon{
56
- max-width: 64px;
57
- max-height: 64px;
58
- }
59
-
60
- .fm-modal .fm-calendar-event,
61
- .fm-events .fm-calendar-event{
62
- width:47%;
63
- display: inline-block;
64
- margin:0 20px 10px 0;
65
- }
66
-
67
- .fm-events .fm-calendar-event{
68
- width:42%;
69
- }
70
- .fm-modal .fm-calendar-event span:first-child,
71
- .fm-events .fm-calendar-event span:first-child{
72
- border: 1px solid #C8C8C8;
73
- display: inline-block;
74
- width: 89%;
75
- box-sizing: border-box;
76
- padding: 2px 2px 2px 7px;
77
- color: #7C7C7C;
78
- white-space: nowrap;
79
- text-overflow: ellipsis;
80
- overflow: hidden;
81
- float: left;
82
- }
83
-
84
- .fm-events .fm-calendar-event span:first-child{
85
- width: 81%;
86
- }
87
- .fm-modal .fm-calendar-event:nth-child(even){
88
- margin-right:0;
89
- }
90
-
91
- .fm-events .fm-calendar-event:after{
92
- clear: both;
93
- }
94
-
95
- .fm-modal .fm-calendar-event .fm-calendar-event-add,
96
- .fm-events .fm-calendar-event-delete{
97
- display: inline-block;
98
- text-align: center;
99
- float: left;
100
- vertical-align: middle;
101
- border-radius: 2px;
102
- height: 24px;
103
- width: 24px;
104
- color: #FFFFff;
105
- background-color: #0074A2;
106
- cursor: pointer;
107
- font-size: 19px;
108
- }
109
-
110
-
111
- .fm-events .fm-calendar-event-edit{
112
-
113
- }
114
- .fm-events .fm-calendar-event-edit a{
115
- font-size: 0;
116
- display: inline-block;
117
- float: left;
118
- margin: 0 1px;
119
- border-radius: 2px;
120
- height: 24px;
121
- width: 24px;
122
- background: url("../images/edit_icon.png") no-repeat center center;
123
- }
124
- .fm-events .fm-calendar-event-delete{
125
- line-height: 20px;
126
- }
127
-
128
- .fm-calendar-event-add {
129
- cursor: pointer;
130
- }
131
-
132
- .fm-modal {
133
- position: fixed;
134
- font-family: Arial, Helvetica, sans-serif;
135
- overflow-y: scroll;
136
- top: 0;
137
- right: 0;
138
- bottom: 0;
139
- left: 0;
140
- background: rgba(0, 0, 0, 0.8);
141
- z-index: 99999;
142
- opacity:0;
143
- -webkit-transition: opacity 400ms ease-in;
144
- -moz-transition: opacity 400ms ease-in;
145
- transition: opacity 400ms ease-in;
146
- pointer-events: none;
147
- }
148
- .fm-modal:target {
149
- opacity:1;
150
- pointer-events: auto;
151
- }
152
- .fm-modal > div.fm-excluded-events {
153
- width: 500px !important;
154
- position: relative;
155
- margin: 10% auto;
156
- padding: 0px 20px 16px 20px !important;
157
- border-radius: 1px;
158
- background: #fff;
159
- }
160
- .fm-modal > div.fm-preview {
161
- position: relative;
162
- margin: 5%;
163
- padding: 5px 20px 13px 20px;
164
- border-radius: 1px;
165
- background: #fff;
166
- min-width:600px;
167
- }
168
-
169
- .fm-close {
170
- background: url(../images/close.png);
171
- display: inline-block;
172
- position: absolute;
173
- right: 0px;
174
- height: 29px;
175
- top: 0px;
176
- width: 29px;
177
- text-decoration: none;
178
- z-index: 4;
179
- }
180
-
181
- .fm-excluded-events h2{
182
- margin: 15px 0;
183
- padding-bottom: 15px !important;
184
- border-bottom: 1px solid #B2B2B2;
185
- }
186
-
187
- .wd_stay_active {
188
- background: none repeat scroll 0% 0% green !important;
189
- box-shadow: 0px 1px 3px 0px #178FE5 inset !important;
190
- color: #FFF !important;
191
- font-weight: 700 !important;
192
- }
193
- #fm_event_pickup_date, #fm_event_pickup_time {
194
- height: 27px;
195
- border: 1px solid #A1A1A1;
196
- border-radius: 0;
197
- font-size: 13px;
198
- color: #444444;
199
- padding: 0 5px 0 27px;
200
- margin-top: 1px;
201
- }
202
-
203
- #fm_event_pickup_date {
204
- background:url(../images/admin_day.jpg) no-repeat left;
205
- margin: 1px 8px;
206
- }
207
- #fm_event_pickup_time {
208
- background:url(../images/admin_time.jpg) no-repeat left;
209
- }
210
-
211
- /*TABS*/
212
- #fm-tabs, #fm-tabs div{
213
- background: none #ffffff;
214
- border: 0;
215
- }
216
- .fm-tabs{
217
- list-style-type: none;
218
- }
219
- .fm-tabs li,
220
- #fm-settings-content .nav-tab-wrapper a{
221
- display: inline-block;
222
- border: 1px solid #A5A5A5;
223
- }
224
- .fm-tabs li a,
225
- #fm-settings-content .nav-tab-wrapper a{
226
- display: table-cell;
227
- text-align: center;
228
- width: 100px;
229
- height: 30px;
230
- vertical-align: middle;
231
- text-decoration:none;
232
- color:#5E5E5E;
233
- font-size: 16px;
234
- }
235
-
236
- #fm-settings-content .nav-tab-wrapper a{
237
- background: #ffffff;
238
- height: 21px;
239
- margin-right: 4px;
240
- display: inline-block;
241
- font-weight: normal;
242
- padding-top: 2px;
243
- }
244
-
245
- .fm-tabs li a:focus{
246
- box-shadow:none;
247
- }
248
- .fm-tabs li:hover a,.fm-tabs li.ui-state-active a,
249
- #fm-settings-content .nav-tab-wrapper a:hover,#fm-settings-content .nav-tab-wrapper a.nav-tab-active{
250
- color:#ffffff;
251
- background: #0074A2;
252
- }
253
-
254
- #fm-settings-content .nav-tab-wrapper {
255
- border-bottom:0;
256
- padding-left: 0;
257
- }
258
-
259
- .fm-tabs li:hover,.fm-tabs li.ui-state-active,
260
- #fm-settings-content .nav-tab-wrapper a.nav-tab-active{
261
- border: 1px solid transparent;
262
- }
263
-
264
- .fm-tab-inner{
265
- padding: 15px;
266
- }
267
-
268
- /*Preview */
269
- .ui-selecting { background: #FECA40 !important; }
270
- .ui-selected { background: #F39814 !important;}
271
-
272
- .event_cal_add {
273
- width: 350px;
274
- height: 130px;
275
- padding: 40px 20px 0;
276
- border: 1px solid #cccccc;
277
- position: absolute;
278
- z-index: 9999;
279
- background: #ffffff;
280
- }
281
- .event_cal_add .close{
282
- display: block;
283
- line-height: 18px;
284
- width: 20px;
285
- font-size: 8pt;
286
- margin-top: 1px;
287
- margin-right: 1px;
288
- position: absolute;
289
- font-family: tahoma;
290
- text-align: center;
291
- top: 0;
292
- right: 0;
293
- cursor: pointer;
294
- background-size: contain;
295
- height: 20px;
296
- }
297
-
298
- .event_cal_add .add_event_to_cal{
299
- display: block;
300
- cursor: pointer;
301
- padding-bottom: 10px;
302
- margin: 25px 0 0 0;
303
- width: 78px;
304
- text-align: center;
305
- line-height: 30px;
306
- height: 20px;
307
- background: #e3e3e3;
308
- border: 1px solid #eeeeee;
309
- }
310
- .event_cal_add .fm_notification{
311
- display: block;
312
- height: 20px;
313
- margin: 25px 0 0 0;
314
- }
315
- span.fm_error{
316
- color: #bc0b0b;
317
- display: block;
318
- padding-left: 36px;
319
- height: 20px;
320
-
321
- }
322
- #fm_calendar_meta h3.hndle{
323
- color:#0074A2;
324
- text-transform:uppercase;
325
- font-size: 17px;
326
- }
327
- #fm-settings a.button{
328
- border: 1px solid #A1A1A1;
329
- padding: 0px 15px;
330
- box-shadow: none;
331
- border-radius: 0;
332
- color: #000;
333
- font-weight: bold;
334
- }
335
- #fm-settings a.button:hover{
336
- border: 1px solid transparent;
337
- color: #fff;
338
- background: #0074A2;
339
- }
340
- #fm-settings input[type="text"],
341
- #fm-settings select,
342
- #fm_theme_meta input[type="text"]:not(#fm_event_location),
343
- #fm_calendar_meta input[type="text"]:not(.fm-search),
344
- #fm_calendar_meta select,
345
- #fm_event_meta input[type="text"]:not(#fm_event_date_from):not(#fm_event_date_to):not(#fm_event_location),
346
- #fm_event_meta select,
347
- #fm_event_meta #fm_event_year_month,
348
- #fm-settings .form-field input, #fm-settings input.regular-text{
349
- width:250px;
350
- border: 1px solid #A1A1A1;
351
- }
352
- #fm_event_date_from,#fm_event_date_to{
353
- border: 1px solid #A1A1A1;
354
- }
355
-
356
- #fm-settings input[type="checkbox"],
357
- #fm_event_meta input[type="checkbox"],
358
- #fm-settings input[type="radio"]{
359
- position: absolute;
360
- z-index: -1;
361
- margin: 0 !important;
362
- width: 5px !important;
363
- height: 5px !important;
364
- min-width: 5px !important;
365
- }
366
-
367
-
368
- #fm-settings .checkbox-div,
369
- #fm_event_meta .checkbox-div{
370
- width: 13px;
371
- height: 12px;
372
- background: #FDFDFD;
373
- border: 1px solid #CBCBCB;
374
- border-radius: 0px;
375
- position: relative;
376
- display: inline-block;
377
- top: 2px;
378
- margin-right: 7px;
379
- margin-left: 15px;
380
- box-sizing: content-box;
381
- -webkit-box-sizing: content-box;
382
- -moz-box-sizing: content-box;
383
- }
384
- #fm-settings .checkbox-div:first-child{
385
- margin-left: 0px;
386
- }
387
-
388
- #fm-settings .checkbox-div input[type="checkbox"]:checked + label ,
389
- #fm_event_meta .checkbox-div input[type="checkbox"]:checked + label ,
390
- #fm-settings .checkbox-div input[type="radio"]:checked + label {
391
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
392
- filter: alpha(opacity=100);
393
- opacity: 1;
394
- background: #CBCBCB;
395
- position: absolute;
396
- top: 2px;
397
- }
398
-
399
- #fm-settings input[type="submit"] {
400
- background: #0074A2;
401
- color: #ffffff;
402
- font-weight: bold;
403
- font-size: 15px;
404
- border: 0;
405
- border-radius: 0;
406
- padding: 5px 25px;
407
- height: auto;
408
- }
409
-
410
-
411
- #fm_event_meta .checkbox-div label,
412
- #fm-settings .checkbox-div label {
413
- cursor: pointer;
414
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
415
- filter: alpha(opacity=0);
416
- opacity: 0;
417
- content: "";
418
- position: absolute;
419
- width: 9px;
420
- height: 8px;
421
- background: #CBCBCB;
422
- border-radius: 0px;
423
- top: 2px;
424
- left: 2px;
425
- }
426
-
427
- #fm_calendar_meta .add_event_plus{
428
- display:inline-block;
429
- width:18px;
430
- height:18px;
431
- border-radius:100%;
432
- background:#0074A2;
433
- color:#ffffff;
434
- text-shadow:1px -1px 2px #005C82;
435
- margin-left:8px;
436
- text-align:center;
437
- font-weight: bold;
438
- font-size: 15px;
439
- line-height: 17px;
440
- }
441
- #fm_calendar_meta .fm-calendar-event-add a:focus{
442
- box-shadow:none;
443
- }
444
- #fm_event_meta .repeat_format{
445
- width: 90px;
446
- display: inline-block;
447
- }
448
- #fm_event_meta .repeat_format_monthly{
449
- width: 66px;
450
- display: inline-block;
451
- }
452
- #fm_event_meta #fm_event_year_month{
453
- margin: 10px 0 0 95px;
454
- }
455
- #fm_event_meta #fm_choose_day_container{
456
- margin-top: 10px;
457
- }
458
- #fm_event_meta #fm_choose_day_container .checkbox-div{
459
- margin-left: 0px;
460
- }
461
- #fm_event_meta .fm_repeat_advanced input[type="text"],
462
- #fm_event_meta .fm_repeat_advanced select{
463
- width: auto;
464
- }
465
-
466
- #fm_event_meta #fm_monthly,
467
- #fm_event_meta .fm_event_repeat_event_div{
468
- margin:10px 0;
469
- }
470
-
471
- #fm_event_meta .select_to_enable_disable{
472
- width:122px !important;
473
- }
474
-
475
- #fm_theme_meta label{
476
- display:inline-block;
477
- width:290px;
478
- font-weight: normal;
479
- font-size: 15px;
480
- }
481
-
482
- #fm_theme_meta .fm-tab-inner > div{
483
- margin:20px 0;
484
- }
485
- #fm_theme_meta .fm-tab-inner > div:first-child{
486
- margin-top:0;
487
- }
488
- #fm_theme_meta .with_fm_color:after,
489
- #fm-settings-content .fm-addons_updates:after,
490
- #fm-settings-content .main-plugin:after,
491
- #fm-settings-content:after{
492
- content:'';
493
- display:table;
494
- clear:both;
495
- }
496
- #fm_theme_meta .with_fm_color label{
497
- float: left;
498
- margin-top: 5px;
499
- width: 293px;
500
- }
501
- #fm_theme_meta .with_fm_color > div{
502
- float: left;
503
- }
504
- .fm-import-settings form{
505
- float:left;
506
- width:45%;
507
- }
508
- .fm-import-settings input[type=file]{
509
- margin: 10px 0;
510
- }
511
- .fm-import-settings .fm-calendar-event-import{
512
- font-size: 15px;
513
- }
514
-
515
- #fm-settings-content #add_on_title{
516
- margin-bottom:20px;
517
- }
518
-
519
- #fm-settings-content .fm_coming_soon {
520
- position: absolute;
521
- top: 44px;
522
- left: 0;
523
- }
524
- #fm-settings-content .fm-add-on a{
525
- text-decoration: none;
526
- }
527
- #fm-settings-content .fm-add-on h2{
528
- color: #229DBF;
529
- font-size: 16px;
530
- margin-bottom: 9px;
531
- padding: 0 0 7px;
532
- line-height: 1.2;
533
- }
534
- #fm-settings-content .fm-addon-descr{
535
- font-size: 13px;
536
- line-height: 18px;
537
- height: 100%;
538
- width: 53%;
539
- opacity: 0;
540
- position: absolute;
541
- top: 0;
542
- left: 0;
543
- padding: 8px 10px 10px;
544
- background: #23282D;
545
- color: #D1DDE0;
546
- -webkit-backface-visibility: hidden;
547
- -moz-backface-visibility: hidden;
548
- backface-visibility: hidden;
549
- -webkit-transform-origin: 0 0;
550
- -moz-transform-origin: 0 0;
551
- transform-origin: 0 0;
552
- -webkit-transform: rotateY(-90deg);
553
- -moz-transform: rotateY(-90deg);
554
- transform: rotateY(-90deg);
555
- -webkit-transition: -webkit-transform 0.4s, opacity 0.1s 0.3s;
556
- -moz-transition: -moz-transform 0.4s, opacity 0.1s 0.3s;
557
- transition: transform 0.4s, opacity 0.1s 0.3s;
558
- box-sizing: border-box;
559
- -webkit-box-sizing: border-box;
560
- -moz-box-sizing: border-box;
561
- }
562
- .grid figcaption {
563
- position: absolute;
564
- top: 0;
565
- left: 0;
566
- padding: 20px;
567
- background: #2c3f52;
568
- color: #ed4e6e;
569
- }
570
- #fm-settings-content .fm-addon,
571
- #fm-settings-content .fm-addon-price{
572
- display: inline-block;
573
- margin-top: 15px;
574
- font-size: 15px;
575
- border: 1px solid #DCDCDC;
576
- font-weight: bold;
577
- }
578
- #fm-settings-content .fm-addon{
579
- background: #FFFFFF url(../images/Add_Ons.jpg) no-repeat 6px center;
580
- color: #66686B;
581
- padding: 9px 12px 9px 45px;
582
- width: 100%;
583
- box-sizing: border-box;
584
- -webkit-box-sizing: border-box;
585
- -moz-box-sizing: border-box;
586
- }
587
- #fm-settings-content .fm-addon-price{
588
- background: #FFFFFF;
589
- color: #229CBF;
590
- padding: 9px 12px;
591
- }
592
- #fm-settings-content .fm-add-on:hover .fm-addon-price,
593
- #fm-settings-content .fm-addon-price:hover{
594
- background: #229CBF;
595
- color: #DDECF1;
596
- }
597
- #fm-settings-content .fm-add-on:hover .fm-addon,
598
- #fm-settings-content .fm-addon:hover{
599
- background: #23282D url(../images/Add_Ons_hover.jpg) no-repeat 6px center;
600
- color: #DDDEDE;
601
- }
602
- #fm-settings-content .fm-addon span{
603
- border-left: 1px solid #A7A9AB;
604
- padding: 4px 10px 4px 10px;
605
- }
606
- #fm-settings-content .fm-addon-descr span{
607
- padding: 5px 0 5px 10px;
608
- border-left: 1px solid #93CEE0;
609
- }
610
- #fm-settings-content a:focus{
611
- outline:none;
612
- box-shadow:none;
613
- }
614
- #fm-settings-content .fm-add-on{
615
- width:310px;
616
- float:left;
617
- margin-right:40px;
618
- margin-bottom:57px;
619
- -webkit-perspective: 1700px;
620
- -moz-perspective: 1700px;
621
- perspective: 1700px;
622
- -webkit-perspective-origin: 0 50%;
623
- -moz-perspective-origin: 0 50%;
624
- perspective-origin: 0 50%;
625
- position: relative;
626
- }
627
- #fm-settings-content .main-plugin .fm-add-on{
628
- float: left;
629
- margin-right: 25px;
630
- height: auto;
631
- }
632
- #fm-settings-content .fm-figure{
633
- -webkit-transform-style: preserve-3d;
634
- -moz-transform-style: preserve-3d;
635
- transform-style: preserve-3d;
636
- position: relative;
637
- width:100%;
638
- height: 232px;
639
- margin: 0;
640
- }
641
- #fm-settings-content .fm-figure-img{
642
- overflow: hidden;
643
- }
644
- #fm-settings-content .fm-figure-img img{
645
- -webkit-transition: -webkit-transform 0.4s;
646
- -moz-transition: -moz-transform 0.4s;
647
- transition: transform 0.4s;
648
- }
649
- #fm-settings-content .fm-figure:hover img{
650
- -webkit-transform: translateX(25%);
651
- -moz-transform: translateX(25%);
652
- -ms-transform: translateX(25%);
653
- transform: translateX(25%);
654
- }
655
- #fm-settings-content .fm-figure:hover figcaption{
656
- opacity: 1;
657
- -webkit-transform: rotateY(0deg);
658
- -moz-transform: rotateY(0deg);
659
- transform: rotateY(0deg);
660
- -webkit-transition: -webkit-transform 0.4s, opacity 0.1s;
661
- -moz-transition: -moz-transform 0.4s, opacity 0.1s;
662
- transition: transform 0.4s, opacity 0.1s;
663
- }
664
- #fm-settings-content .fm-addon-subtitle {
665
- font-size: 25px;
666
- border-bottom: 1px solid #C1C4C7;
667
- padding-bottom: 23px;
668
- }
669
- #fm-settings-content .main-plugin .main-plugin-img {
670
- float: left;
671
- margin-right: 2%;
672
- width: 26%;
673
- }
674
- #fm-settings-content .main-plugin .main-plugin-img img{
675
- max-width:100%;
676
- }
677
- #fm-settings-content .main-plugin .main-plugin-info {
678
- float: left;
679
- }
680
- #fm-settings-content .main-plugin {
681
- margin-bottom: 25px;
682
- }
683
- #fm-settings-content .main-plugin_desc-cont p,
684
- #fm-settings-content .main-plugin_desc-cont {
685
- font-size: 14px;
686
- }
687
- #fm-settings-content .main-plugin-desc-info p{
688
- margin: 2px 0 13px;
689
- }
690
- #fm-settings-content .fm-addons_updates .main-plugin-desc-info p{
691
- margin: 2px 0 4px;
692
- }
693
- #fm-settings-content .main-plugin-desc {
694
- margin-bottom: 12px;
695
- }
696
- #fm-settings-content .main-plugin-info h2 {
697
- padding: 0;
698
- line-height: 1;
699
- margin-bottom: 14px;
700
- }
701
- #fm-settings-content .main-plugin-info h2 a {
702
- color: #323A45;
703
- text-decoration: none;
704
- font-weight: bold;
705
- }
706
- #fm-settings-content .main-plugin-desc-info {
707
- border-bottom: 1px solid #C0C4C7;
708
- width: 71%;
709
- }
710
- #fm-settings-content .fm-addons_updates .main-plugin-desc-info {
711
- border-bottom: 0;
712
- width: 100%;
713
- }
714
- #fm-settings-content .update-info {
715
- background:url(../assets/updates_icon.jpg) no-repeat;
716
- padding-left:25px;
717
- color: #bc0b0b;
718
- }
719
- #fm-settings-content .fm-addons_updates .fm-figure {
720
- margin-bottom: 10px;
721
- }
722
- #fm-settings-content .fm-addons_updates .fm-addon-descr-update {
723
- border-top: 1px solid #898989;
724
- padding-top: 6px;
725
- }
726
- #fm-settings-content .fm-addons_updates h2{
727
- color: #323A45;
728
- text-decoration: none;
729
- font-weight: bold;
730
- border-bottom: 0;
731
- padding-bottom: 0;
732
- margin-bottom: 0;
733
- }
734
-
735
- .fm_more_updates {
736
- display: none;
737
  }
1
+ /**
2
+ * Admin CSS file
3
+ */
4
+ #fm-tabs > div{
5
+ display:none;
6
+ }
7
+ #fm-settings{
8
+ background: #ffffff;
9
+ padding: 15px;
10
+ }
11
+ .fm-meta-control {
12
+ margin-bottom: 15px;
13
+ }
14
+
15
+ .fm-meta-control label {
16
+ display: block;
17
+ font-weight: bold;
18
+ }
19
+
20
+ #fm-admin-promo {
21
+ background-color: #fcf8e3;
22
+ border: 1px solid #faebbe;
23
+ color: #8a6d3b;
24
+ padding: 15px;
25
+ }
26
+
27
+ #fm_event_meta .inside code {
28
+ word-break: break-all;
29
+ }
30
+
31
+ .border{
32
+ border: 1px solid red;
33
+ }
34
+
35
+ /*Spider events*/
36
+ .fm_repeat_type_list{
37
+ float: left;
38
+ width: 30%;
39
+ }
40
+ .fm_repeat_advanced{
41
+ float: left;
42
+ width: 68%;
43
+ }
44
+ #fm_choose_day_container div label{
45
+ width: 120px;
46
+ display: inline-block;
47
+ }
48
+ #fm_choose_day_container div label:after{
49
+ clear: both;
50
+ }
51
+ #fm_choose_day_container div label input{
52
+ float: right;
53
+ margin: 1px;
54
+ }
55
+ .fm_icon{
56
+ max-width: 64px;
57
+ max-height: 64px;
58
+ }
59
+
60
+ .fm-modal .fm-calendar-event,
61
+ .fm-events .fm-calendar-event{
62
+ width:47%;
63
+ display: inline-block;
64
+ margin:0 20px 10px 0;
65
+ }
66
+
67
+ .fm-events .fm-calendar-event{
68
+ width:42%;
69
+ }
70
+ .fm-modal .fm-calendar-event span:first-child,
71
+ .fm-events .fm-calendar-event span:first-child{
72
+ border: 1px solid #C8C8C8;
73
+ display: inline-block;
74
+ width: 89%;
75
+ box-sizing: border-box;
76
+ padding: 2px 2px 2px 7px;
77
+ color: #7C7C7C;
78
+ white-space: nowrap;
79
+ text-overflow: ellipsis;
80
+ overflow: hidden;
81
+ float: left;
82
+ }
83
+
84
+ .fm-events .fm-calendar-event span:first-child{
85
+ width: 81%;
86
+ }
87
+ .fm-modal .fm-calendar-event:nth-child(even){
88
+ margin-right:0;
89
+ }
90
+
91
+ .fm-events .fm-calendar-event:after{
92
+ clear: both;
93
+ }
94
+
95
+ .fm-modal .fm-calendar-event .fm-calendar-event-add,
96
+ .fm-events .fm-calendar-event-delete{
97
+ display: inline-block;
98
+ text-align: center;
99
+ float: left;
100
+ vertical-align: middle;
101
+ border-radius: 2px;
102
+ height: 24px;
103
+ width: 24px;
104
+ color: #FFFFff;
105
+ background-color: #0074A2;
106
+ cursor: pointer;
107
+ font-size: 19px;
108
+ }
109
+
110
+
111
+ .fm-events .fm-calendar-event-edit{
112
+
113
+ }
114
+ .fm-events .fm-calendar-event-edit a{
115
+ font-size: 0;
116
+ display: inline-block;
117
+ float: left;
118
+ margin: 0 1px;
119
+ border-radius: 2px;
120
+ height: 24px;
121
+ width: 24px;
122
+ background: url("../images/edit_icon.png") no-repeat center center;
123
+ }
124
+ .fm-events .fm-calendar-event-delete{
125
+ line-height: 20px;
126
+ }
127
+
128
+ .fm-calendar-event-add {
129
+ cursor: pointer;
130
+ }
131
+
132
+ .fm-modal {
133
+ position: fixed;
134
+ font-family: Arial, Helvetica, sans-serif;
135
+ overflow-y: scroll;
136
+ top: 0;
137
+ right: 0;
138
+ bottom: 0;
139
+ left: 0;
140
+ background: rgba(0, 0, 0, 0.8);
141
+ z-index: 99999;
142
+ opacity:0;
143
+ -webkit-transition: opacity 400ms ease-in;
144
+ -moz-transition: opacity 400ms ease-in;
145
+ transition: opacity 400ms ease-in;
146
+ pointer-events: none;
147
+ }
148
+ .fm-modal:target {
149
+ opacity:1;
150
+ pointer-events: auto;
151
+ }
152
+ .fm-modal > div.fm-excluded-events {
153
+ width: 500px !important;
154
+ position: relative;
155
+ margin: 10% auto;
156
+ padding: 0px 20px 16px 20px !important;
157
+ border-radius: 1px;
158
+ background: #fff;
159
+ }
160
+ .fm-modal > div.fm-preview {
161
+ position: relative;
162
+ margin: 5%;
163
+ padding: 5px 20px 13px 20px;
164
+ border-radius: 1px;
165
+ background: #fff;
166
+ min-width:600px;
167
+ }
168
+
169
+ .fm-close {
170
+ background: url(../images/close.png);
171
+ display: inline-block;
172
+ position: absolute;
173
+ right: 0px;
174
+ height: 29px;
175
+ top: 0px;
176
+ width: 29px;
177
+ text-decoration: none;
178
+ z-index: 4;
179
+ }
180
+
181
+ .fm-excluded-events h2{
182
+ margin: 15px 0;
183
+ padding-bottom: 15px !important;
184
+ border-bottom: 1px solid #B2B2B2;
185
+ }
186
+
187
+ .wd_stay_active {
188
+ background: none repeat scroll 0% 0% green !important;
189
+ box-shadow: 0px 1px 3px 0px #178FE5 inset !important;
190
+ color: #FFF !important;
191
+ font-weight: 700 !important;
192
+ }
193
+ #fm_event_pickup_date, #fm_event_pickup_time {
194
+ height: 27px;
195
+ border: 1px solid #A1A1A1;
196
+ border-radius: 0;
197
+ font-size: 13px;
198
+ color: #444444;
199
+ padding: 0 5px 0 27px;
200
+ margin-top: 1px;
201
+ }
202
+
203
+ #fm_event_pickup_date {
204
+ background:url(../images/admin_day.jpg) no-repeat left;
205
+ margin: 1px 8px;
206
+ }
207
+ #fm_event_pickup_time {
208
+ background:url(../images/admin_time.jpg) no-repeat left;
209
+ }
210
+
211
+ /*TABS*/
212
+ #fm-tabs, #fm-tabs div{
213
+ background: none #ffffff;
214
+ border: 0;
215
+ }
216
+ .fm-tabs{
217
+ list-style-type: none;
218
+ }
219
+ .fm-tabs li,
220
+ #fm-settings-content .nav-tab-wrapper a{
221
+ display: inline-block;
222
+ border: 1px solid #A5A5A5;
223
+ }
224
+ .fm-tabs li a,
225
+ #fm-settings-content .nav-tab-wrapper a{
226
+ display: table-cell;
227
+ text-align: center;
228
+ width: 100px;
229
+ height: 30px;
230
+ vertical-align: middle;
231
+ text-decoration:none;
232
+ color:#5E5E5E;
233
+ font-size: 16px;
234
+ }
235
+
236
+ #fm-settings-content .nav-tab-wrapper a{
237
+ background: #ffffff;
238
+ height: 21px;
239
+ margin-right: 4px;
240
+ display: inline-block;
241
+ font-weight: normal;
242
+ padding-top: 2px;
243
+ }
244
+
245
+ .fm-tabs li a:focus{
246
+ box-shadow:none;
247
+ }
248
+ .fm-tabs li:hover a,.fm-tabs li.ui-state-active a,
249
+ #fm-settings-content .nav-tab-wrapper a:hover,#fm-settings-content .nav-tab-wrapper a.nav-tab-active{
250
+ color:#ffffff;
251
+ background: #0074A2;
252
+ }
253
+
254
+ #fm-settings-content .nav-tab-wrapper {
255
+ border-bottom:0;
256
+ padding-left: 0;
257
+ }
258
+
259
+ .fm-tabs li:hover,.fm-tabs li.ui-state-active,
260
+ #fm-settings-content .nav-tab-wrapper a.nav-tab-active{
261
+ border: 1px solid transparent;
262
+ }
263
+
264
+ .fm-tab-inner{
265
+ padding: 15px;
266
+ }
267
+
268
+ /*Preview */
269
+ .ui-selecting { background: #FECA40 !important; }
270
+ .ui-selected { background: #F39814 !important;}
271
+
272
+ .event_cal_add {
273
+ width: 350px;
274
+ height: 130px;
275
+ padding: 40px 20px 0;
276
+ border: 1px solid #cccccc;
277
+ position: absolute;
278
+ z-index: 9999;
279
+ background: #ffffff;
280
+ }
281
+ .event_cal_add .close{
282
+ display: block;
283
+ line-height: 18px;
284
+ width: 20px;
285
+ font-size: 8pt;
286
+ margin-top: 1px;
287
+ margin-right: 1px;
288
+ position: absolute;
289
+ font-family: tahoma;
290
+ text-align: center;
291
+ top: 0;
292
+ right: 0;
293
+ cursor: pointer;
294
+ background-size: contain;
295
+ height: 20px;
296
+ }
297
+
298
+ .event_cal_add .add_event_to_cal{
299
+ display: block;
300
+ cursor: pointer;
301
+ padding-bottom: 10px;
302
+ margin: 25px 0 0 0;
303
+ width: 78px;
304
+ text-align: center;
305
+ line-height: 30px;
306
+ height: 20px;
307
+ background: #e3e3e3;
308
+ border: 1px solid #eeeeee;
309
+ }
310
+ .event_cal_add .fm_notification{
311
+ display: block;
312
+ height: 20px;
313
+ margin: 25px 0 0 0;
314
+ }
315
+ span.fm_error{
316
+ color: #bc0b0b;
317
+ display: block;
318
+ padding-left: 36px;
319
+ height: 20px;
320
+
321
+ }
322
+ #fm_calendar_meta h3.hndle{
323
+ color:#0074A2;
324
+ text-transform:uppercase;
325
+ font-size: 17px;
326
+ }
327
+ #fm-settings a.button{
328
+ border: 1px solid #A1A1A1;
329
+ padding: 0px 15px;
330
+ box-shadow: none;
331
+ border-radius: 0;
332
+ color: #000;
333
+ font-weight: bold;
334
+ }
335
+ #fm-settings a.button:hover{
336
+ border: 1px solid transparent;
337
+ color: #fff;
338
+ background: #0074A2;
339
+ }
340
+ #fm-settings input[type="text"],
341
+ #fm-settings select,
342
+ #fm_theme_meta input[type="text"]:not(#fm_event_location),
343
+ #fm_calendar_meta input[type="text"]:not(.fm-search),
344
+ #fm_calendar_meta select,
345
+ #fm_event_meta input[type="text"]:not(#fm_event_date_from):not(#fm_event_date_to):not(#fm_event_location),
346
+ #fm_event_meta select,
347
+ #fm_event_meta #fm_event_year_month,
348
+ #fm-settings .form-field input, #fm-settings input.regular-text{
349
+ width:250px;
350
+ border: 1px solid #A1A1A1;
351
+ }
352
+ #fm_event_date_from,#fm_event_date_to{
353
+ border: 1px solid #A1A1A1;
354
+ }
355
+
356
+ #fm-settings input[type="checkbox"],
357
+ #fm_event_meta input[type="checkbox"],
358
+ #fm-settings input[type="radio"]{
359
+ position: absolute;
360
+ z-index: -1;
361
+ margin: 0 !important;
362
+ width: 5px !important;
363
+ height: 5px !important;
364
+ min-width: 5px !important;
365
+ }
366
+
367
+
368
+ #fm-settings .checkbox-div,
369
+ #fm_event_meta .checkbox-div{
370
+ width: 13px;
371
+ height: 12px;
372
+ background: #FDFDFD;
373
+ border: 1px solid #CBCBCB;
374
+ border-radius: 0px;
375
+ position: relative;
376
+ display: inline-block;
377
+ top: 2px;
378
+ margin-right: 7px;
379
+ margin-left: 15px;
380
+ box-sizing: content-box;
381
+ -webkit-box-sizing: content-box;
382
+ -moz-box-sizing: content-box;
383
+ }
384
+ #fm-settings .checkbox-div:first-child{
385
+ margin-left: 0px;
386
+ }
387
+
388
+ #fm-settings .checkbox-div input[type="checkbox"]:checked + label ,
389
+ #fm_event_meta .checkbox-div input[type="checkbox"]:checked + label ,
390
+ #fm-settings .checkbox-div input[type="radio"]:checked + label {
391
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
392
+ filter: alpha(opacity=100);
393
+ opacity: 1;
394
+ background: #CBCBCB;
395
+ position: absolute;
396
+ top: 2px;
397
+ }
398
+
399
+ #fm-settings input[type="submit"] {
400
+ background: #0074A2;
401
+ color: #ffffff;
402
+ font-weight: bold;
403
+ font-size: 15px;
404
+ border: 0;
405
+ border-radius: 0;
406
+ padding: 5px 25px;
407
+ height: auto;
408
+ }
409
+
410
+
411
+ #fm_event_meta .checkbox-div label,
412
+ #fm-settings .checkbox-div label {
413
+ cursor: pointer;
414
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
415
+ filter: alpha(opacity=0);
416
+ opacity: 0;
417
+ content: "";
418
+ position: absolute;
419
+ width: 9px;
420
+ height: 8px;
421
+ background: #CBCBCB;
422
+ border-radius: 0px;
423
+ top: 2px;
424
+ left: 2px;
425
+ }
426
+
427
+ #fm_calendar_meta .add_event_plus{
428
+ display:inline-block;
429
+ width:18px;
430
+ height:18px;
431
+ border-radius:100%;
432
+ background:#0074A2;
433
+ color:#ffffff;
434
+ text-shadow:1px -1px 2px #005C82;
435
+ margin-left:8px;
436
+ text-align:center;
437
+ font-weight: bold;
438
+ font-size: 15px;
439
+ line-height: 17px;
440
+ }
441
+ #fm_calendar_meta .fm-calendar-event-add a:focus{
442
+ box-shadow:none;
443
+ }
444
+ #fm_event_meta .repeat_format{
445
+ width: 90px;
446
+ display: inline-block;
447
+ }
448
+ #fm_event_meta .repeat_format_monthly{
449
+ width: 66px;
450
+ display: inline-block;
451
+ }
452
+ #fm_event_meta #fm_event_year_month{
453
+ margin: 10px 0 0 95px;
454
+ }
455
+ #fm_event_meta #fm_choose_day_container{
456
+ margin-top: 10px;
457
+ }
458
+ #fm_event_meta #fm_choose_day_container .checkbox-div{
459
+ margin-left: 0px;
460
+ }
461
+ #fm_event_meta .fm_repeat_advanced input[type="text"],
462
+ #fm_event_meta .fm_repeat_advanced select{
463
+ width: auto;
464
+ }
465
+
466
+ #fm_event_meta #fm_monthly,
467
+ #fm_event_meta .fm_event_repeat_event_div{
468
+ margin:10px 0;
469
+ }
470
+
471
+ #fm_event_meta .select_to_enable_disable{
472
+ width:122px !important;
473
+ }
474
+
475
+ #fm_theme_meta label{
476
+ display:inline-block;
477
+ width:290px;
478
+ font-weight: normal;
479
+ font-size: 15px;
480
+ }
481
+
482
+ #fm_theme_meta .fm-tab-inner > div{
483
+ margin:20px 0;
484
+ }
485
+ #fm_theme_meta .fm-tab-inner > div:first-child{
486
+ margin-top:0;
487
+ }
488
+ #fm_theme_meta .with_fm_color:after,
489
+ #fm-settings-content .fm-addons_updates:after,
490
+ #fm-settings-content .main-plugin:after,
491
+ #fm-settings-content:after{
492
+ content:'';
493
+ display:table;
494
+ clear:both;
495
+ }
496
+ #fm_theme_meta .with_fm_color label{
497
+ float: left;
498
+ margin-top: 5px;
499
+ width: 293px;
500
+ }
501
+ #fm_theme_meta .with_fm_color > div{
502
+ float: left;
503
+ }
504
+ .fm-import-settings form{
505
+ float:left;
506
+ width:45%;
507
+ }
508
+ .fm-import-settings input[type=file]{
509
+ margin: 10px 0;
510
+ }
511
+ .fm-import-settings .fm-calendar-event-import{
512
+ font-size: 15px;
513
+ }
514
+
515
+ #fm-settings-content #add_on_title{
516
+ margin-bottom:20px;
517
+ }
518
+
519
+ #fm-settings-content .fm_coming_soon {
520
+ position: absolute;
521
+ top: 44px;
522
+ left: 0;
523
+ }
524
+ #fm-settings-content .fm-add-on a{
525
+ text-decoration: none;
526
+ }
527
+ #fm-settings-content .fm-add-on h2{
528
+ color: #229DBF;
529
+ font-size: 16px;
530
+ margin-bottom: 9px;
531
+ padding: 0 0 7px;
532
+ line-height: 1.2;
533
+ }
534
+ #fm-settings-content .fm-addon-descr{
535
+ font-size: 13px;
536
+ line-height: 18px;
537
+ height: 100%;
538
+ width: 53%;
539
+ opacity: 0;
540
+ position: absolute;
541
+ top: 0;
542
+ left: 0;
543
+ padding: 8px 10px 10px;
544
+ background: #23282D;
545
+ color: #D1DDE0;
546
+ -webkit-backface-visibility: hidden;
547
+ -moz-backface-visibility: hidden;
548
+ backface-visibility: hidden;
549
+ -webkit-transform-origin: 0 0;
550
+ -moz-transform-origin: 0 0;
551
+ transform-origin: 0 0;
552
+ -webkit-transform: rotateY(-90deg);
553
+ -moz-transform: rotateY(-90deg);
554
+ transform: rotateY(-90deg);
555
+ -webkit-transition: -webkit-transform 0.4s, opacity 0.1s 0.3s;
556
+ -moz-transition: -moz-transform 0.4s, opacity 0.1s 0.3s;
557
+ transition: transform 0.4s, opacity 0.1s 0.3s;
558
+ box-sizing: border-box;
559
+ -webkit-box-sizing: border-box;
560
+ -moz-box-sizing: border-box;
561
+ }
562
+ .grid figcaption {
563
+ position: absolute;
564
+ top: 0;
565
+ left: 0;
566
+ padding: 20px;
567
+ background: #2c3f52;
568
+ color: #ed4e6e;
569
+ }
570
+ #fm-settings-content .fm-addon,
571
+ #fm-settings-content .fm-addon-price{
572
+ display: inline-block;
573
+ margin-top: 15px;
574
+ font-size: 15px;
575
+ border: 1px solid #DCDCDC;
576
+ font-weight: bold;
577
+ }
578
+ #fm-settings-content .fm-addon{
579
+ background: #FFFFFF url(../images/Add_Ons.jpg) no-repeat 6px center;
580
+ color: #66686B;
581
+ padding: 9px 12px 9px 45px;
582
+ width: 100%;
583
+ box-sizing: border-box;
584
+ -webkit-box-sizing: border-box;
585
+ -moz-box-sizing: border-box;
586
+ }
587
+ #fm-settings-content .fm-addon-price{
588
+ background: #FFFFFF;
589
+ color: #229CBF;
590
+ padding: 9px 12px;
591
+ }
592
+ #fm-settings-content .fm-add-on:hover .fm-addon-price,
593
+ #fm-settings-content .fm-addon-price:hover{
594
+ background: #229CBF;
595
+ color: #DDECF1;
596
+ }
597
+ #fm-settings-content .fm-add-on:hover .fm-addon,
598
+ #fm-settings-content .fm-addon:hover{
599
+ background: #23282D url(../images/Add_Ons_hover.jpg) no-repeat 6px center;
600
+ color: #DDDEDE;
601
+ }
602
+ #fm-settings-content .fm-addon span{
603
+ border-left: 1px solid #A7A9AB;
604
+ padding: 4px 10px 4px 10px;
605
+ }
606
+ #fm-settings-content .fm-addon-descr span{
607
+ padding: 5px 0 5px 10px;
608
+ border-left: 1px solid #93CEE0;
609
+ }
610
+ #fm-settings-content a:focus{
611
+ outline:none;
612
+ box-shadow:none;
613
+ }
614
+ #fm-settings-content .fm-add-on{
615
+ width:310px;
616
+ float:left;
617
+ margin-right:40px;
618
+ margin-bottom:57px;
619
+ -webkit-perspective: 1700px;
620
+ -moz-perspective: 1700px;
621
+ perspective: 1700px;
622
+ -webkit-perspective-origin: 0 50%;
623
+ -moz-perspective-origin: 0 50%;
624
+ perspective-origin: 0 50%;
625
+ position: relative;
626
+ }
627
+ #fm-settings-content .main-plugin .fm-add-on{
628
+ float: left;
629
+ margin-right: 25px;
630
+ height: auto;
631
+ }
632
+ #fm-settings-content .fm-figure{
633
+ -webkit-transform-style: preserve-3d;
634
+ -moz-transform-style: preserve-3d;
635
+ transform-style: preserve-3d;
636
+ position: relative;
637
+ width:100%;
638
+ height: 232px;
639
+ margin: 0;
640
+ }
641
+ #fm-settings-content .fm-figure-img{
642
+ overflow: hidden;
643
+ }
644
+ #fm-settings-content .fm-figure-img img{
645
+ -webkit-transition: -webkit-transform 0.4s;
646
+ -moz-transition: -moz-transform 0.4s;
647
+ transition: transform 0.4s;
648
+ }
649
+ #fm-settings-content .fm-figure:hover img{
650
+ -webkit-transform: translateX(25%);
651
+ -moz-transform: translateX(25%);
652
+ -ms-transform: translateX(25%);
653
+ transform: translateX(25%);
654
+ }
655
+ #fm-settings-content .fm-figure:hover figcaption{
656
+ opacity: 1;
657
+ -webkit-transform: rotateY(0deg);
658
+ -moz-transform: rotateY(0deg);
659
+ transform: rotateY(0deg);
660
+ -webkit-transition: -webkit-transform 0.4s, opacity 0.1s;
661
+ -moz-transition: -moz-transform 0.4s, opacity 0.1s;
662
+ transition: transform 0.4s, opacity 0.1s;
663
+ }
664
+ #fm-settings-content .fm-addon-subtitle {
665
+ font-size: 25px;
666
+ border-bottom: 1px solid #C1C4C7;
667
+ padding-bottom: 23px;
668
+ }
669
+ #fm-settings-content .main-plugin .main-plugin-img {
670
+ float: left;
671
+ margin-right: 2%;
672
+ width: 26%;
673
+ }
674
+ #fm-settings-content .main-plugin .main-plugin-img img{
675
+ max-width:100%;
676
+ }
677
+ #fm-settings-content .main-plugin .main-plugin-info {
678
+ float: left;
679
+ }
680
+ #fm-settings-content .main-plugin {
681
+ margin-bottom: 25px;
682
+ }
683
+ #fm-settings-content .main-plugin_desc-cont p,
684
+ #fm-settings-content .main-plugin_desc-cont {
685
+ font-size: 14px;
686
+ }
687
+ #fm-settings-content .main-plugin-desc-info p{
688
+ margin: 2px 0 13px;
689
+ }
690
+ #fm-settings-content .fm-addons_updates .main-plugin-desc-info p{
691
+ margin: 2px 0 4px;
692
+ }
693
+ #fm-settings-content .main-plugin-desc {
694
+ margin-bottom: 12px;
695
+ }
696
+ #fm-settings-content .main-plugin-info h2 {
697
+ padding: 0;
698
+ line-height: 1;
699
+ margin-bottom: 14px;
700
+ }
701
+ #fm-settings-content .main-plugin-info h2 a {
702
+ color: #323A45;
703
+ text-decoration: none;
704
+ font-weight: bold;
705
+ }
706
+ #fm-settings-content .main-plugin-desc-info {
707
+ border-bottom: 1px solid #C0C4C7;
708
+ width: 71%;
709
+ }
710
+ #fm-settings-content .fm-addons_updates .main-plugin-desc-info {
711
+ border-bottom: 0;
712
+ width: 100%;
713
+ }
714
+ #fm-settings-content .update-info {
715
+ background:url(../assets/updates_icon.jpg) no-repeat;
716
+ padding-left:25px;
717
+ color: #bc0b0b;
718
+ }
719
+ #fm-settings-content .fm-addons_updates .fm-figure {
720
+ margin-bottom: 10px;
721
+ }
722
+ #fm-settings-content .fm-addons_updates .fm-addon-descr-update {
723
+ border-top: 1px solid #898989;
724
+ padding-top: 6px;
725
+ }
726
+ #fm-settings-content .fm-addons_updates h2{
727
+ color: #323A45;
728
+ text-decoration: none;
729
+ font-weight: bold;
730
+ border-bottom: 0;
731
+ padding-bottom: 0;
732
+ margin-bottom: 0;
733
+ }
734
+
735
+ .fm_more_updates {
736
+ display: none;
737
  }
featured/featured_themes.css CHANGED
@@ -1,178 +1,178 @@
1
- @import url(https://fonts.googleapis.com/css?family=Oswald);
2
-
3
- #main_featured_themes_page #featured-themes-list {
4
- position:relative;
5
- margin:0px auto;
6
- height:auto;
7
- display:table;
8
- list-style:none;
9
- text-align: center;
10
- width: 100%;
11
- }
12
- #main_featured_themes_page #featured-themes-list li {
13
- display: inline-table;
14
- width: 300px;
15
- margin: 20px 10px 0px 10px;
16
- background: #FFFFFF;
17
- border-right: 3px solid #E5E5E5;
18
- border-bottom: 3px solid #E5E5E5;
19
- position: relative;
20
- }
21
- @media screen and (min-width: 1600px) {
22
- #main_featured_themes_page #featured-themes-list li {
23
- width:400px;
24
- }
25
-
26
- }
27
- #main_featured_themes_page .theme_img img {
28
- max-width: 100%;
29
- }
30
- #main_featured_themes_page .theme_img {
31
- display: inline-block;
32
- overflow: hidden;
33
- outline: 1px solid #D6D1D1;
34
- position:relative;
35
- /*height: 168px; */
36
- }
37
- #main_featured_themes_page #featured-themes-list li .title {
38
- width: 91%;
39
- text-align: center;
40
- margin: 0 auto;
41
- }
42
- #main_featured_themes_page {
43
- font-family: Oswald;
44
- }
45
- #main_featured_themes_page #featured-themes-list li .title .heading {
46
- display: block;
47
- position: relative;
48
- font-size: 17px;
49
- color: #666666;
50
- margin: 13px 0px 13px 0px;
51
- text-transform: uppercase;
52
- }
53
- #main_featured_themes_page #featured-themes-list li .title p {
54
- font-size:14px;
55
- color:#444;
56
- margin-left:20px;
57
- }
58
- #main_featured_themes_page #featured-themes-list li .description {
59
- height:130px;
60
- width: 90%;
61
- margin: 0 auto;
62
- }
63
- #main_featured_themes_page #featured-themes-list li .description p {
64
- text-align: center;
65
- width: 100%;
66
- color: #666666;
67
- font-family: "Open Sans",sans-serif;
68
- font-size: 14px;
69
- }
70
- #main_featured_themes_page #featured-themes-list li .links {
71
- border-top: 1px solid #d8d8d8;
72
- width: 90%;
73
- margin: 0 auto;
74
- font-size: 14px;
75
- line-height: 40px;
76
- font-weight: bolder;
77
- text-align: center;
78
- padding-top: 9px;
79
- padding-bottom: 12px;
80
- }
81
- #main_featured_themes_page .page_header h1 {
82
- margin: 0px;
83
- font-family: Segoe UI;
84
- padding-bottom: 15px;
85
- color: rgb(111, 111, 111);
86
- font-size: 24px;
87
- text-align:center;
88
- }
89
- #main_featured_themes_page .page_header {
90
- height: 40px;
91
- padding: 22px 0px 0px 0px;
92
- margin-bottom: 15px;
93
- /*border-bottom: rgb(111, 111, 111) solid 1px;*/
94
- }
95
- #main_featured_themes_page #featured-themes-list li a {
96
- outline: none;
97
- line-height: 29px;
98
- text-decoration: none;
99
- color: #134d68;
100
- font-family: "Open Sans",sans-serif;
101
- text-shadow: 1px 0;
102
- display: inline-block;
103
- font-size: 15px;
104
- }
105
- #main_featured_themes_page #featured-themes-list li a.demo {
106
- color: #ffffff;
107
- background: #F47629;
108
- border-radius: 3px;
109
- width: 76px;
110
- text-align:center;
111
- margin-right: 12px;
112
- }
113
- #main_featured_themes_page .featured_header{
114
- background: #11465F;
115
- border-right: 3px solid #E5E5E5;
116
- border-bottom: 3px solid #E5E5E5;
117
- position: relative;
118
- padding: 20px 0;
119
- }
120
- #main_featured_themes_page .featured_header .try-now {
121
- text-align: center;
122
- }
123
- #main_featured_themes_page .featured_header .try-now span {
124
- display: inline-block;
125
- padding: 7px 16px;
126
- background: #F47629;
127
- border-radius: 10px;
128
- color: #ffffff;
129
- font-size: 23px;
130
- }
131
- #main_featured_themes_page .featured_container {
132
- position: relative;
133
- width: 90%;
134
- margin: 15px auto 0px auto;
135
- }
136
- #main_featured_themes_page .featured_container .old_price{
137
- color: rgba(180, 180, 180, 0.3);
138
- text-decoration: line-through;
139
- font-family: Oswald;
140
- }
141
- #main_featured_themes_page .featured_container .get_themes{
142
- color: #FFFFFF;
143
- height: 85px;
144
- margin: 0;
145
- background-size: 95% 100%;
146
- background-position: center;
147
- line-height: 60px;
148
- font-size: 45px;
149
- text-align: center;
150
- letter-spacing: 3px;
151
- }
152
- #main_featured_themes_page .featured_header h1{
153
- font-size: 45px;
154
- text-align: center;
155
- color: #ffffff;
156
- letter-spacing: 3px;
157
- line-height: 10px;
158
- }
159
- #main_featured_themes_page .featured_header a{
160
- text-decoration: none;
161
- }
162
- @media screen and (max-width: 1035px) {
163
- #main_featured_themes_page .featured_header h1{
164
- font-size: 37px;
165
- line-height: 0;
166
- }
167
- }
168
- @media screen and (max-width: 835px) {
169
- #main_featured_themes_page .get_themes span{
170
- display: none;
171
- }
172
- }
173
- @media screen and (max-width: 435px) {
174
- #main_featured_themes_page .featured_header h1 {
175
- font-size: 20px;
176
- line-height: 17px;
177
- }
178
  }
1
+ @import url(https://fonts.googleapis.com/css?family=Oswald);
2
+
3
+ #main_featured_themes_page #featured-themes-list {
4
+ position:relative;
5
+ margin:0px auto;
6
+ height:auto;
7
+ display:table;
8
+ list-style:none;
9
+ text-align: center;
10
+ width: 100%;
11
+ }
12
+ #main_featured_themes_page #featured-themes-list li {
13
+ display: inline-table;
14
+ width: 300px;
15
+ margin: 20px 10px 0px 10px;
16
+ background: #FFFFFF;
17
+ border-right: 3px solid #E5E5E5;
18
+ border-bottom: 3px solid #E5E5E5;
19
+ position: relative;
20
+ }
21
+ @media screen and (min-width: 1600px) {
22
+ #main_featured_themes_page #featured-themes-list li {
23
+ width:400px;
24
+ }
25
+
26
+ }
27
+ #main_featured_themes_page .theme_img img {
28
+ max-width: 100%;
29
+ }
30
+ #main_featured_themes_page .theme_img {
31
+ display: inline-block;
32
+ overflow: hidden;
33
+ outline: 1px solid #D6D1D1;
34
+ position:relative;
35
+ /*height: 168px; */
36
+ }
37
+ #main_featured_themes_page #featured-themes-list li .title {
38
+ width: 91%;
39
+ text-align: center;
40
+ margin: 0 auto;
41
+ }
42
+ #main_featured_themes_page {
43
+ font-family: Oswald;
44
+ }
45
+ #main_featured_themes_page #featured-themes-list li .title .heading {
46
+ display: block;
47
+ position: relative;
48
+ font-size: 17px;
49
+ color: #666666;
50
+ margin: 13px 0px 13px 0px;
51
+ text-transform: uppercase;
52
+ }
53
+ #main_featured_themes_page #featured-themes-list li .title p {
54
+ font-size:14px;
55
+ color:#444;
56
+ margin-left:20px;
57
+ }
58
+ #main_featured_themes_page #featured-themes-list li .description {
59
+ height:130px;
60
+ width: 90%;
61
+ margin: 0 auto;
62
+ }
63
+ #main_featured_themes_page #featured-themes-list li .description p {
64
+ text-align: center;
65
+ width: 100%;
66
+ color: #666666;
67
+ font-family: "Open Sans",sans-serif;
68
+ font-size: 14px;
69
+ }
70
+ #main_featured_themes_page #featured-themes-list li .links {
71
+ border-top: 1px solid #d8d8d8;
72
+ width: 90%;
73
+ margin: 0 auto;
74
+ font-size: 14px;
75
+ line-height: 40px;
76
+ font-weight: bolder;
77
+ text-align: center;
78
+ padding-top: 9px;
79
+ padding-bottom: 12px;
80
+ }
81
+ #main_featured_themes_page .page_header h1 {
82
+ margin: 0px;
83
+ font-family: Segoe UI;
84
+ padding-bottom: 15px;
85
+ color: rgb(111, 111, 111);
86
+ font-size: 24px;
87
+ text-align:center;
88
+ }
89
+ #main_featured_themes_page .page_header {
90
+ height: 40px;
91
+ padding: 22px 0px 0px 0px;
92
+ margin-bottom: 15px;
93
+ /*border-bottom: rgb(111, 111, 111) solid 1px;*/
94
+ }
95
+ #main_featured_themes_page #featured-themes-list li a {
96
+ outline: none;
97
+ line-height: 29px;
98
+ text-decoration: none;
99
+ color: #134d68;
100
+ font-family: "Open Sans",sans-serif;
101
+ text-shadow: 1px 0;
102
+ display: inline-block;
103
+ font-size: 15px;
104
+ }
105
+ #main_featured_themes_page #featured-themes-list li a.demo {
106
+ color: #ffffff;
107
+ background: #F47629;
108
+ border-radius: 3px;
109
+ width: 76px;
110
+ text-align:center;
111
+ margin-right: 12px;
112
+ }
113
+ #main_featured_themes_page .featured_header{
114
+ background: #11465F;
115
+ border-right: 3px solid #E5E5E5;
116
+ border-bottom: 3px solid #E5E5E5;
117
+ position: relative;
118
+ padding: 20px 0;
119
+ }
120
+ #main_featured_themes_page .featured_header .try-now {
121
+ text-align: center;
122
+ }
123
+ #main_featured_themes_page .featured_header .try-now span {
124
+ display: inline-block;
125
+ padding: 7px 16px;
126
+ background: #F47629;
127
+ border-radius: 10px;
128
+ color: #ffffff;
129
+ font-size: 23px;
130
+ }
131
+ #main_featured_themes_page .featured_container {
132
+ position: relative;
133
+ width: 90%;
134
+ margin: 15px auto 0px auto;
135
+ }
136
+ #main_featured_themes_page .featured_container .old_price{
137
+ color: rgba(180, 180, 180, 0.3);
138
+ text-decoration: line-through;
139
+ font-family: Oswald;
140
+ }
141
+ #main_featured_themes_page .featured_container .get_themes{
142
+ color: #FFFFFF;
143
+ height: 85px;
144
+ margin: 0;
145
+ background-size: 95% 100%;
146
+ background-position: center;
147
+ line-height: 60px;
148
+ font-size: 45px;
149
+ text-align: center;
150
+ letter-spacing: 3px;
151
+ }
152
+ #main_featured_themes_page .featured_header h1{
153
+ font-size: 45px;
154
+ text-align: center;
155
+ color: #ffffff;
156
+ letter-spacing: 3px;
157
+ line-height: 10px;
158
+ }
159
+ #main_featured_themes_page .featured_header a{
160
+ text-decoration: none;
161
+ }
162
+ @media screen and (max-width: 1035px) {
163
+ #main_featured_themes_page .featured_header h1{
164
+ font-size: 37px;
165
+ line-height: 0;
166
+ }
167
+ }
168
+ @media screen and (max-width: 835px) {
169
+ #main_featured_themes_page .get_themes span{
170
+ display: none;
171
+ }
172
+ }
173
+ @media screen and (max-width: 435px) {
174
+ #main_featured_themes_page .featured_header h1 {
175
+ font-size: 20px;
176
+ line-height: 17px;
177
+ }
178
  }
featured/featured_themes.php CHANGED
@@ -1,104 +1,104 @@
1
- <?php
2
- function fm_featured_themes_page() {
3
-
4
- $slug = 'formmaker';
5
- $image_url = WD_FM_URL . "/featured/images/";
6
- $demo_url = 'http://themedemo.web-dorado.com/';
7
- $site_url = 'https://web-dorado.com/wordpress-themes/';
8
-
9
-
10
- $WDWThemes = array(
11
- "business_elite" => array(
12
- "title" => "Business Elite",
13
- "description" =>"Business Elite is a robust parallax theme for business websites. The theme uses smooth transitions and many functional sections.",
14
- "link" => "business-elite.html",
15
- "demo" => "theme-businesselite",
16
- "image" => "business_elite.jpg"
17
- ),
18
- "portfolio" => array(
19
- "title" => "Portfolio Gallery",
20
- "description" =>"Portfolio Gallery helps to display images using various color schemes and layouts combined with elegant fonts and content parts.",
21
- "link" => "portfolio-gallery.html",
22
- "demo" => "theme-portfoliogallery",
23
- "image" => "portfolio_gallery.jpg"
24
- ),
25
- "sauron" => array(
26
- "title" => "Sauron",
27
- "description" =>"Sauron is a multipurpose parallax theme, which uses multiple interactive sections designed for the client-engagement.",
28
- "link" => "sauron.html",
29
- "demo" => "theme-sauron",
30
- "image" => "sauron.jpg"
31
- ),
32
- "business_world" => array(
33
- "title" => "Business World",
34
- "description" => "Business World is an innovative WordPress theme great for Business websites.",
35
- "link" => "business-world.html",
36
- "demo" => "theme-businessworld",
37
- "image" => "business_world.jpg"
38
- ),
39
- "best_magazine" => array(
40
- "title" => "Best Magazine",
41
- "description" =>"Best Magazine is an ultimate selection when you are dealing with multi-category news websites.",
42
- "link" => "best-magazine.html",
43
- "demo" => "theme-bestmagazine",
44
- "image" => "best_magazine.jpg"
45
- ),
46
- "magazine" => array(
47
- "title" => "News Magazine",
48
- "description" =>"Magazine theme is a perfect solution when creating news and informational websites. It comes with a wide range of layout options.",
49
- "link" => "news-magazine.html",
50
- "demo" => "theme-newsmagazine",
51
- "image" => "news_magazine.jpg"
52
- )
53
- );
54
- ?>
55
-
56
- <style>
57
-
58
- #main_featured_themes_page #featured-themes-list li a.download {
59
- padding-right: 30px;
60
- background:url(<?php echo $image_url; ?>down.png) no-repeat right;
61
- }
62
-
63
- </style>
64
-
65
-
66
- <div id="main_featured_themes_page">
67
- <div class="featured_container">
68
- <div class="page_header">
69
- <h1><?php echo "Featured Themes"; ?></h1>
70
- </div>
71
- <div class="featured_header">
72
- <a target="_blank" href="https://web-dorado.com/wordpress-themes.html?source=<?php echo $slug; ?>">
73
- <h1><?php echo "WORDPRESS THEMES"; ?></h1>
74
- <h2 class="get_themes"><?php echo "ALL FOR $40 ONLY "; ?><span>- <?php echo "SAVE 80%"; ?></span></h2>
75
- <div class="try-now">
76
- <span><?php echo "TRY NOW"; ?></span>
77
- </div>
78
- </a>
79
- </div>
80
- <ul id="featured-themes-list">
81
- <?php foreach($WDWThemes as $key=>$WDWTheme) : ?>
82
- <li class="<?php echo $key; ?>">
83
- <div class="theme_img">
84
- <img src="<?php echo $image_url . $WDWTheme["image"]; ?>">
85
- </div>
86
- <div class="title">
87
- <h3 class="heading"><?php echo $WDWTheme["title"]; ?></h3>
88
- </div>
89
- <div class="description">
90
- <p><?php echo $WDWTheme["description"]; ?></p>
91
- </div>
92
- <div class="links">
93
- <a target="_blank" href="<?php echo $demo_url . $WDWTheme["demo"]."?source=".$slug; ?>" class="demo"><?php echo "Demo"; ?></a>
94
- <a target="_blank" href="<?php echo $site_url . $WDWTheme["link"]."?source=".$slug; ?>" class="download"><?php echo "Free Download"; ?></a>
95
- </div>
96
- </li>
97
- <?php endforeach; ?>
98
- </ul>
99
- </div>
100
- </div>
101
-
102
-
103
- <?php }
104
- ?>
1
+ <?php
2
+ function fm_featured_themes_page() {
3
+
4
+ $slug = 'formmaker';
5
+ $image_url = WD_FM_URL . "/featured/images/";
6
+ $demo_url = 'http://themedemo.web-dorado.com/';
7
+ $site_url = 'https://web-dorado.com/wordpress-themes/';
8
+
9
+
10
+ $WDWThemes = array(
11
+ "business_elite" => array(
12
+ "title" => "Business Elite",
13
+ "description" =>"Business Elite is a robust parallax theme for business websites. The theme uses smooth transitions and many functional sections.",
14
+ "link" => "business-elite.html",
15
+ "demo" => "theme-businesselite",
16
+ "image" => "business_elite.jpg"
17
+ ),
18
+ "portfolio" => array(
19
+ "title" => "Portfolio Gallery",
20
+ "description" =>"Portfolio Gallery helps to display images using various color schemes and layouts combined with elegant fonts and content parts.",
21
+ "link" => "portfolio-gallery.html",
22
+ "demo" => "theme-portfoliogallery",
23
+ "image" => "portfolio_gallery.jpg"
24
+ ),
25
+ "sauron" => array(
26
+ "title" => "Sauron",
27
+ "description" =>"Sauron is a multipurpose parallax theme, which uses multiple interactive sections designed for the client-engagement.",
28
+ "link" => "sauron.html",
29
+ "demo" => "theme-sauron",
30
+ "image" => "sauron.jpg"
31
+ ),
32
+ "business_world" => array(
33
+ "title" => "Business World",
34
+ "description" => "Business World is an innovative WordPress theme great for Business websites.",
35
+ "link" => "business-world.html",
36
+ "demo" => "theme-businessworld",
37
+ "image" => "business_world.jpg"
38
+ ),
39
+ "best_magazine" => array(
40
+ "title" => "Best Magazine",
41
+ "description" =>"Best Magazine is an ultimate selection when you are dealing with multi-category news websites.",
42
+ "link" => "best-magazine.html",
43
+ "demo" => "theme-bestmagazine",
44
+ "image" => "best_magazine.jpg"
45
+ ),
46
+ "magazine" => array(
47
+ "title" => "News Magazine",
48
+ "description" =>"Magazine theme is a perfect solution when creating news and informational websites. It comes with a wide range of layout options.",
49
+ "link" => "news-magazine.html",
50
+ "demo" => "theme-newsmagazine",
51
+ "image" => "news_magazine.jpg"
52
+ )
53
+ );
54
+ ?>
55
+
56
+ <style>
57
+
58
+ #main_featured_themes_page #featured-themes-list li a.download {
59
+ padding-right: 30px;
60
+ background:url(<?php echo $image_url; ?>down.png) no-repeat right;
61
+ }
62
+
63
+ </style>
64
+
65
+
66
+ <div id="main_featured_themes_page">
67
+ <div class="featured_container">
68
+ <div class="page_header">
69
+ <h1><?php echo "Featured Themes"; ?></h1>
70
+ </div>
71
+ <div class="featured_header">
72
+ <a target="_blank" href="https://web-dorado.com/wordpress-themes.html?source=<?php echo $slug; ?>">
73
+ <h1><?php echo "WORDPRESS THEMES"; ?></h1>
74
+ <h2 class="get_themes"><?php echo "ALL FOR $40 ONLY "; ?><span>- <?php echo "SAVE 80%"; ?></span></h2>
75
+ <div class="try-now">
76
+ <span><?php echo "TRY NOW"; ?></span>
77
+ </div>
78
+ </a>
79
+ </div>
80
+ <ul id="featured-themes-list">
81
+ <?php foreach($WDWThemes as $key=>$WDWTheme) : ?>
82
+ <li class="<?php echo $key; ?>">
83
+ <div class="theme_img">
84
+ <img src="<?php echo $image_url . $WDWTheme["image"]; ?>">
85
+ </div>
86
+ <div class="title">
87
+ <h3 class="heading"><?php echo $WDWTheme["title"]; ?></h3>
88
+ </div>
89
+ <div class="description">
90
+ <p><?php echo $WDWTheme["description"]; ?></p>
91
+ </div>
92
+ <div class="links">
93
+ <a target="_blank" href="<?php echo $demo_url . $WDWTheme["demo"]."?source=".$slug; ?>" class="demo"><?php echo "Demo"; ?></a>
94
+ <a target="_blank" href="<?php echo $site_url . $WDWTheme["link"]."?source=".$slug; ?>" class="download"><?php echo "Free Download"; ?></a>
95
+ </div>
96
+ </li>
97
+ <?php endforeach; ?>
98
+ </ul>
99
+ </div>
100
+ </div>
101
+
102
+
103
+ <?php }
104
+ ?>
form-maker.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Form Maker
4
  * Plugin URI: https://web-dorado.com/products/form-maker-wordpress.html
5
  * Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
6
- * Version: 1.10.6
7
  * Author: WebDorado
8
  * Author URI: https://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -279,7 +279,7 @@ function register_fmemailverification_cpt(){
279
  // Activate plugin.
280
  function form_maker_activate() {
281
  $version = get_option("wd_form_maker_version");
282
- $new_version = '1.10.6';
283
  global $wpdb;
284
  if (!$version) {
285
  add_option("wd_form_maker_version", $new_version, '', 'no');
3
  * Plugin Name: Form Maker
4
  * Plugin URI: https://web-dorado.com/products/form-maker-wordpress.html
5
  * Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
6
+ * Version: 1.10.7
7
  * Author: WebDorado
8
  * Author URI: https://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
279
  // Activate plugin.
280
  function form_maker_activate() {
281
  $version = get_option("wd_form_maker_version");
282
+ $new_version = '1.10.7';
283
  global $wpdb;
284
  if (!$version) {
285
  add_option("wd_form_maker_version", $new_version, '', 'no');
form_maker_notices_class.php CHANGED
@@ -1,246 +1,269 @@
1
- <?php
2
-
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit;
5
- }
6
-
7
- /**
8
- * FM_Notices Class
9
- *
10
- */
11
- class FM_Notices {
12
- static $instance;
13
-
14
- public static function instance() {
15
- if ( ! isset( self::$instance ) ) {
16
- self::$instance = new FM_Notices();
17
- }
18
-
19
- return self::$instance;
20
- }
21
-
22
- public $notice_spam = 0;
23
- public $notice_spam_max = 1;
24
-
25
- // Basic actions to run
26
- public function __construct() {
27
-
28
- // Runs the admin notice ignore function incase a dismiss button has been clicked
29
- add_action( 'admin_init', array( $this, 'admin_notice_ignore' ) );
30
-
31
- // Runs the admin notice temp ignore function incase a temp dismiss link has been clicked
32
- add_action( 'admin_init', array( $this, 'admin_notice_temp_ignore' ) );
33
- add_action('admin_notices', array($this, 'wd_admin_notices'));
34
-
35
- }
36
-
37
- // Checks to ensure notices aren't disabled and the user has the correct permissions.
38
- public function fm_admin_notice() {
39
-
40
- $fm_settings = get_option( 'fm_admin_notice' );
41
- if ( ! isset( $fm_settings['disable_admin_notices'] ) || ( isset( $fm_settings['disable_admin_notices'] ) && $fm_settings['disable_admin_notices'] == 0 ) ) {
42
- if ( current_user_can( 'manage_options' ) ) {
43
- return true;
44
- }
45
- }
46
-
47
- return false;
48
-
49
- }
50
-
51
- // Primary notice function that can be called from an outside function sending necessary variables
52
- public function admin_notice( $admin_notices ) {
53
-
54
- // Check options
55
- if ( ! $this->fm_admin_notice() ) {
56
- return false;
57
- }
58
-
59
- foreach ( $admin_notices as $slug => $admin_notice ) {
60
- // Call for spam protection
61
- if ( $this->anti_notice_spam() ) {
62
- return false;
63
- }
64
-
65
- // Check for proper page to display on
66
- if ( isset( $admin_notices[ $slug ]['pages'] ) && is_array( $admin_notices[ $slug ]['pages'] ) ) {
67
- if ( ! $this->admin_notice_pages( $admin_notices[ $slug ]['pages'] ) ) {
68
- return false;
69
- }
70
- }
71
- // Check for required fields
72
- if ( ! $this->required_fields( $admin_notices[ $slug ] ) ) {
73
- // Get the current date then set start date to either passed value or current date value and add interval
74
- $current_date = current_time( "n/j/Y" );
75
- $start = ( isset( $admin_notices[ $slug ]['start'] ) ? $admin_notices[ $slug ]['start'] : $current_date );
76
- $start = date( "n/j/Y", strtotime( $start ) );
77
- $date_array = explode( '/', $start );
78
- $interval = ( isset( $admin_notices[ $slug ]['int'] ) ? $admin_notices[ $slug ]['int'] : 0 );
79
- $date_array[1] += $interval;
80
- $start = date( "n/j/Y", mktime( 0, 0, 0, $date_array[0], $date_array[1], $date_array[2] ) );
81
-
82
- // This is the main notices storage option
83
- $admin_notices_option = get_option( 'fm_admin_notice', array() );
84
- // Check if the message is already stored and if so just grab the key otherwise store the message and its associated date information
85
- if ( ! array_key_exists( $slug, $admin_notices_option ) ) {
86
- $admin_notices_option[ $slug ]['start'] = $start;
87
- $admin_notices_option[ $slug ]['int'] = $interval;
88
- update_option( 'fm_admin_notice', $admin_notices_option );
89
- }
90
-
91
- // Sanity check to ensure we have accurate information
92
- // New date information will not overwrite old date information
93
- $admin_display_check = ( isset( $admin_notices_option[ $slug ]['dismissed'] ) ? $admin_notices_option[ $slug ]['dismissed'] : 0 );
94
-
95
- $admin_display_start = ( isset( $admin_notices_option[ $slug ]['start'] ) ? $admin_notices_option[ $slug ]['start'] : $start );
96
- $admin_display_interval = ( isset( $admin_notices_option[ $slug ]['int'] ) ? $admin_notices_option[ $slug ]['int'] : $interval );
97
- $admin_display_msg = ( isset( $admin_notices[ $slug ]['msg'] ) ? $admin_notices[ $slug ]['msg'] : '' );
98
- $admin_display_title = ( isset( $admin_notices[ $slug ]['title'] ) ? $admin_notices[ $slug ]['title'] : '' );
99
- $admin_display_link = ( isset( $admin_notices[ $slug ]['link'] ) ? $admin_notices[ $slug ]['link'] : '' );
100
- $output_css = false;
101
- // Ensure the notice hasn't been hidden and that the current date is after the start date
102
- if ($admin_display_check == 0 && strtotime( $admin_display_start ) <= strtotime( $current_date )) {
103
-
104
- // Get remaining query string
105
- $query_str = (isset($admin_notices[$slug]['later_link']) ? $admin_notices[$slug]['later_link'] : esc_url(add_query_arg('fm_admin_notice_ignore', $slug)));
106
-
107
- // Admin notice display output
108
- echo '<div class="update-nag fm-admin-notice">';
109
- echo '<div class="fm-notice-logo"></div>';
110
- echo ' <p class="fm-notice-title">';
111
- echo $admin_display_title;
112
- echo ' </p>';
113
- echo ' <p class="fm-notice-body">';
114
- echo $admin_display_msg;
115
- echo ' </p>';
116
- echo '<ul class="fm-notice-body fm-blue">
117
- ' . $admin_display_link . '
118
- </ul>';
119
- echo '<a href="' . $query_str . '" class="dashicons dashicons-dismiss"></a>';
120
- echo '</div>';
121
-
122
- $this->notice_spam += 1;
123
- $output_css = true;
124
- }
125
- if ( $output_css ) {
126
- wp_enqueue_style( 'fm-admin-notices', WD_FM_URL .'/css/notices.css?fm_ver=' . get_option("wd_form_maker_version") );
127
- }
128
- }
129
- }
130
- }
131
-
132
- // Spam protection check
133
- public function anti_notice_spam() {
134
-
135
- if ( $this->notice_spam >= $this->notice_spam_max ) {
136
- return true;
137
- }
138
-
139
- return false;
140
- }
141
-
142
- // Ignore function that gets ran at admin init to ensure any messages that were dismissed get marked
143
- public function admin_notice_ignore() {
144
-
145
- // If user clicks to ignore the notice, update the option to not show it again
146
- if ( isset( $_GET['fm_admin_notice_ignore'] ) ) {
147
-
148
- $admin_notices_option = get_option( 'fm_admin_notice', array() );
149
- $admin_notices_option[ $_GET['fm_admin_notice_ignore'] ]['dismissed'] = 1;
150
- update_option( 'fm_admin_notice', $admin_notices_option );
151
- $query_str = remove_query_arg( 'fm_admin_notice_ignore' );
152
- wp_redirect( $query_str );
153
- exit;
154
- }
155
- }
156
-
157
- // Temp Ignore function that gets ran at admin init to ensure any messages that were temp dismissed get their start date changed
158
- public function admin_notice_temp_ignore() {
159
-
160
- // If user clicks to temp ignore the notice, update the option to change the start date - default interval of 14 days
161
- if ( isset( $_GET['fm_admin_notice_temp_ignore'] ) ) {
162
-
163
- $admin_notices_option = get_option( 'fm_admin_notice', array() );
164
-
165
- $current_date = current_time( "n/j/Y" );
166
- $date_array = explode( '/', $current_date );
167
- $interval = ( isset( $_GET['fm_int'] ) ? $_GET['fm_int'] : 14 );
168
- $date_array[1] += $interval;
169
- $new_start = date( "n/j/Y", mktime( 0, 0, 0, $date_array[0], $date_array[1], $date_array[2] ) );
170
-
171
- $admin_notices_option[ $_GET['fm_admin_notice_temp_ignore'] ]['start'] = $new_start;
172
- $admin_notices_option[ $_GET['fm_admin_notice_temp_ignore'] ]['dismissed'] = 0;
173
- update_option( 'fm_admin_notice', $admin_notices_option );
174
- $query_str = remove_query_arg( array( 'fm_admin_notice_temp_ignore', 'fm_int' ) );
175
- wp_redirect( $query_str );
176
- exit;
177
- }
178
- }
179
-
180
- public function admin_notice_pages( $pages ) {
181
-
182
- foreach ( $pages as $key => $page ) {
183
- if ( is_array( $page ) ) {
184
- if ( isset( $_GET['page'] ) && $_GET['page'] == $page[0] && isset( $_GET['tab'] ) && $_GET['tab'] == $page[1] ) {
185
- return true;
186
- }
187
- } else {
188
- if ( $page == 'all' ) {
189
- return true;
190
- }
191
- if ( get_current_screen()->id === $page ) {
192
- return true;
193
- }
194
- if ( isset( $_GET['page'] ) && $_GET['page'] == $page ) {
195
- return true;
196
- }
197
- }
198
-
199
- return false;
200
- }
201
- }
202
-
203
- // Required fields check
204
- public function required_fields( $fields ) {
205
- if ( ! isset( $fields['msg'] ) || ( isset( $fields['msg'] ) && empty( $fields['msg'] ) ) ) {
206
- return true;
207
- }
208
-
209
- if ( ! isset( $fields['title'] ) || ( isset( $fields['title'] ) && empty( $fields['title'] ) ) ) {
210
- return true;
211
- }
212
-
213
- return false;
214
- }
215
-
216
- // Special parameters function that is to be used in any extension of this class
217
- public function special_parameters( $admin_notices ) {
218
- // Intentionally left blank
219
- }
220
- public function wd_admin_notices() {
221
- $two_week_review_ignore = add_query_arg(array('fm_admin_notice_ignore' => 'two_week_review'));
222
- $two_week_review_temp = add_query_arg(array('fm_admin_notice_temp_ignore' => 'two_week_review', 'int' => 14));
223
- $notices['two_week_review'] = array(
224
- 'title' => __('Leave A Review?', 'fm'),
225
- 'msg' => sprintf(__('We hope you\'ve enjoyed using WordPress %s! Would you consider leaving us a review on WordPress.org?', 'fm'), 'Form Maker'),
226
- 'link' => '<li><span class="dashicons dashicons-external"></span><a href="https://wordpress.org/support/view/plugin-reviews/form-maker?filter=5" target="_blank">' . __('Sure! I\'d love to!', 'fm') . '</a></li>
227
- <li><span class="dashicons dashicons-smiley"></span><a href="' . $two_week_review_ignore . '"> ' . __('I\'ve already left a review', 'fm') . '</a></li>
228
- <li><span class="dashicons dashicons-calendar-alt"></span><a href="' . $two_week_review_temp . '">' . __('Maybe Later', 'fm') . '</a></li>
229
- <li><span class="dashicons dashicons-dismiss"></span><a href="' . $two_week_review_ignore . '">' . __('Never show again', 'fm') . '</a></li>',
230
- 'later_link' => $two_week_review_temp,
231
- 'int' => 14
232
- );
233
- $one_week_support = add_query_arg(array('fm_admin_notice_ignore' => 'one_week_support'));
234
- $notices['one_week_support'] = array(
235
- 'title' => __('Hey! How\'s It Going?', 'fm'),
236
- 'msg' => sprintf(__('Thank you for using WordPress %s! We hope that you\'ve found everything you need, but if you have any questions:', 'fm'), 'Form Maker'),
237
- 'link' => '<li><span class="dashicons dashicons-media-text"></span><a target="_blank" href="https://web-dorado.com/wordpress-form-maker/creating-form.html">' . __('Check out User Guide', 'fm') . '</a></li>
238
- <li><span class="dashicons dashicons-sos"></span><a target="_blank" href="https://web-dorado.com/forum/26-form-maker.html">' . __('Get Some Help', 'fm') . '</a></li>
239
- <li><span class="dashicons dashicons-dismiss"></span><a href="' . $one_week_support . '">' . __('Never show again', 'fm') . '</a></li>',
240
- 'int' => 7
241
- );
242
- $this->admin_notice($notices);
243
- }
244
-
245
- }
246
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ }
6
+
7
+ /**
8
+ * FM_Notices Class
9
+ *
10
+ */
11
+ class FM_Notices {
12
+ static $instance;
13
+
14
+ public static function instance() {
15
+ if ( ! isset( self::$instance ) ) {
16
+ self::$instance = new FM_Notices();
17
+ }
18
+
19
+ return self::$instance;
20
+ }
21
+
22
+ public $notice_spam = 0;
23
+ public $notice_spam_max = 1;
24
+
25
+ // Basic actions to run
26
+ public function __construct() {
27
+
28
+ // Runs the admin notice ignore function incase a dismiss button has been clicked
29
+ add_action( 'admin_init', array( $this, 'admin_notice_ignore' ) );
30
+
31
+ // Runs the admin notice temp ignore function incase a temp dismiss link has been clicked
32
+ add_action( 'admin_init', array( $this, 'admin_notice_temp_ignore' ) );
33
+ add_action('admin_notices', array($this, 'wd_admin_notices'));
34
+
35
+ }
36
+
37
+ // Checks to ensure notices aren't disabled and the user has the correct permissions.
38
+ public function fm_admin_notice() {
39
+
40
+ $fm_settings = get_option( 'fm_admin_notice' );
41
+ if ( ! isset( $fm_settings['disable_admin_notices'] ) || ( isset( $fm_settings['disable_admin_notices'] ) && $fm_settings['disable_admin_notices'] == 0 ) ) {
42
+ if ( current_user_can( 'manage_options' ) ) {
43
+ return true;
44
+ }
45
+ }
46
+
47
+ return false;
48
+
49
+ }
50
+
51
+ // Primary notice function that can be called from an outside function sending necessary variables
52
+ public function admin_notice( $admin_notices ) {
53
+
54
+ // Check options
55
+ if ( ! $this->fm_admin_notice() ) {
56
+ return false;
57
+ }
58
+
59
+ foreach ( $admin_notices as $slug => $admin_notice ) {
60
+ // Call for spam protection
61
+ if ( $this->anti_notice_spam() ) {
62
+ return false;
63
+ }
64
+
65
+ // Check for proper page to display on
66
+ if ( isset( $admin_notices[ $slug ]['pages'] ) && is_array( $admin_notices[ $slug ]['pages'] ) ) {
67
+
68
+ if ( ! $this->admin_notice_pages( $admin_notices[ $slug ]['pages'] ) ) {
69
+ return false;
70
+ }
71
+ }
72
+
73
+ // Check for required fields
74
+ if ( ! $this->required_fields( $admin_notices[ $slug ] ) ) {
75
+
76
+ // Get the current date then set start date to either passed value or current date value and add interval
77
+ $current_date = current_time( "n/j/Y" );
78
+ $start = ( isset( $admin_notices[ $slug ]['start'] ) ? $admin_notices[ $slug ]['start'] : $current_date );
79
+ $start = date( "n/j/Y", strtotime( $start ) );
80
+ $date_array = explode( '/', $start );
81
+ $interval = ( isset( $admin_notices[ $slug ]['int'] ) ? $admin_notices[ $slug ]['int'] : 0 );
82
+ $date_array[1] += $interval;
83
+ $start = date( "n/j/Y", mktime( 0, 0, 0, $date_array[0], $date_array[1], $date_array[2] ) );
84
+
85
+ // This is the main notices storage option
86
+ $admin_notices_option = get_option( 'fm_admin_notice', array() );
87
+ // Check if the message is already stored and if so just grab the key otherwise store the message and its associated date information
88
+ if ( ! array_key_exists( $slug, $admin_notices_option ) ) {
89
+ $admin_notices_option[ $slug ]['start'] = $start;
90
+ $admin_notices_option[ $slug ]['int'] = $interval;
91
+ update_option( 'fm_admin_notice', $admin_notices_option );
92
+ }
93
+
94
+ // Sanity check to ensure we have accurate information
95
+ // New date information will not overwrite old date information
96
+ $admin_display_check = ( isset( $admin_notices_option[ $slug ]['dismissed'] ) ? $admin_notices_option[ $slug ]['dismissed'] : 0 );
97
+
98
+ $admin_display_start = ( isset( $admin_notices_option[ $slug ]['start'] ) ? $admin_notices_option[ $slug ]['start'] : $start );
99
+ $admin_display_interval = ( isset( $admin_notices_option[ $slug ]['int'] ) ? $admin_notices_option[ $slug ]['int'] : $interval );
100
+ $admin_display_msg = ( isset( $admin_notices[ $slug ]['msg'] ) ? $admin_notices[ $slug ]['msg'] : '' );
101
+ $admin_display_title = ( isset( $admin_notices[ $slug ]['title'] ) ? $admin_notices[ $slug ]['title'] : '' );
102
+ $admin_display_link = ( isset( $admin_notices[ $slug ]['link'] ) ? $admin_notices[ $slug ]['link'] : '' );
103
+ $output_css = false;
104
+ // Ensure the notice hasn't been hidden and that the current date is after the start date
105
+
106
+ if ($admin_display_check == 0 && strtotime( $admin_display_start ) <= strtotime( $current_date )) {
107
+ // Get remaining query string
108
+ $query_str = (isset($admin_notices[$slug]['later_link']) ? $admin_notices[$slug]['later_link'] : esc_url(add_query_arg('fm_admin_notice_ignore', $slug)));
109
+
110
+ // Admin notice display output
111
+
112
+ $logo_position = $slug == 'old_form' ? 'fm-notice-old-form' : '';
113
+ echo '<div class="update-nag fm-admin-notice '.$logo_position.'">';
114
+ echo '<div class="fm-notice-logo"></div>';
115
+ echo ' <p class="fm-notice-title">';
116
+ echo $admin_display_title;
117
+ echo ' </p>';
118
+ echo ' <p class="fm-notice-body">';
119
+ echo $admin_display_msg;
120
+ echo ' </p>';
121
+ echo '<ul class="fm-notice-body fm-blue">
122
+ ' . $admin_display_link . '
123
+ </ul>';
124
+ echo '<a href="' . $query_str . '" class="dashicons dashicons-dismiss"></a>';
125
+ echo '</div>';
126
+
127
+ $this->notice_spam += 1;
128
+ $output_css = true;
129
+ }
130
+ if ( $output_css ) {
131
+ wp_enqueue_style( 'fm-admin-notices', WD_FM_URL .'/css/notices.css?fm_ver=' . get_option("wd_form_maker_version") );
132
+ }
133
+ }
134
+ }
135
+
136
+ }
137
+
138
+ // Spam protection check
139
+ public function anti_notice_spam() {
140
+ if ( $this->notice_spam >= $this->notice_spam_max ) {
141
+ return true;
142
+ }
143
+
144
+ return false;
145
+ }
146
+
147
+ // Ignore function that gets ran at admin init to ensure any messages that were dismissed get marked
148
+ public function admin_notice_ignore() {
149
+
150
+ // If user clicks to ignore the notice, update the option to not show it again
151
+ if ( isset( $_GET['fm_admin_notice_ignore'] ) ) {
152
+
153
+ $admin_notices_option = get_option( 'fm_admin_notice', array() );
154
+ $admin_notices_option[ $_GET['fm_admin_notice_ignore'] ]['dismissed'] = 1;
155
+ update_option( 'fm_admin_notice', $admin_notices_option );
156
+ $query_str = remove_query_arg( 'fm_admin_notice_ignore' );
157
+ wp_redirect( $query_str );
158
+ exit;
159
+ }
160
+ }
161
+
162
+ // Temp Ignore function that gets ran at admin init to ensure any messages that were temp dismissed get their start date changed
163
+ public function admin_notice_temp_ignore() {
164
+
165
+ // If user clicks to temp ignore the notice, update the option to change the start date - default interval of 14 days
166
+ if ( isset( $_GET['fm_admin_notice_temp_ignore'] ) ) {
167
+
168
+ $admin_notices_option = get_option( 'fm_admin_notice', array() );
169
+
170
+ $current_date = current_time( "n/j/Y" );
171
+ $date_array = explode( '/', $current_date );
172
+ $interval = ( isset( $_GET['fm_int'] ) ? $_GET['fm_int'] : 14 );
173
+ $date_array[1] += $interval;
174
+ $new_start = date( "n/j/Y", mktime( 0, 0, 0, $date_array[0], $date_array[1], $date_array[2] ) );
175
+
176
+ $admin_notices_option[ $_GET['fm_admin_notice_temp_ignore'] ]['start'] = $new_start;
177
+ $admin_notices_option[ $_GET['fm_admin_notice_temp_ignore'] ]['dismissed'] = 0;
178
+ update_option( 'fm_admin_notice', $admin_notices_option );
179
+ $query_str = remove_query_arg( array( 'fm_admin_notice_temp_ignore', 'fm_int' ) );
180
+ wp_redirect( $query_str );
181
+ exit;
182
+ }
183
+ }
184
+
185
+ public function admin_notice_pages( $pages ) {
186
+
187
+ foreach ( $pages as $key => $page ) {
188
+ if ( is_array( $page ) ) {
189
+ if ( isset( $_GET['page'] ) && $_GET['page'] == $page[0] && isset( $_GET['tab'] ) && $_GET['tab'] == $page[1] ) {
190
+ return true;
191
+ }
192
+ } else {
193
+ if ( $page == 'all' ) {
194
+ return true;
195
+ }
196
+ if ( get_current_screen()->id === $page ) {
197
+ return true;
198
+ }
199
+ if ( isset( $_GET['page'] ) && $_GET['page'] == $page ) {
200
+ return true;
201
+ }
202
+ }
203
+
204
+ return false;
205
+ }
206
+ }
207
+
208
+ // Required fields check
209
+ public function required_fields( $fields ) {
210
+ if ( ! isset( $fields['msg'] ) || ( isset( $fields['msg'] ) && empty( $fields['msg'] ) ) ) {
211
+ return true;
212
+ }
213
+
214
+ if ( ! isset( $fields['title'] ) || ( isset( $fields['title'] ) && empty( $fields['title'] ) ) ) {
215
+ return true;
216
+ }
217
+
218
+ return false;
219
+ }
220
+
221
+ // Special parameters function that is to be used in any extension of this class
222
+ public function special_parameters( $admin_notices ) {
223
+ // Intentionally left blank
224
+ }
225
+ public function wd_admin_notices() {
226
+ global $wpdb;
227
+ $two_week_review_ignore = add_query_arg(array('fm_admin_notice_ignore' => 'two_week_review'));
228
+ $two_week_review_temp = add_query_arg(array('fm_admin_notice_temp_ignore' => 'two_week_review', 'int' => 14));
229
+ $notices['two_week_review'] = array(
230
+ 'title' => __('Leave A Review?', 'fm'),
231
+ 'msg' => sprintf(__('We hope you\'ve enjoyed using WordPress %s! Would you consider leaving us a review on WordPress.org?', 'fm'), 'Form Maker'),
232
+ 'link' => '<li><span class="dashicons dashicons-external"></span><a href="https://wordpress.org/support/view/plugin-reviews/form-maker?filter=5" target="_blank">' . __('Sure! I\'d love to!', 'fm') . '</a></li>
233
+ <li><span class="dashicons dashicons-smiley"></span><a href="' . $two_week_review_ignore . '"> ' . __('I\'ve already left a review', 'fm') . '</a></li>
234
+ <li><span class="dashicons dashicons-calendar-alt"></span><a href="' . $two_week_review_temp . '">' . __('Maybe Later', 'fm') . '</a></li>
235
+ <li><span class="dashicons dashicons-dismiss"></span><a href="' . $two_week_review_ignore . '">' . __('Never show again', 'fm') . '</a></li>',
236
+ 'later_link' => $two_week_review_temp,
237
+ 'int' => 14
238
+ );
239
+ $one_week_support = add_query_arg(array('fm_admin_notice_ignore' => 'one_week_support'));
240
+ $notices['one_week_support'] = array(
241
+ 'title' => __('Hey! How\'s It Going?', 'fm'),
242
+ 'msg' => sprintf(__('Thank you for using WordPress %s! We hope that you\'ve found everything you need, but if you have any questions:', 'fm'), 'Form Maker'),
243
+ 'link' => '<li><span class="dashicons dashicons-media-text"></span><a target="_blank" href="https://web-dorado.com/wordpress-form-maker/creating-form.html">' . __('Check out User Guide', 'fm') . '</a></li>
244
+ <li><span class="dashicons dashicons-sos"></span><a target="_blank" href="https://web-dorado.com/forum/26-form-maker.html">' . __('Get Some Help', 'fm') . '</a></li>
245
+ <li><span class="dashicons dashicons-dismiss"></span><a href="' . $one_week_support . '">' . __('Never show again', 'fm') . '</a></li>',
246
+ 'int' => 7
247
+ );
248
+ $check_column = $wpdb->get_var("SHOW COLUMNS FROM " . $wpdb->prefix . "formmaker LIKE 'form'");
249
+ if($check_column !== NULL){
250
+ $check_empty = $wpdb->get_results("SELECT title FROM " . $wpdb->prefix . "formmaker WHERE `form` != ''");
251
+ if($check_empty){
252
+ $list_empty = "";
253
+ foreach ( $check_empty as $key => $check_empty_obj ) {
254
+ $list_empty .=$check_empty_obj -> title . ", ";
255
+ }
256
+ $list_empty = substr($list_empty, 0, -2);
257
+ $list_empty.= ".";
258
+ $one_week_support = add_query_arg(array('fm_admin_notice_ignore' => 'old_form'));
259
+ $notices['old_form'] = array(
260
+ 'title' => "IMPORTANT!",
261
+ 'msg' => __('The following forms were created using an outdated version of Form Maker and do not have all the features we\'ve added to our plugin, including responsiveness: </br><b>' .$list_empty.'</b></br> We want to inform you that we\'ve decided to terminate support for the outdated forms listed above, starting from version 1.11.0 (Upcoming major update). If you are still using those forms, please re-create them. Before re-creating the forms you should not update Form Maker.', 'fm'),
262
+ );
263
+ }
264
+ }
265
+ $this->admin_notice($notices);
266
+ }
267
+
268
+ }
269
+
frontend/controllers/FMControllerForm_maker.php CHANGED
@@ -1,46 +1,46 @@
1
- <?php
2
-
3
- class FMControllerForm_maker {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute($id) {
22
- return $this->display($id);
23
- }
24
-
25
- public function display($id) {
26
- if (session_id() == '' || (function_exists('session_status') && (session_status() == PHP_SESSION_NONE))) {
27
- @session_start();
28
- }
29
- require_once WD_FM_DIR . "/frontend/models/FMModelForm_maker.php";
30
- $model = new FMModelForm_maker();
31
-
32
- require_once WD_FM_DIR . "/frontend/views/FMViewForm_maker.php";
33
- $view = new FMViewForm_maker($model);
34
-
35
- return $view->display((int)$id);
36
- }
37
- ////////////////////////////////////////////////////////////////////////////////////////
38
- // Getters & Setters //
39
- ////////////////////////////////////////////////////////////////////////////////////////
40
- ////////////////////////////////////////////////////////////////////////////////////////
41
- // Private Methods //
42
- ////////////////////////////////////////////////////////////////////////////////////////
43
- ////////////////////////////////////////////////////////////////////////////////////////
44
- // Listeners //
45
- ////////////////////////////////////////////////////////////////////////////////////////
46
  }
1
+ <?php
2
+
3
+ class FMControllerForm_maker {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function execute($id) {
22
+ return $this->display($id);
23
+ }
24
+
25
+ public function display($id) {
26
+ if (session_id() == '' || (function_exists('session_status') && (session_status() == PHP_SESSION_NONE))) {
27
+ @session_start();
28
+ }
29
+ require_once WD_FM_DIR . "/frontend/models/FMModelForm_maker.php";
30
+ $model = new FMModelForm_maker();
31
+
32
+ require_once WD_FM_DIR . "/frontend/views/FMViewForm_maker.php";
33
+ $view = new FMViewForm_maker($model);
34
+
35
+ return $view->display((int)$id);
36
+ }
37
+ ////////////////////////////////////////////////////////////////////////////////////////
38
+ // Getters & Setters //
39
+ ////////////////////////////////////////////////////////////////////////////////////////
40
+ ////////////////////////////////////////////////////////////////////////////////////////
41
+ // Private Methods //
42
+ ////////////////////////////////////////////////////////////////////////////////////////
43
+ ////////////////////////////////////////////////////////////////////////////////////////
44
+ // Listeners //
45
+ ////////////////////////////////////////////////////////////////////////////////////////
46
  }
frontend/controllers/FMControllerForm_submissions.php CHANGED
@@ -1,124 +1,124 @@
1
- <?php
2
-
3
- class FMControllerForm_submissions {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute($id = '', $startdate = '', $enddate = '', $submit_date = '', $submitter_ip = '', $username = '', $useremail = '', $form_fields = '', $show = '') {
22
- require_once(WD_FM_DIR . '/framework/WDW_FM_Library.php');
23
- $task = WDW_FM_Library::get('action');
24
- if (method_exists($this, $task) && $task != 'display') {
25
- return $this->$task();
26
- }
27
- else {
28
- return $this->display((int)$id, $startdate, $enddate, $submit_date, $submitter_ip, $username, $useremail, $form_fields, $show);
29
- }
30
- }
31
-
32
- public function display($id, $startdate, $enddate, $submit_date, $submitter_ip, $username, $useremail, $form_fields, $show) {
33
- if (session_id() == '' || (function_exists('session_status') && (session_status() == PHP_SESSION_NONE))) {
34
- @session_start();
35
- }
36
- require_once WD_FM_DIR . "/frontend/models/FMModelForm_submissions.php";
37
- $model = new FMModelForm_submissions();
38
-
39
- require_once WD_FM_DIR . "/frontend/views/FMViewForm_submissions.php";
40
- $view = new FMViewForm_submissions($model);
41
-
42
- $show = explode(",", $show);
43
- $csv = isset($show[0]) ? $show[0] : 0;
44
- $xml = isset($show[1]) ? $show[1] : 0;
45
- $title = isset($show[2]) ? $show[2] : 0;
46
- $search = isset($show[3]) ? $show[3] : 0;
47
- $ordering = isset($show[4]) ? $show[4] : 0;
48
- $entries = isset($show[5]) ? $show[5] : 0;
49
- $views = isset($show[6]) ? $show[6] : 0;
50
- $conversion_rate = isset($show[7]) ? $show[7] : 0;
51
- $pagination = isset($show[8]) ? $show[8] : 0;
52
- $stats = isset($show[9]) ? $show[9] : 0;
53
-
54
- return $view->display($id, $startdate, $enddate, $submit_date, $submitter_ip, $username, $useremail, $form_fields, $csv, $xml, $title, $search, $ordering, $entries, $views, $conversion_rate, $pagination, $stats);
55
- }
56
-
57
- public function get_frontend_stats() {
58
- require_once WD_FM_DIR . "/frontend/models/FMModelForm_submissions.php";
59
- $model = new FMModelForm_submissions();
60
-
61
- require_once WD_FM_DIR . "/frontend/views/FMViewForm_submissions.php";
62
- $view = new FMViewForm_submissions($model);
63
- $view->show_stats();
64
- }
65
-
66
- public function frontend_show_map() {
67
- $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
68
- require_once WD_FM_DIR . "/frontend/models/FMModelForm_submissions.php";
69
- $model = new FMModelForm_submissions();
70
-
71
- require_once WD_FM_DIR . "/frontend/views/FMViewForm_submissions.php";
72
- $view = new FMViewForm_submissions($model);
73
- $view->show_map($form_id);
74
- }
75
-
76
- public function frontend_show_matrix() {
77
- $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
78
- require_once WD_FM_DIR . "/frontend/models/FMModelForm_submissions.php";
79
- $model = new FMModelForm_submissions();
80
-
81
- require_once WD_FM_DIR . "/frontend/views/FMViewForm_submissions.php";
82
- $view = new FMViewForm_submissions($model);
83
- $view->show_matrix($form_id);
84
- }
85
-
86
- public function frontend_paypal_info() {
87
- $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
88
- require_once WD_FM_DIR . "/frontend/models/FMModelForm_submissions.php";
89
- $model = new FMModelForm_submissions();
90
-
91
- require_once WD_FM_DIR . "/frontend/views/FMViewForm_submissions.php";
92
- $view = new FMViewForm_submissions($model);
93
- $view->paypal_info($form_id);
94
- }
95
-
96
- public function frontend_generate_csv() {
97
- $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
98
- require_once WD_FM_DIR . "/frontend/models/FMModelForm_submissions.php";
99
- $model = new FMModelForm_submissions();
100
-
101
- require_once WD_FM_DIR . "/frontend/views/FMViewForm_submissions.php";
102
- $view = new FMViewForm_submissions($model);
103
- $view->generate_csv($form_id);
104
- }
105
-
106
- public function frontend_generate_xml() {
107
- $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
108
- require_once WD_FM_DIR . "/frontend/models/FMModelForm_submissions.php";
109
- $model = new FMModelForm_submissions();
110
-
111
- require_once WD_FM_DIR . "/frontend/views/FMViewForm_submissions.php";
112
- $view = new FMViewForm_submissions($model);
113
- $view->generate_xml($form_id);
114
- }
115
- ////////////////////////////////////////////////////////////////////////////////////////
116
- // Getters & Setters //
117
- ////////////////////////////////////////////////////////////////////////////////////////
118
- ////////////////////////////////////////////////////////////////////////////////////////
119
- // Private Methods //
120
- ////////////////////////////////////////////////////////////////////////////////////////
121
- ////////////////////////////////////////////////////////////////////////////////////////
122
- // Listeners //
123
- ////////////////////////////////////////////////////////////////////////////////////////
124
  }
1
+ <?php
2
+
3
+ class FMControllerForm_submissions {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function execute($id = '', $startdate = '', $enddate = '', $submit_date = '', $submitter_ip = '', $username = '', $useremail = '', $form_fields = '', $show = '') {
22
+ require_once(WD_FM_DIR . '/framework/WDW_FM_Library.php');
23
+ $task = WDW_FM_Library::get('action');
24
+ if (method_exists($this, $task) && $task != 'display') {
25
+ return $this->$task();
26
+ }
27
+ else {
28
+ return $this->display((int)$id, $startdate, $enddate, $submit_date, $submitter_ip, $username, $useremail, $form_fields, $show);
29
+ }
30
+ }
31
+
32
+ public function display($id, $startdate, $enddate, $submit_date, $submitter_ip, $username, $useremail, $form_fields, $show) {
33
+ if (session_id() == '' || (function_exists('session_status') && (session_status() == PHP_SESSION_NONE))) {
34
+ @session_start();
35
+ }
36
+ require_once WD_FM_DIR . "/frontend/models/FMModelForm_submissions.php";
37
+ $model = new FMModelForm_submissions();
38
+
39
+ require_once WD_FM_DIR . "/frontend/views/FMViewForm_submissions.php";
40
+ $view = new FMViewForm_submissions($model);
41
+
42
+ $show = explode(",", $show);
43
+ $csv = isset($show[0]) ? $show[0] : 0;
44
+ $xml = isset($show[1]) ? $show[1] : 0;
45
+ $title = isset($show[2]) ? $show[2] : 0;
46
+ $search = isset($show[3]) ? $show[3] : 0;
47
+ $ordering = isset($show[4]) ? $show[4] : 0;
48
+ $entries = isset($show[5]) ? $show[5] : 0;
49
+ $views = isset($show[6]) ? $show[6] : 0;
50
+ $conversion_rate = isset($show[7]) ? $show[7] : 0;
51
+ $pagination = isset($show[8]) ? $show[8] : 0;
52
+ $stats = isset($show[9]) ? $show[9] : 0;
53
+
54
+ return $view->display($id, $startdate, $enddate, $submit_date, $submitter_ip, $username, $useremail, $form_fields, $csv, $xml, $title, $search, $ordering, $entries, $views, $conversion_rate, $pagination, $stats);
55
+ }
56
+
57
+ public function get_frontend_stats() {
58
+ require_once WD_FM_DIR . "/frontend/models/FMModelForm_submissions.php";
59
+ $model = new FMModelForm_submissions();
60
+
61
+ require_once WD_FM_DIR . "/frontend/views/FMViewForm_submissions.php";
62
+ $view = new FMViewForm_submissions($model);
63
+ $view->show_stats();
64
+ }
65
+
66
+ public function frontend_show_map() {
67
+ $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
68
+ require_once WD_FM_DIR . "/frontend/models/FMModelForm_submissions.php";
69
+ $model = new FMModelForm_submissions();
70
+
71
+ require_once WD_FM_DIR . "/frontend/views/FMViewForm_submissions.php";
72
+ $view = new FMViewForm_submissions($model);
73
+ $view->show_map($form_id);
74
+ }
75
+
76
+ public function frontend_show_matrix() {
77
+ $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
78
+ require_once WD_FM_DIR . "/frontend/models/FMModelForm_submissions.php";
79
+ $model = new FMModelForm_submissions();
80
+
81
+ require_once WD_FM_DIR . "/frontend/views/FMViewForm_submissions.php";
82
+ $view = new FMViewForm_submissions($model);
83
+ $view->show_matrix($form_id);
84
+ }
85
+
86
+ public function frontend_paypal_info() {
87
+ $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
88
+ require_once WD_FM_DIR . "/frontend/models/FMModelForm_submissions.php";
89
+ $model = new FMModelForm_submissions();
90
+
91
+ require_once WD_FM_DIR . "/frontend/views/FMViewForm_submissions.php";
92
+ $view = new FMViewForm_submissions($model);
93
+ $view->paypal_info($form_id);
94
+ }
95
+
96
+ public function frontend_generate_csv() {
97
+ $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
98
+ require_once WD_FM_DIR . "/frontend/models/FMModelForm_submissions.php";
99
+ $model = new FMModelForm_submissions();
100
+
101
+ require_once WD_FM_DIR . "/frontend/views/FMViewForm_submissions.php";
102
+ $view = new FMViewForm_submissions($model);
103
+ $view->generate_csv($form_id);
104
+ }
105
+
106
+ public function frontend_generate_xml() {
107
+ $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
108
+ require_once WD_FM_DIR . "/frontend/models/FMModelForm_submissions.php";
109
+ $model = new FMModelForm_submissions();
110
+
111
+ require_once WD_FM_DIR . "/frontend/views/FMViewForm_submissions.php";
112
+ $view = new FMViewForm_submissions($model);
113
+ $view->generate_xml($form_id);
114
+ }
115
+ ////////////////////////////////////////////////////////////////////////////////////////
116
+ // Getters & Setters //
117
+ ////////////////////////////////////////////////////////////////////////////////////////
118
+ ////////////////////////////////////////////////////////////////////////////////////////
119
+ // Private Methods //
120
+ ////////////////////////////////////////////////////////////////////////////////////////
121
+ ////////////////////////////////////////////////////////////////////////////////////////
122
+ // Listeners //
123
+ ////////////////////////////////////////////////////////////////////////////////////////
124
  }
frontend/controllers/FMControllerVerify_email.php CHANGED
@@ -1,54 +1,54 @@
1
- <?php
2
-
3
- class FMControllerVerify_email {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute() {
22
- return $this->display();
23
- }
24
-
25
- public function display() {
26
- $gid = (int)((isset($_GET['gid']) && esc_html($_GET['gid']) != '') ? esc_html($_GET['gid']) : 0);
27
- $hashInfo = ((isset($_GET['h']) && esc_html($_GET['h']) != '') ? esc_html($_GET['h']) : 0);
28
- $hashInfo = explode("@",$hashInfo);
29
-
30
- $md5 = $hashInfo[0];
31
- $recipiend = isset($hashInfo[1]) ? $hashInfo[1] : '';
32
-
33
- if($gid <= 0 or strlen($md5) <= 0 or strlen($recipiend) <= 0)
34
- return;
35
-
36
- require_once WD_FM_DIR . "/frontend/models/FMModelVerify_email.php";
37
- $model = new FMModelVerify_email();
38
- $result = $model->setValidation($gid,$md5,$recipiend);
39
- if($result!==NULL) {
40
- require_once WD_FM_DIR . "/frontend/views/FMViewVerify_email.php";
41
- $view = new FMViewVerify_email($model);
42
- $view->display($result);
43
- }
44
- }
45
- ////////////////////////////////////////////////////////////////////////////////////////
46
- // Getters & Setters //
47
- ////////////////////////////////////////////////////////////////////////////////////////
48
- ////////////////////////////////////////////////////////////////////////////////////////
49
- // Private Methods //
50
- ////////////////////////////////////////////////////////////////////////////////////////
51
- ////////////////////////////////////////////////////////////////////////////////////////
52
- // Listeners //
53
- ////////////////////////////////////////////////////////////////////////////////////////
54
  }
1
+ <?php
2
+
3
+ class FMControllerVerify_email {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function execute() {
22
+ return $this->display();
23
+ }
24
+
25
+ public function display() {
26
+ $gid = (int)((isset($_GET['gid']) && esc_html($_GET['gid']) != '') ? esc_html($_GET['gid']) : 0);
27
+ $hashInfo = ((isset($_GET['h']) && esc_html($_GET['h']) != '') ? esc_html($_GET['h']) : 0);
28
+ $hashInfo = explode("@",$hashInfo);
29
+
30
+ $md5 = $hashInfo[0];
31
+ $recipiend = isset($hashInfo[1]) ? $hashInfo[1] : '';
32
+
33
+ if($gid <= 0 or strlen($md5) <= 0 or strlen($recipiend) <= 0)
34
+ return;
35
+
36
+ require_once WD_FM_DIR . "/frontend/models/FMModelVerify_email.php";
37
+ $model = new FMModelVerify_email();
38
+ $result = $model->setValidation($gid,$md5,$recipiend);
39
+ if($result!==NULL) {
40
+ require_once WD_FM_DIR . "/frontend/views/FMViewVerify_email.php";
41
+ $view = new FMViewVerify_email($model);
42
+ $view->display($result);
43
+ }
44
+ }
45
+ ////////////////////////////////////////////////////////////////////////////////////////
46
+ // Getters & Setters //
47
+ ////////////////////////////////////////////////////////////////////////////////////////
48
+ ////////////////////////////////////////////////////////////////////////////////////////
49
+ // Private Methods //
50
+ ////////////////////////////////////////////////////////////////////////////////////////
51
+ ////////////////////////////////////////////////////////////////////////////////////////
52
+ // Listeners //
53
+ ////////////////////////////////////////////////////////////////////////////////////////
54
  }
frontend/models/FMModelForm_maker.php CHANGED
@@ -120,9 +120,15 @@ class FMModelForm_maker {
120
  $_SESSION['error_or_no' . $id] = 1;
121
  }
122
  }
123
- else {
124
- $correct = TRUE;
125
- }
 
 
 
 
 
 
126
  if ($correct) {
127
 
128
  $ip=$_SERVER['REMOTE_ADDR'];
120
  $_SESSION['error_or_no' . $id] = 1;
121
  }
122
  }
123
+ else {
124
+ if(preg_match('(type_arithmetic_captcha|type_captcha|type_recaptcha)', $form -> label_order_current) === 1){
125
+ $_SESSION['massage_after_submit' . $id] = addslashes(addslashes(__('Error, incorrect Security code.', 'form_maker')));
126
+ $_SESSION['error_or_no' . $id] = 1;
127
+ $correct = false;
128
+ }
129
+ else
130
+ $correct = true;
131
+ }
132
  if ($correct) {
133
 
134
  $ip=$_SERVER['REMOTE_ADDR'];
frontend/models/FMModelForm_submissions.php CHANGED
@@ -1,296 +1,296 @@
1
- <?php
2
-
3
- class FMModelForm_submissions {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- function showsubmissions($form_id, $startdate, $enddate, $submit_date, $submitter_ip, $username, $useremail, $form_fields, $csv, $xml, $title, $search, $ordering, $entries, $views, $conversion_rate, $pagination, $stats) {
22
- global $wpdb;
23
-
24
- $user = wp_get_current_user();
25
- $userGroups = $wpdb->get_var($wpdb->prepare("SELECT `user_id_wd` FROM " . $wpdb->prefix . "formmaker WHERE id='%d'", $form_id));
26
- $users = explode(',', $userGroups);
27
- $users = array_slice($users, 0, count($users) - 1);
28
- $show_submits = false;
29
- if(!is_user_logged_in()) {
30
- if(!in_array('guest', $users))
31
- return false;
32
- }
33
- else {
34
- foreach($user->roles as $user_role) {
35
- if(in_array($user_role, $users))
36
- $show_submits = true;
37
- }
38
- if(!$show_submits)
39
- return false;
40
- }
41
- $from = $startdate;
42
- $to = $enddate;
43
-
44
- $filter_order = ((isset($_POST['order_by']) && esc_html(stripslashes($_POST['order_by'])) != '') ? esc_html(stripslashes($_POST['order_by'])) : 'group_id');
45
- $filter_order_Dir = ((isset($_POST['asc_or_desc']) && ($_POST['asc_or_desc'] == 'asc' || $_POST['asc_or_desc'] == 'desc')) ? esc_html($_POST['asc_or_desc']) : 'asc');
46
-
47
- $ip_search = $submitter_ip;
48
- $username_search = strtolower($username);
49
- $useremail_search = strtolower($useremail);
50
-
51
- $where = array();
52
- $lists['startdate'] = ((isset($_POST['startdate'])) ? esc_html(stripslashes($_POST['startdate'])) : '');
53
- $lists['enddate'] = ((isset($_POST['enddate'])) ? esc_html(stripslashes($_POST['enddate'])) : '');
54
- $lists['hide_label_list'] = ((isset($_POST['hide_label_list'])) ? esc_html(stripslashes($_POST['hide_label_list'])) : '');
55
-
56
- $lists['ip_search'] = ((isset($_POST['ip_search'])) ? esc_html(stripslashes($_POST['ip_search'])) : '');
57
- $lists['username_search'] = ((isset($_POST['username_search'])) ? esc_html(stripslashes($_POST['username_search'])) : '');
58
- $lists['useremail_search'] = ((isset($_POST['useremail_search'])) ? esc_html(stripslashes($_POST['useremail_search'])) : '');
59
- $limit = ((isset($_POST['page_number'])) ? ((int) $_POST['page_number'] - 1) * 20 : 0);
60
-
61
- if ( $lists['ip_search'] ) {
62
- $where[] = 'ip LIKE "%' . esc_sql($lists['ip_search']) . '%"';
63
- }
64
- if ( $lists['username_search'] ) {
65
- $where[] = 'user_id_wd IN (SELECT `id` FROM `' . $wpdb->prefix . 'users` WHERE `display_name` LIKE "%' . esc_sql($lists['username_search']) . '%")';
66
- }
67
- if ( $lists['useremail_search'] ) {
68
- $where[] = 'user_id_wd IN (SELECT `id` FROM `' . $wpdb->prefix . 'users` WHERE `user_email` LIKE "%' . esc_sql($lists['useremail_search']) . '%")';
69
- }
70
-
71
- if($from) {
72
- if($lists['startdate'] != '') {
73
- if(strtotime($from) > strtotime($lists['startdate']))
74
- $where[] = "`date` >= '" . $from . " 00:00:00'";
75
- else
76
- $where[] ="`date`>='" . $lists['startdate'] . " 00:00:00' ";
77
- }
78
- else
79
- $where[] = "`date` >= '" . $from . " 00:00:00'";
80
- }
81
- else {
82
- if($lists['startdate']!='')
83
- $where[] =" `date`>='".$lists['startdate']." 00:00:00' ";
84
- }
85
- if($to) {
86
- if($lists['enddate']!='') {
87
- if(strtotime($to) < strtotime($lists['enddate']))
88
- $where[] = "`date` <= '".$to." 23:59:59'";
89
- else
90
- $where[] ="`date`<='".$lists['enddate']." 23:59:59' ";
91
- }
92
- else
93
- $where[] = "`date` <= '".$to." 23:59:59'";
94
- }
95
- else {
96
- if($lists['enddate']!='')
97
- $where[] ="`date`<='".$lists['enddate']." 23:59:59' ";
98
- }
99
-
100
- $form_title = $wpdb->get_var($wpdb->prepare("SELECT `title` FROM " . $wpdb->prefix . "formmaker WHERE id='%d'", $form_id));
101
-
102
- $where[] = 'form_id="' . (int)$form_id . '"';
103
- $where = ( count( $where ) ? ' ' . implode( ' AND ', $where ) : '' );
104
- $orderby = ' ';
105
- if ($filter_order == 'id' or $filter_order == 'title' or $filter_order == 'mail') {
106
- $orderby = ' ORDER BY `date` desc';
107
- }
108
- else {
109
- if ($filter_order == 'group_id' or $filter_order == 'date' or $filter_order == 'ip') {
110
- $orderby = ' ORDER BY '.$filter_order .' '. $filter_order_Dir .'';
111
- }
112
- else {
113
- if ($filter_order == 'display_name' or $filter_order == 'user_email') {
114
- $orderby = ' ORDER BY (SELECT `'.$filter_order.'` FROM `' . $wpdb->prefix . 'users` WHERE id=user_id_wd) '. $filter_order_Dir .'';
115
- }
116
- }
117
- }
118
- $query = "SELECT distinct element_label FROM " . $wpdb->prefix . "formmaker_submits WHERE ". $where;
119
- $labels = $wpdb->get_col($query);
120
-
121
- $query = $wpdb->prepare("SELECT id FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id='%d' and element_label=0 limit 0, 1", $form_id);
122
- $ispaypal = $wpdb->get_var($query);
123
-
124
- $query = $wpdb->prepare('SELECT count(distinct group_id) FROM ' . $wpdb->prefix . 'formmaker_submits where form_id ="%d"', $form_id);
125
- $total_entries = $wpdb->get_var($query);
126
-
127
- $sorted_labels_type= array();
128
- $sorted_labels_id= array();
129
- $sorted_labels= array();
130
- $label_titles=array();
131
- $rows_ord = array();
132
- $rows = array();
133
- $total = 0;
134
- $join_count='';
135
- $checked_ids = '';
136
- $stats_fields = '';
137
-
138
- if($labels) {
139
- $label_id= array();
140
- $label_order= array();
141
- $label_order_original= array();
142
- $label_type= array();
143
- $this_form = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id='%d'", $form_id));
144
- $checked_ids = $this_form->frontend_submit_fields;
145
- $stats_fields = $this_form->frontend_submit_stat_fields;
146
-
147
- if(strpos($this_form->label_order, 'type_paypal_')) {
148
- $this_form->label_order=$this_form->label_order."item_total#**id**#Item Total#**label**#type_paypal_payment_total#****#total#**id**#Total#**label**#type_paypal_payment_total#****#0#**id**#Payment Status#**label**#type_paypal_payment_status#****#";
149
- }
150
- $label_all = explode('#****#',$this_form->label_order);
151
- $label_all = array_slice($label_all,0, count($label_all)-1);
152
- foreach($label_all as $key => $label_each) {
153
- $label_id_each=explode('#**id**#',$label_each);
154
- array_push($label_id, $label_id_each[0]);
155
-
156
- $label_order_each=explode('#**label**#', $label_id_each[1]);
157
- array_push($label_order_original, $label_order_each[0]);
158
-
159
- $ptn = "/[^a-zA-Z0-9_]/";
160
- $rpltxt = "";
161
- $label_temp=preg_replace($ptn, $rpltxt, $label_order_each[0]);
162
- array_push($label_order, $label_temp);
163
- array_push($label_type, $label_order_each[1]);
164
- }
165
-
166
- $join_query=array();
167
- $join_where=array();
168
- $join='';
169
- $is_first=true;
170
-
171
- foreach($label_id as $key => $label) {
172
- if(in_array($label, $labels)) {
173
- array_push($sorted_labels_type, $label_type[$key]);
174
- array_push($sorted_labels, $label_order[$key]);
175
- array_push($sorted_labels_id, $label);
176
- array_push($label_titles, $label_order_original[$key]);
177
- $search_temp = isset($_POST[$form_id.'_'.$label.'_search']) ? $_POST[$form_id.'_'.$label.'_search'] : '';
178
- $search_temp = strtolower( $search_temp );
179
- $lists[$form_id.'_'.$label.'_search'] = $search_temp;
180
- if ( $search_temp ) {
181
- $join_query[] ='search';
182
- $join_where[] =array('label'=>$label, 'search'=>esc_sql($search_temp));
183
- }
184
- }
185
- }
186
- if(strpos($filter_order,"_field")) {
187
- if (in_array(str_replace("_field", "", $filter_order), $labels)) {
188
- $join_query[] ='sort';
189
- $join_where[] =array('label'=>str_replace("_field", "", $filter_order));
190
- }
191
- }
192
- $cols = 'group_id';
193
- if ($filter_order == 'date' or $filter_order == 'ip') {
194
- $cols = 'group_id, date, ip';
195
- }
196
-
197
- switch(count($join_query)) {
198
- case 0:
199
- $join='SELECT distinct group_id FROM ' . $wpdb->prefix . 'formmaker_submits WHERE '. $where;
200
- break;
201
- case 1:
202
- if($join_query[0]=='sort') {
203
- $join = 'SELECT group_id FROM ' . $wpdb->prefix . 'formmaker_submits WHERE '.$where.' AND element_label="'.$join_where[0]['label'].'" ';
204
- $join_count = 'SELECT count(group_id) FROM ' . $wpdb->prefix . 'formmaker_submits WHERE form_id="'.esc_sql((int)$form_id).'" AND element_label="'.$join_where[0]['label'].'" ';
205
- $orderby = ' ORDER BY `element_value` '. $filter_order_Dir .'';
206
- }
207
- else
208
- $join='SELECT group_id FROM ' . $wpdb->prefix . 'formmaker_submits WHERE element_label="'.$join_where[0]['label'].'" AND element_value LIKE "%'.$join_where[0]['search'].'%" AND '. $where;
209
- break;
210
- default:
211
- $join='SELECT t.group_id FROM (SELECT '.$cols.' FROM ' . $wpdb->prefix . 'formmaker_submits WHERE '.$where.' AND element_label="'.$join_where[0]['label'].'" AND element_value LIKE "%'.$join_where[0]['search'].'%" ) as t ';
212
- for($key=1; $key< count($join_query); $key++) {
213
- if($join_query[$key]=='sort') {
214
- $join.='LEFT JOIN (SELECT group_id as group_id'.$key.', element_value FROM ' . $wpdb->prefix . 'formmaker_submits WHERE '.$where.' AND element_label="'.$join_where[$key]['label'].'") as t'.$key.' ON t'.$key.'.group_id'.$key.'=t.group_id ';
215
- $orderby = ' ORDER BY t'.$key.'.`element_value` '. $filter_order_Dir .'';
216
- }
217
- else
218
- $join.='INNER JOIN (SELECT group_id as group_id'.$key.' FROM ' . $wpdb->prefix . 'formmaker_submits WHERE '.$where.' AND element_label="'.$join_where[$key]['label'].'" AND element_value LIKE "%'.$join_where[$key]['search'].'%" ) as t'.$key.' ON t'.$key.'.group_id'.$key.'=t.group_id ';
219
- }
220
- break;
221
- }
222
-
223
- $pos = strpos($join, 'SELECT t.group_id');
224
- if ($pos === false)
225
- $query = str_replace(array('SELECT group_id','SELECT distinct group_id'), array('SELECT count(distinct group_id)','SELECT count(distinct group_id)'), $join);
226
- else
227
- $query = str_replace('SELECT t.group_id', 'SELECT count(t.group_id)', $join);
228
- $total = $wpdb->get_var($query);
229
-
230
- $query = $join.' '.$orderby . ($pagination ? ' limit ' . $limit . ', 20 ' : '') . ' ';
231
-
232
- $rows_ord = $wpdb->get_col($query);
233
-
234
- $where2 = array();
235
- $where2 [] ="group_id='0'";
236
- foreach($rows_ord as $rows_ordd) {
237
- $where2 [] ="group_id='".esc_sql($rows_ordd)."'";
238
- }
239
- $where2 = ( count( $where2 ) ? ' WHERE ' . implode( ' OR ', $where2 ).'' : '' );
240
- $query = "SELECT * FROM " . $wpdb->prefix . "formmaker_submits ".$where2.'';
241
-
242
- $rows = $wpdb->get_results($query);
243
-
244
- if($join_count) {
245
- $total_sort = $wpdb->get_var($join_count);
246
- if($total_sort != $total_entries)
247
- $join_count = $total_sort;
248
- else
249
- $join_count = '';
250
- }
251
- }
252
-
253
- $query = $wpdb->prepare('SELECT views FROM ' . $wpdb->prefix . 'formmaker_views WHERE form_id="%d"', $form_id);
254
- $total_views = $wpdb->get_var($query);
255
-
256
- $pageNav = "";// $pageNav = new JPagination( $total, $limitstart, $limit );
257
-
258
- $lists['order_Dir'] = $filter_order_Dir;
259
- $lists['order'] = $filter_order;
260
- $lists['total'] = $total;
261
- $lists['limit'] = (int) ($limit / 20 + 1);
262
- return array("rows" => $rows, "lists" => $lists, "pageNav" => $pageNav, "sorted_labels" => $sorted_labels, "label_titles" => $label_titles, "rows_ord" => $rows_ord, "sorted_labels_id" => $sorted_labels_id, "sorted_labels_type" => $sorted_labels_type, "total_entries" => $total_entries, "total_views" => $total_views, "join_count" => $join_count, "form_title" => $form_title, "checked_ids" => $checked_ids, "stats_fields" => $stats_fields);
263
- }
264
-
265
- function show_stats() {
266
- global $wpdb;
267
- $form_id = (isset($_POST['form_id']) ? esc_html(stripslashes($_POST['form_id'])) : 0);
268
- $id = (isset($_POST['stat_id']) ? esc_html(stripslashes($_POST['stat_id'])) : 0);
269
- $from = (isset($_POST['from']) ? esc_html(stripslashes($_POST['from'])) : 0);
270
- $to = (isset($_POST['to']) ? esc_html(stripslashes($_POST['to'])) : 0);
271
- $where = ' AND form_id=' . $form_id;
272
- if($from != '')
273
- $where .= " AND `date`>='".$from." 00:00:00' ";
274
- if($to != '')
275
- $where .= " AND `date`<='".$to." 23:59:59' ";
276
- $query = "SELECT element_value FROM " . $wpdb->prefix . "formmaker_submits WHERE element_label='" . $id . "'" . $where;
277
- $choices = $wpdb->get_col($query);
278
- return $choices;
279
- }
280
-
281
- function paypal_info($id) {
282
- global $wpdb;
283
- $query = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker_sessions where group_id='%d'", $id);
284
- return $wpdb->get_row($query);
285
- }
286
-
287
- ////////////////////////////////////////////////////////////////////////////////////////
288
- // Getters & Setters //
289
- ////////////////////////////////////////////////////////////////////////////////////////
290
- ////////////////////////////////////////////////////////////////////////////////////////
291
- // Private Methods //
292
- ////////////////////////////////////////////////////////////////////////////////////////
293
- ////////////////////////////////////////////////////////////////////////////////////////
294
- // Listeners //
295
- ////////////////////////////////////////////////////////////////////////////////////////
296
  }
1
+ <?php
2
+
3
+ class FMModelForm_submissions {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ function showsubmissions($form_id, $startdate, $enddate, $submit_date, $submitter_ip, $username, $useremail, $form_fields, $csv, $xml, $title, $search, $ordering, $entries, $views, $conversion_rate, $pagination, $stats) {
22
+ global $wpdb;
23
+
24
+ $user = wp_get_current_user();
25
+ $userGroups = $wpdb->get_var($wpdb->prepare("SELECT `user_id_wd` FROM " . $wpdb->prefix . "formmaker WHERE id='%d'", $form_id));
26
+ $users = explode(',', $userGroups);
27
+ $users = array_slice($users, 0, count($users) - 1);
28
+ $show_submits = false;
29
+ if(!is_user_logged_in()) {
30
+ if(!in_array('guest', $users))
31
+ return false;
32
+ }
33
+ else {
34
+ foreach($user->roles as $user_role) {
35
+ if(in_array($user_role, $users))
36
+ $show_submits = true;
37
+ }
38
+ if(!$show_submits)
39
+ return false;
40
+ }
41
+ $from = $startdate;
42
+ $to = $enddate;
43
+
44
+ $filter_order = ((isset($_POST['order_by']) && esc_html(stripslashes($_POST['order_by'])) != '') ? esc_html(stripslashes($_POST['order_by'])) : 'group_id');
45
+ $filter_order_Dir = ((isset($_POST['asc_or_desc']) && ($_POST['asc_or_desc'] == 'asc' || $_POST['asc_or_desc'] == 'desc')) ? esc_html($_POST['asc_or_desc']) : 'asc');
46
+
47
+ $ip_search = $submitter_ip;
48
+ $username_search = strtolower($username);
49
+ $useremail_search = strtolower($useremail);
50
+
51
+ $where = array();
52
+ $lists['startdate'] = ((isset($_POST['startdate'])) ? esc_html(stripslashes($_POST['startdate'])) : '');
53
+ $lists['enddate'] = ((isset($_POST['enddate'])) ? esc_html(stripslashes($_POST['enddate'])) : '');
54
+ $lists['hide_label_list'] = ((isset($_POST['hide_label_list'])) ? esc_html(stripslashes($_POST['hide_label_list'])) : '');
55
+
56
+ $lists['ip_search'] = ((isset($_POST['ip_search'])) ? esc_html(stripslashes($_POST['ip_search'])) : '');
57
+ $lists['username_search'] = ((isset($_POST['username_search'])) ? esc_html(stripslashes($_POST['username_search'])) : '');
58
+ $lists['useremail_search'] = ((isset($_POST['useremail_search'])) ? esc_html(stripslashes($_POST['useremail_search'])) : '');
59
+ $limit = ((isset($_POST['page_number'])) ? ((int) $_POST['page_number'] - 1) * 20 : 0);
60
+
61
+ if ( $lists['ip_search'] ) {
62
+ $where[] = 'ip LIKE "%' . esc_sql($lists['ip_search']) . '%"';
63
+ }
64
+ if ( $lists['username_search'] ) {
65
+ $where[] = 'user_id_wd IN (SELECT `id` FROM `' . $wpdb->prefix . 'users` WHERE `display_name` LIKE "%' . esc_sql($lists['username_search']) . '%")';
66
+ }
67
+ if ( $lists['useremail_search'] ) {
68
+ $where[] = 'user_id_wd IN (SELECT `id` FROM `' . $wpdb->prefix . 'users` WHERE `user_email` LIKE "%' . esc_sql($lists['useremail_search']) . '%")';
69
+ }
70
+
71
+ if($from) {
72
+ if($lists['startdate'] != '') {
73
+ if(strtotime($from) > strtotime($lists['startdate']))
74
+ $where[] = "`date` >= '" . $from . " 00:00:00'";
75
+ else
76
+ $where[] ="`date`>='" . $lists['startdate'] . " 00:00:00' ";
77
+ }
78
+ else
79
+ $where[] = "`date` >= '" . $from . " 00:00:00'";
80
+ }
81
+ else {
82
+ if($lists['startdate']!='')
83
+ $where[] =" `date`>='".$lists['startdate']." 00:00:00' ";
84
+ }
85
+ if($to) {
86
+ if($lists['enddate']!='') {
87
+ if(strtotime($to) < strtotime($lists['enddate']))
88
+ $where[] = "`date` <= '".$to." 23:59:59'";
89
+ else
90
+ $where[] ="`date`<='".$lists['enddate']." 23:59:59' ";
91
+ }
92
+ else
93
+ $where[] = "`date` <= '".$to." 23:59:59'";
94
+ }
95
+ else {
96
+ if($lists['enddate']!='')
97
+ $where[] ="`date`<='".$lists['enddate']." 23:59:59' ";
98
+ }
99
+
100
+ $form_title = $wpdb->get_var($wpdb->prepare("SELECT `title` FROM " . $wpdb->prefix . "formmaker WHERE id='%d'", $form_id));
101
+
102
+ $where[] = 'form_id="' . (int)$form_id . '"';
103
+ $where = ( count( $where ) ? ' ' . implode( ' AND ', $where ) : '' );
104
+ $orderby = ' ';
105
+ if ($filter_order == 'id' or $filter_order == 'title' or $filter_order == 'mail') {
106
+ $orderby = ' ORDER BY `date` desc';
107
+ }
108
+ else {
109
+ if ($filter_order == 'group_id' or $filter_order == 'date' or $filter_order == 'ip') {
110
+ $orderby = ' ORDER BY '.$filter_order .' '. $filter_order_Dir .'';
111
+ }
112
+ else {
113
+ if ($filter_order == 'display_name' or $filter_order == 'user_email') {
114
+ $orderby = ' ORDER BY (SELECT `'.$filter_order.'` FROM `' . $wpdb->prefix . 'users` WHERE id=user_id_wd) '. $filter_order_Dir .'';
115
+ }
116
+ }
117
+ }
118
+ $query = "SELECT distinct element_label FROM " . $wpdb->prefix . "formmaker_submits WHERE ". $where;
119
+ $labels = $wpdb->get_col($query);
120
+
121
+ $query = $wpdb->prepare("SELECT id FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id='%d' and element_label=0 limit 0, 1", $form_id);
122
+ $ispaypal = $wpdb->get_var($query);
123
+
124
+ $query = $wpdb->prepare('SELECT count(distinct group_id) FROM ' . $wpdb->prefix . 'formmaker_submits where form_id ="%d"', $form_id);
125
+ $total_entries = $wpdb->get_var($query);
126
+
127
+ $sorted_labels_type= array();
128
+ $sorted_labels_id= array();
129
+ $sorted_labels= array();
130
+ $label_titles=array();
131
+ $rows_ord = array();
132
+ $rows = array();
133
+ $total = 0;
134
+ $join_count='';
135
+ $checked_ids = '';
136
+ $stats_fields = '';
137
+
138
+ if($labels) {
139
+ $label_id= array();
140
+ $label_order= array();
141
+ $label_order_original= array();
142
+ $label_type= array();
143
+ $this_form = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id='%d'", $form_id));
144
+ $checked_ids = $this_form->frontend_submit_fields;
145
+ $stats_fields = $this_form->frontend_submit_stat_fields;
146
+
147
+ if(strpos($this_form->label_order, 'type_paypal_')) {
148
+ $this_form->label_order=$this_form->label_order."item_total#**id**#Item Total#**label**#type_paypal_payment_total#****#total#**id**#Total#**label**#type_paypal_payment_total#****#0#**id**#Payment Status#**label**#type_paypal_payment_status#****#";
149
+ }
150
+ $label_all = explode('#****#',$this_form->label_order);
151
+ $label_all = array_slice($label_all,0, count($label_all)-1);
152
+ foreach($label_all as $key => $label_each) {
153
+ $label_id_each=explode('#**id**#',$label_each);
154
+ array_push($label_id, $label_id_each[0]);
155
+
156
+ $label_order_each=explode('#**label**#', $label_id_each[1]);
157
+ array_push($label_order_original, $label_order_each[0]);
158
+
159
+ $ptn = "/[^a-zA-Z0-9_]/";
160
+ $rpltxt = "";
161
+ $label_temp=preg_replace($ptn, $rpltxt, $label_order_each[0]);
162
+ array_push($label_order, $label_temp);
163
+ array_push($label_type, $label_order_each[1]);
164
+ }
165
+
166
+ $join_query=array();
167
+ $join_where=array();
168
+ $join='';
169
+ $is_first=true;
170
+
171
+ foreach($label_id as $key => $label) {
172
+ if(in_array($label, $labels)) {
173
+ array_push($sorted_labels_type, $label_type[$key]);
174
+ array_push($sorted_labels, $label_order[$key]);
175
+ array_push($sorted_labels_id, $label);
176
+ array_push($label_titles, $label_order_original[$key]);
177
+ $search_temp = isset($_POST[$form_id.'_'.$label.'_search']) ? $_POST[$form_id.'_'.$label.'_search'] : '';
178
+ $search_temp = strtolower( $search_temp );
179
+ $lists[$form_id.'_'.$label.'_search'] = $search_temp;
180
+ if ( $search_temp ) {
181
+ $join_query[] ='search';
182
+ $join_where[] =array('label'=>$label, 'search'=>esc_sql($search_temp));
183
+ }
184
+ }
185
+ }
186
+ if(strpos($filter_order,"_field")) {
187
+ if (in_array(str_replace("_field", "", $filter_order), $labels)) {
188
+ $join_query[] ='sort';
189
+ $join_where[] =array('label'=>str_replace("_field", "", $filter_order));
190
+ }
191
+ }
192
+ $cols = 'group_id';
193
+ if ($filter_order == 'date' or $filter_order == 'ip') {
194
+ $cols = 'group_id, date, ip';
195
+ }
196
+
197
+ switch(count($join_query)) {
198
+ case 0:
199
+ $join='SELECT distinct group_id FROM ' . $wpdb->prefix . 'formmaker_submits WHERE '. $where;
200
+ break;
201
+ case 1:
202
+ if($join_query[0]=='sort') {
203
+ $join = 'SELECT group_id FROM ' . $wpdb->prefix . 'formmaker_submits WHERE '.$where.' AND element_label="'.$join_where[0]['label'].'" ';
204
+ $join_count = 'SELECT count(group_id) FROM ' . $wpdb->prefix . 'formmaker_submits WHERE form_id="'.esc_sql((int)$form_id).'" AND element_label="'.$join_where[0]['label'].'" ';
205
+ $orderby = ' ORDER BY `element_value` '. $filter_order_Dir .'';
206
+ }
207
+ else
208
+ $join='SELECT group_id FROM ' . $wpdb->prefix . 'formmaker_submits WHERE element_label="'.$join_where[0]['label'].'" AND element_value LIKE "%'.$join_where[0]['search'].'%" AND '. $where;
209
+ break;
210
+ default:
211
+ $join='SELECT t.group_id FROM (SELECT '.$cols.' FROM ' . $wpdb->prefix . 'formmaker_submits WHERE '.$where.' AND element_label="'.$join_where[0]['label'].'" AND element_value LIKE "%'.$join_where[0]['search'].'%" ) as t ';
212
+ for($key=1; $key< count($join_query); $key++) {
213
+ if($join_query[$key]=='sort') {
214
+ $join.='LEFT JOIN (SELECT group_id as group_id'.$key.', element_value FROM ' . $wpdb->prefix . 'formmaker_submits WHERE '.$where.' AND element_label="'.$join_where[$key]['label'].'") as t'.$key.' ON t'.$key.'.group_id'.$key.'=t.group_id ';
215
+ $orderby = ' ORDER BY t'.$key.'.`element_value` '. $filter_order_Dir .'';
216
+ }
217
+ else
218
+ $join.='INNER JOIN (SELECT group_id as group_id'.$key.' FROM ' . $wpdb->prefix . 'formmaker_submits WHERE '.$where.' AND element_label="'.$join_where[$key]['label'].'" AND element_value LIKE "%'.$join_where[$key]['search'].'%" ) as t'.$key.' ON t'.$key.'.group_id'.$key.'=t.group_id ';
219
+ }
220
+ break;
221
+ }
222
+
223
+ $pos = strpos($join, 'SELECT t.group_id');
224
+ if ($pos === false)
225
+ $query = str_replace(array('SELECT group_id','SELECT distinct group_id'), array('SELECT count(distinct group_id)','SELECT count(distinct group_id)'), $join);
226
+ else
227
+ $query = str_replace('SELECT t.group_id', 'SELECT count(t.group_id)', $join);
228
+ $total = $wpdb->get_var($query);
229
+
230
+ $query = $join.' '.$orderby . ($pagination ? ' limit ' . $limit . ', 20 ' : '') . ' ';
231
+
232
+ $rows_ord = $wpdb->get_col($query);
233
+
234
+ $where2 = array();
235
+ $where2 [] ="group_id='0'";
236
+ foreach($rows_ord as $rows_ordd) {
237
+ $where2 [] ="group_id='".esc_sql($rows_ordd)."'";
238
+ }
239
+ $where2 = ( count( $where2 ) ? ' WHERE ' . implode( ' OR ', $where2 ).'' : '' );
240
+ $query = "SELECT * FROM " . $wpdb->prefix . "formmaker_submits ".$where2.'';
241
+
242
+ $rows = $wpdb->get_results($query);
243
+
244
+ if($join_count) {
245
+ $total_sort = $wpdb->get_var($join_count);
246
+ if($total_sort != $total_entries)
247
+ $join_count = $total_sort;
248
+ else
249
+ $join_count = '';
250
+ }
251
+ }
252
+
253
+ $query = $wpdb->prepare('SELECT views FROM ' . $wpdb->prefix . 'formmaker_views WHERE form_id="%d"', $form_id);
254
+ $total_views = $wpdb->get_var($query);
255
+
256
+ $pageNav = "";// $pageNav = new JPagination( $total, $limitstart, $limit );
257
+
258
+ $lists['order_Dir'] = $filter_order_Dir;
259
+ $lists['order'] = $filter_order;
260
+ $lists['total'] = $total;
261
+ $lists['limit'] = (int) ($limit / 20 + 1);
262
+ return array("rows" => $rows, "lists" => $lists, "pageNav" => $pageNav, "sorted_labels" => $sorted_labels, "label_titles" => $label_titles, "rows_ord" => $rows_ord, "sorted_labels_id" => $sorted_labels_id, "sorted_labels_type" => $sorted_labels_type, "total_entries" => $total_entries, "total_views" => $total_views, "join_count" => $join_count, "form_title" => $form_title, "checked_ids" => $checked_ids, "stats_fields" => $stats_fields);
263
+ }
264
+
265
+ function show_stats() {
266
+ global $wpdb;
267
+ $form_id = (isset($_POST['form_id']) ? esc_html(stripslashes($_POST['form_id'])) : 0);
268
+ $id = (isset($_POST['stat_id']) ? esc_html(stripslashes($_POST['stat_id'])) : 0);
269
+ $from = (isset($_POST['from']) ? esc_html(stripslashes($_POST['from'])) : 0);
270
+ $to = (isset($_POST['to']) ? esc_html(stripslashes($_POST['to'])) : 0);
271
+ $where = ' AND form_id=' . $form_id;
272
+ if($from != '')
273
+ $where .= " AND `date`>='".$from." 00:00:00' ";
274
+ if($to != '')
275
+ $where .= " AND `date`<='".$to." 23:59:59' ";
276
+ $query = "SELECT element_value FROM " . $wpdb->prefix . "formmaker_submits WHERE element_label='" . $id . "'" . $where;
277
+ $choices = $wpdb->get_col($query);
278
+ return $choices;
279
+ }
280
+
281
+ function paypal_info($id) {
282
+ global $wpdb;
283
+ $query = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker_sessions where group_id='%d'", $id);
284
+ return $wpdb->get_row($query);
285
+ }
286
+
287
+ ////////////////////////////////////////////////////////////////////////////////////////
288
+ // Getters & Setters //
289
+ ////////////////////////////////////////////////////////////////////////////////////////
290
+ ////////////////////////////////////////////////////////////////////////////////////////
291
+ // Private Methods //
292
+ ////////////////////////////////////////////////////////////////////////////////////////
293
+ ////////////////////////////////////////////////////////////////////////////////////////
294
+ // Listeners //
295
+ ////////////////////////////////////////////////////////////////////////////////////////
296
  }
frontend/models/FMModelVerify_email.php CHANGED
@@ -1,115 +1,115 @@
1
- <?php
2
-
3
- class FMModelVerify_email {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- function setValidation($gid, $md5, $email) {
22
- global $wpdb;
23
- $query = $wpdb->prepare("SELECT * FROM ".$wpdb->prefix."formmaker_submits WHERE group_id='%d' AND element_label REGEXP 'verifyInfo'", $gid);
24
- $rows = $wpdb->get_results($query);
25
- if (!$rows) {
26
- return false;
27
- }
28
- $view = '';
29
- foreach ($rows as $row) {
30
- if ($row->element_label == 'verifyInfo') {
31
- $view = __('Your email address is already verified.', 'form_maker');
32
- continue;
33
- }
34
- elseif ($row->element_label == 'verifyInfo@' . $email) {
35
- $verifyInfo = explode('**',$row->element_value);
36
- $key = $verifyInfo[0];
37
- $expHour = $verifyInfo[1];
38
- $recipiend = $verifyInfo[2];
39
- if($recipiend == $email) {
40
- $date = strtotime($row->date);
41
- if($key === $md5){
42
- if($expHour > 0){
43
- $now = time();
44
- $hourInterval = floor(($now - $date)/3600); //return hour
45
- if ($hourInterval <= $expHour) {
46
- $wpdb->update(
47
- $wpdb->prefix."formmaker_submits",
48
- array(
49
- 'element_value' => 'verified**'.$recipiend,
50
- 'element_label' => 'verifyInfo'
51
- ),
52
- array(
53
- 'group_id' => $gid ,
54
- 'element_label' => 'verifyInfo@'.$recipiend
55
- ),
56
- array(
57
- '%s',
58
- '%s'
59
- ),
60
- array( '%d',
61
- '%s'
62
- )
63
- );
64
- $view = __('Your email has been successfully verified.', 'form_maker');
65
- }
66
- else
67
- $view = __('Your email verification has timed out.', 'form_maker'); // 0 = time expired
68
-
69
- }
70
- else
71
- {
72
- $wpdb->update(
73
- $wpdb->prefix."formmaker_submits",
74
- array(
75
- 'element_value' => 'verified**'.$recipiend,
76
- 'element_label' => 'verifyInfo'
77
- ),
78
- array(
79
- 'group_id' => $gid ,
80
- 'element_label' => 'verifyInfo@'.$recipiend
81
- ),
82
- array(
83
- '%s',
84
- '%s'
85
- ),
86
- array( '%d',
87
- '%s'
88
- )
89
- );
90
- $view = __('Your email has been successfully verified.', 'form_maker');
91
-
92
- }
93
- }
94
- else
95
- $view = __('Verification link is invalid.', 'form_maker'); //wrong code
96
-
97
- break;
98
- }
99
- else
100
- continue;
101
- }
102
- }
103
- return $view;
104
- }
105
-
106
- ////////////////////////////////////////////////////////////////////////////////////////
107
- // Getters & Setters //
108
- ////////////////////////////////////////////////////////////////////////////////////////
109
- ////////////////////////////////////////////////////////////////////////////////////////
110
- // Private Methods //
111
- ////////////////////////////////////////////////////////////////////////////////////////
112
- ////////////////////////////////////////////////////////////////////////////////////////
113
- // Listeners //
114
- ////////////////////////////////////////////////////////////////////////////////////////
115
  }
1
+ <?php
2
+
3
+ class FMModelVerify_email {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ function setValidation($gid, $md5, $email) {
22
+ global $wpdb;
23
+ $query = $wpdb->prepare("SELECT * FROM ".$wpdb->prefix."formmaker_submits WHERE group_id='%d' AND element_label REGEXP 'verifyInfo'", $gid);
24
+ $rows = $wpdb->get_results($query);
25
+ if (!$rows) {
26
+ return false;
27
+ }
28
+ $view = '';
29
+ foreach ($rows as $row) {
30
+ if ($row->element_label == 'verifyInfo') {
31
+ $view = __('Your email address is already verified.', 'form_maker');
32
+ continue;
33
+ }
34
+ elseif ($row->element_label == 'verifyInfo@' . $email) {
35
+ $verifyInfo = explode('**',$row->element_value);
36
+ $key = $verifyInfo[0];
37
+ $expHour = $verifyInfo[1];
38
+ $recipiend = $verifyInfo[2];
39
+ if($recipiend == $email) {
40
+ $date = strtotime($row->date);
41
+ if($key === $md5){
42
+ if($expHour > 0){
43
+ $now = time();
44
+ $hourInterval = floor(($now - $date)/3600); //return hour
45
+ if ($hourInterval <= $expHour) {
46
+ $wpdb->update(
47
+ $wpdb->prefix."formmaker_submits",
48
+ array(
49
+ 'element_value' => 'verified**'.$recipiend,
50
+ 'element_label' => 'verifyInfo'
51
+ ),
52
+ array(
53
+ 'group_id' => $gid ,
54
+ 'element_label' => 'verifyInfo@'.$recipiend
55
+ ),
56
+ array(
57
+ '%s',
58
+ '%s'
59
+ ),
60
+ array( '%d',
61
+ '%s'
62
+ )
63
+ );
64
+ $view = __('Your email has been successfully verified.', 'form_maker');
65
+ }
66
+ else
67
+ $view = __('Your email verification has timed out.', 'form_maker'); // 0 = time expired
68
+
69
+ }
70
+ else
71
+ {
72
+ $wpdb->update(
73
+ $wpdb->prefix."formmaker_submits",
74
+ array(
75
+ 'element_value' => 'verified**'.$recipiend,
76
+ 'element_label' => 'verifyInfo'
77
+ ),
78
+ array(
79
+ 'group_id' => $gid ,
80
+ 'element_label' => 'verifyInfo@'.$recipiend
81
+ ),
82
+ array(
83
+ '%s',
84
+ '%s'
85
+ ),
86
+ array( '%d',
87
+ '%s'
88
+ )
89
+ );
90
+ $view = __('Your email has been successfully verified.', 'form_maker');
91
+
92
+ }
93
+ }
94
+ else
95
+ $view = __('Verification link is invalid.', 'form_maker'); //wrong code
96
+
97
+ break;
98
+ }
99
+ else
100
+ continue;
101
+ }
102
+ }
103
+ return $view;
104
+ }
105
+
106
+ ////////////////////////////////////////////////////////////////////////////////////////
107
+ // Getters & Setters //
108
+ ////////////////////////////////////////////////////////////////////////////////////////
109
+ ////////////////////////////////////////////////////////////////////////////////////////
110
+ // Private Methods //
111
+ ////////////////////////////////////////////////////////////////////////////////////////
112
+ ////////////////////////////////////////////////////////////////////////////////////////
113
+ // Listeners //
114
+ ////////////////////////////////////////////////////////////////////////////////////////
115
  }
frontend/views/FMViewForm_maker.php CHANGED
@@ -240,6 +240,7 @@ class FMViewForm_maker {
240
  case "type_number":
241
  case "type_submitter_mail":
242
  case "type_spinner":
 
243
  if($params_value[1] == "%" || $params_value[1] == "!%")
244
  {
245
  $like_or_not = ($params_value[1] == "%" ? ">" : "==");
@@ -256,6 +257,8 @@ class FMViewForm_maker {
256
  }
257
 
258
  $keyup .= '#wdform_'.$params_value[0].'_element'.$form_id.', ';
 
 
259
  if($type_and_id[$params_value[0]] == "type_spinner")
260
  $click .= '#wdform_'.$params_value[0].'_element'.$form_id.' ~ a, ';
261
  break;
@@ -4061,7 +4064,7 @@ class FMViewForm_maker {
4061
  }
4062
  $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos2'].'"><div id="wdform_'.$id1.'_element'.$form_id.'" class="wdform-matrix-table" '.$param['attributes'].'><div style="display: table-row-group;"><div class="wdform-matrix-head"><div style="display: table-cell;"></div>'.$column_labels.'</div>'.$rows_columns.'</div></div></div></div>';
4063
  $onsubmit_js.='
4064
- jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_input_type'.$form_id.'\" value = \"'.$param['w_field_input_type'].'\" /><input type=\"hidden\" name=\"wdform_'.$id1.'_hidden_row'.$form_id.'\" value = \"'.addslashes($param['w_rows']).'\" /><input type=\"hidden\" name=\"wdform_'.$id1.'_hidden_column'.$form_id.'\" value = \"'.addslashes($param['w_columns']).'\" />").appendTo("#form'.$form_id.'");
4065
  ';
4066
  if($required){
4067
  array_push($req_fields, $id1);
240
  case "type_number":
241
  case "type_submitter_mail":
242
  case "type_spinner":
243
+ case "type_date_new":
244
  if($params_value[1] == "%" || $params_value[1] == "!%")
245
  {
246
  $like_or_not = ($params_value[1] == "%" ? ">" : "==");
257
  }
258
 
259
  $keyup .= '#wdform_'.$params_value[0].'_element'.$form_id.', ';
260
+ if($type_and_id[$params_value[0]] == "type_date_new")
261
+ $change .= '#wdform_'.$params_value[0].'_element'.$form_id.', ';
262
  if($type_and_id[$params_value[0]] == "type_spinner")
263
  $click .= '#wdform_'.$params_value[0].'_element'.$form_id.' ~ a, ';
264
  break;
4064
  }
4065
  $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos2'].'"><div id="wdform_'.$id1.'_element'.$form_id.'" class="wdform-matrix-table" '.$param['attributes'].'><div style="display: table-row-group;"><div class="wdform-matrix-head"><div style="display: table-cell;"></div>'.$column_labels.'</div>'.$rows_columns.'</div></div></div></div>';
4066
  $onsubmit_js.='
4067
+ jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_input_type'.$form_id.'\" value = \"'.$param['w_field_input_type'].'\" /><input type=\"hidden\" name=\"wdform_'.$id1.'_hidden_row'.$form_id.'\" value = \"'.esc_html(addslashes($param['w_rows'])).'\" /><input type=\"hidden\" name=\"wdform_'.$id1.'_hidden_column'.$form_id.'\" value = \"'.esc_html(addslashes($param['w_columns'])).'\" />").appendTo("#form'.$form_id.'");
4068
  ';
4069
  if($required){
4070
  array_push($req_fields, $id1);
frontend/views/FMViewVerify_email.php CHANGED
@@ -1,37 +1,37 @@
1
- <?php
2
-
3
- class FMViewVerify_email {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $model;
14
-
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- // Constructor & Destructor //
17
- ////////////////////////////////////////////////////////////////////////////////////////
18
- public function __construct($model) {
19
- $this->model = $model;
20
- }
21
- ////////////////////////////////////////////////////////////////////////////////////////
22
- // Public Methods //
23
- ////////////////////////////////////////////////////////////////////////////////////////
24
- public function display($result) {
25
- echo WDW_FM_Library::message($result, 'warning', 0);
26
- }
27
-
28
- ////////////////////////////////////////////////////////////////////////////////////////
29
- // Getters & Setters //
30
- ////////////////////////////////////////////////////////////////////////////////////////
31
- ////////////////////////////////////////////////////////////////////////////////////////
32
- // Private Methods //
33
- ////////////////////////////////////////////////////////////////////////////////////////
34
- ////////////////////////////////////////////////////////////////////////////////////////
35
- // Listeners //
36
- ////////////////////////////////////////////////////////////////////////////////////////
37
  }
1
+ <?php
2
+
3
+ class FMViewVerify_email {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ private $model;
14
+
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ // Constructor & Destructor //
17
+ ////////////////////////////////////////////////////////////////////////////////////////
18
+ public function __construct($model) {
19
+ $this->model = $model;
20
+ }
21
+ ////////////////////////////////////////////////////////////////////////////////////////
22
+ // Public Methods //
23
+ ////////////////////////////////////////////////////////////////////////////////////////
24
+ public function display($result) {
25
+ echo WDW_FM_Library::message($result, 'warning', 0);
26
+ }
27
+
28
+ ////////////////////////////////////////////////////////////////////////////////////////
29
+ // Getters & Setters //
30
+ ////////////////////////////////////////////////////////////////////////////////////////
31
+ ////////////////////////////////////////////////////////////////////////////////////////
32
+ // Private Methods //
33
+ ////////////////////////////////////////////////////////////////////////////////////////
34
+ ////////////////////////////////////////////////////////////////////////////////////////
35
+ // Listeners //
36
+ ////////////////////////////////////////////////////////////////////////////////////////
37
  }
images/01/01/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/01/02/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/01/03/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/01/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/02/01/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/02/02/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/02/03/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/02/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/03/01/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/03/02/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/03/03/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/03/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/04/01/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/04/02/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/04/03/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/04/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/05/01/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/05/02/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/05/03/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/05/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/06/01/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/06/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/07/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/08/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/09/01/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/09/02/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/09/03/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/09/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/10/01/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/10/02/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/10/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/flags/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
images/logowd.png ADDED
Binary file
js/calendar/calendar.js CHANGED
@@ -1,36 +1,36 @@
1
- /* Copyright Mihai Bazon, 2002-2005 | www.bazon.net/mishoo
2
- * -----------------------------------------------------------
3
- *
4
- * The DHTML Calendar, version 1.0 "It is happening again"
5
- *
6
- * Details and latest version at:
7
- * www.dynarch.com/projects/calendar
8
- *
9
- * This script is developed by Dynarch.com. Visit us at www.dynarch.com.
10
- *
11
- * This script is distributed under the GNU Lesser General Public License.
12
- * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
13
- */
14
- Calendar=function(firstDayOfWeek,dateStr,onSelected,onClose){
15
- Calendar._DN = new Array ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday");Calendar._SDN = new Array ("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"); Calendar._FD = 0; Calendar._MN = new Array ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); Calendar._SMN = new Array ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");Calendar._TT = {};Calendar._TT["INFO"] = "About the Calendar";
16
- Calendar._TT["ABOUT"] =
17
- "DHTML Date/Time Selector\n" +
18
- "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" +
19
- "For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
20
- "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
21
- "\n\n" +
22
- "Date selection:\n" +
23
- "- Use the \xab, \xbb buttons to select year\n" +
24
- "- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" +
25
- "- Hold mouse button on any of the above buttons for faster selection.";
26
- Calendar._TT["ABOUT_TIME"] = "\n\n" +
27
- "Time selection:\n" +
28
- "- Click on any of the time parts to increase it\n" +
29
- "- or Shift-click to decrease it\n" +
30
- "- or click and drag for faster selection.";
31
-
32
- Calendar._TT["PREV_YEAR"] = "Click to move to the previous year. Click and hold for a list of years.";Calendar._TT["PREV_MONTH"] = "Click to move to the previous month. Click and hold for a list of the months."; Calendar._TT["GO_TODAY"] = "Go to today";Calendar._TT["NEXT_MONTH"] = "Click to move to the next month. Click and hold for a list of the months.";Calendar._TT["NEXT_YEAR"] = "Click to move to the next year. Click and hold for a list of years.";Calendar._TT["SEL_DATE"] = "Select a date.";Calendar._TT["DRAG_TO_MOVE"] = "Drag to move";Calendar._TT["PART_TODAY"] = " (Today)";Calendar._TT["DAY_FIRST"] = "Display %s first";Calendar._TT["WEEKEND"] = "0,6";Calendar._TT["CLOSE"] = "Close";Calendar._TT["TODAY"] = "Today";Calendar._TT["TIME_PART"] = "(Shift-)Click or Drag to change the value.";Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%A, %B %e";Calendar._TT["WK"] = "wk";Calendar._TT["TIME"] = "Time:";
33
-
34
-
35
-
36
  this.activeDiv=null;this.currentDateEl=null;this.getDateStatus=null;this.getDateToolTip=null;this.getDateText=null;this.timeout=null;this.onSelected=onSelected||null;this.onClose=onClose||null;this.dragging=false;this.hidden=false;this.minYear=1970;this.maxYear=2050;this.dateFormat=Calendar._TT["DEF_DATE_FORMAT"];this.ttDateFormat=Calendar._TT["TT_DATE_FORMAT"];this.isPopup=true;this.weekNumbers=true;this.firstDayOfWeek=typeof firstDayOfWeek=="number"?firstDayOfWeek:Calendar._FD;this.showsOtherMonths=false;this.dateStr=dateStr;this.ar_days=null;this.showsTime=false;this.time24=true;this.yearStep=2;this.hiliteToday=true;this.multiple=null;this.table=null;this.element=null;this.tbody=null;this.firstdayname=null;this.monthsCombo=null;this.yearsCombo=null;this.hilitedMonth=null;this.activeMonth=null;this.hilitedYear=null;this.activeYear=null;this.dateClicked=false;if(typeof Calendar._SDN=="undefined"){if(typeof Calendar._SDN_len=="undefined")Calendar._SDN_len=3;var ar=new Array();for(var i=8;i>0;){ar[--i]=Calendar._DN[i].substr(0,Calendar._SDN_len);}Calendar._SDN=ar;if(typeof Calendar._SMN_len=="undefined")Calendar._SMN_len=3;ar=new Array();for(var i=12;i>0;){ar[--i]=Calendar._MN[i].substr(0,Calendar._SMN_len);}Calendar._SMN=ar;}};Calendar._C=null;Calendar.is_ie=(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent));Calendar.is_ie5=(Calendar.is_ie&&/msie 5\.0/i.test(navigator.userAgent));Calendar.is_opera=/opera/i.test(navigator.userAgent);Calendar.is_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);Calendar.getAbsolutePos=function(el){var SL=0,ST=0;var is_div=/^div$/i.test(el.tagName);if(is_div&&el.scrollLeft)SL=el.scrollLeft;if(is_div&&el.scrollTop)ST=el.scrollTop;var r={x:el.offsetLeft-SL,y:el.offsetTop-ST};if(el.offsetParent){var tmp=this.getAbsolutePos(el.offsetParent);r.x+=tmp.x;r.y+=tmp.y;}return r;};Calendar.isRelated=function(el,evt){var related=evt.relatedTarget;if(!related){var type=evt.type;if(type=="mouseover"){related=evt.fromElement;}else if(type=="mouseout"){related=evt.toElement;}}while(related){if(related==el){return true;}related=related.parentNode;}return false;};Calendar.removeClass=function(el,className){if(!(el&&el.className)){return;}var cls=el.className.split(" ");var ar=new Array();for(var i=cls.length;i>0;){if(cls[--i]!=className){ar[ar.length]=cls[i];}}el.className=ar.join(" ");};Calendar.addClass=function(el,className){Calendar.removeClass(el,className);el.className+=" "+className;};Calendar.getElement=function(ev){var f=Calendar.is_ie?window.event.srcElement:ev.currentTarget;while(f.nodeType!=1||/^div$/i.test(f.tagName))f=f.parentNode;return f;};Calendar.getTargetElement=function(ev){var f=Calendar.is_ie?window.event.srcElement:ev.target;while(f.nodeType!=1)f=f.parentNode;return f;};Calendar.stopEvent=function(ev){ev||(ev=window.event);if(Calendar.is_ie){ev.cancelBubble=true;ev.returnValue=false;}else{ev.preventDefault();ev.stopPropagation();}return false;};Calendar.addEvent=function(el,evname,func){if(el.attachEvent){el.attachEvent("on"+evname,func);}else if(el.addEventListener){el.addEventListener(evname,func,true);}else{el["on"+evname]=func;}};Calendar.removeEvent=function(el,evname,func){if(el.detachEvent){el.detachEvent("on"+evname,func);}else if(el.removeEventListener){el.removeEventListener(evname,func,true);}else{el["on"+evname]=null;}};Calendar.createElement=function(type,parent){var el=null;if(document.createElementNS){el=document.createElementNS("http://www.w3.org/1999/xhtml",type);}else{el=document.createElement(type);}if(typeof parent!="undefined"){parent.appendChild(el);}return el;};Calendar._add_evs=function(el){with(Calendar){addEvent(el,"mouseover",dayMouseOver);addEvent(el,"mousedown",dayMouseDown);addEvent(el,"mouseout",dayMouseOut);if(is_ie){addEvent(el,"dblclick",dayMouseDblClick);el.setAttribute("unselectable",true);}}};Calendar.findMonth=function(el){if(typeof el.month!="undefined"){return el;}else if(typeof el.parentNode.month!="undefined"){return el.parentNode;}return null;};Calendar.findYear=function(el){if(typeof el.year!="undefined"){return el;}else if(typeof el.parentNode.year!="undefined"){return el.parentNode;}return null;};Calendar.showMonthsCombo=function(){var cal=Calendar._C;if(!cal){return false;}var cal=cal;var cd=cal.activeDiv;var mc=cal.monthsCombo;if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}if(cal.activeMonth){Calendar.removeClass(cal.activeMonth,"active");}var mon=cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];Calendar.addClass(mon,"active");cal.activeMonth=mon;var s=mc.style;s.display="block";if(cd.navtype<0)s.left=cd.offsetLeft+"px";else{var mcw=mc.offsetWidth;if(typeof mcw=="undefined")mcw=50;s.left=(cd.offsetLeft+cd.offsetWidth-mcw)+"px";}s.top=(cd.offsetTop+cd.offsetHeight)+"px";};Calendar.showYearsCombo=function(fwd){var cal=Calendar._C;if(!cal){return false;}var cal=cal;var cd=cal.activeDiv;var yc=cal.yearsCombo;if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}if(cal.activeYear){Calendar.removeClass(cal.activeYear,"active");}cal.activeYear=null;var Y=cal.date.getFullYear()+(fwd?1:-1);var yr=yc.firstChild;var show=false;for(var i=12;i>0;--i){if(Y>=cal.minYear&&Y<=cal.maxYear){yr.innerHTML=Y;yr.year=Y;yr.style.display="block";show=true;}else{yr.style.display="none";}yr=yr.nextSibling;Y+=fwd?cal.yearStep:-cal.yearStep;}if(show){var s=yc.style;s.display="block";if(cd.navtype<0)s.left=cd.offsetLeft+"px";else{var ycw=yc.offsetWidth;if(typeof ycw=="undefined")ycw=50;s.left=(cd.offsetLeft+cd.offsetWidth-ycw)+"px";}s.top=(cd.offsetTop+cd.offsetHeight)+"px";}};Calendar.tableMouseUp=function(ev){var cal=Calendar._C;if(!cal){return false;}if(cal.timeout){clearTimeout(cal.timeout);}var el=cal.activeDiv;if(!el){return false;}var target=Calendar.getTargetElement(ev);ev||(ev=window.event);Calendar.removeClass(el,"active");if(target==el||target.parentNode==el){Calendar.cellClick(el,ev);}var mon=Calendar.findMonth(target);var date=null;if(mon){date=new Date(cal.date);if(mon.month!=date.getMonth()){date.setMonth(mon.month);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}else{var year=Calendar.findYear(target);if(year){date=new Date(cal.date);if(year.year!=date.getFullYear()){date.setFullYear(year.year);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}}with(Calendar){removeEvent(document,"mouseup",tableMouseUp);removeEvent(document,"mouseover",tableMouseOver);removeEvent(document,"mousemove",tableMouseOver);cal._hideCombos();_C=null;return stopEvent(ev);}};Calendar.tableMouseOver=function(ev){var cal=Calendar._C;if(!cal){return;}var el=cal.activeDiv;var target=Calendar.getTargetElement(ev);if(target==el||target.parentNode==el){Calendar.addClass(el,"hilite active");Calendar.addClass(el.parentNode,"rowhilite");}else{if(typeof el.navtype=="undefined"||(el.navtype!=50&&(el.navtype==0||Math.abs(el.navtype)>2)))Calendar.removeClass(el,"active");Calendar.removeClass(el,"hilite");Calendar.removeClass(el.parentNode,"rowhilite");}ev||(ev=window.event);if(el.navtype==50&&target!=el){var pos=Calendar.getAbsolutePos(el);var w=el.offsetWidth;var x=ev.clientX;var dx;var decrease=true;if(x>pos.x+w){dx=x-pos.x-w;decrease=false;}else dx=pos.x-x;if(dx<0)dx=0;var range=el._range;var current=el._current;var count=Math.floor(dx/10)%range.length;for(var i=range.length;--i>=0;)if(range[i]==current)break;while(count-->0)if(decrease){if(--i<0)i=range.length-1;}else if(++i>=range.length)i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime();}var mon=Calendar.findMonth(target);if(mon){if(mon.month!=cal.date.getMonth()){if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}Calendar.addClass(mon,"hilite");cal.hilitedMonth=mon;}else if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}}else{if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}var year=Calendar.findYear(target);if(year){if(year.year!=cal.date.getFullYear()){if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}Calendar.addClass(year,"hilite");cal.hilitedYear=year;}else if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}}else if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}}return Calendar.stopEvent(ev);};Calendar.tableMouseDown=function(ev){if(Calendar.getTargetElement(ev)==Calendar.getElement(ev)){return Calendar.stopEvent(ev);}};Calendar.calDragIt=function(ev){var cal=Calendar._C;if(!(cal&&cal.dragging)){return false;}var posX;var posY;if(Calendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posX=ev.pageX;posY=ev.pageY;}cal.hideShowCovered();var st=cal.element.style;st.left=(posX-cal.xOffs)+"px";st.top=(posY-cal.yOffs)+"px";return Calendar.stopEvent(ev);};Calendar.calDragEnd=function(ev){var cal=Calendar._C;if(!cal){return false;}cal.dragging=false;with(Calendar){removeEvent(document,"mousemove",calDragIt);removeEvent(document,"mouseup",calDragEnd);tableMouseUp(ev);}cal.hideShowCovered();};Calendar.dayMouseDown=function(ev){var el=Calendar.getElement(ev);if(el.disabled){return false;}var cal=el.calendar;cal.activeDiv=el;Calendar._C=cal;if(el.navtype!=300)with(Calendar){if(el.navtype==50){el._current=el.innerHTML;addEvent(document,"mousemove",tableMouseOver);}else addEvent(document,Calendar.is_ie5?"mousemove":"mouseover",tableMouseOver);addClass(el,"hilite active");addEvent(document,"mouseup",tableMouseUp);}else if(cal.isPopup){cal._dragStart(ev);}if(el.navtype==-1||el.navtype==1){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout("Calendar.showMonthsCombo()",250);}else if(el.navtype==-2||el.navtype==2){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout((el.navtype>0)?"Calendar.showYearsCombo(true)":"Calendar.showYearsCombo(false)",250);}else{cal.timeout=null;}return Calendar.stopEvent(ev);};Calendar.dayMouseDblClick=function(ev){Calendar.cellClick(Calendar.getElement(ev),ev||window.event);if(Calendar.is_ie){document.selection.empty();}};Calendar.dayMouseOver=function(ev){var el=Calendar.getElement(ev);if(Calendar.isRelated(el,ev)||Calendar._C||el.disabled){return false;}if(el.ttip){if(el.ttip.substr(0,1)=="_"){el.ttip=el.caldate.print(el.calendar.ttDateFormat)+el.ttip.substr(1);}el.calendar.tooltips.innerHTML=el.ttip;}if(el.navtype!=300){Calendar.addClass(el,"hilite");if(el.caldate){Calendar.addClass(el.parentNode,"rowhilite");}}return Calendar.stopEvent(ev);};Calendar.dayMouseOut=function(ev){with(Calendar){var el=getElement(ev);if(isRelated(el,ev)||_C||el.disabled)return false;removeClass(el,"hilite");if(el.caldate)removeClass(el.parentNode,"rowhilite");if(el.calendar)el.calendar.tooltips.innerHTML=_TT["SEL_DATE"];return stopEvent(ev);}};Calendar.cellClick=function(el,ev){var cal=el.calendar;var closing=false;var newdate=false;var date=null;if(typeof el.navtype=="undefined"){if(cal.currentDateEl){Calendar.removeClass(cal.currentDateEl,"selected");Calendar.addClass(el,"selected");closing=(cal.currentDateEl==el);if(!closing){cal.currentDateEl=el;}}cal.date.setDateOnly(el.caldate);date=cal.date;var other_month=!(cal.dateClicked=!el.otherMonth);if(!other_month&&!cal.currentDateEl)cal._toggleMultipleDate(new Date(date));else newdate=!el.disabled;if(other_month)cal._init(cal.firstDayOfWeek,date);}else{if(el.navtype==200){Calendar.removeClass(el,"hilite");cal.callCloseHandler();return;}date=new Date(cal.date);if(el.navtype==0)date.setDateOnly(new Date());cal.dateClicked=false;var year=date.getFullYear();var mon=date.getMonth();function setMonth(m){var day=date.getDate();var max=date.getMonthDays(m);if(day>max){date.setDate(max);}date.setMonth(m);};switch(el.navtype){case 400:Calendar.removeClass(el,"hilite");var text=Calendar._TT["ABOUT"];if(typeof text!="undefined"){text+=cal.showsTime?Calendar._TT["ABOUT_TIME"]:"";}else{text="Help and about box text is not translated into this language.\n"+"If you know this language and you feel generous please update\n"+"the corresponding file in \"lang\" subdir to match calendar-en.js\n"+"and send it back to <mihai_bazon@yahoo.com> to get it into the distribution ;-)\n\n"+"Thank you!\n"+"http://dynarch.com/mishoo/calendar.epl\n";}alert(text);return;case-2:if(year>cal.minYear){date.setFullYear(year-1);}break;case-1:if(mon>0){setMonth(mon-1);}else if(year-->cal.minYear){date.setFullYear(year);setMonth(11);}break;case 1:if(mon<11){setMonth(mon+1);}else if(year<cal.maxYear){date.setFullYear(year+1);setMonth(0);}break;case 2:if(year<cal.maxYear){date.setFullYear(year+1);}break;case 100:cal.setFirstDayOfWeek(el.fdow);return;case 50:var range=el._range;var current=el.innerHTML;for(var i=range.length;--i>=0;)if(range[i]==current)break;if(ev&&ev.shiftKey){if(--i<0)i=range.length-1;}else if(++i>=range.length)i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime();return;case 0:if((typeof cal.getDateStatus=="function")&&cal.getDateStatus(date,date.getFullYear(),date.getMonth(),date.getDate())){return false;}break;}if(!date.equalsTo(cal.date)){cal.setDate(date);newdate=true;}else if(el.navtype==0)newdate=closing=true;}if(newdate){ev&&cal.callHandler();}if(closing){Calendar.removeClass(el,"hilite");ev&&cal.callCloseHandler();}};Calendar.prototype.create=function(_par){var parent=null;if(!_par){parent=document.getElementsByTagName("body")[0];this.isPopup=true;}else{parent=_par;this.isPopup=false;}this.date=this.dateStr?new Date(this.dateStr):new Date();var table=Calendar.createElement("table");this.table=table;table.cellSpacing=0;table.cellPadding=0;table.calendar=this;Calendar.addEvent(table,"mousedown",Calendar.tableMouseDown);var div=Calendar.createElement("div");this.element=div;div.className="calendar";if(this.isPopup){div.style.position="absolute";div.style.display="none";}div.appendChild(table);var thead=Calendar.createElement("thead",table);var cell=null;var row=null;var cal=this;var hh=function(text,cs,navtype){cell=Calendar.createElement("td",row);cell.colSpan=cs;cell.className="button";if(navtype!=0&&Math.abs(navtype)<=2)cell.className+=" nav";Calendar._add_evs(cell);cell.calendar=cal;cell.navtype=navtype;cell.innerHTML="<div unselectable='on'>"+text+"</div>";return cell;};row=Calendar.createElement("tr",thead);var title_length=6;(this.isPopup)&&--title_length;(this.weekNumbers)&&++title_length;hh("?",1,400).ttip=Calendar._TT["INFO"];this.title=hh("",title_length,300);this.title.className="title";if(this.isPopup){this.title.ttip=Calendar._TT["DRAG_TO_MOVE"];this.title.style.cursor="move";hh("&#x00d7;",1,200).ttip=Calendar._TT["CLOSE"];}row=Calendar.createElement("tr",thead);row.className="headrow";this._nav_py=hh("&#x00ab;",1,-2);this._nav_py.ttip=Calendar._TT["PREV_YEAR"];this._nav_pm=hh("&#x2039;",1,-1);this._nav_pm.ttip=Calendar._TT["PREV_MONTH"];this._nav_now=hh(Calendar._TT["TODAY"],this.weekNumbers?4:3,0);this._nav_now.ttip=Calendar._TT["GO_TODAY"];this._nav_nm=hh("&#x203a;",1,1);this._nav_nm.ttip=Calendar._TT["NEXT_MONTH"];this._nav_ny=hh("&#x00bb;",1,2);this._nav_ny.ttip=Calendar._TT["NEXT_YEAR"];row=Calendar.createElement("tr",thead);row.className="daynames";if(this.weekNumbers){cell=Calendar.createElement("td",row);cell.className="name wn";cell.innerHTML=Calendar._TT["WK"];}for(var i=7;i>0;--i){cell=Calendar.createElement("td",row);if(!i){cell.navtype=100;cell.calendar=this;Calendar._add_evs(cell);}}this.firstdayname=(this.weekNumbers)?row.firstChild.nextSibling:row.firstChild;this._displayWeekdays();var tbody=Calendar.createElement("tbody",table);this.tbody=tbody;for(i=6;i>0;--i){row=Calendar.createElement("tr",tbody);if(this.weekNumbers){cell=Calendar.createElement("td",row);}for(var j=7;j>0;--j){cell=Calendar.createElement("td",row);cell.calendar=this;Calendar._add_evs(cell);}}if(this.showsTime){row=Calendar.createElement("tr",tbody);row.className="time";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;cell.innerHTML=Calendar._TT["TIME"]||"&nbsp;";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=this.weekNumbers?4:3;(function(){function makeTimePart(className,init,range_start,range_end){var part=Calendar.createElement("span",cell);part.className=className;part.innerHTML=init;part.calendar=cal;part.ttip=Calendar._TT["TIME_PART"];part.navtype=50;part._range=[];if(typeof range_start!="number")part._range=range_start;else{for(var i=range_start;i<=range_end;++i){var txt;if(i<10&&range_end>=10)txt='0'+i;else txt=''+i;part._range[part._range.length]=txt;}}Calendar._add_evs(part);return part;};var hrs=cal.date.getHours();var mins=cal.date.getMinutes();var t12=!cal.time24;var pm=(hrs>12);if(t12&&pm)hrs-=12;var H=makeTimePart("hour",hrs,t12?1:0,t12?12:23);var span=Calendar.createElement("span",cell);span.innerHTML=":";span.className="colon";var M=makeTimePart("minute",mins,0,59);var AP=null;cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;if(t12)AP=makeTimePart("ampm",pm?"pm":"am",["am","pm"]);else cell.innerHTML="&nbsp;";cal.onSetTime=function(){var pm,hrs=this.date.getHours(),mins=this.date.getMinutes();if(t12){pm=(hrs>=12);if(pm)hrs-=12;if(hrs==0)hrs=12;AP.innerHTML=pm?"pm":"am";}H.innerHTML=(hrs<10)?("0"+hrs):hrs;M.innerHTML=(mins<10)?("0"+mins):mins;};cal.onUpdateTime=function(){var date=this.date;var h=parseInt(H.innerHTML,10);if(t12){if(/pm/i.test(AP.innerHTML)&&h<12)h+=12;else if(/am/i.test(AP.innerHTML)&&h==12)h=0;}var d=date.getDate();var m=date.getMonth();var y=date.getFullYear();date.setHours(h);date.setMinutes(parseInt(M.innerHTML,10));date.setFullYear(y);date.setMonth(m);date.setDate(d);this.dateClicked=false;this.callHandler();};})();}else{this.onSetTime=this.onUpdateTime=function(){};}var tfoot=Calendar.createElement("tfoot",table);row=Calendar.createElement("tr",tfoot);row.className="footrow";cell=hh(Calendar._TT["SEL_DATE"],this.weekNumbers?8:7,300);cell.className="ttip";if(this.isPopup){cell.ttip=Calendar._TT["DRAG_TO_MOVE"];cell.style.cursor="move";}this.tooltips=cell;div=Calendar.createElement("div",this.element);this.monthsCombo=div;div.className="combo";for(i=0;i<Calendar._MN.length;++i){var mn=Calendar.createElement("div");mn.className=Calendar.is_ie?"label-IEfix":"label";mn.month=i;mn.innerHTML=Calendar._SMN[i];div.appendChild(mn);}div=Calendar.createElement("div",this.element);this.yearsCombo=div;div.className="combo";for(i=12;i>0;--i){var yr=Calendar.createElement("div");yr.className=Calendar.is_ie?"label-IEfix":"label";div.appendChild(yr);}this._init(this.firstDayOfWeek,this.date);parent.appendChild(this.element);};Calendar._keyEvent=function(ev){var cal=window._dynarch_popupCalendar;if(!cal||cal.multiple)return false;(Calendar.is_ie)&&(ev=window.event);var act=(Calendar.is_ie||ev.type=="keypress"),K=ev.keyCode;if(ev.ctrlKey){switch(K){case 37:act&&Calendar.cellClick(cal._nav_pm);break;case 38:act&&Calendar.cellClick(cal._nav_py);break;case 39:act&&Calendar.cellClick(cal._nav_nm);break;case 40:act&&Calendar.cellClick(cal._nav_ny);break;default:return false;}}else switch(K){case 32:Calendar.cellClick(cal._nav_now);break;case 27:act&&cal.callCloseHandler();break;case 37:case 38:case 39:case 40:if(act){var prev,x,y,ne,el,step;prev=K==37||K==38;step=(K==37||K==39)?1:7;function setVars(){el=cal.currentDateEl;var p=el.pos;x=p&15;y=p>>4;ne=cal.ar_days[y][x];};setVars();function prevMonth(){var date=new Date(cal.date);date.setDate(date.getDate()-step);cal.setDate(date);};function nextMonth(){var date=new Date(cal.date);date.setDate(date.getDate()+step);cal.setDate(date);};while(1){switch(K){case 37:if(--x>=0)ne=cal.ar_days[y][x];else{x=6;K=38;continue;}break;case 38:if(--y>=0)ne=cal.ar_days[y][x];else{prevMonth();setVars();}break;case 39:if(++x<7)ne=cal.ar_days[y][x];else{x=0;K=40;continue;}break;case 40:if(++y<cal.ar_days.length)ne=cal.ar_days[y][x];else{nextMonth();setVars();}break;}break;}if(ne){if(!ne.disabled)Calendar.cellClick(ne);else if(prev)prevMonth();else nextMonth();}}break;case 13:if(act)Calendar.cellClick(cal.currentDateEl,ev);break;default:return false;}return Calendar.stopEvent(ev);};Calendar.prototype._init=function(firstDayOfWeek,date){var today=new Date(),TY=today.getFullYear(),TM=today.getMonth(),TD=today.getDate();this.table.style.visibility="hidden";var year=date.getFullYear();if(year<this.minYear){year=this.minYear;date.setFullYear(year);}else if(year>this.maxYear){year=this.maxYear;date.setFullYear(year);}this.firstDayOfWeek=firstDayOfWeek;this.date=new Date(date);var month=date.getMonth();var mday=date.getDate();var no_days=date.getMonthDays();date.setDate(1);var day1=(date.getDay()-this.firstDayOfWeek)%7;if(day1<0)day1+=7;date.setDate(-day1);date.setDate(date.getDate()+1);var row=this.tbody.firstChild;var MN=Calendar._SMN[month];var ar_days=this.ar_days=new Array();var weekend=Calendar._TT["WEEKEND"];var dates=this.multiple?(this.datesCells={}):null;for(var i=0;i<6;++i,row=row.nextSibling){var cell=row.firstChild;if(this.weekNumbers){cell.className="day wn";cell.innerHTML=date.getWeekNumber();cell=cell.nextSibling;}row.className="daysrow";var hasdays=false,iday,dpos=ar_days[i]=[];for(var j=0;j<7;++j,cell=cell.nextSibling,date.setDate(iday+1)){iday=date.getDate();var wday=date.getDay();cell.className="day";cell.pos=i<<4|j;dpos[j]=cell;var current_month=(date.getMonth()==month);if(!current_month){if(this.showsOtherMonths){cell.className+=" othermonth";cell.otherMonth=true;}else{cell.className="emptycell";cell.innerHTML="&nbsp;";cell.disabled=true;continue;}}else{cell.otherMonth=false;hasdays=true;}cell.disabled=false;cell.innerHTML=this.getDateText?this.getDateText(date,iday):iday;if(dates)dates[date.print("%Y%m%d")]=cell;if(this.getDateStatus){var status=this.getDateStatus(date,year,month,iday);if(this.getDateToolTip){var toolTip=this.getDateToolTip(date,year,month,iday);if(toolTip)cell.title=toolTip;}if(status===true){cell.className+=" disabled";cell.disabled=true;}else{if(/disabled/i.test(status))cell.disabled=true;cell.className+=" "+status;}}if(!cell.disabled){cell.caldate=new Date(date);cell.ttip="_";if(!this.multiple&&current_month&&iday==mday&&this.hiliteToday){cell.className+=" selected";this.currentDateEl=cell;}if(date.getFullYear()==TY&&date.getMonth()==TM&&iday==TD){cell.className+=" today";cell.ttip+=Calendar._TT["PART_TODAY"];}if(weekend.indexOf(wday.toString())!=-1)cell.className+=cell.otherMonth?" oweekend":" weekend";}}if(!(hasdays||this.showsOtherMonths))row.className="emptyrow";}this.title.innerHTML=Calendar._MN[month]+", "+year;this.onSetTime();this.table.style.visibility="visible";this._initMultipleDates();};Calendar.prototype._initMultipleDates=function(){if(this.multiple){for(var i in this.multiple){var cell=this.datesCells[i];var d=this.multiple[i];if(!d)continue;if(cell)cell.className+=" selected";}}};Calendar.prototype._toggleMultipleDate=function(date){if(this.multiple){var ds=date.print("%Y%m%d");var cell=this.datesCells[ds];if(cell){var d=this.multiple[ds];if(!d){Calendar.addClass(cell,"selected");this.multiple[ds]=date;}else{Calendar.removeClass(cell,"selected");delete this.multiple[ds];}}}};Calendar.prototype.setDateToolTipHandler=function(unaryFunction){this.getDateToolTip=unaryFunction;};Calendar.prototype.setDate=function(date){if(!date.equalsTo(this.date)){this._init(this.firstDayOfWeek,date);}};Calendar.prototype.refresh=function(){this._init(this.firstDayOfWeek,this.date);};Calendar.prototype.setFirstDayOfWeek=function(firstDayOfWeek){this._init(firstDayOfWeek,this.date);this._displayWeekdays();};Calendar.prototype.setDateStatusHandler=Calendar.prototype.setDisabledHandler=function(unaryFunction){this.getDateStatus=unaryFunction;};Calendar.prototype.setRange=function(a,z){this.minYear=a;this.maxYear=z;};Calendar.prototype.callHandler=function(){if(this.onSelected){this.onSelected(this,this.date.print(this.dateFormat));}};Calendar.prototype.callCloseHandler=function(){if(this.onClose){this.onClose(this);}this.hideShowCovered();};Calendar.prototype.destroy=function(){var el=this.element.parentNode;el.removeChild(this.element);Calendar._C=null;window._dynarch_popupCalendar=null;};Calendar.prototype.reparent=function(new_parent){var el=this.element;el.parentNode.removeChild(el);new_parent.appendChild(el);};Calendar._checkCalendar=function(ev){var calendar=window._dynarch_popupCalendar;if(!calendar){return false;}var el=Calendar.is_ie?Calendar.getElement(ev):Calendar.getTargetElement(ev);for(;el!=null&&el!=calendar.element;el=el.parentNode);if(el==null){window._dynarch_popupCalendar.callCloseHandler();return Calendar.stopEvent(ev);}};Calendar.prototype.show=function(){var rows=this.table.getElementsByTagName("tr");for(var i=rows.length;i>0;){var row=rows[--i];Calendar.removeClass(row,"rowhilite");var cells=row.getElementsByTagName("td");for(var j=cells.length;j>0;){var cell=cells[--j];Calendar.removeClass(cell,"hilite");Calendar.removeClass(cell,"active");}}this.element.style.display="block";this.hidden=false;if(this.isPopup){window._dynarch_popupCalendar=this;Calendar.addEvent(document,"keydown",Calendar._keyEvent);Calendar.addEvent(document,"keypress",Calendar._keyEvent);Calendar.addEvent(document,"mousedown",Calendar._checkCalendar);}this.hideShowCovered();};Calendar.prototype.hide=function(){if(this.isPopup){Calendar.removeEvent(document,"keydown",Calendar._keyEvent);Calendar.removeEvent(document,"keypress",Calendar._keyEvent);Calendar.removeEvent(document,"mousedown",Calendar._checkCalendar);}this.element.style.display="none";this.hidden=true;this.hideShowCovered();};Calendar.prototype.showAt=function(x,y){var s=this.element.style;s.left=x+"px";s.top=y+"px";this.show();};Calendar.prototype.showAtElement=function(el,opts){var self=this;var p=Calendar.getAbsolutePos(el);if(!opts||typeof opts!="string"){this.showAt(p.x,p.y+el.offsetHeight);return true;}function fixPosition(box){if(box.x<0)box.x=0;if(box.y<0)box.y=0;var cp=document.createElement("div");var s=cp.style;s.position="absolute";s.right=s.bottom=s.width=s.height="0px";document.body.appendChild(cp);var br=Calendar.getAbsolutePos(cp);document.body.removeChild(cp);if(Calendar.is_ie){br.y+=document.body.scrollTop;br.x+=document.body.scrollLeft;}else{br.y+=window.scrollY;br.x+=window.scrollX;}var tmp=box.x+box.width-br.x;if(tmp>0)box.x-=tmp;tmp=box.y+box.height-br.y;if(tmp>0)box.y-=tmp;};this.element.style.display="block";Calendar.continuation_for_the_fucking_khtml_browser=function(){var w=self.element.offsetWidth;var h=self.element.offsetHeight;self.element.style.display="none";var valign=opts.substr(0,1);var halign="l";if(opts.length>1){halign=opts.substr(1,1);}switch(valign){case "T":p.y-=h;break;case "B":p.y+=el.offsetHeight;break;case "C":p.y+=(el.offsetHeight-h)/2;break;case "t":p.y+=el.offsetHeight-h;break;case "b":break;}switch(halign){case "L":p.x-=w;break;case "R":p.x+=el.offsetWidth;break;case "C":p.x+=(el.offsetWidth-w)/2;break;case "l":p.x+=el.offsetWidth-w;break;case "r":break;}p.width=w;p.height=h+40;self.monthsCombo.style.display="none";fixPosition(p);self.showAt(p.x,p.y);};if(Calendar.is_khtml)setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()",10);else Calendar.continuation_for_the_fucking_khtml_browser();};Calendar.prototype.setDateFormat=function(str){this.dateFormat=str;};Calendar.prototype.setTtDateFormat=function(str){this.ttDateFormat=str;};Calendar.prototype.parseDate=function(str,fmt){if(!fmt)fmt=this.dateFormat;this.setDate(Date.parseDate(str,fmt));};Calendar.prototype.hideShowCovered=function(){if(!Calendar.is_ie&&!Calendar.is_opera)return;function getVisib(obj){var value=obj.style.visibility;if(!value){if(document.defaultView&&typeof(document.defaultView.getComputedStyle)=="function"){if(!Calendar.is_khtml)value=document.defaultView. getComputedStyle(obj,"").getPropertyValue("visibility");else value='';}else if(obj.currentStyle){value=obj.currentStyle.visibility;}else value='';}return value;};var tags=new Array("applet","iframe","select");var el=this.element;var p=Calendar.getAbsolutePos(el);var EX1=p.x;var EX2=el.offsetWidth+EX1;var EY1=p.y;var EY2=el.offsetHeight+EY1;for(var k=tags.length;k>0;){var ar=document.getElementsByTagName(tags[--k]);var cc=null;for(var i=ar.length;i>0;){cc=ar[--i];p=Calendar.getAbsolutePos(cc);var CX1=p.x;var CX2=cc.offsetWidth+CX1;var CY1=p.y;var CY2=cc.offsetHeight+CY1;if(this.hidden||(CX1>EX2)||(CX2<EX1)||(CY1>EY2)||(CY2<EY1)){if(!cc.__msh_save_visibility){cc.__msh_save_visibility=getVisib(cc);}cc.style.visibility=cc.__msh_save_visibility;}else{if(!cc.__msh_save_visibility){cc.__msh_save_visibility=getVisib(cc);}cc.style.visibility="hidden";}}}};Calendar.prototype._displayWeekdays=function(){var fdow=this.firstDayOfWeek;var cell=this.firstdayname;var weekend=Calendar._TT["WEEKEND"];for(var i=0;i<7;++i){cell.className="day name";var realday=(i+fdow)%7;if(i){cell.ttip=Calendar._TT["DAY_FIRST"].replace("%s",Calendar._DN[realday]);cell.navtype=100;cell.calendar=this;cell.fdow=realday;Calendar._add_evs(cell);}if(weekend.indexOf(realday.toString())!=-1){Calendar.addClass(cell,"weekend");}cell.innerHTML=Calendar._SDN[(i+fdow)%7];cell=cell.nextSibling;}};Calendar.prototype._hideCombos=function(){this.monthsCombo.style.display="none";this.yearsCombo.style.display="none";};Calendar.prototype._dragStart=function(ev){if(this.dragging){return;}this.dragging=true;var posX;var posY;if(Calendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posY=ev.clientY+window.scrollY;posX=ev.clientX+window.scrollX;}var st=this.element.style;this.xOffs=posX-parseInt(st.left);this.yOffs=posY-parseInt(st.top);with(Calendar){addEvent(document,"mousemove",calDragIt);addEvent(document,"mouseup",calDragEnd);}};Date._MD=new Array(31,28,31,30,31,30,31,31,30,31,30,31);Date.SECOND=1000;Date.MINUTE=60*Date.SECOND;Date.HOUR=60*Date.MINUTE;Date.DAY=24*Date.HOUR;Date.WEEK=7*Date.DAY;Date.parseDate=function(str,fmt){var today=new Date();var y=0;var m=-1;var d=0;var a=str.split(/\W+/);var b=fmt.match(/%./g);var i=0,j=0;var hr=0;var min=0;for(i=0;i<a.length;++i){if(!a[i])continue;switch(b[i]){case "%d":case "%e":d=parseInt(a[i],10);break;case "%m":m=parseInt(a[i],10)-1;break;case "%Y":case "%y":y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);break;case "%b":case "%B":for(j=0;j<12;++j){if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){m=j;break;}}break;case "%H":case "%I":case "%k":case "%l":hr=parseInt(a[i],10);break;case "%P":case "%p":if(/pm/i.test(a[i])&&hr<12)hr+=12;else if(/am/i.test(a[i])&&hr>=12)hr-=12;break;case "%M":min=parseInt(a[i],10);break;}}if(isNaN(y))y=today.getFullYear();if(isNaN(m))m=today.getMonth();if(isNaN(d))d=today.getDate();if(isNaN(hr))hr=today.getHours();if(isNaN(min))min=today.getMinutes();if(y!=0&&m!=-1&&d!=0)return new Date(y,m,d,hr,min,0);y=0;m=-1;d=0;for(i=0;i<a.length;++i){if(a[i].search(/[a-zA-Z]+/)!=-1){var t=-1;for(j=0;j<12;++j){if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){t=j;break;}}if(t!=-1){if(m!=-1){d=m+1;}m=t;}}else if(parseInt(a[i],10)<=12&&m==-1){m=a[i]-1;}else if(parseInt(a[i],10)>31&&y==0){y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);}else if(d==0){d=a[i];}}if(y==0)y=today.getFullYear();if(m!=-1&&d!=0)return new Date(y,m,d,hr,min,0);return today;};Date.prototype.getMonthDays=function(month){var year=this.getFullYear();if(typeof month=="undefined"){month=this.getMonth();}if(((0==(year%4))&&((0!=(year%100))||(0==(year%400))))&&month==1){return 29;}else{return Date._MD[month];}};Date.prototype.getDayOfYear=function(){var now=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var then=new Date(this.getFullYear(),0,0,0,0,0);var time=now-then;return Math.floor(time/Date.DAY);};Date.prototype.getWeekNumber=function(){var d=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var DoW=d.getDay();d.setDate(d.getDate()-(DoW+6)%7+3);var ms=d.valueOf();d.setMonth(0);d.setDate(4);return Math.round((ms-d.valueOf())/(7*864e5))+1;};Date.prototype.equalsTo=function(date){return((this.getFullYear()==date.getFullYear())&&(this.getMonth()==date.getMonth())&&(this.getDate()==date.getDate())&&(this.getHours()==date.getHours())&&(this.getMinutes()==date.getMinutes()));};Date.prototype.setDateOnly=function(date){var tmp=new Date(date);this.setDate(1);this.setFullYear(tmp.getFullYear());this.setMonth(tmp.getMonth());this.setDate(tmp.getDate());};Date.prototype.print=function(str){var m=this.getMonth();var d=this.getDate();var y=this.getFullYear();var wn=this.getWeekNumber();var w=this.getDay();var s={};var hr=this.getHours();var pm=(hr>=12);var ir=(pm)?(hr-12):hr;var dy=this.getDayOfYear();if(ir==0)ir=12;var min=this.getMinutes();var sec=this.getSeconds();s["%a"]=Calendar._SDN[w];s["%A"]=Calendar._DN[w];s["%b"]=Calendar._SMN[m];s["%B"]=Calendar._MN[m];s["%C"]=1+Math.floor(y/100);s["%d"]=(d<10)?("0"+d):d;s["%e"]=d;s["%H"]=(hr<10)?("0"+hr):hr;s["%I"]=(ir<10)?("0"+ir):ir;s["%j"]=(dy<100)?((dy<10)?("00"+dy):("0"+dy)):dy;s["%k"]=hr;s["%l"]=ir;s["%m"]=(m<9)?("0"+(1+m)):(1+m);s["%M"]=(min<10)?("0"+min):min;s["%n"]="\n";s["%p"]=pm?"PM":"AM";s["%P"]=pm?"pm":"am";s["%s"]=Math.floor(this.getTime()/1000);s["%S"]=(sec<10)?("0"+sec):sec;s["%t"]="\t";s["%U"]=s["%W"]=s["%V"]=(wn<10)?("0"+wn):wn;s["%u"]=w+1;s["%w"]=w;s["%y"]=(''+y).substr(2,2);s["%Y"]=y;s["%%"]="%";var re=/%./g;if(!Calendar.is_ie5&&!Calendar.is_khtml)return str.replace(re,function(par){return s[par]||par;});var a=str.match(re);for(var i=0;i<a.length;i++){var tmp=s[a[i]];if(tmp){re=new RegExp(a[i],'g');str=str.replace(re,tmp);}}return str;};Date.prototype.__msh_oldSetFullYear=Date.prototype.setFullYear;Date.prototype.setFullYear=function(y){var d=new Date(this);d.__msh_oldSetFullYear(y);if(d.getMonth()!=this.getMonth())this.setDate(28);this.__msh_oldSetFullYear(y);};window._dynarch_popupCalendar=null;
1
+ /* Copyright Mihai Bazon, 2002-2005 | www.bazon.net/mishoo
2
+ * -----------------------------------------------------------
3
+ *
4
+ * The DHTML Calendar, version 1.0 "It is happening again"
5
+ *
6
+ * Details and latest version at:
7
+ * www.dynarch.com/projects/calendar
8
+ *
9
+ * This script is developed by Dynarch.com. Visit us at www.dynarch.com.
10
+ *
11
+ * This script is distributed under the GNU Lesser General Public License.
12
+ * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
13
+ */
14
+ Calendar=function(firstDayOfWeek,dateStr,onSelected,onClose){
15
+ Calendar._DN = new Array ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday");Calendar._SDN = new Array ("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"); Calendar._FD = 0; Calendar._MN = new Array ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); Calendar._SMN = new Array ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");Calendar._TT = {};Calendar._TT["INFO"] = "About the Calendar";
16
+ Calendar._TT["ABOUT"] =
17
+ "DHTML Date/Time Selector\n" +
18
+ "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" +
19
+ "For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
20
+ "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
21
+ "\n\n" +
22
+ "Date selection:\n" +
23
+ "- Use the \xab, \xbb buttons to select year\n" +
24
+ "- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" +
25
+ "- Hold mouse button on any of the above buttons for faster selection.";
26
+ Calendar._TT["ABOUT_TIME"] = "\n\n" +
27
+ "Time selection:\n" +
28
+ "- Click on any of the time parts to increase it\n" +
29
+ "- or Shift-click to decrease it\n" +
30
+ "- or click and drag for faster selection.";
31
+
32
+ Calendar._TT["PREV_YEAR"] = "Click to move to the previous year. Click and hold for a list of years.";Calendar._TT["PREV_MONTH"] = "Click to move to the previous month. Click and hold for a list of the months."; Calendar._TT["GO_TODAY"] = "Go to today";Calendar._TT["NEXT_MONTH"] = "Click to move to the next month. Click and hold for a list of the months.";Calendar._TT["NEXT_YEAR"] = "Click to move to the next year. Click and hold for a list of years.";Calendar._TT["SEL_DATE"] = "Select a date.";Calendar._TT["DRAG_TO_MOVE"] = "Drag to move";Calendar._TT["PART_TODAY"] = " (Today)";Calendar._TT["DAY_FIRST"] = "Display %s first";Calendar._TT["WEEKEND"] = "0,6";Calendar._TT["CLOSE"] = "Close";Calendar._TT["TODAY"] = "Today";Calendar._TT["TIME_PART"] = "(Shift-)Click or Drag to change the value.";Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%A, %B %e";Calendar._TT["WK"] = "wk";Calendar._TT["TIME"] = "Time:";
33
+
34
+
35
+
36
  this.activeDiv=null;this.currentDateEl=null;this.getDateStatus=null;this.getDateToolTip=null;this.getDateText=null;this.timeout=null;this.onSelected=onSelected||null;this.onClose=onClose||null;this.dragging=false;this.hidden=false;this.minYear=1970;this.maxYear=2050;this.dateFormat=Calendar._TT["DEF_DATE_FORMAT"];this.ttDateFormat=Calendar._TT["TT_DATE_FORMAT"];this.isPopup=true;this.weekNumbers=true;this.firstDayOfWeek=typeof firstDayOfWeek=="number"?firstDayOfWeek:Calendar._FD;this.showsOtherMonths=false;this.dateStr=dateStr;this.ar_days=null;this.showsTime=false;this.time24=true;this.yearStep=2;this.hiliteToday=true;this.multiple=null;this.table=null;this.element=null;this.tbody=null;this.firstdayname=null;this.monthsCombo=null;this.yearsCombo=null;this.hilitedMonth=null;this.activeMonth=null;this.hilitedYear=null;this.activeYear=null;this.dateClicked=false;if(typeof Calendar._SDN=="undefined"){if(typeof Calendar._SDN_len=="undefined")Calendar._SDN_len=3;var ar=new Array();for(var i=8;i>0;){ar[--i]=Calendar._DN[i].substr(0,Calendar._SDN_len);}Calendar._SDN=ar;if(typeof Calendar._SMN_len=="undefined")Calendar._SMN_len=3;ar=new Array();for(var i=12;i>0;){ar[--i]=Calendar._MN[i].substr(0,Calendar._SMN_len);}Calendar._SMN=ar;}};Calendar._C=null;Calendar.is_ie=(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent));Calendar.is_ie5=(Calendar.is_ie&&/msie 5\.0/i.test(navigator.userAgent));Calendar.is_opera=/opera/i.test(navigator.userAgent);Calendar.is_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);Calendar.getAbsolutePos=function(el){var SL=0,ST=0;var is_div=/^div$/i.test(el.tagName);if(is_div&&el.scrollLeft)SL=el.scrollLeft;if(is_div&&el.scrollTop)ST=el.scrollTop;var r={x:el.offsetLeft-SL,y:el.offsetTop-ST};if(el.offsetParent){var tmp=this.getAbsolutePos(el.offsetParent);r.x+=tmp.x;r.y+=tmp.y;}return r;};Calendar.isRelated=function(el,evt){var related=evt.relatedTarget;if(!related){var type=evt.type;if(type=="mouseover"){related=evt.fromElement;}else if(type=="mouseout"){related=evt.toElement;}}while(related){if(related==el){return true;}related=related.parentNode;}return false;};Calendar.removeClass=function(el,className){if(!(el&&el.className)){return;}var cls=el.className.split(" ");var ar=new Array();for(var i=cls.length;i>0;){if(cls[--i]!=className){ar[ar.length]=cls[i];}}el.className=ar.join(" ");};Calendar.addClass=function(el,className){Calendar.removeClass(el,className);el.className+=" "+className;};Calendar.getElement=function(ev){var f=Calendar.is_ie?window.event.srcElement:ev.currentTarget;while(f.nodeType!=1||/^div$/i.test(f.tagName))f=f.parentNode;return f;};Calendar.getTargetElement=function(ev){var f=Calendar.is_ie?window.event.srcElement:ev.target;while(f.nodeType!=1)f=f.parentNode;return f;};Calendar.stopEvent=function(ev){ev||(ev=window.event);if(Calendar.is_ie){ev.cancelBubble=true;ev.returnValue=false;}else{ev.preventDefault();ev.stopPropagation();}return false;};Calendar.addEvent=function(el,evname,func){if(el.attachEvent){el.attachEvent("on"+evname,func);}else if(el.addEventListener){el.addEventListener(evname,func,true);}else{el["on"+evname]=func;}};Calendar.removeEvent=function(el,evname,func){if(el.detachEvent){el.detachEvent("on"+evname,func);}else if(el.removeEventListener){el.removeEventListener(evname,func,true);}else{el["on"+evname]=null;}};Calendar.createElement=function(type,parent){var el=null;if(document.createElementNS){el=document.createElementNS("http://www.w3.org/1999/xhtml",type);}else{el=document.createElement(type);}if(typeof parent!="undefined"){parent.appendChild(el);}return el;};Calendar._add_evs=function(el){with(Calendar){addEvent(el,"mouseover",dayMouseOver);addEvent(el,"mousedown",dayMouseDown);addEvent(el,"mouseout",dayMouseOut);if(is_ie){addEvent(el,"dblclick",dayMouseDblClick);el.setAttribute("unselectable",true);}}};Calendar.findMonth=function(el){if(typeof el.month!="undefined"){return el;}else if(typeof el.parentNode.month!="undefined"){return el.parentNode;}return null;};Calendar.findYear=function(el){if(typeof el.year!="undefined"){return el;}else if(typeof el.parentNode.year!="undefined"){return el.parentNode;}return null;};Calendar.showMonthsCombo=function(){var cal=Calendar._C;if(!cal){return false;}var cal=cal;var cd=cal.activeDiv;var mc=cal.monthsCombo;if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}if(cal.activeMonth){Calendar.removeClass(cal.activeMonth,"active");}var mon=cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];Calendar.addClass(mon,"active");cal.activeMonth=mon;var s=mc.style;s.display="block";if(cd.navtype<0)s.left=cd.offsetLeft+"px";else{var mcw=mc.offsetWidth;if(typeof mcw=="undefined")mcw=50;s.left=(cd.offsetLeft+cd.offsetWidth-mcw)+"px";}s.top=(cd.offsetTop+cd.offsetHeight)+"px";};Calendar.showYearsCombo=function(fwd){var cal=Calendar._C;if(!cal){return false;}var cal=cal;var cd=cal.activeDiv;var yc=cal.yearsCombo;if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}if(cal.activeYear){Calendar.removeClass(cal.activeYear,"active");}cal.activeYear=null;var Y=cal.date.getFullYear()+(fwd?1:-1);var yr=yc.firstChild;var show=false;for(var i=12;i>0;--i){if(Y>=cal.minYear&&Y<=cal.maxYear){yr.innerHTML=Y;yr.year=Y;yr.style.display="block";show=true;}else{yr.style.display="none";}yr=yr.nextSibling;Y+=fwd?cal.yearStep:-cal.yearStep;}if(show){var s=yc.style;s.display="block";if(cd.navtype<0)s.left=cd.offsetLeft+"px";else{var ycw=yc.offsetWidth;if(typeof ycw=="undefined")ycw=50;s.left=(cd.offsetLeft+cd.offsetWidth-ycw)+"px";}s.top=(cd.offsetTop+cd.offsetHeight)+"px";}};Calendar.tableMouseUp=function(ev){var cal=Calendar._C;if(!cal){return false;}if(cal.timeout){clearTimeout(cal.timeout);}var el=cal.activeDiv;if(!el){return false;}var target=Calendar.getTargetElement(ev);ev||(ev=window.event);Calendar.removeClass(el,"active");if(target==el||target.parentNode==el){Calendar.cellClick(el,ev);}var mon=Calendar.findMonth(target);var date=null;if(mon){date=new Date(cal.date);if(mon.month!=date.getMonth()){date.setMonth(mon.month);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}else{var year=Calendar.findYear(target);if(year){date=new Date(cal.date);if(year.year!=date.getFullYear()){date.setFullYear(year.year);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}}with(Calendar){removeEvent(document,"mouseup",tableMouseUp);removeEvent(document,"mouseover",tableMouseOver);removeEvent(document,"mousemove",tableMouseOver);cal._hideCombos();_C=null;return stopEvent(ev);}};Calendar.tableMouseOver=function(ev){var cal=Calendar._C;if(!cal){return;}var el=cal.activeDiv;var target=Calendar.getTargetElement(ev);if(target==el||target.parentNode==el){Calendar.addClass(el,"hilite active");Calendar.addClass(el.parentNode,"rowhilite");}else{if(typeof el.navtype=="undefined"||(el.navtype!=50&&(el.navtype==0||Math.abs(el.navtype)>2)))Calendar.removeClass(el,"active");Calendar.removeClass(el,"hilite");Calendar.removeClass(el.parentNode,"rowhilite");}ev||(ev=window.event);if(el.navtype==50&&target!=el){var pos=Calendar.getAbsolutePos(el);var w=el.offsetWidth;var x=ev.clientX;var dx;var decrease=true;if(x>pos.x+w){dx=x-pos.x-w;decrease=false;}else dx=pos.x-x;if(dx<0)dx=0;var range=el._range;var current=el._current;var count=Math.floor(dx/10)%range.length;for(var i=range.length;--i>=0;)if(range[i]==current)break;while(count-->0)if(decrease){if(--i<0)i=range.length-1;}else if(++i>=range.length)i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime();}var mon=Calendar.findMonth(target);if(mon){if(mon.month!=cal.date.getMonth()){if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}Calendar.addClass(mon,"hilite");cal.hilitedMonth=mon;}else if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}}else{if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}var year=Calendar.findYear(target);if(year){if(year.year!=cal.date.getFullYear()){if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}Calendar.addClass(year,"hilite");cal.hilitedYear=year;}else if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}}else if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}}return Calendar.stopEvent(ev);};Calendar.tableMouseDown=function(ev){if(Calendar.getTargetElement(ev)==Calendar.getElement(ev)){return Calendar.stopEvent(ev);}};Calendar.calDragIt=function(ev){var cal=Calendar._C;if(!(cal&&cal.dragging)){return false;}var posX;var posY;if(Calendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posX=ev.pageX;posY=ev.pageY;}cal.hideShowCovered();var st=cal.element.style;st.left=(posX-cal.xOffs)+"px";st.top=(posY-cal.yOffs)+"px";return Calendar.stopEvent(ev);};Calendar.calDragEnd=function(ev){var cal=Calendar._C;if(!cal){return false;}cal.dragging=false;with(Calendar){removeEvent(document,"mousemove",calDragIt);removeEvent(document,"mouseup",calDragEnd);tableMouseUp(ev);}cal.hideShowCovered();};Calendar.dayMouseDown=function(ev){var el=Calendar.getElement(ev);if(el.disabled){return false;}var cal=el.calendar;cal.activeDiv=el;Calendar._C=cal;if(el.navtype!=300)with(Calendar){if(el.navtype==50){el._current=el.innerHTML;addEvent(document,"mousemove",tableMouseOver);}else addEvent(document,Calendar.is_ie5?"mousemove":"mouseover",tableMouseOver);addClass(el,"hilite active");addEvent(document,"mouseup",tableMouseUp);}else if(cal.isPopup){cal._dragStart(ev);}if(el.navtype==-1||el.navtype==1){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout("Calendar.showMonthsCombo()",250);}else if(el.navtype==-2||el.navtype==2){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout((el.navtype>0)?"Calendar.showYearsCombo(true)":"Calendar.showYearsCombo(false)",250);}else{cal.timeout=null;}return Calendar.stopEvent(ev);};Calendar.dayMouseDblClick=function(ev){Calendar.cellClick(Calendar.getElement(ev),ev||window.event);if(Calendar.is_ie){document.selection.empty();}};Calendar.dayMouseOver=function(ev){var el=Calendar.getElement(ev);if(Calendar.isRelated(el,ev)||Calendar._C||el.disabled){return false;}if(el.ttip){if(el.ttip.substr(0,1)=="_"){el.ttip=el.caldate.print(el.calendar.ttDateFormat)+el.ttip.substr(1);}el.calendar.tooltips.innerHTML=el.ttip;}if(el.navtype!=300){Calendar.addClass(el,"hilite");if(el.caldate){Calendar.addClass(el.parentNode,"rowhilite");}}return Calendar.stopEvent(ev);};Calendar.dayMouseOut=function(ev){with(Calendar){var el=getElement(ev);if(isRelated(el,ev)||_C||el.disabled)return false;removeClass(el,"hilite");if(el.caldate)removeClass(el.parentNode,"rowhilite");if(el.calendar)el.calendar.tooltips.innerHTML=_TT["SEL_DATE"];return stopEvent(ev);}};Calendar.cellClick=function(el,ev){var cal=el.calendar;var closing=false;var newdate=false;var date=null;if(typeof el.navtype=="undefined"){if(cal.currentDateEl){Calendar.removeClass(cal.currentDateEl,"selected");Calendar.addClass(el,"selected");closing=(cal.currentDateEl==el);if(!closing){cal.currentDateEl=el;}}cal.date.setDateOnly(el.caldate);date=cal.date;var other_month=!(cal.dateClicked=!el.otherMonth);if(!other_month&&!cal.currentDateEl)cal._toggleMultipleDate(new Date(date));else newdate=!el.disabled;if(other_month)cal._init(cal.firstDayOfWeek,date);}else{if(el.navtype==200){Calendar.removeClass(el,"hilite");cal.callCloseHandler();return;}date=new Date(cal.date);if(el.navtype==0)date.setDateOnly(new Date());cal.dateClicked=false;var year=date.getFullYear();var mon=date.getMonth();function setMonth(m){var day=date.getDate();var max=date.getMonthDays(m);if(day>max){date.setDate(max);}date.setMonth(m);};switch(el.navtype){case 400:Calendar.removeClass(el,"hilite");var text=Calendar._TT["ABOUT"];if(typeof text!="undefined"){text+=cal.showsTime?Calendar._TT["ABOUT_TIME"]:"";}else{text="Help and about box text is not translated into this language.\n"+"If you know this language and you feel generous please update\n"+"the corresponding file in \"lang\" subdir to match calendar-en.js\n"+"and send it back to <mihai_bazon@yahoo.com> to get it into the distribution ;-)\n\n"+"Thank you!\n"+"http://dynarch.com/mishoo/calendar.epl\n";}alert(text);return;case-2:if(year>cal.minYear){date.setFullYear(year-1);}break;case-1:if(mon>0){setMonth(mon-1);}else if(year-->cal.minYear){date.setFullYear(year);setMonth(11);}break;case 1:if(mon<11){setMonth(mon+1);}else if(year<cal.maxYear){date.setFullYear(year+1);setMonth(0);}break;case 2:if(year<cal.maxYear){date.setFullYear(year+1);}break;case 100:cal.setFirstDayOfWeek(el.fdow);return;case 50:var range=el._range;var current=el.innerHTML;for(var i=range.length;--i>=0;)if(range[i]==current)break;if(ev&&ev.shiftKey){if(--i<0)i=range.length-1;}else if(++i>=range.length)i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime();return;case 0:if((typeof cal.getDateStatus=="function")&&cal.getDateStatus(date,date.getFullYear(),date.getMonth(),date.getDate())){return false;}break;}if(!date.equalsTo(cal.date)){cal.setDate(date);newdate=true;}else if(el.navtype==0)newdate=closing=true;}if(newdate){ev&&cal.callHandler();}if(closing){Calendar.removeClass(el,"hilite");ev&&cal.callCloseHandler();}};Calendar.prototype.create=function(_par){var parent=null;if(!_par){parent=document.getElementsByTagName("body")[0];this.isPopup=true;}else{parent=_par;this.isPopup=false;}this.date=this.dateStr?new Date(this.dateStr):new Date();var table=Calendar.createElement("table");this.table=table;table.cellSpacing=0;table.cellPadding=0;table.calendar=this;Calendar.addEvent(table,"mousedown",Calendar.tableMouseDown);var div=Calendar.createElement("div");this.element=div;div.className="calendar";if(this.isPopup){div.style.position="absolute";div.style.display="none";}div.appendChild(table);var thead=Calendar.createElement("thead",table);var cell=null;var row=null;var cal=this;var hh=function(text,cs,navtype){cell=Calendar.createElement("td",row);cell.colSpan=cs;cell.className="button";if(navtype!=0&&Math.abs(navtype)<=2)cell.className+=" nav";Calendar._add_evs(cell);cell.calendar=cal;cell.navtype=navtype;cell.innerHTML="<div unselectable='on'>"+text+"</div>";return cell;};row=Calendar.createElement("tr",thead);var title_length=6;(this.isPopup)&&--title_length;(this.weekNumbers)&&++title_length;hh("?",1,400).ttip=Calendar._TT["INFO"];this.title=hh("",title_length,300);this.title.className="title";if(this.isPopup){this.title.ttip=Calendar._TT["DRAG_TO_MOVE"];this.title.style.cursor="move";hh("&#x00d7;",1,200).ttip=Calendar._TT["CLOSE"];}row=Calendar.createElement("tr",thead);row.className="headrow";this._nav_py=hh("&#x00ab;",1,-2);this._nav_py.ttip=Calendar._TT["PREV_YEAR"];this._nav_pm=hh("&#x2039;",1,-1);this._nav_pm.ttip=Calendar._TT["PREV_MONTH"];this._nav_now=hh(Calendar._TT["TODAY"],this.weekNumbers?4:3,0);this._nav_now.ttip=Calendar._TT["GO_TODAY"];this._nav_nm=hh("&#x203a;",1,1);this._nav_nm.ttip=Calendar._TT["NEXT_MONTH"];this._nav_ny=hh("&#x00bb;",1,2);this._nav_ny.ttip=Calendar._TT["NEXT_YEAR"];row=Calendar.createElement("tr",thead);row.className="daynames";if(this.weekNumbers){cell=Calendar.createElement("td",row);cell.className="name wn";cell.innerHTML=Calendar._TT["WK"];}for(var i=7;i>0;--i){cell=Calendar.createElement("td",row);if(!i){cell.navtype=100;cell.calendar=this;Calendar._add_evs(cell);}}this.firstdayname=(this.weekNumbers)?row.firstChild.nextSibling:row.firstChild;this._displayWeekdays();var tbody=Calendar.createElement("tbody",table);this.tbody=tbody;for(i=6;i>0;--i){row=Calendar.createElement("tr",tbody);if(this.weekNumbers){cell=Calendar.createElement("td",row);}for(var j=7;j>0;--j){cell=Calendar.createElement("td",row);cell.calendar=this;Calendar._add_evs(cell);}}if(this.showsTime){row=Calendar.createElement("tr",tbody);row.className="time";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;cell.innerHTML=Calendar._TT["TIME"]||"&nbsp;";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=this.weekNumbers?4:3;(function(){function makeTimePart(className,init,range_start,range_end){var part=Calendar.createElement("span",cell);part.className=className;part.innerHTML=init;part.calendar=cal;part.ttip=Calendar._TT["TIME_PART"];part.navtype=50;part._range=[];if(typeof range_start!="number")part._range=range_start;else{for(var i=range_start;i<=range_end;++i){var txt;if(i<10&&range_end>=10)txt='0'+i;else txt=''+i;part._range[part._range.length]=txt;}}Calendar._add_evs(part);return part;};var hrs=cal.date.getHours();var mins=cal.date.getMinutes();var t12=!cal.time24;var pm=(hrs>12);if(t12&&pm)hrs-=12;var H=makeTimePart("hour",hrs,t12?1:0,t12?12:23);var span=Calendar.createElement("span",cell);span.innerHTML=":";span.className="colon";var M=makeTimePart("minute",mins,0,59);var AP=null;cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;if(t12)AP=makeTimePart("ampm",pm?"pm":"am",["am","pm"]);else cell.innerHTML="&nbsp;";cal.onSetTime=function(){var pm,hrs=this.date.getHours(),mins=this.date.getMinutes();if(t12){pm=(hrs>=12);if(pm)hrs-=12;if(hrs==0)hrs=12;AP.innerHTML=pm?"pm":"am";}H.innerHTML=(hrs<10)?("0"+hrs):hrs;M.innerHTML=(mins<10)?("0"+mins):mins;};cal.onUpdateTime=function(){var date=this.date;var h=parseInt(H.innerHTML,10);if(t12){if(/pm/i.test(AP.innerHTML)&&h<12)h+=12;else if(/am/i.test(AP.innerHTML)&&h==12)h=0;}var d=date.getDate();var m=date.getMonth();var y=date.getFullYear();date.setHours(h);date.setMinutes(parseInt(M.innerHTML,10));date.setFullYear(y);date.setMonth(m);date.setDate(d);this.dateClicked=false;this.callHandler();};})();}else{this.onSetTime=this.onUpdateTime=function(){};}var tfoot=Calendar.createElement("tfoot",table);row=Calendar.createElement("tr",tfoot);row.className="footrow";cell=hh(Calendar._TT["SEL_DATE"],this.weekNumbers?8:7,300);cell.className="ttip";if(this.isPopup){cell.ttip=Calendar._TT["DRAG_TO_MOVE"];cell.style.cursor="move";}this.tooltips=cell;div=Calendar.createElement("div",this.element);this.monthsCombo=div;div.className="combo";for(i=0;i<Calendar._MN.length;++i){var mn=Calendar.createElement("div");mn.className=Calendar.is_ie?"label-IEfix":"label";mn.month=i;mn.innerHTML=Calendar._SMN[i];div.appendChild(mn);}div=Calendar.createElement("div",this.element);this.yearsCombo=div;div.className="combo";for(i=12;i>0;--i){var yr=Calendar.createElement("div");yr.className=Calendar.is_ie?"label-IEfix":"label";div.appendChild(yr);}this._init(this.firstDayOfWeek,this.date);parent.appendChild(this.element);};Calendar._keyEvent=function(ev){var cal=window._dynarch_popupCalendar;if(!cal||cal.multiple)return false;(Calendar.is_ie)&&(ev=window.event);var act=(Calendar.is_ie||ev.type=="keypress"),K=ev.keyCode;if(ev.ctrlKey){switch(K){case 37:act&&Calendar.cellClick(cal._nav_pm);break;case 38:act&&Calendar.cellClick(cal._nav_py);break;case 39:act&&Calendar.cellClick(cal._nav_nm);break;case 40:act&&Calendar.cellClick(cal._nav_ny);break;default:return false;}}else switch(K){case 32:Calendar.cellClick(cal._nav_now);break;case 27:act&&cal.callCloseHandler();break;case 37:case 38:case 39:case 40:if(act){var prev,x,y,ne,el,step;prev=K==37||K==38;step=(K==37||K==39)?1:7;function setVars(){el=cal.currentDateEl;var p=el.pos;x=p&15;y=p>>4;ne=cal.ar_days[y][x];};setVars();function prevMonth(){var date=new Date(cal.date);date.setDate(date.getDate()-step);cal.setDate(date);};function nextMonth(){var date=new Date(cal.date);date.setDate(date.getDate()+step);cal.setDate(date);};while(1){switch(K){case 37:if(--x>=0)ne=cal.ar_days[y][x];else{x=6;K=38;continue;}break;case 38:if(--y>=0)ne=cal.ar_days[y][x];else{prevMonth();setVars();}break;case 39:if(++x<7)ne=cal.ar_days[y][x];else{x=0;K=40;continue;}break;case 40:if(++y<cal.ar_days.length)ne=cal.ar_days[y][x];else{nextMonth();setVars();}break;}break;}if(ne){if(!ne.disabled)Calendar.cellClick(ne);else if(prev)prevMonth();else nextMonth();}}break;case 13:if(act)Calendar.cellClick(cal.currentDateEl,ev);break;default:return false;}return Calendar.stopEvent(ev);};Calendar.prototype._init=function(firstDayOfWeek,date){var today=new Date(),TY=today.getFullYear(),TM=today.getMonth(),TD=today.getDate();this.table.style.visibility="hidden";var year=date.getFullYear();if(year<this.minYear){year=this.minYear;date.setFullYear(year);}else if(year>this.maxYear){year=this.maxYear;date.setFullYear(year);}this.firstDayOfWeek=firstDayOfWeek;this.date=new Date(date);var month=date.getMonth();var mday=date.getDate();var no_days=date.getMonthDays();date.setDate(1);var day1=(date.getDay()-this.firstDayOfWeek)%7;if(day1<0)day1+=7;date.setDate(-day1);date.setDate(date.getDate()+1);var row=this.tbody.firstChild;var MN=Calendar._SMN[month];var ar_days=this.ar_days=new Array();var weekend=Calendar._TT["WEEKEND"];var dates=this.multiple?(this.datesCells={}):null;for(var i=0;i<6;++i,row=row.nextSibling){var cell=row.firstChild;if(this.weekNumbers){cell.className="day wn";cell.innerHTML=date.getWeekNumber();cell=cell.nextSibling;}row.className="daysrow";var hasdays=false,iday,dpos=ar_days[i]=[];for(var j=0;j<7;++j,cell=cell.nextSibling,date.setDate(iday+1)){iday=date.getDate();var wday=date.getDay();cell.className="day";cell.pos=i<<4|j;dpos[j]=cell;var current_month=(date.getMonth()==month);if(!current_month){if(this.showsOtherMonths){cell.className+=" othermonth";cell.otherMonth=true;}else{cell.className="emptycell";cell.innerHTML="&nbsp;";cell.disabled=true;continue;}}else{cell.otherMonth=false;hasdays=true;}cell.disabled=false;cell.innerHTML=this.getDateText?this.getDateText(date,iday):iday;if(dates)dates[date.print("%Y%m%d")]=cell;if(this.getDateStatus){var status=this.getDateStatus(date,year,month,iday);if(this.getDateToolTip){var toolTip=this.getDateToolTip(date,year,month,iday);if(toolTip)cell.title=toolTip;}if(status===true){cell.className+=" disabled";cell.disabled=true;}else{if(/disabled/i.test(status))cell.disabled=true;cell.className+=" "+status;}}if(!cell.disabled){cell.caldate=new Date(date);cell.ttip="_";if(!this.multiple&&current_month&&iday==mday&&this.hiliteToday){cell.className+=" selected";this.currentDateEl=cell;}if(date.getFullYear()==TY&&date.getMonth()==TM&&iday==TD){cell.className+=" today";cell.ttip+=Calendar._TT["PART_TODAY"];}if(weekend.indexOf(wday.toString())!=-1)cell.className+=cell.otherMonth?" oweekend":" weekend";}}if(!(hasdays||this.showsOtherMonths))row.className="emptyrow";}this.title.innerHTML=Calendar._MN[month]+", "+year;this.onSetTime();this.table.style.visibility="visible";this._initMultipleDates();};Calendar.prototype._initMultipleDates=function(){if(this.multiple){for(var i in this.multiple){var cell=this.datesCells[i];var d=this.multiple[i];if(!d)continue;if(cell)cell.className+=" selected";}}};Calendar.prototype._toggleMultipleDate=function(date){if(this.multiple){var ds=date.print("%Y%m%d");var cell=this.datesCells[ds];if(cell){var d=this.multiple[ds];if(!d){Calendar.addClass(cell,"selected");this.multiple[ds]=date;}else{Calendar.removeClass(cell,"selected");delete this.multiple[ds];}}}};Calendar.prototype.setDateToolTipHandler=function(unaryFunction){this.getDateToolTip=unaryFunction;};Calendar.prototype.setDate=function(date){if(!date.equalsTo(this.date)){this._init(this.firstDayOfWeek,date);}};Calendar.prototype.refresh=function(){this._init(this.firstDayOfWeek,this.date);};Calendar.prototype.setFirstDayOfWeek=function(firstDayOfWeek){this._init(firstDayOfWeek,this.date);this._displayWeekdays();};Calendar.prototype.setDateStatusHandler=Calendar.prototype.setDisabledHandler=function(unaryFunction){this.getDateStatus=unaryFunction;};Calendar.prototype.setRange=function(a,z){this.minYear=a;this.maxYear=z;};Calendar.prototype.callHandler=function(){if(this.onSelected){this.onSelected(this,this.date.print(this.dateFormat));}};Calendar.prototype.callCloseHandler=function(){if(this.onClose){this.onClose(this);}this.hideShowCovered();};Calendar.prototype.destroy=function(){var el=this.element.parentNode;el.removeChild(this.element);Calendar._C=null;window._dynarch_popupCalendar=null;};Calendar.prototype.reparent=function(new_parent){var el=this.element;el.parentNode.removeChild(el);new_parent.appendChild(el);};Calendar._checkCalendar=function(ev){var calendar=window._dynarch_popupCalendar;if(!calendar){return false;}var el=Calendar.is_ie?Calendar.getElement(ev):Calendar.getTargetElement(ev);for(;el!=null&&el!=calendar.element;el=el.parentNode);if(el==null){window._dynarch_popupCalendar.callCloseHandler();return Calendar.stopEvent(ev);}};Calendar.prototype.show=function(){var rows=this.table.getElementsByTagName("tr");for(var i=rows.length;i>0;){var row=rows[--i];Calendar.removeClass(row,"rowhilite");var cells=row.getElementsByTagName("td");for(var j=cells.length;j>0;){var cell=cells[--j];Calendar.removeClass(cell,"hilite");Calendar.removeClass(cell,"active");}}this.element.style.display="block";this.hidden=false;if(this.isPopup){window._dynarch_popupCalendar=this;Calendar.addEvent(document,"keydown",Calendar._keyEvent);Calendar.addEvent(document,"keypress",Calendar._keyEvent);Calendar.addEvent(document,"mousedown",Calendar._checkCalendar);}this.hideShowCovered();};Calendar.prototype.hide=function(){if(this.isPopup){Calendar.removeEvent(document,"keydown",Calendar._keyEvent);Calendar.removeEvent(document,"keypress",Calendar._keyEvent);Calendar.removeEvent(document,"mousedown",Calendar._checkCalendar);}this.element.style.display="none";this.hidden=true;this.hideShowCovered();};Calendar.prototype.showAt=function(x,y){var s=this.element.style;s.left=x+"px";s.top=y+"px";this.show();};Calendar.prototype.showAtElement=function(el,opts){var self=this;var p=Calendar.getAbsolutePos(el);if(!opts||typeof opts!="string"){this.showAt(p.x,p.y+el.offsetHeight);return true;}function fixPosition(box){if(box.x<0)box.x=0;if(box.y<0)box.y=0;var cp=document.createElement("div");var s=cp.style;s.position="absolute";s.right=s.bottom=s.width=s.height="0px";document.body.appendChild(cp);var br=Calendar.getAbsolutePos(cp);document.body.removeChild(cp);if(Calendar.is_ie){br.y+=document.body.scrollTop;br.x+=document.body.scrollLeft;}else{br.y+=window.scrollY;br.x+=window.scrollX;}var tmp=box.x+box.width-br.x;if(tmp>0)box.x-=tmp;tmp=box.y+box.height-br.y;if(tmp>0)box.y-=tmp;};this.element.style.display="block";Calendar.continuation_for_the_fucking_khtml_browser=function(){var w=self.element.offsetWidth;var h=self.element.offsetHeight;self.element.style.display="none";var valign=opts.substr(0,1);var halign="l";if(opts.length>1){halign=opts.substr(1,1);}switch(valign){case "T":p.y-=h;break;case "B":p.y+=el.offsetHeight;break;case "C":p.y+=(el.offsetHeight-h)/2;break;case "t":p.y+=el.offsetHeight-h;break;case "b":break;}switch(halign){case "L":p.x-=w;break;case "R":p.x+=el.offsetWidth;break;case "C":p.x+=(el.offsetWidth-w)/2;break;case "l":p.x+=el.offsetWidth-w;break;case "r":break;}p.width=w;p.height=h+40;self.monthsCombo.style.display="none";fixPosition(p);self.showAt(p.x,p.y);};if(Calendar.is_khtml)setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()",10);else Calendar.continuation_for_the_fucking_khtml_browser();};Calendar.prototype.setDateFormat=function(str){this.dateFormat=str;};Calendar.prototype.setTtDateFormat=function(str){this.ttDateFormat=str;};Calendar.prototype.parseDate=function(str,fmt){if(!fmt)fmt=this.dateFormat;this.setDate(Date.parseDate(str,fmt));};Calendar.prototype.hideShowCovered=function(){if(!Calendar.is_ie&&!Calendar.is_opera)return;function getVisib(obj){var value=obj.style.visibility;if(!value){if(document.defaultView&&typeof(document.defaultView.getComputedStyle)=="function"){if(!Calendar.is_khtml)value=document.defaultView. getComputedStyle(obj,"").getPropertyValue("visibility");else value='';}else if(obj.currentStyle){value=obj.currentStyle.visibility;}else value='';}return value;};var tags=new Array("applet","iframe","select");var el=this.element;var p=Calendar.getAbsolutePos(el);var EX1=p.x;var EX2=el.offsetWidth+EX1;var EY1=p.y;var EY2=el.offsetHeight+EY1;for(var k=tags.length;k>0;){var ar=document.getElementsByTagName(tags[--k]);var cc=null;for(var i=ar.length;i>0;){cc=ar[--i];p=Calendar.getAbsolutePos(cc);var CX1=p.x;var CX2=cc.offsetWidth+CX1;var CY1=p.y;var CY2=cc.offsetHeight+CY1;if(this.hidden||(CX1>EX2)||(CX2<EX1)||(CY1>EY2)||(CY2<EY1)){if(!cc.__msh_save_visibility){cc.__msh_save_visibility=getVisib(cc);}cc.style.visibility=cc.__msh_save_visibility;}else{if(!cc.__msh_save_visibility){cc.__msh_save_visibility=getVisib(cc);}cc.style.visibility="hidden";}}}};Calendar.prototype._displayWeekdays=function(){var fdow=this.firstDayOfWeek;var cell=this.firstdayname;var weekend=Calendar._TT["WEEKEND"];for(var i=0;i<7;++i){cell.className="day name";var realday=(i+fdow)%7;if(i){cell.ttip=Calendar._TT["DAY_FIRST"].replace("%s",Calendar._DN[realday]);cell.navtype=100;cell.calendar=this;cell.fdow=realday;Calendar._add_evs(cell);}if(weekend.indexOf(realday.toString())!=-1){Calendar.addClass(cell,"weekend");}cell.innerHTML=Calendar._SDN[(i+fdow)%7];cell=cell.nextSibling;}};Calendar.prototype._hideCombos=function(){this.monthsCombo.style.display="none";this.yearsCombo.style.display="none";};Calendar.prototype._dragStart=function(ev){if(this.dragging){return;}this.dragging=true;var posX;var posY;if(Calendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posY=ev.clientY+window.scrollY;posX=ev.clientX+window.scrollX;}var st=this.element.style;this.xOffs=posX-parseInt(st.left);this.yOffs=posY-parseInt(st.top);with(Calendar){addEvent(document,"mousemove",calDragIt);addEvent(document,"mouseup",calDragEnd);}};Date._MD=new Array(31,28,31,30,31,30,31,31,30,31,30,31);Date.SECOND=1000;Date.MINUTE=60*Date.SECOND;Date.HOUR=60*Date.MINUTE;Date.DAY=24*Date.HOUR;Date.WEEK=7*Date.DAY;Date.parseDate=function(str,fmt){var today=new Date();var y=0;var m=-1;var d=0;var a=str.split(/\W+/);var b=fmt.match(/%./g);var i=0,j=0;var hr=0;var min=0;for(i=0;i<a.length;++i){if(!a[i])continue;switch(b[i]){case "%d":case "%e":d=parseInt(a[i],10);break;case "%m":m=parseInt(a[i],10)-1;break;case "%Y":case "%y":y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);break;case "%b":case "%B":for(j=0;j<12;++j){if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){m=j;break;}}break;case "%H":case "%I":case "%k":case "%l":hr=parseInt(a[i],10);break;case "%P":case "%p":if(/pm/i.test(a[i])&&hr<12)hr+=12;else if(/am/i.test(a[i])&&hr>=12)hr-=12;break;case "%M":min=parseInt(a[i],10);break;}}if(isNaN(y))y=today.getFullYear();if(isNaN(m))m=today.getMonth();if(isNaN(d))d=today.getDate();if(isNaN(hr))hr=today.getHours();if(isNaN(min))min=today.getMinutes();if(y!=0&&m!=-1&&d!=0)return new Date(y,m,d,hr,min,0);y=0;m=-1;d=0;for(i=0;i<a.length;++i){if(a[i].search(/[a-zA-Z]+/)!=-1){var t=-1;for(j=0;j<12;++j){if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){t=j;break;}}if(t!=-1){if(m!=-1){d=m+1;}m=t;}}else if(parseInt(a[i],10)<=12&&m==-1){m=a[i]-1;}else if(parseInt(a[i],10)>31&&y==0){y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);}else if(d==0){d=a[i];}}if(y==0)y=today.getFullYear();if(m!=-1&&d!=0)return new Date(y,m,d,hr,min,0);return today;};Date.prototype.getMonthDays=function(month){var year=this.getFullYear();if(typeof month=="undefined"){month=this.getMonth();}if(((0==(year%4))&&((0!=(year%100))||(0==(year%400))))&&month==1){return 29;}else{return Date._MD[month];}};Date.prototype.getDayOfYear=function(){var now=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var then=new Date(this.getFullYear(),0,0,0,0,0);var time=now-then;return Math.floor(time/Date.DAY);};Date.prototype.getWeekNumber=function(){var d=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var DoW=d.getDay();d.setDate(d.getDate()-(DoW+6)%7+3);var ms=d.valueOf();d.setMonth(0);d.setDate(4);return Math.round((ms-d.valueOf())/(7*864e5))+1;};Date.prototype.equalsTo=function(date){return((this.getFullYear()==date.getFullYear())&&(this.getMonth()==date.getMonth())&&(this.getDate()==date.getDate())&&(this.getHours()==date.getHours())&&(this.getMinutes()==date.getMinutes()));};Date.prototype.setDateOnly=function(date){var tmp=new Date(date);this.setDate(1);this.setFullYear(tmp.getFullYear());this.setMonth(tmp.getMonth());this.setDate(tmp.getDate());};Date.prototype.print=function(str){var m=this.getMonth();var d=this.getDate();var y=this.getFullYear();var wn=this.getWeekNumber();var w=this.getDay();var s={};var hr=this.getHours();var pm=(hr>=12);var ir=(pm)?(hr-12):hr;var dy=this.getDayOfYear();if(ir==0)ir=12;var min=this.getMinutes();var sec=this.getSeconds();s["%a"]=Calendar._SDN[w];s["%A"]=Calendar._DN[w];s["%b"]=Calendar._SMN[m];s["%B"]=Calendar._MN[m];s["%C"]=1+Math.floor(y/100);s["%d"]=(d<10)?("0"+d):d;s["%e"]=d;s["%H"]=(hr<10)?("0"+hr):hr;s["%I"]=(ir<10)?("0"+ir):ir;s["%j"]=(dy<100)?((dy<10)?("00"+dy):("0"+dy)):dy;s["%k"]=hr;s["%l"]=ir;s["%m"]=(m<9)?("0"+(1+m)):(1+m);s["%M"]=(min<10)?("0"+min):min;s["%n"]="\n";s["%p"]=pm?"PM":"AM";s["%P"]=pm?"pm":"am";s["%s"]=Math.floor(this.getTime()/1000);s["%S"]=(sec<10)?("0"+sec):sec;s["%t"]="\t";s["%U"]=s["%W"]=s["%V"]=(wn<10)?("0"+wn):wn;s["%u"]=w+1;s["%w"]=w;s["%y"]=(''+y).substr(2,2);s["%Y"]=y;s["%%"]="%";var re=/%./g;if(!Calendar.is_ie5&&!Calendar.is_khtml)return str.replace(re,function(par){return s[par]||par;});var a=str.match(re);for(var i=0;i<a.length;i++){var tmp=s[a[i]];if(tmp){re=new RegExp(a[i],'g');str=str.replace(re,tmp);}}return str;};Date.prototype.__msh_oldSetFullYear=Date.prototype.setFullYear;Date.prototype.setFullYear=function(y){var d=new Date(this);d.__msh_oldSetFullYear(y);if(d.getMonth()!=this.getMonth())this.setDate(28);this.__msh_oldSetFullYear(y);};window._dynarch_popupCalendar=null;
js/fancybox/jquery.fancybox.css CHANGED
@@ -1,274 +1,274 @@
1
- /*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
2
- .fancybox-wrap,
3
- .fancybox-skin,
4
- .fancybox-outer,
5
- .fancybox-inner,
6
- .fancybox-image,
7
- .fancybox-wrap iframe,
8
- .fancybox-wrap object,
9
- .fancybox-nav,
10
- .fancybox-nav span,
11
- .fancybox-tmp
12
- {
13
- padding: 0;
14
- margin: 0;
15
- border: 0;
16
- outline: none;
17
- vertical-align: top;
18
- }
19
-
20
- .fancybox-wrap {
21
- position: absolute;
22
- top: 0;
23
- left: 0;
24
- z-index: 8020;
25
- }
26
-
27
- .fancybox-skin {
28
- position: relative;
29
- background: #f9f9f9;
30
- color: #444;
31
- text-shadow: none;
32
- -webkit-border-radius: 4px;
33
- -moz-border-radius: 4px;
34
- border-radius: 4px;
35
- }
36
-
37
- .fancybox-opened {
38
- z-index: 8030;
39
- }
40
-
41
- .fancybox-opened .fancybox-skin {
42
- -webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
43
- -moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
44
- box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
45
- }
46
-
47
- .fancybox-outer, .fancybox-inner {
48
- position: relative;
49
- }
50
-
51
- .fancybox-inner {
52
- overflow: hidden;
53
- }
54
-
55
- .fancybox-type-iframe .fancybox-inner {
56
- -webkit-overflow-scrolling: touch;
57
- }
58
-
59
- .fancybox-error {
60
- color: #444;
61
- font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
62
- margin: 0;
63
- padding: 15px;
64
- white-space: nowrap;
65
- }
66
-
67
- .fancybox-image, .fancybox-iframe {
68
- display: block;
69
- width: 100%;
70
- height: 100%;
71
- }
72
-
73
- .fancybox-image {
74
- max-width: 100%;
75
- max-height: 100%;
76
- }
77
-
78
- #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
79
- background-image: url('fancybox_sprite.png');
80
- }
81
-
82
- #fancybox-loading {
83
- position: fixed;
84
- top: 50%;
85
- left: 50%;
86
- margin-top: -22px;
87
- margin-left: -22px;
88
- background-position: 0 -108px;
89
- opacity: 0.8;
90
- cursor: pointer;
91
- z-index: 8060;
92
- }
93
-
94
- #fancybox-loading div {
95
- width: 44px;
96
- height: 44px;
97
- background: url('fancybox_loading.gif') center center no-repeat;
98
- }
99
-
100
- .fancybox-close {
101
- position: absolute;
102
- top: -18px;
103
- right: -18px;
104
- width: 36px;
105
- height: 36px;
106
- cursor: pointer;
107
- z-index: 8040;
108
- }
109
-
110
- .fancybox-nav {
111
- position: absolute;
112
- top: 0;
113
- width: 40%;
114
- height: 100%;
115
- cursor: pointer;
116
- text-decoration: none;
117
- background: transparent url('blank.gif'); /* helps IE */
118
- -webkit-tap-highlight-color: rgba(0,0,0,0);
119
- z-index: 8040;
120
- }
121
-
122
- .fancybox-prev {
123
- left: 0;
124
- }
125
-
126
- .fancybox-next {
127
- right: 0;
128
- }
129
-
130
- .fancybox-nav span {
131
- position: absolute;
132
- top: 50%;
133
- width: 36px;
134
- height: 34px;
135
- margin-top: -18px;
136
- cursor: pointer;
137
- z-index: 8040;
138
- visibility: hidden;
139
- }
140
-
141
- .fancybox-prev span {
142
- left: 10px;
143
- background-position: 0 -36px;
144
- }
145
-
146
- .fancybox-next span {
147
- right: 10px;
148
- background-position: 0 -72px;
149
- }
150
-
151
- .fancybox-nav:hover span {
152
- visibility: visible;
153
- }
154
-
155
- .fancybox-tmp {
156
- position: absolute;
157
- top: -99999px;
158
- left: -99999px;
159
- visibility: hidden;
160
- max-width: 99999px;
161
- max-height: 99999px;
162
- overflow: visible !important;
163
- }
164
-
165
- /* Overlay helper */
166
-
167
- .fancybox-lock {
168
- overflow: hidden !important;
169
- width: auto;
170
- }
171
-
172
- .fancybox-lock body {
173
- overflow: hidden !important;
174
- }
175
-
176
- .fancybox-lock-test {
177
- overflow-y: hidden !important;
178
- }
179
-
180
- .fancybox-overlay {
181
- position: absolute;
182
- top: 0;
183
- left: 0;
184
- overflow: hidden;
185
- display: none;
186
- z-index: 8010;
187
- background: url('fancybox_overlay.png');
188
- }
189
-
190
- .fancybox-overlay-fixed {
191
- position: fixed;
192
- bottom: 0;
193
- right: 0;
194
- }
195
-
196
- .fancybox-lock .fancybox-overlay {
197
- overflow: auto;
198
- overflow-y: scroll;
199
- }
200
-
201
- /* Title helper */
202
-
203
- .fancybox-title {
204
- visibility: hidden;
205
- font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
206
- position: relative;
207
- text-shadow: none;
208
- z-index: 8050;
209
- }
210
-
211
- .fancybox-opened .fancybox-title {
212
- visibility: visible;
213
- }
214
-
215
- .fancybox-title-float-wrap {
216
- position: absolute;
217
- bottom: 0;
218
- right: 50%;
219
- margin-bottom: -35px;
220
- z-index: 8050;
221
- text-align: center;
222
- }
223
-
224
- .fancybox-title-float-wrap .child {
225
- display: inline-block;
226
- margin-right: -100%;
227
- padding: 2px 20px;
228
- background: transparent; /* Fallback for web browsers that doesn't support RGBa */
229
- background: rgba(0, 0, 0, 0.8);
230
- -webkit-border-radius: 15px;
231
- -moz-border-radius: 15px;
232
- border-radius: 15px;
233
- text-shadow: 0 1px 2px #222;
234
- color: #FFF;
235
- font-weight: bold;
236
- line-height: 24px;
237
- white-space: nowrap;
238
- }
239
-
240
- .fancybox-title-outside-wrap {
241
- position: relative;
242
- margin-top: 10px;
243
- color: #fff;
244
- }
245
-
246
- .fancybox-title-inside-wrap {
247
- padding-top: 10px;
248
- }
249
-
250
- .fancybox-title-over-wrap {
251
- position: absolute;
252
- bottom: 0;
253
- left: 0;
254
- color: #fff;
255
- padding: 10px;
256
- background: #000;
257
- background: rgba(0, 0, 0, .8);
258
- }
259
-
260
- /*Retina graphics!*/
261
- @media only screen and (-webkit-min-device-pixel-ratio: 1.5),
262
- only screen and (min--moz-device-pixel-ratio: 1.5),
263
- only screen and (min-device-pixel-ratio: 1.5){
264
-
265
- #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
266
- background-image: url('fancybox_sprite@2x.png');
267
- background-size: 44px 152px; /*The size of the normal image, half the size of the hi-res image*/
268
- }
269
-
270
- #fancybox-loading div {
271
- background-image: url('fancybox_loading@2x.gif');
272
- background-size: 24px 24px; /*The size of the normal image, half the size of the hi-res image*/
273
- }
274
  }
1
+ /*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
2
+ .fancybox-wrap,
3
+ .fancybox-skin,
4
+ .fancybox-outer,
5
+ .fancybox-inner,
6
+ .fancybox-image,
7
+ .fancybox-wrap iframe,
8
+ .fancybox-wrap object,
9
+ .fancybox-nav,
10
+ .fancybox-nav span,
11
+ .fancybox-tmp
12
+ {
13
+ padding: 0;
14
+ margin: 0;
15
+ border: 0;
16
+ outline: none;
17
+ vertical-align: top;
18
+ }
19
+
20
+ .fancybox-wrap {
21
+ position: absolute;
22
+ top: 0;
23
+ left: 0;
24
+ z-index: 8020;
25
+ }
26
+
27
+ .fancybox-skin {
28
+ position: relative;
29
+ background: #f9f9f9;
30
+ color: #444;
31
+ text-shadow: none;
32
+ -webkit-border-radius: 4px;
33
+ -moz-border-radius: 4px;
34
+ border-radius: 4px;
35
+ }
36
+
37
+ .fancybox-opened {
38
+ z-index: 8030;
39
+ }
40
+
41
+ .fancybox-opened .fancybox-skin {
42
+ -webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
43
+ -moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
44
+ box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
45
+ }
46
+
47
+ .fancybox-outer, .fancybox-inner {
48
+ position: relative;
49
+ }
50
+
51
+ .fancybox-inner {
52
+ overflow: hidden;
53
+ }
54
+
55
+ .fancybox-type-iframe .fancybox-inner {
56
+ -webkit-overflow-scrolling: touch;
57
+ }
58
+
59
+ .fancybox-error {
60
+ color: #444;
61
+ font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
62
+ margin: 0;
63
+ padding: 15px;
64
+ white-space: nowrap;
65
+ }
66
+
67
+ .fancybox-image, .fancybox-iframe {
68
+ display: block;
69
+ width: 100%;
70
+ height: 100%;
71
+ }
72
+
73
+ .fancybox-image {
74
+ max-width: 100%;
75
+ max-height: 100%;
76
+ }
77
+
78
+ #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
79
+ background-image: url('fancybox_sprite.png');
80
+ }
81
+
82
+ #fancybox-loading {
83
+ position: fixed;
84
+ top: 50%;
85
+ left: 50%;
86
+ margin-top: -22px;
87
+ margin-left: -22px;
88
+ background-position: 0 -108px;
89
+ opacity: 0.8;
90
+ cursor: pointer;
91
+ z-index: 8060;
92
+ }
93
+
94
+ #fancybox-loading div {
95
+ width: 44px;
96
+ height: 44px;
97
+ background: url('fancybox_loading.gif') center center no-repeat;
98
+ }
99
+
100
+ .fancybox-close {
101
+ position: absolute;
102
+ top: -18px;
103
+ right: -18px;
104
+ width: 36px;
105
+ height: 36px;
106
+ cursor: pointer;
107
+ z-index: 8040;
108
+ }
109
+
110
+ .fancybox-nav {
111
+ position: absolute;
112
+ top: 0;
113
+ width: 40%;
114
+ height: 100%;
115
+ cursor: pointer;
116
+ text-decoration: none;
117
+ background: transparent url('blank.gif'); /* helps IE */
118
+ -webkit-tap-highlight-color: rgba(0,0,0,0);
119
+ z-index: 8040;
120
+ }
121
+
122
+ .fancybox-prev {
123
+ left: 0;
124
+ }
125
+
126
+ .fancybox-next {
127
+ right: 0;
128
+ }
129
+
130
+ .fancybox-nav span {
131
+ position: absolute;
132
+ top: 50%;
133
+ width: 36px;
134
+ height: 34px;
135
+ margin-top: -18px;
136
+ cursor: pointer;
137
+ z-index: 8040;
138
+ visibility: hidden;
139
+ }
140
+
141
+ .fancybox-prev span {
142
+ left: 10px;
143
+ background-position: 0 -36px;
144
+ }
145
+
146
+ .fancybox-next span {
147
+ right: 10px;
148
+ background-position: 0 -72px;
149
+ }
150
+
151
+ .fancybox-nav:hover span {
152
+ visibility: visible;
153
+ }
154
+
155
+ .fancybox-tmp {
156
+ position: absolute;
157
+ top: -99999px;
158
+ left: -99999px;
159
+ visibility: hidden;
160
+ max-width: 99999px;
161
+ max-height: 99999px;
162
+ overflow: visible !important;
163
+ }
164
+
165
+ /* Overlay helper */
166
+
167
+ .fancybox-lock {
168
+ overflow: hidden !important;
169
+ width: auto;
170
+ }
171
+
172
+ .fancybox-lock body {
173
+ overflow: hidden !important;
174
+ }
175
+
176
+ .fancybox-lock-test {
177
+ overflow-y: hidden !important;
178
+ }
179
+
180
+ .fancybox-overlay {
181
+ position: absolute;
182
+ top: 0;
183
+ left: 0;
184
+ overflow: hidden;
185
+ display: none;
186
+ z-index: 8010;
187
+ background: url('fancybox_overlay.png');
188
+ }
189
+
190
+ .fancybox-overlay-fixed {
191
+ position: fixed;
192
+ bottom: 0;
193
+ right: 0;
194
+ }
195
+
196
+ .fancybox-lock .fancybox-overlay {
197
+ overflow: auto;
198
+ overflow-y: scroll;
199
+ }
200
+
201
+ /* Title helper */
202
+
203
+ .fancybox-title {
204
+ visibility: hidden;
205
+ font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
206
+ position: relative;
207
+ text-shadow: none;
208
+ z-index: 8050;
209
+ }
210
+
211
+ .fancybox-opened .fancybox-title {
212
+ visibility: visible;
213
+ }
214
+
215
+ .fancybox-title-float-wrap {
216
+ position: absolute;
217
+ bottom: 0;
218
+ right: 50%;
219
+ margin-bottom: -35px;
220
+ z-index: 8050;
221
+ text-align: center;
222
+ }
223
+
224
+ .fancybox-title-float-wrap .child {
225
+ display: inline-block;
226
+ margin-right: -100%;
227
+ padding: 2px 20px;
228
+ background: transparent; /* Fallback for web browsers that doesn't support RGBa */
229
+ background: rgba(0, 0, 0, 0.8);
230
+ -webkit-border-radius: 15px;
231
+ -moz-border-radius: 15px;
232
+ border-radius: 15px;
233
+ text-shadow: 0 1px 2px #222;
234
+ color: #FFF;
235
+ font-weight: bold;
236
+ line-height: 24px;
237
+ white-space: nowrap;
238
+ }
239
+
240
+ .fancybox-title-outside-wrap {
241
+ position: relative;
242
+ margin-top: 10px;
243
+ color: #fff;
244
+ }
245
+
246
+ .fancybox-title-inside-wrap {
247
+ padding-top: 10px;
248
+ }
249
+
250
+ .fancybox-title-over-wrap {
251
+ position: absolute;
252
+ bottom: 0;
253
+ left: 0;
254
+ color: #fff;
255
+ padding: 10px;
256
+ background: #000;
257
+ background: rgba(0, 0, 0, .8);
258
+ }
259
+
260
+ /*Retina graphics!*/
261
+ @media only screen and (-webkit-min-device-pixel-ratio: 1.5),
262
+ only screen and (min--moz-device-pixel-ratio: 1.5),
263
+ only screen and (min-device-pixel-ratio: 1.5){
264
+
265
+ #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
266
+ background-image: url('fancybox_sprite@2x.png');
267
+ background-size: 44px 152px; /*The size of the normal image, half the size of the hi-res image*/
268
+ }
269
+
270
+ #fancybox-loading div {
271
+ background-image: url('fancybox_loading@2x.gif');
272
+ background-size: 24px 24px; /*The size of the normal image, half the size of the hi-res image*/
273
+ }
274
  }
js/fancybox/jquery.fancybox.pack.js CHANGED
@@ -1,46 +1,46 @@
1
- /*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
2
- (function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&E(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},w=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.5",defaults:{padding:15,margin:20,
3
- width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},
4
- keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+
5
- (I?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,
6
- openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,
7
- isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,
8
- c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&
9
- k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||
10
- b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=
11
- setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,p.bind({"onCancel.player beforeClose.player":c,"onUpdate.player":e,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(q(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d=b.current;
12
- d&&(q(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d=
13
- a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")),
14
- b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||!1,d={x:n.scrollLeft(),
15
- y:n.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&r.innerWidth?r.innerWidth:n.width(),d.h=s&&r.innerHeight?r.innerHeight:n.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");n.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(n.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=e.target||e.srcElement;
16
- if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1<a.group.length&&k[c]!==v)return b[d](k[c]),e.preventDefault(),!1;if(-1<f.inArray(c,k))return b[d](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(d,c,k,g){for(var h=f(d.target||null),j=!1;h.length&&!j&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)j=h[0]&&!(h[0].style.overflow&&"hidden"===h[0].style.overflow)&&
17
- (h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1<b.group.length&&!a.canShrink){if(0<g||0<k)b.prev(0<g?"down":"left");else if(0>g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&&b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0,
18
- {},b.helpers[d].defaults,e),c)});p.trigger(a)}},isImage:function(a){return q(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return q(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,
19
- mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=
20
- !0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,w(d.padding[a]))});b.trigger("onReady");if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");
21
- "image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload=
22
- this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href);
23
- f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,
24
- e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,
25
- outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",!1)}));break;case "image":e=a.tpl.image.replace("{href}",
26
- g);break;case "swf":e='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e+='<param name="'+a+'" value="'+b+'"></param>';h+=" "+a+'="'+b+'"'}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");a.inner.css("overflow","yes"===k?"scroll":
27
- "no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,p=h.maxHeight,s=h.scrolling,q=h.scrollOutside?
28
- h.scrollbarWidth:0,x=h.margin,y=l(x[1]+x[3]),r=l(x[0]+x[2]),v,z,t,C,A,F,B,D,H;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");x=l(k.outerWidth(!0)-k.width());v=l(k.outerHeight(!0)-k.height());z=y+x;t=r+v;C=E(c)?(a.w-z)*l(c)/100:c;A=E(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(H=h.content,h.autoHeight&&1===H.data("ready"))try{H[0].contentWindow.document.location&&(g.width(C).height(9999),F=H.contents().find("body"),q&&F.css("overflow-x","hidden"),A=F.outerHeight(!0))}catch(G){}}else if(h.autoWidth||
29
- h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(C),h.autoHeight||g.height(A),h.autoWidth&&(C=g.width()),h.autoHeight&&(A=g.height()),g.removeClass("fancybox-tmp");c=l(C);j=l(A);D=C/A;m=l(E(m)?l(m,"w")-z:m);n=l(E(n)?l(n,"w")-z:n);u=l(E(u)?l(u,"h")-t:u);p=l(E(p)?l(p,"h")-t:p);F=n;B=p;h.fitToView&&(n=Math.min(a.w-z,n),p=Math.min(a.h-t,p));z=a.w-y;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/D)),j>p&&(j=p,c=l(j*D)),c<m&&(c=m,j=l(c/D)),j<u&&(j=u,c=l(j*D))):(c=Math.max(m,Math.min(c,n)),h.autoHeight&&
30
- "iframe"!==h.type&&(g.width(c),j=g.height()),j=Math.max(u,Math.min(j,p)));if(h.fitToView)if(g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height(),h.aspectRatio)for(;(a>z||y>r)&&(c>m&&j>u)&&!(19<d++);)j=Math.max(u,Math.min(p,j-10)),c=l(j*D),c<m&&(c=m,j=l(c/D)),c>n&&(c=n,j=l(c/D)),g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height();else c=Math.max(m,Math.min(c,c-(a-z))),j=Math.max(u,Math.min(j,j-(y-r)));q&&("auto"===s&&j<A&&c+x+q<z)&&(c+=q);g.width(c).height(j);e.width(c+x);a=e.width();
31
- y=e.height();e=(a>z||y>r)&&c>m&&j>u;c=h.aspectRatio?c<F&&j<B&&c<C&&j<A:(c<F||j<B)&&(c<C||j<A);f.extend(h,{dim:{width:w(a),height:w(y)},origWidth:C,origHeight:A,canShrink:e,canExpand:c,wPadding:x,hPadding:v,wrapSpace:y-k.outerHeight(!0),skinSpace:k.height()-j});!H&&(h.autoHeight&&j>u&&j<p&&!c)&&g.height("auto")},_getPosition:function(a){var d=b.current,e=b.getViewport(),c=d.margin,f=b.wrap.width()+c[1]+c[3],g=b.wrap.height()+c[0]+c[2],c={position:"absolute",top:c[0],left:c[3]};d.autoCenter&&d.fixed&&
32
- !a&&g<=e.h&&f<=e.w?c.position="fixed":d.locked||(c.top+=e.y,c.left+=e.x);c.top=w(Math.max(c.top,c.top+(e.h-g)*d.topRatio));c.left=w(Math.max(c.left,c.left+(e.w-f)*d.leftRatio));return c},_afterZoomIn:function(){var a=b.current;a&&(b.isOpen=b.isOpened=!0,b.wrap.css("overflow","visible").addClass("fancybox-opened"),b.update(),(a.closeClick||a.nextClick&&1<b.group.length)&&b.inner.css("cursor","pointer").bind("click.fb",function(d){!f(d.target).is("a")&&!f(d.target).parent().is("a")&&(d.preventDefault(),
33
- b[a.closeClick?"close":"next"]())}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",function(a){a.preventDefault();b.close()}),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(a){a=
34
- a||b.current;f(".fancybox-wrap").trigger("onReset").remove();f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,d=a.element,e=a.orig,c={},f=50,g=50,h=a.hPadding,j=a.wPadding,m=b.getViewport();!e&&(a.isDom&&d.is(":visible"))&&(e=d.find("img:first"),e.length||(e=d));t(e)?(c=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):
35
- (c.top=m.y+(m.h-g)*a.topRatio,c.left=m.x+(m.w-f)*a.leftRatio);if("fixed"===b.wrap.css("position")||a.locked)c.top-=m.y,c.left-=m.x;return c={top:w(c.top-h*a.topRatio),left:w(c.left-j*a.leftRatio),width:w(f+j),height:w(g+h)}},step:function(a,d){var e,c,f=d.prop;c=b.current;var g=c.wrapSpace,h=c.skinSpace;if("width"===f||"height"===f)e=d.end===d.start?1:(a-d.start)/(d.end-d.start),b.isClosing&&(e=1-e),c="width"===f?c.wPadding:c.hPadding,c=a-c,b.skin[f](l("width"===f?c:c-g*e)),b.inner[f](l("width"===
36
- f?c:c-g*e-h*e))},zoomIn:function(){var a=b.current,d=a.pos,e=a.openEffect,c="elastic"===e,k=f.extend({opacity:1},d);delete k.position;c?(d=this.getOrigPosition(),a.openOpacity&&(d.opacity=0.1)):"fade"===e&&(d.opacity=0.1);b.wrap.css(d).animate(k,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:c?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,d=a.closeEffect,e="elastic"===d,c={opacity:0.1};e&&(c=this.getOrigPosition(),a.closeOpacity&&(c.opacity=0.1));b.wrap.animate(c,
37
- {duration:"none"===d?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,complete:b._afterZoomOut})},changeIn:function(){var a=b.current,d=a.nextEffect,e=a.pos,c={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===d&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=w(l(e[g])-200),c[g]="+=200px"):(e[g]=w(l(e[g])+200),c[g]="-=200px"));"none"===d?b._afterZoomIn():b.wrap.css(e).animate(c,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a=
38
- b.previous,d=a.prevEffect,e={opacity:0.1},c=b.direction;"elastic"===d&&(e["down"===c||"up"===c?"top":"left"]=("up"===c||"left"===c?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===d?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!s,fixed:!0},overlay:null,fixed:!1,el:f("html"),create:function(a){a=f.extend({},this.defaults,a);this.overlay&&this.close();this.overlay=
39
- f('<div class="fancybox-overlay"></div>').appendTo(b.coming?b.coming.parent:a.parent);this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(n.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive?
40
- b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){var a,b;n.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),a=n.scrollTop(),b=n.scrollLeft(),this.el.removeClass("fancybox-lock"),n.scrollTop(a).scrollLeft(b));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%");I?(b=Math.max(G.documentElement.offsetWidth,G.body.offsetWidth),
41
- p.width()>b&&(a=p.width())):p.width()>n.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&(this.fixed&&b.fixed)&&(e||(this.margin=p.height()>n.height()?f("html").css("margin-right").replace("px",""):!1),b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){var e,c;b.locked&&(!1!==this.margin&&(f("*").filter(function(){return"fixed"===
42
- f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin")),e=n.scrollTop(),c=n.scrollLeft(),this.el.addClass("fancybox-lock"),n.scrollTop(e).scrollLeft(c));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d=
43
- b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(q(e)&&""!==f.trim(e)){d=f('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+e+"</div>");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),I&&d.width(d.width()),d.wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d,
44
- e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+'"]'),j=h.index(this)),a.index=j,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):p.undelegate(c,"click.fb-start").delegate(c+
45
- ":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===v&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===v){a=f.support;d=f('<div style="position:fixed;top:20px;"></div>').appendTo("body");var e=20===
46
  d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(r).width();J.addClass("fancybox-lock-test");d=f(r).width();J.removeClass("fancybox-lock-test");f("<style type='text/css'>.fancybox-margin{margin-right:"+(d-a)+"px;}</style>").appendTo("head")})})(window,document,jQuery);
1
+ /*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
2
+ (function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&E(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},w=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.5",defaults:{padding:15,margin:20,
3
+ width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},
4
+ keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+
5
+ (I?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,
6
+ openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,
7
+ isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,
8
+ c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&
9
+ k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||
10
+ b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=
11
+ setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,p.bind({"onCancel.player beforeClose.player":c,"onUpdate.player":e,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(q(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d=b.current;
12
+ d&&(q(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d=
13
+ a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")),
14
+ b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||!1,d={x:n.scrollLeft(),
15
+ y:n.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&r.innerWidth?r.innerWidth:n.width(),d.h=s&&r.innerHeight?r.innerHeight:n.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");n.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(n.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=e.target||e.srcElement;
16
+ if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1<a.group.length&&k[c]!==v)return b[d](k[c]),e.preventDefault(),!1;if(-1<f.inArray(c,k))return b[d](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(d,c,k,g){for(var h=f(d.target||null),j=!1;h.length&&!j&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)j=h[0]&&!(h[0].style.overflow&&"hidden"===h[0].style.overflow)&&
17
+ (h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1<b.group.length&&!a.canShrink){if(0<g||0<k)b.prev(0<g?"down":"left");else if(0>g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&&b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0,
18
+ {},b.helpers[d].defaults,e),c)});p.trigger(a)}},isImage:function(a){return q(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return q(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,
19
+ mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=
20
+ !0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,w(d.padding[a]))});b.trigger("onReady");if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");
21
+ "image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload=
22
+ this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href);
23
+ f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,
24
+ e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,
25
+ outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",!1)}));break;case "image":e=a.tpl.image.replace("{href}",
26
+ g);break;case "swf":e='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e+='<param name="'+a+'" value="'+b+'"></param>';h+=" "+a+'="'+b+'"'}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");a.inner.css("overflow","yes"===k?"scroll":
27
+ "no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,p=h.maxHeight,s=h.scrolling,q=h.scrollOutside?
28
+ h.scrollbarWidth:0,x=h.margin,y=l(x[1]+x[3]),r=l(x[0]+x[2]),v,z,t,C,A,F,B,D,H;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");x=l(k.outerWidth(!0)-k.width());v=l(k.outerHeight(!0)-k.height());z=y+x;t=r+v;C=E(c)?(a.w-z)*l(c)/100:c;A=E(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(H=h.content,h.autoHeight&&1===H.data("ready"))try{H[0].contentWindow.document.location&&(g.width(C).height(9999),F=H.contents().find("body"),q&&F.css("overflow-x","hidden"),A=F.outerHeight(!0))}catch(G){}}else if(h.autoWidth||
29
+ h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(C),h.autoHeight||g.height(A),h.autoWidth&&(C=g.width()),h.autoHeight&&(A=g.height()),g.removeClass("fancybox-tmp");c=l(C);j=l(A);D=C/A;m=l(E(m)?l(m,"w")-z:m);n=l(E(n)?l(n,"w")-z:n);u=l(E(u)?l(u,"h")-t:u);p=l(E(p)?l(p,"h")-t:p);F=n;B=p;h.fitToView&&(n=Math.min(a.w-z,n),p=Math.min(a.h-t,p));z=a.w-y;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/D)),j>p&&(j=p,c=l(j*D)),c<m&&(c=m,j=l(c/D)),j<u&&(j=u,c=l(j*D))):(c=Math.max(m,Math.min(c,n)),h.autoHeight&&
30
+ "iframe"!==h.type&&(g.width(c),j=g.height()),j=Math.max(u,Math.min(j,p)));if(h.fitToView)if(g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height(),h.aspectRatio)for(;(a>z||y>r)&&(c>m&&j>u)&&!(19<d++);)j=Math.max(u,Math.min(p,j-10)),c=l(j*D),c<m&&(c=m,j=l(c/D)),c>n&&(c=n,j=l(c/D)),g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height();else c=Math.max(m,Math.min(c,c-(a-z))),j=Math.max(u,Math.min(j,j-(y-r)));q&&("auto"===s&&j<A&&c+x+q<z)&&(c+=q);g.width(c).height(j);e.width(c+x);a=e.width();
31
+ y=e.height();e=(a>z||y>r)&&c>m&&j>u;c=h.aspectRatio?c<F&&j<B&&c<C&&j<A:(c<F||j<B)&&(c<C||j<A);f.extend(h,{dim:{width:w(a),height:w(y)},origWidth:C,origHeight:A,canShrink:e,canExpand:c,wPadding:x,hPadding:v,wrapSpace:y-k.outerHeight(!0),skinSpace:k.height()-j});!H&&(h.autoHeight&&j>u&&j<p&&!c)&&g.height("auto")},_getPosition:function(a){var d=b.current,e=b.getViewport(),c=d.margin,f=b.wrap.width()+c[1]+c[3],g=b.wrap.height()+c[0]+c[2],c={position:"absolute",top:c[0],left:c[3]};d.autoCenter&&d.fixed&&
32
+ !a&&g<=e.h&&f<=e.w?c.position="fixed":d.locked||(c.top+=e.y,c.left+=e.x);c.top=w(Math.max(c.top,c.top+(e.h-g)*d.topRatio));c.left=w(Math.max(c.left,c.left+(e.w-f)*d.leftRatio));return c},_afterZoomIn:function(){var a=b.current;a&&(b.isOpen=b.isOpened=!0,b.wrap.css("overflow","visible").addClass("fancybox-opened"),b.update(),(a.closeClick||a.nextClick&&1<b.group.length)&&b.inner.css("cursor","pointer").bind("click.fb",function(d){!f(d.target).is("a")&&!f(d.target).parent().is("a")&&(d.preventDefault(),
33
+ b[a.closeClick?"close":"next"]())}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",function(a){a.preventDefault();b.close()}),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(a){a=
34
+ a||b.current;f(".fancybox-wrap").trigger("onReset").remove();f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,d=a.element,e=a.orig,c={},f=50,g=50,h=a.hPadding,j=a.wPadding,m=b.getViewport();!e&&(a.isDom&&d.is(":visible"))&&(e=d.find("img:first"),e.length||(e=d));t(e)?(c=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):
35
+ (c.top=m.y+(m.h-g)*a.topRatio,c.left=m.x+(m.w-f)*a.leftRatio);if("fixed"===b.wrap.css("position")||a.locked)c.top-=m.y,c.left-=m.x;return c={top:w(c.top-h*a.topRatio),left:w(c.left-j*a.leftRatio),width:w(f+j),height:w(g+h)}},step:function(a,d){var e,c,f=d.prop;c=b.current;var g=c.wrapSpace,h=c.skinSpace;if("width"===f||"height"===f)e=d.end===d.start?1:(a-d.start)/(d.end-d.start),b.isClosing&&(e=1-e),c="width"===f?c.wPadding:c.hPadding,c=a-c,b.skin[f](l("width"===f?c:c-g*e)),b.inner[f](l("width"===
36
+ f?c:c-g*e-h*e))},zoomIn:function(){var a=b.current,d=a.pos,e=a.openEffect,c="elastic"===e,k=f.extend({opacity:1},d);delete k.position;c?(d=this.getOrigPosition(),a.openOpacity&&(d.opacity=0.1)):"fade"===e&&(d.opacity=0.1);b.wrap.css(d).animate(k,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:c?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,d=a.closeEffect,e="elastic"===d,c={opacity:0.1};e&&(c=this.getOrigPosition(),a.closeOpacity&&(c.opacity=0.1));b.wrap.animate(c,
37
+ {duration:"none"===d?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,complete:b._afterZoomOut})},changeIn:function(){var a=b.current,d=a.nextEffect,e=a.pos,c={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===d&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=w(l(e[g])-200),c[g]="+=200px"):(e[g]=w(l(e[g])+200),c[g]="-=200px"));"none"===d?b._afterZoomIn():b.wrap.css(e).animate(c,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a=
38
+ b.previous,d=a.prevEffect,e={opacity:0.1},c=b.direction;"elastic"===d&&(e["down"===c||"up"===c?"top":"left"]=("up"===c||"left"===c?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===d?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!s,fixed:!0},overlay:null,fixed:!1,el:f("html"),create:function(a){a=f.extend({},this.defaults,a);this.overlay&&this.close();this.overlay=
39
+ f('<div class="fancybox-overlay"></div>').appendTo(b.coming?b.coming.parent:a.parent);this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(n.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive?
40
+ b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){var a,b;n.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),a=n.scrollTop(),b=n.scrollLeft(),this.el.removeClass("fancybox-lock"),n.scrollTop(a).scrollLeft(b));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%");I?(b=Math.max(G.documentElement.offsetWidth,G.body.offsetWidth),
41
+ p.width()>b&&(a=p.width())):p.width()>n.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&(this.fixed&&b.fixed)&&(e||(this.margin=p.height()>n.height()?f("html").css("margin-right").replace("px",""):!1),b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){var e,c;b.locked&&(!1!==this.margin&&(f("*").filter(function(){return"fixed"===
42
+ f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin")),e=n.scrollTop(),c=n.scrollLeft(),this.el.addClass("fancybox-lock"),n.scrollTop(e).scrollLeft(c));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d=
43
+ b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(q(e)&&""!==f.trim(e)){d=f('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+e+"</div>");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),I&&d.width(d.width()),d.wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d,
44
+ e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+'"]'),j=h.index(this)),a.index=j,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):p.undelegate(c,"click.fb-start").delegate(c+
45
+ ":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===v&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===v){a=f.support;d=f('<div style="position:fixed;top:20px;"></div>').appendTo("body");var e=20===
46
  d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(r).width();J.addClass("fancybox-lock-test");d=f(r).width();J.removeClass("fancybox-lock-test");f("<style type='text/css'>.fancybox-margin{margin-right:"+(d-a)+"px;}</style>").appendTo("head")})})(window,document,jQuery);
js/form_maker_editor_button.js CHANGED
@@ -1,22 +1,22 @@
1
- (function() {
2
- tinymce.create('tinymce.plugins.Form_Maker_mce', {
3
- init : function(ed, url) {
4
- ed.addCommand('mceForm_Maker_mce', function() {
5
- ed.windowManager.open({
6
- file : form_maker_admin_ajax,
7
- width : 550 + ed.getLang('Form_Maker_mce.delta_width', 0),
8
- height : 300 + ed.getLang('Form_Maker_mce.delta_height', 0),
9
- inline : 1
10
- }, {
11
- plugin_url : url // Plugin absolute URL
12
- });
13
- });
14
- ed.addButton('Form_Maker_mce', {
15
- title : 'Insert Form Maker',
16
- cmd : 'mceForm_Maker_mce',
17
- image: url + '/images/form_maker_edit_but.png'
18
- });
19
- }
20
- });
21
- tinymce.PluginManager.add('Form_Maker_mce', tinymce.plugins.Form_Maker_mce);
22
  })();
1
+ (function() {
2
+ tinymce.create('tinymce.plugins.Form_Maker_mce', {
3
+ init : function(ed, url) {
4
+ ed.addCommand('mceForm_Maker_mce', function() {
5
+ ed.windowManager.open({
6
+ file : form_maker_admin_ajax,
7
+ width : 550 + ed.getLang('Form_Maker_mce.delta_width', 0),
8
+ height : 300 + ed.getLang('Form_Maker_mce.delta_height', 0),
9
+ inline : 1
10
+ }, {
11
+ plugin_url : url // Plugin absolute URL
12
+ });
13
+ });
14
+ ed.addButton('Form_Maker_mce', {
15
+ title : 'Insert Form Maker',
16
+ cmd : 'mceForm_Maker_mce',
17
+ image: url + '/images/form_maker_edit_but.png'
18
+ });
19
+ }
20
+ });
21
+ tinymce.PluginManager.add('Form_Maker_mce', tinymce.plugins.Form_Maker_mce);
22
  })();
js/form_maker_manage.js CHANGED
@@ -262,6 +262,7 @@ function refresh_old() {
262
  case "type_hidden":
263
  case "type_map":
264
  case "type_mark_map":
 
265
  case "type_paypal_select": {
266
  remove_add_(i + "_elementform_id_temp");
267
  break;
@@ -651,6 +652,7 @@ function change_choices(value, ids, types, params) {
651
  case "type_phone":
652
  case "type_paypal_price":
653
  case "type_spinner":
 
654
  if(types_array[id]=="type_number" || types_array[id]=="type_phone")
655
  var keypress_function = "return check_isnum_space(event)";
656
  else
@@ -880,6 +882,7 @@ function add_condition_fields(num, ids1, labels1, types1, params1) {
880
  case "type_number":
881
  case "type_paypal_price":
882
  case "type_spinner":
 
883
  if(types[index_of_field]=="type_number" || types[index_of_field]=="type_phone")
884
  var keypress_function = "return check_isnum_space(event)";
885
  else
262
  case "type_hidden":
263
  case "type_map":
264
  case "type_mark_map":
265
+ case "type_date_new":
266
  case "type_paypal_select": {
267
  remove_add_(i + "_elementform_id_temp");
268
  break;
652
  case "type_phone":
653
  case "type_paypal_price":
654
  case "type_spinner":
655
+ case "type_date_new":
656
  if(types_array[id]=="type_number" || types_array[id]=="type_phone")
657
  var keypress_function = "return check_isnum_space(event)";
658
  else
882
  case "type_number":
883
  case "type_paypal_price":
884
  case "type_spinner":
885
+ case "type_date_new":
886
  if(types[index_of_field]=="type_number" || types[index_of_field]=="type_phone")
887
  var keypress_function = "return check_isnum_space(event)";
888
  else
js/form_maker_submissions.js CHANGED
@@ -1,94 +1,94 @@
1
- function tableOrdering(order, dir, task) {
2
- var form = document.admin_form;
3
- form.filter_order2.value = order;
4
- form.filter_order_Dir2.value = dir;
5
- submitform(task);
6
- }
7
-
8
- function ordering(name, as_or_desc) {
9
- document.getElementById('asc_or_desc').value = as_or_desc;
10
- document.getElementById('order_by').value = name;
11
- document.getElementById('admin_form').submit();
12
- }
13
-
14
- function renderColumns() {
15
- allTags = document.getElementsByTagName('*');
16
- for (curTag in allTags) {
17
- if (typeof(allTags[curTag].className) != "undefined") {
18
- if (allTags[curTag].className.indexOf('_fc') > 0) {
19
- curLabel = allTags[curTag].className.replace('_fc', '');
20
- curLabel = curLabel.replace('table_large_col ', '');
21
- if (document.forms.admin_form.hide_label_list.value.indexOf('@' + curLabel + '@') >= 0) {
22
- allTags[curTag].style.display = 'none';
23
- }
24
- else {
25
- allTags[curTag].style.display = '';
26
- }
27
- }
28
- }
29
- if (typeof(allTags[curTag].id) != "undefined") {
30
- if (allTags[curTag].id.indexOf('_fc') > 0) {
31
- curLabel = allTags[curTag].id.replace('_fc','');
32
- if (document.forms.admin_form.hide_label_list.value.indexOf('@' + curLabel + '@') >= 0) {
33
- allTags[curTag].style.display = 'none';
34
- }
35
- else {
36
- allTags[curTag].style.display = '';
37
- }
38
- }
39
- }
40
- }
41
- }
42
-
43
- function clickLabChB(label, ChB) {
44
- document.forms.admin_form.hide_label_list.value = document.forms.admin_form.hide_label_list.value.replace('@' + label + '@', '');
45
- if (document.forms.admin_form.hide_label_list.value == '') {
46
- document.getElementById('ChBAll').checked = true;
47
- }
48
- if (!(ChB.checked)) {
49
- document.forms.admin_form.hide_label_list.value += '@' + label + '@';
50
- document.getElementById('ChBAll').checked = false;
51
- }
52
- renderColumns();
53
- }
54
-
55
- function toggleChBDiv(flag) {
56
- if (flag) {
57
- /* sizes = window.getSize().size;*/
58
- var width = jQuery(window).width();
59
- var height = jQuery(window).height();
60
- document.getElementById("sbox-overlay").style.width = width + "px";
61
- document.getElementById("sbox-overlay").style.height = height + "px";
62
- document.getElementById("ChBDiv").style.left = Math.floor((width - 350) / 2) + "px";
63
-
64
- document.getElementById("ChBDiv").style.display = "block";
65
- document.getElementById("sbox-overlay").style.display = "block";
66
- }
67
- else {
68
- document.getElementById("ChBDiv").style.display = "none";
69
- document.getElementById("sbox-overlay").style.display = "none";
70
- }
71
- }
72
-
73
- function submit_del(href_in) {
74
- document.getElementById('admin_form').action = href_in;
75
- document.getElementById('admin_form').submit();
76
- }
77
-
78
- function submitbutton(pressbutton) {
79
- var form = document.adminForm;
80
- if (pressbutton == 'cancel_theme') {
81
- submitform(pressbutton);
82
- return;
83
- }
84
- if (document.getElementById('title').value == '') {
85
- alert('The theme must have a title.')
86
- return;
87
- }
88
- submitform(pressbutton);
89
- }
90
-
91
- function submitform(pressbutton) {
92
- document.getElementById('adminForm').action = document.getElementById('adminForm').action + "&task=" + pressbutton;
93
- document.getElementById('adminForm').submit();
94
- }
1
+ function tableOrdering(order, dir, task) {
2
+ var form = document.admin_form;
3
+ form.filter_order2.value = order;
4
+ form.filter_order_Dir2.value = dir;
5
+ submitform(task);
6
+ }
7
+
8
+ function ordering(name, as_or_desc) {
9
+ document.getElementById('asc_or_desc').value = as_or_desc;
10
+ document.getElementById('order_by').value = name;
11
+ document.getElementById('admin_form').submit();
12
+ }
13
+
14
+ function renderColumns() {
15
+ allTags = document.getElementsByTagName('*');
16
+ for (curTag in allTags) {
17
+ if (typeof(allTags[curTag].className) != "undefined") {
18
+ if (allTags[curTag].className.indexOf('_fc') > 0) {
19
+ curLabel = allTags[curTag].className.replace('_fc', '');
20
+ curLabel = curLabel.replace('table_large_col ', '');
21
+ if (document.forms.admin_form.hide_label_list.value.indexOf('@' + curLabel + '@') >= 0) {
22
+ allTags[curTag].style.display = 'none';
23
+ }
24
+ else {
25
+ allTags[curTag].style.display = '';
26
+ }
27
+ }
28
+ }
29
+ if (typeof(allTags[curTag].id) != "undefined") {
30
+ if (allTags[curTag].id.indexOf('_fc') > 0) {
31
+ curLabel = allTags[curTag].id.replace('_fc','');
32
+ if (document.forms.admin_form.hide_label_list.value.indexOf('@' + curLabel + '@') >= 0) {
33
+ allTags[curTag].style.display = 'none';
34
+ }
35
+ else {
36
+ allTags[curTag].style.display = '';
37
+ }
38
+ }
39
+ }
40
+ }
41
+ }
42
+
43
+ function clickLabChB(label, ChB) {
44
+ document.forms.admin_form.hide_label_list.value = document.forms.admin_form.hide_label_list.value.replace('@' + label + '@', '');
45
+ if (document.forms.admin_form.hide_label_list.value == '') {
46
+ document.getElementById('ChBAll').checked = true;
47
+ }
48
+ if (!(ChB.checked)) {
49
+ document.forms.admin_form.hide_label_list.value += '@' + label + '@';
50
+ document.getElementById('ChBAll').checked = false;
51
+ }
52
+ renderColumns();
53
+ }
54
+
55
+ function toggleChBDiv(flag) {
56
+ if (flag) {
57
+ /* sizes = window.getSize().size;*/
58
+ var width = jQuery(window).width();
59
+ var height = jQuery(window).height();
60
+ document.getElementById("sbox-overlay").style.width = width + "px";
61
+ document.getElementById("sbox-overlay").style.height = height + "px";
62
+ document.getElementById("ChBDiv").style.left = Math.floor((width - 350) / 2) + "px";
63
+
64
+ document.getElementById("ChBDiv").style.display = "block";
65
+ document.getElementById("sbox-overlay").style.display = "block";
66
+ }
67
+ else {
68
+ document.getElementById("ChBDiv").style.display = "none";
69
+ document.getElementById("sbox-overlay").style.display = "none";
70
+ }
71
+ }
72
+
73
+ function submit_del(href_in) {
74
+ document.getElementById('admin_form').action = href_in;
75
+ document.getElementById('admin_form').submit();
76
+ }
77
+
78
+ function submitbutton(pressbutton) {
79
+ var form = document.adminForm;
80
+ if (pressbutton == 'cancel_theme') {
81
+ submitform(pressbutton);
82
+ return;
83
+ }
84
+ if (document.getElementById('title').value == '') {
85
+ alert('The theme must have a title.')
86
+ return;
87
+ }
88
+ submitform(pressbutton);
89
+ }
90
+
91
+ function submitform(pressbutton) {
92
+ document.getElementById('adminForm').action = document.getElementById('adminForm').action + "&task=" + pressbutton;
93
+ document.getElementById('adminForm').submit();
94
+ }
js/if_gmap_back_end.js CHANGED
@@ -1,226 +1,226 @@
1
- /* Code based on Google Map APIv3 Tutorials */
2
-
3
-
4
- var gmapdata= new Array();
5
- var gmapmarker = new Array();
6
-
7
- function if_gmap_init(id)
8
- {
9
- map=document.getElementById(id+"_elementform_id_temp");
10
- var def_zoomval = parseInt(map.getAttribute("zoom"));
11
- var def_longval = map.getAttribute("center_x");
12
- var def_latval = map.getAttribute("center_y");
13
-
14
- var curpoint = new google.maps.LatLng(def_latval,def_longval);
15
-
16
- gmapdata[id] = new google.maps.Map(document.getElementById(id+"_elementform_id_temp"), {
17
- center: curpoint,
18
- zoom: def_zoomval,
19
- mapTypeId: 'roadmap'
20
- });
21
-
22
- google.maps.event.addListener(gmapdata[id], 'zoom_changed', function() {
23
- document.getElementById(id+"_elementform_id_temp").setAttribute("zoom", gmapdata[id].getZoom());
24
- });
25
-
26
- gmapmarker[id] = new Array();
27
-
28
- return false;
29
- } // end of if_gmap_init
30
-
31
- function update_position(id, i)
32
- {
33
-
34
- var longval = document.getElementById("longval"+i).value;
35
- var latval = document.getElementById("latval"+i).value;
36
- if (longval.length > 0) {
37
- if (isNaN(parseFloat(longval)) == true) {
38
- longval = 2.294254;
39
- } // end of if
40
- } else {
41
- longval = 2.294254;
42
- } // end of if
43
-
44
- if (latval.length > 0) {
45
- if (isNaN(parseFloat(latval)) == true) {
46
- latval = 48.858334;
47
- } // end of if
48
- } else {
49
- latval = 48.858334;
50
- } // end of if
51
-
52
- var curpoint = new google.maps.LatLng(latval,longval);
53
-
54
- gmapmarker[id][i].setPosition(curpoint);
55
- gmapdata[id].setCenter(curpoint);
56
-
57
- cur_zoom=gmapdata[id].getZoom();
58
-
59
- gmapdata[id].setZoom(cur_zoom);
60
-
61
- geocoder = new google.maps.Geocoder();
62
-
63
-
64
- geocoder.geocode({'latLng': gmapmarker[id][i].getPosition()}, function(results, status)
65
- {
66
- if (status == google.maps.GeocoderStatus.OK)
67
- {
68
- if (results[0])
69
- {
70
- if(document.getElementById("addrval"+i))
71
- document.getElementById("addrval"+i).value = results[0].formatted_address;
72
- }
73
- }
74
- });
75
-
76
- return false;
77
- }
78
- function reomve_marker(id,i)
79
- {
80
- gmapmarker[id][i].setMap(null);
81
- }
82
-
83
-
84
- function add_marker_on_map(id, i, w_long, w_lat, w_info, dragb)
85
- {
86
- map=document.getElementById(id+"_elementform_id_temp");
87
- if(w_long==null)
88
- {
89
- var marker_point = gmapdata[id].getCenter();
90
- w_lat=gmapdata[id].getCenter().lat();
91
- w_long=gmapdata[id].getCenter().lng();
92
- }
93
- else
94
- var marker_point = new google.maps.LatLng(w_lat, w_long);
95
-
96
-
97
- geocoder = new google.maps.Geocoder();
98
-
99
- gmapmarker[id][i] = new google.maps.Marker({
100
- map: gmapdata[id],
101
- position: marker_point,
102
- draggable: dragb
103
- });
104
-
105
- gmapmarker[id][i].setDraggable(dragb);
106
-
107
- infoW = new google.maps.InfoWindow;
108
-
109
- google.maps.event.addListener(gmapdata[id], 'mouseover', function(event)
110
- {
111
- if(!document.getElementById("longval"+i))
112
- {
113
- gmapmarker[id][i].setDraggable(false);
114
- }
115
- });
116
-
117
-
118
- /* google.maps.event.addListener(gmapdata, 'click', function(event) {
119
- if(document.getElementById("longval"))
120
- {
121
- document.getElementById("longval").value = event.latLng.lng().toFixed(6);
122
- document.getElementById("latval").value = event.latLng.lat().toFixed(6);
123
- gmapmarker.setPosition(event.latLng);
124
- if_gmap_updateMap();
125
-
126
- geocoder.geocode({'latLng': gmapmarker.getPosition()}, function(results, status)
127
- {
128
- if (status == google.maps.GeocoderStatus.OK)
129
- {
130
- if (results[0])
131
- {
132
-
133
- if(document.getElementById("addrval")) document.getElementById("addrval").value = results[0].formatted_address;
134
- }
135
- }
136
- });
137
- }
138
-
139
- });*/
140
-
141
- google.maps.event.addListener(gmapmarker[id][i], 'drag', function()
142
- {
143
- if(document.getElementById("longval"+i))
144
- {
145
- geocoder.geocode({'latLng': gmapmarker[id][i].getPosition()}, function(results, status)
146
- {
147
- if (status == google.maps.GeocoderStatus.OK)
148
- {
149
- if (results[0])
150
- {
151
- if(document.getElementById("addrval"+i))
152
- document.getElementById("addrval"+i).value = results[0].formatted_address;
153
- }
154
- }
155
- });
156
-
157
- map.setAttribute("long"+i, gmapmarker[id][i].getPosition().lng().toFixed(6));
158
- map.setAttribute("lat"+i, gmapmarker[id][i].getPosition().lat().toFixed(6));
159
- document.getElementById("latval"+i).value = gmapmarker[id][i].getPosition().lat().toFixed(6);
160
- document.getElementById("longval"+i).value = gmapmarker[id][i].getPosition().lng().toFixed(6);
161
- }
162
- });
163
-
164
- google.maps.event.addListener(gmapmarker[id][i], 'click', function()
165
- {
166
- infoW.setContent('<div style="overflow: hidden;">'+document.getElementById(id+"_elementform_id_temp").getAttribute('info'+i)+"</div>");
167
- var infoWOpt = {
168
- maxWidth: "300"
169
- };
170
- infoW.setOptions(infoWOpt);
171
- infoW.open(this.getMap(), this);
172
- });
173
-
174
- if(document.getElementById("longval"+i))
175
- {
176
- document.getElementById("longval"+i).value = w_long;
177
- document.getElementById("latval"+i).value = w_lat;
178
-
179
- geocoder.geocode({'latLng': gmapmarker[id][i].getPosition()}, function(results, status)
180
- {
181
- if (status == google.maps.GeocoderStatus.OK)
182
- {
183
- if (results[0])
184
- {
185
- if(document.getElementById("addrval"+i)) document.getElementById("addrval"+i).value = results[0].formatted_address;
186
- }
187
- }
188
- });
189
- map.setAttribute("long"+i, w_long);
190
- map.setAttribute("lat"+i, w_lat);
191
- }
192
- return false;
193
-
194
-
195
- } // end of if_gmap_init
196
-
197
-
198
- function changeAddress(id, i) {
199
- var addrval = document.getElementById("addrval"+i).value;
200
- geocoder.geocode( { 'address': addrval}, function(results, status) {
201
- if (status == google.maps.GeocoderStatus.OK) {
202
- gmapdata[id].setCenter(results[0].geometry.location);
203
- gmapmarker[id][i].setPosition(results[0].geometry.location);
204
- document.getElementById("latval"+i).value = gmapmarker[id][i].getPosition().lat().toFixed(6);
205
- document.getElementById("longval"+i).value = gmapmarker[id][i].getPosition().lng().toFixed(6);
206
- map.setAttribute("long"+i, gmapmarker[id][i].getPosition().lng().toFixed(6));
207
- map.setAttribute("lat"+i, gmapmarker[id][i].getPosition().lat().toFixed(6));
208
- }
209
- });
210
- }
211
-
212
- function change_info(value,id,i)
213
- {
214
- map=document.getElementById(id+"_elementform_id_temp");
215
- map.setAttribute("info"+i, value);
216
- }
217
-
218
- function if_gmap_updateMap(id)
219
- {
220
- map=document.getElementById(id+"_elementform_id_temp");
221
- w_long=gmapdata[id].getCenter().lng();;
222
- w_lat=gmapdata[id].getCenter().lat();;
223
- map.setAttribute("center_x", w_long);
224
- map.setAttribute("center_y", w_lat);
225
- }
226
-
1
+ /* Code based on Google Map APIv3 Tutorials */
2
+
3
+
4
+ var gmapdata= new Array();
5
+ var gmapmarker = new Array();
6
+
7
+ function if_gmap_init(id)
8
+ {
9
+ map=document.getElementById(id+"_elementform_id_temp");
10
+ var def_zoomval = parseInt(map.getAttribute("zoom"));
11
+ var def_longval = map.getAttribute("center_x");
12
+ var def_latval = map.getAttribute("center_y");
13
+
14
+ var curpoint = new google.maps.LatLng(def_latval,def_longval);
15
+
16
+ gmapdata[id] = new google.maps.Map(document.getElementById(id+"_elementform_id_temp"), {
17
+ center: curpoint,
18
+ zoom: def_zoomval,
19
+ mapTypeId: 'roadmap'
20
+ });
21
+
22
+ google.maps.event.addListener(gmapdata[id], 'zoom_changed', function() {
23
+ document.getElementById(id+"_elementform_id_temp").setAttribute("zoom", gmapdata[id].getZoom());
24
+ });
25
+
26
+ gmapmarker[id] = new Array();
27
+
28
+ return false;
29
+ } // end of if_gmap_init
30
+
31
+ function update_position(id, i)
32
+ {
33
+
34
+ var longval = document.getElementById("longval"+i).value;
35
+ var latval = document.getElementById("latval"+i).value;
36
+ if (longval.length > 0) {
37
+ if (isNaN(parseFloat(longval)) == true) {
38
+ longval = 2.294254;
39
+ } // end of if
40
+ } else {
41
+ longval = 2.294254;
42
+ } // end of if
43
+
44
+ if (latval.length > 0) {
45
+ if (isNaN(parseFloat(latval)) == true) {
46
+ latval = 48.858334;
47
+ } // end of if
48
+ } else {
49
+ latval = 48.858334;
50
+ } // end of if
51
+
52
+ var curpoint = new google.maps.LatLng(latval,longval);
53
+
54
+ gmapmarker[id][i].setPosition(curpoint);
55
+ gmapdata[id].setCenter(curpoint);
56
+
57
+ cur_zoom=gmapdata[id].getZoom();
58
+
59
+ gmapdata[id].setZoom(cur_zoom);
60
+
61
+ geocoder = new google.maps.Geocoder();
62
+
63
+
64
+ geocoder.geocode({'latLng': gmapmarker[id][i].getPosition()}, function(results, status)
65
+ {
66
+ if (status == google.maps.GeocoderStatus.OK)
67
+ {
68
+ if (results[0])
69
+ {
70
+ if(document.getElementById("addrval"+i))
71
+ document.getElementById("addrval"+i).value = results[0].formatted_address;
72
+ }
73
+ }
74
+ });
75
+
76
+ return false;
77
+ }
78
+ function reomve_marker(id,i)
79
+ {
80
+ gmapmarker[id][i].setMap(null);
81
+ }
82
+
83
+
84
+ function add_marker_on_map(id, i, w_long, w_lat, w_info, dragb)
85
+ {
86
+ map=document.getElementById(id+"_elementform_id_temp");
87
+ if(w_long==null)
88
+ {
89
+ var marker_point = gmapdata[id].getCenter();
90
+ w_lat=gmapdata[id].getCenter().lat();
91
+ w_long=gmapdata[id].getCenter().lng();
92
+ }
93
+ else
94
+ var marker_point = new google.maps.LatLng(w_lat, w_long);
95
+
96
+
97
+ geocoder = new google.maps.Geocoder();
98
+
99
+ gmapmarker[id][i] = new google.maps.Marker({
100
+ map: gmapdata[id],
101
+ position: marker_point,
102
+ draggable: dragb
103
+ });
104
+
105
+ gmapmarker[id][i].setDraggable(dragb);
106
+
107
+ infoW = new google.maps.InfoWindow;
108
+
109
+ google.maps.event.addListener(gmapdata[id], 'mouseover', function(event)
110
+ {
111
+ if(!document.getElementById("longval"+i))
112
+ {
113
+ gmapmarker[id][i].setDraggable(false);
114
+ }
115
+ });
116
+
117
+
118
+ /* google.maps.event.addListener(gmapdata, 'click', function(event) {
119
+ if(document.getElementById("longval"))
120
+ {
121
+ document.getElementById("longval").value = event.latLng.lng().toFixed(6);
122
+ document.getElementById("latval").value = event.latLng.lat().toFixed(6);
123
+ gmapmarker.setPosition(event.latLng);
124
+ if_gmap_updateMap();
125
+
126
+ geocoder.geocode({'latLng': gmapmarker.getPosition()}, function(results, status)
127
+ {
128
+ if (status == google.maps.GeocoderStatus.OK)
129
+ {
130
+ if (results[0])
131
+ {
132
+
133
+ if(document.getElementById("addrval")) document.getElementById("addrval").value = results[0].formatted_address;
134
+ }
135
+ }
136
+ });
137
+ }
138
+
139
+ });*/
140
+
141
+ google.maps.event.addListener(gmapmarker[id][i], 'drag', function()
142
+ {
143
+ if(document.getElementById("longval"+i))
144
+ {
145
+ geocoder.geocode({'latLng': gmapmarker[id][i].getPosition()}, function(results, status)
146
+ {
147
+ if (status == google.maps.GeocoderStatus.OK)
148
+ {
149
+ if (results[0])
150
+ {
151
+ if(document.getElementById("addrval"+i))
152
+ document.getElementById("addrval"+i).value = results[0].formatted_address;
153
+ }
154
+ }
155
+ });
156
+
157
+ map.setAttribute("long"+i, gmapmarker[id][i].getPosition().lng().toFixed(6));
158
+ map.setAttribute("lat"+i, gmapmarker[id][i].getPosition().lat().toFixed(6));
159
+ document.getElementById("latval"+i).value = gmapmarker[id][i].getPosition().lat().toFixed(6);
160
+ document.getElementById("longval"+i).value = gmapmarker[id][i].getPosition().lng().toFixed(6);
161
+ }
162
+ });
163
+
164
+ google.maps.event.addListener(gmapmarker[id][i], 'click', function()
165
+ {
166
+ infoW.setContent('<div style="overflow: hidden;">'+document.getElementById(id+"_elementform_id_temp").getAttribute('info'+i)+"</div>");
167
+ var infoWOpt = {
168
+ maxWidth: "300"
169
+ };
170
+ infoW.setOptions(infoWOpt);
171
+ infoW.open(this.getMap(), this);
172
+ });
173
+
174
+ if(document.getElementById("longval"+i))
175
+ {
176
+ document.getElementById("longval"+i).value = w_long;
177
+ document.getElementById("latval"+i).value = w_lat;
178
+
179
+ geocoder.geocode({'latLng': gmapmarker[id][i].getPosition()}, function(results, status)
180
+ {
181
+ if (status == google.maps.GeocoderStatus.OK)
182
+ {
183
+ if (results[0])
184
+ {
185
+ if(document.getElementById("addrval"+i)) document.getElementById("addrval"+i).value = results[0].formatted_address;
186
+ }
187
+ }
188
+ });
189
+ map.setAttribute("long"+i, w_long);
190
+ map.setAttribute("lat"+i, w_lat);
191
+ }
192
+ return false;
193
+
194
+
195
+ } // end of if_gmap_init
196
+
197
+
198
+ function changeAddress(id, i) {
199
+ var addrval = document.getElementById("addrval"+i).value;
200
+ geocoder.geocode( { 'address': addrval}, function(results, status) {
201
+ if (status == google.maps.GeocoderStatus.OK) {
202
+ gmapdata[id].setCenter(results[0].geometry.location);
203
+ gmapmarker[id][i].setPosition(results[0].geometry.location);
204
+ document.getElementById("latval"+i).value = gmapmarker[id][i].getPosition().lat().toFixed(6);
205
+ document.getElementById("longval"+i).value = gmapmarker[id][i].getPosition().lng().toFixed(6);
206
+ map.setAttribute("long"+i, gmapmarker[id][i].getPosition().lng().toFixed(6));
207
+ map.setAttribute("lat"+i, gmapmarker[id][i].getPosition().lat().toFixed(6));
208
+ }
209
+ });
210
+ }
211
+
212
+ function change_info(value,id,i)
213
+ {
214
+ map=document.getElementById(id+"_elementform_id_temp");
215
+ map.setAttribute("info"+i, value);
216
+ }
217
+
218
+ function if_gmap_updateMap(id)
219
+ {
220
+ map=document.getElementById(id+"_elementform_id_temp");
221
+ w_long=gmapdata[id].getCenter().lng();;
222
+ w_lat=gmapdata[id].getCenter().lat();;
223
+ map.setAttribute("center_x", w_long);
224
+ map.setAttribute("center_y", w_lat);
225
+ }
226
+
js/if_gmap_front_end.js CHANGED
@@ -1,177 +1,177 @@
1
- /* Code based on Google Map APIv3 Tutorials */
2
-
3
-
4
- var gmapdata= new Array();
5
- var gmapmarker = new Array();
6
-
7
- function if_gmap_init(id, form_id)
8
- {
9
- if(document.getElementById(id+"_element"+form_id)){
10
- map=document.getElementById(id+"_element"+form_id);
11
- var def_zoomval = parseInt(map.getAttribute("zoom"));
12
- var def_longval = map.getAttribute("center_x");
13
- var def_latval = map.getAttribute("center_y");
14
-
15
- var curpoint = new google.maps.LatLng(def_latval,def_longval);
16
-
17
- gmapdata[id] = new google.maps.Map(document.getElementById(id+"_element"+form_id), {
18
- center: curpoint,
19
- zoom: def_zoomval,
20
- mapTypeId: 'roadmap'
21
- });
22
-
23
- gmapmarker[id] = new Array();
24
-
25
- return false;
26
- }
27
- else
28
- {
29
- draggab=false;
30
- map=document.getElementById(id);
31
- var def_zoomval = parseInt(map.getAttribute("zoom"));
32
- var def_longval = map.getAttribute("long");
33
- var def_latval = map.getAttribute("lat");
34
-
35
- var curpoint = new google.maps.LatLng(def_latval,def_longval);
36
-
37
- gmapdata = new google.maps.Map(document.getElementById(id), {
38
- center: curpoint,
39
- zoom: def_zoomval,
40
- mapTypeId: 'roadmap'
41
- });
42
-
43
- geocoder = new google.maps.Geocoder();
44
-
45
-
46
- gmapmarker = new google.maps.Marker({
47
- map: gmapdata,
48
- position: curpoint,
49
- draggable: draggab
50
- });
51
- gmapmarker.setDraggable(draggab);
52
- infoW = new google.maps.InfoWindow;
53
-
54
- google.maps.event.addListener(gmapdata, 'mouseover', function(event)
55
- {
56
- if(!document.getElementById("longval"))
57
- gmapmarker.draggable=false;
58
- });
59
-
60
- google.maps.event.addListener(gmapdata, 'click', function(event) {
61
- if(document.getElementById("longval"))
62
- {
63
- document.getElementById("longval").value = event.latLng.lng().toFixed(6);
64
- document.getElementById("latval").value = event.latLng.lat().toFixed(6);
65
- gmapmarker.setPosition(event.latLng);
66
- if_gmap_updateMap();
67
-
68
- geocoder.geocode({'latLng': gmapmarker.getPosition()}, function(results, status)
69
- {
70
- if (status == google.maps.GeocoderStatus.OK)
71
- {
72
- if (results[0])
73
- {
74
-
75
- if(document.getElementById("addrval")) document.getElementById("addrval").value = results[0].formatted_address;
76
- }
77
- }
78
- });
79
- }
80
-
81
- });
82
-
83
- google.maps.event.addListener(gmapmarker, 'drag', function() {
84
- if(document.getElementById("longval"))
85
- {
86
- geocoder.geocode({'latLng': gmapmarker.getPosition()}, function(results, status)
87
- {
88
- if (status == google.maps.GeocoderStatus.OK)
89
- {
90
- if (results[0])
91
- {
92
-
93
- if(document.getElementById("addrval")) document.getElementById("addrval").value = results[0].formatted_address;
94
- }
95
- }
96
-
97
- });
98
-
99
- if_gmap_updateMap();
100
- document.getElementById("latval").value = gmapmarker.getPosition().lat().toFixed(6);
101
- document.getElementById("longval").value = gmapmarker.getPosition().lng().toFixed(6);
102
- }
103
- });
104
- google.maps.event.addListener(gmapmarker, 'click', function() {
105
- infoW.setContent('<div style="overflow: hidden;">'+document.getElementById(id).getAttribute('info')+"</div>");
106
- var infoWOpt = {
107
- maxWidth: "300"
108
- };
109
- infoW.setOptions(infoWOpt);
110
- infoW.open(this.getMap(), this);
111
- });
112
-
113
- if(document.getElementById("longval"))
114
- {
115
- document.getElementById("longval").value = def_longval;
116
- document.getElementById("latval").value = def_latval;
117
-
118
- geocoder.geocode({'latLng': gmapmarker.getPosition()}, function(results, status) {
119
- if (status == google.maps.GeocoderStatus.OK) {
120
- if (results[0]) {
121
-
122
- if(document.getElementById("addrval")) document.getElementById("addrval").value = results[0].formatted_address;
123
- }
124
- }
125
- });
126
-
127
- }
128
-
129
-
130
-
131
-
132
- return false;
133
-
134
- }
135
- } // end of if_gmap_init
136
-
137
-
138
- function add_marker_on_map(id, i, w_long, w_lat, w_info, form_id, dragb)
139
- {
140
- var marker_point = new google.maps.LatLng(w_lat, w_long);
141
-
142
-
143
-
144
- gmapmarker[id][i] = new google.maps.Marker({
145
- map: gmapdata[id],
146
- position: marker_point,
147
- draggable: dragb
148
- });
149
-
150
- gmapmarker[id][i].setDraggable(dragb);
151
-
152
- if(dragb)
153
- {
154
- google.maps.event.addListener(gmapmarker[id][i], 'drag', function()
155
- {
156
- document.getElementById(id+"_lat"+form_id).value = gmapmarker[id][i].getPosition().lat().toFixed(6);
157
- document.getElementById(id+"_long"+form_id).value = gmapmarker[id][i].getPosition().lng().toFixed(6);
158
- });
159
- }
160
-
161
- infoW = new google.maps.InfoWindow;
162
-
163
- google.maps.event.addListener(gmapmarker[id][i], 'click', function()
164
- {
165
- infoW.setContent('<div style="overflow: hidden;">'+document.getElementById(id+"_element"+form_id).getAttribute('info'+i)+"</div>");
166
- var infoWOpt = {
167
- maxWidth: "300"
168
- };
169
- infoW.setOptions(infoWOpt);
170
- infoW.open(this.getMap(), this);
171
- });
172
-
173
- return false;
174
-
175
-
176
- } // end of if_gmap_init
177
-
1
+ /* Code based on Google Map APIv3 Tutorials */
2
+
3
+
4
+ var gmapdata= new Array();
5
+ var gmapmarker = new Array();
6
+
7
+ function if_gmap_init(id, form_id)
8
+ {
9
+ if(document.getElementById(id+"_element"+form_id)){
10
+ map=document.getElementById(id+"_element"+form_id);
11
+ var def_zoomval = parseInt(map.getAttribute("zoom"));
12
+ var def_longval = map.getAttribute("center_x");
13
+ var def_latval = map.getAttribute("center_y");
14
+
15
+ var curpoint = new google.maps.LatLng(def_latval,def_longval);
16
+
17
+ gmapdata[id] = new google.maps.Map(document.getElementById(id+"_element"+form_id), {
18
+ center: curpoint,
19
+ zoom: def_zoomval,
20
+ mapTypeId: 'roadmap'
21
+ });
22
+
23
+ gmapmarker[id] = new Array();
24
+
25
+ return false;
26
+ }
27
+ else
28
+ {
29
+ draggab=false;
30
+ map=document.getElementById(id);
31
+ var def_zoomval = parseInt(map.getAttribute("zoom"));
32
+ var def_longval = map.getAttribute("long");
33
+ var def_latval = map.getAttribute("lat");
34
+
35
+ var curpoint = new google.maps.LatLng(def_latval,def_longval);
36
+
37
+ gmapdata = new google.maps.Map(document.getElementById(id), {
38
+ center: curpoint,
39
+ zoom: def_zoomval,
40
+ mapTypeId: 'roadmap'
41
+ });
42
+
43
+ geocoder = new google.maps.Geocoder();
44
+
45
+
46
+ gmapmarker = new google.maps.Marker({
47
+ map: gmapdata,
48
+ position: curpoint,
49
+ draggable: draggab
50
+ });
51
+ gmapmarker.setDraggable(draggab);
52
+ infoW = new google.maps.InfoWindow;
53
+
54
+ google.maps.event.addListener(gmapdata, 'mouseover', function(event)
55
+ {
56
+ if(!document.getElementById("longval"))
57
+ gmapmarker.draggable=false;
58
+ });
59
+
60
+ google.maps.event.addListener(gmapdata, 'click', function(event) {
61
+ if(document.getElementById("longval"))
62
+ {
63
+ document.getElementById("longval").value = event.latLng.lng().toFixed(6);
64
+ document.getElementById("latval").value = event.latLng.lat().toFixed(6);
65
+ gmapmarker.setPosition(event.latLng);
66
+ if_gmap_updateMap();
67
+
68
+ geocoder.geocode({'latLng': gmapmarker.getPosition()}, function(results, status)
69
+ {
70
+ if (status == google.maps.GeocoderStatus.OK)
71
+ {
72
+ if (results[0])
73
+ {
74
+
75
+ if(document.getElementById("addrval")) document.getElementById("addrval").value = results[0].formatted_address;
76
+ }
77
+ }
78
+ });
79
+ }
80
+
81
+ });
82
+
83
+ google.maps.event.addListener(gmapmarker, 'drag', function() {
84
+ if(document.getElementById("longval"))
85
+ {
86
+ geocoder.geocode({'latLng': gmapmarker.getPosition()}, function(results, status)
87
+ {
88
+ if (status == google.maps.GeocoderStatus.OK)
89
+ {
90
+ if (results[0])
91
+ {
92
+
93
+ if(document.getElementById("addrval")) document.getElementById("addrval").value = results[0].formatted_address;
94
+ }
95
+ }
96
+
97
+ });
98
+
99
+ if_gmap_updateMap();
100
+ document.getElementById("latval").value = gmapmarker.getPosition().lat().toFixed(6);
101
+ document.getElementById("longval").value = gmapmarker.getPosition().lng().toFixed(6);
102
+ }
103
+ });
104
+ google.maps.event.addListener(gmapmarker, 'click', function() {
105
+ infoW.setContent('<div style="overflow: hidden;">'+document.getElementById(id).getAttribute('info')+"</div>");
106
+ var infoWOpt = {
107
+ maxWidth: "300"
108
+ };
109
+ infoW.setOptions(infoWOpt);
110
+ infoW.open(this.getMap(), this);
111
+ });
112
+
113
+ if(document.getElementById("longval"))
114
+ {
115
+ document.getElementById("longval").value = def_longval;
116
+ document.getElementById("latval").value = def_latval;
117
+
118
+ geocoder.geocode({'latLng': gmapmarker.getPosition()}, function(results, status) {
119
+ if (status == google.maps.GeocoderStatus.OK) {
120
+ if (results[0]) {
121
+
122
+ if(document.getElementById("addrval")) document.getElementById("addrval").value = results[0].formatted_address;
123
+ }
124
+ }
125
+ });
126
+
127
+ }
128
+
129
+
130
+
131
+
132
+ return false;
133
+
134
+ }
135
+ } // end of if_gmap_init
136
+
137
+
138
+ function add_marker_on_map(id, i, w_long, w_lat, w_info, form_id, dragb)
139
+ {
140
+ var marker_point = new google.maps.LatLng(w_lat, w_long);
141
+
142
+
143
+
144
+ gmapmarker[id][i] = new google.maps.Marker({
145
+ map: gmapdata[id],
146
+ position: marker_point,
147
+ draggable: dragb
148
+ });
149
+
150
+ gmapmarker[id][i].setDraggable(dragb);
151
+
152
+ if(dragb)
153
+ {
154
+ google.maps.event.addListener(gmapmarker[id][i], 'drag', function()
155
+ {
156
+ document.getElementById(id+"_lat"+form_id).value = gmapmarker[id][i].getPosition().lat().toFixed(6);
157
+ document.getElementById(id+"_long"+form_id).value = gmapmarker[id][i].getPosition().lng().toFixed(6);
158
+ });
159
+ }
160
+
161
+ infoW = new google.maps.InfoWindow;
162
+
163
+ google.maps.event.addListener(gmapmarker[id][i], 'click', function()
164
+ {
165
+ infoW.setContent('<div style="overflow: hidden;">'+document.getElementById(id+"_element"+form_id).getAttribute('info'+i)+"</div>");
166
+ var infoWOpt = {
167
+ maxWidth: "300"
168
+ };
169
+ infoW.setOptions(infoWOpt);
170
+ infoW.open(this.getMap(), this);
171
+ });
172
+
173
+ return false;
174
+
175
+
176
+ } // end of if_gmap_init
177
+
js/layout/clike.js CHANGED
@@ -1,271 +1,271 @@
1
- CodeMirror.defineMode("clike", function(config, parserConfig) {
2
- var indentUnit = config.indentUnit,
3
- keywords = parserConfig.keywords || {},
4
- blockKeywords = parserConfig.blockKeywords || {},
5
- atoms = parserConfig.atoms || {},
6
- hooks = parserConfig.hooks || {},
7
- multiLineStrings = parserConfig.multiLineStrings;
8
- var isOperatorChar = /[+\-*&%=<>!?|\/]/;
9
-
10
- var curPunc;
11
-
12
- function tokenBase(stream, state) {
13
- var ch = stream.next();
14
- if (hooks[ch]) {
15
- var result = hooks[ch](stream, state);
16
- if (result !== false) return result;
17
- }
18
- if (ch == '"' || ch == "'") {
19
- state.tokenize = tokenString(ch);
20
- return state.tokenize(stream, state);
21
- }
22
- if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
23
- curPunc = ch;
24
- return null;
25
- }
26
- if (/\d/.test(ch)) {
27
- stream.eatWhile(/[\w\.]/);
28
- return "number";
29
- }
30
- if (ch == "/") {
31
- if (stream.eat("*")) {
32
- state.tokenize = tokenComment;
33
- return tokenComment(stream, state);
34
- }
35
- if (stream.eat("/")) {
36
- stream.skipToEnd();
37
- return "comment";
38
- }
39
- }
40
- if (isOperatorChar.test(ch)) {
41
- stream.eatWhile(isOperatorChar);
42
- return "operator";
43
- }
44
- stream.eatWhile(/[\w\$_]/);
45
- var cur = stream.current();
46
- if (keywords.propertyIsEnumerable(cur)) {
47
- if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
48
- return "keyword";
49
- }
50
- if (atoms.propertyIsEnumerable(cur)) return "atom";
51
- return "word";
52
- }
53
-
54
- function tokenString(quote) {
55
- return function(stream, state) {
56
- var escaped = false, next, end = false;
57
- while ((next = stream.next()) != null) {
58
- if (next == quote && !escaped) {end = true; break;}
59
- escaped = !escaped && next == "\\";
60
- }
61
- if (end || !(escaped || multiLineStrings))
62
- state.tokenize = null;
63
- return "string";
64
- };
65
- }
66
-
67
- function tokenComment(stream, state) {
68
- var maybeEnd = false, ch;
69
- while (ch = stream.next()) {
70
- if (ch == "/" && maybeEnd) {
71
- state.tokenize = null;
72
- break;
73
- }
74
- maybeEnd = (ch == "*");
75
- }
76
- return "comment";
77
- }
78
-
79
- function Context(indented, column, type, align, prev) {
80
- this.indented = indented;
81
- this.column = column;
82
- this.type = type;
83
- this.align = align;
84
- this.prev = prev;
85
- }
86
- function pushContext(state, col, type) {
87
- return state.context = new Context(state.indented, col, type, null, state.context);
88
- }
89
- function popContext(state) {
90
- var t = state.context.type;
91
- if (t == ")" || t == "]" || t == "}")
92
- state.indented = state.context.indented;
93
- return state.context = state.context.prev;
94
- }
95
-
96
- // Interface
97
-
98
- return {
99
- startState: function(basecolumn) {
100
- return {
101
- tokenize: null,
102
- context: new Context((basecolumn || 0) - indentUnit, 0, "top", false),
103
- indented: 0,
104
- startOfLine: true
105
- };
106
- },
107
-
108
- token: function(stream, state) {
109
- var ctx = state.context;
110
- if (stream.sol()) {
111
- if (ctx.align == null) ctx.align = false;
112
- state.indented = stream.indentation();
113
- state.startOfLine = true;
114
- }
115
- if (stream.eatSpace()) return null;
116
- curPunc = null;
117
- var style = (state.tokenize || tokenBase)(stream, state);
118
- if (style == "comment" || style == "meta") return style;
119
- if (ctx.align == null) ctx.align = true;
120
-
121
- if ((curPunc == ";" || curPunc == ":") && ctx.type == "statement") popContext(state);
122
- else if (curPunc == "{") pushContext(state, stream.column(), "}");
123
- else if (curPunc == "[") pushContext(state, stream.column(), "]");
124
- else if (curPunc == "(") pushContext(state, stream.column(), ")");
125
- else if (curPunc == "}") {
126
- while (ctx.type == "statement") ctx = popContext(state);
127
- if (ctx.type == "}") ctx = popContext(state);
128
- while (ctx.type == "statement") ctx = popContext(state);
129
- }
130
- else if (curPunc == ctx.type) popContext(state);
131
- else if (ctx.type == "}" || ctx.type == "top" || (ctx.type == "statement" && curPunc == "newstatement"))
132
- pushContext(state, stream.column(), "statement");
133
- state.startOfLine = false;
134
- return style;
135
- },
136
-
137
- indent: function(state, textAfter) {
138
- if (state.tokenize != tokenBase && state.tokenize != null) return 0;
139
- var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
140
- if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev;
141
- var closing = firstChar == ctx.type;
142
- if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : indentUnit);
143
- else if (ctx.align) return ctx.column + (closing ? 0 : 1);
144
- else return ctx.indented + (closing ? 0 : indentUnit);
145
- },
146
-
147
- electricChars: "{}"
148
- };
149
- });
150
-
151
- (function() {
152
- function words(str) {
153
- var obj = {}, words = str.split(" ");
154
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
155
- return obj;
156
- }
157
- var cKeywords = "auto if break int case long char register continue return default short do sizeof " +
158
- "double static else struct entry switch extern typedef float union for unsigned " +
159
- "goto while enum void const signed volatile";
160
-
161
- function cppHook(stream, state) {
162
- if (!state.startOfLine) return false;
163
- stream.skipToEnd();
164
- return "meta";
165
- }
166
-
167
- // C#-style strings where "" escapes a quote.
168
- function tokenAtString(stream, state) {
169
- var next;
170
- while ((next = stream.next()) != null) {
171
- if (next == '"' && !stream.eat('"')) {
172
- state.tokenize = null;
173
- break;
174
- }
175
- }
176
- return "string";
177
- }
178
-
179
- CodeMirror.defineMIME("text/x-csrc", {
180
- name: "clike",
181
- keywords: words(cKeywords),
182
- blockKeywords: words("case do else for if switch while struct"),
183
- atoms: words("null"),
184
- hooks: {"#": cppHook}
185
- });
186
- CodeMirror.defineMIME("text/x-c++src", {
187
- name: "clike",
188
- keywords: words(cKeywords + " asm dynamic_cast namespace reinterpret_cast try bool explicit new " +
189
- "static_cast typeid catch operator template typename class friend private " +
190
- "this using const_cast inline public throw virtual delete mutable protected " +
191
- "wchar_t"),
192
- blockKeywords: words("catch class do else finally for if struct switch try while"),
193
- atoms: words("true false null"),
194
- hooks: {"#": cppHook}
195
- });
196
- CodeMirror.defineMIME("text/x-java", {
197
- name: "clike",
198
- keywords: words("abstract assert boolean break byte case catch char class const continue default " +
199
- "do double else enum extends final finally float for goto if implements import " +
200
- "instanceof int interface long native new package private protected public " +
201
- "return short static strictfp super switch synchronized this throw throws transient " +
202
- "try void volatile while"),
203
- blockKeywords: words("catch class do else finally for if switch try while"),
204
- atoms: words("true false null"),
205
- hooks: {
206
- "@": function(stream, state) {
207
- stream.eatWhile(/[\w\$_]/);
208
- return "meta";
209
- }
210
- }
211
- });
212
- CodeMirror.defineMIME("text/x-csharp", {
213
- name: "clike",
214
- keywords: words("abstract as base bool break byte case catch char checked class const continue decimal" +
215
- " default delegate do double else enum event explicit extern finally fixed float for" +
216
- " foreach goto if implicit in int interface internal is lock long namespace new object" +
217
- " operator out override params private protected public readonly ref return sbyte sealed short" +
218
- " sizeof stackalloc static string struct switch this throw try typeof uint ulong unchecked" +
219
- " unsafe ushort using virtual void volatile while add alias ascending descending dynamic from get" +
220
- " global group into join let orderby partial remove select set value var yield"),
221
- blockKeywords: words("catch class do else finally for foreach if struct switch try while"),
222
- atoms: words("true false null"),
223
- hooks: {
224
- "@": function(stream, state) {
225
- if (stream.eat('"')) {
226
- state.tokenize = tokenAtString;
227
- return tokenAtString(stream, state);
228
- }
229
- stream.eatWhile(/[\w\$_]/);
230
- return "meta";
231
- }
232
- }
233
- });
234
- CodeMirror.defineMIME("text/x-scala", {
235
- name: "clike",
236
- keywords: words(
237
-
238
- /* scala */
239
- "abstract case catch class def do else extends false final finally for forSome if " +
240
- "implicit import lazy match new null object override package private protected return " +
241
- "sealed super this throw trait try trye type val var while with yield _ : = => <- <: " +
242
- "<% >: # @ " +
243
-
244
- /* package scala */
245
- "assert assume require print println printf readLine readBoolean readByte readShort " +
246
- "readChar readInt readLong readFloat readDouble " +
247
-
248
- "AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either " +
249
- "Enumeration Equiv Error Exception Fractional Function IndexedSeq Integral Iterable " +
250
- "Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering " +
251
- "Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder " +
252
- "StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector :: #:: " +
253
-
254
- /* package java.lang */
255
- "Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable " +
256
- "Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " +
257
- "Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " +
258
- "StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"
259
-
260
-
261
- ),
262
- blockKeywords: words("catch class do else finally for forSome if match switch try while"),
263
- atoms: words("true false null"),
264
- hooks: {
265
- "@": function(stream, state) {
266
- stream.eatWhile(/[\w\$_]/);
267
- return "meta";
268
- }
269
- }
270
- });
271
- }());
1
+ CodeMirror.defineMode("clike", function(config, parserConfig) {
2
+ var indentUnit = config.indentUnit,
3
+ keywords = parserConfig.keywords || {},
4
+ blockKeywords = parserConfig.blockKeywords || {},
5
+ atoms = parserConfig.atoms || {},
6
+ hooks = parserConfig.hooks || {},
7
+ multiLineStrings = parserConfig.multiLineStrings;
8
+ var isOperatorChar = /[+\-*&%=<>!?|\/]/;
9
+
10
+ var curPunc;
11
+
12
+ function tokenBase(stream, state) {
13
+ var ch = stream.next();
14
+ if (hooks[ch]) {
15
+ var result = hooks[ch](stream, state);
16
+ if (result !== false) return result;
17
+ }
18
+ if (ch == '"' || ch == "'") {
19
+ state.tokenize = tokenString(ch);
20
+ return state.tokenize(stream, state);
21
+ }
22
+ if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
23
+ curPunc = ch;
24
+ return null;
25
+ }
26
+ if (/\d/.test(ch)) {
27
+ stream.eatWhile(/[\w\.]/);
28
+ return "number";
29
+ }
30
+ if (ch == "/") {
31
+ if (stream.eat("*")) {
32
+ state.tokenize = tokenComment;
33
+ return tokenComment(stream, state);
34
+ }
35
+ if (stream.eat("/")) {
36
+ stream.skipToEnd();
37
+ return "comment";
38
+ }
39
+ }
40
+ if (isOperatorChar.test(ch)) {
41
+ stream.eatWhile(isOperatorChar);
42
+ return "operator";
43
+ }
44
+ stream.eatWhile(/[\w\$_]/);
45
+ var cur = stream.current();
46
+ if (keywords.propertyIsEnumerable(cur)) {
47
+ if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
48
+ return "keyword";
49
+ }
50
+ if (atoms.propertyIsEnumerable(cur)) return "atom";
51
+ return "word";
52
+ }
53
+
54
+ function tokenString(quote) {
55
+ return function(stream, state) {
56
+ var escaped = false, next, end = false;
57
+ while ((next = stream.next()) != null) {
58
+ if (next == quote && !escaped) {end = true; break;}
59
+ escaped = !escaped && next == "\\";
60
+ }
61
+ if (end || !(escaped || multiLineStrings))
62
+ state.tokenize = null;
63
+ return "string";
64
+ };
65
+ }
66
+
67
+ function tokenComment(stream, state) {
68
+ var maybeEnd = false, ch;
69
+ while (ch = stream.next()) {
70
+ if (ch == "/" && maybeEnd) {
71
+ state.tokenize = null;
72
+ break;
73
+ }
74
+ maybeEnd = (ch == "*");
75
+ }
76
+ return "comment";
77
+ }
78
+
79
+ function Context(indented, column, type, align, prev) {
80
+ this.indented = indented;
81
+ this.column = column;
82
+ this.type = type;
83
+ this.align = align;
84
+ this.prev = prev;
85
+ }
86
+ function pushContext(state, col, type) {
87
+ return state.context = new Context(state.indented, col, type, null, state.context);
88
+ }
89
+ function popContext(state) {
90
+ var t = state.context.type;
91
+ if (t == ")" || t == "]" || t == "}")
92
+ state.indented = state.context.indented;
93
+ return state.context = state.context.prev;
94
+ }
95
+
96
+ // Interface
97
+
98
+ return {
99
+ startState: function(basecolumn) {
100
+ return {
101
+ tokenize: null,
102
+ context: new Context((basecolumn || 0) - indentUnit, 0, "top", false),
103
+ indented: 0,
104
+ startOfLine: true
105
+ };
106
+ },
107
+
108
+ token: function(stream, state) {
109
+ var ctx = state.context;
110
+ if (stream.sol()) {
111
+ if (ctx.align == null) ctx.align = false;
112
+ state.indented = stream.indentation();
113
+ state.startOfLine = true;
114
+ }
115
+ if (stream.eatSpace()) return null;
116
+ curPunc = null;
117
+ var style = (state.tokenize || tokenBase)(stream, state);
118
+ if (style == "comment" || style == "meta") return style;
119
+ if (ctx.align == null) ctx.align = true;
120
+
121
+ if ((curPunc == ";" || curPunc == ":") && ctx.type == "statement") popContext(state);
122
+ else if (curPunc == "{") pushContext(state, stream.column(), "}");
123
+ else if (curPunc == "[") pushContext(state, stream.column(), "]");
124
+ else if (curPunc == "(") pushContext(state, stream.column(), ")");
125
+ else if (curPunc == "}") {
126
+ while (ctx.type == "statement") ctx = popContext(state);
127
+ if (ctx.type == "}") ctx = popContext(state);
128
+ while (ctx.type == "statement") ctx = popContext(state);
129
+ }
130
+ else if (curPunc == ctx.type) popContext(state);
131
+ else if (ctx.type == "}" || ctx.type == "top" || (ctx.type == "statement" && curPunc == "newstatement"))
132
+ pushContext(state, stream.column(), "statement");
133
+ state.startOfLine = false;
134
+ return style;
135
+ },
136
+
137
+ indent: function(state, textAfter) {
138
+ if (state.tokenize != tokenBase && state.tokenize != null) return 0;
139
+ var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
140
+ if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev;
141
+ var closing = firstChar == ctx.type;
142
+ if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : indentUnit);
143
+ else if (ctx.align) return ctx.column + (closing ? 0 : 1);
144
+ else return ctx.indented + (closing ? 0 : indentUnit);
145
+ },
146
+
147
+ electricChars: "{}"
148
+ };
149
+ });
150
+
151
+ (function() {
152
+ function words(str) {
153
+ var obj = {}, words = str.split(" ");
154
+ for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
155
+ return obj;
156
+ }
157
+ var cKeywords = "auto if break int case long char register continue return default short do sizeof " +
158
+ "double static else struct entry switch extern typedef float union for unsigned " +
159
+ "goto while enum void const signed volatile";
160
+
161
+ function cppHook(stream, state) {
162
+ if (!state.startOfLine) return false;
163
+ stream.skipToEnd();
164
+ return "meta";
165
+ }
166
+
167
+ // C#-style strings where "" escapes a quote.
168
+ function tokenAtString(stream, state) {
169
+ var next;
170
+ while ((next = stream.next()) != null) {
171
+ if (next == '"' && !stream.eat('"')) {
172
+ state.tokenize = null;
173
+ break;
174
+ }
175
+ }
176
+ return "string";
177
+ }
178
+
179
+ CodeMirror.defineMIME("text/x-csrc", {
180
+ name: "clike",
181
+ keywords: words(cKeywords),
182
+ blockKeywords: words("case do else for if switch while struct"),
183
+ atoms: words("null"),
184
+ hooks: {"#": cppHook}
185
+ });
186
+ CodeMirror.defineMIME("text/x-c++src", {
187
+ name: "clike",
188
+ keywords: words(cKeywords + " asm dynamic_cast namespace reinterpret_cast try bool explicit new " +
189
+ "static_cast typeid catch operator template typename class friend private " +
190
+ "this using const_cast inline public throw virtual delete mutable protected " +
191
+ "wchar_t"),
192
+ blockKeywords: words("catch class do else finally for if struct switch try while"),
193
+ atoms: words("true false null"),
194
+ hooks: {"#": cppHook}
195
+ });
196
+ CodeMirror.defineMIME("text/x-java", {
197
+ name: "clike",
198
+ keywords: words("abstract assert boolean break byte case catch char class const continue default " +
199
+ "do double else enum extends final finally float for goto if implements import " +
200
+ "instanceof int interface long native new package private protected public " +
201
+ "return short static strictfp super switch synchronized this throw throws transient " +
202
+ "try void volatile while"),
203
+ blockKeywords: words("catch class do else finally for if switch try while"),
204
+ atoms: words("true false null"),
205
+ hooks: {
206
+ "@": function(stream, state) {
207
+ stream.eatWhile(/[\w\$_]/);
208
+ return "meta";
209
+ }
210
+ }
211
+ });
212
+ CodeMirror.defineMIME("text/x-csharp", {
213
+ name: "clike",
214
+ keywords: words("abstract as base bool break byte case catch char checked class const continue decimal" +
215
+ " default delegate do double else enum event explicit extern finally fixed float for" +
216
+ " foreach goto if implicit in int interface internal is lock long namespace new object" +
217
+ " operator out override params private protected public readonly ref return sbyte sealed short" +
218
+ " sizeof stackalloc static string struct switch this throw try typeof uint ulong unchecked" +
219
+ " unsafe ushort using virtual void volatile while add alias ascending descending dynamic from get" +
220
+ " global group into join let orderby partial remove select set value var yield"),
221
+ blockKeywords: words("catch class do else finally for foreach if struct switch try while"),
222
+ atoms: words("true false null"),
223
+ hooks: {
224
+ "@": function(stream, state) {
225
+ if (stream.eat('"')) {
226
+ state.tokenize = tokenAtString;
227
+ return tokenAtString(stream, state);
228
+ }
229
+ stream.eatWhile(/[\w\$_]/);
230
+ return "meta";
231
+ }
232
+ }
233
+ });
234
+ CodeMirror.defineMIME("text/x-scala", {
235
+ name: "clike",
236
+ keywords: words(
237
+
238
+ /* scala */
239
+ "abstract case catch class def do else extends false final finally for forSome if " +
240
+ "implicit import lazy match new null object override package private protected return " +
241
+ "sealed super this throw trait try trye type val var while with yield _ : = => <- <: " +
242
+ "<% >: # @ " +
243
+
244
+ /* package scala */
245
+ "assert assume require print println printf readLine readBoolean readByte readShort " +
246
+ "readChar readInt readLong readFloat readDouble " +
247
+
248
+ "AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either " +
249
+ "Enumeration Equiv Error Exception Fractional Function IndexedSeq Integral Iterable " +
250
+ "Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering " +
251
+ "Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder " +
252
+ "StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector :: #:: " +
253
+
254
+ /* package java.lang */
255
+ "Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable " +
256
+ "Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " +
257
+ "Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " +
258
+ "StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"
259
+
260
+
261
+ ),
262
+ blockKeywords: words("catch class do else finally for forSome if match switch try while"),
263
+ atoms: words("true false null"),
264
+ hooks: {
265
+ "@": function(stream, state) {
266
+ stream.eatWhile(/[\w\$_]/);
267
+ return "meta";
268
+ }
269
+ }
270
+ });
271
+ }());
js/layout/codemirror.js CHANGED
@@ -1,3181 +1,3181 @@
1
- // CodeMirror version 2.3
2
- //
3
- // All functions that need access to the editor's state live inside
4
- // the CodeMirror function. Below that, at the bottom of the file,
5
- // some utilities are defined.
6
-
7
- // CodeMirror is the only global var we claim
8
- var CodeMirror = (function() {
9
- // This is the function that produces an editor instance. Its
10
- // closure is used to store the editor state.
11
- function CodeMirror(place, givenOptions) {
12
- // Determine effective options based on given values and defaults.
13
- var options = {}, defaults = CodeMirror.defaults;
14
- for (var opt in defaults)
15
- if (defaults.hasOwnProperty(opt))
16
- options[opt] = (givenOptions && givenOptions.hasOwnProperty(opt) ? givenOptions : defaults)[opt];
17
-
18
- // The element in which the editor lives.
19
- var wrapper = document.createElement("div");
20
- wrapper.className = "CodeMirror" + (options.lineWrapping ? " CodeMirror-wrap" : "");
21
- // This mess creates the base DOM structure for the editor.
22
- wrapper.innerHTML =
23
- '<div style="overflow: hidden; position: relative; width: 3px; height: 0px;">' + // Wraps and hides input textarea
24
- '<textarea style="position: absolute; padding: 0; width: 1px; height: 1em" wrap="off" ' +
25
- 'autocorrect="off" autocapitalize="off"></textarea></div>' +
26
- '<div class="CodeMirror-scrollbar">' + // The vertical scrollbar. Horizontal scrolling is handled by the scroller itself.
27
- '<div class="CodeMirror-scrollbar-inner">' + // The empty scrollbar content, used solely for managing the scrollbar thumb.
28
- '</div></div>' + // This must be before the scroll area because it's float-right.
29
- '<div class="CodeMirror-scroll" tabindex="-1">' +
30
- '<div style="position: relative">' + // Set to the height of the text, causes scrolling
31
- '<div style="position: relative">' + // Moved around its parent to cover visible view
32
- '<div class="CodeMirror-gutter"><div class="CodeMirror-gutter-text"></div></div>' +
33
- // Provides positioning relative to (visible) text origin
34
- '<div class="CodeMirror-lines"><div style="position: relative; z-index: 0">' +
35
- // Used to measure text size
36
- '<div style="position: absolute; width: 100%; height: 0; overflow: hidden; visibility: hidden;"></div>' +
37
- '<pre class="CodeMirror-cursor">&#160;</pre>' + // Absolutely positioned blinky cursor
38
- '<pre class="CodeMirror-cursor" style="visibility: hidden">&#160;</pre>' + // Used to force a width
39
- '<div style="position: relative; z-index: -1"></div><div></div>' + // DIVs containing the selection and the actual code
40
- '</div></div></div></div></div>';
41
- if (place.appendChild) place.appendChild(wrapper); else place(wrapper);
42
- // I've never seen more elegant code in my life.
43
- var inputDiv = wrapper.firstChild, input = inputDiv.firstChild,
44
- scroller = wrapper.lastChild, code = scroller.firstChild,
45
- mover = code.firstChild, gutter = mover.firstChild, gutterText = gutter.firstChild,
46
- lineSpace = gutter.nextSibling.firstChild, measure = lineSpace.firstChild,
47
- cursor = measure.nextSibling, widthForcer = cursor.nextSibling,
48
- selectionDiv = widthForcer.nextSibling, lineDiv = selectionDiv.nextSibling,
49
- scrollbar = inputDiv.nextSibling, scrollbarInner = scrollbar.firstChild;
50
- themeChanged(); keyMapChanged();
51
- // Needed to hide big blue blinking cursor on Mobile Safari
52
- if (ios) input.style.width = "0px";
53
- if (!webkit) scroller.draggable = true;
54
- lineSpace.style.outline = "none";
55
- if (options.tabindex != null) input.tabIndex = options.tabindex;
56
- if (options.autofocus) focusInput();
57
- if (!options.gutter && !options.lineNumbers) gutter.style.display = "none";
58
- // Needed to handle Tab key in KHTML
59
- if (khtml) inputDiv.style.height = "1px", inputDiv.style.position = "absolute";
60
-
61
- // Check for OS X >= 10.7. If so, we need to force a width on the scrollbar, and
62
- // make it overlap the content. (But we only do this if the scrollbar doesn't already
63
- // have a natural width. If the mouse is plugged in or the user sets the system pref
64
- // to always show scrollbars, the scrollbar shouldn't overlap.)
65
- if (mac_geLion) {
66
- scrollbar.className += (overlapScrollbars() ? " cm-sb-overlap" : " cm-sb-nonoverlap");
67
- } else if (ie_lt8) {
68
- // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).
69
- scrollbar.className += " cm-sb-ie7";
70
- }
71
-
72
- // Check for problem with IE innerHTML not working when we have a
73
- // P (or similar) parent node.
74
- try { stringWidth("x"); }
75
- catch (e) {
76
- if (e.message.match(/runtime/i))
77
- e = new Error("A CodeMirror inside a P-style element does not work in Internet Explorer. (innerHTML bug)");
78
- throw e;
79
- }
80
-
81
- // Delayed object wrap timeouts, making sure only one is active. blinker holds an interval.
82
- var poll = new Delayed(), highlight = new Delayed(), blinker;
83
-
84
- // mode holds a mode API object. doc is the tree of Line objects,
85
- // work an array of lines that should be parsed, and history the
86
- // undo history (instance of History constructor).
87
- var mode, doc = new BranchChunk([new LeafChunk([new Line("")])]), work, focused;
88
- loadMode();
89
- // The selection. These are always maintained to point at valid
90
- // positions. Inverted is used to remember that the user is
91
- // selecting bottom-to-top.
92
- var sel = {from: {line: 0, ch: 0}, to: {line: 0, ch: 0}, inverted: false};
93
- // Selection-related flags. shiftSelecting obviously tracks
94
- // whether the user is holding shift.
95
- var shiftSelecting, lastClick, lastDoubleClick, lastScrollTop = 0, lastScrollLeft = 0, draggingText,
96
- overwrite = false, suppressEdits = false;
97
- // Variables used by startOperation/endOperation to track what
98
- // happened during the operation.
99
- var updateInput, userSelChange, changes, textChanged, selectionChanged, leaveInputAlone,
100
- gutterDirty, callbacks;
101
- // Current visible range (may be bigger than the view window).
102
- var displayOffset = 0, showingFrom = 0, showingTo = 0, lastSizeC = 0;
103
- // bracketHighlighted is used to remember that a bracket has been
104
- // marked.
105
- var bracketHighlighted;
106
- // Tracks the maximum line length so that the horizontal scrollbar
107
- // can be kept static when scrolling.
108
- var maxLine = "", updateMaxLine = false, maxLineChanged = true;
109
- var tabCache = {};
110
-
111
- // Initialize the content.
112
- operation(function(){setValue(options.value || ""); updateInput = false;})();
113
- var history = new History();
114
-
115
- // Register our event handlers.
116
- connect(scroller, "mousedown", operation(onMouseDown));
117
- connect(scroller, "dblclick", operation(onDoubleClick));
118
- connect(lineSpace, "selectstart", e_preventDefault);
119
- // Gecko browsers fire contextmenu *after* opening the menu, at
120
- // which point we can't mess with it anymore. Context menu is
121
- // handled in onMouseDown for Gecko.
122
- if (!gecko) connect(scroller, "contextmenu", onContextMenu);
123
- connect(scroller, "scroll", onScroll);
124
- connect(scrollbar, "scroll", onScroll);
125
- connect(scrollbar, "mousedown", function() {setTimeout(focusInput, 0);});
126
- connect(scroller, "mousewheel", onMouseWheel);
127
- connect(scroller, "DOMMouseScroll", onMouseWheel);
128
- connect(window, "resize", function() {updateDisplay(true);});
129
- connect(input, "keyup", operation(onKeyUp));
130
- connect(input, "input", fastPoll);
131
- connect(input, "keydown", operation(onKeyDown));
132
- connect(input, "keypress", operation(onKeyPress));
133
- connect(input, "focus", onFocus);
134
- connect(input, "blur", onBlur);
135
-
136
- if (options.dragDrop) {
137
- connect(scroller, "dragstart", onDragStart);
138
- function drag_(e) {
139
- if (options.onDragEvent && options.onDragEvent(instance, addStop(e))) return;
140
- e_stop(e);
141
- }
142
- connect(scroller, "dragenter", drag_);
143
- connect(scroller, "dragover", drag_);
144
- connect(scroller, "drop", operation(onDrop));
145
- }
146
- connect(scroller, "paste", function(){focusInput(); fastPoll();});
147
- connect(input, "paste", fastPoll);
148
- connect(input, "cut", operation(function(){
149
- if (!options.readOnly) replaceSelection("");
150
- }));
151
-
152
- // Needed to handle Tab key in KHTML
153
- if (khtml) connect(code, "mouseup", function() {
154
- if (document.activeElement == input) input.blur();
155
- focusInput();
156
- });
157
-
158
- // IE throws unspecified error in certain cases, when
159
- // trying to access activeElement before onload
160
- var hasFocus; try { hasFocus = (document.activeElement == input); } catch(e) { }
161
- if (hasFocus || options.autofocus) setTimeout(onFocus, 20);
162
- else onBlur();
163
-
164
- function isLine(l) {return l >= 0 && l < doc.size;}
165
- // The instance object that we'll return. Mostly calls out to
166
- // local functions in the CodeMirror function. Some do some extra
167
- // range checking and/or clipping. operation is used to wrap the
168
- // call so that changes it makes are tracked, and the display is
169
- // updated afterwards.
170
- var instance = wrapper.CodeMirror = {
171
- getValue: getValue,
172
- setValue: operation(setValue),
173
- getSelection: getSelection,
174
- replaceSelection: operation(replaceSelection),
175
- focus: function(){window.focus(); focusInput(); onFocus(); fastPoll();},
176
- setOption: function(option, value) {
177
- var oldVal = options[option];
178
- options[option] = value;
179
- if (option == "mode" || option == "indentUnit") loadMode();
180
- else if (option == "readOnly" && value == "nocursor") {onBlur(); input.blur();}
181
- else if (option == "readOnly" && !value) {resetInput(true);}
182
- else if (option == "theme") themeChanged();
183
- else if (option == "lineWrapping" && oldVal != value) operation(wrappingChanged)();
184
- else if (option == "tabSize") updateDisplay(true);
185
- else if (option == "keyMap") keyMapChanged();
186
- if (option == "lineNumbers" || option == "gutter" || option == "firstLineNumber" || option == "theme") {
187
- gutterChanged();
188
- updateDisplay(true);
189
- }
190
- },
191
- getOption: function(option) {return options[option];},
192
- undo: operation(undo),
193
- redo: operation(redo),
194
- indentLine: operation(function(n, dir) {
195
- if (typeof dir != "string") {
196
- if (dir == null) dir = options.smartIndent ? "smart" : "prev";
197
- else dir = dir ? "add" : "subtract";
198
- }
199
- if (isLine(n)) indentLine(n, dir);
200
- }),
201
- indentSelection: operation(indentSelected),
202
- historySize: function() {return {undo: history.done.length, redo: history.undone.length};},
203
- clearHistory: function() {history = new History();},
204
- matchBrackets: operation(function(){matchBrackets(true);}),
205
- getTokenAt: operation(function(pos) {
206
- pos = clipPos(pos);
207
- return getLine(pos.line).getTokenAt(mode, getStateBefore(pos.line), pos.ch);
208
- }),
209
- getStateAfter: function(line) {
210
- line = clipLine(line == null ? doc.size - 1: line);
211
- return getStateBefore(line + 1);
212
- },
213
- cursorCoords: function(start, mode) {
214
- if (start == null) start = sel.inverted;
215
- return this.charCoords(start ? sel.from : sel.to, mode);
216
- },
217
- charCoords: function(pos, mode) {
218
- pos = clipPos(pos);
219
- if (mode == "local") return localCoords(pos, false);
220
- if (mode == "div") return localCoords(pos, true);
221
- return pageCoords(pos);
222
- },
223
- coordsChar: function(coords) {
224
- var off = eltOffset(lineSpace);
225
- return coordsChar(coords.x - off.left, coords.y - off.top);
226
- },
227
- markText: operation(markText),
228
- setBookmark: setBookmark,
229
- findMarksAt: findMarksAt,
230
- setMarker: operation(addGutterMarker),
231
- clearMarker: operation(removeGutterMarker),
232
- setLineClass: operation(setLineClass),
233
- hideLine: operation(function(h) {return setLineHidden(h, true);}),
234
- showLine: operation(function(h) {return setLineHidden(h, false);}),
235
- onDeleteLine: function(line, f) {
236
- if (typeof line == "number") {
237
- if (!isLine(line)) return null;
238
- line = getLine(line);
239
- }
240
- (line.handlers || (line.handlers = [])).push(f);
241
- return line;
242
- },
243
- lineInfo: lineInfo,
244
- addWidget: function(pos, node, scroll, vert, horiz) {
245
- pos = localCoords(clipPos(pos));
246
- var top = pos.yBot, left = pos.x;
247
- node.style.position = "absolute";
248
- code.appendChild(node);
249
- if (vert == "over") top = pos.y;
250
- else if (vert == "near") {
251
- var vspace = Math.max(scroller.offsetHeight, doc.height * textHeight()),
252
- hspace = Math.max(code.clientWidth, lineSpace.clientWidth) - paddingLeft();
253
- if (pos.yBot + node.offsetHeight > vspace && pos.y > node.offsetHeight)
254
- top = pos.y - node.offsetHeight;
255
- if (left + node.offsetWidth > hspace)
256
- left = hspace - node.offsetWidth;
257
- }
258
- node.style.top = (top + paddingTop()) + "px";
259
- node.style.left = node.style.right = "";
260
- if (horiz == "right") {
261
- left = code.clientWidth - node.offsetWidth;
262
- node.style.right = "0px";
263
- } else {
264
- if (horiz == "left") left = 0;
265
- else if (horiz == "middle") left = (code.clientWidth - node.offsetWidth) / 2;
266
- node.style.left = (left + paddingLeft()) + "px";
267
- }
268
- if (scroll)
269
- scrollIntoView(left, top, left + node.offsetWidth, top + node.offsetHeight);
270
- },
271
-
272
- lineCount: function() {return doc.size;},
273
- clipPos: clipPos,
274
- getCursor: function(start) {
275
- if (start == null) start = sel.inverted;
276
- return copyPos(start ? sel.from : sel.to);
277
- },
278
- somethingSelected: function() {return !posEq(sel.from, sel.to);},
279
- setCursor: operation(function(line, ch, user) {
280
- if (ch == null && typeof line.line == "number") setCursor(line.line, line.ch, user);
281
- else setCursor(line, ch, user);
282
- }),
283
- setSelection: operation(function(from, to, user) {
284
- (user ? setSelectionUser : setSelection)(clipPos(from), clipPos(to || from));
285
- }),
286
- getLine: function(line) {if (isLine(line)) return getLine(line).text;},
287
- getLineHandle: function(line) {if (isLine(line)) return getLine(line);},
288
- setLine: operation(function(line, text) {
289
- if (isLine(line)) replaceRange(text, {line: line, ch: 0}, {line: line, ch: getLine(line).text.length});
290
- }),
291
- removeLine: operation(function(line) {
292
- if (isLine(line)) replaceRange("", {line: line, ch: 0}, clipPos({line: line+1, ch: 0}));
293
- }),
294
- replaceRange: operation(replaceRange),
295
- getRange: function(from, to) {return getRange(clipPos(from), clipPos(to));},
296
-
297
- triggerOnKeyDown: operation(onKeyDown),
298
- execCommand: function(cmd) {return commands[cmd](instance);},
299
- // Stuff used by commands, probably not much use to outside code.
300
- moveH: operation(moveH),
301
- deleteH: operation(deleteH),
302
- moveV: operation(moveV),
303
- toggleOverwrite: function() {
304
- if(overwrite){
305
- overwrite = false;
306
- cursor.className = cursor.className.replace(" CodeMirror-overwrite", "");
307
- } else {
308
- overwrite = true;
309
- cursor.className += " CodeMirror-overwrite";
310
- }
311
- },
312
-
313
- posFromIndex: function(off) {
314
- var lineNo = 0, ch;
315
- doc.iter(0, doc.size, function(line) {
316
- var sz = line.text.length + 1;
317
- if (sz > off) { ch = off; return true; }
318
- off -= sz;
319
- ++lineNo;
320
- });
321
- return clipPos({line: lineNo, ch: ch});
322
- },
323
- indexFromPos: function (coords) {
324
- if (coords.line < 0 || coords.ch < 0) return 0;
325
- var index = coords.ch;
326
- doc.iter(0, coords.line, function (line) {
327
- index += line.text.length + 1;
328
- });
329
- return index;
330
- },
331
- scrollTo: function(x, y) {
332
- if (x != null) scroller.scrollLeft = x;
333
- if (y != null) scrollbar.scrollTop = y;
334
- updateDisplay([]);
335
- },
336
- getScrollInfo: function() {
337
- return {x: scroller.scrollLeft, y: scrollbar.scrollTop,
338
- height: scrollbar.scrollHeight, width: scroller.scrollWidth};
339
- },
340
-
341
- operation: function(f){return operation(f)();},
342
- compoundChange: function(f){return compoundChange(f);},
343
- refresh: function(){
344
- updateDisplay(true);
345
- if (scrollbar.scrollHeight > lastScrollTop)
346
- scrollbar.scrollTop = lastScrollTop;
347
- },
348
- getInputField: function(){return input;},
349
- getWrapperElement: function(){return wrapper;},
350
- getScrollerElement: function(){return scroller;},
351
- getGutterElement: function(){return gutter;}
352
- };
353
-
354
- function getLine(n) { return getLineAt(doc, n); }
355
- function updateLineHeight(line, height) {
356
- gutterDirty = true;
357
- var diff = height - line.height;
358
- for (var n = line; n; n = n.parent) n.height += diff;
359
- }
360
-
361
- function setValue(code) {
362
- var top = {line: 0, ch: 0};
363
- updateLines(top, {line: doc.size - 1, ch: getLine(doc.size-1).text.length},
364
- splitLines(code), top, top);
365
- updateInput = true;
366
- }
367
- function getValue() {
368
- var text = [];
369
- doc.iter(0, doc.size, function(line) { text.push(line.text); });
370
- return text.join("\n");
371
- }
372
-
373
- function onScroll(e) {
374
- if (lastScrollTop != scrollbar.scrollTop || lastScrollLeft != scroller.scrollLeft) {
375
- lastScrollTop = scrollbar.scrollTop;
376
- lastScrollLeft = scroller.scrollLeft;
377
- updateDisplay([]);
378
- if (options.fixedGutter) gutter.style.left = scroller.scrollLeft + "px";
379
- if (options.onScroll) options.onScroll(instance);
380
- }
381
- }
382
-
383
- function onMouseDown(e) {
384
- setShift(e_prop(e, "shiftKey"));
385
- // Check whether this is a click in a widget
386
- for (var n = e_target(e); n != wrapper; n = n.parentNode)
387
- if (n.parentNode == code && n != mover) return;
388
-
389
- // See if this is a click in the gutter
390
- for (var n = e_target(e); n != wrapper; n = n.parentNode)
391
- if (n.parentNode == gutterText) {
392
- if (options.onGutterClick)
393
- options.onGutterClick(instance, indexOf(gutterText.childNodes, n) + showingFrom, e);
394
- return e_preventDefault(e);
395
- }
396
-
397
- var start = posFromMouse(e);
398
-
399
- switch (e_button(e)) {
400
- case 3:
401
- if (gecko && !mac) onContextMenu(e);
402
- return;
403
- case 2:
404
- if (start) setCursor(start.line, start.ch, true);
405
- setTimeout(focusInput, 20);
406
- e_preventDefault(e);
407
- return;
408
- }
409
- // For button 1, if it was clicked inside the editor
410
- // (posFromMouse returning non-null), we have to adjust the
411
- // selection.
412
- if (!start) {if (e_target(e) == scroller) e_preventDefault(e); return;}
413
-
414
- if (!focused) onFocus();
415
-
416
- var now = +new Date;
417
- if (lastDoubleClick && lastDoubleClick.time > now - 400 && posEq(lastDoubleClick.pos, start)) {
418
- e_preventDefault(e);
419
- setTimeout(focusInput, 20);
420
- return selectLine(start.line);
421
- } else if (lastClick && lastClick.time > now - 400 && posEq(lastClick.pos, start)) {
422
- lastDoubleClick = {time: now, pos: start};
423
- e_preventDefault(e);
424
- return selectWordAt(start);
425
- } else { lastClick = {time: now, pos: start}; }
426
-
427
- var last = start, going;
428
- if (options.dragDrop && dragAndDrop && !options.readOnly && !posEq(sel.from, sel.to) &&
429
- !posLess(start, sel.from) && !posLess(sel.to, start)) {
430
- // Let the drag handler handle this.
431
- if (webkit) scroller.draggable = true;
432
- function dragEnd(e2) {
433
- if (webkit) scroller.draggable = false;
434
- draggingText = false;
435
- up(); drop();
436
- if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) < 10) {
437
- e_preventDefault(e2);
438
- setCursor(start.line, start.ch, true);
439
- focusInput();
440
- }
441
- }
442
- var up = connect(document, "mouseup", operation(dragEnd), true);
443
- var drop = connect(scroller, "drop", operation(dragEnd), true);
444
- draggingText = true;
445
- // IE's approach to draggable
446
- if (scroller.dragDrop) scroller.dragDrop();
447
- return;
448
- }
449
- e_preventDefault(e);
450
- setCursor(start.line, start.ch, true);
451
-
452
- function extend(e) {
453
- var cur = posFromMouse(e, true);
454
- if (cur && !posEq(cur, last)) {
455
- if (!focused) onFocus();
456
- last = cur;
457
- setSelectionUser(start, cur);
458
- updateInput = false;
459
- var visible = visibleLines();
460
- if (cur.line >= visible.to || cur.line < visible.from)
461
- going = setTimeout(operation(function(){extend(e);}), 150);
462
- }
463
- }
464
-
465
- function done(e) {
466
- clearTimeout(going);
467
- var cur = posFromMouse(e);
468
- if (cur) setSelectionUser(start, cur);
469
- e_preventDefault(e);
470
- focusInput();
471
- updateInput = true;
472
- move(); up();
473
- }
474
- var move = connect(document, "mousemove", operation(function(e) {
475
- clearTimeout(going);
476
- e_preventDefault(e);
477
- if (!ie && !e_button(e)) done(e);
478
- else extend(e);
479
- }), true);
480
- var up = connect(document, "mouseup", operation(done), true);
481
- }
482
- function onDoubleClick(e) {
483
- for (var n = e_target(e); n != wrapper; n = n.parentNode)
484
- if (n.parentNode == gutterText) return e_preventDefault(e);
485
- var start = posFromMouse(e);
486
- if (!start) return;
487
- lastDoubleClick = {time: +new Date, pos: start};
488
- e_preventDefault(e);
489
- selectWordAt(start);
490
- }
491
- function onDrop(e) {
492
- if (options.onDragEvent && options.onDragEvent(instance, addStop(e))) return;
493
- e.preventDefault();
494
- var pos = posFromMouse(e, true), files = e.dataTransfer.files;
495
- if (!pos || options.readOnly) return;
496
- if (files && files.length && window.FileReader && window.File) {
497
- function loadFile(file, i) {
498
- var reader = new FileReader;
499
- reader.onload = function() {
500
- text[i] = reader.result;
501
- if (++read == n) {
502
- pos = clipPos(pos);
503
- operation(function() {
504
- var end = replaceRange(text.join(""), pos, pos);
505
- setSelectionUser(pos, end);
506
- })();
507
- }
508
- };
509
- reader.readAsText(file);
510
- }
511
- var n = files.length, text = Array(n), read = 0;
512
- for (var i = 0; i < n; ++i) loadFile(files[i], i);
513
- } else {
514
- // Don't do a replace if the drop happened inside of the selected text.
515
- if (draggingText && !(posLess(pos, sel.from) || posLess(sel.to, pos))) return;
516
- try {
517
- var text = e.dataTransfer.getData("Text");
518
- if (text) {
519
- compoundChange(function() {
520
- var curFrom = sel.from, curTo = sel.to;
521
- setSelectionUser(pos, pos);
522
- if (draggingText) replaceRange("", curFrom, curTo);
523
- replaceSelection(text);
524
- focusInput();
525
- });
526
- }
527
- }
528
- catch(e){}
529
- }
530
- }
531
- function onDragStart(e) {
532
- var txt = getSelection();
533
- e.dataTransfer.setData("Text", txt);
534
-
535
- // Use dummy image instead of default browsers image.
536
- if (gecko || chrome || opera) {
537
- var img = document.createElement('img');
538
- img.scr = 'data:image/gif;base64,R0lGODdhAgACAIAAAAAAAP///ywAAAAAAgACAAACAoRRADs='; //1x1 image
539
- e.dataTransfer.setDragImage(img, 0, 0);
540
- }
541
- }
542
-
543
- function doHandleBinding(bound, dropShift) {
544
- if (typeof bound == "string") {
545
- bound = commands[bound];
546
- if (!bound) return false;
547
- }
548
- var prevShift = shiftSelecting;
549
- try {
550
- if (options.readOnly) suppressEdits = true;
551
- if (dropShift) shiftSelecting = null;
552
- bound(instance);
553
- } catch(e) {
554
- if (e != Pass) throw e;
555
- return false;
556
- } finally {
557
- shiftSelecting = prevShift;
558
- suppressEdits = false;
559
- }
560
- return true;
561
- }
562
- function handleKeyBinding(e) {
563
- // Handle auto keymap transitions
564
- var startMap = getKeyMap(options.keyMap), next = startMap.auto;
565
- clearTimeout(maybeTransition);
566
- if (next && !isModifierKey(e)) maybeTransition = setTimeout(function() {
567
- if (getKeyMap(options.keyMap) == startMap) {
568
- options.keyMap = (next.call ? next.call(null, instance) : next);
569
- }
570
- }, 50);
571
-
572
- var name = keyNames[e_prop(e, "keyCode")], handled = false;
573
- if (name == null || e.altGraphKey) return false;
574
- if (e_prop(e, "altKey")) name = "Alt-" + name;
575
- if (e_prop(e, "ctrlKey")) name = "Ctrl-" + name;
576
- if (e_prop(e, "metaKey")) name = "Cmd-" + name;
577
-
578
- var stopped = false;
579
- function stop() { stopped = true; }
580
-
581
- if (e_prop(e, "shiftKey")) {
582
- handled = lookupKey("Shift-" + name, options.extraKeys, options.keyMap,
583
- function(b) {return doHandleBinding(b, true);}, stop)
584
- || lookupKey(name, options.extraKeys, options.keyMap, function(b) {
585
- if (typeof b == "string" && /^go[A-Z]/.test(b)) return doHandleBinding(b);
586
- }, stop);
587
- } else {
588
- handled = lookupKey(name, options.extraKeys, options.keyMap, doHandleBinding, stop);
589
- }
590
- if (stopped) handled = false;
591
- if (handled) {
592
- e_preventDefault(e);
593
- restartBlink();
594
- if (ie) { e.oldKeyCode = e.keyCode; e.keyCode = 0; }
595
- }
596
- return handled;
597
- }
598
- function handleCharBinding(e, ch) {
599
- var handled = lookupKey("'" + ch + "'", options.extraKeys,
600
- options.keyMap, function(b) { return doHandleBinding(b, true); });
601
- if (handled) {
602
- e_preventDefault(e);
603
- restartBlink();
604
- }
605
- return handled;
606
- }
607
-
608
- var lastStoppedKey = null, maybeTransition;
609
- function onKeyDown(e) {
610
- if (!focused) onFocus();
611
- if (ie && e.keyCode == 27) { e.returnValue = false; }
612
- if (pollingFast) { if (readInput()) pollingFast = false; }
613
- if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return;
614
- var code = e_prop(e, "keyCode");
615
- // IE does strange things with escape.
616
- setShift(code == 16 || e_prop(e, "shiftKey"));
617
- // First give onKeyEvent option a chance to handle this.
618
- var handled = handleKeyBinding(e);
619
- if (opera) {
620
- lastStoppedKey = handled ? code : null;
621
- // Opera has no cut event... we try to at least catch the key combo
622
- if (!handled && code == 88 && e_prop(e, mac ? "metaKey" : "ctrlKey"))
623
- replaceSelection("");
624
- }
625
- }
626
- function onKeyPress(e) {
627
- if (pollingFast) readInput();
628
- if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return;
629
- var keyCode = e_prop(e, "keyCode"), charCode = e_prop(e, "charCode");
630
- if (opera && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;}
631
- if (((opera && (!e.which || e.which < 10)) || khtml) && handleKeyBinding(e)) return;
632
- var ch = String.fromCharCode(charCode == null ? keyCode : charCode);
633
- if (options.electricChars && mode.electricChars && options.smartIndent && !options.readOnly) {
634
- if (mode.electricChars.indexOf(ch) > -1)
635
- setTimeout(operation(function() {indentLine(sel.to.line, "smart");}), 75);
636
- }
637
- if (handleCharBinding(e, ch)) return;
638
- fastPoll();
639
- }
640
- function onKeyUp(e) {
641
- if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return;
642
- if (e_prop(e, "keyCode") == 16) shiftSelecting = null;
643
- }
644
-
645
- function onFocus() {
646
- if (options.readOnly == "nocursor") return;
647
- if (!focused) {
648
- if (options.onFocus) options.onFocus(instance);
649
- focused = true;
650
- if (scroller.className.search(/\bCodeMirror-focused\b/) == -1)
651
- scroller.className += " CodeMirror-focused";
652
- if (!leaveInputAlone) resetInput(true);
653
- }
654
- slowPoll();
655
- restartBlink();
656
- }
657
- function onBlur() {
658
- if (focused) {
659
- if (options.onBlur) options.onBlur(instance);
660
- focused = false;
661
- if (bracketHighlighted)
662
- operation(function(){
663
- if (bracketHighlighted) { bracketHighlighted(); bracketHighlighted = null; }
664
- })();
665
- scroller.className = scroller.className.replace(" CodeMirror-focused", "");
666
- }
667
- clearInterval(blinker);
668
- setTimeout(function() {if (!focused) shiftSelecting = null;}, 150);
669
- }
670
-
671
- function chopDelta(delta) {
672
- // Make sure we always scroll a little bit for any nonzero delta.
673
- if (delta > 0.0 && delta < 1.0) return 1;
674
- else if (delta > -1.0 && delta < 0.0) return -1;
675
- else return Math.round(delta);
676
- }
677
-
678
- function onMouseWheel(e) {
679
- var deltaX = 0, deltaY = 0;
680
- if (e.type == "DOMMouseScroll") { // Firefox
681
- var delta = -e.detail * 8.0;
682
- if (e.axis == e.HORIZONTAL_AXIS) deltaX = delta;
683
- else if (e.axis == e.VERTICAL_AXIS) deltaY = delta;
684
- } else if (e.wheelDeltaX !== undefined && e.wheelDeltaY !== undefined) { // WebKit
685
- deltaX = e.wheelDeltaX / 3.0;
686
- deltaY = e.wheelDeltaY / 3.0;
687
- } else if (e.wheelDelta !== undefined) { // IE or Opera
688
- deltaY = e.wheelDelta / 3.0;
689
- }
690
-
691
- var scrolled = false;
692
- deltaX = chopDelta(deltaX);
693
- deltaY = chopDelta(deltaY);
694
- if ((deltaX > 0 && scroller.scrollLeft > 0) ||
695
- (deltaX < 0 && scroller.scrollLeft + scroller.clientWidth < scroller.scrollWidth)) {
696
- scroller.scrollLeft -= deltaX;
697
- scrolled = true;
698
- }
699
- if ((deltaY > 0 && scrollbar.scrollTop > 0) ||
700
- (deltaY < 0 && scrollbar.scrollTop + scrollbar.clientHeight < scrollbar.scrollHeight)) {
701
- scrollbar.scrollTop -= deltaY;
702
- scrolled = true;
703
- }
704
- if (scrolled) e_stop(e);
705
- }
706
-
707
- // Replace the range from from to to by the strings in newText.
708
- // Afterwards, set the selection to selFrom, selTo.
709
- function updateLines(from, to, newText, selFrom, selTo) {
710
- if (suppressEdits) return;
711
- if (history) {
712
- var old = [];
713
- doc.iter(from.line, to.line + 1, function(line) { old.push(line.text); });
714
- history.addChange(from.line, newText.length, old);
715
- while (history.done.length > options.undoDepth) history.done.shift();
716
- }
717
- updateLinesNoUndo(from, to, newText, selFrom, selTo);
718
- }
719
- function unredoHelper(from, to) {
720
- if (!from.length) return;
721
- var set = from.pop(), out = [];
722
- for (var i = set.length - 1; i >= 0; i -= 1) {
723
- var change = set[i];
724
- var replaced = [], end = change.start + change.added;
725
- doc.iter(change.start, end, function(line) { replaced.push(line.text); });
726
- out.push({start: change.start, added: change.old.length, old: replaced});
727
- var pos = {line: change.start + change.old.length - 1,
728
- ch: editEnd(replaced[replaced.length-1], change.old[change.old.length-1])};
729
- updateLinesNoUndo({line: change.start, ch: 0}, {line: end - 1, ch: getLine(end-1).text.length}, change.old, pos, pos);
730
- }
731
- updateInput = true;
732
- to.push(out);
733
- }
734
- function undo() {unredoHelper(history.done, history.undone);}
735
- function redo() {unredoHelper(history.undone, history.done);}
736
-
737
- function updateLinesNoUndo(from, to, newText, selFrom, selTo) {
738
- if (suppressEdits) return;
739
- var recomputeMaxLength = false, maxLineLength = maxLine.length;
740
- if (!options.lineWrapping)
741
- doc.iter(from.line, to.line + 1, function(line) {
742
- if (!line.hidden && line.text.length == maxLineLength) {recomputeMaxLength = true; return true;}
743
- });
744
- if (from.line != to.line || newText.length > 1) gutterDirty = true;
745
-
746
- var nlines = to.line - from.line, firstLine = getLine(from.line), lastLine = getLine(to.line);
747
- // First adjust the line structure, taking some care to leave highlighting intact.
748
- if (from.ch == 0 && to.ch == 0 && newText[newText.length - 1] == "") {
749
- // This is a whole-line replace. Treated specially to make
750
- // sure line objects move the way they are supposed to.
751
- var added = [], prevLine = null;
752
- if (from.line) {
753
- prevLine = getLine(from.line - 1);
754
- prevLine.fixMarkEnds(lastLine);
755
- } else lastLine.fixMarkStarts();
756
- for (var i = 0, e = newText.length - 1; i < e; ++i)
757
- added.push(Line.inheritMarks(newText[i], prevLine));
758
- if (nlines) doc.remove(from.line, nlines, callbacks);
759
- if (added.length) doc.insert(from.line, added);
760
- } else if (firstLine == lastLine) {
761
- if (newText.length == 1)
762
- firstLine.replace(from.ch, to.ch, newText[0]);
763
- else {
764
- lastLine = firstLine.split(to.ch, newText[newText.length-1]);
765
- firstLine.replace(from.ch, null, newText[0]);
766
- firstLine.fixMarkEnds(lastLine);
767
- var added = [];
768
- for (var i = 1, e = newText.length - 1; i < e; ++i)
769
- added.push(Line.inheritMarks(newText[i], firstLine));
770
- added.push(lastLine);
771
- doc.insert(from.line + 1, added);
772
- }
773
- } else if (newText.length == 1) {
774
- firstLine.replace(from.ch, null, newText[0]);
775
- lastLine.replace(null, to.ch, "");
776
- firstLine.append(lastLine);
777
- doc.remove(from.line + 1, nlines, callbacks);
778
- } else {
779
- var added = [];
780
- firstLine.replace(from.ch, null, newText[0]);
781
- lastLine.replace(null, to.ch, newText[newText.length-1]);
782
- firstLine.fixMarkEnds(lastLine);
783
- for (var i = 1, e = newText.length - 1; i < e; ++i)
784
- added.push(Line.inheritMarks(newText[i], firstLine));
785
- if (nlines > 1) doc.remove(from.line + 1, nlines - 1, callbacks);
786
- doc.insert(from.line + 1, added);
787
- }
788
- if (options.lineWrapping) {
789
- var perLine = Math.max(5, scroller.clientWidth / charWidth() - 3);
790
- doc.iter(from.line, from.line + newText.length, function(line) {
791
- if (line.hidden) return;
792
- var guess = Math.ceil(line.text.length / perLine) || 1;
793
- if (guess != line.height) updateLineHeight(line, guess);
794
- });
795
- } else {
796
- doc.iter(from.line, from.line + newText.length, function(line) {
797
- var l = line.text;
798
- if (!line.hidden && l.length > maxLineLength) {
799
- maxLine = l; maxLineLength = l.length; maxLineChanged = true;
800
- recomputeMaxLength = false;
801
- }
802
- });
803
- if (recomputeMaxLength) updateMaxLine = true;
804
- }
805
-
806
- // Add these lines to the work array, so that they will be
807
- // highlighted. Adjust work lines if lines were added/removed.
808
- var newWork = [], lendiff = newText.length - nlines - 1;
809
- for (var i = 0, l = work.length; i < l; ++i) {
810
- var task = work[i];
811
- if (task < from.line) newWork.push(task);
812
- else if (task > to.line) newWork.push(task + lendiff);
813
- }
814
- var hlEnd = from.line + Math.min(newText.length, 500);
815
- highlightLines(from.line, hlEnd);
816
- newWork.push(hlEnd);
817
- work = newWork;
818
- startWorker(100);
819
- // Remember that these lines changed, for updating the display
820
- changes.push({from: from.line, to: to.line + 1, diff: lendiff});
821
- var changeObj = {from: from, to: to, text: newText};
822
- if (textChanged) {
823
- for (var cur = textChanged; cur.next; cur = cur.next) {}
824
- cur.next = changeObj;
825
- } else textChanged = changeObj;
826
-
827
- // Update the selection
828
- function updateLine(n) {return n <= Math.min(to.line, to.line + lendiff) ? n : n + lendiff;}
829
- setSelection(clipPos(selFrom), clipPos(selTo),
830
- updateLine(sel.from.line), updateLine(sel.to.line));
831
- }
832
-
833
- function updateVerticalScroll(scrollTop) {
834
- var th = textHeight(), virtualHeight = Math.floor(doc.height * th + 2 * paddingTop()), scrollbarHeight = scroller.clientHeight;
835
- scrollbar.style.height = scrollbarHeight + "px";
836
- if (scroller.clientHeight)
837
- scrollbarInner.style.height = virtualHeight + "px";
838
- // Position the mover div to align with the current virtual scroll position
839
- if (scrollTop != null) scrollbar.scrollTop = scrollTop;
840
- mover.style.top = (displayOffset * th - scrollbar.scrollTop) + "px";
841
- scrollbar.style.display = (virtualHeight > scrollbarHeight) ? "block" : "none";
842
- }
843
-
844
- // On Mac OS X Lion and up, detect whether the mouse is plugged in by measuring
845
- // the width of a div with a scrollbar in it. If the width is <= 1, then
846
- // the mouse isn't plugged in and scrollbars should overlap the content.
847
- function overlapScrollbars() {
848
- var tmpSb = document.createElement('div'),
849
- tmpSbInner = document.createElement('div');
850
- tmpSb.className = "CodeMirror-scrollbar";
851
- tmpSb.style.cssText = "position: absolute; left: -9999px; height: 100px;";
852
- tmpSbInner.className = "CodeMirror-scrollbar-inner";
853
- tmpSbInner.style.height = "200px";
854
- tmpSb.appendChild(tmpSbInner);
855
-
856
- document.body.appendChild(tmpSb);
857
- var result = (tmpSb.offsetWidth <= 1);
858
- document.body.removeChild(tmpSb);
859
- return result;
860
- }
861
-
862
- function computeMaxLength() {
863
- var maxLineLength = 0;
864
- maxLine = ""; maxLineChanged = true;
865
- doc.iter(0, doc.size, function(line) {
866
- var l = line.text;
867
- if (!line.hidden && l.length > maxLineLength) {
868
- maxLineLength = l.length; maxLine = l;
869
- }
870
- });
871
- updateMaxLine = false;
872
- }
873
-
874
- function replaceRange(code, from, to) {
875
- from = clipPos(from);
876
- if (!to) to = from; else to = clipPos(to);
877
- code = splitLines(code);
878
- function adjustPos(pos) {
879
- if (posLess(pos, from)) return pos;
880
- if (!posLess(to, pos)) return end;
881
- var line = pos.line + code.length - (to.line - from.line) - 1;
882
- var ch = pos.ch;
883
- if (pos.line == to.line)
884
- ch += code[code.length-1].length - (to.ch - (to.line == from.line ? from.ch : 0));
885
- return {line: line, ch: ch};
886
- }
887
- var end;
888
- replaceRange1(code, from, to, function(end1) {
889
- end = end1;
890
- return {from: adjustPos(sel.from), to: adjustPos(sel.to)};
891
- });
892
- return end;
893
- }
894
- function replaceSelection(code, collapse) {
895
- replaceRange1(splitLines(code), sel.from, sel.to, function(end) {
896
- if (collapse == "end") return {from: end, to: end};
897
- else if (collapse == "start") return {from: sel.from, to: sel.from};
898
- else return {from: sel.from, to: end};
899
- });
900
- }
901
- function replaceRange1(code, from, to, computeSel) {
902
- var endch = code.length == 1 ? code[0].length + from.ch : code[code.length-1].length;
903
- var newSel = computeSel({line: from.line + code.length - 1, ch: endch});
904
- updateLines(from, to, code, newSel.from, newSel.to);
905
- }
906
-
907
- function getRange(from, to) {
908
- var l1 = from.line, l2 = to.line;
909
- if (l1 == l2) return getLine(l1).text.slice(from.ch, to.ch);
910
- var code = [getLine(l1).text.slice(from.ch)];
911
- doc.iter(l1 + 1, l2, function(line) { code.push(line.text); });
912
- code.push(getLine(l2).text.slice(0, to.ch));
913
- return code.join("\n");
914
- }
915
- function getSelection() {
916
- return getRange(sel.from, sel.to);
917
- }
918
-
919
- var pollingFast = false; // Ensures slowPoll doesn't cancel fastPoll
920
- function slowPoll() {
921
- if (pollingFast) return;
922
- poll.set(options.pollInterval, function() {
923
- startOperation();
924
- readInput();
925
- if (focused) slowPoll();
926
- endOperation();
927
- });
928
- }
929
- function fastPoll() {
930
- var missed = false;
931
- pollingFast = true;
932
- function p() {
933
- startOperation();
934
- var changed = readInput();
935
- if (!changed && !missed) {missed = true; poll.set(60, p);}
936
- else {pollingFast = false; slowPoll();}
937
- endOperation();
938
- }
939
- poll.set(20, p);
940
- }
941
-
942
- // Previnput is a hack to work with IME. If we reset the textarea
943
- // on every change, that breaks IME. So we look for changes
944
- // compared to the previous content instead. (Modern browsers have
945
- // events that indicate IME taking place, but these are not widely
946
- // supported or compatible enough yet to rely on.)
947
- var prevInput = "";
948
- function readInput() {
949
- if (leaveInputAlone || !focused || hasSelection(input) || options.readOnly) return false;
950
- var text = input.value;
951
- if (text == prevInput) return false;
952
- shiftSelecting = null;
953
- var same = 0, l = Math.min(prevInput.length, text.length);
954
- while (same < l && prevInput[same] == text[same]) ++same;
955
- if (same < prevInput.length)
956
- sel.from = {line: sel.from.line, ch: sel.from.ch - (prevInput.length - same)};
957
- else if (overwrite && posEq(sel.from, sel.to))
958
- sel.to = {line: sel.to.line, ch: Math.min(getLine(sel.to.line).text.length, sel.to.ch + (text.length - same))};
959
- replaceSelection(text.slice(same), "end");
960
- if (text.length > 1000) { input.value = prevInput = ""; }
961
- else prevInput = text;
962
- return true;
963
- }
964
- function resetInput(user) {
965
- if (!posEq(sel.from, sel.to)) {
966
- prevInput = "";
967
- input.value = getSelection();
968
- selectInput(input);
969
- } else if (user) prevInput = input.value = "";
970
- }
971
-
972
- function focusInput() {
973
- if (options.readOnly != "nocursor") input.focus();
974
- }
975
-
976
- function scrollEditorIntoView() {
977
- if (!cursor.getBoundingClientRect) return;
978
- var rect = cursor.getBoundingClientRect();
979
- // IE returns bogus coordinates when the instance sits inside of an iframe and the cursor is hidden
980
- if (ie && rect.top == rect.bottom) return;
981
- var winH = window.innerHeight || Math.max(document.body.offsetHeight, document.documentElement.offsetHeight);
982
- if (rect.top < 0 || rect.bottom > winH) scrollCursorIntoView();
983
- }
984
- function scrollCursorIntoView() {
985
- var coords = calculateCursorCoords();
986
- return scrollIntoView(coords.x, coords.y, coords.x, coords.yBot);
987
- }
988
- function calculateCursorCoords() {
989
- var cursor = localCoords(sel.inverted ? sel.from : sel.to);
990
- var x = options.lineWrapping ? Math.min(cursor.x, lineSpace.offsetWidth) : cursor.x;
991
- return {x: x, y: cursor.y, yBot: cursor.yBot};
992
- }
993
- function scrollIntoView(x1, y1, x2, y2) {
994
- var scrollPos = calculateScrollPos(x1, y1, x2, y2), scrolled = false;
995
- if (scrollPos.scrollLeft != null) {scroller.scrollLeft = scrollPos.scrollLeft; scrolled = true;}
996
- if (scrollPos.scrollTop != null) {scrollbar.scrollTop = scrollPos.scrollTop; scrolled = true;}
997
- if (scrolled && options.onScroll) options.onScroll(instance);
998
- }
999
- function calculateScrollPos(x1, y1, x2, y2) {
1000
- var pl = paddingLeft(), pt = paddingTop();
1001
- y1 += pt; y2 += pt; x1 += pl; x2 += pl;
1002
- var screen = scroller.clientHeight, screentop = scrollbar.scrollTop, result = {};
1003
- var atTop = y1 < paddingTop() + 10;
1004
- if (y1 < screentop) result.scrollTop = atTop ? 0 : Math.max(0, y1);
1005
- else if (y2 > screentop + screen) result.scrollTop = y2 - screen;
1006
-
1007
- var screenw = scroller.clientWidth, screenleft = scroller.scrollLeft;
1008
- var gutterw = options.fixedGutter ? gutter.clientWidth : 0;
1009
- var atLeft = x1 < gutterw + pl + 10;
1010
- if (x1 < screenleft + gutterw || atLeft) {
1011
- if (atLeft) x1 = 0;
1012
- result.scrollLeft = Math.max(0, x1 - 10 - gutterw);
1013
- } else if (x2 > screenw + screenleft - 3) {
1014
- result.scrollLeft = x2 + 10 - screenw;
1015
- }
1016
- return result;
1017
- }
1018
-
1019
- function visibleLines(scrollTop) {
1020
- var lh = textHeight(), top = (scrollTop != null ? scrollTop : scrollbar.scrollTop) - paddingTop();
1021
- var fromHeight = Math.max(0, Math.floor(top / lh));
1022
- var toHeight = Math.ceil((top + scroller.clientHeight) / lh);
1023
- return {from: lineAtHeight(doc, fromHeight),
1024
- to: lineAtHeight(doc, toHeight)};
1025
- }
1026
- // Uses a set of changes plus the current scroll position to
1027
- // determine which DOM updates have to be made, and makes the
1028
- // updates.
1029
- function updateDisplay(changes, suppressCallback, scrollTop) {
1030
- if (!scroller.clientWidth) {
1031
- showingFrom = showingTo = displayOffset = 0;
1032
- return;
1033
- }
1034
- // Compute the new visible window
1035
- // If scrollTop is specified, use that to determine which lines
1036
- // to render instead of the current scrollbar position.
1037
- var visible = visibleLines(scrollTop);
1038
- // Bail out if the visible area is already rendered and nothing changed.
1039
- if (changes !== true && changes.length == 0 && visible.from > showingFrom && visible.to < showingTo) {
1040
- updateVerticalScroll(scrollTop);
1041
- return;
1042
- }
1043
- var from = Math.max(visible.from - 100, 0), to = Math.min(doc.size, visible.to + 100);
1044
- if (showingFrom < from && from - showingFrom < 20) from = showingFrom;
1045
- if (showingTo > to && showingTo - to < 20) to = Math.min(doc.size, showingTo);
1046
-
1047
- // Create a range of theoretically intact lines, and punch holes
1048
- // in that using the change info.
1049
- var intact = changes === true ? [] :
1050
- computeIntact([{from: showingFrom, to: showingTo, domStart: 0}], changes);
1051
- // Clip off the parts that won't be visible
1052
- var intactLines = 0;
1053
- for (var i = 0; i < intact.length; ++i) {
1054
- var range = intact[i];
1055
- if (range.from < from) {range.domStart += (from - range.from); range.from = from;}
1056
- if (range.to > to) range.to = to;
1057
- if (range.from >= range.to) intact.splice(i--, 1);
1058
- else intactLines += range.to - range.from;
1059
- }
1060
- if (intactLines == to - from && from == showingFrom && to == showingTo) {
1061
- updateVerticalScroll(scrollTop);
1062
- return;
1063
- }
1064
- intact.sort(function(a, b) {return a.domStart - b.domStart;});
1065
-
1066
- var th = textHeight(), gutterDisplay = gutter.style.display;
1067
- lineDiv.style.display = "none";
1068
- patchDisplay(from, to, intact);
1069
- lineDiv.style.display = gutter.style.display = "";
1070
-
1071
- var different = from != showingFrom || to != showingTo || lastSizeC != scroller.clientHeight + th;
1072
- // This is just a bogus formula that detects when the editor is
1073
- // resized or the font size changes.
1074
- if (different) lastSizeC = scroller.clientHeight + th;
1075
- showingFrom = from; showingTo = to;
1076
- displayOffset = heightAtLine(doc, from);
1077
-
1078
- // Since this is all rather error prone, it is honoured with the
1079
- // only assertion in the whole file.
1080
- if (lineDiv.childNodes.length != showingTo - showingFrom)
1081
- throw new Error("BAD PATCH! " + JSON.stringify(intact) + " size=" + (showingTo - showingFrom) +
1082
- " nodes=" + lineDiv.childNodes.length);
1083
-
1084
- function checkHeights() {
1085
- var curNode = lineDiv.firstChild, heightChanged = false;
1086
- doc.iter(showingFrom, showingTo, function(line) {
1087
- if (!line.hidden) {
1088
- var height = Math.round(curNode.offsetHeight / th) || 1;
1089
- if (line.height != height) {
1090
- updateLineHeight(line, height);
1091
- gutterDirty = heightChanged = true;
1092
- }
1093
- }
1094
- curNode = curNode.nextSibling;
1095
- });
1096
- return heightChanged;
1097
- }
1098
-
1099
- if (options.lineWrapping) {
1100
- // Guess whether we're going to need the scrollbar, so that we don't end up changing the linewrapping
1101
- // after the scrollbar appears (during updateVerticalScroll()). Only do this if the scrollbar is
1102
- // appearing (if it's disappearing, we don't have to worry about the scroll position, and there are
1103
- // issues on IE7 if we turn it off too early).
1104
- var virtualHeight = Math.floor(doc.height * th + 2 * paddingTop()), scrollbarHeight = scroller.clientHeight;
1105
- if (virtualHeight > scrollbarHeight) scrollbar.style.display = "block";
1106
- checkHeights();
1107
- }
1108
-
1109
- gutter.style.display = gutterDisplay;
1110
- if (different || gutterDirty) {
1111
- // If the gutter grew in size, re-check heights. If those changed, re-draw gutter.
1112
- updateGutter() && options.lineWrapping && checkHeights() && updateGutter();
1113
- }
1114
- updateSelection();
1115
- updateVerticalScroll(scrollTop);
1116
- if (!suppressCallback && options.onUpdate) options.onUpdate(instance);
1117
- return true;
1118
- }
1119
-
1120
- function computeIntact(intact, changes) {
1121
- for (var i = 0, l = changes.length || 0; i < l; ++i) {
1122
- var change = changes[i], intact2 = [], diff = change.diff || 0;
1123
- for (var j = 0, l2 = intact.length; j < l2; ++j) {
1124
- var range = intact[j];
1125
- if (change.to <= range.from && change.diff)
1126
- intact2.push({from: range.from + diff, to: range.to + diff,
1127
- domStart: range.domStart});
1128
- else if (change.to <= range.from || change.from >= range.to)
1129
- intact2.push(range);
1130
- else {
1131
- if (change.from > range.from)
1132
- intact2.push({from: range.from, to: change.from, domStart: range.domStart});
1133
- if (change.to < range.to)
1134
- intact2.push({from: change.to + diff, to: range.to + diff,
1135
- domStart: range.domStart + (change.to - range.from)});
1136
- }
1137
- }
1138
- intact = intact2;
1139
- }
1140
- return intact;
1141
- }
1142
-
1143
- function patchDisplay(from, to, intact) {
1144
- // The first pass removes the DOM nodes that aren't intact.
1145
- if (!intact.length) lineDiv.innerHTML = "";
1146
- else {
1147
- function killNode(node) {
1148
- var tmp = node.nextSibling;
1149
- node.parentNode.removeChild(node);
1150
- return tmp;
1151
- }
1152
- var domPos = 0, curNode = lineDiv.firstChild, n;
1153
- for (var i = 0; i < intact.length; ++i) {
1154
- var cur = intact[i];
1155
- while (cur.domStart > domPos) {curNode = killNode(curNode); domPos++;}
1156
- for (var j = 0, e = cur.to - cur.from; j < e; ++j) {curNode = curNode.nextSibling; domPos++;}
1157
- }
1158
- while (curNode) curNode = killNode(curNode);
1159
- }
1160
- // This pass fills in the lines that actually changed.
1161
- var nextIntact = intact.shift(), curNode = lineDiv.firstChild, j = from;
1162
- var scratch = document.createElement("div");
1163
- doc.iter(from, to, function(line) {
1164
- if (nextIntact && nextIntact.to == j) nextIntact = intact.shift();
1165
- if (!nextIntact || nextIntact.from > j) {
1166
- if (line.hidden) var html = scratch.innerHTML = "<pre></pre>";
1167
- else {
1168
- var html = '<pre' + (line.className ? ' class="' + line.className + '"' : '') + '>'
1169
- + line.getHTML(makeTab) + '</pre>';
1170
- // Kludge to make sure the styled element lies behind the selection (by z-index)
1171
- if (line.bgClassName)
1172
- html = '<div style="position: relative"><pre class="' + line.bgClassName +
1173
- '" style="position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: -2">&#160;</pre>' + html + "</div>";
1174
- }
1175
- scratch.innerHTML = html;
1176
- lineDiv.insertBefore(scratch.firstChild, curNode);
1177
- } else {
1178
- curNode = curNode.nextSibling;
1179
- }
1180
- ++j;
1181
- });
1182
- }
1183
-
1184
- function updateGutter() {
1185
- if (!options.gutter && !options.lineNumbers) return;
1186
- var hText = mover.offsetHeight, hEditor = scroller.clientHeight;
1187
- gutter.style.height = (hText - hEditor < 2 ? hEditor : hText) + "px";
1188
- var html = [], i = showingFrom, normalNode;
1189
- doc.iter(showingFrom, Math.max(showingTo, showingFrom + 1), function(line) {
1190
- if (line.hidden) {
1191
- html.push("<pre></pre>");
1192
- } else {
1193
- var marker = line.gutterMarker;
1194
- var text = options.lineNumbers ? i + options.firstLineNumber : null;
1195
- if (marker && marker.text)
1196
- text = marker.text.replace("%N%", text != null ? text : "");
1197
- else if (text == null)
1198
- text = "\u00a0";
1199
- html.push((marker && marker.style ? '<pre class="' + marker.style + '">' : "<pre>"), text);
1200
- for (var j = 1; j < line.height; ++j) html.push("<br/>&#160;");
1201
- html.push("</pre>");
1202
- if (!marker) normalNode = i;
1203
- }
1204
- ++i;
1205
- });
1206
- gutter.style.display = "none";
1207
- gutterText.innerHTML = html.join("");
1208
- // Make sure scrolling doesn't cause number gutter size to pop
1209
- if (normalNode != null && options.lineNumbers) {
1210
- var node = gutterText.childNodes[normalNode - showingFrom];
1211
- var minwidth = String(doc.size).length, val = eltText(node.firstChild), pad = "";
1212
- while (val.length + pad.length < minwidth) pad += "\u00a0";
1213
- if (pad) node.insertBefore(document.createTextNode(pad), node.firstChild);
1214
- }
1215
- gutter.style.display = "";
1216
- var resized = Math.abs((parseInt(lineSpace.style.marginLeft) || 0) - gutter.offsetWidth) > 2;
1217
- lineSpace.style.marginLeft = gutter.offsetWidth + "px";
1218
- gutterDirty = false;
1219
- return resized;
1220
- }
1221
- function updateSelection() {
1222
- var collapsed = posEq(sel.from, sel.to);
1223
- var fromPos = localCoords(sel.from, true);
1224
- var toPos = collapsed ? fromPos : localCoords(sel.to, true);
1225
- var headPos = sel.inverted ? fromPos : toPos, th = textHeight();
1226
- var wrapOff = eltOffset(wrapper), lineOff = eltOffset(lineDiv);
1227
- inputDiv.style.top = Math.max(0, Math.min(scroller.offsetHeight, headPos.y + lineOff.top - wrapOff.top)) + "px";
1228
- inputDiv.style.left = Math.max(0, Math.min(scroller.offsetWidth, headPos.x + lineOff.left - wrapOff.left)) + "px";
1229
- if (collapsed) {
1230
- cursor.style.top = headPos.y + "px";
1231
- cursor.style.left = (options.lineWrapping ? Math.min(headPos.x, lineSpace.offsetWidth) : headPos.x) + "px";
1232
- cursor.style.display = "";
1233
- selectionDiv.style.display = "none";
1234
- } else {
1235
- var sameLine = fromPos.y == toPos.y, html = "";
1236
- var clientWidth = lineSpace.clientWidth || lineSpace.offsetWidth;
1237
- var clientHeight = lineSpace.clientHeight || lineSpace.offsetHeight;
1238
- function add(left, top, right, height) {
1239
- var rstyle = quirksMode ? "width: " + (!right ? clientWidth : clientWidth - right - left) + "px"
1240
- : "right: " + right + "px";
1241
- html += '<div class="CodeMirror-selected" style="position: absolute; left: ' + left +
1242
- 'px; top: ' + top + 'px; ' + rstyle + '; height: ' + height + 'px"></div>';
1243
- }
1244
- if (sel.from.ch && fromPos.y >= 0) {
1245
- var right = sameLine ? clientWidth - toPos.x : 0;
1246
- add(fromPos.x, fromPos.y, right, th);
1247
- }
1248
- var middleStart = Math.max(0, fromPos.y + (sel.from.ch ? th : 0));
1249
- var middleHeight = Math.min(toPos.y, clientHeight) - middleStart;
1250
- if (middleHeight > 0.2 * th)
1251
- add(0, middleStart, 0, middleHeight);
1252
- if ((!sameLine || !sel.from.ch) && toPos.y < clientHeight - .5 * th)
1253
- add(0, toPos.y, clientWidth - toPos.x, th);
1254
- selectionDiv.innerHTML = html;
1255
- cursor.style.display = "none";
1256
- selectionDiv.style.display = "";
1257
- }
1258
- }
1259
-
1260
- function setShift(val) {
1261
- if (val) shiftSelecting = shiftSelecting || (sel.inverted ? sel.to : sel.from);
1262
- else shiftSelecting = null;
1263
- }
1264
- function setSelectionUser(from, to) {
1265
- var sh = shiftSelecting && clipPos(shiftSelecting);
1266
- if (sh) {
1267
- if (posLess(sh, from)) from = sh;
1268
- else if (posLess(to, sh)) to = sh;
1269
- }
1270
- setSelection(from, to);
1271
- userSelChange = true;
1272
- }
1273
- // Update the selection. Last two args are only used by
1274
- // updateLines, since they have to be expressed in the line
1275
- // numbers before the update.
1276
- function setSelection(from, to, oldFrom, oldTo) {
1277
- goalColumn = null;
1278
- if (oldFrom == null) {oldFrom = sel.from.line; oldTo = sel.to.line;}
1279
- if (posEq(sel.from, from) && posEq(sel.to, to)) return;
1280
- if (posLess(to, from)) {var tmp = to; to = from; from = tmp;}
1281
-
1282
- // Skip over hidden lines.
1283
- if (from.line != oldFrom) {
1284
- var from1 = skipHidden(from, oldFrom, sel.from.ch);
1285
- // If there is no non-hidden line left, force visibility on current line
1286
- if (!from1) setLineHidden(from.line, false);
1287
- else from = from1;
1288
- }
1289
- if (to.line != oldTo) to = skipHidden(to, oldTo, sel.to.ch);
1290
-
1291
- if (posEq(from, to)) sel.inverted = false;
1292
- else if (posEq(from, sel.to)) sel.inverted = false;
1293
- else if (posEq(to, sel.from)) sel.inverted = true;
1294
-
1295
- if (options.autoClearEmptyLines && posEq(sel.from, sel.to)) {
1296
- var head = sel.inverted ? from : to;
1297
- if (head.line != sel.from.line && sel.from.line < doc.size) {
1298
- var oldLine = getLine(sel.from.line);
1299
- if (/^\s+$/.test(oldLine.text))
1300
- setTimeout(operation(function() {
1301
- if (oldLine.parent && /^\s+$/.test(oldLine.text)) {
1302
- var no = lineNo(oldLine);
1303
- replaceRange("", {line: no, ch: 0}, {line: no, ch: oldLine.text.length});
1304
- }
1305
- }, 10));
1306
- }
1307
- }
1308
-
1309
- sel.from = from; sel.to = to;
1310
- selectionChanged = true;
1311
- }
1312
- function skipHidden(pos, oldLine, oldCh) {
1313
- function getNonHidden(dir) {
1314
- var lNo = pos.line + dir, end = dir == 1 ? doc.size : -1;
1315
- while (lNo != end) {
1316
- var line = getLine(lNo);
1317
- if (!line.hidden) {
1318
- var ch = pos.ch;
1319
- if (toEnd || ch > oldCh || ch > line.text.length) ch = line.text.length;
1320
- return {line: lNo, ch: ch};
1321
- }
1322
- lNo += dir;
1323
- }
1324
- }
1325
- var line = getLine(pos.line);
1326
- var toEnd = pos.ch == line.text.length && pos.ch != oldCh;
1327
- if (!line.hidden) return pos;
1328
- if (pos.line >= oldLine) return getNonHidden(1) || getNonHidden(-1);
1329
- else return getNonHidden(-1) || getNonHidden(1);
1330
- }
1331
- function setCursor(line, ch, user) {
1332
- var pos = clipPos({line: line, ch: ch || 0});
1333
- (user ? setSelectionUser : setSelection)(pos, pos);
1334
- }
1335
-
1336
- function clipLine(n) {return Math.max(0, Math.min(n, doc.size-1));}
1337
- function clipPos(pos) {
1338
- if (pos.line < 0) return {line: 0, ch: 0};
1339
- if (pos.line >= doc.size) return {line: doc.size-1, ch: getLine(doc.size-1).text.length};
1340
- var ch = pos.ch, linelen = getLine(pos.line).text.length;
1341
- if (ch == null || ch > linelen) return {line: pos.line, ch: linelen};
1342
- else if (ch < 0) return {line: pos.line, ch: 0};
1343
- else return pos;
1344
- }
1345
-
1346
- function findPosH(dir, unit) {
1347
- var end = sel.inverted ? sel.from : sel.to, line = end.line, ch = end.ch;
1348
- var lineObj = getLine(line);
1349
- function findNextLine() {
1350
- for (var l = line + dir, e = dir < 0 ? -1 : doc.size; l != e; l += dir) {
1351
- var lo = getLine(l);
1352
- if (!lo.hidden) { line = l; lineObj = lo; return true; }
1353
- }
1354
- }
1355
- function moveOnce(boundToLine) {
1356
- if (ch == (dir < 0 ? 0 : lineObj.text.length)) {
1357
- if (!boundToLine && findNextLine()) ch = dir < 0 ? lineObj.text.length : 0;
1358
- else return false;
1359
- } else ch += dir;
1360
- return true;
1361
- }
1362
- if (unit == "char") moveOnce();
1363
- else if (unit == "column") moveOnce(true);
1364
- else if (unit == "word") {
1365
- var sawWord = false;
1366
- for (;;) {
1367
- if (dir < 0) if (!moveOnce()) break;
1368
- if (isWordChar(lineObj.text.charAt(ch))) sawWord = true;
1369
- else if (sawWord) {if (dir < 0) {dir = 1; moveOnce();} break;}
1370
- if (dir > 0) if (!moveOnce()) break;
1371
- }
1372
- }
1373
- return {line: line, ch: ch};
1374
- }
1375
- function moveH(dir, unit) {
1376
- var pos = dir < 0 ? sel.from : sel.to;
1377
- if (shiftSelecting || posEq(sel.from, sel.to)) pos = findPosH(dir, unit);
1378
- setCursor(pos.line, pos.ch, true);
1379
- }
1380
- function deleteH(dir, unit) {
1381
- if (!posEq(sel.from, sel.to)) replaceRange("", sel.from, sel.to);
1382
- else if (dir < 0) replaceRange("", findPosH(dir, unit), sel.to);
1383
- else replaceRange("", sel.from, findPosH(dir, unit));
1384
- userSelChange = true;
1385
- }
1386
- var goalColumn = null;
1387
- function moveV(dir, unit) {
1388
- var dist = 0, pos = localCoords(sel.inverted ? sel.from : sel.to, true);
1389
- if (goalColumn != null) pos.x = goalColumn;
1390
- if (unit == "page") dist = Math.min(scroller.clientHeight, window.innerHeight || document.documentElement.clientHeight);
1391
- else if (unit == "line") dist = textHeight();
1392
- var target = coordsChar(pos.x, pos.y + dist * dir + 2);
1393
- if (unit == "page") scrollbar.scrollTop += localCoords(target, true).y - pos.y;
1394
- setCursor(target.line, target.ch, true);
1395
- goalColumn = pos.x;
1396
- }
1397
-
1398
- function selectWordAt(pos) {
1399
- var line = getLine(pos.line).text;
1400
- var start = pos.ch, end = pos.ch;
1401
- while (start > 0 && isWordChar(line.charAt(start - 1))) --start;
1402
- while (end < line.length && isWordChar(line.charAt(end))) ++end;
1403
- setSelectionUser({line: pos.line, ch: start}, {line: pos.line, ch: end});
1404
- }
1405
- function selectLine(line) {
1406
- setSelectionUser({line: line, ch: 0}, clipPos({line: line + 1, ch: 0}));
1407
- }
1408
- function indentSelected(mode) {
1409
- if (posEq(sel.from, sel.to)) return indentLine(sel.from.line, mode);
1410
- var e = sel.to.line - (sel.to.ch ? 0 : 1);
1411
- for (var i = sel.from.line; i <= e; ++i) indentLine(i, mode);
1412
- }
1413
-
1414
- function indentLine(n, how) {
1415
- if (!how) how = "add";
1416
- if (how == "smart") {
1417
- if (!mode.indent) how = "prev";
1418
- else var state = getStateBefore(n);
1419
- }
1420
-
1421
- var line = getLine(n), curSpace = line.indentation(options.tabSize),
1422
- curSpaceString = line.text.match(/^\s*/)[0], indentation;
1423
- if (how == "smart") {
1424
- indentation = mode.indent(state, line.text.slice(curSpaceString.length), line.text);
1425
- if (indentation == Pass) how = "prev";
1426
- }
1427
- if (how == "prev") {
1428
- if (n) indentation = getLine(n-1).indentation(options.tabSize);
1429
- else indentation = 0;
1430
- }
1431
- else if (how == "add") indentation = curSpace + options.indentUnit;
1432
- else if (how == "subtract") indentation = curSpace - options.indentUnit;
1433
- indentation = Math.max(0, indentation);
1434
- var diff = indentation - curSpace;
1435
-
1436
- if (!diff) {
1437
- if (sel.from.line != n && sel.to.line != n) return;
1438
- var indentString = curSpaceString;
1439
- } else {
1440
- var indentString = "", pos = 0;
1441
- if (options.indentWithTabs)
1442
- for (var i = Math.floor(indentation / options.tabSize); i; --i) {pos += options.tabSize; indentString += "\t";}
1443
- while (pos < indentation) {++pos; indentString += " ";}
1444
- }
1445
-
1446
- replaceRange(indentString, {line: n, ch: 0}, {line: n, ch: curSpaceString.length});
1447
- }
1448
-
1449
- function loadMode() {
1450
- mode = CodeMirror.getMode(options, options.mode);
1451
- doc.iter(0, doc.size, function(line) { line.stateAfter = null; });
1452
- work = [0];
1453
- startWorker();
1454
- }
1455
- function gutterChanged() {
1456
- var visible = options.gutter || options.lineNumbers;
1457
- gutter.style.display = visible ? "" : "none";
1458
- if (visible) gutterDirty = true;
1459
- else lineDiv.parentNode.style.marginLeft = 0;
1460
- }
1461
- function wrappingChanged(from, to) {
1462
- if (options.lineWrapping) {
1463
- wrapper.className += " CodeMirror-wrap";
1464
- var perLine = scroller.clientWidth / charWidth() - 3;
1465
- doc.iter(0, doc.size, function(line) {
1466
- if (line.hidden) return;
1467
- var guess = Math.ceil(line.text.length / perLine) || 1;
1468
- if (guess != 1) updateLineHeight(line, guess);
1469
- });
1470
- lineSpace.style.width = code.style.width = "";
1471
- widthForcer.style.left = "";
1472
- } else {
1473
- wrapper.className = wrapper.className.replace(" CodeMirror-wrap", "");
1474
- maxLine = ""; maxLineChanged = true;
1475
- doc.iter(0, doc.size, function(line) {
1476
- if (line.height != 1 && !line.hidden) updateLineHeight(line, 1);
1477
- if (line.text.length > maxLine.length) maxLine = line.text;
1478
- });
1479
- }
1480
- changes.push({from: 0, to: doc.size});
1481
- }
1482
- function makeTab(col) {
1483
- var w = options.tabSize - col % options.tabSize, cached = tabCache[w];
1484
- if (cached) return cached;
1485
- for (var str = '<span class="cm-tab">', i = 0; i < w; ++i) str += " ";
1486
- return (tabCache[w] = {html: str + "</span>", width: w});
1487
- }
1488
- function themeChanged() {
1489
- scroller.className = scroller.className.replace(/\s*cm-s-\S+/g, "") +
1490
- options.theme.replace(/(^|\s)\s*/g, " cm-s-");
1491
- }
1492
- function keyMapChanged() {
1493
- var style = keyMap[options.keyMap].style;
1494
- wrapper.className = wrapper.className.replace(/\s*cm-keymap-\S+/g, "") +
1495
- (style ? " cm-keymap-" + style : "");
1496
- }
1497
-
1498
- function TextMarker() { this.set = []; }
1499
- TextMarker.prototype.clear = operation(function() {
1500
- var min = Infinity, max = -Infinity;
1501
- for (var i = 0, e = this.set.length; i < e; ++i) {
1502
- var line = this.set[i], mk = line.marked;
1503
- if (!mk || !line.parent) continue;
1504
- var lineN = lineNo(line);
1505
- min = Math.min(min, lineN); max = Math.max(max, lineN);
1506
- for (var j = 0; j < mk.length; ++j)
1507
- if (mk[j].marker == this) mk.splice(j--, 1);
1508
- }
1509
- if (min != Infinity)
1510
- changes.push({from: min, to: max + 1});
1511
- });
1512
- TextMarker.prototype.find = function() {
1513
- var from, to;
1514
- for (var i = 0, e = this.set.length; i < e; ++i) {
1515
- var line = this.set[i], mk = line.marked;
1516
- for (var j = 0; j < mk.length; ++j) {
1517
- var mark = mk[j];
1518
- if (mark.marker == this) {
1519
- if (mark.from != null || mark.to != null) {
1520
- var found = lineNo(line);
1521
- if (found != null) {
1522
- if (mark.from != null) from = {line: found, ch: mark.from};
1523
- if (mark.to != null) to = {line: found, ch: mark.to};
1524
- }
1525
- }
1526
- }
1527
- }
1528
- }
1529
- return {from: from, to: to};
1530
- };
1531
-
1532
- function markText(from, to, className) {
1533
- from = clipPos(from); to = clipPos(to);
1534
- var tm = new TextMarker();
1535
- if (!posLess(from, to)) return tm;
1536
- function add(line, from, to, className) {
1537
- getLine(line).addMark(new MarkedText(from, to, className, tm));
1538
- }
1539
- if (from.line == to.line) add(from.line, from.ch, to.ch, className);
1540
- else {
1541
- add(from.line, from.ch, null, className);
1542
- for (var i = from.line + 1, e = to.line; i < e; ++i)
1543
- add(i, null, null, className);
1544
- add(to.line, null, to.ch, className);
1545
- }
1546
- changes.push({from: from.line, to: to.line + 1});
1547
- return tm;
1548
- }
1549
-
1550
- function setBookmark(pos) {
1551
- pos = clipPos(pos);
1552
- var bm = new Bookmark(pos.ch);
1553
- getLine(pos.line).addMark(bm);
1554
- return bm;
1555
- }
1556
-
1557
- function findMarksAt(pos) {
1558
- pos = clipPos(pos);
1559
- var markers = [], marked = getLine(pos.line).marked;
1560
- if (!marked) return markers;
1561
- for (var i = 0, e = marked.length; i < e; ++i) {
1562
- var m = marked[i];
1563
- if ((m.from == null || m.from <= pos.ch) &&
1564
- (m.to == null || m.to >= pos.ch))
1565
- markers.push(m.marker || m);
1566
- }
1567
- return markers;
1568
- }
1569
-
1570
- function addGutterMarker(line, text, className) {
1571
- if (typeof line == "number") line = getLine(clipLine(line));
1572
- line.gutterMarker = {text: text, style: className};
1573
- gutterDirty = true;
1574
- return line;
1575
- }
1576
- function removeGutterMarker(line) {
1577
- if (typeof line == "number") line = getLine(clipLine(line));
1578
- line.gutterMarker = null;
1579
- gutterDirty = true;
1580
- }
1581
-
1582
- function changeLine(handle, op) {
1583
- var no = handle, line = handle;
1584
- if (typeof handle == "number") line = getLine(clipLine(handle));
1585
- else no = lineNo(handle);
1586
- if (no == null) return null;
1587
- if (op(line, no)) changes.push({from: no, to: no + 1});
1588
- else return null;
1589
- return line;
1590
- }
1591
- function setLineClass(handle, className, bgClassName) {
1592
- return changeLine(handle, function(line) {
1593
- if (line.className != className || line.bgClassName != bgClassName) {
1594
- line.className = className;
1595
- line.bgClassName = bgClassName;
1596
- return true;
1597
- }
1598
- });
1599
- }
1600
- function setLineHidden(handle, hidden) {
1601
- return changeLine(handle, function(line, no) {
1602
- if (line.hidden != hidden) {
1603
- line.hidden = hidden;
1604
- if (!options.lineWrapping) {
1605
- var l = line.text;
1606
- if (hidden && l.length == maxLine.length) {
1607
- updateMaxLine = true;
1608
- } else if (!hidden && l.length > maxLine.length) {
1609
- maxLine = l; maxWidth = null; updateMaxLine = false;
1610
- }
1611
- }
1612
- updateLineHeight(line, hidden ? 0 : 1);
1613
- var fline = sel.from.line, tline = sel.to.line;
1614
- if (hidden && (fline == no || tline == no)) {
1615
- var from = fline == no ? skipHidden({line: fline, ch: 0}, fline, 0) : sel.from;
1616
- var to = tline == no ? skipHidden({line: tline, ch: 0}, tline, 0) : sel.to;
1617
- // Can't hide the last visible line, we'd have no place to put the cursor
1618
- if (!to) return;
1619
- setSelection(from, to);
1620
- }
1621
- return (gutterDirty = true);
1622
- }
1623
- });
1624
- }
1625
-
1626
- function lineInfo(line) {
1627
- if (typeof line == "number") {
1628
- if (!isLine(line)) return null;
1629
- var n = line;
1630
- line = getLine(line);
1631
- if (!line) return null;
1632
- } else {
1633
- var n = lineNo(line);
1634
- if (n == null) return null;
1635
- }
1636
- var marker = line.gutterMarker;
1637
- return {line: n, handle: line, text: line.text, markerText: marker && marker.text,
1638
- markerClass: marker && marker.style, lineClass: line.className, bgClass: line.bgClassName};
1639
- }
1640
-
1641
- function stringWidth(str) {
1642
- measure.innerHTML = "<pre><span>x</span></pre>";
1643
- measure.firstChild.firstChild.firstChild.nodeValue = str;
1644
- return measure.firstChild.firstChild.offsetWidth || 10;
1645
- }
1646
- // These are used to go from pixel positions to character
1647
- // positions, taking varying character widths into account.
1648
- function charFromX(line, x) {
1649
- if (x <= 0) return 0;
1650
- var lineObj = getLine(line), text = lineObj.text;
1651
- function getX(len) {
1652
- return measureLine(lineObj, len).left;
1653
- }
1654
- var from = 0, fromX = 0, to = text.length, toX;
1655
- // Guess a suitable upper bound for our search.
1656
- var estimated = Math.min(to, Math.ceil(x / charWidth()));
1657
- for (;;) {
1658
- var estX = getX(estimated);
1659
- if (estX <= x && estimated < to) estimated = Math.min(to, Math.ceil(estimated * 1.2));
1660
- else {toX = estX; to = estimated; break;}
1661
- }
1662
- if (x > toX) return to;
1663
- // Try to guess a suitable lower bound as well.
1664
- estimated = Math.floor(to * 0.8); estX = getX(estimated);
1665
- if (estX < x) {from = estimated; fromX = estX;}
1666
- // Do a binary search between these bounds.
1667
- for (;;) {
1668
- if (to - from <= 1) return (toX - x > x - fromX) ? from : to;
1669
- var middle = Math.ceil((from + to) / 2), middleX = getX(middle);
1670
- if (middleX > x) {to = middle; toX = middleX;}
1671
- else {from = middle; fromX = middleX;}
1672
- }
1673
- }
1674
-
1675
- var tempId = "CodeMirror-temp-" + Math.floor(Math.random() * 0xffffff).toString(16);
1676
- function measureLine(line, ch) {
1677
- if (ch == 0) return {top: 0, left: 0};
1678
- var wbr = options.lineWrapping && ch < line.text.length &&
1679
- spanAffectsWrapping.test(line.text.slice(ch - 1, ch + 1));
1680
- measure.innerHTML = "<pre>" + line.getHTML(makeTab, ch, tempId, wbr) + "</pre>";
1681
- var elt = document.getElementById(tempId);
1682
- var top = elt.offsetTop, left = elt.offsetLeft;
1683
- // Older IEs report zero offsets for spans directly after a wrap
1684
- if (ie && top == 0 && left == 0) {
1685
- var backup = document.createElement("span");
1686
- backup.innerHTML = "x";
1687
- elt.parentNode.insertBefore(backup, elt.nextSibling);
1688
- top = backup.offsetTop;
1689
- }
1690
- return {top: top, left: left};
1691
- }
1692
- function localCoords(pos, inLineWrap) {
1693
- var x, lh = textHeight(), y = lh * (heightAtLine(doc, pos.line) - (inLineWrap ? displayOffset : 0));
1694
- if (pos.ch == 0) x = 0;
1695
- else {
1696
- var sp = measureLine(getLine(pos.line), pos.ch);
1697
- x = sp.left;
1698
- if (options.lineWrapping) y += Math.max(0, sp.top);
1699
- }
1700
- return {x: x, y: y, yBot: y + lh};
1701
- }
1702
- // Coords must be lineSpace-local
1703
- function coordsChar(x, y) {
1704
- if (y < 0) y = 0;
1705
- var th = textHeight(), cw = charWidth(), heightPos = displayOffset + Math.floor(y / th);
1706
- var lineNo = lineAtHeight(doc, heightPos);
1707
- if (lineNo >= doc.size) return {line: doc.size - 1, ch: getLine(doc.size - 1).text.length};
1708
- var lineObj = getLine(lineNo), text = lineObj.text;
1709
- var tw = options.lineWrapping, innerOff = tw ? heightPos - heightAtLine(doc, lineNo) : 0;
1710
- if (x <= 0 && innerOff == 0) return {line: lineNo, ch: 0};
1711
- function getX(len) {
1712
- var sp = measureLine(lineObj, len);
1713
- if (tw) {
1714
- var off = Math.round(sp.top / th);
1715
- return Math.max(0, sp.left + (off - innerOff) * scroller.clientWidth);
1716
- }
1717
- return sp.left;
1718
- }
1719
- var from = 0, fromX = 0, to = text.length, toX;
1720
- // Guess a suitable upper bound for our search.
1721
- var estimated = Math.min(to, Math.ceil((x + innerOff * scroller.clientWidth * .9) / cw));
1722
- for (;;) {
1723
- var estX = getX(estimated);
1724
- if (estX <= x && estimated < to) estimated = Math.min(to, Math.ceil(estimated * 1.2));
1725
- else {toX = estX; to = estimated; break;}
1726
- }
1727
- if (x > toX) return {line: lineNo, ch: to};
1728
- // Try to guess a suitable lower bound as well.
1729
- estimated = Math.floor(to * 0.8); estX = getX(estimated);
1730
- if (estX < x) {from = estimated; fromX = estX;}
1731
- // Do a binary search between these bounds.
1732
- for (;;) {
1733
- if (to - from <= 1) return {line: lineNo, ch: (toX - x > x - fromX) ? from : to};
1734
- var middle = Math.ceil((from + to) / 2), middleX = getX(middle);
1735
- if (middleX > x) {to = middle; toX = middleX;}
1736
- else {from = middle; fromX = middleX;}
1737
- }
1738
- }
1739
- function pageCoords(pos) {
1740
- var local = localCoords(pos, true), off = eltOffset(lineSpace);
1741
- return {x: off.left + local.x, y: off.top + local.y, yBot: off.top + local.yBot};
1742
- }
1743
-
1744
- var cachedHeight, cachedHeightFor, measureText;
1745
- function textHeight() {
1746
- if (measureText == null) {
1747
- measureText = "<pre>";
1748
- for (var i = 0; i < 49; ++i) measureText += "x<br/>";
1749
- measureText += "x</pre>";
1750
- }
1751
- var offsetHeight = lineDiv.clientHeight;
1752
- if (offsetHeight == cachedHeightFor) return cachedHeight;
1753
- cachedHeightFor = offsetHeight;
1754
- measure.innerHTML = measureText;
1755
- cachedHeight = measure.firstChild.offsetHeight / 50 || 1;
1756
- measure.innerHTML = "";
1757
- return cachedHeight;
1758
- }
1759
- var cachedWidth, cachedWidthFor = 0;
1760
- function charWidth() {
1761
- if (scroller.clientWidth == cachedWidthFor) return cachedWidth;
1762
- cachedWidthFor = scroller.clientWidth;
1763
- return (cachedWidth = stringWidth("x"));
1764
- }
1765
- function paddingTop() {return lineSpace.offsetTop;}
1766
- function paddingLeft() {return lineSpace.offsetLeft;}
1767
-
1768
- function posFromMouse(e, liberal) {
1769
- var offW = eltOffset(scroller, true), x, y;
1770
- // Fails unpredictably on IE[67] when mouse is dragged around quickly.
1771
- try { x = e.clientX; y = e.clientY; } catch (e) { return null; }
1772
- // This is a mess of a heuristic to try and determine whether a
1773
- // scroll-bar was clicked or not, and to return null if one was
1774
- // (and !liberal).
1775
- if (!liberal && (x - offW.left > scroller.clientWidth || y - offW.top > scroller.clientHeight))
1776
- return null;
1777
- var offL = eltOffset(lineSpace, true);
1778
- return coordsChar(x - offL.left, y - offL.top);
1779
- }
1780
- function onContextMenu(e) {
1781
- var pos = posFromMouse(e), scrollPos = scrollbar.scrollTop;
1782
- if (!pos || opera) return; // Opera is difficult.
1783
- if (posEq(sel.from, sel.to) || posLess(pos, sel.from) || !posLess(pos, sel.to))
1784
- operation(setCursor)(pos.line, pos.ch);
1785
-
1786
- var oldCSS = input.style.cssText;
1787
- inputDiv.style.position = "absolute";
1788
- input.style.cssText = "position: fixed; width: 30px; height: 30px; top: " + (e.clientY - 5) +
1789
- "px; left: " + (e.clientX - 5) + "px; z-index: 1000; background: white; " +
1790
- "border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";
1791
- leaveInputAlone = true;
1792
- var val = input.value = getSelection();
1793
- focusInput();
1794
- selectInput(input);
1795
- function rehide() {
1796
- var newVal = splitLines(input.value).join("\n");
1797
- if (newVal != val && !options.readOnly) operation(replaceSelection)(newVal, "end");
1798
- inputDiv.style.position = "relative";
1799
- input.style.cssText = oldCSS;
1800
- if (ie_lt9) scrollbar.scrollTop = scrollPos;
1801
- leaveInputAlone = false;
1802
- resetInput(true);
1803
- slowPoll();
1804
- }
1805
-
1806
- if (gecko) {
1807
- e_stop(e);
1808
- var mouseup = connect(window, "mouseup", function() {
1809
- mouseup();
1810
- setTimeout(rehide, 20);
1811
- }, true);
1812
- } else {
1813
- setTimeout(rehide, 50);
1814
- }
1815
- }
1816
-
1817
- // Cursor-blinking
1818
- function restartBlink() {
1819
- clearInterval(blinker);
1820
- var on = true;
1821
- cursor.style.visibility = "";
1822
- blinker = setInterval(function() {
1823
- cursor.style.visibility = (on = !on) ? "" : "hidden";
1824
- }, 650);
1825
- }
1826
-
1827
- var matching = {"(": ")>", ")": "(<", "[": "]>", "]": "[<", "{": "}>", "}": "{<"};
1828
- function matchBrackets(autoclear) {
1829
- var head = sel.inverted ? sel.from : sel.to, line = getLine(head.line), pos = head.ch - 1;
1830
- var match = (pos >= 0 && matching[line.text.charAt(pos)]) || matching[line.text.charAt(++pos)];
1831
- if (!match) return;
1832
- var ch = match.charAt(0), forward = match.charAt(1) == ">", d = forward ? 1 : -1, st = line.styles;
1833
- for (var off = pos + 1, i = 0, e = st.length; i < e; i+=2)
1834
- if ((off -= st[i].length) <= 0) {var style = st[i+1]; break;}
1835
-
1836
- var stack = [line.text.charAt(pos)], re = /[(){}[\]]/;
1837
- function scan(line, from, to) {
1838
- if (!line.text) return;
1839
- var st = line.styles, pos = forward ? 0 : line.text.length - 1, cur;
1840
- for (var i = forward ? 0 : st.length - 2, e = forward ? st.length : -2; i != e; i += 2*d) {
1841
- var text = st[i];
1842
- if (st[i+1] != style) {pos += d * text.length; continue;}
1843
- for (var j = forward ? 0 : text.length - 1, te = forward ? text.length : -1; j != te; j += d, pos+=d) {
1844
- if (pos >= from && pos < to && re.test(cur = text.charAt(j))) {
1845
- var match = matching[cur];
1846
- if (match.charAt(1) == ">" == forward) stack.push(cur);
1847
- else if (stack.pop() != match.charAt(0)) return {pos: pos, match: false};
1848
- else if (!stack.length) return {pos: pos, match: true};
1849
- }
1850
- }
1851
- }
1852
- }
1853
- for (var i = head.line, e = forward ? Math.min(i + 100, doc.size) : Math.max(-1, i - 100); i != e; i+=d) {
1854
- var line = getLine(i), first = i == head.line;
1855
- var found = scan(line, first && forward ? pos + 1 : 0, first && !forward ? pos : line.text.length);
1856
- if (found) break;
1857
- }
1858
- if (!found) found = {pos: null, match: false};
1859
- var style = found.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket";
1860
- var one = markText({line: head.line, ch: pos}, {line: head.line, ch: pos+1}, style),
1861
- two = found.pos != null && markText({line: i, ch: found.pos}, {line: i, ch: found.pos + 1}, style);
1862
- var clear = operation(function(){one.clear(); two && two.clear();});
1863
- if (autoclear) setTimeout(clear, 800);
1864
- else bracketHighlighted = clear;
1865
- }
1866
-
1867
- // Finds the line to start with when starting a parse. Tries to
1868
- // find a line with a stateAfter, so that it can start with a
1869
- // valid state. If that fails, it returns the line with the
1870
- // smallest indentation, which tends to need the least context to
1871
- // parse correctly.
1872
- function findStartLine(n) {
1873
- var minindent, minline;
1874
- for (var search = n, lim = n - 40; search > lim; --search) {
1875
- if (search == 0) return 0;
1876
- var line = getLine(search-1);
1877
- if (line.stateAfter) return search;
1878
- var indented = line.indentation(options.tabSize);
1879
- if (minline == null || minindent > indented) {
1880
- minline = search - 1;
1881
- minindent = indented;
1882
- }
1883
- }
1884
- return minline;
1885
- }
1886
- function getStateBefore(n) {
1887
- var start = findStartLine(n), state = start && getLine(start-1).stateAfter;
1888
- if (!state) state = startState(mode);
1889
- else state = copyState(mode, state);
1890
- doc.iter(start, n, function(line) {
1891
- line.highlight(mode, state, options.tabSize);
1892
- line.stateAfter = copyState(mode, state);
1893
- });
1894
- if (start < n) changes.push({from: start, to: n});
1895
- if (n < doc.size && !getLine(n).stateAfter) work.push(n);
1896
- return state;
1897
- }
1898
- function highlightLines(start, end) {
1899
- var state = getStateBefore(start);
1900
- doc.iter(start, end, function(line) {
1901
- line.highlight(mode, state, options.tabSize);
1902
- line.stateAfter = copyState(mode, state);
1903
- });
1904
- }
1905
- function highlightWorker() {
1906
- var end = +new Date + options.workTime;
1907
- var foundWork = work.length;
1908
- while (work.length) {
1909
- if (!getLine(showingFrom).stateAfter) var task = showingFrom;
1910
- else var task = work.pop();
1911
- if (task >= doc.size) continue;
1912
- var start = findStartLine(task), state = start && getLine(start-1).stateAfter;
1913
- if (state) state = copyState(mode, state);
1914
- else state = startState(mode);
1915
-
1916
- var unchanged = 0, compare = mode.compareStates, realChange = false,
1917
- i = start, bail = false;
1918
- doc.iter(i, doc.size, function(line) {
1919
- var hadState = line.stateAfter;
1920
- if (+new Date > end) {
1921
- work.push(i);
1922
- startWorker(options.workDelay);
1923
- if (realChange) changes.push({from: task, to: i + 1});
1924
- return (bail = true);
1925
- }
1926
- var changed = line.highlight(mode, state, options.tabSize);
1927
- if (changed) realChange = true;
1928
- line.stateAfter = copyState(mode, state);
1929
- var done = null;
1930
- if (compare) {
1931
- var same = hadState && compare(hadState, state);
1932
- if (same != Pass) done = !!same;
1933
- }
1934
- if (done == null) {
1935
- if (changed !== false || !hadState) unchanged = 0;
1936
- else if (++unchanged > 3 && (!mode.indent || mode.indent(hadState, "") == mode.indent(state, "")))
1937
- done = true;
1938
- }
1939
- if (done) return true;
1940
- ++i;
1941
- });
1942
- if (bail) return;
1943
- if (realChange) changes.push({from: task, to: i + 1});
1944
- }
1945
- if (foundWork && options.onHighlightComplete)
1946
- options.onHighlightComplete(instance);
1947
- }
1948
- function startWorker(time) {
1949
- if (!work.length) return;
1950
- highlight.set(time, operation(highlightWorker));
1951
- }
1952
-
1953
- // Operations are used to wrap changes in such a way that each
1954
- // change won't have to update the cursor and display (which would
1955
- // be awkward, slow, and error-prone), but instead updates are
1956
- // batched and then all combined and executed at once.
1957
- function startOperation() {
1958
- updateInput = userSelChange = textChanged = null;
1959
- changes = []; selectionChanged = false; callbacks = [];
1960
- }
1961
- function endOperation() {
1962
- if (updateMaxLine) computeMaxLength();
1963
- if (maxLineChanged && !options.lineWrapping) {
1964
- widthForcer.style.left = stringWidth(maxLine) + "px";
1965
- maxLineChanged = false;
1966
- }
1967
- var newScrollPos, updated;
1968
- if (selectionChanged) {
1969
- var coords = calculateCursorCoords();
1970
- newScrollPos = calculateScrollPos(coords.x, coords.y, coords.x, coords.yBot);
1971
- }
1972
- if (changes.length) updated = updateDisplay(changes, true, (newScrollPos ? newScrollPos.scrollTop : null));
1973
- else {
1974
- if (selectionChanged) updateSelection();
1975
- if (gutterDirty) updateGutter();
1976
- }
1977
- if (newScrollPos) scrollCursorIntoView();
1978
- if (selectionChanged) {scrollEditorIntoView(); restartBlink();}
1979
-
1980
- if (focused && !leaveInputAlone &&
1981
- (updateInput === true || (updateInput !== false && selectionChanged)))
1982
- resetInput(userSelChange);
1983
-
1984
- if (selectionChanged && options.matchBrackets)
1985
- setTimeout(operation(function() {
1986
- if (bracketHighlighted) {bracketHighlighted(); bracketHighlighted = null;}
1987
- if (posEq(sel.from, sel.to)) matchBrackets(false);
1988
- }), 20);
1989
- var sc = selectionChanged, cbs = callbacks; // these can be reset by callbacks
1990
- if (textChanged && options.onChange && instance)
1991
- options.onChange(instance, textChanged);
1992
- if (sc && options.onCursorActivity)
1993
- options.onCursorActivity(instance);
1994
- for (var i = 0; i < cbs.length; ++i) cbs[i](instance);
1995
- if (updated && options.onUpdate) options.onUpdate(instance);
1996
- }
1997
- var nestedOperation = 0;
1998
- function operation(f) {
1999
- return function() {
2000
- if (!nestedOperation++) startOperation();
2001
- try {var result = f.apply(this, arguments);}
2002
- finally {if (!--nestedOperation) endOperation();}
2003
- return result;
2004
- };
2005
- }
2006
-
2007
- function compoundChange(f) {
2008
- history.startCompound();
2009
- try { return f(); } finally { history.endCompound(); }
2010
- }
2011
-
2012
- for (var ext in extensions)
2013
- if (extensions.propertyIsEnumerable(ext) &&
2014
- !instance.propertyIsEnumerable(ext))
2015
- instance[ext] = extensions[ext];
2016
- return instance;
2017
- } // (end of function CodeMirror)
2018
-
2019
- // The default configuration options.
2020
- CodeMirror.defaults = {
2021
- value: "",
2022
- mode: null,
2023
- theme: "default",
2024
- indentUnit: 5,
2025
- indentWithTabs: false,
2026
- smartIndent: true,
2027
- tabSize: 6,
2028
- keyMap: "default",
2029
- extraKeys: null,
2030
- electricChars: true,
2031
- autoClearEmptyLines: false,
2032
- onKeyEvent: null,
2033
- onDragEvent: null,
2034
- lineWrapping: false,
2035
- lineNumbers: false,
2036
- gutter: false,
2037
- fixedGutter: false,
2038
- firstLineNumber: 1,
2039
- readOnly: false,
2040
- dragDrop: true,
2041
- onChange: null,
2042
- onCursorActivity: null,
2043
- onGutterClick: null,
2044
- onHighlightComplete: null,
2045
- onUpdate: null,
2046
- onFocus: null, onBlur: null, onScroll: null,
2047
- matchBrackets: false,
2048
- workTime: 100,
2049
- workDelay: 200,
2050
- pollInterval: 100,
2051
- undoDepth: 40,
2052
- tabindex: null,
2053
- autofocus: null
2054
- };
2055
-
2056
- var ios = /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent);
2057
- var mac = ios || /Mac/.test(navigator.platform);
2058
- var win = /Win/.test(navigator.platform);
2059
-
2060
- // Known modes, by name and by MIME
2061
- var modes = CodeMirror.modes = {}, mimeModes = CodeMirror.mimeModes = {};
2062
- CodeMirror.defineMode = function(name, mode) {
2063
- if (!CodeMirror.defaults.mode && name != "null") CodeMirror.defaults.mode = name;
2064
- if (arguments.length > 2) {
2065
- mode.dependencies = [];
2066
- for (var i = 2; i < arguments.length; ++i) mode.dependencies.push(arguments[i]);
2067
- }
2068
- modes[name] = mode;
2069
- };
2070
- CodeMirror.defineMIME = function(mime, spec) {
2071
- mimeModes[mime] = spec;
2072
- };
2073
- CodeMirror.resolveMode = function(spec) {
2074
- if (typeof spec == "string" && mimeModes.hasOwnProperty(spec))
2075
- spec = mimeModes[spec];
2076
- else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec))
2077
- return CodeMirror.resolveMode("application/xml");
2078
- if (typeof spec == "string") return {name: spec};
2079
- else return spec || {name: "null"};
2080
- };
2081
- CodeMirror.getMode = function(options, spec) {
2082
- var spec = CodeMirror.resolveMode(spec);
2083
- var mfactory = modes[spec.name];
2084
- if (!mfactory) return CodeMirror.getMode(options, "text/plain");
2085
- return mfactory(options, spec);
2086
- };
2087
- CodeMirror.listModes = function() {
2088
- var list = [];
2089
- for (var m in modes)
2090
- if (modes.propertyIsEnumerable(m)) list.push(m);
2091
- return list;
2092
- };
2093
- CodeMirror.listMIMEs = function() {
2094
- var list = [];
2095
- for (var m in mimeModes)
2096
- if (mimeModes.propertyIsEnumerable(m)) list.push({mime: m, mode: mimeModes[m]});
2097
- return list;
2098
- };
2099
-
2100
- var extensions = CodeMirror.extensions = {};
2101
- CodeMirror.defineExtension = function(name, func) {
2102
- extensions[name] = func;
2103
- };
2104
-
2105
- var commands = CodeMirror.commands = {
2106
- selectAll: function(cm) {cm.setSelection({line: 0, ch: 0}, {line: cm.lineCount() - 1});},
2107
- killLine: function(cm) {
2108
- var from = cm.getCursor(true), to = cm.getCursor(false), sel = !posEq(from, to);
2109
- if (!sel && cm.getLine(from.line).length == from.ch) cm.replaceRange("", from, {line: from.line + 1, ch: 0});
2110
- else cm.replaceRange("", from, sel ? to : {line: from.line});
2111
- },
2112
- deleteLine: function(cm) {var l = cm.getCursor().line; cm.replaceRange("", {line: l, ch: 0}, {line: l});},
2113
- undo: function(cm) {cm.undo();},
2114
- redo: function(cm) {cm.redo();},
2115
- goDocStart: function(cm) {cm.setCursor(0, 0, true);},
2116
- goDocEnd: function(cm) {cm.setSelection({line: cm.lineCount() - 1}, null, true);},
2117
- goLineStart: function(cm) {cm.setCursor(cm.getCursor().line, 0, true);},
2118
- goLineStartSmart: function(cm) {
2119
- var cur = cm.getCursor();
2120
- var text = cm.getLine(cur.line), firstNonWS = Math.max(0, text.search(/\S/));
2121
- cm.setCursor(cur.line, cur.ch <= firstNonWS && cur.ch ? 0 : firstNonWS, true);
2122
- },
2123
- goLineEnd: function(cm) {cm.setSelection({line: cm.getCursor().line}, null, true);},
2124
- goLineUp: function(cm) {cm.moveV(-1, "line");},
2125
- goLineDown: function(cm) {cm.moveV(1, "line");},
2126
- goPageUp: function(cm) {cm.moveV(-1, "page");},
2127
- goPageDown: function(cm) {cm.moveV(1, "page");},
2128
- goCharLeft: function(cm) {cm.moveH(-1, "char");},
2129
- goCharRight: function(cm) {cm.moveH(1, "char");},
2130
- goColumnLeft: function(cm) {cm.moveH(-1, "column");},
2131
- goColumnRight: function(cm) {cm.moveH(1, "column");},
2132
- goWordLeft: function(cm) {cm.moveH(-1, "word");},
2133
- goWordRight: function(cm) {cm.moveH(1, "word");},
2134
- delCharLeft: function(cm) {cm.deleteH(-1, "char");},
2135
- delCharRight: function(cm) {cm.deleteH(1, "char");},
2136
- delWordLeft: function(cm) {cm.deleteH(-1, "word");},
2137
- delWordRight: function(cm) {cm.deleteH(1, "word");},
2138
- indentAuto: function(cm) {cm.indentSelection("smart");},
2139
- indentMore: function(cm) {cm.indentSelection("add");},
2140
- indentLess: function(cm) {cm.indentSelection("subtract");},
2141
- insertTab: function(cm) {cm.replaceSelection("\t", "end");},
2142
- defaultTab: function(cm) {
2143
- if (cm.somethingSelected()) cm.indentSelection("add");
2144
- else cm.replaceSelection("\t", "end");
2145
- },
2146
- transposeChars: function(cm) {
2147
- var cur = cm.getCursor(), line = cm.getLine(cur.line);
2148
- if (cur.ch > 0 && cur.ch < line.length - 1)
2149
- cm.replaceRange(line.charAt(cur.ch) + line.charAt(cur.ch - 1),
2150
- {line: cur.line, ch: cur.ch - 1}, {line: cur.line, ch: cur.ch + 1});
2151
- },
2152
- newlineAndIndent: function(cm) {
2153
- cm.replaceSelection("\n", "end");
2154
- cm.indentLine(cm.getCursor().line);
2155
- },
2156
- toggleOverwrite: function(cm) {cm.toggleOverwrite();}
2157
- };
2158
-
2159
- var keyMap = CodeMirror.keyMap = {};
2160
- keyMap.basic = {
2161
- "Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown",
2162
- "End": "goLineEnd", "Home": "goLineStartSmart", "PageUp": "goPageUp", "PageDown": "goPageDown",
2163
- "Delete": "delCharRight", "Backspace": "delCharLeft", "Tab": "defaultTab", "Shift-Tab": "indentAuto",
2164
- "Enter": "newlineAndIndent", "Insert": "toggleOverwrite"
2165
- };
2166
- // Note that the save and find-related commands aren't defined by
2167
- // default. Unknown commands are simply ignored.
2168
- keyMap.pcDefault = {
2169
- "Ctrl-A": "selectAll", "Ctrl-D": "deleteLine", "Ctrl-Z": "undo", "Shift-Ctrl-Z": "redo", "Ctrl-Y": "redo",
2170
- "Ctrl-Home": "goDocStart", "Alt-Up": "goDocStart", "Ctrl-End": "goDocEnd", "Ctrl-Down": "goDocEnd",
2171
- "Ctrl-Left": "goWordLeft", "Ctrl-Right": "goWordRight", "Alt-Left": "goLineStart", "Alt-Right": "goLineEnd",
2172
- "Ctrl-Backspace": "delWordLeft", "Ctrl-Delete": "delWordRight", "Ctrl-S": "save", "Ctrl-F": "find",
2173
- "Ctrl-G": "findNext", "Shift-Ctrl-G": "findPrev", "Shift-Ctrl-F": "replace", "Shift-Ctrl-R": "replaceAll",
2174
- "Ctrl-[": "indentLess", "Ctrl-]": "indentMore",
2175
- fallthrough: "basic"
2176
- };
2177
- keyMap.macDefault = {
2178
- "Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo",
2179
- "Cmd-Up": "goDocStart", "Cmd-End": "goDocEnd", "Cmd-Down": "goDocEnd", "Alt-Left": "goWordLeft",
2180
- "Alt-Right": "goWordRight", "Cmd-Left": "goLineStart", "Cmd-Right": "goLineEnd", "Alt-Backspace": "delWordLeft",
2181
- "Ctrl-Alt-Backspace": "delWordRight", "Alt-Delete": "delWordRight", "Cmd-S": "save", "Cmd-F": "find",
2182
- "Cmd-G": "findNext", "Shift-Cmd-G": "findPrev", "Cmd-Alt-F": "replace", "Shift-Cmd-Alt-F": "replaceAll",
2183
- "Cmd-[": "indentLess", "Cmd-]": "indentMore",
2184
- fallthrough: ["basic", "emacsy"]
2185
- };
2186
- keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault;
2187
- keyMap.emacsy = {
2188
- "Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown",
2189
- "Alt-F": "goWordRight", "Alt-B": "goWordLeft", "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd",
2190
- "Ctrl-V": "goPageUp", "Shift-Ctrl-V": "goPageDown", "Ctrl-D": "delCharRight", "Ctrl-H": "delCharLeft",
2191
- "Alt-D": "delWordRight", "Alt-Backspace": "delWordLeft", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars"
2192
- };
2193
-
2194
- function getKeyMap(val) {
2195
- if (typeof val == "string") return keyMap[val];
2196
- else return val;
2197
- }
2198
- function lookupKey(name, extraMap, map, handle, stop) {
2199
- function lookup(map) {
2200
- map = getKeyMap(map);
2201
- var found = map[name];
2202
- if (found != null && handle(found)) return true;
2203
- if (map.nofallthrough) {
2204
- if (stop) stop();
2205
- return true;
2206
- }
2207
- var fallthrough = map.fallthrough;
2208
- if (fallthrough == null) return false;
2209
- if (Object.prototype.toString.call(fallthrough) != "[object Array]")
2210
- return lookup(fallthrough);
2211
- for (var i = 0, e = fallthrough.length; i < e; ++i) {
2212
- if (lookup(fallthrough[i])) return true;
2213
- }
2214
- return false;
2215
- }
2216
- if (extraMap && lookup(extraMap)) return true;
2217
- return lookup(map);
2218
- }
2219
- function isModifierKey(event) {
2220
- var name = keyNames[e_prop(event, "keyCode")];
2221
- return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod";
2222
- }
2223
-
2224
- CodeMirror.fromTextArea = function(textarea, options) {
2225
- if (!options) options = {};
2226
- options.value = textarea.value;
2227
- if (!options.tabindex && textarea.tabindex)
2228
- options.tabindex = textarea.tabindex;
2229
- if (options.autofocus == null && textarea.getAttribute("autofocus") != null)
2230
- options.autofocus = true;
2231
-
2232
- function save() {textarea.value = instance.getValue();}
2233
- if (textarea.form) {
2234
- // Deplorable hack to make the submit method do the right thing.
2235
- var rmSubmit = connect(textarea.form, "submit", save, true);
2236
- if (typeof textarea.form.submit == "function") {
2237
- var realSubmit = textarea.form.submit;
2238
- function wrappedSubmit() {
2239
- save();
2240
- textarea.form.submit = realSubmit;
2241
- textarea.form.submit();
2242
- textarea.form.submit = wrappedSubmit;
2243
- }
2244
- textarea.form.submit = wrappedSubmit;
2245
- }
2246
- }
2247
-
2248
- textarea.style.display = "none";
2249
- var instance = CodeMirror(function(node) {
2250
- textarea.parentNode.insertBefore(node, textarea.nextSibling);
2251
- }, options);
2252
- instance.save = save;
2253
- instance.getTextArea = function() { return textarea; };
2254
- instance.toTextArea = function() {
2255
- save();
2256
- textarea.parentNode.removeChild(instance.getWrapperElement());
2257
- textarea.style.display = "";
2258
- if (textarea.form) {
2259
- rmSubmit();
2260
- if (typeof textarea.form.submit == "function")
2261
- textarea.form.submit = realSubmit;
2262
- }
2263
- };
2264
- return instance;
2265
- };
2266
-
2267
- // Utility functions for working with state. Exported because modes
2268
- // sometimes need to do this.
2269
- function copyState(mode, state) {
2270
- if (state === true) return state;
2271
- if (mode.copyState) return mode.copyState(state);
2272
- var nstate = {};
2273
- for (var n in state) {
2274
- var val = state[n];
2275
- if (val instanceof Array) val = val.concat([]);
2276
- nstate[n] = val;
2277
- }
2278
- return nstate;
2279
- }
2280
- CodeMirror.copyState = copyState;
2281
- function startState(mode, a1, a2) {
2282
- return mode.startState ? mode.startState(a1, a2) : true;
2283
- }
2284
- CodeMirror.startState = startState;
2285
-
2286
- // The character stream used by a mode's parser.
2287
- function StringStream(string, tabSize) {
2288
- this.pos = this.start = 0;
2289
- this.string = string;
2290
- this.tabSize = tabSize || 8;
2291
- }
2292
- StringStream.prototype = {
2293
- eol: function() {return this.pos >= this.string.length;},
2294
- sol: function() {return this.pos == 0;},
2295
- peek: function() {return this.string.charAt(this.pos);},
2296
- next: function() {
2297
- if (this.pos < this.string.length)
2298
- return this.string.charAt(this.pos++);
2299
- },
2300
- eat: function(match) {
2301
- var ch = this.string.charAt(this.pos);
2302
- if (typeof match == "string") var ok = ch == match;
2303
- else var ok = ch && (match.test ? match.test(ch) : match(ch));
2304
- if (ok) {++this.pos; return ch;}
2305
- },
2306
- eatWhile: function(match) {
2307
- var start = this.pos;
2308
- while (this.eat(match)){}
2309
- return this.pos > start;
2310
- },
2311
- eatSpace: function() {
2312
- var start = this.pos;
2313
- while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos;
2314
- return this.pos > start;
2315
- },
2316
- skipToEnd: function() {this.pos = this.string.length;},
2317
- skipTo: function(ch) {
2318
- var found = this.string.indexOf(ch, this.pos);
2319
- if (found > -1) {this.pos = found; return true;}
2320
- },
2321
- backUp: function(n) {this.pos -= n;},
2322
- column: function() {return countColumn(this.string, this.start, this.tabSize);},
2323
- indentation: function() {return countColumn(this.string, null, this.tabSize);},
2324
- match: function(pattern, consume, caseInsensitive) {
2325
- if (typeof pattern == "string") {
2326
- function cased(str) {return caseInsensitive ? str.toLowerCase() : str;}
2327
- if (cased(this.string).indexOf(cased(pattern), this.pos) == this.pos) {
2328
- if (consume !== false) this.pos += pattern.length;
2329
- return true;
2330
- }
2331
- } els