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
/** | |
* Отправка ajax на удаление записи с id из таблицы mailing_object + удаление строчки tr | |
* @param id | |
*/ | |
function removeRecord(id) { | |
var data = { | |
id: id | |
}; | |
$.ajax({ |
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
select.form-control { | |
outline: none; | |
-webkit-appearance: none; | |
border-radius: 0; | |
} |
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
Контроллер ClientController: | |
============================ | |
public function actionAdd() | |
{ | |
$model = new AddClientOwnerForm(); | |
if(Yii::$app->request->isAjax){ | |
if($model->load(Yii::$app->request->post())) { | |
// ... ваш обработчик данных... | |
if ($model->save()) { |
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 | |
define('API_URL', 'https://api.telegram.org/bot'); | |
define('BOT_TOKEN', '123456789:asdsadsadasdasdsadsadasdasd'); | |
define('CHAT_ID_ANTON', '1234567'); | |
function botSendMessage($parameters){ | |
$url = API_URL . BOT_TOKEN . '/sendMessage?' . http_build_query($parameters); | |
file_get_contents($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
<?php | |
/* | |
Use the built-in password hashing functions to hash and compare passwords. | |
Hashing is the standard way of protecting a user's password before it's stored in a database. Many common hashing algorithms like md5 and even sha1 are unsafe for storing passwords, because hackers can easily crack passwords hashed using those algorithms. | |
PHP provides a built-in password hashing library that uses the bcrypt algorithm, currently considered the best algorithm for password hashing. | |
Хеширование пароля и проверка хеша | |
*/ | |
// Hash the password. $hashedPassword will be a 60-character string. | |
$hashedPassword = password_hash('my super cool password', PASSWORD_DEFAULT); |