<?php require_once $_SERVER["DOCUMENT_ROOT"] . "/php/init.php"; $smarty = new PopSmarty(); $visningsbilder = Visningsbild::listAll(); $smarty->assign("visningsbilder", $visningsbilder); $smarty->display('valjvisningsbild.tpl');
<?php require_once $_SERVER["DOCUMENT_ROOT"] . "/php/init.php"; Security::demand(USER, null, false); $smarty = new PopSmarty(); $mid = Security::escape($_GET['id']); $do = Security::escape($_GET['do']); $medlem_to_send = Medlem::loadById($mid); $smarty->assign("medlem_to_send", $medlem_to_send); $smarty->assign("mid", $mid); if ($do == 'send') { $smarty->assign("is_replay", false); if (isset($_GET['re'])) { $id = Security::escape($_GET['re']); $mail_to_read = MotiomeraMail::loadById($id); $smarty->assign("is_replay", true); $text_message_decoded = str_replace("<br>", "", $mail_to_read->getMsg()); $text_message_decoded = str_replace("<br />", "", $mail_to_read->getMsg()); $text_message = "\n\n********************\n"; $text_message .= $text_message_decoded; $smarty->assign("text_message", $text_message); $smarty->assign("mail_to_read", $mail_to_read); } $action = "send"; } else { if ($do == 'sent') { $action = "sent"; } } $smarty->assign("action", $action); $smarty->display('send_mail.tpl');
<?php require_once $_SERVER["DOCUMENT_ROOT"] . "/php/init.php"; $smarty = new PopSmarty(); $id = $_GET["id"]; $texteditor = Help::loadById($id); $smarty->assign("texteditor", $texteditor); $smarty->display('help.tpl');
<?php require_once $_SERVER["DOCUMENT_ROOT"] . "/php/init.php"; $smarty = new PopSmarty(); $avatarer = Avatar::listAll(); $smarty->assign("avatarer", $avatarer); $smarty->display('valjavatar.tpl');
<?php require_once $_SERVER["DOCUMENT_ROOT"] . "/php/init.php"; $smarty = new PopSmarty(); $lagid = $_POST['lagid']; $lag = Lag::loadById($lagid); if (isset($lag)) { $smarty->assign("lag", $lag); $smarty->assign("lagnamn", $lag->getNamn()); $smarty->display('laddaupplagbild.tpl'); } else { throw LagException("Lag invalid", -1000); }
<?php require_once $_SERVER["DOCUMENT_ROOT"] . "/php/init.php"; Security::demand(USER, null, false); $smarty = new PopSmarty(); if ($_GET['gid']) { $smarty->assign('gid', $_GET['gid']); } $smarty->display('ansok_klubb.tpl');
<?php require_once $_SERVER["DOCUMENT_ROOT"] . "/php/init.php"; try { Misc::sendEmail($SETTINGS["kontakt"], $_POST["epost"], "Motiomera.se - Formulärsmail från " . $_POST["epost"], $_POST["meddelande"]); } catch (MiscException $e) { if ($e->getCode() == -2) { echo "Ogiltig e-postadress!"; exit; } } $smarty = new PopSmarty(); $smarty->display('skickamail.tpl');
<?php require_once $_SERVER["DOCUMENT_ROOT"] . "/php/init.php"; $smarty = new PopSmarty(); if ($USER) { $medlem = Medlem::loadById($USER->getId()); $smarty->assign("user_id", $USER->getId()); } $smarty->assign("HTTP_REFERER", $_SERVER["HTTP_REFERER"]); $smarty->assign("HTTP_USER_AGENT", $_SERVER["HTTP_USER_AGENT"]); $smarty->display('kontakta.tpl');
<?php require_once $_SERVER["DOCUMENT_ROOT"] . "/php/init.php"; Security::demand(USER, null, false); $smarty = new PopSmarty(); if (!empty($_GET["sid"])) { $steg = Steg::loadById($_GET["sid"]); $smarty->assign("steg", $steg); } if (!isset($_POST["aid"]) && isset($steg)) { $aktivitet_sel = $steg->getaktivitetId(); $aktivitet = $steg->getaktivitet(); } else { if (isset($_POST["aid"])) { $aktivitet_sel = $_POST["aid"]; $aktivitet = aktivitet::loadById($_POST["aid"]); } else { $aktivitet_sel = ""; } } if (isset($aktivitet)) { $smarty->assign("aktivitet", $aktivitet); } $smarty->assign("aktivitet_sel", $aktivitet_sel); $aktiviteter = Aktivitet::listAll(); $opt_aktivitet = array(); foreach ($aktiviteter as $key => $aktivitet) { if ($aktivitet->getBorttagen() != 'ja' || (!isset($opt_aktivitet[$aktivitet->getNamn() . " (min)"]) or !isset($opt_aktivitet[$aktivitet->getNamn()]))) { if ($aktivitet->getEnhet() == "minuter") { $opt_aktivitet[$aktivitet->getNamn() . " (min)"] = array('id' => $aktivitet->getId(), 'namn' => $aktivitet->getNamn() . " (min)"); } else {
<?php require_once $_SERVER["DOCUMENT_ROOT"] . "/php/init.php"; $smarty = new PopSmarty(); $avatarer = CustomLagbild::listAll(); $smarty->assign("avatarer", $avatarer); $smarty->assign("lagid", $_GET['lagid']); $smarty->display('valjlagavatar.tpl');
<?php require_once $_SERVER["DOCUMENT_ROOT"] . "/php/init.php"; $smarty = new PopSmarty(); $smarty->display('laddauppvisningsbild.tpl');
<?php require_once $_SERVER["DOCUMENT_ROOT"] . "/php/init.php"; Security::demand(USER, null, false); $smarty = new PopSmarty(); $id = Security::escape($_GET['id']); $is_inbox = isset($_GET['is_inbox']) ? Security::escape($_GET['is_inbox']) : false; $mail_to_read = MotiomeraMail::loadById($id); if (!isset($USER) || !($mail_to_read->getToId() == $USER->getId() or $mail_to_read->getSentFrom() == $USER->getId())) { throw new UserException('Ett fel har uppstått', 'Mailet du försöker läsa är inte skickat till dig.'); } if (isset($is_inbox) && $is_inbox == '1') { $mail_to_read->setIsRead(1); } $smarty->assign("id", $id); $smarty->assign("is_inbox", $is_inbox); $smarty->assign("mail_to_read", $mail_to_read); $smarty->assign("my_id", $USER->getId()); global $SETTINGS; $fromMedlem = Medlem::loadById($mail_to_read->getSentFrom()); $smarty->assign("medlem", $fromMedlem); $reserverade_anvandare = $SETTINGS["reserverade_anvandare"]; foreach ($reserverade_anvandare as $k => $anv) { $reserverade_anvandare[$k] = strtolower($anv); } if (isset($SETTINGS["reserverade_anvandare"])) { $replyable = in_array(strtolower($fromMedlem->getANamn()), $reserverade_anvandare) ? 0 : 1; } else { $replyable = 1; } $smarty->assign("replyable", $replyable);
<?php require_once $_SERVER["DOCUMENT_ROOT"] . "/php/init.php"; $smarty = new PopSmarty(); $smarty->assign("foretagsid", isset($_POST["fid"]) ? $_POST["fid"] : ''); $smarty->display('laddauppforetagsbild.tpl');
<?php require_once $_SERVER["DOCUMENT_ROOT"] . "/php/init.php"; Security::demand(USER); $medlem = Medlem::loadById($_POST["medlem_id"]); $grupper = Grupp::listInbjudningsbaraGrupper($medlem); $opt_grupper = array(); $grupp = current($grupper); foreach ($grupper as $grupp) { $opt_grupper[$grupp->getId()] = $grupp->getNamn(); } $smarty = new PopSmarty(); if (count($opt_grupper) == 1) { $smarty->assign("grupp", $grupp); } $smarty->assign("opt_grupper", $opt_grupper); $smarty->display('bjudintillklubb.tpl');
<?php require_once $_SERVER["DOCUMENT_ROOT"] . "/php/init.php"; Security::demand(USER, null, false); $smarty = new PopSmarty(); $id = Security::escape($USER->getId()); $myself = Medlem::loadById($id); $my_contacts = $myself->getUsersThatHasMeAsContact(0); $smarty->assign("my_contacts", $my_contacts); $smarty->assign("my_id", $USER->getId()); $smarty->display('write_new.tpl');
<?php require_once $_SERVER["DOCUMENT_ROOT"] . "/php/init.php"; $smarty = new PopSmarty(); $smarty->display('mailform.tpl');