本文整理汇总了PHP中Evaluation::emailEvaluation方法的典型用法代码示例。如果您正苦于以下问题:PHP Evaluation::emailEvaluation方法的具体用法?PHP Evaluation::emailEvaluation怎么用?PHP Evaluation::emailEvaluation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Evaluation
的用法示例。
在下文中一共展示了Evaluation::emailEvaluation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: urlencode
$iEvaluationId = $_POST['evaluation-id'];
$url = urlencode('http://kaftans.boutique/dev/eval/admin/view_eval_pdf.php?skip_auth=1HGstGtw8272891H&eval_id=' . $iEvaluationId . '&remove_formatting=true');
$curlSession = curl_init();
curl_setopt($curlSession, CURLOPT_URL, 'http://www.html2pdf.it/?url=' . $url);
curl_setopt($curlSession, CURLOPT_BINARYTRANSFER, true);
curl_setopt($curlSession, CURLOPT_RETURNTRANSFER, true);
$Result = curl_exec($curlSession);
if (!empty($_POST['email-pdf'])) {
$blnSent = false;
$objEvaluation = new Evaluation(NULL, $iEvaluationId);
$arrEvaluation = $objEvaluation->getEvaluation();
if (!empty($arrEvaluation['email'])) {
$strEmail = $arrEvaluation['email'];
$strName = $arrEvaluation['student'];
$strFilename = 'evaluation-' . $iEvaluationId . '.pdf';
$blnSent = $objEvaluation->emailEvaluation($strEmail, $strName, $Result, $strFilename);
}
if ($blnSent) {
setTopMessage('success', 'Success! the PDF has been sent to ' . $strEmail . '.');
header('Location: ' . $strLocation . 'admin/view_eval.php?eval_id=' . $iEvaluationId);
} else {
setTopMessage('errro', 'Error! The PDF was not sent, please check the email address.');
header('Location: ' . $strLocation . 'admin/view_eval.php?eval_id=' . $iEvaluationId);
}
} else {
header('Cache-Control: public');
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="evaluation-' . $iEvaluationId . '.pdf"');
header('Content-Length: ' . strlen($Result));
echo $Result;
}
示例2: array
<?php
include "../includes/logincheck.php";
if (!empty($_POST)) {
if (!empty($_POST['download-pdf'])) {
if (!ini_get('display_errors')) {
ini_set('display_errors', '1');
}
require_once '../includes/html2pdf_v4.03/html2pdf.class.php';
$iEvaluationId = $_POST['evaluation-id'];
$html2pdf = new HTML2PDF('P', 'A4', 'en');
$username = 'dev';
$password = 'bradf0rd1911';
$context = stream_context_create(array('http' => array('header' => "Authorization: Basic " . base64_encode("{$username}:{$password}"))));
$content = file_get_contents('http://jamestoothill.co.uk/dev/eval/admin/view_eval_pdf.php?skip_auth=1HGstGtw8272891H&eval_id=' . $iEvaluationId . '&remove_formatting=true', false, $context);
$objEvaluation = new Evaluation(NULL, NULL);
$objEvaluation->emailEvaluation('jimmytootall3@gmail.com', 'James Toothill', $content);
//echo $content;
//$html2pdf->WriteHTML($content);
//$html2pdf->Output('exemple.pdf');
exit;
}
}