Exemple #1
0
				<input type="hidden" name="andraLosen" id="andraLosen" value="0" />
				<div id="motiomera_andra_losenord_link">
					<a href="#" onclick="getById('andraLosen').value='1';getById('motiomera_andra_losenord_link').style.display='none'; getById('motiomera_andra_losenord_field').style.display='block';return false;" title="&Auml;ndra ditt l&ouml;senord">&Auml;ndra l&ouml;senord</a>
				</div>
				<div id="motiomera_andra_losenord_field">
					<input type="password" name="losen" class="mmTextField" /><br />
					<input type="password" name="losen2" class="mmTextField" /> <small class="grey">(Upprepa)</small><br />
					<a href="#" onclick="getById('andraLosen').value='0';getById('motiomera_andra_losenord_link').style.display='block'; getById('motiomera_andra_losenord_field').style.display='none';return false;" title="&Aring;ngra">&Aring;ngra</a>
				</div>
			</td>
		</tr>
		<tr>
			<th>Skicka påminnelsemail</th>
			<td>
				<?php 
$notifications = Paminnelse_sql::listAll();
$aktiva = Paminnelse_sql::getAktivaIDn($USER);
foreach ($notifications as $key => $notification) {
    ?>
					<input type="checkbox" name="notifications[<?php 
    echo $notification->getId();
    ?>
]" id="notification_<?php 
    echo $notification->getId();
    ?>
"<?php 
    if (in_array($notification->getId(), $aktiva)) {
        ?>
 checked="checked"<?php 
    }
    ?>
Exemple #2
0
<?php

require_once $_SERVER['DOCUMENT_ROOT'] . '/php/init.php';
$allaPaminnelser = Paminnelse_sql::listAll();
if (DEBUG) {
    echo "--- DEBUG INFORMATION -----------------\n";
}
foreach ($allaPaminnelser as $paminnelse) {
    $medlemsLista = Paminnelse_sql::getAktivaByPaminnelse($paminnelse);
    if (count($medlemsLista)) {
        $query = str_replace(array('#medlemslista#', '#sql_id#'), array(implode(', ', $medlemsLista), $paminnelse->getId()), $paminnelse->getQuery());
        $resultat = array();
        $yttre_mall = $paminnelse->getMeddelandeId() ? Paminnelse_meddelanden::loadById($paminnelse->getMeddelandeId()) : '';
        $yttre_mall_code = html_entity_decode($yttre_mall->getMall());
        $res = mysql_query($query) or die(mysql_error() . "\n" . $query);
        while ($data = mysql_fetch_assoc($res)) {
            if (isset($data['epost'])) {
                $key = $data['epost'];
                $title = $paminnelse->getTitel();
                $content = $paminnelse->getInreMall();
                foreach ($data as $field => $value) {
                    $content = str_replace('#' . $field . '#', $value, $content);
                    $title = str_replace('#' . $field . '#', $value, $title);
                }
                ob_start();
                eval($yttre_mall_code);
                $resultat[$data['epost']]['text'] = ob_get_clean();
                $resultat[$data['epost']]['subject'] = $title;
            }
        }
        if (count($resultat)) {