예제 #1
0
$date2 = get_request_variable('date2', '');
$start_time = get_request_variable('start_time', '');
$stop_time = get_request_variable('stop_time', '');
$date = parse_date('{Y}-{m}-{d}', $date, false);
$date2 = parse_date('{Y}-{m}-{d}', $date2, false);
$description = get_request_variable('description', '');
if ($id == 0) {
    $jr_state = 1;
}
$save = get_request_variable('save', '');
$_REQUEST['callback'] = get_request_variable('callback', '');
$db = db_class::get_instance();
$journal = new journal();
$journal->id = $id;
if ($id > 0) {
    if (!$journal->Load()) {
        $journal->id = 0;
    }
}
for ($i = 0; $i < count($STORAGE['menu']); $i++) {
    if (strpos($STORAGE['menu'][$i]['path'], 'journal') !== false) {
        $menulevel = $STORAGE['menu'][$i];
        break;
    }
}
$STORAGE['site_path'][] = array('name' => $menulevel['name'], 'path' => $menulevel['path']);
$menulevel = $menulevel['childs'][0];
$STORAGE['site_path'][] = array('name' => $menulevel['name'], 'path' => $menulevel['path']);
if ($save) {
    if ($jr_work == 1) {
        if ($id > 0) {
예제 #2
0
<?php

$page_title = 'Удаление записи журнала';
$errors = array();
$id = intval(get_request_variable('id', 0));
$_REQUEST['callback'] = get_request_variable('callback', '');
$journal = new journal();
$journal->id = $id;
if ($id > 0) {
    if ($journal->Load()) {
        $errors = $journal->IsValidData();
        if (!$errors) {
            $journal->Delete();
        }
    }
}
include SITE_FILE_ROOT . 'template/simple_header.php';
include SITE_FILE_ROOT . 'template/' . $STORAGE['module'] . '/' . $STORAGE['action'] . '.php';
include SITE_FILE_ROOT . 'template/simple_footer.php';