Пример #1
0
function sendTemplateEmail($to, $template, $data)
{
    $mailq = '';
    $recipients = is_array($to) ? $to : array($to);
    global $emailTemplates;
    $replacedTemplate = !empty($data) ? templateReplace($emailTemplates[$template], $data) : $emailTemplates[$template];
    $subject = $replacedTemplate['subject'];
    $html = $replacedTemplate['body'];
    $plain = isset($replacedTemplate['plain']) ? $replacedTemplate['plain'] : null;
    $resutl = null;
    foreach ($recipients as $recipient) {
        if (!empty($emailTemplates[$template]['mailq'])) {
            $mailq = $emailTemplates[$template]['mailq'];
        }
        $result = sl_send_email($recipient, $subject, $html, $plain, $mailq);
    }
    return $result;
}
Пример #2
0
    $DEBUGINFO .= "Page Id : " . $pageId . "<br /><br />\n";
    $DEBUGINFO .= "Page id path : " . arraytostring($pageIdArray) . "\n<br /><br />";
    $DEBUGINFO .= "Title : " . $TITLE . "\n<br /><br />";
    $DEBUGINFO .= "SERVER info : " . arraytostring($_SERVER) . "\n<br /><br />";
    $DEBUGINFO .= "POST info : " . arraytostring($_POST) . "\n<br /><br />";
    $DEBUGINFO .= "FILES info : " . arraytostring($_FILES) . "\n<br /><br />";
    $DEBUGINFO .= "SESSION info : " . arraytostring($_SESSION) . "\n<br /><br />";
    $DEBUGINFO .= "STARTSCRIPTS : " . $STARTSCRIPTS . "\n<br/><br/>";
    if ($DEBUGINFO != "") {
        displayinfo($DEBUGINFO);
    }
}
///Used to check in subsequent requests if cookies are supported or not
setcookie("cookie_support", "enabled", 0, "/");
///Apply the template on the generated content and display the page
templateReplace($TITLE, $MENUBAR, $ACTIONBARMODULE, $ACTIONBARPAGE, $BREADCRUMB, $SEARCHBAR, $PAGEKEYWORDS, $INHERITEDINFO, $CONTENT, $FOOTER, $DEBUGINFO, $ERRORSTRING, $WARNINGSTRING, $INFOSTRING, $STARTSCRIPTS, $LOGINFORM);
disconnect();
exit;
/** Additional notes :

authenticate.lib.php -> Find out who requested it
	output: one int -> uid

parseurl.lib.php -> Find out the page id and action requested
	input:	url
 	output : pageid, action, actionparameters (variables passed as parameters for the action)

permission.lib.php -> Find out if he has the permission of the particular action on that page
	input : pageid, uid, action
	output : true, false
Пример #3
0
<?php

include_once 'wizard_strings.php';
include_once 'send_email.php';
$position = $periods->getCurrentPeriodCount();
$period = $periods->getPeriodByPosition($position);
$date_format = 'j F Y';
$replacements = array('nickname' => $_SESSION['nickname'], 'love_limit' => '<span class="love-limit"></span>', 'period_start' => date($date_format, strtotime($period['start_date'])), 'period_end' => date($date_format, strtotime($period['end_date'])));
$current_wiz_strings = templateReplace($wizard_strings, $replacements);
foreach ($current_wiz_strings as &$to_br) {
    $to_br = nl2br($to_br);
}
?>
<script type="text/javascript">
    var wizard_strings = <?php 
echo json_encode($current_wiz_strings);
?>
;
</script>

    <div class="reviewPeriodTitle" >
        Review Period
    </div>
    <p class="reviewPeriodMessage"></p>
    <div class="selector-holder">
        <div>
            <div class="carousel-holder">
                <div class="carousel">
                    <div style="margin-left:auto;margin-right:auto;">
                    <div class="prev-period scroll" title="Previous review period">
                        <div class="iconsListElement" >