Location: PHPKode > projects > ZenTrack - project/bug tracking software > zentrack_2.6.4/www/misc/find_recipient.php
<?
 /**
  * Performs dynamic lookups for notification tables
  * and returns results as a string.
  *
  * Only works for local clients, enforced by using session ids.
  */

  include("../header.php");
  include_once("$libDir/libs/JSON.php");
  include_once("$libDir/ZenListBase.php");
  include_once("$libDir/ZenRecordBase.php");
  include_once("$libDir/ZenNotifyRecipient.php");
  include_once("$libDir/ZenNotifySearch.class.php");
  
  $json = new Services_JSON();
  
  $values = array();
  if( !empty($_GET['q']) ) {
    $list = new ZenNotifySearchList();
    $list->load( array($_GET['q']) );
    while(($u = $list->next()) !== false) {
      $values[] = $u->createDataArray();
    }
    if( empty($values) ) { $values = array("email"=>$_GET['q']); }
  }
  
  
  //todo strip all values and check for security problems
  //todo
  //todo
  //todo
  //todo
  //todo
  //todo
  //todo
  
  print $json->encode($values);
 
?>
Return current item: ZenTrack - project/bug tracking software