Example #1
0
function DKPraidCount($character_name)
{
    $sql99 = new db();
    $count30_total = $sql99->db_Count(DKPDB_TABLE_RAIDS, "(*)", "WHERE (raid_date BETWEEN '" . mktime(0, 0, 0, date('m'), date('d') - 30, date('Y')) . "' AND '" . time() . "')");
    $count60_total = $sql99->db_Count(DKPDB_TABLE_RAIDS, "(*)", "WHERE (raid_date BETWEEN '" . mktime(0, 0, 0, date('m'), date('d') - 60, date('Y')) . "' AND '" . time() . "')");
    $count90_total = $sql99->db_Count(DKPDB_TABLE_RAIDS, "(*)", "WHERE (raid_date BETWEEN '" . mktime(0, 0, 0, date('m'), date('d') - 90, date('Y')) . "' AND '" . time() . "')");
    $sql99->db_Select_gen("SELECT count(*) FROM " . MPREFIX . DKPDB_TABLE_RAIDS . " r, " . MPREFIX . DKPDB_TABLE_RAID_A . " ra WHERE (ra.raid_id = r.raid_id) AND (ra.member_name='" . $character_name . "') AND (r.raid_date BETWEEN " . mktime(0, 0, 0, date('m'), date('d') - 30, date('Y')) . " AND " . time() . ")");
    while ($row99 = $sql99->db_Fetch()) {
        $count30_member = $row99['count(*)'];
    }
    $sql99->db_Select_gen("SELECT count(*) FROM " . MPREFIX . DKPDB_TABLE_RAIDS . " r, " . MPREFIX . DKPDB_TABLE_RAID_A . " ra WHERE (ra.raid_id = r.raid_id) AND (ra.member_name='" . $character_name . "') AND (r.raid_date BETWEEN " . mktime(0, 0, 0, date('m'), date('d') - 60, date('Y')) . " AND " . time() . ")");
    while ($row99 = $sql99->db_Fetch()) {
        $count60_member = $row99['count(*)'];
    }
    $sql99->db_Select_gen("SELECT count(*) FROM " . MPREFIX . DKPDB_TABLE_RAIDS . " r, " . MPREFIX . DKPDB_TABLE_RAID_A . " ra WHERE (ra.raid_id = r.raid_id) AND (ra.member_name='" . $character_name . "') AND (r.raid_date BETWEEN " . mktime(0, 0, 0, date('m'), date('d') - 90, date('Y')) . " AND " . time() . ")");
    while ($row99 = $sql99->db_Fetch()) {
        $count90_member = $row99['count(*)'];
    }
    $percent30 = $count30_total > 0 ? round($count30_member / $count30_total * 100) : 0;
    $percent60 = $count60_total > 0 ? round($count60_member / $count60_total * 100) : 0;
    $percent90 = $count90_total > 0 ? round($count90_member / $count90_total * 100) : 0;
    $return_array = array();
    array_push($return_array, $percent30, $percent60, $percent90);
    return $return_array;
}
 if ($row['main_category_image'] == '') {
     $text .= "\r\n\t\t\t\t\t\t\t\t\t\t\t ";
 } else {
     $text .= "\r\n\t\t\t\t\t\t\t\t\t\t\t<img src='{$store_image_path}" . $row['main_category_image'] . "' alt='" . $row['main_category_image'] . "' title='" . $row['main_category_image'] . "' />\r\n\t\t\t\t\t\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t\t\t\t\t\t";
     // .$row['main_category_image'];
 }
 $text .= "\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t<td class='forumheader3'>";
 // Show link to product inventory for the specific category only if there are products in the category
 // if ($prod_cat_count > 0) { $text .= "<a href='admin_config.php?mcat.".$row['main_category_id']."'>"; }
 $text .= $row['main_category_name'];
 // End tag of the conditional link
 // if ($prod_cat_count > 0) { $text .= "</a>"; }
 $text .= "\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t<td class='forumheader3'>\r\n\t\t\t\t\t\t\t\t\t\t\t<div style='text-align:center;'>\r\n\t\t\t\t\t\t                        <select class='tbox' name='main_category_order[]'>";
 // Third query: Build the selection list with order numbers
 $sql3 = new db();
 $num_rows = $sql3->db_Count(DB_TABLE_SHOP_MAIN_CATEGORIES, "(*)");
 $count = 1;
 while ($count <= $num_rows) {
     if ($row['main_category_order'] == $count) {
         $text .= "\r\n\t\t\t\t\t\t                                <option value='" . $row['main_category_id'] . "~" . $count . "' selected='selected'>" . $count . "</option>";
     } else {
         $text .= "\r\n\t\t\t\t\t\t                                <option value='" . $row['main_category_id'] . "~" . $count . "'>" . $count . "</option>";
     }
     $count++;
 }
 $text .= "\r\n\t\t\t\t\t\t                        </select>";
 $text .= "\r\n\t\t\t\t\t\t                    </div>\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t<td class='forumheader3'>\r\n\t\t\t\t\t\t\t\t\t\t\t<div style='text-align:center;'>";
 // Display the check box for active status (active = 2)
 if ($row['main_category_active_status'] == 2) {
     $text .= "\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type='checkbox' name='main_category_active_status[]' value='" . $row['main_category_id'] . "' checked='checked' />";
 } else {
Example #3
0
$text = "";
$main_convert = "";
//main convert
$newcontent = $sql->db_Count($plugintable, "(*)", "");
if ($newcontent == 0) {
    unset($text);
    //possible database values
    //content page:		$content_parent == "1" && $content_type == "1"	//added at 20051031
    //content page:		$content_parent == "0" && $content_type == "1"
    //review category:	$content_parent == "0" && $content_type == "10"
    //article category:	$content_parent == "0" && $content_type == "6"
    //review:			$content_type == "3" || $content_type == "16"
    //article:			$content_type == "0" || $content_type == "15"
    // ##### STAGE 1 : ANALYSE OLD CONTENT --------------------------------------------------------
    $sql = new db();
    $totaloldcontentrows = $sql->db_Count("content");
    $totaloldrowscat_article = $sql->db_Count("content", "(*)", "WHERE content_parent = '0' AND content_type = '6'");
    $totaloldrowscat_review = $sql->db_Count("content", "(*)", "WHERE content_parent = '0' AND content_type = '10'");
    $totaloldrowsitem_content = $sql->db_Count("content", "(*)", "WHERE (content_parent = '0' || content_parent = '1') AND content_type = '1'");
    $totaloldrowsitem_review = $sql->db_Count("content", "(*)", "WHERE content_type = '3' || content_type = '16'");
    $totaloldrowsitem_article = $sql->db_Count("content", "(*)", "WHERE content_type = '0' || content_type = '15'");
    if ($totaloldrowsitem_content == 0 && $totaloldrowsitem_article == 0 && $totaloldrowsitem_review == 0) {
        $totaloldrowsitem_content = "1";
        $totaloldrowsitem_article = "1";
        $totaloldrowsitem_review = "1";
        //if no old records exist, create a few default categories
        $main_convert = create_defaults();
    } else {
        //analyse unknown rows
        $unknown_array = $ac->analyse_unknown();
        if ($totaloldcontentrows == 0) {
Example #4
0
 function countCatItems($id)
 {
     global $sqlcountitemsincat, $plugintable, $datequery;
     //$id	:	category content_id
     if (!is_object($sqlcountitemsincat)) {
         $sqlcountitemsincat = new db();
     }
     $n = $sqlcountitemsincat->db_Count($plugintable, "(*)", "WHERE content_class REGEXP '" . e_CLASS_REGEXP . "' AND content_parent='" . intval($id) . "' AND content_refer != 'sa' " . $datequery . " ");
     return $n;
 }
Example #5
0
 $count_rows = 0;
 $sql->db_Select(DB_TABLE_SHOP_ITEM_CATEGORIES, "*", "category_active_status=2 ORDER BY category_order LIMIT {$category_offset}, {$categories_per_page}");
 while ($row = $sql->db_Fetch()) {
     $text .= "\n\t\t\t\t\t\t\t\t\t<td width='{$column_width}'>\n\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t<div style='text-align:center;'>\n\t\t\t\t\t\t\t\t\t\t\t<a href='" . e_SELF . "?cat." . $row['category_id'] . "'><b>" . $row['category_name'] . "</b></a>\n\t\t\t\t\t\t\t\t\t\t\t<br />";
     if ($row['category_image'] == '') {
         $text .= "\n\t\t\t\t\t\t\t\t\t\t\t\t&nbsp;";
     } else {
         $text .= "\n\t\t\t\t\t\t\t\t\t\t\t\t<a href='" . e_SELF . "?cat." . $row['category_id'] . "'><img src='{$store_image_path}" . $row['category_image'] . "' /> <!-- height='100' width='80' /> --></a>\n\t\t\t\t\t\t\t\t\t\t\t\t";
     }
     $text .= "\n\t\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t\t" . $tp->toHTML($row['category_description'], true) . "\n\t\t\t\t\t\t\t\t\t\t\t<br /> ";
     // Second query: Count the number of products in the category
     $sql2 = new db();
     $prod_cat_count = $sql2->db_Count(DB_TABLE_SHOP_ITEMS, "(*)", "WHERE category_id='" . $row['category_id'] . "'");
     // Third query: Count the number of inactive products in the category
     $sql3 = new db();
     $prod_inact_cat_count = $sql3->db_Count(DB_TABLE_SHOP_ITEMS, "(*)", "WHERE category_id='" . $row['category_id'] . "' AND item_active_status='1'");
     // Present total number of products
     $text .= "\n\t\t\t\t\t\t\t\t\t\t " . EASYSHOP_CONF_CAT_04 . " " . $prod_cat_count . " <br />";
     // Present total of inactive products if there are any
     if ($prod_inact_cat_count > 0) {
         $text .= "\n\t\t\t\t  " . EASYSHOP_CONF_CAT_05 . " " . $prod_inact_cat_count . "\n\t\t\t\t\t\t\t\t\t\t";
     } else {
         $text .= "&nbsp;";
     }
     $text .= "\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</td>";
     $count_rows++;
     if ($count_rows == $num_category_columns) {
         $text .= "\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>";
         $count_rows = 0;
     }
 }
        $edit_text .= "<td><input class='tbox' size='25' type='text' name='prop_prices[]' value='" . number_format($price_array[$i], 2, '.', '') . "'/></td></tr>";
    }
    // Add a blank input field on top of the current list
    $j = $arrayLength + 1;
    $edit_text .= "<tr><td></td><td><input class='tbox' size='25' type='text' name='prop_list[]' value='" . $prop_array[$j] . "'/></td>";
    $edit_text .= "<td><input class='tbox' size='25' type='text' name='prop_prices[]' value='" . $price_array[$j] . "'/></td></tr>";
    $edit_text .= "\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t</table>\r\n\t\t\t\t<br />\r\n\t\t\t\t<center>\r\n          <input type='hidden' name='update_prop' value='1'/>\r\n          <input type='hidden' name='prop_array_length' value ='" . $arrayLength . "'/>\r\n          <input type='hidden' name='property_id' value='" . $property_id . "'/>\r\n\t\t\t\t\t<input class='button' type='submit' value='" . EASYSHOP_ADMIN_PROP_13 . "'/>\r\n\t\t\t\t\t&nbsp;<a href='admin_properties.php'>" . EASYSHOP_ADMIN_PROP_21 . "</a>\r\n\t\t\t\t</center>\r\n\t\t\t\t<br />\r\n\t\t\t\t</fieldset>\r\n\t\t\t</div>\r\n\t\t</center>\r\n\t</form>";
    // Render the value of $edit_text in a table.
    $title = EASYSHOP_ADMIN_PROP_12;
    $ns->tablerender($title, $edit_text);
} else {
    // --------------------------------------------------------------------------+
    // ----------------------- Overview Properties ------------------------------+
    // --------------------------------------------------------------------------+
    // Determine if there are no properties
    if ($sql->db_Count(easyshop_properties) > 0) {
        $no_properties = 1;
    }
    $text .= "\r\n  <form name='overview_prop' method='POST' action='" . e_SELF . "'>\r\n\t\t<center>\r\n\t\t\t\t<fieldset>\r\n\t\t\t\t\t<legend>\r\n\t\t\t\t\t\t" . EASYSHOP_ADMIN_PROP_01 . "\r\n\t\t\t\t\t</legend>";
    // Show a message if there are no properties to display
    if ($no_properties == null) {
        $text .= "\r\n\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t<center>\r\n\t\t\t\t\t\t\t<span class='smalltext'>\r\n\t\t\t\t\t\t\t\t" . EASYSHOP_ADMIN_PROP_02 . "\r\n\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t</center>\r\n\t\t\t\t\t\t<br />";
    } else {
        $text .= "\r\n\t\t\t\t\t\t<center>\r\n\t\t\t\t\t\t  <table style='" . ADMIN_WIDTH . "' class='fborder'>\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t<td class='fcaption'><b>" . EASYSHOP_ADMIN_PROP_04 . "</b></td>\r\n\t\t\t\t\t\t\t\t\t<td class='fcaption'><b>" . EASYSHOP_ADMIN_PROP_05 . "</b></td>\r\n\t\t\t\t\t\t\t\t\t<td class='fcaption'><center><b>" . EASYSHOP_ADMIN_PROP_09 . "</b></center></td>\r\n\t\t\t\t\t\t\t\t</tr>";
        // Select the properties in the alphabetical order
        $sql->db_Select(easyshop_properties, "*", "ORDER BY prop_display_name", "no-where");
        // While there are records available; fill the rows
        while ($row = $sql->db_Fetch()) {
            $text .= "\r\n\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t<td class='forumheader3'>" . $row['prop_display_name'] . "</td>\r\n\t\t\t\t\t\t\t\t\t\t<td class='forumheader3'>" . $row['prop_list'] . "</td>\r\n\t\t\t\t\t\t\t\t\t\t";
            // Show the edit and delete icons
            $text .= "\r\n\t\t\t\t\t\t\t\t\t\t<td class='forumheader3'>\r\n\t\t\t\t\t\t\t\t\t\t\t<center>\r\n\t\t\t\t\t\t\t\t\t\t\t<a href='admin_properties.php?edit." . $row['property_id'] . "' alt='" . EASYSHOP_ADMIN_PROP_10 . "'>" . ADMIN_EDIT_ICON . "</a>\r\n                      &nbsp;\r\n\t\t\t\t\t\t\t\t\t\t\t<a href='admin_properties.php?delete." . $row['property_id'] . "' alt='" . EASYSHOP_ADMIN_PROP_11 . "'>" . ADMIN_DELETE_ICON . "</a>";
 function convert_rating()
 {
     global $plugintable;
     $plugintable = "pcontent";
     if (!is_object($sqlcr)) {
         $sqlcr = new db();
     }
     $numr = $sqlcr->db_Count("rate", "(*)", "WHERE (rate_table = 'article' || rate_table = 'review' || rate_table = 'content') ");
     if ($numr > 0) {
         $sqlcr->db_Update("rate", "rate_table = '" . $plugintable . "' WHERE (rate_table = 'article' || rate_table = 'review' || rate_table = 'content') ");
     }
 }
Example #8
0
     cachevars('easyshop_mcat_descr', $easyshop_mcat_descr);
     $count_rows++;
     if ($count_rows == $num_main_category_columns) {
         cachevars('easyshop_mcat_conditionalbreak', "&nbsp;");
         $count_rows = 0;
     } else {
         cachevars('easyshop_mcat_conditionalbreak', "");
         // Clear the easyshop_mcat_conditionalbreak variable!
     }
     $easyshop_all_mcat_container .= $tp->parseTemplate($ES_ALL_MCAT_CONTAINER, FALSE, $easyshop_shortcodes);
 }
 // End of while of fetching all main categories in use
 cachevars('easyshop_all_mcat_container', $easyshop_all_mcat_container);
 // Count active Product Categories without Main Category and show them additionally on last page
 $sql7 = new db();
 $cat_without_main = $sql7->db_Count(DB_TABLE_SHOP_ITEM_CATEGORIES, "(*)", "WHERE category_active_status=2 AND category_main_id='' AND (category_class IN (" . USERCLASS_LIST . ")) ");
 if ($cat_without_main > 0) {
     cachevars('easyshop_mcat_loose_title', $cat_without_main);
     $count_rows++;
     $easyshop_all_mcat_loose_container = $tp->parseTemplate($ES_ALL_MCAT_LOOSE_CONTAINER, FALSE, $easyshop_shortcodes);
     cachevars('easyshop_all_mcat_loose_container', $easyshop_all_mcat_loose_container);
 }
 // End of if $cat_without_main
 $sql6 = new db();
 // Only display main category records in use
 $arg6 = "SELECT DISTINCT category_main_id, main_category_id, main_category_name, main_category_image, main_category_description\n\t\tFROM #easyshop_item_categories, #easyshop_main_categories\n\t\tWHERE category_main_id=main_category_id AND main_category_active_status=2";
 $sql6->db_Select_gen($arg6, false);
 while ($row6 = $sql6->db_Fetch()) {
     $count_total_categories++;
 }
 $total_categories = $count_total_categories;
        }
        $sql->db_Update(DB_TABLE_SHOP_CURRENCY, "currency_active='1'");
        $sql->db_Update(DB_TABLE_SHOP_CURRENCY, "currency_active='2' WHERE currency_id=" . $tp->toDB($_POST['currency_id']));
    } else {
        // Insert record 1; for some 1.21 users the predefined record in easyshop_preferences was not created on install
        $arg = "ALTER TABLE #easyshop_preferences AUTO_INCREMENT = 1";
        // Autoincrement will make this record number 1... // Bugfix of 1.3 where I tried to fill in value '1' hardcoded, which MySQL doesn't like
        $sql->db_Select_gen($arg, false);
        $sql->db_Insert(DB_TABLE_SHOP_PREFERENCES, "", $tp->toDB($_POST['store_name']), $tp->toDB($_POST['support_email']), $tp->toDB($_POST['store_address_1']), $tp->toDB($_POST['store_address_2']), $tp->toDB($_POST['store_city']), $tp->toDB($_POST['store_state']), $tp->toDB($_POST['store_zip']), $tp->toDB($_POST['store_country']), $tp->toDB($_POST['store_welcome_message']), $tp->toDB($_POST['store_info']), $tp->toDB($_POST['store_image_path']), $tp->toDB(intval($_POST['num_category_columns'])), $tp->toDB(intval($_POST['categories_per_page'])), $tp->toDB(intval($_POST['num_item_columns'])), $tp->toDB(intval($_POST['items_per_page'])), $tp->toDB($_POST['paypal_email']), $tp->toDB($_POST['popup_window_height']), $tp->toDB($_POST['popup_window_width']), $tp->toDB($_POST['cart_background_color']), $tp->toDB($_POST['thank_you_page_title']), $tp->toDB($_POST['thank_you_page_text']), $tp->toDB($_POST['thank_you_page_email']), $tp->toDB($_POST['payment_page_style']), $tp->toDB($_POST['payment_page_image']), "", "", 1, $tp->toDB($_POST['set_currency_behind']), $tp->toDB(intval($_POST['minimum_amount'])), $tp->toDB($_POST['always_show_checkout']), $tp->toDB($_POST['email_order']), $tp->toDB($_POST['product_sorting']), $tp->toDB($_POST['page_devide_char']), $tp->toDB(intval($_POST['icon_width'])), $tp->toDB($_POST['cancel_page_title']), $tp->toDB($_POST['cancel_page_text']), $tp->toDB($_POST['enable_comments']), $tp->toDB($_POST['show_shopping_bag']), $tp->toDB($_POST['print_shop_address']), $tp->toDB($_POST['print_shop_top_bottom']), $tp->toDB($_POST['print_discount_icons']), $tp->toDB(intval($_POST['shopping_bag_color'])), $tp->toDB(intval($_POST['enable_ipn'])), $tp->toDB(intval($_POST['enable_number_input'])), $tp->toDB(intval($_POST['print_special_instr'])), $tp->toDB(intval($_POST['email_info_level'])), $tp->toDB($_POST['email_additional_text']), $tp->toDB(intval($_POST['monitor_clean_shop_days'])), $tp->toDB(intval($_POST['monitor_clean_check_days'])), $tp->toDB(intval($_POST['num_main_category_columns'])), $tp->toDB(intval($_POST['main_categories_per_page'])), $tp->toDB($_POST['paypal_primary_email']));
    }
    header("Location: " . e_SELF);
    exit;
}
// Creation of currencies can be skipped if there are 16 currencies
$sql = new db();
if ($sql->db_Count(DB_TABLE_SHOP_CURRENCY) < 16) {
    // Check for each PayPal currency if it is missing and add it to the currency file
    /*
    Supported PayPal currencies:
    01. AUD Australian Dollar
    02. CAD Canadian Dollar
    03. CHF Swiss Franc
    04. CZK Czech Koruna
    05. DKK Danish Krone
    06. EUR Euro
    07. GBP Pound Sterling
    08. HKD Hong Kong Dollar
    09. HUF Hungarian Forint
    10. JPY Japanese Yen
    11. NOK Norwegian Krone
    12. NZD New Zealand Dollar
Example #10
0
function displayCategoryLinks($mode = '')
{
    global $sql2, $ns, $lc, $tp, $cobj, $rowl, $qs, $linkspage_pref, $from, $link_shortcodes, $link_category_total;
    global $LINK_TABLE_START, $linkbutton_count, $LINK_TABLE, $link_category_total, $LINK_TABLE_CAPTION, $LINK_TABLE_END, $LINK_APPEND;
    $order = $lc->getOrder();
    $number = $linkspage_pref["link_nextprev_number"] ? $linkspage_pref["link_nextprev_number"] : "20";
    $nextprevquery = $mode && $linkspage_pref["link_nextprev"] ? "LIMIT " . intval($from) . "," . intval($number) : "";
    $cat = $mode ? " AND l.link_category='" . intval($mode) . "' " : "";
    $qry = "\n\tSELECT l.*, lc.*, COUNT(c.comment_id) AS link_comment\n\tFROM #links_page AS l\n\tLEFT JOIN #links_page_cat AS lc ON lc.link_category_id = l.link_category\n\tLEFT JOIN #comments as c ON c.comment_item_id=l.link_id AND comment_type='links_page'\n\tWHERE l.link_class REGEXP '" . e_CLASS_REGEXP . "' AND lc.link_category_class REGEXP '" . e_CLASS_REGEXP . "' " . $cat . "\n\tGROUP BY l.link_id\n\t" . $order . "\n\t" . $nextprevquery . "\n\t";
    $link_table_string = "";
    if (!is_object($sql2)) {
        $sql2 = new db();
    }
    $link_total = $sql2->db_Count("links_page as l", "(*)", "WHERE l.link_class REGEXP '" . e_CLASS_REGEXP . "' " . $cat . " ");
    if (!$sql2->db_Select_gen($qry)) {
        $lc->show_message(LAN_LINKS_34, LAN_LINKS_39);
    } else {
        $linkbutton_count = 0;
        $list = $sql2->db_getList();
        foreach ($list as $rowl) {
            $linkbutton_count = $rowl['link_button'] ? $linkbutton_count + 1 : $linkbutton_count;
            if ($mode) {
                $cat_name = $rowl['link_category_name'];
                $cat_desc = $rowl['link_category_description'];
                $LINK_APPEND = $lc->parse_link_append($rowl);
                $link_table_string .= $tp->parseTemplate($LINK_TABLE, FALSE, $link_shortcodes);
            } else {
                $arr[$rowl['link_category_id']][] = $rowl;
            }
        }
        if ($mode) {
            $link_category_total = $link_total;
            $link_table_start = $tp->parseTemplate($LINK_TABLE_START, FALSE, $link_shortcodes);
            $link_table_end = $tp->parseTemplate($LINK_TABLE_END, FALSE, $link_shortcodes);
            $text = $link_table_start . $link_table_string . $link_table_end;
            $caption = LAN_LINKS_32 . " " . $cat_name . " " . ($cat_desc ? " <i>[" . $cat_desc . "]</i>" : "");
            //number of links
            $caption .= " (<b title='" . (ADMIN ? LAN_LINKS_2 : LAN_LINKS_1) . "' >" . $link_total . "</b>" . (ADMIN ? "/<b title='" . (ADMIN ? LAN_LINKS_1 : "") . "' >" . $link_total . "</b>" : "") . ") ";
            $ns->tablerender($caption, $text);
            if (is_numeric($mode)) {
                $lc->ShowNextPrev($from, $number, $link_total);
            }
        } else {
            $text = '';
            foreach ($arr as $key => $value) {
                $link_table_string = "";
                $linkbutton_count = 0;
                $i = 0;
                for ($i = 0; $i < count($value); $i++) {
                    $rowl = $value[$i];
                    $linkbutton_count = $rowl['link_button'] ? $linkbutton_count + 1 : $linkbutton_count;
                    $cat_name = $rowl['link_category_name'];
                    $cat_desc = $rowl['link_category_description'];
                    $LINK_APPEND = $lc->parse_link_append($rowl);
                    $link_table_string .= $tp->parseTemplate($LINK_TABLE, FALSE, $link_shortcodes);
                }
                $link_category_total = count($value);
                $link_table_caption = $tp->parseTemplate($LINK_TABLE_CAPTION, FALSE, $link_shortcodes);
                $link_table_start = $tp->parseTemplate($LINK_TABLE_START, FALSE, $link_shortcodes);
                $link_table_end = $tp->parseTemplate($LINK_TABLE_END, FALSE, $link_shortcodes);
                $text .= $link_table_start . $link_table_string . $link_table_end;
            }
            //			$nav = $tp->parseTemplate("{NAVIGATOR}", FALSE, $link_shortcodes);		Navigator now positioned in template
            //			$ns->tablerender($link_table_caption, $nav.$text);
            $ns->tablerender($link_table_caption, $text);
        }
    }
    return;
}
Example #11
0
function report($action = "all", $limit = 5, $from = NULL, $to = NULL, $phpsessionid = NULL, $txn_id = NULL, $payer_email = NULL)
{
    $shop_pref = shop_pref();
    $set_currency_behind = $shop_pref['set_currency_behind'];
    // Define actual currency and position of currency character once
    $sql_rep = new db();
    $sql_rep->db_Select(DB_TABLE_SHOP_CURRENCY, "*", "currency_active=2");
    if ($row = $sql_rep->db_Fetch()) {
        $unicode_character = $row['unicode_character'];
        $paypal_currency_code = $row['paypal_currency_code'];
    }
    // Determine currency before or after amount
    if ($set_currency_behind == 1) {
        // Print currency after amount
        $unicode_character_before = "";
        $unicode_character_after = "&nbsp;" . $unicode_character;
    } else {
        $unicode_character_before = "&nbsp;" . $unicode_character . "&nbsp;";
        $unicode_character_after = "";
        // Print currency before amount in all other cases
    }
    //!isset($action)      ? $action = "all" : $action = "";
    $action == "all" ? $action = "" : ($action = " payer_status = '" . $action . " '");
    isset($from) ? $from = " (phptimestamp >= '" . $from . "' " : ($from = "");
    isset($to) ? $to = " AND phptimestamp <= '" . $to . "') " : ($to = "");
    isset($phpsessionid) ? $phpsessionid = " phpsessionid = '" . $phpsessionid . "' " : ($phpsessionid = "");
    isset($txn_id) ? $txn_id = " txn_id = '" . $txn_id . "' " : ($txn_id = "");
    isset($payer_email) ? $payer_email = " payer_email = '" . $payer_email . " '" : ($payer_email = "");
    $completed = $processing = $shopping = $escheck = $totals = $rxemail = $dupltxn = $various = 0;
    $arg = "1 " . $action . $phpsessionid . $txn_id . $payer_email . $from . $to . " ORDER BY phptimestamp DESC";
    $count_ipn_rows = $sql_rep->db_Count("easyshop_ipn_orders");
    if ($count_ipn_rows > 0) {
        $sql_rep->db_Select("easyshop_ipn_orders", "*", $arg);
        while ($row = $sql_rep->db_Fetch()) {
            $row['items'] = unserialize($row['all_items']);
            if (preg_match("/^EScheck_totals_/", $row['payment_status'])) {
                $thiscase = "totals";
            } elseif (preg_match("/^EScheck_rxemail_/", $row['payment_status'])) {
                $thiscase = "rxemail";
            } elseif (preg_match("/^EScheck_dupltxn_/", $row['payment_status'])) {
                $thiscase = "dupltxn";
            } elseif (preg_match("/^EScheck_/", $row['payment_status'])) {
                $thiscase = "EScheck";
            } else {
                $thiscase = $row['payment_status'];
            }
            $text = "";
            isset($row['phpsessionid']) ? $trans_sessionid = $row['phpsessionid'] : ($trans_sessionid = $row['custom']);
            $text .= "<tr><td class='forumheader'>\r\n                <b>" . EASYSHOP_IPN_01 . "</b>: " . $row['first_name'] . " " . $row['last_name'] . " (" . $row['payer_status'] . ")<br />\r\n                <b>" . EASYSHOP_IPN_02 . "</b>: " . $row['address_name'] . "  (" . $row['address_status'] . ") <br />\r\n                         " . $row['address_street'] . "     <br />\r\n                         " . $row['address_zip'] . "        <br />\r\n                         " . $row['address_city'] . "       <br />\r\n                         " . $row['address_state'] . "      <br />\r\n                         " . $row['address_country'] . "    <br />\r\n                <b>" . EASYSHOP_IPN_03 . "</b>: <a href='mailto:" . $row['payer_email'] . "'>" . $row['payer_email'] . "</a><br />\r\n                <br />\r\n                <b>" . EASYSHOP_IPN_04 . "</b><br />\r\n                " . EASYSHOP_IPN_05 . " : " . $row['payment_status'] . "<br />\r\n                " . EASYSHOP_IPN_06 . " : " . $row['reason_code'] . "<br />\r\n                " . EASYSHOP_IPN_07 . " : " . $row['pending_reason'] . "<br />\r\n                " . EASYSHOP_IPN_08 . " : " . $row['txn_id'] . "<br />\r\n                " . EASYSHOP_IPN_09 . " : " . $trans_sessionid . "<br />\r\n                " . EASYSHOP_IPN_10 . " : " . $row['payment_date'] . "<br />\r\n                " . EASYSHOP_IPN_11 . " : " . date("M d Y H:i:s", $row['phptimestamp']) . "<br />\r\n                " . EASYSHOP_IPN_12 . " : " . $unicode_character_before . $row['mc_gross'] . $unicode_character_after . "<br /></td>\r\n                ";
            $text .= "<td class='forumheader2' style='vertical-align: top;'><table style='border:0;cellspacing:15;width:100%;'>\r\n               <tr><td class='forumheader2'><b> " . EASYSHOP_IPN_13 . " </b></td>\r\n                   <td class='forumheader2'><b> " . EASYSHOP_IPN_14 . " </b></td>\r\n                   <td class='forumheader2'><b> " . EASYSHOP_IPN_15 . " </b></td>\r\n                   <td class='forumheader2'><b> " . EASYSHOP_IPN_16 . " </b></td>\r\n                   <td class='forumheader2'><b> " . EASYSHOP_IPN_17 . " </b></td>\r\n                   <td class='forumheader2'><b> " . EASYSHOP_IPN_18 . " </b></td></tr>  ";
            $itemcount = 1;
            $item = $row['items'];
            //preg_match("/^ES_/",$row['payment_status']) ? $paypalfix = "_" : $paypalfix = ""; // Paypal is inconsistent in it's variable naming
            $paypalfix = "_";
            // Paypal Completed order changes; not necessary anymore to make this flexible
            $paypalfix == "" ? $notpaypalfix = "_" : ($notpaypalfix = "_");
            // mc_gross_n exists when other variables are item_number(n)
            while (isset($item["item_name" . $paypalfix . $itemcount]) || isset($item["item_number" . $paypalfix . $itemcount])) {
                $text .= "<tr><td>" . $itemcount . "</td>\r\n               <td>" . $item["item_name" . $paypalfix . $itemcount] . "</td>\r\n               <td>" . $item["item_number" . $paypalfix . $itemcount] . "</td>\r\n               <td>" . $unicode_character_before . ($item["mc_handling" . $paypalfix . $itemcount] + $item["mc_shipping" . $paypalfix . $itemcount]) . $unicode_character_after . "</td>\r\n               <td>" . $item["quantity" . $paypalfix . $itemcount] . "</td>\r\n               <td>" . $unicode_character_before . $item["amount" . $paypalfix . $itemcount] . $unicode_character_after . "</td></tr>";
                $itemcount++;
            }
            $text .= "</table></td><br />";
            switch ($thiscase) {
                case "Completed":
                    $completed++;
                    $report['Completed'][$completed]['report_array'] = $row;
                    $report['Completed']['report_count'] = $completed;
                    $full_text = "<table class='fborder' width='90%'>\r\n                     <tr><td>\r\n                     <div style='text-align:left;'> <b>" . EASYSHOP_IPN_19 . ": '" . $thiscase . "'  " . EASYSHOP_IPN_20 . ": " . $completed . " </b></div>\r\n                     " . $text . "</tr></table>";
                    $report['Completed'][$completed]['report_table'] = $full_text;
                    break;
                case "ES_processing":
                    $processing++;
                    $report['ES_processing'][$processing]['report_array'] = $row;
                    $report['ES_processing']['report_count'] = $processing;
                    $full_text = "<table border='1'  style='border: 1px thin;' cellspacing='5' width='100%'>\r\n                     <tr><td>\r\n                     <div style='text-align:left;'> <b>" . EASYSHOP_IPN_19 . ": '" . $thiscase . "'  " . EASYSHOP_IPN_20 . ": " . $processing . " </b></div>\r\n                     " . $text . "</tr></table>";
                    $report['ES_processing'][$processing]['report_table'] = $full_text;
                    break;
                case "ES_shopping":
                    $shopping++;
                    $report['ES_shopping'][$shopping]['report_array'] = $row;
                    $report['ES_shopping']['report_count'] = $shopping;
                    $full_text = "<table border='1'  style='border: 1px thin;' cellspacing='5' width='100%'>\r\n                     <tr><td>\r\n                     <div style='text-align:left;'> <b>" . EASYSHOP_IPN_19 . ": '" . $thiscase . "'  " . EASYSHOP_IPN_20 . ": " . $shopping . " </b></div>\r\n                     " . $text . "</tr></table>";
                    $report['ES_shopping'][$shopping]['report_table'] = $full_text;
                    break;
                case "EScheck":
                    $escheck++;
                    $report['EScheck'][$escheck]['report_array'] = $row;
                    $report['EScheck']['report_count'] = $escheck;
                    $full_text = "<table border='1'  style='border: 1px thin;' cellspacing='5' width='100%'>\r\n                     <tr><td>\r\n                     <div style='text-align:left;'> <b>" . EASYSHOP_IPN_19 . ": '" . $thiscase . "'  " . EASYSHOP_IPN_20 . ": " . $escheck . " </b></div>\r\n                     " . $text . "</tr></table>";
                    $report['EScheck'][$escheck]['report_table'] = $full_text;
                    break;
                case "totals":
                    $totals++;
                    $report['totals'][$totals]['report_array'] = $row;
                    $report['totals']['report_count'] = $totals;
                    $full_text = "<table border='1'  style='border: 1px thin;' cellspacing='5' width='100%'>\r\n                     <tr><td>\r\n                     <div style='text-align:left;'> <b>" . EASYSHOP_IPN_19 . ": '" . $thiscase . "'  " . EASYSHOP_IPN_20 . ": " . $totals . " </b></div>\r\n                     " . $text . "</tr></table>";
                    $report['totals'][$totals]['report_table'] = $full_text;
                    break;
                case "rxemail":
                    $rxemail++;
                    $report['rxemail'][$rxemail]['report_array'] = $row;
                    $report['rxemail']['report_count'] = $rxemail;
                    $full_text = "<table border='1'  style='border: 1px thin;' cellspacing='5' width='100%'>\r\n                     <tr><td>\r\n                     <div style='text-align:left;'> <b>" . EASYSHOP_IPN_19 . ": '" . $thiscase . "'  " . EASYSHOP_IPN_20 . ": " . $rxemail . " </b></div>\r\n                     " . $text . "</tr></table>";
                    $report['rxemail'][$rxemail]['report_table'] = $full_text;
                    break;
                case "dupltxn":
                    $dupltxn++;
                    $report['dupltxn'][$dupltxn]['report_array'] = $row;
                    $report['dupltxn']['report_count'] = $dupltxn;
                    $full_text = "<table border='1'  style='border: 1px thin;' cellspacing='5' width='100%'>\r\n                     <tr><td>\r\n                     <div style='text-align:left;'> <b>" . EASYSHOP_IPN_19 . ": '" . $thiscase . "'  " . EASYSHOP_IPN_20 . ": " . $dupltxn . " </b></div>\r\n                     " . $text . "</tr></table>";
                    $report['dupltxn'][$dupltxn]['report_table'] = $full_text;
                    break;
                default:
                    $various++;
                    $report['various'][$various]['report_array'] = $row;
                    $report['various']['report_count'] = $various;
                    $full_text = "<table border='1'  style='border: 1px thin;' cellspacing='5' width='100%'>\r\n                     <tr><td>\r\n                     <div style='text-align:left;'> <b>" . EASYSHOP_IPN_19 . ": '" . $thiscase . "'  " . EASYSHOP_IPN_20 . ": " . $various . " </b></div>\r\n                     " . $text . "</tr></table>";
                    $report['various'][$various]['report_table'] = $full_text;
                    break;
            }
            // End of switch cases
        }
        // End of while fetching rows for sql_report
    }
    // End of condition to start the above when count > 0
    return $report;
}
Example #12
0
 function show_order()
 {
     global $qs, $sql, $ns, $rs, $aa, $plugintable, $plugindir, $tp, $stylespacer;
     if (!getperms("0")) {
         header("location:" . e_SELF);
         exit;
     }
     $catarray = $aa->getCategoryTree("", "", FALSE);
     $array = array_keys($catarray);
     //number of main parents
     $mp = $sql->db_Count($plugintable, "(*)", "WHERE content_parent='0' AND content_refer != 'sa' ");
     if (!is_array($array)) {
         $text = "<div style='text-align:center;'>" . CONTENT_ADMIN_CAT_LAN_9 . "</div>";
     } else {
         $text = "\n\t\t\t\t<div class='text-left'>\n\t\t\t\t" . $rs->form_open("post", e_SELF . "?order", "orderform") . "\n\t\t\t\t<table class='table adminform' id='show_order_02'>\n\t\t\t\t<tr class='panel panel-primary'>\n\t\t\t\t\t<td class='panel-heading' style='width:5%'>" . CONTENT_ADMIN_CAT_LAN_24 . "</td>\n\t\t\t\t\t<td class='panel-heading' style='width:5%'>" . CONTENT_ADMIN_CAT_LAN_25 . "</td>\n\t\t\t\t\t<td class='panel-heading' style='width:15%'>" . CONTENT_ADMIN_CAT_LAN_18 . "</td>\n\t\t\t\t\t<td class='panel-heading' style='width:50%'>" . CONTENT_ADMIN_CAT_LAN_19 . "</td>\n\t\t\t\t\t<td class='panel-heading' style='width:5%; text-align:center; white-space:nowrap;'>" . CONTENT_ADMIN_ITEM_LAN_58 . "</td>\n\t\t\t\t\t<td class='panel-heading' style='width:5%; text-align:center; white-space:nowrap;'>" . CONTENT_ADMIN_ITEM_LAN_59 . "</td>\n\t\t\t\t\t<td class='panel-heading' style='width:5%; text-align:center; white-space:nowrap;'>" . CONTENT_ADMIN_ITEM_LAN_60 . "</td>\n\t\t\t\t</tr>";
         if (!is_object($sql)) {
             $sql = new db();
         }
         foreach ($array as $catid) {
             if (!($category_total = $sql->db_Select($plugintable, "*", "content_id='" . intval($catid) . "' "))) {
                 $text .= "<div style='text-align:center;'>" . CONTENT_ADMIN_CAT_LAN_9 . "</div>";
             } else {
                 $row = $sql->db_Fetch();
                 $content_pref = $aa->getContentPref($catarray[$catid][0]);
                 $content_cat_icon_path_large = $tp->replaceConstants($content_pref["content_cat_icon_path_large"]);
                 $content_cat_icon_path_small = $tp->replaceConstants($content_pref["content_cat_icon_path_small"]);
                 $authordetails = $aa->getAuthor($row['content_author']);
                 $caticon = $content_cat_icon_path_large . $row['content_icon'];
                 $pre = "";
                 if ($row['content_parent'] == "0") {
                     //main parent level
                     $class = "forumheader";
                 } else {
                     //sub level
                     $class = "forumheader3";
                     for ($b = 0; $b < count($catarray[$catid]) / 2 - 1; $b++) {
                         $pre .= "_";
                     }
                 }
                 //count subcategories for a main parent
                 if ($row['content_parent'] == 0) {
                     $ordermax = $mp;
                 } else {
                     $mainparent = $aa->getMainParent($row['content_id']);
                     $subs = $aa->getCategoryTree("", $mainparent, FALSE);
                     $ordermax = count($subs) - 1;
                 }
                 //count items in category
                 $ordercat = "";
                 $ordercatall = "";
                 $up = "";
                 $down = "";
                 $selectorder = "";
                 $sqlc = new db();
                 $n = $sqlc->db_Count($plugintable, "(*)", "WHERE content_parent='" . intval($catid) . "' AND content_refer != 'sa' ");
                 if ($n > 1) {
                     $ordercat = "<a href='" . e_SELF . "?order." . $catarray[$catid][0] . "." . $catid . "'>" . CONTENT_ICON_ORDERCAT . "</a>";
                     $ordercatall = $row['content_parent'] == 0 ? "<a href='" . e_SELF . "?order." . $catid . "'>" . CONTENT_ICON_ORDERALL . "</a>" : "";
                 }
                 $amount = "(" . ($n == 1 ? $n . " " . CONTENT_ADMIN_CAT_LAN_56 : $n . " " . CONTENT_ADMIN_CAT_LAN_57) . ")";
                 //if($ordermax > 1){
                 //up arrow
                 if ($row['content_order'] != 1 && $row['content_order'] != 0) {
                     $up = "<a href='" . e_SELF . "?order.inc." . $catid . "-" . $row['content_order'] . "'>" . CONTENT_ICON_ORDER_UP . "</a> ";
                 } else {
                     $up = "&nbsp;&nbsp;&nbsp;";
                 }
                 //down arrow
                 if ($row['content_order'] != $ordermax) {
                     $down = "<a href='" . e_SELF . "?order.dec." . $catid . "-" . $row['content_order'] . "'>" . CONTENT_ICON_ORDER_DOWN . "</a>";
                 } else {
                     $down = "&nbsp;&nbsp;&nbsp;";
                 }
                 //select box
                 //if($ordermax > 1){
                 $selectorder = "\n\t\t\t\t\t\t\t\t<select name='order[]' class='tbox'>";
                 for ($k = 1; $k <= $ordermax; $k++) {
                     $selectorder .= $rs->form_option($k, $row['content_order'] == $k ? "1" : "0", $catid . "." . $k . ".cat");
                 }
                 $selectorder .= "</select>";
                 //}
                 //}
                 $row['content_heading'] = $tp->toHTML($row['content_heading'], TRUE, "");
                 $row['content_subheading'] = $tp->toHTML($row['content_subheading'], TRUE, "");
                 //<a href='".$plugindir."content.php?cat.".$row['content_id']."'>".CONTENT_ICON_LINK."</a>
                 $caticon = $aa->geticon("catsmall", $row['content_icon'], $content_icon_path, "", "", "");
                 $row['url_content_id'] = $row['content_id'];
                 $text .= "\n\t\t\t\t\t\t" . ($row['content_parent'] == 0 ? "<tr><td colspan='5' {$stylespacer}></td></tr>" : "") . "\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td class='" . $class . "' style='width:5%; text-align:left'>" . $catid . "</td>\n\t\t\t\t\t\t\t<td class='" . $class . "' style='width:5%; text-align:center'>" . ($row['content_icon'] ? $caticon : "&nbsp;") . "</td>\n\t\t\t\t\t\t\t<td class='" . $class . "' style='width:15%'>" . ($authordetails[0] != "0" ? "<a href='" . e_BASE . "user.php?id." . $authordetails[0] . "'>" . CONTENT_ICON_USER . "</a>" : "") . " " . $authordetails[1] . "</td>\n\t\t\t\t\t\t\t<td class='" . $class . "' style='width:50%;'>\n\t\t\t\t\t\t\t\t<a href='" . e107::url("content", "cat", $row, "full") . "'>" . CONTENT_ICON_LINK . "</a>\n\t\t\t\t\t\t\t\t" . $pre . $row['content_heading'] . " " . ($row['content_subheading'] ? "[" . $row['content_subheading'] . "]" : "") . " " . $amount . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class='" . $class . "' style='width:5%; text-align:left; white-space:nowrap;'>\n\t\t\t\t\t\t\t\t" . $ordercat . "\n\t\t\t\t\t\t\t\t" . $ordercatall . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class='" . $class . "' style='width:5%; text-align:center; white-space:nowrap;'>\n\t\t\t\t\t\t\t\t" . $up . "\n\t\t\t\t\t\t\t\t" . $down . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class='" . $class . "' style='width:5%; text-align:center; white-space:nowrap;'>\n\t\t\t\t\t\t\t\t" . $selectorder . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>";
             }
         }
         $text .= "\n\t\t\t\t<tr><td colspan='7' {$stylespacer}></td></tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='fcaption' colspan='5'>&nbsp;</td>\n\t\t\t\t\t<td class='fcaption' colspan='2' style='text-align:center'>\n\t\t\t\t\t\t" . $rs->form_button("submit", "update_order", CONTENT_ADMIN_ITEM_LAN_61) . "\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t\t" . $rs->form_close() . "\n\t\t\t\t</div>";
     }
     $ns->tablerender(CONTENT_ADMIN_ITEM_LAN_62, $text);
 }
Example #13
0
/**
* Get number of comments for an item.
* <p>This method returns the number of comments for the supplied plugin/item id.</p>
* @param   string   a unique ID for this plugin, maximum of 10 character
* @param   int      id of the item comments are allowed for
* @return  int      number of comments for the supplied parameters
*/
function ebGetCommentTotal($pluginid, $id)
{
    global $pref, $e107cache, $tp;
    $query = "where comment_item_id='{$id}' AND comment_type='{$pluginid}'";
    $mysql = new db();
    return $mysql->db_Count("comments", "(*)", $query);
}
Example #14
0
        $text .= "<br />";
    } else {
        $text .= $cap . "<br />";
        $text .= $mains . "<br />";
    }
}
//categories ------------------------
if (isset($linkspage_pref['link_menu_category']) && $linkspage_pref['link_menu_category']) {
    $mains = "";
    $cap = isset($linkspage_pref['link_menu_category_caption']) && $linkspage_pref['link_menu_category_caption'] ? $linkspage_pref['link_menu_category_caption'] : LCLAN_OPT_83;
    $sqlc = new db();
    $sql2 = new db();
    if ($sqlc->db_Select("links_page_cat", "link_category_id, link_category_name", "link_category_class REGEXP '" . e_CLASS_REGEXP . "' ORDER BY link_category_name")) {
        while ($rowc = $sqlc->db_Fetch()) {
            if (isset($linkspage_pref['link_menu_category_amount']) && $linkspage_pref['link_menu_category_amount']) {
                $amount = $sql2->db_Count("links_page", "(*)", "WHERE link_category = '" . $rowc['link_category_id'] . "' AND link_class REGEXP '" . e_CLASS_REGEXP . "' ");
                $amount = "(" . $amount . ")";
            } else {
                $amount = "";
            }
            if (isset($linkspage_pref['link_menu_category_rendertype']) && $linkspage_pref['link_menu_category_rendertype'] == "1") {
                $mains .= $rs->form_option($rowc['link_category_name'] . " " . $amount, "0", $baseurl . "?cat." . $rowc['link_category_id'], "");
            } else {
                $mains .= $bullet . " <a href='" . $baseurl . "?cat." . $rowc['link_category_id'] . "'>" . $rowc['link_category_name'] . "</a> " . $amount . "<br />";
            }
        }
        if (isset($linkspage_pref['link_menu_category_rendertype']) && $linkspage_pref['link_menu_category_rendertype'] == "1") {
            $selectjs = "style='width:100%;' onchange=\"if(this.options[this.selectedIndex].value != ''){ return document.location=this.options[this.selectedIndex].value; }\" ";
            $text .= $rs->form_select_open("category", $selectjs);
            $text .= $rs->form_option($cap, "0", "", "");
            $text .= $mains;
Example #15
0
        $discount_amount = $discount_price;
    } else {
        $discount_amount = $discount_percentage;
    }
    $text .= "\n\t<form name='update_disc' method='POST' action='" . e_SELF . "'>\n\t\t<center>\n\t\t\t<div style='width:80%'>\n\t\t\t\t<fieldset>\n\t\t\t\t\t<legend>\n\t\t\t\t\t\t" . EASYSHOP_ADMIN_DISC_17 . "\n\t\t\t\t\t</legend>";
    $text .= table_discounts($discount_id, $discount_name, $discount_class, $discount_flag, $discount_amount, $discount_valid_from, $discount_valid_till, $discount_code, $cal);
    $text .= "\n\t\t\t\t<br />\n\t\t\t\t<center>\n          <input type='hidden' name='update_disc' value='1'/>\n          <input type='hidden' name='discount_id' value='" . $discount_id . "'/>\n\t\t\t\t\t<input class='button' type='submit' value='" . EASYSHOP_ADMIN_DISC_18 . "'/>\n\t\t\t\t\t&nbsp;<a href='admin_discounts.php'>" . EASYSHOP_ADMIN_DISC_26 . "</a>\n\t\t\t\t</center>\n\t\t\t\t<br />\n\t\t\t\t</fieldset>\n\t\t\t</div>\n\t\t</center>\n\t</form>";
    // Render the value of $edit_text in a table.
    $title = EASYSHOP_ADMIN_DISC_17;
    $ns->tablerender($title, $text);
} else {
    // --------------------------------------------------------------------------+
    // ----------------------- Overview Discounts -------------------------------+
    // --------------------------------------------------------------------------+
    // Determine if there are no discounts
    if ($sql->db_Count(easyshop_discount) > 0) {
        $no_discounts = 1;
    }
    $text .= "\n  <form name='overview_disc' method='POST' action='" . e_SELF . "'>\n\t\t<center>\n\t\t\t\t<fieldset>\n\t\t\t\t\t<legend>\n\t\t\t\t\t\t" . EASYSHOP_ADMIN_DISC_01 . "\n\t\t\t\t\t</legend>";
    // Show a message if there are no discounts to display
    if ($no_discounts == null) {
        $text .= "\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t<center>\n\t\t\t\t\t\t\t<span class='smalltext'>\n\t\t\t\t\t\t\t\t" . EASYSHOP_ADMIN_DISC_02 . "\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</center>\n\t\t\t\t\t\t<br />";
    } else {
        $text .= "\n\t\t\t\t\t\t<center>\n\t\t\t\t\t\t  <table style='" . ADMIN_WIDTH . "' class='fborder'>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td class='fcaption'><b>" . EASYSHOP_ADMIN_DISC_04 . "</b></td>\n\t\t\t\t\t\t\t\t\t<td class='fcaption'><b>" . EASYSHOP_ADMIN_DISC_05 . "</b></td>\n\t\t\t\t\t\t\t\t\t<td class='fcaption'><b>" . EASYSHOP_ADMIN_DISC_06 . "</b></td>\n\t\t\t\t\t\t\t\t\t<td class='fcaption'><b>" . EASYSHOP_ADMIN_DISC_32 . "</b></td>\n\t\t\t\t\t\t\t\t\t<td class='fcaption'><b>" . EASYSHOP_ADMIN_DISC_33 . "</b></td>\n\t\t\t\t\t\t\t\t\t<td class='fcaption'><b>" . EASYSHOP_ADMIN_DISC_34 . "</b></td>\n\t\t\t\t\t\t\t\t\t<td class='fcaption'><center><b>" . EASYSHOP_ADMIN_DISC_11 . "</b></center></td>\n\t\t\t\t\t\t\t\t\t<td class='fcaption'><center><b>" . EASYSHOP_ADMIN_DISC_14 . "</b></center></td>\n\t\t\t\t\t\t\t\t</tr>";
        // Select the discounts in the alphabetical order
        $sql->db_Select(easyshop_discount, "*", "ORDER BY discount_name", "no-where");
        // While there are records available; fill the rows
        while ($row = $sql->db_Fetch()) {
            // Hide date integer values 0
            $discount_valid_from = $row['discount_valid_from'] > 0 ? date("Y/m/d", $row['discount_valid_from']) : "";
            $discount_valid_till = $row['discount_valid_till'] > 0 ? date("Y/m/d", $row['discount_valid_till']) : "";
Example #16
0
require_once e_ADMIN . 'auth.php';
// Get language file (assume that the English language file is always present)
include_lan(e_PLUGIN . 'easyshop/languages/' . e_LANGUAGE . '.php');
require_once 'includes/config.php';
// IPN addition
include_once 'includes/ipn_functions.php';
// Set the active menu option for admin_menu.php
$pageid = 'admin_menu_06';
$sql = new db();
// Wrap the shop monitor page in a table
$text = "<table border='0' width='95%' cellpadding='3'>";
$text .= "<tr>\r\n\t\t\t\t<td valign='top' align='left' width='45%'>\r\n\t\t\t\t\t<center>\r\n\t\t\t\t\t<table class='fborder' width='90%'>\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<td class='fcaption' colspan='2' width='100%'>\r\n\t\t\t\t\t\t\t\t" . EASYSHOP_MONITOR_01 . "\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr>";
// Display active Product Main Categories header
$text .= "<tr>\r\n\t\t\t\t<td class='forumheader'>\r\n\t\t\t\t\t" . EASYSHOP_MONITOR_13 . "\r\n\t\t\t\t</td>\r\n\t\t\t\t<td class='forumheader2'>";
// Count active Product Main Categories
$text .= $sql->db_Count(DB_TABLE_SHOP_MAIN_CATEGORIES, "(*)", "WHERE main_category_active_status = '2'");
$text .= "</td>\r\n\t\t\t</tr>";
// Display inactive Product Main Categories header
$text .= "<tr>\r\n\t\t\t\t<td class='forumheader'>\r\n\t\t\t\t\t" . EASYSHOP_MONITOR_14 . "\r\n\t\t\t\t</td>\r\n\t\t\t\t<td class='forumheader2'>";
// Count inactive Product Categories
$text .= $sql->db_Count(DB_TABLE_SHOP_MAIN_CATEGORIES, "(*)", "WHERE main_category_active_status = '1'");
$text .= "</td>\r\n\t\t\t</tr>";
// Display active Product Categories header
$text .= "<tr>\r\n\t\t\t\t<td class='forumheader'>\r\n\t\t\t\t\t" . EASYSHOP_MONITOR_05 . "\r\n\t\t\t\t</td>\r\n\t\t\t\t<td class='forumheader2'>";
// Count active Product Categories
$text .= $sql->db_Count(DB_TABLE_SHOP_ITEM_CATEGORIES, "(*)", "WHERE category_active_status = '2'");
$text .= "</td>\r\n\t\t\t</tr>";
// Display active Product Categories without Main Category header
$text .= "<tr>\r\n\t\t\t\t<td class='forumheader'>\r\n\t\t\t\t\t" . EASYSHOP_MONITOR_16 . "\r\n\t\t\t\t</td>\r\n\t\t\t\t<td class='forumheader2'>";
// Count active Product Categories without Main Category
$text .= $sql->db_Count(DB_TABLE_SHOP_ITEM_CATEGORIES, "(*)", "WHERE category_active_status = 2 AND category_main_id= ''");
Example #17
0
 public static function dbValidateArray(&$targetData, &$definitions, $targetTable, $userID = 0)
 {
     global $pref;
     $u_sql = new db();
     $allOK = TRUE;
     $userID = intval($userID);
     // Precautionary
     $errMsg = '';
     if (!$targetTable) {
         return FALSE;
     }
     foreach ($targetData['data'] as $f => $v) {
         $errMsg = '';
         if (isset($definitions[$f])) {
             $options = $definitions[$f];
             // Validation options to use
             if (!vartrue($options['fieldOptional']) || $v != '') {
                 $toDo = explode(',', $options['vetMethod']);
                 foreach ($toDo as $vm) {
                     switch ($vm) {
                         case 0:
                             // Shouldn't get this - just do nothing if we do
                             break;
                         case 1:
                             // Check for duplicates.
                             if ($v == '') {
                                 $errMsg = ERR_MISSING_VALUE;
                                 break;
                             }
                             $field = varset($options['dbFieldName'], $f);
                             if ($temp = $u_sql->db_Count($targetTable, "(*)", "WHERE `{$f}`='" . $v . "' AND `user_id` != " . $userID)) {
                                 $errMsg = ERR_DUPLICATE;
                             }
                             //								echo "Duplicate check: {$f} = {$v} Result: {$temp}<br />";
                             break;
                         case 2:
                             // Check against $pref
                             if (isset($options['vetParam']) && isset($pref[$options['vetParam']])) {
                                 $tmp = explode(",", $pref[$options['vetParam']]);
                                 foreach ($tmp as $disallow) {
                                     if ('!' == substr(trim($disallow), -1) && $v == str_replace('!', '', $disallow)) {
                                         // Exact match search (noticed with exclamation mark in the end of the word)
                                         $errMsg = ERR_DISALLOWED_TEXT_EXACT_MATCH;
                                     } elseif (stristr($v, trim($disallow))) {
                                         // Wild card search
                                         $errMsg = ERR_DISALLOWED_TEXT;
                                     }
                                 }
                                 unset($tmp);
                             }
                             break;
                         case 3:
                             // Check email address against remote server
                             if (vartrue($pref['signup_remote_emailcheck'])) {
                                 require_once e_HANDLER . "mail_validation_class.php";
                                 list($adminuser, $adminhost) = split("@", SITEADMINEMAIL);
                                 $validator = new email_validation_class();
                                 $validator->localuser = $adminuser;
                                 $validator->localhost = $adminhost;
                                 $validator->timeout = 3;
                                 //	$validator->debug=1;
                                 //	$validator->html_debug=1;
                                 if ($validator->ValidateEmailBox(trim($v)) != 1) {
                                     $errMsg = ERR_INVALID_EMAIL;
                                 }
                             }
                             break;
                         default:
                             echo 'Invalid vetMethod: ' . $options['vetMethod'] . '<br />';
                             // Really a debug aid - should never get here
                     }
                     if ($errMsg) {
                         break;
                     }
                     // Just trap first error
                 }
                 // Add in other validation methods here
             }
         }
         if ($errMsg) {
             // Update the error
             $targetData['errors'][$f] = $errMsg;
             $targetData['failed'][$f] = $v;
             unset($targetData['data'][$f]);
             // Remove the valid entry
             $allOK = FALSE;
         }
     }
     return $allOK;
 }
Example #18
0
 function checklayout($str)
 {
     // Displays a basic representation of the theme
     global $pref, $ns, $PLUGINS_DIRECTORY, $rs, $sc_style, $tp, $menu_order;
     $menuLayout = $this->curLayout != $pref['sitetheme_deflayout'] ? $this->curLayout : "";
     if (strstr($str, "LOGO")) {
         echo $tp->parseTemplate("{LOGO}");
     } else {
         if (strstr($str, "SITENAME")) {
             echo "[SiteName]";
         } else {
             if (strstr($str, "SITETAG")) {
                 echo "<div style='padding: 2px'>[SiteTag]</div>";
             } else {
                 if (strstr($str, "SITELINKS")) {
                     echo "<div style='padding: 2px; text-align: center'>[SiteLinks]</div>";
                 } else {
                     if (strstr($str, "LANGUAGELINKS")) {
                         echo "<div class=text style='padding: 2px; text-align: center'>[Language]</div>";
                     } else {
                         if (strstr($str, "CUSTOM")) {
                             $cust = preg_replace("/\\W*\\{CUSTOM=(.*?)(\\+.*)?\\}\\W*/si", "\\1", $str);
                             echo "<div style='padding: 2px'>[" . $cust . "]</div>";
                         } else {
                             if (strstr($str, "PLUGIN")) {
                                 $plug = preg_replace("/\\{PLUGIN=(.*?)\\}/si", "\\1", $str);
                                 $plug = trim($plug);
                                 if (file_exists(e_PLUGIN . "{$plug}/{$plug}_config.php")) {
                                     $link = e_PLUGIN . "{$plug}/{$plug}_config.php";
                                 }
                                 if (file_exists(e_PLUGIN . $plug . "/config.php")) {
                                     $link = e_PLUGIN . $plug . "/config.php";
                                 }
                                 $plugtext = $link ? "(" . MENLAN_34 . ":<a href='{$link}' title='" . LAN_CONFIGURE . "'>" . LAN_CONFIGURE . "</a>)" : "(" . MENLAN_34 . ")";
                                 echo "<br />";
                                 $ns->tablerender($plug, $plugtext);
                             } else {
                                 if (strstr($str, "MENU")) {
                                     $matches = array();
                                     if (preg_match_all("/\\{MENU=([\\d]{1,3})(:[\\w\\d]*)?\\}/", $str, $matches)) {
                                         $menuText = "";
                                         foreach ($matches[1] as $menu) {
                                             $menu = preg_replace("/\\{MENU=(.*?)(:.*?)?\\}/si", "\\1", $str);
                                             if (isset($sc_style['MENU']['pre']) && strpos($str, 'ret') !== false) {
                                                 $menuText .= $sc_style['MENU']['pre'];
                                             }
                                             // ---------------
                                             $menuText .= "\n\n<!-- START AREA " . $menu . " -->";
                                             $menuText .= "\n\t\t\t\t\t<div id='start-area-" . $menu . "'>";
                                             $menuText .= "<div class='fborder forumheader' style='font-weight:bold;display:block;text-align:center; font-size:14px' >\n\t\t\t\t\t" . MENLAN_14 . "  " . $menu . "\n\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\n\n";
                                             $sql9 = new db();
                                             //	$sql9 = e107::getDb('sql9');
                                             if ($sql9->db_Count("menus", "(*)", " WHERE menu_location='{$menu}' AND menu_layout = '" . $this->dbLayout . "' ")) {
                                                 unset($text);
                                                 $menuText .= $rs->form_open("post", e_SELF . "?configure=" . $this->curLayout, "frm_menu_" . intval($menu));
                                                 $MODE = 1;
                                                 $sql9->db_Select("menus", "*", "menu_location='{$menu}' AND menu_layout='" . $this->dbLayout . "' ORDER BY menu_order");
                                                 $menu_count = $sql9->db_Rows();
                                                 $cl = $this->dragDrop ? "'portlet" : "regularMenu";
                                                 $menuText .= "\n<div class='column' id='area-" . $menu . "'>\n\n";
                                                 while ($row = $sql9->db_Fetch(MYSQL_ASSOC)) {
                                                     $menuText .= "\n\n\n <!-- Menu Start " . $row['menu_name'] . "-->\n";
                                                     $menuText .= "<div class='{$cl}' id='block-" . $row['menu_id'] . "-" . $menu . "'>\n";
                                                     //	echo "<div class='ggportal'>";
                                                     //	$menuText .= "hi there";
                                                     $menuText .= $this->menuRenderMenu($row, $menu_count);
                                                     //	echo "\n</div>";
                                                     $menuText .= "\n</div>\n";
                                                     $menuText .= "<!-- Menu end -->\n\n\n";
                                                     // echo "<div><br /></div>";
                                                 }
                                                 $menuText .= "\n\n</div>\n\n";
                                                 // End Column
                                                 $menuText .= $rs->form_close();
                                             } else {
                                                 // placeholder
                                                 $menuText .= "<div class='column' id='area-" . $menu . "'><!-- --></div>";
                                             }
                                             $menuText .= "</div><!-- END OF AREA -->\n\n";
                                             // ---------------
                                             if (isset($sc_style['MENU']['post']) && strpos($str, 'ret') !== false) {
                                                 $menuText .= $sc_style['MENU']['post'];
                                             }
                                         }
                                     }
                                     echo $menuText;
                                 } else {
                                     if (strstr($str, "SETSTYLE")) {
                                         $tmp = explode("=", $str);
                                         $style = preg_replace("/\\{SETSTYLE=(.*?)\\}/si", "\\1", $str);
                                         $this->style = $style;
                                     } else {
                                         if (strstr($str, "SITEDISCLAIMER")) {
                                             echo "[Sitedisclaimer]";
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }
Example #19
0
            $l_text .= "</ul></td></tr>";
        }
        // End of while for categories
    }
    // End of while for main categories
}
// End of if active main categories count > 0
// Select all active categories without main category  (Remain backwards compatible with EasyShop 1.2 AND main category is not mandatory)
$sql1 = new db();
$sql1->db_Select(DB_TABLE_SHOP_ITEM_CATEGORIES, "*", "category_active_status = '2' AND category_main_id='' AND (category_class IN (" . USERCLASS_LIST . ")) ");
while ($row1 = $sql1->db_Fetch()) {
    $category_id = $row1['category_id'];
    $category_name = $row1['category_name'];
    $sql2 = new db();
    // Count all active products of the fetched category
    $active_prod_count = $sql2->db_Count(DB_TABLE_SHOP_ITEMS, "(*)", "WHERE item_active_status = '2' AND category_id={$category_id}");
    $l_text .= "<tr><td>&nbsp;&nbsp;<a href='" . e_PLUGIN . "easyshop/easyshop.php?cat.{$category_id}'><b>" . $category_name . "</b></a> ({$active_prod_count})</td></tr>";
    $active_prod_count > 0 ? $l_text .= "<tr><td><ul>" : "";
    // For valid XHTML 1.1
    $sql3 = new db();
    // Select all active products of the fetched category
    $sql3->db_Select(DB_TABLE_SHOP_ITEMS, "*", "item_active_status = '2' AND category_id={$category_id} ORDER BY item_order");
    while ($row3 = $sql3->db_Fetch()) {
        $item_id = $row3['item_id'];
        $item_name = $row3['item_name'];
        $l_text .= "<li><a href='" . e_PLUGIN . "easyshop/easyshop.php?prod.{$item_id}'>" . $item_name . "</a></li>";
    }
    // End of while for products
    $active_prod_count > 0 ? $l_text .= "</ul></td></tr>" : "";
    // For valid XHTML 1.1
}
Example #20
0
}
include_lan(e_PLUGIN . "wowprogress/languages/" . e_LANGUAGE . ".php");
define("WOWPROG", e_PLUGIN . "wowprogress/");
$text = WPMENU_LAN001 . "<br /><br />";
$sql->db_Select("wowprogress_instances", "*") or die(mysql_error());
$heroic_image = file_exists(THEME . "images/heroic.gif") ? THEME . "images/heroic.gif" : WOWPROG . "images/heroic.gif";
$normal_image = file_exists(THEME . "images/normal.gif") ? THEME . "images/normal.gif" : WOWPROG . "images/normal.gif";
$notkilled_image = file_exists(THEME . "images/notkilled.png") ? THEME . "images/notkilled.png" : WOWPROG . "images/notkilled.png";
$killed_image = file_exists(THEME . "images/killed.png") ? THEME . "images/killed.png" : WOWPROG . "images/killed.png";
$attempting_image = file_exists(THEME . "images/attempting.png") ? THEME . "images/attempting.png" : WOWPROG . "images/attempting.png";
$sql3 = new db();
$sql4 = new db();
while ($row = $sql->db_Fetch()) {
    $showinstances = explode(" ", $pref['wowprogress_showinstances']);
    if (in_array($row['id'], $showinstances)) {
        $bosses = $sql3->db_Count("wowprogress_bosses", "(*)", "WHERE instance='" . $row['zonename'] . "'");
        $nkilled = $sql3->db_Count("wowprogress_bosses", "(*)", "WHERE instance='" . $row['zonename'] . "' AND status='2'");
        $hkilled = $sql3->db_Count("wowprogress_bosses", "(*)", "WHERE instance='" . $row['zonename'] . "' AND heroic='2'");
        if ($pref['wowprogress_killstyle'] == "total") {
            if ($row['heroic'] == "1") {
                $killstyle = "(" . ($nkilled + $hkilled) . "/" . $bosses * 2 . ") ";
            } else {
                $killstyle = "(" . $nkilled . "/" . $bosses . ") ";
            }
        } else {
            if ($pref['wowprogress_killstyle'] == "normal") {
                $killstyle = "(" . $nkilled . "/" . $bosses . ") ";
            } else {
                if ($pref['wowprogress_killstyle'] == "heroic") {
                    $killstyle = "(" . $hkilled . "/" . $bosses . ") ";
                } else {
Example #21
0
 function getCommentTotal($pluginid, $id)
 {
     // Get number of comments for an item.
     // This method returns the number of comments for the supplied plugin/item id.
     // @param   string   a unique ID for this plugin, maximum of 10 character
     // @param   int      id of the item comments are allowed for
     // @return  int      number of comments for the supplied parameters
     global $pref, $e107cache, $tp;
     $query = "where comment_item_id='{$id}' AND comment_type='{$pluginid}'";
     $mysql = new db();
     return $mysql->db_Count("comments", "(*)", $query);
 }
Example #22
0
function show_content_score()
{
    global $qs, $plugindir, $ns, $plugintable, $sql, $aa, $e107cache, $tp, $pref, $cobj, $content_icon_path;
    global $from, $datequery, $content_pref, $mainparent, $CONTENT_SCORE_TABLE_SCORE, $CONTENT_SCORE_TABLE_AUTHOR, $authordetails, $row, $thisratearray;
    $newcontent_shortcodes = e107::getScBatch('content', TRUE);
    $mainparent = $aa->getMainParent(intval($qs[1]));
    $content_pref = $aa->getContentPref($mainparent);
    show_content_search_menu("score", $mainparent);
    //show navigator/search/order menu
    if (!isset($CONTENT_SCORE_TABLE)) {
        if (!$content_pref["content_theme"]) {
            require_once $plugindir . "templates/default/content_score_template.php";
        } else {
            if (is_readable($tp->replaceConstants($content_pref["content_theme"]) . "content_score_template.php")) {
                require_once $tp->replaceConstants($content_pref["content_theme"]) . "content_score_template.php";
            } else {
                require_once $plugindir . "templates/default/content_score_template.php";
            }
        }
    }
    $cachestr = "{$plugintable}.score.{$qs['1']}";
    $cachecheck = CachePre($cachestr);
    if ($cachecheck) {
        echo $cachecheck;
        return;
    }
    $content_icon_path = $tp->replaceConstants($content_pref["content_icon_path"]);
    $array = $aa->getCategoryTree("", intval($qs[1]), TRUE);
    $validparent = implode(",", array_keys($array));
    $qry = " content_score != '0' AND content_score != '' AND content_parent REGEXP '" . $aa->CONTENTREGEXP($validparent) . "' " . $datequery . " AND content_class REGEXP '" . e_CLASS_REGEXP . "' ";
    $number = isset($content_pref["content_nextprev_number"]) && $content_pref["content_nextprev_number"] ? $content_pref["content_nextprev_number"] : "5";
    if (!is_object($sql)) {
        $sql = new db();
    }
    $contenttotal = $sql->db_Count($plugintable, "(*)", "WHERE " . $qry . " ");
    if (!$sql->db_Select($plugintable, "content_id, content_heading, content_author, content_icon, content_score", " " . $qry . " ORDER BY content_score DESC LIMIT " . $from . "," . $number . " ")) {
        $content_score_table_string = CONTENT_LAN_88;
    } else {
        while ($row = $sql->db_Fetch()) {
            $CONTENT_SCORE_TABLE_AUTHOR = $aa->prepareAuthor("score", $row['content_author'], $row['content_id']);
            $content_score_table_string .= $tp->parseTemplate($CONTENT_SCORE_TABLE, FALSE, $newcontent_shortcodes);
        }
    }
    $content_score_table_string = $aa->getCrumbPage("score", $array, $mainparent) . $content_score_table_string;
    $text = $CONTENT_SCORE_TABLE_START . $content_score_table_string . $CONTENT_SCORE_TABLE_END;
    $caption = $content_pref['content_score_caption'];
    if (isset($content_pref['content_score_caption_append_name']) && $content_pref['content_score_caption_append_name']) {
        $caption .= " " . $array[intval($qs[1])][1];
    }
    $pagination = $aa->ShowNextPrev("", $from, $number, $contenttotal);
    $ns->tablerender($caption, $text . $pagination);
    $cachecheck = CachePost($cachestr);
}