Skip to content

Instantly share code, notes, and snippets.

View BekNaji's full-sized avatar

Bekzod BekNaji

  • Multibank
  • Tashkent, Uzbekistan
View GitHub Profile
@BekNaji
BekNaji / apexchart-tenders.php
Last active March 24, 2021 06:20
Candlestick - apexchart
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Статистика тендеров</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- <script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>-->
<script src="apex-chart.js"></script>
@BekNaji
BekNaji / options.php
Last active January 12, 2022 09:55
Simple options.php file for bitrix module || Простой файл options.php для модуля bitrix
<?php
/*
* Author: Bekzod Najmiddinov
* Email: bekturk333@gmail.com
*/
$moduleId = "module_id";
$siteId = "";
@BekNaji
BekNaji / telegram.php
Created May 21, 2021 13:44
Main Telegram bot class
<?php
if (file_exists('TelegramErrorLogger.php')) {
require_once 'TelegramErrorLogger.php';
}
/**
* Telegram Bot Class.
*
* @author Gabriele Grillo <gabry.grillo@alice.it>
# source: https://dev.1c-bitrix.ru/support/forum/forum6/topic60633/
# Download: https://www.1c-bitrix.ru/download/scripts/restore.php
<?php
/**
* Send rest query to Bitrix24.
*
* @param $method - Rest method, ex: methods
* @param array $params - Method params, ex: Array()
* @param array $auth - Authorize data, received from event
* @param boolean $authRefresh - If authorize is expired, refresh token
* @return mixed
*/
<?php
AddEventHandler('iblock', 'OnIBlockPropertyBuildList', array('CIBlockPropertyCustomButton', 'GetUserTypeDescription'));
class CIBlockPropertyCustomButton
{
function GetUserTypeDescription()
{
return array(
"PROPERTY_TYPE" => "L",
"USER_TYPE" => "custom_button",
function isDoubleClicked(element)
{
//if already clicked return TRUE to indicate this click is not allowed
if (element.data("isclicked")) return true;
//mark as clicked for 1 second
element.data("isclicked", true);
setTimeout(function () {
element.removeData("isclicked");
<?
// path: /local/templates/template_name/components/bitrix/menu/component_name/php_interface.php
$newResult=array();
foreach ($arResult as $key=>$arItem)
{
if($arItem["DEPTH_LEVEL"]==1)
{
$f=$key;
<?php
# filter function
function filterArray($columns , $list, $filterData)
{
foreach($columns as $column)
{
$filteredArray = $filteredArray ?: $list;
$key = $column['name'];
@BekNaji
BekNaji / bitrix_expired.txt
Created January 5, 2022 10:22
Убрать сообщение "Срок работы пробной версии продукта истек" Битрикс
Убрать сообщение "Срок работы пробной версии продукта истек" Битрикс
Расшаренный текст:
Для того, чтобы временно убрать сообщение о завершении пробного периода для разработки проекта на cms битрикс,
необходимо закомментировать строку с кодом:
echo GetMessage("expire_mess1"); в строке ~67 в файле:
\bitrix\modules\main\include\prolog_after.php
Это не решает проблему с завершением срока, а только временно убирает сообщение, через 2 недели ваш сайт перестанет работать.
Source: