Merge branch 'master' of ssh://gl.arguments.ru:2224/ak/anpdf

This commit is contained in:
Your Name
2020-07-16 13:17:58 +03:00
3 changed files with 12 additions and 3 deletions

View File

@@ -45,4 +45,5 @@ set('mail',
db_config('argumentiru', 'mysql:host=mysql;dbname=argumentiru', 'newser', 'Chjk90yuiREY'); db_config('argumentiru', 'mysql:host=mysql;dbname=argumentiru', 'newser', 'Chjk90yuiREY');
db_config('reader', 'mysql:host=mysql;dbname=argumentiru', 'reader', 'ghjyjkUIOhg56Fh'); db_config('reader', 'mysql:host=mysql;dbname=argumentiru', 'reader', 'ghjyjkUIOhg56Fh');
db_config('chitatel', 'mysql:host=mysql;dbname=argumentiru', 'chitatel', 'hjYu78kl*90Uio'); db_config('chitatel', 'mysql:host=mysql;dbname=argumentiru', 'chitatel', 'hjYu78kl*90Uio');
db_config('klan', 'mysql:host=mysql;dbname=argumentiru', 'klan', 'zpFGhyuRty765Jk');

View File

@@ -0,0 +1,8 @@
/* add read access */
GRANT SELECT ON argumentiru.* TO 'newser'@'%' identified by 'Chjk90yuiREY';
/* add write access */
GRANT SELECT, INSERT, UPDATE ON argumentiru.clients TO 'klan'@'%' identified by 'zpFGhyuRty765Jk';
GRANT UPDATE ON argumentiru.anbuy TO 'klan'@'%'

View File

@@ -29,7 +29,7 @@ function addclient(){
if ($client['clienthash'] == '' ){ if ($client['clienthash'] == '' ){
$updsql = "UPDATE `clients` SET `clienthash` = '$clienthash' WHERE `client_id` = '{$client['client_id']}'"; $updsql = "UPDATE `clients` SET `clienthash` = '$clienthash' WHERE `client_id` = '{$client['client_id']}'";
db_get($updsql, 'writer'); db_get($updsql, 'klan');
echo "$updsql \n"; echo "$updsql \n";
} }
@@ -43,7 +43,7 @@ function addclient(){
else { else {
$inssql = "INSERT INTO `clients` (clientmail, clientdate, clienthash) VALUES ('$clientmail', '$clientdate', '$clienthash')"; $inssql = "INSERT INTO `clients` (clientmail, clientdate, clienthash) VALUES ('$clientmail', '$clientdate', '$clienthash')";
db_get($inssql, 'writer'); db_get($inssql, 'klan');
echo "$inssql \n"; echo "$inssql \n";
} }
} }
@@ -61,7 +61,7 @@ function addclientid(){
if (isset($client['client_id'])){ if (isset($client['client_id'])){
$updsql = "UPDATE `anbuy` SET `client_id` = '{$client['client_id']}' WHERE `buy_id` = '{$buy['buy_id']}'"; $updsql = "UPDATE `anbuy` SET `client_id` = '{$client['client_id']}' WHERE `buy_id` = '{$buy['buy_id']}'";
echo "$updsql\n"; echo "$updsql\n";
db_get($updsql); db_get($updsql, 'klan');
} }
} }