View Single Post
  #3  
Old 05-01-2007, 01:25 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Append to Weapon (-Complaint Reporter):
Part 2
PHP Code:
function toggleAdminWindow()
{
  if (
this.admin_active)
    
CloseAdminSystem();
  else
    
drawAdminWindow();
}

function 
drawWindow()
{
  new 
GuiWindowCtrl("Reporter_Window")
  {
    
profile = "ZodiacWindowProfile";
    
visible = true;
    
title = true;
    
position = {(screenwidth / 3), (screenheight / 3)};
    
text = "Zodiac Support Center; Submit Ticket - Press [F9] to close";
    
canMaximize = canMinimize = canResize = canClose = false;
    
extent = {400, 360};
    
    new 
GuiScrollCtrl("Reporter_Holder")
    {
      
profile = "GuiBlueScrollProfile";
      
hScrollBar = vScrollBar = "alwaysOff";
      
position = {6, 24};
      
extent = {(400-12), (360-60)};
      
      new 
GuiMLTextCtrl("Reporter_Terms")
      {
        
width = 260;
        
position = {60, 170};
        
profile = "GuiBlueTextProfile";
        
text = thiso.terms;
      }
      
      new 
GuiCheckBoxCtrl("Reporter_AcceptTerms")
      {
          
profile = "GuiBlueCheckBoxProfile";
          
text = "Accept";
          
extent = {52, 15};
          
position = {160, 260};
          
checked = false;
          
thiso.catchevent(this, "onAction", "GenerateCode");
      }
      
      new 
GuiMLTextCtrl("Reporter_Code")
      {
          
profile = "GuiBlueCheckBoxProfile";
          
text = "Please accept the terms for the code";
          
extent = {192, 15};
          
position = {115, 280};
      }
      
      new 
GuiTextCtrl("Reporter_TypeLabel")
      {
        
profile = "GuiBlueTextProfile";
        
position = {24, 40};
        
text = "Category:";
      }
      
      new 
GuiTextCtrl("Reporter_PriorityLabel")
      {
        
profile = "GuiBlueTextProfile";
        
position = {24, 10};
        
text = "Priority:";
      }
      
      new 
GuiTextCtrl("Reporter_DescriptionLabel")
      {
        
profile = "GuiBlueTextProfile";
        
position = {24, 110};
        
text = "Description:";
      }
      
      new 
GuiScrollCtrl("Reporter_DescriptionHolder")
      {
        
profile = "GuiBlueScrollProfile";
        
position = {220, 110};
        
extent = {150, 65};
        
hScrollBar = "alwaysOff";
        
vScrollBar = "dynamic";
        
        new 
GuiMLTextEditCtrl("Reporter_InputDescription")
        {
          
profile = "GuiBlueTextProfile";
          
position = {1, 0};
          
width = 143;
        }
      }

      new 
GuiPopUpMenuCtrl("Reporter_ListSeriousness")
      {
        
profile = "GuiBluePopUpMenuProfile";
        
textprofile = "GuiBlueTextProfile";
        
scrollprofile = "GuiBlueScrollProfile";
        
        
extent = {150, 25};
        
position = {220, 10};
        
clearrows();
        
        for (
temp.rows: thiso.priority_levels)
          
addRow(1, temp.rows);
        
setSelectedRow(2);
      
      }
      
      new 
GuiScrollCtrl("Reporter_InputTypeHolder")
      {
        
profile = "GuiBlueScrollProfile";
        
hScrollBar = "alwaysOff";
        
vScrollBar = "dynamic";
        
extent = {150, 65};
        
position = {220, 40};
        
        new 
GuiTextListCtrl("Reporter_InputTSelections")
        {
          
profile = "GuiBlueTextListProfile";
          
width = 140;
          
fitparentwidth = true;
          
clearrows();
          for (
temp.rows: thiso.complaint_categorys)
            
addRow(0, temp.rows);
          
setSelectedRow(0);
        }
      }
    }
    
      new 
GuiButtonCtrl("Reporter_BtnFAQ")
      {
        
profile = "GuiBlueButtonProfile";
        
position = {6, 327};
        
extent = {65, 25};
        
text = "Read FAQ";
        
thiso.catchevent(this, "onAction", "ViewFAQ");
      }
      new 
GuiButtonCtrl("Reporter_BtnAbout")
      {
        
profile = "GuiBlueButtonProfile";
        
position = {70, 327};
        
extent = {63, 25};
        
text = "About";
        
thiso.catchevent(this, "onAction", "ViewAboutText");
      }
      new 
GuiTextEditCtrl("Reporter_VerifyTextCode1")
      {
        
position = {134, 327};
        
profile = "GuiBlueTextEditProfile";
        
extent = {95, 25};
        
text = "<Insert Code>";
        
thiso.catchevent(this, "onAction", "SubmitComplaint");
      }

      new 
GuiButtonCtrl("Reporter_BtnViewMyTickets")
      {
        
profile = "GuiBlueButtonProfile";
        
position = {230, 327};
        
extent = {90, 25};
        
text = "View My Tickets";
        
thiso.catchevent(this, "onAction", "ViewMyTicketList");
    }
    
      new 
GuiButtonCtrl("Reporter_BtnSubmit")
      {
        
profile = "GuiBlueButtonProfile";
        
position = {320, 327};
        
extent = {75, 25};
        
text = "Submit Ticket";
        
thiso.catchevent(this, "onAction", "SubmitComplaint");
    }
  }
}

