Beispiel #1
0
                $gb_post->keep_pic = isset($_POST['keep_pic']) ? 1 : 0;
                $gb_post->userfile = isset($_FILES['userfile']['tmp_name']) && $_FILES['userfile']['tmp_name'] != "" ? $_FILES : '';
                $gb_post->user_img = isset($_POST['gb_user_img']) && $gb_post->keep_pic == 1 && empty($gb_post->userfile) ? $_POST['gb_user_img'] : '';
                $gb_post->preview = isset($_POST['gb_preview']) ? 1 : 0;
                $gb_post->private = isset($_POST['gb_private']) ? 1 : 0;
                $gb_post->honeypot = isset($_POST['gb_username']) ? 1 : 0;
                $gb_action = isset($_POST['agb_preview_' . $antispam]) ? 'preview' : 'submit';
                echo $gb_post->process($gb_action);
            } else {
                echo $gb_post->process();
            }
            $gb_post->db->close_db();
            break;
        default:
            include_once LAZ_INCLUDE_PATH . '/lib/vars.class.php';
            display_entries();
    }
    ob_end_flush();
    $base_path = dirname(dirname(LAZ_INCLUDE_PATH));
    //chdir("$base_path");
    include $base_path . '/footer.php';
} else {
    include_once LAZ_INCLUDE_PATH . '/lib/vars.class.php';
    include_once LAZ_INCLUDE_PATH . '/lib/gb.class.php';
    $gb = new guestbook(LAZ_INCLUDE_PATH);
    if ($gb->db->VARS['included'] == 1) {
        header("HTTP/1.1 301 Moved Permanently");
        header("Location: " . $gb->db->VARS['laz_url']);
        exit;
    } elseif ($gb->db->VARS['included'] == 2) {
        header("HTTP/1.0 404 Not Found");
             display_notification_centered(_("Error: Credit amounts represented by negative amounts being entered. Check csv file is correct.(line {$line} in import file '{$_FILES['imp']['name']}')"));
             $error = true;
         }
         $entryCount = $entryCount + 1;
     }
     if ($error) {
         $errCnt = $errCnt + 1;
     }
     $error = false;
     $prev_ref = $reference;
     $prev_date = $date;
     $curEntryId += $type != 0 ? 1 : $input_id;
 }
 //while
 if ($type == ST_BANKDEPOSIT || $type == ST_BANKPAYMENT || $type == ST_JOURNAL) {
     $displayed_at_least_once = display_entries($type, $entry);
     end_row();
     end_table(1);
     div_end();
     if ($displayed_at_least_once == false) {
         display_notification_centered(_("Error: Debits do not equal credits."));
         $errCnt = $errCnt + 1;
     }
 }
 if ($type == ST_SALESORDER || $type == ST_SALESINVOICE) {
     if ($firstlinecopied == true && $prev_ref == $reference) {
         $_SESSION['Items']->write(0);
         $_SESSION['Items']->clear_items();
         unset($_SESSION['Items']->line_items);
         unset($_SESSION['Items']);
         $firstlinecopied = false;
Beispiel #3
0
<?php

include 'functions.php';
session_start();
check_valid_user();
do_html_header('Blog', array('ajax_functions.js'));
$_SESSION['author_id'] = get_authorid($_SESSION['author']);
$result = get_entries($_SESSION['author_id']);
display_entries($result);
do_html_url('blog/write_post.php', 'Write post');
do_html_url('blog/logout.php', 'logout');
do_html_footer();
Beispiel #4
0
<?php

include 'functions.php';
session_start();
check_valid_user();
$catid = $_GET['id'];
$catname = get_catname($catid);
do_html_header($catname);
$post = get_cate_post($catid);
display_entries($post);
do_html_url('blog', 'Home');
do_html_footer();