case 'delete':
            $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_SPECIALS . '</b>');
            $contents = array('form' => vam_draw_form('specials', FILENAME_CATEGORY_SPECIALS, 'page=' . $_GET['page'] . '&sID=' . $sInfo->special_id . '&action=deleteconfirm'));
            $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
            $contents[] = array('text' => '<br><b>' . $sInfo->categories_name . '</b>');
            $contents[] = array('align' => 'center', 'text' => '<br><span class="button"><button type="submit" value="' . BUTTON_DELETE . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</button></span>&nbsp;<a class="button" href="' . vam_href_link(FILENAME_CATEGORY_SPECIALS, 'page=' . $_GET['page'] . '&sID=' . $sInfo->special_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
            break;
        default:
            if (is_object($sInfo)) {
                $discount_type = $sInfo->discount_type == "p" ? "Percentage" : "Flat Rate Diduction";
                $discount = $sInfo->discount_type == "p" ? sprintf("%0.2f", $sInfo->discount) . " %" : $currencies->format($sInfo->discount);
                $heading[] = array('text' => '<b>' . $sInfo->categories_name . '</b>');
                $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_CATEGORY_SPECIALS, 'page=' . $_GET['page'] . '&sID=' . $sInfo->special_id . '&action=edit') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/edit.png', '', '12', '12') . '&nbsp;' . BUTTON_EDIT . '</span></a> <a class="button" href="' . vam_href_link(FILENAME_CATEGORY_SPECIALS, 'page=' . $_GET['page'] . '&sID=' . $sInfo->special_id . '&action=delete') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</span></a>');
                $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_ADDED . ' ' . vam_date_short($sInfo->special_date_added));
                $contents[] = array('text' => '' . TEXT_INFO_LAST_MODIFIED . ' ' . vam_date_short($sInfo->special_last_modified));
                $contents[] = array('align' => 'center', 'text' => '<br>' . vam_info_image($sInfo->categories_image, $sInfo->categories_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT));
                $contents[] = array('text' => '<br>' . TEXT_INFO_DISCOUNT_TYPE . ' ' . $discount_type);
                $contents[] = array('text' => '' . TEXT_INFO_DISCOUNT . ' ' . $discount);
                $contents[] = array('text' => '<br>' . TEXT_INFO_EXPIRES_DATE . ' <b>' . vam_date_short($sInfo->expire_date) . '</b>');
                $contents[] = array('text' => '' . TEXT_INFO_STATUS_CHANGE . ' ' . vam_date_short($sInfo->date_status_change));
            }
            break;
    }
    if (vam_not_null($heading) && vam_not_null($contents)) {
        echo '            <td width="25%" valign="top">' . "\n";
        $box = new box();
        echo $box->infoBox($heading, $contents);
        echo '            </td>' . "\n";
    }
}
?>
Ejemplo n.º 2
0
        $contents[] = array('text' => '<br />' . vam_draw_checkbox_field('delete_image', '', true) . ' ' . TEXT_DELETE_IMAGE);
        if ($mInfo->products_count > 0) {
            $contents[] = array('text' => '<br />' . vam_draw_checkbox_field('delete_products') . ' ' . TEXT_DELETE_PRODUCTS);
            $contents[] = array('text' => '<br />' . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $mInfo->products_count));
        }
        $contents[] = array('align' => 'center', 'text' => '<br />' . '<span class="button"><button type="submit" value="' . BUTTON_DELETE . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</button></span>' . '&nbsp;' . '<a class="button" href="' . vam_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
        break;
    default:
        if (is_object($mInfo)) {
            $heading[] = array('text' => '<b>' . $mInfo->manufacturers_name . '</b>');
            $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=edit') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/edit.png', '', '12', '12') . '&nbsp;' . BUTTON_EDIT . '</span></a>' . '&nbsp;' . '<a class="button" href="' . vam_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=delete') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</span></a>');
            $contents[] = array('text' => '<br />' . TEXT_DATE_ADDED . ' ' . vam_date_short($mInfo->date_added));
            if (vam_not_null($mInfo->last_modified)) {
                $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . vam_date_short($mInfo->last_modified));
            }
            $contents[] = array('text' => '<br />' . vam_info_image($mInfo->manufacturers_image, $mInfo->manufacturers_name));
            $contents[] = array('text' => '<br />' . TEXT_PRODUCTS . ' ' . $mInfo->products_count);
        }
        break;
}
if (vam_not_null($heading) && vam_not_null($contents)) {
    echo '            <td width="25%" valign="top">' . "\n";
    $box = new box();
    echo $box->infoBox($heading, $contents);
    echo '            </td>' . "\n";
}
?>
          </tr>
        </table></td>
      </tr>
    </table></td>