This file contains 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 | |
$db_user = 'root'; | |
$db_pass = 'toor'; | |
$db_host = 'localhost'; | |
$db_port = 3306; | |
$db_name = 'my_db'; | |
$db_encoding = 'utf8'; | |
//mysqli_connect(host, username, password, dbname, port, socket); |
This file contains 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 | |
//file /wp-content/themes/current-theme/functions.php | |
function custom_addRoutes() { | |
add_rewrite_rule('^([A-Za-z]+)/([A-Za-z\+]+)/([0-9]+)/?$', 'tour/?id=$matches[3]&city=$matches[2]&country=$matches[1]', 'top'); | |
add_rewrite_rule('^([A-Za-z]+)/([A-Za-z\+]+)/?$', 'city/?city_name_en=$matches[2]&country=$matches[1]', 'top'); | |
add_rewrite_rule('^([A-Za-z^index]+)/?$', 'country/?country_name_en=$matches[1]', 'top'); | |
} | |
add_action('init', 'custom_addRoutes'); |
This file contains 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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^([A-Za-z]+)/([A-Za-z\+]+)/([0-9]+)/?$ tour/?id=$3&city=$2&country=$1 [NC] | |
RewriteRule ^([A-Za-z]+)/([A-Za-z\+]+)/?$ city/?city=$2&country=$1 [NC] | |
RewriteRule ^([A-Za-z^index]+)/?$ country/?country=$1 [NC] |
This file contains 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
public function __construct() | |
{ | |
$this->clients = new \SplObjectStorage; | |
$this->connectedUsers = []; | |
$this->connectedIDs = []; | |
$this->IDs = 0; | |
} | |
public function onOpen(ConnectionInterface $conn) | |
{ |
This file contains 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 | |
//.... | |
$pass = 'qwertyqwerty'; | |
//$row['user_mail'] = 'wans@localhost'; | |
//$row['id_user'] = 1; | |
$link = 'http://elink.kz/respass/reset/code/'.md5($pass).'/'.$row['id_user']; |
This file contains 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 | |
$xml = file_get_contents("erp_category.xml"); | |
$xml = str_replace(PHP_EOL, '', $xml); | |
$xml = str_replace( "\t", '', $xml); | |
$xml = str_replace(' ', ' ', $xml); | |
$xml = str_replace('<Категория_1', "\n\n".'<Категория_1', $xml); | |
$xml = str_replace('</Категория_1>', '</Категория_1>'."\n\n", $xml); |
This file contains 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
<script> | |
var Slides = {}; | |
Slides.tDuration = 1.75 * 1000; | |
Slides.bgLg = "https://yachtering.eu/img/slides_20min_big.png?201903031805"; | |
Slides.bgSm = "https://yachtering.eu/img/slides_20min.png?201903031805"; | |
Slides.imgHSm = 75; | |
Slides.imgWSm = 75; |
This file contains 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 | |
/** | |
* Привет в 2019 из книги 2008 года | |
* Андрей Богатырев. Руководство полного идиота | |
* по программированию (на языке Си) | |
* http://lib.ru/CTOTOR/starterkit.txt | |
*/ | |
define("LINES", 19); |
This file contains 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 __DIR__.'/cmsif.php'; | |
init(); | |
/**/ | |
//Simple route to include module file | |
router('get', '/about', CMSIF_MODULES.'/about.php'); | |
//Simple HTML page |
This file contains 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 'exchange_rate.php'; | |
function get_exr($_from=null, $_to=null) | |
{ | |
$_res = null; | |
$_pair = $_from.'_'.$_to; | |
$_pairs = exchange_rate([ $_from => $_to ]); | |
if(is_array($_pairs) && isset($_pairs[$_pair])) | |
{ |
NewerOlder