}
            if ($mInfo->products_count > 0) {
                $contents[] = array('text' => '<div class="checkbox"><label>' . xos_draw_checkbox_field('delete_products') . ' ' . TEXT_DELETE_PRODUCTS . '</label></div>');
                $contents[] = array('text' => '<br />' . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $mInfo->products_count));
            }
            $contents[] = array('text' => '<br /><a href="" onclick="manufacturers.submit(); return false" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a><a href="' . xos_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a><br />&nbsp;');
            break;
        default:
            if (isset($mInfo) && is_object($mInfo)) {
                $heading_title = '<b>' . $mInfo->manufacturers_name . '</b>';
                $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=edit') . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_EDIT . ' ">' . BUTTON_TEXT_EDIT . '</a><a href="' . xos_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=delete') . '" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a>');
                $contents[] = array('text' => '<br />' . TEXT_DATE_ADDED . ' ' . xos_date_short($mInfo->date_added));
                if (xos_not_null($mInfo->last_modified)) {
                    $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . xos_date_short($mInfo->last_modified));
                }
                $manufacturer_inputs_string = '';
                $languages = xos_get_languages();
                for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
                    $manufacturer_inputs_string .= '<br />' . xos_image(DIR_WS_CATALOG_IMAGES . 'catalog/templates/' . DEFAULT_TPL . '/' . $languages[$i]['directory'] . '/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . xos_get_manufacturers_name($mInfo->manufacturers_id, $languages[$i]['id']);
                }
                $contents[] = array('text' => $manufacturer_inputs_string);
                $contents[] = array('text' => '<br />' . xos_info_image('manufacturers/' . $mInfo->manufacturers_image, $mInfo->manufacturers_name));
                $contents[] = array('text' => '<br />' . TEXT_PRODUCTS . ' ' . $mInfo->products_count);
            }
            break;
    }
    $smarty->assign(array('info_box_heading_title' => $heading_title, 'info_box_form_tag' => $form_tag, 'info_box_contents' => $contents));
    $output_infobox_manufacturers = $smarty->fetch(ADMIN_TPL . '/includes/boxes/infobox_manufacturers.tpl');
    $smarty->clearAssign(array('info_box_heading_title', 'info_box_form_tag', 'info_box_contents'));
    $smarty->assign('infobox_manufacturers', $output_infobox_manufacturers);
}
Exemplo n.º 2
0
            $cross_products = xos_db_fetch_array($cross_products_query);
            $select = '<select name="' . $cross_products['products_id'] . '">';
            for ($y = 1; $y <= $ordering_size; $y++) {
                $select .= '<option value="' . $y . '"';
                if (!strcmp($y, $cross['sort_order'])) {
                    $select .= ' selected="selected"';
                }
                $select .= '>' . $y . '</option>';
            }
            $select .= '</select>';
            if ($cross_products['products_status'] == '1') {
                $products_status_image = xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_green.gif', ICON_TITLE_STATUS_GREEN);
            } else {
                $products_status_image = xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_red.gif', ICON_TITLE_STATUS_RED);
            }
            $cross_products_array[] = array('product_id' => $cross_products['products_id'], 'product_model' => $cross_products['products_model'], 'product_status_image' => $products_status_image, 'product_name' => $cross_products['products_name'], 'select_tag' => $select);
        }
        if ($product['products_status'] == '1') {
            $smarty->assign('product_status_image', xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_green.gif', ICON_TITLE_STATUS_GREEN));
        } else {
            $smarty->assign('product_status_image', xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_red.gif', ICON_TITLE_STATUS_RED));
        }
        $smarty->assign(array('sort_related_products' => true, 'form_begin_runing_update' => xos_draw_form('runing_update', FILENAME_XSELL_PRODUCTS, 'sort=1&add_related_product_ID=' . $_GET['add_related_product_ID'] . '&categories_or_pages_id=' . $categories_or_pages_id . '&manufacturers_id=' . $manufacturers_id . '&max_rows=' . $_GET['max_rows']), 'link_to_relating_products' => xos_href_link(FILENAME_XSELL_PRODUCTS, 'categories_or_pages_id=' . $categories_or_pages_id . '&manufacturers_id=' . $manufacturers_id . '&max_rows=' . $_GET['max_rows']), 'product_id' => $product['products_id'], 'product_name' => $product['products_name'], 'product_model' => $product['products_model'], 'product_image' => xos_info_image('products/small/' . $product_image['name'], $product['products_name']), 'cross_products' => $cross_products_array));
    }
    $smarty->assign('form_end', '</form>');
    $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'xsell');
    $output_xsell = $smarty->fetch(ADMIN_TPL . '/xsell.tpl');
    $smarty->assign('central_contents', $output_xsell);
    $smarty->display(ADMIN_TPL . '/frame.tpl');
    require DIR_WS_INCLUDES . 'application_bottom.php';
}
Exemplo n.º 3
0
switch ($action) {
    case 'delete':
        $heading_title = '<b>' . TEXT_INFO_HEADING_DELETE_REVIEW . '</b>';
        $form_tag = xos_draw_form('reviews', FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=deleteconfirm');
        $contents[] = array('text' => TEXT_INFO_DELETE_REVIEW_INTRO);
        $contents[] = array('text' => '<br /><b>' . $rInfo->products_name . '</b>');
        $contents[] = array('text' => '<br /><a href="" onclick="reviews.submit(); return false" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_DELETE . ' "><span>' . BUTTON_TEXT_DELETE . '</span></a><a href="' . xos_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br />&nbsp;');
        break;
    default:
        if (isset($rInfo) && is_object($rInfo)) {
            $product_image = xos_get_product_images($rInfo->products_image);
            $heading_title = '<b>' . $rInfo->products_name . '</b>';
            $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=edit') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_EDIT . ' "><span>' . BUTTON_TEXT_EDIT . '</span></a><a href="' . xos_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=delete') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_DELETE . ' "><span>' . BUTTON_TEXT_DELETE . '</span></a>');
            $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_ADDED . ' ' . xos_date_short($rInfo->date_added));
            if (xos_not_null($rInfo->last_modified)) {
                $contents[] = array('text' => TEXT_INFO_LAST_MODIFIED . ' ' . xos_date_short($rInfo->last_modified));
            }
            $contents[] = array('text' => '<br />' . xos_info_image('products/small/' . $product_image['name'], $rInfo->products_name));
            $contents[] = array('text' => '<br />' . TEXT_INFO_REVIEW_AUTHOR . ' ' . $rInfo->customers_name);
            $contents[] = array('text' => TEXT_INFO_REVIEW_RATING . ' ' . xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/stars_' . $rInfo->reviews_rating . '.gif'));
            $contents[] = array('text' => TEXT_INFO_REVIEW_READ . ' ' . $rInfo->reviews_read);
            $contents[] = array('text' => '<br />' . TEXT_INFO_REVIEW_SIZE . ' ' . $rInfo->reviews_text_size . ' bytes');
            $contents[] = array('text' => '<br />' . TEXT_INFO_PRODUCTS_AVERAGE_RATING . ' ' . number_format($rInfo->average_rating, 2) . '%');
        }
        break;
}
$smarty->assign(array('info_box_heading_title' => $heading_title, 'info_box_form_tag' => $form_tag, 'info_box_contents' => $contents));
$output_infobox_reviews = $smarty->fetch(ADMIN_TPL . '/includes/boxes/infobox_reviews.tpl');
$smarty->clearAssign(array('info_box_heading_title', 'info_box_form_tag', 'info_box_contents'));
$smarty->assign('infobox_reviews', $output_infobox_reviews);
return 'overwrite_all';