function get_filters_names($conn) { $filter = array(); //Reputation Activities $filter['act'] = Reputation::get_reputation_activities($conn); //Product types $product_types = Product_type::get_list($conn); $filter['ptype'][0] = _('ANY'); foreach ($product_types as $ptype) { $filter['ptype'][$ptype->get_id()] = $ptype->get_name(); } //Subcategories $subcategories = Subcategory::get_list($conn); $filter['subcat'][0] = _('ANY'); foreach ($subcategories as $subc) { $filter['subcat'][$subc->get_id()] = $subc->get_name(); } //Categories $categories = Category::get_list($conn); $filter['cat'][0] = _('ANY'); foreach ($categories as $cat) { $filter['cat'][$cat->get_id()] = $cat->get_name(); } return $filter; }
?> </tr> </table> </td> </tr> <tr> <td> <table class="transparent" align="center"> <tr> <td> <!-- #### STEP 2: Plugin #### --> <div id="wizard_2"> <?php $plugin_list = Plugin::get_list($conn, "ORDER BY name"); $none_checked = 'true'; $product_types = Product_type::get_list($conn); ?> <input type="hidden" name="plugin_id" id="plugin_id" value="" /> <input type="hidden" name="type" id="type" value="" /> <table width="500" class="transparent" align="center"> <tr> <td class="nobborder center" style='height:48px;'> <div style="padding-bottom:10px"> <?php echo _('Choose between ') . "<b>" . _("Event Types Selection") . "</b> " . _("or") . " <b>" . _('Taxonomy') . "</b>"; ?> </div> <div style="padding-bottom:10px"> <input type="radio" name="plug_type_id" id="plug_type_id" value="0" onclick="change_event_type(0, 'id');" <?php echo !$flag_tax ? "checked='checked'" : ""; ?>
function taxonomy_select($conn) { $product_types = Product_type::get_list($conn); $select = "<div class='select_div_first' >"; $select .= "<div style='float:left;'>" . _('Product Type') . ": </div>"; $select .= "<div style='float:right;'><select id='ptypeselect' style='width:210px;text-align:left;'>"; $select .= "<option title='" . _('Any') . "' value='0' >" . _('Any') . "</option>"; if (is_array($product_types)) { foreach ($product_types as $ptype) { $ptype_name = strlen($ptype->get_name()) > 36 ? substr($ptype->get_name(), 0, 39) . "..." : $ptype->get_name(); $select .= "<option title='" . $ptype->get_name() . "' value='" . $ptype->get_id() . "' >" . $ptype_name . "</option>"; } } $select .= "</select></div></div><br>"; $select .= "<div class='select_div'>"; $select .= "<div style='float:left;'>" . _('Category') . ": </div>"; $select .= "<div style='float:right;'><select id='catselect' style='width:210px;text-align:left;' onchange='change_type(\"subcategory\", \$(this).val())'>"; $select .= "<option title='" . _('Any') . "' value='0' >" . _('Any') . "</option>"; $cat_list = Category::get_list($conn); if (is_array($product_types)) { foreach ($cat_list as $cat) { $cat_name = strlen($cat->get_name()) > 36 ? substr($cat->get_name(), 0, 39) . "..." : $cat->get_name(); $select .= "<option title='" . $cat->get_name() . "' value='" . $cat->get_id() . "' >" . $cat_name . "</option>"; } } $select .= "</select></div></div><br>"; $select .= "<div class='select_div'>"; $select .= "<div style='float:left;'>" . _('Subategory') . ": </div>"; $select .= "<div style='float:right;'><select id='subcatselect' style='width:210px;text-align:left;' >"; $select .= "<option title='" . _('Any') . "' value='0' >" . _('Any') . "</option>"; $select .= "</select></div></div><br>"; return $select; }