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 = {400360};
    
    new 
GuiScrollCtrl("Reporter_Holder")
    {
      
profile "GuiBlueScrollProfile";
      
hScrollBar vScrollBar "alwaysOff";
      
position = {624};
      
extent = {(400-12), (360-60)};
      
      new 
GuiMLTextCtrl("Reporter_Terms")
      {
        
width 260;
        
position = {60170};
        
profile "GuiBlueTextProfile";
        
text thiso.terms;
      }
      
      new 
GuiCheckBoxCtrl("Reporter_AcceptTerms")
      {
          
profile "GuiBlueCheckBoxProfile";
          
text "Accept";
          
extent = {5215};
          
position = {160260};
          
checked false;
          
thiso.catchevent(this"onAction""GenerateCode");
      }
      
      new 
GuiMLTextCtrl("Reporter_Code")
      {
          
profile "GuiBlueCheckBoxProfile";
          
text "Please accept the terms for the code";
          
extent = {19215};
          
position = {115280};
      }
      
      new 
GuiTextCtrl("Reporter_TypeLabel")
      {
        
profile "GuiBlueTextProfile";
        
position = {2440};
        
text "Category:";
      }
      
      new 
GuiTextCtrl("Reporter_PriorityLabel")
      {
        
profile "GuiBlueTextProfile";
        
position = {2410};
        
text "Priority:";
      }
      
      new 
GuiTextCtrl("Reporter_DescriptionLabel")
      {
        
profile "GuiBlueTextProfile";
        
position = {24110};
        
text "Description:";
      }
      
      new 
GuiScrollCtrl("Reporter_DescriptionHolder")
      {
        
profile "GuiBlueScrollProfile";
        
position = {220110};
        
extent = {15065};
        
hScrollBar "alwaysOff";
        
vScrollBar "dynamic";
        
        new 
GuiMLTextEditCtrl("Reporter_InputDescription")
        {
          
profile "GuiBlueTextProfile";
          
position = {10};
          
width 143;
        }
      }

      new 
GuiPopUpMenuCtrl("Reporter_ListSeriousness")
      {
        
profile "GuiBluePopUpMenuProfile";
        
textprofile "GuiBlueTextProfile";
        
scrollprofile "GuiBlueScrollProfile";
        
        
extent = {15025};
        
position = {22010};
        
clearrows();
        
        for (
temp.rowsthiso.priority_levels)
          
addRow(1temp.rows);
        
setSelectedRow(2);
      
      }
      
      new 
GuiScrollCtrl("Reporter_InputTypeHolder")
      {
        
profile "GuiBlueScrollProfile";
        
hScrollBar "alwaysOff";
        
vScrollBar "dynamic";
        
extent = {15065};
        
position = {22040};
        
        new 
GuiTextListCtrl("Reporter_InputTSelections")
        {
          
profile "GuiBlueTextListProfile";
          
width 140;
          
fitparentwidth true;
          
clearrows();
          for (
temp.rowsthiso.complaint_categorys)
            
addRow(0temp.rows);
          
setSelectedRow(0);
        }
      }
    }
    
      new 
GuiButtonCtrl("Reporter_BtnFAQ")
      {
        
profile "GuiBlueButtonProfile";
        
position = {6327};
        
extent = {6525};
        
text "Read FAQ";
        
thiso.catchevent(this"onAction""ViewFAQ");
      }
      new 
GuiButtonCtrl("Reporter_BtnAbout")
      {
        
profile "GuiBlueButtonProfile";
        
position = {70327};
        
extent = {6325};
        
text "About";
        
thiso.catchevent(this"onAction""ViewAboutText");
      }
      new 
GuiTextEditCtrl("Reporter_VerifyTextCode1")
      {
        
position = {134327};
        
profile "GuiBlueTextEditProfile";
        
extent = {9525};
        
text "<Insert Code>";
        
thiso.catchevent(this"onAction""SubmitComplaint");
      }

      new 
GuiButtonCtrl("Reporter_BtnViewMyTickets")
      {
        
profile "GuiBlueButtonProfile";
        
position = {230327};
        
extent = {9025};
        
text "View My Tickets";
        
thiso.catchevent(this"onAction""ViewMyTicketList");
    }
    
      new 
GuiButtonCtrl("Reporter_BtnSubmit")
      {
        
profile "GuiBlueButtonProfile";
        
position = {320327};
        
extent = {7525};
        
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 = {400345};
    
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 = {624};
      
extent = {(400-12), 300};
      
      new 
GuiScrollCtrl("AdminCenter_ListHolder")
      {
        
profile "GuiBlueScrollProfile";
        
extent = {385150};
        
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 = {10150};
        
text thiso.admin_message;
        
width 360;
      }
    }
  }
}


function 
drawErrorWindow(_title_message)  // Popup Error Windows
{
  new 
GuiWindowCtrl("ReporterError_Window")
  {
    
profile "ZodiacWindowProfile";
    
extent = {400120};
    
position = {(screenwidth random(-20,50)), (screenheight 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 = {38890};
      
hScrollBar vScrollBar "alwaysOff";
      
position = {624};
      
    new 
GuiMLTextCtrl("ReporterError_MessageText")
    {
      
position = {100};
      
width 370;
      
profile "GuiBlueTextProfile";
      
text "<center>" temp._message "</center>";
    }
    
    new 
GuiButtonCtrl("ReporterError_BtnOk")
    {
      
profile "GuiBlueButtonProfile";
      
text "Ok";
      
position = {13560};
      
extent = {10025};
      
thiso.catchevent(this"onAction""CloseErrorWindow");
      }
      
    }
  }
}

function 
ViewMyTicketList()
{
  
GetMySupportTickets();
  
  new 
GuiWindowCtrl("SupportCenter_MyTicketsWin")
  {
    
profile "ZodiacWindowProfile";
    
title true;
    
extent = {400335};
    
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 = {624};
      
profile "GuiBlueScrollProfile";
      
extent = {(400-12), 280};
      
hScrollbar vScrollBar "alwaysOff";
      
      new 
GuiScrollCtrl("SupportCenter_TicketListHolder")
      {
        
profile "GuiBlueScrollProfile";
        
extent = {385150};
        
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 = {160305};
      
extent = {7025};
      
thiso.catchevent(this"onAction""CloseMyTickets");
    }
  }
}

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