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 | |
/* | |
That it is an implementation of the function money_format for the | |
platforms that do not it bear. | |
The function accepts to same string of format accepts for the | |
original function of the PHP. | |
(Sorry. my writing in English is very bad) | |
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 | |
require_once 'functions.php'; | |
require_once 'rb-mysql.php'; | |
///////////////////////// SETUP ///////////////////////// | |
date_default_timezone_set('Asia/Tbilisi'); | |
$baseurl = 'http://localhost:3000'; | |
$dbuser = 'root'; | |
$dbpassword = ''; |
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
/* | |
* add attributes like in the example | |
* data-responsive="max-width[100]; style[color: ...; font-size: ...;]" | |
*/ | |
document.querySelectorAll('[data-responsive]').forEach(elem => { | |
const str = elem.getAttribute('data-responsive'); | |
const match = str.match(/max-width[\s+]?\[(.*?)\]\;/g); | |
const maxWidth = match[0].match(/\[(.*?)\]/)[1]; | |
const styles = str.match(/style[\s+]?\[(.*?)\]/)[1]; |
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 namespace App\Helpers; | |
class Library { | |
// Page not found | |
public static function notFound($params = ["code" => 404, "url" => NULL, "text" => NULL]) { | |
$code = $params["code"] ?? 404; | |
$url = $params["url"] ?? NULL; | |
$text = $params["text"] ?? 'Sorry, but the page you are looking for is not found. Please make sure you have typed the correct url.'; | |
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
/* | |
Arguments list | |
1. class to watch | |
2. event type | |
3. callback | |
*/ | |
UIkit.util.on('.uk-search-default', 'click', e => console.log(e.target.parentElement)) |