[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/includes/ -> meta_tags.php (source)

   1  <?php
   2  // FILE: meta_tags.php
   3  // USE : This file controls the title, meta description,
   4  //       and meta keywords of every page on your web site.
   5  //       See the install docs for instructions.
   6  
   7  // define META_TEXT_PRICE in your includes/languages/english/index.php file if you want a price prefix
   8  // so for example add: "define('META_TEXT_PRICE', 'Price: ');" to this index.php file (without the outer double quotes)
   9  if(!defined(META_TEXT_PRICE)) define ('META_TEXT_PRICE', '');
  10  // Define Primary Section Output
  11  define('PRIMARY_SECTION', ' : ');
  12  define('TITLE', 'AABox Web Hosting');
  13  // Define Secondary Section Output
  14  define('SECONDARY_SECTION', ' - ');
  15  
  16  // Define Tertiary Section Output
  17  define('TERTIARY_SECTION', ',  ');
  18  
  19  // Optional customization options for each language
  20  switch ($languages_id) {
  21  // English language
  22    case '1':
  23      //Extra keywords that will be outputted on every page
  24      $mt_extra_keywords = '';
  25        //Descriptive tagline of your web site
  26        $web_site_tagline = TERTIARY_SECTION . '';
  27        break;
  28    // German language
  29    case '2':
  30      //Extra keywords that will be outputted on every page
  31      $mt_extra_keywords = '';
  32        //Descriptive tagline of your web site
  33        $web_site_tagline = TERTIARY_SECTION . '';
  34        break;
  35    // Spanish language
  36    case '3':
  37      //Extra keywords that will be outputted on every page
  38      $mt_extra_keywords = '';
  39        //Descriptive tagline of your web site
  40        $web_site_tagline = TERTIARY_SECTION . '';
  41        break;
  42    }
  43    // Clear web site tagline if not customized
  44    if ($web_site_tagline == TERTIARY_SECTION) {
  45      $web_site_tagline = '';
  46    }
  47    // Get all top category names for use with web site keywords
  48    $mt_categories_query = tep_db_query("select cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."'");
  49    while ($mt_categories = tep_db_fetch_array($mt_categories_query))  {
  50      $mt_keywords_string .= $mt_categories['categories_name'] . ',';
  51    }
  52    define('WEB_SITE_KEYWORDS', $mt_keywords_string . $mt_extra_keywords);
  53  
  54    switch ($content) {
  55      case CONTENT_ADVANCED_SEARCH:
  56        define('META_TAG_TITLE', NAVBAR_TITLE_1 . PRIMARY_SECTION . TITLE . $web_site_tagline);
  57          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_1 . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
  58          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . NAVBAR_TITLE_1);
  59          break;
  60      case CONTENT_ADVANCED_SEARCH_RESULT:
  61        define('META_TAG_TITLE', NAVBAR_TITLE_2 . PRIMARY_SECTION . TITLE . $web_site_tagline);
  62          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_2 . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
  63          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . NAVBAR_TITLE_2);
  64          break;
  65    //START UPDATE
  66      case CONTENT_ACCOUNT_EDIT:
  67        define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . $web_site_tagline);
  68          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_1 . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
  69          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . NAVBAR_TITLE_1);
  70          break;
  71      case CONTENT_ACCOUNT_HISTORY:
  72        define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . $web_site_tagline);
  73          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_1 . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
  74          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . NAVBAR_TITLE_1);
  75          break;
  76      case CONTENT_ACCOUNT_HISTORY_INFO:
  77        define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . $web_site_tagline);
  78          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_1 . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
  79          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . NAVBAR_TITLE_1);
  80          break;
  81      case CONTENT_ACCOUNT_NEWSLETTERS:
  82        define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . $web_site_tagline);
  83          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_1 . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
  84          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . NAVBAR_TITLE_1);
  85          break;
  86      case CONTENT_ACCOUNT_NOTIFICATIONS:
  87        define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . $web_site_tagline);
  88          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_1 . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
  89          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . NAVBAR_TITLE_1);
  90          break;
  91      case CONTENT_ACCOUNT_PASSWORD:
  92        define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . $web_site_tagline);
  93          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_1 . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
  94          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . NAVBAR_TITLE_1);
  95          break;
  96      case CONTENT_ADDRESS_BOOK:
  97        define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . $web_site_tagline);
  98          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_1 . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
  99          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . NAVBAR_TITLE_1);
 100          break;
 101      case CONTENT_ADDRESS_BOOK_PROCESS:
 102        define('META_TAG_TITLE', NAVBAR_TITLE_2 . PRIMARY_SECTION . TITLE . $web_site_tagline);
 103          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_1 . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
 104          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . NAVBAR_TITLE_1);
 105          break;
 106      case CONTENT_ADDRESS_BOOK_PROCESS:
 107        define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . $web_site_tagline);
 108          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_1 . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
 109          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . NAVBAR_TITLE_1);
 110          break;
 111  // END UPDATE
 112      case CONTENT_ARTICLES:
 113        $mt_articles_query = tep_db_query("select articles_id, language_id, articles_head_title_tag from " . TABLE_ARTICLES_DESCRIPTION . " where articles_id = '" . (int)$HTTP_GET_VARS['articles_id'] . "' and language_id = '" . (int)$languages_id . "'");
 114        $mt_articles = tep_db_fetch_array($mt_articles_query);
 115  
 116        define('META_TAG_TITLE', $mt_articles['articles_head_title_tag'] . PRIMARY_SECTION . TITLE . $web_site_tagline);
 117          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . $mt_articles['articles_head_title_tag'] . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
 118          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . $mt_articles['articles_head_title_tag']);
 119        break;
 120      case CONTENT_ARTICLES_MAIN:
 121        define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . $web_site_tagline);
 122          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_1 . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
 123          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . NAVBAR_TITLE_1);
 124          break;
 125      case CONTENT_ARTICLES_REVIEWS:
 126        define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . $web_site_tagline);
 127          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_1 . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
 128          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . NAVBAR_TITLE_1);
 129          break;
 130      case CONTENT_ARTICLES_REVIEWS_INFO:
 131        define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . $web_site_tagline);
 132          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_1 . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
 133          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . NAVBAR_TITLE_1);
 134          break;
 135      case CONTENT_ARTICLES_REVIEWS_WRITE:
 136        define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . $web_site_tagline);
 137          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_1 . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
 138          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . NAVBAR_TITLE_1);
 139          break;
 140      case CONTENT_ARTICLES_NEW:
 141        define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . $web_site_tagline);
 142          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_1 . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
 143          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . NAVBAR_TITLE_1);
 144          break;
 145      case CONTENT_CHECKOUT_CONFIRMATION:
 146        define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . $web_site_tagline);
 147          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . HEADING_TITLE . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
 148          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . HEADING_TITLE);
 149          break;
 150      case CONTENT_CHECKOUT_PAYMENT:
 151        define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . $web_site_tagline);
 152          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . HEADING_TITLE . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
 153          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . HEADING_TITLE);
 154          break;
 155      case CONTENT_CHECKOUT_PAYMENT_ADDRESS:
 156        define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . $web_site_tagline);
 157          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . HEADING_TITLE . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
 158          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . HEADING_TITLE);
 159          break;
 160      case CONTENT_CHECKOUT_SHIPPING:
 161        define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . $web_site_tagline);
 162          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . HEADING_TITLE . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
 163          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . HEADING_TITLE);
 164          break;
 165      case CONTENT_CHECKOUT_SUCCESS:
 166        define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . $web_site_tagline);
 167          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . HEADING_TITLE . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
 168          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . HEADING_TITLE);
 169          break;
 170      case CONTENT_CREATE_ACCOUNT_SUCCESS:
 171        define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . $web_site_tagline);
 172          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . HEADING_TITLE . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
 173          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . HEADING_TITLE);
 174          break;
 175      case CONTENT_INDEX_DEFAULT:
 176        define('META_TAG_TITLE', TITLE . PRIMARY_SECTION . HEADING_TITLE . $web_site_tagline);
 177          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . HEADING_TITLE . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
 178          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . HEADING_TITLE);
 179        break;
 180      case CONTENT_PASSWORD_FORGOTTEN:
 181        define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . $web_site_tagline);
 182        define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . HEADING_TITLE . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
 183        define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . HEADING_TITLE);
 184        break;
 185      case CONTENT_INDEX_NESTED:
 186        $mt_category_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'");
 187        $mt_category = tep_db_fetch_array($mt_category_query);
 188  
 189        define('META_TAG_TITLE', $mt_category['categories_name'] . PRIMARY_SECTION . TITLE . $web_site_tagline);
 190          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . $mt_category['categories_name'] . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
 191          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . $mt_category['categories_name']);
 192        break;
 193      case CONTENT_INDEX_PRODUCTS:
 194        if (isset($HTTP_GET_VARS['manufacturers_id'])) {
 195            $mt_manufacturer_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
 196          $mt_manufacturer = tep_db_fetch_array($mt_manufacturer_query);
 197  
 198            define('META_TAG_TITLE', $mt_manufacturer['manufacturers_name'] . PRIMARY_SECTION . TITLE . $web_site_tagline);
 199            define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . $mt_manufacturer['manufacturers_name'] . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
 200            define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . $mt_manufacturer['manufacturers_name']);
 201          } else {
 202          $mt_category_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'");
 203          $mt_category = tep_db_fetch_array($mt_category_query);
 204  
 205          define('META_TAG_TITLE', $mt_category['categories_name'] . PRIMARY_SECTION . TITLE . $web_site_tagline);
 206          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . $mt_category['categories_name'] . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
 207          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . $mt_category['categories_name']);
 208        }
 209        break;
 210      case CONTENT_POPUP_IMAGE:
 211        define('META_TAG_TITLE', $products['products_name'] . PRIMARY_SECTION . TITLE . $web_site_tagline);
 212          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . $products['products_name'] . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
 213          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . $products['products_name']);
 214        break;
 215      case CONTENT_POPUP_SEARCH_HELP:
 216        define('META_TAG_TITLE', HEADING_SEARCH_HELP . PRIMARY_SECTION . TITLE . $web_site_tagline);
 217          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . HEADING_SEARCH_HELP . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
 218          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . HEADING_SEARCH_HELP);
 219        break;
 220      case CONTENT_PRODUCT_INFO:
 221  //BOF - SPPC
 222        if (tep_session_is_registered('sppc_customer_group_id')){
 223          $mt_product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, pg.customers_group_price as products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd , " . TABLE_PRODUCTS_GROUPS . " pg where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and p.products_id = pg.products_id and pg.customers_group_id = '" . $sppc_customer_group_id . "' and pd.language_id = '" . (int)$languages_id . "'");
 224        }
 225        $mt_product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
 226  //EOF - SPPC
 227        $mt_product_info = tep_db_fetch_array($mt_product_info_query);
 228  
 229        if ($mt_new_price = tep_get_products_special_price($mt_product_info['products_id'])) {
 230          // $mt_products_price = $currencies->display_price($mt_product_info['products_price'], tep_get_tax_rate($mt_product_info['products_tax_class_id'])) . $currencies->display_price($mt_new_price, tep_get_tax_rate($mt_product_info['products_tax_class_id']));
 231          // only display special price in meta tag title if it's a special
 232          $mt_products_price = $currencies->display_price($mt_new_price, tep_get_tax_rate($mt_product_info['products_tax_class_id']));
 233        } else {
 234          $mt_products_price = $currencies->display_price($mt_product_info['products_price'], tep_get_tax_rate($mt_product_info['products_tax_class_id']));
 235        }
 236  
 237        if (tep_not_null($mt_product_info['products_model'])) {
 238          $mt_products_name = $mt_product_info['products_name'] . ' [' . $mt_product_info['products_model'] . ']';
 239        } else {
 240          $mt_products_name = $mt_product_info['products_name'];
 241        }
 242  
 243          $mt_products_description = substr(strip_tags(stripslashes($mt_product_info['products_description'])), 0, 100);
 244        $mt_products_price = META_TEXT_PRICE . strip_tags($mt_products_price);
 245  
 246        define('META_TAG_TITLE', TITLE . PRIMARY_SECTION . $mt_products_name . SECONDARY_SECTION . $mt_products_price . $web_site_tagline);
 247          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . $mt_products_name . SECONDARY_SECTION . $mt_products_description . '...');
 248          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . $mt_products_name);
 249        break;
 250      case CONTENT_PRODUCT_REVIEWS:
 251        $mt_review_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
 252        $mt_review = tep_db_fetch_array($mt_review_query);
 253  
 254        if ($mt_new_price = tep_get_products_special_price($mt_review['products_id'])) {
 255          $mt_products_price = $currencies->display_price($mt_review['products_price'], tep_get_tax_rate($mt_review['products_tax_class_id'])) . $currencies->display_price($mt_new_price, tep_get_tax_rate($mt_review['products_tax_class_id']));
 256        } else {
 257          $mt_products_price = $currencies->display_price($mt_review['products_price'], tep_get_tax_rate($mt_review['products_tax_class_id']));
 258        }
 259  
 260        if (tep_not_null($mt_review['products_model'])) {
 261          $mt_products_name = $mt_review['products_name'] . ' [' . $mt_review['products_model'] . ']';
 262        } else {
 263          $mt_products_name = $mt_review['products_name'];
 264        }
 265  
 266        $mt_products_price = META_TEXT_PRICE . strip_tags($mt_products_price);
 267        define('META_TAG_TITLE', TITLE . PRIMARY_SECTION . $mt_products_name . SECONDARY_SECTION . $mt_products_price . TERTIARY_SECTION . NAVBAR_TITLE);
 268          define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE . SECONDARY_SECTION . $mt_products_name . SECONDARY_SECTION . $mt_products_price);
 269          define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . $mt_products_name);
 270        break;
 271      case CONTENT_PRODUCT_REVIEWS_INFO:
 272        $mt_review_query = tep_db_query("select rd.reviews_text, r.reviews_rating, r.reviews_id, r.customers_name, p.products_id, p.products_price, p.products_tax_class_id, p.products_model, pd.products_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where r.reviews_id = '" . (int)$HTTP_GET_VARS['reviews_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and r.products_id = p.products_id and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '". (int)$languages_id . "'");
 273        $mt_review = tep_db_fetch_array($mt_review_query);
 274  
 275        if ($mt_new_price = tep_get_products_special_price($mt_review['products_id'])) {
 276          $mt_products_price = $currencies->display_price($mt_review['products_price'], tep_get_tax_rate($mt_review['products_tax_class_id'])) . $currencies->display_price($mt_new_price, tep_get_tax_rate($mt_review['products_tax_class_id']));
 277        } else {
 278          $mt_products_price = $currencies->display_price($mt_review['products_price'], tep_get_tax_rate($mt_review['products_tax_class_id']));
 279        }
 280  
 281        if (tep_not_null($mt_review['products_model'])) {
 282          $mt_products_name = $mt_review['products_name'] . ' [' . $mt_review['products_model'] . ']';
 283        } else {
 284          $mt_products_name = $mt_review['products_name'];
 285        }
 286  
 287        $mt_review_text = substr(strip_tags(stripslashes($mt_review['reviews_text'])), 0, 60);
 288        $mt_reviews_rating = SUB_TITLE_RATING . ' ' . sprintf(TEXT_OF_5_STARS, $mt_review['reviews_rating']);
 289  
 290        $mt_products_price = META_TEXT_PRICE . strip_tags($mt_products_price);
 291        define('META_TAG_TITLE', $mt_products_name . SECONDARY_SECTION . $mt_products_price . PRIMARY_SECTION . TITLE . TERTIARY_SECTION . NAVBAR_TITLE);
 292        define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE . SECONDARY_SECTION . $mt_products_name . SECONDARY_SECTION . $mt_review['customers_name'] . SECONDARY_SECTION . $mt_review_text . '...' . SECONDARY_SECTION . $mt_reviews_rating);
 293        define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . $mt_products_name . ' ' . $mt_products_price . ' ' . $mt_review['customers_name'] . ' ' . $mt_reviews_rating);
 294        break;
 295      default:
 296        define('META_TAG_TITLE', NAVBAR_TITLE . PRIMARY_SECTION . TITLE . $web_site_tagline);
 297        define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
 298        define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . NAVBAR_TITLE);
 299    case CONTENT_WISHLIST:
 300      define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . $web_site_tagline);
 301      define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_1 . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
 302      define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . NAVBAR_TITLE_1);
 303      break;
 304    case CONTENT_WISHLIST_HELP:
 305      define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . $web_site_tagline);
 306      define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_1 . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
 307      define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . NAVBAR_TITLE_1);
 308      break;
 309    case CONTENT_WISHLIST_SEND:
 310      define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . $web_site_tagline);
 311      define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_1 . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
 312      define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . NAVBAR_TITLE_1);
 313      break;
 314  }
 315  ?>


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7