32 lines
1.0 KiB
PHP
32 lines
1.0 KiB
PHP
<?php
|
||
|
||
if ( $_SESSION['dostup']!='a' ) header( 'Location: /login/' );// && $dostup!='m'
|
||
|
||
switch( @$_POST['act'] ) {
|
||
//Сохранение статуса задачи
|
||
case 'saveTaskStatus':
|
||
\DB::set('UPDATE `tasks` SET `status`="' . $_POST['status'] . '" WHERE `id` = "' . $_POST['id'] . '"');
|
||
break;
|
||
|
||
case 'save':/*Сохранение заметки*/
|
||
\DB::set( "UPDATE `zametka` SET `txt`=? WHERE `user_id` = ?", array( $_POST['txt'], $_SESSION['user_id'] ) );
|
||
break;
|
||
case 'loados':/*загружаем обратную связь со статусом не прочитано*/
|
||
unset( $a );
|
||
$a['status'] = 0;
|
||
$massiv = $db -> get_massiv( 'otzyv', $a, 'id' );
|
||
$num = $db -> num;
|
||
break;
|
||
|
||
case 'clearimg':
|
||
require_once 'api/php/list_file.php';
|
||
$filesm=list_file ( 'img/' . $_SERVER['SERVER_NAME'] . '/tovar' );
|
||
echo count ($filesm);
|
||
|
||
|
||
|
||
//\DB::set('UPDATE `tasks` SET `status`="' . $_POST['status'] . '" WHERE `id` = "' . $_POST['id'] . '"');
|
||
break;
|
||
}
|
||
|
||
?>
|