Functions

index.php File Reference

Go to the source code of this file.

Functions

 Make_List ()
 This function actually gets the CSV data from the root server, and creates a PDF file from it, using FPDF.

Function Documentation

Make_List (  ) 

This function actually gets the CSV data from the root server, and creates a PDF file from it, using FPDF.

Definition at line 11 of file index.php.

        {
        $in_http_vars = array_merge_recursive ( $_GET, $_POST );
        
        if ( isset ( $in_http_vars['dir'] ) )
            {
            $dir = preg_replace ( "#[\\:/]#",'',$in_http_vars['dir']).'/';  // Just to make sure no one is trying to pull a fast one... 
            }
        else
            {
            $dir = 'pdf_generator/';
            }
        
        $class_name = preg_replace ( "#[\\:/]#",'',$in_http_vars['list_type']).'_napdf';

        if ( file_exists ( dirname ( __FILE__ )."/../$dir$class_name.class.php" ) )
            {
            require_once ( dirname ( __FILE__ )."/../$dir$class_name.class.php" );
            $class_instance = new $class_name ( $in_http_vars );

            if ( ($class_instance instanceof $class_name) && method_exists ( $class_instance, 'AssemblePDF' ) && method_exists ( $class_instance, 'OutputPDF' ) )
                {
                if ( $class_instance->AssemblePDF() )
                    {
                    $class_instance->OutputPDF();
                    }
                }
            else
                {
                echo "Cannot instantiate $class_name";
                }
            }
        else
            {
            echo "Cannot find ".dirname ( __FILE__ )."/../$dir$class_name.class.php";
            }
        }

 All Data Structures Files Functions Variables Enumerations