Example #1
0
echo MenuTranslate::getLabel(HOME);
?>
</a>
	</li>
	<li>
		<a href="<?php 
echo Router::generateURL('cockpit/tip');
?>
"><?php 
echo TipTranslate::getLabel("title");
?>
</a>
	</li>
	<li class="active">
		<?php 
echo TipTranslate::getLabel(ADD);
?>
	</li>
</ol>

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

<form action="<?php 
echo Router::generateURL('cockpit/tip/add');
?>
" method="post" class="form-horizontal">
	<?php 
echo $this->FormField->hidden('creation');
?>
Example #2
0
	<?php 
echo $this->FormField->hidden('id');
?>
	<?php 
echo $this->FormField->hidden('updated');
?>
	<?php 
echo $this->FormField->hidden('updater');
?>
	<?php 
echo $this->FormField->hidden('logicaldelete');
?>
	<div class="panel panel-warning">
		<div class="panel-heading">
			<h3 class="panel-title"><span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span> <?php 
echo TipTranslate::getLabel(UPDATE);
?>
</h3>
		</div>
		<div class="panel-body">
			<?php 
echo $this->FormField->text('name', false, 'form-control');
?>
			<?php 
echo $this->FormField->slug('slug', false, 'form-control');
?>
			<?php 
echo $this->FormField->date('publication', 'form-control');
?>
			<?php 
echo $this->FormField->lookup('image_path');
Example #3
0
<?php

$title_for_layout = TipTranslate::getLabel("title");
?>

<div id="conseil">
	<div id="Scrollbar-Container">
		<img src="<?php 
echo Router::webroot('utils/img/up_arrow.gif');
?>
" class="Scrollbar-Up" />
		<div class="Scrollbar-Track">
			<img src="<?php 
echo Router::webroot('utils/img/scrollbar_handle.gif');
?>
" class="Scrollbar-Handle" />
		</div>
		<img src="<?php 
echo Router::webroot('utils/img/down_arrow.gif');
?>
" class="Scrollbar-Down" />
	</div>

	<div id="element" style="position:absolute; top:0;">
		<?php 
foreach ($Tip as $k => $v) {
    ?>
            <div class="img">
				<?php 
    if (!empty($v->image_path)) {
        echo '<img src="' . Router::webroot($v->image_path) . '" alt="Pharmacie Renard-Thauvin - ' . $v->name . '" />';
Example #4
0
	</li>
	<li class="active">
		<?php 
echo TipTranslate::getLabel('list');
?>
	</li>
</ol>

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

<div class="alert alert-primary">
	<button type="button" class="close" data-dismiss="alert">&times;</button>
	<?php 
echo TipTranslate::getLabel(SEARCH);
?>
</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="tipdata">
			<thead>
			<tr>
				<th style="width:8%;"><?php 
Example #5
0
	<?php 
echo $this->FormField->hidden('id');
?>
    <?php 
echo $this->FormField->hidden('updated');
?>
    <?php 
echo $this->FormField->hidden('updater');
?>
    <?php 
echo $this->FormField->hidden('online');
?>
	<div class="panel panel-danger">
		<div class="panel-heading">
			<h3 class="panel-title"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> <?php 
echo TipTranslate::getLabel(DELETE);
?>
</h3>
		</div>
		<div class="panel-body">
			<?php 
echo $this->FormField->text('name', true, 'form-control');
?>
			<?php 
echo $this->FormField->number('phone', true, 'form-control');
?>
			<?php 
echo $this->FormField->text('information', true, 'form-control');
?>
			<?php 
echo $this->FormField->checkBox('online', true);
Example #6
0
 function online($id = null)
 {
     if ($id === null || !is_numeric($id)) {
         $this->redirect('cockpit/tip');
         return false;
     }
     $this->loadModel(TIP);
     $this->request->data = $this->Tip->findFirst(array('fields' => DBUtils::$tableExtend[TIP], 'conditions' => array('Tip.id' => $id)));
     $this->request->data->online = $this->request->data->online == 1 ? 0 : 1;
     $id = $this->Tip->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);
         return false;
     }
     if ($this->request->data->online == 1) {
         $this->logger->LogInfo($this->request->controller, $this->request->action, $_SESSION[USER]->login, TipTranslate::getLabel('onlineUpdated') . '/id:' . $id);
         $this->Session->setAlert(TipTranslate::getLabel('onlineUpdated'), SUCCESS);
     } else {
         $this->logger->LogInfo($this->request->controller, $this->request->action, $_SESSION[USER]->login, TipTranslate::getLabel('offlineUpdated') . '/id:' . $id);
         $this->Session->setAlert(TipTranslate::getLabel('offlineUpdated'), SUCCESS);
     }
     $this->redirect('cockpit/tip');
 }
Example #7
0
	</li>
	<li class="active">
		<?php 
echo TipTranslate::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 TipTranslate::getLabel(CONSULT);
?>
</h3>
		</div>
		<div class="panel-body">
			<?php 
if ($this->Session->user('category') == 3) {
    ?>
				<?php 
    if ($this->request->data->logicaldelete == 1) {
        echo $this->FormField->text('logicaldelete', true, 'form-control');
    }
    ?>
				<?php 
    echo $this->FormField->text('creation', true, 'form-control');
    ?>