Skip to content

Instantly share code, notes, and snippets.

View CB9TOIIIA's full-sized avatar
💭
Make JBZoo Great Again ^_^

Eugene Kopylov CB9TOIIIA

💭
Make JBZoo Great Again ^_^
View GitHub Profile
@CB9TOIIIA
CB9TOIIIA / ubuntu clean
Created September 11, 2017 06:28
ubuntu clean
sudo apt update && sudo apt upgrade && sudo apt autoremove && sudo apt autoclean && sudo apt clean
@CB9TOIIIA
CB9TOIIIA / RussianPostCalc
Created September 8, 2017 06:12
RussianPostCalc
<?php
function _russianpostcalc_api_communicate($request)
{
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "http://russianpostcalc.ru/api_beta_077.php");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $request);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($curl);
@CB9TOIIIA
CB9TOIIIA / Отключить SSL cURL
Created September 7, 2017 17:32
Отключить SSL cURL
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $POZVONIM_Post_Call);
curl_setopt($ch, CURLOPT_TIMEOUT, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
@CB9TOIIIA
CB9TOIIIA / Определение мобильных браузеров
Created September 5, 2017 17:44
Определение мобильных браузеров JApplicationWebClient
$client = new JApplicationWebClient();
if ($client->mobile)
@CB9TOIIIA
CB9TOIIIA / Правка hosts прав
Created September 1, 2017 07:24
Правка hosts прав
attrib.exe -s -r -h -a C:\Windows\system32\drivers\etc\hosts
@CB9TOIIIA
CB9TOIIIA / restart nvidia driver control
Created August 17, 2017 12:28
restart nvidia driver control
net.exe stop NVDisplay.ContainerLocalSystem && net.exe start NVDisplay.ContainerLocalSystem
@CB9TOIIIA
CB9TOIIIA / Последние заказы и массив по условию JBZoo
Created August 3, 2017 11:38
Последние заказы и массив по условию JBZoo
$LastOrders = JBModelOrder::model()->getList();
$allitem = array();
foreach ($LastOrders as $Order) {
$order = JBModelOrder::model()->getById($Order->id);
$cartItems = $order->getItems(false);
@CB9TOIIIA
CB9TOIIIA / Addcomment JBZoo
Last active August 3, 2017 11:03
Addcomment JBZoo
/**
* Class JBCartElementHookJBAdvert
*/
class JBCartElementHookAddcomment extends JBCartElementHook
{
/**
* @param array $params
*/
public function notify($params = array())
@CB9TOIIIA
CB9TOIIIA / Объект в БД UPDATE
Created August 2, 2017 15:17
Объект в БД UPDATE
$orderModel = JBModelOrder::model();
$orderz = $orderModel->getById($idcz);
$object = new stdClass();
$object->id = $idcz;
$object->status = 'coupon_end';
$result = JFactory::getDbo()->updateObject(ZOO_TABLE_JBZOO_ORDER, $object, 'id');
@CB9TOIIIA
CB9TOIIIA / Подключаем JBZoo в файле
Created August 2, 2017 10:42
Подключаем JBZoo в файле
define('_JEXEC', 1);
define('JBZOO_APP_GROUP', 'jbuniversal');
define('DS', DIRECTORY_SEPARATOR);
// include Joomla!
if (file_exists(dirname(__FILE__) . '/defines.php')) {
include_once dirname(__FILE__) . '/defines.php';
}