View Single Post
  #5  
Old 05-01-2007, 01:27 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 4
PHP Code:
function SubmitComplaint(){
  
temp.description = ("Reporter_InputDescription").getText();
  
temp.seriousness = ("Reporter_ListSeriousness").getSelectedText();
  
temp.category = ("Reporter_InputTSelections").getSelectedText();
  
temp.checkbox = ("Reporter_AcceptTerms").checked;
  
  if (!
temp.checkbox)
    return 
drawErrorWindow("Terms""You must agree to the terms before you can submit a complaint");
    
  if (!
CheckCode()) 
    return 
drawErrorWindow("Wrong Code""You have entered the wrong verification code, please try again.");
    
  if (
temp.description.length() < this.description_minimum || temp.description.length() > this.description_maximum)
    return 
drawErrorWindow("Description"format("Your description must be over %i characters, but under %i characters."this.description_minimumthis.description_maximum));

  
triggerServer("weapon"name"RegisterComplaint"player.accounttemp.categorytemp.seriousnesstemp.description);
  
CloseSystem();
  
player.chat "Your complaint was sent, but it may not have been received.";
}

function 
ClearTicketsList(){
  
temp.listcontrol makevar("AdminCenter_List");
  
temp.listcontrol.clearrows();
}

function 
ClearMyTicketsList(){
  
temp.listcontrol makevar("SupportCenter_MyTicketList");
  
temp.listcontrol.clearrows();
}
function 
RefreshTicketsList(ticketsidlist){

  
ClearTicketsList();
  
temp.listcontrol makevar("AdminCenter_List");
  
temp.listcontrol.addRow(-1"ID" TAB "Submitter" TAB "Category" TAB "Priority" TAB "Status");
  
  for (
temp.0temp.temp.tickets.size(); temp.i++)
  {
    if (
temp.tickets[temp.i][0] == null) continue;
      
temp.listcontrol.addRow(temp.idlist[temp.i], temp.idlist[temp.iTAB temp.tickets[temp.i][0TAB temp.tickets[temp.i][1TAB temp.tickets[temp.i][2TAB temp.tickets[temp.i][4]);
  }
  
  
temp.idlist.clear();
}

function 
RefreshMyTicketsList(ticketsidlist){
  
ClearMyTicketsList();
  
temp.listcontrol makevar("SupportCenter_MyTicketList");
  
temp.listcontrol.addRow(-1"ID" TAB "Category" TAB "Priority" TAB "Status" TAB "Responses");
  
  for (
temp.0temp.temp.tickets.size(); temp.i++)
  {
    if (
temp.tickets[temp.i][0] == null) continue;
      
temp.listcontrol.addRow(temp.idlist[temp.i], temp.idlist[temp.iTAB temp.tickets[temp.i][1TAB temp.tickets[temp.i][2TAB temp.tickets[temp.i][4TAB int(temp.tickets[temp.i][5]));
  }
  
  
temp.idlist.clear();
}

function 
GetSupportTicket(id)
  
triggerServer("weapon"name"GetSupportTicket"temp.id);
  
function 
GetSupportTickets()
  
triggerServer("weapon"name"GetSupportTickets");

function 
GetMySupportTickets()
  
triggerServer("weapon"name"GetMySupportTickets");

function 
CloseSystem()
{
  
makevar("ReporterError_Window").destroy();
  
makevar("Reporter_Window").destroy();
}

function 
CloseAdminSystem()
{
  
makevar("AdminCenter_Window").destroy();
  
makevar("ReporterError_Window").destroy();
}

function 
toggleTicket(id)
{
  
temp.id temp.id.substring(("SupportTicket_BtnCloseTicket-").length());
  
ToggleTicketStatus(temp.id);
}

function 
CloseTicketWindow(control)
  
temp.control.parent.destroy();

function 
DeleteTicket(idfromplayer)
{
  
temp.did temp.id.substring(("SupportTicket_BtnDeleteTicket-").length());
  
triggerServer("weapon"name"DeleteTicket"temp.did);
  
  if (
temp.fromplayer)
    
GetMySupportTickets();
  else
    
GetSupportTickets();
    
  
temp.id.parent.destroy();
}

function 
CloseErrorWindow()
  
makevar("ReporterError_Window").destroy();

function 
ToggleTicketStatus(id)
{
  
triggerServer("weapon"name"toggleTicketStatus"temp.id);
  
GetSupportTickets();

Reply With Quote