コード例 #1
0
ファイル: cronReports.php プロジェクト: grlf/eyedock
        continue;
    }
    //it hasn't been long enough
    //just a safeguard (don't automatically send anyone more than 1 email in a month)
    if ($daysSinceEmail < 30) {
        continue;
    }
    $count++;
    //echo "-> " . $row['pn_comp_tid'] . ", ";
    $data['company'] = getCompanyReport($row['pn_comp_tid']);
    $data['lenses'] = getCompanyLensesReport($row['pn_comp_tid']);
    //massage the data for the email
    if ($row['pn_contact_email'] == "") {
        $row['pn_contact_email'] = $row['pn_email'];
    }
    if ($row['pn_comp_name_short'] == "") {
        $row['pn_comp_name_short'] = $row['pn_comp_name'];
    }
    //get the email intro content
    $data['intro'] = makeEmailIntro($row);
    $to = $row['pn_contact_email'];
    $subject = $row['pn_comp_name_short'] . " lenses on EyeDock";
    $contact = $row['pn_contact_nameF'] . " " . $row['pn_contact_nameL'];
    if ($row['pn_contact_nameF'] == "") {
        $contact = $row['pn_comp_name_short'];
    }
    $content = $data['intro'] . "\n\n" . $data['company'] . $data['lenses'];
    echo $content;
    emailCompanyReport($to, $subject, $content, $row['pn_comp_name_short'], $contact);
    updateLastEmail($row['pn_comp_tid']);
}
コード例 #2
0
ファイル: handleReportForm.php プロジェクト: grlf/eyedock
<?php

// ini_set('display_errors', 1);
// ini_set('log_errors', 1);
// ini_set('error_log', dirname(__FILE__) . '/error_log.txt');
// error_reporting(E_ALL);
// ini_set('html_errors', 'On');
require_once 'emailer.php';
require_once 'companyFunctions.php';
$to = $_REQUEST['to'];
$subject = $_REQUEST['subject'];
$report_content = $_REQUEST['report_content'];
$intro = $_REQUEST['email_body'];
$company = $_REQUEST['company'];
$contact = $_REQUEST['contact'];
$id = $_REQUEST['id'];
$content = htmlspecialchars_decode($intro) . "<p><hr></p>" . htmlspecialchars_decode($report_content);
//echo $content;
emailCompanyReport($to, $subject, $content, $company, $contact);
updateLastEmail($id);