Ejemplo n.º 1
0
    }
    // Default is 3 days
    if ($monitor_clean_check_days == "" || $monitor_clean_check_days == NULL || $monitor_clean_check_days == 0) {
        $monitor_clean_check_days = 7;
    }
    // Default is 7 days
    $text4 .= "\n\t\t<table>\n\t\t<tr>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t" . EASYSHOP_GENPREF_95 . "\n\t\t\t\t</span>\n\t\t\t</td>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<input class='tbox' size='3'  type='text' name='monitor_clean_shop_days' value='{$monitor_clean_shop_days}' />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t" . EASYSHOP_GENPREF_96 . "\n\t\t\t\t</span>\n\t\t\t</td>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<input class='tbox' size='3'  type='text' name='monitor_clean_check_days' value='{$monitor_clean_check_days}' />\n\t\t\t</td>\n\t\t</tr>\t\t\n\t\t</table>\n\t\t";
}
// 5. Presentation settings
$text5 .= "\n\t\t\t\t\t\t<table border='0' cellspacing='15' width='100%'>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td class='tborder' style='width: 45%'>\n\t\t\t\t\t\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t\t\t\t\t\t" . EASYSHOP_GENPREF_98 . "\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td class='tborder' style='width: 55%'>\n\t\t\t\t\t\t\t\t\t<select class='tbox' name='num_main_category_columns'>\n\t\t\t\t\t\t\t\t\t\t<option value='1' " . ($num_main_category_columns == 1 ? "selected='selected'" : "") . ">1</option>\n\t\t\t\t\t\t\t\t\t\t<option value='2' " . ($num_main_category_columns == 2 ? "selected='selected'" : "") . ">2</option>\n\t\t\t\t\t\t\t\t\t\t<option value='3' " . ($num_main_category_columns == 3 ? "selected='selected'" : "") . ">3</option>\n\t\t\t\t\t\t\t\t\t\t<option value='4' " . ($num_main_category_columns == 4 ? "selected='selected'" : "") . ">4</option>\n\t\t\t\t\t\t\t\t\t\t<option value='5' " . ($num_main_category_columns == 5 ? "selected='selected'" : "") . ">5</option>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td class='tborder' style='width: 45%'>\n\t\t\t\t\t\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t\t\t\t\t\t" . EASYSHOP_GENPREF_99 . "\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td class='tborder' style='width: 55%'>\n\t\t\t\t\t\t\t\t\t<input class='tbox' size='3' type='text' name='main_categories_per_page' value='{$main_categories_per_page}' />\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n                <td><hr/></td>\n              </tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td class='tborder' style='width: 45%'>\n\t\t\t\t\t\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t\t\t\t\t\t" . EASYSHOP_CAT_11 . "\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td class='tborder' style='width: 55%'>\n\t\t\t\t\t\t\t\t\t<select class='tbox' name='num_category_columns'>\n\t\t\t\t\t\t\t\t\t\t<option value='1' " . ($num_category_columns == 1 ? "selected='selected'" : "") . ">1</option>\n\t\t\t\t\t\t\t\t\t\t<option value='2' " . ($num_category_columns == 2 ? "selected='selected'" : "") . ">2</option>\n\t\t\t\t\t\t\t\t\t\t<option value='3' " . ($num_category_columns == 3 ? "selected='selected'" : "") . ">3</option>\n\t\t\t\t\t\t\t\t\t\t<option value='4' " . ($num_category_columns == 4 ? "selected='selected'" : "") . ">4</option>\n\t\t\t\t\t\t\t\t\t\t<option value='5' " . ($num_category_columns == 5 ? "selected='selected'" : "") . ">5</option>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td class='tborder' style='width: 45%'>\n\t\t\t\t\t\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t\t\t\t\t\t" . EASYSHOP_CAT_12 . "\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td class='tborder' style='width: 55%'>\n\t\t\t\t\t\t\t\t\t<input class='tbox' size='3' type='text' name='categories_per_page' value='{$categories_per_page}' />\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n                <td><hr/></td>\n              </tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td class='tborder' style='width: 45%'>\n\t\t\t\t\t\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t\t\t\t\t\t" . EASYSHOP_CONF_ITM_02 . "\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td class='tborder' style='width: 55%'>\n\t\t\t\t\t\t\t\t\t<select class='tbox' name='num_item_columns'>\n\t\t\t\t\t\t\t\t\t\t<option value='1' " . ($num_item_columns == 1 ? "selected='selected'" : "") . ">1</option>\n\t\t\t\t\t\t\t\t\t\t<option value='2' " . ($num_item_columns == 2 ? "selected='selected'" : "") . ">2</option>\n\t\t\t\t\t\t\t\t\t\t<option value='3' " . ($num_item_columns == 3 ? "selected='selected'" : "") . ">3</option>\n\t\t\t\t\t\t\t\t\t\t<option value='4' " . ($num_item_columns == 4 ? "selected='selected'" : "") . ">4</option>\n\t\t\t\t\t\t\t\t\t\t<option value='5' " . ($num_item_columns == 5 ? "selected='selected'" : "") . ">5</option>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td class='tborder' style='width: 45%'>\n\t\t\t\t\t\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t\t\t\t\t\t" . EASYSHOP_CONF_ITM_03 . "\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td class='tborder' style='width: 55%'>\n\t\t\t\t\t\t\t\t\t<input class='tbox' size='3' type='text' name='items_per_page' value='{$items_per_page}' />\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n";
// Run the form with tabs
$tabs = new Tabs("easyshop_preferences");
$tabs->start(EASYSHOP_GENPREF_01);
echo $text1;
// Shop contact info
$tabs->end();
$tabs->start(EASYSHOP_GENPREF_44);
echo $text2;
// Settings
$tabs->end();
$tabs->start(EASYSHOP_GENPREF_14);
echo $text3;
// PayPal Info
$tabs->end();
if ($enable_ipn == '2') {
    $tabs->start(EASYSHOP_GENPREF_94);
    echo $text4;
    // Monitor Info
    $tabs->end();
}
$tabs->start(EASYSHOP_GENPREF_97);
Ejemplo n.º 2
0
 public function report()
 {
     $errors = count($this->errors['sku']) + count($this->errors['name']);
     $success = count($this->products) - $errors;
     $tab = new Tabs();
     $report = new Report();
     $tab->start();
     $tab->start("buttons");
     $tab->button("info", false, true);
     $success > 0 ? $tab->button("success", $success) : $tab->button("success");
     $errors > 0 ? $tab->button("errors", $errors) : $tab->button("errors");
     $tab->end("buttons");
     $tab->start("entries");
     $tab->entry("info", true);
     $report->start("import data");
     $report->entry("info", "info", "Products to be added: " . count($this->products));
     $report->entry($errors > 0 ? "warning" : "success", $errors > 0 ? "warning" : "success", "Products added: {$success}");
     $report->entry($errors > 0 ? "warning" : "info", $errors > 0 ? "warning" : "info", "Errors: {$errors}");
     $report->entry("info", "info", "Clearing parsed data and import file");
     if (unlink($_SESSION['upload_file'])) {
         unset($_SESSION['upload_file']);
         unset($_SESSION['products']);
         $report->entry("success", "success", "Cleared parsed data");
     }
     if ($errors == 0) {
         $report->entry("success", "success", "Import completed without errors");
     } else {
         $report->entry("warning", "warning", "Import completed with errors please review");
     }
     $report->end();
     $tab->entry("end");
     $tab->entry("success");
     $report->start("Successful product creation");
     foreach ($this->products as $key => $product) {
         if (!in_array($product['sku'], $this->errors['sku']) && !in_array($product['name'], $this->errors['name'])) {
             $report->entry("success", "product: {$key}", "Added: " . $product['name']);
         }
     }
     if ($success == 0) {
         $report->entry("info", "info", "No products we're added");
     }
     $report->end();
     $tab->entry("end");
     $tab->entry("errors");
     if (count($this->errors['sku']) > 0) {
         $report->start("Sku duplicates");
         foreach ($this->products as $key => $product) {
             if (in_array($product['sku'], $this->errors['sku'])) {
                 $report->entry("warning", "product: {$key}", "Failed to add product: " . $product['name'] . "<br />Due to duplicated sku: " . $product['sku'] . "<br/>Existing product: " . $this->duplicates[$product['sku']]);
             }
         }
         $report->end();
     }
     if (count($this->errors['name']) > 0) {
         $report->start("Name duplicates");
         foreach ($this->products as $key => $product) {
             if (in_array($product['name'], $this->errors['name'])) {
                 $report->entry("warning", "product: {$key}", "Failed to add product: " . $product['name'] . "<br />Due to not having a valid sku and provided name already exists<br/>Existing product: " . $product['sku']);
             }
         }
         $report->end();
     }
     if ($errors == 0) {
         $report->start("Import errors");
         $report->entry("info", "info", "No products have errors");
         $report->end();
     }
     $tab->entry("end");
     $tab->end("entries");
     $tab->end();
 }
Ejemplo n.º 3
0
    $count[$tk]['exported'] = 0;
    if ($products[$tk]) {
        foreach ($products[$tk] as $product) {
            if ($product['exported']) {
                $count[$tk]['exported']++;
            }
        }
    }
    $count[$tk]['created'] = $products[$tk] ? count($products[$tk]) : '0';
}
$tabs->start();
$tabs->start("buttons", "pills");
foreach ($date as $tk => $td) {
    $tabs->button($tk, false, $tk == "day" ? true : false);
}
$tabs->end("buttons");
echo "<br />";
$tabs->start("entries", "pills");
foreach ($date as $tk => $td) {
    $tabs->entry($tk, $tk == "day" ? 1 : 0, true);
    $table->start($tk . "_report", "table-bordered");
    $table->head("Product report, created: " . $count[$tk]['created'] . ", exported: " . $count[$tk]['exported']);
    foreach ($users as $user) {
        $count['personal']['exported'] = 0;
        $count['personal']['created'] = 0;
        if ($products[$tk]) {
            foreach ($products[$tk] as $product) {
                if ($user['id'] == $product['user_id']) {
                    $count['personal']['created']++;
                    if ($product['exported']) {
                        $count['personal']['exported']++;