Exemplo n.º 1
0
        $sg->addElement($headline);
        $text = $sg->newElement("text");
        $text->setText($siteContext->getLocale("siteEnterPwd"));
        $sg->addElement($text);
        $login = $sg->newElement("loginForm");
        $login->setUrl($stier->getOption('urlStatsite'));
        $login->setKeyUsername("brugernavn");
        $login->setKeyPassword("brugerkodeord");
        $login->setSubmitMethod("POST");
        $login->setUsername($ind["brugernavn"]);
        $sg->addElement($login);
        echo $sg->getSite();
        exit;
    }
}
//Instantierer statistiksiden og angiver typen p statistiksiden.
if (array_key_exists('type', $ind)) {
    $statSite = new StatSite($siteContext, $ind['type']);
} else {
    $statSite = new StatSite($siteContext, '');
}
/*----Selve programmet----*/
//Sender headers til browseren om at siden ikke m caches.
$lib->outputNoCacheHeaders();
//Genererer HTML'en
$side = $statSite->generateSite();
$statSite->outputHeaders();
//Fortller browseren hvor meget HTML der er.
header("Content-Length: " . strlen($side));
//Sender HTML'en.
echo $side;
Exemplo n.º 2
0
     //that and not storing that it has been send, resulting in spamming the user.
     array_unshift($send, $lib->getTimeAdjusted());
     $datafil->setLine(67, implode("::", $send));
     $datafil->gemFil();
     //Create the statsite
     require_once "lib/StatSite.php";
     require_once "lib/LegacyMapper.php";
     require_once "lib/SiteContext.php";
     require_once "lib/Localizer.php";
     //Maps old to new parameters
     $statSiteMapper = new StatSiteLegacyMapper();
     $mappedInd = $statSiteMapper->applyMapping(array_merge($varsForStatSite, $ind));
     //Creates a new site context for the stat site.
     $siteContext = new SiteContext($lib, $stier, $mappedInd, 'da');
     //Creates the statsite
     $statSite = new StatSite($siteContext, 'text');
     $statSite->setShowStatselector(0);
     $statSite->setSendByMail(true);
     $statSite->setMaxStatsToShow(-1);
     //Disable bandwidth limitation
     //Generates the html for the statsite.
     $side = $statSite->generateSite();
     @mail($datafil->getLine(2), "Statistikker fra ZIP Stat", $side, "From: zipstat_mailstats@zip.dk\nReply-to: zipstat_mailstats@zip.dk\nX-abuse: postmaster@zip.dk\nX-Mailer: ZIP Stat mailstats\nContent-Type: text/plain");
     //Stat site end
     //Log the sending of the mail
     $fp = fopen("mailsSend.txt", "a");
     fwrite($fp, "Mail send " . date('r') . " " . $ind['brugernavn'] . ", adress: " . $datafil->getLine(2) . "\n");
     fclose($fp);
 } else {
     $datafil->gemFil();
 }
Exemplo n.º 3
-1
 /**
  * Instantiates the class.
  *
  * @public
  * @version 0.0.1
  * @since 0.0.1
  * @param $siteContext the courent {@link SiteContext} object.
  * @param $generatortype text string which identifies the type of
  *         generator to be used.
  */
 function CollectiveIndex(&$siteContext, $generatorType)
 {
     parent::StatSite($siteContext, $generatorType);
 }