function show() { if (!$this->check_right('ExhibitionAdmin')) { return Html::h(2, 'Dazu haben Sie kein Recht!'); } $this->return .= $this->obere_navi(); if (preg_match('/Scan$/', SELF)) { $this->return .= $this->scan(); } if (preg_match('/Upload$/', SELF)) { $this->return .= $this->upload(); } if (preg_match('/Rooms$/', SELF)) { include_once INSTALL_PATH . '/Module/RheinaufExhibition/Backend/rooms.php'; $rooms = new rooms($this->scaff, $this->connection, $this->path_information); $this->return .= $GLOBALS['backchannel']; $this->return .= $rooms->show(); } if (preg_match('/Exhibitions$/', SELF)) { include_once INSTALL_PATH . '/Module/RheinaufExhibition/Backend/exhibitions.php'; $instance = new exhibitions($this->scaff, $this->connection, $this->path_information); $this->return .= $GLOBALS['backchannel']; $this->return .= $instance->show(); } if (preg_match('/Pictures$/', SELF)) { include_once INSTALL_PATH . '/Module/RheinaufExhibition/Backend/pictures.php'; $instance = new pictures($this->scaff, $this->connection, $this->path_information); return $this->return .= $instance->show(); } if (preg_match('/Locations$/', SELF)) { include_once INSTALL_PATH . '/Module/RheinaufExhibition/Backend/LocationsBackend.php'; $instance = new LocationsBackend($this->connection, $this->path_information); return $this->return .= $instance->show(); } if (preg_match('/BildDesMonats$/', SELF)) { include_once INSTALL_PATH . '/Module/RheinaufExhibition/Backend/bdm.php'; $instance = new bdm($this->scaff, $this->connection, $this->path_information); return $this->return .= $instance->show(); } return $this->return; }
<?php require_once "./includes/initialize.php"; if (isset($_POST['submit'])) { $bdm = bdm::find(); $date = date('y-m-d', strtotime($_POST['date1'])); $date1 = date('y-m-d', strtotime($_POST['date2'])); error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE); date_default_timezone_set('Europe/London'); if (PHP_SAPI == 'cli') { die('This example should only be run from a Web Browser'); } /** Include PHPExcel */ // Create new PHPExcel object $objPHPExcel = new PHPExcel(); // Set document properties $objPHPExcel->getProperties()->setCreator("Maarten Balliauw")->setLastModifiedBy("Maarten Balliauw")->setTitle("Office 2007 XLSX Test Document")->setSubject("Office 2007 XLSX Test Document")->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")->setKeywords("office 2007 openxml php")->setCategory("Test result file"); $i = 2; $col_index = array('E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'); $objPHPExcel->setActiveSheetIndex(0)->setCellValue('A1', 'BDM NAME')->setCellValue('B1', 'ZONE')->setCellValue('C1', 'ASM NAME')->setCellValue('D1', 'ZSM NAME'); if (!empty($bdm)) { foreach ($bdm as $bdms) { $total = ho::list_rx($date, $date1, $bdms->bdm_id); $objPHPExcel->setActiveSheetIndex(0)->setCellValue('A' . $i, $bdms->bdm_name)->setCellValue('B' . $i, $bdms->zone)->setCellValue('C' . $i, $bdms->asm_name)->setCellValue('D' . $i, $bdms->zsm_name); $j = 0; foreach ($total as $value) { $objPHPExcel->setActiveSheetIndex(0)->setCellValue($col_index[$j] . '1', $value->mydate)->setCellValue($col_index[$j] . $i, $value->rx_count); $j++; }
} elseif ($value->zone == 'North') { $northname = 'North'; $north = $north + $value->rxcount; $northDoctorCount++; } elseif ($value->zone == 'Central') { $centralname = 'Central'; $central = $central + $value->rxcount; $centralDoctorCount++; } } $allrx = $east + $south + $west + $north + $central; $allindiacount = $eastDoctorCount + $southDoctorCount + $westDoctorCount + $northDoctorCount + $centralDoctorCount; $pob = pob::live_pob(); $top_bdm = bdm::top_bdm(); $top_asm = bdm::top_asm(); $top_zsm = bdm::top_zsm(); // $total=array($pob,$rx); ?> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>Tv</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="Fullscreen Slit Slider with CSS3 and jQuery" /> <meta name="keywords" content="slit slider, plugin, css3, transitions, jquery, fullscreen, autoplay" /> <meta name="author" content="Codrops" /> <link rel="shortcut icon" href="../favicon.ico"> <link rel="stylesheet" type="text/css" href="css/demo.css" /> <link rel="stylesheet" type="text/css" href="css/style.css" />
<option value ="<?php echo $value->HQ; ?> "><?php echo $value->HQ; ?> </option>'; <?php } } } ?> <?php if (isset($_POST["terri"])) { $bdm = bdm::list_bdm($_POST["terri"]); ?> <option>Select Bdm</option> <?php if (!empty($bdm)) { foreach ($bdm as $BDM) { ?> <option value ="<?php echo $BDM->bdm_id; ?> "><?php echo $BDM->bdm_name; ?> </option>'; <?php
$northname = 'North'; $north = $north + $value->rxcount; $northDoctorCount++; } elseif ($value->zone == 'Central') { $centralname = 'Central'; $central = $central + $value->rxcount; $centralDoctorCount++; } } $allrx = $east + $south + $west + $north + $central; $allindiacount = $eastDoctorCount + $southDoctorCount + $westDoctorCount + $northDoctorCount + $centralDoctorCount; $pob = pob::live_pob(); $top_bdm = bdm::top_bdm(); $top_asm = bdm::top_asm(); $top_zsm = bdm::top_zsm(); $last = bdm::last_enteries(); // $total=array($pob,$rx); ?> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>Tv</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="Fullscreen Slit Slider with CSS3 and jQuery" /> <meta name="keywords" content="slit slider, plugin, css3, transitions, jquery, fullscreen, autoplay" /> <meta name="author" content="Codrops" /> <link rel="shortcut icon" href="../favicon.ico"> <link rel="stylesheet" type="text/css" href="css/demo.css" /> <link rel="stylesheet" type="text/css" href="css/style.css" />
<?php require_once "./includes/initialize.php"; session_start(); $zone = bdm::zone(); require_once './header.php'; ?> <div class="col-lg-10"> <div class="form-group"> <select id="zone" name="zone" class="form-control"> <option>Select Zone</option> <?php if (!empty($zone)) { foreach ($zone as $zones) { ?> <option><?php echo $zones->zone; ?> </option> <?php } } ?> </select> </div> </div>
<?php require_once "./includes/initialize.php"; $errors = array(); session_start(); if (isset($_POST['submit'])) { // Form has been submitted. $username = trim($_POST['username']); $password = trim($_POST['password']); // Check database to see if username/password exist. $found_bdm = bdm::authenticate($username, $password); $found_ho = ho::authenticate($username, $password); $found_task = task::auth($username, $password); if ($found_bdm) { $_SESSION['bdm'] = $found_bdm->bdm_id; $_SESSION['bdmname'] = $found_bdm->bdm_name; $_SESSION['bdmzone'] = $found_bdm->zone; redirect_to("dashboard.php"); } elseif ($found_ho) { // session_start(); $_SESSION['ho'] = $found_ho->id; redirect_to("dashboard.php"); } elseif ($found_task) { // session_start(); $_SESSION['taskforce'] = $found_task->tfid; $_SESSION['tfname'] = $found_task->name; $_SESSION['tfzone'] = $found_task->zone; redirect_to("dashboard.php"); } else { $message = "Incorrect Username/Password."; flashMessage($message, 'error');