|
@@ -8,6 +8,8 @@ Lib::loadClass('Request');
|
|
|
// index.php?_route=UrlAction_BiAuditRaport - uruchamia defaultAction
|
|
|
class RouteTool_Bocian extends RouteToolBase {
|
|
|
|
|
|
+public static $helpEmailTo = 'dariusz@yellowgroup.pl';
|
|
|
+
|
|
|
public static $FIELD_LIST_PRACOWNICY = [
|
|
|
'ID',
|
|
|
'imiona',
|
|
@@ -52,7 +54,78 @@ class RouteTool_Bocian extends RouteToolBase {
|
|
|
'uwagi',
|
|
|
];
|
|
|
|
|
|
+/**
|
|
|
+ * View Page About Project
|
|
|
+ */
|
|
|
+ public function aboutAction() {
|
|
|
+ UI::gora();
|
|
|
+ echo UI::h('script', ['src'=>"static/sweetalert2.min.js"]);
|
|
|
+ echo UI::h('link', ['rel'=>"stylesheet", 'type'=>"text/css", 'href'=>"static/sweetalert2.min.css"]);
|
|
|
+ Theme::top();
|
|
|
+ include('page-about.view.php');
|
|
|
+ UI::dol();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * View Page training
|
|
|
+ */
|
|
|
+ public function trainingAction() {
|
|
|
+ UI::gora();
|
|
|
+ echo UI::h('script', ['src'=>"static/sweetalert2.min.js"]);
|
|
|
+ echo UI::h('link', ['rel'=>"stylesheet", 'type'=>"text/css", 'href'=>"static/sweetalert2.min.css"]);
|
|
|
+ Theme::top();
|
|
|
+ include('page-training.view.php');
|
|
|
+ UI::dol();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * View Page Help form
|
|
|
+ */
|
|
|
+ public function helpFormAction() {
|
|
|
+ UI::gora();
|
|
|
+ echo UI::h('script', ['src'=>"static/sweetalert2.min.js"]);
|
|
|
+ echo UI::h('link', ['rel'=>"stylesheet", 'type'=>"text/css", 'href'=>"static/sweetalert2.min.css"]);
|
|
|
+ Theme::top();
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ $responseSendMail = false;
|
|
|
+ if( V::get('button_send', 0, $_POST) != '' ){
|
|
|
+ print V::get('button_send', '1', $_POST); print "|";
|
|
|
+ // fields form
|
|
|
+ $helpEmail = htmlentities(V::get('help_email', 0, $_POST));
|
|
|
+ $helpDescription = htmlentities(V::get('help_description', 0, $_POST));
|
|
|
+
|
|
|
+
|
|
|
+ if ( empty($helpDescription) && !filter_var($helpEmail, FILTER_VALIDATE_EMAIL)) {
|
|
|
+ throw new Exception("Błąd! Wypełnij wszystkie pola");
|
|
|
+ }
|
|
|
+
|
|
|
+ $to = self::$helpEmailTo; // uzupełnić mail
|
|
|
+ $subject = 'Bocian - formularz pomocy';
|
|
|
+ $message = "E-mail: " . $helpEmail . ". \r\n Treść wiadomości:\r\n " . $helpDescription;
|
|
|
+ $headers = 'From: '. self::$helpEmailTo . "\r\n" .
|
|
|
+ 'Reply-To: '. self::$helpEmailTo . "\r\n" .
|
|
|
+ 'X-Mailer: PHP/' . phpversion();
|
|
|
+
|
|
|
+ $sendMail = mail($to, $subject, $message, $headers);
|
|
|
+
|
|
|
+ if( $sendMailResponse == true ) {
|
|
|
+ $responseSendMail = true;
|
|
|
+ } else {
|
|
|
+ //throw new Exception("Błąd! Wystąpił błąd podczas wysyłania.");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ include('page-help.view.php');
|
|
|
+ UI::dol();
|
|
|
+ }
|
|
|
+
|
|
|
public function defaultAction() {
|
|
|
+
|
|
|
UI::gora();
|
|
|
echo UI::h('script', ['src'=>"static/sweetalert2.min.js"]);
|
|
|
echo UI::h('link', ['rel'=>"stylesheet", 'type'=>"text/css", 'href'=>"static/sweetalert2.min.css"]);
|