install/includes/payload.php
changeset 1081 745200a9cc2a
parent 984 18f5a15b810c
child 1116 220428d80925
equal deleted inserted replaced
1080:6358f769ecb1 1081:745200a9cc2a
     1 <?php
     1 <?php
     2 
     2 
     3 /*
     3 /*
     4  * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
     4  * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
     5  * Version 1.1.6 (Caoineag beta 1)
     5  * Copyright (C) 2006-2009 Dan Fuhry
     6  * Copyright (C) 2006-2008 Dan Fuhry
       
     7  * Installation package
     6  * Installation package
     8  * payload.php - Installer payload (the installation logic)
     7  * payload.php - Installer payload (the installation logic)
     9  *
     8  *
    10  * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
     9  * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
    11  * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
    10  * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
   423 function stg_init_logs()
   422 function stg_init_logs()
   424 {
   423 {
   425   global $db, $session, $paths, $template, $plugins; // Common objects
   424   global $db, $session, $paths, $template, $plugins; // Common objects
   426   global $installer_version;
   425   global $installer_version;
   427   
   426   
   428   $q = $db->sql_query('INSERT INTO ' . table_prefix . 'logs(log_type,action,time_id,date_string,author,page_text,edit_summary) VALUES(\'security\', \'install_enano\', ' . time() . ', \'' . enano_date('d M Y h:i a') . '\', \'' . $db->escape($_POST['username']) . '\', \'' . $db->escape(enano_version()) . '\', \'' . $db->escape($_SERVER['REMOTE_ADDR']) . '\');');
   427   $q = $db->sql_query('INSERT INTO ' . table_prefix . 'logs(log_type,action,time_id,date_string,author,page_text,edit_summary) VALUES(\'security\', \'install_enano\', ' . time() . ', \'' . enano_date(ED_DATE | ED_TIME) . '\', \'' . $db->escape($_POST['username']) . '\', \'' . $db->escape(enano_version()) . '\', \'' . $db->escape($_SERVER['REMOTE_ADDR']) . '\');');
   429   if ( !$q )
   428   if ( !$q )
   430   {
   429   {
   431     echo '<p><tt>MySQL return: ' . $db->sql_error() . '</tt></p>';
   430     echo '<p><tt>MySQL return: ' . $db->sql_error() . '</tt></p>';
   432     return false;
   431     return false;
   433   }
   432   }