"; $html.="Adres e-mail: ".$_POST['email']."
"; $html.="Telefon: ".$_POST['phone']."

"; $html.="Wiadomość:\n".$_POST['message']."
"; $mail = new PHPMailer(); $mail->IsSMTP(); try { //$mail->SMTPDebug = 2; $mail->Host = $cfg_smpt_host; $mail->SMTPAuth = true; if($cfg_smpt_ssl==1) $mail->SMTPSecure = "ssl"; $mail->Host = $cfg_smpt_host; $mail->Port = $cfg_smpt_port; $mail->Username = $cfg_smpt_user; $mail->Password = $cfg_smpt_pass; $mail->SetFrom($cfg_smpt_user, $cfg_strona); $mail->AddReplyTo($_POST['email'], $_POST['name']); $mail->AddAddress($cfg_email, $cfg_strona); $mail->Subject="Nowa wiadomość wysłana z serwisu ".$_SERVER['HTTP_HOST']; $mail->AltBody="Aby przeczytać wiadomość, otwórz ją programem pocztowym w formacie HTML."; $mail->MsgHTML(szablon($html)); $mail->Send(); } catch (phpmailerException $e) { echo $e->errorMessage(); } catch (Exception $e) { echo $e->getMessage(); } sql_disconnect(); redirect(($lang!="pl"?"/".$lang:"")."/potwierdzenie-wyslania"); } } if(!isset($_GET['url']) && !strlen($_GET['url'])) list($id, $p_name, $p_keywords, $p_description, $p_szablon, $p_auth)=sql_fetch_list("SELECT id, name, keywords, description, id_template, auth FROM cms_pages_".quote($lang)." WHERE sg=1 AND id_dir=0 LIMIT 1"); elseif(isset($_GET['url']) && strlen($_GET['url'])) list($id, $p_name, $p_keywords, $p_description, $p_szablon, $p_auth)=sql_fetch_list("SELECT id, name, keywords, description, id_template, auth FROM cms_pages_".quote($lang)." WHERE url LIKE '".quote($_GET['url'])."'"); if($p_szablon>0) list($p_id, $p_title)=sql_fetch_list("SELECT id, title FROM cms_szablon WHERE lang LIKE '".quote($lang)."' AND id=".(int)$p_szablon); else list($p_id, $p_title)=sql_fetch_list("SELECT id, title FROM cms_szablon WHERE lang LIKE '".quote($lang)."' AND akt=1"); if(!isset($p_id)) { ?> SparroCMS Błąd SparroCMS: Brak zdefiniowanego szablonu dla wybranej wersji językowej. $v) { list($id_strony)=sql_fetch_list("SELECT id FROM cms_pages_".quote($lang)." WHERE id_dir=0 AND name='strona.mod".quote($v)."'"); if(strlen($id_strony)) $strona['mod'.$v]=prepare_page($id_strony); } if(sizeof($strona)) $smarty->assign("strona", $strona); } $template=array( "title"=>$p_name.(strlen($p_title)?" - ".$p_title:""), "keywords"=>$p_keywords, "description"=>$p_description, ); $page_url="http://".PAGE_URL."/".$p_url; $smarty->assign("template", $template); $smarty->assign("header", stripslashes($p_name)); $smarty->assign("page", dlg_cmsPage($id, $lang)); $smarty->assign("css", "/templates/style".$p_id.".css"); $smarty->assign("menu", dlg_menu(1, $lang)); $smarty->assign("menu2", dlg_cmsPage(24, $lang)); $smarty->assign("mmenu", dlg_mmenu(1, $lang)); $smarty->assign("slider", dlg_cmsSlider($lang)); $smarty->assign("cfgAddress", $cfg_adres."
".$cfg_kodp." ".$cfg_miasto); $smarty->assign("cfgAddress_top", $cfg_adres.", ".$cfg_kodp." ".$cfg_miasto); $smarty->assign("cfgEmail", $cfg_email); $cfg_email=explode("@", $cfg_email); $smarty->assign("cfgEmail_a", $cfg_email[0]); $smarty->assign("cfgEmail_b", $cfg_email[1]); $smarty->assign("cfgPhone", $cfg_tel); $smarty->assign("googleAnalytics", googleAnalytics()); $smarty->assign("cookie", cookie()); $smarty->display("szablon".$p_id.".htm"); sql_disconnect(); ?>