Exemplo n.º 1
0
 * compliance with the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific language governing rights and limitations
 * under the License.
 *
 * @category  phpMyFAQ
 * @package   Frontend
 * @author    Thorsten Rinne <*****@*****.**>
 * @copyright 2002-2010 phpMyFAQ Team
 * @license   http://www.mozilla.org/MPL/MPL-1.1.html Mozilla Public License Version 1.1
 * @link      http://www.phpmyfaq.de
 * @since     2002-08-29
 */
if (!defined('IS_VALID_PHPMYFAQ')) {
    header('Location: http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']));
    exit;
}
$captcha = new PMF_Captcha($db, $Language);
$captcha->setSessionId($sids);
if (!is_null($showCaptcha)) {
    $captcha->showCaptchaImg();
    exit;
}
$id = PMF_Filter::filterInput(INPUT_GET, 'id', FILTER_VALIDATE_INT);
$artlang = PMF_Filter::filterInput(INPUT_GET, 'artlang', FILTER_SANITIZE_STRIPPED);
$faqsession->userTracking('write_comment', $id);
$tpl->processTemplate('writeContent', array('msgCommentHeader' => $PMF_LANG['msgWriteComment'], 'writeSendAdress' => '?' . $sids . 'action=savecomment', 'ID' => $id, 'LANG' => $artlang, 'writeThema' => $faq->getRecordTitle($id), 'msgNewContentName' => $PMF_LANG['msgNewContentName'], 'msgNewContentMail' => $PMF_LANG['msgNewContentMail'], 'defaultContentMail' => getEmailAddress(), 'defaultContentName' => getFullUserName(), 'msgYourComment' => $PMF_LANG['msgYourComment'], 'msgNewContentSubmit' => $PMF_LANG['msgNewContentSubmit'], 'captchaFieldset' => PMF_Helper_Captcha::getInstance()->renderFieldset($PMF_LANG['msgCaptcha'], $captcha->printCaptcha('writecomment'))));
$tpl->includeTemplate('writeContent', 'index');
Exemplo n.º 2
0
             }
         }
     } else {
         //echo "no data received from database\n";
     }
 } else {
     echo "Could not read from DB\n";
 }
 //check for fault events in DB
 if ($data2 = $_db->get('Fault_Event', array('Id', '>', $last_fault_id))) {
     $message = "The following fault event occured on:\n";
     if ($data2->counts() > 0) {
         $last_fault_id = $data->last()->Id;
         //echo "Id 2 = $last_fault_id\n";
         foreach ($data2->results() as $key) {
             if ($email = getEmailAddress($_db, $key->Unit_Id)) {
                 $user = $email[0];
                 $alarm = getValue(2, $key->Fault_Type);
                 $message = $message . "RTU: {$email['1']}\nFault Type: {$alarm['0']}\nFault Value: {$key->Fault_Value} {$alarm['1']}\nTime: {$timenow}";
                 if (checkTimes($_db, $user)) {
                     //echo "do email stuff\n";
                     //var_dump($email);
                     for ($i = 2; $i < sizeof($email); $i++) {
                         //echo $email[$i];
                         mail($email[$i], $subject, $message, $headers);
                     }
                 } else {
                     echo "do nothing\n";
                 }
             }
         }
Exemplo n.º 3
0
<?php

/**
* $Id: writecomment.php,v 1.3.2.6.2.7 2006/04/25 12:07:24 matteo Exp $
*
* @author       Thorsten Rinne <*****@*****.**>
* @since        2002-08-29
* @copyright    (c) 2001-2006 phpMyFAQ Team
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
*/
if (!defined('IS_VALID_PHPMYFAQ')) {
    header('Location: http://' . $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME']));
    exit;
}
$captcha = new PMF_Captcha($db, $sids, $pmf->language, $_SERVER['HTTP_USER_AGENT'], $_SERVER['REMOTE_ADDR']);
if (isset($_GET['gen'])) {
    $captcha->showCaptchaImg();
    exit;
}
Tracking('write_comment', $_GET['id']);
$tpl->processTemplate('writeContent', array('msgCommentHeader' => $PMF_LANG['msgWriteComment'], 'writeSendAdress' => $_SERVER['PHP_SELF'] . '?' . $sids . 'action=savecomment', 'ID' => $_GET['id'], 'LANG' => $_GET['artlang'], 'writeThema' => getThema($_GET['id'], $_GET['artlang']), 'msgNewContentName' => $PMF_LANG['msgNewContentName'], 'msgNewContentMail' => $PMF_LANG['msgNewContentMail'], 'defaultContentMail' => getEmailAddress(), 'defaultContentName' => getFullUserName(), 'msgYourComment' => $PMF_LANG['msgYourComment'], 'msgNewContentSubmit' => $PMF_LANG['msgNewContentSubmit'], 'captchaFieldset' => printCaptchaFieldset($PMF_LANG['msgCaptcha'], $captcha->printCaptcha('writecomment'), $captcha->caplength), 'copyright_eintrag' => unhtmlentities($PMF_CONF['copyright_eintrag'])));
$tpl->includeTemplate('writeContent', 'index');
Exemplo n.º 4
0
/**
* $Id: ask.php,v 1.3.2.5.2.9 2006/04/25 12:07:24 matteo Exp $
*
* @author       Thorsten Rinne <*****@*****.**>
* @since        2002-09-17
* @copyright    (c) 2001-2006 phpMyFAQ Team
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
*/
if (!defined('IS_VALID_PHPMYFAQ')) {
    header('Location: http://' . $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME']));
    exit;
}
$captcha = new PMF_Captcha($db, $sids, $pmf->language, $_SERVER['HTTP_USER_AGENT'], $_SERVER['REMOTE_ADDR']);
if (isset($_GET['gen'])) {
    $captcha->showCaptchaImg();
    exit;
}
Tracking('ask_question', 0);
$tree->buildTree();
$tpl->processTemplate('writeContent', array('msgQuestion' => $PMF_LANG['msgQuestion'], 'msgNewQuestion' => $PMF_LANG['msgNewQuestion'], 'writeSendAdress' => $_SERVER['PHP_SELF'] . '?' . $sids . 'action=savequestion', 'msgNewContentName' => $PMF_LANG['msgNewContentName'], 'msgNewContentMail' => $PMF_LANG['msgNewContentMail'], 'defaultContentMail' => getEmailAddress(), 'defaultContentName' => getFullUserName(), 'msgAskCategory' => $PMF_LANG['msgAskCategory'], 'printCategoryOptions' => $tree->printCategoryOptions(), 'msgAskYourQuestion' => $PMF_LANG['msgAskYourQuestion'], 'captchaFieldset' => printCaptchaFieldset($PMF_LANG['msgCaptcha'], $captcha->printCaptcha('ask'), $captcha->caplength), 'msgNewContentSubmit' => $PMF_LANG['msgNewContentSubmit']));
$tpl->includeTemplate('writeContent', 'index');
Exemplo n.º 5
0
<?php

/**
* $Id: contact.php,v 1.3.2.4.2.2 2006/04/25 12:07:24 matteo Exp $
*
* @author       Thorsten Rinne <*****@*****.**>
* @since        2002-09-16
* @copyright    (c) 2001-2006 phpMyFAQ Team
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
*/
if (!defined('IS_VALID_PHPMYFAQ')) {
    header('Location: http://' . $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME']));
    exit;
}
Tracking('contact', 0);
$captcha = new PMF_Captcha($db, $sids, $pmf->language, $_SERVER['HTTP_USER_AGENT'], $_SERVER['REMOTE_ADDR']);
if (isset($_GET['gen'])) {
    $captcha->showCaptchaImg();
    exit;
}
$tpl->processTemplate('writeContent', array('msgContact' => $PMF_LANG['msgContact'], 'msgContactOwnText' => unhtmlentities($PMF_CONF['msgContactOwnText']), 'msgContactEMail' => $PMF_LANG['msgContactEMail'], 'writeSendAdress' => $_SERVER['PHP_SELF'] . '?' . $sids . 'action=sendmail', 'msgNewContentName' => $PMF_LANG['msgNewContentName'], 'msgNewContentMail' => $PMF_LANG['msgNewContentMail'], 'defaultContentMail' => getEmailAddress(), 'defaultContentName' => getFullUserName(), 'msgMessage' => $PMF_LANG['msgMessage'], 'msgS2FButton' => $PMF_LANG['msgS2FButton'], 'version' => $PMF_CONF['version'], 'captchaFieldset' => printCaptchaFieldset($PMF_LANG['msgCaptcha'], $captcha->printCaptcha('contact'), $captcha->caplength)));
$tpl->includeTemplate('writeContent', 'index');
Exemplo n.º 6
0
* $Id: send2friend.php,v 1.3.2.5.2.5 2006/04/25 12:07:24 matteo Exp $
*
* The send2friend page
*
* @author       Thorsten Rinne <*****@*****.**>
* @since        2002-09-16
* @copyright    (c) 2001-2006 phpMyFAQ Team
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
*/
if (!defined('IS_VALID_PHPMYFAQ')) {
    header('Location: http://' . $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME']));
    exit;
}
$captcha = new PMF_Captcha($db, $sids, $pmf->language, $_SERVER['HTTP_USER_AGENT'], $_SERVER['REMOTE_ADDR']);
if (isset($_GET['gen'])) {
    $captcha->showCaptchaImg();
    exit;
}
Tracking('send2friend', 0);
$send2friendLink = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'] . '?action=artikel&amp;cat=' . $_REQUEST['cat'] . '&amp;id=' . $_REQUEST['id'] . '&amp;artlang=' . $_REQUEST['artlang'];
$tpl->processTemplate('writeContent', array('msgSend2Friend' => $PMF_LANG['msgSend2Friend'], 'writeSendAdress' => $_SERVER['PHP_SELF'] . '?' . $sids . 'action=mailsend2friend', 'msgS2FReferrer' => 'link', 'msgS2FName' => $PMF_LANG['msgS2FName'], 'msgS2FEMail' => $PMF_LANG['msgS2FEMail'], 'defaultContentMail' => getEmailAddress(), 'defaultContentName' => getFullUserName(), 'msgS2FFriends' => $PMF_LANG['msgS2FFriends'], 'msgS2FEMails' => $PMF_LANG['msgS2FEMails'], 'msgS2FText' => $PMF_LANG['msgS2FText'], 'send2friend_text' => $PMF_CONF['send2friend_text'], 'msgS2FText2' => $PMF_LANG['msgS2FText2'], 'send2friendLink' => $send2friendLink, 'msgS2FMessage' => $PMF_LANG['msgS2FMessage'], 'captchaFieldset' => printCaptchaFieldset($PMF_LANG['msgCaptcha'], $captcha->printCaptcha('send2friend'), $captcha->caplength), 'msgS2FButton' => $PMF_LANG['msgS2FButton']));
$tpl->includeTemplate('writeContent', 'index');
Exemplo n.º 7
0
    }
    $sqlsender = "select rtrim(email1) as sender,roepnaam||coalesce(' '||voorvoegsel,'')||' '||achternaam as sender_name," . "coalesce(signature," . "'sent by the peerweb service on behalf of '||roepnaam||coalesce(' '||voorvoegsel,'')||' '||achternaam)\n" . "  as signature from student left join email_signature using(snummer) where snummer='{$peer_id}'";
    $rs = $dbConn->Execute($sqlsender);
    if (!$rs->EOF) {
        extract($rs->fields);
    } else {
        $replyto = '*****@*****.**';
        $sender_name = 'Pieter van den Hombergh';
        $signature = '';
    }
    $headers = htmlmailheaders($sender, $sender_name, $email1, $tutor_email);
    if (!in_array($tutor, $tutors)) {
        array_push($tutors, $tutor);
    }
    foreach ($tutors as $tutor) {
        $ccAddress .= $cccon . getEmailAddress($dbConn, $tutor, true);
        $cccon = ', ';
    }
    if (isset($email2)) {
        $email1 .= ', ' . $email2;
    }
    $subject = $pp['formsubject'];
    $bodyprefix = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>' . $subject . '</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
</head>
<body>
';
    $message = $bodyprefix . $pp['mailbody'] . "\n</body>\n</html>\n";
Exemplo n.º 8
0
    <?php 
                                            echo $record->firstname . " " . $record->lastname . " ";
                                            ?>
    
    </div>
    </li>
    
    
    
    <li id="fo1li6" class="     ">
    <label class="desc" id="title6" for="email">
    Student Email
    </label>
    <div>
	<?php 
                                            echo getEmailAddress($record->userid);
                                            ?>
 
    </div>
    </li>
    
    

    <li id="fo1li8" class="      ">
    <label class="desc" id="title8" for="certificates">
    Certificate Title
    </label>
    <div>
    <select id="certificates" name="certificates" class="field select large required certs" onclick="handleInput(this);" onkeyup="handleInput(this);" tabindex="4"> 
    <?php 
                                            echo getCertList(false, $record->certificateid);
    $arr = "";
}
//echo $arr;
/*
if(fileDelete("../../../verifycert/cert_files/","1318549367362.pdf")){
	echo "File deleted.";
}else{
	echo "Cannot delete file.";
}
*/
//*****************************************************************************************
if ($action == 'getEmailAddress') {
    header('Content-Type: text/x-json');
    if (isset($_POST['userId'])) {
        $userId = $_POST['userId'];
        echo getEmailAddress($userId);
    }
} else {
    if ($action == 'getCertDesc') {
        header('Content-Type: text/x-json');
        if (isset($_POST['descId'])) {
            $descId = $_POST['descId'];
            echo getCertDesc($descId);
        }
    } else {
        if ($action == 'getCertInfo') {
            header('Content-Type: text/x-json');
            if (isset($_POST['descId'])) {
                $descId = $_POST['descId'];
                echo json_encode(getCertInfo($descId));
            }
Exemplo n.º 10
0
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
*/
if (!defined('IS_VALID_PHPMYFAQ')) {
    header('Location: http://' . $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME']));
    exit;
}
$captcha = new PMF_Captcha($db, $sids, $pmf->language, $_SERVER['HTTP_USER_AGENT'], $_SERVER['REMOTE_ADDR']);
if (isset($_GET['gen'])) {
    $captcha->showCaptchaImg();
    exit;
}
Tracking('new_entry', 0);
if (isset($_GET['question'])) {
    $question = strip_tags($_GET['question']);
    $readonly = ' readonly="readonly"';
} else {
    $question = '';
    $readonly = '';
}
if (isset($_GET['cat']) && is_numeric($_GET['cat'])) {
    $rubrik = intval($_GET['cat']);
    $category = array(array('category_id' => $rubrik, 'category_lang' => $LANGCODE));
} else {
    $category = array();
}
$tree->buildTree();
$tpl->processTemplate('writeContent', array('msgNewContentHeader' => $PMF_LANG['msgNewContentHeader'], 'msgNewContentAddon' => $PMF_LANG['msgNewContentAddon'], 'writeSendAdress' => $_SERVER['PHP_SELF'] . '?' . $sids . 'action=save', 'defaultContentMail' => getEmailAddress(), 'defaultContentName' => getFullUserName(), 'msgNewContentName' => $PMF_LANG['msgNewContentName'], 'msgNewContentMail' => $PMF_LANG['msgNewContentMail'], 'msgNewContentCategory' => $PMF_LANG['msgNewContentCategory'], 'printCategoryOptions' => $tree->printCategoryOptions($category), 'msgNewContentTheme' => $PMF_LANG['msgNewContentTheme'], 'readonly' => $readonly, 'printQuestion' => $question, 'msgNewContentArticle' => $PMF_LANG['msgNewContentArticle'], 'msgNewContentKeywords' => $PMF_LANG['msgNewContentKeywords'], 'msgNewContentLink' => $PMF_LANG['msgNewContentLink'], 'copyright_eintrag' => unhtmlentities($PMF_CONF['copyright_eintrag']), 'captchaFieldset' => printCaptchaFieldset($PMF_LANG['msgCaptcha'], $captcha->printCaptcha('add'), $captcha->caplength), 'msgNewContentSubmit' => $PMF_LANG['msgNewContentSubmit']));
$tpl->includeTemplate('writeContent', 'index');