diff --git a/cadline/modules/modules/mod_al_applications/assets/css/images/index.html b/cadline/modules/modules/mod_al_applications/assets/css/images/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_al_applications/assets/css/images/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_al_applications/assets/css/index.html b/cadline/modules/modules/mod_al_applications/assets/css/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_al_applications/assets/css/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_al_applications/assets/css/style.css b/cadline/modules/modules/mod_al_applications/assets/css/style.css
new file mode 100644
index 00000000..fab965fe
--- /dev/null
+++ b/cadline/modules/modules/mod_al_applications/assets/css/style.css
@@ -0,0 +1,10 @@
+.past { background-color:#e6a8a8; opacity: 0.7; }
+.present { background-color:#ffffff; border:2px solid #155215; }
+.future { background-color:#71bf73; opacity: 0.9; }
+.mb25 { margin-bottom:25px; }
+.cimke { font-size: 90% !important;font-weight:bold !important; }
+
+#alapplicationsContainer .controlls {margin-top:15px;}
+#alapplicationsContainer a, #alapplicationsContainer a:hover {font-weight:bold;}
+#alapplicationsContainer .past a, #alapplicationsContainer .future a {color:#003060;}
+#alapplicationsContainer .past a:hover, #alapplicationsContainer .future a:hover {color:#ffffff;}
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_al_applications/assets/index.html b/cadline/modules/modules/mod_al_applications/assets/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_al_applications/assets/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_al_applications/assets/js/index.html b/cadline/modules/modules/mod_al_applications/assets/js/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_al_applications/assets/js/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_al_applications/assets/js/script.js b/cadline/modules/modules/mod_al_applications/assets/js/script.js
new file mode 100644
index 00000000..e69de29b
diff --git a/cadline/modules/modules/mod_al_applications/helper.php b/cadline/modules/modules/mod_al_applications/helper.php
new file mode 100644
index 00000000..d8ee1839
--- /dev/null
+++ b/cadline/modules/modules/mod_al_applications/helper.php
@@ -0,0 +1,127 @@
+setQuery("SELECT a.*,c.title,c.`price`,c.`min_attend`,c.`capacity`,c.`location`,c.`start_date`,c.`finish_date`,c.`start_time`,c.`finish_time`,s.`path` AS `path`,s.`alias` AS `alias`,s.`gepet_kerek` AS `s_gepet_kerek`,s.`berletem_van` AS `s_berletem_van`
+ FROM `alworkshops_application` a
+ LEFT OUTER JOIN `alworkshops_courses` c ON a.`course_id`=c.`id`
+ LEFT OUTER JOIN `alworkshops_switch` s ON c.`alias`=s.`alias`
+ WHERE s.`tanfsor` IS NULL AND c.`title` IS NOT NULL AND a.`published`='Y' AND a.`user_id`=" . JFactory::getUser()->id . "
+ ORDER BY c.start_date DESC;");
+ $result = $db->loadObjectList();
+ return (count($result) ? $result : array());
+ }
+
+ public static function getCourseSessions($course_id = 0)
+ {
+ if ((int)$course_id == 0) return;
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query->select(array('s.*'));
+ $query->from($db->quoteName('www_archline_hu.alworkshops_sessions', 's'));
+ $query->where($db->quoteName('s.courseid') . ' = ' . $db->quote($course_id));
+ $query->where($db->quoteName('s.published') . ' = ' . $db->quote('Y'));
+ $query->order('s.ordering ASC');
+
+ $db->setQuery($query);
+
+ $result = $db->loadObjectList();
+ return (count($result) ? $result : array());
+ }
+
+ public static function getPublishedApplication($course_id = 0)
+ {
+ if ((int)$course_id == 0) return;
+ $user = JFactory::getUser();
+ $result = FALSE;
+
+ if ((int)$user->id > 0) {
+ $db = JFactory::getDbo();
+ $db->setQuery("SELECT a.*,c.`title`
+ FROM `alworkshops_application` a
+ LEFT OUTER JOIN `alworkshops_courses` c ON a.course_id=c.id
+ WHERE a.`course_id`=" . (int)$course_id . " AND a.`user_id`=" . (int)$user->id . " AND a.`published`='Y';");
+ $result = $db->loadObjectList();
+ }
+ return (count($result) ? $result : FALSE);
+ }
+
+ public static function unPublishApplication($course_id = 0)
+ {
+ if ((int)$course_id == 0) return;
+ $user = JFactory::getUser();
+ $db = JFactory::getDbo();
+ $db->setQuery("UPDATE `alworkshops_application` SET `published`='N' WHERE `course_id`=" . (int)$course_id . " AND `user_id`=" . (int)$user->id . " AND `published`='Y' LIMIT 1;");
+ $db->execute();
+ return;
+ }
+
+ public static function getCourseTable($fields = "*")
+ {
+ $db = JFactory::getDbo();
+ $db->setQuery("SELECT s." . $fields . ",c.`title`
+ FROM `alworkshops_switch` s
+ LEFT OUTER JOIN (SELECT DISTINCT(title) AS `title`,`alias` FROM `alworkshops_courses`) c ON s.`alias`=c.`alias`
+ WHERE s.tanfsor>0 AND s.lang='" . self::getLang() . "' AND s.vizsga = 'Y' ORDER BY s.tanfsor ASC,s.level ASC;");
+ $result = $db->loadObjectList();
+ return (count($result) ? $result : array());
+ }
+
+ public static function getNextWorkshop($alias = "")
+ {
+ if ($alias == "") return (FALSE);
+
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query->select(array('c.*'));
+ $query->from($db->quoteName('www_archline_hu.alworkshops_courses', 'c'));
+ $query->where($db->quoteName('c.start_date') . ' >= ' . 'CURRENT_DATE');
+ $query->where($db->quoteName('c.alias') . ' = ' . $db->quote($alias));
+ $query->where($db->quoteName('c.published') . ' = ' . $db->quote('Y'));
+ $query->order('s.start_date ASC');
+
+ $db->setQuery($query);
+
+ $result = $db->loadObjectList();
+ return (count($result) ? $result[0] : FALSE);
+ }
+
+ public static function getNextWorkshopString($alias = "")
+ {
+ if ($alias == "") return (FALSE);
+ $res = self::getNextWorkshop($alias);
+ return ($res ? $res->start_date : JText::_('MOD_ALAPPLICATIONS_NODATE'));
+ }
+
+ public static function getWorkshopApplications($userid = 0, $switchid = 0)
+ {
+ if ((int)$userid === 0) return (array());
+
+ $db = JFactory::getDbo();
+ $db->setQuery("SELECT c.id as course_id,c.alias,c.start_date,c.finish_date,s.workshop,s.kurzus,
+ IF(sess.switchid IS NULL,s.id,sess.switchid) AS switchid,
+ IF(sess.session_date IS NULL,c.start_date,sess.session_date) AS session_date,
+ IF(sess.description IS NULL,c.title,sess.description) AS description
+ FROM www_archline_hu.alworkshops_courses c
+ LEFT OUTER JOIN www_archline_hu.alworkshops_switch s ON c.alias=s.alias
+ LEFT OUTER JOIN www_archline_hu.alworkshops_sessions sess ON c.id=sess.courseid
+ WHERE " . ((int)$switchid > 0 ? " (s.id=" . (int)$switchid . " OR sess.switchid=" . (int)$switchid . ") AND " : "") . "
+ c.id IN (SELECT course_id FROM www_archline_hu.alworkshops_application WHERE user_id=" . (int)$userid . " AND published='Y');");
+ $result = $db->loadObjectList();
+ return (count($result) ? $result : array());
+ }
+
+
+ public static function getLang()
+ {
+ return (JFactory::getLanguage()->getTag() == 'hu-HU' ? "hun" : "eng");
+ }
+}
diff --git a/cadline/modules/modules/mod_al_applications/index.html b/cadline/modules/modules/mod_al_applications/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_al_applications/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_al_applications/language/en-GB/en-GB.mod_al_applications.ini b/cadline/modules/modules/mod_al_applications/language/en-GB/en-GB.mod_al_applications.ini
new file mode 100644
index 00000000..9553f5c6
--- /dev/null
+++ b/cadline/modules/modules/mod_al_applications/language/en-GB/en-GB.mod_al_applications.ini
@@ -0,0 +1,4 @@
+MOD_ARCHLINE_APPLICATIONS_MODULE="ARCHLine Applications Module"
+MOD_ARCHLINE_APPLICATIONS_MODULE_DESCRIPTION="ARCHLine Applications Module"
+MOD_ALAPPLICATIONS_MUST_LOGIN="You must login to see the list"
+MOD_ALAPPLICATIONS_APPLICATION="Applications"
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_al_applications/language/en-GB/en-GB.mod_al_applications.sys.ini b/cadline/modules/modules/mod_al_applications/language/en-GB/en-GB.mod_al_applications.sys.ini
new file mode 100644
index 00000000..43ec9c20
--- /dev/null
+++ b/cadline/modules/modules/mod_al_applications/language/en-GB/en-GB.mod_al_applications.sys.ini
@@ -0,0 +1,2 @@
+MOD_ARCHLINE_APPLICATIONS_MODULE="ARCHLine Applications Module"
+MOD_ARCHLINE_APPLICATIONS_MODULE_DESCRIPTION="ARCHLine Applications Module"
diff --git a/cadline/modules/modules/mod_al_applications/language/hu-HU/hu-HU.mod_al_applications.ini b/cadline/modules/modules/mod_al_applications/language/hu-HU/hu-HU.mod_al_applications.ini
new file mode 100644
index 00000000..976cbdb6
--- /dev/null
+++ b/cadline/modules/modules/mod_al_applications/language/hu-HU/hu-HU.mod_al_applications.ini
@@ -0,0 +1,4 @@
+MOD_ARCHLINE_APPLICATIONS_MODULE="ARCHLine Applications Module"
+MOD_ARCHLINE_APPLICATIONS_MODULE_DESCRIPTION="ARCHLine Applications Module"
+MOD_ALAPPLICATIONS_MUST_LOGIN="A jelentkezések megtekintéséhez jelentkezz be"
+MOD_ALAPPLICATIONS_APPLICATION="Jelentkezések"
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_al_applications/language/hu-HU/hu-HU.mod_al_applications.sys.ini b/cadline/modules/modules/mod_al_applications/language/hu-HU/hu-HU.mod_al_applications.sys.ini
new file mode 100644
index 00000000..43ec9c20
--- /dev/null
+++ b/cadline/modules/modules/mod_al_applications/language/hu-HU/hu-HU.mod_al_applications.sys.ini
@@ -0,0 +1,2 @@
+MOD_ARCHLINE_APPLICATIONS_MODULE="ARCHLine Applications Module"
+MOD_ARCHLINE_APPLICATIONS_MODULE_DESCRIPTION="ARCHLine Applications Module"
diff --git a/cadline/modules/modules/mod_al_applications/mod_al_applications.php b/cadline/modules/modules/mod_al_applications/mod_al_applications.php
new file mode 100644
index 00000000..f19255a2
--- /dev/null
+++ b/cadline/modules/modules/mod_al_applications/mod_al_applications.php
@@ -0,0 +1,32 @@
+addStyleSheet("/modules/mod_al_applications/assets/css/style.css");
+$doc->addScript("/modules/mod_al_applications/assets/js/script.js");
+
+$_POST['course_id'] = isset($_POST['course_id']) ? $_POST['course_id'] : 0;
+
+if (isset($_POST) && (int)$_POST['course_id'] > 0) {
+ $app = JFactory::getApplication();
+ $input = $app->input;
+ $course_id = $input->get('course_id', '', 'int');
+
+ $application = ModAlapplicationsHelper::getPublishedApplication($course_id);
+ if ($application) {
+ ModAlapplicationsHelper::unPublishApplication($course_id);
+ JFactory::getApplication()->enqueueMessage(JText::_(MOD_ALAPPLICATIONS_UNPUBLISHED) . ": " . $application[0]->title, 'message');
+ }
+}
+
+$applications = ModAlapplicationsHelper::getOtherApplications();
+$level = array(
+ 1 => JText::_('MOD_ALAPPLICATIONS_PRELIMINARY'),
+ 2 => JText::_('MOD_ALAPPLICATIONS_INTERMEDIATE'),
+ 3 => JText::_('MOD_ALAPPLICATIONS_TUTOR_EXAM'),
+ 4 => JText::_('MOD_ALAPPLICATIONS_ADVANCED')
+);
+
+require JModuleHelper::getLayoutPath('mod_al_applications', $params->get('layout', 'default'));
diff --git a/cadline/modules/modules/mod_al_applications/mod_al_applications.xml b/cadline/modules/modules/mod_al_applications/mod_al_applications.xml
new file mode 100644
index 00000000..2e182d4e
--- /dev/null
+++ b/cadline/modules/modules/mod_al_applications/mod_al_applications.xml
@@ -0,0 +1,49 @@
+
+
+
+ MOD_ARCHLINE_APPLICATIONS_MODULE
+ Nov 2017
+ Zsolt Fekete
+ mcleod78@gmail.com
+ https://www.facbook.com/mcleod78
+ Copyright © 2017 - All rights reserved.
+ GNU General Public License v2.0
+ 0.0.1
+ MOD_ARCHLINE_APPLICATIONS_MODULE_DESCRIPTION
+
+ mod_al_applications.php
+ mod_al_applications.xml
+ helper.php
+ index.html
+ language
+ tmpl
+ assets
+
+
+
+
+
+
+
+
+
+
+ JGLOBAL_USE_GLOBAL
+ COM_MODULES_FIELD_VALUE_NOCACHING
+
+
+
+
+
+
+
+
+
+
+
+ en-GB/en-GB.mod_al_applications.sys.ini
+ en-GB/en-GB.mod_al_applications.ini
+ hu-HU/hu-HU.mod_al_applications.sys.ini
+ hu-HU/hu-HU.mod_al_applications.ini
+
+
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_al_applications/tmpl/default.php b/cadline/modules/modules/mod_al_applications/tmpl/default.php
new file mode 100644
index 00000000..70713677
--- /dev/null
+++ b/cadline/modules/modules/mod_al_applications/tmpl/default.php
@@ -0,0 +1,104 @@
+id, false);
+?>
+
+id == 0) : ?>
+
+ = JText::_('MOD_ALAPPLICATIONS_MUST_LOGIN') ?>
+ = JModuleHelper::renderModule(JModuleHelper::getModule('login', 'Felhasználó - Workshop Bejelentkezés')) ?>
+
+
+
+
+
+
+ $ws) : ?>
+ level == 3 && !in_array(18, $groups)) continue; ?>
+ 0 && $tanfolyam[$k - 1]->level != $tanfolyam[$k]->level)) : ?>
+
+ 0) : ?>
+
+
+
+
+
+
+
+
+
= $ws->title ?>
+
+
+
+
= JText::_('MOD_ALAPPLICATIONS_SIGNED') ?>
+
= JText::_('MOD_ALAPPLICATIONS_CHANGE') ?>
+
+
+
+
+ id, $ws->id); ?>
+
+
+
+
+ session_date < date('Y-m-d')) $class = "danger";
+ if ($wsapp->session_date <= date('Y-m-d') && $application->finish_date >= date('Y-m-d')) $class = "info";
+ if ($wsapp->session_date > date('Y-m-d')) $class = "success"; ?>
+ = $wsapp->session_date ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_al_applications/tmpl/index.html b/cadline/modules/modules/mod_al_applications/tmpl/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_al_applications/tmpl/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_al_login/helper.php b/cadline/modules/modules/mod_al_login/helper.php
new file mode 100644
index 00000000..1e2b3e68
--- /dev/null
+++ b/cadline/modules/modules/mod_al_login/helper.php
@@ -0,0 +1,75 @@
+getMenu()->getItem($params->get($type));
+
+ // Stay on the same page
+ $url = JUri::getInstance()->toString();
+
+ if ($item)
+ {
+ $lang = '';
+
+ if ($item->language !== '*' && JLanguageMultilang::isEnabled())
+ {
+ $lang = '&lang=' . $item->language;
+ }
+
+ $url = 'index.php?Itemid=' . $item->id . $lang;
+ }
+
+ return base64_encode($url);
+ }
+
+ /**
+ * Returns the current users type
+ *
+ * @return string
+ */
+ public static function getType()
+ {
+ $user = JFactory::getUser();
+
+ return (!$user->get('guest')) ? 'logout' : 'login';
+ }
+
+ /**
+ * Get list of available two factor methods
+ *
+ * @return array
+ *
+ * @deprecated 4.0 Use JAuthenticationHelper::getTwoFactorMethods() instead.
+ */
+ public static function getTwoFactorMethods()
+ {
+ JLog::add(__METHOD__ . ' is deprecated, use JAuthenticationHelper::getTwoFactorMethods() instead.', JLog::WARNING, 'deprecated');
+
+ return JAuthenticationHelper::getTwoFactorMethods();
+ }
+}
diff --git a/cadline/modules/modules/mod_al_login/index.html b/cadline/modules/modules/mod_al_login/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_al_login/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_al_login/mod_al_login.php b/cadline/modules/modules/mod_al_login/mod_al_login.php
new file mode 100644
index 00000000..1f0606d5
--- /dev/null
+++ b/cadline/modules/modules/mod_al_login/mod_al_login.php
@@ -0,0 +1,33 @@
+def('greeting', 1);
+
+$type = ModLoginHelper::getType();
+$return = ModLoginHelper::getReturnUrl($params, $type);
+$twofactormethods = JAuthenticationHelper::getTwoFactorMethods();
+$user = JFactory::getUser();
+$layout = $params->get('layout', 'default');
+
+// Logged users must load the logout sublayout
+if (!$user->guest)
+{
+ $layout .= '_logout';
+}
+
+require JModuleHelper::getLayoutPath('mod_al_login', $layout);
+
+$app = JFactory::getApplication();
+$user_id = $user->get('id');
+$app->logout( $user_id );
diff --git a/cadline/modules/modules/mod_al_login/mod_al_login.xml b/cadline/modules/modules/mod_al_login/mod_al_login.xml
new file mode 100644
index 00000000..27cf6bb7
--- /dev/null
+++ b/cadline/modules/modules/mod_al_login/mod_al_login.xml
@@ -0,0 +1,21 @@
+
+
+ AL Login
+ Nagy Máté
+ 1.0.0
+ Login into ARCHLine
+
+ mod_al_login.xml
+ mod_al_login.php
+ index.html
+ helper.php
+ tmpl/default.php
+ tmpl/index.html
+
+
+ en-GB.mod_al_login.ini
+ en-GB.mod_al_login.sys.ini
+
+
+
+
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_al_login/tmpl/default.php b/cadline/modules/modules/mod_al_login/tmpl/default.php
new file mode 100644
index 00000000..5feaeca0
--- /dev/null
+++ b/cadline/modules/modules/mod_al_login/tmpl/default.php
@@ -0,0 +1,124 @@
+
+
diff --git a/cadline/modules/modules/mod_al_login/tmpl/index.html b/cadline/modules/modules/mod_al_login/tmpl/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_al_login/tmpl/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_al_newsletter/helper.php b/cadline/modules/modules/mod_al_newsletter/helper.php
new file mode 100644
index 00000000..b97c0706
--- /dev/null
+++ b/cadline/modules/modules/mod_al_newsletter/helper.php
@@ -0,0 +1,87 @@
+getQuery(true);
+
+ $query->select(array('e.*'));
+ $query->from($db->quoteName('cl_hlusers.u_emails', 'e'));
+ $query->where($db->quoteName('e.email') . ' = ' . $db->quote($email));
+
+ // Reset the query using our newly populated query object.
+ $db->setQuery($query);
+
+ // Load the results as a list of stdClass objects (see later for more options on retrieving data).
+ $existingUser = $db->loadObject();
+
+ if (!empty($existingUser)) {
+ if ($existingUser->newsletter == 1)
+ return true;
+
+ $db->getQuery(true);
+ $query = "UPDATE cl_hlusers.u_emails SET newsletter = 1 WHERE u_emails_id = '{$existingUser->u_emails_id}'";
+ $db->setQuery($query);
+ $db->execute();
+
+ return true;
+ }
+
+ $old_db = (JFactory::getLanguage()->getTag() == 'hu-HU' ? "clusers" : "clusers_eng");
+ $ctrID = (JFactory::getLanguage()->getTag() == 'hu-HU' ? 36 : 0);
+
+ if ($phone != '') {
+ $phone = str_replace('-', '', $phone);
+ $phone = str_replace(' ', '', $phone);
+ $phone = str_replace('+', '', $phone);
+ $phone = str_replace('/', '', $phone);
+ $phone = str_replace('.', '', $phone);
+ $phone = str_replace(' ', '', $phone);
+ }
+
+ $user = new stdClass();
+ $user->strName = $name;
+ $user->strEMail = $email;
+ $user->nUserType = 0;
+ $user->nUserStatus = 0;
+ $user->nUserProf = 0;
+ $user->old_db = $old_db;
+ $user->nSchoolID = 0;
+ $user->nCtrID = $ctrID;
+ $user->strTel = $phone;
+ $user->nCtrID = $cntr;
+ $user->nUserProf = $prof;
+
+ JFactory::getDbo()->insertObject('cl_hlusers.users', $user);
+
+ $nUserID = $db->insertid();
+
+ $history = new stdClass();
+ $history->nUserID = $nUserID;
+ $history->nTopicID = (JFactory::getLanguage()->getTag() == 'hu-HU' ? 38 : 150);
+ $history->dateEvent = date('Y-m-d');
+ $history->insertDate = date('Y-m-d H:i:s');
+ $history->strPlace = 'web';
+ $history->nManagerID = 36;
+
+ JFactory::getDbo()->insertObject('cl_hlusers.u_history', $history);
+
+ $emails = new stdClass();
+ $emails->email = $email;
+ $emails->nUserID = $nUserID;
+ $emails->default = 1;
+ $emails->active = 1;
+ $emails->deleted = 0;
+ $emails->newsletter = 1;
+
+ JFactory::getDbo()->insertObject('cl_hlusers.u_emails', $emails);
+
+ return true;
+ }
+}
diff --git a/cadline/modules/modules/mod_al_newsletter/index.html b/cadline/modules/modules/mod_al_newsletter/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_al_newsletter/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_al_newsletter/language/de-DE/de-DE.mod_al_newsletter.ini b/cadline/modules/modules/mod_al_newsletter/language/de-DE/de-DE.mod_al_newsletter.ini
new file mode 100644
index 00000000..eb757046
--- /dev/null
+++ b/cadline/modules/modules/mod_al_newsletter/language/de-DE/de-DE.mod_al_newsletter.ini
@@ -0,0 +1,10 @@
+MOD_AL_NEWSLETTER_SUBSCRIBE_HEADER="Jetzt unseren wöchentlichen Newsletter abonnieren!"
+MOD_AL_NEWSLETTER_SUBSCRIBE_TEXT="Werden Sie Mitglied in unserer Community und erhalten Sie die neuesten Tutorials, Angebote und Nachrichten direkt per E-Mail."
+MOD_AL_NEWSLETTER_NAME="Name"
+MOD_AL_NEWSLETTER_NAME_PLACEHOLDER="Your name"
+MOD_AL_NEWSLETTER_EMAIL="Email"
+MOD_AL_NEWSLETTER_EMAIL_PLACEHOLDER="E-mail Adresse"
+MOD_AL_NEWSLETTER_SUBSCRIBE_BTN="Abonnieren"
+MOD_AL_NEWSLETTER_DONE="Danke für Ihr Abonnement"
+MOD_AL_NEWSLETTER_PHONE="Telefonnummer"
+MOD_AL_NEWSLETTER_PHONE_DESC="Telefonnummer"
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_al_newsletter/language/de-DE/de-DE.mod_al_newsletter.sys.ini b/cadline/modules/modules/mod_al_newsletter/language/de-DE/de-DE.mod_al_newsletter.sys.ini
new file mode 100644
index 00000000..0ed85c5d
--- /dev/null
+++ b/cadline/modules/modules/mod_al_newsletter/language/de-DE/de-DE.mod_al_newsletter.sys.ini
@@ -0,0 +1,7 @@
+MOD_AL_NEWSLETTER_SUBSCRIBE_HEADER="GET OUR NEWSLETTER"
+MOD_AL_NEWSLETTER_SUBSCRIBE_TEXT="Want the latest and greatest from our blog straight to your inbox? Chucks us your details and get a sweet weekly email."
+MOD_AL_NEWSLETTER_NAME="Name"
+MOD_AL_NEWSLETTER_NAME_PLACEHOLDER="Your name"
+MOD_AL_NEWSLETTER_EMAIL="Email"
+MOD_AL_NEWSLETTER_EMAIL_PLACEHOLDER="Your email address"
+MOD_AL_NEWSLETTER_SUBSCRIBE_BTN="Subscribe"
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_al_newsletter/language/en-GB/en-GB.mod_al_newsletter.ini b/cadline/modules/modules/mod_al_newsletter/language/en-GB/en-GB.mod_al_newsletter.ini
new file mode 100644
index 00000000..fe9db881
--- /dev/null
+++ b/cadline/modules/modules/mod_al_newsletter/language/en-GB/en-GB.mod_al_newsletter.ini
@@ -0,0 +1,8 @@
+MOD_AL_NEWSLETTER_SUBSCRIBE_HEADER="Subscribe to our weekly newsletter!"
+MOD_AL_NEWSLETTER_SUBSCRIBE_TEXT="Join our community to get the latest tutorials, offers and news delivered directly in your inbox."
+MOD_AL_NEWSLETTER_NAME="Name"
+MOD_AL_NEWSLETTER_NAME_PLACEHOLDER="Your name"
+MOD_AL_NEWSLETTER_EMAIL="Email"
+MOD_AL_NEWSLETTER_EMAIL_PLACEHOLDER="Your email address"
+MOD_AL_NEWSLETTER_SUBSCRIBE_BTN="Subscribe"
+MOD_AL_NEWSLETTER_DONE="Thank you for subscribing"
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_al_newsletter/language/en-GB/en-GB.mod_al_newsletter.sys.ini b/cadline/modules/modules/mod_al_newsletter/language/en-GB/en-GB.mod_al_newsletter.sys.ini
new file mode 100644
index 00000000..0ed85c5d
--- /dev/null
+++ b/cadline/modules/modules/mod_al_newsletter/language/en-GB/en-GB.mod_al_newsletter.sys.ini
@@ -0,0 +1,7 @@
+MOD_AL_NEWSLETTER_SUBSCRIBE_HEADER="GET OUR NEWSLETTER"
+MOD_AL_NEWSLETTER_SUBSCRIBE_TEXT="Want the latest and greatest from our blog straight to your inbox? Chucks us your details and get a sweet weekly email."
+MOD_AL_NEWSLETTER_NAME="Name"
+MOD_AL_NEWSLETTER_NAME_PLACEHOLDER="Your name"
+MOD_AL_NEWSLETTER_EMAIL="Email"
+MOD_AL_NEWSLETTER_EMAIL_PLACEHOLDER="Your email address"
+MOD_AL_NEWSLETTER_SUBSCRIBE_BTN="Subscribe"
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_al_newsletter/language/hu-HU/hu-HU.mod_al_newsletter.ini b/cadline/modules/modules/mod_al_newsletter/language/hu-HU/hu-HU.mod_al_newsletter.ini
new file mode 100644
index 00000000..dbc04238
--- /dev/null
+++ b/cadline/modules/modules/mod_al_newsletter/language/hu-HU/hu-HU.mod_al_newsletter.ini
@@ -0,0 +1,10 @@
+MOD_AL_NEWSLETTER_SUBSCRIBE_HEADER="Iratkozz fel heti hírlevelünkre!"
+MOD_AL_NEWSLETTER_SUBSCRIBE_TEXT="Csatlakozz az ARCHLine.XP közösségéhez, értesülj elsők között oktatóvideóinkról, akcióinkről és híreinkről! "
+MOD_AL_NEWSLETTER_NAME="Név"
+MOD_AL_NEWSLETTER_NAME_PLACEHOLDER="Név"
+MOD_AL_NEWSLETTER_EMAIL="Email"
+MOD_AL_NEWSLETTER_EMAIL_PLACEHOLDER="Email"
+MOD_AL_NEWSLETTER_SUBSCRIBE_BTN="Feliratkozom"
+MOD_AL_NEWSLETTER_DONE="Köszönjük, hogy feliratkozott hírlevelünkre"
+MOD_AL_NEWSLETTER_PHONE="Telefonszám"
+MOD_AL_NEWSLETTER_PHONE_DESC="Telefonszám"
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_al_newsletter/language/hu-HU/hu-HU.mod_al_newsletter.sys.ini b/cadline/modules/modules/mod_al_newsletter/language/hu-HU/hu-HU.mod_al_newsletter.sys.ini
new file mode 100644
index 00000000..243ea56c
--- /dev/null
+++ b/cadline/modules/modules/mod_al_newsletter/language/hu-HU/hu-HU.mod_al_newsletter.sys.ini
@@ -0,0 +1,7 @@
+MOD_AL_NEWSLETTER_SUBSCRIBE_HEADER="Iratkozzon fel hírlevelünkre"
+MOD_AL_NEWSLETTER_SUBSCRIBE_TEXT="Szeretné a legújabb és legjobb híreket blogunkról egyenesen a postaládájába? Elküldi nekünk az adatait, és kap egy kedves heti e-mailt."
+MOD_AL_NEWSLETTER_NAME="Név"
+MOD_AL_NEWSLETTER_NAME_PLACEHOLDER="A neve"
+MOD_AL_NEWSLETTER_EMAIL="Email"
+MOD_AL_NEWSLETTER_EMAIL_PLACEHOLDER="Az email címe"
+MOD_AL_NEWSLETTER_SUBSCRIBE_BTN="Feliratkozás"
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_al_newsletter/mod_al_newsletter.php b/cadline/modules/modules/mod_al_newsletter/mod_al_newsletter.php
new file mode 100644
index 00000000..80d5253a
--- /dev/null
+++ b/cadline/modules/modules/mod_al_newsletter/mod_al_newsletter.php
@@ -0,0 +1,72 @@
+format('c');
+ $ip = $_SERVER['REMOTE_ADDR'];
+ $browser = $_SERVER['HTTP_USER_AGENT'];
+
+ if (isset($_POST['g-recaptcha-response']) && !empty($_POST['g-recaptcha-response'])) {
+ $api_url = 'https://www.google.com/recaptcha/api/siteverify';
+ $resq_data = array(
+ 'secret' => '6Le1o70lAAAAAE125nVz9KQYBX1h2-o5kmlx4tJw',
+ 'response' => $_POST['g-recaptcha-response'],
+ 'remoteip' => $_SERVER['REMOTE_ADDR']
+ );
+
+ $curlConfig = array(
+ CURLOPT_URL => $api_url,
+ CURLOPT_POST => true,
+ CURLOPT_RETURNTRANSFER => true,
+ CURLOPT_POSTFIELDS => $resq_data
+ );
+
+ $ch = curl_init();
+ curl_setopt_array($ch, $curlConfig);
+ $response = curl_exec($ch);
+ curl_close($ch);
+
+ $responseData = json_decode($response);
+
+ if (!$responseData->success) {
+ $log = "{$date} capchaID: 'web-registration-v3' verdict: 'FAILURE' IP: '{$ip}' Browser: '{$browser}'" . PHP_EOL;
+ error_log($log, 3, $_SERVER['DOCUMENT_ROOT'] . '/logs/captchaErrorLog.log');
+
+ $app->enqueueMessage('Captcha failed', 'error');
+ }
+
+ $log = "{$date} capchaID: 'web-registration-v3' verdict: 'SUCCESS' IP: '{$ip}' Browser: '{$browser}'" . PHP_EOL;
+ error_log($log, 3, $_SERVER['DOCUMENT_ROOT'] . '/logs/captchaErrorLog.log');
+
+ $input = $app->input;
+
+ $name = $input->get('name', '', 'string');
+ $email = $input->get('email', '', 'string');
+ $phone = $input->get('phone', '', 'string');
+ $cntr = $input->get('cntr', '', 'int');
+ $prof = $input->get('prof', '', 'int');
+
+ $user = ModAlNewsletterHelper::insertUser($name, $email, $phone, $cntr, $prof);
+
+ unset($_POST['subscribe-newsletter-btn']);
+ unset($_POST['name']);
+ unset($_POST['email']);
+
+ if ($user) {
+ $app->enqueueMessage(JText::_('MOD_AL_NEWSLETTER_DONE'));
+ }
+ } else {
+ $log = "{$date} capchaID: 'web-registration-v3' verdict: 'FAILURE' IP: '{$ip}' Browser: '{$browser}'" . PHP_EOL;
+ error_log($log, 3, $_SERVER['DOCUMENT_ROOT'] . '/logs/captchaErrorLog.log');
+ }
+ }
+}
+
+if ($_GET['Itemid'] != 744 && $_GET['Itemid'] != 745)
+ require JModuleHelper::getLayoutPath('mod_al_newsletter', $params->get('layout', 'default'));
diff --git a/cadline/modules/modules/mod_al_newsletter/mod_al_newsletter.xml b/cadline/modules/modules/mod_al_newsletter/mod_al_newsletter.xml
new file mode 100644
index 00000000..9ab947f6
--- /dev/null
+++ b/cadline/modules/modules/mod_al_newsletter/mod_al_newsletter.xml
@@ -0,0 +1,44 @@
+
+
+ mod_al_newsletter
+ August 2022
+ Nagy Máté
+ mate.nagy@cadline.hu
+ Copyright © 2021 - All rights reserved.
+ 0.0.1
+ Create a newsletter subscription popup modal
+
+ mod_al_newsletter.php
+ mod_al_newsletter.xml
+ index.html
+ helper.php
+ language
+ tmpl
+
+
+
+
+
+
+
+ JGLOBAL_USE_GLOBAL
+ COM_MODULES_FIELD_VALUE_NOCACHING
+
+
+
+
+
+
+
+
+
+
+
+ en-GB/en-GB.mod_al_newsletter.sys.ini
+ en-GB/en-GB.mod_al_newsletter.ini
+ hu-HU/hu-HU.mod_al_newsletter.sys.ini
+ hu-HU/hu-HU.mod_al_newsletter.ini
+ de-DE/de-DE.mod_al_newsletter.sys.ini
+ de-DE/de-DE.mod_al_newsletter.ini
+
+
diff --git a/cadline/modules/modules/mod_al_newsletter/tmpl/default.php b/cadline/modules/modules/mod_al_newsletter/tmpl/default.php
new file mode 100644
index 00000000..34ec330d
--- /dev/null
+++ b/cadline/modules/modules/mod_al_newsletter/tmpl/default.php
@@ -0,0 +1,299 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_al_newsletter/tmpl/index.html b/cadline/modules/modules/mod_al_newsletter/tmpl/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_al_newsletter/tmpl/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_al_upload/helper.php b/cadline/modules/modules/mod_al_upload/helper.php
new file mode 100644
index 00000000..d1800978
--- /dev/null
+++ b/cadline/modules/modules/mod_al_upload/helper.php
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_al_upload/language/en-GB/en-GB.mod_al_upload.ini b/cadline/modules/modules/mod_al_upload/language/en-GB/en-GB.mod_al_upload.ini
new file mode 100644
index 00000000..80071a21
--- /dev/null
+++ b/cadline/modules/modules/mod_al_upload/language/en-GB/en-GB.mod_al_upload.ini
@@ -0,0 +1,4 @@
+MOD_AL_UPLOAD_SUCCESS="Thank you for participating in the poll, your vote was valid.
+Best regards, CadLine Kft."
+MOD_AL_UPLOAD_VOTE="Vote"
+MOD_AL_UPLOAD_VOTE_2="I vote"
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_al_upload/language/en-GB/en-GB.mod_al_upload.sys.ini b/cadline/modules/modules/mod_al_upload/language/en-GB/en-GB.mod_al_upload.sys.ini
new file mode 100644
index 00000000..0ed85c5d
--- /dev/null
+++ b/cadline/modules/modules/mod_al_upload/language/en-GB/en-GB.mod_al_upload.sys.ini
@@ -0,0 +1,7 @@
+MOD_AL_NEWSLETTER_SUBSCRIBE_HEADER="GET OUR NEWSLETTER"
+MOD_AL_NEWSLETTER_SUBSCRIBE_TEXT="Want the latest and greatest from our blog straight to your inbox? Chucks us your details and get a sweet weekly email."
+MOD_AL_NEWSLETTER_NAME="Name"
+MOD_AL_NEWSLETTER_NAME_PLACEHOLDER="Your name"
+MOD_AL_NEWSLETTER_EMAIL="Email"
+MOD_AL_NEWSLETTER_EMAIL_PLACEHOLDER="Your email address"
+MOD_AL_NEWSLETTER_SUBSCRIBE_BTN="Subscribe"
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_al_upload/language/hu-HU/hu-HU.mod_al_upload.ini b/cadline/modules/modules/mod_al_upload/language/hu-HU/hu-HU.mod_al_upload.ini
new file mode 100644
index 00000000..109436c7
--- /dev/null
+++ b/cadline/modules/modules/mod_al_upload/language/hu-HU/hu-HU.mod_al_upload.ini
@@ -0,0 +1,4 @@
+MOD_AL_UPLOAD_SUCCESS="Köszönjük, hogy részt vettél a szavazáson, leadott szavazatod érvényes volt.
+Üdvözlettel, CadLine Kft."
+MOD_AL_UPLOAD_VOTE="Szavazat"
+MOD_AL_UPLOAD_VOTE_2="Szavazok"
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_al_upload/language/hu-HU/hu-HU.mod_al_upload.sys.ini b/cadline/modules/modules/mod_al_upload/language/hu-HU/hu-HU.mod_al_upload.sys.ini
new file mode 100644
index 00000000..243ea56c
--- /dev/null
+++ b/cadline/modules/modules/mod_al_upload/language/hu-HU/hu-HU.mod_al_upload.sys.ini
@@ -0,0 +1,7 @@
+MOD_AL_NEWSLETTER_SUBSCRIBE_HEADER="Iratkozzon fel hírlevelünkre"
+MOD_AL_NEWSLETTER_SUBSCRIBE_TEXT="Szeretné a legújabb és legjobb híreket blogunkról egyenesen a postaládájába? Elküldi nekünk az adatait, és kap egy kedves heti e-mailt."
+MOD_AL_NEWSLETTER_NAME="Név"
+MOD_AL_NEWSLETTER_NAME_PLACEHOLDER="A neve"
+MOD_AL_NEWSLETTER_EMAIL="Email"
+MOD_AL_NEWSLETTER_EMAIL_PLACEHOLDER="Az email címe"
+MOD_AL_NEWSLETTER_SUBSCRIBE_BTN="Feliratkozás"
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_al_upload/mod_al_upload.php b/cadline/modules/modules/mod_al_upload/mod_al_upload.php
new file mode 100644
index 00000000..b1529337
--- /dev/null
+++ b/cadline/modules/modules/mod_al_upload/mod_al_upload.php
@@ -0,0 +1,156 @@
+ 0) {
+ $user = JFactory::getUser();
+ $app = JFactory::getApplication();
+ $errorMsg = '';
+ $successMsg = '';
+ $needEmail = false;
+ $dir = 'userupload/az_ev_legjobb_vizsgamunkaja_2025/' . $user->id;
+ $needSuccessEmail = false;
+ $needDoc = false;
+ $docFiles = '';
+ $imgFiles = '';
+ $imgError = false;
+
+ $target_dir = $_SERVER['DOCUMENT_ROOT'] . '/public/' . $dir;
+
+ if (!file_exists($target_dir)) {
+ mkdir($target_dir, 0777, true);
+ }
+
+ $files = scandir($target_dir);
+
+ $pngImages = glob($target_dir . "/*.png");
+ $jpgImages = glob($target_dir . "/*.jpg");
+ $jpegImages = glob($target_dir . "/*.jpeg");
+ $images = array_merge($pngImages, $jpgImages, $jpegImages);
+
+ if (count($images) >= 4) {
+ $app->enqueueMessage('A feltöltött képek száma meghaladja a megengedett limitet.', 'error');
+ $imgError = true;
+ }
+
+ if ($imgError == false) {
+ for ($i = 0; $i <= count($_FILES['fileToUpload']['tmp_name']); $i++) {
+ $file = $_FILES['fileToUpload']['tmp_name'][$i];
+
+ if ($file == '')
+ continue;
+
+ if (ModAlUploadHelper::isImage($file)) {
+ $data = getimagesize($file);
+ $width = $data[0];
+ $height = $data[1];
+
+ if ($width < 1920 || $height < 1080) {
+ $errorMsg .= '- A kép mérete nem haladja meg az 1920x1080-as méretet: ' . basename($_FILES["fileToUpload"]["name"][$i]) . ' ';
+ $imgFiles .= '- ' . basename($_FILES["fileToUpload"]["name"][$i]) . ' ';
+
+ continue;
+ } else {
+ $successMsg .= '- ' . basename($_FILES["fileToUpload"]["name"][$i]) . ' ';
+ }
+ } else {
+ $docFiles .= '- ' . basename($_FILES["fileToUpload"]["name"][$i]) . ' ';
+ $needDoc = true;
+ }
+
+ $target_file = $target_dir . '/' . basename($user->id . '_' . $_FILES["fileToUpload"]["name"][$i]);
+ $path_parts = pathinfo($target_file);
+
+ $j = 1;
+ while (file_exists($target_file)) {
+ $target_file = $target_dir . '/' . $path_parts['filename'] . '_' . $j . '.' . $path_parts['extension'];
+ $j++;
+ }
+
+ move_uploaded_file($file, $target_file);
+
+ $needSuccessEmail = true;
+ }
+
+ if ($errorMsg != '') {
+ $app->enqueueMessage('Az alábbi képek nem lettek feltöltve: ' . $errorMsg, 'error');
+ }
+
+ if ($needSuccessEmail) {
+ $userMessage = 'Kedves ' . $user->name . '!
+
+ Köszönjük, hogy feltöltötte pályázati anyagát a rendszerünkbe. A feltöltés sikeresen megtörtént.';
+
+ $userSuccess = '';
+ if ($successMsg != '') {
+ $userSuccess .= $successMsg;
+ }
+
+ if ($docFiles != '') {
+ $userSuccess .= $docFiles;
+ }
+
+ if ($userSuccess != '') {
+ $userMessage .= ' Az alábbi fájlokat rendszerünk rögzítette: ' . $userSuccess;
+ }
+
+ if ($imgFiles != '') {
+ $userMessage .= ' Az alábbi fájlokat nem találtuk a feltöltésben: ' . $imgFiles;
+ }
+
+ $userMessage .= '
+ Kérjük, amennyiben valamelyik dokumentum hiányzik, pótolhatja a megadott határidőig: 2025. október 10. déli 12:00 óra.
+
+ Amennyiben minden szükséges fájl feltöltésre került, a pályázati anyag teljesnek tekinthető, és a későbbiekben már nincs lehetőség módosításra vagy cserére.
+
+ Üdvözlettel,
+ CadLine Kft.
+ ';
+
+ if ($userSuccess != '') {
+ $mail = new PHPMailer();
+
+ $mail->isSMTP();
+
+ $mail->CharSet = 'UTF-8';
+ $mail->Host = $mailconfig['Host'];
+ $mail->Port = $mailconfig['Port'];
+ $mail->SMTPAuth = true;
+
+ $mail->Username = $mailconfig['Username'];
+ $mail->Password = $mailconfig['Password'];
+
+ $mail->FromName = 'www.archline.hu';
+ $mail->From = 'marketing@cadline.hu';
+ $mail->AddAddress($user->email);
+ $mail->AddCC('marketing@cadline.hu');
+
+ $mail->IsHTML(true);
+
+ $mail->Subject = 'Sikeres pályázati anyag feltöltés – visszaigazolás';
+ $mail->Body = $userMessage;
+
+ $mail->Send();
+ }
+ }
+
+ $msg = '';
+
+ if ($successMsg != '') {
+ $msg .= 'Az alábbi képek sikeresen fel lettek töltve: ' . $successMsg . ' ';
+ }
+
+ if ($needDoc) {
+ $msg .= 'A dokumentumok sikeresen fel lettek töltve';
+ }
+
+ if ($successMsg != '' || $needDoc) {
+ $app->enqueueMessage($msg, 'success');
+ }
+ }
+}
+
+require JModuleHelper::getLayoutPath('mod_al_upload', $params->get('layout', 'default'));
diff --git a/cadline/modules/modules/mod_al_upload/mod_al_upload.xml b/cadline/modules/modules/mod_al_upload/mod_al_upload.xml
new file mode 100644
index 00000000..0af766a0
--- /dev/null
+++ b/cadline/modules/modules/mod_al_upload/mod_al_upload.xml
@@ -0,0 +1,42 @@
+
+
+ mod_al_upload
+ August 2022
+ Nagy Máté
+ mate.nagy@cadline.hu
+ Copyright © 2021 - All rights reserved.
+ 0.0.1
+ Create a file uploader modul
+
+ mod_al_upload.php
+ mod_al_upload.xml
+ index.html
+ helper.php
+ language
+ tmpl
+
+
+
+
+
+
+
+ JGLOBAL_USE_GLOBAL
+ COM_MODULES_FIELD_VALUE_NOCACHING
+
+
+
+
+
+
+
+
+
+
+
+ en-GB/en-GB.mod_al_upload.sys.ini
+ en-GB/en-GB.mod_al_upload.ini
+ hu-HU/hu-HU.mod_al_upload.sys.ini
+ hu-HU/hu-HU.mod_al_upload.ini
+
+
diff --git a/cadline/modules/modules/mod_al_upload/tmpl/default.php b/cadline/modules/modules/mod_al_upload/tmpl/default.php
new file mode 100644
index 00000000..a12c4b57
--- /dev/null
+++ b/cadline/modules/modules/mod_al_upload/tmpl/default.php
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_al_upload/tmpl/index.html b/cadline/modules/modules/mod_al_upload/tmpl/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_al_upload/tmpl/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_al_vote/helper.php b/cadline/modules/modules/mod_al_vote/helper.php
new file mode 100644
index 00000000..2f297688
--- /dev/null
+++ b/cadline/modules/modules/mod_al_vote/helper.php
@@ -0,0 +1,170 @@
+getQuery(true)
+ ->select('a.*')
+ ->from('www_archline_hu.jml_speasyimagegallery_albums as a')
+ ->where($db->quoteName('a.id') . ' = ' . $db->quote($albumId));
+
+ $query->select('l.title AS language_title')
+ ->leftJoin($db->quoteName('#__languages') . ' AS l ON l.lang_code = a.language');
+
+ $query->select('ua.name AS author_name')
+ ->leftJoin('#__users AS ua ON ua.id = a.created_by');
+
+ // Filter by published state.
+ $query->where('a.published = 1');
+
+ $db->setQuery($query);
+ $data = $db->loadObject();
+
+ if (isset($data->id) && $data->id) {
+ $data->images = self::getImages($data->id);
+ }
+
+ if (empty($data)) {
+ return JError::raiseError(404, JText::_('COM_SPEASYIMAGEGALLERY_ERROR_ALBUM_NOT_FOUND'));
+ }
+
+ $user = JFactory::getUser();
+ $groups = $user->getAuthorisedViewLevels();
+ if (!in_array($data->access, $groups)) {
+ return JError::raiseError(404, JText::_('COM_SPEASYIMAGEGALLERY_ERROR_ALBUM_NOT_AUTHORISED'));
+ }
+
+ $result[$albumId] = $data;
+ } catch (Exception $e) {
+ if ($e->getCode() == 404) {
+ JError::raiseError(404, $e->getMessage());
+ } else {
+ $result[$albumId] = false;
+ }
+ }
+
+ return $result[$albumId];
+ }
+
+ public static function isVoted($pictureId, $albumId, $userId)
+ {
+ $db = JFactory::getDbo();
+
+ $query = "SELECT id FROM www_archline_hu.al_picture_vote
+ WHERE picture_id = {$pictureId} AND album_id = {$albumId} AND nUserID = {$userId}";
+ $db->setQuery($query);
+ $existingVote = $db->loadObject();
+
+ return !empty($existingVote);
+ }
+
+ public static function getImages($album_id)
+ {
+ $db = JFactory::getDbo();
+ $query = $db->getQuery(true);
+ $query->select(array('a.*', 'b.picture_id', 'count(b.userID) AS voteCount'));
+ $query->from($db->quoteName('www_archline_hu.jml_speasyimagegallery_images', 'a'));
+ $query->join('LEFT', $db->quoteName('www_archline_hu.al_picture_vote', 'b') . ' ON ' . $db->quoteName('a.id') . ' = ' . $db->quoteName('b.picture_id'));
+ $query->where($db->quoteName('a.album_id') . ' = ' . $db->quote($album_id));
+ $query->where($db->quoteName('a.state') . ' = ' . $db->quote(1));
+ $query->order('a.title ASC');
+ $query->group($db->quoteName('a.id'));
+ $db->setQuery($query);
+ return $db->loadObjectList();
+ }
+
+ public static function votePicture($pictureId, $albumId, $userId, $nUserID, $info)
+ {
+ $db = JFactory::getDbo();
+
+ $query = "SELECT id FROM www_archline_hu.al_picture_vote
+ WHERE picture_id = {$pictureId} AND album_id = {$albumId} AND nUserID = {$nUserID}";
+ $db->setQuery($query);
+ $existingVote = $db->loadObject();
+
+ if (!empty($existingVote))
+ return false;
+
+ $vote = new stdClass();
+ $vote->picture_id = $pictureId;
+ $vote->album_id = $albumId;
+ $vote->userID = $userId;
+ $vote->nUserID = $nUserID;
+ JFactory::getDbo()->insertObject('www_archline_hu.al_picture_vote', $vote);
+
+ if ($nUserID != null && $nUserID != '') {
+ $topic = (JFactory::getLanguage()->getTag() == 'hu-HU' ? 322 : 153);
+
+ $query = "SELECT * FROM cl_hlusers.u_history
+ WHERE nUserID = {$nUserID} AND nTopicID = {$topic} AND strPlace = '{$info}'";
+ $db->setQuery($query);
+ $existingVote = $db->loadObject();
+
+ if (empty($existingVote)) {
+ $history = new stdClass();
+ $history->nUserID = $nUserID;
+ $history->nTopicID = $topic;
+ $history->dateEvent = date('Y-m-d');
+ $history->strPlace = $info;
+ $history->strInfo = $info;
+ $history->nManagerID = 36;
+ JFactory::getDbo()->insertObject('cl_hlusers.u_history', $history);
+ }
+ }
+
+ return true;
+ }
+
+ public static function getAlbumInfo()
+ {
+ $info = array();
+ $uri = JUri::getInstance();
+
+ switch ($uri->getPath()) {
+ case '/palyazatok/rendering-palyazat-2023':
+ $info['albumID'] = 4;
+ $info['endDate'] = '2023-02-14 00:01:00';
+ $info['voteDate'] = '2023-02-29';
+ $info['strInfo'] = 'Rendering pályázat 2023 szavazás';
+ break;
+
+ default:
+ $info['albumID'] = 5;
+ $info['endDate'] = '2024-06-01 00:01:00';
+ $info['voteDate'] = '2024-06-02';
+ $info['strInfo'] = 'Rendering pályázat 2024 szavazás';
+ break;
+ }
+ return $info;
+ }
+
+ public static function getWinnerPictures($album_id)
+ {
+ $db = JFactory::getDbo();
+ $query = $db->getQuery(true);
+ $query->select(array('a.*', 'b.*', 'count(b.userID) AS voteCount'));
+ $query->from($db->quoteName('www_archline_hu.jml_speasyimagegallery_images', 'a'));
+ $query->join('LEFT', $db->quoteName('www_archline_hu.al_picture_vote', 'b') . ' ON ' . $db->quoteName('a.id') . ' = ' . $db->quoteName('b.picture_id'));
+ $query->where($db->quoteName('a.album_id') . ' = ' . $db->quote($album_id));
+ $query->where($db->quoteName('a.state') . ' = ' . $db->quote(1));
+ $query->order('count(b.userID) DESC');
+ $query->group($db->quoteName('a.id'));
+ $db->setQuery($query);
+ $winners = $db->loadObjectList();
+
+ for ($i = 0; $i < count($winners); $i++)
+ $winners[$i]->source = json_decode($winners[$i]->images);
+
+ return $winners;
+ }
+}
diff --git a/cadline/modules/modules/mod_al_vote/index.html b/cadline/modules/modules/mod_al_vote/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_al_vote/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_al_vote/language/en-GB/en-GB.mod_al_vote.ini b/cadline/modules/modules/mod_al_vote/language/en-GB/en-GB.mod_al_vote.ini
new file mode 100644
index 00000000..12acdcb1
--- /dev/null
+++ b/cadline/modules/modules/mod_al_vote/language/en-GB/en-GB.mod_al_vote.ini
@@ -0,0 +1,4 @@
+MOD_AL_VOTE_SUCCESS="Thank you for participating in the poll, your vote was valid.
+Best regards, CadLine Kft."
+MOD_AL_VOTE_VOTE="Vote"
+MOD_AL_VOTE_VOTE_2="I vote"
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_al_vote/language/en-GB/en-GB.mod_al_vote.sys.ini b/cadline/modules/modules/mod_al_vote/language/en-GB/en-GB.mod_al_vote.sys.ini
new file mode 100644
index 00000000..0ed85c5d
--- /dev/null
+++ b/cadline/modules/modules/mod_al_vote/language/en-GB/en-GB.mod_al_vote.sys.ini
@@ -0,0 +1,7 @@
+MOD_AL_NEWSLETTER_SUBSCRIBE_HEADER="GET OUR NEWSLETTER"
+MOD_AL_NEWSLETTER_SUBSCRIBE_TEXT="Want the latest and greatest from our blog straight to your inbox? Chucks us your details and get a sweet weekly email."
+MOD_AL_NEWSLETTER_NAME="Name"
+MOD_AL_NEWSLETTER_NAME_PLACEHOLDER="Your name"
+MOD_AL_NEWSLETTER_EMAIL="Email"
+MOD_AL_NEWSLETTER_EMAIL_PLACEHOLDER="Your email address"
+MOD_AL_NEWSLETTER_SUBSCRIBE_BTN="Subscribe"
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_al_vote/language/hu-HU/hu-HU.mod_al_vote.ini b/cadline/modules/modules/mod_al_vote/language/hu-HU/hu-HU.mod_al_vote.ini
new file mode 100644
index 00000000..618676a3
--- /dev/null
+++ b/cadline/modules/modules/mod_al_vote/language/hu-HU/hu-HU.mod_al_vote.ini
@@ -0,0 +1,4 @@
+MOD_AL_VOTE_SUCCESS="Köszönjük, hogy részt vettél a szavazáson, leadott szavazatod érvényes volt.
+Üdvözlettel, CadLine Kft."
+MOD_AL_VOTE_VOTE="Szavazat"
+MOD_AL_VOTE_VOTE_2="Szavazok"
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_al_vote/language/hu-HU/hu-HU.mod_al_vote.sys.ini b/cadline/modules/modules/mod_al_vote/language/hu-HU/hu-HU.mod_al_vote.sys.ini
new file mode 100644
index 00000000..243ea56c
--- /dev/null
+++ b/cadline/modules/modules/mod_al_vote/language/hu-HU/hu-HU.mod_al_vote.sys.ini
@@ -0,0 +1,7 @@
+MOD_AL_NEWSLETTER_SUBSCRIBE_HEADER="Iratkozzon fel hírlevelünkre"
+MOD_AL_NEWSLETTER_SUBSCRIBE_TEXT="Szeretné a legújabb és legjobb híreket blogunkról egyenesen a postaládájába? Elküldi nekünk az adatait, és kap egy kedves heti e-mailt."
+MOD_AL_NEWSLETTER_NAME="Név"
+MOD_AL_NEWSLETTER_NAME_PLACEHOLDER="A neve"
+MOD_AL_NEWSLETTER_EMAIL="Email"
+MOD_AL_NEWSLETTER_EMAIL_PLACEHOLDER="Az email címe"
+MOD_AL_NEWSLETTER_SUBSCRIBE_BTN="Feliratkozás"
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_al_vote/mod_al_vote.php b/cadline/modules/modules/mod_al_vote/mod_al_vote.php
new file mode 100644
index 00000000..0ce72cf7
--- /dev/null
+++ b/cadline/modules/modules/mod_al_vote/mod_al_vote.php
@@ -0,0 +1,24 @@
+input;
+ $pictureID = $input->get('picture_id', '', 'int');
+
+ if ($albumInfo['endDate'] >= date('Y-m-d H:i:s')) {
+ $vote = ModAlVoteHelper::votePicture($pictureID, $albumInfo['albumID'], $user->id, $user->nUserID, $albumInfo['strInfo']);
+
+ if ($vote)
+ JFactory::getApplication()->enqueueMessage(JText::_('MOD_AL_VOTE_SUCCESS'), 'message');
+ }
+}
+
+$album = ModAlVoteHelper::getItem($albumInfo['albumID']);
+
+require JModuleHelper::getLayoutPath('mod_al_vote', $params->get('layout', 'default'));
diff --git a/cadline/modules/modules/mod_al_vote/mod_al_vote.xml b/cadline/modules/modules/mod_al_vote/mod_al_vote.xml
new file mode 100644
index 00000000..4c2d3d5b
--- /dev/null
+++ b/cadline/modules/modules/mod_al_vote/mod_al_vote.xml
@@ -0,0 +1,42 @@
+
+
+ mod_al_vote
+ August 2022
+ Nagy Máté
+ mate.nagy@cadline.hu
+ Copyright © 2021 - All rights reserved.
+ 0.0.1
+ Create a picture vote modul
+
+ mod_al_vote.php
+ mod_al_vote.xml
+ index.html
+ helper.php
+ language
+ tmpl
+
+
+
+
+
+
+
+ JGLOBAL_USE_GLOBAL
+ COM_MODULES_FIELD_VALUE_NOCACHING
+
+
+
+
+
+
+
+
+
+
+
+ en-GB/en-GB.mod_al_vote.sys.ini
+ en-GB/en-GB.mod_al_vote.ini
+ hu-HU/hu-HU.mod_al_vote.sys.ini
+ hu-HU/hu-HU.mod_al_vote.ini
+
+
diff --git a/cadline/modules/modules/mod_al_vote/tmpl/default.php b/cadline/modules/modules/mod_al_vote/tmpl/default.php
new file mode 100644
index 00000000..d840e903
--- /dev/null
+++ b/cadline/modules/modules/mod_al_vote/tmpl/default.php
@@ -0,0 +1,133 @@
+addScript(JURI::base(true) . '/public/js/lightbox_2.js');
+$doc->addStylesheet(JURI::base(true) . '/public/css/lightbox_2.css');
+?>
+
+
+
+
+
+ = $info['voteDate']) : ?>
+
+
+
+
+
+
+ = JText::_('MOD_AL_VOTE_FIRST_PLACE') ?>
+
+
+
+ = JText::_('MOD_AL_VOTE_VOTE') ?>: = $winners[0]->voteCount ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ = JText::_('MOD_AL_VOTE_SECOND_PLACE') ?>
+
+
+
+ = JText::_('MOD_AL_VOTE_VOTE') ?>: = $winners[1]->voteCount ?>
+
+
+
+
+ = JText::_('MOD_AL_VOTE_THIRD_PLACE') ?>
+
+
+
+ = JText::_('MOD_AL_VOTE_VOTE') ?>: = $winners[2]->voteCount ?>
+
+
+
+
+
+
+
+
+
+
+
+ = JText::_('MOD_AL_VOTE_MORE_PICTURES') ?>
+
+
+
+
+
+ images as $key => $item->image) : ?>
+ image->images); ?>
+
+
+
+
+
+
+
+ image->title; ?>
+
+ = JText::_('MOD_AL_VOTE_VOTE') ?>: = $item->image->voteCount ?>
+
+ id > 0 && !ModAlVoteHelper::isVoted($item->image->id, $album->id, $user->nUserID) && $albumInfo['endDate'] >= date('Y-m-d H:i:s')) : ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_al_vote/tmpl/index.html b/cadline/modules/modules/mod_al_vote/tmpl/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_al_vote/tmpl/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_alusers/assets/css/images/index.html b/cadline/modules/modules/mod_alusers/assets/css/images/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_alusers/assets/css/images/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_alusers/assets/css/index.html b/cadline/modules/modules/mod_alusers/assets/css/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_alusers/assets/css/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_alusers/assets/css/newstyle.css b/cadline/modules/modules/mod_alusers/assets/css/newstyle.css
new file mode 100644
index 00000000..02eec319
--- /dev/null
+++ b/cadline/modules/modules/mod_alusers/assets/css/newstyle.css
@@ -0,0 +1,6 @@
+.alusers .aktiv {color: #1E90FF;}
+.alusers .inaktiv {color: #FF0000;}
+.alusers dt {display:inline-block;margin-right:20px;min-width:150px;vertical-align:top;}
+.alusers dd {display:inline-block;vertical-align:top;}
+.btn-info, .btn-success, .btn-primary {background-color: #1E90FF !important; border-color: #1E90FF !important;}
+.btn-info:hover, .btn-success:hover, .btn-primary:hover {background-color: #6495ED !important; border-color: #6495ED !important;}
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_alusers/assets/css/style.css b/cadline/modules/modules/mod_alusers/assets/css/style.css
new file mode 100644
index 00000000..97e125ac
--- /dev/null
+++ b/cadline/modules/modules/mod_alusers/assets/css/style.css
@@ -0,0 +1,4 @@
+.alusers .aktiv {color: #009900;}
+.alusers .inaktiv {color: #FF0000;}
+.alusers dt {display:inline-block;margin-right:20px;min-width:150px;vertical-align:top;}
+.alusers dd {display:inline-block;vertical-align:top;}
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_alusers/assets/index.html b/cadline/modules/modules/mod_alusers/assets/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_alusers/assets/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_alusers/assets/js/index.html b/cadline/modules/modules/mod_alusers/assets/js/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_alusers/assets/js/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_alusers/assets/js/script.js b/cadline/modules/modules/mod_alusers/assets/js/script.js
new file mode 100644
index 00000000..e69de29b
diff --git a/cadline/modules/modules/mod_alusers/helper.php b/cadline/modules/modules/mod_alusers/helper.php
new file mode 100644
index 00000000..a704e3f7
--- /dev/null
+++ b/cadline/modules/modules/mod_alusers/helper.php
@@ -0,0 +1,1224 @@
+= strtotime(date('Y') . '-01-01')) {
+ $expire = date('Y') . '-03-31';
+ }
+
+ // Masodik negyedev
+ if ($prFizetve == date('Y') . '-04-30' && $currentTime >= strtotime(date('Y') . '-04-01')) {
+ $expire = date('Y') . '-06-30';
+ }
+
+ // Harmadik negyedev
+ if ($prFizetve == date('Y') . '-07-31' && $currentTime >= strtotime(date('Y') . '-07-01')) {
+ $expire = date('Y') . '-09-30';
+ }
+
+ // Negyedik negyedev
+ if ($prFizetve == date('Y') . '-10-31' && $currentTime >= strtotime(date('Y') . '-10-01')) {
+ $expire = date('Y') . '-12-31';
+ }
+
+ return $expire;
+ }
+
+ public static function getSupport($prContact, $maintenance_valid, $maint_expiration, $prFizetve, $prSellDate)
+ {
+ // Karbantartasi szerzodesek
+ $maintenanceArray = array(2, 6, 7);
+
+ // Van ervenyes karbantartasi szerzodese es ki is van fizetve
+ if (in_array($prContact, $maintenanceArray) && $prFizetve == '2050-01-01') {
+ $expire = date('Y') . '-12-31';
+ return "{$expire}-ig";
+ }
+
+ // Elofizetoi, ha a az aktivalas ervenyessege nagyobb, mint a jelenlegi datum
+ if ($prContact == '1' && $prFizetve > date('Y-m-d')) {
+ return "{$prFizetve}-ig";
+ }
+
+ // Licenc - egy osszeg vagy Licenc - berles vagy Licenc - reszlet
+ if ($prContact == '0' || $prContact == '11' || $prContact == '3') {
+ if ($maint_expiration != '' && $maint_expiration > date('Y-m-d')) {
+ return "{$maint_expiration}-ig";
+ }
+ // Az eladasi datumhoz hozza kell adni 90 napot, annyi a termektamogatas
+ $perpExpire = date('Y-m-d', strtotime($prSellDate . ' + 90 days'));
+
+ // Ha a jelenlegi datum kisebb, mint az eladasi datum + 90 nap, akkor van termektamogatas
+ if (strtotime(date("Y-m-d")) <= strtotime($perpExpire)) {
+ return "{$perpExpire}-ig";
+ }
+ }
+
+ // Karbantartasi - egyosszeg - nincs kifizetve
+ if (($prContact == '2' && date('Y-m-d') > date('Y-01-20'))) {
+ return "{$prFizetve}-ig";
+
+ // return "Nem (Hátralék miatt felfüggesztve)";
+ }
+
+ // Karbantartasi - reszlet - nincs kifizetve
+ if ($prContact == '7' && $prFizetve != '2050-01-01' && $prFizetve > date('Y-m-d')) {
+ return "{$prFizetve}-ig";
+ }
+
+ // Karbantartasi - negyedeves - nincs kifizetve
+ if ($prContact == '6' && !ModAlusersHelper::QuaterlyPaid($prFizetve)) {
+ $expire = ModAlusersHelper::getQuarterlySupportNotPaid($prFizetve);
+ return "{$prFizetve}-ig";
+ }
+
+ // Karbantartasi - negyedeves - kifizetve
+ if ($prContact == '6' && ModAlusersHelper::QuaterlyPaid($prFizetve)) {
+ return "{$prFizetve}-ig";
+ }
+
+ // Be van allitva a termektamogatas lejarata
+ if ($maint_expiration != '' && strtotime($maint_expiration)) {
+ return "{$maint_expiration}-ig";
+ }
+
+ return "Nem";
+ }
+
+ public static function getSupportForOlder($prHlNum, $supportArray, $maint_expiration, $prContact, $prSellDate)
+ {
+ // Karbantartasi szerzodesek
+ $maintenanceArray = array(2, 6, 7);
+
+ if (in_array($prContact, $maintenanceArray) && array_key_exists($prHlNum, $supportArray)) {
+ return $supportArray[$prHlNum];
+ }
+
+ // Licenc - egy osszeg vagy Licenc - berles vagy Licenc - reszlet
+ if ($prContact == '0' || $prContact == '11' || $prContact == '3') {
+ if ($maint_expiration != '' && $maint_expiration > date('Y-m-d')) {
+ return "{$maint_expiration}-ig";
+ }
+ // Az eladasi datumhoz hozza kell adni 90 napot, annyi a termektamogatas
+ $perpExpire = date('Y-m-d', strtotime($prSellDate . ' + 90 days'));
+
+ // Ha a jelenlegi datum kisebb, mint az eladasi datum + 90 nap, akkor van termektamogatas
+ if (strtotime(date("Y-m-d")) <= strtotime($perpExpire)) {
+ return "{$perpExpire}-ig";
+ }
+ }
+
+ // Be van allitva a termektamogatas lejarata
+ if ($maint_expiration != '' && strtotime($maint_expiration)) {
+ return "{$maint_expiration}-ig";
+ }
+
+ return "Nem";
+ }
+
+ public static function getCurrentVersion()
+ {
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query->select(array('v.*'));
+ $query->from($db->quoteName('cl_hlusers.p_versions', 'v'));
+ $query->where('v.verID = 26');
+
+ $db->setQuery($query);
+
+ $result = $db->loadObject();
+ return (count($result) ? $result : FALSE);
+ }
+
+ public static function getLatestVersion($nUserID = 0, $ids = array())
+ {
+ if ((int)$nUserID == 0 || empty($ids)) return (FALSE);
+
+ $keys = implode(',', $ids);
+
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query = "SELECT * FROM cl_hlusers.p_versions WHERE verID = 26 ORDER BY verID DESC LIMIT 1";
+ $db->setQuery($query);
+
+ $result = $db->loadObject();
+ return (count($result) ? $result->verID : FALSE);
+ }
+
+ public static function getRemainingCredits($nUserID = 0)
+ {
+ if ((int)$nUserID == 0) return (FALSE);
+
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query->select(array('c.*'));
+ $query->from($db->quoteName('mobileview.ai_render_credits', 'c'));
+ $query->where($db->quoteName('c.nUserID') . ' = ' . $db->quote($nUserID));
+ $query->order($db->quoteName('c.created_at') . ' DESC');
+
+ $db->setQuery($query);
+
+ $result = $db->loadObject();
+ return (count($result) ? $result->credit : FALSE);
+ }
+
+ public static function getCredits($nUserID = 0)
+ {
+ if ((int)$nUserID == 0) return (FALSE);
+
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query->select(array('c.*'));
+ $query->from($db->quoteName('mobileview.ai_render_credit_history', 'c'));
+ $query->where($db->quoteName('c.nUserID') . ' = ' . $db->quote($nUserID));
+ $query->order($db->quoteName('c.created_at') . ' DESC');
+
+ $db->setQuery($query);
+
+ $result = $db->loadObjectList();
+ return (count($result) ? $result : FALSE);
+ }
+
+ public static function getLatestPrograms($nUserID = 0, $verID, $ids = array())
+ {
+ if ((int)$nUserID == 0 || !$verID || empty($ids)) return (FALSE);
+ $keys = "'" . implode("','", $ids) . "'";
+
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query = "SELECT p.*, t.*, v.*, h.hlCtrID AS hlCtrID, h.maintenance_valid AS maintenance_valid, h.maint_expiration AS maint_expiration
+ FROM cl_hlusers.h_programs p
+ LEFT JOIN cl_hlusers.p_types t ON t.typeCode = p.prTypeID
+ LEFT JOIN cl_hlusers.p_versions v ON v.verID = p.prVerID
+ LEFT JOIN cl_hlusers.hardlock h ON h.hlNum = p.prHlNum
+ WHERE h.hlUser IN (" . $keys . ") AND p.prVerID = " . $verID . " AND h.hlStat != 2
+ ORDER BY
+ CASE
+ WHEN p.prTypeID = 8 THEN 1
+ WHEN p.prTypeID = 4 THEN 2
+ ELSE 3
+ END,
+ prID ASC";
+
+ /*$query->select(array('p.*', 't.*'));
+ $query->from($db->quoteName('cl_hlusers.h_programs', 'p'));
+ $query->join('LEFT', $db->quoteName('cl_hlusers.p_types', 't') . ' ON ' . $db->quoteName('t.typeCode') . ' = ' . $db->quoteName('p.prTypeID'));
+ $query->join('LEFT', $db->quoteName('cl_hlusers.hardlock', 'h') . ' ON ' . $db->quoteName('h.hlNum') . ' = ' . $db->quoteName('p.prHlNum'));
+ $query->where($db->quoteName('h.hlUser') . ' = ' . $db->quote($nUserID));
+ $query->where($db->quoteName('p.prVerID') . ' = ' . $db->quote($verID));
+ $query->order($db->quoteName('p.prPass') . ' DESC');*/
+
+ $db->setQuery($query);
+
+ $result = $db->loadObjectList();
+ return (count($result) ? $result : FALSE);
+ }
+
+ public static function getOlderPrograms($nUserID = 0, $verID, $ids = array())
+ {
+ if ((int)$nUserID == 0 || !$verID) return (FALSE);
+
+ $keys = "'" . implode("','", $ids) . "'";
+
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query = "SELECT p.*, t.*, v.*, h.maint_expiration AS maint_expiration
+ FROM cl_hlusers.h_programs p
+ LEFT JOIN cl_hlusers.p_types t ON t.typeCode = p.prTypeID
+ LEFT JOIN cl_hlusers.p_versions v ON v.verID = p.prVerID
+ LEFT JOIN cl_hlusers.hardlock h ON h.hlNum = p.prHlNum
+ WHERE h.hlUser IN (" . $keys . ") AND p.prVerID < " . $verID . " AND h.hlStat != 2
+ ORDER BY prVerID DESC,
+ CASE
+ WHEN p.prTypeID = 8 THEN 1
+ WHEN p.prTypeID = 4 THEN 2
+ ELSE 3
+ END,
+ prID ASC";
+
+ /*$query->select(array('p.*', 't.*', 'v.*'));
+ $query->from($db->quoteName('cl_hlusers.h_programs', 'p'));
+ $query->join('LEFT', $db->quoteName('cl_hlusers.p_versions', 'v') . ' ON ' . $db->quoteName('v.verID') . ' = ' . $db->quoteName('p.prVerID'));
+ $query->join('LEFT', $db->quoteName('cl_hlusers.p_types', 't') . ' ON ' . $db->quoteName('t.typeCode') . ' = ' . $db->quoteName('p.prTypeID'));
+ $query->join('LEFT', $db->quoteName('cl_hlusers.hardlock', 'h') . ' ON ' . $db->quoteName('h.hlNum') . ' = ' . $db->quoteName('p.prHlNum'));
+ $query->where($db->quoteName('h.hlUser') . ' = ' . $db->quote($nUserID));
+ $query->where($db->quoteName('p.prVerID') . ' < ' . $db->quote($verID));
+ $query->order($db->quoteName('p.prVerID') . ' DESC');*/
+
+ $db->setQuery($query);
+
+ $result = $db->loadObjectList();
+ return (count($result) ? $result : FALSE);
+ }
+
+ public static function getComputerData($prPass, $isid)
+ {
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query->select(array('c.*'));
+ $query->from($db->quoteName('cl_hlusers.p_serial_isid', 'p'));
+ $query->join('LEFT', $db->quoteName('cl_hlusers.computers', 'c') . ' ON ' . $db->quoteName('c.id') . ' = ' . $db->quoteName('p.computer_id'));
+ $query->where($db->quoteName('p.serial') . ' = ' . $db->quote($prPass));
+ $query->where($db->quoteName('p.isid') . ' = ' . $db->quote($isid));
+
+ $db->setQuery($query);
+
+ $result = $db->loadObject();
+ return (count($result) ? $result : FALSE);
+ }
+
+ public static function getUserFromCRM($nUserID = 0)
+ {
+ if ((int)$nUserID == 0) return (FALSE);
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query->select(array('u.*'));
+ $query->from($db->quoteName('cl_hlusers.users', 'u'));
+ $query->where($db->quoteName('u.nUserID') . ' = ' . $db->quote($nUserID));
+
+ // Reset the query using our newly populated query object.
+ $db->setQuery($query);
+
+ $result = $db->loadObjectList();
+ return (count($result) ? $result[0] : FALSE);
+ }
+
+ public static function getEmails($email = '')
+ {
+ if ($email == '') return (FALSE);
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query->select(array('e.*'));
+ $query->from($db->quoteName('cl_hlusers.u_emails', 'e'));
+ $query->where($db->quoteName('e.email') . ' = ' . $db->quote($email));
+
+ // Reset the query using our newly populated query object.
+ $db->setQuery($query);
+
+ $result = $db->loadObjectList();
+ return (count($result) ? $result : FALSE);
+ }
+
+ public static function getNewsletterEmails($nUserID = 0)
+ {
+ if ((int)$nUserID == 0) return (FALSE);
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query->select(array('e.*'));
+ $query->from($db->quoteName('cl_hlusers.u_emails', 'e'));
+ $query->where($db->quoteName('e.nUserID') . ' = ' . $db->quote($nUserID));
+
+ // Reset the query using our newly populated query object.
+ $db->setQuery($query);
+
+ $result = $db->loadObjectList();
+ return (count($result) ? $result : FALSE);
+ }
+
+ public function getIdFromEmail($email = '')
+ {
+ if ($email == '') return (FALSE);
+ $db = JFactory::getDbo();
+ //$db->setQuery("SELECT * FROM `" . CRMADATBAZIS . "`.`u_emails` WHERE email='" . $email . "' ORDER BY u_emails_id LIMIT 1;");
+
+ $query = $db->getQuery(true);
+
+ $query->select(array('e.*'));
+ $query->from($db->quoteName('cl_hlusers.u_emails', 'e'));
+ $query->where($db->quoteName('e.email') . ' = ' . $db->quote($email));
+ $query->order('e.u_emails_id ASC');
+
+ $db->setQuery($query);
+
+ $result = $db->loadObjectList();
+ return (count($result) ? $result[0]->nUserID : FALSE);
+ }
+
+ public static function getPrivacyPolicy($nUserID)
+ {
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query->select(array('u.privacy_policy'));
+ $query->from($db->quoteName('cl_hlusers.users', 'u'));
+ $query->where($db->quoteName('u.nUserID') . ' = ' . $db->quote($nUserID));
+
+ $db->setQuery($query);
+
+ $result = $db->loadObjectList();
+
+ return ($result[0]->privacy_policy == 1 ? TRUE : FALSE);
+ }
+
+ public static function isStudent($nUserID)
+ {
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query->select(array('s.*'));
+ $query->from($db->quoteName('cl_hlusers.students', 's'));
+ $query->where($db->quoteName('s.nUserID') . ' = ' . $db->quote($nUserID));
+
+ $db->setQuery($query);
+
+ $result = $db->loadObjectList();
+
+ return (!empty($result) ? TRUE : FALSE);
+ }
+
+ public static function getKeys($ids = array())
+ {
+ if (empty($ids)) return (FALSE);
+
+ $idString = "'" . implode("','", $ids) . "'";
+
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query->select(array('h.hlNum kulcs_kod'));
+ $query->from($db->quoteName('cl_hlusers.hardlock', 'h'));
+ $query->where($db->quoteName('h.hlUser') . ' IN ' . "(" . $idString . ")");
+ $query->where($db->quoteName('h.hlStat') . ' != ' . $db->quote(2));
+
+ $db->setQuery($query);
+
+ $result = $db->loadObjectList();
+ return (count($result) ? $result : FALSE);
+ }
+
+ public static function getPrograms($key = '')
+ {
+ if ($key == '') return (FALSE);
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query->select(array('p.*', 'v.*', 't.*'));
+ $query->from($db->quoteName('cl_hlusers.h_programs', 'p'));
+ $query->join('LEFT', $db->quoteName('cl_hlusers.p_versions', 'v') . ' ON ' . $db->quoteName('v.verID') . ' = ' . $db->quoteName('p.prVerID'));
+ $query->join('LEFT', $db->quoteName('cl_hlusers.p_types', 't') . ' ON ' . $db->quoteName('t.typeCode') . ' = ' . $db->quoteName('p.prTypeID'));
+ $query->where($db->quoteName('p.prHlNum') . ' = ' . $db->quote($key));
+ $query->order($db->quoteName('p.prID') . ' DESC');
+
+ $db->setQuery($query);
+
+ $result = $db->loadObjectList();
+ return (count($result) ? $result : FALSE);
+ }
+
+ public function getLastProgram($key = '')
+ {
+ if ($key == '') return (FALSE);
+
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query->select(array('p.*'));
+ $query->from($db->quoteName('cl_hlusers.h_programs', 'p'));
+ $query->where($db->quoteName('p.prHlNum') . ' = ' . $db->quote($key));
+ $query->order($db->quoteName('p.prVerID') . ' DESC');
+
+ $db->setQuery($query);
+
+ $result = $db->loadObject();
+ return (count($result) ? $result : FALSE);
+ }
+
+ public static function getModules($prid = '')
+ {
+ if ((int)$prid == 0) return (FALSE);
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query->select(array('m.*', 'mt.*'));
+ $query->from($db->quoteName('cl_hlusers.p_modules', 'm'));
+ $query->join('LEFT', $db->quoteName('cl_hlusers.p_mtypes', 'mt') . ' ON ' . $db->quoteName('m.mdID') . ' = ' . $db->quoteName('mt.ID'));
+ $query->where($db->quoteName('m.mdPrID') . ' = ' . $db->quote($prid));
+
+ $db->setQuery($query);
+
+ $result = $db->loadObjectList();
+ return (count($result) ? $result : FALSE);
+ }
+
+ public static function getAllKeyData($ids = array())
+ {
+ if (empty($ids)) return (FALSE);
+
+ $kulcsok = self::getKeys($ids);
+
+ if (is_array($kulcsok) && count($kulcsok)) {
+ foreach ($kulcsok as $key => $kulcs) {
+ $programs = self::getPrograms($kulcs->kulcs_kod);
+
+ if (count($programs) && is_array($programs)) {
+ foreach ($programs as $key_program => $program) {
+ $programs[$key_program]->modulok = ModAlusersHelper::getModules($program->prID);
+ }
+ }
+ $kulcsok[$key]->programok = $programs;
+ }
+ }
+
+ return (count($kulcsok) ? $kulcsok : FALSE);
+ }
+
+ public function getContactName($contactID)
+ {
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query->select(array('c.*'));
+ $query->from($db->quoteName('cl_hlusers.p_contact', 'c'));
+ $query->where($db->quoteName('c.contID') . ' = ' . $db->quote($contactID));
+
+ $db->setQuery($query);
+
+ return $db->loadObject();
+ }
+
+ public function saveInvoiceSettings($nUserID = 0, $tomb = array())
+ {
+ if ((int)$nUserID == 0 || !is_array($tomb) || empty($tomb)) return (FALSE);
+
+ $set = '';
+ $new = array();
+ $mezok = array(
+ 'strInvoiceName' => JText::_('MOD_ARCHLINE_NAME'),
+ 'strInvoiceEMail' => JText::_('MOD_ARCHLINE_EMAIL'),
+ 'nInvoiceCtrID' => JText::_('MOD_ARCHLINE_COUNTRY'),
+ 'strInvoiceZip' => JText::_('MOD_ARCHLINE_ZIP'),
+ 'strInvoiceCity' => JText::_('MOD_ARCHLINE_CITY'),
+ 'strInvoiceAddress' => JText::_('MOD_ARCHLINE_ADDRESS'),
+ 'strTaxNumber' => JText::_('MOD_ARCHLINE_TAXNUMBER'),
+ 'strInvoiceEAccount' => JText::_('MOD_ARCHLINE_EACCOUNT'),
+ );
+
+ foreach ($tomb as $k => $v) {
+ if (in_array($k, array_keys($mezok))) {
+ $new[$k] = $v;
+ $set .= ($set == '' ? '' : ', ') . "`" . $k . "`='" . $v . "'";
+ }
+ }
+
+ /*$db = JFactory::getDbo();
+ $query = $db->getQuery(true);
+
+ $db->setQuery("UPDATE `" . CRMADATBAZIS . "`.`users` SET " . $set . " WHERE nUserID=" . (int)$nUserID . " LIMIT 1;");
+ $db->execute();*/
+ }
+
+ public function getUserPDF($nUserID = 0)
+ {
+ $pdfArray = array();
+ $folder = JPATH_BASE . "/attachements/" . $nUserID;
+
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query->select(array('a.*'));
+ $query->from($db->quoteName('cl_hlusers.attachments', 'a'));
+ $query->where($db->quoteName('a.file_extension') . ' = ' . $db->quote('.pdf'));
+ $query->where($db->quoteName('a.nUserID') . ' = ' . $db->quote($nUserID));
+
+ $db->setQuery($query);
+
+ $attachments = $db->loadObjectList();
+
+ foreach ($attachments as $attachment) {
+ return $attachments;
+ }
+ }
+
+ public function savePersonalSettings($nUserID = 0, $tomb = array())
+ {
+ if ((int)$nUserID == 0 || !is_array($tomb) || empty($tomb)) return (FALSE);
+
+ $country = '';
+ $profession = '';
+ $set = '';
+ $new = array();
+ $mezok = array('strName' => JText::_('MOD_ARCHLINE_NAME'), 'nCtrID' => JText::_('MOD_ARCHLINE_COUNTRY'), 'strZip' => JText::_('MOD_ARCHLINE_ZIP'), 'strCity' => JText::_('MOD_ARCHLINE_CITY'), 'strStreet' => JText::_('MOD_ARCHLINE_ADDRESS'), 'strTel' => JText::_('MOD_ARCHLINE_PHONE'), 'nUserProf' => JText::_('MOD_ARCHLINE_PROFESSION'));
+
+ foreach ($tomb as $k => $v) {
+ if (in_array($k, array_keys($mezok))) {
+ $new[$k] = $v;
+ $set .= ($set == '' ? '' : ', ') . "`" . $k . "`='" . $v . "'";
+ }
+ }
+
+ $db = JFactory::getDbo();
+ $query = $db->getQuery(true);
+
+ $query->select(array('j.*'));
+ $query->from($db->quoteName(JMLADATBAZIS . '.jml_users', 'j'));
+ $query->where($db->quoteName('j.nUserID') . ' = ' . $db->quote($nUserID));
+
+ $db->setQuery($query);
+
+ $jml = $db->loadObjectList();
+ $jml = $jml[0];
+
+ $query->select(array('u.*'));
+ $query->from($db->quoteName(CRMADATBAZIS . '.users', 'u'));
+ $query->where($db->quoteName('u.nUserID') . ' = ' . $db->quote($nUserID));
+
+ $db->setQuery($query);
+
+ $old = $db->loadObjectList();
+ $old = $old[0];
+
+ $strValt = '';
+ $valt = array();
+ foreach ($mezok as $mezo => $str) {
+ if (!$old->$mezo || !$new[$mezo] || $old->$mezo != $new[$mezo]) {
+ $valt[] = $mezo;
+ $strValt .= $str . " " . JText::_('MOD_ARCHLINE_ORIG') . ": " . $old->$mezo . " " . JText::_('MOD_ARCHLINE_NEW') . ": " . $new[$mezo] . " ";
+ }
+ }
+
+ // crm user history-ba elmenti a változásokat
+ if (count($valt)) self::insertUserHistory($nUserID, $strValt);
+
+ foreach (self::getCountries() as $k => $v) {
+ if ($new['nCtrID'] == $k) {
+ $country = $v;
+ break;
+ }
+ }
+ foreach (self::getProfessions() as $k => $v) {
+ if ($new['nUserProf'] == $k) {
+ $profession = $v;
+ break;
+ }
+ }
+
+ // crm rekord felülírása
+ $db->setQuery("UPDATE `" . CRMADATBAZIS . "`.`users` SET " . $set . " WHERE nUserID=" . (int)$nUserID . " LIMIT 1;");
+ $db->execute();
+
+ $db->setQuery("UPDATE " . CRMADATBAZIS . ".users
+ SET strTel = REPLACE(strTel, '/', ''), strTel = REPLACE(strTel, '.', ''), strTel = REPLACE(strTel, ' ', ''), strTel = REPLACE(strTel, '-', ''),
+ strTel = REPLACE(strTel, '+', ''), strTel = REPLACE(strTel, ',', ';'), strTel = REPLACE(strTel, '(', ''), strTel = REPLACE(strTel, ')', ''),
+ strTel = REPLACE(strTel, '[', ''), strTel = REPLACE(strTel, ']', '')
+ WHERE nUserID = " . (int)$nUserID . " LIMIT 1;");
+ $db->execute();
+
+ // jml rekord felülírása
+ $db->setQuery("UPDATE `" . JMLADATBAZIS . "`.`jml_users` SET `name`='" . $new['strName'] . "' WHERE nUserID=" . (int)$nUserID . " LIMIT 1;");
+ $db->execute();
+
+ // jml profile rekordok felülírása
+ $db->setQuery("UPDATE `" . JMLADATBAZIS . "`.`jml_user_profiles` SET `profile_value`='" . $country . "' WHERE user_id=" . (int)$jml->id . " AND `profile_key`='profile.country' LIMIT 1;");
+ $db->execute();
+ $db->setQuery("UPDATE `" . JMLADATBAZIS . "`.`jml_user_profiles` SET `profile_value`='" . $new['strZip'] . "' WHERE user_id=" . (int)$jml->id . " AND `profile_key`='profile.postal_code' LIMIT 1;");
+ $db->execute();
+ $db->setQuery("UPDATE `" . JMLADATBAZIS . "`.`jml_user_profiles` SET `profile_value`='" . $new['strCity'] . "' WHERE user_id=" . (int)$jml->id . " AND `profile_key`='profile.city' LIMIT 1;");
+ $db->execute();
+ $db->setQuery("UPDATE `" . JMLADATBAZIS . "`.`jml_user_profiles` SET `profile_value`='" . $new['strStreet'] . "' WHERE user_id=" . (int)$jml->id . " AND `profile_key`='profile.address1' LIMIT 1;");
+ $db->execute();
+ $db->setQuery("UPDATE `" . JMLADATBAZIS . "`.`jml_user_profiles` SET `profile_value`='" . $new['strTel'] . "' WHERE user_id=" . (int)$jml->id . " AND `profile_key`='profile.phone' LIMIT 1;");
+ $db->execute();
+ $db->setQuery("UPDATE `" . JMLADATBAZIS . "`.`jml_user_profiles` SET `profile_value`='" . $profession . "' WHERE user_id=" . (int)$jml->id . " AND `profile_key`='profile.aboutme' LIMIT 1;");
+ $db->execute();
+ }
+
+ public function getCountries()
+ {
+ $ret = parse_ini_file($_SERVER['DOCUMENT_ROOT'] . '/language/' . JFactory::getLanguage()->getTag() . '/' . JFactory::getLanguage()->getTag() . '.countries.ini');
+ return $ret;
+ }
+
+ public function getProfessions()
+ {
+ $ret = parse_ini_file($_SERVER['DOCUMENT_ROOT'] . '/language/' . JFactory::getLanguage()->getTag() . '/' . JFactory::getLanguage()->getTag() . '.prof.ini');
+ return $ret;
+ }
+
+ public function savePassword($id, $pass)
+ {
+ if ((int)$id > 0) {
+ $db = JFactory::getDbo();
+ $db->setQuery("UPDATE `jml_users` SET `password`='" . JUserHelper::hashPassword($pass) . "' WHERE id=" . (int)$id . " LIMIT 1;");
+ $db->execute();
+ }
+ }
+
+ public function newEmail($nUserID, $email)
+ {
+ if ((int)$nUserID > 0 && filter_var($email, FILTER_VALIDATE_EMAIL)) {
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query->select(array('e.*'));
+ $query->from($db->quoteName(CRMADATBAZIS . '.u_emails', 'e'));
+ $query->where($db->quoteName('e.email') . ' = ' . $db->quote($email));
+
+ $db->setQuery($query);
+
+ $exist = $db->loadObjectList();
+ if (empty($exist)) {
+ $db->setQuery("INSERT INTO `" . CRMADATBAZIS . "`.`u_emails` (`email`,`nUserID`,`default`,`active`,`deleted`,`newsletter`) VALUES ('" . $email . "','" . $nUserID . "','0','1','0','1');");
+ $db->execute();
+ $db->setQuery("UPDATE `www_archline_hu`.`jml_users` SET `email`='" . $email . "' WHERE nUserID=" . $nUserID . " LIMIT 1;");
+ $db->execute();
+ $db->setQuery("UPDATE `" . CRMADATBAZIS . "`.`users` SET `strEMail`='" . $email . "' WHERE nUserID=" . $nUserID . " LIMIT 1;");
+ $db->execute();
+ self::insertUserHistory($nUserID, JText::_('MOD_ARCHLINE_NEW_EMAIL') . ': ' . $email);
+ }
+ }
+ }
+
+ public function delEmail($nUserID, $u_emails_id)
+ {
+ if ((int)$nUserID > 0 && (int)$u_emails_id > 0) {
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query->select(array('e.*'));
+ $query->from($db->quoteName(CRMADATBAZIS . '.u_emails', 'e'));
+ $query->where($db->quoteName('e.nUserID') . ' = ' . $db->quote($nUserID));
+ $query->where($db->quoteName('e.u_emails_id') . ' = ' . $db->quote($u_emails_id));
+
+ $db->setQuery($query);
+
+ $exist = $db->loadObjectList();
+ if (!empty($exist)) {
+ $db->setQuery("DELETE FROM `" . CRMADATBAZIS . "`.`u_emails` WHERE `nUserID`='" . $nUserID . "' AND `u_emails_id`='" . (int)$u_emails_id . "' LIMIT 1;");
+ $db->execute();
+ self::insertUserHistory($nUserID, JText::_('MOD_ARCHLINE_DEL_EMAIL') . ': ' . $exist[0]->email);
+ }
+ }
+ }
+
+ public function saveNewsletters($nUserID = 0, $ids = array())
+ {
+ if ((int)$nUserID > 0) {
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query->select(array('u.*'));
+ $query->from($db->quoteName(CRMADATBAZIS . '.users', 'u'));
+ $query->where($db->quoteName('u.nUserID') . ' = ' . $db->quote($nUserID));
+ $crmUser = $db->loadObjectList();
+ $crmUser = $crmUser[0];
+
+ /*
+ if ($crmUser->bNewsletter=='Y' && !isset($_POST['bNewsletter'])) // letiltas
+ {
+ $db->setQuery("UPDATE `".CRMADATBAZIS."`.`users` SET `bNewsletter`='N' WHERE nUserID=".(int)$nUserID." LIMIT 1;");
+ $db->execute();
+ self::insertUserHistory($nUserID,JText::_('MOD_ARCHLINE_NEWSLETTER_DISABLED'),array('nTopicID'=>(JFactory::getLanguage()->getTag()=='hu-HU'?54:166)));
+ }
+
+ if ( (is_null($crmUser->bNewsletter) || $crmUser->bNewsletter=='N') && isset($_POST['bNewsletter'])) // engedélyezés
+ {
+ $db->setQuery("UPDATE `".CRMADATBAZIS."`.`users` SET `bNewsletter`='Y' WHERE nUserID=".(int)$nUserID." LIMIT 1;");
+ $db->execute();
+ self::insertUserHistory($nUserID,JText::_('MOD_ARCHLINE_NEWSLETTER_ENABLED'),array('nTopicID'=>(JFactory::getLanguage()->getTag()=='hu-HU'?38:150)));
+ }
+*/
+
+ $db->setQuery("SELECT * FROM `" . CRMADATBAZIS . "`.`u_emails` WHERE nUserID=" . (int)$nUserID . ";");
+ $exist = $db->loadObjectList();
+ if (is_array($exist) && count($exist)) {
+ foreach ($exist as $row) {
+ if (is_null($ids) || (is_array($ids) && empty($ids))) {
+ $db->setQuery("UPDATE `" . CRMADATBAZIS . "`.`u_emails` SET `newsletter`=0 WHERE u_emails_id=" . $row->u_emails_id . " AND nUserID=" . (int)$nUserID . " LIMIT 1;");
+ $db->execute();
+ self::insertUserHistory($nUserID, JText::_('MOD_ARCHLINE_UNSUBSCRIBE_NEWSLETTER') . ': ' . $row->email);
+ } else {
+ if ($row->newsletter == 0 && in_array($row->u_emails_id, $ids)) /* elötte nem volt és utána be lett pipálva => FELIRATKOZOTT */ {
+ $db->setQuery("UPDATE `" . CRMADATBAZIS . "`.`u_emails` SET `newsletter`=1 WHERE u_emails_id=" . $row->u_emails_id . " AND nUserID=" . (int)$nUserID . " LIMIT 1;");
+ $db->execute();
+ self::insertUserHistory($nUserID, JText::_('MOD_ARCHLINE_SUBSCRIBE_NEWSLETTER') . ': ' . $row->email);
+ }
+ if ($row->newsletter == 1 && !in_array($row->u_emails_id, $ids)) /* elötte be volt és utána nem volt bepipálva => LEIRATKOZOTT */ {
+ $db->setQuery("UPDATE `" . CRMADATBAZIS . "`.`u_emails` SET `newsletter`=0 WHERE u_emails_id=" . $row->u_emails_id . " AND nUserID=" . (int)$nUserID . " LIMIT 1;");
+ $db->execute();
+ self::insertUserHistory($nUserID, JText::_('MOD_ARCHLINE_UNSUBSCRIBE_NEWSLETTER') . ': ' . $row->email);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public function insertUserHistory($nUserID = 0, $strInfo = "", $tomb = array())
+ {
+ if ((int)$nUserID > 0 && $strInfo > '') {
+ $db = JFactory::getDbo();
+ $query = $db->getQuery(true);
+ $item = array(
+ 'nUserID' => $nUserID,
+ 'nTopicID' => (isset($tomb['nTopicID']) && (int)$tomb['nTopicID'] > 0 ? (int)$tomb['nTopicID'] : (JFactory::getLanguage()->getTag() == 'hu-HU' ? 364 : 365)),
+ 'dateEvent' => (isset($tomb['dateEvent']) && $tomb['dateEvent'] > '' ? $tomb['dateEvent'] : date('Y-m-d', time())),
+ 'strPlace' => (isset($tomb['strPlace']) && $tomb['strPlace'] > '' ? $tomb['strPlace'] : 'web'),
+ 'strInfo' => $strInfo,
+ 'nManagerID' => (isset($tomb['nManagerID']) && (int)$tomb['nManagerID'] > 0 ? $tomb['nManagerID'] : 36),
+ 'insertDate' => (isset($tomb['insertDate']) && $tomb['insertDate'] > '' ? $tomb['insertDate'] : date('Y-m-d H:i:s', time())),
+ );
+
+ foreach ($item as $v) $values[] = $db->quote($v);
+ $query->insert("`" . CRMADATBAZIS . "`.`u_history`")->columns($db->quoteName(array_keys($item)))->values(implode(',', $values));
+ $db->setQuery($query);
+ $db->execute();
+ }
+ }
+
+ public static function getUserData($nUserID)
+ {
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query = "SELECT u.strName AS strName, e.email AS email
+ FROM cl_hlusers.users u
+ LEFT JOIN cl_hlusers.u_emails e ON u.nUserID = e.nUserID
+ WHERE u.nUserID = {$nUserID} AND e.default = 1
+ LIMIT 1";
+ $db->setQuery($query);
+
+ return $db->loadObject();
+ }
+
+ public static function getYearFromVerID($verID)
+ {
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query = "SELECT v.year AS programYear FROM cl_hlusers.p_versions v WHERE v.verID = {$verID} LIMIT 1";
+ $db->setQuery($query);
+
+ $years = $db->loadObject();
+
+ return $years->programYear;
+ }
+
+ public static function getProgramData($prID)
+ {
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query = "SELECT p.*, h.maintenance_valid AS maintenance_valid
+ FROM cl_hlusers.h_programs p
+ LEFT JOIN cl_hlusers.hardlock h ON h.hlNum = p.prHlNum
+ WHERE prID = {$prID}
+ LIMIT 1";
+ $db->setQuery($query);
+
+ return $db->loadObject();
+ }
+
+ public static function getPreviousProgramData($prHlNum)
+ {
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query = "SELECT * FROM cl_hlusers.h_programs
+ WHERE prHlNum = '{$prHlNum}'
+ GROUP BY prPass
+ ORDER BY prVerID DESC
+ LIMIT 1,1";
+ $db->setQuery($query);
+
+ return $db->loadObject();
+ }
+
+ public static function sendMaintenanceEmail($nUserID, $strName, $strEmail, $prID)
+ {
+ $programData = ModAlusersHelper::getProgramData($prID);
+ $programYear = ModAlusersHelper::getYearFromVerID($programData->prVerID);
+ $maint_expiration = '';
+
+ if ($programYear > date('Y') && date('Y-m-d') <= date('Y') . '-12-31') {
+ $previousProgramData = ModAlusersHelper::getPreviousProgramData($programData->prHlNum);
+ $programYear = ModAlusersHelper::getYearFromVerID($previousProgramData->prVerID);
+
+ $programData->prFizetve = $previousProgramData->prFizetve;
+ }
+
+ if ($programData->prFizetve == '2050-01-01') {
+ $hlNum = substr($programData->prPass, 0, 6);
+ $dateYear = $programYear;
+ $maint_expiration = $dateYear . '.12.31';
+
+ $info = '"A Cadline Kft-vel létrejött, a ' . $hlNum . ' kulcsra vonatkozó KARBANTARTÁSI SZERZŐDÉS lemondására vonatkozó kérelmét megkaptuk.
+A KARBANTARTÁSI SZERZŐDÉS lemondását ' . $dateYear . '.12.31. dátummal elfogadtuk.
+Az ARCHLine.XP ' . $programYear . ' végleges licenc aktiválási kódja a felhasználói fiókban található.
+A terméktámogatás ' . $dateYear . '.12.31-ig vehető igénybe.
+A jelen karbantartási szerződéssel kapcsolatban tovább számlát nem küldünk."';
+
+ $msg = 'Kedves ' . $strName . ',
+
+
+ A Cadline Kft-vel létrejött, a ' . $hlNum . ' kulcsra vonatkozó KARBANTARTÁSI SZERZŐDÉS lemondására vonatkozó kérelmét megkaptuk.
+ A KARBANTARTÁSI SZERZŐDÉS lemondását ' . $dateYear . '.12.31. dátummal elfogadtuk.
+
+
+ Az ARCHLine.XP ' . $programYear . ' végleges licenc aktiválási kódja a felhasználói fiókban található.
+ A terméktámogatás ' . $dateYear . '.12.31-ig vehető igénybe.
+ A jelen karbantartási szerződéssel kapcsolatban tovább számlát nem küldünk.
+
+
+ Üdvözlettel
+ Hárosi Erika
+ Értékesítési vezető
+ CadLine Kft
+ 1037 Budapest, Montevideo u. 3/B.
+ Tel: 06-30-491-3959
+
+
+ Web: www.archline.hu
+ e-mail: erika.harosi@cadline.hu
+ Skype: cadline_support
+ ';
+
+ $topicID = 44;
+ $strPlace = date('Y', strtotime('+1 year')); // $prYear->format('Y')
+
+ if ($programData->prContact == 6) {
+ $db = JFactory::getDbo();
+ $query = $db->getQuery(true);
+
+ $db->setQuery("UPDATE `" . CRMADATBAZIS . "`.`h_programs` SET prContact = 0 WHERE prPass = '{$programData->prPass}';");
+ $db->execute();
+ }
+ } else {
+ $info = '"A Cadline Kft-vel létrejött, a ' . substr($programData->prPass, 0, 6) . ' kulcsra vonatkozó KARBANTARTÁSI SZERZŐDÉS lemondására vonatkozó kérelmét megkaptuk.
+Kollégánk hamarosan felveszi Önnel a kapcsolatot."';
+
+ $msg = 'Kedves ' . $strName . ',
+ A Cadline Kft-vel létrejött, a ' . substr($programData->prPass, 0, 6) . ' kulcsra vonatkozó KARBANTARTÁSI SZERZŐDÉS lemondására vonatkozó kérelmét megkaptuk.
+ Kollégánk hamarosan felveszi Önnel a kapcsolatot.
+
+
+ Üdvözlettel
+ CadLine Kft
+ 1037 Budapest, Montevideo u. 3/B.
+ Tel: +36 30 095 3685
+
+
+ Web: www.archline.hu
+
+ ';
+
+ $msg = 'Kedves ' . $strName . ',
+ A Cadline Kft-vel létrejött, a ' . substr($programData->prPass, 0, 6) . ' kulcsra vonatkozó KARBANTARTÁSI SZERZŐDÉS lemondására vonatkozó kérelmét megkaptuk. ';
+
+ // Karbantartasi - egyosszeg
+ if ($programData->prContact == 2) {
+ $db = JFactory::getDbo();
+ $query = $db->getQuery(true);
+
+ $query = "SELECT huf FROM cl_hlusers.o_products WHERE id = 1297 LIMIT 1";
+ $db->setQuery($query);
+ $maintenance = $db->loadObject();
+
+ $maintenancePrice = (int)$maintenance->huf / 4;
+
+ $prYear = new DateTime($programYear);
+ $prYear->modify('+1 year');
+ $expYear = $prYear->format('Y');
+
+ $prevProgramYear = ModAlusersHelper::getYearFromVerID($programData->prVerID - 1);
+ $msg .= '„Időbeli hatály, felmondási feltételek
+
+ …A szerződés határozott időtartamának lejártával a szerződés határozatlan idejűvé alakul át és amennyiben egyik fél sem mondja fel az alábbi feltételek szerint, ezt követően automatikusan megújul egymást követő egy (1) naptári éves időtartamokra.
+ A határozatlan idejű szerződést bármelyik szerződő fél jogosult 90 (kilencven) napos felmondási határidővel írásban küldött értesítés útján bármikor felmondani.
+ CADLINE a következő naptári év kezdete előtt legkésőbb november 30-ig email-ben tájékoztatja Licencjogosultat a következő naptári évi díjmódosulásról. Amennyiben a Licencjogosult a módosult díjról az évforduló előtt nem nyilatkozik, CADLINE a módosult díjat tekinti érvényesnek. Amennyiben a Licencjogosult a módosult díjat az évforduló előtt írásban elutasítja, a szerződés az évfordulón megszűnik.”
+
+
+ A szerződés alapján a lemondására két lehetőség van:
+
+
+
+
+ Szerződés lemondása a jövő évre, tehát ' . $expYear . '.01.01-től
+
+
+ Ebben az esetben:
+
+ Várjuk a már kiállított számla rendezését.
+ A számla rendezése után jogosult lesz az ARCHLine.XP ' . $programYear . ' licenc korlátlan idejű használatára és terméktámogatásra ' . $programYear . '.12.31-ig.
+ A KARBANTARTÁSI SZERZŐDÉS ' . $programYear . '.12.31. napján megszűnik, több számlát nem küldünk.
+
+
+
+
+
+ Szerződés lemondása 90 napra
+
+
+ Ebben az esetben:
+
+ A karbantartási szerződés lejárata: a felmondás napja + 90 nap.
+ A már kiállított éves karbantartási számlát sztornírozzuk.
+ Új számlát állítunk ki, 8 napos fizetési határidővel, a szerződés lejáratának időszakára.
+ A továbbiakban az ügyfél jogosult az ARCHLine.XP ' . $prevProgramYear . ' licenc korlátlan idejű használatára, valamint a szerződés lejáratáig terméktámogatásra
+ A karbantartási szerződés a lejárat napján megszűnik, ezt követően további számla nem kerül kiállításra
+
+
+
+
+
+ Kérjük, e-mailben jelezze felénk, hogy a két opcióból melyiket választja az office@cadline.hu email címen.
+ A lemondást nem szükséges levélben is elküldeni.
+
+
+
+ Üdvözlettel
+ CadLine Kft
+ 1037 Budapest, Montevideo u. 3/B.
+ Tel: +36 30 095 3685
+
+
+ Web: www.archline.hu
+
+ ';
+
+ $info = 'Szerződés lemondás folyamata - két lehetőség van:
+Szerződés lemondása ' . date('Y', strtotime('+1 year')) . '.01.01-től ,
+vagy
+Szerződés lemondása 90 napra
+A részletekről e-mailt küldtünk, várjuk a válaszát.';
+ }
+
+ // Karbantartasi - negyedeves
+ if ($programData->prContact == 6) {
+ $dateYear = date('Y-m-d');
+ $needInvoice = false;
+ $expire = '';
+
+ if (ModAlusersHelper::QuaterlyPaid($programData->prFizetve)) {
+ $expire = ModAlusersHelper::getQuarterlySupportPaid($programData->prFizetve);
+ } else {
+ $expire = ModAlusersHelper::getQuarterlySupportNotPaid($programData->prFizetve);
+ $needInvoice = true;
+ }
+
+ $maint_expiration = str_replace(".", "-", $expire);
+
+ $msg .= 'Szerződés lemondás folyamata ';
+
+ if ($needInvoice) {
+ $msg .= 'Várjuk a már kiállított számla rendezését. ';
+ }
+
+ $msg .= 'A KARBANTARTÁSI SZERZŐDÉS ' . str_replace("-", ".", $expire) . '. napján megszűnik. ';
+
+ if (!$needInvoice) {
+ $msg .= 'A jelen karbantartási szerződéssel kapcsolatban tovább számlát nem küldünk. ';
+ }
+ $msg .= ' ';
+
+ $msg .= '
+
+ Üdvözlettel
+ CadLine Kft
+ 1037 Budapest, Montevideo u. 3/B.
+ Tel: +36 30 095 3685
+
+
+ Web: www.archline.hu
+
+ ';
+
+ $info = 'Szerződés lemondás folyamata ';
+ if ($needInvoice) {
+ $info .= '
+Várjuk a már kiállított számla rendezését.';
+ }
+
+ $info .= '
+A KARBANTARTÁSI SZERZŐDÉS ' . $expire . ' napján megszűnik, több számlát nem küldünk.';
+
+ $hlNum = substr($programData->prPass, 0, 6);
+
+ $db = JFactory::getDbo();
+ $query = $db->getQuery(true);
+
+ $query = "SELECT prVerID FROM cl_hlusers.h_programs WHERE prHlNum = '{$hlNum}' AND prVerID < {$programData->prVerID} ORDER BY prVerID DESC LIMIT 1";
+ $db->setQuery($query);
+ $prevProgram = $db->loadObject();
+
+ $currentDate = date('Y-m-d');
+ $currentTime = strtotime($currentDate);
+
+ if ($programData->prFizetve == date('Y') . '-10-31' && $currentTime >= strtotime(date('Y') . '-10-01')) {
+ $db->setQuery("UPDATE `" . CRMADATBAZIS . "`.`h_programs` SET prContact = 0 WHERE prPass = '{$programData->prPass}';");
+ $db->execute();
+ } else {
+ $db->setQuery("UPDATE `" . CRMADATBAZIS . "`.`h_programs` SET prContact = 0, prStat = 0 WHERE prHlNum = '{$hlNum}' AND prVerID = {$prevProgram->prVerID};");
+ $db->execute();
+
+ $db->setQuery("DELETE FROM `" . CRMADATBAZIS . "`.`h_programs` WHERE prPass = '{$programData->prPass}';");
+ $db->execute();
+ }
+ }
+
+ // Karbantartasi - reszlet
+ if ($programData->prContact == 7) {
+ $msg .= 'Felhívjuk a figyelmét, a szerződés idő előtti felmondása esetén a továbbiakban nem lesz jogosult a frissített változat használatára.
+
+ Kollégánk hamarosan felveszi Önnel a kapcsolatot.
+
+
+ Üdvözlettel
+ CadLine Kft
+ 1037 Budapest, Montevideo u. 3/B.
+ Tel: +36 30 095 3685
+
+
+ Web: www.archline.hu
+
+ ';
+
+ $info = 'Felhívjuk a figyelmét, a szerződés idő előtti felmondása esetén a továbbiakban nem lesz jogosult a frissített változat használatára.
+Kollégánk hamarosan felveszi Önnel a kapcsolatot. ';
+ }
+
+ $topicID = 322;
+ $strPlace = '';
+ }
+
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+ $db->setQuery("INSERT INTO `" . CRMADATBAZIS . "`.`u_history` (`nUserID`,`nTopicID`,`dateEvent`,`strPlace`,`nManagerID`,`insertDate`,`strInfo`) VALUES ('" . $nUserID . "', '" . $topicID . "', '" . date('Y-m-d', time()) . "', '" . $strPlace . "','36','" . date('Y-m-d H:i:s', time()) . "', '{$info}');");
+ $db->execute();
+
+ $mail = new PHPMailer;
+ $mail->IsSMTP();
+ $mail->Host = 'localhost';
+ $mail->CharSet = 'UTF-8';
+ $mail->SMTPAuth = true;
+ $mail->Username = 'www.smtp@cadline.hu';
+ $mail->Password = 'Chieng0t';
+ $mail->WordWrap = 50;
+ $mail->From = 'info@cadline.hu';
+ $mail->FromName = 'www.archline.hu';
+ $mail->AddAddress($strEmail);
+ $mail->AddBCC('office@cadline.hu');
+ $mail->AddBCC('info@cadline.hu');
+ $mail->IsHTML(true);
+ $mail->Subject = 'Karbantartási szerződés lemondása - ' . $strName;
+ $mail->Body = $msg;
+ $mail->Send();
+
+ $hlNum = substr($programData->prPass, 0, 6);
+
+ $db = JFactory::getDbo();
+ $query = $db->getQuery(true);
+
+ $db->setQuery("UPDATE `" . CRMADATBAZIS . "`.`hardlock` SET
+ maintenance_valid = 0, maint_expiration = '{$maint_expiration}'
+ WHERE hlNum = '" . $hlNum . "' LIMIT 1;");
+ $db->execute();
+ }
+} // end of class
diff --git a/cadline/modules/modules/mod_alusers/index.html b/cadline/modules/modules/mod_alusers/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_alusers/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_alusers/language/en-GB/en-GB.mod_alusers.ini b/cadline/modules/modules/mod_alusers/language/en-GB/en-GB.mod_alusers.ini
new file mode 100644
index 00000000..d92d6e97
--- /dev/null
+++ b/cadline/modules/modules/mod_alusers/language/en-GB/en-GB.mod_alusers.ini
@@ -0,0 +1,4 @@
+MOD_ARCHLINE_USERS="ARCHLine users"
+MOD__P___ARCHLINE_USERS___P_="
+ ARCHLine users
+
"
diff --git a/cadline/modules/modules/mod_alusers/language/en-GB/en-GB.mod_alusers.sys.ini b/cadline/modules/modules/mod_alusers/language/en-GB/en-GB.mod_alusers.sys.ini
new file mode 100644
index 00000000..d92d6e97
--- /dev/null
+++ b/cadline/modules/modules/mod_alusers/language/en-GB/en-GB.mod_alusers.sys.ini
@@ -0,0 +1,4 @@
+MOD_ARCHLINE_USERS="ARCHLine users"
+MOD__P___ARCHLINE_USERS___P_="
+ ARCHLine users
+
"
diff --git a/cadline/modules/modules/mod_alusers/language/hu-HU/hu-HU.mod_alusers.ini b/cadline/modules/modules/mod_alusers/language/hu-HU/hu-HU.mod_alusers.ini
new file mode 100644
index 00000000..d92d6e97
--- /dev/null
+++ b/cadline/modules/modules/mod_alusers/language/hu-HU/hu-HU.mod_alusers.ini
@@ -0,0 +1,4 @@
+MOD_ARCHLINE_USERS="ARCHLine users"
+MOD__P___ARCHLINE_USERS___P_="
+ ARCHLine users
+
"
diff --git a/cadline/modules/modules/mod_alusers/language/hu-HU/hu-HU.mod_alusers.sys.ini b/cadline/modules/modules/mod_alusers/language/hu-HU/hu-HU.mod_alusers.sys.ini
new file mode 100644
index 00000000..d92d6e97
--- /dev/null
+++ b/cadline/modules/modules/mod_alusers/language/hu-HU/hu-HU.mod_alusers.sys.ini
@@ -0,0 +1,4 @@
+MOD_ARCHLINE_USERS="ARCHLine users"
+MOD__P___ARCHLINE_USERS___P_="
+ ARCHLine users
+
"
diff --git a/cadline/modules/modules/mod_alusers/mod_alusers.php b/cadline/modules/modules/mod_alusers/mod_alusers.php
new file mode 100644
index 00000000..4621a801
--- /dev/null
+++ b/cadline/modules/modules/mod_alusers/mod_alusers.php
@@ -0,0 +1,178 @@
+addStyleSheet("/modules/mod_alusers/assets/css/newstyle.css");
+$doc->addScript("/modules/mod_alusers/assets/js/script.js");
+
+$path = JFactory::getURI()->getPath();
+$arr = explode('/', $path);
+$alias = end($arr);
+
+$user = JFactory::getUser();
+$profile = JUserHelper::getProfile($user->id);
+$lang = JFactory::getLanguage()->getTag();
+$crmUser = ModAlusersHelper::getUserFromCRM((int)$user->nUserID);
+$policy = ModAlusersHelper::getPrivacyPolicy((int)$user->nUserID);
+$isStudent = ModAlusersHelper::isStudent((int)$user->nUserID);
+$groups = $user->get('groups');
+$input = $app->input;
+if (in_array(2, $groups)) $pdf = ModAlusersHelper::getUserPDF((int)$user->nUserID);
+
+if ((int)$user->nUserID > 0) {
+ $value = $app->input->cookie->get('alSessionID', null); // Get the cookie
+ if ($value == null) // If there's no cookie value, manually set it
+ {
+ $app->input->cookie->set('alSessionID', md5((int)$user->nUserID), (time() + 30), $app->get('cookie_path', '/'), $app->get('cookie_domain'), $app->isSSLConnection()); // Set the cookie
+ $app->input->cookie->set('alUserName', $user->name, (time() + 30), $app->get('cookie_path', '/'), $app->get('cookie_domain'), $app->isSSLConnection()); // Set the cookie
+ }
+}
+
+// ha még új a user, és nincs benne a crm rendszerben, akkor megpróbál egy user szinkronizációt
+if ($user->nUserID === NULL) {
+ file_get_contents("http://www.archline.hu/maintenance/sync_user.php");
+ $res = ModAlusersHelper::getIdFromEmail($user->username);
+ if ((int)$res > 0) $user->nUserID = $res;
+}
+
+// hírlevél beállítások mentése
+if (isset($_POST) && !empty($_POST) && isset($_POST['nl'])) {
+ if ((int)$_POST['del_email'] == 0 && trim($_POST['new_email']) == '') ModAlusersHelper::saveNewsletters($user->nUserID, $_POST['newsletter']);
+ ModAlusersHelper::newEmail($user->nUserID, $_POST['new_email']);
+ ModAlusersHelper::delEmail($user->nUserID, (int)$_POST['del_email']);
+ $user = JFactory::getUser(); // újra beolvassa az adatbázisból a rekordot mentés után
+ $crmUser = ModAlusersHelper::getUserFromCRM((int)$user->nUserID); // újra beolvassa az adatbázisból a rekordot mentés után
+ JFactory::getApplication()->enqueueMessage(JText::_('MOD_ARCHLINE_NEWSLETTER_SETTINGS_SUCCESS'), 'message');
+}
+
+// személyes adatok mentése
+if (isset($_POST) && !empty($_POST) && isset($_POST['ps'])) {
+ ModAlusersHelper::savePersonalSettings($user->nUserID, $_POST);
+ $user = JFactory::getUser(); // újra beolvassa az adatbázisból a rekordot mentés után
+ $crmUser = ModAlusersHelper::getUserFromCRM((int)$user->nUserID); // újra beolvassa az adatbázisból a rekordot mentés után
+ JFactory::getApplication()->enqueueMessage(JText::_('MOD_ARCHLINE_PERSONAL_DATA_SUCCESS'), 'message');
+}
+
+// személyes adatok és hírlevél beállítások mentése
+if (isset($_POST) && !empty($_POST) && isset($_POST['psSettings']) && in_array(2, $groups)) {
+ if ((int)$_POST['del_email'] == 0 && trim($_POST['new_email']) == '') ModAlusersHelper::saveNewsletters($user->nUserID, $_POST['newsletter']);
+ ModAlusersHelper::newEmail($user->nUserID, $_POST['new_email']);
+ ModAlusersHelper::delEmail($user->nUserID, (int)$_POST['del_email']);
+ ModAlusersHelper::savePersonalSettings($user->nUserID, $_POST);
+ $user = JFactory::getUser(); // újra beolvassa az adatbázisból a rekordot mentés után
+ $crmUser = ModAlusersHelper::getUserFromCRM((int)$user->nUserID); // újra beolvassa az adatbázisból a rekordot mentés után
+ JFactory::getApplication()->enqueueMessage(JText::_('MOD_ARCHLINE_PERSONAL_DATA_SUCCESS'), 'message');
+}
+
+// számlázási adatok mentése
+if (isset($_POST) && !empty($_POST) && isset($_POST['invoiceSettings']) && in_array(2, $groups)) {
+ ModAlusersHelper::saveInvoiceSettings($user->nUserID, $app->input->post);
+ $user = JFactory::getUser(); // újra beolvassa az adatbázisból a rekordot mentés után
+ $crmUser = ModAlusersHelper::getUserFromCRM((int)$user->nUserID); // újra beolvassa az adatbázisból a rekordot mentés után
+ JFactory::getApplication()->enqueueMessage(JText::_('MOD_ARCHLINE_INVOICE_DATA_SUCCESS'), 'message');
+}
+
+// új jelszó mentése
+if (isset($_POST) && !empty($_POST) && isset($_POST['pw'])) {
+ $pass1 = trim(addslashes($_POST['password1']));
+ $pass2 = trim(addslashes($_POST['password2']));
+
+ if ($pass1 != $pass2) {
+ JFactory::getApplication()->enqueueMessage(JText::_('MOD_ARCHLINE_PASSWORD_CHANGE_ERROR'), 'error');
+ } elseif (strlen($pass1) < 6 || strlen($pass1) > 32) {
+ JFactory::getApplication()->enqueueMessage(JText::_('MOD_ARCHLINE_PASSWORD_CHANGE_ERROR2'), 'error');
+ } else {
+ ModAlusersHelper::savePassword($user->id, $pass1);
+ JFactory::getApplication()->enqueueMessage(JText::_('MOD_ARCHLINE_PASSWORD_CHANGE_SUCCESS'), 'message');
+ }
+}
+
+if (isset($_POST) && !empty($_POST) && isset($_POST['privacy_policy_value'])) {
+ $db = JFactory::getDbo();
+ $db->setQuery("SELECT * FROM `" . CRMADATBAZIS . "`.`users` WHERE privacy_policy = 1 AND nUserID = '" . $user->nUserID . "';");
+ $result = $db->loadObjectList();
+
+ if (empty($result)) {
+ $db->setQuery("UPDATE cl_hlusers.users SET privacy_policy = 1, privacy_date = '" . date('Y-m-d') . "', nUserStatus = 7 WHERE nUserID = " . $user->nUserID . " LIMIT 1;");
+ $db->execute();
+
+ $db->setQuery("SELECT * FROM `" . CRMADATBAZIS . "`.`u_history` WHERE nTopicID = 102 AND nUserID = '" . $user->nUserID . "' ORDER BY nEventID DESC;");
+ $result2 = $db->loadObjectList();
+ $newStrInfo = $result2[0]->strInfo;
+ $newStrInfo = " Elfogadta: Igen Dátum: " . date('Y-m-d');
+
+ $db->setQuery("UPDATE cl_hlusers.u_history SET strInfo = '" . $newStrInfo . "' WHERE nEventID = " . $result2[0]->nEventID . " LIMIT 1;");
+ $db->execute();
+ }
+
+ if (isset($_POST['al_xp']))
+ header("Location: https://www.archline.hu/index.php?option=com_phocadownload&view=category&download=6779&id=6");
+ /*if (isset($_POST['al_live']))
+ header("Location: https://www.archline.hu/index.php?option=com_phocadownload&view=category&download=355&id=21");*/
+ exit();
+}
+
+$newsletterEmails = ModAlusersHelper::getNewsletterEmails($user->nUserID);
+
+$ids[] = $user->nUserID;
+$emails = ModAlusersHelper::getEmails($user->email);
+if ($emails && count($emails) > 0) {
+ foreach ($emails as $tmp) {
+ $ids[] = $tmp->nUserID;
+ }
+}
+
+if (!empty($ids))
+ $kulcsok = ModAlusersHelper::getAllKeyData($ids);
+
+if ($alias == 'aikreditek' || $alias == 'aicredits') {
+ $creditHistory = ModAlusersHelper::getCredits($user->nUserID);
+ $remainingCredits = ModAlusersHelper::getRemainingCredits($user->nUserID);
+ $dateFormat = $alias == 'aikreditek' ? 'Y.m.d.' : 'd.m.Y';
+}
+
+if ($alias == 'licenszek' || $alias == 'licenses') {
+ $supportArray = array();
+ $userData = ModAlusersHelper::getUserData($user->nUserID);
+
+ if (isset($_POST) && !empty($_POST) && isset($_POST['privacyPolicyBtn'])) {
+ $programData = ModAlusersHelper::getProgramData($_POST['prID']);
+ if ($programData->maintenance_valid == 1) {
+ if ($_POST['maintenance_privacy_policy_value'] != '1') {
+ JFactory::getApplication()->enqueueMessage(JText::_('MOD_ARCHLINE_MAINTENANCE_PRIVACY_POLICY_ERROR'), 'error');
+ } else {
+ ModAlusersHelper::sendMaintenanceEmail($user->nUserID, $userData->strName, $userData->email, $_POST['prID']);
+ JFactory::getApplication()->enqueueMessage(JText::_('MOD_ARCHLINE_MAINTENANCE_SUCCESS'), 'success');
+ }
+ }
+ }
+
+ $currentVer = ModAlusersHelper::getCurrentVersion();
+ $latestVerID = ModAlusersHelper::getLatestVersion($user->nUserID, $ids);
+ $latestPrograms = ModAlusersHelper::getLatestPrograms($user->nUserID, $latestVerID, $ids);
+ $olderPrograms = ModAlusersHelper::getOlderPrograms($user->nUserID, $latestVerID, $ids);
+ $liveVerID = 23;
+ $latestLive = array();
+
+ $latestArray = array();
+
+ $updateLink = $lang == 'hu-HU' ? '/vasarlas/frissites-karbantartas' : '/buy/upgrade';
+}
+
+if (!$kulcsok && !$user->guest) {
+ $ids[] = $user->nUserID;
+ if (!empty($ids) && $user->nUserID > 0) $kulcsok = ModAlusersHelper::getAllKeyData($ids);
+}
+
+require JModuleHelper::getLayoutPath('mod_alusers', $params->get('layout', 'default'));
diff --git a/cadline/modules/modules/mod_alusers/mod_alusers.xml b/cadline/modules/modules/mod_alusers/mod_alusers.xml
new file mode 100644
index 00000000..411eb45a
--- /dev/null
+++ b/cadline/modules/modules/mod_alusers/mod_alusers.xml
@@ -0,0 +1,151 @@
+
+
+ MOD_ARCHLINE_USERS
+ Apr 2017
+ Zsolt Fekete
+ zsolt.fekete@cadline.hu
+ https://www.facbook.com/mcleod78
+ Copyright © 2017 - All rights reserved.
+ GNU General Public License v2.0
+ 0.0.1
+ MOD__P___ARCHLINE_USERS___P_
+
+ mod_alusers.php
+ mod_alusers.xml
+ index.html
+ language
+ tmpl
+ assets
+
+
+
+
+
+
+
+
+
+ JGLOBAL_USE_GLOBAL
+ COM_MODULES_FIELD_VALUE_NOCACHING
+
+
+
+
+
+
+
+
+
+
+
+
+ en-GB/en-GB.mod_alusers.sys.ini
+ en-GB/en-GB.mod_alusers.ini
+ hu-HU/hu-HU.mod_alusers.sys.ini
+ hu-HU/hu-HU.mod_alusers.ini
+
+
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_alusers/tmpl/default.php b/cadline/modules/modules/mod_alusers/tmpl/default.php
new file mode 100644
index 00000000..f1d518a8
--- /dev/null
+++ b/cadline/modules/modules/mod_alusers/tmpl/default.php
@@ -0,0 +1,1120 @@
+
+
+id > 0) : ?>
+ getTag();
+ $groups = $user->get('groups');
+ $jml_user = JFactory::getUser();
+
+ $path = &JFactory::getURI()->getPath();
+ $arr = explode('/', $path);
+ $alias = end($arr);
+
+ $resHardlocks = array();
+ $currentDate = new DateTime();
+ $resContacts = array("1", "3", "6", "7");
+ $backLink = $result == "hu-HU" ? 'https://www.archline.hu/felhasznalo' : 'https://www.archlinexp.com/user';
+
+ $_GET["source"] = isset($_GET["source"]) ? $_GET["source"] : '';
+ ?>
+
+
+
+
+ = JText::_('MOD_ARCHLINE_BACK') ?>
+
+
+
+
+ = JText::_('MOD_ARCHLINE_PERSONAL_DATA_SETTINGS') ?>
+
+
+
+
+ = JText::_('MOD_ARCHLINE_NEWSLETTER_TEXT2') ?>
+
+
+
+ = JText::_('MOD_ARCHLINE_INVOICE_DATA_SETTINGS') ?>
+
+
+
+
+
+
+
+ = JText::_('MOD_ARCHLINE_CONTRACTS') ?>
+
+
+
+
+
+
+ = JText::_('MOD_ARCHLINE_NAME') ?>
+ Info
+ = JText::_('MOD_ARCHLINE_DATE') ?>
+ = JText::_('MOD_ARCHLINE_DOWNLOAD') ?>
+
+
+
+
+ nUserID}/{$value->file_name}{$value->file_extension}";
+ ?>
+
+ = $value->file_name ?>
+ = $value->strInfo ?>
+ = $value->add_DateTime ?>
+ = JText::_('MOD_ARCHLINE_DOWNLOAD') ?>
+
+
+
+
+
+
+
+ kulcs_kod);
+ $dateTo = new DateTime($lastProgram->prInvoiceDateTo);
+ $resurrence = $lastProgram->prInvoiceRecurrence;
+
+ if ($currentDate <= $dateTo && $lastProgram->prInvoiceDateTo != '' && in_array($lastProgram->prContact, $resContacts))
+ array_push($resHardlocks, $kulcs->kulcs_kod);
+ }
+ }
+ ?>
+
+
+
+
+ = JText::_('MOD_ARCHLINE_NEXT_INVOICE') ?>
+
+
+ prInvoiceDateFrom);
+ $dateTo = new DateTime($lastProgram->prInvoiceDateTo);
+ $resurrence = $lastProgram->prInvoiceRecurrence;
+ $contact = ModAlusersHelper::getContactName($lastProgram->prContact);
+ $contName = $result == "hu-HU" ? $contact->contName : $contact->contName_Eng;
+
+ while ($dateFrom < $currentDate) $dateFrom->modify("+{$resurrence} month");
+ ?>
+
+
+
+
+
+ = JText::_('MOD_ARCHLINE_PRODUCT') ?>
+ = JText::_('MOD_ARCHLINE_AMOUNT') ?>
+ = JText::_('MOD_ARCHLINE_DUE_DATE') ?>
+
+
+
+
+ = $contName ?>
+ = $lastProgram->prPrice ?> = JText::_('MOD_ARCHLINE_MONEY') ?> + = JText::_('MOD_ARCHLINE_VAT') ?>
+ = $dateFrom->format('Y-m') ?>
+
+
+
+
+
+
+
+
+
+ = JText::_('MOD_ARCHLINE_COURSE_CONTRACT') ?>
+ = JText::_('MOD_ARCHLINE_DOWNLOAD') ?>
+
+
+
+
+
+
+
+ = JModuleHelper::renderModule(JModuleHelper::getModule('custom', 'Tanfolyami szerződés')) ?>
+
+
+
+
+
+
+
+
+
+
+
+ = JText::_('MOD_ARCHLINE_PASSWORD_CHANGE') ?>
+
+
+ = JText::_('MOD_ARCHLINE_PASSWORD_CHANGE_TEXT1') ?>
+
+
+
+
+
+
+
+
= JText::_('MOD_ARCHLINE_CREDITS') ?>
+
+
+
+
+
+
+
+
+
+
= JText::_('MOD_ARCHLINE_CREDIT_REQ') ?>
+
= JText::_('MOD_ARCHLINE_SELL_DATE') ?>: = date($dateFormat, strtotime($credit->created_at)) ?>
+
= JText::_('MOD_ARCHLINE_CREDIT_PURCHASED') ?>: = $credit->credit ?>
+
= JText::_('MOD_ARCHLINE_CREDIT_AVAILABLE') ?>: = $remainingCredits ?>
+
= JText::_('MOD_ARCHLINE_EXPIRY_DATE') ?>: = date($dateFormat, strtotime('+1 year', strtotime($credit->created_at))) ?>
+
+
+
+
+
+
+ id != $credit->id) : ?>
+
+
+
+
+
+
+
+
+
+
+
= JText::_('MOD_ARCHLINE_LATEST') ?>
+
+
+
+ verName;
+ $isid = crm_hardlock::GetIsidFromTimeCode($latest->prActCode);
+ $computer = ModAlusersHelper::getComputerData($latest->prPass, $isid);
+
+ array_push($latestArray, $latest->prHlNum);
+
+ if (substr($latest->prPass, 0, 2) == 99) $latest->typeName = "Non-Profit";
+
+ if (strpos($latest->prPass, 'L') !== false) {
+ $version .= ' LIVE';
+ $icon = '/public/img/icons/ARCHLineXP_Live_24_logo.png';
+ } elseif ($latest->prTypeID == 4) {
+ $version .= ' LT';
+ $icon = '/public/img/icons/ARCHLINE_LT_semleges.ICO';
+ } else {
+ $icon = '/public/img/icons/ARCHLINE_semleges.ICO';
+ }
+
+ $contact = $latest->prFizetve != '2050-01-01' ? $latest->prFizetve : JText::_('MOD_ARCHLINE_PERPETUAL');
+
+ if ($alias == 'licenszek' && in_array($latest->prContact, $cont_array)) {
+ if ($latest->prContact == 1)
+ $contact .= ', Előfizetés ';
+ elseif ($latest->prContact == 5)
+ $contact .= ', Non-Profit';
+ else
+ $contact .= ', Állandó licenc';
+ }
+
+ $msg = Codegen::IsSoftwareKey($latest->prPass) ? JText::_('MOD_ARCHLINE_YES') : JText::_('MOD_ARCHLINE_NO');
+
+ $seatID = false;
+ $isFloating = false;
+
+ if (crm_hardlock::isFloating($latest->prPass)) {
+ $isFloating = true;
+ if ($latest->prVerID >= 23) {
+ $msg .= ' (';
+ $msg .= JText::_('MOD_ARCHLINE_FLOATING');
+ }
+
+ if ($seatID = crm_hardlock::activeFloating($latest->prPass, $isid)) {
+ if ($latest->prVerID >= 23) {
+ $floatingLic = crm_hardlock::getFloatingLic($latest->prPass, $seatID);
+
+ if ($floatingLic['offline_expiration_date'] != '' && $floatingLic['offline_expiration_date'] >= date('Y-m-d'))
+ $msg .= ', ' . JText::_('MOD_ARCHLINE_OFFLINE');
+ }
+ }
+
+ if ($latest->prVerID >= 23)
+ $msg .= ')';
+ }
+ ?>
+
+
+
+
+
+
+
+
= $version ?> - = $latest->typeName ?>
+
= JText::_('MOD_ARCHLINE_SERIAL_NUMBER_LEGEND') ?>: = $latest->prPass ?>
+
= JText::_('MOD_ARCHLINE_EXP_DATE') ?>: = $contact ?>
+
+
Terméktámogatásra jogosult : = $supportText = ModAlusersHelper::getSupport($latest->prContact, $latest->maintenance_valid, $latest->maint_expiration, $latest->prFizetve, $latest->prSellDate) ?>
+
+ prHlNum, $supportArray)) {
+ $supportArray[$latest->prHlNum] = $supportText;
+ }
+ ?>
+
+ prInfo != ''): ?>
+
Info: = $latest->prInfo ?>
+
+
= JText::_('MOD_ARCHLINE_SHOW_MORE') ?>
+
+
= JText::_('MOD_ARCHLINE_ACTIVATION_NUMBER_LEGEND') ?>: = $latest->prSellDate != '0000-00-00' ? $latest->prActCode : '' ?>
+
+
+ computer_name != '') : ?>
+
= JText::_('MOD_ARCHLINE_COMPUTER_NAME') ?>: = $computer->computer_name ?>
+
+
+ computer_id != '') : ?>
+
= JText::_('MOD_ARCHLINE_COMPUTER_ID') ?>: = $computer->computer_id ?>
+
+
+
+
= JText::_('MOD_ARCHLINE_PROT') ?>: = $msg ?>
+
+
+
+ prPass) && crm_hardlock::IsActiveProgram($latest->prPass, $isid)) : ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ hlCtrID == 36 && $latest->prStat == 0 && $latest->maintenance_valid == 1 && ($latest->prContact == 2 || $latest->prContact == 6 || ($latest->prContact == 7 && $latest->prFizetve == '2050-01-01'))) : ?>
+
= JText::_('MOD_ARCHLINE_CANCEL_MAINTENANCE') ?>
+
+
+
+
+
+
+
+ ' . $latest->prHlNum . '', $maintenance);
+ $customMsg = '';
+ $prFizetve = $latest->prFizetve;
+
+ $programYear = ModAlusersHelper::getYearFromVerID($latest->prVerID);
+
+ if ($programYear > date('Y') && date('Y-m-d') < date('Y') . '-12-31') {
+ $previousProgramData = ModAlusersHelper::getPreviousProgramData($latest->prHlNum);
+ $programYear = ModAlusersHelper::getYearFromVerID($previousProgramData->prVerID);
+
+ $prFizetve = $previousProgramData->prFizetve;
+ }
+
+ if ($prFizetve == '2050-01-01') {
+ $customMsg = '
Szerződés lemondás folyamata
+
';
+ $customMsg .= 'A KARBANTARTÁSI SZERZŐDÉS ' . date('Y') . '.12.31 napján megszűnik. ';
+ $customMsg .= 'A jelen karbantartási szerződéssel kapcsolatban tovább számlát nem küldünk. ';
+ $customMsg .= ' ';
+ $customMsg .= 'Levelet küldünk a felhasználói fiókjához tartozó e-mail címre:
' . $userData->email . ' ';
+
+ $customMsg .= '
+ Amennyiben nem találja a visszaigazoló levelet a Beérkező levelek között, kérjük, ellenőrizze a levélszemét mappát is levelezőjében!';
+ } else {
+ $customMsg = 'Kollégánk hamarosan felveszi Önnel a kapcsolatot.';
+
+ if ($latest->prContact == 2) {
+ $customMsg = 'Szerződés lemondás folyamata - két lehetőség van:
+
+
+
Szerződés lemondása ' . date('Y', strtotime('+1 year')) . '.01.01-től ,
+
+
+ vagy
+
+
+
Szerződés lemondása 90 napra
+
+
+ Levelet küldünk a felhasználói fiókjához tartozó e-mail címre:
' . $userData->email . ' ';
+
+ $customMsg .= '
+ Amennyiben nem találja a visszaigazoló levelet a Beérkező levelek között, kérjük, ellenőrizze a levélszemét mappát is levelezőjében!';
+ }
+
+ if ($latest->prContact == 6) {
+ $expiration = strtotime($prFizetve);
+ $needInvoice = false;
+
+ $expire = '';
+
+ if (ModAlusersHelper::QuaterlyPaid($prFizetve)) {
+ $expire = ModAlusersHelper::getQuarterlySupportPaid($prFizetve);
+ } else {
+ $expire = ModAlusersHelper::getQuarterlySupportNotPaid($prFizetve);
+ $needInvoice = true;
+ }
+
+ $customMsg = '
Szerződés lemondás folyamata
+
';
+
+ if ($needInvoice) {
+ $customMsg .= 'Várjuk a már kiállított számla rendezését. ';
+ }
+
+ $customMsg .= 'A KARBANTARTÁSI SZERZŐDÉS ' . str_replace("-", ".", $expire) . '. napján megszűnik. ';
+
+ if (!$needInvoice) {
+ $customMsg .= 'A jelen karbantartási szerződéssel kapcsolatban tovább számlát nem küldünk. ';
+ }
+ $customMsg .= ' ';
+
+ $customMsg .= 'Levelet küldünk a felhasználói fiókjához tartozó e-mail címre:
' . $userData->email . ' ';
+
+ $customMsg .= '
+ Amennyiben nem találja a visszaigazoló levelet a Beérkező levelek között, kérjük, ellenőrizze a levélszemét mappát is levelezőjében!';
+ }
+
+ if ($latest->prContact == 7) {
+ $customMsg = 'Felhívjuk a figyelmét, a szerződés idő előtti felmondása esetén a továbbiakban nem lesz jogosult a frissített változat használatára.
+
+ Kollégánk hamarosan felveszi Önnel a kapcsolatot. ';
+ }
+ }
+
+ $maintenance = str_replace('{CUSTOM_MSG}', $customMsg, $maintenance);
+
+ echo $maintenance;
+ ?>
+
+
+
+
+
+
+
+
+
+ verID != $latest->prVerID) : ?>
+
= JText::_('MOD_ARCHLINE_UPDATE') ?>
+
+
+
+
+ prID != $latest->prID) : ?>
+
+
+
+
+
+
+
+
+
+
+
= JText::_('MOD_ARCHLINE_OLRDER') ?>
+
+
+
+ verName;
+ $isid = crm_hardlock::GetIsidFromTimeCode($older->prActCode);
+ $computer = ModAlusersHelper::getComputerData($older->prPass, $isid);
+
+ if (substr($older->prPass, 0, 2) == 99) $older->typeName = "Non-Profit";
+
+ if (strpos($older->prPass, 'L') !== false) {
+ $version .= ' LIVE';
+ $icon = '/public/img/icons/ARCHLineXP_Live_24_logo.png';
+
+ if ($liveVerID == $older->prVerID) {
+ array_push($latestLive, $older->prHlNum);
+ }
+ } elseif ($older->prTypeID == 4) {
+ $version .= ' LT';
+ $icon = '/public/img/icons/ARCHLINE_LT_semleges.ICO';
+ } else {
+ $icon = '/public/img/icons/ARCHLINE_semleges.ICO';
+ }
+
+ $contact = $older->prFizetve != '2050-01-01' ? $older->prFizetve : JText::_('MOD_ARCHLINE_PERPETUAL');
+
+ if ($alias == 'licenszek' && in_array($older->prContact, $cont_array)) {
+ if ($older->prContact == 1)
+ $contact .= ', Előfizetés ';
+ elseif ($older->prContact == 5)
+ $contact .= ', Non-Profit';
+ else
+ $contact .= ', Állandó licenc';
+ }
+
+ $msg = Codegen::IsSoftwareKey($older->prPass) ? JText::_('MOD_ARCHLINE_YES') : JText::_('MOD_ARCHLINE_NO');
+
+ $seatID = false;
+ $isFloating = false;
+
+ if (crm_hardlock::isFloating($older->prPass)) {
+ $isFloating = true;
+ if ($older->prVerID >= 23) {
+ $msg .= ' (';
+ $msg .= JText::_('MOD_ARCHLINE_FLOATING');
+ }
+
+ if ($seatID = crm_hardlock::activeFloating($older->prPass, $isid)) {
+ if ($older->prVerID >= 23) {
+ $floatingLic = crm_hardlock::getFloatingLic($older->prPass, $seatID);
+
+ if ($floatingLic['offline_expiration_date'] != '' && $floatingLic['offline_expiration_date'] >= date('Y-m-d'))
+ $msg .= ', ' . JText::_('MOD_ARCHLINE_OFFLINE');
+ }
+ }
+
+ if ($older->prVerID >= 23)
+ $msg .= ')';
+ }
+ ?>
+
+
+
+
+
+
+
+
= $version ?> - = $older->typeName ?>
+
= JText::_('MOD_ARCHLINE_SERIAL_NUMBER_LEGEND') ?>: = $older->prPass ?>
+
= JText::_('MOD_ARCHLINE_EXP_DATE') ?>: = $contact ?>
+
= JText::_('MOD_ARCHLINE_PROT') ?> : = $msg ?>
+
+
Terméktámogatásra jogosult : = ModAlusersHelper::getSupportForOlder($older->prHlNum, $supportArray, $older->maint_expiration, $older->prContact, $older->prSellDate) ?>
+
+
= JText::_('MOD_ARCHLINE_SHOW_MORE') ?>
+
+
= JText::_('MOD_ARCHLINE_ACTIVATION_NUMBER_LEGEND') ?>: = $older->prSellDate != '0000-00-00' ? $older->prActCode : '' ?>
+
+
+ computer_name != '') : ?>
+
= JText::_('MOD_ARCHLINE_COMPUTER_NAME') ?>: = $computer->computer_name ?>
+
+
+ computer_id != '') : ?>
+
= JText::_('MOD_ARCHLINE_COMPUTER_ID') ?>: = $computer->computer_id ?>
+
+
+
+
+
+ prPass) && crm_hardlock::IsActiveProgram($older->prPass, $isid)) : ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ verID != $older->prVerID && !in_array($older->prHlNum, $latestArray) && !in_array($older->prHlNum, $latestLive)) : ?>
+
= JText::_('MOD_ARCHLINE_UPDATE') ?>
+
+
+
+ prID != $older->prID) : ?>
+
+
+
+
+
+
+ username}");
+
+ if (isset($_POST["unregister"]))
+ header("Refresh:0");
+ }
+
+ if (isset($_POST["unlockFloating"]) || isset($_GET["unlockFloating"])) {
+ crm_hardlock::floatingUnlock($_POST["prPass"], $_POST["seatID"], true);
+
+ if (isset($_POST["unlockFloating"]))
+ header("Refresh:0");
+ }
+ ?>
+
+
+
+
+
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_alusers/tmpl/index.html b/cadline/modules/modules/mod_alusers/tmpl/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_alusers/tmpl/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_alworkshops/assets/ajax/BaseController.class.php b/cadline/modules/modules/mod_alworkshops/assets/ajax/BaseController.class.php
new file mode 100644
index 00000000..ad1e8319
--- /dev/null
+++ b/cadline/modules/modules/mod_alworkshops/assets/ajax/BaseController.class.php
@@ -0,0 +1,26 @@
+procEvent();
+ }
+
+ public function printSession($key="")
+ {
+ print "".print_r(($key=="" ? $_SESSION : $_SESSION[$key]),true)." ";
+ }
+}
+?>
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_alworkshops/assets/ajax/alworkshops.class.php b/cadline/modules/modules/mod_alworkshops/assets/ajax/alworkshops.class.php
new file mode 100644
index 00000000..ee3449dc
--- /dev/null
+++ b/cadline/modules/modules/mod_alworkshops/assets/ajax/alworkshops.class.php
@@ -0,0 +1,502 @@
+ 'hu-HU', 'eng' => 'en-GB');
+ protected $arrWebinarTopic = array('hun' => _WEBINAR_HUNGARIAN_, 'eng' => _WEBINAR_ENGLISH_);
+
+ public function procEvent()
+ {
+ $message = array();
+ $this->transid = md5(_TIME_);
+
+ // $nUserID=0;
+
+ if ($this->auth() == FALSE) die();
+
+ // nyelvi file betöltése
+ $this->lang = (isset($_POST['lang']) && in_array(trim(strtolower($_GET['lang'])), $this->arrLang) ? trim(strtolower($_GET['lang'])) : $this->getLang());
+ $this->_LANG = parse_ini_file($_SERVER['DOCUMENT_ROOT'] . "/language/" . $this->arrLC[$this->lang] . "/" . $this->arrLC[$this->lang] . "." . $this->component . ".ini");
+
+ // kurzus lekérdezése
+ MySqlHelper::getInstance()->query("SELECT s.`level`,s.`tanfsor`,s.`id` as switch_id,c.* FROM `alworkshops_courses` c LEFT OUTER JOIN `alworkshops_switch` s ON c.alias=s.alias WHERE c.`published`='Y' AND c.`id`=" . (int)$_POST['course_id'] . " LIMIT 1;");
+ $course = MySqlHelper::getInstance()->fetchAssoc();
+ $course = $course[0];
+
+ // switch lekérdezése
+ MySqlHelper::getInstance()->query("SELECT * FROM `alworkshops_switch` WHERE id=" . $course['switch_id'] . " LIMIT 1;");
+ $switch = MySqlHelper::getInstance()->fetchAssoc();
+ $switch = $switch[0];
+
+ // user lekérdezése
+ MySqlHelper::getInstance()->query("SELECT * FROM `jml_users` WHERE id=" . (int)$_POST['user_id'] . " LIMIT 1;");
+ $user = MySqlHelper::getInstance()->fetchAssoc();
+ $user = $user[0];
+
+ if ($switch['level'] == 4 && $switch['vizsga'] == 'Y') {
+ $query = "SELECT * FROM tcexam.tce_users WHERE user_email = ?";
+ Database::getInstance()->query($query, array('s', trim($user['email'])));
+ $res4 = Database::getInstance()->fetchNext();
+
+ $query = "DELETE FROM tcexam.tce_usrgroups WHERE usrgrp_user_id = ?";
+ Database::getInstance()->query($query, array('i', $res4['user_id']));
+
+ $tceGroup = array(
+ 'usrgrp_user_id' => $res4['user_id'],
+ 'usrgrp_group_id' => 3
+ );
+ Database::getInstance()->insert("tcexam.tce_usrgroups", $tceGroup, 'ii');
+ }
+
+ // ha tanfolyamot vásárolt, akkor a további fizetos workshop foglalások ingyenesek
+ $currentLease = crm_users::GetValidLease($user['nUserID'], (int)$switch['level']);
+ if ($switch['workshop'] == 'Y' && $currentLease && $course['price'] > 0 && $course['start_date'] >= $currentLease['validFrom'] && $course['start_date'] <= $currentLease['validThrough'] && (int)$course['tanfsor'] > 0) {
+ $course['price'] = 0;
+ $course['vat'] = 0;
+ }
+
+ // application adatok összeállítása
+ $app = array(
+ 'course_id' => (int)$_POST['course_id'],
+ 'user_id' => (int)$_POST['user_id'],
+ 'attendees' => (int)$_POST['attendees'],
+ 'price_per_attendee' => $course['price'],
+ 'price_total' => $course['price'] * (int)$_POST['attendees'],
+ 'price_vat' => $course['vat'],
+ 'gepet_kerek' => (isset($_POST['gepet_kerek']) ? 'Y' : 'N'),
+ 'berletem_van' => (isset($_POST['berletem_van']) ? 'Y' : 'N'),
+ 'date' => date('Y-m-d H:i:s', _TIME_),
+ 'published' => 'Y',
+ );
+
+ $this->c = $course;
+
+ /**********************************************
+ * WEBINAIR SIGNUP
+ **********************************************/
+
+ if (($switch['esemeny'] == 'Y' || $switch['webinair'] == 'Y') && isset($_POST['usr']) && isset($_POST['email'])) {
+ // if ($switch['alias']!='archline-klub' && $switch['alias']!='oktatoi-nap' )
+ if ($switch['login'] == 'N') {
+ if (trim($_POST['usr']) == '') {
+ print $this->_LANG['MOD_ARCHLINE_NAME_MISSING'];
+ exit();
+ }
+ if (trim($_POST['email']) == '') {
+ print $this->_LANG['MOD_ARCHLINE_EMAIL_MISSING'];
+ exit();
+ }
+ if (!filter_var(trim($_POST['email']), FILTER_VALIDATE_EMAIL)) {
+ print $this->_LANG['MOD_ARCHLINE_EMAIL_INVALID'];
+ exit();
+ }
+ $_POST['country'] = 0;
+ if ((int)$_POST['prof'] == 0) {
+ print $this->_LANG['MOD_ARCHLINE_PROF_MISSING'];
+ exit();
+ }
+ }
+ if ($course['capacity'] < (int)$_POST['applications'] + (int)$_POST['attendees']) {
+ print "";
+ exit();
+ }
+
+ $nUserID = crm_users::AddUser(
+ array(
+ 'strName' => trim(addslashes(ucwords($_POST['usr']))),
+ 'strEMail' => trim(addslashes($_POST['email'])),
+ 'strTel' => trim(addslashes($_POST['phone'])),
+ 'nUserProf' => (int)$_POST['prof'],
+ 'nCtrID' => (int)$_POST['country']
+ ),
+ 1,
+ 'sssii'
+ );
+
+ if ((int)$nUserID > 0) {
+ MySqlHelper::getInstance()->query("SELECT * FROM `www_archline_hu`.`alworkshops_application` WHERE `course_id`=" . $course['id'] . " AND `email`='" . trim(addslashes($_POST['email'])) . "' AND `published`='Y';");
+ $exist = MySqlHelper::getInstance()->fetchAssoc();
+ if (!$exist) {
+ if ($switch['esemeny'] == 'Y' && $switch['alias'] == 'archline-klub') $nTopicID = _ARCHLINE_KLUB_;
+ if ($switch['esemeny'] == 'Y' && $switch['alias'] != 'archline-klub') $nTopicID = _EVENT_REGISTRATION_;
+ if ($switch['webinair'] == 'Y') $nTopicID = $this->arrWebinarTopic[$this->lang];
+
+ if ($switch['esemeny'] == 'Y' && (in_array($switch['alias'], $this->customCourses))) {
+ $nTopicID = $_SERVER['SERVER_NAME'] == 'www.archlinexp.com' ? 333 : 123;
+ $info = date('Y.m.d.') . ': ' . str_replace("-", ".", $course['start_date']) . ' - ' . str_replace("-", ".", $course['finish_date']);
+ }
+
+ if ($switch['webinair'] == 'Y') {
+ MySqlHelper::getInstance()->query("SELECT * FROM `cl_hlusers`.`users` WHERE `nUserID`=" . $nUserID . ";");
+ $usr = MySqlHelper::getInstance()->fetchAssoc();
+
+ $nTopicID = $usr[0]['old_db'] == 'clusers' ? 336 : 333;
+
+ //$info = $course['id'] == 1108 ? 'Online középfokú tanfolyam' : 'Online alapfokú tanfolyam';
+
+ if ($course['id'] == 1114) {
+ $info = 'Online felsőfokú tanfolyam';
+ }
+ }
+
+ if (is_null($course['course_info']) == false && $course['course_info'] != '')
+ $info = $course['course_info'];
+
+ crm_users::AddUserHistory(
+ array(
+ 'nUserID' => $nUserID,
+ 'nTopicID' => $nTopicID,
+ 'dateEvent' => $course['start_date'],
+ 'strPlace' => $course['title'],
+ 'strInfo' => $info
+ )
+ );
+ } else {
+ //print $this->_LANG['MOD_ARCHLINE_EVENT_ALREADY_EXIST']; exit();
+ $already = $this->_LANG['MOD_ARCHLINE_EVENT_ALREADY_EXIST'];
+ print "";
+ exit();
+ }
+
+ // application rekord mentés
+ $app['user_id'] = $_POST['hidden_id'];
+ $app['name'] = trim(addslashes(ucwords($_POST['usr'])));
+ $app['email'] = trim(addslashes($_POST['email']));
+ MySqlHelper::getInstance()->insert('alworkshops_application', $app);
+ $newID = MySqlHelper::getInstance()->getInsertedId();
+
+ // level kuldes
+ $this->sendEmail($app['course_id'], 0, $newID, $nUserID);
+ $success = $this->_LANG['MOD_ARCHLINE_SUCCESS'];
+ print "";
+ //print $this->_LANG['MOD_ARCHLINE_SUCCESS'];
+ }
+ }
+ /**********************************************
+ * WORKSHOP SIGNUP
+ **********************************************/
+ else if (($switch['kurzus'] == 'Y' || $switch['workshop'] == 'Y' || $switch['vizsga'] == 'Y') && (int)$_POST['user_id'] > 0 && !isset($_POST['usr']) && !isset($_POST['email'])) {
+ MySqlHelper::getInstance()->query("SELECT * FROM alworkshops_application WHERE published='Y' AND user_id=" . $app['user_id'] . " AND course_id=" . $app['course_id'] . " LIMIT 1;");
+ $exist = MySqlHelper::getInstance()->fetchAssoc();
+
+ // hibaüzenetek
+ if (!($switch['kurzus'] === 'Y' && $switch['level'] == 2) && count($exist)) {
+ $message[] = $this->_LANG['MOD_ARCHLINE_ALREADY_EXIST'];
+ }
+
+ if ($switch['alias'] != 'tanulocsoportok') {
+ if (!($switch['kurzus'] === 'Y' && $switch['level'] == 2) && $course['capacity'] < (int)$_POST['applications'] + (int)$_POST['attendees']) {
+ $message[] = $this->_LANG['MOD_ARCHLINE_NOT_ENOUGHT_CAPACITY'];
+ }
+ } else {
+ crm_database::getInstance()->query("SELECT * FROM `www_archline_hu`.`alworkshops_application` WHERE `course_id`=" . $app['course_id'] . " AND published = 'Y';");
+ $exist = crm_database::getInstance()->fetchAssoc();
+
+ $capacity = $course['capacity'] - count($exist);
+
+ if ($capacity <= 0) $message[] = $this->_LANG['MOD_ARCHLINE_NOT_ENOUGHT_CAPACITY'];
+ }
+ if (count($message)) {
+ foreach ($message as $mess) {
+ print $mess . " ";
+ }
+ exit();
+ }
+
+ // átjelentkezési lehetőség ellenőrzése
+ MySqlHelper::getInstance()->query("SELECT a.id AS application_id,a.course_id,s.id AS switch_id,a.user_id,a.published,a.transaction_id,a.price_total,a.pay_id,c.title,c.alias,c.start_date,c.start_time,c.finish_date,c.finish_time
+ FROM `alworkshops_application` a
+ LEFT OUTER JOIN `alworkshops_courses` c ON a.course_id=c.id
+ LEFT OUTER JOIN `alworkshops_switch` s ON c.alias=s.alias
+ WHERE user_id=" . $app['user_id'] . " AND s.id=" . $course['switch_id'] . " AND `start_date`>'" . date('Y-m-d', _TIME_ - (_RESIGN_DAYS_ * 86400)) . "'
+ ORDER BY a.id DESC
+ LIMIT 1;");
+ $this->passthrough = MySqlHelper::getInstance()->fetchAssoc();
+ if (count($this->passthrough)) // átjelentkezés meglévő application rekordra
+ {
+ $this->transid = $this->passthrough[0]['transaction_id'];
+ $newID = $this->passthrough[0]['application_id'];
+ MySqlHelper::getInstance()->update('alworkshops_application', $app, array('id' => $newID));
+
+ // alapfoku tanfolyam kezdo datumanak atallitasa a crm-ben
+ if ($switch['kurzus'] == 'Y' && (int)$switch['level'] == 1) {
+ $topic = _COURSE_PRICE_PRELIMINARY_;
+ $info = '';
+ if ($switch['alias'] == 'tanulocsoportok') {
+ $topic = 380;
+ $info = $switch['title'];
+ }
+ MySqlHelper::getInstance()->query("SELECT * FROM `cl_hlusers`.`u_history` WHERE nUserID=" . $user['nUserID'] . " AND nTopicID=" . $topic . " AND applicationID=" . $newID . " ORDER BY insertDate DESC LIMIT 1;");
+ $exist = MySqlHelper::getInstance()->fetchAssoc();
+ if (count($exist)) {
+ if ($info == '') $info = $exist[0]['strInfo'];
+ $uHistory['nTopicID'] = $topic;
+ $uHistory['dateEvent'] = $course['start_date'];
+ $uHistory['strInfo'] = $info;
+ MySqlHelper::getInstance()->update(CRMADATBAZIS . ".u_history", $uHistory, array('nEventID' => $exist[0]['nEventID']));
+ }
+ }
+
+ // kozepfoku workshop kezdo datumanak atallitasa a crm-ben
+ if ($switch['workshop'] == 'Y' && (int)$switch['level'] == 2) {
+ MySqlHelper::getInstance()->query("SELECT * FROM `cl_hlusers`.`u_history` WHERE nUserID=" . $user['nUserID'] . " AND nTopicID=" . _WORKSHOP_PRICE_ . " AND applicationID=" . $newID . " ORDER BY insertDate DESC LIMIT 1;");
+ $exist = MySqlHelper::getInstance()->fetchAssoc();
+ if (count($exist)) {
+ crm_users::UpdateUserHistory(
+ array(
+ 'dateEvent' => $course['start_date']
+ ),
+ $exist[0]['nEventID'],
+ 's'
+ );
+ }
+ }
+ } else // új application rekord mentés
+ {
+ $app['transaction_id'] = $this->transid;
+ MySqlHelper::getInstance()->insert('alworkshops_application', $app);
+ $newID = MySqlHelper::getInstance()->getInsertedId();
+ }
+
+ if ($switch['kurzus'] == 'Y') {
+ $strPlace = 'Tanfolyam';
+ $nTopicID = _WORKSHOP_APPLICATION_;
+ }
+ if ($switch['workshop'] == 'Y') {
+ $strPlace = 'Workshop';
+ $nTopicID = _WORKSHOP_APPLICATION_;
+ }
+ if ($switch['vizsga'] == 'Y') {
+ $strPlace = 'Vizsga';
+ $nTopicID = _EXAM_APPLICATION_;
+ }
+ if ($switch['alias'] == 'tanulocsoportok') {
+ $strPlace = $switch['title'];
+ $nTopicID = 379;
+ }
+ $datumok = array();
+
+ if ($switch['kurzus'] == 'Y') {
+ // sessionok lekérdezése
+ MySqlHelper::getInstance()->query("SELECT * FROM `alworkshops_sessions` WHERE `published`='Y' AND `courseid`=" . (int)$_POST['course_id'] . ";");
+ $sessions = MySqlHelper::getInstance()->fetchAssoc();
+ foreach ($sessions as $sess) {
+ $datumok[] = array('datum' => $sess['session_date'], 'hely' => $sess['description']);
+ }
+ } else {
+ $datumok[] = array('datum' => $course['start_date'], 'hely' => $course['title']);
+ }
+
+ $info = (trim($app['berletem_van']) == 'Y' ? ' Tanfolyam ,' : '') . (trim($app['gepet_kerek']) == 'Y' ? ' Gépet kér ,' : '');
+ $place = $strPlace . ' - ' . $datum['hely'];
+
+ if ($switch['alias'] == 'tanulocsoportok') {
+ if ($switch['level'] == 1) $info = 'Alapfok';
+ else $info = 'Középfok';
+
+ $place = $strPlace;
+ $info .= ' ' . $course['start_date'] . ' - ' . $course['finish_date'];
+ }
+
+ foreach ($datumok as $datum) {
+ $u_history = array(
+ 'nUserID' => $user['nUserID'],
+ 'nTopicID' => $nTopicID,
+ 'dateEvent' => $datum['datum'],
+ 'strPlace' => $strPlace . ' - ' . $datum['hely'],
+ 'strInfo' => $info,
+ 'nManagerID' => _MANAGER_,
+ 'applicationID' => $newID,
+ );
+
+ MySqlHelper::getInstance()->query("SELECT * FROM `cl_hlusers`.`u_history` WHERE applicationID=" . $newID . " AND strPlace LIKE '%" . trim($datum['hely']) . "%' LIMIT 1;");
+ $exist = MySqlHelper::getInstance()->fetchAssoc();
+ if (empty($exist)) {
+ crm_users::AddUserHistory($u_history);
+ } else {
+ crm_users::UpdateUserHistory($u_history, $exist[0]['nEventID'], 'iisssii');
+ }
+ }
+
+ // user status átállítás
+ crm_users::SetUserStatus($user['nUserID'], 5);
+
+ // level kuldes, CSAK HA INGYENES - a fizetos foglalasokrol a sync_fizetes.php kuldi ki a levelet
+ if ($course['price'] == 0 || ($course['price'] > 0 && count($this->passthrough))) {
+ $this->sendEmail($app['course_id'], $app['user_id'], $newID, $user['nUserID']);
+ }
+
+ if (count($this->passthrough)) {
+ print ($switch['kurzus'] === 'Y' && $switch['level'] == 2 ? $this->_LANG['MOD_ARCHLINE_SUCCESS_TITLE'] : $this->_LANG['MOD_ARCHLINE_PASSTHROUGH_SUCCESS']) . ".";
+ } else {
+ print($course['price'] == 0 ? $this->_LANG['MOD_ARCHLINE_SUCCESS'] : $this->_LANG['MOD_ARCHLINE_SUCCESS_TITLE'] . '. ' . $this->_LANG['MOD_ARCHLINE_SUCCESS_TEXT']);
+ }
+ }
+ }
+
+ public function sendEmail($courseid = 0, $userid = 0, $applicationID = 0, $nUserID = 0)
+ {
+ if ($courseid == 0 || $applicationID == 0) return (FALSE);
+
+ if (!isset($mailconfig)) require_once($_SERVER['DOCUMENT_ROOT'] . '/maintenance/config.mail.php');
+
+ // application rekord lekérdezése
+ MySqlHelper::getInstance()->query("SELECT * FROM alworkshops_application WHERE published='Y' AND id=" . $applicationID . " LIMIT 1;");
+ $app = MySqlHelper::getInstance()->fetchAssoc();
+ $app = $app[0];
+
+ // course rekord lekérdezése
+ MySqlHelper::getInstance()->query("SELECT * FROM alworkshops_courses WHERE published='Y' AND id=" . $courseid . " LIMIT 1;");
+ $course = MySqlHelper::getInstance()->fetchAssoc();
+ $course = $course[0];
+
+ // switch rekord lekérdezése
+ MySqlHelper::getInstance()->query("SELECT * FROM `alworkshops_switch` WHERE alias='" . $course['alias'] . "' LIMIT 1;");
+ $switch = MySqlHelper::getInstance()->fetchAssoc();
+ $switch = $switch[0];
+
+ // user név és email cím lekérdezése
+ MySqlHelper::getInstance()->query($userid == 0 && (int)$nUserID > 0 ?
+ "SELECT `strName` AS `name`,`strEmail` AS `email`, `strTel` AS `strTel` FROM `cl_hlusers`.`users` WHERE nUserID=" . (int)$nUserID . " LIMIT 1;" :
+ "SELECT `name`,`email` FROM `jml_users` WHERE id=" . (int)$userid . " LIMIT 1;");
+ $user = MySqlHelper::getInstance()->fetchAssoc();
+ $user = $user[0];
+
+ if (is_array($course) && count($course) && is_array($user) && count($user)) {
+
+ MySqlHelper::getInstance()->query("SELECT * FROM " . ($this->getLang() == 'hun' ? 'jml' : 'eng') . "_content WHERE id=" . (int)$course['email_template'] . " LIMIT 1;");
+ $tmpl = MySqlHelper::getInstance()->fetchAssoc();
+ $tmpl = $tmpl[0];
+
+ $mit = array('{NAME}', '{TITLE}', '{START_DATE}', '{START_TIME}', '{FINISH_DATE}', '{FINISH_TIME}', '{LOCATION}', '{ATTENDEES}', '{PRICE}', '{PRICE_TOTAL}', '{VAT}');
+ $mire = array(
+ $user['name'],
+ $course['title'],
+ ($switch['kurzus'] === 'Y' && (int)$switch['level'] == 2 ? date("Y-m-d", _TIME_) : $course['start_date']),
+ ($switch['kurzus'] === 'Y' && (int)$switch['level'] == 2 ? "" : $course['start_time']),
+ ($switch['kurzus'] === 'Y' && (int)$switch['level'] == 2 ? date("Y-m-d", _TIME_ + (_LEASE_VALID_DAYS_ * 86400)) : $course['finish_date']),
+ ($switch['kurzus'] === 'Y' && (int)$switch['level'] == 2 ? "" : $course['finish_time']),
+ $course['location'],
+ $app['attendees'],
+ $course['price'],
+ $app['price_total'],
+ $course['vat']
+ );
+ $msg = str_replace($mit, $mire, $tmpl['introtext'] . $tmpl['fulltext']);
+
+ if ($switch['esemeny'] == 'Y' && (in_array($switch['alias'], $this->customCourses))) {
+ $tel = substr($user['strTel'], 0, 1) == ';' ? substr($user['strTel'], 1) : $user['strTel'];
+ $msg = str_replace('{EMAIL}', $user['email'], $msg);
+ $msg = str_replace('{PHONE}', $tel, $msg);
+ }
+
+ $mail = new PHPMailer;
+ $mail->CharSet = 'UTF-8';
+ $mail->isSMTP();
+ $mail->Host = $mailconfig['Host'];
+ $mail->SMTPAuth = true;
+ $mail->Username = $mailconfig['Username'];
+ $mail->Password = $mailconfig['Password'];
+ $mail->SMTPSecure = $mailconfig['SMTPSecure'];
+ $mail->Port = $mailconfig['Port'];
+ $mail->isHTML(TRUE);
+ $mail->setFrom($mailconfig['from_hu']);
+ $mail->addAddress($user['email']);
+ //$mail->addBCC('zsolt.fekete@cadline.hu');
+ $mail->addBCC('info@cadline.hu');
+
+ if ($switch['esemeny'] == 'Y' && ($switch['alias'] == 'belter' || $switch['alias'] == 'd5-render' || $switch['alias'] == 'd5-render-alap' || $switch['alias'] == 'd5-render-3-0-ujdonsagok' || $switch['alias'] == 'interior' || $switch['alias'] == 'kulter' || $switch['alias'] == 'photoshop' || $switch['alias'] == 'd5-render-halado')) {
+ $mail->addCC('info@krisztinaharosi.it');
+ }
+
+ if ($switch['esemeny'] == 'Y' && ($switch['alias'] == 'aranyi-klaudia-kiviteli-terv-tanfolyam' || $switch['alias'] == 'aranyi-klaudia-kezdo-tanfolyam' || $switch['alias'] == 'aranyi-klaudia-halado-tanfolyam' || $switch['alias'] == 'aranyi-klaudia-teto-es-lepcso-szerkesztes-tanfolyam')) {
+ $mail->addCC('info@akdesign.hu');
+ }
+
+ if ($switch['esemeny'] == 'Y' && $switch['alias'] == 'ferenczi-eva-tanfolyam') {
+ $mail->addCC('eva@studiotrendinterior.com');
+ }
+
+ $mail->Subject = $tmpl['title'];
+ $mail->msgHTML($msg);
+ $mail->AltBody = strip_tags($msg);
+ $mail->send();
+ unset($mail);
+
+ return ($user['email']);
+ }
+ }
+
+ public function auth()
+ {
+ MySqlHelper::getInstance()->query("
+ (SELECT * FROM jml_session where session_id='" . trim(addslashes($_POST['sess'])) . "' LIMIT 1)
+ UNION
+ (SELECT * FROM eng_session where session_id='" . trim(addslashes($_POST['sess'])) . "' LIMIT 1);");
+ $sess = MySqlHelper::getInstance()->fetchAssoc();
+ return (count($sess) ? TRUE : FALSE);
+ }
+
+ public function getLang()
+ {
+ if (!isset($this->lang)) {
+ $this->lang = (strpos($_SERVER['HTTP_HOST'], ".com") ? "eng" : "hun");
+ }
+ return $this->lang;
+ }
+} // end of class
+
+$controller = new Controller();
+$controller->run();
+?>
+
+
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_alworkshops/assets/ajax/alworkshops.eng.class.php b/cadline/modules/modules/mod_alworkshops/assets/ajax/alworkshops.eng.class.php
new file mode 100644
index 00000000..cf5546ff
--- /dev/null
+++ b/cadline/modules/modules/mod_alworkshops/assets/ajax/alworkshops.eng.class.php
@@ -0,0 +1,271 @@
+'hu-HU','eng'=>'en-GB');
+ protected $arrWebinarTopic=array('hun'=>336,'eng'=>333);
+
+ public function procEvent()
+ {
+ $message=array();
+ $nUserID=0;
+
+ if ($this->auth()==FALSE) die();
+
+// nyelvi file betöltése
+ $this->lang=(isset($_POST['lang']) && in_array(trim(strtolower($_GET['lang'])),$this->arrLang) ? trim(strtolower($_GET['lang'])) : $this->getLang());
+ $this->_LANG=parse_ini_file($_SERVER['DOCUMENT_ROOT']."/language/".$this->arrLC[$this->lang]."/".$this->arrLC[$this->lang].".".$this->component.".ini");
+
+// adott kurzus lekérdezése
+ MySqlHelper::getInstance()->query("SELECT * FROM alworkshops_courses WHERE published='Y' AND id=".(int)$_POST['course_id']." LIMIT 1;");
+ $course=MySqlHelper::getInstance()->fetchAssoc();
+ $course=$course[0];
+
+// adott switch lekérdezése
+ MySqlHelper::getInstance()->query("SELECT * FROM alworkshops_switch WHERE alias='".$course['alias']."' LIMIT 1;");
+ $switch=MySqlHelper::getInstance()->fetchAssoc();
+ $switch=$switch[0];
+
+// application adatok összeállítása
+ $this->transid=md5(time());
+ $app=array(
+ 'course_id'=>(int)$_POST['course_id'],
+ 'user_id'=>(int)$_POST['user_id'],
+ 'attendees'=>(int)$_POST['attendees'],
+ 'price_per_attendee'=>$course['price'],
+ 'price_total'=>$course['price']*(int)$_POST['attendees'],
+ 'price_vat'=>$course['vat'],
+ 'gepet_kerek'=>(isset($_POST['gepet_kerek']) ? 'Y' : 'N'),
+ 'berletem_van'=>(isset($_POST['berletem_van']) ? 'Y' : 'N'),
+ 'date'=>date('Y-m-d H:i:s',time()),
+ 'transaction_id'=>$this->transid,
+ 'wsdatetime'=>(isset($_POST['datepicker']) ? trim(addslashes($_POST['datepicker'])) : NULL)
+ );
+
+/**********************************************
+ * WEBINAIR SIGNUP
+ **********************************************/
+ if (isset($_POST['usr']) && isset($_POST['email']))
+ {
+ if (trim($_POST['usr'])=='') { print $this->_LANG['MOD_ARCHLINE_NAME_MISSING']; exit(); }
+ if (trim($_POST['email'])=='') { print $this->_LANG['MOD_ARCHLINE_EMAIL_MISSING']; exit(); }
+ if (!filter_var(trim($_POST['email']), FILTER_VALIDATE_EMAIL)) { print $this->_LANG['MOD_ARCHLINE_EMAIL_INVALID']; exit(); }
+ $_POST['country']=0;
+ if ((int)$_POST['prof']==0) { print $this->_LANG['MOD_ARCHLINE_PROF_MISSING']; exit(); }
+ if ($course['capacity']<(int)$_POST['applications']+(int)$_POST['attendees']) { print $this->_LANG['MOD_ARCHLINE_NOT_ENOUGHT_CAPACITY']; exit(); }
+
+ MySqlHelper::getInstance()->query("SELECT * FROM `cl_hlusers`.`u_emails` WHERE `email`='".trim(addslashes($_POST['email']))."' LIMIT 1;");
+ $exist=MySqlHelper::getInstance()->fetchAssoc();
+ if (!$exist)
+ {
+// ha nincs a crm-ben user rekordja, akkor létrehozza
+ if (trim($_POST['usr'])>'' && trim($_POST['email'])>'')
+ {
+ MySqlHelper::getInstance()->insert("`cl_hlusers`.`users`",array(
+ 'strName'=>trim(addslashes(ucwords($_POST['usr']))),
+ 'strEMail'=>trim(addslashes($_POST['email'])),
+ 'strTel'=>trim(addslashes($_POST['phone'])),
+ 'nUserProf'=>(int)$_POST['prof'],
+ 'nCtrID'=>(int)$_POST['country'],
+ 'dateInsert'=>time(),
+ 'old_db'=>'clusers_eng'));
+ $nUserID=MySqlHelper::getInstance()->getInsertedId();
+ MySqlHelper::getInstance()->insert("`cl_hlusers`.`u_emails`",array('email'=>trim(addslashes($_POST['email'])),'nUserID'=>$nUserID));
+ }
+ }
+ else
+ {
+ $nUserID=$exist[0]['nUserID'];
+ }
+
+ if ((int)$nUserID>0)
+ {
+ $nTopicID=($switch['esemeny']=='Y' ? 337 : $this->arrWebinarTopic[$this->lang]);
+
+ MySqlHelper::getInstance()->query("SELECT * FROM `www_archline_hu`.`alworkshops_application` WHERE `course_id`=".$course['id']." AND `email`='".trim(addslashes($_POST['email']))."' AND `published`='Y' LIMIT 1;");
+ $exist=MySqlHelper::getInstance()->fetchAssoc();
+ if (!$exist)
+ {
+ MySqlHelper::getInstance()->insert("`cl_hlusers`.`u_history`",array(
+ 'nUserID'=>$nUserID,
+ 'nTopicID'=>$nTopicID,
+ 'dateEvent'=>$course['start_date'],
+ 'strPlace'=>$course['title'],
+ 'strInfo'=>'',
+ 'nManagerID'=>36,
+ 'insertDate'=>date("Y-m-d H:i:s",time()),
+ ));
+ }
+ else
+ {
+ print $this->_LANG['MOD_ARCHLINE_ALREADY_EXIST']; exit();
+ }
+
+// application rekord mentés
+ $app['name']=trim(addslashes(ucwords($_POST['usr'])));
+ $app['email']=trim(addslashes($_POST['email']));
+ MySqlHelper::getInstance()->insert('alworkshops_application',$app);
+ $newID=MySqlHelper::getInstance()->getInsertedId();
+
+// level kuldes
+ $this->sendEmail($app['course_id'],0,$newID,$nUserID);
+ print $this->_LANG['MOD_ARCHLINE_SUCCESS'];
+ }
+ }
+
+/**********************************************
+ * WORKSHOP SIGNUP
+ **********************************************/
+ if ((int)$_POST['user_id']>0 && !isset($_POST['usr']) && !isset($_POST['email']))
+ {
+// user lekérdezése
+ MySqlHelper::getInstance()->query("SELECT * FROM `jml_users` WHERE id=".(int)$_POST['user_id']." LIMIT 1;");
+ $user=MySqlHelper::getInstance()->fetchAssoc();
+ $user=$user[0];
+
+ $tomb2=array(
+ 'nUserID'=>$user['nUserID'],
+ 'nTopicID'=>226,
+ 'dateEvent'=>trim(addslashes($_POST['datepicker'])),
+ 'strPlace'=>$course['title'],
+ 'strInfo'=>trim("(web): ".$course['title']." ".$app['wsdatetime']),
+ 'nManagerID'=>'36',
+ 'insertDate'=>date('Y-m-d H:i:s',time()),
+ );
+
+ MySqlHelper::getInstance()->query("SELECT * FROM cl_hlusers.u_history WHERE nUserID=".$tomb2['nUserID']." AND dateEvent='".$tomb2['dateEvent']."' AND strInfo='".$tomb2['strInfo']."' LIMIT 1;");
+ $exist=MySqlHelper::getInstance()->fetchAssoc();
+ if (empty($exist))
+ {
+ MySqlHelper::getInstance()->insert("cl_hlusers.`u_history`",$tomb2);
+
+ MySqlHelper::getInstance()->query("SELECT * FROM cl_hlusers.users WHERE nUserID=".$user['nUserID']." LIMIT 1");
+ $crm=MySqlHelper::getInstance()->fetchAssoc();
+ if (!empty($crm)) // nUserStatus beallitas
+ {
+ if (in_array($crm[0]['nUserStatus'], array(-5,-4,-3,-2,-1,0,1,2,3,4,99)))
+ {
+ MySqlHelper::getInstance()->query("UPDATE cl_hlusers.users SET nUserStatus=5 WHERE nUserID=".$user['nUserID']." LIMIT 1;");
+ MySqlHelper::getInstance()->insert("cl_hlusers.`u_userstatus_history`", array(
+ 'nUserID'=>$user['nUserID'],
+ 'val'=>5,
+ 'changeDate'=>date('Y-m-d H:i:s'),
+ 'nManagerID'=>36,
+ ));
+ }
+ }
+ }
+
+
+ MySqlHelper::getInstance()->query("SELECT * FROM alworkshops_application WHERE published='Y' AND user_id=".$app['user_id']." AND course_id=".$app['course_id']." LIMIT 1;");
+ $exist=MySqlHelper::getInstance()->fetchAssoc();
+
+ // hibaüzenetek; exit;
+ if (count($exist)) { $message[]=$this->_LANG['MOD_ARCHLINE_ALREADY_EXIST']; }
+ if (count($message)) { foreach ($message as $mess) { print $mess." "; } exit(); }
+
+ // application rekord mentés
+ MySqlHelper::getInstance()->insert('alworkshops_application',$app);
+ $newID=MySqlHelper::getInstance()->getInsertedId();
+
+ // level kuldes
+ $this->sendEmail($app['course_id'],$app['user_id'],$newID);
+ print $this->_LANG['MOD_ARCHLINE_SUCCESS'];
+ }
+ }
+
+
+ public function sendEmail($courseid=0,$userid=0,$applicationID=0,$nUserID=0)
+ {
+ if ($courseid==0 || $applicationID==0) return (FALSE);
+
+ require_once($_SERVER['DOCUMENT_ROOT'].'/maintenance/config.mail.php');
+
+ MySqlHelper::getInstance()->query("SELECT * FROM alworkshops_application WHERE published='Y' AND id=".$applicationID." LIMIT 1;");
+ $app=MySqlHelper::getInstance()->fetchAssoc();
+ $app=$app[0];
+
+ MySqlHelper::getInstance()->query("SELECT * FROM alworkshops_courses WHERE published='Y' AND id=".$courseid." LIMIT 1;");
+ $course=MySqlHelper::getInstance()->fetchAssoc();
+ $course=$course[0];
+
+ $sql=($userid==0 && (int)$nUserID>0 ?
+ "SELECT `strName` AS `name`,`strEmail` AS `email` FROM `cl_hlusers`.`users` WHERE nUserID=".(int)$nUserID." LIMIT 1;" :
+ "SELECT `name`,`email` FROM `jml_users` WHERE id=".(int)$userid." LIMIT 1;");
+
+ MySqlHelper::getInstance()->query($sql);
+ $user=MySqlHelper::getInstance()->fetchAssoc();
+ $user=$user[0];
+
+ if (is_array($course) && count($course) && is_array($user) && count($user))
+ {
+ MySqlHelper::getInstance()->query("SELECT * FROM ".($this->getLang()=='hun' ? 'jml' : 'eng')."_content WHERE id=".(int)$course['email_template']." LIMIT 1;");
+ $tmpl=MySqlHelper::getInstance()->fetchAssoc();
+ $tmpl=$tmpl[0];
+
+ $mit=array('{NAME}','{TITLE}','{START_DATE}','{START_TIME}','{FINISH_DATE}','{FINISH_TIME}','{LOCATION}','{ATTENDEES}','{PRICE}','{PRICE_TOTAL}','{VAT}');
+ $mire=array($user['name'],$course['title'],$course['start_date'],$course['start_time'],$course['finish_date'],$course['finish_time'],$course['location'],$app['attendees'],$course['price'],$app['price_total'],$course['vat']);
+ $msg=str_replace($mit, $mire, $tmpl['introtext'].$tmpl['fulltext']);
+
+ $mail=new PHPMailer;
+ $mail->CharSet='UTF-8';
+ $mail->isSMTP();
+ $mail->Host = $mailconfig['Host'];
+ $mail->SMTPAuth = true;
+ $mail->Username = $mailconfig['Username'];
+ $mail->Password = $mailconfig['Password'];
+ $mail->SMTPSecure = $mailconfig['SMTPSecure'];
+ $mail->Port = $mailconfig['Port'];
+ $mail->isHTML(TRUE);
+ $mail->setFrom($mailconfig['from_hu']);
+ $mail->addAddress($user['email']);
+ $mail->addBCC('zsolt.fekete@cadline.hu');
+ $mail->addBCC('marketing@cadline.hu');
+ $mail->Subject=$tmpl['title'];
+ $mail->msgHTML($msg);
+ $mail->AltBody=strip_tags($msg);
+ $mail->send();
+ unset($mail);
+
+ return ($user['email']);
+ }
+ }
+
+ public function auth()
+ {
+ MySqlHelper::getInstance()->query("
+ SELECT * FROM jml_session where session_id='".trim(addslashes($_POST['sess']))."' LIMIT 1
+ UNION
+ SELECT * FROM eng_session where session_id='".trim(addslashes($_POST['sess']))."' LIMIT 1;");
+ $sess=MySqlHelper::getInstance()->fetchAssoc();
+ return(count($sess) ? TRUE : FALSE);
+ }
+
+ public function getLang()
+ {
+ if (!isset($this->lang)) { $this->lang=(strpos($_SERVER['HTTP_HOST'],".com") ? "eng" : "hun"); }
+ return $this->lang;
+ }
+} // end of class
+
+$controller=new Controller();
+$controller->run();
+?>
+
+
diff --git a/cadline/modules/modules/mod_alworkshops/assets/css/images/index.html b/cadline/modules/modules/mod_alworkshops/assets/css/images/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_alworkshops/assets/css/images/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_alworkshops/assets/css/index.html b/cadline/modules/modules/mod_alworkshops/assets/css/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_alworkshops/assets/css/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_alworkshops/assets/css/style.css b/cadline/modules/modules/mod_alworkshops/assets/css/style.css
new file mode 100644
index 00000000..1db07159
--- /dev/null
+++ b/cadline/modules/modules/mod_alworkshops/assets/css/style.css
@@ -0,0 +1,41 @@
+#alworshopContainer {
+ background-color: #2D3036;
+ padding: 10px;
+}
+
+#alworshopContainer h3,
+#alworshopContainer td,
+#alworshopContainer span {
+ color: #FFFFF0;
+}
+
+#alworshopContainer label,
+#alworshopContainer div,
+#alworshopContainer span,
+#alworshopContainer p {
+ color: #fffff0;
+}
+
+#alworshopContainer .sppb-btn {
+ font-weight: bold;
+}
+
+#alworshopContainer hr {
+ margin: 5px 0px 5px 0px;
+}
+
+#alworshopContainer h3 {
+ margin: 10px 0px 10px 0px;
+}
+
+#alworshopContainer .figyelmeztet {
+ color: #FFFF00;
+}
+
+#alworshopContainer .vastag {
+ font-weight: bold;
+}
+
+#alworshopContainer .kattintos {
+ cursor: pointer;
+}
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_alworkshops/assets/index.html b/cadline/modules/modules/mod_alworkshops/assets/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_alworkshops/assets/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_alworkshops/assets/js/index.html b/cadline/modules/modules/mod_alworkshops/assets/js/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_alworkshops/assets/js/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_alworkshops/assets/js/script.js b/cadline/modules/modules/mod_alworkshops/assets/js/script.js
new file mode 100644
index 00000000..e69de29b
diff --git a/cadline/modules/modules/mod_alworkshops/assets/style.css b/cadline/modules/modules/mod_alworkshops/assets/style.css
new file mode 100644
index 00000000..48b23cc0
--- /dev/null
+++ b/cadline/modules/modules/mod_alworkshops/assets/style.css
@@ -0,0 +1,19 @@
+#alworshopContainer { background-color:#2D3036;padding:10px; }
+#alworshopContainer h3, #alworshopContainer td, #alworshopContainer span { color:#FFFFF0; }
+#alworshopContainer label,#alworshopContainer div,#alworshopContainer span,#alworshopContainer p {color:#fffff0;}
+#alworshopContainer .sppb-btn { font-weight:bold; }
+#alworshopContainer hr {margin:5px 0px 5px 0px;}
+#alworshopContainer h3 {margin:10px 0px 10px 0px;}
+#alworshopContainer .figyelmeztet {color: #FFFF00; }
+#alworshopContainer .vastag {font-weight:bold;}
+#alworshopContainer .kattintos {cursor:pointer;}
+
+.alworshopContainer { background-color:#2D3036;padding:10px; }
+.alworshopContainer h3, #alworshopContainer td, #alworshopContainer span { color:#FFFFF0; }
+.alworshopContainer label,#alworshopContainer div,#alworshopContainer span,#alworshopContainer p {color:#fffff0;}
+.alworshopContainer .sppb-btn { font-weight:bold; }
+.alworshopContainer hr {margin:5px 0px 5px 0px;}
+.alworshopContainer h3 {margin:10px 0px 10px 0px;}
+.alworshopContainer .figyelmeztet {color: #FFFF00; }
+.alworshopContainer .vastag {font-weight:bold;}
+.alworshopContainer .kattintos {cursor:pointer;}
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_alworkshops/helper.php b/cadline/modules/modules/mod_alworkshops/helper.php
new file mode 100644
index 00000000..d60bf219
--- /dev/null
+++ b/cadline/modules/modules/mod_alworkshops/helper.php
@@ -0,0 +1,531 @@
+setQuery("SELECT * FROM alworkshops_switch where alias = '{$alias}' LIMIT 1;");
+ $result = $db->loadObjectList();
+ return (count($result) ? $result[0] : FALSE);
+ }
+
+ public static function getLevelString($level)
+ {
+ switch ($level) {
+ case 1:
+ return 'Alapfokú tanfolyam';
+ break;
+
+ case 2:
+ return 'Középfokú tanfolyam';
+ break;
+
+ case 3:
+ return 'Felsőfokú tanfolyam';
+ break;
+
+ default:
+ return '';
+ break;
+ }
+ }
+
+ public static function getWorkshops($alias = '', $start_date = '', $finish_date = '')
+ {
+ $limit = $alias == 'archline-konzultacio' ? 15 : 4;
+ $result = array();
+ if ($alias > '') {
+ $db = JFactory::getDbo();
+ $db->setQuery("SELECT `id`, `alias`, `title`, `start_date`, `start_time`, `finish_date`, `finish_time`, `capacity`, `price`, `location`,
+ (SELECT SUM(attendees) AS applications FROM alworkshops_application WHERE published = 'Y' AND course_id = alworkshops_courses.id) AS applications,
+ (SELECT SUM(IF(gepet_kerek = 'Y', 1, 0)) AS gepigeny FROM alworkshops_application WHERE published = 'Y' AND course_id = alworkshops_courses.id) AS gepigeny
+ FROM alworkshops_courses
+ WHERE published = 'Y' AND alias LIKE '{$alias}%' AND
+ start_date >= " . ($start_date > '' ? "'" . $start_date . "'" : "CURRENT_DATE") . " " . ($finish_date > '' ? " AND `finish_date`<='" . $finish_date . "'" : '') . "
+ ORDER BY start_date,start_time LIMIT " . $limit . ";");
+ $result = $db->loadObjectList();
+ }
+ return (count($result) ? $result : FALSE);
+ }
+
+ public static function getOnlineSessions($id)
+ {
+ $result = array();
+
+ $db = JFactory::getDbo();
+ $db->setQuery("SELECT SUBSTRING(s.session_date, 3) AS session_date, s.title, SUBSTRING(s.start_time, 1, CHAR_LENGTH(s.start_time) - 3) AS start_time,
+ SUBSTRING(s.finish_time, 1, CHAR_LENGTH(s.finish_time) - 3) AS finish_time
+ FROM alworkshops_online_sessions s
+ WHERE s.courseid = {$id} AND s.published = 'Y' ORDER BY s.session_date ASC;");
+ $result = $db->loadObjectList();
+
+ return (count($result) ? $result : FALSE);
+ }
+
+ public static function getWorkshopsByGroup($alias = '')
+ {
+ $result = array();
+ if ($alias > '') {
+ $db = JFactory::getDbo();
+ $db->setQuery("SELECT c.*
+ FROM alworkshops_courses c
+ LEFT OUTER JOIN alworkshops_switch s ON s.alias = c.alias
+ WHERE c.published = 'Y' AND s.alias2 = '{$alias}';");
+ $result = $db->loadObjectList();
+ }
+ return (count($result) ? $result : FALSE);
+ }
+
+ public static function getCourses($alias = '', $date = '')
+ {
+ $result = array();
+ if ($alias > '') {
+ $db = JFactory::getDbo();
+ $db->setQuery("SELECT id, `alias`, `title`, `start_date`, `start_time`, `finish_date`, `finish_time`, `capacity`, `price`, `location`,
+ (SELECT SUM(attendees) AS applications FROM alworkshops_application WHERE published='Y' AND course_id=alworkshops_courses.id) AS applications,
+ (SELECT SUM(IF(gepet_kerek='Y',1,0)) AS gepigeny FROM alworkshops_application WHERE published='Y' AND course_id=alworkshops_courses.id) AS gepigeny
+ FROM alworkshops_courses
+ WHERE published = 'Y' AND start_date <= '{$date}' and finish_date >= '{$date}' AND alias LIKE '{$alias}%'
+ ORDER BY start_date;");
+ $result = $db->loadObjectList();
+ }
+ return (count($result) ? $result : FALSE);
+ }
+
+ public static function getCourse($alias = '')
+ {
+ $switch = self::getSwitch($alias);
+ $limit = $switch->alias == 'archline-konzultacio' ? 10 : 4;
+ $date = date('Y-m-d');
+ $db = JFactory::getDbo();
+ $db->setQuery("SELECT `course_level`, `id`, `alias`, `title`, `start_date`, `start_time`, `finish_date`, `finish_time`, `capacity`, `price`, `location`, " . ($switch->comment === 'Y' ? "`comment`," : "") . "
+ (SELECT SUM(attendees) AS applications FROM alworkshops_application WHERE published='Y' AND course_id=alworkshops_courses.id) AS applications,
+ (SELECT SUM(IF(gepet_kerek='Y',1,0)) AS gepigeny FROM alworkshops_application WHERE published='Y' AND course_id=alworkshops_courses.id) AS gepigeny
+ FROM alworkshops_courses
+ WHERE published = 'Y' AND finish_date >= '{$date}' AND alias LIKE '{$alias}%'
+ ORDER BY start_date LIMIT {$limit};");
+ $kurzusok = $db->loadObjectList();
+
+ if (is_array($kurzusok) && count($kurzusok) && $switch->webinair == 'N' && $switch->esemeny == 'N') {
+ foreach ($kurzusok as $kurzus) {
+ $felt = "";
+ if ($switch->alias2 > '' || $switch->alias3 > '' || $switch->alias4 > '' || $switch->alias5 > '' || $switch->alias6 > '') {
+ $felt .= " AND (0 " . ($switch->alias2 > '' ? " OR alias LIKE '" . $switch->alias2 . "%'" : "") . "
+ " . ($switch->alias3 > '' ? " OR alias LIKE '" . $switch->alias3 . "%'" : "") . "
+ " . ($switch->alias4 > '' ? " OR alias LIKE '" . $switch->alias4 . "%'" : "") . "
+ " . ($switch->alias5 > '' ? " OR alias LIKE '" . $switch->alias5 . "%'" : "") . "
+ " . ($switch->alias6 > '' ? " OR alias LIKE '" . $switch->alias6 . "%'" : "") . " ) ";
+ }
+ $sql = "SELECT id, `alias`, `title`, `start_date`, `start_time`, `finish_date`, `finish_time`, `capacity`, `price`, `location`,
+ (SELECT SUM(attendees) AS applications FROM alworkshops_application WHERE published = 'Y' AND course_id = alworkshops_courses.id) AS applications,
+ (SELECT SUM(IF(gepet_kerek = 'Y', 1, 0)) AS gepigeny FROM alworkshops_application WHERE published = 'Y' AND course_id = alworkshops_courses.id) AS gepigeny
+ FROM alworkshops_courses
+ WHERE published = 'Y' AND start_date >= '{$kurzus->start_date}' AND finish_date <= '{$kurzus->finish_date}' AND
+ alias NOT LIKE '{$alias}%' " . $felt . "
+ ORDER BY start_date,start_time";
+ $db->setQuery($sql);
+ $workshopok = $db->loadObjectList();
+
+ if (count($workshopok)) {
+ $maxCapacity = $kurzus->capacity;
+ $app = $kurzus->applications;
+ $gep = $kurzus->gepigeny;
+
+ foreach ($workshopok as $ws) {
+ $tmp = $kurzus->applications + $ws->applications;
+ if ($tmp > $app) $app = $tmp;
+
+ $tmp = $kurzus->gepigeny + $ws->gepigeny;
+ if ($tmp > $gep) $gep = $tmp;
+ }
+ $kurzus->applications = $app;
+ $kurzus->gepigeny = $gep;
+ if ($kurzus->applications > $maxCapacity) $kurzus->applications = $maxCapacity;
+ if ($kurzus->gepigeny > _MAX_COMPUTERSTATION_) $kurzus->gepigeny = _MAX_COMPUTERSTATION_;
+ }
+ }
+ }
+ return ($kurzusok);
+ }
+
+ public static function getOtherWorkshops($level = 0, $except = 0)
+ {
+ if ((int)$level == 0) return;
+ $db = JFactory::getDbo();
+ $db->setQuery("SELECT * FROM alworkshops_switch WHERE 1 " . ((int)$except > 0 ? " AND `id` != " . (int)$except : "") . " AND `workshop` = 'Y' AND `level` = {$level} AND `tanfsor` > 0 ORDER BY tanfsor ASC;");
+ $result = $db->loadObjectList();
+
+ return (count($result) ? $result : FALSE);
+ }
+
+ public static function getSessions($id = 0)
+ {
+ if ((int)$id == 0) return;
+ $db = JFactory::getDbo();
+ $db->setQuery("SELECT * FROM alworkshops_sessions WHERE published = 'Y' AND courseid = {$id} ORDER BY ordering;");
+ $result = $db->loadObjectList();
+
+ return (count($result) ? $result : FALSE);
+ }
+
+ public static function getAppSign($courseid = 0)
+ {
+ $user = JFactory::getUser();
+ if ($user->id == 0 || $courseid == 0) return false;
+ $db = JFactory::getDbo();
+ $db->setQuery("SELECT * FROM alworkshops_application WHERE published = 'Y' AND user_id = {$user->id} AND course_id = {$courseid} LIMIT 1;");
+ $result = $db->loadObjectList();
+
+ return (count($result) ? TRUE : FALSE);
+ }
+
+ public static function getApplication($user_id = 0, $courseid = 0)
+ {
+ if ($user_id == 0 || $courseid == 0) return (0);
+ $db = JFactory::getDbo();
+ $db->setQuery("SELECT * FROM alworkshops_application WHERE published = 'Y' AND user_id = {$user_id} AND course_id = {$courseid} LIMIT 1;");
+ $result = $db->loadObjectList();
+ return (count($result) ? $result[0] : FALSE);
+ }
+
+ public static function getTCEUserGroup()
+ {
+ $db = JFactory::getDbo();
+ $user = JFactory::getUser();
+ $tceUser = FALSE;
+
+ $db->setQuery("SELECT * FROM `tcexam`.`tce_users` WHERE `user_email`='" . trim($user->email) . "' LIMIT 1;");
+ $tceUser = $db->loadObjectList();
+
+ if (empty($tceUser)) return false;
+
+ $tceUser = $tceUser[0];
+
+ $db->setQuery("SELECT * FROM `tcexam`.`tce_usrgroups` WHERE usrgrp_user_id = {$tceUser->user_id}");
+ $userGroup = $db->loadObjectList();
+
+ return $userGroup[0];
+ }
+
+ public static function setTCEUser($group_id = 0)
+ {
+ if ((int)$group_id == 0) return false;
+
+ $db = JFactory::getDbo();
+ $user = JFactory::getUser();
+ $tceUser = FALSE;
+
+ if ((int)$user->id > 0) {
+ $db->setQuery("SELECT * FROM `tcexam`.`tce_users` WHERE `user_email`='" . trim($user->email) . "' LIMIT 1;");
+ $tceUser = $db->loadObjectList();
+
+ if (!count($tceUser)) { // ha nincs meg a user, akkor létre kell hozni
+ $pos = strpos($user->name, " ");
+ $tomb = array(
+ 'user_name' => $user->email,
+ 'user_email' => $user->email,
+ 'user_regdate' => date('Y-m-d H:i:s', time()),
+ 'user_ip' => $_SERVER['REMOTE_ADDR'],
+ 'user_firstname' => ($pos ? trim(substr($user->name, $pos)) : $user->name),
+ 'user_lastname' => ($pos ? trim(substr($user->name, 0, $pos)) : ''),
+ 'user_regnumber' => $user->nUserID,
+ 'user_level' => 3
+ );
+
+ foreach ($tomb as $v) $values[] = (is_null($v) ? 'NULL' : $db->quote($v));
+ $query = $db->getQuery(true);
+ $query->insert('`tcexam`.`tce_users`')->columns($db->quoteName(array_keys($tomb)))->values(implode(',', $values));
+ $db->setQuery($query);
+ $db->execute();
+
+ $db->setQuery("SELECT * FROM `tcexam`.`tce_users` WHERE `user_email`='" . trim($user->email) . "' LIMIT 1;");
+ $tceUser = $db->loadObjectList();
+ }
+
+ // ha megvan a user, akkor csak a pwdt és groupot kell megcsinálni
+ $tceUser = $tceUser[0];
+ $tceUser->password = substr(md5(uniqid(mt_rand(), true)), 0, 8); // olvasható, random 8 karakteres jelszó
+ $tceUser->user_password = md5($tceUser->password); // titkosított, adatbázisba elmentett string
+
+ $db->setQuery("UPDATE `tcexam`.`tce_users` SET `user_password` = '{$tceUser->user_password}', `user_verifycode` = NULL WHERE user_id = {$tceUser->user_id} LIMIT 1;");
+ $db->execute();
+
+ $db->setQuery("DELETE FROM `tcexam`.`tce_usrgroups` WHERE usrgrp_user_id = {$tceUser->user_id};");
+ $db->execute();
+
+ // a group besorolást minden esetben meg kell csinálni
+ $db->setQuery("INSERT INTO `tcexam`.`tce_usrgroups` SET usrgrp_user_id = {$tceUser->user_id}, usrgrp_group_id = {$group_id};");
+ $db->execute();
+ }
+ return ($tceUser);
+ }
+
+ public static function getValidLease($level = 0)
+ {
+ $nTopicID = 0;
+ $lease = FALSE;
+ $db = JFactory::getDbo();
+ $user = JFactory::getUser();
+
+ switch ((int)$level) {
+ case 1: {
+ $nTopicID = _COURSE_PRICE_PRELIMINARY_;
+ break;
+ }
+ case 2: {
+ $nTopicID = _COURSE_PRICE_INTERMEDIATE_;
+ break;
+ }
+ }
+
+ if ((int)$user->id == 0 || (int)$level == 0 || (int)$nTopicID == 0) return false;
+
+ $db->setQuery("SELECT *,`dateEvent` AS `validFrom`,DATE_ADD(`dateEvent`, INTERVAL " . _LEASE_VALID_DAYS_ . " DAY) AS validThrough FROM `cl_hlusers`.`u_history` WHERE `nUserID` = {$user->nUserID} AND `nTopicID` = {$nTopicID} AND DATE_ADD(`dateEvent`, INTERVAL " . _LEASE_VALID_DAYS_ . " DAY)>='" . date('Y-m-d', time()) . "' ORDER BY nEventID DESC LIMIT 1;");
+ $lease = $db->loadObjectList();
+
+ return (($lease && count($lease)) ? $lease[0] : FALSE);
+ }
+
+ public function getLastWorkshop($level = 0)
+ {
+ $db = JFactory::getDbo();
+ $user = JFactory::getUser();
+
+ if ((int)$user->id == 0 || (int)$level == 0) return false;
+
+ $db->setQuery("SELECT MAX(c.`start_date`) AS lastDate,DATE_ADD(MAX(c.`start_date`), INTERVAL 1 DAY) AS nextDay
+ FROM www_archline_hu.alworkshops_application a
+ LEFT OUTER JOIN www_archline_hu.alworkshops_courses c ON c.id = a.course_id
+ LEFT OUTER JOIN www_archline_hu.alworkshops_switch s ON s.alias = c.alias
+ WHERE s.`workshop` = 'Y' AND s.`level` = {$level} AND user_id = {$user->id};");
+ $lastWorkshop = $db->loadObjectList();
+
+ return (($lastWorkshop && count($lastWorkshop)) ? $lastWorkshop[0] : FALSE);
+ }
+
+ public static function getWorkshopApplications($userid = 0, $switchid = 0)
+ {
+ if ((int)$userid === 0) return (array());
+
+ $db = JFactory::getDbo();
+ $db->setQuery("SELECT c.id as course_id, c.alias, c.start_date, c.finish_date, s.workshop, s.kurzus,
+ IF(sess.switchid IS NULL, s.id, sess.switchid) AS switchid,
+ IF(sess.session_date IS NULL, c.start_date, sess.session_date) AS session_date,
+ IF(sess.description IS NULL,c.title,sess.description) AS description
+ FROM www_archline_hu.alworkshops_courses c
+ LEFT OUTER JOIN www_archline_hu.alworkshops_switch s ON c.alias = s.alias
+ LEFT OUTER JOIN www_archline_hu.alworkshops_sessions sess ON c.id = sess.courseid
+ WHERE " . ((int)$switchid > 0 ? " (s.id=" . (int)$switchid . " OR sess.switchid = " . (int)$switchid . ") AND " : "") . "
+ c.id IN (SELECT course_id FROM www_archline_hu.alworkshops_application WHERE user_id = " . (int)$userid . " AND published = 'Y');");
+ $result = $db->loadObjectList();
+ return (count($result) ? $result : array());
+ }
+
+ public static function getCourseParts($level = 0, $field = 'alias')
+ {
+ if ((int)$level === 0) return (array());
+
+ $result = array();
+ $db = JFactory::getDbo();
+ $db->setQuery("SELECT " . $field . " FROM `www_archline_hu`.`alworkshops_switch` WHERE `level` = {$level} AND `workshop` = 'Y' AND `tanfsor` > 0;");
+ $res = $db->loadObjectList();
+ if (count($res)) {
+ foreach ($res as $sor) $result[$sor->$field] = 0;
+ }
+
+ return (count($result) ? $result : array());
+ }
+
+ public static function getCertificate($level, $nUserID)
+ {
+ if ($level == 2)
+ $topicID = 354;
+ else
+ return false;
+
+ $query = "SELECT nEventID FROM cl_hlusers.u_history where nUserID = {$nUserID} AND nTopicID = {$topicID}";
+ $db = JFactory::getDbo();
+ $db->setQuery($query);
+ $res = $db->loadObjectList();
+
+ return !empty($res);
+ }
+
+ public function getOnlineExamPermit($level = 0)
+ {
+ $user = JFactory::getUser();
+
+ if ((int)$user->id == 0 || (int)$level <= 0) return false;
+ if ((int)$level == 1) return true;
+
+ $prev_level = $level == 4 ? $level - 2 : $level - 1;
+ $query = "SELECT *
+ FROM www_archline_hu.alworkshops_application a
+ LEFT JOIN www_archline_hu.alworkshops_courses c ON c.id = a.course_id
+ LEFT JOIN www_archline_hu.alworkshops_switch s ON s.alias = c.alias
+ WHERE a.user_id = {$user->id} AND s.vizsga = 'Y' AND s.level = {$prev_level} AND a.published = 'Y' LIMIT 1";
+ $db = JFactory::getDbo();
+ $db->setQuery($query);
+ $res = $db->loadObjectList();
+
+ if (!empty($res)) return true;
+
+ if (empty($res) && $level == '4') {
+ $query = "SELECT *
+ FROM cl_hlusers.u_history t
+ WHERE t.nUserID = {$user->nUserID} AND t.nTopicID = 373 LIMIT 1";
+ $db = JFactory::getDbo();
+ $db->setQuery($query);
+ $res = $db->loadObjectList();
+
+ if (!empty($res)) return true;
+ }
+
+ if (empty($res) && $level == 4) {
+ $query2 = "SELECT * FROM cl_hlusers.u_history
+ WHERE strInfo LIKE '%Felsőfokú vizsga Oktatói minősítéssel%'
+ AND nUserID = '{$user->nUserID}'";
+ $db = JFactory::getDbo();
+ $db->setQuery($query2);
+ $res2 = $db->loadObjectList();
+
+ if (!empty($res2)) return true;
+ }
+
+ if (self::getCertificate($level, $user->nUserID))
+ return true;
+
+ return false;
+ }
+
+ public function getExamPermit($level = 0)
+ {
+ $user = JFactory::getUser();
+
+ if ((int)$user->id == 0 || (int)$level <= 0) return false;
+
+ if ((int)$level < 3) {
+ $wsApps = self::getWorkshopApplications((int)$user->id);
+ $courseParts = self::getCourseParts((int)$level, "id");
+
+ if (count($wsApps) == 0 || count($courseParts) == 0) return false;
+ foreach ($wsApps as $wsApp) $courseParts[$wsApp->switchid]++;
+ foreach ($courseParts as $switchid => $wscount) {
+ if ($wscount == 0) return false;
+ }
+ }
+ return (TRUE);
+ }
+
+ public function getExamLogin($level = 0)
+ {
+ if ((int)$level <= 0) return false;
+
+ $examResults = self::getExamResults();
+
+ switch ($level) {
+ case 1: {
+ $vizsga_dij = (int)$examResults->alap_vizsga_dij;
+ $sikeres = (int)$examResults->alap_vizsga_sikeres;
+ $sikertelen = (int)$examResults->alap_vizsga_sikertelen;
+ break;
+ }
+ case 2: {
+ $vizsga_dij = (int)$examResults->kozep_vizsga_dij;
+ $sikeres = (int)$examResults->kozep_vizsga_sikeres;
+ $sikertelen = (int)$examResults->kozep_vizsga_sikertelen;
+ break;
+ }
+ case 3: {
+ $vizsga_dij = (int)$examResults->oktatoi_vizsga_dij;
+ $sikeres = (int)$examResults->oktatoi_vizsga_sikeres;
+ $sikertelen = (int)$examResults->oktatoi_vizsga_sikertelen;
+ break;
+ }
+ case 4: {
+ $vizsga_dij = (int)$examResults->oktatoi_vizsga_dij;
+ $sikeres = (int)$examResults->oktatoi_vizsga_sikeres;
+ $sikertelen = (int)$examResults->oktatoi_vizsga_sikertelen;
+ break;
+ }
+ }
+
+ if (($level == 3 || $level == 4) && $vizsga_dij == 0) return true;
+ if ($vizsga_dij == 0) return false;
+ if ($sikeres + $sikeretelen >= $vizsga_dij * _EXAM_RETRY_) return false;
+
+ return true;
+ }
+
+ public static function payed($courseid)
+ {
+ $db = JFactory::getDbo();
+ $user = JFactory::getUser();
+ $userID = (int)$user->id;
+
+ $db->setQuery("SELECT * FROM www_archline_hu.alworkshops_application where course_id = {$courseid} AND user_id = {$userID} AND pay_id != '' LIMIT 1;");
+ $result = $db->loadObjectList();
+
+ return count($result) > 0;
+ }
+
+ public static function getExamResults()
+ {
+ $db = JFactory::getDbo();
+ $user = JFactory::getUser();
+
+ if ((int)$user->id == 0 || (int)$user->id == 0) return false;
+
+ $db->setQuery("SELECT
+ (SELECT MAX(datePaydate) FROM `cl_hlusers`.`u_history` WHERE nTopicID=" . _COURSE_EXAM_PRICE_PRELIMINARY_ . " AND nUserID=" . (int)$user->nUserID . ") AS `alap_vizsga_dij_utolso`,
+ (SELECT COUNT(*) FROM `cl_hlusers`.`u_history` WHERE nTopicID=" . _COURSE_EXAM_PRICE_PRELIMINARY_ . " AND nUserID=" . (int)$user->nUserID . ") AS `alap_vizsga_dij`,
+ (SELECT COUNT(*) FROM `cl_hlusers`.`u_history` WHERE nTopicID=" . _EXAM_PRELIMINARY_ . " AND nUserID=" . (int)$user->nUserID . ") AS `alap_vizsga_sikeres`,
+ (SELECT COUNT(*) FROM `cl_hlusers`.`u_history` WHERE nTopicID=" . _EXAM_FAIL_PRELIMINARY_ . " AND nUserID=" . (int)$user->nUserID . ") AS `alap_vizsga_sikertelen`,
+ (SELECT COUNT(*) FROM `cl_hlusers`.`u_history` WHERE nTopicID=" . _DIPLOMA_PRELIMINARY_ . " AND nUserID=" . (int)$user->nUserID . ") AS `alap_oklevel`,
+ (SELECT MAX(datePaydate) FROM `cl_hlusers`.`u_history` WHERE nTopicID=" . _COURSE_EXAM_PRICE_INTERMEDIATE_ . " AND nUserID=" . (int)$user->nUserID . ") AS `kozep_vizsga_dij_utolso`,
+ (SELECT COUNT(*) FROM `cl_hlusers`.`u_history` WHERE nTopicID=" . _COURSE_EXAM_PRICE_INTERMEDIATE_ . " AND nUserID=" . (int)$user->nUserID . ") AS `kozep_vizsga_dij`,
+ (SELECT COUNT(*) FROM `cl_hlusers`.`u_history` WHERE nTopicID=" . _EXAM_INTERMEDIATE_ . " AND nUserID=" . (int)$user->nUserID . ") AS `kozep_vizsga_sikeres`,
+ (SELECT COUNT(*) FROM `cl_hlusers`.`u_history` WHERE nTopicID=" . _EXAM_FAIL_INTERMEDIATE_ . " AND nUserID=" . (int)$user->nUserID . ") AS `kozep_vizsga_sikertelen`,
+ (SELECT COUNT(*) FROM `cl_hlusers`.`u_history` WHERE nTopicID=" . _DIPLOMA_INTERMEDIATE_ . " AND nUserID=" . (int)$user->nUserID . ") AS `kozep_oklevel`,
+ (SELECT MAX(datePaydate) FROM `cl_hlusers`.`u_history` WHERE nTopicID=" . _TUTOR_EXAM_PRICE_ . " AND nUserID=" . (int)$user->nUserID . ") AS `oktatoi_vizsga_dij_utolso`,
+ (SELECT COUNT(*) FROM `cl_hlusers`.`u_history` WHERE nTopicID=" . _TUTOR_EXAM_PRICE_ . " AND nUserID=" . (int)$user->nUserID . ") AS `oktatoi_vizsga_dij`,
+ (SELECT COUNT(*) FROM `cl_hlusers`.`u_history` WHERE nTopicID=" . _TUTOR_EXAM_ . " AND nUserID=" . (int)$user->nUserID . ") AS `oktatoi_vizsga_sikeres`,
+ (SELECT COUNT(*) FROM `cl_hlusers`.`u_history` WHERE nTopicID=" . _TUTOR_EXAM_FAIL_ . " AND nUserID=" . (int)$user->nUserID . ") AS `oktatoi_vizsga_sikertelen`;");
+ $result = $db->loadObjectList();
+
+ return (count($result) ? $result[0] : array());
+ }
+
+ public static function getDayName($date)
+ {
+ if (self::getLang() == 'hun') {
+ $dayOfWeek = date('w', strtotime($date));
+ switch ($dayOfWeek) {
+ case 6:
+ return 'Szombat';
+ case 0:
+ return 'Vasárnap';
+ case 1:
+ return 'Hétfő';
+ case 2:
+ return 'Kedd';
+ case 3:
+ return 'Szerda';
+ case 4:
+ return 'Csütörtök';
+ case 5:
+ return 'Péntek';
+ default:
+ return '';
+ }
+ } else
+ return date('l', strtotime($date));
+ }
+
+ public static function getLang()
+ {
+ return (JFactory::getLanguage()->getTag() == 'hu-HU' ? "hun" : "eng");
+ }
+}
diff --git a/cadline/modules/modules/mod_alworkshops/helpers/MySqlHelper.class.php b/cadline/modules/modules/mod_alworkshops/helpers/MySqlHelper.class.php
new file mode 100644
index 00000000..4af3eca4
--- /dev/null
+++ b/cadline/modules/modules/mod_alworkshops/helpers/MySqlHelper.class.php
@@ -0,0 +1,212 @@
+config=New JConfig();
+ $this->connection=false;
+ $this->host='';
+ $this->user='';
+ $this->pass='';
+ $this->name='';
+ }
+
+ public static function getInstance()
+ {
+ if(!empty(self::$msh)) return self::$msh;
+ self::$msh=new MySqlHelper();
+ self::$msh->init();
+ return self::$msh;
+ }
+
+ public function init($host="", $name="", $user="", $pass="")
+ {
+ $this->host=($host>"" ? $host : $this->config->host);
+ $this->name=($name>"" ? $name : $this->config->db);
+ $this->user=($user>"" ? $user : $this->config->user);
+ $this->pass=($pass>"" ? $pass : $this->config->password);
+ }
+
+ private function connect()
+ {
+ if($this->connection) return;
+
+ $this->connection=mysqli_connect($this->host, $this->user, $this->pass);
+
+ if(false===$this->connection) throw new Exception('Can\'t connect to db');
+
+ mysqli_select_db($this->connection,$this->name);
+ mysqli_query($this->connection, 'SET CHARACTER SET UTF8');
+ mysqli_query($this->connection, 'SET NAMES \'UTF8\' ');
+ mysqli_set_charset($this->connection, 'utf8');
+
+ if(mysqli_error($this->connection)) throw new Exception(mysql_error($this->connection));
+ }
+
+ public function query($query) {
+ $this->connect();
+ $this->queryString=$query;
+ $this->queryResult=mysqli_query($this->connection, $query);
+ if(mysqli_error($this->connection)) throw new Exception(mysqli_error($this->connection).' Query: '.$this->queryString);
+ }
+
+ public function fetchNext() {
+ $back=array();
+ if($row=mysqli_fetch_assoc($this->queryResult)) {
+ foreach($row as $key => $value) {
+ $row[$key]=stripslashes($value);
+ }
+ $back=$row;
+ return $back;
+ }
+
+ return false;
+ }
+
+ public function fetchAssoc() {
+ $back=array();
+ while($row=mysqli_fetch_assoc($this->queryResult)) {
+ foreach($row as $key => $value) {
+ $row[$key]=stripslashes($value);
+ }
+ $back[]=$row;
+ }
+
+ return $back;
+ }
+
+ public function getInsertedId() {
+ return mysqli_insert_id($this->connection);
+ }
+
+ public function select($table, $where=false, $offset=false, $limit=false, $order=false) {
+ $whereStr='';
+ $limitStr='';
+ $orderStr='';
+
+ if(is_array($where)) $whereStr='WHERE '.$this->whereMakerPriv($where);
+ elseif($where) $whereStr='WHERE '.$where;
+
+ if(($offset!==false and $offset!==null)&&($limit!==false and $limit!==null)) {
+ $limitStr='LIMIT '.$offset.', '.$limit;
+ }
+
+ if(is_array($order)) {
+ $orderStr='ORDER BY ';
+ foreach($order as $key => $value) {
+ $orderStr.=$key.' '.$value.' ';
+ }
+ }
+ elseif($order) $orderStr='ORDER BY '.$order;
+
+ return $this->query('SELECT * FROM '.$table.' '.$whereStr.' '.$orderStr.' '.$limitStr);
+ }
+
+ public function getProp($table, $func, $field, $where=false) {
+ $whereStr='';
+ if(is_array($where)) $whereStr='WHERE '.$this->whereMakerPriv($where);
+ elseif($where) $whereStr='WHERE '.$where;
+
+ $this->query('SELECT '.$func.'('.$field.') as p FROM '.$table.' '.$whereStr);
+
+ $arr=$this->fetchAssoc();
+
+ return $arr[0]['p'];
+ }
+
+ public function getCount($table, $field='id', $where=false) {
+ return $this->getProp($table, 'COUNT', $field, $where);
+ }
+
+ public function getSum($table, $field='id', $where=false) {
+ return $this->getProp($table, 'SUM', $field, $where);
+ }
+
+ public function getAvg($table, $field='id', $where=false) {
+ return $this->getProp($table, 'AVG', $field, $where);
+ }
+
+ public function delete($table, $where=false) {
+ $whereStr='';
+ if(is_array($where)) $whereStr='WHERE '.$this->whereMakerPriv($where);
+ elseif($where) $whereStr='WHERE '.$where;
+
+ return $this->query('DELETE FROM '.$table.' '.$whereStr);
+ }
+
+ public function update($table, $infoArr, $where=false) {
+ if(!is_array($infoArr)) {
+ return false;
+ }
+
+ $whereStr='';
+ $dataArr=array();
+ $data='';
+ if(is_array($where)) $whereStr='WHERE '.$this->whereMakerPriv($where);
+ elseif($where) $whereStr='WHERE '.$where;
+
+ foreach($infoArr as $key => $value) {
+ $dataArr[]='`'.$key.'`="'.mysqli_real_escape_string($this->connection, $value).'" ';
+ }
+ $data=implode(',',$dataArr);
+
+ return $this->query('UPDATE '.$table.' SET '.$data.' '.$whereStr);
+ }
+
+ public function insert($table, $infoArr) {
+ $this->connect();
+
+ $columArr=array();
+ $valueArr=array();
+ $colums='';
+ $values='';
+
+ foreach($infoArr as $key => $value) {
+ $columArr[]='`'.$key.'`';
+ $valueArr[]='"'.mysqli_real_escape_string($this->connection, $value).'"';
+ }
+
+ $colums=implode(',',$columArr);
+ $values=implode(',', $valueArr);
+
+ return $this->query('INSERT INTO '.$table.' ('.$colums.') VALUES ('.$values.')');
+ }
+
+ public function affectedRows() {
+ return mysqli_affected_rows($this->connection);
+ }
+
+ public function whereMakerPriv($where) {
+ if(!is_array($where)) return 1;
+ $this->connect();
+ $back='1 ';
+ foreach($where as $key=>$value) {
+ if(is_array($value)) $back.='AND `'.$key.'`'.$value[0].'"'.$value[1].'" ';
+ else $back.='AND `'.$key.'`="'.mysqli_real_escape_string($this->connection, $value).'" ';
+ }
+ return $back;
+ }
+
+ public static function whereMaker($where) {
+ if(!is_array($where)) return 1;
+ $back='1 ';
+ foreach($where as $key=>$value) {
+ if(is_array($value)) $back.='AND `'.$key.'`'.$value[0].'"'.$value[1].'" ';
+ else $back.='AND `'.$key.'`="'.$value.'" ';
+ }
+ return $back;
+ }
+}
+
+?>
diff --git a/cadline/modules/modules/mod_alworkshops/index.html b/cadline/modules/modules/mod_alworkshops/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_alworkshops/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_alworkshops/language/en-GB/en-GB.mod_alworkshops.ini b/cadline/modules/modules/mod_alworkshops/language/en-GB/en-GB.mod_alworkshops.ini
new file mode 100644
index 00000000..a0c3b232
--- /dev/null
+++ b/cadline/modules/modules/mod_alworkshops/language/en-GB/en-GB.mod_alworkshops.ini
@@ -0,0 +1,2 @@
+MOD_ARCHLINE_WORKSHOPS="ARCHLine Workshops"
+MOD__P_FRONT_ENDEN_MEGJELENITI_A="Front-enden megjeleníti a workshop időpontokat
"
diff --git a/cadline/modules/modules/mod_alworkshops/language/en-GB/en-GB.mod_alworkshops.sys.ini b/cadline/modules/modules/mod_alworkshops/language/en-GB/en-GB.mod_alworkshops.sys.ini
new file mode 100644
index 00000000..a0c3b232
--- /dev/null
+++ b/cadline/modules/modules/mod_alworkshops/language/en-GB/en-GB.mod_alworkshops.sys.ini
@@ -0,0 +1,2 @@
+MOD_ARCHLINE_WORKSHOPS="ARCHLine Workshops"
+MOD__P_FRONT_ENDEN_MEGJELENITI_A="Front-enden megjeleníti a workshop időpontokat
"
diff --git a/cadline/modules/modules/mod_alworkshops/language/hu-HU/hu-HU.mod_alworkshops.ini b/cadline/modules/modules/mod_alworkshops/language/hu-HU/hu-HU.mod_alworkshops.ini
new file mode 100644
index 00000000..99010646
--- /dev/null
+++ b/cadline/modules/modules/mod_alworkshops/language/hu-HU/hu-HU.mod_alworkshops.ini
@@ -0,0 +1,4 @@
+MOD_ARCHLINE_WORKSHOPS="ARCHLine Workshops"
+MOD__P_FRONT_ENDEN_MEGJELENITI_A="Front-enden megjeleníti a workshop időpontokat
"
+MOD_ARCHLINE_NEXT="Következő időpont"
+MOD_ARCHLINE_MY_APPLICATIONS="Jelentkezéseim"
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_alworkshops/language/hu-HU/hu-HU.mod_alworkshops.sys.ini b/cadline/modules/modules/mod_alworkshops/language/hu-HU/hu-HU.mod_alworkshops.sys.ini
new file mode 100644
index 00000000..a0c3b232
--- /dev/null
+++ b/cadline/modules/modules/mod_alworkshops/language/hu-HU/hu-HU.mod_alworkshops.sys.ini
@@ -0,0 +1,2 @@
+MOD_ARCHLINE_WORKSHOPS="ARCHLine Workshops"
+MOD__P_FRONT_ENDEN_MEGJELENITI_A="Front-enden megjeleníti a workshop időpontokat
"
diff --git a/cadline/modules/modules/mod_alworkshops/mod_alworkshops.php b/cadline/modules/modules/mod_alworkshops/mod_alworkshops.php
new file mode 100644
index 00000000..3565872e
--- /dev/null
+++ b/cadline/modules/modules/mod_alworkshops/mod_alworkshops.php
@@ -0,0 +1,51 @@
+addStyleSheet("/modules/mod_alworkshops/assets/css/style.css");
+$doc->addScript("/modules/mod_alworkshops/assets/js/script.js");
+
+$tmp = explode('/', JFactory::getURI()->getPath());
+$alias = end($tmp);
+$switch = ModAlworkshopsHelper::getSwitch($alias);
+
+JFactory::getDocument()->addStyleSheet('/templates/shaper_helix3/css/jquery-ui-smoothness.css');
+JFactory::getDocument()->addScript('/templates/shaper_helix3/js/jquery-ui.1.12.1.min.js');
+
+if ($alias > '') {
+ if (ModAlworkshopsHelper::getLang() == 'hun') { // Magyar oldal
+ $validLease = ModAlworkshopsHelper::getValidLease($switch->level);
+ $examResults = ModAlworkshopsHelper::getExamResults();
+
+ // workshopok
+ if ($switch->kurzus == 'Y' || $switch->esemeny == 'Y' || $switch->webinair == 'Y') $workshopok = ModAlworkshopsHelper::getCourse($alias);
+ elseif ($switch->vizsga == 'Y') { // vizsga
+ $tceUser = ModAlworkshopsHelper::setTCEUser($switch->vizsga_csoport);
+ $examPermit = ModAlworkshopsHelper::getExamPermit($switch->level);
+ $onlineExamPermit = ModAlworkshopsHelper::getOnlineExamPermit($switch->level);
+ $lastWorkshop = ModAlworkshopsHelper::getLastWorkshop($switch->level);
+ $workshopok = ModAlworkshopsHelper::getWorkshops($alias, ($lastWorkshop ? (date('Y-m-d', _TIME_) >= $lastWorkshop->nextDay ? date('Y-m-d', _TIME_) : $lastWorkshop->nextDay) : ''));
+
+ if ($switch->level == 4) {
+ $appsign = ModAlworkshopsHelper::getAppSign($workshopok[0]->id);
+ $tceGroup = ModAlworkshopsHelper::getTCEUserGroup();
+ }
+ } else // bármi egyéb (csak a workshopok maradtak)
+ $workshopok = ModAlworkshopsHelper::getWorkshops($alias, ($validLease ? (date('Y-m-d', _TIME_) > $validLease->validFrom ? date('Y-m-d', _TIME_) : $validLease->validFrom) : ''), ($validLease ? $validLease->validThrough : ''));
+
+ $payed = $workshopok ? ModAlworkshopsHelper::payed($workshopok[0]->id) : false;
+
+ require JModuleHelper::getLayoutPath('mod_alworkshops', $params->get('layout', 'default'));
+ }
+
+ if (ModAlworkshopsHelper::getLang() == 'eng') { // Angol oldal
+ if ($switch->webinair == 'Y' || $switch->esemeny == 'Y') $workshopok = ModAlworkshopsHelper::getCourse($alias);
+ else $workshopok = ModAlworkshopsHelper::getWorkshopsByGroup($alias);
+
+ require JModuleHelper::getLayoutPath('mod_alworkshops', 'eng');
+ }
+}
diff --git a/cadline/modules/modules/mod_alworkshops/mod_alworkshops.xml b/cadline/modules/modules/mod_alworkshops/mod_alworkshops.xml
new file mode 100644
index 00000000..4de4df24
--- /dev/null
+++ b/cadline/modules/modules/mod_alworkshops/mod_alworkshops.xml
@@ -0,0 +1,151 @@
+
+
+ MOD_ARCHLINE_WORKSHOPS
+ Mar 2017
+ Zsolt Fekete
+ zsolt.fekete@cadline.hu
+ https://www.facbook.com/mcleod78
+ Copyright © 2017 - All rights reserved.
+ GNU General Public License v2.0
+ 0.0.1
+ MOD__P_FRONT_ENDEN_MEGJELENITI_A
+
+ mod_alworkshops.php
+ mod_alworkshops.xml
+ index.html
+ language
+ tmpl
+ assets
+
+
+
+
+
+
+
+
+
+ JGLOBAL_USE_GLOBAL
+ COM_MODULES_FIELD_VALUE_NOCACHING
+
+
+
+
+
+
+
+
+
+
+
+
+ en-GB/en-GB.mod_alworkshops2.sys.ini
+ en-GB/en-GB.mod_alworkshops.ini
+ hu-HU/hu-HU.mod_alworkshops2.sys.ini
+ hu-HU/hu-HU.mod_alworkshops.ini
+
+
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_alworkshops/tmpl/default.php b/cadline/modules/modules/mod_alworkshops/tmpl/default.php
new file mode 100644
index 00000000..3ae0b8c2
--- /dev/null
+++ b/cadline/modules/modules/mod_alworkshops/tmpl/default.php
@@ -0,0 +1,1340 @@
+id);
+$time = '';
+$time = md5($time);
+$notNeedApplication = array(
+ 'belter',
+ 'kulter',
+ 'photoshop',
+ 'interior',
+ 'aranyi-klaudia-kezdo-tanfolyam',
+ 'aranyi-klaudia-halado-tanfolyam',
+ 'aranyi-klaudia-teto-es-lepcso-szerkesztes-tanfolyam',
+ 'd5-render',
+ 'aranyi-klaudia-kiviteli-terv-tanfolyam',
+ 'ferenczi-eva-tanfolyam',
+ 'd5-render-halado',
+ 'd5-render-alap',
+ 'd5-render-3-0-ujdonsagok'
+);
+?>
+
+
+
+
+
= JText::_('MOD_ARCHLINE_APPLICATION') ?>
+
+
+
+ esemeny != 'Y' && ($switch->vizsga == 'Y' || $switch->webinair == 'Y')) { ?>
+
= JText::_('MOD_ARCHLINE_MY_APPLICATION') ?>
+
+
+ vizsga == 'Y' || $application->attendees <= 3) : ?>
+
+
+
+
+
+
+
+
+ kurzus == 'Y' || $switch->workshop == 'Y' || $switch->vizsga == 'Y' || ($switch->esemeny == 'Y' && $switch->login == 'Y') || ($switch->webinair == 'Y' && $switch->login = 'N')) : ?>
+ webinair == 'Y' && $switch->login == 'N') {
+ ?>
+
+
+
= JText::_('MOD_ARCHLINE_MUST_LOGIN') ?>
+ = JModuleHelper::renderModule(JModuleHelper::getModule('login', 'Felhasználó - Bejelentkezés')) ?>
+
+
+
+
+
= JText::_('MOD_ARCHLINE_MUST_LOGIN') ?>
+ = JModuleHelper::renderModule(JModuleHelper::getModule('login', 'Felhasználó - Bejelentkezés')) ?>
+
+
+
+
+
= JText::_('MOD_ARCHLINE_MUST_LOGIN') ?>
+ = JModuleHelper::renderModule(JModuleHelper::getModule('login', 'Felhasználó - Bejelentkezés')) ?>
+
+
+
+ esemeny == 'Y' && $user->id <= 0) : ?>
+
+
+
+
+
+
+ $ws) : ?>
+ start_date;
+ $timestamp = strtotime($date . ' ' . '17:00:00');
+
+ $application = ModAlworkshopsHelper::getApplication($user->id, $ws->id);
+ if ($application) $currentApplication = $k;
+ if ($application && $switch->vizsga == 'Y') $examDate = $ws->start_date;
+ ?>
+ = $timestamp) : ?>
+
+
+
+
+
+ = $timestamp) : ?>
+
+
+ />
+
+
+
+
+
+
+ gepet_kerek == 'Y') : ?>
+
+
+ start_date == $ws->finish_date) : ?>
+ = $ws->start_date ?> = substr($ws->start_time, 0, -3) ?> -= substr($ws->finish_time, 0, -3) ?>
+
+ = $ws->start_date ?> - = $ws->finish_date ?>
+
+
+ = JText::_('MOD_ARCHLINE_CAPACITY') ?>: = $ws->capacity - $ws->applications ?>
+
+
+
+
+ = JText::_('MOD_ARCHLINE_RESERVED') ?>
+ = JText::_('MOD_ARCHLINE_PAID') ?>
+
+
+
+ kurzus == 'Y') : ?>
+
+
+ = JText::_('MOD_ARCHLINE_COURSE_SESSIONS') ?>:
+
+ id);
+ if ($course_sessions) : ?>
+
+
+ = substr($course_session->session_date, 2) ?>
+ = substr($course_session->start_time, 0, 5) ?>-= substr($course_session->finish_time, 0, 5) ?>
+ = $course_session->description ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
= JText::_('MOD_ARCHLINE_MUST_LOGIN') ?>
+ = JModuleHelper::renderModule(JModuleHelper::getModule('login', 'Felhasználó - Bejelentkezés')) ?>
+
+
+
+
+
+
= JText::_('MOD_ARCHLINE_NO_WORKSHOP') ?>
+
+
+price > 0) : ?>
+
+
+
+
+
+alias != 'tanulocsoportok' && ($switch->kurzus == 'Y' || $switch->workshop == 'Y')) : ?>
+
+
+
+
+esemeny == 'Y' && $user->id > 0) {
+?>
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_alworkshops/tmpl/eng.php b/cadline/modules/modules/mod_alworkshops/tmpl/eng.php
new file mode 100644
index 00000000..378f32cf
--- /dev/null
+++ b/cadline/modules/modules/mod_alworkshops/tmpl/eng.php
@@ -0,0 +1,1312 @@
+id);
+$time = '';
+$time = md5($time);
+?>
+
+
+
+
+
= JText::_('MOD_ARCHLINE_APPLICATION') ?>
+
+
+
+ esemeny != 'Y' && ($switch->vizsga == 'Y' || $switch->webinair == 'Y')) { ?>
+
= JText::_('MOD_ARCHLINE_MY_APPLICATION') ?>
+
+
+ vizsga == 'Y' || $application->attendees <= 3) : ?>
+
+
+
+
+
+
+
+
+ kurzus == 'Y' || $switch->workshop == 'Y' || $switch->vizsga == 'Y' || ($switch->esemeny == 'Y' && $switch->login == 'Y') || ($switch->webinair == 'Y' && $switch->login = 'N')) : ?>
+ webinair == 'Y' && $switch->login == 'N') {
+ ?>
+
+
+
= JText::_('MOD_ARCHLINE_MUST_LOGIN') ?>
+ = JModuleHelper::renderModule(JModuleHelper::getModule('login', 'Felhasználó - Bejelentkezés')) ?>
+
+
+
+
+
= JText::_('MOD_ARCHLINE_MUST_LOGIN') ?>
+ = JModuleHelper::renderModule(JModuleHelper::getModule('login', 'Felhasználó - Bejelentkezés')) ?>
+
+
+
+
+
= JText::_('MOD_ARCHLINE_MUST_LOGIN') ?>
+ = JModuleHelper::renderModule(JModuleHelper::getModule('login', 'Felhasználó - Bejelentkezés')) ?>
+
+
+
+ esemeny == 'Y' && $user->id <= 0) : ?>
+
+
+
+
+
+
+ $ws) : ?>
+ start_date;
+ $timestamp = strtotime($date . ' ' . '17:00:00');
+
+ $application = ModAlworkshopsHelper::getApplication($user->id, $ws->id);
+ if ($application) $currentApplication = $k;
+ if ($application && $switch->vizsga == 'Y') $examDate = $ws->start_date;
+ ?>
+ = $timestamp) : ?>
+
+
+
+
+
+ = $timestamp) : ?>
+
+
+ />
+
+
+
+
+
+
+ gepet_kerek == 'Y') : ?>
+
+
+ start_date == $ws->finish_date) : ?>
+ = $ws->start_date ?> = substr($ws->start_time, 0, -3) ?> -= substr($ws->finish_time, 0, -3) ?>
+
+ = $ws->start_date ?> - = $ws->finish_date ?>
+
+
+ = JText::_('MOD_ARCHLINE_CAPACITY') ?>: = $ws->capacity - $ws->applications ?>
+
+
+
+
+ = JText::_('MOD_ARCHLINE_RESERVED') ?>
+ = JText::_('MOD_ARCHLINE_PAID') ?>
+
+
+
+ kurzus == 'Y') : ?>
+
+
+ = JText::_('MOD_ARCHLINE_COURSE_SESSIONS') ?>:
+
+ id);
+ if ($course_sessions) : ?>
+
+
+ = substr($course_session->session_date, 2) ?>
+ = substr($course_session->start_time, 0, 5) ?>-= substr($course_session->finish_time, 0, 5) ?>
+ = $course_session->description ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
= JText::_('MOD_ARCHLINE_MUST_LOGIN') ?>
+ = JModuleHelper::renderModule(JModuleHelper::getModule('login', 'Felhasználó - Bejelentkezés')) ?>
+
+
+
+
+
+
= JText::_('MOD_ARCHLINE_NO_WORKSHOP') ?>
+
+
+price > 0) : ?>
+
+
+
+
+
+alias != 'tanulocsoportok' && ($switch->kurzus == 'Y' || $switch->workshop == 'Y')) : ?>
+
+
+
+
+esemeny == 'Y' && $user->id > 0) {
+?>
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_alworkshops/tmpl/index.html b/cadline/modules/modules/mod_alworkshops/tmpl/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_alworkshops/tmpl/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_course_list/helper.php b/cadline/modules/modules/mod_course_list/helper.php
new file mode 100644
index 00000000..417879eb
--- /dev/null
+++ b/cadline/modules/modules/mod_course_list/helper.php
@@ -0,0 +1,78 @@
+getQuery(true);
+
+ $query->select(array('c.*'));
+ $query->from($db->quoteName('www_archline_hu.aleducation_courses', 'c'));
+ $query->where($db->quoteName('c.lang') . ' = ' . $db->quote($lang));
+ $query->where($db->quoteName('c.published') . ' = ' . $db->quote('Y'));
+ $query->order('c.ordering ASC');
+
+ // Reset the query using our newly populated query object.
+ $db->setQuery($query);
+
+ return $db->loadObjectList();
+ }
+
+ public static function getApplicationPercentage($courseId, $userId)
+ {
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query->select(array('e.*'));
+ $query->from($db->quoteName('www_archline_hu.aleducation_applications', 'e'));
+ $query->where($db->quoteName('e.user_id') . ' = ' . $db->quote($userId));
+ $query->where($db->quoteName('e.course_id') . ' = ' . $db->quote($courseId));
+
+ $db->setQuery($query);
+
+ $result = $db->loadObject();
+
+ return empty($result) ? 0 : $result->percentage;
+ }
+
+ public static function getApplications($userId)
+ {
+ $db = JFactory::getDbo();
+
+ $query = $db->getQuery(true);
+
+ $query->select(array('e.*'));
+ $query->from($db->quoteName('www_archline_hu.aleducation_applications', 'e'));
+ $query->where($db->quoteName('e.user_id') . ' = ' . $db->quote($userId));
+
+ $db->setQuery($query);
+
+ return $db->loadObjectList();
+ }
+
+ public static function getColor()
+ {
+ return self::getLang() == "hun" ? "#f0c317" : "#f0c317";
+ }
+
+ public static function getLang()
+ {
+ $lang = JFactory::getLanguage()->getTag();
+
+ if ($lang == 'de-DE')
+ return 'de';
+
+ if ($lang == 'hu-HU')
+ return 'hun';
+
+ return 'eng';
+ }
+}
diff --git a/cadline/modules/modules/mod_course_list/index.html b/cadline/modules/modules/mod_course_list/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_course_list/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_course_list/language/en-GB/en-GB.mod_course_list.ini b/cadline/modules/modules/mod_course_list/language/en-GB/en-GB.mod_course_list.ini
new file mode 100644
index 00000000..ccf3660f
--- /dev/null
+++ b/cadline/modules/modules/mod_course_list/language/en-GB/en-GB.mod_course_list.ini
@@ -0,0 +1,4 @@
+MOD_ARCHLINE_USERS="ARCHLine users"
+MOD__P___ARCHLINE_USERS___P_="
+ ARCHLine users
+
"
diff --git a/cadline/modules/modules/mod_course_list/language/en-GB/en-GB.mod_course_list.sys.ini b/cadline/modules/modules/mod_course_list/language/en-GB/en-GB.mod_course_list.sys.ini
new file mode 100644
index 00000000..ccf3660f
--- /dev/null
+++ b/cadline/modules/modules/mod_course_list/language/en-GB/en-GB.mod_course_list.sys.ini
@@ -0,0 +1,4 @@
+MOD_ARCHLINE_USERS="ARCHLine users"
+MOD__P___ARCHLINE_USERS___P_="
+ ARCHLine users
+
"
diff --git a/cadline/modules/modules/mod_course_list/language/hu-HU/hu-HU.mod_course_list.ini b/cadline/modules/modules/mod_course_list/language/hu-HU/hu-HU.mod_course_list.ini
new file mode 100644
index 00000000..ccf3660f
--- /dev/null
+++ b/cadline/modules/modules/mod_course_list/language/hu-HU/hu-HU.mod_course_list.ini
@@ -0,0 +1,4 @@
+MOD_ARCHLINE_USERS="ARCHLine users"
+MOD__P___ARCHLINE_USERS___P_="
+ ARCHLine users
+
"
diff --git a/cadline/modules/modules/mod_course_list/language/hu-HU/hu-HU.mod_course_list.sys.ini b/cadline/modules/modules/mod_course_list/language/hu-HU/hu-HU.mod_course_list.sys.ini
new file mode 100644
index 00000000..ccf3660f
--- /dev/null
+++ b/cadline/modules/modules/mod_course_list/language/hu-HU/hu-HU.mod_course_list.sys.ini
@@ -0,0 +1,4 @@
+MOD_ARCHLINE_USERS="ARCHLine users"
+MOD__P___ARCHLINE_USERS___P_="
+ ARCHLine users
+
"
diff --git a/cadline/modules/modules/mod_course_list/mod_course_list.php b/cadline/modules/modules/mod_course_list/mod_course_list.php
new file mode 100644
index 00000000..b6fe7411
--- /dev/null
+++ b/cadline/modules/modules/mod_course_list/mod_course_list.php
@@ -0,0 +1,12 @@
+getTag();
+$user = JFactory::getUser();
+$courses = ModCourseListHelper::getCourses();
+$color = ModCourseListHelper::getColor();
+$applications = ModCourseListHelper::getApplications($user->id);
+
+require JModuleHelper::getLayoutPath('mod_course_list', $params->get('layout', 'default'));
diff --git a/cadline/modules/modules/mod_course_list/mod_course_list.xml b/cadline/modules/modules/mod_course_list/mod_course_list.xml
new file mode 100644
index 00000000..e1772366
--- /dev/null
+++ b/cadline/modules/modules/mod_course_list/mod_course_list.xml
@@ -0,0 +1,42 @@
+
+
+ MOD_COURSE_LIST
+ August 2022
+ Nagy Máté
+ mate.nagy@cadline.hu
+ Copyright © 2021 - All rights reserved.
+ 0.0.1
+ Create a list for the actual courses
+
+ mod_course_list.php
+ mod_course_list.xml
+ index.html
+ helper.php
+ language
+ tmpl
+
+
+
+
+
+
+
+ JGLOBAL_USE_GLOBAL
+ COM_MODULES_FIELD_VALUE_NOCACHING
+
+
+
+
+
+
+
+
+
+
+
+ en-GB/en-GB.mod_course_list.sys.ini
+ en-GB/en-GB.mod_course_list.ini
+ hu-HU/hu-HU.mod_course_list.sys.ini
+ hu-HU/hu-HU.mod_course_list.ini
+
+
diff --git a/cadline/modules/modules/mod_course_list/tmpl/default.php b/cadline/modules/modules/mod_course_list/tmpl/default.php
new file mode 100644
index 00000000..17367de6
--- /dev/null
+++ b/cadline/modules/modules/mod_course_list/tmpl/default.php
@@ -0,0 +1,329 @@
+
+
+
+
+
+
+ id, $user->id); ?>
+
+
+
+
+
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_course_list/tmpl/index.html b/cadline/modules/modules/mod_course_list/tmpl/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_course_list/tmpl/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_webinar/helper.php b/cadline/modules/modules/mod_webinar/helper.php
new file mode 100644
index 00000000..0c68ba18
--- /dev/null
+++ b/cadline/modules/modules/mod_webinar/helper.php
@@ -0,0 +1,232 @@
+getQuery(true);
+
+ $query->select(array('c.*'));
+ $query->from($db->quoteName('www_archline_hu.alworkshops_courses', 'c'));
+ $query->where($db->quoteName('c.id') . ' = ' . $db->quote($id));
+
+ // Reset the query using our newly populated query object.
+ $db->setQuery($query);
+
+ // Load the results as a list of stdClass objects (see later for more options on retrieving data).
+ $result = $db->loadObject();
+
+ if ($result->yt_link != '')
+ $result->ytID = substr($result->yt_link, strrpos($result->yt_link, '/') + 1);
+
+ $start_date = new DateTime($result->start_date . ' ' . $result->start_time);
+ $since_start = $start_date->diff(new DateTime($result->finish_date . ' ' . $result->finish_time));
+
+ $result->period = $since_start->i;
+
+ return $result;
+ }
+
+ public static function changeDateFormat($date)
+ {
+ $date = new DateTime($date);
+
+ return $date->format('M d, Y g:i A');
+ }
+
+ public function createApplication($course_id, $name, $email, $user_id)
+ {
+ $db = JFactory::getDbo();
+ $application = new stdClass();
+
+ $application->course_id = $course_id;
+ $application->user_id = $user_id;
+ $application->attendees = 1;
+ $application->price_per_attendee = 0;
+ $application->price_total = 0;
+ $application->price_vat = 0;
+ $application->gepet_kerek = 'N';
+ $application->berletem_van = 'N';
+ $application->date = date('Y-m-d H:i:s', time());
+ $application->transaction_id = '';
+ $application->wsdatetime = NULL;
+ $application->name = $name;
+ $application->email = $email;
+
+ $db->insertObject('www_archline_hu.alworkshops_application', $application);
+ }
+
+ public static function getCrmUser($nUserID)
+ {
+ $db = JFactory::getDbo();
+
+ $query = "SELECT * FROM cl_hlusers.users
+ WHERE nUserID = {$nUserID}";
+
+ $db->setQuery($query);
+
+ return $db->loadObject();
+ }
+
+ public function getUserID($name, $email, $prof, $cntry)
+ {
+ $db = JFactory::getDbo();
+
+ $query = "SELECT * FROM cl_hlusers.u_emails
+ WHERE email = '{$email}'";
+
+ $db->setQuery($query);
+
+ $exist = $db->loadObject();
+
+ if (!$exist) {
+ if ($name > '' && $email > '') {
+ $user = new stdClass();
+
+ $user->strName = $name;
+ $user->strEmail = $email;
+ $user->nUserProf = $prof;
+ $user->nCtrID = $cntry;
+ $user->dateInsert = time();
+ $user->old_db = 'clusers_eng';
+
+ $db->insertObject('cl_hlusers.users', $user);
+
+ $nUserID = $db->insertid();
+
+ $u_email = new stdClass();
+
+ $u_email->email = $email;
+ $u_email->nUserID = $nUserID;
+ $u_email->default = 1;
+ $u_email->active = 1;
+ $u_email->deleted = 0;
+ $u_email->newsletter = 1;
+
+ $db->insertObject('cl_hlusers.u_emails', $u_email);
+ }
+ } else {
+ $nUserID = $exist->nUserID;
+ }
+
+ return $nUserID;
+ }
+
+ public static function getEmailTemplate($email_template)
+ {
+ $db = JFactory::getDbo();
+ $table = JFactory::getLanguage()->getTag() == 'hu-HU' ? 'jml_content' : 'eng_content';
+
+ $query = "SELECT * FROM www_archline_hu.{$table}
+ WHERE id = {$email_template}";
+
+ $db->setQuery($query);
+
+ return $db->loadObject();
+ }
+
+ public static function sendEmail($course, $name, $email)
+ {
+ require_once($_SERVER['DOCUMENT_ROOT'] . '/maintenance/libraries/phpmailer/PHPMailerAutoload.php');
+ require_once($_SERVER['DOCUMENT_ROOT'] . '/maintenance/config.mail.php');
+
+ $template = self::getEmailTemplate($course->email_template);
+ $body = $template->introtext . $template->fulltext;
+ $title = $template->title;
+
+ $replacements = array(
+ '{NAME}' => $name,
+ '{TITLE}' => $course->title,
+ '{START_DATE}' => $course->start_date,
+ '{START_TIME}' => $course->start_time,
+ '{FINISH_DATE}' => $course->finish_date,
+ '{FINISH_TIME}' => $course->finish_time,
+ '{LOCATION}' => $course->location,
+ '{ATTENDEES}' => 0,
+ '{PRICE}' => $course->price,
+ '{PRICE_TOTAL}' => 0,
+ '{VAT}' => $course->vat
+ );
+
+ foreach ($replacements as $key => $value) {
+ $body = str_replace($key, $value, $body);
+ }
+
+ $mail = new PHPMailer;
+ $mail->isSMTP();
+ $mail->CharSet = 'UTF-8';
+ $mail->Host = $mailconfig['Host'];
+ $mail->SMTPAuth = true;
+ $mail->Username = $mailconfig['Username'];
+ $mail->Password = $mailconfig['Password'];
+ $mail->SMTPSecure = $mailconfig['SMTPSecure'];
+ $mail->Port = $mailconfig['Port'];
+ $mail->Subject = $title;
+ $mail->AltBody = strip_tags($body);
+ $mail->isHTML(TRUE);
+ $mail->setFrom($mailconfig['from_hu']);
+ $mail->addAddress($email);
+ //$mail->addBCC('marketing@cadline.hu');
+ $mail->msgHTML($body);
+
+ if ($mail->send()) {
+ unset($mail);
+
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public static function registration($data)
+ {
+ $db = JFactory::getDbo();
+
+ $name = $data['question_name'];
+ $email = $data['question_email_address'];
+ $cntry = $data['question_country'];
+ $prof = $data['question_prof'];
+ $c_id = $data['course_id'];
+
+ $nUserID = self::getUserID($name, $email, $prof, $cntry);
+
+ $query = "SELECT * FROM www_archline_hu.alworkshops_application
+ WHERE course_id = {$c_id} AND email = '{$email}' AND published = 'Y'";
+
+ $db->setQuery($query);
+
+ $exist = $db->loadObject();
+
+ if (empty($exist)) {
+ $course = self::getWebinar($c_id);
+ $history = new stdClass();
+ $user = JFactory::getUser();
+
+ $history->nUserID = $nUserID;
+ $history->nTopicID = JFactory::getLanguage()->getTag() == 'hu-HU' ? 336 : 333;
+ $history->dateEvent = $course->start_date;
+ $history->strPlace = $course->title;
+ $history->strInfo = $course->course_name;
+ $history->nManagerID = 36;
+ $history->insertDate = date('Y-m-d H:i:s', time());
+
+ $db->insertObject('cl_hlusers.u_history', $history);
+
+ self::createApplication($c_id, $name, $email, $user->id);
+
+ $sendEmail = self::sendEmail($course, $name, $email);
+
+ JFactory::getApplication()->enqueueMessage(JText::_('MOD_WEBINAR_SUCCESS_REGISTRATION'));
+ } else {
+ JFactory::getApplication()->enqueueMessage(JText::_('MOD_WEBINAR_ALREADY_SIGNED_UP'), 'warning');
+ }
+ }
+}
diff --git a/cadline/modules/modules/mod_webinar/index.html b/cadline/modules/modules/mod_webinar/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_webinar/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_webinar/language/en-GB/en-GB.mod_webinar.ini b/cadline/modules/modules/mod_webinar/language/en-GB/en-GB.mod_webinar.ini
new file mode 100644
index 00000000..63d2f59d
--- /dev/null
+++ b/cadline/modules/modules/mod_webinar/language/en-GB/en-GB.mod_webinar.ini
@@ -0,0 +1,20 @@
+MOD_WEBINAR_SUCCESS_REGISTRATION="Thank you for taking time to register.
+ An email with further details has been sent to the email address you provided.
+ We hope you will enjoy the presentations."
+MOD_WEBINAR_ALREADY_SIGNED_UP="You already signed up for this webinar."
+MOD_WEBINAR_REGISTRATION="Registration"
+MOD_WEBINAR_TOPIC="Topic"
+MOD_WEBINAR_DESCRIPTION="Description"
+MOD_WEBINAR_TIME="Time"
+MOD_WEBINAR_ACCOUNT_ALREADY="Already have an account?"
+MOD_WEBINAR_REQUIRED_INFO="Required information"
+MOD_WEBINAR_SIGN_IN="Sign in"
+MOD_WEBINAR_NAME="Name"
+MOD_WEBINAR_EMAIL="Email address"
+MOD_WEBINAR_COUNTRY="Country"
+MOD_WEBINAR_CHOOSE_COUNTRY="Choose country"
+MOD_WEBINAR_PROFESSION="Profession"
+MOD_WEBINAR_CHOOSE_PROFESSION="Choose profession"
+MOD_WEBINAR_REGISTER_BUTTON="Register"
+MOD_WEBINAR_TERM="Information you provide when registering will be shared with the account owner and host and can be used and shared by them in accordance with their Terms and Privacy Policy."
+MOD_WEBINAR_EVENT_OVER="Webinar is over, you cannot register now. If you have any questions, please contact Webinar host: SketchUp Marketing."
diff --git a/cadline/modules/modules/mod_webinar/language/en-GB/en-GB.mod_webinar.sys.ini b/cadline/modules/modules/mod_webinar/language/en-GB/en-GB.mod_webinar.sys.ini
new file mode 100644
index 00000000..d92d6e97
--- /dev/null
+++ b/cadline/modules/modules/mod_webinar/language/en-GB/en-GB.mod_webinar.sys.ini
@@ -0,0 +1,4 @@
+MOD_ARCHLINE_USERS="ARCHLine users"
+MOD__P___ARCHLINE_USERS___P_="
+ ARCHLine users
+
"
diff --git a/cadline/modules/modules/mod_webinar/language/hu-HU/hu-HU.mod_webinar.ini b/cadline/modules/modules/mod_webinar/language/hu-HU/hu-HU.mod_webinar.ini
new file mode 100644
index 00000000..63d2f59d
--- /dev/null
+++ b/cadline/modules/modules/mod_webinar/language/hu-HU/hu-HU.mod_webinar.ini
@@ -0,0 +1,20 @@
+MOD_WEBINAR_SUCCESS_REGISTRATION="Thank you for taking time to register.
+ An email with further details has been sent to the email address you provided.
+ We hope you will enjoy the presentations."
+MOD_WEBINAR_ALREADY_SIGNED_UP="You already signed up for this webinar."
+MOD_WEBINAR_REGISTRATION="Registration"
+MOD_WEBINAR_TOPIC="Topic"
+MOD_WEBINAR_DESCRIPTION="Description"
+MOD_WEBINAR_TIME="Time"
+MOD_WEBINAR_ACCOUNT_ALREADY="Already have an account?"
+MOD_WEBINAR_REQUIRED_INFO="Required information"
+MOD_WEBINAR_SIGN_IN="Sign in"
+MOD_WEBINAR_NAME="Name"
+MOD_WEBINAR_EMAIL="Email address"
+MOD_WEBINAR_COUNTRY="Country"
+MOD_WEBINAR_CHOOSE_COUNTRY="Choose country"
+MOD_WEBINAR_PROFESSION="Profession"
+MOD_WEBINAR_CHOOSE_PROFESSION="Choose profession"
+MOD_WEBINAR_REGISTER_BUTTON="Register"
+MOD_WEBINAR_TERM="Information you provide when registering will be shared with the account owner and host and can be used and shared by them in accordance with their Terms and Privacy Policy."
+MOD_WEBINAR_EVENT_OVER="Webinar is over, you cannot register now. If you have any questions, please contact Webinar host: SketchUp Marketing."
diff --git a/cadline/modules/modules/mod_webinar/language/hu-HU/hu-HU.mod_webinar.sys.ini b/cadline/modules/modules/mod_webinar/language/hu-HU/hu-HU.mod_webinar.sys.ini
new file mode 100644
index 00000000..d92d6e97
--- /dev/null
+++ b/cadline/modules/modules/mod_webinar/language/hu-HU/hu-HU.mod_webinar.sys.ini
@@ -0,0 +1,4 @@
+MOD_ARCHLINE_USERS="ARCHLine users"
+MOD__P___ARCHLINE_USERS___P_="
+ ARCHLine users
+
"
diff --git a/cadline/modules/modules/mod_webinar/mod_webinar.php b/cadline/modules/modules/mod_webinar/mod_webinar.php
new file mode 100644
index 00000000..ec50518d
--- /dev/null
+++ b/cadline/modules/modules/mod_webinar/mod_webinar.php
@@ -0,0 +1,39 @@
+input->getString('webinar_id');
+$webinar = ModWebinarHelper::getWebinar($webinarID);
+
+$user = JFactory::getUser();
+$countries = parse_ini_file($_SERVER['DOCUMENT_ROOT'] . '/language/' . JFactory::getLanguage()->getTag() . '/' . JFactory::getLanguage()->getTag() . '.countries.ini');
+$profession = parse_ini_file($_SERVER['DOCUMENT_ROOT'] . '/language/' . JFactory::getLanguage()->getTag() . '/' . JFactory::getLanguage()->getTag() . '.prof.ini');
+
+$status = $user->guest;
+
+if (!$user->guest) {
+ $name = $user->name;
+ $email = $user->email;
+
+ $crmUser = ModWebinarHelper::getCrmUser($user->nUserID);
+
+ if (!empty($crmUser)) {
+ $cntry = $crmUser->nCtrID;
+ $prof = $crmUser->nUserProf;
+ }
+}
+
+if (JFactory::getLanguage()->getTag() == 'hu-HU') {
+ $crm_db = 'clusers';
+} else {
+ $crm_db = 'clusers_eng';
+}
+
+if (isset($_POST['webinar_register_button'])) {
+ //ModWebinarHelper::registration($_POST);
+ ModWebinarHelper::registration($app->input->post);
+}
+
+require JModuleHelper::getLayoutPath('mod_webinar', $params->get('layout', 'default'));
diff --git a/cadline/modules/modules/mod_webinar/mod_webinar.xml b/cadline/modules/modules/mod_webinar/mod_webinar.xml
new file mode 100644
index 00000000..be167bce
--- /dev/null
+++ b/cadline/modules/modules/mod_webinar/mod_webinar.xml
@@ -0,0 +1,42 @@
+
+
+ MOD_WEBINAR
+ October 2021
+ Nagy Máté
+ mate.nagy@cadline.hu
+ Copyright © 2021 - All rights reserved.
+ 0.0.1
+ Webinar page
+
+ mod_webinar.php
+ mod_webinar.xml
+ index.html
+ helper.php
+ language
+ tmpl
+
+
+
+
+
+
+
+ JGLOBAL_USE_GLOBAL
+ COM_MODULES_FIELD_VALUE_NOCACHING
+
+
+
+
+
+
+
+
+
+
+
+ en-GB/en-GB.mod_webinar.sys.ini
+ en-GB/en-GB.mod_webinar.ini
+ hu-HU/hu-HU.mod_webinar.sys.ini
+ hu-HU/hu-HU.mod_webinar.ini
+
+
diff --git a/cadline/modules/modules/mod_webinar/tmpl/default.php b/cadline/modules/modules/mod_webinar/tmpl/default.php
new file mode 100644
index 00000000..76b7d53a
--- /dev/null
+++ b/cadline/modules/modules/mod_webinar/tmpl/default.php
@@ -0,0 +1,425 @@
+setClientId('427394287601-f5fvh3809726dah7lq7d4pkl4af8p7av.apps.googleusercontent.com');
+ $client->setClientSecret('_qMqFv2zuk2b0z7fazwgNuBk');
+ $client->setRedirectUri('https://www.archlinexp.com/maintenance/google_redirect.php');
+ $client->addScope('email');
+ $client->addScope('profile');
+
+ $authUrl = $client->createAuthUrl();
+}
+?>
+
+
+
+
+
+ ytID != '') : ?>
+
VIDEO
+
+
+
+
+
+ finish_date >= date('Y-m-d')) : ?>
+
+
+
+
+
+
+guest) : ?>
+
+ = JModuleHelper::renderModule(JModuleHelper::getModule('login', 'Felhasználó - Bejelentkezés')) ?>
+
+
+
+
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_webinar/tmpl/index.html b/cadline/modules/modules/mod_webinar/tmpl/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_webinar/tmpl/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_webinar_list/helper.php b/cadline/modules/modules/mod_webinar_list/helper.php
new file mode 100644
index 00000000..709f5518
--- /dev/null
+++ b/cadline/modules/modules/mod_webinar_list/helper.php
@@ -0,0 +1,49 @@
+get('groups');
+ $query = $db->getQuery(true);
+
+ if (in_array('7', $groups)) {
+ $query->select(array('c.*'));
+ $query->from($db->quoteName('www_archline_hu.alworkshops_courses', 'c'));
+ $query->where($db->quoteName('c.id') . ' >= ' . $db->quote(1309));
+ $query->where($db->quoteName('c.alias') . ' = ' . $db->quote($alias));
+ $query->order('c.start_date DESC');
+ } else {
+ $query->select(array('c.*'));
+ $query->from($db->quoteName('www_archline_hu.alworkshops_courses', 'c'));
+ $query->where($db->quoteName('c.id') . ' >= ' . $db->quote(1309));
+ $query->where($db->quoteName('c.alias') . ' = ' . $db->quote($alias));
+ $query->where($db->quoteName('c.published') . ' = ' . $db->quote('Y'));
+ $query->order('c.start_date DESC');
+ }
+
+ $db->setQuery($query);
+
+ return $db->loadObjectList();
+ }
+
+ public static function changeDateFormat($date)
+ {
+ $date = new DateTime($date);
+
+ return $date->format('M d, Y g:i A');
+ }
+}
diff --git a/cadline/modules/modules/mod_webinar_list/index.html b/cadline/modules/modules/mod_webinar_list/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_webinar_list/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_webinar_list/language/en-GB/en-GB.mod_webinar_list.ini b/cadline/modules/modules/mod_webinar_list/language/en-GB/en-GB.mod_webinar_list.ini
new file mode 100644
index 00000000..d92d6e97
--- /dev/null
+++ b/cadline/modules/modules/mod_webinar_list/language/en-GB/en-GB.mod_webinar_list.ini
@@ -0,0 +1,4 @@
+MOD_ARCHLINE_USERS="ARCHLine users"
+MOD__P___ARCHLINE_USERS___P_="
+ ARCHLine users
+
"
diff --git a/cadline/modules/modules/mod_webinar_list/language/en-GB/en-GB.mod_webinar_list.sys.ini b/cadline/modules/modules/mod_webinar_list/language/en-GB/en-GB.mod_webinar_list.sys.ini
new file mode 100644
index 00000000..d92d6e97
--- /dev/null
+++ b/cadline/modules/modules/mod_webinar_list/language/en-GB/en-GB.mod_webinar_list.sys.ini
@@ -0,0 +1,4 @@
+MOD_ARCHLINE_USERS="ARCHLine users"
+MOD__P___ARCHLINE_USERS___P_="
+ ARCHLine users
+
"
diff --git a/cadline/modules/modules/mod_webinar_list/language/hu-HU/hu-HU.mod_webinar_list.ini b/cadline/modules/modules/mod_webinar_list/language/hu-HU/hu-HU.mod_webinar_list.ini
new file mode 100644
index 00000000..d92d6e97
--- /dev/null
+++ b/cadline/modules/modules/mod_webinar_list/language/hu-HU/hu-HU.mod_webinar_list.ini
@@ -0,0 +1,4 @@
+MOD_ARCHLINE_USERS="ARCHLine users"
+MOD__P___ARCHLINE_USERS___P_="
+ ARCHLine users
+
"
diff --git a/cadline/modules/modules/mod_webinar_list/language/hu-HU/hu-HU.mod_webinar_list.sys.ini b/cadline/modules/modules/mod_webinar_list/language/hu-HU/hu-HU.mod_webinar_list.sys.ini
new file mode 100644
index 00000000..d92d6e97
--- /dev/null
+++ b/cadline/modules/modules/mod_webinar_list/language/hu-HU/hu-HU.mod_webinar_list.sys.ini
@@ -0,0 +1,4 @@
+MOD_ARCHLINE_USERS="ARCHLine users"
+MOD__P___ARCHLINE_USERS___P_="
+ ARCHLine users
+
"
diff --git a/cadline/modules/modules/mod_webinar_list/mod_webinar_list.php b/cadline/modules/modules/mod_webinar_list/mod_webinar_list.php
new file mode 100644
index 00000000..21449f27
--- /dev/null
+++ b/cadline/modules/modules/mod_webinar_list/mod_webinar_list.php
@@ -0,0 +1,16 @@
+getTag();
+$webinars = ModWebinarListHelper::getWebinars($lang);
+
+$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
+
+if ($lang == 'hu-HU')
+ $actual_link .= '/regisztráció?webinar_id=';
+else
+ $actual_link .= '/registration?webinar_id=';
+
+require JModuleHelper::getLayoutPath('mod_webinar_list', $params->get('layout', 'default'));
diff --git a/cadline/modules/modules/mod_webinar_list/mod_webinar_list.xml b/cadline/modules/modules/mod_webinar_list/mod_webinar_list.xml
new file mode 100644
index 00000000..a921930c
--- /dev/null
+++ b/cadline/modules/modules/mod_webinar_list/mod_webinar_list.xml
@@ -0,0 +1,42 @@
+
+
+ MOD_WEBINAR_LIST
+ October 2021
+ Nagy Máté
+ mate.nagy@cadline.hu
+ Copyright © 2021 - All rights reserved.
+ 0.0.1
+ Create a list for the upcoming webinars
+
+ mod_webinar_list.php
+ mod_webinar_list.xml
+ index.html
+ helper.php
+ language
+ tmpl
+
+
+
+
+
+
+
+ JGLOBAL_USE_GLOBAL
+ COM_MODULES_FIELD_VALUE_NOCACHING
+
+
+
+
+
+
+
+
+
+
+
+ en-GB/en-GB.mod_webinar_list.sys.ini
+ en-GB/en-GB.mod_webinar_list.ini
+ hu-HU/hu-HU.mod_webinar_list.sys.ini
+ hu-HU/hu-HU.mod_webinar_list.ini
+
+
diff --git a/cadline/modules/modules/mod_webinar_list/tmpl/default.php b/cadline/modules/modules/mod_webinar_list/tmpl/default.php
new file mode 100644
index 00000000..1cc8ca76
--- /dev/null
+++ b/cadline/modules/modules/mod_webinar_list/tmpl/default.php
@@ -0,0 +1,251 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ published == 'Y'): ?>
+
+ =$webinar->title?>
+
+
+
+ =$webinar->title?> [=JText::_('MOD_WEBINAR_LIST_NOT_PUBLICATED')?>]
+
+
+
+
+
=mb_strtoupper($webinar->course_name)?>
+
+
+
+ =$webinar->start_date.' '.substr($webinar->start_time, 0, 5)?> | =strtoupper($webinar->location)?> | =$webinar->price == 0 ? 'INGYENES' : $webinar->price?>
+
+
=ModWebinarListHelper::changeDateFormat($webinar->start_date.' '.$webinar->start_time)?> - =date("g:i A", strtotime($webinar->finish_time))?> CET | =$webinar->location?> | =$webinar->price == 0 ? 'Free to Attend' : $webinar->price?>
+
+
+
+
+
+ Read Article
+
+
+
+
+
+
diff --git a/cadline/modules/modules/mod_webinar_list/tmpl/index.html b/cadline/modules/modules/mod_webinar_list/tmpl/index.html
new file mode 100644
index 00000000..f28d9de6
--- /dev/null
+++ b/cadline/modules/modules/mod_webinar_list/tmpl/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+Joomla Module Generator
+
+
diff --git a/cadline/modules/modules/mod_wsregister/admin/elements/about.php b/cadline/modules/modules/mod_wsregister/admin/elements/about.php
new file mode 100644
index 00000000..097d802d
--- /dev/null
+++ b/cadline/modules/modules/mod_wsregister/admin/elements/about.php
@@ -0,0 +1,132 @@
+How to add Captions
+
+
+
On the first view it looks complicated, but no worry, it is really easy. Every Caption Element is made with a simple Div class and some custom Attributes, you can simply copy and paste the below Div class in the Caption Area.
+
<div class="caption lfr medium_grey" data-x="510" data-y="210" data-speed="300" data-start="2000">Caption Text or Image here</div>
+
IMPORTANT: CLICK HERE TO SEE HOW IT WORKS
+
If you have massive problems with Captions or no time to do this, there is an Component with a nice Drag & Drop Backend for this available (not from us, so no support Questions please) - Look the Unite Revolution Slider
+
+
+
+
+
+Examples like in the Demo
+
+
+
+
Slide 1
+<div class="caption lfb" data-x="0" data-y="0" data-speed="700" data-start="800" data-easing="easeOutExpo"><img src="images/slides/sliderrevolution/slide_image1.png" alt=""></div>
+
+<div class="caption lfr" data-x="300" data-y="40" data-speed="700" data-start="800" data-easing="easeOutExpo"><img src="images/slides/sliderrevolution/slide_image-ipad.png" alt=""></div>
+
+<div class="caption lfr" data-x="210" data-y="20" data-speed="700" data-start="1000" data-easing="easeOutExpo"><img src="images/slides/sliderrevolution/slide_image-iphone.png" alt=""></div>
+
+<div class="caption lfl big_white" data-x="20" data-y="60" data-speed="300" data-start="1200" data-easing="easeOutExpo">Fluid & Responsive Design</div>
+
+<div class="caption lfl big_color" data-x="20" data-y="110" data-speed="300" data-start="1300" data-easing="easeOutExpo">HTML5 & CSS3</div>
+
+<div class="caption lfr small_text" data-x="40" data-y="170" data-speed="300" data-start="1500" data-easing="easeOutExpo"><span class="fa fa-check"></span> Responsive & Mobile Optimized</div>
+
+<div class="caption lfr small_text" data-x="40" data-y="200" data-speed="300" data-start="1700" data-easing="easeOutExpo"><span class="fa fa-check"></span> Easy Customization</div>
+
+<div class="caption lfr small_text" data-x="40" data-y="230" data-speed="300" data-start="1900" data-easing="easeOutExpo"><span class="fa fa-check"></span> Unique Mobile Menu</div>
+
+<div class="caption lfr small_text" data-x="40" data-y="260" data-speed="300" data-start="2100" data-easing="easeOutExpo"><span class="fa fa-check"></span> Functional Twitter Widget</div>
+
+<div class="caption lfr small_text" data-x="40" data-y="290" data-speed="300" data-start="2300" data-easing="easeOutExpo"><span class="fa fa-check"></span> Working Contact Form</div>
+
+<div class="caption lfb" data-x="20" data-y="320" data-speed="300" data-start="2700" data-easing="easeOutExpo"><a href="#" class="button radius">Order Today</a></div>
+
+
+
+Slide 2
+<div class="caption lfb" data-x="0" data-y="120" data-speed="300" data-start="900" data-easing="easeOutSine"><img src="images/slides/sliderrevolution/color-variation-1.png" alt="" /></div>
+
+<div class="caption lfb" data-x="30" data-y="110" data-speed="300" data-start="1100" data-easing="easeOutSine"><img src="images/slides/sliderrevolution/color-variation-2.png" alt="" /></div>
+
+<div class="caption lfb" data-x="60" data-y="100" data-speed="300" data-start="1300" data-easing="easeOutSine"><img src="images/slides/sliderrevolution/color-variation-3.png" alt="" /></div>
+
+<div class="caption lfb" data-x="90" data-y="90" data-speed="300" data-start="1500" data-easing="easeOutSine"><img src="images/slides/sliderrevolution/color-variation-4.png" alt="" /></div>
+
+<div class="caption lfb" data-x="120" data-y="80" data-speed="300" data-start="1700" data-easing="easeOutSine"><img src="images/slides/sliderrevolution/color-variation-5.png" alt="" /></div>
+
+<div class="caption lfb" data-x="150" data-y="70" data-speed="300" data-start="1900" data-easing="easeOutSine"><img src="images/slides/sliderrevolution/color-variation-6.png" alt="" /></div>
+
+<div class="caption lfb" data-x="180" data-y="60" data-speed="300" data-start="2100" data-easing="easeOutSine"><img src="images/slides/sliderrevolution/color-variation-7.png" alt="" /></div>
+
+<div class="caption lfb" data-x="210" data-y="50" data-speed="300" data-start="2300" data-easing="easeOutSine"><img src="images/slides/sliderrevolution/color-variation-8.png" alt="" /></div>
+
+<div class="caption lft big_white" data-x="520" data-y="140" data-speed="300" data-start="1200" data-easing="easeOutExpo">River S Premium Theme</div>
+
+<div class="caption lft big_color" data-x="520" data-y="190" data-speed="300" data-start="1300" data-easing="easeOutExpo">Options for everyone</div>
+
+<div class="caption lfr small_text" data-x="530" data-y="250" data-speed="300" data-start="1500" data-easing="easeOutExpo">Designed with a clean and minimalistic style<br />this template is very flexible, responsive<br />and loaded with amazing options<br />for easy customisation.</div>
+
+
+
+Slide 3
+<div class="caption lfr video-frame" data-x="340" data-y="60" data-speed="900" data-start="1300" data-easing="easeOutExpo">
+<iframe style="display:block;border:0;" src="http://player.vimeo.com/video/1084537?badge=0" width="550" height="309"></iframe>
+</div>
+
+<div class="caption lfl big_color" data-x="0" data-y="110" data-speed="300" data-start="1300" data-easing="easeOutExpo">Promo Video</div>
+
+<div class="caption lfl big_white" data-x="0" data-y="160" data-speed="300" data-start="1500" data-easing="easeOutExpo">Embeded Video Slider</div>
+
+<div class="caption lfl small_text" data-x="10" data-y="220" data-speed="300" data-start="1700" data-easing="easeOutExpo">Embed your promo videos in the slider<br />to reach your customers<br />faster and more direct.</div>
+
+
+
+Slide 4
+<div class="caption lft" data-x="100" data-y="40" data-speed="700" data-start="800" data-easing="easeOutExpo"><img src="images/slides/sliderrevolution/slide_image2.png" alt="" ></div>
+
+<div class="caption lfb" data-x="330" data-y="215" data-speed="900" data-start="700" data-easing="easeOutExpo"><img src="images/slides/sliderrevolution/hand.png" alt=""></div>
+
+<div class="caption sft big_color" data-x="460" data-y="120" data-speed="900" data-start="1200" data-easing="easeOutBack">Easy and Fast Customization</div>
+
+<div class="caption sft medium_text black" data-x="544" data-y="170" data-speed="900" data-start="1300" data-easing="easeOutBack">Buy RiverS on ThemeForest!</div>
+
+
+
+Slide 5
+<div class="caption lfb" data-x="-10" data-y="0" data-speed="700" data-start="800" data-easing="easeOutExpo"><img src="images/slides/sliderrevolution/slide_image3.png" alt=""></div>
+
+<div class="caption lft big_white" data-x="510" data-y="120" data-speed="900" data-start="1200" data-easing="easeOutBack">Modern Premium Theme</div>
+
+<div class="caption lfb" data-x="510" data-y="220" data-speed="900" data-start="1700" data-easing="easeOutBack"><a href="#"><span class="fa fa-cloud fa-4x"></span></a></div>
+
+<div class="caption lfb" data-x="600" data-y="220" data-speed="900" data-start="2000" data-easing="easeOutBack"><a href="#"><span class="fa fa-download fa-4x"></span></a></div>
+
+<div class="caption lfb" data-x="690" data-y="220" data-speed="900" data-start="2300" data-easing="easeOutBack"><a href="#"><span class="fa fa-dashboard fa-4x"></span></a></div>
+
+<div class="caption lfb" data-x="780" data-y="220" data-speed="900" data-start="2600" data-easing="easeOutBack"><a href="#"><span class="fa fa-gift fa-4x"></span></a></div>
+
+<div class="caption lfr medium_grey" data-x="510" data-y="300" data-speed="300" data-start="2900" data-easing="easeOutExpo">Wanna learn more?</div>
+
+<div class="caption lfr medium_text" data-x="695" data-y="310" data-speed="300" data-start="3200" data-easing="easeOutExpo"><a href="#">Get in Touch</a></div>
+
+
+
+
+
+
+';
+ }
+}
diff --git a/cadline/modules/modules/mod_wsregister/admin/elements/all.php b/cadline/modules/modules/mod_wsregister/admin/elements/all.php
new file mode 100644
index 00000000..0baf7690
--- /dev/null
+++ b/cadline/modules/modules/mod_wsregister/admin/elements/all.php
@@ -0,0 +1,71 @@
+
+
+ To insert this module '.$module_id.' inside an article, use the {loadposition xx} command, as follows:
+
+
+Create a module and set its position to any value that doesn\'t conflict with an existing template position. You can type in the position value instead of selecting it from the drop-down list. For example, use the position myposition.
+Assign the module to the Menu Items that contain the articles that you want the module to show in. You can also just assign the module to all Menu Items.
+Edit the articles where you want this module to appear and insert the text {loadposition myposition} in the article at the place where you want the module.
+
+
+
+Create a module and set its position to any value that doesn\'t conflict with an existing template position. You can type in the position value instead of selecting it from the drop-down list. For example, use the position myposition.
+Assign the module to the Menu Items that contain the articles that you want the module to show in. You can also just assign the module to all Menu Items.
+Edit the articles where you want this module to appear and insert the text {loadposition myposition} in the article at the place where you want the module.
+
+
+Note that this only works when the Content - Load Module plugin is enabled. If this plugin is disabled, the text {loadposition myposition} shows unchanged in the article.
+
+Note that this only works when the Content - Load Module plugin is enabled. If this plugin is disabled, the text {loadposition myposition} shows unchanged in the article.
+
+Some Text here Some Text here
+
+Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Maecenas faucibus mollis interdum. Donec sed odio dui. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh , ut fermentum massa justo sit amet risus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Aenean lacinia bibendum nulla sed consectetur. Vestibulum id ligula porta felis euismod semper. Nullam id dolor id nibh ultricies vehicula ut id elit.
+
+Alternative: loadmodule
+
+Some Headline here
+
+Some Headline here
+
+Some Headline here
+
+Some Headline here
+
+Some Headline here
+
+Here goes my Code
+
+Here goes my Code. Cras mattis consectetur purus sit amet fermentum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras mattis consectetur purus sit amet fermentum. Nullam quis risus eget urna mollis ornare vel eu leo. Nulla vitae elit libero, a pharetra augue. Vestibulum id ligula porta felis euismod semper. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Aenean lacinia bibendum nulla sed consectetur. Sed posuere consectetur est at lobortis. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Cras justo odio, dapibus ac facilisis in, egestas eget quam.
+
+An alternative to "{loadposition xx}" is the "{loadmodule yyy}" variation which is handled by the same plugin.
+
+In this case the plugin looks for the first module that who\'s type matches the string \'yyy\'. So, you could load a "mod_wsaccordion" module by placing {loadmodule wsaccordion} in your text.
+
+';
+ }
+}
diff --git a/cadline/modules/modules/mod_wsregister/admin/elements/asset.php b/cadline/modules/modules/mod_wsregister/admin/elements/asset.php
new file mode 100644
index 00000000..ccdb37a5
--- /dev/null
+++ b/cadline/modules/modules/mod_wsregister/admin/elements/asset.php
@@ -0,0 +1,313 @@
+
+
+
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_wsregister/admin/elements/includemodule.php b/cadline/modules/modules/mod_wsregister/admin/elements/includemodule.php
new file mode 100644
index 00000000..9bb5f144
--- /dev/null
+++ b/cadline/modules/modules/mod_wsregister/admin/elements/includemodule.php
@@ -0,0 +1,49 @@
+
+
+ How to include this Module in a Article?
+
+ To insert this module inside an article, use the {loadposition xxx} Shortcode command, as follows:
+
+
+ Set its Module position to any value that doesn\'t conflict with an existing template position . You can type in the position value instead of selecting it from the drop-down list. For example, use the position myposition.
+ Assign the module to the Menu Items that contain the articles that you want the module to show in. You can also just assign the module to all Menu Items . Please don\'t forget to set the Status to published .
+ Edit the articles where you want this module to appear and insert the text {loadposition myposition} in the article at the place where you want the module.
+
+
+ Note that this only works when the Content - Load Module plugin is enabled . If this plugin is disabled, the text {loadposition myposition} shows unchanged in the article. To activate the Plugin please navigate to Extensions -> Plug-In Manager -> search for load and set this Plugin to acitvated.
+
+
+ Alternativ Method
+
+ An alternative to "{loadposition xxx}" is the "{loadmodule yyy}" variation which is handled by the same plugin.
+
+ In this case the plugin looks for the first module that who\'s type matches the string \'yyy\'. So, you could load a "mod_modulename" module by placing {loadmodule modulename} in your text.
+
+
+
+ Source for Loadposition
+
+ You can also view the original Documentation of the Loadposition Plugin directly at the Joomla Docs. This site is permanent updated.
+
+ See Joomla Docs
+
+';
+ }
+}
diff --git a/cadline/modules/modules/mod_wsregister/admin/elements/index.html b/cadline/modules/modules/mod_wsregister/admin/elements/index.html
new file mode 100644
index 00000000..fa6d84e8
--- /dev/null
+++ b/cadline/modules/modules/mod_wsregister/admin/elements/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_wsregister/admin/elements/info.php b/cadline/modules/modules/mod_wsregister/admin/elements/info.php
new file mode 100644
index 00000000..3617ba8a
--- /dev/null
+++ b/cadline/modules/modules/mod_wsregister/admin/elements/info.php
@@ -0,0 +1,123 @@
+Captions in Revolution Slider
+
+
+
Captions are Containers which can be customized via CSS, classes for the start animation and some data options.
+
The CSS for the caption added in the settings.css file because it depends strongly on the responsive Sizing.
+
There are 4 Steps of Responsive Contents which are written later below under the Responsive Dependencies Caption.
+
+
+
+
+
+
The options are in detail:
+
+
+ color class example big_white, big_color, big_black, medium_grey, small_text, medium_text, large_text, black
+
+ animation class
+ Options:
+ sft - Short from Top
+ sfb - Short from Bottom
+ sfr - Short from Right
+ sfl - Short from Left
+ lft - Long from Top
+ lfb - Long from Bottom
+ lfr - Long from Right
+ lfl - Long from Left
+ fade - fading
+ randomrotate- Fade in, Rotate from a Random position and Degree
+
+
+ data-x The horizontal position in the standard (via startwidth option defined) screen size (other screen sizes will be calculated)
+ data-y The vertical position in the standard (via startheight option defined) screen size (other screen sizes will be calculated)
+ data-speed Duration of the animation in milliseconds
+ data-start after How many milliseconds should this caption start to show
+ data-easing special easing effect of the animation
+ Options:
+ easeOutBack
+ easeInQuad
+ easeOutQuad
+ easeInOutQuad
+ easeInCubic
+ easeOutCubic
+ easeInOutCubic
+ easeInQuart
+ easeOutQuart
+ easeInOutQuart
+ easeInQuint
+ easeOutQuint
+ easeInOutQuint
+ easeInSine
+ easeOutSine
+ easeInOutSine
+ easeInExpo
+ easeOutExpo
+ easeInOutExpo
+ easeInCirc
+ easeOutCirc
+ easeInOutCirc
+ easeInElastic
+ easeOutElastic
+ easeInOutElastic
+ easeInBack
+ easeOutBack
+ easeInOutBack
+ easeInBounce
+ easeOutBounce
+ easeInOutBounce
+
+
+
+
+
+
+Videos in Revolution Slider
+
+
+
In order to embed videos in the slider you can embed videos via iframe of your favorite video site that allows this kind of embedding. An example with Vimeo:
+
+<div class="caption lfb boxshadow" data-x="70" data-y="120" data-speed="900" data-start="500" data-easing="easeOutBack">
+ <iframe src="http://player.vimeo.com/video/29298709?title=0&byline=0&portrait=0" width="460" height="259"></iframe>
+</div>
+
+
+
+
+
+Full Screen Videos in Revolution Slider
+
+
+
In order to play FullWidth Videos, use the class "fade fullscreenvideo" in the caption where you embeded the iFrame. Use data-x="0" and data-y="0" and data-speed="500" and data-start="10" for best effect. The Width and height of the iFrame should be 100% !
+
In case you wish to use autoplay, just use the data-autplay="true" parameter in the div where you embeded the iFrame.
+
+<div class="caption fade fullscreenvideo" data-x="0" data-y="0" data-speed="500" data-start="10" data-easing="easeOutBack">
+ <iframe src="http://player.vimeo.com/video/29298709?title=0&byline=0&portrait=0" width="100%" height="100%"></iframe>
+</div>
+
+
+
+
+
+
+';
+
+ }
+}
diff --git a/cadline/modules/modules/mod_wsregister/admin/elements/wsattention.php b/cadline/modules/modules/mod_wsregister/admin/elements/wsattention.php
new file mode 100644
index 00000000..f7702cab
--- /dev/null
+++ b/cadline/modules/modules/mod_wsregister/admin/elements/wsattention.php
@@ -0,0 +1,46 @@
+element['label'];
+ $label = $this->translateLabel ? JText::_($label) : $label;
+ $style = $this->element['style'];
+ $style = $this->translateLabel ? JText::_($style) : $style;
+
+ $html[] = "";
+ $html[] = $label;
+ $html[] = "
";
+
+ return implode('',$html);
+
+ }
+}
diff --git a/cadline/modules/modules/mod_wsregister/admin/elements/wsdocumentation.php b/cadline/modules/modules/mod_wsregister/admin/elements/wsdocumentation.php
new file mode 100644
index 00000000..ced7e927
--- /dev/null
+++ b/cadline/modules/modules/mod_wsregister/admin/elements/wsdocumentation.php
@@ -0,0 +1,46 @@
+element['headline'];
+ $headline = $this->translateLabel ? JText::_($headline) : $headline;
+ $text = $this->element['text'];
+ $text = $this->translateLabel ? JText::_($text) : $text;
+ $url = $this->element['url'];
+ $url = $this->translateLabel ? JText::_($url) : $url;
+
+ $html[] = ''.$headline.'
';
+
+ return implode('',$html);
+
+ }
+}
diff --git a/cadline/modules/modules/mod_wsregister/admin/elements/wsfaq.php b/cadline/modules/modules/mod_wsregister/admin/elements/wsfaq.php
new file mode 100644
index 00000000..d43e20d5
--- /dev/null
+++ b/cadline/modules/modules/mod_wsregister/admin/elements/wsfaq.php
@@ -0,0 +1,46 @@
+element['question'];
+ $question = $this->translateLabel ? JText::_($question) : $question;
+ $answer = $this->element['answer'];
+ $answer = $this->translateLabel ? JText::_($answer) : $answer;
+
+ $html[] = ''.$question.'
';
+ $html[] = $answer;
+ $html[] = '
';
+
+ return implode('',$html);
+
+ }
+}
diff --git a/cadline/modules/modules/mod_wsregister/admin/elements/wsheadline.php b/cadline/modules/modules/mod_wsregister/admin/elements/wsheadline.php
new file mode 100644
index 00000000..df12326c
--- /dev/null
+++ b/cadline/modules/modules/mod_wsregister/admin/elements/wsheadline.php
@@ -0,0 +1,46 @@
+element['label'];
+ $label = $this->translateLabel ? JText::_($label) : $label;
+ $style = $this->element['style'];
+ $style = $this->translateLabel ? JText::_($style) : $style;
+
+ $html[] = "";
+ $html[] = $label;
+ $html[] = "
";
+
+ return implode('',$html);
+
+ }
+}
diff --git a/cadline/modules/modules/mod_wsregister/admin/elements/wsiframe.php b/cadline/modules/modules/mod_wsregister/admin/elements/wsiframe.php
new file mode 100644
index 00000000..b40aa5e1
--- /dev/null
+++ b/cadline/modules/modules/mod_wsregister/admin/elements/wsiframe.php
@@ -0,0 +1,52 @@
+element['label'];
+ $label = $this->translateLabel ? JText::_($label) : $label;
+ $link = $this->element['link'];
+ $link = $this->translateLabel ? JText::_($link) : $link;
+ $sizex = $this->element['sizex'];
+ $sizex = $this->translateLabel ? JText::_($sizex) : $sizex;
+ $sizey = $this->element['sizey'];
+ $sizey = $this->translateLabel ? JText::_($sizey) : $sizey;
+
+ $html[] = '';
+
+ return implode('',$html);
+
+ }
+}
diff --git a/cadline/modules/modules/mod_wsregister/admin/elements/wsimage.php b/cadline/modules/modules/mod_wsregister/admin/elements/wsimage.php
new file mode 100644
index 00000000..92f2db20
--- /dev/null
+++ b/cadline/modules/modules/mod_wsregister/admin/elements/wsimage.php
@@ -0,0 +1,48 @@
+element['label'];
+ $label = $this->translateLabel ? JText::_($label) : $label;
+ $link = $this->element['link'];
+ $link = $this->translateLabel ? JText::_($link) : $link;
+
+ $html[] = '';
+
+ return implode('',$html);
+
+ }
+}
diff --git a/cadline/modules/modules/mod_wsregister/admin/elements/wsline.php b/cadline/modules/modules/mod_wsregister/admin/elements/wsline.php
new file mode 100644
index 00000000..a49a3604
--- /dev/null
+++ b/cadline/modules/modules/mod_wsregister/admin/elements/wsline.php
@@ -0,0 +1,44 @@
+element['label'];
+ $label = $this->translateLabel ? JText::_($label) : $label;
+ $style = $this->element['style'];
+ $style = $this->translateLabel ? JText::_($style) : $style;
+
+ $html[] = "
";
+
+ return implode('',$html);
+
+ }
+}
diff --git a/cadline/modules/modules/mod_wsregister/admin/elements/wslink.php b/cadline/modules/modules/mod_wsregister/admin/elements/wslink.php
new file mode 100644
index 00000000..71f98658
--- /dev/null
+++ b/cadline/modules/modules/mod_wsregister/admin/elements/wslink.php
@@ -0,0 +1,48 @@
+element['label'];
+ $label = $this->translateLabel ? JText::_($label) : $label;
+ $link = $this->element['link'];
+ $link = $this->translateLabel ? JText::_($link) : $link;
+
+ $html[] = '';
+
+ return implode('',$html);
+
+ }
+}
diff --git a/cadline/modules/modules/mod_wsregister/admin/elements/wssubline.php b/cadline/modules/modules/mod_wsregister/admin/elements/wssubline.php
new file mode 100644
index 00000000..bbf56df5
--- /dev/null
+++ b/cadline/modules/modules/mod_wsregister/admin/elements/wssubline.php
@@ -0,0 +1,44 @@
+element['label'];
+ $label = $this->translateLabel ? JText::_($label) : $label;
+
+ $html[] = '';
+ $html[] = $label;
+ $html[] = '
';
+
+ return implode('',$html);
+
+ }
+}
diff --git a/cadline/modules/modules/mod_wsregister/admin/elements/wstext.php b/cadline/modules/modules/mod_wsregister/admin/elements/wstext.php
new file mode 100644
index 00000000..8186284a
--- /dev/null
+++ b/cadline/modules/modules/mod_wsregister/admin/elements/wstext.php
@@ -0,0 +1,46 @@
+element['label'];
+ $label = $this->translateLabel ? JText::_($label) : $label;
+ $style = $this->element['style'];
+ $style = $this->translateLabel ? JText::_($style) : $style;
+
+ $html[] = "";
+ $html[] = $label;
+ $html[] = "
";
+
+ return implode('',$html);
+
+ }
+}
diff --git a/cadline/modules/modules/mod_wsregister/admin/index.html b/cadline/modules/modules/mod_wsregister/admin/index.html
new file mode 100644
index 00000000..e69de29b
diff --git a/cadline/modules/modules/mod_wsregister/index.html b/cadline/modules/modules/mod_wsregister/index.html
new file mode 100644
index 00000000..fa6d84e8
--- /dev/null
+++ b/cadline/modules/modules/mod_wsregister/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_wsregister/mod_wsregister.php b/cadline/modules/modules/mod_wsregister/mod_wsregister.php
new file mode 100644
index 00000000..7a9ad8ba
--- /dev/null
+++ b/cadline/modules/modules/mod_wsregister/mod_wsregister.php
@@ -0,0 +1,32 @@
+get('text_register');
+$text_login_back = $params->get('text_login_back');
+$text_name = $params->get('text_name');
+$text_username = $params->get('text_username');
+$text_password = $params->get('text_password');
+$text_password_confirm = $params->get('text_password_confirm');
+$text_email = $params->get('text_email');
+$text_email_confirm = $params->get('text_email_confirm');
+$text_intro = $params->get('text_intro');
+$text_outro = $params->get('text_outro');
+
+$wsreg_inputclass = $params->get('wsreg_inputclass');
+$wsreg_btnclass = $params->get('wsreg_btnclass');
+
+
+require(JModuleHelper::getLayoutPath('mod_wsregister'));
diff --git a/cadline/modules/modules/mod_wsregister/mod_wsregister.xml b/cadline/modules/modules/mod_wsregister/mod_wsregister.xml
new file mode 100644
index 00000000..15330ee2
--- /dev/null
+++ b/cadline/modules/modules/mod_wsregister/mod_wsregister.xml
@@ -0,0 +1,78 @@
+
+
+ WS Register
+ WS-Theme.com
+ 10/2012
+ Copyright (C) 2012. All rights reserved.
+ GNU General Public License version 2 or later; see LICENSE.txt
+ info@ws-theme.com
+ www.ws-theme.com
+ 1.1
+ WS Register is a simple and flexible Joomla Register Module with some nice options. It's build on the native Joomla Registering and has very lightweight code
+
+
+ mod_wsregister.php
+ mod_wsregister.xml
+ index.html
+ admin
+ tmpl
+
+
+
diff --git a/cadline/modules/modules/mod_wsregister/tmpl/default.php b/cadline/modules/modules/mod_wsregister/tmpl/default.php
new file mode 100644
index 00000000..188060bb
--- /dev/null
+++ b/cadline/modules/modules/mod_wsregister/tmpl/default.php
@@ -0,0 +1,263 @@
+getQuery(true);
+$query->select('a.*')->from('cl_hlusers.countries AS a')->where('a.ctrID != 37 ORDER BY a.ctrNameEng');
+$db->setQuery( $query );
+$result=$db->loadObjectList();
+?>
+
+
+
+
+
+
+
+
+id == 0):
+?>
+
+
+
+
+
+
+
+
+
+
=JText::_('COM_USERS_LOGIN_LABEL')?>
+ =JModuleHelper::renderModule(JModuleHelper::getModule('login','Felhasználó - Bejelentkezés'))?>
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cadline/modules/modules/mod_wsregister/tmpl/index.html b/cadline/modules/modules/mod_wsregister/tmpl/index.html
new file mode 100644
index 00000000..fa6d84e8
--- /dev/null
+++ b/cadline/modules/modules/mod_wsregister/tmpl/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file