Exemplo n.º 1
0
echo DashboardTranslate::getLabel('list');
?>
	</li>
</ol>

<div class="alert alert-primary alert-dismissible" role="alert">
	<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
	<?php 
echo DashboardTranslate::getLabel('helpSearch');
?>
</div>

<div class="panel panel-primary">
	<div class="panel-heading">
		<h3 class="panel-title"><span class="glyphicon glyphicon-list" aria-hidden="true"></span> <?php 
echo UserTranslate::getLabel('list');
?>
</h3>
	</div>
	<div class="panel-body">
		<table class="table table-hover table-bordered" id="helpData">
			<thead>
			<tr>
				<th><?php 
echo DashboardTranslate::getLabel('document');
?>
</th>
				<th style="width:15%;"></th>
			</tr>
			</thead>
			<tbody>
Exemplo n.º 2
0
echo Router::generateURL('cockpit/user/delete/' . $id);
?>
" method="post" class="form-horizontal">
	<?php 
echo $this->FormField->hidden('id');
?>
    <?php 
echo $this->FormField->hidden('updated');
?>
    <?php 
echo $this->FormField->hidden('updater');
?>
	<div class="panel panel-danger">
		<div class="panel-heading">
			<h3 class="panel-title"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> <?php 
echo UserTranslate::getLabel(DELETE);
?>
</h3>
		</div>
		<div class="panel-body">
			<?php 
if ($this->request->data->logicaldelete == 1) {
    echo $this->FormField->text('logicaldelete', true, 'form-control');
}
?>
			<?php 
echo $this->FormField->text('creation', true, 'form-control');
?>
			<?php 
echo $this->FormField->text('updated', true, 'form-control');
?>
Exemplo n.º 3
0
echo $this->FormField->hidden('creation');
?>
	<?php 
echo $this->FormField->hidden('updated');
?>
	<?php 
echo $this->FormField->hidden('updater');
?>
	<?php 
echo $this->FormField->hidden('logicaldelete');
?>

	<div class="panel panel-info">
		<div class="panel-heading">
			<h3 class="panel-title"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> <?php 
echo UserTranslate::getLabel(ADD);
?>
</h3>
		</div>
		<div class="panel-body">
			<?php 
echo $this->FormField->text('name', false, 'form-control');
?>
            <?php 
echo $this->FormField->text('function', false);
?>
			<?php 
echo $this->FormField->lookup('image_path');
?>
			<?php 
echo $this->FormField->checkBox('online', false);
Exemplo n.º 4
0
?>
	</li>
</ol>

<?php 
echo $this->Session->getAlert();
?>

<form action="<?php 
echo Router::generateURL('cockpit/user/changePasswordIn');
?>
" method="post" class="form-horizontal">
	<div class="panel panel-warning">
		<div class="panel-heading">
			<h3 class="panel-title"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span> <?php 
echo UserTranslate::getLabel('changePwd');
?>
</h3>
		</div>
		<div class="panel-body">
			<?php 
echo $this->FormField->password('newpassword', false, 'form-control');
?>
			<?php 
echo $this->FormField->password('verifypassword', false, 'form-control');
?>
		</div>
		<div class="panel-footer text-right">
			<?php 
echo $this->FormSubmit->update();
?>
Exemplo n.º 5
0
<?php

$title_for_layout = UserTranslate::getLabel('title');
?>
<div class="text-center">
	<div class="page-header text-center">
		<h4><?php 
echo UserTranslate::getLabel('title');
?>
</h4>
	</div>

	<form action="<?php 
echo Router::generateURL('user/login');
?>
" method="post" class="form-horizontal">
		<?php 
echo $this->FormField->textPlaceHolder('login');
?>
		<?php 
echo $this->FormField->passwordPlaceHolder('password');
?>

		<?php 
echo $this->Session->getAlert();
?>

		<div class="form-groups">
			<button type="submit" class="btn btn-success btn-sm"><span class="glyphicon glyphicon-lock" aria-hidden="true"></span> <?php 
echo ButtonsTranslate::getLabel('connect');
?>
Exemplo n.º 6
0
 function logout()
 {
     $this->loadModel(USER);
     $user = $_SESSION[USER];
     $user->online = 0;
     $this->User->save($user);
     $this->logger->LogInfo($this->request->controller, $this->request->action, $_SESSION[USER]->login, UserTranslate::getLabel('logout'));
     unset($_SESSION[USER]);
     $this->redirect('');
 }
Exemplo n.º 7
0
    </li>
    <li class="active">
        <?php 
echo UserTranslate::getLabel(CONSULT);
?>
    </li>
</ol>

<form action="" method="post" class="form-horizontal">
	<?php 
echo $this->FormField->hidden('id');
?>
	<div class="panel panel-success">
		<div class="panel-heading">
			<h3 class="panel-title"><span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span> <?php 
echo UserTranslate::getLabel(CONSULT);
?>
</h3>
		</div>
		<div class="panel-body">
			<?php 
if ($this->request->data->logicaldelete == 1) {
    echo $this->FormField->text('logicaldelete', true, 'form-control');
}
?>
			<?php 
echo $this->FormField->text('creation', true, 'form-control');
?>
			<?php 
echo $this->FormField->text('updated', true, 'form-control');
?>
Exemplo n.º 8
0
 function delete($id = null)
 {
     $this->permission(3);
     if ($id === null || !is_numeric($id)) {
         $this->redirect('cockpit/user');
         return false;
     }
     $this->loadModel(USER);
     $d['id'] = $id;
     $this->set($d);
     if ($this->request->data) {
         $this->request->data->logicaldelete = 1;
         $id = $this->User->save($this->request->data);
         if (!is_numeric($id)) {
             $this->logger->LogError($this->request->controller, $this->request->action, $_SESSION[USER]->login, ErrorsTranslate::getLabel(DB) . '/id:' . $id);
             $this->Session->setAlert(ErrorsTranslate::getLabel(DB) . $id, DANGER);
             $this->redirect('cockpit/user');
             return false;
         }
         $this->logger->LogInfo($this->request->controller, $this->request->action, $_SESSION[USER]->login, UserTranslate::getLabel('deleted') . '/id:' . $id);
         $this->Session->setAlert(UserTranslate::getLabel('deleted'), SUCCESS);
         $this->redirect('cockpit/user');
     } else {
         $this->request->data = $this->User->findFirst(array('fields' => DBUtils::$table[USER] . ', UserRole.category', 'conditions' => array('User.id' => $id), 'join' => array('userrole as UserRole' => 'UserRole.id=User.category')));
     }
 }