HEX
Server: LiteSpeed
System: Linux sv4.hami.host 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64
User: armgroup (1008)
PHP: 8.2.32
Disabled: show_source, system, shell_exec, passthru, exec, popen, proc_open, mail, socket_create, socket_create_listen, socket_create_pair, link, dl, openlog, syslog, stream_socket_server, curl_multi_init
Upload Files
File: /home/armgroup/libs/vendor/melipayamak/php/src/Ticket.php
<?php

namespace Melipayamak;


class Ticket
{
	
	protected $username;
	
	protected $password;
	
	protected $client;
	
	const PATH = 'http://api.payamak-panel.com/post/Tickets.asmx?wsdl';
	
	public function __construct($username,$password)
	{
		
		
		if (is_null($username)||is_null($password)) {
			
			die('username/password is empty');
			
			exit;
			
		}
		
		ini_set("soap.wsdl_cache_enabled", "0");
		
		$this->username = $username;
		
		$this->password = $password;
		
		$this->client = new \SoapClient(self::PATH);
		
	}
	
	public function add($title,$content,$aws=true)
	{
		
		$result = $this->client->AddTicket([   
		'username' => $this->username,
		'password' => $this->password,
		'title'=>$title,
		'content' =>$content,
		'alertWithSms'=> $aws
		]
		)->AddTicketResult;
		
		return $result;
		
	}
	
	public function getReceived($ticketOwner,$ticketType,$keyword)
	{
		
		
		$result = $this->client->GetReceivedTickets([   
		'username' => $this->username,
		'password' => $this->password,
		'ticketOwner'=>$ticketOwner,
		'ticketType' =>$ticketType,
		'keyword'=> $keyword
		]
		)->GetReceivedTicketsResult;
		
		return $result;
		
	}
	
	public function getReceivedCount($ticketType)
	{
		
		$result = $this->client->GetReceivedTicketsCount([   
		'username' => $this->username,
		'password' => $this->password,
		'ticketType' =>$ticketType,
		]
		)->GetReceivedTicketsCountResult;
		
		return $result;
		
	}
	
	public function getSent($ticketOwner,$ticketType,$keyword)
	{
		
		
		$result = $this->client->GetSentTickets([   
		'username' => $this->username,
		'password' => $this->password,
		'ticketOwner'=>$ticketOwner,
		'ticketType' =>$ticketType,
		'keyword'=> $keyword
		]
		)->GetSentTicketsResult;
		
		return $result;
		
	}
	
	public function getSentCount($ticketType)
	{
		
		$result = $this->client->GetSentTicketsCount([   
		'username' => $this->username,
		'password' => $this->password,
		'ticketType' =>$ticketType,
		]
		)->GetSentTicketsCountResult;
		
		return $result;
		
	}
	
	public function response($ticketId,$type,$content,$alertWithSms=true)
	{
		
		$result = $this->client->ResponseTicket([   
		'username' => $this->username,
		'password' => $this->password,
		'ticketType' =>$ticketType,
		'type'=> $type,
		'content'=> $content,
		'alertWithSms'=> $alertWithSms
		]
		)->ResponseTicketResult;
		
		return $result;
		
	}
	
	
}