87 lines
1.8 KiB
PHP
87 lines
1.8 KiB
PHP
<?php
|
|
class DashboardController extends Zend_Controller_Action
|
|
{
|
|
public function init()
|
|
{
|
|
require_once 'Scores/WsScores.php';
|
|
}
|
|
|
|
/**
|
|
* Affichage des différents liens d'administration
|
|
*/
|
|
public function indexAction(){}
|
|
|
|
/**
|
|
* Gestion des commandes de l'extranet
|
|
* Type : greffes | kbis | graydon | giant
|
|
*/
|
|
public function commandesAction()
|
|
{
|
|
|
|
}
|
|
|
|
/**
|
|
* Génération automatique du courrier PDF / ODT
|
|
*/
|
|
public function courrierAction()
|
|
{
|
|
|
|
|
|
}
|
|
|
|
/**
|
|
* Liste les clients
|
|
*/
|
|
public function clientsAction()
|
|
{
|
|
$this->view->headScript()->appendFile('/themes/default/scripts/dashboard.js', 'text/javascript');
|
|
|
|
$idClient = 0; // On veut tous les clients
|
|
$ws = new WsScores();
|
|
$reponse = $ws->getListeClients($idClient);
|
|
$listeClients = $reponse->result->item;
|
|
|
|
$reponse = $ws->getListeDroits();
|
|
$wsdroits = $reponse->item;
|
|
|
|
$this->view->assign('ListeClients', $listeClients);
|
|
$this->view->assign('wsdroits', $wsdroits);
|
|
}
|
|
|
|
/**
|
|
* Edition ou création d'un nouveau client
|
|
*/
|
|
public function clientAction()
|
|
{
|
|
$request = $this->getRequest();
|
|
$idClient = $request->getParam('idClient', 0);
|
|
|
|
$titre = 'CREATION NOUVEAU CLIENT';
|
|
$submitValue = 'Créer le client';
|
|
if ($idClient!=0){
|
|
$ws = new WsScores();
|
|
$reponse = $ws->getListeClients($idClient);
|
|
$InfosClient = $reponse->result->item;
|
|
$titre = 'EDITION CLIENT';
|
|
$submitValue = 'Modifier le client';
|
|
}
|
|
$reponse = $ws->getListeDroits();
|
|
$wsdroits = $reponse->item;
|
|
|
|
$this->view->assign('idClient', $idClient);
|
|
$this->view->assign('InfosClient', $InfosClient);
|
|
$this->view->assign('titre', $titre);
|
|
$this->view->assign('submitValue', $submitValue);
|
|
$this->view->assign('wsdroits', $wsdroits);
|
|
}
|
|
|
|
/**
|
|
* Enregistre les informations sur le client
|
|
*/
|
|
public function clientsaveAction()
|
|
{
|
|
|
|
}
|
|
|
|
|
|
} |