Exemplo n.º 1
0
 * Copyright: dtbaker 2012
 * Licence: Please check CodeCanyon.net for licence details. 
 * More licence clarification available here:  http://codecanyon.net/wiki/support/legal-terms/licensing-terms/ 
 * Deploy: 9809 f200f46c2a19bb98d112f2d32a8de0c4
 * Envato: 4ffca17e-861e-4921-86c3-8931978c40ca
 * Package Date: 2015-11-25 02:55:20 
 * IP Address: 67.79.165.254
 */
if (!$file_safe) {
    die('wrong page');
}
if (!module_file::can_i('edit', 'File Approval')) {
    die('no perms');
}
$ucm_file = new ucm_file($file_id);
$ucm_file->check_page_permissions();
$file = $ucm_file->get_data();
$file_id = (int) $file['file_id'];
// sanatisation/permission check
module_template::init_template('file_approval_email', 'Dear {CUSTOMER_NAME},<br>
<br>
This email is regarding your file <strong>{FILE_NAME}</strong>{if:JOB_LINK} related to the job <a href="{JOB_LINK}">{JOB_NAME}</a>{endif:JOB_LINK}.<br><br>
Please view this file and comments online by <a href="{FILE_URL}">clicking here</a>.<br><br>
Thank you,<br><br>
{FROM_NAME}
', 'File for Approval: {FILE_NAME}', array('CUSTOMER_NAME' => 'Customers Name', 'FILE_NAME' => 'File Name', 'JOB_NAME' => 'Job Name', 'FROM_NAME' => 'Your name', 'FILE_URL' => 'Link to file for customer'));
// template for sending emails.
// are we sending the paid one? or the dueone.
//$template_name = 'file_email';
$template_name = isset($_REQUEST['template_name']) ? $_REQUEST['template_name'] : 'file_approval_email';
$template = module_template::get_template_by_key($template_name);