core/api/modules/tz/ajax.php

33 lines
802 B
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
switch( @$_POST['act'] ) {
case 'save':/*Сохранение заметки*/
unset( $a );
$a['user_id'] = $_SESSION['user_id'];
$txt=$db->get_val('zametka', $a, 'txt');
if ($txt){
$db->free_sql2('UPDATE `zametka` SET `txt`="' . $_POST['txt'] . '" WHERE `user_id` = "' . $_SESSION['user_id'] . '"');
}else{
$a['txt']=$_POST['txt'];
$db->add('zametka', $a);
}
// $c = $db -> count_sql( 'zametka', $a );
// unset( $a );
// $a['txt'] = $_POST['txt'];
// $db -> update( 'zametka', 1, $a );
break;
case 'loados':/*загружаем обратную связь со статусом не прочитано*/
unset( $a );
$a['status'] = 0;
$massiv = $db -> get_massiv( 'otzyv', $a, 'id' );
$num = $db -> num;
break;
}
?>