www_archline_hu/cadline/components/components/com_tcexam/default.php

1109 lines
66 KiB
PHP

<?php
defined('_JEXEC') or die;
$user=JFactory::getUser();
$userProfile = JUserHelper::getProfile( $user->id );
$time = md5($time);
?>
<style>
a:hover {
color: white;
}
#emailHelp {
color: white;
}
</style>
<div id="alworshopContainer">
<h3><?=JText::_('MOD_ARCHLINE_APPLICATION')?></h3>
<?php if ($workshopok):?>
<form id="alworkshopForm" action="/modules/mod_alworkshops/assets/ajax/alworkshops.class.php">
<p class="text-white">
<?php if ((int)$user->id>0) : ?>
<span class="w20 center text-white"><i class="fa fa-user" aria-hidden="true"></i></span>&nbsp;<a href="<?=JText::_('MOD_ARCHLINE_APPLICATIONS')?>"><?=$user->username?></a><br />
<?php endif;?>
<?php if ($switch->level==1 && $switch->tanfsor>=5 && $switch->tanfsor<=7) : ?>
<?php else :?>
<?php if ($workshopok[0]->price==0):?>
<span class="w20 center text-white"><i class="fa fa-money" aria-hidden="true"></i></span>&nbsp;<?=JText::_('MOD_ARCHLINE_FREE')?><br />
<?php else : ?>
<span class="w20 center text-white"><i class="fa fa-money" aria-hidden="true"></i></span>&nbsp;<?=JText::_('MOD_ARCHLINE_PRICETAG_BEFORE')?><?=$workshopok[0]->price?><?=JText::_('MOD_ARCHLINE_PRICETAG_AFTER')?> + <?=JText::_('MOD_ARCHLINE_PRICETAG_VAT')?><br />
<?php endif;?>
<?php endif;?>
<?php if (trim($workshopok[0]->location)>'' && substr($workshopok[0]->location,0,4)=="http" ):?>
<span class="w20 center"><i class="fa fa-map-marker" aria-hidden="true"></i></span>&nbsp;<a href="<?=$workshopok[0]->location?>" target="_self">online</a><br />
<?php elseif (trim($workshopok[0]->location)>''):?>
<span class="w20 center"><i class="fa fa-map-marker" aria-hidden="true"></i></span>&nbsp;<?=$workshopok[0]->location?><br />
<?php endif;?>
<?php if ($switch->webinair=='Y') : ?>
<?php
require_once($_SERVER['DOCUMENT_ROOT']."/modules/mod_alworkshops/helpers/MySqlHelper.class.php");
?>
<?php if($workshopok[0]): ?>
<div class="FirstWebinar">
<span class="w20 center"><i class="fa fa-calendar" aria-hidden="true"></i></span>&nbsp;<?=$workshopok[0]->start_date?> - <?=$workshopok[0]->finish_date?><br />
<span class="w20 center"><i class="fa fa-clock-o" aria-hidden="true"></i></span>&nbsp;<?=substr($workshopok[0]->start_time,0,5)?> - <?=substr($workshopok[0]->finish_time,0,5)?><br />
<span class="w20 center"><i class="fa fa-user" aria-hidden="true" title="<?=JText::_('MOD_ARCHLINE_FREE_PLACE')?>"></i></span>&nbsp;<?=JText::_('MOD_ARCHLINE_FREE_PLACE')?>: <span id="kiemeltLetszam"><?=$workshopok[0]->capacity-$workshopok[0]->applications?></span> / <?=JText::_('MOD_ARCHLINE_MAX')?>: <?=$workshopok[0]->capacity?><br />
<?php
$onlineSessions = ModAlworkshopsHelper::getOnlineSessions($workshopok[0]->id);
if($onlineSessions) {
if($workshopok[0]->course_level != 0) {
print '<h3>'.ModAlworkshopsHelper::getLevelString($workshopok[0]->course_level).'</h3>';
}
print '<hr/>';
print 'Időpontok:<br/><br/>';
print '<table>';
foreach ($onlineSessions as $session) {
print "<tr>
<td>{$session->session_date}</td>
<td>{$session->start_time}-{$session->finish_time}</td>
<td>{$session->title}</td>
</tr>";
}
print '</table>';
}
MySqlHelper::getInstance()->query("SELECT * FROM `www_archline_hu`.`alworkshops_application` WHERE `course_id`=".$workshopok[0]->id." AND `email`='".trim(addslashes($user->email))."' AND `published`='Y';");
$exist=MySqlHelper::getInstance()->fetchAssoc();
if($user->id != 0) {
if ($exist) {
?>
<p style="color: green;"><span style="color: green;" class="w20 center"><i class="fa fa-check-circle" aria-hidden="true"></i></span><b>Erre az eseményre már jelentkeztél</b></p>
<?php
} else {
?>
<p style="color: red;"><span style="color: red;" class="w20 center"><i class="fa fa-times-circle" aria-hidden="true"></i></span><b>Erre az eseményre még nem jelentkeztél</b></p>
<?php
}
}
?>
</div>
<?php endif; ?>
<?php if($workshopok[1]): ?>
<div class="SecondWebinar">
<span class="w20 center"><i class="fa fa-calendar" aria-hidden="true"></i></span>&nbsp;<?=$workshopok[1]->start_date?> - <?=$workshopok[1]->finish_date?><br />
<span class="w20 center"><i class="fa fa-clock-o" aria-hidden="true"></i></span>&nbsp;<?=substr($workshopok[1]->start_time,0,5)?> - <?=substr($workshopok[1]->finish_time,0,5)?><br />
<span class="w20 center"><i class="fa fa-user" aria-hidden="true" title="<?=JText::_('MOD_ARCHLINE_FREE_PLACE')?>"></i></span>&nbsp;<?=JText::_('MOD_ARCHLINE_FREE_PLACE')?>: <span id="kiemeltLetszam"><?=$workshopok[1]->capacity-$workshopok[1]->applications?></span> / <?=JText::_('MOD_ARCHLINE_MAX')?>: <?=$workshopok[1]->capacity?><br />
<?php
$onlineSessions = ModAlworkshopsHelper::getOnlineSessions($workshopok[1]->id);
if($onlineSessions) {
if($workshopok[1]->course_level != 0) {
print '<h3>'.ModAlworkshopsHelper::getLevelString($workshopok[1]->course_level).'</h3>';
}
print '<hr/>';
print 'Időpontok:<br/><br/>';
print '<table>';
foreach ($onlineSessions as $session) {
print "<tr>
<td>{$session->session_date}</td>
<td>{$session->start_time}-{$session->finish_time}</td>
<td>{$session->title}</td>
</tr>";
}
print '</table>';
}
MySqlHelper::getInstance()->query("SELECT * FROM `www_archline_hu`.`alworkshops_application` WHERE `course_id`=".$workshopok[1]->id." AND `email`='".trim(addslashes($user->email))."' AND `published`='Y';");
$exist2=MySqlHelper::getInstance()->fetchAssoc();
if($user->id != 0) {
if ($exist2) {
?>
<div id="exist">
<p style="color: green;"><span style="color: green;" class="w20 center"><i class="fa fa-check-circle" aria-hidden="true"></i></span><b>Erre az eseményre már jelentkeztél</b></p>
</div>
<a id="btnReserve2" onclick="javascript:submitWebinarForm('webinar2','targetDiv2');" class="sppb-btn sppb-btn-primary sppb-btn-square sppb-btn-block disabled"><strong><?=JText::_('MOD_ARCHLINE_RESERVE')?></strong></a>
<?php
} else {
?>
<p style="color: red;"><span style="color: red;" class="w20 center"><i class="fa fa-times-circle" aria-hidden="true"></i></span><b>Erre az eseményre még nem jelentkeztél</b></p>
<a id="btnReserve2" onclick="javascript:submitWebinarForm('webinar2','targetDiv2');" class="sppb-btn sppb-btn-primary sppb-btn-square sppb-btn-block"><strong><?=JText::_('MOD_ARCHLINE_RESERVE')?></strong></a>
<?php
}
}
?>
</div>
<?php else: ?>
<div class="SecondWebinar">
<p class="text-white"><?=JText::_('MOD_ARCHLINE_NO_WORKSHOP')?></p>
</div>
<?php endif;?>
<?php
if($workshopok[2]) {
MySqlHelper::getInstance()->query("SELECT * FROM `www_archline_hu`.`alworkshops_application` WHERE `course_id`=".$workshopok[2]->id." AND `email`='".trim(addslashes($user->email))."' AND `published`='Y';");
$exist3=MySqlHelper::getInstance()->fetchAssoc();
?>
<div class="ThirdWebinar">
<span class="w20 center"><i class="fa fa-calendar" aria-hidden="true"></i></span>&nbsp;<?=$workshopok[2]->start_date?><br />
<span class="w20 center"><i class="fa fa-clock-o" aria-hidden="true"></i></span>&nbsp;<?=substr($workshopok[2]->start_time,0,5)?> - <?=substr($workshopok[2]->finish_time,0,5)?><br />
<span class="w20 center"><i class="fa fa-user" aria-hidden="true" title="<?=JText::_('MOD_ARCHLINE_FREE_PLACE')?>"></i></span>&nbsp;<?=JText::_('MOD_ARCHLINE_FREE_PLACE')?>: <span id="kiemeltLetszam"><?=$workshopok[2]->capacity-$workshopok[2]->applications?></span> / <?=JText::_('MOD_ARCHLINE_MAX')?>: <?=$workshopok[2]->capacity?><br />
<?php
if($user->id != 0) {
if ($exist3) {
?>
<div id="exist">
<p style="color: green;"><span style="color: green;" class="w20 center"><i class="fa fa-check-circle" aria-hidden="true"></i></span><b>Erre az eseményre már jelentkeztél</b></p>
</div>
<a id="btnReserve2" onclick="javascript:submitWebinarForm('webinar2','targetDiv2');" class="sppb-btn sppb-btn-primary sppb-btn-square sppb-btn-block disabled"><strong><?=JText::_('MOD_ARCHLINE_RESERVE')?></strong></a>
<?php
} else {
?>
<p style="color: red;"><span style="color: red;" class="w20 center"><i class="fa fa-times-circle" aria-hidden="true"></i></span><b>Erre az eseményre még nem jelentkeztél</b></p>
<a id="btnReserve3" onclick="javascript:submitWebinarForm('webinar3','targetDiv2');" class="sppb-btn sppb-btn-primary sppb-btn-square sppb-btn-block"><strong><?=JText::_('MOD_ARCHLINE_RESERVE')?></strong></a>
<?php
}
}
?>
</div>
<?php
} else {
?>
<div class="ThirdWebinar">
<p class="text-white"><?=JText::_('MOD_ARCHLINE_NO_WORKSHOP')?></p>
</div>
<?php
}
?>
<?php endif;?>
<?php if ($switch->comment==='Y' && trim(strip_tags($workshopok[0]->comment))>'' ) : ?>
<span class="w20 center"><i class="fa fa-comment-o" aria-hidden="true" title="<?=JText::_('MOD_ARCHLINE_COMMENT')?>"></i></span>&nbsp;<?=JText::_('MOD_ARCHLINE_COMMENT')?>:<br /><?=$workshopok[0]->comment?>
<?php endif;?>
</p>
<?php if ($switch->kurzus=='Y' && $switch->level==2) : ?> <!-- !!! CSAK a Kozepfoku Tanfolyamnál !!! -->
<input type="hidden" name="course_id" id="course_id_<?=$workshopok[0]->id?>" value="<?=$workshopok[0]->id?>" />
<!-- Eredeti :
<?php // elseif ($switch->webinair=='Y' || $switch->esemeny=='Y') : ?> -->
<!-- WEBINAR SIGNUP -->
<?php elseif ($switch->webinair=='Y' || $switch->esemeny=='Y') : ?> <!-- !!! Webinár vagy esemény regisztráció !!! MÓDOSÍTANDÓ!!!!!!!!!!!!!!!!-->
<?php if($switch->webinair=='Y'): ?>
<div class="FirstWebinar">
<div id="myDiv" style="display: none;">
<input type="hidden" name="hidden_id" value="<?=$user->id?>" />
<div class="form-group"><input style="color:black;" type="text" name="usr" id="usr" value="<?=$user->name?>" placeholder="<?=JText::_('MOD_ARCHLINE_NAME')?>*" class="form-control name" /></div>
<div class="form-group">
<input style="color:black;" type="text" name="email" id="email" value="<?=$user->email?>" placeholder="<?=JText::_('MOD_ARCHLINE_EMAIL')?>*" class="form-control email" />
<small id="emailHelp" class="form-text text-muted"><?=JText::_('MOD_ARCHLINE_EMAIL_COMMENT')?></small>
</div>
<?php if ($switch->orszag=='Y'):?>
<div class="form-group">
<select name="country" id="country" class="form-control country" >
<option value="" ><?=JText::_('MOD_ARCHLINE_SELECT_COUNTRY')?>*</option>
<option value="-" disabled="disabled">-----</option>
<?php
$conn = mysqli_connect('localhost', 'cadline', 'Shea6hoo', 'cl_hlusers');
$sql = $conn->prepare("SELECT users.nCtrID AS ctrID, countries.ctrName AS name
FROM users
LEFT JOIN countries ON countries.ctrID = users.nCtrID
WHERE users.nUserID = ?");
$sql->bind_param("i", $user->nUserID);
$sql->execute();
$result = $sql->get_result();
if ($user->id != 0) {
while($row = mysqli_fetch_assoc($result)) {
$tomb=parse_ini_file($_SERVER['DOCUMENT_ROOT'].'/language/'.JFactory::getLanguage()->getTag().'/'.JFactory::getLanguage()->getTag().'.countries.ini');
foreach ($tomb as $k=>$v) echo '<option value="'.$k.'" '.($row["name"]==$v ? ' selected="selected"' : '').'>'.$v.'</option>';
}
} else {
$tomb=parse_ini_file($_SERVER['DOCUMENT_ROOT'].'/language/'.JFactory::getLanguage()->getTag().'/'.JFactory::getLanguage()->getTag().'.countries.ini');
foreach ($tomb as $k=>$v) echo '<option value="'.$k.'" '.($userProfile->profile['country']==$v ? ' selected="selected"' : '').'>'.$v.'</option>';
}
?>
</select>
</div>
<?php endif;?>
<?php if ($switch->szakma=='Y'):?>
<div class="form-group">
<select name="prof" id="prof" class="form-control prof" >
<option value="" ><?=JText::_('MOD_ARCHLINE_SELECT_PROF')?>*</option>
<option value="-" disabled="disabled">-----</option>
<?php
$conn = mysqli_connect('localhost', 'cadline', 'Shea6hoo', 'cl_hlusers');
$sql = $conn->prepare("SELECT users.nCtrID AS ctrID, users.nUserProf AS profID, u_profs.proName AS profName, countries.ctrName AS name
FROM users
LEFT JOIN countries ON countries.ctrID = users.nCtrID
LEFT JOIN u_profs ON u_profs.proID = users.nUserProf
WHERE users.nUserID = ?");
$sql->bind_param("i", $user->nUserID);
$sql->execute();
$result = $sql->get_result();
if ($user->id != 0) {
while($row = mysqli_fetch_assoc($result)) {
$tomb=parse_ini_file($_SERVER['DOCUMENT_ROOT'].'/language/'.JFactory::getLanguage()->getTag().'/'.JFactory::getLanguage()->getTag().'.prof.ini');
if($row['profName'] != $tomb) {
$row['profName'] = "Nem szakmai";
}
foreach ($tomb as $k=>$v) echo '<option value="'.$k.'" '.($row["profName"]==$v ? ' selected="selected"' : '').'>'.$v.'</option>';
}
} else {
$tomb=parse_ini_file($_SERVER['DOCUMENT_ROOT'].'/language/'.JFactory::getLanguage()->getTag().'/'.JFactory::getLanguage()->getTag().'.prof.ini');
foreach ($tomb as $k=>$v) echo '<option value="'.$k.'" '.($userProfile->profile['aboutme']==$v ? ' selected="selected"' : '').'>'.$v.'</option>';
}
?>
</select>
</div>
<?php endif;?>
</div>
</div>
<?php endif;?>
<div class="FirstWebinar">
<?php if($switch->webinair=='Y'):?>
<?php
MySqlHelper::getInstance()->query("SELECT * FROM `www_archline_hu`.`alworkshops_application` WHERE `course_id`=".$workshopok[0]->id." AND `email`='".trim(addslashes($user->email))."' AND `published`='Y';");
$exist3=MySqlHelper::getInstance()->fetchAssoc();
?>
<p id="myP" class="text-white" <?=( ($user->id == 0) ? 'style="display:none;"' : "")?>>
<input type="hidden" name="attendees" id="attendees" value="1" />
<input type="hidden" name="course_id" id="course_id" value="<?=$workshopok[0]->id?>" />
<input type="hidden" name="sess" id="sess" value="<?=JFactory::getSession()->getId()?>" />
<?php
if ($exist3) {
?>
<a id="btnReserve1" onclick="javascript:submitWebinarForm('alworkshopForm','targetDiv');" class="sppb-btn sppb-btn-primary sppb-btn-square sppb-btn-block disabled"><strong><?=JText::_('MOD_ARCHLINE_RESERVE')?></strong></a>
<?php
} else {
?>
<a id="btnReserve1" onclick="javascript:submitWebinarForm('alworkshopForm','targetDiv');" class="sppb-btn sppb-btn-primary sppb-btn-square sppb-btn-block"><strong><?=JText::_('MOD_ARCHLINE_RESERVE')?></strong></a>
<?php
}
?>
</p>
<?php endif;?>
</div>
<?php else : ?>
<p class="text-white"><?=JText::_('MOD_ARCHLINE_NEXT')?>:</p>
<div id="tovabbi"> <!--style="display:none;"-->
<table width="100%" border="0">
<tr><td colspan="4"><hr /></td></tr>
<?php foreach ($workshopok as $k=>$ws):?>
<?php
$date = $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;
?>
<?php if($switch->gepet_kerek=='Y' && time() >= $timestamp):?>
<tr valign="top">
<?php else: ?>
<tr valign="top" class="kattintos" onclick="javascript:changeCourse('<?=$ws->id?>','<?=$ws->capacity?>','<?=$ws->applications?>','<?=$ws->gepigeny?>','<?=(trim($application->transaction_id)>'' ? trim($application->transaction_id) : '')?>');">
<?php endif;?>
<td align="center" width="10%">
<?php if($switch->gepet_kerek=='Y' && time() >= $timestamp): ?>
<input type="radio" disabled />
<?php else: ?>
<input type="radio" checked="checked" name="course_id" id="course_id_<?=$ws->id?>" value="<?=$ws->id?>" onclick="javascript:changeCourse('<?=$ws->id?>','<?=$ws->capacity?>','<?=$ws->applications?>','<?=$ws->gepigeny?>','<?=(trim($application->transaction_id)>'' ? trim($application->transaction_id) : '')?>');" <?=( (isset($currentApplication) && $k==$currentApplication)?'checked="checked"':'')?> />
<?php endif;?>
<input class="trans" type="hidden" name="trid" id="trid_<?=$ws->id?>" value="<?=(trim($application->transaction_id)>'' ? trim($application->transaction_id) : '')?>" />
</td>
<td align="center" width="10%">
<span class="w20 center"><i class="fa fa-calendar" aria-hidden="true"></i></span><br />
<span class="w20 center"><i class="fa fa-user" aria-hidden="true" ></i></span><br />
<?php if ($switch->gepet_kerek=='Y') : ?><span class="w20 center"><i class="fa fa-laptop" aria-hidden="true" ></i></span><?php endif;?>
</td>
<td style="white-space:nowrap">
<?php if ($ws->start_date==$ws->finish_date) : ?>
<span><?=$ws->start_date?> <?=substr($ws->start_time,0,-3)?></span>-<span><?=substr($ws->finish_time,0,-3)?></span>
<?php else :?>
<?=$ws->start_date?> - <?=$ws->finish_date?>
<?php endif;?><br />
<?=JText::_('MOD_ARCHLINE_CAPACITY')?>: <span id="capacity_<?=$ws->id?>"><?=$ws->capacity-$ws->applications?></span><br />
<?php if ($switch->gepet_kerek=='Y') : ?>
<?=JText::_('MOD_ARCHLINE_COMPUTER_CAPACITY')?>: <span id="gepigeny_<?=$ws->id?>"><?=(2-$ws->gepigeny>=0 ? 2-$ws->gepigeny : 0)?></span><br />
<?php endif;?>
</td>
<td style="white-space:nowrap">
<span id="reserved_<?=$ws->id?>" class="label label-primary" style="margin-bottom:5px;display:<?=($application ? 'block' : 'none')?>;"><strong><?=JText::_('MOD_ARCHLINE_RESERVED')?></strong></span>
<span id="paid_<?=$ws->id?>" class="label label-success" style="display:<?=($application->price_total>0 && trim($application->pay_id)>'' ? 'block' : 'none')?>;"><strong><?=JText::_('MOD_ARCHLINE_PAID')?></strong></span>
</td>
</tr>
<?php if ($switch->kurzus=='Y') : ?>
<tr id="sor_<?=$ws->id?>" class="hiddenrow">
<td colspan="4">
<p class="text-white"><?=JText::_('MOD_ARCHLINE_COURSE_SESSIONS')?>:</p>
<table border="0" width="100%">
<?php
$course_sessions=ModAlworkshopsHelper::getSessions($ws->id);
if ($course_sessions) : ?>
<?php foreach ($course_sessions as $course_session):?>
<tr valign="top">
<td nowrap="nowrap"><?=substr($course_session->session_date,2)?></td>
<td nowrap="nowrap"><?=substr($course_session->start_time,0,5)?>-<?=substr($course_session->finish_time,0,5)?></td>
<td><?=$course_session->description?></td>
</tr>
<?php endforeach;?>
<?php endif;?>
</table>
</td>
</tr>
<?php endif;?>
<tr><td colspan="4"><hr /></td></tr>
<?php endforeach;?>
</table>
<!-- <?php if ($switch->esemeny=='Y' && (int)$user->id!=0) :?>
<p class="text-white">
<input type="hidden" name="attendees" id="attendees" value="1" />
<input type="hidden" name="course_id" id="course_id" value="<?=$workshopok[0]->id?>" />
<input type="hidden" name="sess" id="sess" value="<?=JFactory::getSession()->getId()?>" />
<a id="btnReserve" onclick="javascript:submitWebinarForm('alworkshopForm','targetDiv');" class="sppb-btn sppb-btn-primary sppb-btn-square sppb-btn-block"><strong><?=JText::_('MOD_ARCHLINE_RESERVE')?></strong></a>
</p>
<?php endif;?> -->
</div>
<?php endif;?>
<?php if ($switch->kurzus=='Y' && $switch->level==2) : ?>
<p class="text-white"><?=JText::_('MOD_ARCHLINE_NEXT')?>:</p>
<div id="tovabbi"> <!--style="display:none;"-->
<table width="100%" border="0">
<tr><td colspan="4"><hr /></td></tr>
<?php foreach ($workshopok as $k=>$ws):?>
<?php
$date = $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;
?>
<?php if($switch->gepet_kerek=='Y' && time() >= $timestamp):?>
<tr valign="top">
<?php else: ?>
<tr valign="top" class="kattintos" onclick="javascript:changeCourse('<?=$ws->id?>','<?=$ws->capacity?>','<?=$ws->applications?>','<?=$ws->gepigeny?>','<?=(trim($application->transaction_id)>'' ? trim($application->transaction_id) : '')?>');">
<?php endif;?>
<td align="center" width="10%">
<?php if($switch->gepet_kerek=='Y' && time() >= $timestamp): ?>
<input type="radio" disabled />
<?php else: ?>
<input type="radio" checked="checked" name="course_id" id="course_id_<?=$ws->id?>" value="<?=$ws->id?>" onclick="javascript:changeCourse('<?=$ws->id?>','<?=$ws->capacity?>','<?=$ws->applications?>','<?=$ws->gepigeny?>','<?=(trim($application->transaction_id)>'' ? trim($application->transaction_id) : '')?>');" <?=( (isset($currentApplication) && $k==$currentApplication)?'checked="checked"':'')?> />
<?php endif;?>
<input class="trans" type="hidden" name="trid" id="trid_<?=$ws->id?>" value="<?=(trim($application->transaction_id)>'' ? trim($application->transaction_id) : '')?>" />
</td>
<td align="center" width="10%">
<span class="w20 center"><i class="fa fa-calendar" aria-hidden="true"></i></span><br />
<span class="w20 center"><i class="fa fa-user" aria-hidden="true" ></i></span><br />
<?php if ($switch->gepet_kerek=='Y') : ?><span class="w20 center"><i class="fa fa-laptop" aria-hidden="true" ></i></span><?php endif;?>
</td>
<td style="white-space:nowrap">
<?php if ($ws->start_date==$ws->finish_date) : ?>
<span><?=$ws->start_date?> <?=substr($ws->start_time,0,-3)?></span>-<span><?=substr($ws->finish_time,0,-3)?></span>
<?php else :?>
<?=$ws->start_date?> - <?=$ws->finish_date?>
<?php endif;?><br />
<?=JText::_('MOD_ARCHLINE_CAPACITY')?>: <span id="capacity_<?=$ws->id?>"><?=$ws->capacity-$ws->applications?></span><br />
<?php if ($switch->gepet_kerek=='Y') : ?>
<?=JText::_('MOD_ARCHLINE_COMPUTER_CAPACITY')?>: <span id="gepigeny_<?=$ws->id?>"><?=(2-$ws->gepigeny>=0 ? 2-$ws->gepigeny : 0)?></span><br />
<?php endif;?>
</td>
<td style="white-space:nowrap">
<span id="reserved_<?=$ws->id?>" class="label label-primary" style="margin-bottom:5px;display:<?=($application ? 'block' : 'none')?>;"><strong><?=JText::_('MOD_ARCHLINE_RESERVED')?></strong></span>
<span id="paid_<?=$ws->id?>" class="label label-success" style="display:<?=($application->price_total>0 && trim($application->pay_id)>'' ? 'block' : 'none')?>;"><strong><?=JText::_('MOD_ARCHLINE_PAID')?></strong></span>
</td>
</tr>
<?php if ($switch->kurzus=='Y') : ?>
<tr id="sor_<?=$ws->id?>" class="hiddenrow">
<td colspan="4">
<p class="text-white"><?=JText::_('MOD_ARCHLINE_COURSE_SESSIONS')?>:</p>
<table border="0" width="100%">
<?php
$course_sessions=ModAlworkshopsHelper::getSessions($ws->id);
if ($course_sessions) : ?>
<?php foreach ($course_sessions as $course_session):?>
<tr valign="top">
<td nowrap="nowrap"><?=substr($course_session->session_date,2)?></td>
<td nowrap="nowrap"><?=substr($course_session->start_time,0,5)?>-<?=substr($course_session->finish_time,0,5)?></td>
<td><?=$course_session->description?></td>
</tr>
<?php endforeach;?>
<?php endif;?>
</table>
</td>
</tr>
<?php endif;?>
<tr><td colspan="4"><hr /></td></tr>
<?php endforeach;?>
</table>
<!-- <?php if ($switch->esemeny=='Y' && (int)$user->id!=0) :?>
<p class="text-white">
<input type="hidden" name="attendees" id="attendees" value="1" />
<input type="hidden" name="course_id" id="course_id" value="<?=$workshopok[0]->id?>" />
<input type="hidden" name="sess" id="sess" value="<?=JFactory::getSession()->getId()?>" />
<a id="btnReserve" onclick="javascript:submitWebinarForm('alworkshopForm','targetDiv');" class="sppb-btn sppb-btn-primary sppb-btn-square sppb-btn-block"><strong><?=JText::_('MOD_ARCHLINE_RESERVE')?></strong></a>
</p>
<?php endif;?> -->
</div>
<?php endif;?>
<?php if ((int)$user->id>0):?>
<!--LOGGED IN, WORKSHOP application-->
<!--Lease checkbox -->
<?php if ($switch->berletem_van=='Y' && $validLease) :?>
<p class="text-white">
<input type="hidden" name="berletem_van" value="1" />
<input type="checkbox" disabled checked />&nbsp;<label><?=JText::_('MOD_ARCHLINE_HAVE_LEASE')?></label>&nbsp;
(<?=JText::_('MOD_ARCHLINE_VALID')?>: <?=$validLease->validThrough?>)
</p>
<?php endif;?>
<?php if ($switch->webinair=='N' && $switch->esemeny=='N') : ?>
<div id="controlls">
<!--Ask for computer checkbox -->
<?php if ($switch->gepet_kerek=='Y') : ?><p class="text-white"><input type="checkbox" name="gepet_kerek" id="gepet_kerek" />&nbsp;<label for="gepet_kerek"><?=JText::_('MOD_ARCHLINE_ASK_COMPUTER')?></label>&nbsp;(<?=JText::_('MOD_ARCHLINE_MAX')?>: <?=2?>)</p><?php endif;?>
<!--ACCEPT checkbox -->
<p class="text-white"><input type="checkbox" name="elfogadom" id="elfogadom" /> <label for="elfogadom" style="display:initial;"><?=JText::_('MOD_ARCHLINE_ACCEPT')?></label></p>
</div>
<?php endif;?>
<!--NON-FREE RESERVATIONS (e.g.: kurzus, workshop, vizsga)-->
<?php if ($switch->kurzus=='Y' && $switch->level==1) : ?>
<!--RESERVE & PAY button-->
<p class="text-white"><a id="btnReserve" onclick="javascript:submitForm('alworkshopForm','targetDiv');" class="sppb-btn sppb-btn-primary sppb-btn-square sppb-btn-block"><strong><?=JText::_('MOD_ARCHLINE_RESERVE')?></strong></a></p>
<?php if ($workshopok[0]->price>0):?><p class="text-white"><a id="lnkPay" href="" target="_blank" class="sppb-btn sppb-btn-success sppb-btn-square sppb-btn-block"><strong><?=JText::_('MOD_ARCHLINE_PAY')?></strong></a></p><?php endif;?>
<?php elseif ($switch->kurzus=='Y' && $switch->level==2) : ?>
<?php if ($examResults->alap_oklevel) :?>
<?php if($switch->alias == 'kozepfoku-tanfolyam'): ?>
<?php
$application2=ModAlworkshopsHelper::getApplication($user->id,$workshopok[0]->id);
?>
<input class="trans" type="hidden" name="trid" id="trid_<?=$workshopok[0]->id?>" value="<?=(trim($application2->transaction_id)>'' ? trim($application2->transaction_id) : '')?>" />
<span id="reserved_<?=$workshopok[0]->id?>" class="label label-primary" style="margin-bottom:5px;display:<?=($application2 ? 'block' : 'none')?>;"><strong><?=JText::_('MOD_ARCHLINE_RESERVED')?></strong></span>
<?php endif;?>
<!--RESERVE & PAY button-->
<p class="text-white"><a id="btnReserve" onclick="javascript:submitForm('alworkshopForm','targetDiv');" class="sppb-btn sppb-btn-primary sppb-btn-square sppb-btn-block"><strong><?=JText::_('MOD_ARCHLINE_RESERVE')?></strong></a></p>
<?php if ($workshopok[0]->price>0):?><p class="text-white"><a id="lnkPay" href="" target="_blank" class="sppb-btn sppb-btn-success sppb-btn-square sppb-btn-block"><strong><?=JText::_('MOD_ARCHLINE_PAY')?></strong></a></p><?php endif;?>
<?php else : ?>
<!--LETILTOTT RESERVE & PAY button-->
<p class="figyelmeztet vastag"><?=JText::_('MOD_ARCHLINE_COURSE_INTERMEDIATE')?>!</p>
<p class="text-white"><a class="sppb-btn sppb-btn-primary sppb-btn-square sppb-btn-block disabled"><strong><?=JText::_('MOD_ARCHLINE_RESERVE')?></strong></a></p>
<?php if ($workshopok[0]->price>0):?><p class="text-white"><a class="sppb-btn sppb-btn-success sppb-btn-square sppb-btn-block disabled"><strong><?=JText::_('MOD_ARCHLINE_PAY')?></strong></a></p><?php endif;?>
<?php endif;?>
<?php elseif ($switch->workshop=='Y' && $validLease) : ?>
<!--RESERVE & PAY button-->
<p class="text-white"><a id="btnReserve" onclick="javascript:submitForm('alworkshopForm','targetDiv');" class="sppb-btn sppb-btn-primary sppb-btn-square sppb-btn-block"><strong><?=JText::_('MOD_ARCHLINE_RESERVE')?></strong></a></p>
<?php if ($workshopok[0]->price>0):?><p class="text-white"><a id="lnkPay" href="" target="_blank" class="sppb-btn sppb-btn-success sppb-btn-square sppb-btn-block"><strong><?=JText::_('MOD_ARCHLINE_PAY')?></strong></a></p><?php endif;?>
<?php elseif ($switch->workshop=='Y' && !$validLease) : ?>
<?php if ($switch->level==1) : ?>
<!--LETILTOTT RESERVE & PAY button-->
<p class="figyelmeztet vastag"><?=JText::_('MOD_ARCHLINE_WORKSHOP_PRELIMINARY')?>!</p>
<p class="text-white"><a class="sppb-btn sppb-btn-primary sppb-btn-square sppb-btn-block disabled"><strong><?=JText::_('MOD_ARCHLINE_RESERVE')?></strong></a></p>
<?php if ($workshopok[0]->price>0):?><p class="text-white"><a class="sppb-btn sppb-btn-success sppb-btn-square sppb-btn-block disabled"><strong><?=JText::_('MOD_ARCHLINE_PAY')?></strong></a></p><?php endif;?>
<?php endif;?>
<?php if ($switch->level==2) : ?>
<?php if ($examResults->alap_oklevel) :?>
<!--RESERVE & PAY button-->
<p class="text-white"><a id="btnReserve" onclick="javascript:submitForm('alworkshopForm','targetDiv');" class="sppb-btn sppb-btn-primary sppb-btn-square sppb-btn-block"><strong><?=JText::_('MOD_ARCHLINE_RESERVE')?></strong></a></p>
<?php if ($workshopok[0]->price>0):?><p class="text-white"><a id="lnkPay" href="" target="_blank" class="sppb-btn sppb-btn-success sppb-btn-square sppb-btn-block"><strong><?=JText::_('MOD_ARCHLINE_PAY')?></strong></a></p><?php endif;?>
<?php else : ?>
<!--LETILTOTT RESERVE & PAY button-->
<p class="figyelmeztet vastag"><?=JText::_('MOD_ARCHLINE_WORKSHOP_INTERMEDIATE')?>!</p>
<p class="text-white"><a class="sppb-btn sppb-btn-primary sppb-btn-square sppb-btn-block disabled"><strong><?=JText::_('MOD_ARCHLINE_RESERVE')?></strong></a></p>
<?php if ($workshopok[0]->price>0):?><p class="text-white"><a class="sppb-btn sppb-btn-success sppb-btn-square sppb-btn-block disabled"><strong><?=JText::_('MOD_ARCHLINE_PAY')?></strong></a></p><?php endif;?>
<?php endif;?>
<?php endif;?>
<?php elseif ($switch->vizsga=='Y' ) :?>
<?php if ($examPermit || $onlineExamPermit) : ?>
<!--RESERVE & PAY button-->
<p class="text-white"><a id="btnReserve" onclick="javascript:submitForm('alworkshopForm','targetDiv');" class="sppb-btn sppb-btn-primary sppb-btn-square sppb-btn-block"><strong><?=JText::_('MOD_ARCHLINE_RESERVE')?></strong></a></p>
<?php if ($workshopok[0]->price>0):?><p class="text-white"><a id="lnkPay" href="" target="_blank" class="sppb-btn sppb-btn-success sppb-btn-square sppb-btn-block"><strong><?=JText::_('MOD_ARCHLINE_PAY')?></strong></a></p><?php endif;?>
<?php else:?>
<?php if ($switch->level==1) : ?><p class="figyelmeztet vastag"><?=JText::_('MOD_ARCHLINE_EXAM_PRELIMINARY')?>!</p><?php endif;?>
<?php if ($switch->level==2) : ?><p class="figyelmeztet vastag"><?=JText::_('MOD_ARCHLINE_EXAM_INTERMEDIATE')?>!</p><?php endif;?>
<!--LETILTOTT RESERVE & PAY button-->
<p class="text-white"><a class="sppb-btn sppb-btn-primary sppb-btn-square sppb-btn-block disabled"><strong><?=JText::_('MOD_ARCHLINE_RESERVE')?></strong></a></p>
<?php if ($workshopok[0]->price>0):?><p class="text-white"><a class="sppb-btn sppb-btn-success sppb-btn-square sppb-btn-block disabled"><strong><?=JText::_('MOD_ARCHLINE_PAY')?></strong></a></p><?php endif;?>
<?php endif;?>
<?php endif;?><br/>
<!--COMMON things-->
<input type="hidden" name="attendees" id="attendees" value="1" />
<input type="hidden" name="sess" id="sess" value="<?=JFactory::getSession()->getId()?>" />
<input type="hidden" name="user_id" id="user_id" value="<?=$user->id?>" />
<input type="hidden" name="maxgepigeny" id="maxgepigeny" value="2" />
<input type="hidden" name="gepigeny" id="gepigeny" value="" />
<input type="hidden" name="capacity" id="capacity" value="" />
<input type="hidden" name="applications" id="applications" value="" />
<input type="hidden" name="firstid" id="firstid" value="<?=$workshopok[0]->id?>" />
</form>
<?php
if($switch->esemeny!='Y'){?>
<p class="text-white"><a href="http://www.archline.hu/felhasznalo/jelentkezesek" class="sppb-btn sppb-btn-primary sppb-btn-square sppb-btn-block" target="_blank"><strong><?=JText::_('MOD_ARCHLINE_MY_APPLICATION')?></strong></a></p>
<?php
}
?>
<!--!!!Új FORM, nem lehet bemozgatni a már meglévő form-on belülre!!!-->
<?php if ($switch->vizsga=='Y' || $application->attendees <= 3) : ?>
<!-- <?php if ($_SERVER['REMOTE_ADDR']=='46.139.14.111') { var_dump($tceUser->user_name); }?> -->
<form name="login_tcexam" id="login_tcexam" action="http://tcexam.archline.hu/public/code/index.php?lang=hu" method="POST" target="_blank">
<input type="hidden" name="xuser_name" id="xuser_name" value="<?=$tceUser->user_name?>" />
<input type="hidden" name="xuser_password" id="xuser_password" value="<?=$tceUser->password?>" />
<input type="hidden" name="group_id" id="group_id" value="<?=$switch->vizsga_csoport?>" />
<input type="hidden" name="logaction" id="logaction" value="login" />
<?php
if($switch->webinair!='Y' && $switch->vizsga=='Y'){
?>
<input type="submit" name="login" id="login" value="Vizsgázok" class="sppb-btn sppb-btn-warning sppb-btn-square sppb-btn-block <?=(ModAlworkshopsHelper::getExamLogin($switch->level)===TRUE && date('Y-m-d',time())==$examDate ? "" : "disabled")?>" />
<?php
}
?>
</form>
<?php endif;?>
<!--!!!Új FORM, nem lehet bemozgatni a már meglévő form-on belülre!!!-->
<?php else:?>
</form>
<!--LOGIN FORM, WORKSHOP application -->
<?php if ($switch->kurzus=='Y' || $switch->workshop=='Y' || $switch->vizsga=='Y' || ($switch->esemeny=='Y' && $switch->login=='Y') || ($switch->webinair=='Y' && $switch->login='N')) : ?>
<?php
if($switch->webinair=='Y' && $switch->login=='N') {
?>
<div class="FirstWebinar">
<div id="myDiv2">
<p class="text-white"><?=JText::_('MOD_ARCHLINE_MUST_LOGIN')?></p>
<?=JModuleHelper::renderModule(JModuleHelper::getModule('login','Felhasználó - Bejelentkezés'))?>
</div>
</div>
<div class="SecondWebinar">
<div class="webinar2_login">
<p class="text-white"><?=JText::_('MOD_ARCHLINE_MUST_LOGIN')?></p>
<?=JModuleHelper::renderModule(JModuleHelper::getModule('login','Felhasználó - Bejelentkezés'))?>
</div>
</div>
<div class="ThirdWebinar">
<div class="webinar3_login">
<p class="text-white"><?=JText::_('MOD_ARCHLINE_MUST_LOGIN')?></p>
<?=JModuleHelper::renderModule(JModuleHelper::getModule('login','Felhasználó - Bejelentkezés'))?>
</div>
</div>
<?php
} else {
?>
<p class="text-white"><?=JText::_('MOD_ARCHLINE_MUST_LOGIN')?></p>
<?=JModuleHelper::renderModule(JModuleHelper::getModule('login','Felhasználó - Bejelentkezés'))?>
<?php
}
?>
<?php endif;?>
<?php endif;?>
<?php else : ?>
<p class="text-white"><?=JText::_('MOD_ARCHLINE_NO_WORKSHOP')?></p>
<?php endif; ?>
<?php if ($workshopok[0]->price>0):?>
<div id="dialog" title="<?=JText::_('MOD_ARCHLINE_SUCCESS_TITLE')?>" style="display:none;">
<p class="text-white"><?=JText::_('MOD_ARCHLINE_SUCCESS_TEXT')?></p>
<p class="text-white">&nbsp;</p>
<p class="text-white"><a id="lnkPay2" href="" target="_blank" class="sppb-btn sppb-btn-success sppb-btn-square sppb-btn-block"><strong><?=JText::_('MOD_ARCHLINE_PAY')?></strong></a></p>
</div>
<?php endif;?>
<div class="targetDiv FirstWebinar"></div>
<?php if ($switch->kurzus=='Y' || $switch->workshop=='Y') : ?>
<!--a tanfolyam tovabbi workshopjai-->
<?php if ($switch->level!=2) : ?><hr /> <?php endif; ?>
<p>
<?php if ($switch->level==1) : ?><strong><?=JText::_('MOD_ARCHLINE_OTHER_PRELIMINARY_WORKSHOPS')?>:</strong><br /><?php endif;?>
<!--<?php if ($switch->level==2) : ?><strong><?=JText::_('MOD_ARCHLINE_OTHER_INTERMEDIATE_WORKSHOPS')?>:</strong><br /><?php endif;?>-->
<?php $otherWorkshops=ModAlworkshopsHelper::getOtherWorkshops($switch->level);?>
<?php if ($otherWorkshops && $switch->level!=2) :?>
<?php foreach ($otherWorkshops as $ows) : ?>
<?php if ($switch->id==$ows->id) : ?>
<?=$ows->title?>
<?php else : ?>
<a href="/<?=$ows->path?>/<?=$ows->alias?>" title="<?=$ows->title?>"><?=$ows->title?></a>
<?php endif;?><br />
<?php endforeach; ?>
<?php endif;?>
</p>
<?php endif;?>
<form id="klub234" action="/modules/mod_alworkshops/assets/ajax/alworkshops.class.php">
<?php
if($switch->esemeny=='Y' && $user->id>0)
{
?>
<input type="hidden" name="hidden_id" value="<?=$user->id?>" />
<div style="display: none;">
<div class="form-group"><input style="color:black;" type="text" name="usr" id="usr" value="<?=$user->name?>" placeholder="<?=JText::_('MOD_ARCHLINE_NAME')?>*" class="form-control name" /></div>
<div class="form-group">
<input style="color:black;" type="text" name="email" id="email" value="<?=$user->email?>" placeholder="<?=JText::_('MOD_ARCHLINE_EMAIL')?>*" class="form-control email" />
<small id="emailHelp" class="form-text text-muted"><?=JText::_('MOD_ARCHLINE_EMAIL_COMMENT')?></small>
</div>
<?php if ($switch->orszag=='Y'):?>
<div class="form-group">
<select name="country" id="country" class="form-control country" >
<option value="" ><?=JText::_('MOD_ARCHLINE_SELECT_COUNTRY')?>*</option>
<option value="-" disabled="disabled">-----</option>
<?php
$conn = mysqli_connect('localhost', 'cadline', 'Shea6hoo', 'cl_hlusers');
$sql = $conn->prepare("SELECT users.nCtrID AS ctrID, countries.ctrName AS name
FROM users
LEFT JOIN countries ON countries.ctrID = users.nCtrID
WHERE users.nUserID = ?");
$sql->bind_param("i", $user->nUserID);
$sql->execute();
$result = $sql->get_result();
if ($user->id != 0) {
while($row = mysqli_fetch_assoc($result)) {
$tomb=parse_ini_file($_SERVER['DOCUMENT_ROOT'].'/language/'.JFactory::getLanguage()->getTag().'/'.JFactory::getLanguage()->getTag().'.countries.ini');
foreach ($tomb as $k=>$v) echo '<option value="'.$k.'" '.($row["name"]==$v ? ' selected="selected"' : '').'>'.$v.'</option>';
}
} else {
$tomb=parse_ini_file($_SERVER['DOCUMENT_ROOT'].'/language/'.JFactory::getLanguage()->getTag().'/'.JFactory::getLanguage()->getTag().'.countries.ini');
foreach ($tomb as $k=>$v) echo '<option value="'.$k.'" '.($userProfile->profile['country']==$v ? ' selected="selected"' : '').'>'.$v.'</option>';
}
?>
</select>
</div>
<?php endif;?>
<?php if ($switch->szakma=='Y'):?>
<div class="form-group">
<select name="prof" id="prof" class="form-control prof" >
<option value="" ><?=JText::_('MOD_ARCHLINE_SELECT_PROF')?>*</option>
<option value="-" disabled="disabled">-----</option>
<?php
$conn = mysqli_connect('localhost', 'cadline', 'Shea6hoo', 'cl_hlusers');
$sql = $conn->prepare("SELECT users.nCtrID AS ctrID, users.nUserProf AS profID, u_profs.proName AS profName, countries.ctrName AS name
FROM users
LEFT JOIN countries ON countries.ctrID = users.nCtrID
LEFT JOIN u_profs ON u_profs.proID = users.nUserProf
WHERE users.nUserID = ?");
$sql->bind_param("i", $user->nUserID);
$sql->execute();
$result = $sql->get_result();
if ($user->id != 0) {
while($row = mysqli_fetch_assoc($result)) {
$tomb=parse_ini_file($_SERVER['DOCUMENT_ROOT'].'/language/'.JFactory::getLanguage()->getTag().'/'.JFactory::getLanguage()->getTag().'.prof.ini');
if($row['profName'] != $tomb) {
$row['profName'] = "Nem szakmai";
}
foreach ($tomb as $k=>$v) echo '<option value="'.$k.'" '.($row["profName"]==$v ? ' selected="selected"' : '').'>'.$v.'</option>';
}
} else {
$tomb=parse_ini_file($_SERVER['DOCUMENT_ROOT'].'/language/'.JFactory::getLanguage()->getTag().'/'.JFactory::getLanguage()->getTag().'.prof.ini');
foreach ($tomb as $k=>$v) echo '<option value="'.$k.'" '.($userProfile->profile['aboutme']==$v ? ' selected="selected"' : '').'>'.$v.'</option>';
}
?>
</select>
</div>
<?php endif;?>
</div>
<p id="myP2" class="text-white" <?=( ($user->id == 0) ? 'style="display:none;"' : "")?>>
<input type="hidden" name="attendees" id="attendees" value="1" />
<input type="hidden" name="sess" id="sess" value="<?=JFactory::getSession()->getId()?>" />
</p>
<table width="100%" border="0">
<tr><td colspan="4"><hr /></td></tr>
<?php foreach ($workshopok as $k=>$ws):?>
<?php
$date = $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;
?>
<?php if(time() >= $timestamp):?>
<tr valign="top">
<?php else: ?>
<tr valign="top" class="kattintos" onclick="javascript:changeCourse('<?=$ws->id?>','<?=$ws->capacity?>','<?=$ws->applications?>','<?=$ws->gepigeny?>','<?=(trim($application->transaction_id)>'' ? trim($application->transaction_id) : '')?>');">
<?php endif;?>
<td align="center" width="10%">
<?php if(time() >= $timestamp):?>
<input type="radio" disabled name="course_id" id="course_id_<?=$ws->id?>" value="<?=$ws->id?>" onclick="javascript:changeCourse('<?=$ws->id?>','<?=$ws->capacity?>','<?=$ws->applications?>','<?=$ws->gepigeny?>','<?=(trim($application->transaction_id)>'' ? trim($application->transaction_id) : '')?>');" />
<?php else: ?>
<input type="radio" name="course_id" id="course_id_<?=$ws->id?>" value="<?=$ws->id?>" onclick="javascript:changeCourse('<?=$ws->id?>','<?=$ws->capacity?>','<?=$ws->applications?>','<?=$ws->gepigeny?>','<?=(trim($application->transaction_id)>'' ? trim($application->transaction_id) : '')?>');" <?=( (isset($currentApplication) && $k==$currentApplication)?'checked="checked"':'')?> />
<?php endif;?>
<input class="trans" type="hidden" name="trid" id="trid_<?=$ws->id?>" value="<?=(trim($application->transaction_id)>'' ? trim($application->transaction_id) : '')?>" />
</td>
<td align="center" width="10%">
<span class="w20 center"><i class="fa fa-calendar" aria-hidden="true"></i></span><br />
<span class="w20 center"><i class="fa fa-user" aria-hidden="true" ></i></span><br />
<?php if ($switch->gepet_kerek=='Y') : ?><span class="w20 center"><i class="fa fa-laptop" aria-hidden="true" ></i></span><?php endif;?>
</td>
<td style="white-space:nowrap">
<?php if ($ws->start_date==$ws->finish_date) : ?>
<span><?=$ws->start_date?> <?=substr($ws->start_time,0,-3)?></span>-<span><?=substr($ws->finish_time,0,-3)?></span>
<?php else :?>
<?=$ws->start_date?> - <?=$ws->finish_date?>
<?php endif;?><br />
<?=JText::_('MOD_ARCHLINE_CAPACITY')?>: <span id="capacity_<?=$ws->id?>"><?=$ws->capacity-$ws->applications?></span><br />
<?php if ($switch->gepet_kerek=='Y') : ?>
<?=JText::_('MOD_ARCHLINE_COMPUTER_CAPACITY')?>: <span id="gepigeny_<?=$ws->id?>"><?=(2-$ws->gepigeny>=0 ? 2-$ws->gepigeny : 0)?></span><br />
<?php endif;?>
</td>
<td style="white-space:nowrap">
<span id="reserved_<?=$ws->id?>" class="label label-primary" style="margin-bottom:5px;display:<?=($application ? 'block' : 'none')?>;"><strong><?=JText::_('MOD_ARCHLINE_RESERVED')?></strong></span>
<span id="paid_<?=$ws->id?>" class="label label-success" style="display:<?=($application->price_total>0 && trim($application->pay_id)>'' ? 'block' : 'none')?>;"><strong><?=JText::_('MOD_ARCHLINE_PAID')?></strong></span>
</td>
</tr>
<?php if ($switch->kurzus=='Y') : ?>
<tr id="sor_<?=$ws->id?>" class="hiddenrow">
<td colspan="4">
<p class="text-white"><?=JText::_('MOD_ARCHLINE_COURSE_SESSIONS')?>:</p>
<table border="0" width="100%">
<?php
$course_sessions=ModAlworkshopsHelper::getSessions($ws->id);
if ($course_sessions) : ?>
<?php foreach ($course_sessions as $course_session):?>
<tr valign="top">
<td nowrap="nowrap"><?=substr($course_session->session_date,2)?></td>
<td nowrap="nowrap"><?=substr($course_session->start_time,0,5)?>-<?=substr($course_session->finish_time,0,5)?></td>
<td><?=$course_session->description?></td>
</tr>
<?php endforeach;?>
<?php endif;?>
</table>
</td>
</tr>
<?php endif;?>
<tr><td colspan="4"><hr /></td></tr>
<?php endforeach;?>
</table>
<a id="btnReserve1" onclick="javascript:submitWebinarForm('klub234','targetDiv2');" class="sppb-btn sppb-btn-primary sppb-btn-square sppb-btn-block web2_reserve"><strong><?=JText::_('MOD_ARCHLINE_RESERVE')?></strong></a> <br/>
<p class="text-white"><a href="http://www.archline.hu/felhasznalo/jelentkezesek" class="sppb-btn sppb-btn-primary sppb-btn-square sppb-btn-block" target="_blank"><strong><?=JText::_('MOD_ARCHLINE_MY_APPLICATION')?></strong></a></p>
<?php
}
?>
</form>
<form id="webinar2" action="/modules/mod_alworkshops/assets/ajax/alworkshops.class.php">
<?php if ($switch->webinair=='Y') : ?>
<div class="SecondWebinar">
<input type="hidden" name="hidden_id" value="<?=$user->id?>" />
<div id="myDiv2" class="webinar2" style="display: none;">
<div class="form-group"><input style="color:black;" type="text" name="usr" id="usr" value="<?=$user->name?>" placeholder="<?=JText::_('MOD_ARCHLINE_NAME')?>*" class="form-control name" /></div>
<div class="form-group">
<input style="color:black;" type="text" name="email" id="email" value="<?=$user->email?>" placeholder="<?=JText::_('MOD_ARCHLINE_EMAIL')?>*" class="form-control email" />
<small id="emailHelp" class="form-text text-muted"><?=JText::_('MOD_ARCHLINE_EMAIL_COMMENT')?></small>
</div>
<?php if ($switch->orszag=='Y'):?>
<div class="form-group">
<select name="country" id="country" class="form-control country" >
<option value="" ><?=JText::_('MOD_ARCHLINE_SELECT_COUNTRY')?>*</option>
<option value="-" disabled="disabled">-----</option>
<?php
$conn = mysqli_connect('localhost', 'cadline', 'Shea6hoo', 'cl_hlusers');
$sql = $conn->prepare("SELECT users.nCtrID AS ctrID, countries.ctrName AS name
FROM users
LEFT JOIN countries ON countries.ctrID = users.nCtrID
WHERE users.nUserID = ?");
$sql->bind_param("i", $user->nUserID);
$sql->execute();
$result = $sql->get_result();
if ($user->id != 0) {
while($row = mysqli_fetch_assoc($result)) {
$tomb=parse_ini_file($_SERVER['DOCUMENT_ROOT'].'/language/'.JFactory::getLanguage()->getTag().'/'.JFactory::getLanguage()->getTag().'.countries.ini');
foreach ($tomb as $k=>$v) echo '<option value="'.$k.'" '.($row["name"]==$v ? ' selected="selected"' : '').'>'.$v.'</option>';
}
} else {
$tomb=parse_ini_file($_SERVER['DOCUMENT_ROOT'].'/language/'.JFactory::getLanguage()->getTag().'/'.JFactory::getLanguage()->getTag().'.countries.ini');
foreach ($tomb as $k=>$v) echo '<option value="'.$k.'" '.($userProfile->profile['country']==$v ? ' selected="selected"' : '').'>'.$v.'</option>';
}
?>
</select>
</div>
<?php endif;?>
<?php if ($switch->szakma=='Y'):?>
<div class="form-group">
<select name="prof" id="prof" class="form-control prof" >
<option value="" ><?=JText::_('MOD_ARCHLINE_SELECT_PROF')?>*</option>
<option value="-" disabled="disabled">-----</option>
<?php
$conn = mysqli_connect('localhost', 'cadline', 'Shea6hoo', 'cl_hlusers');
$sql = $conn->prepare("SELECT users.nCtrID AS ctrID, users.nUserProf AS profID, u_profs.proName AS profName, countries.ctrName AS name
FROM users
LEFT JOIN countries ON countries.ctrID = users.nCtrID
LEFT JOIN u_profs ON u_profs.proID = users.nUserProf
WHERE users.nUserID = ?");
$sql->bind_param("i", $user->nUserID);
$sql->execute();
$result = $sql->get_result();
if ($user->id != 0) {
while($row = mysqli_fetch_assoc($result)) {
$tomb=parse_ini_file($_SERVER['DOCUMENT_ROOT'].'/language/'.JFactory::getLanguage()->getTag().'/'.JFactory::getLanguage()->getTag().'.prof.ini');
if($row['profName'] != $tomb) {
$row['profName'] = "Nem szakmai";
}
foreach ($tomb as $k=>$v) echo '<option value="'.$k.'" '.($row["profName"]==$v ? ' selected="selected"' : '').'>'.$v.'</option>';
}
} else {
$tomb=parse_ini_file($_SERVER['DOCUMENT_ROOT'].'/language/'.JFactory::getLanguage()->getTag().'/'.JFactory::getLanguage()->getTag().'.prof.ini');
foreach ($tomb as $k=>$v) echo '<option value="'.$k.'" '.($userProfile->profile['aboutme']==$v ? ' selected="selected"' : '').'>'.$v.'</option>';
}
?>
</select>
</div>
</div>
<p id="myP2" class="text-white" <?=( ($user->id == 0) ? 'style="display:none;"' : "")?>>
<input type="hidden" name="attendees" id="attendees" value="1" />
<input type="hidden" name="course_id" id="course_id" value="<?=$workshopok[1]->id?>" />
<input type="hidden" name="sess" id="sess" value="<?=JFactory::getSession()->getId()?>" />
</p>
<?php endif;?>
</div>
<?php endif;?>
</form>
<div class="SecondWebinar">
<div class="targetDiv2"></div>
</div>
<form id="webinar3" action="/modules/mod_alworkshops/assets/ajax/alworkshops.class.php">
<?php if ($switch->webinair=='Y') : ?>
<div class="ThirdWebinar">
<div id="myDiv3" class="webinar3" style="display: none;">
<input type="hidden" name="hidden_id" value="<?=$user->id?>" />
<div class="form-group"><input style="color:black;" type="text" name="usr" id="usr" value="<?=$user->name?>" placeholder="<?=JText::_('MOD_ARCHLINE_NAME')?>*" class="form-control name" /></div>
<div class="form-group">
<input style="color:black;" type="text" name="email" id="email" value="<?=$user->email?>" placeholder="<?=JText::_('MOD_ARCHLINE_EMAIL')?>*" class="form-control email" />
<small id="emailHelp" class="form-text text-muted"><?=JText::_('MOD_ARCHLINE_EMAIL_COMMENT')?></small>
</div>
<?php if ($switch->orszag=='Y'):?>
<div class="form-group">
<select name="country" id="country" class="form-control country" >
<option value="" ><?=JText::_('MOD_ARCHLINE_SELECT_COUNTRY')?>*</option>
<option value="-" disabled="disabled">-----</option>
<?php
$conn = mysqli_connect('localhost', 'cadline', 'Shea6hoo', 'cl_hlusers');
$sql = $conn->prepare("SELECT users.nCtrID AS ctrID, countries.ctrName AS name
FROM users
LEFT JOIN countries ON countries.ctrID = users.nCtrID
WHERE users.nUserID = ?");
$sql->bind_param("i", $user->nUserID);
$sql->execute();
$result = $sql->get_result();
if ($user->id != 0) {
while($row = mysqli_fetch_assoc($result)) {
$tomb=parse_ini_file($_SERVER['DOCUMENT_ROOT'].'/language/'.JFactory::getLanguage()->getTag().'/'.JFactory::getLanguage()->getTag().'.countries.ini');
foreach ($tomb as $k=>$v) echo '<option value="'.$k.'" '.($row["name"]==$v ? ' selected="selected"' : '').'>'.$v.'</option>';
}
} else {
$tomb=parse_ini_file($_SERVER['DOCUMENT_ROOT'].'/language/'.JFactory::getLanguage()->getTag().'/'.JFactory::getLanguage()->getTag().'.countries.ini');
foreach ($tomb as $k=>$v) echo '<option value="'.$k.'" '.($userProfile->profile['country']==$v ? ' selected="selected"' : '').'>'.$v.'</option>';
}
?>
</select>
</div>
<?php endif;?>
<?php if ($switch->szakma=='Y'):?>
<div class="form-group">
<select name="prof" id="prof" class="form-control prof" >
<option value="" ><?=JText::_('MOD_ARCHLINE_SELECT_PROF')?>*</option>
<option value="-" disabled="disabled">-----</option>
<?php
$conn = mysqli_connect('localhost', 'cadline', 'Shea6hoo', 'cl_hlusers');
$sql = $conn->prepare("SELECT users.nCtrID AS ctrID, users.nUserProf AS profID, u_profs.proName AS profName, countries.ctrName AS name
FROM users
LEFT JOIN countries ON countries.ctrID = users.nCtrID
LEFT JOIN u_profs ON u_profs.proID = users.nUserProf
WHERE users.nUserID = ?");
$sql->bind_param("i", $user->nUserID);
$sql->execute();
$result = $sql->get_result();
if ($user->id != 0) {
while($row = mysqli_fetch_assoc($result)) {
$tomb=parse_ini_file($_SERVER['DOCUMENT_ROOT'].'/language/'.JFactory::getLanguage()->getTag().'/'.JFactory::getLanguage()->getTag().'.prof.ini');
if($row['profName'] != $tomb) {
$row['profName'] = "Nem szakmai";
}
foreach ($tomb as $k=>$v) echo '<option value="'.$k.'" '.($row["profName"]==$v ? ' selected="selected"' : '').'>'.$v.'</option>';
}
} else {
$tomb=parse_ini_file($_SERVER['DOCUMENT_ROOT'].'/language/'.JFactory::getLanguage()->getTag().'/'.JFactory::getLanguage()->getTag().'.prof.ini');
foreach ($tomb as $k=>$v) echo '<option value="'.$k.'" '.($userProfile->profile['aboutme']==$v ? ' selected="selected"' : '').'>'.$v.'</option>';
}
?>
</select>
</div>
</div>
<p id="myP3" class="text-white" <?=( ($user->id == 0) ? 'style="display:none;"' : "")?>>
<input type="hidden" name="attendees" id="attendees" value="1" />
<input type="hidden" name="course_id" id="course_id" value="<?=$workshopok[2]->id?>" />
<input type="hidden" name="sess" id="sess" value="<?=JFactory::getSession()->getId()?>" />
</p>
<?php endif;?>
</div>
<?php endif;?>
</form>
<div class="ThirdWebinar">
<div class="targetDiv3"></div>
</div>
</div>
<script type="text/javascript">
<?php if ((int)$workshopok[0]->id>0) : ?>
<?php
$cApp=($currentApplication?$currentApplication:0);
$application=ModAlworkshopsHelper::getApplication($user->id,(int)$workshopok[$cApp]->id); ?>
jQuery(document).ready(function()
{
changeCourse('<?=$workshopok[$cApp]->id?>','<?=$workshopok[$cApp]->capacity?>','<?=$workshopok[$cApp]->applications?>','<?=$workshopok[$cApp]->gepigeny?>','<?=(trim($application->transaction_id)>''?trim($application->transaction_id):'');?>');
<?php if ($switch->webinair=='N') : ?>
setReserve();
<?php endif;?>
});
<?php endif;?>
<?php if ($switch->webinair=='N') : ?>
jQuery("#elfogadom").click(function(){ setReserve(); });
<?php endif;?>
function tovabbiak() { jQuery('#tovabbi').toggle("fast"); }
function fizetesDialog() { jQuery( "#dialog" ).dialog({ modal: true,width: 500, height: 200 }); }
function changeCourse(id,capacity,applications,gepigeny,transid)
{
var trid=jQuery('#trid_'+id).val();
var element = jQuery('#reserved_'+id);
var maxgep=2;
jQuery('.hiddenrow').hide();
jQuery('#sor_'+id).show("fast");
jQuery('#gepigeny').val(gepigeny);
jQuery('#capacity').val(capacity);
jQuery('#applications').val(applications);
jQuery('#course_id_'+id).prop('checked',true);
jQuery('#gepet_kerek').prop('disabled',(maxgep>gepigeny ? false : true));
if (capacity==applications)
{
<?php if (!isset($validLease) || (isset($validLease) && $validLease==FALSE)):?>jQuery('#berletem_van').prop('disabled',true);<?php endif;?>
jQuery('#btnReserve').removeClass('active').addClass('disabled');
}
else
{
<?php if (!isset($validLease) || (isset($validLease) && $validLease==FALSE)):?>jQuery('#berletem_van').prop('disabled',false);<?php endif;?>
<?php if ($switch->webinair=='N') : ?>setReserve();<?php endif;?>
}
if (element.length > 0 && element.css('visibility') !== 'hidden' && element.css('display') !== 'none')
{
jQuery('#btnReserve').removeClass('active').addClass('disabled');
jQuery('#lnkPay').removeClass('disabled').addClass('active');
jQuery('#lnkPay').attr('href', 'https://pay.archline.hu/sale/workshop.php?transid='+trid);
jQuery('#lnkPay2').attr('href', 'https://pay.archline.hu/sale/workshop.php?transid='+trid);
jQuery('#controlls').hide("fast");
}
else
{
/*jQuery('#btnReserve').removeClass('disabled').addClass('active');*/
jQuery('#lnkPay').removeClass('active').addClass('disabled');
jQuery('#lnkPay').attr('href', '');
jQuery('#lnkPay2').attr('href', '');
jQuery('#controlls').show("fast");
}
}
<?php if ($switch->webinair=='N') : ?>
function setReserve()
{
if (jQuery('#elfogadom').prop("checked")) { jQuery('#btnReserve').removeClass('disabled').addClass('active');}
else { jQuery('#btnReserve').removeClass('active').addClass('disabled');
}
}
<?php endif;?>
function submitForm(formid,targetdiv)
{
<?php if($workshopok[0]->price > 0): ?>
alert("Rendszerünk a foglalástól számítva 60 percet biztosít arra, hogy az online kifizetés megtörténjen. Amennyiben a kifizetés nem teljesül a megadott időn belül, a regisztráció törlődik.");
<?php endif; ?>
jQuery.ajax({
type: "POST",
url: jQuery('#'+formid).attr('action'),
data: jQuery('#'+formid).serialize(),
success: function(html) {jQuery('#'+targetdiv).html(html);
location.reload();
}
});
return false;
}
function submitWebinarForm(formid,targetdiv)
{
jQuery.ajax({
type: "POST",
url: jQuery('#'+formid).attr('action'),
data: jQuery('#'+formid).serialize(),
success: function(html) {jQuery('.'+targetdiv).html(html);}
});
/*
if (jQuery('#usr').val()>'' && jQuery('#email').val()>'' && jQuery('#prof').val()>'' && jQuery('#country').val()>'' <?php if ($switch->telefonszam=='Y'):?> && jQuery('#phone').val()>''<?php endif;?> )
{
jQuery.ajax({
type: "POST",
url: jQuery('#'+formid).attr('action'),
data: jQuery('#'+formid).serialize(),
success: function(html) {jQuery('#'+targetdiv).html(html);}
});
}
else
{
alert('<?=JText::_('MOD_ARCHLINE_PLEASE_FILL_FORM')?>!');
}
*/
return false;
}
</script>