This commit is contained in:
mac 2026-07-15 15:30:46 +03:00
parent 43bdcb29a9
commit 0c2106c1df
2 changed files with 5 additions and 5 deletions

View File

@ -1062,7 +1062,7 @@ if ($request == 'confirm_reqs') {
echo "error: "; echo "error: ";
} }
if ($confirm == 1) { if ($confirm == 1) {
$sqlup = "UPDATE user_client_events SET user_id=".$new_who_work." WHERE req_id=".$r['id']." and `type` != 'step' and `type` != 'file'"; $sqlup = "UPDATE user_client_events SET user_id=".$new_who_work." WHERE req_id=".$r['id']." and type NOT IN ('step', 'file') AND NOT (type = 'deal' AND deal_id > 0)";
$rez = $pdo->query($sqlup); $rez = $pdo->query($sqlup);
} else if ($confirm == 0) { } else if ($confirm == 0) {
$sql_conf = "INSERT INTO `events_clients` (`user_id`, `req_id`, `from_id`, `event`) VALUES (".$user_id.", ".$r['id'].", ".$new_who_work.", 'transmitted')"; $sql_conf = "INSERT INTO `events_clients` (`user_id`, `req_id`, `from_id`, `event`) VALUES (".$user_id.", ".$r['id'].", ".$new_who_work.", 'transmitted')";
@ -1397,7 +1397,7 @@ if ($request == 'confirm_on_reqs') {
$pdo->query($sql); $pdo->query($sql);
// echo $sql."\n"; // echo $sql."\n";
$sql = "UPDATE user_client_events SET user_id=$user_id WHERE req_id=$r[id] and type != 'step' and type != 'file'"; $sql = "UPDATE user_client_events SET user_id=$user_id WHERE req_id=$r[id] and type NOT IN ('step', 'file') AND NOT (type = 'deal' AND deal_id > 0)";
$pdo->query($sql); $pdo->query($sql);
//echo $sql."\n"; //echo $sql."\n";
$sql = "UPDATE `events_clients` set `read` = 1, date_update='".date('Y-m-d H:i:s')."' WHERE req_id=$r[id] and from_id = ".$user_id; $sql = "UPDATE `events_clients` set `read` = 1, date_update='".date('Y-m-d H:i:s')."' WHERE req_id=$r[id] and from_id = ".$user_id;
@ -1456,7 +1456,7 @@ if ($request == 'confirm_on_clients') {
$pdo->query($sql); $pdo->query($sql);
//echo $sql."\n"; //echo $sql."\n";
$sql = "UPDATE user_client_events SET user_id=$user_id WHERE client_id=$r[id] and type != 'step' and type != 'file'"; $sql = "UPDATE user_client_events SET user_id=$user_id WHERE client_id=$r[id] and type NOT IN ('step', 'file') AND NOT (type = 'deal' AND deal_id > 0)";
$pdo->query($sql); $pdo->query($sql);
//echo $sql."\n"; //echo $sql."\n";
$sql = "UPDATE `events_clients` set `read` = 1, date_update='".date('Y-m-d H:i:s')."' WHERE client_id=$r[id] and from_id = ".$user_id; $sql = "UPDATE `events_clients` set `read` = 1, date_update='".date('Y-m-d H:i:s')."' WHERE client_id=$r[id] and from_id = ".$user_id;
@ -1975,7 +1975,7 @@ if ($request == 'mass_take_from_closed') {
$pdo->query($sql); $pdo->query($sql);
// echo $sql."\n"; // echo $sql."\n";
$sql = "UPDATE user_client_events SET user_id=$user_id WHERE req_id=$r[id] and type != 'step' and type != 'file'"; $sql = "UPDATE user_client_events SET user_id=$user_id WHERE req_id=$r[id] and type NOT IN ('step', 'file') AND NOT (type = 'deal' AND deal_id > 0)";
$pdo->query($sql); $pdo->query($sql);
//echo $sql."\n"; //echo $sql."\n";
$sql = "UPDATE `events_clients` set `read` = 1, date_update='".date('Y-m-d H:i:s')."' WHERE req_id=$r[id] and from_id = ".$user_id; $sql = "UPDATE `events_clients` set `read` = 1, date_update='".date('Y-m-d H:i:s')."' WHERE req_id=$r[id] and from_id = ".$user_id;

View File

@ -169,7 +169,7 @@ if($_SESSION['id'] && ($_GET['id'] || $_GET['req_id']))
if($tr != 1){ if($tr != 1){
$sql="UPDATE user_client_events SET user_id=$_GET[who_work] WHERE client_id=$_GET[id] and type != 'step' and type != 'file'"; $sql="UPDATE user_client_events SET user_id=$_GET[who_work] WHERE client_id=$_GET[id] and type != 'step' and type != 'file'";
if($req_id > 0){ if($req_id > 0){
$sql = "UPDATE user_client_events SET user_id=$_GET[who_work] WHERE req_id=$req_id and type != 'step' and type != 'file'"; $sql = "UPDATE user_client_events SET user_id=$_GET[who_work] WHERE req_id=$req_id and type NOT IN ('step', 'file') AND NOT (type = 'deal' AND deal_id > 0)";
} }
mysql_query($sql); mysql_query($sql);
} }