Пример #1
0
 /**
  * Displays the first page of the registration site, and exists the
  * application.
  *
  * @public
  * @version 0.0.1
  * @since 0.0.1
  * @return void
  */
 function showStartPage()
 {
     $sc = $this->getSiteContext();
     $site = new HtmlSite($sc);
     $site->setTitle($sc->getLocale('regHeadline') . " - " . sprintf($sc->getLocale("regXOfY"), "1", $this->pages));
     $site->setGenererOverskrift(1);
     $site->addHtml("<form action=\"register.php\" method=post>\n");
     $site->addHtml("<div class=forside>\n");
     $site->addHtml($sc->getLocale("regWelcomePart1"));
     $site->addHelp($sc->getLocale("regHelpHText"), $sc->getLocale("regHelpHelp"));
     $site->addHtml($sc->getLocale("regWelcomePart2"));
     $site->addHtml("</div>\n");
     $site->addHtml("<div class=forside>\n");
     $site->addHtml("<h1>" . $sc->getLocale("regWithLegal") . "</h1>\n");
     $site->addHtml($sc->getLocale("regWithLegalTxt"));
     $site->addHtml("</div>\n");
     $site->addHtml("<div class=forside>\n");
     $site->addHtml("<h2>" . $sc->getLocale('regHeadline') . "</h2>\n");
     $site->addHtml("<table border=0>\n");
     //Name
     $site->addHtml("\t<tr><td>" . $sc->getLocale("regName") . "</td><td>");
     $site->addHelp($sc->getLocale("regNameHelp"), $sc->getLocale("regName"));
     $site->addHtml("<input type=text name=navn size=40> " . $sc->getLocale("regNameEx") . "</td></tr>\n");
     //E-mail
     $site->addHtml("\t<tr><td>" . $sc->getLocale("regEmail") . "</td><td>");
     $site->addHelp($sc->getLocale("regEmail"), $sc->getLocale("regEmailHelp"));
     $site->addHtml("<input type=text name=\"e-mail\" size=40> " . $sc->getLocale("regEmailEx") . "</td></tr>\n");
     //Url
     $site->addHtml("\t<tr><td>" . $sc->getLocale("regUrl") . "</td><td>");
     $site->addHelp($sc->getLocale("regUrl"), $sc->getLocale("regUrlHelp"));
     $site->addHtml("<input type=text name=url value=\"http://\" size=40> " . $sc->getLocale("regUrlEx") . "</td></tr>\n");
     //Site titel
     $site->addHtml("\t<tr><td>" . $sc->getLocale("regTitle") . "</td><td>");
     $site->addHelp($sc->getLocale("regTitle"), $sc->getLocale("regTitleHelp"));
     $site->addHtml("<input type=text name=titel size=40> " . $sc->getLocale("regTitleEx") . "</td></tr>\n");
     //User name
     $site->addHtml("\t<tr><td>" . $sc->getLocale("regUsername") . "</td><td>");
     $site->addHelp($sc->getLocale("regUsername"), $sc->getLocale("regUsernameHelp"));
     $site->addHtml("<input type=text name=brugernavn size=40> " . $sc->getLocale("regUsernameEx") . "</td></tr>\n");
     //Password
     $site->addHtml("\t<tr><td>" . $sc->getLocale("regPassword") . "</td><td>");
     $site->addHelp($sc->getLocale("regPassword"), $sc->getLocale("regPasswordHelp"));
     $site->addHtml("<input type=password name=pwd1 size=40> " . $sc->getLocale("regPasswordEx") . "</td></tr>\n");
     //Password, confirm
     $site->addHtml("\t<tr><td>" . $sc->getLocale("regPassword2") . "</td><td>");
     $site->addHelp($sc->getLocale("regPassword2"), $sc->getLocale("regPassword2Help"));
     $site->addHtml("<input type=password name=pwd2 size=40> " . $sc->getLocale("regPassword2Ex") . "</td></tr>\n");
     $site->addHtml("</table>\n<p>\n");
     $site->addHelp($sc->getLocale("regUserAreaHelp"), $sc->getLocale("regUserArea"));
     $site->addHtml($sc->getLocale("regUserAreaWich") . "<br>\n");
     $site->addHtml("<input type=radio name=brugerom value=\"simple\" CHECKED> " . $sc->getLocale("regUserAreaSimple"));
     $site->addHtml("<input type=radio name=brugerom value=\"advanced\"> " . $sc->getLocale("regUserAreaAdvanced"));
     $site->addHtml("</p>\n");
     $site->addHtml("<p>\n");
     $site->addHelp($sc->getLocale("regForKidsHelpFor"), $sc->getLocale("regForKidsHelp"));
     $site->addHtml($sc->getLocale("regForKids") . "<br>\n");
     $site->addHtml("<input type=radio name=under18ok value=\"yes\"> " . $sc->getLocale("regForKidsYes") . "<br>\n");
     $site->addHtml("<input type=radio name=under18ok value=\"no\"> " . $sc->getLocale("regForKidsNo") . "<br>\n");
     $site->addHtml("</p>\n");
     $site->addHtml("<input type=hidden name=\"step\" value=\"reg1\">\n");
     $site->addHtml("<input type=submit value=\"" . $sc->getLocale("regNext") . "\">");
     $site->addHtml("</form>\n");
     $site->addHtml("</div>\n");
     echo $site->getSite();
 }
