';
- if ($_POST['filter']) {
- $perevod = mysql_fetch_array(mysql_query("SELECT login,id,align,admin FROM `users` WHERE `login` = '{$_POST['filter']}' LIMIT 1;"));
- $per_ok=0;
- if ($perevod['admin'] != '1') $per_ok=1;
- $iid=$perevod['id'];
- $logsat=$_POST['logs'];
- if ($per_ok==1) {
- $ddate1=mktime(0, 0, 0, substr($_POST['logs'],3,2), substr($_POST['logs'],0,2), "20".substr($_POST['logs'],6,2));
- $ddate2=mktime(23, 59, 59, substr($_POST['logs'],3,2), substr($_POST['logs'],0,2), "20".substr($_POST['logs'],6,2));
- $logs = mysql_query("SELECT * FROM `delo` WHERE `pers` = '{$perevod['id']}' AND `date` > '$ddate1' AND `date` < '$ddate2' ORDER by `id` ASC;");
- while($row = @mysql_fetch_array($logs)) {
- $dat=date("d.m.y H:i",$row['date']);
- echo "{$dat} {$row['text']} ";
- }
- }
- }
- echo " ";
- }
+ if ($_POST['filter']) {
+ $perevod = mysql_fetch_array(mysql_query("SELECT login,id,align,admin FROM `users` WHERE `login` = '{$_POST['filter']}' LIMIT 1;"));
+ $per_ok = 0;
+ if ($perevod['admin'] != '1') $per_ok = 1;
+ $iid = $perevod['id'];
+ $logsat = $_POST['logs'];
+ if ($per_ok == 1) {
+ $ddate1 = mktime(0, 0, 0, substr($_POST['logs'], 3, 2), substr($_POST['logs'], 0, 2), "20" . substr($_POST['logs'], 6, 2));
+ $ddate2 = mktime(23, 59, 59, substr($_POST['logs'], 3, 2), substr($_POST['logs'], 0, 2), "20" . substr($_POST['logs'], 6, 2));
+ $logs = mysql_query("SELECT * FROM `delo` WHERE `pers` = '{$perevod['id']}' AND `date` > '$ddate1' AND `date` < '$ddate2' ORDER by `id` ASC;");
+ while ($row = @mysql_fetch_array($logs)) {
+ $dat = date("d.m.y H:i", $row['date']);
+ echo "{$dat} {$row['text']} ";
+ }
+ }
+ }
+ echo " ";
+}
- if ($user['align'] == '1.99' || $user['align'] == '1.98') {
- echo "";
- if ($_POST['login'] && $_POST['status']) {
- $dd = mysql_fetch_array(mysql_query("SELECT `ip`, `login` FROM `users` WHERE `login` = '".$_POST['login']."';"));
- if($dd) {
- mysql_query("UPDATE `users` SET `status` = '".$_POST['status']."' WHERE `login` = '".$_POST['login']."';");
- echo "Статус ",$dd[1]," изменен на ",$_POST['status']," ";
- }
- }
- }
+if ($user['align'] == '1.99' || $user['align'] == '1.98') {
+ echo "";
+ if ($_POST['login'] && $_POST['status']) {
+ $dd = mysql_fetch_array(mysql_query("SELECT `ip`, `login` FROM `users` WHERE `login` = '" . $_POST['login'] . "';"));
+ if ($dd) {
+ mysql_query("UPDATE `users` SET `status` = '" . $_POST['status'] . "' WHERE `login` = '" . $_POST['login'] . "';");
+ echo "Статус ", $dd[1], " изменен на ", $_POST['status'], " ";
+ }
+ }
+}
- if ($user['align'] == '1.99') {
- echo " |