Prise en compte des messages de contact - mise en place de comptes beta

This commit is contained in:
Claire DELBOS 2017-03-27 10:13:37 +02:00
parent e1f5fe03bd
commit aebe1ddaca
3 changed files with 12 additions and 4 deletions

View File

@ -25,7 +25,7 @@ class Achatclient_IndexController extends Zend_Controller_Action
protected $maxcredit=2000;
protected $libdroits = 'searchent';
protected $libdroits = 'portemonnaie';
public function init()
{
@ -206,10 +206,10 @@ class Achatclient_IndexController extends Zend_Controller_Action
$this->view->msg="Merci de remplir votre message";
}else{
$data=array(
'idUser' => $user->id,
'idUser' => $user->identity->id,
'begin' => Date('Y-m-d H:i:s'),
'subject' => $objet,
'message' => $message,
'message' => 'From : '.$user->identity->username.' Message : '.$message,
'stage' => 1,
'answer' => 'Message enregistré'
);
@ -247,6 +247,10 @@ class Achatclient_IndexController extends Zend_Controller_Action
}
private function sendContact($data,$user){
$ws = new Scores_Ws_Client('credit', '0.1');
$params = new stdClass();
$params->contactdata = json_encode($data);
$infocredit = $ws->contactCredit($params);
//@todo: envoyer le mail
$c = Zend_Registry::get('config');
$mail = new Scores_Mail_Method();

View File

@ -522,7 +522,7 @@ class UserController extends Zend_Controller_Action
$this->view->assign('ajax', $ajax);
$refresh = 5;
if($this->identity->idClient==195){//Redirection spéciale inextenso
if($this->checkperm('portemonnaie')){//Redirection spéciale credit
$url="http://inexweb.fr";
}else{
$url = 'http://'.$_SERVER['SERVER_NAME'].$this->view->url(array(

View File

@ -17,6 +17,10 @@ return array(
'debug' => true,
'errorMsg' => array('MSG'),
),
'contactCredit' => array(
'debug' => true,
'errorMsg' => array('MSG'),
),
),
);