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 | |
function exchange_rate($_opt = []) | |
{ | |
$_pairs = []; | |
foreach($_opt as $_k=>$_v) | |
{ | |
$_pairs[] = $_k.'_'.$_v; | |
} | |
if(!count($_pairs)) return null; |
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 | |
/** | |
* Turkish Lira Official Exchange Rate | |
**/ | |
function turkey_exchange_rate($_opt='', $_signs = 2) | |
{ | |
$res = null; | |
$url = 'http://www.tcmb.gov.tr/kurlar/today.xml'; | |
$xml = @simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA); | |
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 | |
class ICSessions | |
{ | |
static public function Init(){ | |
if (!session_id()) @session_start(); | |
return new ICSession; | |
} | |
public function Set($key='', $value='') | |
{ |
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])) | |
{ |
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 | |
/** | |
* Привет в 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
<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 | |
$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
<?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
public function __construct() | |
{ | |
$this->clients = new \SplObjectStorage; | |
$this->connectedUsers = []; | |
$this->connectedIDs = []; | |
$this->IDs = 0; | |
} | |
public function onOpen(ConnectionInterface $conn) | |
{ |
OlderNewer