Location: PHPKode > projects > MyPhpMoney > myphpmoney_2.0/public_html/doc/index.php
<?php
/**
 * $Id: index.php 384 2003-05-13 11:44:07Z courou $
 *
 * Author     : courou&#64;users.sourceforge.net
 * Website    : http://allreponse.ath.cx
 *
 * Support    : http://sourceforge.net/projects/myphpmoney/
 * CVS        : http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/myphpmoney/
 */

if (!defined('__DOC__')) { define('__DOC__', 'YES');

/**
 * BEGIN CONFIG FILE NIV
 */
     require_once '../config/settings.inc.php';

/**
 * BUILD THE HEADER
 */
     if (isset($_GET['p']) && $_GET['p'] == 'l6') $_nojs = 1; else $_nojs = 0;
     XHTML_header($_nojs,0,0,1,1,2,1,1);

/**
 * THE TEMPLATES -- RIGHT MENU FOR THE DOC
 */
     if (!isset($_GET['p'])) $_GET['p'] = '';
          switch($_GET['p']) {

       ## APROPOS
       default:

       $_MPM['BeginMixed'] = array
       (
         'DOC_ORGANISATION'    => sprintf($_VAR['DOC_ORGANISATION'],$_MPM['name']),
         'DOC_PRESENT_TXT'     => sprintf($_VAR['DOC_PRESENT_TXT'],$_MPM['name']),
         'DOC_PRESENT'         => $_VAR['DOC_PRESENT'],
         'DOC_HOME_LIST_1'     => $_VAR['DOC_HOME_LIST_1'],
         'DOC_HOME_LIST_2'     => $_VAR['DOC_HOME_LIST_2'],
         'DOC_HOME_LIST_3'     => $_VAR['DOC_HOME_LIST_3'],
         'DOC_HOME_LIST_4'     => $_VAR['DOC_HOME_LIST_4'],
         'DOC_HOME_LIST_5'     => $_VAR['DOC_HOME_LIST_5']
       );

       for ($e=1; $e<=5; $e++) {

           $_MPM['BoucleMixed'] = array
           (
               "DOC_HOME_$e"        => $_VAR['IMG_ALT'][$e],
               'DOC_HOME_LIST_X6'   => sprintf($_VAR['DOC_HOME_LIST_6'],$_MPM['name']),
               'DOC_HOME_7'         => $_VAR['IMG_ALT'][7]
           );
           $_MPM['BeginMixed'] = array_merge($_MPM['BeginMixed'],$_MPM['BoucleMixed']);
       }

       XHTML_SetFile('doc_home.tpl',$_MPM['BeginMixed'],2);
       break;

       ## CONCEPT
       case 'l1':

       $_MPM['BeginMixed'] = array
       (
         'DOC_OPEN_SOURCE'     => $_VAR['DOC_OPEN_SOURCE'],
         'DOC_CONCEPT_LIST_1'  => $_VAR['DOC_CONCEPT_LIST_1'],
         'DOC_CONCEPT_LIST_2'  => sprintf($_VAR['DOC_CONCEPT_LIST_2'],$_MPM['name']),
         'DOC_CONCEPT_LIST_3'  => sprintf($_VAR['DOC_CONCEPT_LIST_3'],$_MPM['name'],$_MPM['name'],$_MPM['name'])
       );
       XHTML_SetFile('doc_concept.tpl',$_MPM['BeginMixed'],2);
       break;

       ## SCREEN GRAB
       case 'l2':

            $_MPM['BeginMixed'] = array
            (
              'GRAB_1'         => sprintf($_VAR['IMG_ALT'][0],$_MPM['name']),
              'IMAGE_GRABS_1'  => $_MPM['img_grabs_1'],
              'DOC_GRAB'       => $_VAR['DOC_GRAB']
            );

         for ($f=2; $f<=9; $f++) {

              $_MPM['BoucleMixed'] = array
              (
                 'GRAB_'.$f          => $_VAR['IMG_ALT'][($f - 1)],
                 'IMAGE_GRABS_'.$f   => $_MPM['img_grabs_'.$f]
              );
        $_MPM['BeginMixed'] = array_merge($_MPM['BeginMixed'],$_MPM['BoucleMixed']);
        }
       XHTML_SetFile('doc_grab.tpl',$_MPM['BeginMixed'],2);
       break;

       ## SETUP WINDOWS AND SETUP UNIX
       case 'l4':
       case 'l5':

        $_MPM['BeginMixed'] = array
        (
          'DOC_LANG_SETUP_2'  => $_VAR['DOC_LANG_SETUP_2'],
          'DOC_LANG_SETUP_3'  => $_VAR['DOC_LANG_SETUP_3'],
          'DOC_LANG_SETUP_4'  => $_VAR['DOC_LANG_SETUP_4'],
          'DOC_LANG_SETUP_6'  => $_VAR['DOC_LANG_SETUP_6'],
          'DOC_LANG_SETUP_8'  => $_VAR['DOC_LANG_SETUP_8'],
          'DOC_LANG_SETUP_9'  => $_VAR['DOC_LANG_SETUP_9'],
          'DOC_LANG_SETUP_12' => $_VAR['DOC_LANG_SETUP_12'],
          'DOC_LANG_SETUP_13' => $_VAR['DOC_LANG_SETUP_13'],
          'DOC_LANG_SETUP_16' => $_VAR['DOC_LANG_SETUP_16'],
          'DOC_LANG_SETUP_19' => $_VAR['DOC_LANG_SETUP_19'],
          'DOC_LANG_SETUP_20' => $_VAR['DOC_LANG_SETUP_20'],
          'DOC_LANG_SETUP_22' => $_VAR['DOC_LANG_SETUP_22'],
          'DOC_LANG_SETUP_23' => $_VAR['DOC_LANG_SETUP_23'],
          'DOC_SETUP'         => $_VAR['DOC_SETUP'],
          'DOC_LANG_SETUP_21' => sprintf($_VAR['DOC_LANG_SETUP_21'],$_MPM['dir_config'].''.$_MPM['file_set']),
          'DOC_LANG_SETUP_14' => sprintf($_VAR['DOC_LANG_SETUP_14'],$_MPM['name']),
          'CHOICE_OS'         => $_GET['p'] == 'l4' ? $_VAR['DOC_OS_WIN'] : $_VAR['DOC_OS_UNIX'],
          'DOC_LANG_BEGIN'    => sprintf($_VAR['DOC_LANG_SETUP_1'],$_MPM['name']),
          'INSTALLSHIELD'     => $_GET['p'] == 'l4' ? sprintf($_VAR['DOC_LANG_SETUP_7'],$_MPM['name'],$_MPM['name']) : '',
          'DOC_LANG_OS'       => $_GET['p'] == 'l4' ? $_VAR['DOC_LANG_SETUP_17'] : $_VAR['DOC_LANG_SETUP_18'],
          'DOC_LANG_OS_1'     => $_GET['p'] == 'l4' ? '' : sprintf($_VAR['DOC_LANG_SETUP_OS_1'],basename($_MPM['dir_dump']),basename($_MPM['dir_dump'])),
          'DOC_LANG_OS_2'     => $_GET['p'] == 'l4' ? '' : sprintf($_VAR['DOC_LANG_SETUP_OS_2'],$_MPM['dir_config'].''.$_MPM['file_set'])
          );
        XHTML_SetFile('doc_setup.tpl',$_MPM['BeginMixed'],2);
       break;

       ## PHPDOC
       case 'l6':

               $_MPM['BeginMixed'] = array
               (
                      'DOC_LANG_PHPDOC_1'  => $_VAR['DOC_LANG_PHPDOC_1'],
                      'DOC_LANG_PHPDOC_2'  => $_VAR['DOC_LANG_PHPDOC_2'],
                      'DOC_LANG_PHPDOC_3'  => $_VAR['DOC_LANG_PHPDOC_3'],
                      'DOC_LANG_PHPDOC_4'  => $_VAR['DOC_LANG_PHPDOC_4']
               );
               XHTML_SetFile('doc_phpdoc.tpl','',0);

       ## CLASS

             $Fichier       = array();
             $Repertory     = '';
             $Repertory     = opendir($_MPM['dir_class']);

             while($tmp = readdir($Repertory)) $Fichier[] = $tmp;
             closedir($Repertory);

             sort($Fichier);

             $tpl->set_block('FILE_doc_phpdoc.tpl', 'BOUCLE_PHPDOC', 'BLOCK_doc_phpdoc.tpl');
             while($tmp = each($Fichier)) {

                 ## ONLY THE .CLASS -- MORE SPEED is_dir()
                 if (stristr($tmp[1],'.class')) {

                 $tpl->set_var(array(
                            'NAME_CLASS'         => $tmp[1],
                            'CLASS_MONEY'        => $_MPM['dir_class']
                 ));
                 $tpl->parse('BLOCK_doc_phpdoc.tpl','BOUCLE_PHPDOC',true);
                 }
             }

       ## FUNCTION

             $Fichier       = array();
             $Repertory     = '';
             $Repertory     = opendir($_MPM['dir_function']);

             while($tmp = readdir($Repertory)) $Fichier[] = $tmp;
             closedir($Repertory);

             sort($Fichier);
             $tpl->set_block('FILE_doc_phpdoc.tpl', 'BOUCLE_FUNCTION', 'BLOCK_doc_phpdoc.tpl_FUNCTION');
             while($tmp = each($Fichier)) {

                 ## ONLY THE .INC-- MORE SPEED is_dir()
                 if (stristr($tmp[1],'.inc')) {

                 $tpl->set_var(array(
                            'NAME_CLASS'         => $tmp[1],
                            'CLASS_MONEY'        => $_MPM['dir_function']
                 ));
                 $tpl->parse('BLOCK_doc_phpdoc.tpl_FUNCTION','BOUCLE_FUNCTION',true);
                 }
             }


           $_MPM['BoucleMixed'] = array
           (
                       'PHP_SCRIPT'         => $_MPM['file_stylphp'],
                       'HTTP_DOC_PHPDOC'    => $_MPM['file_phpdoc'],
                       'JS_SCRIPT'          => $_MPM['file_common'],
                       'JS_LANG'            => $_MPM['file_stylang'],
                       'MODEL_GRAPHIQUE'    => $_MPM['dir_graph'],
                       'THIS_GRAPHS'        => $_MPM['file_camenbert']
           );
           $_MPM['BeginMixed'] = array_merge($_MPM['BeginMixed'],$_MPM['BoucleMixed']);
           XHTML_SetFile('doc_phpdoc.tpl',$_MPM['BeginMixed'],4);
       break;

       ## FAQ SHOW
       case 'l7':
             $FILE_FAQ = str_replace('inc.php','htm',$_MPM['lang_file_name']);
             $FileOpen = $_MPM['dir_faq'].''.$_MPM['file_faq_lang'].''.$FILE_FAQ;
             $FileRead = $_MPM['dir_faq'].''.$_MPM['file_faq_default'];
             file_exists($FileOpen) ? MPM_ReadUrl($FileOpen,1) : MPM_ReadUrl($FileRead,0);
       break;

       ## LICENCE SHOW
       case 'l8': MPM_ReadUrl($_MPM['file_licence'],0);
       break;

       ## README SHOW
       case 'l9':
             MPM_ReadUrl($_MPM['file_readme'],0);
       break;

       ## CREDITS SHOW
       case 'l10':
             MPM_ReadUrl($_MPM['file_credit'],0);
       break;

       ## CHANGELOG
       case 'l11':
             echo '<ol><li><span class="menubold">'.$_VAR['DOC_CHANGELOG'].'</span> : <br /><br />';
             MPM_BrowseRep($_MPM['dir_change']);
             echo '</li></ol>';
       break;

       ## CHANGELOG SHOW
       case 'l12':
             if (isset($_GET['c']) && stristr($_GET['c'],$_MPM['dir_change']))
                 MPM_ReadUrl($_GET['c'],0);
             else
                 XHTML_Exit(__NIV__.'/'.$_MPM['http'][6]);
       break;
       }

/**
 * BUILD THE FOOTER
 */
   XHTML_footer();
   } ## end of __DOC__
Return current item: MyPhpMoney