msg["no_configuration_required"]; return $result; } public function update_config_from_form() { return; } public function instantiate_source_class($source_id) { return new openurl_out_source($this, $source_id, $this->msg); } //On chargera nous même les messages si on en a besoin public function need_global_messages() { return false; } public function process($source_id) { global $base_path; foreach($this->sources as $source){ if($source->id == $source_id){ if($source->config['mode'] == "requeteur"){ $str = file_get_contents("php://input"); if(!$str){ $str = str_replace('source_id='.$source_id.'&',"",$_SERVER['QUERY_STRING']); } openurl_transport::unserialize($str); }else{ foreach($_POST as $key=>$value) { global ${$key}; ${$key} = $value; } foreach($_GET as $key=>$value) { global ${$key}; ${$key} = $value; } require($base_path."/admin/connecteurs/in/openurl/openurl.class.php"); $conn = new openurl("openurl"); header('Content-type: text/txt'); print $conn->getByRefContent($in_id,$notice_id,$uri,$entity); } } } return; } } class openurl_out_source extends connecteur_out_source { public function __construct($connector, $id, $msg) { parent::__construct($connector, $id, $msg); } public function get_config_form() { global $charset; $result = parent::get_config_form(); //Adresse d'utilisation $result .= "

"; if ($this->id) { $result .= "".$pmb_url_base."ws/connector_out.php?source_id=".$this->id.""; } else { $result .= $this->msg["openurl_service_endpoint_unrecorded"]; } $result .= "
 
".$this->msg['openurl_mode_requeteur']." config["mode"] == "requeteur" ? "checked='checked' ": "")."style='vertical-align:bottom;' /> ".$this->msg['openurl_mode_byref']." config["mode"] == "byref" ? "checked='checked' ": "")."style='vertical-align:bottom;' />
".$this->msg['openurl_serialization_kev']." config["serialization"] == "kev" ? "checked='checked' ": "")."style='vertical-align:bottom;' /> ".$this->msg['openurl_serialization_xml']." config["serialization"] == "xml" ? "checked='checked' ": "")."style='vertical-align:bottom;' />
"; return $result; } public function update_config_from_form() { parent::update_config_from_form(); global $serialization; global $mode; $this->config = array(); $this->config["serialization"] = $serialization; $this->config["mode"] = $mode; return; } } ?>