xxnew EmojiPicker({selector:'.emoButton', fields:'.emoYes'});\n"; } //functions function venueMenu($selVenue) { $venues = file('files/venues.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); if (!$venues) { $venues = ['Venue list empty or not found']; } foreach ($venues as $venue) { $venue = trim($venue); if ($venue[0] === '#') { continue; } //skip comment $selected = ($selVenue == $venue) ? ' selected' : ''; echo "\n"; } } function catMenu($selCat) { global $usr, $todo; $eCats = $usr['eCats']; $stH = dbQuery("SELECT `ID`,`name`,`color`,`bgColor`,`checkBx` FROM `categories` WHERE `status` >= 0".($eCats != '0' ? " AND `ID` IN ($eCats)" : '')." ORDER BY sequence"); echo "\n\n"; } function scatMenu($sid) { global $cat, $xx; $options = ''; foreach ($cat['sub'] as $k => $scat) { $i = $k + 1; if (empty($scat[0])) { continue; } //no name, no subcat $selected = $sid == $i ? ' selected' : ''; $color = ($scat[1] ? "color:{$scat[1]};" : '').($scat[2] ? "background-color:{$scat[2]};" : ''); $options .= "\n"; } echo "\n\n"; } function userMenu($selUser) { $stH = dbQuery("SELECT `ID`,`name` FROM `users` WHERE `status` >= 0 ORDER BY `name`"); while (list($ID,$name) = $stH->fetch(PDO::FETCH_NUM)) { $selected = ($selUser == $ID) ? ' selected' : ''; echo "\n"; } } //init $todo = ''; $evtTemplTot = $templ['gen'].$templ['upc'].$templ['pop']; if ($set['evtWinSmall']) { //reduced Event window $eExt = $_POST['eExt'] ?? 0; } else { $eExt = 1; } echo "
{$formCal} \n"; if (strpos($evtTemplTot,'4') !== false and $usr['privs'] < $set['xField1Rights']) { echo "\n"; } if (strpos($evtTemplTot,'5') !== false and $usr['privs'] < $set['xField2Rights']) { echo "\n"; } echo "
\n"; if ($cat['app'] and $usr['privs'] > 3) { //manager or admin echo "
\n"; } echo "\n"; echo "\n\n"; if (strpos($evtTemplTot,'1') !== false) { $placeHolder = $set['mapViewer'] ? " placeholder='{$xx['evt_address_button']}'" : ''; echo "\n"; echo "\n\n"; } //category always required echo "\n\n\n"; } $hidden = ($ald or $ntm) ? " style='visibility:hidden;'" : ''; echo "\n\n"; if (!$cat['fur']) { //no fixed event duration $hide = !$usr['mEvts'] ? " class='hidden'" : ''; echo "\n"; echo ""; echo "\n"; } if ($usr['rEvts']) { //repeating allowed echo "\n"; } echo "
{$xx['evt_title']}: \n"; if ($usr['ID'] > 1 and $usr['pEvts'] and ($set['privEvents'] == 1 or $set['privEvents'] == 2)) { //logged in - private allowed $checked = ($pri or ($set['privEvents'] == 2 and $state =='add' and !$eMsg)) ? " checked" : ''; echo ""; } echo "
{$xx['evt_venue']}:\n"; if ($set['venueInput'] == 0) { echo ""; } elseif ($set['venueInput'] == 1) { echo ""; } else { //2 if ($vel) { $hide1 = " class='hide'"; $hide2 = ''; $name1 = ''; $name2 = 'ven'; } else { $hide1 = ''; $hide2 = " class='hide'"; $name1 = 'ven'; $name2 = ''; } echo ""; echo ""; } echo "
{$xx['evt_category']}:"; catMenu($cid); if (!empty($cat['sub'])) { echo " {$xx['evt_subcategory']}: "; scatMenu($sid); echo "
{$xx['evt_start_date']}: 📅🕒"; if (!$cat['fur']) { //no fixed event duration echo " "; } echo "
{$xx['evt_end_date']}: 📅\n"; echo " 🕒"; echo " "; echo "
{$repTxt}".(!$cat['rpt'] ? " " : '')."
\n"; if ($set['evtWinSmall']) { //reduced Event window echo "
".($eExt ? '▲' : '▼')."
\n"; } else { echo "
\n"; } $display = $eExt ? 'block' : 'none'; echo "
\n"; echo "\n"; if (strpos($evtTemplTot,'3') !== false) { $descrHelp = $xx['evt_descr_help']; if ($set['showImgInMV']) { $descrHelp .= '
'.$xx['evt_descr_help_img']; } $descrHelp .= '
'.$xx['evt_descr_help_eml'].'
'.$xx['evt_descr_help_url']; echo "\n"; if (!trim($des) and is_file("files/descriptions.txt")) { if (preg_match("~<{$cid}>(.+?)(?:<\d\d?>|$)~s",file_get_contents('files/descriptions.txt'),$match)) { $des = trim($match[1],"\n\r"); } } echo "\n\n"; } if (strpos($evtTemplTot,'4') !== false and $usr['privs'] >= $set['xField1Rights']) { echo "\n\n\n"; } if (strpos($evtTemplTot,'5') !== false and $usr['privs'] >= $set['xField2Rights']) { echo "\n\n\n"; } if ($att) { $label = $xx['evt_attachments'].':'; foreach(explode(';',trim($att,';')) as $attachment) { echo "\n\n\n"; $label = ''; } } if ($usr['upload']) { //may upload echo "\n\n\n"; } if ($set['emlService'] or $set['tlgService'] or $set['smsService'] and (!$cat['app'] or $apd)) { echo "\n\n\n"; echo "\n\n\n"; $notHelp = $xx['evt_not_help']; echo "\n\n\n"; } if (strpos($evtTemplTot,'7') !== false) { echo "\n\n\n"; echo "\n\n\n\n\n\n"; } echo "
{$xx['evt_description']}:

(?)
".($set['xField1Label'] ? $set['xField1Label'] : $xx['sch_extra_field1']).":
".($set['xField2Label'] ? $set['xField2Label'] : $xx['sch_extra_field2']).":
{$label} ❌ ".substr($attachment,14)."
{$xx['evt_attach_file']}: ({$xx['max']} {$set['maxUplSize']} MB)

{$xx['evt_notification']}:"; echo " "; echo " {$xx['evt_days_before_event']}
{$xx['evt_to']}: (?)

{$xx['evt_added']}:".IDTtoDDT($_SESSION['evt']['adt'])." {$xx['by']} "; if ($usr['privs'] > 3) { //manager or admin echo "\n"; } else { echo $_SESSION['evt']['own']; } if ($_SESSION['evt']['mdt'] and $_SESSION['evt']['edr']) { echo "
{$xx['evt_edited']}:".IDTtoDDT($_SESSION['evt']['mdt'])." {$xx['by']} {$_SESSION['evt']['edr']}"; } echo "
\n"; echo "
\n"; if ($usr['rEvts'] and !$cat['rpt']) { //make repeat box $untilChecked = $todo ? " ({$xx['evt_until_checked']})" : ''; echo "
{$xx['evt_set_repeat']}



\n"; echo " {$xx['of']} "; echo "

{$xx['evt_until']} 📅 ({$xx['evt_blank_no_end']})

\n"; } echo "
\n"; echo "
\n"; if ($state[0] == 'a') { //add echo ""; } else { //edit echo "\n"; if ($set['evtDelButton'] == 1 or ($set['evtDelButton'] == 2 and $usr['privs'] > 3)) { echo " \n"; } } echo " 
\n"; ?>