Esempio n. 1
0
    $_SESSION['XNPSID'] = $session;
}
include_once 'include/lib.php';
include_once 'include/AL.php';
include_once 'class/base/oaipmh.class.php';
// retrieve admin's e-mail
$emails = array();
$member_handler =& xoops_gethandler('member');
$members = $member_handler->getUsersByGroup(XOOPS_GROUP_ADMIN, false);
foreach ($members as $userid) {
    $user =& $member_handler->getUser($userid);
    $emails[] = $user->getVar('email');
}
$xconfig_handler =& xoonips_getormhandler('xoonips', 'config');
$repositoryName = $xconfig_handler->getValue('repository_name');
$pmh = new OAIPMH(XOOPS_URL . "/modules/xoonips/oai.php", $repositoryName, $emails);
$pmh->addHandler(new JUNIIHandler());
$pmh->addHandler(new JUNII2Handler());
$pmh->addHandler(new OAI_DCHandler());
$args = array();
foreach (array('verb', 'metadataPrefix', 'set', 'from', 'until', 'identifier', 'resumptionToken') as $k) {
    if (isset($_GET[$k])) {
        $args[$k] = $_GET[$k];
    } else {
        if (isset($_POST[$k])) {
            $args[$k] = $_POST[$k];
        }
    }
}
header("Content-Type: application/xml");
if (!isset($args['verb'])) {
 /**
  * 
  * 
  * @param baseURL 
  * @param repositoryName 
  * @param adminEmails: administrator's e-mail address (charactor strings or array)
  * 
  */
 function __construct($baseURL = null, $repositoryName = null, $adminEmails = null)
 {
     /* constructer for PHP5 */
     OAIPMH::OAIPMH($baseURL, $repositoryName, $adminEmails);
 }