Ejemplo n.º 1
0
 $db->query("TRUNCATE TABLE `cc1_forum_posts`");
 $db->query("TRUNCATE TABLE `cc1_forum_topics`");
 $db->query("TRUNCATE TABLE `cc1_groups`");
 $db->query("TRUNCATE TABLE `cc1_groups_inhalt`");
 $db->query("TRUNCATE TABLE `cc1_messages`");
 $db->query("TRUNCATE TABLE `cc1_news`");
 $db->query("TRUNCATE TABLE `cc1_new_land`");
 $db->query("TRUNCATE TABLE `cc1_sessions`");
 $db->query("TRUNCATE TABLE `cc1_spions`");
 $db->query("DELETE FROM `cc1_users` WHERE `serveradmin` != 1");
 $db->query("UPDATE `cc1_crand` SET `used` = '0'");
 all_delete(LITO_ROOT_PATH . 'alli_flag');
 all_delete(LITO_ROOT_PATH . 'battle_kr');
 all_delete(LITO_ROOT_PATH . 'image_user');
 all_delete(LITO_ROOT_PATH . 'image_sig');
 all_delete(LITO_ROOT_PATH . 'images_tmp');
 include_once LITO_ROOT_PATH . "acp/includes/ftp_class.php";
 $ftp = new ftp($ftphost, $ftpuser, $ftppassword, $ftproot, $ftpport);
 if (!$ftp->lito_root) {
     error_msg('Stellen sie sicher, dass ihre FTP Daten richtig sind!');
     exit;
 }
 $ftp->mk_dir('alli_flag');
 $ftp->mk_dir('battle_kr');
 $ftp->mk_dir('image_user');
 $ftp->mk_dir('image_sig');
 $ftp->mk_dir('images_tmp');
 $ftp->chown_perm(0777, "alli_flag");
 $ftp->chown_perm(0777, "battle_kr");
 $ftp->chown_perm(0777, "image_user");
 $ftp->chown_perm(0777, "images_sig");
Ejemplo n.º 2
0
            @unlink($neu_file);
        }
    }
    @closedir($fp);
    return $folder;
}
function all_delete($dir_file)
{
    if (is_dir($dir_file)) {
        $array = dir_delete($dir_file);
        $array = array_reverse($array);
        foreach ($array as $elem) {
            @rmdir($elem);
        }
    } elseif (is_file($dir_file)) {
        @unlink($dir_file);
    }
}
## DELETE FUNCIONS ##
if (!admin_perms($userid)) {
    echo '<b>Wrong permissions!</b>';
} else {
    $file = str_replace("///", "/", $_GET['delete']);
    $file = preg_replace("#(.*?)/tinymce_files/(.*?)#", "\$2", $file);
    $type = preg_replace("#(.*?)/(.*).(.*?)#", "\$1", $file);
    if (!empty($_GET['delete'])) {
        all_delete("../../../../tinymce_files/" . $file);
    }
    echo '<script language="javascript">parent.location.href=\'../../browser.php?Connector=connectors/php/connector.php?Type=/\'</script>';
}
ob_end_flush();
include_once $path_to_root . "/modules/import_transactions/includes/import_sales_order_entry.inc";
// adaptation of sales_order_entry.php
include_once $path_to_root . "/modules/import_transactions/includes/import_sales_cart_class.inc";
// adaptation of cart class
include_once $path_to_root . "/modules/import_transactions/includes/import_sales_order_ui.inc";
// adaptation of sales_order_ui.inc
//include_once($path_to_root . "/gl/includes/ui/gl_journal_ui.inc"); display_import_items adapted from display_ gl_items
add_access_extensions();
//Turn these next two lines on for debugging
error_reporting(E_ALL);
ini_set("display_errors", "on");
//Set '$yes' to true if you are testing this module and you do not want to manually(phpmyadmin) delete previous test run records before each test run
//Ensure that your company has no important information in it as these will be deleted by means of all_delete function under import_transactions.inc
//Warning: Most records will be deleted if '$yes' set to true. Default must stay on false for normal operation.
//Recommended: Remove this next line after you are happy with testing.
all_delete($yes = false);
$js = '';
if ($use_popup_windows) {
    $js .= get_js_open_window(800, 500);
}
$help_context = "Import General Journals  / Deposits / Payments / Bank Statements / Sales Orders / Sales Invoices  <a href='spreadsheet_headers.html'>Help: Formats</a>";
page(_($help_context), false, false, "", $js);
global $Refs;
global $Ajax;
if (isset($_POST['type'])) {
    $type = $_POST['type'];
    $entry = new items_cart($type);
    init_entry_part_1($entry, $type);
    if ($type > 0 && isset($_POST['stateformat'])) {
        $stateformat = $_POST['stateformat'];
    } else {
Ejemplo n.º 4
0
    $zip->extract(PCLZIP_OPT_PATH, LITO_ROOT_PATH . 'acp/tmp');
    $new_tree = $ftp->list_files('acp/tmp');
    foreach ($new_tree as $node) {
        if (!in_array($node, $old_tree)) {
            $new = $node;
        }
    }
    if (!isset($new)) {
        error_msg('Der Name des neuen Ordners konnte nicht ermittelt werden! Bitte versuchen sie den Inhalt des acp/tmp Ordners zu l�schen');
        exit;
    }
    if ($ftp->exists('acp/tmp/' . $new . '_up')) {
        $ftp->req_remove('acp/tmp/' . $new . '_up');
    }
    $ftp->copy_req('acp/tmp/' . $new, 'acp/tmp/' . $new . '_up');
    all_delete(LITO_ROOT_PATH . 'acp/tmp/' . $new);
    $ftp->disconnect();
    unlink(LITO_ROOT_PATH . "acp/tmp/" . $_POST['remote'] . '.zip');
    $action = 'scan_new';
}
if ($action == "scan_new") {
    // first scan acp modules
    $return = array();
    $allow_url_fopen = intval(ini_get('allow_url_fopen'));
    $tpl->assign('url_open', $allow_url_fopen);
    $MODDIR = LITO_ROOT_PATH . "acp/tmp/";
    $setup_filename = "";
    $modules_acp_counter = 0;
    $modules_acp_counter_new = 0;
    $modules_game_counter_new = 0;
    $new_found_inhalt = array();