473 lines
24 KiB
PHP
473 lines
24 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
//use App\v2\Controller\RequisitionsController;
|
||
|
|
|
||
|
|
set_time_limit(0);
|
||
|
|
ini_set('memory_limit', '8192M');
|
||
|
|
require_once($_SERVER['DOCUMENT_ROOT']."/config.php");
|
||
|
|
require_once($_SERVER['DOCUMENT_ROOT']."/ajax/vue_php_function.php");
|
||
|
|
header('Content-Type: application/json');
|
||
|
|
ini_set('display_errors', 1);
|
||
|
|
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE);
|
||
|
|
|
||
|
|
//$w = new WebHookSend(13154, 2, 622489, 'req');
|
||
|
|
|
||
|
|
|
||
|
|
/*$cl = new Clients();
|
||
|
|
$res = get_class_etap(3840715, 994);
|
||
|
|
var_dump($res);*/
|
||
|
|
$pdo = new MysqlPdo(hst, ndb, user, pass);
|
||
|
|
|
||
|
|
$sql = "SET NAMES 'utf8'";
|
||
|
|
|
||
|
|
$pdo->query($sql);
|
||
|
|
|
||
|
|
$db_sphinx = new MysqlPdo(hstsph2, null, null, null, true, '9306');
|
||
|
|
|
||
|
|
$number=0;
|
||
|
|
// for($num=14; $num<=15; $num++){
|
||
|
|
$filepath = $_SERVER['DOCUMENT_ROOT']."/upload/clients_trend/req_19794.xlsx";
|
||
|
|
//echo $filepath."\n";
|
||
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/engine/classes/phpexcel/Classes/PHPExcel/IOFactory.php';
|
||
|
|
//require_once $_SERVER['DOCUMENT_ROOT'] . '/engine/classes/phpexcel/Classes/PHPExcel/PHPExcel_Shared_Date.php';
|
||
|
|
$type = PHPExcel_IOFactory::identify($filepath);
|
||
|
|
$objReader = PHPExcel_IOFactory::createReader($type);
|
||
|
|
|
||
|
|
$objPHPExcel = $objReader->load($filepath);
|
||
|
|
|
||
|
|
$rowIterator = $objPHPExcel->getActiveSheet()->getRowIterator();
|
||
|
|
foreach($rowIterator as $row){
|
||
|
|
$cellIterator = $row->getCellIterator();
|
||
|
|
foreach ($cellIterator as $cell) {
|
||
|
|
$clients[$row->getRowIndex()][$cell->getColumn()] = $cell->getCalculatedValue();
|
||
|
|
/*if($cell->getColumn() == 'D' && !empty($clients[$row->getRowIndex()][$cell->getColumn()])){
|
||
|
|
$clients[$row->getRowIndex()][$cell->getColumn()] = date('Y-m-d', PHPExcel_Shared_Date::ExcelToPHP($clients[$row->getRowIndex()][$cell->getColumn()]));
|
||
|
|
}*/
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
//var_dump($clients);
|
||
|
|
//die();
|
||
|
|
$agency_id = 19794;
|
||
|
|
$allClients = array();
|
||
|
|
$total = 0;
|
||
|
|
|
||
|
|
$sql_u = "SELECT * FROM users WHERE id in (select id from users where id=$agency_id or id_manager=$agency_id or id_manager in
|
||
|
|
(select id from users where id_manager=$agency_id or id_manager in
|
||
|
|
(select id from users where id_manager=$agency_id)))";
|
||
|
|
|
||
|
|
$q_u = $pdo->query($sql_u);
|
||
|
|
while($r_u = $pdo->fetch_assoc($q_u)){
|
||
|
|
$allUsers[$r_u['phone']] = $r_u;
|
||
|
|
$usersIds[] = (int)$r_u['id'];
|
||
|
|
}
|
||
|
|
$num = 0;
|
||
|
|
|
||
|
|
$mango = new MangoApiClass(0, 0);
|
||
|
|
if(!empty($clients)){
|
||
|
|
foreach($clients as $key => $client){
|
||
|
|
|
||
|
|
if($key> 1){
|
||
|
|
// if(isset($allObjects[$client['A']])){
|
||
|
|
$fio = trim(str_replace('"','',$client['A']));
|
||
|
|
$phone = '+'.$client['B'];
|
||
|
|
if(empty($fio)) $fio = $phone;
|
||
|
|
$fioReq = "Подбор объекта для ".$fio;
|
||
|
|
$arrObj = array();
|
||
|
|
$objList = '';
|
||
|
|
// $objectZ = $client['A'];
|
||
|
|
|
||
|
|
/*$objectId = 0;
|
||
|
|
$sql_o = "SELECT * FROM bnru_objects WHERE internal_id_guid = '{$objectZ}'";
|
||
|
|
echo $sql_o."\n";
|
||
|
|
$q_o = $pdo->query($sql_o);
|
||
|
|
$r_o = $pdo->fetch_assoc($q_o);
|
||
|
|
if($r_o['object_id']){
|
||
|
|
$objectId = (int)$r_o['object_id'];
|
||
|
|
}
|
||
|
|
|
||
|
|
if($objectId == 0) echo "\n****".$objectZ."********\n"; */
|
||
|
|
|
||
|
|
$user_id = $agency_id;
|
||
|
|
$who_work = $agency_id;
|
||
|
|
$client_p =$mango->ver_phone($client['E']);
|
||
|
|
echo $client_p."\n";
|
||
|
|
echo strlen($client_p)."\n";
|
||
|
|
if(isset($allUsers[$client_p])){
|
||
|
|
$user_id = $allUsers[$client_p]['id'];
|
||
|
|
$who_work = $allUsers[$client_p]['id'];
|
||
|
|
}
|
||
|
|
if(empty($user_id)) {
|
||
|
|
$user_id = $agency_id;
|
||
|
|
$who_work = $agency_id;
|
||
|
|
}
|
||
|
|
|
||
|
|
/*$sql_obj_up = "UPDATE objects SET id_add_user={$user_id} WHERE id = {$objectId}";
|
||
|
|
echo "\n\n".$sql_obj_up."\n\n";*/
|
||
|
|
//$pdo->query($sql_obj_up);
|
||
|
|
// $db_sphinx->query($sql_obj_up);
|
||
|
|
|
||
|
|
|
||
|
|
$sql_client = "SELECT * FROM clients WHERE phone='{$phone}' AND (id_agent in (".implode(',',$usersIds).") or who_work in (".implode(',',$usersIds)."))";
|
||
|
|
echo $sql_client."\n";
|
||
|
|
$q_client=$pdo->query($sql_client);
|
||
|
|
if($pdo->num_rows($q_client) > 0){
|
||
|
|
$r_client = $pdo->fetch_assoc($q_client);
|
||
|
|
//if($pdo->num_rows($q_client) > 0){
|
||
|
|
/*$r_client = $pdo->fetch_assoc($q_client);
|
||
|
|
$client_id = (int)$r_client['id'];
|
||
|
|
$arrObj = json_decode(html_entity_decode($r_client['objects']), ENT_QUOTES);*/
|
||
|
|
//var_dump($arrObj);
|
||
|
|
//}
|
||
|
|
/* $arrObj[] = (string)$allObjects[$client['A']]['object_id'];
|
||
|
|
if(!empty($arrObj)){
|
||
|
|
var_dump($arrObj);
|
||
|
|
$arrObj = array_unique($arrObj);
|
||
|
|
$objList = htmlentities(json_encode($arrObj));
|
||
|
|
$up_client = "UPDATE clients SET objects='$objList' where id = $client_id";
|
||
|
|
echo $up_client."\n";
|
||
|
|
// $pdo->query($up_client);
|
||
|
|
}*/
|
||
|
|
$client_id = (int)$r_client['id'];
|
||
|
|
/* $arrObj = json_decode(html_entity_decode($r_client['objects']), ENT_QUOTES);
|
||
|
|
$arrObj[] = $objectId;
|
||
|
|
|
||
|
|
|
||
|
|
if(!empty($arrObj)){
|
||
|
|
var_dump($arrObj);
|
||
|
|
$arrObj = array_unique($arrObj);
|
||
|
|
$objList = htmlentities(json_encode($arrObj));
|
||
|
|
$up_client = "UPDATE clients SET objects='$objList' where id = $client_id";
|
||
|
|
echo $up_client."\n";
|
||
|
|
// $pdo->query($up_client);
|
||
|
|
} */
|
||
|
|
|
||
|
|
$cl = new Clients();
|
||
|
|
//$cl->update_objects($client_id, null, $arrObj);
|
||
|
|
$funnel_id_req = 1510;
|
||
|
|
$confirm = 1;
|
||
|
|
$deleted = 0;
|
||
|
|
if($client['C'] && (int)$client['C'] > 0){
|
||
|
|
$deleted = 1;
|
||
|
|
if((int)$client['C'] == 10){
|
||
|
|
$confirm = 10;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
$summa = 0;
|
||
|
|
if($client['D']){
|
||
|
|
$summa = (int)$client['D'];
|
||
|
|
}
|
||
|
|
|
||
|
|
$source_id = 0;
|
||
|
|
if($client['F']){
|
||
|
|
$source_id = (int)$client['F'];
|
||
|
|
}
|
||
|
|
$opis = "По файлу от агенства.";
|
||
|
|
if(!empty($client['G'])){
|
||
|
|
$opis = mysql_real_escape_string($client['G']);
|
||
|
|
}
|
||
|
|
$sqlr = "INSERT INTO requisitions SET client_id={$client_id}, name='{$fioReq}', description='{$opis}',
|
||
|
|
user_id={$user_id}, who_work={$who_work}, type_id=1, confirm={$confirm}, funnel_id={$funnel_id_req},
|
||
|
|
deleted='{$deleted}', stage=1, source='{$source_id}', summa={$summa}, integration=3";
|
||
|
|
echo $sqlr."\n";
|
||
|
|
//$number++;
|
||
|
|
|
||
|
|
//$pdo->query($sqlr);
|
||
|
|
$req_id = $pdo->insert_id();
|
||
|
|
|
||
|
|
if($client['I']){
|
||
|
|
$step_id = (int)$client['I'];
|
||
|
|
if($step_id > 0){
|
||
|
|
$sql_step = "INSERT INTO `clients_funnel_step`(`step_id`, `req_id`, `next_id`, `prev_id`) VALUES
|
||
|
|
({$step_id}, {$req_id}, 0, {$step_id})";
|
||
|
|
//$pdo->query($sql_step);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
if($req_id>0 && $funnel_id_req > 0){
|
||
|
|
$Requisitions = new Requisitions();
|
||
|
|
$Requisitions->get_class_etap($req_id, $funnel_id_req);
|
||
|
|
}
|
||
|
|
|
||
|
|
if($deleted > 0){
|
||
|
|
|
||
|
|
$sql_del = "INSERT INTO `events_clients`(`user_id`, `req_id`, `from_id`, `event`, `dop_text`, `send_telegramm`, `read`, `viewed`, `funnel_type`) VALUES
|
||
|
|
({$user_id}, {$req_id}, {$user_id}, 'delete', '', 0, 1, 0, 'main')";
|
||
|
|
//$pdo->query($sql_del);
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
$arr_data = array();
|
||
|
|
|
||
|
|
if(!empty($client['J']) && $client['J'] !== '-'){
|
||
|
|
$value = (int)$client['J'];
|
||
|
|
$arr_data[] = "({$req_id}, 297, 1, {$value})";
|
||
|
|
}
|
||
|
|
if(!empty($client['K']) && $client['K'] !== '-'){
|
||
|
|
$value = $client['K'];
|
||
|
|
$arr_data[] = "({$req_id}, 299, 1, '\"{$value}\"')";
|
||
|
|
}
|
||
|
|
if(!empty($client['L']) && $client['L'] !== '-'){
|
||
|
|
$value = (int)$client['L'];
|
||
|
|
$arr_data[] = "({$req_id}, 300, 1, {$value})";
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
if(!empty($arr_data)){
|
||
|
|
$sql_data = "INSERT INTO requisition_data (`req_id`, `field_id`, `type`, `value`) VALUES ".implode(',' , $arr_data);
|
||
|
|
}
|
||
|
|
var_dump($arr_data);
|
||
|
|
echo $sql_data."\n";
|
||
|
|
//$pdo->query($sql_data);
|
||
|
|
} else {
|
||
|
|
|
||
|
|
// if(isset($allClients[$phone])){
|
||
|
|
//echo $allClients[$phone]."\n";
|
||
|
|
// else {
|
||
|
|
// $client_id = (int)$allClients[$phone]['id'];
|
||
|
|
|
||
|
|
$email = '';
|
||
|
|
/* if(!empty($client['D'])){
|
||
|
|
$email = trim($client['D']);
|
||
|
|
} */
|
||
|
|
$birthday = '';
|
||
|
|
/*if(!empty($client['D'])){
|
||
|
|
$birthday = $client['D'];
|
||
|
|
}*/
|
||
|
|
$opis = "По файлу от агенства.";
|
||
|
|
/*if(!empty($client['E'])){
|
||
|
|
$opis = mysql_real_escape_string($client['E']);
|
||
|
|
} */
|
||
|
|
$deleted = 0;
|
||
|
|
/*if(trim($client['E']) == 'Архив'){
|
||
|
|
$deleted = 1;
|
||
|
|
}*/
|
||
|
|
|
||
|
|
/* $arrObj[] = $objectId;
|
||
|
|
if(!empty($arrObj)){
|
||
|
|
$arrObj = array_unique($arrObj);
|
||
|
|
$objList = htmlentities(json_encode($arrObj));
|
||
|
|
}
|
||
|
|
|
||
|
|
//$role = "["".$client['B'].""]";
|
||
|
|
//$work_type = "["".$client['D'].""]";
|
||
|
|
// $work_type = "";
|
||
|
|
$source = $client['D'];
|
||
|
|
$r_source = null;
|
||
|
|
if(!empty($source)){
|
||
|
|
|
||
|
|
$sql_source = "SELECT * FROM `advertising_sources` WHERE `source` = '{$source}' and user_id in (".implode(',',$usersIds).")";
|
||
|
|
echo $sql_source."\n";
|
||
|
|
// $q_source = $pdo->query($sql_source);
|
||
|
|
$r_source = $pdo->fetch_assoc($q_source);
|
||
|
|
}
|
||
|
|
$source_id = 0;
|
||
|
|
if($r_source['id'] > 0){
|
||
|
|
$source_id = (int)$r_source['id'];
|
||
|
|
}
|
||
|
|
*/
|
||
|
|
|
||
|
|
|
||
|
|
$confirm=1;
|
||
|
|
|
||
|
|
$source_id = 0;
|
||
|
|
if($client['F']){
|
||
|
|
$source_id = (int)$client['F'];
|
||
|
|
}
|
||
|
|
$insetrC = "INSERT INTO clients SET phone='{$phone}', fio='{$fio}', email='{$email}', opis='{$opis}', deleted='{$deleted}', id_agent={$user_id}, who_work={$who_work}, date_add=NOW(), work_type='{$work_type}', confirm={$confirm}, stage=1, source={$source_id}, integration=3";
|
||
|
|
echo $insetrC."\n";
|
||
|
|
//$pdo->query($insetrC);
|
||
|
|
|
||
|
|
$client_id = $pdo->insert_id();
|
||
|
|
//$number++;
|
||
|
|
/*if(!empty($birthday)){
|
||
|
|
$insetrC .= ", birthday='{$birthday}'";
|
||
|
|
}*/
|
||
|
|
//echo $insetrC."\n";
|
||
|
|
|
||
|
|
/* $cl = new Clients();
|
||
|
|
$cl->update_objects($client_id, null, $arrObj); */
|
||
|
|
$funnel_id_req = 1510;
|
||
|
|
$confirm = 1;
|
||
|
|
$deleted = 0;
|
||
|
|
if($client['C'] && (int)$client['C'] > 0){
|
||
|
|
$deleted = 1;
|
||
|
|
if((int)$client['C'] == 10){
|
||
|
|
$confirm = 10;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
$summa = 0;
|
||
|
|
if($client['D']){
|
||
|
|
$summa = (int)$client['D'];
|
||
|
|
}
|
||
|
|
|
||
|
|
$source_id = 0;
|
||
|
|
if($client['F']){
|
||
|
|
$source_id = (int)$client['F'];
|
||
|
|
}
|
||
|
|
$opis = "По файлу от агенства.";
|
||
|
|
if(!empty($client['G'])){
|
||
|
|
$opis = mysql_real_escape_string($client['G']);
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
$sqlr = "INSERT INTO requisitions SET client_id={$client_id}, name='{$fioReq}', description='{$opis}',
|
||
|
|
user_id={$user_id}, who_work={$who_work}, type_id=1, confirm={$confirm}, funnel_id={$funnel_id_req},
|
||
|
|
deleted='{$deleted}', stage=1, source='{$source_id}', summa={$summa}, integration=3";
|
||
|
|
echo $sqlr."\n";
|
||
|
|
|
||
|
|
//$pdo->query($sqlr);
|
||
|
|
$req_id = $pdo->insert_id();
|
||
|
|
|
||
|
|
if($client['I']){
|
||
|
|
$step_id = (int)$client['I'];
|
||
|
|
if($step_id > 0){
|
||
|
|
$sql_step = "INSERT INTO `clients_funnel_step`(`step_id`, `req_id`, `next_id`, `prev_id`) VALUES
|
||
|
|
({$step_id}, {$req_id}, 0, {$step_id})";
|
||
|
|
echo $sql_step."\n";
|
||
|
|
//$pdo->query($sql_step);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
if($req_id>0 && $funnel_id_req > 0){
|
||
|
|
$Requisitions = new Requisitions();
|
||
|
|
$Requisitions->get_class_etap($req_id, $funnel_id_req);
|
||
|
|
}
|
||
|
|
|
||
|
|
if($deleted > 0){
|
||
|
|
|
||
|
|
$sql_del = "INSERT INTO `events_clients`(`user_id`, `req_id`, `from_id`, `event`, `dop_text`, `send_telegramm`, `read`, `viewed`, `funnel_type`) VALUES
|
||
|
|
({$user_id}, {$req_id}, {$user_id}, 'delete', '', 0, 1, 0, 'main')";
|
||
|
|
//$pdo->query($sql_del);
|
||
|
|
|
||
|
|
}
|
||
|
|
$arr_data = array();
|
||
|
|
|
||
|
|
if(!empty($client['J']) && $client['J'] !== '-'){
|
||
|
|
$value = (int)$client['J'];
|
||
|
|
$arr_data[] = "({$req_id}, 297, 1, {$value})";
|
||
|
|
}
|
||
|
|
if(!empty($client['K']) && $client['K'] !== '-'){
|
||
|
|
$value = $client['K'];
|
||
|
|
$arr_data[] = "({$req_id}, 299, 1, '\"{$value}\"')";
|
||
|
|
}
|
||
|
|
if(!empty($client['L']) && $client['L'] !== '-'){
|
||
|
|
$value = (int)$client['L'];
|
||
|
|
$arr_data[] = "({$req_id}, 300, 1, {$value})";
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
if(!empty($arr_data)){
|
||
|
|
$sql_data = "INSERT INTO requisition_data (`req_id`, `field_id`, `type`, `value`) VALUES ".implode(',' , $arr_data);
|
||
|
|
}
|
||
|
|
var_dump($arr_data);
|
||
|
|
echo $sql_data."\n";
|
||
|
|
|
||
|
|
//$pdo->query($sql_data);
|
||
|
|
|
||
|
|
|
||
|
|
/* $number++; */
|
||
|
|
}
|
||
|
|
// $pdo->query($insetrC);
|
||
|
|
//$client_id = $pdo->insert_id();
|
||
|
|
|
||
|
|
// $funnel_id_req = 574;
|
||
|
|
|
||
|
|
/* $req_id = 0;
|
||
|
|
$user_id = 0;
|
||
|
|
$who_work = 0;
|
||
|
|
$client_p = trim($client['C']);
|
||
|
|
// echo $client_p."\n";
|
||
|
|
if(isset($allUsers['+'.$client_p])){
|
||
|
|
$user_id = $allUsers['+'.$client_p]['id'];
|
||
|
|
$who_work = $allUsers['+'.$client_p]['id'];
|
||
|
|
}
|
||
|
|
if(empty($user_id)) {
|
||
|
|
$user_id = $agency_id;
|
||
|
|
$who_work = $agency_id;
|
||
|
|
}
|
||
|
|
/* foreach($requisitions as $req){
|
||
|
|
if($req['phone'] == $phone){
|
||
|
|
$req_id = (int)$req['id'];
|
||
|
|
unset($requisitions[$req_id]);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
}*/
|
||
|
|
/* if($user_id != 13735){
|
||
|
|
echo '+'.$client_p . ' ' . $user_id . ' '.$req_id."\n";
|
||
|
|
$sql_up = "UPDATE requisitions SET user_id={$user_id}, who_work={$user_id} WHERE id = {$req_id}";
|
||
|
|
$pdo->query($sql_up);
|
||
|
|
$sql_up_ev = "UPDATE user_client_events SET user_id={$user_id}, from_id={$user_id} WHERE `type`='call' AND req_id={$req_id}";
|
||
|
|
$pdo->query($sql_up_ev);
|
||
|
|
$number++;
|
||
|
|
}*/
|
||
|
|
/* $opis = mysql_real_escape_string(trim($client['D']));
|
||
|
|
$deleted = 0;
|
||
|
|
|
||
|
|
$sql_source = "SELECT * FROM `advertising_sources` WHERE `source` = '{$source}' and user_id in (".implode(',',$usersIds).")";
|
||
|
|
echo $sql_source."\n";
|
||
|
|
$q_source = $pdo->query($sql_source);
|
||
|
|
$r_source = $pdo->fetch_assoc($q_source);
|
||
|
|
$source_id = 0;
|
||
|
|
if($r_source['id'] > 0){
|
||
|
|
$source_id = (int)$r_source['id'];
|
||
|
|
}
|
||
|
|
/* if(trim($client['E']) == 'Архив'){
|
||
|
|
$deleted = 1;
|
||
|
|
}*/
|
||
|
|
// if($deleted == 1){
|
||
|
|
/* $funnel_id_req = 0;
|
||
|
|
$sqlr = "INSERT INTO requisitions SET client_id={$client_id}, name='{$nazv}', description='{$opis}', user_id={$user_id}, who_work={$who_work}, type_id=1, confirm=1, deleted='{$deleted}', funnel_id={$funnel_id_req}, stage=1, source='{$source_id}', integration=3";
|
||
|
|
echo $sqlr."\n";
|
||
|
|
// $pdo->query($sqlr);
|
||
|
|
// $req_id = $pdo->insert_id();
|
||
|
|
/* if($req_id>0 && $deleted == 1){
|
||
|
|
$sql_del = "INSERT INTO events_clients SET req_id = {$req_id}, event='delete', dop_text='Архивная заявка', `read`=1, user_id={$user_id}";
|
||
|
|
// echo $sql_del."\n";
|
||
|
|
// $pdo->query($sql_del);
|
||
|
|
}*/
|
||
|
|
//var_dump($client);
|
||
|
|
/* $data_event = $client['G'];
|
||
|
|
// echo $data_event."\n";
|
||
|
|
if(!empty($data_event) && $req_id>0){
|
||
|
|
$date = date('Y-m-d 10:00:00', strtotime($data_event));
|
||
|
|
$sql_event = "INSERT INTO user_client_events SET user_id={$user_id}, from_id={$user_id}, type='call', req_id={$req_id}, schedule_date='{$data_event}', calendar_view=0";
|
||
|
|
// echo $sql_event."\n";
|
||
|
|
// $pdo->query($sql_event);
|
||
|
|
}
|
||
|
|
|
||
|
|
if($req_id>0 && $funnel_id_req > 0){
|
||
|
|
$Requisitions = new Requisitions();
|
||
|
|
$Requisitions->get_class_etap($req_id, $funnel_id_req);
|
||
|
|
}*/
|
||
|
|
|
||
|
|
// $role = "["Арендатор"]";
|
||
|
|
// $insetrC = "UPDATE clients SET role = '{$role}' WHERE id={$client_id}";
|
||
|
|
// $pdo->query($insetrC);
|
||
|
|
//echo $insetrC;
|
||
|
|
|
||
|
|
/*}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
// if($key == 2) break;
|
||
|
|
} else {
|
||
|
|
echo $key."*** \n";
|
||
|
|
} */
|
||
|
|
|
||
|
|
$number++;
|
||
|
|
//if($number > 1) break;
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
echo $number;
|
||
|
|
?>
|
||
|
|
|