magic box: v1.0

This commit is contained in:
2015-04-27 21:35:05 +02:00
parent 27f5b44934
commit 19d36ce795
7 changed files with 125 additions and 42 deletions

View File

@@ -51,6 +51,11 @@ $iMessageId = isset($_GET['message_id'])?$_GET['message_id']:0;
$oItemId = isset($_REQUEST['id'])?$_REQUEST['id']:0;
$sSystem = isset($_POST['system'])?$_POST['system']:'';
$bSimul = isset($_POST['simul'])?$_POST['simul']:false;
$sLastName = isset($_POST['last_name'])?$_POST['last_name']:'';
$sFirstName = isset($_POST['first_name'])?$_POST['first_name']:'';
$sEmail = isset($_POST['email'])?$_POST['email']:'';
$sCompany = isset($_POST['company'])?$_POST['company']:'';
$sResult = '';
//Launching application
@@ -192,8 +197,10 @@ if($bUserOk && $sAction!=Databap::EXT_ACCESS)
switch($sAction)
{
case 'add_user':
$asInfo = explode('-', strtolower($oUser));
$sResult = 'User added. Id='.$oDatabap->addUser($asInfo[0], $asInfo[1], $asInfo[2], array_key_exists(3, $asInfo)?$asInfo[3]:'');
$sResult = $oDatabap->addUser($sFirstName, $sLastName, $oItemId, $sEmail);
break;
case 'add_company':
$sResult = $oDatabap->addCompany($sCompany);
break;
case 'reset_pass':
$sResult = $oDatabap->resetPass($oUser);