protected function main() { $this->set_title(Nw::$lang['contact']['contact']); $this->add_css('forms.css'); $this->set_filAriane(array(Nw::$lang['contact']['contact'] => array(''))); $this->set_tpl('contact/contact.html'); $this->load_lang_file('users'); $this->add_form('contenu'); //Si on veut envoyer le mail if (isset($_POST['submit'])) { if (empty($_POST['pseudo'])) { $msg_error = sprintf(Nw::$lang['contact']['error_empty'], Nw::$lang['contact']['_pseudo']); } elseif (empty($_POST['mail'])) { $msg_error = sprintf(Nw::$lang['contact']['error_empty'], Nw::$lang['contact']['_mail']); } elseif (empty($_POST['sujet'])) { $msg_error = sprintf(Nw::$lang['contact']['error_empty'], Nw::$lang['contact']['_sujet']); } elseif (empty($_POST['contenu'])) { $msg_error = sprintf(Nw::$lang['contact']['error_empty'], Nw::$lang['contact']['_contenu']); } elseif ($_POST['code_cap'] != $_SESSION['cap_nw']) { $msg_error = Nw::$lang['users']['wrong_antispam']; } if (!empty($msg_error)) { display_form(array('pseudo' => $_POST['pseudo'], 'mail' => $_POST['mail'], 'sujet' => $_POST['sujet'], 'contenu' => $_POST['contenu'], 'captcha' => $_POST['captcha'], 'nom' => $_POST['nom'], 'code_cap' => ''), $msg_error); } else { inc_lib('mail/email_contact'); if (email_contact($_POST['mail'], $_POST['pseudo'], $_POST['nom'], '[Contact] ' . $_POST['sujet'], $_POST['contenu'], get_ip())) { redir(Nw::$lang['contact']['redir_ok'], true, 'contact.html'); } } } else { display_form(array('pseudo' => is_logged_in() ? Nw::$dn_mbr['u_pseudo'] : '', 'mail' => is_logged_in() ? Nw::$dn_mbr['u_email'] : '', 'sujet' => '', 'contenu' => '', 'captcha' => '', 'nom' => '', 'code_cap' => '')); } }
$status = skype_status($vol->skypeid); if ($status != $vol->status) { $vol->status = $status; $vol->last_check = time(); if (online($vol->status)) { $vol->last_online = time(); } vol_update_status($vol); } $image = button_image($status); echo "\n <script type=\"text/javascript\" src=\"http://download.skype.com/share/skypebuttons/js/skypeCheck.js\"></script>\n <img src=images/help/{$image}><p>\n "; echo "<table class=box cellpadding=8 width=100%><tr><td width=40%>"; if (online($status)) { live_contact($vol); } } skype_call_button($vol); email_contact($vol); echo "</td></tr></table><p>\n"; echo "<table class=box cellpadding=8 width=100%><tr><td>"; $rating = rating_vol_auth($vol->id, $uid); if (!$rating) { $rating = new StdClass(); $rating->rating = -1; $rating->comment = ""; } show_rating($vol, $rating); echo "</td></tr></table>\n"; page_tail(); } }