Beispiel #1
0
    }
} elseif ($data['reservation']) {
    $reserved = false;
    if ($uid) {
        $result = $xoopsDB->query("SELECT * FROM " . RVTBL . " WHERE eid={$eid} AND exid={$exid} AND uid={$uid}");
        $reserved = $xoopsDB->getRowsNum($result) > 0;
    }
    if ($data['strict'] && $data['persons'] <= $data['reserved']) {
        $xoopsTpl->assign('message', _MD_RESERV_FULL);
    } elseif ($reserved) {
        $xoopsTpl->assign('message', _MD_RESERVED);
    } else {
        if (empty($_POST['email'])) {
            $_POST['email'] = '';
        }
        $form = eventform($data, $uid);
        $form['lang_email'] = preg_replace('/\\*$/', '', _MD_EMAIL);
        $form['member_only'] = $member_only;
        $xoopsTpl->assign('form', $form);
    }
}
// select users.uid
if (!$member_only && eguide_form_options('need_bind_uid', 0)) {
    $member_only = true;
}
if (param('op', '') == 'users' || $member_only && !$uid) {
    $xoopsOption['template_main'] = EGPREFIX . '_userssel.html';
    include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
    // search string
    $s = param('search', '');
    $cols = eguide_form_options('users_search_columns', 'uname,email');
Beispiel #2
0
    $id = '';
} else {
    $id = $_GET['id'];
}
if (!isset($_GET['catview'])) {
    $catview = 0;
} else {
    $catview = $_GET['catview'];
}
if (!isset($_GET['copyevent'])) {
    $copyevent = 0;
} else {
    $copyevent = $_GET['copyevent'];
}
if ($op == "eventform") {
    eventform($add_day, $add_month, $add_year, $id);
} else {
    if ($op == "upeventform") {
        edit($id);
    }
}
// Set max length for text area
echo "<script language='javascript' type='text/javascript'>\n";
echo "<!--\n";
echo "function imposeMaxLength(Object, MaxLen)\n";
echo "{\n";
echo "  if (Object.value.length >= MaxLen) Object.value = Object.value.substring(0, MaxLen-1); \n";
echo "   return (Object.value.length <= MaxLen) ;\n";
echo "}\n";
echo "-->\n";
echo "</script>\n";
Beispiel #3
0
     $views = array('edate', 'cdate', 'title', 'summary', 'body', 'persons', 'reserved', 'closetime', 'style', 'uid', 'counter', 'catid', 'catimg', 'catname');
     $event = array();
     if (empty($data['cdate'])) {
         $data['cdate'] = $now;
         $data['reserved'] = 0;
         $data['counter'] = 0;
         $data['uid'] = $uid;
         $data['catid'] = 1;
     }
     $result = $xoopsDB->query('SELECT catname, catimg FROM ' . CATBL . ' WHERE catid=' . $data['topicid']);
     list($data['catname'], $data['catimg']) = $xoopsDB->fetchRow($result);
     foreach ($views as $name) {
         $event[$name] = $data[$name];
     }
     edit_eventdata($event);
     $form = eventform($data);
     $form['submit_opts'] = 'disabled';
     $xoopsTpl->assign('form', $form);
     $xoopsTpl->assign('event', $event);
 } else {
     $xoopsTpl->assign('event', '');
 }
 $input_status = $adm ? select_list('status', $ev_stats, $data['status']) : '';
 if (empty($data['before'])) {
     $data['before'] = time_to_str($data['closetime']);
 }
 edit_eventdata($data);
 $data['optfield'] = htmlspecialchars($data['optfield']);
 $xoopsTpl->assign($data);
 class myFormDhtmlTextArea extends XoopsFormDhtmlTextArea
 {
Beispiel #4
0
        $xoopsTpl->assign('message', _MD_RESERV_NEEDLOGIN);
    } else {
        $ok = true;
        if ($xoopsModuleConfig['use_plugins']) {
            include_once 'plugins.php';
            foreach ($hooked_function['check'] as $func) {
                $ok = $func($eid, $exid, $data['uid']);
                if (!$ok) {
                    break;
                }
            }
        }
        if ($reserved) {
            $xoopsTpl->assign('message', _MD_RESERVED);
        } elseif ($ok) {
            $xoopsTpl->assign('form', eventform($data, 0));
        }
    }
}
$xoopsTpl->assign(make_lists($data));
if ($op == "print") {
    $xoopsOption['template_main'] = EGPREFIX . '_event_print.html';
    $xoopsTpl->assign('lang_comefrom', sprintf(_MD_THISCOMESFROM, $xoopsConfig['sitename']));
    $xoopsTpl->display('db:' . EGPREFIX . '_event_print.html');
    exit;
}
if ($xoopsModuleConfig['use_comment']) {
    include XOOPS_ROOT_PATH . '/include/comment_view.php';
}
include XOOPS_ROOT_PATH . '/footer.php';
function make_lists($data)
Beispiel #5
0
     if (!isset($_GET['add_month'])) {
         $add_month = '';
     } else {
         $add_month = $_GET['add_month'];
     }
     if (!isset($_GET['add_year'])) {
         $add_year = '';
     } else {
         $add_year = $_GET['add_year'];
     }
     if (!isset($_GET['id'])) {
         $id = '';
     } else {
         $id = $_GET['id'];
     }
     eventform($add_day, $add_month, $add_year, $id, $history);
     break;
     // add event
 // add event
 case "addevent":
     if ($notimeentry == 0) {
         if ($time12hour == 1) {
             addevent($title, $description, $url, $email, $cat, $repeat, $bday, $bmonth, $byear, $rday, $rtimes, $starttimehr, $starttimemin, $endtimehr, $endtimemin, $startperiod, $endperiod, $history);
         } else {
             addevent($title, $description, $url, $email, $cat, $repeat, $bday, $bmonth, $byear, $rday, $rtimes, $starttimehr, $starttimemin, $endtimehr, $endtimemin, "--", "--", $history);
         }
     } else {
         addevent($title, $description, $email, $url, $cat, $repeat, $bday, $bmonth, $byear, $rday, $rtimes, "--", "--", "--", "--", "am", "am", $history);
     }
     break;
     // view details of event