예제 #1
0
include_once dirname(__FILE__) . "/ressources/class.ldap.inc";
include_once dirname(__FILE__) . "/ressources/class.user.inc";
//if(isset($_GET["welcome"])){SendDefaultXml();exit;}
if (isset($_GET["XapianFileInfo"])) {
    XapianFileInfo();
    exit;
}
if (isset($_GET["download-file"])) {
    download_file();
    exit;
}
if (isset($_GET["creds"])) {
    Search();
    exit;
}
Welcome();
function SendDefaultXML()
{
    $page = CurrentPageName();
    $explain = "\n<Url type=\"application/x-suggestions+xml\" method=\"get\" template=\"http://ie8.ebay.com/open-search/output-xml.php?q={searchTerms}\"/>\n";
    //$explain=null;
    $html = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<OpenSearchDescription xmlns=\"http://a9.com/-/spec/opensearch/1.1/\" xmlns:moz=\"http://www.mozilla.org/2006/browser/search/\">\n  <ShortName>{search_on} Artica {$_SERVER['SERVER_NAME']}</ShortName>\n  <Description>{search_on} Artica {$_SERVER['SERVER_NAME']}</Description>\n  <Url type=\"text/html\" \n  \tmethod=\"get\" template=\"https://{$_SERVER['SERVER_NAME']}/{$page}?XapianWords={searchTerms}\"/>\n  \t<moz:SearchForm>https://{$_SERVER['SERVER_NAME']}/{$page}</moz:SearchForm>\n</OpenSearchDescription>";
    file_put_contents(dirname(__FILE__) . "/ressources/logs/OpenSearch.xml", $html);
}
function Welcome()
{
    if (isset($_POST["username"])) {
        $ct = new user($_POST["username"]);
        if ($ct->uidNumber == 0) {
            $error = "{failed}";
        } else {
예제 #2
0
            break;
        case 4:
            Preview($oPage);
            break;
        case 3:
            SelectMapping($oPage);
            break;
        case 2:
            SelectOptions($oPage);
            break;
        case 1:
        case 6:
            // Loop back here when we are done
        // Loop back here when we are done
        default:
            Welcome($oPage);
    }
    $oPage->output();
} catch (CoreException $e) {
    require_once APPROOT . '/setup/setuppage.class.inc.php';
    $oP = new SetupPage(Dict::S('UI:PageTitle:FatalError'));
    $oP->add("<h1>" . Dict::S('UI:FatalErrorMessage') . "</h1>\n");
    $oP->error(Dict::Format('UI:Error_Details', $e->getHtmlDesc()));
    $oP->output();
    if (MetaModel::IsLogEnabledIssue()) {
        if (MetaModel::IsValidClass('EventIssue')) {
            $oLog = new EventIssue();
            $oLog->Set('message', $e->getMessage());
            $oLog->Set('userinfo', '');
            $oLog->Set('issue', $e->GetIssue());
            $oLog->Set('impact', 'Page could not be displayed');