BUG 9688 Plugin Updates dont work when proxy is required SOLVED
- There are not way to set the proxy to use - Added settings for the proxy in ProcessMaker
This commit is contained in:
@@ -197,6 +197,22 @@ class soapNtlm {
|
|||||||
curl_setopt($this->ch, CURLOPT_HTTPAUTH, CURLAUTH_NTLM);
|
curl_setopt($this->ch, CURLOPT_HTTPAUTH, CURLAUTH_NTLM);
|
||||||
//curl_setopt($this->ch, CURLOPT_USERPWD, $this->options['auth']); // Hugo's code
|
//curl_setopt($this->ch, CURLOPT_USERPWD, $this->options['auth']); // Hugo's code
|
||||||
curl_setopt($this->ch, CURLOPT_USERPWD, $this->getuser().':'.$this->getpassword());// Ankit's code
|
curl_setopt($this->ch, CURLOPT_USERPWD, $this->getuser().':'.$this->getpassword());// Ankit's code
|
||||||
|
|
||||||
|
//Apply proxy settings
|
||||||
|
if (class_exists('System')) {
|
||||||
|
$sysConf = System::getSystemConfiguration();
|
||||||
|
if ($sysConf['proxy_host'] != '') {
|
||||||
|
curl_setopt($this->ch, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
|
||||||
|
if ($sysConf['proxy_port'] != '') {
|
||||||
|
curl_setopt($this->ch, CURLOPT_PROXYPORT, $sysConf['proxy_port']);
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_user'] != '') {
|
||||||
|
curl_setopt($this->ch, CURLOPT_PROXYUSERPWD, $sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : ''));
|
||||||
|
}
|
||||||
|
curl_setopt($this->ch, CURLOPT_HTTPHEADER, array('Expect:'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
echo $this->buffer = curl_exec($this->ch);
|
echo $this->buffer = curl_exec($this->ch);
|
||||||
|
|
||||||
//echo "[NTLMStream::createBuffer] buffer size : " . strlen($this->buffer) . "bytes<br>";
|
//echo "[NTLMStream::createBuffer] buffer size : " . strlen($this->buffer) . "bytes<br>";
|
||||||
@@ -229,6 +245,22 @@ class NTLMSoapClient extends SoapClient {
|
|||||||
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_NTLM);
|
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_NTLM);
|
||||||
//curl_setopt($ch, CURLOPT_USERPWD, $this->options['auth']); //Hugo's Code
|
//curl_setopt($ch, CURLOPT_USERPWD, $this->options['auth']); //Hugo's Code
|
||||||
curl_setopt($ch, CURLOPT_USERPWD, $this->user.':'.$this->password); //Ankit's Code
|
curl_setopt($ch, CURLOPT_USERPWD, $this->user.':'.$this->password); //Ankit's Code
|
||||||
|
|
||||||
|
//Apply proxy settings
|
||||||
|
if (class_exists('System')) {
|
||||||
|
$sysConf = System::getSystemConfiguration();
|
||||||
|
if ($sysConf['proxy_host'] != '') {
|
||||||
|
curl_setopt($ch, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
|
||||||
|
if ($sysConf['proxy_port'] != '') {
|
||||||
|
curl_setopt($ch, CURLOPT_PROXYPORT, $sysConf['proxy_port']);
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_user'] != '') {
|
||||||
|
curl_setopt($ch, CURLOPT_PROXYUSERPWD, $sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : ''));
|
||||||
|
}
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$response = curl_exec($ch);
|
$response = curl_exec($ch);
|
||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
|
|||||||
@@ -32,8 +32,36 @@ class dashletRssReader implements DashletInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function render ($width = 300) {
|
public function render ($width = 300) {
|
||||||
$self->url = $this->urlFrom;
|
$pCurl = curl_init();
|
||||||
$self->rss = @simplexml_load_file($self->url);
|
curl_setopt($pCurl, CURLOPT_URL, $this->urlFrom);
|
||||||
|
curl_setopt($pCurl, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
curl_setopt($pCurl, CURLOPT_FOLLOWLOCATION, false);
|
||||||
|
curl_setopt($pCurl, CURLOPT_AUTOREFERER, true);
|
||||||
|
//To avoid SSL error
|
||||||
|
curl_setopt($pCurl, CURLOPT_SSL_VERIFYHOST, 0);
|
||||||
|
curl_setopt($pCurl, CURLOPT_SSL_VERIFYPEER, 0);
|
||||||
|
|
||||||
|
//To avoid timeouts
|
||||||
|
curl_setopt($pCurl, CURLOPT_CONNECTTIMEOUT, 10);
|
||||||
|
curl_setopt($pCurl, CURLOPT_TIMEOUT, 20);
|
||||||
|
|
||||||
|
curl_setopt($pCurl, CURLOPT_NOPROGRESS, false);
|
||||||
|
curl_setopt($pCurl, CURLOPT_VERBOSE, true);
|
||||||
|
|
||||||
|
//Apply proxy settings
|
||||||
|
$sysConf = System::getSystemConfiguration();
|
||||||
|
if ($sysConf['proxy_host'] != '') {
|
||||||
|
curl_setopt($pCurl, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
|
||||||
|
if ($sysConf['proxy_port'] != '') {
|
||||||
|
curl_setopt($pCurl, CURLOPT_PROXYPORT, $sysConf['proxy_port']);
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_user'] != '') {
|
||||||
|
curl_setopt($pCurl, CURLOPT_PROXYUSERPWD, $sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : ''));
|
||||||
|
}
|
||||||
|
curl_setopt($pCurl, CURLOPT_HTTPHEADER, array('Expect:'));
|
||||||
|
}
|
||||||
|
|
||||||
|
$self->rss = @simplexml_load_string(curl_exec($pCurl));
|
||||||
if($self->rss)
|
if($self->rss)
|
||||||
{
|
{
|
||||||
$index= 0;
|
$index= 0;
|
||||||
|
|||||||
@@ -3334,7 +3334,21 @@ class Processes {
|
|||||||
global $client;
|
global $client;
|
||||||
$endpoint = PML_WSDL_URL;
|
$endpoint = PML_WSDL_URL;
|
||||||
$sessionId = '';
|
$sessionId = '';
|
||||||
$client = new SoapClient( $endpoint );
|
$proxy = array();
|
||||||
|
$sysConf = System::getSystemConfiguration();
|
||||||
|
if ($sysConf['proxy_host'] != '') {
|
||||||
|
$proxy['proxy_host'] = $sysConf['proxy_host'];
|
||||||
|
if ($sysConf['proxy_port'] != '') {
|
||||||
|
$proxy['proxy_port'] = $sysConf['proxy_port'];
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_user'] != '') {
|
||||||
|
$proxy['proxy_login'] = $sysConf['proxy_user'];
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_pass'] != '') {
|
||||||
|
$proxy['proxy_password'] = $sysConf['proxy_pass'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$client = new SoapClient($endpoint, $proxy);
|
||||||
|
|
||||||
$params = array('userid'=>$user, 'password'=>$pass );
|
$params = array('userid'=>$user, 'password'=>$pass );
|
||||||
$result = $client->__SoapCall('login', array($params));
|
$result = $client->__SoapCall('login', array($params));
|
||||||
@@ -3359,10 +3373,24 @@ class Processes {
|
|||||||
$endpoint = PML_WSDL_URL;
|
$endpoint = PML_WSDL_URL;
|
||||||
$sessionId = '';
|
$sessionId = '';
|
||||||
ini_set("soap.wsdl_cache_enabled", "0"); // enabling WSDL cache
|
ini_set("soap.wsdl_cache_enabled", "0"); // enabling WSDL cache
|
||||||
try{
|
try {
|
||||||
$client = @new SoapClient( $endpoint );
|
$proxy = array();
|
||||||
}catch (Exception $e){
|
$sysConf = System::getSystemConfiguration();
|
||||||
throw ( new Exception ( $e->message ) );
|
if ($sysConf['proxy_host'] != '') {
|
||||||
|
$proxy['proxy_host'] = $sysConf['proxy_host'];
|
||||||
|
if ($sysConf['proxy_port'] != '') {
|
||||||
|
$proxy['proxy_port'] = $sysConf['proxy_port'];
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_user'] != '') {
|
||||||
|
$proxy['proxy_login'] = $sysConf['proxy_user'];
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_pass'] != '') {
|
||||||
|
$proxy['proxy_password'] = $sysConf['proxy_pass'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$client = @new SoapClient($endpoint, $proxy);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
throw ( new Exception ( $e->message ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -3378,7 +3406,21 @@ class Processes {
|
|||||||
global $client;
|
global $client;
|
||||||
|
|
||||||
$endpoint = PML_WSDL_URL;
|
$endpoint = PML_WSDL_URL;
|
||||||
$client = new SoapClient( $endpoint );
|
$proxy = array();
|
||||||
|
$sysConf = System::getSystemConfiguration();
|
||||||
|
if ($sysConf['proxy_host'] != '') {
|
||||||
|
$proxy['proxy_host'] = $sysConf['proxy_host'];
|
||||||
|
if ($sysConf['proxy_port'] != '') {
|
||||||
|
$proxy['proxy_port'] = $sysConf['proxy_port'];
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_user'] != '') {
|
||||||
|
$proxy['proxy_login'] = $sysConf['proxy_user'];
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_pass'] != '') {
|
||||||
|
$proxy['proxy_password'] = $sysConf['proxy_pass'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$client = new SoapClient($endpoint, $proxy);
|
||||||
|
|
||||||
$sessionId = '';
|
$sessionId = '';
|
||||||
$params = array('sessionId'=>$sessionId );
|
$params = array('sessionId'=>$sessionId );
|
||||||
@@ -3433,7 +3475,21 @@ class Processes {
|
|||||||
global $client;
|
global $client;
|
||||||
|
|
||||||
$endpoint = PML_WSDL_URL;
|
$endpoint = PML_WSDL_URL;
|
||||||
$client = new SoapClient( $endpoint );
|
$proxy = array();
|
||||||
|
$sysConf = System::getSystemConfiguration();
|
||||||
|
if ($sysConf['proxy_host'] != '') {
|
||||||
|
$proxy['proxy_host'] = $sysConf['proxy_host'];
|
||||||
|
if ($sysConf['proxy_port'] != '') {
|
||||||
|
$proxy['proxy_port'] = $sysConf['proxy_port'];
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_user'] != '') {
|
||||||
|
$proxy['proxy_login'] = $sysConf['proxy_user'];
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_pass'] != '') {
|
||||||
|
$proxy['proxy_password'] = $sysConf['proxy_pass'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$client = new SoapClient($endpoint, $proxy);
|
||||||
|
|
||||||
$sessionId = '';
|
$sessionId = '';
|
||||||
$params = array('sessionId'=>$sessionId , 'processId'=> $proId);
|
$params = array('sessionId'=>$sessionId , 'processId'=> $proId);
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class serverConf {
|
|||||||
private $pmVersion;
|
private $pmVersion;
|
||||||
private $pmProduct = 'PMCE';
|
private $pmProduct = 'PMCE';
|
||||||
private $nextBeatDate;
|
private $nextBeatDate;
|
||||||
var $logins;
|
public $logins;
|
||||||
private $lanDirection;
|
private $lanDirection;
|
||||||
private $lanLanguage;
|
private $lanLanguage;
|
||||||
public $workspaces = array();
|
public $workspaces = array();
|
||||||
@@ -402,7 +402,7 @@ class serverConf {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function isRtl ($lang = SYS_LANG) {
|
function isRtl ($lang = SYS_LANG) {
|
||||||
$lang = substr($lang, 0, 2);
|
$lang = substr($lang, 0, 2);
|
||||||
return in_array($lang, $this->rtlLang);
|
return in_array($lang, $this->rtlLang);
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface to the Solr Search server
|
* Interface to the Solr Search server
|
||||||
* @author Herbert Saal Gutierrez
|
* @author Herbert Saal Gutierrez
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -33,14 +33,14 @@ class BpmnEngine_SearchIndexAccess_Solr
|
|||||||
const SOLR_VERSION = '&version=2.2';
|
const SOLR_VERSION = '&version=2.2';
|
||||||
private $_solrIsEnabled = false;
|
private $_solrIsEnabled = false;
|
||||||
private $_solrHost = "";
|
private $_solrHost = "";
|
||||||
|
|
||||||
public function __construct($solrIsEnabled = false, $solrHost = "")
|
public function __construct($solrIsEnabled = false, $solrHost = "")
|
||||||
{
|
{
|
||||||
// use the parameters to initialize class
|
// use the parameters to initialize class
|
||||||
$this->_solrIsEnabled = $solrIsEnabled;
|
$this->_solrIsEnabled = $solrIsEnabled;
|
||||||
$this->_solrHost = $solrHost;
|
$this->_solrHost = $solrHost;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Verify if the Solr service is available
|
* Verify if the Solr service is available
|
||||||
* @gearman = false
|
* @gearman = false
|
||||||
@@ -52,10 +52,10 @@ class BpmnEngine_SearchIndexAccess_Solr
|
|||||||
public function isEnabled()
|
public function isEnabled()
|
||||||
{
|
{
|
||||||
// verify solr server response
|
// verify solr server response
|
||||||
|
|
||||||
return $this->_solrIsEnabled;
|
return $this->_solrIsEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the total number of indexed documents
|
* Returns the total number of indexed documents
|
||||||
* @gearman = false
|
* @gearman = false
|
||||||
@@ -71,19 +71,33 @@ class BpmnEngine_SearchIndexAccess_Solr
|
|||||||
if (! $this->_solrIsEnabled)
|
if (! $this->_solrIsEnabled)
|
||||||
return;
|
return;
|
||||||
// get configuration information in base to workspace parameter
|
// get configuration information in base to workspace parameter
|
||||||
|
|
||||||
// get total number of documents in registry
|
// get total number of documents in registry
|
||||||
$solrIntruct = (substr ($this->_solrHost, - 1) == "/") ? $this->_solrHost : $this->_solrHost . "/";
|
$solrIntruct = (substr ($this->_solrHost, - 1) == "/") ? $this->_solrHost : $this->_solrHost . "/";
|
||||||
$solrIntruct .= $workspace;
|
$solrIntruct .= $workspace;
|
||||||
$solrIntruct .= "/select/?q=*:*";
|
$solrIntruct .= "/select/?q=*:*";
|
||||||
$solrIntruct .= self::SOLR_VERSION;
|
$solrIntruct .= self::SOLR_VERSION;
|
||||||
$solrIntruct .= "&start=0&rows=0&echoParams=none&wt=json";
|
$solrIntruct .= "&start=0&rows=0&echoParams=none&wt=json";
|
||||||
|
|
||||||
$handlerTotal = curl_init ($solrIntruct);
|
$handlerTotal = curl_init ($solrIntruct);
|
||||||
curl_setopt ($handlerTotal, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt ($handlerTotal, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
//Apply proxy settings
|
||||||
|
$sysConf = System::getSystemConfiguration();
|
||||||
|
if ($sysConf['proxy_host'] != '') {
|
||||||
|
curl_setopt($handlerTotal, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
|
||||||
|
if ($sysConf['proxy_port'] != '') {
|
||||||
|
curl_setopt($handlerTotal, CURLOPT_PROXYPORT, $sysConf['proxy_port']);
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_user'] != '') {
|
||||||
|
curl_setopt($handlerTotal, CURLOPT_PROXYUSERPWD, $sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : ''));
|
||||||
|
}
|
||||||
|
curl_setopt($handlerTotal, CURLOPT_HTTPHEADER, array('Expect:'));
|
||||||
|
}
|
||||||
|
|
||||||
$responseTotal = curl_exec ($handlerTotal);
|
$responseTotal = curl_exec ($handlerTotal);
|
||||||
curl_close ($handlerTotal);
|
curl_close ($handlerTotal);
|
||||||
|
|
||||||
// verify the result of solr
|
// verify the result of solr
|
||||||
$responseSolrTotal = G::json_decode ($responseTotal);
|
$responseSolrTotal = G::json_decode ($responseTotal);
|
||||||
if ($responseSolrTotal->responseHeader->status != 0) {
|
if ($responseSolrTotal->responseHeader->status != 0) {
|
||||||
@@ -92,7 +106,7 @@ class BpmnEngine_SearchIndexAccess_Solr
|
|||||||
$numTotalDocs = $responseSolrTotal->response->numFound;
|
$numTotalDocs = $responseSolrTotal->response->numFound;
|
||||||
return $numTotalDocs;
|
return $numTotalDocs;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute a query in base to Requested data
|
* Execute a query in base to Requested data
|
||||||
* @gearman = false
|
* @gearman = false
|
||||||
@@ -108,7 +122,7 @@ class BpmnEngine_SearchIndexAccess_Solr
|
|||||||
$solrIntruct = '';
|
$solrIntruct = '';
|
||||||
// get configuration information in base to workspace parameter
|
// get configuration information in base to workspace parameter
|
||||||
$workspace = $solrRequestData->workspace;
|
$workspace = $solrRequestData->workspace;
|
||||||
|
|
||||||
// format request
|
// format request
|
||||||
$query = empty ($solrRequestData->searchText) ? '*:*' : $solrRequestData->searchText;
|
$query = empty ($solrRequestData->searchText) ? '*:*' : $solrRequestData->searchText;
|
||||||
$query = rawurlencode ($query);
|
$query = rawurlencode ($query);
|
||||||
@@ -125,7 +139,7 @@ class BpmnEngine_SearchIndexAccess_Solr
|
|||||||
for ($i = 0; $i < $solrRequestData->numSortingCols; $i ++) {
|
for ($i = 0; $i < $solrRequestData->numSortingCols; $i ++) {
|
||||||
$sort .= $solrRequestData->sortCols [$i] . "%20" . $solrRequestData->sortDir [$i] . ",";
|
$sort .= $solrRequestData->sortCols [$i] . "%20" . $solrRequestData->sortDir [$i] . ",";
|
||||||
}
|
}
|
||||||
|
|
||||||
$sort = substr_replace ($sort, "", - 1);
|
$sort = substr_replace ($sort, "", - 1);
|
||||||
}
|
}
|
||||||
$resultFormat = empty ($solrRequestData->resultFormat) ? '' : '&wt=' . $solrRequestData->resultFormat;
|
$resultFormat = empty ($solrRequestData->resultFormat) ? '' : '&wt=' . $solrRequestData->resultFormat;
|
||||||
@@ -134,7 +148,7 @@ class BpmnEngine_SearchIndexAccess_Solr
|
|||||||
foreach ($aFilters as $value) {
|
foreach ($aFilters as $value) {
|
||||||
$filters .= '&fq=' . urlencode ($value);
|
$filters .= '&fq=' . urlencode ($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
$solrIntruct = (substr ($this->_solrHost, - 1) == "/") ? $this->_solrHost : $this->_solrHost . "/";
|
$solrIntruct = (substr ($this->_solrHost, - 1) == "/") ? $this->_solrHost : $this->_solrHost . "/";
|
||||||
$solrIntruct .= $workspace;
|
$solrIntruct .= $workspace;
|
||||||
$solrIntruct .= "/select/?q=$query";
|
$solrIntruct .= "/select/?q=$query";
|
||||||
@@ -150,18 +164,32 @@ class BpmnEngine_SearchIndexAccess_Solr
|
|||||||
// search the cases in base to datatable parameters
|
// search the cases in base to datatable parameters
|
||||||
$handler = curl_init ($solrIntruct);
|
$handler = curl_init ($solrIntruct);
|
||||||
curl_setopt ($handler, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt ($handler, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
//Apply proxy settings
|
||||||
|
$sysConf = System::getSystemConfiguration();
|
||||||
|
if ($sysConf['proxy_host'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
|
||||||
|
if ($sysConf['proxy_port'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXYPORT, $sysConf['proxy_port']);
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_user'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXYUSERPWD, $sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : ''));
|
||||||
|
}
|
||||||
|
curl_setopt($handler, CURLOPT_HTTPHEADER, array('Expect:'));
|
||||||
|
}
|
||||||
|
|
||||||
$response = curl_exec ($handler);
|
$response = curl_exec ($handler);
|
||||||
curl_close ($handler);
|
curl_close ($handler);
|
||||||
|
|
||||||
// decode
|
// decode
|
||||||
$responseSolr = G::json_decode ($response);
|
$responseSolr = G::json_decode ($response);
|
||||||
if ($responseSolr->responseHeader->status != 0) {
|
if ($responseSolr->responseHeader->status != 0) {
|
||||||
throw new Exception ("Error executing query to Solr." . $solrIntruct . " response error: " . $response . "\n");
|
throw new Exception ("Error executing query to Solr." . $solrIntruct . " response error: " . $response . "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return $responseSolr;
|
return $responseSolr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Insert or Update document index
|
* Insert or Update document index
|
||||||
* @gearman = false
|
* @gearman = false
|
||||||
@@ -179,23 +207,37 @@ class BpmnEngine_SearchIndexAccess_Solr
|
|||||||
$solrIntruct = (substr ($this->_solrHost, - 1) == "/") ? $this->_solrHost : $this->_solrHost . "/";
|
$solrIntruct = (substr ($this->_solrHost, - 1) == "/") ? $this->_solrHost : $this->_solrHost . "/";
|
||||||
$solrIntruct .= $solrUpdateDocument->workspace;
|
$solrIntruct .= $solrUpdateDocument->workspace;
|
||||||
$solrIntruct .= "/update";
|
$solrIntruct .= "/update";
|
||||||
|
|
||||||
$handler = curl_init ($solrIntruct);
|
$handler = curl_init ($solrIntruct);
|
||||||
curl_setopt ($handler, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt ($handler, CURLOPT_RETURNTRANSFER, true);
|
||||||
curl_setopt ($handler, CURLOPT_HTTPHEADER, array (
|
curl_setopt ($handler, CURLOPT_HTTPHEADER, array (
|
||||||
'Content-type:application/xml'
|
'Content-type:application/xml'
|
||||||
)); // -H
|
)); // -H
|
||||||
curl_setopt ($handler, CURLOPT_BINARYTRANSFER, TRUE); // --data-binary
|
curl_setopt ($handler, CURLOPT_BINARYTRANSFER, TRUE); // --data-binary
|
||||||
curl_setopt ($handler, CURLOPT_POSTFIELDS, $solrUpdateDocument->document); // data
|
curl_setopt ($handler, CURLOPT_POSTFIELDS, $solrUpdateDocument->document); // data
|
||||||
|
|
||||||
|
//Apply proxy settings
|
||||||
|
$sysConf = System::getSystemConfiguration();
|
||||||
|
if ($sysConf['proxy_host'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
|
||||||
|
if ($sysConf['proxy_port'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXYPORT, $sysConf['proxy_port']);
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_user'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXYUSERPWD, $sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : ''));
|
||||||
|
}
|
||||||
|
curl_setopt($handler, CURLOPT_HTTPHEADER, array('Expect:'));
|
||||||
|
}
|
||||||
|
|
||||||
$response = curl_exec ($handler);
|
$response = curl_exec ($handler);
|
||||||
curl_close ($handler);
|
curl_close ($handler);
|
||||||
|
|
||||||
$swOk = strpos ($response, '<int name="status">0</int>');
|
$swOk = strpos ($response, '<int name="status">0</int>');
|
||||||
if (! $swOk) {
|
if (! $swOk) {
|
||||||
throw new Exception ("Error updating document in Solr." . $solrIntruct . " response error: " . $response . "\n");
|
throw new Exception ("Error updating document in Solr." . $solrIntruct . " response error: " . $response . "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Commit the changes since the last commit
|
* Commit the changes since the last commit
|
||||||
* @gearman = false
|
* @gearman = false
|
||||||
@@ -213,23 +255,37 @@ class BpmnEngine_SearchIndexAccess_Solr
|
|||||||
$solrIntruct = (substr ($this->_solrHost, - 1) == "/") ? $this->_solrHost : $this->_solrHost . "/";
|
$solrIntruct = (substr ($this->_solrHost, - 1) == "/") ? $this->_solrHost : $this->_solrHost . "/";
|
||||||
$solrIntruct .= $workspace;
|
$solrIntruct .= $workspace;
|
||||||
$solrIntruct .= "/update";
|
$solrIntruct .= "/update";
|
||||||
|
|
||||||
$handler = curl_init ($solrIntruct);
|
$handler = curl_init ($solrIntruct);
|
||||||
curl_setopt ($handler, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt ($handler, CURLOPT_RETURNTRANSFER, true);
|
||||||
curl_setopt ($handler, CURLOPT_HTTPHEADER, array (
|
curl_setopt ($handler, CURLOPT_HTTPHEADER, array (
|
||||||
'Content-type:application/xml'
|
'Content-type:application/xml'
|
||||||
)); // -H
|
)); // -H
|
||||||
curl_setopt ($handler, CURLOPT_BINARYTRANSFER, TRUE); // --data-binary
|
curl_setopt ($handler, CURLOPT_BINARYTRANSFER, TRUE); // --data-binary
|
||||||
curl_setopt ($handler, CURLOPT_POSTFIELDS, "<commit/>"); // data
|
curl_setopt ($handler, CURLOPT_POSTFIELDS, "<commit/>"); // data
|
||||||
|
|
||||||
|
//Apply proxy settings
|
||||||
|
$sysConf = System::getSystemConfiguration();
|
||||||
|
if ($sysConf['proxy_host'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
|
||||||
|
if ($sysConf['proxy_port'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXYPORT, $sysConf['proxy_port']);
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_user'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXYUSERPWD, $sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : ''));
|
||||||
|
}
|
||||||
|
curl_setopt($handler, CURLOPT_HTTPHEADER, array('Expect:'));
|
||||||
|
}
|
||||||
|
|
||||||
$response = curl_exec ($handler);
|
$response = curl_exec ($handler);
|
||||||
curl_close ($handler);
|
curl_close ($handler);
|
||||||
|
|
||||||
$swOk = strpos ($response, '<int name="status">0</int>');
|
$swOk = strpos ($response, '<int name="status">0</int>');
|
||||||
if (! $swOk) {
|
if (! $swOk) {
|
||||||
throw new Exception ("Error commiting changes in Solr." . $solrIntruct . " response error: " . $response . "\n");
|
throw new Exception ("Error commiting changes in Solr." . $solrIntruct . " response error: " . $response . "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rollback the changes since the last commit
|
* Rollback the changes since the last commit
|
||||||
* @gearman = false
|
* @gearman = false
|
||||||
@@ -242,29 +298,43 @@ class BpmnEngine_SearchIndexAccess_Solr
|
|||||||
{
|
{
|
||||||
if (! $this->_solrIsEnabled)
|
if (! $this->_solrIsEnabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$solrIntruct = '';
|
$solrIntruct = '';
|
||||||
// get configuration information in base to workspace parameter
|
// get configuration information in base to workspace parameter
|
||||||
$solrIntruct = (substr ($this->_solrHost, - 1) == "/") ? $this->_solrHost : $this->_solrHost . "/";
|
$solrIntruct = (substr ($this->_solrHost, - 1) == "/") ? $this->_solrHost : $this->_solrHost . "/";
|
||||||
$solrIntruct .= $workspace;
|
$solrIntruct .= $workspace;
|
||||||
$solrIntruct .= "/update";
|
$solrIntruct .= "/update";
|
||||||
|
|
||||||
$handler = curl_init ($solrIntruct);
|
$handler = curl_init ($solrIntruct);
|
||||||
curl_setopt ($handler, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt ($handler, CURLOPT_RETURNTRANSFER, true);
|
||||||
curl_setopt ($handler, CURLOPT_HTTPHEADER, array (
|
curl_setopt ($handler, CURLOPT_HTTPHEADER, array (
|
||||||
'Content-type:application/xml'
|
'Content-type:application/xml'
|
||||||
)); // -H
|
)); // -H
|
||||||
curl_setopt ($handler, CURLOPT_BINARYTRANSFER, TRUE); // --data-binary
|
curl_setopt ($handler, CURLOPT_BINARYTRANSFER, TRUE); // --data-binary
|
||||||
curl_setopt ($handler, CURLOPT_POSTFIELDS, "<rollback/>"); // data
|
curl_setopt ($handler, CURLOPT_POSTFIELDS, "<rollback/>"); // data
|
||||||
|
|
||||||
|
//Apply proxy settings
|
||||||
|
$sysConf = System::getSystemConfiguration();
|
||||||
|
if ($sysConf['proxy_host'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
|
||||||
|
if ($sysConf['proxy_port'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXYPORT, $sysConf['proxy_port']);
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_user'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXYUSERPWD, $sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : ''));
|
||||||
|
}
|
||||||
|
curl_setopt($handler, CURLOPT_HTTPHEADER, array('Expect:'));
|
||||||
|
}
|
||||||
|
|
||||||
$response = curl_exec ($handler);
|
$response = curl_exec ($handler);
|
||||||
curl_close ($handler);
|
curl_close ($handler);
|
||||||
|
|
||||||
$swOk = strpos ($response, '<int name="status">0</int>');
|
$swOk = strpos ($response, '<int name="status">0</int>');
|
||||||
if (! $swOk) {
|
if (! $swOk) {
|
||||||
throw new Exception ("Error rolling back changes in Solr." . $solrIntruct . " response error: " . $response . "\n");
|
throw new Exception ("Error rolling back changes in Solr." . $solrIntruct . " response error: " . $response . "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optimize Solr index
|
* Optimize Solr index
|
||||||
* @gearman = false
|
* @gearman = false
|
||||||
@@ -277,32 +347,46 @@ class BpmnEngine_SearchIndexAccess_Solr
|
|||||||
{
|
{
|
||||||
if (! $this->_solrIsEnabled)
|
if (! $this->_solrIsEnabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$solrIntruct = '';
|
$solrIntruct = '';
|
||||||
// get configuration information in base to workspace parameter
|
// get configuration information in base to workspace parameter
|
||||||
$solrIntruct = (substr ($this->_solrHost, - 1) == "/") ? $this->_solrHost : $this->_solrHost . "/";
|
$solrIntruct = (substr ($this->_solrHost, - 1) == "/") ? $this->_solrHost : $this->_solrHost . "/";
|
||||||
$solrIntruct .= $workspace;
|
$solrIntruct .= $workspace;
|
||||||
$solrIntruct .= "/update";
|
$solrIntruct .= "/update";
|
||||||
|
|
||||||
$handler = curl_init ($solrIntruct);
|
$handler = curl_init ($solrIntruct);
|
||||||
curl_setopt ($handler, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt ($handler, CURLOPT_RETURNTRANSFER, true);
|
||||||
curl_setopt ($handler, CURLOPT_HTTPHEADER, array (
|
curl_setopt ($handler, CURLOPT_HTTPHEADER, array (
|
||||||
'Content-type:application/xml'
|
'Content-type:application/xml'
|
||||||
)); // -H
|
)); // -H
|
||||||
curl_setopt ($handler, CURLOPT_BINARYTRANSFER, TRUE); // --data-binary
|
curl_setopt ($handler, CURLOPT_BINARYTRANSFER, TRUE); // --data-binary
|
||||||
curl_setopt ($handler, CURLOPT_POSTFIELDS, "<optimize/>"); // data
|
curl_setopt ($handler, CURLOPT_POSTFIELDS, "<optimize/>"); // data
|
||||||
|
|
||||||
|
//Apply proxy settings
|
||||||
|
$sysConf = System::getSystemConfiguration();
|
||||||
|
if ($sysConf['proxy_host'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
|
||||||
|
if ($sysConf['proxy_port'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXYPORT, $sysConf['proxy_port']);
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_user'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXYUSERPWD, $sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : ''));
|
||||||
|
}
|
||||||
|
curl_setopt($handler, CURLOPT_HTTPHEADER, array('Expect:'));
|
||||||
|
}
|
||||||
|
|
||||||
$response = curl_exec ($handler);
|
$response = curl_exec ($handler);
|
||||||
curl_close ($handler);
|
curl_close ($handler);
|
||||||
|
|
||||||
$swOk = strpos ($response, '<int name="status">0</int>');
|
$swOk = strpos ($response, '<int name="status">0</int>');
|
||||||
if (! $swOk) {
|
if (! $swOk) {
|
||||||
throw new Exception ("Error optimizing changes in Solr." . $solrIntruct . " response error: " . $response . "\n");
|
throw new Exception ("Error optimizing changes in Solr." . $solrIntruct . " response error: " . $response . "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the list of the stored fields in Solr
|
* Return the list of the stored fields in Solr
|
||||||
*
|
*
|
||||||
* @param string $workspace
|
* @param string $workspace
|
||||||
* Solr instance name
|
* Solr instance name
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
@@ -312,15 +396,29 @@ class BpmnEngine_SearchIndexAccess_Solr
|
|||||||
{
|
{
|
||||||
if (! $this->_solrIsEnabled)
|
if (! $this->_solrIsEnabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$solrIntruct = '';
|
$solrIntruct = '';
|
||||||
// get configuration information in base to workspace parameter
|
// get configuration information in base to workspace parameter
|
||||||
$solrIntruct = (substr ($this->_solrHost, - 1) == "/") ? $this->_solrHost : $this->_solrHost . "/";
|
$solrIntruct = (substr ($this->_solrHost, - 1) == "/") ? $this->_solrHost : $this->_solrHost . "/";
|
||||||
$solrIntruct .= $workspace;
|
$solrIntruct .= $workspace;
|
||||||
$solrIntruct .= "/admin/luke?numTerms=0&wt=json";
|
$solrIntruct .= "/admin/luke?numTerms=0&wt=json";
|
||||||
|
|
||||||
$handler = curl_init ($solrIntruct);
|
$handler = curl_init ($solrIntruct);
|
||||||
curl_setopt ($handler, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt ($handler, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
//Apply proxy settings
|
||||||
|
$sysConf = System::getSystemConfiguration();
|
||||||
|
if ($sysConf['proxy_host'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
|
||||||
|
if ($sysConf['proxy_port'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXYPORT, $sysConf['proxy_port']);
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_user'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXYUSERPWD, $sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : ''));
|
||||||
|
}
|
||||||
|
curl_setopt($handler, CURLOPT_HTTPHEADER, array('Expect:'));
|
||||||
|
}
|
||||||
|
|
||||||
$response = curl_exec ($handler);
|
$response = curl_exec ($handler);
|
||||||
curl_close ($handler);
|
curl_close ($handler);
|
||||||
// decode
|
// decode
|
||||||
@@ -330,7 +428,7 @@ class BpmnEngine_SearchIndexAccess_Solr
|
|||||||
}
|
}
|
||||||
return $responseSolr;
|
return $responseSolr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete all documents from index
|
* Delete all documents from index
|
||||||
* @gearman = false
|
* @gearman = false
|
||||||
@@ -344,30 +442,44 @@ class BpmnEngine_SearchIndexAccess_Solr
|
|||||||
if (! $this->_solrIsEnabled)
|
if (! $this->_solrIsEnabled)
|
||||||
return;
|
return;
|
||||||
// $registry = Zend_Registry::getInstance();
|
// $registry = Zend_Registry::getInstance();
|
||||||
|
|
||||||
$solrIntruct = '';
|
$solrIntruct = '';
|
||||||
// get configuration information in base to workspace parameter
|
// get configuration information in base to workspace parameter
|
||||||
$solrIntruct = (substr ($this->_solrHost, - 1) == "/") ? $this->_solrHost : $this->_solrHost . "/";
|
$solrIntruct = (substr ($this->_solrHost, - 1) == "/") ? $this->_solrHost : $this->_solrHost . "/";
|
||||||
$solrIntruct .= $workspace;
|
$solrIntruct .= $workspace;
|
||||||
$solrIntruct .= "/update";
|
$solrIntruct .= "/update";
|
||||||
|
|
||||||
$handler = curl_init ($solrIntruct);
|
$handler = curl_init ($solrIntruct);
|
||||||
curl_setopt ($handler, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt ($handler, CURLOPT_RETURNTRANSFER, true);
|
||||||
curl_setopt ($handler, CURLOPT_HTTPHEADER, array (
|
curl_setopt ($handler, CURLOPT_HTTPHEADER, array (
|
||||||
'Content-type:application/xml'
|
'Content-type:application/xml'
|
||||||
)); // -H
|
)); // -H
|
||||||
curl_setopt ($handler, CURLOPT_BINARYTRANSFER, TRUE); // --data-binary
|
curl_setopt ($handler, CURLOPT_BINARYTRANSFER, TRUE); // --data-binary
|
||||||
curl_setopt ($handler, CURLOPT_POSTFIELDS, "<delete><query>*:*</query></delete>"); // data
|
curl_setopt ($handler, CURLOPT_POSTFIELDS, "<delete><query>*:*</query></delete>"); // data
|
||||||
|
|
||||||
|
//Apply proxy settings
|
||||||
|
$sysConf = System::getSystemConfiguration();
|
||||||
|
if ($sysConf['proxy_host'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
|
||||||
|
if ($sysConf['proxy_port'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXYPORT, $sysConf['proxy_port']);
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_user'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXYUSERPWD, $sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : ''));
|
||||||
|
}
|
||||||
|
curl_setopt($handler, CURLOPT_HTTPHEADER, array('Expect:'));
|
||||||
|
}
|
||||||
|
|
||||||
$response = curl_exec ($handler);
|
$response = curl_exec ($handler);
|
||||||
|
|
||||||
curl_close ($handler);
|
curl_close ($handler);
|
||||||
|
|
||||||
$swOk = strpos ($response, '<int name="status">0</int>');
|
$swOk = strpos ($response, '<int name="status">0</int>');
|
||||||
if (! $swOk) {
|
if (! $swOk) {
|
||||||
throw new Exception ("Error deleting all documents in Solr." . $solrIntruct . " response error: " . $response . "\n");
|
throw new Exception ("Error deleting all documents in Solr." . $solrIntruct . " response error: " . $response . "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete specified documents from index
|
* Delete specified documents from index
|
||||||
* @gearman = false
|
* @gearman = false
|
||||||
@@ -381,45 +493,59 @@ class BpmnEngine_SearchIndexAccess_Solr
|
|||||||
if (! $this->_solrIsEnabled)
|
if (! $this->_solrIsEnabled)
|
||||||
return;
|
return;
|
||||||
// $registry = Zend_Registry::getInstance();
|
// $registry = Zend_Registry::getInstance();
|
||||||
|
|
||||||
$solrIntruct = '';
|
$solrIntruct = '';
|
||||||
// get configuration information in base to workspace parameter
|
// get configuration information in base to workspace parameter
|
||||||
$solrIntruct = (substr ($this->_solrHost, - 1) == "/") ? $this->_solrHost : $this->_solrHost . "/";
|
$solrIntruct = (substr ($this->_solrHost, - 1) == "/") ? $this->_solrHost : $this->_solrHost . "/";
|
||||||
$solrIntruct .= $workspace;
|
$solrIntruct .= $workspace;
|
||||||
$solrIntruct .= "/update";
|
$solrIntruct .= "/update";
|
||||||
|
|
||||||
$handler = curl_init ($solrIntruct);
|
$handler = curl_init ($solrIntruct);
|
||||||
curl_setopt ($handler, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt ($handler, CURLOPT_RETURNTRANSFER, true);
|
||||||
curl_setopt ($handler, CURLOPT_HTTPHEADER, array (
|
curl_setopt ($handler, CURLOPT_HTTPHEADER, array (
|
||||||
'Content-type:application/xml'
|
'Content-type:application/xml'
|
||||||
)); // -H
|
)); // -H
|
||||||
curl_setopt ($handler, CURLOPT_BINARYTRANSFER, TRUE); // --data-binary
|
curl_setopt ($handler, CURLOPT_BINARYTRANSFER, TRUE); // --data-binary
|
||||||
curl_setopt ($handler, CURLOPT_POSTFIELDS, "<delete><query>" . $idQuery . "</query></delete>"); // data
|
curl_setopt ($handler, CURLOPT_POSTFIELDS, "<delete><query>" . $idQuery . "</query></delete>"); // data
|
||||||
|
|
||||||
|
//Apply proxy settings
|
||||||
|
$sysConf = System::getSystemConfiguration();
|
||||||
|
if ($sysConf['proxy_host'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
|
||||||
|
if ($sysConf['proxy_port'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXYPORT, $sysConf['proxy_port']);
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_user'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXYUSERPWD, $sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : ''));
|
||||||
|
}
|
||||||
|
curl_setopt($handler, CURLOPT_HTTPHEADER, array('Expect:'));
|
||||||
|
}
|
||||||
|
|
||||||
$response = curl_exec ($handler);
|
$response = curl_exec ($handler);
|
||||||
|
|
||||||
curl_close ($handler);
|
curl_close ($handler);
|
||||||
|
|
||||||
$swOk = strpos ($response, '<int name="status">0</int>');
|
$swOk = strpos ($response, '<int name="status">0</int>');
|
||||||
if (! $swOk) {
|
if (! $swOk) {
|
||||||
throw new Exception ("Error deleting document in Solr." . $solrIntruct . " response error: " . $response . "\n");
|
throw new Exception ("Error deleting document in Solr." . $solrIntruct . " response error: " . $response . "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute a query in base to Request data
|
* Execute a query in base to Request data
|
||||||
*
|
*
|
||||||
* @param Entity_FacetRequest $facetRequestEntity
|
* @param Entity_FacetRequest $facetRequestEntity
|
||||||
* @return solr response: list of facets array
|
* @return solr response: list of facets array
|
||||||
*/
|
*/
|
||||||
public function getFacetsList($facetRequest)
|
public function getFacetsList($facetRequest)
|
||||||
{
|
{
|
||||||
if (! $this->_solrIsEnabled)
|
if (! $this->_solrIsEnabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$solrIntruct = '';
|
$solrIntruct = '';
|
||||||
// get configuration information in base to workspace parameter
|
// get configuration information in base to workspace parameter
|
||||||
$workspace = $facetRequest->workspace;
|
$workspace = $facetRequest->workspace;
|
||||||
|
|
||||||
// format request
|
// format request
|
||||||
$query = empty ($facetRequest->searchText) ? '*:*' : $facetRequest->searchText;
|
$query = empty ($facetRequest->searchText) ? '*:*' : $facetRequest->searchText;
|
||||||
$query = rawurlencode ($query);
|
$query = rawurlencode ($query);
|
||||||
@@ -448,9 +574,9 @@ class BpmnEngine_SearchIndexAccess_Solr
|
|||||||
$filters .= '&fq=' . $value;
|
$filters .= '&fq=' . $value;
|
||||||
}
|
}
|
||||||
// echo "<pre>";
|
// echo "<pre>";
|
||||||
|
|
||||||
$resultFormat = '&wt=json';
|
$resultFormat = '&wt=json';
|
||||||
|
|
||||||
$solrIntruct = (substr ($this->_solrHost, - 1) == "/") ? $this->_solrHost : $this->_solrHost . "/";
|
$solrIntruct = (substr ($this->_solrHost, - 1) == "/") ? $this->_solrHost : $this->_solrHost . "/";
|
||||||
$solrIntruct .= $workspace;
|
$solrIntruct .= $workspace;
|
||||||
$solrIntruct .= "/select/?q=$query";
|
$solrIntruct .= "/select/?q=$query";
|
||||||
@@ -461,20 +587,34 @@ class BpmnEngine_SearchIndexAccess_Solr
|
|||||||
$solrIntruct .= $facets;
|
$solrIntruct .= $facets;
|
||||||
$solrIntruct .= $filters;
|
$solrIntruct .= $filters;
|
||||||
$solrIntruct .= $resultFormat;
|
$solrIntruct .= $resultFormat;
|
||||||
|
|
||||||
// send query
|
// send query
|
||||||
// search the cases in base to datatable parameters
|
// search the cases in base to datatable parameters
|
||||||
$handler = curl_init ($solrIntruct);
|
$handler = curl_init ($solrIntruct);
|
||||||
curl_setopt ($handler, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt ($handler, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
//Apply proxy settings
|
||||||
|
$sysConf = System::getSystemConfiguration();
|
||||||
|
if ($sysConf['proxy_host'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
|
||||||
|
if ($sysConf['proxy_port'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXYPORT, $sysConf['proxy_port']);
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_user'] != '') {
|
||||||
|
curl_setopt($handler, CURLOPT_PROXYUSERPWD, $sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : ''));
|
||||||
|
}
|
||||||
|
curl_setopt($handler, CURLOPT_HTTPHEADER, array('Expect:'));
|
||||||
|
}
|
||||||
|
|
||||||
$response = curl_exec ($handler);
|
$response = curl_exec ($handler);
|
||||||
curl_close ($handler);
|
curl_close ($handler);
|
||||||
|
|
||||||
// decode
|
// decode
|
||||||
$responseSolr = G::json_decode ($response);
|
$responseSolr = G::json_decode ($response);
|
||||||
if ($responseSolr->responseHeader->status != 0) {
|
if ($responseSolr->responseHeader->status != 0) {
|
||||||
throw new Exception ("Error getting faceted list from Solr." . $solrIntruct . " response error: " . $response . "\n");
|
throw new Exception ("Error getting faceted list from Solr." . $solrIntruct . " response error: " . $response . "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return $responseSolr;
|
return $responseSolr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1010,6 +1010,7 @@ class System {
|
|||||||
|
|
||||||
if ($_SESSION['PROCESSMAKER_ENV_HASH'] === $hash) {
|
if ($_SESSION['PROCESSMAKER_ENV_HASH'] === $hash) {
|
||||||
$_SESSION['PROCESSMAKER_ENV']['from_cache'] = 1;
|
$_SESSION['PROCESSMAKER_ENV']['from_cache'] = 1;
|
||||||
|
$_SESSION['PROCESSMAKER_ENV_HASH']['proxy_pass'] = G::decrypt($_SESSION['PROCESSMAKER_ENV_HASH']['proxy_pass'], 'proxy_pass');
|
||||||
return $_SESSION['PROCESSMAKER_ENV'];
|
return $_SESSION['PROCESSMAKER_ENV'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1026,7 +1027,11 @@ class System {
|
|||||||
'memcached' => 0,
|
'memcached' => 0,
|
||||||
'memcached_server' => '',
|
'memcached_server' => '',
|
||||||
'default_skin' => 'classic',
|
'default_skin' => 'classic',
|
||||||
'default_lang' => 'en'
|
'default_lang' => 'en',
|
||||||
|
'proxy_host' => '',
|
||||||
|
'proxy_port' => '',
|
||||||
|
'proxy_user' => '',
|
||||||
|
'proxy_pass' => ''
|
||||||
);
|
);
|
||||||
|
|
||||||
// read the global env.ini configuration file
|
// read the global env.ini configuration file
|
||||||
@@ -1042,6 +1047,10 @@ class System {
|
|||||||
// validation debug config, only binary value is valid; debug = 1, to enable
|
// validation debug config, only binary value is valid; debug = 1, to enable
|
||||||
$config['debug'] = $config['debug'] == 1 ? 1 : 0;
|
$config['debug'] = $config['debug'] == 1 ? 1 : 0;
|
||||||
|
|
||||||
|
if ($config['proxy_pass'] != '') {
|
||||||
|
$config['proxy_pass'] = G::decrypt($config['proxy_pass'], 'proxy_pass');
|
||||||
|
}
|
||||||
|
|
||||||
$md5 = array();
|
$md5 = array();
|
||||||
if ($readGlobalIniFile)
|
if ($readGlobalIniFile)
|
||||||
$md5[] = md5_file($globalIniFile);
|
$md5[] = md5_file($globalIniFile);
|
||||||
|
|||||||
@@ -191,6 +191,19 @@ class Zimbra {
|
|||||||
curl_setopt($this->_curl, CURLOPT_SSL_VERIFYPEER, false);
|
curl_setopt($this->_curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||||
curl_setopt($this->_curl, CURLOPT_SSL_VERIFYHOST, false);
|
curl_setopt($this->_curl, CURLOPT_SSL_VERIFYHOST, false);
|
||||||
|
|
||||||
|
//Apply proxy settings
|
||||||
|
$sysConf = System::getSystemConfiguration();
|
||||||
|
if ($sysConf['proxy_host'] != '') {
|
||||||
|
curl_setopt($this->_curl, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
|
||||||
|
if ($sysConf['proxy_port'] != '') {
|
||||||
|
curl_setopt($this->_curl, CURLOPT_PROXYPORT, $sysConf['proxy_port']);
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_user'] != '') {
|
||||||
|
curl_setopt($this->_curl, CURLOPT_PROXYUSERPWD, $sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : ''));
|
||||||
|
}
|
||||||
|
curl_setopt($this->_curl, CURLOPT_HTTPHEADER, array('Expect:'));
|
||||||
|
}
|
||||||
|
|
||||||
$preauth = $this->getPreAuth($this->_username);
|
$preauth = $this->getPreAuth($this->_username);
|
||||||
$header = '<context xmlns="urn:zimbraAccount' . (($this->_admin) ? 'Admin' : '') . '"><session/></context>';
|
$header = '<context xmlns="urn:zimbraAccount' . (($this->_admin) ? 'Admin' : '') . '"><session/></context>';
|
||||||
|
|
||||||
@@ -970,7 +983,7 @@ class Zimbra {
|
|||||||
$role = $unserializeOp1['role'];
|
$role = $unserializeOp1['role'];
|
||||||
$location = $unserializeOp1['location'];
|
$location = $unserializeOp1['location'];
|
||||||
$ptst = $unserializeOp1['ptst'];
|
$ptst = $unserializeOp1['ptst'];
|
||||||
|
|
||||||
$dateFormat=$allDay=="1"?"Ymd":"Ymd\THis";
|
$dateFormat=$allDay=="1"?"Ymd":"Ymd\THis";
|
||||||
$startDate = date($dateFormat,strtotime($unserializeOp1['startDate']));
|
$startDate = date($dateFormat,strtotime($unserializeOp1['startDate']));
|
||||||
$endDate = date($dateFormat,strtotime($unserializeOp1['endDate']));
|
$endDate = date($dateFormat,strtotime($unserializeOp1['endDate']));
|
||||||
|
|||||||
@@ -16,6 +16,27 @@
|
|||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
function getSoapClientOptions() {
|
||||||
|
$options = array('trace' => 1);
|
||||||
|
|
||||||
|
//Apply proxy settings
|
||||||
|
$sysConf = System::getSystemConfiguration();
|
||||||
|
if ($sysConf['proxy_host'] != '') {
|
||||||
|
$options['proxy_host'] = $sysConf['proxy_host'];
|
||||||
|
if ($sysConf['proxy_port'] != '') {
|
||||||
|
$options['proxy_port'] = $sysConf['proxy_port'];
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_user'] != '') {
|
||||||
|
$options['proxy_login'] = $sysConf['proxy_user'];
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_pass'] != '') {
|
||||||
|
$options['proxy_password'] = $sysConf['proxy_pass'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $options;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This collection of triggers allows to interact by getting and sending information to SugarCRM
|
* This collection of triggers allows to interact by getting and sending information to SugarCRM
|
||||||
* @class pmSugar
|
* @class pmSugar
|
||||||
@@ -25,7 +46,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
function sugarLogin($sugarSoap, $user, $password) {
|
function sugarLogin($sugarSoap, $user, $password) {
|
||||||
$client = new SoapClient ( $sugarSoap, array ('trace' => 1 ) );
|
$client = new SoapClient ( $sugarSoap, getSoapClientOptions() );
|
||||||
$auth_array = array ('user_auth' => array ('user_name' => $user, 'password' => md5 ( $password ), 'version' => '1.0' ) );
|
$auth_array = array ('user_auth' => array ('user_name' => $user, 'password' => md5 ( $password ), 'version' => '1.0' ) );
|
||||||
$login_results = $client->__SoapCall ( 'login', $auth_array );
|
$login_results = $client->__SoapCall ( 'login', $auth_array );
|
||||||
|
|
||||||
@@ -67,7 +88,7 @@ function objectToArray($object) {
|
|||||||
|
|
||||||
function GetSugarEntry($sugarSoap, $user, $password, $module, $id, $selectFields, $linkNameToFieldsArray, $resultType = 'array') {
|
function GetSugarEntry($sugarSoap, $user, $password, $module, $id, $selectFields, $linkNameToFieldsArray, $resultType = 'array') {
|
||||||
$sessionId = sugarLogin ( $sugarSoap, $user, $password );
|
$sessionId = sugarLogin ( $sugarSoap, $user, $password );
|
||||||
$client = new SoapClient ( $sugarSoap, array ('trace' => 1 ) );
|
$client = new SoapClient ( $sugarSoap, getSoapClientOptions() );
|
||||||
$request_array = array ('session' => $sessionId, 'module_name' => $module, 'id' => $id,
|
$request_array = array ('session' => $sessionId, 'module_name' => $module, 'id' => $id,
|
||||||
'select_fields' => $select_fields, 'link_name_to_fields_array' => $linkNameToFieldsArray);
|
'select_fields' => $select_fields, 'link_name_to_fields_array' => $linkNameToFieldsArray);
|
||||||
$sugarEntry = $client->__SoapCall ( 'get_entry', $request_array );
|
$sugarEntry = $client->__SoapCall ( 'get_entry', $request_array );
|
||||||
@@ -103,7 +124,7 @@ function GetSugarEntry($sugarSoap, $user, $password, $module, $id, $selectFields
|
|||||||
|
|
||||||
function GetSugarEntries($sugarSoap, $user, $password, $module, $query, $orderBy, $selectedFields, $maxResults, $resultType="array") {
|
function GetSugarEntries($sugarSoap, $user, $password, $module, $query, $orderBy, $selectedFields, $maxResults, $resultType="array") {
|
||||||
$sessionId = sugarLogin ( $sugarSoap, $user, $password );
|
$sessionId = sugarLogin ( $sugarSoap, $user, $password );
|
||||||
$client = new SoapClient ( $sugarSoap, array ('trace' => 1 ) );
|
$client = new SoapClient ( $sugarSoap, getSoapClientOptions() );
|
||||||
$request_array = array ('session' => $sessionId, 'module_name' => $module, 'query' => $query, 'order_by' => $orderBy, 'offset'=>"", 'select_fields'=>"", 'max_result'=>$maxResults );
|
$request_array = array ('session' => $sessionId, 'module_name' => $module, 'query' => $query, 'order_by' => $orderBy, 'offset'=>"", 'select_fields'=>"", 'max_result'=>$maxResults );
|
||||||
$sugarEntriesO = $client->__SoapCall ( 'get_entry_list', $request_array );
|
$sugarEntriesO = $client->__SoapCall ( 'get_entry_list', $request_array );
|
||||||
|
|
||||||
@@ -266,7 +287,7 @@ function CreateSugarAccount($sugarSoap, $user, $password, $name, $resultType="a
|
|||||||
|
|
||||||
$module = "Accounts";
|
$module = "Accounts";
|
||||||
$sessionId = sugarLogin ( $sugarSoap, $user, $password );
|
$sessionId = sugarLogin ( $sugarSoap, $user, $password );
|
||||||
$client = new SoapClient ( $sugarSoap, array ('trace' => 1 ) );
|
$client = new SoapClient ( $sugarSoap, getSoapClientOptions() );
|
||||||
$request_array = array ('session' => $sessionId, 'module_name' => $module, 'name_value_list' => array(
|
$request_array = array ('session' => $sessionId, 'module_name' => $module, 'name_value_list' => array(
|
||||||
array("name" => 'name', "value" => $name )
|
array("name" => 'name', "value" => $name )
|
||||||
) );
|
) );
|
||||||
@@ -315,7 +336,7 @@ function CreateSugarContact($sugarSoap, $user, $password, $first_name, $last_nam
|
|||||||
);
|
);
|
||||||
*/
|
*/
|
||||||
$sessionId = sugarLogin ( $sugarSoap, $user, $password );
|
$sessionId = sugarLogin ( $sugarSoap, $user, $password );
|
||||||
$client = new SoapClient ( $sugarSoap, array ('trace' => 1 ) );
|
$client = new SoapClient ( $sugarSoap, getSoapClientOptions() );
|
||||||
|
|
||||||
$request_array = array ('session' => $sessionId, 'module_name' => $module, array(
|
$request_array = array ('session' => $sessionId, 'module_name' => $module, array(
|
||||||
array("name" => 'first_name',"value" => $first_name),
|
array("name" => 'first_name',"value" => $first_name),
|
||||||
@@ -374,7 +395,7 @@ function CreateSugarOpportunity($sugarSoap, $user, $password, $name,$account_id,
|
|||||||
);*/
|
);*/
|
||||||
|
|
||||||
$sessionId = sugarLogin ( $sugarSoap, $user, $password );
|
$sessionId = sugarLogin ( $sugarSoap, $user, $password );
|
||||||
$client = new SoapClient ( $sugarSoap, array ('trace' => 1 ) );
|
$client = new SoapClient ( $sugarSoap, getSoapClientOptions() );
|
||||||
|
|
||||||
$request_array = array ('session' => $sessionId, 'module_name' => $module, 'name_value_list' =>array(
|
$request_array = array ('session' => $sessionId, 'module_name' => $module, 'name_value_list' =>array(
|
||||||
array('name' => 'name','value' => $name),
|
array('name' => 'name','value' => $name),
|
||||||
@@ -423,7 +444,7 @@ function CreateSugarLeads($sugarSoap, $user, $password, $first_name, $last_name,
|
|||||||
|
|
||||||
$module = "Leads";
|
$module = "Leads";
|
||||||
$sessionId = sugarLogin ( $sugarSoap, $user, $password );
|
$sessionId = sugarLogin ( $sugarSoap, $user, $password );
|
||||||
$client = new SoapClient ( $sugarSoap, array ('trace' => 1 ) );
|
$client = new SoapClient ( $sugarSoap, getSoapClientOptions() );
|
||||||
|
|
||||||
$request_array = array ('session' => $sessionId, 'module_name' => $module, array(
|
$request_array = array ('session' => $sessionId, 'module_name' => $module, array(
|
||||||
array("name" => 'first_name',"value" => $first_name),
|
array("name" => 'first_name',"value" => $first_name),
|
||||||
|
|||||||
@@ -42,6 +42,20 @@
|
|||||||
*/
|
*/
|
||||||
function executeTalendWebservice($wsdl,$params=array(), $message){
|
function executeTalendWebservice($wsdl,$params=array(), $message){
|
||||||
$client = new SoapClient($wsdl,array('trace' => 1));
|
$client = new SoapClient($wsdl,array('trace' => 1));
|
||||||
|
|
||||||
|
//Apply proxy settings
|
||||||
|
$sysConf = System::getSystemConfiguration();
|
||||||
|
if ($sysConf['proxy_host'] != '') {
|
||||||
|
curl_setopt($client, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
|
||||||
|
if ($sysConf['proxy_port'] != '') {
|
||||||
|
curl_setopt($client, CURLOPT_PROXYPORT, $sysConf['proxy_port']);
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_user'] != '') {
|
||||||
|
curl_setopt($client, CURLOPT_PROXYUSERPWD, $sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : ''));
|
||||||
|
}
|
||||||
|
curl_setopt($client, CURLOPT_HTTPHEADER, array('Expect:'));
|
||||||
|
}
|
||||||
|
|
||||||
$params[0]="";
|
$params[0]="";
|
||||||
foreach($params as $paramO){
|
foreach($params as $paramO){
|
||||||
$params[]="--context_param".$paramO[0]."=".$paramO[1];
|
$params[]="--context_param".$paramO[0]."=".$paramO[1];
|
||||||
|
|||||||
@@ -383,25 +383,39 @@ function uploadZimbraFile($ServerUrl, $username, $preAuthKey, $folderName, $file
|
|||||||
curl_setopt ($ch, CURLOPT_NOPROGRESS, false);
|
curl_setopt ($ch, CURLOPT_NOPROGRESS, false);
|
||||||
curl_setopt ($ch, CURLOPT_VERBOSE, true);
|
curl_setopt ($ch, CURLOPT_VERBOSE, true);
|
||||||
curl_setopt ($ch, CURLOPT_HTTPHEADER,$header_array);
|
curl_setopt ($ch, CURLOPT_HTTPHEADER,$header_array);
|
||||||
|
|
||||||
|
//Apply proxy settings
|
||||||
|
$sysConf = System::getSystemConfiguration();
|
||||||
|
if ($sysConf['proxy_host'] != '') {
|
||||||
|
curl_setopt($ch, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
|
||||||
|
if ($sysConf['proxy_port'] != '') {
|
||||||
|
curl_setopt($ch, CURLOPT_PROXYPORT, $sysConf['proxy_port']);
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_user'] != '') {
|
||||||
|
curl_setopt($ch, CURLOPT_PROXYUSERPWD, $sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : ''));
|
||||||
|
}
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
|
||||||
|
}
|
||||||
|
|
||||||
if( ! $response = curl_exec($ch))
|
if( ! $response = curl_exec($ch))
|
||||||
{
|
{
|
||||||
return "Upload error. Connection Error";
|
return "Upload error. Connection Error";
|
||||||
}
|
}
|
||||||
|
|
||||||
//G::pr($response);
|
//G::pr($response);
|
||||||
|
|
||||||
$header_size = curl_getinfo($ch,CURLINFO_HEADER_SIZE);
|
$header_size = curl_getinfo($ch,CURLINFO_HEADER_SIZE);
|
||||||
$result['header'] = substr($response, 0, $header_size);
|
$result['header'] = substr($response, 0, $header_size);
|
||||||
$result['body'] = substr( $response, $header_size );
|
$result['body'] = substr( $response, $header_size );
|
||||||
$result['http_code'] = curl_getinfo($ch,CURLINFO_HTTP_CODE);
|
$result['http_code'] = curl_getinfo($ch,CURLINFO_HTTP_CODE);
|
||||||
$result['last_url'] = curl_getinfo($ch,CURLINFO_EFFECTIVE_URL);
|
$result['last_url'] = curl_getinfo($ch,CURLINFO_EFFECTIVE_URL);
|
||||||
|
|
||||||
$aString = array();
|
$aString = array();
|
||||||
$aExplode = explode(",", $result['body']);
|
$aExplode = explode(",", $result['body']);
|
||||||
$uploadID = substr($aExplode[2], 1, -2);
|
$uploadID = substr($aExplode[2], 1, -2);
|
||||||
|
|
||||||
curl_close($ch);
|
curl_close($ch);
|
||||||
|
|
||||||
// gettin FOlder ID
|
// gettin FOlder ID
|
||||||
|
|
||||||
$FolderResult = $oZimbraObj->getFolder($folderName);
|
$FolderResult = $oZimbraObj->getFolder($folderName);
|
||||||
|
|||||||
@@ -71,6 +71,21 @@ class adminProxy extends HttpProxyController
|
|||||||
$updatedConf['memory_limit'] = $httpData->memory_limit;
|
$updatedConf['memory_limit'] = $httpData->memory_limit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($sysConf['proxy_host'] != $httpData->proxy_host) {
|
||||||
|
$updatedConf['proxy_host'] = $httpData->proxy_host;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($sysConf['proxy_port'] != $httpData->proxy_port) {
|
||||||
|
$updatedConf['proxy_port'] = $httpData->proxy_port;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($sysConf['proxy_user'] != $httpData->proxy_user) {
|
||||||
|
$updatedConf['proxy_user'] = $httpData->proxy_user;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($sysConf['proxy_pass'] != $httpData->proxy_pass) {
|
||||||
|
$updatedConf['proxy_pass'] = G::encrypt($httpData->proxy_pass, 'proxy_pass');
|
||||||
|
}
|
||||||
|
|
||||||
if ($updateRedirector) {
|
if ($updateRedirector) {
|
||||||
if (!file_exists(PATH_HTML . 'index.html')) {
|
if (!file_exists(PATH_HTML . 'index.html')) {
|
||||||
|
|||||||
@@ -51,10 +51,21 @@ function file_get_conditional_contents($szURL){
|
|||||||
curl_setopt ( $pCurl, CURLOPT_CONNECTTIMEOUT, 10 );
|
curl_setopt ( $pCurl, CURLOPT_CONNECTTIMEOUT, 10 );
|
||||||
curl_setopt ( $pCurl, CURLOPT_TIMEOUT, 20 );
|
curl_setopt ( $pCurl, CURLOPT_TIMEOUT, 20 );
|
||||||
|
|
||||||
curl_setopt ( $pCurl, CURLOPT_NOPROGRESS, FALSE);
|
curl_setopt ( $pCurl, CURLOPT_NOPROGRESS, false);
|
||||||
curl_setopt ( $pCurl, CURLOPT_VERBOSE, TRUE);
|
curl_setopt ( $pCurl, CURLOPT_VERBOSE, true);
|
||||||
|
|
||||||
|
|
||||||
|
//Apply proxy settings
|
||||||
|
$sysConf = System::getSystemConfiguration();
|
||||||
|
if ($sysConf['proxy_host'] != '') {
|
||||||
|
curl_setopt($pCurl, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
|
||||||
|
if ($sysConf['proxy_port'] != '') {
|
||||||
|
curl_setopt($pCurl, CURLOPT_PROXYPORT, $sysConf['proxy_port']);
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_user'] != '') {
|
||||||
|
curl_setopt($pCurl, CURLOPT_PROXYUSERPWD, $sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : ''));
|
||||||
|
}
|
||||||
|
curl_setopt($pCurl, CURLOPT_HTTPHEADER, array('Expect:'));
|
||||||
|
}
|
||||||
|
|
||||||
$szContents = curl_exec($pCurl);
|
$szContents = curl_exec($pCurl);
|
||||||
$aInfo = curl_getinfo($pCurl);
|
$aInfo = curl_getinfo($pCurl);
|
||||||
@@ -245,6 +256,19 @@ function buildData(){
|
|||||||
curl_setopt ( $ch, CURLOPT_CONNECTTIMEOUT, 10 );
|
curl_setopt ( $ch, CURLOPT_CONNECTTIMEOUT, 10 );
|
||||||
curl_setopt ( $ch, CURLOPT_TIMEOUT, 20 );
|
curl_setopt ( $ch, CURLOPT_TIMEOUT, 20 );
|
||||||
|
|
||||||
|
//Apply proxy settings
|
||||||
|
$sysConf = System::getSystemConfiguration();
|
||||||
|
if ($sysConf['proxy_host'] != '') {
|
||||||
|
curl_setopt($ch, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
|
||||||
|
if ($sysConf['proxy_port'] != '') {
|
||||||
|
curl_setopt($ch, CURLOPT_PROXYPORT, $sysConf['proxy_port']);
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_user'] != '') {
|
||||||
|
curl_setopt($ch, CURLOPT_PROXYUSERPWD, $sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : ''));
|
||||||
|
}
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
|
||||||
|
}
|
||||||
|
|
||||||
$response = curl_exec ( $ch );
|
$response = curl_exec ( $ch );
|
||||||
$curl_session = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
$curl_session = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||||
$headers = curl_getinfo ( $ch );
|
$headers = curl_getinfo ( $ch );
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
ini_set ( "soap.wsdl_cache_enabled", "0" ); // enabling WSDL cache
|
ini_set ( "soap.wsdl_cache_enabled", "0" ); // enabling WSDL cache
|
||||||
|
|
||||||
G::LoadClass ( 'ArrayPeer' );
|
G::LoadClass ( 'ArrayPeer' );
|
||||||
if($RBAC->userCanAccess('PM_SETUP') != 1 && $RBAC->userCanAccess('PM_FACTORY') != 1){
|
if($RBAC->userCanAccess('PM_SETUP') != 1 && $RBAC->userCanAccess('PM_FACTORY') != 1){
|
||||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
||||||
//G::header('location: ../login/login');
|
//G::header('location: ../login/login');
|
||||||
die;
|
die;
|
||||||
@@ -53,13 +53,13 @@ switch ($_POST ['action']) {
|
|||||||
G::RenderPage ( 'publish', 'raw' );
|
G::RenderPage ( 'publish', 'raw' );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'showDetails' :
|
case 'showDetails' :
|
||||||
G::LoadClass ( 'groups' );
|
G::LoadClass ( 'groups' );
|
||||||
|
|
||||||
$dbc = new DBConnection ( );
|
$dbc = new DBConnection ( );
|
||||||
$ses = new DBSession ( $dbc );
|
$ses = new DBSession ( $dbc );
|
||||||
|
|
||||||
if (! isset ( $_SESSION ['END_POINT'] )) {
|
if (! isset ( $_SESSION ['END_POINT'] )) {
|
||||||
$aFields ['WS_HOST'] = $_SERVER ['HTTP_HOST'];
|
$aFields ['WS_HOST'] = $_SERVER ['HTTP_HOST'];
|
||||||
$aFields ['WS_WORKSPACE'] = SYS_SYS;
|
$aFields ['WS_WORKSPACE'] = SYS_SYS;
|
||||||
@@ -76,16 +76,16 @@ switch ($_POST ['action']) {
|
|||||||
$aAux = explode ( '/', $aAux [1] );
|
$aAux = explode ( '/', $aAux [1] );
|
||||||
$aFields ['WS_WORKSPACE'] = substr ( $aAux [1], 3 );
|
$aFields ['WS_WORKSPACE'] = substr ( $aAux [1], 3 );
|
||||||
}
|
}
|
||||||
|
|
||||||
$rows [] = array ('uid' => 'char', 'name' => 'char', 'age' => 'integer', 'balance' => 'float' );
|
$rows [] = array ('uid' => 'char', 'name' => 'char', 'age' => 'integer', 'balance' => 'float' );
|
||||||
$rows [] = array ('uid' => 'http', 'name' => 'http' );
|
$rows [] = array ('uid' => 'http', 'name' => 'http' );
|
||||||
$rows [] = array ('uid' => 'https', 'name' => 'https' );
|
$rows [] = array ('uid' => 'https', 'name' => 'https' );
|
||||||
|
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
$_DBArray = (isset ( $_SESSION ['_DBArray'] ) ? $_SESSION ['_DBArray'] : '');
|
$_DBArray = (isset ( $_SESSION ['_DBArray'] ) ? $_SESSION ['_DBArray'] : '');
|
||||||
$_DBArray ['protocol'] = $rows;
|
$_DBArray ['protocol'] = $rows;
|
||||||
$_SESSION ['_DBArray'] = $_DBArray;
|
$_SESSION ['_DBArray'] = $_DBArray;
|
||||||
|
|
||||||
if (! isset ( $_SESSION ['END_POINT'] )) {
|
if (! isset ( $_SESSION ['END_POINT'] )) {
|
||||||
//$wsdl = 'http://'.$_SERVER['HTTP_HOST'].'/sys'.SYS_SYS. '/'. SYS_LANG .'/classic/services/wsdl';
|
//$wsdl = 'http://'.$_SERVER['HTTP_HOST'].'/sys'.SYS_SYS. '/'. SYS_LANG .'/classic/services/wsdl';
|
||||||
$wsdl = 'http://' . $_SERVER ['HTTP_HOST'];
|
$wsdl = 'http://' . $_SERVER ['HTTP_HOST'];
|
||||||
@@ -94,25 +94,25 @@ switch ($_POST ['action']) {
|
|||||||
$wsdl = $_SESSION ['END_POINT'];
|
$wsdl = $_SESSION ['END_POINT'];
|
||||||
$workspace = $_SESSION ['WS_WORKSPACE'];
|
$workspace = $_SESSION ['WS_WORKSPACE'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$defaultEndpoint = 'http://' . $_SERVER ['SERVER_NAME'] . ':' . $_SERVER ['SERVER_PORT'] . '/sys' . SYS_SYS . '/'. SYS_LANG .'/classic/services/wsdl2';
|
$defaultEndpoint = 'http://' . $_SERVER ['SERVER_NAME'] . ':' . $_SERVER ['SERVER_PORT'] . '/sys' . SYS_SYS . '/'. SYS_LANG .'/classic/services/wsdl2';
|
||||||
|
|
||||||
$wsdl = isset ( $_SESSION ['END_POINT'] ) ? $_SESSION ['END_POINT'] : $defaultEndpoint;
|
$wsdl = isset ( $_SESSION ['END_POINT'] ) ? $_SESSION ['END_POINT'] : $defaultEndpoint;
|
||||||
|
|
||||||
$wsSessionId = '';
|
$wsSessionId = '';
|
||||||
if (isset ( $_SESSION ['WS_SESSION_ID'] )) {
|
if (isset ( $_SESSION ['WS_SESSION_ID'] )) {
|
||||||
$wsSessionId = $_SESSION ['WS_SESSION_ID'];
|
$wsSessionId = $_SESSION ['WS_SESSION_ID'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$aFields ['WSDL'] = $wsdl;
|
$aFields ['WSDL'] = $wsdl;
|
||||||
$aFields ['OS'] = $workspace;
|
$aFields ['OS'] = $workspace;
|
||||||
$aFields ['WSID'] = $wsSessionId;
|
$aFields ['WSID'] = $wsSessionId;
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher ( );
|
$G_PUBLISH = new Publisher ( );
|
||||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/webServicesDetails', '', $aFields, 'webServicesSetupSave' );
|
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/webServicesDetails', '', $aFields, 'webServicesSetupSave' );
|
||||||
|
|
||||||
G::RenderPage ( "publish", "raw" );
|
G::RenderPage ( "publish", "raw" );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'showUploadFilesForm':
|
case 'showUploadFilesForm':
|
||||||
global $G_PUBLISH;
|
global $G_PUBLISH;
|
||||||
@@ -124,7 +124,7 @@ switch ($_POST ['action']) {
|
|||||||
|
|
||||||
$G_PUBLISH = new Publisher ( );
|
$G_PUBLISH = new Publisher ( );
|
||||||
$fields ['SESSION_ID'] = isset ( $_SESSION ['WS_SESSION_ID'] ) ? $_SESSION ['WS_SESSION_ID'] : '';
|
$fields ['SESSION_ID'] = isset ( $_SESSION ['WS_SESSION_ID'] ) ? $_SESSION ['WS_SESSION_ID'] : '';
|
||||||
$fields ['ACTION'] = 'wsSendFiles';
|
$fields ['ACTION'] = 'wsSendFiles';
|
||||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', $xmlform, '', $fields, '../setup/webServicesAjax');
|
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', $xmlform, '', $fields, '../setup/webServicesAjax');
|
||||||
G::RenderPage ( 'publish', 'blank' );
|
G::RenderPage ( 'publish', 'blank' );
|
||||||
}
|
}
|
||||||
@@ -138,12 +138,29 @@ switch ($_POST ['action']) {
|
|||||||
$_SESSION ['END_POINT'] = $_POST ["epr"];
|
$_SESSION ['END_POINT'] = $_POST ["epr"];
|
||||||
}
|
}
|
||||||
$defaultEndpoint = 'http://' . $_SERVER ['SERVER_NAME'] . ':' . $_SERVER ['SERVER_PORT'] . '/sys' . SYS_SYS . '/'. SYS_LANG .'/classic/services/wsdl2';
|
$defaultEndpoint = 'http://' . $_SERVER ['SERVER_NAME'] . ':' . $_SERVER ['SERVER_PORT'] . '/sys' . SYS_SYS . '/'. SYS_LANG .'/classic/services/wsdl2';
|
||||||
|
|
||||||
$endpoint = isset ( $_SESSION ['END_POINT'] ) ? $_SESSION ['END_POINT'] : $defaultEndpoint;
|
$endpoint = isset ( $_SESSION ['END_POINT'] ) ? $_SESSION ['END_POINT'] : $defaultEndpoint;
|
||||||
|
|
||||||
$sessionId = isset ( $_SESSION ['SESSION_ID'] ) ? $_SESSION ['SESSION_ID'] : '';
|
$sessionId = isset ( $_SESSION ['SESSION_ID'] ) ? $_SESSION ['SESSION_ID'] : '';
|
||||||
@$client = new SoapClient ( $endpoint );
|
|
||||||
|
//Apply proxy settings
|
||||||
|
$proxy = array();
|
||||||
|
$sysConf = System::getSystemConfiguration();
|
||||||
|
if ($sysConf['proxy_host'] != '') {
|
||||||
|
$proxy['proxy_host'] = $sysConf['proxy_host'];
|
||||||
|
if ($sysConf['proxy_port'] != '') {
|
||||||
|
$proxy['proxy_port'] = $sysConf['proxy_port'];
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_user'] != '') {
|
||||||
|
$proxy['proxy_login'] = $sysConf['proxy_user'];
|
||||||
|
}
|
||||||
|
if ($sysConf['proxy_pass'] != '') {
|
||||||
|
$proxy['proxy_password'] = $sysConf['proxy_pass'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@$client = new SoapClient($endpoint, $proxy);
|
||||||
|
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
case "Login" :
|
case "Login" :
|
||||||
$user = $frm ["USER_ID"];
|
$user = $frm ["USER_ID"];
|
||||||
@@ -165,13 +182,13 @@ switch ($_POST ['action']) {
|
|||||||
case "ProcessList" :
|
case "ProcessList" :
|
||||||
$sessionId = $frm ["SESSION_ID"];
|
$sessionId = $frm ["SESSION_ID"];
|
||||||
$params = array ('sessionId' => $sessionId );
|
$params = array ('sessionId' => $sessionId );
|
||||||
|
|
||||||
$wsResponse = $client->__SoapCall ( 'ProcessList', array ($params ) );
|
$wsResponse = $client->__SoapCall ( 'ProcessList', array ($params ) );
|
||||||
$result = G::PMWSCompositeResponse($wsResponse, 'processes');
|
$result = G::PMWSCompositeResponse($wsResponse, 'processes');
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$rows [] = array ('guid' => 'char', 'name' => 'char' );
|
$rows [] = array ('guid' => 'char', 'name' => 'char' );
|
||||||
|
|
||||||
if( is_array($result) ){
|
if( is_array($result) ){
|
||||||
foreach ( $result as $key => $item ) {
|
foreach ( $result as $key => $item ) {
|
||||||
if (isset ( $item->item ))
|
if (isset ( $item->item ))
|
||||||
@@ -194,14 +211,14 @@ switch ($_POST ['action']) {
|
|||||||
if (isset ( $item->name ))
|
if (isset ( $item->name ))
|
||||||
$name = $item->name;
|
$name = $item->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
$rows [] = array ('guid' => $guid, 'name' => $name );
|
$rows [] = array ('guid' => $guid, 'name' => $name );
|
||||||
}
|
}
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
$_DBArray = (isset ( $_SESSION ['_DBArray'] ) ? $_SESSION ['_DBArray'] : '');
|
$_DBArray = (isset ( $_SESSION ['_DBArray'] ) ? $_SESSION ['_DBArray'] : '');
|
||||||
$_DBArray ['process'] = $rows;
|
$_DBArray ['process'] = $rows;
|
||||||
$_SESSION ['_DBArray'] = $_DBArray;
|
$_SESSION ['_DBArray'] = $_DBArray;
|
||||||
|
|
||||||
$c = new Criteria ( 'dbarray' );
|
$c = new Criteria ( 'dbarray' );
|
||||||
$c->setDBArrayTable ( 'process' );
|
$c->setDBArrayTable ( 'process' );
|
||||||
$c->addAscendingOrderByColumn ( 'name' );
|
$c->addAscendingOrderByColumn ( 'name' );
|
||||||
@@ -213,7 +230,7 @@ switch ($_POST ['action']) {
|
|||||||
$fields ['time_stamp'] = date("Y-m-d H:i:s");
|
$fields ['time_stamp'] = date("Y-m-d H:i:s");
|
||||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
||||||
}
|
}
|
||||||
|
|
||||||
G::RenderPage ( 'publish', 'raw' );
|
G::RenderPage ( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
case "RoleList" :
|
case "RoleList" :
|
||||||
@@ -221,12 +238,12 @@ switch ($_POST ['action']) {
|
|||||||
$params = array ('sessionId' => $sessionId );
|
$params = array ('sessionId' => $sessionId );
|
||||||
$wsResponse = $client->__SoapCall ( 'RoleList', array ($params ) );
|
$wsResponse = $client->__SoapCall ( 'RoleList', array ($params ) );
|
||||||
$result = G::PMWSCompositeResponse($wsResponse, 'roles');
|
$result = G::PMWSCompositeResponse($wsResponse, 'roles');
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher ();
|
$G_PUBLISH = new Publisher ();
|
||||||
|
|
||||||
$rows [] = array ('guid' => 'char', 'name' => 'char');
|
$rows [] = array ('guid' => 'char', 'name' => 'char');
|
||||||
if ( is_array ( $result )){
|
if ( is_array ( $result )){
|
||||||
|
|
||||||
foreach ( $result as $key => $item ) {
|
foreach ( $result as $key => $item ) {
|
||||||
if (isset ( $item->item ))
|
if (isset ( $item->item ))
|
||||||
foreach ( $item->item as $index => $val ) {
|
foreach ( $item->item as $index => $val ) {
|
||||||
@@ -248,14 +265,14 @@ switch ($_POST ['action']) {
|
|||||||
if (isset ( $item->name ))
|
if (isset ( $item->name ))
|
||||||
$name = $item->name;
|
$name = $item->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
$rows [] = array ('guid' => $guid, 'name' => $name );
|
$rows [] = array ('guid' => $guid, 'name' => $name );
|
||||||
}
|
}
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
$_DBArray = (isset ( $_SESSION ['_DBArray'] ) ? $_SESSION ['_DBArray'] : '');
|
$_DBArray = (isset ( $_SESSION ['_DBArray'] ) ? $_SESSION ['_DBArray'] : '');
|
||||||
$_DBArray ['role'] = $rows;
|
$_DBArray ['role'] = $rows;
|
||||||
$_SESSION ['_DBArray'] = $_DBArray;
|
$_SESSION ['_DBArray'] = $_DBArray;
|
||||||
|
|
||||||
G::LoadClass ( 'ArrayPeer' );
|
G::LoadClass ( 'ArrayPeer' );
|
||||||
$c = new Criteria ( 'dbarray' );
|
$c = new Criteria ( 'dbarray' );
|
||||||
$c->setDBArrayTable ( 'role' );
|
$c->setDBArrayTable ( 'role' );
|
||||||
@@ -268,16 +285,16 @@ switch ($_POST ['action']) {
|
|||||||
$fields ['time_stamp'] = date("Y-m-d H:i:s");
|
$fields ['time_stamp'] = date("Y-m-d H:i:s");
|
||||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
||||||
}
|
}
|
||||||
|
|
||||||
G::RenderPage ( 'publish', 'raw' );
|
G::RenderPage ( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "GroupList" :
|
case "GroupList" :
|
||||||
$sessionId = $frm ["SESSION_ID"];
|
$sessionId = $frm ["SESSION_ID"];
|
||||||
$params = array ('sessionId' => $sessionId );
|
$params = array ('sessionId' => $sessionId );
|
||||||
$wsResponse = $client->__SoapCall ( 'GroupList', array ($params ) );
|
$wsResponse = $client->__SoapCall ( 'GroupList', array ($params ) );
|
||||||
$result = G::PMWSCompositeResponse($wsResponse, 'groups');
|
$result = G::PMWSCompositeResponse($wsResponse, 'groups');
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher ( );
|
$G_PUBLISH = new Publisher ( );
|
||||||
$rows [] = array ('guid' => 'char', 'name' => 'char' );
|
$rows [] = array ('guid' => 'char', 'name' => 'char' );
|
||||||
if (is_array ( $result )){
|
if (is_array ( $result )){
|
||||||
@@ -302,14 +319,14 @@ switch ($_POST ['action']) {
|
|||||||
if (isset ( $item->name ))
|
if (isset ( $item->name ))
|
||||||
$name = $item->name;
|
$name = $item->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
$rows [] = array ('guid' => $guid, 'name' => $name );
|
$rows [] = array ('guid' => $guid, 'name' => $name );
|
||||||
}
|
}
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
$_DBArray = (isset ( $_SESSION ['_DBArray'] ) ? $_SESSION ['_DBArray'] : '');
|
$_DBArray = (isset ( $_SESSION ['_DBArray'] ) ? $_SESSION ['_DBArray'] : '');
|
||||||
$_DBArray ['group'] = $rows;
|
$_DBArray ['group'] = $rows;
|
||||||
$_SESSION ['_DBArray'] = $_DBArray;
|
$_SESSION ['_DBArray'] = $_DBArray;
|
||||||
|
|
||||||
G::LoadClass ( 'ArrayPeer' );
|
G::LoadClass ( 'ArrayPeer' );
|
||||||
$c = new Criteria ( 'dbarray' );
|
$c = new Criteria ( 'dbarray' );
|
||||||
$c->setDBArrayTable ( 'group' );
|
$c->setDBArrayTable ( 'group' );
|
||||||
@@ -322,20 +339,20 @@ switch ($_POST ['action']) {
|
|||||||
$fields ['time_stamp'] = date("Y-m-d H:i:s");
|
$fields ['time_stamp'] = date("Y-m-d H:i:s");
|
||||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
||||||
}
|
}
|
||||||
|
|
||||||
G::RenderPage ( 'publish', 'raw' );
|
G::RenderPage ( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "CaseList" :
|
case "CaseList" :
|
||||||
$sessionId = $frm ["SESSION_ID"];
|
$sessionId = $frm ["SESSION_ID"];
|
||||||
$params = array ('sessionId' => $sessionId );
|
$params = array ('sessionId' => $sessionId );
|
||||||
$wsResponse = $client->__SoapCall ( 'CaseList', array ($params ) );
|
$wsResponse = $client->__SoapCall ( 'CaseList', array ($params ) );
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher ( );
|
$G_PUBLISH = new Publisher ( );
|
||||||
$rows [] = array ('guid' => 'char', 'name' => 'char', 'status' => 'char', 'delIndex' => 'char' );
|
$rows [] = array ('guid' => 'char', 'name' => 'char', 'status' => 'char', 'delIndex' => 'char' );
|
||||||
|
|
||||||
$result = G::PMWSCompositeResponse($wsResponse, 'cases');
|
$result = G::PMWSCompositeResponse($wsResponse, 'cases');
|
||||||
|
|
||||||
if ( is_array( $result )) {
|
if ( is_array( $result )) {
|
||||||
foreach ( $result as $key => $item ) {
|
foreach ( $result as $key => $item ) {
|
||||||
if (isset ( $item->item ))
|
if (isset ( $item->item ))
|
||||||
@@ -359,7 +376,7 @@ switch ($_POST ['action']) {
|
|||||||
$status = $val->value;
|
$status = $val->value;
|
||||||
if ($val->key == 'delIndex')
|
if ($val->key == 'delIndex')
|
||||||
$delIndex = $val->value;
|
$delIndex = $val->value;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (isset ( $item->guid ))
|
if (isset ( $item->guid ))
|
||||||
$guid = $item->guid;
|
$guid = $item->guid;
|
||||||
@@ -369,23 +386,23 @@ switch ($_POST ['action']) {
|
|||||||
$status = $item->status;
|
$status = $item->status;
|
||||||
if (isset ( $item->delIndex ))
|
if (isset ( $item->delIndex ))
|
||||||
$delIndex = $item->delIndex;
|
$delIndex = $item->delIndex;
|
||||||
|
|
||||||
}
|
}
|
||||||
$rows [] = array ('guid' => $guid, 'name' => $name, 'status' => $status, 'delIndex' => $delIndex );
|
$rows [] = array ('guid' => $guid, 'name' => $name, 'status' => $status, 'delIndex' => $delIndex );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
$_DBArray = (isset ( $_SESSION ['_DBArray'] ) ? $_SESSION ['_DBArray'] : '');
|
$_DBArray = (isset ( $_SESSION ['_DBArray'] ) ? $_SESSION ['_DBArray'] : '');
|
||||||
$_DBArray ['case'] = $rows;
|
$_DBArray ['case'] = $rows;
|
||||||
$_SESSION ['_DBArray'] = $_DBArray;
|
$_SESSION ['_DBArray'] = $_DBArray;
|
||||||
|
|
||||||
G::LoadClass ( 'ArrayPeer' );
|
G::LoadClass ( 'ArrayPeer' );
|
||||||
$c = new Criteria ( 'dbarray' );
|
$c = new Criteria ( 'dbarray' );
|
||||||
$c->setDBArrayTable ( 'case' );
|
$c->setDBArrayTable ( 'case' );
|
||||||
//$c->addAscendingOrderByColumn ( 'name' );
|
//$c->addAscendingOrderByColumn ( 'name' );
|
||||||
$G_PUBLISH->AddContent ( 'propeltable', 'paged-table', 'setup/wsrCaseList', $c );
|
$G_PUBLISH->AddContent ( 'propeltable', 'paged-table', 'setup/wsrCaseList', $c );
|
||||||
|
|
||||||
} else if( is_object($result) ){
|
} else if( is_object($result) ){
|
||||||
$_SESSION ['WS_SESSION_ID'] = '';
|
$_SESSION ['WS_SESSION_ID'] = '';
|
||||||
$fields ['status_code'] = $result->status_code;
|
$fields ['status_code'] = $result->status_code;
|
||||||
@@ -393,18 +410,18 @@ switch ($_POST ['action']) {
|
|||||||
$fields ['time_stamp'] = date("Y-m-d H:i:s");
|
$fields ['time_stamp'] = date("Y-m-d H:i:s");
|
||||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
||||||
}
|
}
|
||||||
|
|
||||||
G::RenderPage ( 'publish', 'raw' );
|
G::RenderPage ( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case "UnassignedCaseList" :
|
|
||||||
|
case "UnassignedCaseList" :
|
||||||
|
|
||||||
$sessionId = $frm ["SESSION_ID"];
|
$sessionId = $frm ["SESSION_ID"];
|
||||||
$params = array ('sessionId' => $sessionId );
|
$params = array ('sessionId' => $sessionId );
|
||||||
|
|
||||||
$wsResponse = $client->__SoapCall ( 'UnassignedCaseList', array ($params ));
|
$wsResponse = $client->__SoapCall ( 'UnassignedCaseList', array ($params ));
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher ( );
|
$G_PUBLISH = new Publisher ( );
|
||||||
$rows [] = array ('guid' => 'char', 'name' => 'char', 'delIndex' => 'char' );
|
$rows [] = array ('guid' => 'char', 'name' => 'char', 'delIndex' => 'char' );
|
||||||
$result = G::PMWSCompositeResponse($wsResponse, 'cases');
|
$result = G::PMWSCompositeResponse($wsResponse, 'cases');
|
||||||
@@ -416,7 +433,7 @@ switch ($_POST ['action']) {
|
|||||||
if ($val->key == 'guid')
|
if ($val->key == 'guid')
|
||||||
$guid = $val->value;
|
$guid = $val->value;
|
||||||
if ($val->key == 'name')
|
if ($val->key == 'name')
|
||||||
$name = $val->value;
|
$name = $val->value;
|
||||||
if ($val->key == 'delIndex')
|
if ($val->key == 'delIndex')
|
||||||
$delIndex = $val->value;
|
$delIndex = $val->value;
|
||||||
}
|
}
|
||||||
@@ -425,18 +442,18 @@ switch ($_POST ['action']) {
|
|||||||
if ($val->key == 'guid')
|
if ($val->key == 'guid')
|
||||||
$guid = $val->value;
|
$guid = $val->value;
|
||||||
if ($val->key == 'name')
|
if ($val->key == 'name')
|
||||||
$name = $val->value;
|
$name = $val->value;
|
||||||
if ($val->key == 'delIndex')
|
if ($val->key == 'delIndex')
|
||||||
$delIndex = $val->value;
|
$delIndex = $val->value;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (isset ( $item->guid ))
|
if (isset ( $item->guid ))
|
||||||
$guid = $item->guid;
|
$guid = $item->guid;
|
||||||
if (isset ( $item->name ))
|
if (isset ( $item->name ))
|
||||||
$name = $item->name;
|
$name = $item->name;
|
||||||
if (isset ( $item->delIndex ))
|
if (isset ( $item->delIndex ))
|
||||||
$delIndex = $item->delIndex;
|
$delIndex = $item->delIndex;
|
||||||
}
|
}
|
||||||
$rows [] = array ('guid' => $guid, 'name' => $name, 'delIndex' => $delIndex );
|
$rows [] = array ('guid' => $guid, 'name' => $name, 'delIndex' => $delIndex );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -447,10 +464,10 @@ switch ($_POST ['action']) {
|
|||||||
|
|
||||||
G::LoadClass ( 'ArrayPeer' );
|
G::LoadClass ( 'ArrayPeer' );
|
||||||
$c = new Criteria ( 'dbarray' );
|
$c = new Criteria ( 'dbarray' );
|
||||||
$c->setDBArrayTable ( 'case' );
|
$c->setDBArrayTable ( 'case' );
|
||||||
$G_PUBLISH->AddContent ( 'propeltable', 'paged-table', 'setup/wsrUnassignedCaseList', $c );
|
$G_PUBLISH->AddContent ( 'propeltable', 'paged-table', 'setup/wsrUnassignedCaseList', $c );
|
||||||
|
|
||||||
}
|
}
|
||||||
else if( is_object($result) ){
|
else if( is_object($result) ){
|
||||||
$_SESSION ['WS_SESSION_ID'] = '';
|
$_SESSION ['WS_SESSION_ID'] = '';
|
||||||
$fields ['status_code'] = $result->status_code;
|
$fields ['status_code'] = $result->status_code;
|
||||||
@@ -461,17 +478,17 @@ switch ($_POST ['action']) {
|
|||||||
|
|
||||||
G::RenderPage ( 'publish', 'raw' );
|
G::RenderPage ( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "UserList" :
|
case "UserList" :
|
||||||
$sessionId = $frm ["SESSION_ID"];
|
$sessionId = $frm ["SESSION_ID"];
|
||||||
$params = array ('sessionId' => $sessionId );
|
$params = array ('sessionId' => $sessionId );
|
||||||
$wsResponse = $client->__SoapCall ( 'UserList', array ($params ) );
|
$wsResponse = $client->__SoapCall ( 'UserList', array ($params ) );
|
||||||
$result = G::PMWSCompositeResponse($wsResponse, 'users');
|
$result = G::PMWSCompositeResponse($wsResponse, 'users');
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$rows [] = array ('guid' => 'char', 'name' => 'char' );
|
$rows [] = array ('guid' => 'char', 'name' => 'char' );
|
||||||
if (is_array ( $result )){
|
if (is_array ( $result )){
|
||||||
|
|
||||||
foreach ( $result as $key => $item ) {
|
foreach ( $result as $key => $item ) {
|
||||||
if (isset ( $item->item ))
|
if (isset ( $item->item ))
|
||||||
foreach ( $item->item as $index => $val ) {
|
foreach ( $item->item as $index => $val ) {
|
||||||
@@ -493,22 +510,22 @@ switch ($_POST ['action']) {
|
|||||||
if (isset ( $item->name ))
|
if (isset ( $item->name ))
|
||||||
$name = $item->name;
|
$name = $item->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
$rows [] = array ('guid' => $guid, 'name' => $name );
|
$rows [] = array ('guid' => $guid, 'name' => $name );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
$_DBArray = (isset ( $_SESSION ['_DBArray'] ) ? $_SESSION ['_DBArray'] : '');
|
$_DBArray = (isset ( $_SESSION ['_DBArray'] ) ? $_SESSION ['_DBArray'] : '');
|
||||||
$_DBArray ['user'] = $rows;
|
$_DBArray ['user'] = $rows;
|
||||||
$_SESSION ['_DBArray'] = $_DBArray;
|
$_SESSION ['_DBArray'] = $_DBArray;
|
||||||
|
|
||||||
G::LoadClass ( 'ArrayPeer' );
|
G::LoadClass ( 'ArrayPeer' );
|
||||||
$c = new Criteria ( 'dbarray' );
|
$c = new Criteria ( 'dbarray' );
|
||||||
$c->setDBArrayTable ( 'user' );
|
$c->setDBArrayTable ( 'user' );
|
||||||
$c->addAscendingOrderByColumn ( 'name' );
|
$c->addAscendingOrderByColumn ( 'name' );
|
||||||
$G_PUBLISH->AddContent ( 'propeltable', 'paged-table', 'setup/wsrUserList', $c );
|
$G_PUBLISH->AddContent ( 'propeltable', 'paged-table', 'setup/wsrUserList', $c );
|
||||||
|
|
||||||
} else if( is_object($result) ){
|
} else if( is_object($result) ){
|
||||||
$_SESSION ['WS_SESSION_ID'] = '';
|
$_SESSION ['WS_SESSION_ID'] = '';
|
||||||
$fields ['status_code'] = $result->status_code;
|
$fields ['status_code'] = $result->status_code;
|
||||||
@@ -518,7 +535,7 @@ switch ($_POST ['action']) {
|
|||||||
}
|
}
|
||||||
G::RenderPage ( 'publish', 'raw' );
|
G::RenderPage ( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "SendMessage" :
|
case "SendMessage" :
|
||||||
require_once('classes/model/Application.php');
|
require_once('classes/model/Application.php');
|
||||||
$sessionId = $frm ["SESSION_ID"];
|
$sessionId = $frm ["SESSION_ID"];
|
||||||
@@ -545,7 +562,7 @@ switch ($_POST ['action']) {
|
|||||||
'caseId' => $caseId,
|
'caseId' => $caseId,
|
||||||
'from' => $from,
|
'from' => $from,
|
||||||
'to' => $to,
|
'to' => $to,
|
||||||
'cc' => $cc,
|
'cc' => $cc,
|
||||||
'bcc' => $bcc,
|
'bcc' => $bcc,
|
||||||
'subject' => $subject,
|
'subject' => $subject,
|
||||||
'template' => 'tempTemplate.hml' );
|
'template' => 'tempTemplate.hml' );
|
||||||
@@ -554,20 +571,20 @@ switch ($_POST ['action']) {
|
|||||||
$fields ['status_code'] = $result->status_code;
|
$fields ['status_code'] = $result->status_code;
|
||||||
$fields ['message'] = $result->message;
|
$fields ['message'] = $result->message;
|
||||||
$fields ['time_stamp'] = $result->timestamp;
|
$fields ['time_stamp'] = $result->timestamp;
|
||||||
|
|
||||||
if( $result->status_code == 9 ){
|
if( $result->status_code == 9 ){
|
||||||
$_SESSION ['WS_SESSION_ID'] = '';
|
$_SESSION ['WS_SESSION_ID'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
||||||
G::RenderPage ( 'publish', 'raw' );
|
G::RenderPage ( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "SendVariables" :
|
case "SendVariables" :
|
||||||
$sessionId = $frm ["SESSION_ID"];
|
$sessionId = $frm ["SESSION_ID"];
|
||||||
$caseId = $frm ["CASE_ID"];
|
$caseId = $frm ["CASE_ID"];
|
||||||
$variables = Array();
|
$variables = Array();
|
||||||
|
|
||||||
$o = new stdClass();
|
$o = new stdClass();
|
||||||
$o->name = $frm ["NAME1"];
|
$o->name = $frm ["NAME1"];
|
||||||
$o->value = $frm ["VALUE1"];
|
$o->value = $frm ["VALUE1"];
|
||||||
@@ -576,66 +593,66 @@ switch ($_POST ['action']) {
|
|||||||
$o->name = $frm ["NAME2"];
|
$o->name = $frm ["NAME2"];
|
||||||
$o->value = $frm ["VALUE2"];
|
$o->value = $frm ["VALUE2"];
|
||||||
array_push($variables, $o);
|
array_push($variables, $o);
|
||||||
|
|
||||||
$params = array ('sessionId' => $sessionId, 'caseId' => $caseId, 'variables' => $variables );
|
$params = array ('sessionId' => $sessionId, 'caseId' => $caseId, 'variables' => $variables );
|
||||||
$result = $client->__SoapCall ( 'SendVariables', array ($params ) );
|
$result = $client->__SoapCall ( 'SendVariables', array ($params ) );
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$fields ['status_code'] = $result->status_code;
|
$fields ['status_code'] = $result->status_code;
|
||||||
$fields ['message'] = $result->message;
|
$fields ['message'] = $result->message;
|
||||||
$fields ['time_stamp'] = $result->timestamp;
|
$fields ['time_stamp'] = $result->timestamp;
|
||||||
|
|
||||||
if( $result->status_code == 9 ){
|
if( $result->status_code == 9 ){
|
||||||
$_SESSION ['WS_SESSION_ID'] = '';
|
$_SESSION ['WS_SESSION_ID'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
||||||
G::RenderPage ( 'publish', 'raw' );
|
G::RenderPage ( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "DerivateCase" :
|
case "DerivateCase" :
|
||||||
$sessionId = $frm ["SESSION_ID"];
|
$sessionId = $frm ["SESSION_ID"];
|
||||||
$caseId = $frm ["CASE_ID"];
|
$caseId = $frm ["CASE_ID"];
|
||||||
$delIndex = $frm ["DEL_INDEX"];
|
$delIndex = $frm ["DEL_INDEX"];
|
||||||
|
|
||||||
$params = array ('sessionId' => $sessionId, 'caseId' => $caseId, 'delIndex' => $delIndex );
|
$params = array ('sessionId' => $sessionId, 'caseId' => $caseId, 'delIndex' => $delIndex );
|
||||||
$result = $client->__SoapCall ( 'RouteCase', array ($params ) );
|
$result = $client->__SoapCall ( 'RouteCase', array ($params ) );
|
||||||
$G_PUBLISH = new Publisher ( );
|
$G_PUBLISH = new Publisher ( );
|
||||||
$fields ['status_code'] = $result->status_code;
|
$fields ['status_code'] = $result->status_code;
|
||||||
$fields ['message'] = $result->message;
|
$fields ['message'] = $result->message;
|
||||||
$fields ['time_stamp'] = $result->timestamp;
|
$fields ['time_stamp'] = $result->timestamp;
|
||||||
|
|
||||||
if( $result->status_code == 9 ){
|
if( $result->status_code == 9 ){
|
||||||
$_SESSION ['WS_SESSION_ID'] = '';
|
$_SESSION ['WS_SESSION_ID'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
||||||
G::RenderPage ( 'publish', 'raw' );
|
G::RenderPage ( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "ReassignCase" :
|
case "ReassignCase" :
|
||||||
$sessionId = $frm ["SESSION_ID"];
|
$sessionId = $frm ["SESSION_ID"];
|
||||||
$caseId = $frm ["CASE_ID"];
|
$caseId = $frm ["CASE_ID"];
|
||||||
$delIndex = $frm ["DEL_INDEX"];
|
$delIndex = $frm ["DEL_INDEX"];
|
||||||
$userIdSource = $frm ['USERIDSOURCE'];
|
$userIdSource = $frm ['USERIDSOURCE'];
|
||||||
$userIdTarget = $frm ['USERIDTARGET'];
|
$userIdTarget = $frm ['USERIDTARGET'];
|
||||||
|
|
||||||
$params = array ('sessionId' => $sessionId, 'caseId' => $caseId, 'delIndex' => $delIndex, 'userIdSource' => $userIdSource, 'userIdTarget' => $userIdTarget );
|
$params = array ('sessionId' => $sessionId, 'caseId' => $caseId, 'delIndex' => $delIndex, 'userIdSource' => $userIdSource, 'userIdTarget' => $userIdTarget );
|
||||||
$result = $client->__SoapCall ( 'reassignCase', array ($params ) );
|
$result = $client->__SoapCall ( 'reassignCase', array ($params ) );
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher ( );
|
$G_PUBLISH = new Publisher ( );
|
||||||
$fields ['status_code'] = $result->status_code;
|
$fields ['status_code'] = $result->status_code;
|
||||||
$fields ['message'] = $result->message;
|
$fields ['message'] = $result->message;
|
||||||
$fields ['time_stamp'] = $result->timestamp;
|
$fields ['time_stamp'] = $result->timestamp;
|
||||||
|
|
||||||
if( $result->status_code == 9 ){
|
if( $result->status_code == 9 ){
|
||||||
$_SESSION ['WS_SESSION_ID'] = '';
|
$_SESSION ['WS_SESSION_ID'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
||||||
G::RenderPage ( 'publish', 'raw' );
|
G::RenderPage ( 'publish', 'raw' );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "NewCaseImpersonate" :
|
case "NewCaseImpersonate" :
|
||||||
$sessionId = $frm ["SESSION_ID"];
|
$sessionId = $frm ["SESSION_ID"];
|
||||||
$processId = $frm ["PROCESS_ID"];
|
$processId = $frm ["PROCESS_ID"];
|
||||||
@@ -653,15 +670,15 @@ switch ($_POST ['action']) {
|
|||||||
$fields ['status_code'] = $result->status_code;
|
$fields ['status_code'] = $result->status_code;
|
||||||
$fields ['message'] = $result->message;
|
$fields ['message'] = $result->message;
|
||||||
$fields ['time_stamp'] = $result->timestamp;
|
$fields ['time_stamp'] = $result->timestamp;
|
||||||
|
|
||||||
if( $result->status_code == 9 ){
|
if( $result->status_code == 9 ){
|
||||||
$_SESSION ['WS_SESSION_ID'] = '';
|
$_SESSION ['WS_SESSION_ID'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
||||||
G::RenderPage ( 'publish', 'raw' );
|
G::RenderPage ( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "NewCase" :
|
case "NewCase" :
|
||||||
$sessionId = $frm ["SESSION_ID"];
|
$sessionId = $frm ["SESSION_ID"];
|
||||||
$processId = $frm ["PROCESS_ID"];
|
$processId = $frm ["PROCESS_ID"];
|
||||||
@@ -693,7 +710,7 @@ switch ($_POST ['action']) {
|
|||||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
||||||
G::RenderPage ( 'publish', 'raw' );
|
G::RenderPage ( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "AssignUserToGroup" :
|
case "AssignUserToGroup" :
|
||||||
$sessionId = $frm ["SESSION_ID"];
|
$sessionId = $frm ["SESSION_ID"];
|
||||||
$userId = $frm ["USER_ID"];
|
$userId = $frm ["USER_ID"];
|
||||||
@@ -704,15 +721,15 @@ switch ($_POST ['action']) {
|
|||||||
$fields ['status_code'] = $result->status_code;
|
$fields ['status_code'] = $result->status_code;
|
||||||
$fields ['message'] = $result->message;
|
$fields ['message'] = $result->message;
|
||||||
$fields ['time_stamp'] = $result->timestamp;
|
$fields ['time_stamp'] = $result->timestamp;
|
||||||
|
|
||||||
if( $result->status_code == 9 ){
|
if( $result->status_code == 9 ){
|
||||||
$_SESSION ['WS_SESSION_ID'] = '';
|
$_SESSION ['WS_SESSION_ID'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
||||||
G::RenderPage ( 'publish', 'raw' );
|
G::RenderPage ( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "CreateUser" :
|
case "CreateUser" :
|
||||||
$sessionId = $frm ["SESSION_ID"];
|
$sessionId = $frm ["SESSION_ID"];
|
||||||
$userId = $frm ["USER_ID"];
|
$userId = $frm ["USER_ID"];
|
||||||
@@ -721,33 +738,33 @@ switch ($_POST ['action']) {
|
|||||||
$email = $frm ["EMAIL"];
|
$email = $frm ["EMAIL"];
|
||||||
$role = $frm ["ROLE"];
|
$role = $frm ["ROLE"];
|
||||||
$password = $frm ["PASSWORD"];
|
$password = $frm ["PASSWORD"];
|
||||||
|
|
||||||
$params = array ('sessionId' => $sessionId, 'userId' => $userId, 'firstname' => $firstname, 'lastname' => $lastname, 'email' => $email, 'role' => $role, 'password' => $password );
|
$params = array ('sessionId' => $sessionId, 'userId' => $userId, 'firstname' => $firstname, 'lastname' => $lastname, 'email' => $email, 'role' => $role, 'password' => $password );
|
||||||
$result = $client->__SoapCall ( 'CreateUser', array ($params ) );
|
$result = $client->__SoapCall ( 'CreateUser', array ($params ) );
|
||||||
$G_PUBLISH = new Publisher ( );
|
$G_PUBLISH = new Publisher ( );
|
||||||
$fields ['status_code'] = $result->status_code;
|
$fields ['status_code'] = $result->status_code;
|
||||||
$fields ['message'] = $result->message;
|
$fields ['message'] = $result->message;
|
||||||
$fields ['time_stamp'] = $result->timestamp;
|
$fields ['time_stamp'] = $result->timestamp;
|
||||||
|
|
||||||
if( $result->status_code == 9 ){
|
if( $result->status_code == 9 ){
|
||||||
$_SESSION ['WS_SESSION_ID'] = '';
|
$_SESSION ['WS_SESSION_ID'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
||||||
G::RenderPage ( 'publish', 'raw' );
|
G::RenderPage ( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "TaskList" :
|
case "TaskList" :
|
||||||
$sessionId = $frm ["SESSION_ID"];
|
$sessionId = $frm ["SESSION_ID"];
|
||||||
$params = array ('sessionId' => $sessionId );
|
$params = array ('sessionId' => $sessionId );
|
||||||
$wsResponse = $client->__SoapCall ( 'TaskList', array ($params ) );
|
$wsResponse = $client->__SoapCall ( 'TaskList', array ($params ) );
|
||||||
$result = G::PMWSCompositeResponse($wsResponse, 'tasks');
|
$result = G::PMWSCompositeResponse($wsResponse, 'tasks');
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher ( );
|
$G_PUBLISH = new Publisher ( );
|
||||||
$rows [] = array ('guid' => 'char', 'name' => 'char' );
|
$rows [] = array ('guid' => 'char', 'name' => 'char' );
|
||||||
|
|
||||||
if (is_array ( $result )){
|
if (is_array ( $result )){
|
||||||
|
|
||||||
foreach ( $result as $key => $item ) {
|
foreach ( $result as $key => $item ) {
|
||||||
if (isset ( $item->item ))
|
if (isset ( $item->item ))
|
||||||
foreach ( $item->item as $index => $val ) {
|
foreach ( $item->item as $index => $val ) {
|
||||||
@@ -769,14 +786,14 @@ switch ($_POST ['action']) {
|
|||||||
if (isset ( $item->name ))
|
if (isset ( $item->name ))
|
||||||
$name = $item->name;
|
$name = $item->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
$rows [] = array ('guid' => $guid, 'name' => $name );
|
$rows [] = array ('guid' => $guid, 'name' => $name );
|
||||||
}
|
}
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
$_DBArray = (isset ( $_SESSION ['_DBArray'] ) ? $_SESSION ['_DBArray'] : '');
|
$_DBArray = (isset ( $_SESSION ['_DBArray'] ) ? $_SESSION ['_DBArray'] : '');
|
||||||
$_DBArray ['task'] = $rows;
|
$_DBArray ['task'] = $rows;
|
||||||
$_SESSION ['_DBArray'] = $_DBArray;
|
$_SESSION ['_DBArray'] = $_DBArray;
|
||||||
|
|
||||||
G::LoadClass ( 'ArrayPeer' );
|
G::LoadClass ( 'ArrayPeer' );
|
||||||
$c = new Criteria ( 'dbarray' );
|
$c = new Criteria ( 'dbarray' );
|
||||||
$c->setDBArrayTable ( 'task' );
|
$c->setDBArrayTable ( 'task' );
|
||||||
@@ -791,17 +808,17 @@ switch ($_POST ['action']) {
|
|||||||
}
|
}
|
||||||
G::RenderPage ( 'publish', 'raw' );
|
G::RenderPage ( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "TriggerList" :
|
case "TriggerList" :
|
||||||
$sessionId = $frm ["SESSION_ID"];
|
$sessionId = $frm ["SESSION_ID"];
|
||||||
$params = array ('sessionId' => $sessionId );
|
$params = array ('sessionId' => $sessionId );
|
||||||
|
|
||||||
$wsResponse = $client->__SoapCall ( 'triggerList', array ($params ) );
|
$wsResponse = $client->__SoapCall ( 'triggerList', array ($params ) );
|
||||||
$result = G::PMWSCompositeResponse($wsResponse, 'triggers');
|
$result = G::PMWSCompositeResponse($wsResponse, 'triggers');
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher ();
|
$G_PUBLISH = new Publisher ();
|
||||||
$rows [] = array ('guid' => 'char', 'name' => 'char', 'processId' => 'char' );
|
$rows [] = array ('guid' => 'char', 'name' => 'char', 'processId' => 'char' );
|
||||||
|
|
||||||
if (is_array ( $result )){
|
if (is_array ( $result )){
|
||||||
foreach ( $result as $key => $item ) {
|
foreach ( $result as $key => $item ) {
|
||||||
if (isset ( $item->item ))
|
if (isset ( $item->item ))
|
||||||
@@ -832,29 +849,29 @@ switch ($_POST ['action']) {
|
|||||||
}
|
}
|
||||||
$rows [] = array ('guid' => $guid, 'name' => $name, 'processId' => $processId );
|
$rows [] = array ('guid' => $guid, 'name' => $name, 'processId' => $processId );
|
||||||
}
|
}
|
||||||
|
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
$_DBArray = (isset ( $_SESSION ['_DBArray'] ) ? $_SESSION ['_DBArray'] : '');
|
$_DBArray = (isset ( $_SESSION ['_DBArray'] ) ? $_SESSION ['_DBArray'] : '');
|
||||||
|
|
||||||
foreach ( $rows as $key => $row ) {
|
foreach ( $rows as $key => $row ) {
|
||||||
$proId = $row['processId'];
|
$proId = $row['processId'];
|
||||||
if ( isset ($_DBArray ['process']) && is_array ($_DBArray ['process']) )
|
if ( isset ($_DBArray ['process']) && is_array ($_DBArray ['process']) )
|
||||||
foreach ( $_DBArray ['process'] as $pkey => $prow ) {
|
foreach ( $_DBArray ['process'] as $pkey => $prow ) {
|
||||||
if ( $proId == $prow['guid'] ) {
|
if ( $proId == $prow['guid'] ) {
|
||||||
$rows[ $key ]['processId'] = $prow['name'];
|
$rows[ $key ]['processId'] = $prow['name'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$_DBArray ['triggers'] = $rows;
|
$_DBArray ['triggers'] = $rows;
|
||||||
$_SESSION ['_DBArray'] = $_DBArray;
|
$_SESSION ['_DBArray'] = $_DBArray;
|
||||||
|
|
||||||
G::LoadClass ( 'ArrayPeer' );
|
G::LoadClass ( 'ArrayPeer' );
|
||||||
$c = new Criteria ( 'dbarray' );
|
$c = new Criteria ( 'dbarray' );
|
||||||
$c->setDBArrayTable ( 'triggers' );
|
$c->setDBArrayTable ( 'triggers' );
|
||||||
$c->addAscendingOrderByColumn ( 'name' );
|
$c->addAscendingOrderByColumn ( 'name' );
|
||||||
$G_PUBLISH->AddContent ( 'propeltable', 'paged-table', 'setup/wsrTriggerList', $c );
|
$G_PUBLISH->AddContent ( 'propeltable', 'paged-table', 'setup/wsrTriggerList', $c );
|
||||||
|
|
||||||
} else if ( is_object($result) ){
|
} else if ( is_object($result) ){
|
||||||
$_SESSION ['WS_SESSION_ID'] = '';
|
$_SESSION ['WS_SESSION_ID'] = '';
|
||||||
$fields ['status_code'] = $result->status_code;
|
$fields ['status_code'] = $result->status_code;
|
||||||
@@ -862,20 +879,20 @@ switch ($_POST ['action']) {
|
|||||||
$fields ['time_stamp'] = date("Y-m-d H:i:s");
|
$fields ['time_stamp'] = date("Y-m-d H:i:s");
|
||||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
||||||
}
|
}
|
||||||
|
|
||||||
G::RenderPage ( 'publish', 'raw' );
|
G::RenderPage ( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "InputDocumentList" :
|
case "InputDocumentList" :
|
||||||
$caseId = $frm ["CASE_ID"];
|
$caseId = $frm ["CASE_ID"];
|
||||||
$sessionId = $frm ["SESSION_ID"];
|
$sessionId = $frm ["SESSION_ID"];
|
||||||
$params = array ('sessionId' => $sessionId, 'caseId' => $caseId );
|
$params = array ('sessionId' => $sessionId, 'caseId' => $caseId );
|
||||||
|
|
||||||
$wsResponse = $client->__SoapCall ( 'InputDocumentList', array ($params ) );
|
$wsResponse = $client->__SoapCall ( 'InputDocumentList', array ($params ) );
|
||||||
|
|
||||||
//g::pr($wsResponse);
|
//g::pr($wsResponse);
|
||||||
$result = G::PMWSCompositeResponse($wsResponse, 'documents');
|
$result = G::PMWSCompositeResponse($wsResponse, 'documents');
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher ( );
|
$G_PUBLISH = new Publisher ( );
|
||||||
$rows [] = array ('guid' => 'char', 'name' => 'char', 'processId' => 'char' );
|
$rows [] = array ('guid' => 'char', 'name' => 'char', 'processId' => 'char' );
|
||||||
|
|
||||||
@@ -937,33 +954,33 @@ switch ($_POST ['action']) {
|
|||||||
if (isset ( $item->link ))
|
if (isset ( $item->link ))
|
||||||
$link = $item->link;
|
$link = $item->link;
|
||||||
}
|
}
|
||||||
$rows [] = array ('guid' => $guid, 'filename' => $filename, 'docId' => $docId, 'version' => $version,
|
$rows [] = array ('guid' => $guid, 'filename' => $filename, 'docId' => $docId, 'version' => $version,
|
||||||
'createDate' => $createDate, 'createBy' => $createBy, 'type' => $type, 'link' => $link );
|
'createDate' => $createDate, 'createBy' => $createBy, 'type' => $type, 'link' => $link );
|
||||||
}
|
}
|
||||||
|
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
$_DBArray = (isset ( $_SESSION ['_DBArray'] ) ? $_SESSION ['_DBArray'] : '');
|
$_DBArray = (isset ( $_SESSION ['_DBArray'] ) ? $_SESSION ['_DBArray'] : '');
|
||||||
$_DBArray ['inputDocument'] = $rows;
|
$_DBArray ['inputDocument'] = $rows;
|
||||||
$documentArray = array();
|
$documentArray = array();
|
||||||
$documentArray[] = array ('guid' => 'char', 'filename' => 'char' );
|
$documentArray[] = array ('guid' => 'char', 'filename' => 'char' );
|
||||||
if ( isset($_DBArray ['inputDocument']) )
|
if ( isset($_DBArray ['inputDocument']) )
|
||||||
foreach ( $_DBArray ['inputDocument'] as $key => $val )
|
foreach ( $_DBArray ['inputDocument'] as $key => $val )
|
||||||
if ( $key != 0 && isset ($val['filename']) )
|
if ( $key != 0 && isset ($val['filename']) )
|
||||||
$documentArray[] = array ('guid' => $val['guid'], 'filename' => $val['filename'] );
|
$documentArray[] = array ('guid' => $val['guid'], 'filename' => $val['filename'] );
|
||||||
if ( isset($_DBArray ['outputDocument']) )
|
if ( isset($_DBArray ['outputDocument']) )
|
||||||
foreach ( $_DBArray ['outputDocument'] as $key => $val )
|
foreach ( $_DBArray ['outputDocument'] as $key => $val )
|
||||||
if ( $key != 0 && isset ($val['filename']) )
|
if ( $key != 0 && isset ($val['filename']) )
|
||||||
$documentArray[] = array ('guid' => $val['guid'], 'filename' => $val['filename'] );
|
$documentArray[] = array ('guid' => $val['guid'], 'filename' => $val['filename'] );
|
||||||
$_DBArray ['documents'] = $documentArray;
|
$_DBArray ['documents'] = $documentArray;
|
||||||
$_DBArray ['WS_TMP_CASE_UID'] = $frm ["CASE_ID"];
|
$_DBArray ['WS_TMP_CASE_UID'] = $frm ["CASE_ID"];
|
||||||
$_SESSION ['_DBArray'] = $_DBArray;
|
$_SESSION ['_DBArray'] = $_DBArray;
|
||||||
|
|
||||||
G::LoadClass ( 'ArrayPeer' );
|
G::LoadClass ( 'ArrayPeer' );
|
||||||
$c = new Criteria ( 'dbarray' );
|
$c = new Criteria ( 'dbarray' );
|
||||||
$c->setDBArrayTable ( 'inputDocument' );
|
$c->setDBArrayTable ( 'inputDocument' );
|
||||||
$c->addAscendingOrderByColumn ( 'name' );
|
$c->addAscendingOrderByColumn ( 'name' );
|
||||||
$G_PUBLISH->AddContent ( 'propeltable', 'paged-table', 'setup/wsrInputDocumentList', $c );
|
$G_PUBLISH->AddContent ( 'propeltable', 'paged-table', 'setup/wsrInputDocumentList', $c );
|
||||||
|
|
||||||
} else if ( is_object($result) ){
|
} else if ( is_object($result) ){
|
||||||
$_SESSION ['WS_SESSION_ID'] = '';
|
$_SESSION ['WS_SESSION_ID'] = '';
|
||||||
$fields ['status_code'] = $result->status_code;
|
$fields ['status_code'] = $result->status_code;
|
||||||
@@ -972,17 +989,17 @@ switch ($_POST ['action']) {
|
|||||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
||||||
}
|
}
|
||||||
G::RenderPage ( 'publish', 'raw' );
|
G::RenderPage ( 'publish', 'raw' );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "InputDocumentProcessList" :
|
case "InputDocumentProcessList" :
|
||||||
$processId = $frm ["PROCESS_ID"];
|
$processId = $frm ["PROCESS_ID"];
|
||||||
$sessionId = $frm ["SESSION_ID"];
|
$sessionId = $frm ["SESSION_ID"];
|
||||||
$params = array ('sessionId' => $sessionId, 'processId' => $processId );
|
$params = array ('sessionId' => $sessionId, 'processId' => $processId );
|
||||||
|
|
||||||
$wsResponse = $client->__SoapCall ( 'InputDocumentProcessList', array ($params ) );
|
$wsResponse = $client->__SoapCall ( 'InputDocumentProcessList', array ($params ) );
|
||||||
$result = G::PMWSCompositeResponse($wsResponse, 'documents');
|
$result = G::PMWSCompositeResponse($wsResponse, 'documents');
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$rows [] = array ('guid' => 'char', 'name' => 'char', 'description' => 'char' );
|
$rows [] = array ('guid' => 'char', 'name' => 'char', 'description' => 'char' );
|
||||||
if (is_array ( $result )){
|
if (is_array ( $result )){
|
||||||
@@ -1019,7 +1036,7 @@ switch ($_POST ['action']) {
|
|||||||
$_DBArray = (isset ( $_SESSION ['_DBArray'] ) ? $_SESSION ['_DBArray'] : '');
|
$_DBArray = (isset ( $_SESSION ['_DBArray'] ) ? $_SESSION ['_DBArray'] : '');
|
||||||
$_DBArray ['inputDocuments'] = $rows;
|
$_DBArray ['inputDocuments'] = $rows;
|
||||||
$_SESSION ['_DBArray'] = $_DBArray;
|
$_SESSION ['_DBArray'] = $_DBArray;
|
||||||
|
|
||||||
G::LoadClass ( 'ArrayPeer' );
|
G::LoadClass ( 'ArrayPeer' );
|
||||||
$c = new Criteria ( 'dbarray' );
|
$c = new Criteria ( 'dbarray' );
|
||||||
$c->setDBArrayTable ( 'inputDocuments' );
|
$c->setDBArrayTable ( 'inputDocuments' );
|
||||||
@@ -1031,24 +1048,24 @@ switch ($_POST ['action']) {
|
|||||||
$fields ['message'] = $result->message;
|
$fields ['message'] = $result->message;
|
||||||
$fields ['time_stamp'] = date("Y-m-d H:i:s");
|
$fields ['time_stamp'] = date("Y-m-d H:i:s");
|
||||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
||||||
}
|
}
|
||||||
G::RenderPage ( 'publish', 'raw' );
|
G::RenderPage ( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case "OutputDocumentList" :
|
case "OutputDocumentList" :
|
||||||
$caseId = $frm ["CASE_ID"];
|
$caseId = $frm ["CASE_ID"];
|
||||||
$sessionId = $frm ["SESSION_ID"];
|
$sessionId = $frm ["SESSION_ID"];
|
||||||
$params = array ('sessionId' => $sessionId, 'caseId' => $caseId );
|
$params = array ('sessionId' => $sessionId, 'caseId' => $caseId );
|
||||||
|
|
||||||
$wsResponse = $client->__SoapCall ( 'outputDocumentList', array ($params ) );
|
$wsResponse = $client->__SoapCall ( 'outputDocumentList', array ($params ) );
|
||||||
$result = G::PMWSCompositeResponse($wsResponse, 'documents');
|
$result = G::PMWSCompositeResponse($wsResponse, 'documents');
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher ( );
|
$G_PUBLISH = new Publisher ( );
|
||||||
$rows = array();
|
$rows = array();
|
||||||
$rows [] = array ('guid' => 'char', 'name' => 'char' );
|
$rows [] = array ('guid' => 'char', 'name' => 'char' );
|
||||||
if (is_array ( $result )){
|
if (is_array ( $result )){
|
||||||
|
|
||||||
foreach ( $result as $key => $item ) {
|
foreach ( $result as $key => $item ) {
|
||||||
if (isset ( $item->item ))
|
if (isset ( $item->item ))
|
||||||
foreach ( $item->item as $index => $val ) {
|
foreach ( $item->item as $index => $val ) {
|
||||||
@@ -1106,7 +1123,7 @@ switch ($_POST ['action']) {
|
|||||||
if (isset ( $item->link ))
|
if (isset ( $item->link ))
|
||||||
$link = $item->link;
|
$link = $item->link;
|
||||||
}
|
}
|
||||||
$rows [] = array ('guid' => $guid, 'filename' => $filename, 'docId' => $docId, 'version' => $version,
|
$rows [] = array ('guid' => $guid, 'filename' => $filename, 'docId' => $docId, 'version' => $version,
|
||||||
'createDate' => $createDate, 'createBy' => $createBy, 'type' => $type, 'link' => $link );
|
'createDate' => $createDate, 'createBy' => $createBy, 'type' => $type, 'link' => $link );
|
||||||
}
|
}
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
@@ -1114,17 +1131,17 @@ switch ($_POST ['action']) {
|
|||||||
$_DBArray ['outputDocument'] = $rows;
|
$_DBArray ['outputDocument'] = $rows;
|
||||||
$documentArray = array();
|
$documentArray = array();
|
||||||
$documentArray[] = array ('guid' => 'char', 'filename' => 'char' );
|
$documentArray[] = array ('guid' => 'char', 'filename' => 'char' );
|
||||||
if ( isset($_DBArray ['inputDocument']) )
|
if ( isset($_DBArray ['inputDocument']) )
|
||||||
foreach ( $_DBArray ['inputDocument'] as $key => $val )
|
foreach ( $_DBArray ['inputDocument'] as $key => $val )
|
||||||
if ( $key != 0 && isset ($val['filename']) )
|
if ( $key != 0 && isset ($val['filename']) )
|
||||||
$documentArray[] = array ('guid' => $val['guid'], 'filename' => $val['filename'] );
|
$documentArray[] = array ('guid' => $val['guid'], 'filename' => $val['filename'] );
|
||||||
if ( isset($_DBArray ['outputDocument']) )
|
if ( isset($_DBArray ['outputDocument']) )
|
||||||
foreach ( $_DBArray ['outputDocument'] as $key => $val )
|
foreach ( $_DBArray ['outputDocument'] as $key => $val )
|
||||||
if ( $key != 0 && isset ($val['filename']) )
|
if ( $key != 0 && isset ($val['filename']) )
|
||||||
$documentArray[] = array ('guid' => $val['guid'], 'filename' => $val['filename'] );
|
$documentArray[] = array ('guid' => $val['guid'], 'filename' => $val['filename'] );
|
||||||
$_DBArray ['documents'] = $documentArray;
|
$_DBArray ['documents'] = $documentArray;
|
||||||
$_SESSION ['_DBArray'] = $_DBArray;
|
$_SESSION ['_DBArray'] = $_DBArray;
|
||||||
|
|
||||||
G::LoadClass ( 'ArrayPeer' );
|
G::LoadClass ( 'ArrayPeer' );
|
||||||
$c = new Criteria ( 'dbarray' );
|
$c = new Criteria ( 'dbarray' );
|
||||||
$c->setDBArrayTable ( 'outputDocument' );
|
$c->setDBArrayTable ( 'outputDocument' );
|
||||||
@@ -1137,7 +1154,7 @@ switch ($_POST ['action']) {
|
|||||||
$fields ['time_stamp'] = date("Y-m-d H:i:s");
|
$fields ['time_stamp'] = date("Y-m-d H:i:s");
|
||||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
||||||
}
|
}
|
||||||
|
|
||||||
G::RenderPage ( 'publish', 'raw' );
|
G::RenderPage ( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
//add removeUserFromGroup
|
//add removeUserFromGroup
|
||||||
@@ -1167,11 +1184,11 @@ case "removeUserFromGroup" :
|
|||||||
$fields ['status_code'] = $result->status_code;
|
$fields ['status_code'] = $result->status_code;
|
||||||
$fields ['message'] = $result->message;
|
$fields ['message'] = $result->message;
|
||||||
$fields ['time_stamp'] = $result->timestamp;
|
$fields ['time_stamp'] = $result->timestamp;
|
||||||
|
|
||||||
if( $result->status_code == 9 ){
|
if( $result->status_code == 9 ){
|
||||||
$_SESSION ['WS_SESSION_ID'] = '';
|
$_SESSION ['WS_SESSION_ID'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher ( );
|
$G_PUBLISH = new Publisher ( );
|
||||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
||||||
G::RenderPage ( 'publish', 'raw' );
|
G::RenderPage ( 'publish', 'raw' );
|
||||||
@@ -1180,16 +1197,16 @@ case "removeUserFromGroup" :
|
|||||||
case "TaskCase" :
|
case "TaskCase" :
|
||||||
$sessionId = $frm ["SESSION_ID"];
|
$sessionId = $frm ["SESSION_ID"];
|
||||||
$caseId = $frm ["CASE_ID"];
|
$caseId = $frm ["CASE_ID"];
|
||||||
|
|
||||||
$params = array ('sessionId' => $sessionId, 'caseId' => $caseId );
|
$params = array ('sessionId' => $sessionId, 'caseId' => $caseId );
|
||||||
$wsResponse = $client->__SoapCall ( 'TaskCase', array ($params ) );
|
$wsResponse = $client->__SoapCall ( 'TaskCase', array ($params ) );
|
||||||
$result = G::PMWSCompositeResponse($wsResponse, 'taskCases');
|
$result = G::PMWSCompositeResponse($wsResponse, 'taskCases');
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher ( );
|
$G_PUBLISH = new Publisher ( );
|
||||||
$rows [] = array ('guid' => 'char', 'name' => 'char' );
|
$rows [] = array ('guid' => 'char', 'name' => 'char' );
|
||||||
|
|
||||||
if (is_array ( $result )){
|
if (is_array ( $result )){
|
||||||
|
|
||||||
foreach ( $result as $key => $item ) {
|
foreach ( $result as $key => $item ) {
|
||||||
if (isset ( $item->item ))
|
if (isset ( $item->item ))
|
||||||
foreach ( $item->item as $index => $val ) {
|
foreach ( $item->item as $index => $val ) {
|
||||||
@@ -1211,15 +1228,15 @@ case "removeUserFromGroup" :
|
|||||||
if (isset ( $item->name ))
|
if (isset ( $item->name ))
|
||||||
$name = $item->name;
|
$name = $item->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
$rows [] = array ('guid' => $guid, 'name' => $name );
|
$rows [] = array ('guid' => $guid, 'name' => $name );
|
||||||
}
|
}
|
||||||
|
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
$_DBArray = (isset ( $_SESSION ['_DBArray'] ) ? $_SESSION ['_DBArray'] : '');
|
$_DBArray = (isset ( $_SESSION ['_DBArray'] ) ? $_SESSION ['_DBArray'] : '');
|
||||||
$_DBArray ['taskCases'] = $rows;
|
$_DBArray ['taskCases'] = $rows;
|
||||||
$_SESSION ['_DBArray'] = $_DBArray;
|
$_SESSION ['_DBArray'] = $_DBArray;
|
||||||
|
|
||||||
G::LoadClass ( 'ArrayPeer' );
|
G::LoadClass ( 'ArrayPeer' );
|
||||||
$c = new Criteria ( 'dbarray' );
|
$c = new Criteria ( 'dbarray' );
|
||||||
$c->setDBArrayTable ( 'taskCases' );
|
$c->setDBArrayTable ( 'taskCases' );
|
||||||
@@ -1232,10 +1249,10 @@ case "removeUserFromGroup" :
|
|||||||
$fields ['time_stamp'] = date("Y-m-d H:i:s");
|
$fields ['time_stamp'] = date("Y-m-d H:i:s");
|
||||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
|
||||||
}
|
}
|
||||||
|
|
||||||
G::RenderPage ( 'publish', 'raw' );
|
G::RenderPage ( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "wsSendFiles" :
|
case "wsSendFiles" :
|
||||||
if ( isset($_FILES['form']) ) {
|
if ( isset($_FILES['form']) ) {
|
||||||
foreach ($_FILES['form']['name'] as $sFieldName => $vValue) {
|
foreach ($_FILES['form']['name'] as $sFieldName => $vValue) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Ext.onReady(function(){
|
Ext.onReady(function(){
|
||||||
|
|
||||||
var cmbSkins = new Ext.form.ComboBox({
|
var cmbSkins = new Ext.form.ComboBox({
|
||||||
fieldLabel : _('ID_DEFAULT_SKIN'),
|
fieldLabel : _('ID_DEFAULT_SKIN'),
|
||||||
id : 'default_skin',
|
id : 'default_skin',
|
||||||
@@ -11,7 +11,7 @@ Ext.onReady(function(){
|
|||||||
mode : 'local',
|
mode : 'local',
|
||||||
emptyText : _('ID_SELECT'),
|
emptyText : _('ID_SELECT'),
|
||||||
valueField : 'ID',
|
valueField : 'ID',
|
||||||
displayField : 'NAME',
|
displayField : 'NAME',
|
||||||
selectOnFocus : true,
|
selectOnFocus : true,
|
||||||
editable : true,
|
editable : true,
|
||||||
triggerAction: 'all',
|
triggerAction: 'all',
|
||||||
@@ -41,7 +41,7 @@ Ext.onReady(function(){
|
|||||||
mode : 'local',
|
mode : 'local',
|
||||||
emptyText : _('ID_SELECT'),
|
emptyText : _('ID_SELECT'),
|
||||||
valueField : 'ID',
|
valueField : 'ID',
|
||||||
displayField : 'NAME',
|
displayField : 'NAME',
|
||||||
selectOnFocus : true,
|
selectOnFocus : true,
|
||||||
editable : true,
|
editable : true,
|
||||||
triggerAction: 'all',
|
triggerAction: 'all',
|
||||||
@@ -70,7 +70,7 @@ Ext.onReady(function(){
|
|||||||
mode : 'local',
|
mode : 'local',
|
||||||
emptyText : _('ID_SELECT'),
|
emptyText : _('ID_SELECT'),
|
||||||
valueField : 'ID',
|
valueField : 'ID',
|
||||||
displayField : 'NAME',
|
displayField : 'NAME',
|
||||||
selectOnFocus : true,
|
selectOnFocus : true,
|
||||||
editable : true,
|
editable : true,
|
||||||
triggerAction: 'all',
|
triggerAction: 'all',
|
||||||
@@ -112,7 +112,7 @@ Ext.onReady(function(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
xfieldsBelow = new Ext.form.FieldSet({
|
xfieldsBelow = new Ext.form.FieldSet({
|
||||||
title: '',
|
title: _('ID_PREFERENCES'),
|
||||||
items : [
|
items : [
|
||||||
cmbSkins,
|
cmbSkins,
|
||||||
cmbLang,
|
cmbLang,
|
||||||
@@ -127,6 +127,65 @@ Ext.onReady(function(){
|
|||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var proxyConfigurationFields = new Ext.form.FieldSet({
|
||||||
|
title: _('ID_PROXY_SETTINGS'),
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
xtype: 'textfield',
|
||||||
|
id: 'proxy_host',
|
||||||
|
name: 'proxy_host',
|
||||||
|
fieldLabel: _('ID_PROXY_HOST'),
|
||||||
|
width: 200,
|
||||||
|
value: sysConf.proxy_host,
|
||||||
|
listeners:{
|
||||||
|
change: function(){
|
||||||
|
changeSettings();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
xtype: 'numberfield',
|
||||||
|
id: 'proxy_port',
|
||||||
|
name: 'proxy_port',
|
||||||
|
fieldLabel: _('ID_PROXY_PORT'),
|
||||||
|
width: 100,
|
||||||
|
value: sysConf.proxy_port,
|
||||||
|
listeners:{
|
||||||
|
change: function(){
|
||||||
|
changeSettings();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
xtype: 'textfield',
|
||||||
|
id: 'proxy_user',
|
||||||
|
name: 'proxy_user',
|
||||||
|
fieldLabel: _('ID_PROXY_USER'),
|
||||||
|
width: 200,
|
||||||
|
value: sysConf.proxy_user,
|
||||||
|
listeners:{
|
||||||
|
change: function(){
|
||||||
|
changeSettings();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
xtype: 'textfield',
|
||||||
|
inputType: 'password',
|
||||||
|
id: 'proxy_pass',
|
||||||
|
name: 'proxy_pass',
|
||||||
|
fieldLabel: _('ID_PROXY_PASSWORD'),
|
||||||
|
width: 200,
|
||||||
|
value: sysConf.proxy_pass,
|
||||||
|
listeners:{
|
||||||
|
change: function(){
|
||||||
|
changeSettings();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
var frm = new Ext.FormPanel({
|
var frm = new Ext.FormPanel({
|
||||||
title: ' ',
|
title: ' ',
|
||||||
id:'frm',
|
id:'frm',
|
||||||
@@ -137,24 +196,24 @@ Ext.onReady(function(){
|
|||||||
bodyStyle:'padding:5px',
|
bodyStyle:'padding:5px',
|
||||||
waitMsgTarget : true,
|
waitMsgTarget : true,
|
||||||
frame: true,
|
frame: true,
|
||||||
|
|
||||||
defaults: {
|
defaults: {
|
||||||
allowBlank: false,
|
allowBlank: false,
|
||||||
msgTarget: 'side',
|
msgTarget: 'side',
|
||||||
align:'center'
|
align:'center'
|
||||||
},
|
},
|
||||||
items:[ xfieldsUp, xfieldsBelow ],
|
items:[ xfieldsUp, xfieldsBelow, proxyConfigurationFields ],
|
||||||
buttons : [saveButton]
|
buttons : [saveButton]
|
||||||
|
|
||||||
});
|
});
|
||||||
//render to process-panel
|
//render to process-panel
|
||||||
frm.render(document.body);
|
frm.render(document.body);
|
||||||
|
|
||||||
}); //end onready()
|
}); //end onready()
|
||||||
|
|
||||||
function saveSettings()
|
function saveSettings()
|
||||||
{
|
{
|
||||||
Ext.getCmp('frm').getForm().submit( {
|
Ext.getCmp('frm').getForm().submit( {
|
||||||
url : '../adminProxy/saveSystemConf',
|
url : '../adminProxy/saveSystemConf',
|
||||||
waitMsg : _('ID_SAVING_PROCESS'),
|
waitMsg : _('ID_SAVING_PROCESS'),
|
||||||
timeout : 36000,
|
timeout : 36000,
|
||||||
@@ -178,7 +237,7 @@ function saveSettings()
|
|||||||
},
|
},
|
||||||
failure: function(obj, resp) {
|
failure: function(obj, resp) {
|
||||||
PMExt.error( _('ID_ERROR'), resp.result.message);
|
PMExt.error( _('ID_ERROR'), resp.result.message);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user