Subversion Repositories oidplus

Rev

Rev 1200 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1200 Rev 1266
Line 18... Line 18...
18
 */
18
 */
19
 
19
 
20
use ViaThinkSoft\OIDplus\OIDplus;
20
use ViaThinkSoft\OIDplus\OIDplus;
21
use ViaThinkSoft\OIDplus\OIDplusException;
21
use ViaThinkSoft\OIDplus\OIDplusException;
22
use ViaThinkSoft\OIDplus\OIDplusGui;
22
use ViaThinkSoft\OIDplus\OIDplusGui;
-
 
23
use ViaThinkSoft\OIDplus\OIDplusHtmlException;
23
use ViaThinkSoft\OIDplus\OIDplusPageAdminOIDInfoExport;
24
use ViaThinkSoft\OIDplus\OIDplusPageAdminOIDInfoExport;
24
 
25
 
25
require_once __DIR__ . '/../../../../includes/oidplus.inc.php';
26
require_once __DIR__ . '/../../../../includes/oidplus.inc.php';
26
 
27
 
27
set_exception_handler(array(OIDplusGui::class, 'html_exception_handler'));
28
set_exception_handler(array(OIDplusGui::class, 'html_exception_handler'));
Line 39... Line 40...
39
if (!OIDplus::authUtils()->isAdminLoggedIn()) {
40
if (!OIDplus::authUtils()->isAdminLoggedIn()) {
40
        if (PHP_SAPI == 'cli') {
41
        if (PHP_SAPI == 'cli') {
41
                // echo "You need to log in as administrator.\n";
42
                // echo "You need to log in as administrator.\n";
42
                // die();
43
                // die();
43
        } else {
44
        } else {
44
                echo '<p>'._L('You need to <a %1>log in</a> as administrator.','href="'.OIDplus::webpath(null,OIDplus::PATH_RELATIVE).'?goto=oidplus%3Alogin%24admin"').'</p>';
45
                throw new OIDplusHtmlException(_L('You need to <a %1>log in</a> as administrator.','href="'.OIDplus::webpath(null,OIDplus::PATH_RELATIVE).'?goto=oidplus%3Alogin%24admin"'), null, 401);
45
                die();
-
 
46
        }
46
        }
47
}
47
}
48
 
48
 
49
list($out_content, $out_type) = OIDplusPageAdminOIDInfoExport::outputXML(isset($_REQUEST['online']) && $_REQUEST['online']);
49
list($out_content, $out_type) = OIDplusPageAdminOIDInfoExport::outputXML(isset($_REQUEST['online']) && $_REQUEST['online']);
50
 
50