?> <form action="" method="post"> <?php module_form::print_form_auth(); ?> <?php $search_bar = array('elements' => array('name' => array('title' => _l('Email Subject:'), 'field' => array('type' => 'text', 'name' => 'search[generic]', 'value' => isset($search['generic']) ? $search['generic'] : '')), 'date' => array('title' => _l('Sent Date:'), 'fields' => array(array('type' => 'date', 'name' => 'search[date_from]', 'value' => isset($search['date_from']) ? $search['date_from'] : ''), _l('to'), array('type' => 'date', 'name' => 'search[date_to]', 'value' => isset($search['date_to']) ? $search['date_to'] : ''))))); echo module_form::search_bar($search_bar); $table_manager = module_theme::new_table_manager(); $columns = array(); $columns['email_subject'] = array('title' => 'Email Subject', 'callback' => function ($email) { echo module_email::link_open($email['email_id'], true); }, 'cell_class' => 'row_action'); $columns['email_date'] = array('title' => 'Sent Date', 'callback' => function ($email) { echo print_date($email['sent_time']); }); $columns['email_to'] = array('title' => 'Sent To', 'callback' => function ($email) { $headers = unserialize($email['headers']); if (isset($headers['to']) && is_array($headers['to'])) { foreach ($headers['to'] as $to) { echo $to['email'] . ' '; } } }); $columns['email_from'] = array('title' => 'Sent By', 'callback' => function ($email) { echo module_user::link_open($email['create_user_id'], true); });
$template->assign_values($replace); } if ($email['job_id']) { $job_data = module_job::get_job($email['job_id']); $replace = module_job::get_replace_fields($email['job_id'], $job_data); $template->assign_values($replace); } if ($email['website_id']) { $website_data = module_website::get_website($email['website_id']); $replace = module_website::get_replace_fields($email['website_id'], $website_data); $template->assign_values($replace); } $email['text_content'] = $template->render('html'); $email['subject'] = $template->replace_description(); } $options = array('cancel_url' => module_email::link_open(false), 'complete_url' => module_email::link_open(false), 'customer_id' => $customer_id); $options = module_email::get_email_compose_options($options); ?> <?php if ($can_edit_emails) { ?> <form action="" method="post" id="template_change_form"> <input type="hidden" name="template_name" value="" id="template_name_change"> </form> <form action="" method="post" enctype="multipart/form-data" id="email_send_form"> <input type="hidden" name="_process" id="process_tag" value="send_email"> <input type="hidden" name="options" value="<?php echo base64_encode(serialize($options)); ?>