$errors = new Errors(); //Was the datafile fetched successfully if ($res === -2) { //Temporarely instance for error handling //'da' is danish, currently the only user interface language. $siteContext = new ShortSiteContext($stier, $ind, 'da'); $errors->addError(new Error(2, sprintf($siteContext->getLocale('errDamagedDatasource'), $stier->getOption('name_of_service')))); } elseif (!$res or $res === 0) { //Temporarely instance for error handling $siteContext = new ShortSiteContext($stier, $ind, 'da'); $errors->addError(new Error(2, sprintf($siteContext->getLocale('errDatasourceInaccessible'), $stier->getOption('name_of_service')))); } $lib = new Html($ind, $datafil); $lib->setStier($stier); //Write the stat image if (!$errors->isOccured()) { //'billed' is 'image' in danish: The image to display. if (!array_key_exists('billed', $ind)) { writeImage("stats1.gif", $stier); } else { //1-8: Normal images. trans: transparent/invisible. //sh: Blach/white, hs: White/blach. if ($ind['billed'] == "2") { writeImage("stats2.gif", $stier); } elseif ($ind['billed'] == "3") { writeImage("stats3.gif", $stier); } elseif ($ind['billed'] == "4") { writeImage("stats4.gif", $stier); } elseif ($ind['billed'] == "5") { writeImage("stats5.gif", $stier); } elseif ($ind['billed'] == "6") {
/** * Performs the registration. */ function doRegister() { $errors = new Errors(); $in = $this->siteContext->getHTTP_VARS(); $lib = $this->siteContext->getCodeLib(); //Use the simple user area? if (strpos(strtolower($in['brugerom']), 'simpelt') === 0) { //Set the cookie for users area type $uaUtils = new UsersAreaUtils($this->siteContext); $uaUtils->setUAType(); $simpelt_avan = 1; } else { $simpelt_avan = 0; } $datasource = DataSource::createInstance($in['brugernavn'], $this->siteContext->getOptions()); $datasource->setLine(0, "filen er ok"); $datasource->setLine(1, $in['navn']); $datasource->setLine(2, $in['e-mail']); $datasource->setLine(3, $in['url']); $datasource->setLine(4, $in['titel']); $datasource->setLine(5, $lib->kortdato()); $datasource->setLine(6, $in['pwd1']); $in['kodeord'] = $in['pwd1']; $datasource->setLine(7, "0"); $datasource->setLine(8, $lib->kortdato() . ""); $datasource->setLine(9, "0::0::0::0::0::0::0::0::0::0::0::0"); $datasource->setLine(10, "0"); $datasource->setLine(11, "0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0"); $datasource->setLine(12, "0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0"); $datasource->setLine(13, "0"); $datasource->setLine(14, "0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::"); $datasource->setLine(15, "0::0::0::0::0::0::0"); $datasource->setLine(16, "0"); $datasource->setLine(17, $lib->kortdato() . ""); $datasource->setLine(18, "0"); $datasource->setLine(19, $lib->kortdato() . ""); $datasource->setLine(20, ""); $datasource->setLine(21, "::"); $datasource->setLine(22, ""); $datasource->setLine(23, ""); $datasource->setLine(24, ""); $datasource->setLine(25, "::"); $datasource->setLine(26, ""); $datasource->setLine(27, "::"); $datasource->setLine(28, ""); $datasource->setLine(29, ""); $datasource->setLine(30, "::"); $datasource->setLine(31, ""); $datasource->setLine(32, "::"); $datasource->setLine(33, ""); $datasource->setLine(34, "::"); $datasource->setLine(35, ""); $datasource->setLine(36, "::"); $datasource->setLine(37, ""); $datasource->setLine(38, ""); $datasource->setLine(39, ""); $datasource->setLine(40, "::"); $datasource->setLine(41, ""); $datasource->setLine(42, ""); $datasource->setLine(43, ""); $datasource->setLine(44, ""); $datasource->setLine(45, ""); $datasource->setLine(46, ""); $datasource->setLine(47, ""); $datasource->setLine(48, ""); $datasource->setLine(49, ""); $datasource->setLine(50, ""); $datasource->setLine(51, ""); $datasource->setLine(52, ""); $datasource->setLine(53, $in['url']); $datasource->setLine(54, ""); $datasource->setLine(55, ""); $datasource->setLine(56, ""); $datasource->setLine(57, ""); $datasource->setLine(58, ""); $datasource->setLine(59, ""); $datasource->setLine(60, ""); $datasource->setLine(61, ""); $datasource->setLine(62, ""); $datasource->setLine(63, ""); $datasource->setLine(64, ""); $datasource->setLine(65, ""); $datasource->setLine(66, ""); $datasource->setLine(67, ""); $datasource->setLine(68, ""); $datasource->setLine(69, ""); $datasource->setLine(70, ""); $datasource->setLine(71, ""); $datasource->setLine(72, ""); $datasource->setLine(73, "0:0"); $datasource->setLine(74, ""); $datasource->setLine(75, ""); $datasource->setLine(76, "0"); $datasource->setLine(77, "0"); $datasource->setLine(78, $lib->kortdato() . ""); $datasource->setLine(79, "0"); $datasource->setLine(80, "0"); $datasource->setLine(81, $lib->kortdato() . ""); $datasource->setLine(82, "0"); #Registrere om siden er erotisk eller ej if ($in['under18ok'] === "Ja") { $datasource->setLine(83, "erotik"); } else { if ($in['under18ok'] === "Nej") { $datasource->setLine(83, "okunder18"); } else { $datasource->setLine(83, ""); } } $datasource->setLine(84, isset($in['beskrivelse']) ? $in['beskrivelse'] : ''); $datasource->setLine(85, isset($in['sord']) ? $in['sord'] : ''); //The two are not used anymore $datasource->setLine(86, ""); $datasource->setLine(87, ""); $datasource->setLine(88, ""); $datasource->setLine(89, "0"); $datasource->setLine(90, ""); $datasource->setLine(91, ""); $datasource->setLine(92, ""); $datasource->setLine(93, ""); $datasource->setLine(94, ""); $datasource->setLine(95, ""); $datasource->setLine(96, ""); $datasource->setLine(97, ""); $datasource->setLine(98, ""); $datasource->setLine(99, ""); $datasource->setLine(100, ""); $datasource->setLine(101, ""); $datasource->setLine(102, ""); $datasource->setLine(103, ""); $datasource->setLine(104, ""); $datasource->setLine(105, ""); $datasource->setLine(106, "1::1::1"); $datasource->setLine(107, "1::0::0::1::0::0::0"); $datasource->setLine(108, ""); $datasource->setLine(109, ""); $datasource->setLine(110, time()); $shortDate = $lib->kortdato(); $nul[7] = $shortDate; $nul[8] = $shortDate; $nul[9] = $shortDate; $nul[11] = $shortDate; $nul[14] = $shortDate; $nul[15] = $shortDate; $nul[16] = $shortDate; $nul[18] = $shortDate; $nul[20] = $shortDate; $nul[22] = $shortDate; $nul[24] = $shortDate; $nul[26] = $shortDate; $nul[28] = $shortDate; $nul[29] = $shortDate; $nul[31] = $shortDate; $nul[33] = $shortDate; $nul[35] = $shortDate; $nul[37] = $shortDate; $nul[39] = $shortDate; $nul[43] = $shortDate; $nul[44] = $shortDate; $nul[46] = $shortDate; $nul[47] = $shortDate; $nul[49] = $shortDate; $nul[54] = $shortDate; $nul[64] = $shortDate; $nul[69] = $shortDate; $nul[73] = $shortDate; $nul[74] = $shortDate; $nul[77] = $shortDate; $nul[80] = $shortDate; $nul[112] = $shortDate; $nul[114] = $shortDate; $datasource->setLine(51, implode("::", $nul)); if (!$errors->isOccured()) { $datasource->createUser(); $datasource->gemFil(); } else { $this->displayErrors($errors); } if (Html::okmail($in['e-mail'])) { $this->doSendEmail($simpelt_avan); } ?> <div class=forside> <h1><?php echo $this->siteContext->getLocale('regYouAreRegistered'); ?> </h1> <P><?php echo $this->siteContext->getLocale('regCongRegistered'); ?> </p> <h2><?php echo $this->siteContext->getLocale('regNowOnlyMissing'); ?> </h2> <p><?php echo $this->siteContext->getLocale('regGenCode1'); ?> <a href="userarea.php?username=<?php echo htmlentities(urlencode($in['brugernavn'])); ?> &password=<?php echo htmlentities(urlencode($in['kodeord'])); ?> &start=Obligatorisk+kode&start_type=kodegen"> <?php echo $this->siteContext->getLocale('regGenCode2'); ?> </a>. <?php echo $this->siteContext->getLocale('regGenCode3'); ?> </p> <p><?php echo sprintf($this->siteContext->getLocale('regGenCodeAgain'), "<a href=\"" . $this->siteContext->getOption('ZSHomePage') . "\">" . $this->siteContext->getOption('ZSHomePage') . "</a>"); ?> </P> <h2><?php echo $this->siteContext->getLocale('regAboutHelp'); ?> </h2> <p><?php echo sprintf($this->siteContext->getLocale('regAboutHelpText'), "<a href=\"" . $this->siteContext->getLocale('regUrlHelp') . "\">" . $this->siteContext->getLocale('regAboutHelp') . "</a>"); ?> </p></div> <?php }