// install reports now that categories are set up if ($entry != '.' && $entry != '..') { admin_add_reports($entry, DIR_FS_MY_FILES . $_SESSION['company'] . '/phreeform/'); } } } if (!$error) { // input admin username record, clear the tables first if (DEBUG) { $messageStack->debug("\n installing users"); } $db->Execute("TRUNCATE TABLE " . TABLE_USERS); $db->Execute("TRUNCATE TABLE " . TABLE_USERS_PROFILES); $security = load_full_access_security(); $db->Execute($sql = "insert into " . TABLE_USERS . " set\n\t\t admin_name = '" . $user_username . "', \n\t\t\t admin_email = '" . $user_email . "', \n\t\t \t admin_pass = '******',\n\t\t\t admin_security = '" . $security . "'"); $user_id = $db->insert_ID(); if (sizeof($params) > 0) { // create My Notes dashboard entries $db->Execute("insert into " . TABLE_USERS_PROFILES . " set user_id = " . $user_id . ",\n\t\t\t\t menu_id = 'index', module_id = 'phreedom', dashboard_id = 'to_do', column_id = 1, row_id = 1, \n\t\t\t \t params = '" . serialize($params) . "'"); } } if (!$error) { // install fiscal year, default chart of accounts if (DEBUG) { $messageStack->debug("\n installing fiscal year."); } require_once '../modules/phreebooks/functions/phreebooks.php'; $db->Execute("TRUNCATE TABLE " . TABLE_ACCOUNTING_PERIODS); $current_year = date('Y'); $start_year = $fy_year; $start_period = 1;