Location: PHPKode > projects > MyPhpMoney > myphpmoney_2.0/public_html/save.php
<?php
/**
 * $Id: save.php 336 2003-04-02 12:18:39Z 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/
 */

/**
 * INCLUDE FILE
 */
     require_once 'config/settings.inc.php';

/**
 * ENTER IN THE SESSION OR BUILD THE LOGIN FORM
 */
     if (SQL_VerifSession()) {

/**
 * DUMPS SQL
 */
    if (isset($_POST['DUMPS']) && $_POST['DUMPS'] == 'YES') {
      $tools->Construc_header(md5($sess_pid).'.sql');   ## EN-TETE HTTP
      echo SQL_DumpDays();                              ## DATABASE QUERY
    exit;
   }

/**
 * BUILD THE HEADER
 */
     XHTML_header(1,0,1,1,1,1,1,1);

/**
 * THE TEMPLATES -- BUILD HEADER SAUVEGARDE
 */
     $_MPM['BeginMixed'] = array
     (
         'SAVE_FORM_1'            => $_VAR['SAVE_FORM_1'],
         'SAVE_FORM_2'            => $_VAR['SAVE_FORM_2'],
         'SAVE_MESS_2'            => $_VAR['SAVE_MESS_2'],
         'QUITTER'                => $_VAR['QUITTER'],
         'ENVOYER'                => $_VAR['ENVOYER'],
         'COPY'                   => $_VAR['COPY'],
         'SAVE_HOME'              => $_VAR['SAVE_HOME'],
         'SAVE_MESS_1'            => $_VAR['SAVE_MESS_1'],
         'HTTP_HOME_PG'           => $_MPM['http'][0]
     );
     XHTML_SetFile('header_save.tpl',$_MPM['BeginMixed'],2);

/**
 * BUILD DUMP FILE FOR USER
 */
      if (isset($_POST['opa']) && $_POST['opa'] == $_VAR['ENVOYER']) {

         if (is_uploaded_file($_FILES['sauvegarde']['tmp_name'])
            && ($_FILES['sauvegarde']['tmp_name'] != 'none')
               && ($_FILES['sauvegarde']['tmp_name'] != '')
                  && stristr($_FILES['sauvegarde']['name'],md5($sess_pid).'.sql')) {
         SQL_InsertBackup($_FILES['sauvegarde']['tmp_name']);
         } else {
         XHTML_DisplayJs($_VAR['MESSAGE_JS']['JS_SAVE_ERROR']);
         }
      }
   } else {
          XHTML_DisplayLogin();
   } ## end if (SQL_VerifSession())

/**
 * BUILD THE FOOTER
 */
     XHTML_footer();
Return current item: MyPhpMoney