Merge from 2.5
This commit is contained in:
parent
4952654041
commit
e0095d5d63
@ -13,7 +13,6 @@ class DemoController extends Zend_Controller_Action
|
||||
|
||||
public function init()
|
||||
{
|
||||
require_once 'Web/demo/getIdentite.php';
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$this->_username = $auth->getIdentity()->username;
|
||||
$this->_hash = $auth->getIdentity()->hash;
|
||||
@ -46,7 +45,7 @@ class DemoController extends Zend_Controller_Action
|
||||
$this->view->assign('method', $method);
|
||||
//Affichage du formulaire
|
||||
if (array_key_exists($method, $this->methods)){
|
||||
$class = 'Form_'.$method;
|
||||
$class = 'Scores_Ws_Form_'.ucfirst($method);
|
||||
if (class_exists($class)){
|
||||
$form = new $class;
|
||||
$form->addElement('hidden', 'method', array(
|
||||
@ -68,7 +67,7 @@ class DemoController extends Zend_Controller_Action
|
||||
if ($this->_request->isPost()) {
|
||||
$formData = $this->_request->getPost();
|
||||
$method = $formData['method'];
|
||||
$class = 'Form_'.$method;
|
||||
$class = 'Scores_Ws_Form_'.ucfirst($method);
|
||||
if (class_exists($class)) {
|
||||
$form = new $class;
|
||||
if ($form->isValid($formData)) {
|
||||
|
@ -653,7 +653,7 @@ function clientSphinx(&$formR)
|
||||
require_once realpath(dirname(__FILE__)).'/sphinxapi.php';
|
||||
break;
|
||||
case 2:
|
||||
require_once 'sphinxapi/sphinxapi-2.1.2.php';
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-2.1.2.php';
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
class Form_getIdentite extends Zend_Form
|
||||
class Scores_Ws_Form_GetIdentite extends Zend_Form
|
||||
{
|
||||
public function init()
|
||||
{
|
@ -1,74 +0,0 @@
|
||||
<?php
|
||||
class Rapport
|
||||
{
|
||||
protected $data = array();
|
||||
protected $vue = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
/*
|
||||
Définir les requetes avec leur options
|
||||
Paramètres d'entrées, Vue, etc
|
||||
|
||||
Définir les requetes standard
|
||||
|
||||
En paramètres
|
||||
Liste des requetes qui doivent être générer
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
public function execRequete(){
|
||||
$this->data['Identite']['raisonSociale'] = 'PEUGEOT';
|
||||
}
|
||||
|
||||
public function assignVars()
|
||||
{
|
||||
$this->view = new VueHtml(realpath(dirname(__FILE__)).'/Templates/fiche.phtml');
|
||||
foreach($this->data['Identite'] as $var => $value){
|
||||
$this->view->{$var} = $value;
|
||||
}
|
||||
}
|
||||
|
||||
public function getContent(){
|
||||
$this->execRequete();
|
||||
$this->assignVars();
|
||||
return $this->view->getHtml();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class VueHtml
|
||||
{
|
||||
protected $includeVue = array();
|
||||
|
||||
public function __construct($filename)
|
||||
{
|
||||
if (is_array($filename)){
|
||||
$this->includeVue = $filename;
|
||||
} else {
|
||||
$this->includeVue = array($filename);
|
||||
}
|
||||
}
|
||||
|
||||
public function getHtml()
|
||||
{
|
||||
$content = '';
|
||||
|
||||
foreach( $this->includeVue as $f ) {
|
||||
if ( is_file( $f ) ) {
|
||||
ob_start();
|
||||
include $f;
|
||||
$content.= ob_get_contents();
|
||||
ob_end_clean();
|
||||
}
|
||||
}
|
||||
return $content;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$rapport = new Rapport();
|
||||
echo $rapport->getContent();
|
||||
|
||||
|
@ -1,4 +0,0 @@
|
||||
<div id="center">
|
||||
<h1>TEST MENU</h1>
|
||||
<?=$this->raisonSociale;?>
|
||||
</div>
|
@ -2356,9 +2356,9 @@ class Interne extends WsScore
|
||||
*/
|
||||
|
||||
if (SPHINX_HISTO_VERSION == 1){
|
||||
require_once 'sphinxapi/sphinxapi-0.9.9.php';
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-0.9.9.php';
|
||||
} elseif (SPHINX_HISTO_VERSION == 2){
|
||||
require_once 'sphinxapi/sphinxapi-2.1.2.php';
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-2.1.2.php';
|
||||
}
|
||||
|
||||
$cl = new SphinxClient();
|
||||
|
@ -2314,9 +2314,9 @@ class Interne extends WsScore
|
||||
*/
|
||||
|
||||
if (SPHINX_HISTO_VERSION == 1){
|
||||
require_once 'sphinxapi/sphinxapi-0.9.9.php';
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-0.9.9.php';
|
||||
} elseif (SPHINX_HISTO_VERSION == 2){
|
||||
require_once 'sphinxapi/sphinxapi-2.1.2.php';
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-2.1.2.php';
|
||||
}
|
||||
|
||||
$cl = new SphinxClient();
|
||||
|
@ -1238,9 +1238,9 @@ class Interne extends WsScore
|
||||
*/
|
||||
|
||||
if (SPHINX_HISTO_VERSION == 1){
|
||||
require_once 'sphinxapi/sphinxapi-0.9.9.php';
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-0.9.9.php';
|
||||
} elseif (SPHINX_HISTO_VERSION == 2){
|
||||
require_once 'sphinxapi/sphinxapi-2.1.2.php';
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-2.1.2.php';
|
||||
}
|
||||
|
||||
$cl = new SphinxClient();
|
||||
|
@ -1244,9 +1244,9 @@ class Interne extends WsScore
|
||||
*/
|
||||
|
||||
if (SPHINX_HISTO_VERSION == 1){
|
||||
require_once 'sphinxapi/sphinxapi-0.9.9.php';
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-0.9.9.php';
|
||||
} elseif (SPHINX_HISTO_VERSION == 2){
|
||||
require_once 'sphinxapi/sphinxapi-2.1.2.php';
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-2.1.2.php';
|
||||
}
|
||||
|
||||
$cl = new SphinxClient();
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user