コード例 #1
0
ファイル: adminpage.php プロジェクト: poojakanchan/TableMe
$restaurantArray;
$reviewArray;
$restaurant;
$user;
$admin;
if (!isset($_SESSION['username'])) {
    header('location: ../home/login.php');
}
if (!isset($restaurant)) {
    $restaurant = new Restaurant_model();
}
if (!isset($user)) {
    $user = new User_model();
}
if (!isset($admin)) {
    $admin = new Admin_model();
}
if (!isset($adminController)) {
    $adminController = new Admin_controller();
}
$restaurantNewArray = $admin->getNewRestaurants();
$restaurantArray = $admin->getAllRestaurants();
$userArray = $admin->getAllUsers();
$reviewArray = $admin->getFlaggedReviews();
$profile = $admin->getAdminProfile($_SESSION['username']);
if ($_POST) {
    $adminController->submit();
}
?>
    <br><br><br>
    <div class="container">
コード例 #2
0
<section id="main" class="column">
	<article class="module width_full">
		<header><h3 class="tabs_involved">Пакетная смена тарифного плана</h3>
		</header>
		<div class="module_content">
			<fieldset>
				<label>Услуги</label>

				<?php 
$service = new Admin_model();
foreach ($service->getServiceType() as $row) {
    $a['NULL'] = 'Выберите услугу';
    $a[$row->marker] = $row->service_description;
}
echo form_dropdown('serviceList', $a, '', 'id="services" onchange="selectRegion();return false;" style="float:left;"');
?>
			</fieldset>
			<fieldset>
				<label>Список номенклатуры</label>
			<div name="selectAssortmentList" style="float:left;"></div>
			</fieldset>
			<fieldset>
				<label>Список тарифов</label>
			<div name="selectTariffs" style="float:left;"></div>
			</fieldset>
			<fieldset style="width:48%; float:left; margin-right: 3%;"> <!-- to make two field float next to one another, adjust values accordingly -->
				<label for="date">Дата начала действия</label>
				<input type="text" name="date_change_tariff" id="date_change_tariff" style="width:92%;">
			</fieldset>
			<fieldset style="width:48%; float:left;"> <!-- to make two field float next to one another, adjust values accordingly -->
				<label>Новый тарифный план</label>
コード例 #3
0
ファイル: profesor.php プロジェクト: jbgae/novamusica
 public function iniciarSesion()
 {
     $this->pagina = 'login';
     $this->titulo = 'Iniciar sesión';
     $this->estilo = 'login';
     $this->javascript = '';
     $datos['backend'] = TRUE;
     $datos['imagen'] = $this->captcha_model->crear_captcha();
     $datos['boton'] = array('name' => 'button', 'id' => 'boton_sesion', 'value' => 'Enviar', 'class' => 'btn btn-primary');
     $datos['formulario'] = array('email' => array('label' => array('accesskey' => 'E', 'name' => '<u>E</u>mail'), 'input' => array('class' => 'email form-control', 'name' => 'email', 'id' => 'email', 'maxlength' => '50', 'size' => '20', 'value' => $this->input->post('email'), 'autofocus' => 'autofocus')), 'password' => array('label' => array('accesskey' => 'D', 'name' => 'Passwor<u>d</u>'), 'input' => array('class' => 'password form-control', 'name' => 'pass', 'id' => 'pass', 'maxlength' => '20', 'size' => '20', 'autocomplete' => 'off')), 'captcha' => array('label' => array('accesskey' => 'D', 'name' => 'Captc<u>h</u>a'), 'input' => array('class' => 'captcha form-control', 'name' => 'captcha', 'id' => 'captcha', 'maxlength' => '20', 'size' => '20', 'autocomplete' => 'off')));
     if ($this->_validarSesion()) {
         $profesor = new Profesor_model();
         $cod = $profesor->codigo($this->input->post('email'));
         $profesor->datos($cod);
         $ultimoAcceso = $profesor->fechaUltimoAcceso();
         $act = array('NumeroIntentos' => 0, 'FechaUltimoAcceso' => date('Y/m/d H:i:s'));
         $profesor->actualizar($cod, $act);
         $datosProfesor = array('codigo' => $cod, 'nombre' => $profesor->nombre(), 'apellidos' => $profesor->apellido1() . ' ' . $profesor->apellido2(), 'email' => $profesor->email(), 'usuario' => $profesor->tipo(), 'ultimoAcceso' => $ultimoAcceso, 'logged_in' => TRUE);
         $this->session->set_userdata($datosProfesor);
         if (Admin_model::existe($profesor->codigo($this->input->post('email')))) {
             redirect("admin/novedades");
         } else {
             redirect("profesor/novedades");
         }
     }
     $this->mostrar($datos);
 }