function 
drawAdminWindow()
{
  
GetSupportTickets();
  new 
GuiWindowCtrl("AdminCenter_Window")
  {
    
profile = "ZodiacWindowProfile";
    
title = true;
    
position = {(screenwidth / 2), (screenheight / 3)};
    
extent = {400, 345};
    
text = "Zodiac Support Center; Administration Desk - Press [F11] to close";
    
canMaximize = canMinimize = canResize = canClose = false;
    
    new 
GuiScrollCtrl("AdminCenter_Holder")
    {
      
profile = "GuiBlueScrollProfile";
      
hScrollBar = vScrollBar = "alwaysOff";
      
position = {6, 24};
      
extent = {(400-12), 300};
      
      new 
GuiScrollCtrl("AdminCenter_ListHolder")
      {
        
profile = "GuiBlueScrollProfile";
        
extent = {385, 150};
        
hScrollbar = "alwaysOff";
        
vScrollbar = "dynamic";
        
        new 
GuiTextListCtrl("AdminCenter_List")
        {
          
profile = "GuiBlueTextListProfile";
          
columns = "0 25 125 245 320";
          
sortmode = "value";
          
sortorder = "ascending";
          
groupsortorder = "ascending";
          
sortvalue = 1;
          
sort();
          
addRow(-1, "Loading...");
          
thiso.catchevent(this, "onOpenMenu", "OpenMenu");
          
thiso.catchevent(this, "onDblClick", "OpenMenu");
        }
      }
      
      new 
GuiMLTextCtrl("AdminCenter_HelpText")
      {
        
profile = "GuiBlueTextProfile";
        
position = {10, 150};
        
text = thiso.admin_message;
        
width = 360;
      }
    }
  }
}


function 
drawErrorWindow(_title, _message)  // Popup Error Windows
{
  new 
GuiWindowCtrl("ReporterError_Window")
  {
    
profile = "ZodiacWindowProfile";
    
extent = {400, 120};
    
position = {(screenwidth / 3 + random(-20,50)), (screenheight / 3 + random(-20,50))};
    
canMaximize = canMinimize = canResize = canClose = false;
    
title = true;
    
text = "Zodiac Support Center; Error - " @ temp._title;
    
visible = true;
    
    new 
GuiScrollCtrl("ReporterError_Scroll")
    {
      
profile = "GuiBlueScrollProfile";
      
extent = {388, 90};
      
hScrollBar = vScrollBar = "alwaysOff";
      
position = {6, 24};
      
    new 
GuiMLTextCtrl("ReporterError_MessageText")
    {
      
position = {10, 0};
      
width = 370;
      
profile = "GuiBlueTextProfile";
      
text = "<center>" @ temp._message @ "</center>";
    }
    
    new 
GuiButtonCtrl("ReporterError_BtnOk")
    {
      
profile = "GuiBlueButtonProfile";
      
text = "Ok";
      
position = {135, 60};
      
extent = {100, 25};
      
thiso.catchevent(this, "onAction", "CloseErrorWindow");
      }
      
    }
  }
}

function 
ViewMyTicketList()
{
  
GetMySupportTickets();
  
  new 
GuiWindowCtrl("SupportCenter_MyTicketsWin")
  {
    
profile = "ZodiacWindowProfile";
    
title = true;
    
extent = {400, 335};
    
text = "Zodiac Support Center; My Tickets";
    
visible = true;
    
canMaximize = canResize = canMinimize = false;
    
position = {(GraalControl.width - this.width) /2, (GraalControl.height - this.height)/2};
    
    new 
GuiScrollCtrl("SupportCenter_MyTicketsScrl")
    {
      
position = {6, 24};
      
profile = "GuiBlueScrollProfile";
      
extent = {(400-12), 280};
      
hScrollbar = vScrollBar = "alwaysOff";
      
      new 
GuiScrollCtrl("SupportCenter_TicketListHolder")
      {
        
profile = "GuiBlueScrollProfile";
        
extent = {385, 150};
        
hScrollbar = "alwaysOff";
        
vScrollbar = "dynamic";
        
        new 
GuiTextListCtrl("SupportCenter_MyTicketList")
        {
          
profile = "GuiBlueTextListProfile";
          
columns = "0 25 125 245 320";
          
clearRows();
          
addRow(-1, "Loading...");
          
thiso.catchevent(this, "onOpenMenu", "OpenMenu2");
          
thiso.catchevent(this, "onDblClick", "OpenMenu2");
        }
      }
    }
    
    new 
GuiButtonCtrl("SupportCenter_MyTicketsClose")
    {
      
profile = "GuiBlueButtonProfile";
      
text = "Close";
      
position = {160, 305};
      
extent = {70, 25};
      
thiso.catchevent(this, "onAction", "CloseMyTickets");
    }
  }
}

function 
CloseMyTickets()
  (
"SupportCenter_MyTicketsWin").destroy(); 
Reply With Quote