function _process() { global $osC_Language, $messageStack, $osC_Product; if (empty($_POST['from_name'])) { $messageStack->add('tell_a_friend', $osC_Language->get('error_tell_a_friend_customers_name_empty')); } if (!osc_validate_email_address($_POST['from_email_address'])) { $messageStack->add('tell_a_friend', $osC_Language->get('error_tell_a_friend_invalid_customers_email_address')); } if (empty($_POST['to_name'])) { $messageStack->add('tell_a_friend', $osC_Language->get('error_tell_a_friend_friends_name_empty')); } if (!osc_validate_email_address($_POST['to_email_address'])) { $messageStack->add('tell_a_friend', $osC_Language->get('error_tell_a_friend_invalid_friends_email_address')); } if ($messageStack->size('tell_a_friend') < 1) { include 'includes/classes/email_template.php'; $email_template = toC_Email_Template::getEmailTemplate('tell_a_friend'); $email_template->setData($_POST['from_name'], $_POST['from_email_address'], $_POST['to_name'], $_POST['to_email_address'], $_POST['message'], $osC_Product->getTitle(), osc_href_link(FILENAME_PRODUCTS, $osC_Product->getID(), 'NONSSL', false, true, true)); $email_template->buildMessage(); $email_template->sendEmail(); $messageStack->add_session('header', sprintf($osC_Language->get('success_tell_a_friend_email_sent'), $osC_Product->getTitle(), osc_output_string_protected($_POST['to_name'])), 'success'); osc_redirect(osc_href_link(FILENAME_PRODUCTS, $osC_Product->getID())); } }
function _process() { global $osC_Language, $osC_MessageStack, $osC_Product; if (empty($_POST['from_name'])) { $osC_MessageStack->add('tell_a_friend', $osC_Language->get('error_tell_a_friend_customers_name_empty')); } if (!osc_validate_email_address($_POST['from_email_address'])) { $osC_MessageStack->add('tell_a_friend', $osC_Language->get('error_tell_a_friend_invalid_customers_email_address')); } if (empty($_POST['to_name'])) { $osC_MessageStack->add('tell_a_friend', $osC_Language->get('error_tell_a_friend_friends_name_empty')); } if (!osc_validate_email_address($_POST['to_email_address'])) { $osC_MessageStack->add('tell_a_friend', $osC_Language->get('error_tell_a_friend_invalid_friends_email_address')); } if ($osC_MessageStack->size('tell_a_friend') < 1) { $email_subject = sprintf($osC_Language->get('email_tell_a_friend_subject'), osc_sanitize_string($_POST['from_name']), STORE_NAME); $email_body = sprintf($osC_Language->get('email_tell_a_friend_intro'), osc_sanitize_string($_POST['to_name']), osc_sanitize_string($_POST['from_name']), $osC_Product->getTitle(), STORE_NAME) . "\n\n"; if (!empty($_POST['message'])) { $email_body .= osc_sanitize_string($_POST['message']) . "\n\n"; } $email_body .= sprintf($osC_Language->get('email_tell_a_friend_link'), osc_href_link(FILENAME_PRODUCTS, $osC_Product->getKeyword(), 'NONSSL', false)) . "\n\n" . sprintf($osC_Language->get('email_tell_a_friend_signature'), STORE_NAME . "\n" . HTTP_SERVER . DIR_WS_CATALOG . "\n"); osc_email(osc_sanitize_string($_POST['to_name']), osc_sanitize_string($_POST['to_email_address']), $email_subject, $email_body, osc_sanitize_string($_POST['from_name']), osc_sanitize_string($_POST['from_email_address'])); $osC_MessageStack->add('header', sprintf($osC_Language->get('success_tell_a_friend_email_sent'), $osC_Product->getTitle(), osc_output_string_protected($_POST['to_name'])), 'success'); osc_redirect(osc_href_link(FILENAME_PRODUCTS, $osC_Product->getID())); } }
public function getIcon($size = 16, $icon = null, $title = null) { if (empty($icon)) { $icon = $this->_application->getIcon(); } return '<img src="' . OSCOM::getPublicSiteLink('images/applications/' . (int) $size . '/' . $icon) . '" border="0" alt="" title="' . osc_output_string_protected($title) . '" width="' . (int) $size . '" height="' . (int) $size . '" />'; }
function _setData() { global $osC_Database, $osC_Language, $osC_Currencies; if (!isset($osC_Currencies)) { if (!class_exists('osC_Currencies')) { include '../includes/classes/currencies.php'; } $osC_Currencies = new osC_Currencies(); } $this->_data = '<table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">' . ' <thead>' . ' <tr>' . ' <th>' . $osC_Language->get('summary_products_table_heading_products') . '</th>' . ' <th>' . $osC_Language->get('summary_products_table_heading_price') . '</th>' . ' <th>' . $osC_Language->get('summary_products_table_heading_date') . '</th>' . ' <th>' . $osC_Language->get('summary_products_table_heading_status') . '</th>' . ' </tr>' . ' </thead>' . ' <tbody>'; $Qproducts = $osC_Database->query('select products_id, greatest(products_date_added, products_last_modified) as date_last_modified from :table_products where parent_id = 0 order by date_last_modified desc limit 6'); $Qproducts->bindTable(':table_products', TABLE_PRODUCTS); $Qproducts->execute(); while ($Qproducts->next()) { $data = osC_Products_Admin::get($Qproducts->valueInt('products_id')); $products_icon = osc_icon('products.png'); $products_price = $data['products_price']; if (!empty($data['variants'])) { $products_icon = osc_icon('attach.png'); $products_price = null; foreach ($data['variants'] as $variant) { if ($products_price === null || $variant['data']['price'] < $products_price) { $products_price = $variant['data']['price']; } } if ($products_price === null) { $products_price = 0; } } $this->_data .= ' <tr onmouseover="rowOverEffect(this);" onmouseout="rowOutEffect(this);">' . ' <td>' . osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, 'products=' . (int) $data['products_id'] . '&action=save'), $products_icon . ' ' . osc_output_string_protected($data['products_name'])) . '</td>' . ' <td>' . (!empty($data['variants']) ? 'from ' : '') . $osC_Currencies->format($products_price) . '</td>' . ' <td>' . $Qproducts->value('date_last_modified') . '</td>' . ' <td align="center">' . osc_icon((int) $data['products_status'] === 1 ? 'checkbox_ticked.gif' : 'checkbox_crossed.gif', null, null) . '</td>' . ' </tr>'; } $this->_data .= ' </tbody>' . '</table>'; $Qproducts->freeResult(); }
public static function execute(ApplicationAbstract $application) { $OSCOM_Customer = Registry::get('Customer'); $OSCOM_NavigationHistory = Registry::get('NavigationHistory'); $OSCOM_MessageStack = Registry::get('MessageStack'); $OSCOM_Service = Registry::get('Service'); $OSCOM_Breadcrumb = Registry::get('Breadcrumb'); if (ALLOW_GUEST_TO_TELL_A_FRIEND == '-1' && $OSCOM_Customer->isLoggedOn() === false) { $OSCOM_NavigationHistory->setSnapshot(); osc_redirect(OSCOM::getLink(null, 'Account', 'LogIn', 'SSL')); } $requested_product = null; $product_check = false; if (count($_GET) > 3) { $requested_product = basename(key(array_slice($_GET, 3, 1, true))); if ($requested_product == 'Write') { unset($requested_product); if (count($_GET) > 4) { $requested_product = basename(key(array_slice($_GET, 4, 1, true))); } } } if (isset($requested_product)) { if (Product::checkEntry($requested_product)) { $product_check = true; } } if ($product_check === false) { $application->setPageContent('not_found.php'); return false; } Registry::set('Product', new Product($requested_product)); $OSCOM_Product = Registry::get('Product'); if (empty($_POST['from_name'])) { $OSCOM_MessageStack->add('TellAFriend', OSCOM::getDef('error_tell_a_friend_customers_name_empty')); } if (!osc_validate_email_address($_POST['from_email_address'])) { $OSCOM_MessageStack->add('TellAFriend', OSCOM::getDef('error_tell_a_friend_invalid_customers_email_address')); } if (empty($_POST['to_name'])) { $OSCOM_MessageStack->add('TellAFriend', OSCOM::getDef('error_tell_a_friend_friends_name_empty')); } if (!osc_validate_email_address($_POST['to_email_address'])) { $OSCOM_MessageStack->add('TellAFriend', OSCOM::getDef('error_tell_a_friend_invalid_friends_email_address')); } if ($OSCOM_MessageStack->size('TellAFriend') < 1) { $email_subject = sprintf(OSCOM::getDef('email_tell_a_friend_subject'), osc_sanitize_string($_POST['from_name']), STORE_NAME); $email_body = sprintf(OSCOM::getDef('email_tell_a_friend_intro'), osc_sanitize_string($_POST['to_name']), osc_sanitize_string($_POST['from_name']), $OSCOM_Product->getTitle(), STORE_NAME) . "\n\n"; if (!empty($_POST['message'])) { $email_body .= osc_sanitize_string($_POST['message']) . "\n\n"; } $email_body .= sprintf(OSCOM::getDef('email_tell_a_friend_link'), OSCOM::getLink(null, null, $OSCOM_Product->getKeyword(), 'NONSSL', false)) . "\n\n" . sprintf(OSCOM::getDef('email_tell_a_friend_signature'), STORE_NAME . "\n" . HTTP_SERVER . DIR_WS_CATALOG . "\n"); osc_email(osc_sanitize_string($_POST['to_name']), osc_sanitize_string($_POST['to_email_address']), $email_subject, $email_body, osc_sanitize_string($_POST['from_name']), osc_sanitize_string($_POST['from_email_address'])); $OSCOM_MessageStack->add('header', sprintf(OSCOM::getDef('success_tell_a_friend_email_sent'), $OSCOM_Product->getTitle(), osc_output_string_protected($_POST['to_name'])), 'success'); osc_redirect(OSCOM::getLink(null, null, $OSCOM_Product->getKeyword())); } $application->setPageTitle($OSCOM_Product->getTitle()); $application->setPageContent('tell_a_friend.php'); }
function format($address, $new_line = "\n") { global $osC_Database; $address_format = ''; if (is_numeric($address)) { $Qaddress = $osC_Database->query('select ab.entry_firstname as firstname, ab.entry_lastname as lastname, ab.entry_company as company, ab.entry_street_address as street_address, ab.entry_suburb as suburb, ab.entry_city as city, ab.entry_postcode as postcode, ab.entry_state as state, ab.entry_zone_id as zone_id, ab.entry_country_id as country_id, ab.entry_telephone as telephone_number, z.zone_code as zone_code, c.countries_name as country_title from :table_address_book ab left join :table_zones z on (ab.entry_zone_id = z.zone_id), :table_countries c where ab.address_book_id = :address_book_id and ab.entry_country_id = c.countries_id'); $Qaddress->bindTable(':table_address_book', TABLE_ADDRESS_BOOK); $Qaddress->bindTable(':table_zones', TABLE_ZONES); $Qaddress->bindTable(':table_countries', TABLE_COUNTRIES); $Qaddress->bindInt(':address_book_id', $address); $Qaddress->execute(); $address = $Qaddress->toArray(); } $firstname = $lastname = ''; if (isset($address['firstname']) && !empty($address['firstname'])) { $firstname = $address['firstname']; $lastname = $address['lastname']; } elseif (isset($address['name']) && !empty($address['name'])) { $firstname = $address['name']; } $state = $address['state']; $state_code = $address['zone_code']; if (isset($address['zone_id']) && is_numeric($address['zone_id']) && $address['zone_id'] > 0) { $state = osC_Address::getZoneName($address['zone_id']); $state_code = osC_Address::getZoneCode($address['zone_id']); } $country = $address['country_title']; if (empty($country) && isset($address['country_id']) && is_numeric($address['country_id']) && $address['country_id'] > 0) { $country = osC_Address::getCountryName($address['country_id']); } if (isset($address['format'])) { $address_format = $address['format']; } elseif (isset($address['country_id']) && is_numeric($address['country_id']) && $address['country_id'] > 0) { $address_format = osC_Address::getFormat($address['country_id']); } if (empty($address_format)) { $address_format = ":name\n:street_address\n:postcode :city\n:country"; } if (defined('DISPLAY_TELEPHONE_NUMBER') && (int) DISPLAY_TELEPHONE_NUMBER == 1) { if (strpos($address_format, 'telephone_number') == false) { $address_format .= "\n:telephone_number"; } } $find_array = array('/\\:name\\b/', '/\\:street_address\\b/', '/\\:suburb\\b/', '/\\:city\\b/', '/\\:postcode\\b/', '/\\:state\\b/', '/\\:state_code\\b/', '/\\:country\\b/', '/\\:telephone_number\\b/'); $replace_array = array(osc_output_string_protected($firstname . ' ' . $lastname), osc_output_string_protected($address['street_address']), osc_output_string_protected($address['suburb']), osc_output_string_protected($address['city']), osc_output_string_protected($address['postcode']), osc_output_string_protected($state), osc_output_string_protected($state_code), osc_output_string_protected($country), osc_output_string_protected($address['telephone_number'])); $formated = preg_replace($find_array, $replace_array, $address_format); if (ACCOUNT_COMPANY > -1 && !empty($address['company'])) { $company = osc_output_string_protected($address['company']); $formated = $company . $new_line . $formated; } if ($new_line != "\n") { $formated = str_replace("\n", $new_line, $formated); } return $formated; }
function _setData() { global $osC_Database, $osC_Language; $this->_data = '<table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">' . ' <thead>' . ' <tr>' . ' <th>' . $osC_Language->get('summary_error_log_table_heading_date') . '</th>' . ' <th>' . $osC_Language->get('summary_error_log_table_heading_message') . '</th>' . ' </tr>' . ' </thead>' . ' <tbody>'; $counter = 0; foreach (osc_toObjectInfo(osC_ErrorLog_Admin::getAll())->get('entries') as $log) { $this->_data .= ' <tr onmouseover="$(this).addClass(\'mouseOver\');" onmouseout="$(this).removeClass(\'mouseOver\');"' . ($counter % 2 ? ' class="alt"' : '') . '>' . ' <td style="white-space: nowrap;">' . osc_icon('error.png') . ' ' . osc_output_string_protected($log['date']) . '</td>' . ' <td>' . osc_output_string_protected(substr($log['message'], 0, 60)) . '..</td>' . ' </tr>'; $counter++; if ($counter == 6) { break; } } $this->_data .= ' </tbody>' . '</table>'; }
function initialize() { global $osC_Database, $osC_Services, $osC_Cache, $osC_Language, $osC_Product, $osC_Image; $this->_title_link = osc_href_link(FILENAME_PRODUCTS, 'reviews'); if ($osC_Services->isStarted('reviews')) { if (BOX_REVIEWS_CACHE > 0 && $osC_Cache->read('box-reviews' . (isset($osC_Product) && is_a($osC_Product, 'osC_Product') && $osC_Product->isValid() ? '-' . $osC_Product->getID() : '') . '-' . $osC_Language->getCode(), BOX_REVIEWS_CACHE)) { $data = $osC_Cache->getCache(); } else { $data = array(); $Qreview = $osC_Database->query('select r.reviews_id, r.reviews_rating, p.products_id, pd.products_name, pd.products_keyword, i.image from :table_reviews r, :table_products p left join :table_products_images i on (p.products_id = i.products_id and i.default_flag = :default_flag), :table_products_description pd where r.products_id = p.products_id and p.products_status = 1 and r.languages_id = :language_id and p.products_id = pd.products_id and pd.language_id = :language_id and r.reviews_status = 1'); $Qreview->bindTable(':table_reviews', TABLE_REVIEWS); $Qreview->bindTable(':table_products_images', TABLE_PRODUCTS_IMAGES); $Qreview->bindTable(':table_products', TABLE_PRODUCTS); $Qreview->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION); $Qreview->bindInt(':default_flag', 1); $Qreview->bindInt(':language_id', $osC_Language->getID()); $Qreview->bindInt(':language_id', $osC_Language->getID()); if (isset($osC_Product) && is_a($osC_Product, 'osC_Product') && $osC_Product->isValid()) { $Qreview->appendQuery('and p.products_id = :products_id'); $Qreview->bindInt(':products_id', $osC_Product->getID()); } $Qreview->appendQuery('order by r.reviews_id desc limit :max_random_select_reviews'); $Qreview->bindInt(':max_random_select_reviews', BOX_REVIEWS_RANDOM_SELECT); $Qreview->executeRandomMulti(); if ($Qreview->numberOfRows()) { $Qtext = $osC_Database->query('select substring(reviews_text, 1, 60) as reviews_text from :table_reviews where reviews_id = :reviews_id and languages_id = :languages_id'); $Qtext->bindTable(':table_reviews', TABLE_REVIEWS); $Qtext->bindInt(':reviews_id', $Qreview->valueInt('reviews_id')); $Qtext->bindInt(':languages_id', $osC_Language->getID()); $Qtext->execute(); $data = array_merge($Qreview->toArray(), $Qtext->toArray()); $Qtext->freeResult(); $Qreview->freeResult(); } $osC_Cache->write($data); } $this->_content = ''; if (empty($data)) { if (isset($osC_Product) && is_a($osC_Product, 'osC_Product') && $osC_Product->isValid()) { $this->_content = '<div style="float: left; width: 55px;">' . osc_link_object(osc_href_link(FILENAME_PRODUCTS, 'reviews=new&' . $osC_Product->getKeyword()), osc_image(DIR_WS_IMAGES . 'box_write_review.gif', $osC_Language->get('button_write_review'))) . '</div>' . osc_link_object(osc_href_link(FILENAME_PRODUCTS, 'reviews=new&' . $osC_Product->getKeyword()), $osC_Language->get('box_reviews_write')) . '<div style="clear: both;"></div>'; } } else { if (!empty($data['image'])) { $this->_content = '<div align="center">' . osc_link_object(osc_href_link(FILENAME_PRODUCTS, 'reviews=' . $data['reviews_id'] . '&' . $data['products_keyword']), $osC_Image->show($data['image'], $data['products_name'])) . '</div>'; } $this->_content .= osc_link_object(osc_href_link(FILENAME_PRODUCTS, 'reviews=' . $data['reviews_id'] . '&' . $data['products_keyword']), wordwrap(osc_output_string_protected($data['reviews_text']), 15, '­') . ' ..') . '<br /><div align="center">' . osc_image(DIR_WS_IMAGES . 'stars_' . $data['reviews_rating'] . '.png', sprintf($osC_Language->get('box_reviews_stars_rating'), $data['reviews_rating'])) . '</div>'; } } }
public function initialize() { $OSCOM_Service = Registry::get('Service'); $OSCOM_Cache = Registry::get('Cache'); $OSCOM_Product = Registry::exists('Product') ? Registry::get('Product') : null; $OSCOM_Language = Registry::get('Language'); $OSCOM_Database = Registry::get('Database'); $OSCOM_Image = Registry::get('Image'); $this->_title_link = OSCOM::getLink(null, 'Products', 'Reviews'); if ($OSCOM_Service->isStarted('Reviews')) { if (BOX_REVIEWS_CACHE > 0 && $OSCOM_Cache->read('box-reviews' . (isset($OSCOM_Product) && $OSCOM_Product instanceof \osCommerce\OM\Site\Shop\Product && $OSCOM_Product->isValid() ? '-' . $OSCOM_Product->getID() : '') . '-' . $OSCOM_Language->getCode(), BOX_REVIEWS_CACHE)) { $data = $OSCOM_Cache->getCache(); } else { $data = array(); $Qreview = $OSCOM_Database->query('select r.reviews_id, r.reviews_rating, p.products_id, pd.products_name, pd.products_keyword, i.image from :table_reviews r, :table_products p left join :table_products_images i on (p.products_id = i.products_id and i.default_flag = :default_flag), :table_products_description pd where r.products_id = p.products_id and p.products_status = 1 and r.languages_id = :language_id and p.products_id = pd.products_id and pd.language_id = :language_id and r.reviews_status = 1'); $Qreview->bindInt(':default_flag', 1); $Qreview->bindInt(':language_id', $OSCOM_Language->getID()); $Qreview->bindInt(':language_id', $OSCOM_Language->getID()); if (isset($OSCOM_Product) && $OSCOM_Product instanceof \osCommerce\OM\Site\Shop\Product && $OSCOM_Product->isValid()) { $Qreview->appendQuery('and p.products_id = :products_id'); $Qreview->bindInt(':products_id', $OSCOM_Product->getID()); } $Qreview->appendQuery('order by r.reviews_id desc limit :max_random_select_reviews'); $Qreview->bindInt(':max_random_select_reviews', BOX_REVIEWS_RANDOM_SELECT); $Qreview->executeRandomMulti(); if ($Qreview->numberOfRows()) { $Qtext = $OSCOM_Database->query('select substring(reviews_text, 1, 60) as reviews_text from :table_reviews where reviews_id = :reviews_id and languages_id = :languages_id'); $Qtext->bindInt(':reviews_id', $Qreview->valueInt('reviews_id')); $Qtext->bindInt(':languages_id', $OSCOM_Language->getID()); $Qtext->execute(); $data = array_merge($Qreview->toArray(), $Qtext->toArray()); } $OSCOM_Cache->write($data); } $this->_content = ''; if (empty($data)) { if (isset($OSCOM_Product) && $OSCOM_Product instanceof \osCommerce\OM\Site\Shop\Product && $OSCOM_Product->isValid()) { $this->_content = '<div style="float: left; width: 55px;">' . osc_link_object(OSCOM::getLink(null, 'Products', 'Reviews&Write&' . $OSCOM_Product->getKeyword()), osc_image(DIR_WS_IMAGES . 'box_write_review.gif', OSCOM::getDef('button_write_review'))) . '</div>' . osc_link_object(OSCOM::getLink(null, 'Products', 'Reviews&Write&' . $OSCOM_Product->getKeyword()), OSCOM::getDef('box_reviews_write')) . '<div style="clear: both;"></div>'; } } else { if (!empty($data['image'])) { $this->_content = '<div align="center">' . osc_link_object(OSCOM::getLink(null, 'Products', 'Reviews&View=' . $data['reviews_id'] . '&' . $data['products_keyword']), $OSCOM_Image->show($data['image'], $data['products_name'])) . '</div>'; } $this->_content .= osc_link_object(OSCOM::getLink(null, 'Products', 'Reviews&View=' . $data['reviews_id'] . '&' . $data['products_keyword']), wordwrap(osc_output_string_protected($data['reviews_text']), 15, '­') . ' ..') . '<br /><div align="center">' . osc_image(DIR_WS_IMAGES . 'stars_' . $data['reviews_rating'] . '.png', sprintf(OSCOM::getDef('box_reviews_stars_rating'), $data['reviews_rating'])) . '</div>'; } } }
/** * Correctly format an address to the address format rule assigned to its country * * @param array $address An array (or address_book ID) containing the address information * @param string $new_line The string to break new lines with * @access public * @return string */ public static function format($address, $new_line = null) { $OSCOM_Database = Registry::get('Database'); $address_format = ''; if (is_numeric($address)) { $Qaddress = $OSCOM_Database->query('select ab.entry_firstname as firstname, ab.entry_lastname as lastname, ab.entry_company as company, ab.entry_street_address as street_address, ab.entry_suburb as suburb, ab.entry_city as city, ab.entry_postcode as postcode, ab.entry_state as state, ab.entry_zone_id as zone_id, ab.entry_country_id as country_id, z.zone_code as zone_code, c.countries_name as country_title from :table_address_book ab left join :table_zones z on (ab.entry_zone_id = z.zone_id), :table_countries c where ab.address_book_id = :address_book_id and ab.entry_country_id = c.countries_id'); $Qaddress->bindInt(':address_book_id', $address); $Qaddress->execute(); $address = $Qaddress->toArray(); } $firstname = $lastname = ''; if (isset($address['firstname']) && !empty($address['firstname'])) { $firstname = $address['firstname']; $lastname = $address['lastname']; } elseif (isset($address['name']) && !empty($address['name'])) { $firstname = $address['name']; } $state = $address['state']; $state_code = $address['zone_code']; if (isset($address['zone_id']) && is_numeric($address['zone_id']) && $address['zone_id'] > 0) { $state = self::getZoneName($address['zone_id']); $state_code = self::getZoneCode($address['zone_id']); } $country = $address['country_title']; if (empty($country) && isset($address['country_id']) && is_numeric($address['country_id']) && $address['country_id'] > 0) { $country = self::getCountryName($address['country_id']); } if (isset($address['format'])) { $address_format = $address['format']; } elseif (isset($address['country_id']) && is_numeric($address['country_id']) && $address['country_id'] > 0) { $address_format = self::getFormat($address['country_id']); } if (empty($address_format)) { $address_format = ":name\n:street_address\n:postcode :city\n:country"; } $find_array = array('/\\:name\\b/', '/\\:street_address\\b/', '/\\:suburb\\b/', '/\\:city\\b/', '/\\:postcode\\b/', '/\\:state\\b/', '/\\:state_code\\b/', '/\\:country\\b/'); $replace_array = array(osc_output_string_protected($firstname . ' ' . $lastname), osc_output_string_protected($address['street_address']), osc_output_string_protected($address['suburb']), osc_output_string_protected($address['city']), osc_output_string_protected($address['postcode']), osc_output_string_protected($state), osc_output_string_protected($state_code), osc_output_string_protected($country)); $formated = preg_replace($find_array, $replace_array, $address_format); if (ACCOUNT_COMPANY > -1 && !empty($address['company'])) { $formated = osc_output_string_protected($address['company']) . "\n" . $formated; } if (!empty($new_line)) { $formated = str_replace("\n", $new_line, $formated); } return $formated; }
function showConfirmation() { global $osC_Database, $osC_Language, $osC_Template; $Qrecipients = $osC_Database->query('select count(*) as total from :table_customers c left join :table_newsletters_log nl on (c.customers_email_address = nl.email_address and nl.newsletters_id = :newsletters_id) where c.customers_newsletter = 1 and nl.email_address is null'); $Qrecipients->bindTable(':table_customers', TABLE_CUSTOMERS); $Qrecipients->bindTable(':table_newsletters_log', TABLE_NEWSLETTERS_LOG); $Qrecipients->bindInt(':newsletters_id', $this->_newsletter_id); $Qrecipients->execute(); $this->_audience_size = $Qrecipients->valueInt('total'); $confirmation_string = '<p><font color="#ff0000"><b>' . sprintf($osC_Language->get('newsletter_newsletter_total_recipients'), $this->_audience_size) . '</b></font></p>' . '<p><b>' . $this->_newsletter_title . '</b></p>' . '<p>' . nl2br(osc_output_string_protected($this->_newsletter_content)) . '</p>' . '<form name="execute" action="' . osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&page=' . $_GET['page'] . '&nID=' . $this->_newsletter_id . '&action=send') . '" method="post">' . '<p align="right">'; if ($this->_audience_size > 0) { $confirmation_string .= osc_draw_hidden_field('subaction', 'execute') . '<input type="submit" value="' . $osC_Language->get('button_send') . '" class="operationButton" /> ' . '<input type="button" value="' . $osC_Language->get('button_cancel') . '" onclick="document.location.href=\'' . osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&page=' . $_GET['page']) . '\'" class="operationButton" />'; } else { $confirmation_string .= '<input type="button" value="' . $osC_Language->get('button_back') . '" onclick="document.location.href=\'' . osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&page=' . $_GET['page']) . '\'" class="operationButton" />'; } $confirmation_string .= '</p>' . '</form>'; return $confirmation_string; }
public function __construct() { Registry::get('Language')->loadIniFile('modules/IndexModules/ErrorLog.php'); $this->_title = OSCOM::getDef('admin_indexmodules_errorlog_title'); $this->_title_link = OSCOM::getLink(null, 'ErrorLog'); if (Access::hasAccess(OSCOM::getSite(), 'ErrorLog')) { $this->_data = '<table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">' . ' <thead>' . ' <tr>' . ' <th>' . OSCOM::getDef('admin_indexmodules_errorlog_table_heading_date') . '</th>' . ' <th>' . OSCOM::getDef('admin_indexmodules_errorlog_table_heading_message') . '</th>' . ' </tr>' . ' </thead>' . ' <tbody>'; if (ErrorHandler::getTotalEntries() > 0) { $counter = 0; foreach (ErrorHandler::getAll(6) as $row) { $this->_data .= ' <tr onmouseover="$(this).addClass(\'mouseOver\');" onmouseout="$(this).removeClass(\'mouseOver\');"' . ($counter % 2 ? ' class="alt"' : '') . '>' . ' <td style="white-space: nowrap;">' . Registry::get('Template')->getIcon(16, 'errorlog.png') . ' ' . DateTime::getShort(DateTime::fromUnixTimestamp($row['timestamp']), true) . '</td>' . ' <td>' . osc_output_string_protected(substr($row['message'], 0, 60)) . '..</td>' . ' </tr>'; $counter++; } } else { $this->_data .= ' <tr onmouseover="$(this).addClass(\'mouseOver\');" onmouseout="$(this).removeClass(\'mouseOver\');">' . ' <td colspan="2">' . osc_icon('tick.png') . ' ' . OSCOM::getDef('admin_indexmodules_errorlog_no_errors_found') . '</td>' . ' </tr>'; } $this->_data .= ' </tbody>' . '</table>'; } }
function initialize() { $OSCOM_Service = Registry::get('Service'); $OSCOM_RecentlyVisited = Registry::get('RecentlyVisited'); $OSCOM_Image = Registry::get('Image'); if ($OSCOM_Service->isStarted('RecentlyVisited') && $OSCOM_RecentlyVisited->hasHistory()) { $this->_content = '<table border="0" width="100%" cellspacing="0" cellpadding="2">' . ' <tr>'; if ($OSCOM_RecentlyVisited->hasProducts()) { $this->_content .= ' <td valign="top">' . ' <h6>' . OSCOM::getDef('recently_visited_products_title') . '</h6>' . ' <ol style="list-style: none; margin: 0; padding: 0;">'; foreach ($OSCOM_RecentlyVisited->getProducts() as $product) { $this->_content .= '<li style="padding-bottom: 15px;">'; if (SERVICE_RECENTLY_VISITED_SHOW_PRODUCT_IMAGES == '1') { $this->_content .= '<span style="float: left; width: ' . ($OSCOM_Image->getWidth('mini') + 10) . 'px; text-align: center;">' . osc_link_object(OSCOM::getLink(null, 'Products', $product['keyword']), $OSCOM_Image->show($product['image'], $product['name'], null, 'mini')) . '</span>'; } $this->_content .= '<div style="float: left;">' . osc_link_object(OSCOM::getLink(null, 'Products', $product['keyword']), $product['name']) . '<br />'; if (SERVICE_RECENTLY_VISITED_SHOW_PRODUCT_PRICES == '1') { $this->_content .= $product['price'] . ' '; } $this->_content .= '<i>(' . sprintf(OSCOM::getDef('recently_visited_item_in_category'), osc_link_object(OSCOM::getLink(null, 'Index', 'cPath=' . $product['category_path']), $product['category_name'])) . ')</i></div>' . '<div style="clear: both;"></div>' . '</li>'; } $this->_content .= ' </ol>' . ' </td>'; } if ($OSCOM_RecentlyVisited->hasCategories()) { $this->_content .= ' <td valign="top">' . ' <h6>' . OSCOM::getDef('recently_visited_categories_title') . '</h6>' . ' <ol style="list-style: none; margin: 0; padding: 0;">'; foreach ($OSCOM_RecentlyVisited->getCategories() as $category) { $this->_content .= '<li>' . osc_link_object(OSCOM::getLink(null, 'Index', 'cPath=' . $category['path']), $category['name']); if (!empty($category['parent_id'])) { $this->_content .= ' <i>(' . sprintf(OSCOM::getDef('recently_visited_item_in_category'), osc_link_object(OSCOM::getLink(null, 'Index', 'cPath=' . $category['parent_id']), $category['parent_name'])) . ')</i>'; } $this->_content .= '</li>'; } $this->_content .= ' </ol>' . ' </td>'; } if ($OSCOM_RecentlyVisited->hasSearches()) { $this->_content .= ' <td valign="top">' . ' <h6>' . OSCOM::getDef('recently_visited_searches_title') . '</h6>' . ' <ol style="list-style: none; margin: 0; padding: 0;">'; foreach ($OSCOM_RecentlyVisited->getSearches() as $searchphrase) { $this->_content .= '<li>' . osc_link_object(OSCOM::getLink(null, 'Search', 'keywords=' . $searchphrase['keywords']), osc_output_string_protected($searchphrase['keywords'])) . ' <i>(' . number_format($searchphrase['results']) . ' results)</i></li>'; } $this->_content .= ' </ol>' . ' </td>'; } $this->_content .= ' </tr>' . '</table>'; } }
public function get($group) { $result = false; if ($this->exists($group)) { $data = array(); foreach ($this->_data[$group] as $message) { $data['messageStack' . ucfirst($message['type'])][] = $message['text']; } $result = ''; foreach ($data as $type => $messages) { $result .= '<div class="' . osc_output_string_protected($type) . '" onmouseover="$(this).find(\'span:first\').show();" onmouseout="$(this).find(\'span:first\').hide();"><span style="float: right; display: none;"><a href="#" onclick="$(this).parent().parent().slideFadeToggle();">' . osc_icon('minimize.png', 'Hide') . '</a></span>'; foreach ($messages as $message) { $result .= '<p>' . osc_output_string_protected($message) . '</p>'; } $result .= '</div>'; } unset($this->_data[$group]); } return $result; }
protected function valueMixed($column, $type = 'string') { if (!isset($this->result)) { $this->fetch(); } switch ($type) { case 'protected': return osc_output_string_protected($this->result[$column]); break; case 'int': return (int) $this->result[$column]; break; case 'decimal': return (double) $this->result[$column]; break; case 'string': default: return $this->result[$column]; } }
function initialize() { global $osC_Services, $osC_RecentlyVisited, $osC_Language, $osC_Image; if ($osC_Services->isStarted('recently_visited') && $osC_RecentlyVisited->hasHistory()) { $this->_content = '<table border="0" width="100%" cellspacing="3" cellpadding="2">' . ' <tr>'; if ($osC_RecentlyVisited->hasProducts()) { $this->_content .= ' <td valign="top">' . ' <h6>' . $osC_Language->get('recently_visited_products_title') . '</h6>' . ' <ol style="list-style: none; margin: 0; padding: 0;">'; foreach ($osC_RecentlyVisited->getProducts() as $product) { $this->_content .= '<li style="padding-bottom: 10px;">'; if (SERVICE_RECENTLY_VISITED_SHOW_PRODUCT_IMAGES == '1') { $this->_content .= '<span style="float: right; width: ' . ($osC_Image->getWidth('mini') + 10) . 'px; margin-left: 5px">' . osc_link_object(osc_href_link(FILENAME_PRODUCTS, $product['id']), $osC_Image->show($product['image'], $product['name'], null, 'mini')) . '</span>'; } $this->_content .= '<div style="">' . osc_link_object(osc_href_link(FILENAME_PRODUCTS, $product['id']), $product['name']) . '<br />'; if (SERVICE_RECENTLY_VISITED_SHOW_PRODUCT_PRICES == '1') { $this->_content .= $product['price'] . ' '; } $this->_content .= '<i>(' . sprintf($osC_Language->get('recently_visited_item_in_category'), osc_link_object(osc_href_link(FILENAME_DEFAULT, 'cPath=' . $product['category_path']), $product['category_name'])) . ')</i></div>' . '<div style="clear: both;"></div>' . '</li>'; } $this->_content .= ' </ol>' . ' </td>'; } if ($osC_RecentlyVisited->hasCategories()) { $this->_content .= ' <td valign="top">' . ' <h6>' . $osC_Language->get('recently_visited_categories_title') . '</h6>' . ' <ol style="list-style: none; margin: 0; padding: 0;">'; foreach ($osC_RecentlyVisited->getCategories() as $category) { $this->_content .= '<li>' . osc_link_object(osc_href_link(FILENAME_DEFAULT, 'cPath=' . $category['path']), $category['name']); if (!empty($category['parent_id'])) { $this->_content .= ' <i>(' . sprintf($osC_Language->get('recently_visited_item_in_category'), osc_link_object(osc_href_link(FILENAME_DEFAULT, 'cPath=' . $category['parent_id']), $category['parent_name'])) . ')</i>'; } $this->_content .= '</li>'; } $this->_content .= ' </ol>' . ' </td>'; } if ($osC_RecentlyVisited->hasSearches()) { $this->_content .= ' <td valign="top">' . ' <h6>' . $osC_Language->get('recently_visited_searches_title') . '</h6>' . ' <ol style="list-style: none; margin: 0; padding: 0;">'; foreach ($osC_RecentlyVisited->getSearches() as $searchphrase) { $this->_content .= '<li>' . osc_link_object(osc_href_link(FILENAME_SEARCH, 'keywords=' . $searchphrase['keywords']), osc_output_string_protected($searchphrase['keywords'])) . ' <i>(' . number_format($searchphrase['results']) . ' results)</i></li>'; } $this->_content .= ' </ol>' . ' </td>'; } $this->_content .= ' </tr>' . '</table>'; } }
public function __construct() { Registry::get('Language')->loadIniFile('modules/Dashboard/Products.php'); $this->_title = OSCOM::getDef('admin_indexmodules_products_title'); $this->_title_link = OSCOM::getLink(null, 'Products'); if (Access::hasAccess(OSCOM::getSite(), 'Products')) { if (!isset($osC_Currencies)) { if (!class_exists('osC_Currencies')) { include 'includes/classes/currencies.php'; } $osC_Currencies = new osC_Currencies(); } $this->_data = '<table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">' . ' <thead>' . ' <tr>' . ' <th>' . OSCOM::getDef('admin_indexmodules_products_table_heading_products') . '</th>' . ' <th>' . OSCOM::getDef('admin_indexmodules_products_table_heading_price') . '</th>' . ' <th>' . OSCOM::getDef('admin_indexmodules_products_table_heading_date') . '</th>' . ' <th>' . OSCOM::getDef('admin_indexmodules_products_table_heading_status') . '</th>' . ' </tr>' . ' </thead>' . ' <tbody>'; $Qproducts = Registry::get('PDO')->query('select products_id, greatest(products_date_added, products_last_modified) as date_last_modified from :table_products where parent_id is null order by date_last_modified desc limit 6'); $Qproducts->execute(); $counter = 0; while ($Qproducts->fetch()) { $data = osC_Products_Admin::get($Qproducts->valueInt('products_id')); $products_icon = osc_icon('products.png'); $products_price = $data['products_price']; if (!empty($data['variants'])) { $products_icon = osc_icon('attach.png'); $products_price = null; foreach ($data['variants'] as $variant) { if ($products_price === null || $variant['data']['price'] < $products_price) { $products_price = $variant['data']['price']; } } if ($products_price === null) { $products_price = 0; } } $this->_data .= ' <tr onmouseover="$(this).addClass(\'mouseOver\');" onmouseout="$(this).removeClass(\'mouseOver\');"' . ($counter % 2 ? ' class="alt"' : '') . '>' . ' <td>' . osc_link_object(OSCOM::getLink(null, 'Products', 'id=' . (int) $data['products_id'] . '&action=save'), $products_icon . ' ' . osc_output_string_protected($data['products_name'])) . '</td>' . ' <td>' . (!empty($data['variants']) ? 'from ' : '') . $osC_Currencies->format($products_price) . '</td>' . ' <td>' . $Qproducts->value('date_last_modified') . '</td>' . ' <td align="center">' . osc_icon((int) $data['products_status'] === 1 ? 'checkbox_ticked.gif' : 'checkbox_crossed.gif', null, null) . '</td>' . ' </tr>'; $counter++; } $this->_data .= ' </tbody>' . '</table>'; } }
<?php if (is_writeable($_SESSION['fm_directory'])) { ?> <form name="fmNewDirectory" action="<?php echo osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&action=saveDirectory'); ?> " method="post"> <p><?php echo $osC_Language->get('introduction_new_directory'); ?> </p> <p><?php echo '<b>' . osc_output_string_protected($_SESSION['fm_directory']) . '</b>'; ?> </p> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="40%"><?php echo '<b>' . $osC_Language->get('field_directory_name') . '</b>'; ?> </td> <td width="60%"><?php echo osc_draw_input_field('directory_name', null, 'style="width: 100%;"'); ?> </td> </tr> </table>
} ?> <div class="infoBoxHeading"><?php echo osc_icon('trash.png') . ' ' . osc_output_string_protected($osC_ObjectInfo->get('customers_full_name')); ?> </div> <div class="infoBoxContent"> <form name="cDelete" action="<?php echo osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&cID=' . $osC_ObjectInfo->get('customers_id') . '&search=' . $_GET['search'] . '&page=' . $_GET['page'] . '&action=delete'); ?> " method="post"> <p><?php echo $osC_Language->get('introduction_delete_customer'); ?> </p> <p><?php echo '<b>' . osc_output_string_protected($osC_ObjectInfo->get('customers_full_name')) . '</b>'; ?> </p> <p align="center"><?php echo osc_draw_hidden_field('subaction', 'confirm') . '<input type="submit" value="' . $osC_Language->get('button_delete') . '" class="operationButton" /> <input type="button" value="' . $osC_Language->get('button_cancel') . '" onclick="document.location.href=\'' . osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&search=' . $_GET['search'] . '&page=' . $_GET['page']) . '\';" class="operationButton" />'; ?> </p> </form> </div>
echo '<ul class="apps" style="float: right;">'; if ($OSCOM_Application->canLinkTo()) { if (Access::isShortcut(OSCOM::getSiteApplication())) { echo ' <li class="shortcuts">' . osc_link_object(OSCOM::getLink(null, 'Dashboard', 'RemoveShortcut&shortcut=' . OSCOM::getSiteApplication()), osc_icon('shortcut_remove.png')) . '</li>'; } else { echo ' <li class="shortcuts">' . osc_link_object(OSCOM::getLink(null, 'Dashboard', 'AddShortcut&shortcut=' . OSCOM::getSiteApplication()), osc_icon('shortcut_add.png')) . '</li>'; } } if (Access::hasShortcut()) { echo ' <li class="shortcuts">'; foreach (Access::getShortcuts() as $shortcut) { echo '<a href="' . OSCOM::getLink(null, $shortcut['module']) . '" id="shortcut-' . $shortcut['module'] . '">' . $OSCOM_Template->getIcon(16, $shortcut['icon'], $shortcut['title']) . '<div class="notBubble"></div></a>'; } echo ' </li>'; } echo ' <li><a href="#"><span class="ui-icon ui-icon-triangle-1-s" style="float: right;"></span>' . osc_output_string_protected($_SESSION[OSCOM::getSite()]['username']) . '</a>' . ' <ul>' . ' <li><a href="' . OSCOM::getLink(null, 'Login', 'Logoff') . '">' . OSCOM::getDef('header_title_logoff') . '</a></li>' . ' </ul>' . ' </li>' . '</ul>'; } ?> </div> <script type="text/javascript"> $('#adminMenu .apps').droppy({speed: 0}); $('#adminMenu .apps li img').tipsy(); </script> <?php if (isset($_SESSION[OSCOM::getSite()]['id'])) { ?> <script type="text/javascript">
$osC_ObjectInfo = new osC_ObjectInfo(osC_Languages_Admin::getDefinition($_GET['dID'])); ?> <h1><?php echo osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule()), $osC_Template->getPageTitle()); ?> </h1> <?php if ($osC_MessageStack->exists($osC_Template->getModule())) { echo $osC_MessageStack->get($osC_Template->getModule()); } ?> <div class="infoBoxHeading"><?php echo osc_icon('edit.png') . ' ' . osc_output_string_protected($_GET['group']); ?> </div> <div class="infoBoxContent"> <form name="lDefine" class="dataForm" action="<?php echo osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '=' . (int) $_GET[$osC_Template->getModule()] . '&group=' . $_GET['group'] . '&action=edit_definition'); ?> " method="post"> <p><?php echo $osC_Language->get('introduction_edit_language_definitions'); ?> </p> <fieldset> <div><label for="def[<?php
/** * Outputs a form textarea field * * @param string $name The name and ID of the textarea field * @param string $value The default value for the textarea field * @param int $width The width of the textarea field * @param int $height The height of the textarea field * @param string $parameters Additional parameters for the textarea field * @param boolean $override Override the default value with the value found in the GET or POST scope * @access public */ function osc_draw_textarea_field($name, $value = null, $width = 60, $height = 5, $parameters = null, $override = true) { if (!is_bool($override)) { $override = true; } if ($override === true) { if (isset($_GET[$name])) { $value = $_GET[$name]; } elseif (isset($_POST[$name])) { $value = $_POST[$name]; } } if (!is_numeric($width)) { $width = 60; } if (!is_numeric($height)) { $width = 5; } $field = '<textarea name="' . osc_output_string($name) . '" cols="' . (int) $width . '" rows="' . (int) $height . '"'; if (strpos($parameters, 'id=') === false) { $field .= ' id="' . osc_output_string($name) . '"'; } if (!empty($parameters)) { $field .= ' ' . $parameters; } $field .= '>' . osc_output_string_protected($value) . '</textarea>'; return $field; }
<?php } } if (isset($_SESSION['comments']) && !empty($_SESSION['comments'])) { ?> <div class="moduleBox"> <h6><?php echo '<b>' . $osC_Language->get('order_comments_title') . '</b> '; ?> </h6> <div class="content"> <?php echo nl2br(osc_output_string_protected($_SESSION['comments'])) . osc_draw_hidden_field('comments', $_SESSION['comments']); ?> </div> </div> <?php } ?> <?php global $osC_OrderTotal_coupon; if (isset($osC_OrderTotal_coupon) && is_object($osC_OrderTotal_coupon) && $osC_OrderTotal_coupon->isEnabled()) { ?> <div class="moduleBox"> <h6><?php echo '<b>' . $osC_Language->get('coupons_redeem_heading') . '</b>'; ?>
function getIcon() { return osc_image('images/social_bookmarks/' . $this->icon, osc_output_string_protected($this->title)); }
echo osc_icon('trash.png') . ' ' . osc_output_string_protected($_GET['group']); ?> </h3> <form name="gDelete" class="dataForm" action="<?php echo OSCOM::getLink(null, null, 'DeleteGroup&Process&id=' . $_GET['id'] . '&group=' . $_GET['group']); ?> " method="post"> <p><?php echo OSCOM::getDef('introduction_delete_definition_group'); ?> </p> <p><?php echo '<b>' . osc_output_string_protected($_GET['group']) . '</b>'; ?> </p> <p> <?php foreach ($OSCOM_ObjectInfo->get('entries') as $l) { echo Languages::get($l['languages_id'], 'name') . ': ' . (int) $l['total_entries'] . '<br />'; } ?> </p> <p><?php echo osc_draw_button(array('priority' => 'primary', 'icon' => 'trash', 'title' => OSCOM::getDef('button_delete'))) . ' ' . osc_draw_button(array('href' => OSCOM::getLink(null, null, 'id=' . $_GET['id']), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel')));
<?php /* $Id: index.php $ TomatoCart Open Source Shopping Cart Solutions http://www.tomatocart.com Copyright (c) 2009 Wuxi Elootec Technology Co., Ltd; Copyright (c) 2006 osCommerce This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 (1991) as published by the Free Software Foundation. */ ?> <h1><?php echo $osC_Template->getPageTitle(); ?> </h1> <?php if ($osC_Customer->isLoggedOn()) { echo '<p>' . sprintf($osC_Language->get('greeting_customer'), osc_output_string_protected($osC_Customer->getFirstName()), osc_href_link(FILENAME_PRODUCTS, 'new')) . '</p>'; } else { echo '<p>' . sprintf($osC_Language->get('greeting_guest'), osc_href_link(FILENAME_ACCOUNT, 'login', 'SSL'), osc_href_link(FILENAME_PRODUCTS, 'new')) . '</p>'; } ?> <?php echo $osC_Language->get('index_text');
<div class="moduleBox"> <h6><span style="float: left;"><?php echo $osC_Language->get('order_status') . ' ' . osC_Order::getLastPublicStatus($Qhistory->value('orders_id')); ?> </span><?php echo $osC_Language->get('order_number') . ' ' . $Qhistory->valueInt('orders_id'); ?> </h6> <div class="content"> <table border="0" width="100%" cellspacing="2" cellpadding="4"> <tr> <td valign="top"><?php echo '<b>' . $osC_Language->get('order_date') . '</b> ' . osC_DateTime::getLong($Qhistory->value('date_purchased')) . '<br /><b>' . $order_type . '</b> ' . osc_output_string_protected($order_name); ?> </td> <td width="150" valign="top"><?php echo '<b>' . $osC_Language->get('order_products') . '</b> ' . osC_Order::numberOfProducts($Qhistory->valueInt('orders_id')) . '<br /><b>' . $osC_Language->get('order_cost') . '</b> ' . strip_tags($Qhistory->value('order_total')); ?> </td> <td width="100" align="center"> <div style = "padding: 2px;"><?php echo osc_link_object(osc_href_link(FILENAME_ACCOUNT, 'orders=' . $Qhistory->valueInt('orders_id') . (isset($_GET['page']) ? '&page=' . $_GET['page'] : ''), 'SSL'), osc_draw_image_button('small_view.gif', $osC_Language->get('button_view'))); ?> </div> <div style = "padding: 2px;"><?php echo osc_link_object(osc_href_link(FILENAME_PDF, 'module=account&pdf=print_order&orders_id=' . $Qhistory->valueInt('orders_id')), osc_draw_image_button('button_print.png', $osC_Language->get('button_print')), "target=_blank"); ?> </div>
<div class="infoBoxHeading"><?php echo osc_icon('edit.png') . ' ' . $osC_ObjectInfo->get('products_name'); ?> </div> <div class="infoBoxContent"> <form name="review" action="<?php echo osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&page=' . $_GET['page'] . '&rID=' . $_GET['rID'] . '&action=save'); ?> " method="post"> <p><?php echo '<b>' . $osC_Language->get('field_product') . '</b><br />' . $osC_ObjectInfo->get('products_name'); ?> </p> <p><?php echo '<b>' . $osC_Language->get('field_author') . '</b><br />' . osc_output_string_protected($osC_ObjectInfo->get('customers_name')); ?> </p> <p><?php echo '<b>' . $osC_Language->get('field_date_added') . '</b><br />' . osC_DateTime::getShort($osC_ObjectInfo->get('date_added')); ?> </p> <p><?php echo '<b>' . $osC_Language->get('field_review') . '</b><br />' . osc_draw_textarea_field('reviews_text', $osC_ObjectInfo->get('reviews_text')); ?> </p> <p><?php echo '<b>' . $osC_Language->get('field_rating') . '</b><br />' . $osC_Language->get('rating_bad') . ' ' . osc_draw_radio_field('reviews_rating', $rating_array, $osC_ObjectInfo->get('reviews_rating')) . ' ' . $osC_Language->get('rating_good'); ?> </p>
/** * Get the value of a key element in the array data set and protect the output value * * @param string $key The name of the array key * @access public */ public function getProtected($key) { return osc_output_string_protected($this->_data[$key]); }
echo osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&entry=' . $file['name'] . '&action=save'), osc_icon('edit.png')) . ' ' . osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&entry=' . $file['name'] . '&action=download'), osc_icon('save.png')) . ' '; } else { echo osc_image('images/pixel_trans.gif') . ' ' . osc_image('images/pixel_trans.gif') . ' '; } echo osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&entry=' . $file['name'] . '&action=delete'), osc_icon('trash.png')); ?> </td> </tr> <?php } ?> </tbody> </table> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td style="opacity: 0.5; filter: alpha(opacity=50);"><?php echo '<b>' . $osC_Language->get('table_action_legend') . '</b> ' . osc_icon('edit.png') . ' ' . $osC_Language->get('icon_edit') . ' ' . osc_icon('download.png') . ' ' . $osC_Language->get('icon_download') . ' ' . osc_icon('trash.png') . ' ' . $osC_Language->get('icon_trash'); ?> </td> </tr> </table> <p><?php echo osc_output_string_protected($_SESSION['fm_directory']); ?> </p>