$LIVE_idle ORDER BY id ASC"); if(DATABASE_fetch($result_op)){ $LIVE_online = 1; } } if(!isset($LIVE_online)){ header("Location: ".$URL_maindir."/cp/lh/live_mail.php?chatid=".$LIVE_uid."&department=".$LIVE_department."&type=m"); } }else{ $result_main = DATABASE_query("SELECT * FROM ".$DB_prefix."departments GROUP BY department ORDER BY id ASC"); while($get = DATABASE_fetch($result_main)){ $LIVE_department = $get["department"]; $result_dep = DATABASE_query("SELECT * FROM ".$DB_prefix."departments WHERE department='$LIVE_department' ORDER BY id ASC"); while($fetch = DATABASE_fetch($result_dep)){ $LIVE_operator = $fetch["operator"]; $result_op = DATABASE_query("SELECT * FROM ".$DB_prefix."operators WHERE operator='$LIVE_operator' AND status='1' AND time>$LIVE_idle ORDER BY id ASC"); if(DATABASE_fetch($result_op)){ $LIVE_online = 1; } } } if(!isset($LIVE_online)){ header("Location: ".$URL_maindir."/lh/live_mail.php?chatid=".$LIVE_uid."&type=m"); } } unset($LIVE_online); ?> <?php echo($COMPANY_name); ?> - <?php echo($LANG_request_lh); ?>
image

$LIVE_idle ORDER BY id ASC"); if(DATABASE_fetch($result_op)){ $$LIVE_department = 1; } } if(isset($$LIVE_department)){ echo(""); }else{ echo(""); } } ?>
".$LIVE_department." - Online
".$LIVE_department." - Offline


>