This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $params = []; | |
| if ($_POST["firstname"]) { | |
| $params["firstname"] = $_POST["firstname"]; | |
| } | |
| if ($_POST["lastname"]) { | |
| $params["lastname"] = $_POST["lastname"]; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var | |
| elements = document.querySelectorAll('.s-box'), | |
| docWidth, | |
| docHeight, | |
| docRatio; | |
| elements = Array.prototype.slice.call(elements); | |
| function onresize() { | |
| // ширина и высота документа |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function xml(params) { | |
| var doc; | |
| function node(parent, params) { | |
| if (!doc) { | |
| doc = document.implementation.createDocument("", params.name, null); | |
| el = doc.documentElement; | |
| } else { | |
| var el = doc.createElement(params.name); | |
| parent.appendChild(el); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function request(method, url, data, callback) { | |
| var xhttp = new XMLHttpRequest() | |
| xhttp.open(method, url, true) | |
| xhttp.setRequestHeader("Content-type", "application/json") | |
| if (callback) { | |
| xhttp.onload = function() { | |
| if (xhttp.status >= 200 && xhttp.status < 400) { | |
| try { | |
| callback(null, JSON.parse(xhttp.responseText)) | |
| } catch(e) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function hostname(u) { | |
| var a = document.createElement('a'); | |
| a.href = u; | |
| return a.hostname; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $('.page_2').bind('inview', function(event, visible, visiblePartX, visiblePartY) { | |
| if (visible) { | |
| if ($('.percentage').data('easyPieChart')) { | |
| var percentage = $('.percentage'), | |
| chart1 = percentage.eq(0).data('easyPieChart'), | |
| chart2 = percentage.eq(0).data('easyPieChart'); | |
| chart1.options.animate = chart2.options.animate = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function isTouchDevice() { | |
| return !!("ontouchstart" in window); | |
| } | |
| if (isTouchDevice()) { | |
| // если мобильное устройство (тач устройство) | |
| } | |
| if (!isTouchDevice()) { | |
| // если не мобильное устройство |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // массив для результата выборки | |
| $data = array(); | |
| if (isset($_POST['filter'])) { | |
| foreach ($_POST['info_department'] as $selected) { | |
| $sql = "SELECT * FROM info WHERE info_department = '$selected' ORDER BY info_id DESC"; | |
| $result = $connect->query($sql); | |
| $result_array = $result->fetch_all(MYSQLI_ASSOC); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <body> | |
| <h1>Acme community</h1> | |
| <forum-header/> | |
| <forum-content> | |
| <forum-threads/> | |
| <forum-sidebar/> | |
| </forum-content> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var params = { test: "Hello World!" }; | |
| var base64str = btoa(JSON.stringify(params)); // "eyJ0ZXN0IjoiSGVsbG8gV29ybGQhIn0=" | |
| JSON.parse(atob(base64str)).test // "Hello World!" |