예제 #1
0
      <div class="row">
        <div class="col-sm-3 col-md-2 sidebar panel" style="margin-bottom:0px;">
          <ul class="nav nav-sidebar">
            <li><a href="/Views/User/dashboard.php">Overview <span class="sr-only">(current)</span></a></li>
            <li><a href="/Views/User/profile.php">Profile</a></li>
            <li><a href="/Views/Friends/manager.php">Friends</a></li>
            <li><a href="/Views/Groups/manager.php">Groups</a></li>
            <li class="active"><a href="/Views/Events/manager.php">Events</a></li>
          </ul>
          <ul class="nav nav-sidebar">
            <li><a href="/Views/Business/manager.php">Buisness</a></li>
          </ul>
        </div>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
          <?php 
$results = $events->getEvent();
// Edit only for admin
$adminCheck = $events->isAdmin();
echo "<script>console.log('isAdmin: " . json_encode($adminCheck) . "');</script>";
if ($adminCheck) {
    echo '<div class="row">';
    echo '<div class="col-md-12"><a class="btn btn-info btn-raised" style="float: right;" data-toggle="modal" data-dismiss="modal" data-target="#EditE">Edit Event</a></div>';
    echo '</div>';
}
?>
          
            <div class="row placeholders panel panel-primary" style="margin-top:15px;">
              <div class="panel-body">
              <!-- <div class="" style="margin-bottom:20px;"></div> -->
              <div class="col-xs-6 col-sm-3 placeholder" style="margin:40px 0px; border-right: solid 2px gainsboro;">
                <?php 
예제 #2
0
파일: events.php 프로젝트: hughnguy/php
//============================================================================================
// Load the page requested by the user
//============================================================================================
if (!isset($_GET['page'])) {
    $render = true;
    $thisPage = 'events';
    // Get fiscal year for the dropdown menu
    $fiscalYears = \Ventus\Utilities\Functions::calcFiscalYearDate(date("Y-m-d"), 5);
    // Fetch events depend on what user has chosen from the fiscal dropdown menu
    $fiscal = $_GET['fiscal'];
    $event = array();
    if ($fiscal === null || $fiscal === 'current-fiscal-year') {
        $fiscalDates = \Ventus\Utilities\Functions::calcFiscalYearDate();
        $events = $model->getFiscalYearEvent($fiscalDates[0]['start_date']->format(DATETIME_MYSQL), $fiscalDates[0]['end_date']->format(DATETIME_MYSQL));
    } elseif ($fiscal === 'no-fiscal-year-filter') {
        $events = $model->getEvent();
    } else {
        $fiscalDates = \Ventus\Utilities\Functions::calcFiscalYearDate($fiscal . '-' . FISCAL_START_DATE, 1);
        $events = $model->getFiscalYearEvent($fiscalDates[0]['start_date']->format(DATETIME_MYSQL), $fiscalDates[0]['end_date']->format(DATETIME_MYSQL));
    }
    if (is_array($events)) {
        foreach ($events as $e) {
            $e['total_registered'] = $model->countEmployer((int) $e['id']);
            $event[] = $e;
        }
    }
    $services = $serviceModel->getService();
    $l10n->addResource(__DIR__ . '/l10n/events.json');
    $l10n->localizeArray($services, 'name');
    $l10n->localizeArray($event, 'name');
    $l10n->localizeArray($event, 'location');
<?php

if ($eventId == 'new') {
    $eventInsert = new EventInsert();
    $event = new Event();
} else {
    $eventUpdate = new EventUpdate($eventId);
    $events = new Events('single', $eventId);
    $event = new Event($events->getEvent());
}
$eventDelete = new EventDelete($event);
?>

<form enctype="multipart/form-data" class="box events" method="post" action="<?php 
echo BASEPATH . DS . $page . DS . $tab . DS . $eventId;
?>
" name="eventform">
	<ul class="layout">
		<li>
			<label for="event_date">Datum: </label>
			<input id="event_date" class="event_input" type="hidden" value="<?php 
echo $event->getDate('mysql');
?>
" name="date" required />
			<div id="date_picker"></div>
		</li>
		<li>
			<label for="event_time">Einlass:</label>
			<input id="event_time" class="event_input" type="text" value="<?php 
echo $event->getTime();
?>
예제 #4
0
 protected function geteventmessage()
 {
     global $user;
     global $objPDO;
     $student = new student($objPDO, $user->getuserId());
     $headMenu = array("username" => $student->getName());
     if ($user->checkAdmin() == true || $student->checkTeacher() || $student->checkStudent()) {
         $role = $student->getacctType();
         include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/events_class.php';
         $id = 1;
         if (isset($_GET['uid'])) {
             $id = $_GET['uid'];
         }
         $event = new Events($objPDO, $id);
         $event_info['name'] = $event->getEvent();
         $event_info['description'] = $event->getDescription();
         $event_info['date'] = $event->getDate();
         $event_info['type'] = $event->getType();
         $events_type = array('1' => 'holiday.png', '2' => 'fees.png', '3' => 'function.png', '4' => 'test.png');
         include $_SERVER['DOCUMENT_ROOT'] . '/cloud/view/events_info.php';
     } else {
         header('Location:http://localhost/cloud');
     }
 }
예제 #5
0
파일: invoices.php 프로젝트: hughnguy/php
        $invoices = $model->getInvoice(null, $fiscalDates[0]['start_date']->format(DATETIME_MYSQL), $fiscalDates[0]['end_date']->format(DATETIME_MYSQL));
    } elseif ($fiscal === 'no-fiscal-year-filter') {
        $invoices = $model->getInvoice();
    } else {
        $fiscalDates = \Ventus\Utilities\Functions::calcFiscalYearDate($fiscal . '-' . FISCAL_START_DATE, 1);
        $invoices = $model->getInvoice(null, $fiscalDates[0]['start_date']->format(DATETIME_MYSQL), $fiscalDates[0]['end_date']->format(DATETIME_MYSQL));
    }
    $thisPage = 'invoices';
    $invoiceSummary = $model->getInvoiceSummary();
    $l10n->addResource(__DIR__ . '/l10n/invoices.json');
    $l10n->localizeArray($invoices, 'org_name');
    $l10n->localizeArray($invoices, 'event_name');
    $viewFile = 'views/invoices.php';
} elseif ($_GET['page'] === "get-events") {
    header('Content-Type: application/json; charset=utf-8');
    echo json_encode($eventModel->getEvent());
    exit;
} elseif ($_GET['page'] === "get-employers") {
    header('Content-Type: application/json; charset=utf-8');
    echo json_encode($eventModel->getEventRegistrationEvent($_POST['id']));
    exit;
} elseif ($_GET['page'] === "get-billing-contacts") {
    header('Content-Type: application/json; charset=utf-8');
    echo json_encode($employerModel->getBillingContact($_GET['id']));
    exit;
} elseif ($_GET['page'] === "download-invoice" || $_GET['page'] === "preview-invoice") {
    $result = $model->getInvoice($_GET['id']);
    $row = $result[0];
    if ($row['issued']) {
        // get latest invoice
        $issued_invoices = $model->getIssuedInvoices($row['id']);