//echo 'Get Issue Summary<br>';
 //	echo($its->getIssueSummary('ZOFF-16'));
 //echo '<br>';
 // I've seen things you people wouldn't believe.
 // Attack ships on fire off the shoulder of Orion.
 // I watched C-beams glitter in the dark near the Tannhauser gate.
 // All those moments will be lost in time... like tears in rain... Time to die.
 //
 //$issue = array('project' => 'ZOFF','summary' => 'My Firts ISSUE VIA API',
 //               'description' => 'Do Androids Dream of Electric Sheep?',
 //               'type' => 1, 'components' => array( array('id' => '10100'), array('id' => '10101')));
 // $zorro = $its->addIssueFromArray($issue);
 // var_dump($zorro);
 $issue = array('summary' => 'Issue Via API 2013-02-04', 'description' => 'Do Androids Dream of Electric Sheep?');
 //               'type' => 1, 'components' => array( array('id' => '10100'), array('id' => '10101')));
 $zorro = $its->addIssue($issue['summary'], $issue['description']);
 var_dump($zorro);
 /*
 	$issue2check = array( array('issue' => 'TLJIRASOAPINTEGRATION-1', 'exists' => true),
 	  					  array('issue' => 'TLJIRASOAPINTEGRATION-199999', 'exists' => false));
 */
 /*
 ["customFieldValues"]=> array(4) 
 { [0]=> object(stdClass)#85 (3) 
         { ["customfieldId"]=> string(17) "customfield_10800" ["key"]=> NULL ["values"]=> array(1) { [0]=> string(3) "123" } } 
   [1]=> object(stdClass)#82 (3) 
         { ["customfieldId"]=> string(17) "customfield_10000" ["key"]=> NULL ["values"]=> array(1) { [0]=> string(3) "117" } } 
   [2]=> object(stdClass)#83 (3) 
         { ["customfieldId"]=> string(17) "customfield_10200" ["key"]=> NULL ["values"]=> array(1) { [0]=> string(3) "117" } } 
   [3]=> object(stdClass)#84 (3) { ["customfieldId"]=> string(17) "customfield_10607" ["key"]=> NULL ["values"]=> array(1) { [0]=> NULL } } }
 */
echo "<pre><xmp>" . $cfg . "</xmp></pre>";
echo '<hr><br><br>';
// $safe_cfg = str_replace("\n",'',$cfg);
// echo $safe_cfg;
echo 'Creating INTERFACE<br>';
new dBug($itt);
$its = new jirasoapInterface(5, $cfg);
echo 'Connection OK?<br>';
var_dump($its->isConnected());
if ($its->isConnected()) {
    // echo '<b>Connected !</br></b>';
    // echo '<pre>';
    // var_dump($its->getStatusDomain());
    // echo '</pre>';
    // echo 'Get Issue Summary<br>';
    // echo($its->getIssueSummary('ZOFF-8'));
    // echo '<br>';
    // echo($its->getIssueSummary('ZOFF-8'));
    // I've seen things you people wouldn't believe.
    // Attack ships on fire off the shoulder of Orion.
    // I watched C-beams glitter in the dark near the Tannhauser gate.
    // All those moments will be lost in time... like tears in rain... Time to die.
    //
    $issue = array('project' => 'ZOFF', 'summary' => 'My Firts ISSUE VIA API', 'description' => 'Do Androids Dream of Electric Sheep?', 'type' => 1);
    $zorro = $its->addIssue($issue);
    var_dump($zorro);
    /*
    	$issue2check = array( array('issue' => 'TLJIRASOAPINTEGRATION-1', 'exists' => true),
    	  					  array('issue' => 'TLJIRASOAPINTEGRATION-199999', 'exists' => false));
    */
}