Do not let any software impress you!

Only let it convince your intellect.
Slider img 1
Do not look for a business paradise!

It is a waste of time.
Slider img 2
Only yourself can push you uphill.

There is no easy road to prizes.
Slider img 3
Productivity is the name of the game.

And you have to conquer it.
Slider img 4
As long as you understand it,

you will start to build your know-how.
Slider img 5
We can help with that.

We have the tools and the method.
Slider img 6
Procedure : AU_TELCONSOLE_EXPERT

AutoScript

start_agent_info
   AgentName = "AU_TELCONSOLE_EXPERT"
   AgentDescr = "Telephony Console Expert"
   PR_FNAME = ""
   PR_TNAME = ""
   AgentLanguage = ""
   __timer_interval =   {....define (in seconds) the timer interval for the wake up}
   __delete_on_termination = 0 {....1=the agent frees itself when terminates its task}
end_agent_info

start_action

     user_mode = __params[1]

     __create_html = 1
     __html_type = "BOXGRID"
     
     {.........................................................TELEPHONY CONSOLE}
     if (user_mode = "NORMAL") then

        caption         = "Tel Console"                
        field_count = 5                                
        letter_row_flag = True
        box_margin = 10
        box_width = 200
        box_height = 200
                                                
        caption_height = 20
        field_top = 30
        field_left = 5
        field_height = 20
        field_width = 200

        start_sql "*" "KOSMOS"                
         SELECT * FROM AU_USER
         WHERE (TEL_INT <> "") AND (TEL_INT IS NOT NULL)
         ORDER BY UNAME
        end_sql
        q = QueryByName()
        call TExecute(q)
        box_count = TRecordCount(q)
        call TFirst(q)
        for i = 1 to box_count
         uvalue[i] = TGetFld(q,"AU_USER")
         caption[i] = TGetFld(q,"UNAME")
         field1[i] = TGetFld(q,"ITSTATUS_D")
         field2[i] = TGetFld(q,"AU_USER")
         field3[i] = TGetFld(q,"TEL_INT")
         field4[i] = TGetFld(q,"EMAIL")
         field5[i] = TGetFld(q,"MYSTATUS")
         field6[i] = TGetFld(q,"DENYCALLS")
         field7[i] = TGetFld(q,"DENYVISITS")
         field8[i] = TGetFld(q,"DENYCHAT")
         status_id = TGetFld(q,"ITSTATUS_ID")

         bcolor[i] = 0
         bcolor1[i] = 0
         bcolor2[i] = 0

         if (status_id = 0) then
         bcolor[i] = StringToColor("clWhite")
         elseif (status_id = 1) then
         bcolor[i] = StringToColor("clRed")
         elseif (status_id = 2) then
         bcolor[i] = StringToColor("clRed")
         elseif (status_id = 4) then
         bcolor[i] = StringToColor("clWhite")
         elseif (status_id = 8) then
         bcolor[i] = StringToColor("clGreen")
         elseif (status_id = 9) then
         bcolor1[i] = StringToColor("clRed")
         bcolor2[i] = StringToColor("clGreen")
         elseif (status_id = 16) then
         bcolor[i] = StringToColor("clRed")
         elseif (status_id = 17) then
         bcolor1[i] = StringToColor("clRed")
         bcolor2[i] = StringToColor("clYellow")
         endif

         call TNext(q)
        next
        call FreeEmbSQL(q)

        image_count = 0
        image_top = 120
        image_left = 5
        image_height = 32
        image_width = 32
        image_name1 = "[RESOURCE]\bbclose.bmp"
        image_name2 = "[RESOURCE]\bbhelp.bmp"
        image_name3 = "[RESOURCE]\bbcancel.bmp"

        button_top = 150
        button_left = 5
        button_height = 40
        button_width = 40

        button_count = 4
        button_caption1 = "G"
        button_caption2 = "L"
        button_caption3 = "P"
        button_caption4 = "A"
        button_hint1 = "Assosiate's Picture at a glance!"
        button_hint2 = "Loggin to Assosiate's Workstation"
        button_hint3 = "User's Profile"
        button_hint4 = "User's Activities"

        start_autoscript "button_onclick1"
         user_id = __params[1]
         user_name = SelectFrom("SELECT UNAME FROM AU_USER WHERE (AU_USER=",user_id,")")
         call OpenMetrics("AU_ATAGLANCE_EXPERT",user_name)
        end_autoscript

        start_autoscript "button_onclick2"
         user_id = __params[1]
         call ChangeTerminalUser(user_id)
        end_autoscript

        start_autoscript "button_onclick3"
         user_id = __params[1]
         expr = strcat(user_id,"=AU_USER")
         call OpenFormTop("ptEdit","AU_USER_E01.FM","WORK.AU_USER",1,expr)
        end_autoscript

        start_autoscript "button_onclick4"
         user_id = __params[1]
         user_name = SelectFrom("SELECT UNAME FROM AU_USER WHERE (AU_USER=",user_id,")")
         call OpenFormTop("ptBrowse","AU_BPM_JOBS1.FM","QRY.DATA","SHOW",user_name)
        end_autoscript
                                
        result = "ok"
        return                                
     endif

end_action