').addClass('previewurl_dialog_background');
26 |
27 | previewclone.click(function(e) {
28 | e.stopPropagation();
29 | });
30 |
31 | var previewdialog = $('
').addClass('previewurl_dialog_main').append(previewclone);
32 |
33 | var HidePreviewDialog = function() {
34 | $(document).off('keyup.previewurl');
35 |
36 | previewbackground.remove();
37 | preview.focus();
38 |
39 | if (settings.hidepreview) settings.hidepreview.call(preview, settings.hidepreviewinfo, previewclone);
40 | };
41 |
42 | $(document).on('keyup.previewurl', function(e) {
43 | if (e.keyCode == 27) {
44 | HidePreviewDialog();
45 | }
46 | });
47 |
48 | previewbackground.append(previewdialog).click(function() {
49 | HidePreviewDialog();
50 | });
51 |
52 | $('body').append(previewbackground);
53 | previewclone.focus();
54 |
55 | if (settings.showpreview) settings.showpreview.call(preview, settings.showpreviewinfo, previewclone);
56 |
57 | return true;
58 | };
59 |
60 | $.fn.PreviewURL = function(options) {
61 | this.each(function() {
62 | var $this = $(this);
63 |
64 | // Remove event handlers.
65 | $this.off('click.previewurl');
66 | });
67 |
68 | if (typeof(options) === 'string' && options === 'destroy') return this;
69 |
70 | var settings = $.extend($.fn.PreviewURL.defaults, options);
71 |
72 | return this.each(function() {
73 | var $this = $(this);
74 |
75 | var PreviewHandler = function(e) {
76 | if (DisplayPreviewDialog($this, settings)) e.preventDefault();
77 | };
78 |
79 | $this.on('click.previewurl', PreviewHandler);
80 | });
81 | }
82 |
83 | $.fn.PreviewURL.defaults = {
84 | 'showpreview' : null,
85 | 'showpreviewinfo' : null,
86 | 'hidepreview' : null,
87 | 'hidepreviewinfo' : null
88 | };
89 | }(jQuery));
90 |
--------------------------------------------------------------------------------
/api/support/bb_feeds_api_base.php.template:
--------------------------------------------------------------------------------
1 | db = new $dbclassname($config["db_select"] . ":" . $config["db_master_dsn"], ($config["db_login"] ? $config["db_master_user"] : false), ($config["db_login"] ? $config["db_master_pass"] : false));
18 | else $this->db = new $dbclassname($config["db_select"] . ":" . $config["db_dsn"], ($config["db_login"] ? $config["db_user"] : false), ($config["db_login"] ? $config["db_pass"] : false));
19 |
20 | $this->db->Query("USE", $config["db_name"]);
21 |
22 | $dbprefix = $config["db_table_prefix"];
23 | $this->api_db_assets = $dbprefix . "assets";
24 | }
25 |
26 | public function AddItems(&$itemsinfo)
27 | {
28 | if (!isset($itemsinfo["lastts"])) $itemsinfo["lastts"] = time();
29 | if (!isset($itemsinfo["canadd"])) $itemsinfo["canadd"] = true;
30 |
31 | if ($itemsinfo["canadd"])
32 | {
33 | $prevts = $itemsinfo["lastts"];
34 |
35 | $nextpub = $this->db->GetOne("SELECT", array(
36 | "MIN(publish)",
37 | "FROM" => "?",
38 | "WHERE" => "publish > ?",
39 | ), $this->api_db_assets, $prevts);
40 |
41 | if ($nextpub)
42 | {
43 | $itemsinfo["lastts"] = (int)$nextpub;
44 |
45 | if (!isset($itemsinfo["items"][$itemsinfo["lastts"]])) $itemsinfo["items"][$itemsinfo["lastts"]] = array();
46 |
47 | $result = $this->db->Query("SELECT", array(
48 | "*",
49 | "FROM" => "?",
50 | "WHERE" => "publish = ?"
51 | ), $this->api_db_assets, $nextpub);
52 |
53 | while ($row = $result->NextRow())
54 | {
55 | $row->info = json_decode($row->info, true);
56 |
57 | $itemsinfo["items"][$itemsinfo["lastts"]][$row->id] = array("type" => "insert", "data" => array("asset" => (array)$row, "prevasset" => false));
58 | }
59 | }
60 |
61 |
62 | $nextremove = $this->db->GetOne("SELECT", array(
63 | "MIN(unpublish)",
64 | "FROM" => "?",
65 | "WHERE" => "unpublish > ?",
66 | ), $this->api_db_assets, $prevts);
67 |
68 | if ($nextremove)
69 | {
70 | $ts = (int)$nextremove;
71 | if ($ts <= $itemsinfo["lastts"])
72 | {
73 | $itemsinfo["lastts"] = $ts;
74 |
75 | if (!isset($itemsinfo["items"][$itemsinfo["lastts"]])) $itemsinfo["items"][$itemsinfo["lastts"]] = array();
76 |
77 | $result = $this->db->Query("SELECT", array(
78 | "*",
79 | "FROM" => "?",
80 | "WHERE" => "unpublish = ?"
81 | ), $this->api_db_assets, $nextremove);
82 |
83 | while ($row = $result->NextRow())
84 | {
85 | $row->info = json_decode($row->info, true);
86 |
87 | $itemsinfo["items"][$itemsinfo["lastts"]][$row->id] = array("type" => "delete", "data" => array("asset" => (array)$row, "prevasset" => false));
88 | }
89 | }
90 | }
91 |
92 | $this->canadd = false;
93 | }
94 | }
95 |
96 | public function RemovedItems(&$itemsinfo, $ts, $sent)
97 | {
98 | if (!$itemsinfo["canadd"] && $ts === $itemsinfo["lastts"])
99 | {
100 | if (!$sent) $itemsinfo["lastts"]--;
101 | $itemsinfo["canadd"] = true;
102 | }
103 | }
104 | }
105 | ?>
--------------------------------------------------------------------------------
/api/support/csdb/db_mysql_lite.php:
--------------------------------------------------------------------------------
1 | Query("SET", "NAMES 'utf8mb4'");
25 | }
26 |
27 | public function GetInsertID($name = null)
28 | {
29 | return $this->GetOne("SELECT", array("LAST_INSERT_ID()"));
30 | }
31 |
32 | public function QuoteIdentifier($str)
33 | {
34 | return "`" . str_replace(array("`", "?"), array("``", ""), $str) . "`";
35 | }
36 |
37 | protected function GenerateSQL(&$master, &$sql, &$opts, $cmd, $queryinfo, $args, $subquery)
38 | {
39 | switch ($cmd)
40 | {
41 | case "SELECT":
42 | {
43 | $supported = array(
44 | "PRECOLUMN" => array("DISTINCT" => "bool", "HIGH_PRIORITY" => "bool", "SUBQUERIES" => true),
45 | "FROM" => array("SUBQUERIES" => true),
46 | "WHERE" => array("SUBQUERIES" => true),
47 | "GROUP BY" => true,
48 | "HAVING" => true,
49 | "ORDER BY" => true,
50 | "LIMIT" => ", "
51 | );
52 |
53 | return $this->ProcessSELECT($master, $sql, $opts, $queryinfo, $args, $subquery, $supported);
54 | }
55 | case "INSERT":
56 | {
57 | $supported = array(
58 | "PREINTO" => array("LOW_PRIORITY" => "bool", "DELAYED" => "bool", "HIGH_PRIORITY" => "bool", "IGNORE" => "bool"),
59 | "SELECT" => true,
60 | "BULKINSERT" => true
61 | );
62 |
63 | return $this->ProcessINSERT($master, $sql, $opts, $queryinfo, $args, $subquery, $supported);
64 | }
65 | case "UPDATE":
66 | {
67 | $supported = array(
68 | "PRETABLE" => array("LOW_PRIORITY" => "bool", "IGNORE" => "bool"),
69 | "WHERE" => array("SUBQUERIES" => true),
70 | "ORDER BY" => true,
71 | "LIMIT" => ", "
72 | );
73 |
74 | return $this->ProcessUPDATE($master, $sql, $opts, $queryinfo, $args, $subquery, $supported);
75 | }
76 | case "DELETE":
77 | {
78 | $supported = array(
79 | "PREFROM" => array("LOW_PRIORITY" => "bool", "QUICK" => "bool", "IGNORE" => "bool"),
80 | "WHERE" => array("SUBQUERIES" => true),
81 | "ORDER BY" => true,
82 | "LIMIT" => ", "
83 | );
84 |
85 | return $this->ProcessDELETE($master, $sql, $opts, $queryinfo, $args, $subquery, $supported);
86 | }
87 | case "SET":
88 | {
89 | $sql = "SET " . $queryinfo;
90 |
91 | return array("success" => true);
92 | }
93 | case "USE":
94 | {
95 | $sql = "USE " . $this->QuoteIdentifier($queryinfo);
96 |
97 | return array("success" => true);
98 | }
99 | case "TRUNCATE TABLE":
100 | {
101 | $master = true;
102 |
103 | $sql = "TRUNCATE TABLE " . $this->QuoteIdentifier($queryinfo[0]);
104 |
105 | return array("success" => true);
106 | }
107 | }
108 |
109 | return array("success" => false, "error" => CSDB::DB_Translate("Unknown query command '%s'.", $cmd), "errorcode" => "unknown_query_command");
110 | }
111 | }
112 | ?>
--------------------------------------------------------------------------------
/admin/support/multiselect-select2/select2-bootstrap.css:
--------------------------------------------------------------------------------
1 | .form-control .select2-choice {
2 | border: 0;
3 | border-radius: 2px;
4 | }
5 |
6 | .form-control .select2-choice .select2-arrow {
7 | border-radius: 0 2px 2px 0;
8 | }
9 |
10 | .form-control.select2-container {
11 | height: auto !important;
12 | padding: 0;
13 | }
14 |
15 | .form-control.select2-container.select2-dropdown-open {
16 | border-color: #5897FB;
17 | border-radius: 3px 3px 0 0;
18 | }
19 |
20 | .form-control .select2-container.select2-dropdown-open .select2-choices {
21 | border-radius: 3px 3px 0 0;
22 | }
23 |
24 | .form-control.select2-container .select2-choices {
25 | border: 0 !important;
26 | border-radius: 3px;
27 | }
28 |
29 | .control-group.warning .select2-container .select2-choice,
30 | .control-group.warning .select2-container .select2-choices,
31 | .control-group.warning .select2-container-active .select2-choice,
32 | .control-group.warning .select2-container-active .select2-choices,
33 | .control-group.warning .select2-dropdown-open.select2-drop-above .select2-choice,
34 | .control-group.warning .select2-dropdown-open.select2-drop-above .select2-choices,
35 | .control-group.warning .select2-container-multi.select2-container-active .select2-choices {
36 | border: 1px solid #C09853 !important;
37 | }
38 |
39 | .control-group.warning .select2-container .select2-choice div {
40 | border-left: 1px solid #C09853 !important;
41 | background: #FCF8E3 !important;
42 | }
43 |
44 | .control-group.error .select2-container .select2-choice,
45 | .control-group.error .select2-container .select2-choices,
46 | .control-group.error .select2-container-active .select2-choice,
47 | .control-group.error .select2-container-active .select2-choices,
48 | .control-group.error .select2-dropdown-open.select2-drop-above .select2-choice,
49 | .control-group.error .select2-dropdown-open.select2-drop-above .select2-choices,
50 | .control-group.error .select2-container-multi.select2-container-active .select2-choices {
51 | border: 1px solid #B94A48 !important;
52 | }
53 |
54 | .control-group.error .select2-container .select2-choice div {
55 | border-left: 1px solid #B94A48 !important;
56 | background: #F2DEDE !important;
57 | }
58 |
59 | .control-group.info .select2-container .select2-choice,
60 | .control-group.info .select2-container .select2-choices,
61 | .control-group.info .select2-container-active .select2-choice,
62 | .control-group.info .select2-container-active .select2-choices,
63 | .control-group.info .select2-dropdown-open.select2-drop-above .select2-choice,
64 | .control-group.info .select2-dropdown-open.select2-drop-above .select2-choices,
65 | .control-group.info .select2-container-multi.select2-container-active .select2-choices {
66 | border: 1px solid #3A87AD !important;
67 | }
68 |
69 | .control-group.info .select2-container .select2-choice div {
70 | border-left: 1px solid #3A87AD !important;
71 | background: #D9EDF7 !important;
72 | }
73 |
74 | .control-group.success .select2-container .select2-choice,
75 | .control-group.success .select2-container .select2-choices,
76 | .control-group.success .select2-container-active .select2-choice,
77 | .control-group.success .select2-container-active .select2-choices,
78 | .control-group.success .select2-dropdown-open.select2-drop-above .select2-choice,
79 | .control-group.success .select2-dropdown-open.select2-drop-above .select2-choices,
80 | .control-group.success .select2-container-multi.select2-container-active .select2-choices {
81 | border: 1px solid #468847 !important;
82 | }
83 |
84 | .control-group.success .select2-container .select2-choice div {
85 | border-left: 1px solid #468847 !important;
86 | background: #DFF0D8 !important;
87 | }
88 |
--------------------------------------------------------------------------------
/admin/support/fancy-file-uploader/cors/jquery.xdr-transport.js:
--------------------------------------------------------------------------------
1 | /*
2 | * jQuery XDomainRequest Transport Plugin
3 | * https://github.com/blueimp/jQuery-File-Upload
4 | *
5 | * Copyright 2011, Sebastian Tschan
6 | * https://blueimp.net
7 | *
8 | * Licensed under the MIT license:
9 | * https://opensource.org/licenses/MIT
10 | *
11 | * Based on Julian Aubourg's ajaxHooks xdr.js:
12 | * https://github.com/jaubourg/ajaxHooks/
13 | */
14 |
15 | /* global define, require, window, XDomainRequest */
16 |
17 | ;(function (factory) {
18 | 'use strict';
19 | if (typeof define === 'function' && define.amd) {
20 | // Register as an anonymous AMD module:
21 | define(['jquery'], factory);
22 | } else if (typeof exports === 'object') {
23 | // Node/CommonJS:
24 | factory(require('jquery'));
25 | } else {
26 | // Browser globals:
27 | factory(window.jQuery);
28 | }
29 | }(function ($) {
30 | 'use strict';
31 | if (window.XDomainRequest && !$.support.cors) {
32 | $.ajaxTransport(function (s) {
33 | if (s.crossDomain && s.async) {
34 | if (s.timeout) {
35 | s.xdrTimeout = s.timeout;
36 | delete s.timeout;
37 | }
38 | var xdr;
39 | return {
40 | send: function (headers, completeCallback) {
41 | var addParamChar = /\?/.test(s.url) ? '&' : '?';
42 | function callback(status, statusText, responses, responseHeaders) {
43 | xdr.onload = xdr.onerror = xdr.ontimeout = $.noop;
44 | xdr = null;
45 | completeCallback(status, statusText, responses, responseHeaders);
46 | }
47 | xdr = new XDomainRequest();
48 | // XDomainRequest only supports GET and POST:
49 | if (s.type === 'DELETE') {
50 | s.url = s.url + addParamChar + '_method=DELETE';
51 | s.type = 'POST';
52 | } else if (s.type === 'PUT') {
53 | s.url = s.url + addParamChar + '_method=PUT';
54 | s.type = 'POST';
55 | } else if (s.type === 'PATCH') {
56 | s.url = s.url + addParamChar + '_method=PATCH';
57 | s.type = 'POST';
58 | }
59 | xdr.open(s.type, s.url);
60 | xdr.onload = function () {
61 | callback(
62 | 200,
63 | 'OK',
64 | {text: xdr.responseText},
65 | 'Content-Type: ' + xdr.contentType
66 | );
67 | };
68 | xdr.onerror = function () {
69 | callback(404, 'Not Found');
70 | };
71 | if (s.xdrTimeout) {
72 | xdr.ontimeout = function () {
73 | callback(0, 'timeout');
74 | };
75 | xdr.timeout = s.xdrTimeout;
76 | }
77 | xdr.send((s.hasContent && s.data) || null);
78 | },
79 | abort: function () {
80 | if (xdr) {
81 | xdr.onerror = $.noop();
82 | xdr.abort();
83 | }
84 | }
85 | };
86 | }
87 | });
88 | }
89 | }));
90 |
--------------------------------------------------------------------------------
/admin/support/multiselect-flat/README.md:
--------------------------------------------------------------------------------
1 | jQuery UIx Multiselect
2 | ==================
3 | Version 2.0
4 |
5 | 
6 |
7 | Introduction
8 | ------------
9 |
10 | This widget is a complete rewrite of the [previous version](https://github.com/michael/multiselect). Why a new rewrite? Because the original widget's attempt was to create a all-in-one-out-of-the-box-multi-featured SELECT replacement and thus failed to be compliant with the DOMElement's behavior and limitations. Notably, it failed to :
11 |
12 | * update the option items when modifying the SELECT element directly
13 | * didn't support disabled items
14 | * didn't support item groups
15 | * etc.
16 |
17 | Also, it quickly became slow when loading a few hundred items and some branches had [drag](https://github.com/michael/multiselect/issues/91) [and](https://github.com/michael/multiselect/issues/124) [drop](https://github.com/michael/multiselect/issues/8) issues.
18 |
19 | Release notes
20 | -------------
21 |
22 | This widget is stable enough to be used in staging environments. However it is *still* under development, in testing phase, as some features may require more feedbacks yet! (Mainly browser compatiblity.) At this point, expect minor bug fixes within 72 hours, and there will be no more features planned at this point.
23 |
24 | The compressed (minified) version is created using the [YUI Compressor](http://refresh-sf.com/yui/).
25 |
26 | Requirements
27 | ------------
28 |
29 | * jQuery 1.8+
30 | * jQuery UI 1.9+
31 |
32 | Features
33 | --------
34 |
35 | * Support for disabled options
36 | * Support for option groups
37 | * Option group collapsable
38 | * Draggable drop and/or sortable enabled
39 | * Mouse selection mode (click, dblclick)
40 | * Support for predefined or custom sort functions
41 | * Searchable
42 | * List layout and select direction (horizontal or vertical)
43 | * Custom item renderer
44 |
45 |
46 | Usage
47 | -----
48 |
49 | **Note :** Even though it is a complete rewrite of the widget, I kept the `multiselect` widget name (but it is declared as `uix.multiselect` instead of [`ui.multiselect`](http://ajpiano.com/widgetfactory/#slide22)).
50 |
51 | $('selector').multiselect();
52 |
53 | To programmatically select/deselect, add/modify/remove items, you may access and modify the DOMElement directly, then call the `refresh` widget method to update it.
54 |
55 | $('selector').append("
")
56 | .multiselect('refresh');
57 |
58 | // manually filter available options
59 | // This will only render visible the available items containing 'My Item' (case insensitive)
60 | $('selector').multiselect('search', 'my item');
61 |
62 | $('selector').multiselect('destroy'); // restore original element
63 |
64 | See [wiki documentation](https://github.com/yanickrochon/jquery.uix.multiselect/wiki) for more information.
65 |
66 |
67 | TODO
68 | ----
69 |
70 | *
add custom item rendering support *(needs more tests)*
71 | * HTML5 ARIA attributes
72 | * Make all options as mutable as possible after initialization.
73 | * Test in all major browsers *(not fully tested)*
74 | * Mobile support
75 | * Code cleanup
76 | * etc.
77 |
78 |
79 | Limitations
80 | -----------
81 |
82 | * When setting `sortable` option to `true`, options can only be reordered within their own groups. That is, an option cannot be
83 | reordered between two options of a different group. As this widget's purpose is not to extend the original element's behaviour
84 | beyound user interaction and presentation, this limitation shall not be lifted for the time being.
85 | * This widget was designed for modern browsers usage. It is working fine in IE7+, Firefox and Chrome. Note that it
86 | *will not work* in quirks mode. There will be little to no support for [non standards compliant browsers](http://www.ie6countdown.com/).
87 |
--------------------------------------------------------------------------------
/api/support/csdb/db_sqlite_lite.php:
--------------------------------------------------------------------------------
1 | dbprefix = "";
24 |
25 | parent::Connect($dsn, $username, $password, $options);
26 | }
27 |
28 | public function GetInsertID($name = null)
29 | {
30 | return $this->GetOne("SELECT", array("LAST_INSERT_ROWID()"));
31 | }
32 |
33 | public function QuoteIdentifier($str)
34 | {
35 | return "\"" . str_replace(array("\"", "?"), array("\"\"", ""), $str) . "\"";
36 | }
37 |
38 | protected function GenerateSQL(&$master, &$sql, &$opts, $cmd, $queryinfo, $args, $subquery)
39 | {
40 | switch ($cmd)
41 | {
42 | case "SELECT":
43 | {
44 | $supported = array(
45 | "DBPREFIX" => $this->dbprefix,
46 | "PRECOLUMN" => array("DISTINCT" => "bool", "SUBQUERIES" => true),
47 | "FROM" => array("SUBQUERIES" => true),
48 | "WHERE" => array("SUBQUERIES" => true),
49 | "GROUP BY" => true,
50 | "HAVING" => true,
51 | "ORDER BY" => true,
52 | "LIMIT" => ", "
53 | );
54 |
55 | return $this->ProcessSELECT($master, $sql, $opts, $queryinfo, $args, $subquery, $supported);
56 | }
57 | case "INSERT":
58 | {
59 | $supported = array(
60 | "DBPREFIX" => $this->dbprefix,
61 | "PREINTO" => array("LOW_PRIORITY" => "bool", "DELAYED" => "bool", "HIGH_PRIORITY" => "bool", "IGNORE" => "bool"),
62 | "SELECT" => true,
63 | "BULKINSERT" => true,
64 | "BULKINSERTLIMIT" => 900,
65 | );
66 |
67 | return $this->ProcessINSERT($master, $sql, $opts, $queryinfo, $args, $subquery, $supported);
68 | }
69 | case "UPDATE":
70 | {
71 | $supported = array(
72 | "DBPREFIX" => $this->dbprefix,
73 | "PRETABLE" => array("LOW_PRIORITY" => "bool", "IGNORE" => "bool"),
74 | "WHERE" => array("SUBQUERIES" => true),
75 | "ORDER BY" => true,
76 | "LIMIT" => ", "
77 | );
78 |
79 | return $this->ProcessUPDATE($master, $sql, $opts, $queryinfo, $args, $subquery, $supported);
80 | }
81 | case "DELETE":
82 | {
83 | $supported = array(
84 | "DBPREFIX" => $this->dbprefix,
85 | "PREFROM" => array("LOW_PRIORITY" => "bool", "QUICK" => "bool", "IGNORE" => "bool"),
86 | "WHERE" => array("SUBQUERIES" => true),
87 | "ORDER BY" => true,
88 | "LIMIT" => ", "
89 | );
90 |
91 | return $this->ProcessDELETE($master, $sql, $opts, $queryinfo, $args, $subquery, $supported);
92 | }
93 | case "SET":
94 | {
95 | return array("success" => false, "errorcode" => "skip_sql_query");
96 | }
97 | case "USE":
98 | {
99 | $this->dbprefix = $this->GetDBPrefix($queryinfo);
100 |
101 | return array("success" => false, "errorcode" => "skip_sql_query");
102 | }
103 | case "TRUNCATE TABLE":
104 | {
105 | $supported = array(
106 | "DBPREFIX" => $this->dbprefix,
107 | "PREFROM" => array()
108 | );
109 |
110 | $queryinfo = array($queryinfo[0]);
111 |
112 | return $this->ProcessDELETE($master, $sql, $opts, $queryinfo, $args, $subquery, $supported);
113 | }
114 | }
115 |
116 | return array("success" => false, "error" => CSDB::DB_Translate("Unknown query command '%s'.", $cmd), "errorcode" => "unknown_query_command");
117 | }
118 |
119 | private function GetDBPrefix($str)
120 | {
121 | $str = preg_replace('/\s+/', "_", trim(str_replace("_", " ", $str)));
122 |
123 | return ($str != "" ? $str . "__" : "");
124 | }
125 | }
126 | ?>
--------------------------------------------------------------------------------
/admin/support/content-tools/barebones.css:
--------------------------------------------------------------------------------
1 | /* Global styles. */
2 | .editonly { display: none; }
3 | .ct-toolbox--active .editonly { display: initial; }
4 |
5 | .langlinkwrap { display: inline-block; white-space: nowrap; margin-top: 0.3em; margin-right: 0.5em; border: 1px solid #9ACFEA; border-radius: 3px; padding: 0.2em 0.5em; background-color: #D9EDF7; color: #31708F; font-size: 0.9em; }
6 | #contentwrap .langlinkwrap a.deletelang, .langlinkwrap a.deletelang:hover, .langlinkwrap a.deletelang:visited, .langlinkwrap a.deletelang:link { display: inline-block; margin-left: 0.5em; border-left: 1px solid #9ACFEA; padding-left: 0.5em; color: #A94442; }
7 | #contentwrap .langlinkwrap a.deletelang:hover { color: #BF4D4B; }
8 |
9 | /* Basic ContentTools editor styles. */
10 | [data-editable] iframe, [data-editable] image, [data-editable] [data-ce-tag=img], [data-editable] img, [data-editable] video, [data-editable] div-embed { clear: both; display: block; margin: 1.0em auto; max-width: 100%; }
11 |
12 | [data-editable] div-embed { min-height: 200px; border: 1px dashed #CCCCCC; position: relative; }
13 | [data-editable] div-embed:before { content: attr(aria-label); position: absolute; right: 0.7em; top: 0.7em; color: #FFFFFF; font-size: 0.85em; background-color: #222222; padding: 0.3em 0.5em; border-radius: 3px; border: 3px solid #CCCCCC; z-index: 1000; visibility: hidden; opacity: 0; transition: visibility 0s linear, opacity 0.1s linear; }
14 | [data-editable] div-embed:hover:before { visibility: visible; opacity: 0.9; transition: visibility 0s linear, opacity 0.1s linear; }
15 |
16 | [data-editable] .align-left { clear: initial; float: left; margin-right: 1.0em; }
17 | [data-editable] .align-right { clear: initial; float: right; margin-left: 1.0em; }
18 |
19 | [data-editable] .text-center { text-align: center; }
20 | [data-editable] .text-left { text-align: left; }
21 | [data-editable] .text-right { text-align: right; }
22 |
23 | [data-editable] .ce-element--type-image, [data-editable] .ce-element--type-embed { margin-top: 1.0em; margin-bottom: 1.0em; clear: both; }
24 | [data-editable] .ce-element--type-image.align-left, [data-editable] .ce-element--type-embed.align-left { margin-top: 0.3em; float: left; }
25 | [data-editable] .ce-element--type-image.align-right, [data-editable] .ce-element--type-embed.align-right { margin-top: 0.3em; float: right; }
26 |
27 | [data-editable] .ce-element--type-image { width: 400px; height: 300px; max-width: 100%; max-height: 50vh; background-position: center center; background-color: #333333; background-size: contain; }
28 | [data-editable] .ce-element--type-image::before { display: none; }
29 | [data-editable] .ce-element--type-image::after { box-sizing: border-box; }
30 | [data-editable] .ce-element--type-image.align-left, [data-editable] .ce-element--type-image.align-right { width: 200px !important; height: 150px !important; }
31 |
32 | .ct-insert-file-dialog__upload .barebones_cms_upload { padding: 1em; }
33 | .ct-insert-file-dialog__upload .barebones_cms_upload p:first-child { margin-top: 0; padding: 0; }
34 |
35 | input.barebones_cms_fileuploader { box-sizing: border-box; width: 100%; font-size: 0.9em; padding: 0.3em; border: 1px solid #BBBBBB; }
36 | input.barebones_cms_fileuploader:focus, input.barebones_cms_fileuploader:hover { border: 1px solid #888888; }
37 |
38 | div.ff_fileupload_dialog_background { z-index: 20001; }
39 |
40 | .ct-crop-image-dialog__crop img { display: block; margin-left: auto; margin-right: auto; }
41 | .ct-crop-image-dialog__crop .cropper-container { overflow: hidden; }
42 | .ct-crop-image-dialog__crop .cropper-dashed { border-style: dashed; border-color: #eee; }
43 |
44 | p.ce-element--focused.ce-element--over { background-color: rgba(243, 156, 18, .15); }
45 | p.ce-element--over { background-color: rgba(243, 156, 18, .05); }
46 |
47 | html.ct-inspector--active #contentwrap .propmainwrap { padding-bottom: 20vh; }
48 |
49 | .ct-widget .ct-ignition__button--barebones-cms-home { background: #29b9b4; }
50 | .ct-widget.ct-ignition .ct-ignition__button.ct-ignition__button--barebones-cms-home { display: inline-block; }
51 | .ct-widget .ct-ignition__button--barebones-cms-home:hover { background: #2ecec8; }
52 | .ct-widget .ct-ignition__button--barebones-cms-home::before { font-family: 'icon-barebones'; content: "\e902"; }
53 |
54 | .ct-widget.ct-ignition { left: auto; right: 32px; }
55 | .ct-toolbox--active .ct-widget.ct-ignition { right: 170px; }
56 |
57 | @media (max-width: 820px) {
58 | .ct-toolbox--active .ct-widget.ct-ignition { right: 88px; }
59 | }
60 |
--------------------------------------------------------------------------------
/sdks/php/support/request.php:
--------------------------------------------------------------------------------
1 | $val)
12 | {
13 | if (is_string($val)) $_REQUEST[$key] = trim($val);
14 | else if (is_array($val))
15 | {
16 | $_REQUEST[$key] = array();
17 | foreach ($val as $key2 => $val2) $_REQUEST[$key][$key2] = (is_string($val2) ? trim($val2) : $val2);
18 | }
19 | else $_REQUEST[$key] = $val;
20 | }
21 | }
22 |
23 | // Cleans up all PHP input issues so that $_REQUEST may be used as expected.
24 | public static function Normalize()
25 | {
26 | self::ProcessSingleInput($_COOKIE);
27 | self::ProcessSingleInput($_GET);
28 | self::ProcessSingleInput($_POST);
29 | }
30 |
31 | public static function IsSSL()
32 | {
33 | return ((isset($_SERVER["HTTPS"]) && ($_SERVER["HTTPS"] == "on" || $_SERVER["HTTPS"] == "1")) || (isset($_SERVER["SERVER_PORT"]) && $_SERVER["SERVER_PORT"] == "443") || (isset($_SERVER["REQUEST_URI"]) && str_replace("\\", "/", strtolower(substr($_SERVER["REQUEST_URI"], 0, 8))) == "https://"));
34 | }
35 |
36 | // Returns 'http[s]://www.something.com[:port]' based on the current page request.
37 | public static function GetHost($protocol = "")
38 | {
39 | $protocol = strtolower($protocol);
40 | $ssl = ($protocol == "https" || ($protocol == "" && self::IsSSL()));
41 | if ($protocol == "") $type = "def";
42 | else if ($ssl) $type = "https";
43 | else $type = "http";
44 |
45 | if (!isset(self::$hostcache)) self::$hostcache = array();
46 | if (isset(self::$hostcache[$type])) return self::$hostcache[$type];
47 |
48 | $url = "http" . ($ssl ? "s" : "") . "://";
49 |
50 | $str = (isset($_SERVER["REQUEST_URI"]) ? str_replace("\\", "/", $_SERVER["REQUEST_URI"]) : "/");
51 | $pos = strpos($str, "?");
52 | if ($pos !== false) $str = substr($str, 0, $pos);
53 | $str2 = strtolower($str);
54 | if (substr($str2, 0, 7) == "http://")
55 | {
56 | $pos = strpos($str, "/", 7);
57 | if ($pos === false) $str = "";
58 | else $str = substr($str, 7, $pos);
59 | }
60 | else if (substr($str2, 0, 8) == "https://")
61 | {
62 | $pos = strpos($str, "/", 8);
63 | if ($pos === false) $str = "";
64 | else $str = substr($str, 8, $pos);
65 | }
66 | else $str = "";
67 |
68 | if ($str != "") $host = $str;
69 | else if (isset($_SERVER["HTTP_HOST"])) $host = $_SERVER["HTTP_HOST"];
70 | else $host = $_SERVER["SERVER_NAME"] . ":" . (int)$_SERVER["SERVER_PORT"];
71 |
72 | $pos = strpos($host, ":");
73 | if ($pos === false) $port = 0;
74 | else
75 | {
76 | $port = (int)substr($host, $pos + 1);
77 | $host = substr($host, 0, $pos);
78 | }
79 | if ($port < 1 || $port > 65535) $port = ($ssl ? 443 : 80);
80 | $url .= preg_replace('/[^a-z0-9.\-]/', "", strtolower($host));
81 | if ($protocol == "" && ((!$ssl && $port != 80) || ($ssl && $port != 443))) $url .= ":" . $port;
82 | else if ($protocol == "http" && !$ssl && $port != 80) $url .= ":" . $port;
83 | else if ($protocol == "https" && $ssl && $port != 443) $url .= ":" . $port;
84 |
85 | self::$hostcache[$type] = $url;
86 |
87 | return $url;
88 | }
89 |
90 | public static function GetURLBase()
91 | {
92 | $str = (isset($_SERVER["REQUEST_URI"]) ? str_replace("\\", "/", $_SERVER["REQUEST_URI"]) : "/");
93 | $pos = strpos($str, "?");
94 | if ($pos !== false) $str = substr($str, 0, $pos);
95 | if (strncasecmp($str, "http://", 7) == 0 || strncasecmp($str, "https://", 8) == 0)
96 | {
97 | $pos = strpos($str, "/", 8);
98 | if ($pos === false) $str = "/";
99 | else $str = substr($str, $pos);
100 | }
101 |
102 | return $str;
103 | }
104 |
105 | public static function GetFullURLBase($protocol = "")
106 | {
107 | return self::GetHost($protocol) . self::GetURLBase();
108 | }
109 |
110 | public static function PrependHost($url, $protocol = "")
111 | {
112 | // Handle protocol-only.
113 | if (strncmp($url, "//", 2) == 0)
114 | {
115 | $host = self::GetHost($protocol);
116 | $pos = strpos($host, ":");
117 | if ($pos === false) return $url;
118 |
119 | return substr($host, 0, $pos + 1) . $url;
120 | }
121 |
122 | if (strpos($url, ":") !== false) return $url;
123 |
124 | // Handle relative paths.
125 | if ($url === "" || $url[0] !== "/") return rtrim(self::GetFullURLBase($protocol), "/") . "/" . $url;
126 |
127 | // Handle absolute paths.
128 | $host = self::GetHost($protocol);
129 |
130 | return $host . $url;
131 | }
132 | }
133 | ?>
--------------------------------------------------------------------------------
/admin/support/crc32_stream.php:
--------------------------------------------------------------------------------
1 | 0x04C11DB7, "start" => 0xFFFFFFFF, "xor" => 0xFFFFFFFF, "refdata" => 1, "refcrc" => 1);
14 |
15 | public function __construct()
16 | {
17 | $this->open = false;
18 | }
19 |
20 | public function Init($options = false)
21 | {
22 | if ($options === false && function_exists("hash_init")) $this->hash = hash_init("crc32b");
23 | else
24 | {
25 | if ($options === false) $options = self::$default;
26 |
27 | $this->hash = false;
28 | $this->crctable = array();
29 | $poly = $this->LIM32($options["poly"]);
30 | for ($x = 0; $x < 256; $x++)
31 | {
32 | $c = $this->SHL32($x, 24);
33 | for ($y = 0; $y < 8; $y++) $c = $this->SHL32($c, 1) ^ ($c & 0x80000000 ? $poly : 0);
34 | $this->crctable[$x] = $c;
35 | }
36 |
37 | $this->datareflect = $options["refdata"];
38 | $this->crcreflect = $options["refcrc"];
39 | $this->firstcrc = $options["start"];
40 | $this->currcrc = $options["start"];
41 | $this->finalxor = $options["xor"];
42 | }
43 |
44 | $this->open = true;
45 | }
46 |
47 | public function AddData($data)
48 | {
49 | if (!$this->open) return false;
50 |
51 | if ($this->hash !== false) hash_update($this->hash, $data);
52 | else
53 | {
54 | $y = strlen($data);
55 |
56 | for ($x = 0; $x < $y; $x++)
57 | {
58 | if ($this->datareflect) $this->currcrc = $this->SHL32($this->currcrc, 8) ^ $this->crctable[$this->SHR32($this->currcrc, 24) ^ self::$revlookup[ord($data[$x])]];
59 | else $this->currcrc = $this->SHL32($this->currcrc, 8) ^ $this->crctable[$this->SHR32($this->currcrc, 24) ^ ord($data[$x])];
60 | }
61 | }
62 |
63 | return true;
64 | }
65 |
66 | public function Finalize()
67 | {
68 | if (!$this->open) return false;
69 |
70 | if ($this->hash !== false)
71 | {
72 | $result = hexdec(hash_final($this->hash));
73 |
74 | $this->hash = hash_init("crc32b");
75 | }
76 | else
77 | {
78 | if ($this->crcreflect)
79 | {
80 | $tempcrc = $this->currcrc;
81 | $this->currcrc = self::$revlookup[$this->SHR32($tempcrc, 24)] | $this->SHL32(self::$revlookup[$this->SHR32($tempcrc, 16) & 0xFF], 8) | $this->SHL32(self::$revlookup[$this->SHR32($tempcrc, 8) & 0xFF], 16) | $this->SHL32(self::$revlookup[$this->LIM32($tempcrc & 0xFF)], 24);
82 | }
83 | $result = $this->currcrc ^ $this->finalxor;
84 |
85 | $this->currcrc = $this->firstcrc;
86 | }
87 |
88 | return $result;
89 | }
90 |
91 | // These functions are a hacky, but effective way of enforcing unsigned 32-bit integers onto a generic signed int.
92 | // Allow bitwise operations to work across platforms. Minimum integer size must be 32-bit.
93 | private function SHR32($num, $bits)
94 | {
95 | $num = (int)$num;
96 | if ($bits < 0) $bits = 0;
97 |
98 | if ($num < 0 && $bits)
99 | {
100 | $num = ($num >> 1) & 0x7FFFFFFF;
101 | $bits--;
102 | }
103 |
104 | return $this->LIM32($num >> $bits);
105 | }
106 |
107 | private function SHL32($num, $bits)
108 | {
109 | if ($bits < 0) $bits = 0;
110 |
111 | return $this->LIM32((int)$num << $bits);
112 | }
113 |
114 | private function LIM32($num)
115 | {
116 | return (int)((int)$num & 0xFFFFFFFF);
117 | }
118 | }
119 | ?>
--------------------------------------------------------------------------------
/sdks/php/support/crc32_stream.php:
--------------------------------------------------------------------------------
1 | 0x04C11DB7, "start" => 0xFFFFFFFF, "xor" => 0xFFFFFFFF, "refdata" => 1, "refcrc" => 1);
14 |
15 | public function __construct()
16 | {
17 | $this->open = false;
18 | }
19 |
20 | public function Init($options = false)
21 | {
22 | if ($options === false && function_exists("hash_init")) $this->hash = hash_init("crc32b");
23 | else
24 | {
25 | if ($options === false) $options = self::$default;
26 |
27 | $this->hash = false;
28 | $this->crctable = array();
29 | $poly = $this->LIM32($options["poly"]);
30 | for ($x = 0; $x < 256; $x++)
31 | {
32 | $c = $this->SHL32($x, 24);
33 | for ($y = 0; $y < 8; $y++) $c = $this->SHL32($c, 1) ^ ($c & 0x80000000 ? $poly : 0);
34 | $this->crctable[$x] = $c;
35 | }
36 |
37 | $this->datareflect = $options["refdata"];
38 | $this->crcreflect = $options["refcrc"];
39 | $this->firstcrc = $options["start"];
40 | $this->currcrc = $options["start"];
41 | $this->finalxor = $options["xor"];
42 | }
43 |
44 | $this->open = true;
45 | }
46 |
47 | public function AddData($data)
48 | {
49 | if (!$this->open) return false;
50 |
51 | if ($this->hash !== false) hash_update($this->hash, $data);
52 | else
53 | {
54 | $y = strlen($data);
55 |
56 | for ($x = 0; $x < $y; $x++)
57 | {
58 | if ($this->datareflect) $this->currcrc = $this->SHL32($this->currcrc, 8) ^ $this->crctable[$this->SHR32($this->currcrc, 24) ^ self::$revlookup[ord($data[$x])]];
59 | else $this->currcrc = $this->SHL32($this->currcrc, 8) ^ $this->crctable[$this->SHR32($this->currcrc, 24) ^ ord($data[$x])];
60 | }
61 | }
62 |
63 | return true;
64 | }
65 |
66 | public function Finalize()
67 | {
68 | if (!$this->open) return false;
69 |
70 | if ($this->hash !== false)
71 | {
72 | $result = hexdec(hash_final($this->hash));
73 |
74 | $this->hash = hash_init("crc32b");
75 | }
76 | else
77 | {
78 | if ($this->crcreflect)
79 | {
80 | $tempcrc = $this->currcrc;
81 | $this->currcrc = self::$revlookup[$this->SHR32($tempcrc, 24)] | $this->SHL32(self::$revlookup[$this->SHR32($tempcrc, 16) & 0xFF], 8) | $this->SHL32(self::$revlookup[$this->SHR32($tempcrc, 8) & 0xFF], 16) | $this->SHL32(self::$revlookup[$this->LIM32($tempcrc & 0xFF)], 24);
82 | }
83 | $result = $this->currcrc ^ $this->finalxor;
84 |
85 | $this->currcrc = $this->firstcrc;
86 | }
87 |
88 | return $result;
89 | }
90 |
91 | // These functions are a hacky, but effective way of enforcing unsigned 32-bit integers onto a generic signed int.
92 | // Allow bitwise operations to work across platforms. Minimum integer size must be 32-bit.
93 | private function SHR32($num, $bits)
94 | {
95 | $num = (int)$num;
96 | if ($bits < 0) $bits = 0;
97 |
98 | if ($num < 0 && $bits)
99 | {
100 | $num = ($num >> 1) & 0x7FFFFFFF;
101 | $bits--;
102 | }
103 |
104 | return $this->LIM32($num >> $bits);
105 | }
106 |
107 | private function SHL32($num, $bits)
108 | {
109 | if ($bits < 0) $bits = 0;
110 |
111 | return $this->LIM32((int)$num << $bits);
112 | }
113 |
114 | private function LIM32($num)
115 | {
116 | return (int)((int)$num & 0xFFFFFFFF);
117 | }
118 | }
119 | ?>
--------------------------------------------------------------------------------
/api/support/flex_forms.css:
--------------------------------------------------------------------------------
1 | .ff_formwrap .ff_formwrapinner .formitem {
2 | margin-top: 1.0em;
3 | }
4 |
5 | .ff_formwrap .ff_formwrapinner .formitemtitle {
6 | color: #222222;
7 | margin-bottom: 0.2em;
8 | font-weight: bold;
9 | }
10 |
11 | .ff_formwrap .ff_formwrapinner .formfields > hr {
12 | border: 0 none;
13 | border-top: 1px dashed #BBBBBB;
14 | }
15 |
16 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata input, .ff_formwrap .ff_formwrapinner .formitem .formitemdata textarea, .ff_formwrap .ff_formwrapinner .formitem .formitemdata select {
17 | outline: none;
18 | }
19 |
20 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata input.text {
21 | box-sizing: border-box;
22 | width: 100%;
23 | font-size: 0.9em;
24 | padding: 0.3em;
25 | border: 1px solid #BBBBBB;
26 | }
27 |
28 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata input.text:focus {
29 | border: 1px solid #888888;
30 | }
31 |
32 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata input.text:hover {
33 | border: 1px solid #888888;
34 | }
35 |
36 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata textarea {
37 | box-sizing: border-box;
38 | width: 100%;
39 | font-size: 0.9em;
40 | padding: 0.3em;
41 | border: 1px solid #BBBBBB;
42 | resize: vertical;
43 | }
44 |
45 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata textarea:focus {
46 | border: 1px solid #888888;
47 | }
48 |
49 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata textarea:hover {
50 | border: 1px solid #888888;
51 | }
52 |
53 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata .radioitemwrap {
54 | margin-left: 1.7em;
55 | text-indent: -1.7em;
56 | margin-bottom: 0.3em;
57 | }
58 |
59 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata .checkboxitemwrap {
60 | margin-left: 1.7em;
61 | text-indent: -1.7em;
62 | margin-bottom: 0.3em;
63 | }
64 |
65 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata select {
66 | box-sizing: border-box;
67 | width: 100%;
68 | font-size: 0.9em;
69 | border: 1px solid #BBBBBB;
70 | }
71 |
72 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata select:focus {
73 | border: 1px solid #888888;
74 | }
75 |
76 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata select:hover {
77 | border: 1px solid #888888;
78 | }
79 |
80 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata .staticwrap {
81 | margin-left: 0.5em;
82 | }
83 |
84 | .ff_formwrap .ff_formwrapinner .formitem .formitemdesc {
85 | color: #333333;
86 | margin-bottom: 0.2em;
87 | margin-left: 0.5em;
88 | font-size: 0.9em;
89 | }
90 |
91 | .ff_formwrap .ff_formwrapinner .formitem .formitemresult {
92 | margin-left: 0.5em;
93 | }
94 |
95 | .ff_formwrap .ff_formwrapinner .formitem .formitemresult .formitemerror {
96 | background: url('flex_forms_error.png') 0 0.1em no-repeat;
97 | padding-left: 25px;
98 | color: #A94442;
99 | font-weight: bold;
100 | }
101 |
102 | .ff_formwrap .ff_formwrapinner .fieldtablewrap > table.rowwrap {
103 | border-collapse: collapse;
104 | }
105 |
106 | .ff_formwrap .ff_formwrapinner .fieldtablewrap > table.rowwrap > tbody > tr > td {
107 | padding-right: 1.0em;
108 | vertical-align: top;
109 | }
110 |
111 | .ff_formwrap .ff_formwrapinner .fieldtablewrap .formitemtitle {
112 | white-space: nowrap;
113 | }
114 |
115 | .ff_formwrap .ff_formwrapinner .nowrap {
116 | white-space: nowrap;
117 | }
118 |
119 | .ff_formwrap .ff_formwrapinner .formsubmit {
120 | margin-top: 1.2em;
121 | }
122 |
123 | .ff_formwrap .ff_formwrapinner .formsubmit input {
124 | padding: 0.2em 0.5em;
125 | font-weight: bold;
126 | font-size: 1.0em;
127 | color: #1F1F1F;
128 | outline: none;
129 | }
130 |
131 | .ff_formmessagewrap .ff_formmessagewrapinner .message {
132 | border: 1px solid transparent;
133 | border-radius: 4px;
134 | margin-top: 1.0em;
135 | padding: 0.5em 0.7em;
136 | }
137 |
138 | .ff_formmessagewrap .ff_formmessagewrapinner .messagesuccess {
139 | border-color: #B2DBA1;
140 | background-color: #DFF0D8;
141 | background-image: linear-gradient(to bottom, #DFF0D8 0px, #C8E5BC 100%);
142 | background-repeat: repeat-x;
143 | color: #3C763D;
144 | }
145 |
146 | .ff_formmessagewrap .ff_formmessagewrapinner .messagewarning {
147 | border-color: #F5E79E;
148 | background-color: #FCF8E3;
149 | background-image: linear-gradient(to bottom, #FCF8E3 0px, #F8EFC0 100%);
150 | background-repeat: repeat-x;
151 | color: #8A6D3B;
152 | }
153 |
154 | .ff_formmessagewrap .ff_formmessagewrapinner .messageerror {
155 | border-color: #DCA7A7;
156 | background-color: #F2DEDE;
157 | background-image: linear-gradient(to bottom, #F2DEDE 0px, #E7C3C3 100%);
158 | background-repeat: repeat-x;
159 | color: #A94442;
160 | }
161 |
162 | .ff_formmessagewrap .ff_formmessagewrapinner .messageinfo {
163 | border-color: #9ACFEA;
164 | background-color: #D9EDF7;
165 | background-image: linear-gradient(to bottom, #D9EDF7 0px, #B9DEF0 100%);
166 | background-repeat: repeat-x;
167 | color: #31708F;
168 | }
169 |
--------------------------------------------------------------------------------
/admin/support/flex_forms.css:
--------------------------------------------------------------------------------
1 | .ff_formwrap .ff_formwrapinner .formitem {
2 | margin-top: 1.0em;
3 | }
4 |
5 | .ff_formwrap .ff_formwrapinner .formitemtitle {
6 | color: #222222;
7 | margin-bottom: 0.2em;
8 | font-weight: bold;
9 | }
10 |
11 | .ff_formwrap .ff_formwrapinner .formfields > hr {
12 | border: 0 none;
13 | border-top: 1px dashed #BBBBBB;
14 | }
15 |
16 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata input, .ff_formwrap .ff_formwrapinner .formitem .formitemdata textarea, .ff_formwrap .ff_formwrapinner .formitem .formitemdata select {
17 | outline: none;
18 | }
19 |
20 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata input.text {
21 | box-sizing: border-box;
22 | width: 100%;
23 | font-size: 0.9em;
24 | padding: 0.3em;
25 | border: 1px solid #BBBBBB;
26 | }
27 |
28 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata input.text:focus {
29 | border: 1px solid #888888;
30 | }
31 |
32 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata input.text:hover {
33 | border: 1px solid #888888;
34 | }
35 |
36 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata textarea {
37 | box-sizing: border-box;
38 | width: 100%;
39 | font-size: 0.9em;
40 | padding: 0.3em;
41 | border: 1px solid #BBBBBB;
42 | resize: vertical;
43 | }
44 |
45 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata textarea:focus {
46 | border: 1px solid #888888;
47 | }
48 |
49 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata textarea:hover {
50 | border: 1px solid #888888;
51 | }
52 |
53 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata .radioitemwrap {
54 | margin-left: 1.7em;
55 | text-indent: -1.7em;
56 | margin-bottom: 0.3em;
57 | }
58 |
59 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata .checkboxitemwrap {
60 | margin-left: 1.7em;
61 | text-indent: -1.7em;
62 | margin-bottom: 0.3em;
63 | }
64 |
65 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata select {
66 | box-sizing: border-box;
67 | width: 100%;
68 | font-size: 0.9em;
69 | border: 1px solid #BBBBBB;
70 | }
71 |
72 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata select:focus {
73 | border: 1px solid #888888;
74 | }
75 |
76 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata select:hover {
77 | border: 1px solid #888888;
78 | }
79 |
80 | .ff_formwrap .ff_formwrapinner .formitem .formitemdata .staticwrap {
81 | margin-left: 0.5em;
82 | }
83 |
84 | .ff_formwrap .ff_formwrapinner .formitem .formitemdesc {
85 | color: #333333;
86 | margin-bottom: 0.2em;
87 | margin-left: 0.5em;
88 | font-size: 0.9em;
89 | }
90 |
91 | .ff_formwrap .ff_formwrapinner .formitem .formitemresult {
92 | margin-left: 0.5em;
93 | }
94 |
95 | .ff_formwrap .ff_formwrapinner .formitem .formitemresult .formitemerror {
96 | background: url('flex_forms_error.png') 0 0.1em no-repeat;
97 | padding-left: 25px;
98 | color: #A94442;
99 | font-weight: bold;
100 | }
101 |
102 | .ff_formwrap .ff_formwrapinner .fieldtablewrap > table.rowwrap {
103 | border-collapse: collapse;
104 | }
105 |
106 | .ff_formwrap .ff_formwrapinner .fieldtablewrap > table.rowwrap > tbody > tr > td {
107 | padding-right: 1.0em;
108 | vertical-align: top;
109 | }
110 |
111 | .ff_formwrap .ff_formwrapinner .fieldtablewrap .formitemtitle {
112 | white-space: nowrap;
113 | }
114 |
115 | .ff_formwrap .ff_formwrapinner .nowrap {
116 | white-space: nowrap;
117 | }
118 |
119 | .ff_formwrap .ff_formwrapinner .formsubmit {
120 | margin-top: 1.2em;
121 | }
122 |
123 | .ff_formwrap .ff_formwrapinner .formsubmit input {
124 | padding: 0.2em 0.5em;
125 | font-weight: bold;
126 | font-size: 1.0em;
127 | color: #1F1F1F;
128 | outline: none;
129 | }
130 |
131 | .ff_formmessagewrap .ff_formmessagewrapinner .message {
132 | border: 1px solid transparent;
133 | border-radius: 4px;
134 | margin-top: 1.0em;
135 | padding: 0.5em 0.7em;
136 | }
137 |
138 | .ff_formmessagewrap .ff_formmessagewrapinner .messagesuccess {
139 | border-color: #B2DBA1;
140 | background-color: #DFF0D8;
141 | background-image: linear-gradient(to bottom, #DFF0D8 0px, #C8E5BC 100%);
142 | background-repeat: repeat-x;
143 | color: #3C763D;
144 | }
145 |
146 | .ff_formmessagewrap .ff_formmessagewrapinner .messagewarning {
147 | border-color: #F5E79E;
148 | background-color: #FCF8E3;
149 | background-image: linear-gradient(to bottom, #FCF8E3 0px, #F8EFC0 100%);
150 | background-repeat: repeat-x;
151 | color: #8A6D3B;
152 | }
153 |
154 | .ff_formmessagewrap .ff_formmessagewrapinner .messageerror {
155 | border-color: #DCA7A7;
156 | background-color: #F2DEDE;
157 | background-image: linear-gradient(to bottom, #F2DEDE 0px, #E7C3C3 100%);
158 | background-repeat: repeat-x;
159 | color: #A94442;
160 | }
161 |
162 | .ff_formmessagewrap .ff_formmessagewrapinner .messageinfo {
163 | border-color: #9ACFEA;
164 | background-color: #D9EDF7;
165 | background-image: linear-gradient(to bottom, #D9EDF7 0px, #B9DEF0 100%);
166 | background-repeat: repeat-x;
167 | color: #31708F;
168 | }
169 |
--------------------------------------------------------------------------------
/admin/support/str_basics.php:
--------------------------------------------------------------------------------
1 | $val)
10 | {
11 | if (is_string($val)) $_REQUEST[$key] = trim($val);
12 | else if (is_array($val))
13 | {
14 | $_REQUEST[$key] = array();
15 | foreach ($val as $key2 => $val2) $_REQUEST[$key][$key2] = (is_string($val2) ? trim($val2) : $val2);
16 | }
17 | else $_REQUEST[$key] = $val;
18 | }
19 | }
20 |
21 | // Cleans up all PHP input issues so that $_REQUEST may be used as expected.
22 | public static function ProcessAllInput()
23 | {
24 | self::ProcessSingleInput($_COOKIE);
25 | self::ProcessSingleInput($_GET);
26 | self::ProcessSingleInput($_POST);
27 | }
28 |
29 | public static function ExtractPathname($dirfile)
30 | {
31 | $dirfile = str_replace("\\", "/", $dirfile);
32 | $pos = strrpos($dirfile, "/");
33 | if ($pos === false) $dirfile = "";
34 | else $dirfile = substr($dirfile, 0, $pos + 1);
35 |
36 | return $dirfile;
37 | }
38 |
39 | public static function ExtractFilename($dirfile)
40 | {
41 | $dirfile = str_replace("\\", "/", $dirfile);
42 | $pos = strrpos($dirfile, "/");
43 | if ($pos !== false) $dirfile = substr($dirfile, $pos + 1);
44 |
45 | return $dirfile;
46 | }
47 |
48 | public static function ExtractFileExtension($dirfile)
49 | {
50 | $dirfile = self::ExtractFilename($dirfile);
51 | $pos = strrpos($dirfile, ".");
52 | if ($pos !== false) $dirfile = substr($dirfile, $pos + 1);
53 | else $dirfile = "";
54 |
55 | return $dirfile;
56 | }
57 |
58 | public static function ExtractFilenameNoExtension($dirfile)
59 | {
60 | $dirfile = self::ExtractFilename($dirfile);
61 | $pos = strrpos($dirfile, ".");
62 | if ($pos !== false) $dirfile = substr($dirfile, 0, $pos);
63 |
64 | return $dirfile;
65 | }
66 |
67 | // Makes an input filename safe for use.
68 | // Allows a very limited number of characters through.
69 | public static function FilenameSafe($filename)
70 | {
71 | return preg_replace('/\s+/', "-", trim(trim(preg_replace('/[^A-Za-z0-9_.\-]/', " ", $filename), ".")));
72 | }
73 |
74 | public static function ReplaceNewlines($replacewith, $data)
75 | {
76 | $data = str_replace("\r\n", "\n", $data);
77 | $data = str_replace("\r", "\n", $data);
78 | $data = str_replace("\n", $replacewith, $data);
79 |
80 | return $data;
81 | }
82 |
83 | public static function LineInput($data, &$pos)
84 | {
85 | $CR = ord("\r");
86 | $LF = ord("\n");
87 |
88 | $result = "";
89 | $y = strlen($data);
90 | if ($pos > $y) $pos = $y;
91 | while ($pos < $y && ord($data[$pos]) != $CR && ord($data[$pos]) != $LF)
92 | {
93 | $result .= $data[$pos];
94 | $pos++;
95 | }
96 | if ($pos + 1 < $y && ord($data[$pos]) == $CR && ord($data[$pos + 1]) == $LF) $pos++;
97 | if ($pos < $y) $pos++;
98 |
99 | return $result;
100 | }
101 |
102 | // Constant-time string comparison. Ported from CubicleSoft C++ code.
103 | public static function CTstrcmp($secret, $userinput)
104 | {
105 | $sx = 0;
106 | $sy = strlen($secret);
107 | $uy = strlen($userinput);
108 | $result = $sy - $uy;
109 | for ($ux = 0; $ux < $uy; $ux++)
110 | {
111 | $result |= ord($userinput[$ux]) ^ ord($secret[$sx]);
112 | $sx = ($sx + 1) % $sy;
113 | }
114 |
115 | return $result;
116 | }
117 |
118 | public static function ConvertUserStrToBytes($str)
119 | {
120 | $str = trim($str);
121 | $num = (double)$str;
122 | if (strtoupper(substr($str, -1)) == "B") $str = substr($str, 0, -1);
123 | switch (strtoupper(substr($str, -1)))
124 | {
125 | case "P": $num *= 1024;
126 | case "T": $num *= 1024;
127 | case "G": $num *= 1024;
128 | case "M": $num *= 1024;
129 | case "K": $num *= 1024;
130 | }
131 |
132 | return $num;
133 | }
134 |
135 | public static function ConvertBytesToUserStr($num)
136 | {
137 | $num = (double)$num;
138 |
139 | if ($num < 0) return "0 B";
140 | if ($num < 1024) return number_format($num, 0) . " B";
141 | if ($num < 1048576) return str_replace(".0 ", "", number_format($num / 1024, 1)) . " KB";
142 | if ($num < 1073741824) return str_replace(".0 ", "", number_format($num / 1048576, 1)) . " MB";
143 | if ($num < 1099511627776.0) return str_replace(".0 ", "", number_format($num / 1073741824.0, 1)) . " GB";
144 | if ($num < 1125899906842624.0) return str_replace(".0 ", "", number_format($num / 1099511627776.0, 1)) . " TB";
145 |
146 | return str_replace(".0 ", "", number_format($num / 1125899906842624.0, 1)) . " PB";
147 | }
148 |
149 | public static function JSSafe($data)
150 | {
151 | return str_replace(array("'", "\r", "\n"), array("\\'", "\\r", "\\n"), $data);
152 | }
153 | }
154 | ?>
--------------------------------------------------------------------------------
/api/support/str_basics.php:
--------------------------------------------------------------------------------
1 | $val)
10 | {
11 | if (is_string($val)) $_REQUEST[$key] = trim($val);
12 | else if (is_array($val))
13 | {
14 | $_REQUEST[$key] = array();
15 | foreach ($val as $key2 => $val2) $_REQUEST[$key][$key2] = (is_string($val2) ? trim($val2) : $val2);
16 | }
17 | else $_REQUEST[$key] = $val;
18 | }
19 | }
20 |
21 | // Cleans up all PHP input issues so that $_REQUEST may be used as expected.
22 | public static function ProcessAllInput()
23 | {
24 | self::ProcessSingleInput($_COOKIE);
25 | self::ProcessSingleInput($_GET);
26 | self::ProcessSingleInput($_POST);
27 | }
28 |
29 | public static function ExtractPathname($dirfile)
30 | {
31 | $dirfile = str_replace("\\", "/", $dirfile);
32 | $pos = strrpos($dirfile, "/");
33 | if ($pos === false) $dirfile = "";
34 | else $dirfile = substr($dirfile, 0, $pos + 1);
35 |
36 | return $dirfile;
37 | }
38 |
39 | public static function ExtractFilename($dirfile)
40 | {
41 | $dirfile = str_replace("\\", "/", $dirfile);
42 | $pos = strrpos($dirfile, "/");
43 | if ($pos !== false) $dirfile = substr($dirfile, $pos + 1);
44 |
45 | return $dirfile;
46 | }
47 |
48 | public static function ExtractFileExtension($dirfile)
49 | {
50 | $dirfile = self::ExtractFilename($dirfile);
51 | $pos = strrpos($dirfile, ".");
52 | if ($pos !== false) $dirfile = substr($dirfile, $pos + 1);
53 | else $dirfile = "";
54 |
55 | return $dirfile;
56 | }
57 |
58 | public static function ExtractFilenameNoExtension($dirfile)
59 | {
60 | $dirfile = self::ExtractFilename($dirfile);
61 | $pos = strrpos($dirfile, ".");
62 | if ($pos !== false) $dirfile = substr($dirfile, 0, $pos);
63 |
64 | return $dirfile;
65 | }
66 |
67 | // Makes an input filename safe for use.
68 | // Allows a very limited number of characters through.
69 | public static function FilenameSafe($filename)
70 | {
71 | return preg_replace('/\s+/', "-", trim(trim(preg_replace('/[^A-Za-z0-9_.\-]/', " ", $filename), ".")));
72 | }
73 |
74 | public static function ReplaceNewlines($replacewith, $data)
75 | {
76 | $data = str_replace("\r\n", "\n", $data);
77 | $data = str_replace("\r", "\n", $data);
78 | $data = str_replace("\n", $replacewith, $data);
79 |
80 | return $data;
81 | }
82 |
83 | public static function LineInput($data, &$pos)
84 | {
85 | $CR = ord("\r");
86 | $LF = ord("\n");
87 |
88 | $result = "";
89 | $y = strlen($data);
90 | if ($pos > $y) $pos = $y;
91 | while ($pos < $y && ord($data[$pos]) != $CR && ord($data[$pos]) != $LF)
92 | {
93 | $result .= $data[$pos];
94 | $pos++;
95 | }
96 | if ($pos + 1 < $y && ord($data[$pos]) == $CR && ord($data[$pos + 1]) == $LF) $pos++;
97 | if ($pos < $y) $pos++;
98 |
99 | return $result;
100 | }
101 |
102 | // Constant-time string comparison. Ported from CubicleSoft C++ code.
103 | public static function CTstrcmp($secret, $userinput)
104 | {
105 | $sx = 0;
106 | $sy = strlen($secret);
107 | $uy = strlen($userinput);
108 | $result = $sy - $uy;
109 | for ($ux = 0; $ux < $uy; $ux++)
110 | {
111 | $result |= ord($userinput[$ux]) ^ ord($secret[$sx]);
112 | $sx = ($sx + 1) % $sy;
113 | }
114 |
115 | return $result;
116 | }
117 |
118 | public static function ConvertUserStrToBytes($str)
119 | {
120 | $str = trim($str);
121 | $num = (double)$str;
122 | if (strtoupper(substr($str, -1)) == "B") $str = substr($str, 0, -1);
123 | switch (strtoupper(substr($str, -1)))
124 | {
125 | case "P": $num *= 1024;
126 | case "T": $num *= 1024;
127 | case "G": $num *= 1024;
128 | case "M": $num *= 1024;
129 | case "K": $num *= 1024;
130 | }
131 |
132 | return $num;
133 | }
134 |
135 | public static function ConvertBytesToUserStr($num)
136 | {
137 | $num = (double)$num;
138 |
139 | if ($num < 0) return "0 B";
140 | if ($num < 1024) return number_format($num, 0) . " B";
141 | if ($num < 1048576) return str_replace(".0 ", "", number_format($num / 1024, 1)) . " KB";
142 | if ($num < 1073741824) return str_replace(".0 ", "", number_format($num / 1048576, 1)) . " MB";
143 | if ($num < 1099511627776.0) return str_replace(".0 ", "", number_format($num / 1073741824.0, 1)) . " GB";
144 | if ($num < 1125899906842624.0) return str_replace(".0 ", "", number_format($num / 1099511627776.0, 1)) . " TB";
145 |
146 | return str_replace(".0 ", "", number_format($num / 1125899906842624.0, 1)) . " PB";
147 | }
148 |
149 | public static function JSSafe($data)
150 | {
151 | return str_replace(array("'", "\r", "\n"), array("\\'", "\\r", "\\n"), $data);
152 | }
153 | }
154 | ?>
--------------------------------------------------------------------------------
/admin/support/fancy-file-uploader/cors/jquery.postmessage-transport.js:
--------------------------------------------------------------------------------
1 | /*
2 | * jQuery postMessage Transport Plugin
3 | * https://github.com/blueimp/jQuery-File-Upload
4 | *
5 | * Copyright 2011, Sebastian Tschan
6 | * https://blueimp.net
7 | *
8 | * Licensed under the MIT license:
9 | * https://opensource.org/licenses/MIT
10 | */
11 |
12 | /* global define, require, window, document */
13 |
14 | ;(function (factory) {
15 | 'use strict';
16 | if (typeof define === 'function' && define.amd) {
17 | // Register as an anonymous AMD module:
18 | define(['jquery'], factory);
19 | } else if (typeof exports === 'object') {
20 | // Node/CommonJS:
21 | factory(require('jquery'));
22 | } else {
23 | // Browser globals:
24 | factory(window.jQuery);
25 | }
26 | }(function ($) {
27 | 'use strict';
28 |
29 | var counter = 0,
30 | names = [
31 | 'accepts',
32 | 'cache',
33 | 'contents',
34 | 'contentType',
35 | 'crossDomain',
36 | 'data',
37 | 'dataType',
38 | 'headers',
39 | 'ifModified',
40 | 'mimeType',
41 | 'password',
42 | 'processData',
43 | 'timeout',
44 | 'traditional',
45 | 'type',
46 | 'url',
47 | 'username'
48 | ],
49 | convert = function (p) {
50 | return p;
51 | };
52 |
53 | $.ajaxSetup({
54 | converters: {
55 | 'postmessage text': convert,
56 | 'postmessage json': convert,
57 | 'postmessage html': convert
58 | }
59 | });
60 |
61 | $.ajaxTransport('postmessage', function (options) {
62 | if (options.postMessage && window.postMessage) {
63 | var iframe,
64 | loc = $('
').prop('href', options.postMessage)[0],
65 | target = loc.protocol + '//' + loc.host,
66 | xhrUpload = options.xhr().upload;
67 | // IE always includes the port for the host property of a link
68 | // element, but not in the location.host or origin property for the
69 | // default http port 80 and https port 443, so we strip it:
70 | if (/^(http:\/\/.+:80)|(https:\/\/.+:443)$/.test(target)) {
71 | target = target.replace(/:(80|443)$/, '');
72 | }
73 | return {
74 | send: function (_, completeCallback) {
75 | counter += 1;
76 | var message = {
77 | id: 'postmessage-transport-' + counter
78 | },
79 | eventName = 'message.' + message.id;
80 | iframe = $(
81 | ''
84 | ).bind('load', function () {
85 | $.each(names, function (i, name) {
86 | message[name] = options[name];
87 | });
88 | message.dataType = message.dataType.replace('postmessage ', '');
89 | $(window).bind(eventName, function (e) {
90 | e = e.originalEvent;
91 | var data = e.data,
92 | ev;
93 | if (e.origin === target && data.id === message.id) {
94 | if (data.type === 'progress') {
95 | ev = document.createEvent('Event');
96 | ev.initEvent(data.type, false, true);
97 | $.extend(ev, data);
98 | xhrUpload.dispatchEvent(ev);
99 | } else {
100 | completeCallback(
101 | data.status,
102 | data.statusText,
103 | {postmessage: data.result},
104 | data.headers
105 | );
106 | iframe.remove();
107 | $(window).unbind(eventName);
108 | }
109 | }
110 | });
111 | iframe[0].contentWindow.postMessage(
112 | message,
113 | target
114 | );
115 | }).appendTo(document.body);
116 | },
117 | abort: function () {
118 | if (iframe) {
119 | iframe.remove();
120 | }
121 | }
122 | };
123 | }
124 | });
125 |
126 | }));
127 |
--------------------------------------------------------------------------------
/api/support/csdb/db_pgsql_lite.php:
--------------------------------------------------------------------------------
1 | lastid = 0;
24 |
25 | parent::Connect($dsn, $username, $password, $options);
26 |
27 | // Set Unicode support.
28 | $this->Query("SET", "client_encoding TO 'UTF-8'");
29 | }
30 |
31 | public function GetInsertID($name = null)
32 | {
33 | return $this->lastid;
34 | }
35 |
36 | public function QuoteIdentifier($str)
37 | {
38 | return "\"" . str_replace(array("\"", "?"), array("\"\"", ""), $str) . "\"";
39 | }
40 |
41 | protected function GenerateSQL(&$master, &$sql, &$opts, $cmd, $queryinfo, $args, $subquery)
42 | {
43 | switch ($cmd)
44 | {
45 | case "SELECT":
46 | {
47 | $supported = array(
48 | "PRECOLUMN" => array("DISTINCT" => "bool", "SUBQUERIES" => true),
49 | "FROM" => array("SUBQUERIES" => true),
50 | "WHERE" => array("SUBQUERIES" => true),
51 | "GROUP BY" => true,
52 | "HAVING" => true,
53 | "ORDER BY" => true,
54 | "LIMIT" => " OFFSET "
55 | );
56 |
57 | return $this->ProcessSELECT($master, $sql, $opts, $queryinfo, $args, $subquery, $supported);
58 | }
59 | case "INSERT":
60 | {
61 | $supported = array(
62 | "PREINTO" => array(),
63 | "POSTVALUES" => array("RETURNING" => "key_identifier"),
64 | "SELECT" => true,
65 | "BULKINSERT" => true
66 | );
67 |
68 | // To get the last insert ID via GetInsertID(), the field that contains a 'serial' (auto increment) field must be specified.
69 | if (isset($queryinfo["AUTO INCREMENT"])) $queryinfo["RETURNING"] = $queryinfo["AUTO INCREMENT"];
70 |
71 | $this->lastid = 0;
72 | $result = $this->ProcessINSERT($master, $sql, $opts, $queryinfo, $args, $subquery, $supported);
73 | if ($result["success"] && isset($queryinfo["AUTO INCREMENT"])) $result["filter_opts"] = array("mode" => "INSERT", "queryinfo" => $queryinfo);
74 |
75 | return $result;
76 | }
77 | case "UPDATE":
78 | {
79 | // No ORDER BY or LIMIT support.
80 | $supported = array(
81 | "PRETABLE" => array("ONLY" => "bool"),
82 | "WHERE" => array("SUBQUERIES" => true)
83 | );
84 |
85 | return $this->ProcessUPDATE($master, $sql, $opts, $queryinfo, $args, $subquery, $supported);
86 | }
87 | case "DELETE":
88 | {
89 | // No ORDER BY or LIMIT support.
90 | $supported = array(
91 | "PREFROM" => array("ONLY" => "bool"),
92 | "WHERE" => array("SUBQUERIES" => true)
93 | );
94 |
95 | return $this->ProcessDELETE($master, $sql, $opts, $queryinfo, $args, $subquery, $supported);
96 | }
97 | case "SET":
98 | {
99 | $sql = "SET " . $queryinfo;
100 |
101 | return array("success" => true);
102 | }
103 | case "USE":
104 | {
105 | // Fake multiple databases with PostgreSQL schemas.
106 | // http://www.postgresql.org/docs/7.3/static/ddl-schemas.html
107 | $sql = "SET search_path TO " . ($queryinfo != "" ? $this->QuoteIdentifier($queryinfo) . "," : "") . "\"\$user\",public";
108 |
109 | return array("success" => true);
110 | }
111 | case "TRUNCATE TABLE":
112 | {
113 | $master = true;
114 |
115 | $sql = "TRUNCATE TABLE " . $this->QuoteIdentifier($queryinfo[0]);
116 |
117 | return array("success" => true);
118 | }
119 | }
120 |
121 | return array("success" => false, "error" => CSDB::DB_Translate("Unknown query command '%s'.", $cmd), "errorcode" => "unknown_query_command");
122 | }
123 |
124 | protected function RunStatementFilter(&$stmt, &$filteropts)
125 | {
126 | if ($filteropts["mode"] == "INSERT")
127 | {
128 | // Force the last ID value to be extracted for INSERT queries.
129 | $result = new CSDB_PDO_Statement($this, $stmt, $filteropts);
130 | $row = $result->NextRow();
131 |
132 | $stmt = false;
133 | }
134 |
135 | parent::RunStatementFilter($stmt, $filteropts);
136 | }
137 |
138 | public function RunRowFilter(&$row, &$filteropts, &$fetchnext)
139 | {
140 | switch ($filteropts["mode"])
141 | {
142 | case "INSERT":
143 | {
144 | if ($row !== false)
145 | {
146 | $key = $filteropts["queryinfo"]["AUTO INCREMENT"];
147 | $this->lastid = $row->$key;
148 | }
149 |
150 | break;
151 | }
152 | }
153 |
154 | if (!$fetchnext) parent::RunRowFilter($row, $filteropts, $fetchnext);
155 | }
156 | }
157 | ?>
--------------------------------------------------------------------------------
/admin/support/multiselect-select2/README.md:
--------------------------------------------------------------------------------
1 | Select2
2 | =======
3 |
4 | Select2 is a jQuery-based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.
5 |
6 | To get started, checkout examples and documentation at http://select2.github.io/select2/
7 |
8 | Use cases
9 | ---------
10 |
11 | * Enhancing native selects with search.
12 | * Enhancing native selects with a better multi-select interface.
13 | * Loading data from JavaScript: easily load items via ajax and have them searchable.
14 | * Nesting optgroups: native selects only support one level of nested. Select2 does not have this restriction.
15 | * Tagging: ability to add new items on the fly.
16 | * Working with large, remote datasets: ability to partially load a dataset based on the search term.
17 | * Paging of large datasets: easy support for loading more pages when the results are scrolled to the end.
18 | * Templating: support for custom rendering of results and selections.
19 |
20 | Browser compatibility
21 | ---------------------
22 | * IE 8+
23 | * Chrome 8+
24 | * Firefox 10+
25 | * Safari 3+
26 | * Opera 10.6+
27 |
28 | Usage
29 | -----
30 | You can source Select2 directly from a CDN like [jsDelivr](http://www.jsdelivr.com/#!select2) or [CDNJS](http://www.cdnjs.com/libraries/select2), [download it from this GitHub repo](https://github.com/select2/select2/tags), or use one of the integrations below.
31 |
32 | Integrations
33 | ------------
34 |
35 | * [Wicket-Select2](https://github.com/ivaynberg/wicket-select2) (Java / [Apache Wicket](http://wicket.apache.org))
36 | * [select2-rails](https://github.com/argerim/select2-rails) (Ruby on Rails)
37 | * [AngularUI](http://angular-ui.github.io/#ui-select) ([AngularJS](https://angularjs.org/))
38 | * [Django](https://github.com/applegrew/django-select2)
39 | * [Symfony](https://github.com/19Gerhard85/sfSelect2WidgetsPlugin)
40 | * [Symfony2](https://github.com/avocode/FormExtensions)
41 | * [Bootstrap 2](https://github.com/t0m/select2-bootstrap-css) and [Bootstrap 3](https://github.com/t0m/select2-bootstrap-css/tree/bootstrap3) (CSS skins)
42 | * [Meteor](https://github.com/nate-strauser/meteor-select2) (modern reactive JavaScript framework; + [Bootstrap 3 skin](https://github.com/esperadomedia/meteor-select2-bootstrap3-css/))
43 | * [Meteor](https://jquery-select2.meteor.com)
44 | * [Yii 2.x](http://demos.krajee.com/widgets#select2)
45 | * [Yii 1.x](https://github.com/tonybolzan/yii-select2)
46 | * [AtmosphereJS](https://atmospherejs.com/package/jquery-select2)
47 | * [EmberJS](https://github.com/iStefo/ember-select-2)
48 |
49 | ### Example Integrations
50 |
51 | * [Knockout.js](https://github.com/ivaynberg/select2/wiki/Knockout.js-Integration)
52 | * [Socket.IO](https://github.com/ivaynberg/select2/wiki/Socket.IO-Integration)
53 | * [PHP](https://github.com/ivaynberg/select2/wiki/PHP-Example)
54 | * [.Net MVC] (https://github.com/ivaynberg/select2/wiki/.Net-MVC-Example)
55 |
56 | Internationalization (i18n)
57 | ---------------------------
58 |
59 | Select2 supports multiple languages by simply including the right language JS
60 | file (`select2_locale_it.js`, `select2_locale_nl.js`, etc.) after `select2.js`.
61 |
62 | Missing a language? Just copy `select2_locale_en.js.template`, translate
63 | it, and make a pull request back to Select2 here on GitHub.
64 |
65 | Documentation
66 | -------------
67 |
68 | The documentation for Select2 is available [through GitHub Pages](http://select2.github.io/select2/) and is located within this repository in the [`gh-pages` branch](https://github.com/ivaynberg/select2/tree/gh-pages).
69 |
70 | Community
71 | ---------
72 |
73 | ### Bug tracker
74 |
75 | Have a bug? Please create an issue here on GitHub!
76 |
77 | https://github.com/ivaynberg/select2/issues
78 |
79 | ### Mailing list
80 |
81 | Have a question? Ask on our mailing list!
82 |
83 | select2@googlegroups.com
84 |
85 | https://groups.google.com/d/forum/select2
86 |
87 | ### IRC channel
88 |
89 | Need help implementing Select2 in your project? Ask in our IRC channel!
90 |
91 | **Network:** [Freenode](https://freenode.net/) (`chat.freenode.net`)
92 |
93 | **Channel:** `#select2`
94 |
95 | **Web access:** https://webchat.freenode.net/?channels=select2
96 |
97 | Copyright and license
98 | ---------------------
99 |
100 | Copyright 2015 Igor Vaynberg
101 |
102 | This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
103 | General Public License version 2 (the "GPL License"). You may choose either license to govern your
104 | use of this software only upon the condition that you accept all of the terms of either the Apache
105 | License or the GPL License.
106 |
107 | You may obtain a copy of the Apache License and the GPL License in the LICENSE file, or at:
108 |
109 | http://www.apache.org/licenses/LICENSE-2.0
110 | http://www.gnu.org/licenses/gpl-2.0.html
111 |
112 | Unless required by applicable law or agreed to in writing, software distributed under the Apache License
113 | or the GPL License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
114 | either express or implied. See the Apache License and the GPL License for the specific language governing
115 | permissions and limitations under the Apache License and the GPL License.
116 |
--------------------------------------------------------------------------------
/admin/support/multiselect-select2/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | Contributing to Select2
2 | =======================
3 | Looking to contribute something to Select2? **Here's how you can help.**
4 |
5 | Please take a moment to review this document in order to make the contribution
6 | process easy and effective for everyone involved.
7 |
8 | Following these guidelines helps to communicate that you respect the time of
9 | the developers managing and developing this open source project. In return,
10 | they should reciprocate that respect in addressing your issue or assessing
11 | patches and features.
12 |
13 | Using the issue tracker
14 | -----------------------
15 | When [reporting bugs][reporting-bugs] or
16 | [requesting features][requesting-features], the
17 | [issue tracker on GitHub][issue-tracker] is the recommended channel to use.
18 |
19 | The issue tracker **is not** a place for support requests. The
20 | [mailing list][mailing-list] or [IRC channel][irc-channel] are better places to
21 | get help.
22 |
23 | Reporting bugs with Select2
24 | ---------------------------
25 | We really appreciate clear bug reports that _consistently_ show an issue
26 | _within Select2_.
27 |
28 | The ideal bug report follows these guidelines:
29 |
30 | 1. **Use the [GitHub issue search][issue-search]** — Check if the issue
31 | has already been reported.
32 | 2. **Check if the issue has been fixed** — Try to reproduce the problem
33 | using the code in the `master` branch.
34 | 3. **Isolate the problem** — Try to create an
35 | [isolated test case][isolated-case] that consistently reproduces the problem.
36 |
37 | Please try to be as detailed as possible in your bug report, especially if an
38 | isolated test case cannot be made. Some useful questions to include the answer
39 | to are:
40 |
41 | - What steps can be used to reproduce the issue?
42 | - What is the bug and what is the expected outcome?
43 | - What browser(s) and Operating System have you tested with?
44 | - Does the bug happen consistently across all tested browsers?
45 | - What version of jQuery are you using? And what version of Select2?
46 | - Are you using Select2 with other plugins?
47 |
48 | All of these questions will help people fix and identify any potential bugs.
49 |
50 | Requesting features in Select2
51 | ------------------------------
52 | Select2 is a large library that carries with it a lot of functionality. Because
53 | of this, many feature requests will not be implemented in the core library.
54 |
55 | Before starting work on a major feature for Select2, **contact the
56 | [community][community] first** or you may risk spending a considerable amount of
57 | time on something which the project developers are not interested in bringing
58 | into the project.
59 |
60 | ### Select2 4.0
61 |
62 | Many feature requests will be closed off until 4.0, where Select2 plans to adopt
63 | a more flexible API. If you are interested in helping with the development of
64 | the next major Select2 release, please send a message to the
65 | [mailing list][mailing-list] or [irc channel][irc-channel] for more information.
66 |
67 | Triaging issues and pull requests
68 | ---------------------------------
69 | Anyone can help the project maintainers triage issues and review pull requests.
70 |
71 | ### Handling new issues
72 |
73 | Select2 regularly receives new issues which need to be tested and organized.
74 |
75 | When a new issue that comes in that is similar to another existing issue, it
76 | should be checked to make sure it is not a duplicate. Duplicates issues should
77 | be marked by replying to the issue with "Duplicate of #[issue number]" where
78 | `[issue number]` is the url or issue number for the existing issue. This will
79 | allow the project maintainers to quickly close off additional issues and keep
80 | the discussion focused within a single issue.
81 |
82 | If you can test issues that are reported to Select2 that contain test cases and
83 | confirm under what conditions bugs happen, that will allow others to identify
84 | what causes a bug quicker.
85 |
86 | ### Reviewing pull requests
87 |
88 | It is very common for pull requests to be opened for issues that contain a clear
89 | solution to the problem. These pull requests should be rigorously reviewed by
90 | the community before being accepted. If you are not sure about a piece of
91 | submitted code, or know of a better way to do something, do not hesitate to make
92 | a comment on the pull request.
93 |
94 | It should also be made clear that **all code contributed to Select** must be
95 | licensable under the [Apache 2 or GPL 2 licenses][licensing]. Code that cannot
96 | be released under either of these licenses **cannot be accepted** into the
97 | project.
98 |
99 | [community]: https://github.com/ivaynberg/select2#community
100 | [reporting-bugs]: #reporting-bugs-with-select2
101 | [requesting-features]: #requesting-features-in-select2
102 | [issue-tracker]: https://github.com/ivaynberg/select2/issues
103 | [mailing-list]: https://github.com/ivaynberg/select2#mailing-list
104 | [irc-channel]: https://github.com/ivaynberg/select2#irc-channel
105 | [issue-search]: https://github.com/ivaynberg/select2/search?q=&type=Issues
106 | [isolated-case]: http://css-tricks.com/6263-reduced-test-cases/
107 | [licensing]: https://github.com/ivaynberg/select2#copyright-and-license
108 |
--------------------------------------------------------------------------------
/admin/support/cropperjs/cropper.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Cropper.js v1.2.2
3 | * https://github.com/fengyuanchen/cropperjs
4 | *
5 | * Copyright (c) 2015-2018 Chen Fengyuan
6 | * Released under the MIT license
7 | *
8 | * Date: 2018-01-03T13:26:29.610Z
9 | */
10 |
11 | .cropper-container {
12 | direction: ltr;
13 | font-size: 0;
14 | line-height: 0;
15 | position: relative;
16 | -ms-touch-action: none;
17 | touch-action: none;
18 | -webkit-user-select: none;
19 | -moz-user-select: none;
20 | -ms-user-select: none;
21 | user-select: none;
22 | }
23 |
24 | .cropper-container img {/*Avoid margin top issue (Occur only when margin-top <= -height)
25 | */
26 | display: block;
27 | height: 100%;
28 | image-orientation: 0deg;
29 | max-height: none !important;
30 | max-width: none !important;
31 | min-height: 0 !important;
32 | min-width: 0 !important;
33 | width: 100%;
34 | }
35 |
36 | .cropper-wrap-box,
37 | .cropper-canvas,
38 | .cropper-drag-box,
39 | .cropper-crop-box,
40 | .cropper-modal {
41 | bottom: 0;
42 | left: 0;
43 | position: absolute;
44 | right: 0;
45 | top: 0;
46 | }
47 |
48 | .cropper-wrap-box,
49 | .cropper-canvas {
50 | overflow: hidden;
51 | }
52 |
53 | .cropper-drag-box {
54 | background-color: #fff;
55 | opacity: 0;
56 | }
57 |
58 | .cropper-modal {
59 | background-color: #000;
60 | opacity: .5;
61 | }
62 |
63 | .cropper-view-box {
64 | display: block;
65 | height: 100%;
66 | outline-color: rgba(51, 153, 255, 0.75);
67 | outline: 1px solid #39f;
68 | overflow: hidden;
69 | width: 100%;
70 | }
71 |
72 | .cropper-dashed {
73 | border: 0 dashed #eee;
74 | display: block;
75 | opacity: .5;
76 | position: absolute;
77 | }
78 |
79 | .cropper-dashed.dashed-h {
80 | border-bottom-width: 1px;
81 | border-top-width: 1px;
82 | height: 33.33333%;
83 | left: 0;
84 | top: 33.33333%;
85 | width: 100%;
86 | }
87 |
88 | .cropper-dashed.dashed-v {
89 | border-left-width: 1px;
90 | border-right-width: 1px;
91 | height: 100%;
92 | left: 33.33333%;
93 | top: 0;
94 | width: 33.33333%;
95 | }
96 |
97 | .cropper-center {
98 | display: block;
99 | height: 0;
100 | left: 50%;
101 | opacity: .75;
102 | position: absolute;
103 | top: 50%;
104 | width: 0;
105 | }
106 |
107 | .cropper-center:before,
108 | .cropper-center:after {
109 | background-color: #eee;
110 | content: ' ';
111 | display: block;
112 | position: absolute;
113 | }
114 |
115 | .cropper-center:before {
116 | height: 1px;
117 | left: -3px;
118 | top: 0;
119 | width: 7px;
120 | }
121 |
122 | .cropper-center:after {
123 | height: 7px;
124 | left: 0;
125 | top: -3px;
126 | width: 1px;
127 | }
128 |
129 | .cropper-face,
130 | .cropper-line,
131 | .cropper-point {
132 | display: block;
133 | height: 100%;
134 | opacity: .1;
135 | position: absolute;
136 | width: 100%;
137 | }
138 |
139 | .cropper-face {
140 | background-color: #fff;
141 | left: 0;
142 | top: 0;
143 | }
144 |
145 | .cropper-line {
146 | background-color: #39f;
147 | }
148 |
149 | .cropper-line.line-e {
150 | cursor: ew-resize;
151 | right: -3px;
152 | top: 0;
153 | width: 5px;
154 | }
155 |
156 | .cropper-line.line-n {
157 | cursor: ns-resize;
158 | height: 5px;
159 | left: 0;
160 | top: -3px;
161 | }
162 |
163 | .cropper-line.line-w {
164 | cursor: ew-resize;
165 | left: -3px;
166 | top: 0;
167 | width: 5px;
168 | }
169 |
170 | .cropper-line.line-s {
171 | bottom: -3px;
172 | cursor: ns-resize;
173 | height: 5px;
174 | left: 0;
175 | }
176 |
177 | .cropper-point {
178 | background-color: #39f;
179 | height: 5px;
180 | opacity: .75;
181 | width: 5px;
182 | }
183 |
184 | .cropper-point.point-e {
185 | cursor: ew-resize;
186 | margin-top: -3px;
187 | right: -3px;
188 | top: 50%;
189 | }
190 |
191 | .cropper-point.point-n {
192 | cursor: ns-resize;
193 | left: 50%;
194 | margin-left: -3px;
195 | top: -3px;
196 | }
197 |
198 | .cropper-point.point-w {
199 | cursor: ew-resize;
200 | left: -3px;
201 | margin-top: -3px;
202 | top: 50%;
203 | }
204 |
205 | .cropper-point.point-s {
206 | bottom: -3px;
207 | cursor: s-resize;
208 | left: 50%;
209 | margin-left: -3px;
210 | }
211 |
212 | .cropper-point.point-ne {
213 | cursor: nesw-resize;
214 | right: -3px;
215 | top: -3px;
216 | }
217 |
218 | .cropper-point.point-nw {
219 | cursor: nwse-resize;
220 | left: -3px;
221 | top: -3px;
222 | }
223 |
224 | .cropper-point.point-sw {
225 | bottom: -3px;
226 | cursor: nesw-resize;
227 | left: -3px;
228 | }
229 |
230 | .cropper-point.point-se {
231 | bottom: -3px;
232 | cursor: nwse-resize;
233 | height: 20px;
234 | opacity: 1;
235 | right: -3px;
236 | width: 20px;
237 | }
238 |
239 | @media (min-width: 768px) {
240 | .cropper-point.point-se {
241 | height: 15px;
242 | width: 15px;
243 | }
244 | }
245 |
246 | @media (min-width: 992px) {
247 | .cropper-point.point-se {
248 | height: 10px;
249 | width: 10px;
250 | }
251 | }
252 |
253 | @media (min-width: 1200px) {
254 | .cropper-point.point-se {
255 | height: 5px;
256 | opacity: .75;
257 | width: 5px;
258 | }
259 | }
260 |
261 | .cropper-point.point-se:before {
262 | background-color: #39f;
263 | bottom: -50%;
264 | content: ' ';
265 | display: block;
266 | height: 200%;
267 | opacity: 0;
268 | position: absolute;
269 | right: -50%;
270 | width: 200%;
271 | }
272 |
273 | .cropper-invisible {
274 | opacity: 0;
275 | }
276 |
277 | .cropper-bg {
278 | background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC');
279 | }
280 |
281 | .cropper-hide {
282 | display: block;
283 | height: 0;
284 | position: absolute;
285 | width: 0;
286 | }
287 |
288 | .cropper-hidden {
289 | display: none !important;
290 | }
291 |
292 | .cropper-move {
293 | cursor: move;
294 | }
295 |
296 | .cropper-crop {
297 | cursor: crosshair;
298 | }
299 |
300 | .cropper-disabled .cropper-drag-box,
301 | .cropper-disabled .cropper-face,
302 | .cropper-disabled .cropper-line,
303 | .cropper-disabled .cropper-point {
304 | cursor: not-allowed;
305 | }
306 |
307 |
--------------------------------------------------------------------------------