Пример #2
0
    }
    //End of while.
} elseif ($in['urlnr'] <= sizeof($cnameArr) and $in['urlnr'] >= 0 and $in['urlnr'] <= $pro_max_clickcounters) {
    $cclicksArr[$in['urlnr']]++;
    $fun = $in['urlnr'];
} else {
    $thits[0]++;
}
if ($lib->okurl($curlArr[$fun])) {
    header("Location: " . $curlArr[$fun]);
} elseif ($lib->okurl($datafile->getLine(3))) {
    header("Location: " . $datafile->getLine(3));
} else {
    require "view.php";
    require "lib/SiteGenerator/SiteGenerator.php";
    $side = new HtmlSite($siteContext, "Fejl");
    $side->addHtml("<div class=forside><h1>Ingen adresse angivet</h1>Der var desvrre ikke givet en adresse til det angivne adressenummer eller -navn.</p><h2>For besgende</h2>Hvis du er en besgende p denne side, beklager jeg at der ikke var angivetgivet en korrekt adresse. Der er ikke andet at gre, end at trykke p din browsers &quot;tilbage&quot; knap, og trykke p et andet link, da dette desvrre ikke virker.<h2>For sidens ejer</h2>Ejer du siden hvorp linket befandt sig, skal du g ind p brugeromrdet, og vlge funktionen &quot;Adresser&quot;. Der skal du anive en korrekt adresse til det link du har benyttet her.</div>");
    echo $side->getSite();
    exit;
}
$datafile->setLine(69, implode("::", $cclicksArr));
$datafile->setLine(70, implode("::", $cnameArr));
//Skriver datafil, men kun hvis man skal tlles med
if (!$lib->countVisit(getenv('HTTP_REFERER'), $datafile->getLine(111))) {
    $in['taelop'] = "nej";
}
if (getenv('REMOTE_ADDR') === $datafile->getLine(52) and $datafile->getLine(52) !== "") {
    $in['taelop'] = "nej";
}
if (strpos($HTTP_COOKIE_VARS[$in['brugernavn']], "ikkeop") !== false) {
    $in['taelop'] = "nej";
Пример #3
0
    $problemer .= "Datafilen kunne hentes. Enten er det et problem på " . $stier->getOption('name_of_service') . " eller også har du skrevet det forkerte brugernavn - det kan indeholder tegn der ikke er tilladt - prøv at generere den obligatoriske kode igen.";
}
if (strlen($problemer) === 0) {
    if (Html::okmail($datafil->getLine(2))) {
        mailpwd($datafil, $stier);
    } else {
        $problemer .= "<LI>Den e-mail adresse der er opgivet ved din registrering er ikke en gyldig e-mail adresse, og kodeordret kan derfor af sikkerhedsgrunde ikke sendes.";
    }
}
if (strlen($problemer) > 0) {
    $side = new HtmlSite($siteContext, "Fejl");
    $side->addHtml("<div class=problemer>{$problemer}</div>");
    echo $side->getSite();
    exit;
} else {
    $side = new HtmlSite($siteContext, "Dit kodeord er sendt");
    $side->addHtml("<div class=forside>Dit kodeord er nu afsendt. Gem mailen med det, eller skriv det ned. Hvis du glemmer dit kodeord igen, skal du dog være velkommen til at sende bud efter det igen. Nå, men mailen skulle være der nu!</div>");
    echo $side->getSite();
    exit;
}
/**
 * Sends the pwd.
 * 
 * @public
 * @version 0.0.1
 * @since 0.0.1
 * @param $datafile an instance of {@link Datafil}.
 * @param $settings an instance of {@link Stier}.
 * @returns void
 */
function mailpwd($datafile, $settings)