compile_dir = $physical_path['Site_Root']. 'templates_c/'; $sendinfo = $emails->GetEmailDetails1(REPORT_VIOLATION); $mail2->setFrom($sendinfo->email_adress); $mail2->setSubject($sendinfo->email_subject); $tpl2->assign(array( "your_name" => $_POST['your_name'], "your_email" => $_POST['your_email'], "your_username" => $_POST['your_username'], "violation_list" => $_POST['violation_list'], "other_person_name" => $_POST['other_person_name'], "url" => $_POST['url'], "en_violation_details" => $_POST['en_violation_details'], )); $mail_content_header = $tpl2->fetch("email_template:".EMAIL_HEADER); $mail_content_footer = $tpl2->fetch("email_template:".EMAIL_FOOTER); $mail_content_reg = $tpl2->fetch("email_template:".REPORT_VIOLATION); $mail_html = "
".$mail_content_header."
".$mail_content_reg."
".$mail_content_footer."
"; $mail2->setHtml($mail_html); $result = $mail2->send(array($sendinfo->email_adress)); $violation -> Insert($_POST); header("location: violation_success.html"); exit(0); } $contact->ViewAll(); $rscnt = $db->num_rows(); $i=0; while($db->next_record()) { $arr_contact[$i]['contact_id'] = $db->f('contact_id'); $arr_contact[$i]['contact_country'] = $db->f('contact_country'); $arr_contact[$i]['phone'] = $db->f('phone'); $arr_contact[$i]['fax'] = $db->f('fax'); $i++; } $tpl->assign(array( "T_Body" => 'violation'. $config['tplEx'], "JavaScript" => array("violation.js"), "lang" => $lang, "violation_list" => fillArrayCombo($lang["violation"]), "Loop" => $rscnt, "arr_contact" => $arr_contact, "tab" => 4, "navigation" => '' )); $tpl->display('default_layout'. $config['tplEx']); ?>