compiling css + assigning user to new company in options (admin)
This commit is contained in:
@@ -863,6 +863,13 @@ class Databap extends PhpObject
|
|||||||
return $bExt?$this->getJsonPostResult($bSuccess, $sDesc):$iCompanyId;
|
return $bExt?$this->getJsonPostResult($bSuccess, $sDesc):$iCompanyId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function assignUser($iUserId, $iCompany, $bExt=true)
|
||||||
|
{
|
||||||
|
$iUserId = $this->oMySql->updateRow(self::USER_TABLE, $iUserId, array(MySqlManager::getId(self::COMP_TABLE)=>$iCompany));
|
||||||
|
|
||||||
|
return $bExt?$this->getJsonPostResult(true, ''):$iUserId;
|
||||||
|
}
|
||||||
|
|
||||||
public function buildCompleteIndex()
|
public function buildCompleteIndex()
|
||||||
{
|
{
|
||||||
$this->oMySql->emptyTable(self::SEARCH_TABLE);
|
$this->oMySql->emptyTable(self::SEARCH_TABLE);
|
||||||
|
|||||||
3
index.php
Normal file → Executable file
3
index.php
Normal file → Executable file
@@ -208,6 +208,9 @@ if($bUserOk && $sAction!=Databap::EXT_ACCESS)
|
|||||||
case 'reset_pass':
|
case 'reset_pass':
|
||||||
$sResult = $oDatabap->resetPass($oUser);
|
$sResult = $oDatabap->resetPass($oUser);
|
||||||
break;
|
break;
|
||||||
|
case 'assign_user':
|
||||||
|
$sResult = $oDatabap->assignUser($oUser, $sCompany);
|
||||||
|
break;
|
||||||
case 'build_index':
|
case 'build_index':
|
||||||
$oDatabap->buildCompleteIndex();
|
$oDatabap->buildCompleteIndex();
|
||||||
$sResult = 'Index ok';
|
$sResult = 'Index ok';
|
||||||
|
|||||||
@@ -33,6 +33,13 @@
|
|||||||
<p><input type="text" class="tiny_round" id="company" name="company" /></p>
|
<p><input type="text" class="tiny_round" id="company" name="company" /></p>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="assign_user" class="magic_box tiny_round">
|
||||||
|
<h3><i class="fa fa-inline fa-c-profile"></i>Changer de boite</h3>
|
||||||
|
<form id="form_assign_user" name="form_assign_user">
|
||||||
|
<p id="assign_users"></p>
|
||||||
|
<p id="assign_companies"></p>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
<div id="reset_pass" class="magic_box tiny_round">
|
<div id="reset_pass" class="magic_box tiny_round">
|
||||||
<h3><i class="fa fa-inline fa-c-unlock"></i>Réinitialiser mdp</h3>
|
<h3><i class="fa fa-inline fa-c-unlock"></i>Réinitialiser mdp</h3>
|
||||||
<form id="form_reset_pass" name="form_reset_pass">
|
<form id="form_reset_pass" name="form_reset_pass">
|
||||||
@@ -109,6 +116,11 @@ function initAdminPanel(asAdmin)
|
|||||||
addSelect($('#users'), asAdmin.users, 0, 'user');
|
addSelect($('#users'), asAdmin.users, 0, 'user');
|
||||||
$('#form_reset_pass').addButton('refresh', 'Reset', function(){submitAdmin('reset_pass');}, 'submit_reset_pass', 'heavy inverse');
|
$('#form_reset_pass').addButton('refresh', 'Reset', function(){submitAdmin('reset_pass');}, 'submit_reset_pass', 'heavy inverse');
|
||||||
|
|
||||||
|
//Assign user to company
|
||||||
|
addSelect($('#assign_companies'), asAdmin.companies, 0, 'company');
|
||||||
|
addSelect($('#assign_users'), asAdmin.users, 0, 'user');
|
||||||
|
$('#form_assign_user').addButton('ok', 'Assigner', function(){submitAdmin('assign_user');}, 'assign_user', 'heavy inverse');
|
||||||
|
|
||||||
//Show panel
|
//Show panel
|
||||||
$('#admin').show();
|
$('#admin').show();
|
||||||
}
|
}
|
||||||
|
|||||||
2924
style/databap.css
2924
style/databap.css
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1280
style/logon.css
1280
style/logon.css
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user