<?php

    global $statement, $db , $page , $tpl , $c;

    if( isset( $_REQUEST['predefined'] ) )
    {
        $listing = new listing( core::$i->mode , false , false , false , "listing.proces_id IS NULL" );
        $tpl->assign(array(
            'predefined' => true
        ));
    }
    else 
    {
        $listing = new listing( core::$i->mode );
    }
 
    if( $listing->items ){

        $tpl->assign(array(
            'listing' => $listing
        ));
        
    
    } else $statement->set('empty');
    
    admin::$i->on();

?>