1. PHP / Говнокод #6046

    +160

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    ##### grab the full name of the agent
    		$stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended,user_group,vicidial_recording_override,alter_custphone_override,alert_enabled,agent_shift_enforcement_override,shift_override_flag,allow_alerts,closer_campaigns,agent_choose_territories,custom_one,custom_two,custom_three,custom_four,custom_five from vicidial_users where user='$VD_login' and pass='$VD_pass'";
    		$rslt=mysql_query($stmt, $link);
    			if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01007',$VD_login,$server_ip,$session_name,$one_mysql_log);}
    		$row=mysql_fetch_row($rslt);
    		$LOGfullname =							$row[0];
    		$user_level =							$row[1];
    		$VU_hotkeys_active =					$row[2];
    		$VU_agent_choose_ingroups =				$row[3];
    		$VU_scheduled_callbacks =				$row[4];
    		$agentonly_callbacks =					$row[5];
    		$agentcall_manual =						$row[6];
    		$VU_vicidial_recording =				$row[7];
    		$VU_vicidial_transfers =				$row[8];
    		$VU_closer_default_blended =			$row[9];
    		$VU_user_group =						$row[10];
    		$VU_vicidial_recording_override =		$row[11];
    		$VU_alter_custphone_override =			$row[12];
    		$VU_alert_enabled =						$row[13];
    		$VU_agent_shift_enforcement_override =	$row[14];
    		$VU_shift_override_flag =				$row[15];
    		$VU_allow_alerts =						$row[16];
    		$VU_closer_campaigns =					$row[17];
    		$VU_agent_choose_territories =			$row[18];
    		$VU_custom_one =						$row[19];
    		$VU_custom_two =						$row[20];
    		$VU_custom_three =						$row[21];
    		$VU_custom_four =						$row[22];
    		$VU_custom_five =						$row[23];
    
    		if ( ($VU_alert_enabled > 0) and ($VU_allow_alerts > 0) ) {$VU_alert_enabled = 'ON';}
    		else {$VU_alert_enabled = 'OFF';}
    		$AgentAlert_allowed = $VU_allow_alerts;
    
    		### Gather timeclock and shift enforcement restriction settings
    		$stmt="SELECT forced_timeclock_login,shift_enforcement,group_shifts,agent_status_viewable_groups,agent_status_view_time from vicidial_user_groups where user_group='$VU_user_group';";
    		$rslt=mysql_query($stmt, $link);
    			if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01052',$VD_login,$server_ip,$session_name,$one_mysql_log);}
    		$row=mysql_fetch_row($rslt);
    		$forced_timeclock_login =	$row[0];
    		$shift_enforcement =		$row[1];
    		$LOGgroup_shiftsSQL = eregi_replace('  ','',$row[2]);
    		$LOGgroup_shiftsSQL = eregi_replace(' ',"','",$LOGgroup_shiftsSQL);
    		$LOGgroup_shiftsSQL = "shift_id IN('$LOGgroup_shiftsSQL')";
    		$agent_status_viewable_groups = $row[3];
    		$agent_status_viewable_groupsSQL = eregi_replace('  ','',$agent_status_viewable_groups);
    		$agent_status_viewable_groupsSQL = eregi_replace(' ',"','",$agent_status_viewable_groupsSQL);
    		$agent_status_viewable_groupsSQL = "user_group IN('$agent_status_viewable_groupsSQL')";
    		$agent_status_view = 0;
    		if (strlen($agent_status_viewable_groups) > 2)
    			{$agent_status_view = 1;}
    		$agent_status_view_time=0;
    		if ($row[4] == 'Y')
    			{$agent_status_view_time=1;}

    Оказывается, у меня на работе стоит чуть переделанный VICIdial.
    Это звездец.

    Запостил: 7ion, 20 Марта 2011

    Комментарии (11) RSS

    Добавить комментарий