Exemple #1
0
            } elseif (datesqltime($v['datel']) < $curr['time'] - 86400) {
                b(' style="opacity: 0.6;"');
            }
            b('>');
            b('<td>');
            b($k);
            b('<td>');
            b(inet_ntop($v['ip']));
            b('<td>');
            b(dateh($v['date']));
            b('<td>');
            b(dateh($v['datel']));
            b('<td>');
            b(ua_str($v['ua']));
            b('<td>');
            b(icona('/' . $mod . '/srk/?row=' . $k));
        }
        b('</table>');
    } else {
        b('error: no `sess`.');
    }
}
// -------------------------------- session revoke proxy ------------------------------------ //
if ($act == 'srk') {
    db_write(array('table' => 'sess', 'set' => array('stat' => 2), 'where' => '`id` = ' . $grow));
    $redirect = '/' . $mod . '/';
}
// -------------------------------- Logout ------------------------------------ //
if ($act == 'lof') {
    // -- graceful logout -- //
    db_write(array('table' => 'sess', 'set' => array('stat' => 1), 'where' => '`sid` = UNHEX(\'' . cookieh('bdsx_sid') . '\')'));
Exemple #2
0
            $size = number_format($v['size'], 0, ',', ' ');
            b(substr($size, 0, -3) . '<span style="color:#888;">' . substr($size, -3, 3) . '</span>');
            b('</div>');
            b('<div class="file_row">');
            b(dateh($v['dtu']));
            b('</div>');
            b('<div class="file_row">');
            //b('<input name="s" id="s'.$k.'" type="checkbox"');
            //if (isset($files_sel) && $files_sel && in_array($k, $files_sel))  b(' checked');
            //b('>');
            if (p('edit')) {
                b(icona('/' . $mod . '/fle/?fle=' . $k));
            }
            b(icona('/f/' . $k));
            if (p('edit')) {
                b(icona('#if (confirm(\'Подтвердите удаление\')) {file_delete(' . $k . ')}'));
            }
            b('</div>');
            b('</div>');
        }
    }
    //else {
    //  b('<p class="p">Здесь пусто.');
    //  }
    b('</div>');
    // file_list
}
// ------------------------------------------- add / edit ------------------------------------------- //
if ($act == 'fle' && p('edit')) {
    $file = array('p' => 0, 'url' => '', 'name' => '', 'namei' => '', 'desc' => '', 'width' => 0, 'height' => 0, 'size' => 0, 'mime' => 0, 'dtu' => $curr['datetime'], 'owner' => '');
    if ($gfle) {
Exemple #3
0
        b('<td>title');
        b('<td>Д.');
        foreach ($page as $k => $v) {
            b('<tr');
            if (!$v['url']) {
                b(' style="color: #888;"');
            }
            b('>');
            b('<td>');
            b($k);
            b('<td>');
            b($v['url']);
            b('<td>');
            b($v['title']);
            b('<td>');
            b(icona('/' . $mod . '/pge/?pg=' . $k));
        }
        b('</table>');
    } else {
        b('<p class="p">Ошибка: данные отсутствуют.');
    }
}
// -------------------------- add / edit -------------------------- //
if ($act == 'pge') {
    $page = array('url' => '', 'title' => '', 'content' => '');
    if ($gpg) {
        $col = array();
        foreach ($page as $k => $v) {
            $col[] = $k;
        }
        $page = db_read(array('table' => 'page', 'col' => $col, 'where' => '`id` = ' . $gpg));