case 'delete': $heading[] = array('text' => HTML_B_START . TEXT_INFO_HEADING_DELETE_REVIEW . HTML_B_END); $contents = array('form' => olc_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 . HTML_B_END); $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_delete.gif', IMAGE_DELETE) . BLANK . HTML_A_START . olc_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END); break; default: if (is_object($rInfo)) { $heading[] = array('text' => HTML_B_START . $rInfo->products_name . HTML_B_END); $contents[] = array('align' => 'center', 'text' => HTML_A_START . olc_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=edit') . '">' . olc_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . olc_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=delete') . '">' . olc_image_button('button_delete.gif', IMAGE_DELETE) . HTML_A_END); $contents[] = array('text' => HTML_BR . TEXT_INFO_DATE_ADDED . BLANK . olc_date_short($rInfo->date_added)); if (olc_not_null($rInfo->last_modified)) { $contents[] = array('text' => TEXT_INFO_LAST_MODIFIED . BLANK . olc_date_short($rInfo->last_modified)); } $contents[] = array('text' => HTML_BR . olc_info_image($rInfo->products_image, $rInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT)); $contents[] = array('text' => HTML_BR . TEXT_INFO_REVIEW_AUTHOR . BLANK . $rInfo->customers_name); $contents[] = array('text' => TEXT_INFO_REVIEW_RATING . BLANK . olc_image(DIR_WS_CATALOG_IMAGES . 'stars_' . $rInfo->reviews_rating . '.gif')); $contents[] = array('text' => TEXT_INFO_REVIEW_READ . BLANK . $rInfo->reviews_read); $contents[] = array('text' => HTML_BR . TEXT_INFO_REVIEW_SIZE . BLANK . $rInfo->reviews_text_size . ' bytes'); $contents[] = array('text' => HTML_BR . TEXT_INFO_PRODUCTS_AVERAGE_RATING . BLANK . number_format($rInfo->average_rating, 2) . '%'); } break; } if (olc_not_null($heading) && olc_not_null($contents)) { echo ' <td width="25%" valign="top">' . NEW_LINE; $box = new box(); echo $box->infoBox($heading, $contents); echo ' </td>' . NEW_LINE; } ?>
if ($mInfo->products_count > 0) { $contents[] = array('text' => HTML_BR . olc_draw_checkbox_field('delete_products') . BLANK . TEXT_DELETE_PRODUCTS); $contents[] = array('text' => HTML_BR . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $mInfo->products_count)); } $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_delete.gif', IMAGE_DELETE) . BLANK . HTML_A_START . olc_href_link(FILENAME_MANUFACTURERS, $page_parameter . '&mID=' . $mInfo->manufacturers_id) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END); break; default: if (is_object($mInfo)) { $heading[] = array('text' => HTML_B_START . $mInfo->manufacturers_name . HTML_B_END); $contents[] = array('align' => 'center', 'text' => HTML_A_START . olc_href_link(FILENAME_MANUFACTURERS, $page_parameter . '&mID=' . $mInfo->manufacturers_id . '&action=edit') . '">' . olc_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . olc_href_link(FILENAME_MANUFACTURERS, $page_parameter . '&mID=' . $mInfo->manufacturers_id . '&action=delete') . '">' . olc_image_button('button_delete.gif', IMAGE_DELETE) . HTML_A_END); $contents[] = array('text' => HTML_BR . TEXT_DATE_ADDED . BLANK . olc_date_short($mInfo->date_added)); if (olc_not_null($mInfo->last_modified)) { $contents[] = array('text' => TEXT_LAST_MODIFIED . BLANK . olc_date_short($mInfo->last_modified)); } $contents[] = array('text' => HTML_BR . olc_info_image($mInfo->manufacturers_image, $mInfo->manufacturers_name)); $contents[] = array('text' => HTML_BR . TEXT_PRODUCTS . BLANK . $mInfo->products_count); } break; } if (olc_not_null($heading) && olc_not_null($contents)) { echo ' <td width="25%" valign="top">' . NEW_LINE; $box = new box(); echo $box->infoBox($heading, $contents); echo ' </td>' . NEW_LINE; } ?> </tr> </table> </td> </tr>