Metadaten in der Manufacture.php

      Metadaten in der Manufacture.php

      Hallo,

      eine Frage. Kann man bei den manufacturers_id einen Title Tag hinterlegen?
      Dies nimmt immer den Standart Title her. Das wird bei Google als Double Content erfasst

      Hier unter http://www.ecombase.de/forum/index.php?sho...c=11255&hl= wurde zwar das Thema und ein Lösungsvorschlag gemacht, aber in die Datenbank wird nichts geschrieben. Kann jemand mal schauen wo der Fehler drin ist?

      manufacturers.php

      Quellcode

      1. <?php
      2. /* --------------------------------------------------------------
      3. $Id: manufacturers.php 901 2005-04-29 10:32:14Z novalis $
      4. XT-Commerce - community made shopping
      5. http://www.xt-commerce.com
      6. Copyright (c) 2003 XT-Commerce
      7. --------------------------------------------------------------
      8. based on:
      9. (c) 2000-2001 The Exchange Project (earlier name of osCommerce)
      10. (c) 2002-2003 osCommerce(manufacturers.php,v 1.52 2003/03/22); www.oscommerce.com
      11. (c) 2003 nextcommerce (manufacturers.php,v 1.9 2003/08/18); www.nextcommerce.org
      12. Released under the GNU General Public License
      13. --------------------------------------------------------------*/
      14. require('includes/application_top.php');
      15. switch ($_GET['action']) {
      16. case 'insert':
      17. case 'save':
      18. $manufacturers_id = xtc_db_prepare_input($_GET['mID']);
      19. $manufacturers_name = xtc_db_prepare_input($_POST['manufacturers_name']);
      20. // ANFANG Anlegen der escapden Daten für den Eintrag
      21. $manufacturers_desc = xtc_db_prepare_input($_POST['manufacturers_meta_description']);
      22. $manufacturers_title = xtc_db_prepare_input($_POST['manufacturers_meta_title']);
      23. $manufacturers_keywords = xtc_db_prepare_input($_POST['manufacturers_meta_keywords']);
      24. // ENDE Anlegen der escapden Daten für den Eintrag
      25. $sql_data_array = array('manufacturers_name' => $manufacturers_name);
      26. if ($_GET['action'] == 'insert') {
      27. $insert_sql_data = array('date_added' => 'now()');
      28. $sql_data_array = xtc_array_merge($sql_data_array, $insert_sql_data);
      29. xtc_db_perform(TABLE_MANUFACTURERS, $sql_data_array);
      30. $manufacturers_id = xtc_db_insert_id();
      31. } elseif ($_GET['action'] == 'save') {
      32. $update_sql_data = array('last_modified' => 'now()');
      33. $sql_data_array = xtc_array_merge($sql_data_array, $update_sql_data);
      34. xtc_db_perform(TABLE_MANUFACTURERS, $sql_data_array, 'update', "manufacturers_id = '" . xtc_db_input($manufacturers_id) . "'");
      35. }
      36. $dir_manufacturers=DIR_FS_CATALOG_IMAGES."/manufacturers";
      37. if ($manufacturers_image = &xtc_try_upload('manufacturers_image', $dir_manufacturers)) {
      38. xtc_db_query("update " . TABLE_MANUFACTURERS . " set
      39. manufacturers_image ='manufacturers/".$manufacturers_image->filename . "'
      40. where manufacturers_id = '" . xtc_db_input($manufacturers_id) . "'");
      41. }
      42. $languages = xtc_get_languages();
      43. for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
      44. $manufacturers_url_array = $_POST['manufacturers_url'];
      45. $language_id = $languages[$i]['id'];
      46. $sql_data_array = array('manufacturers_url' => xtc_db_prepare_input($manufacturers_url_array[$language_id]));
      47. if ($_GET['action'] == 'insert') {
      48. // ANFANG Anlegen des Arrays für Metadaten
      49. $neu = array(
      50. 'manufacturers_meta_title' => xtc_db_prepare_input($manufacturers_title),
      51. 'manufacturers_meta_description' => xtc_db_prepare_input($manufacturers_desc),
      52. 'manufacturers_meta_keywords' => xtc_db_prepare_input($manufacturers_keywords)
      53. );
      54. // ENDE Anlegen des Arrays für Metadaten
      55. $insert_sql_data = array('manufacturers_id' => $manufacturers_id,
      56. 'languages_id' => $language_id);
      57. $sql_data_array = xtc_array_merge($sql_data_array, $insert_sql_data, $neu);
      58. xtc_db_perform(TABLE_MANUFACTURERS_INFO, $sql_data_array);
      59. } elseif ($_GET['action'] == 'save') {
      60. // ANFANG Anlegen des Arrays für Metadaten
      61. $neu = array('manufacturers_meta_title' => xtc_db_prepare_input($manufacturers_title),
      62. 'manufacturers_meta_description' => xtc_db_prepare_input($manufacturers_desc),
      63. 'manufacturers_meta_keywords' => xtc_db_prepare_input($manufacturers_keywords)
      64. );
      65. // ENDE Anlegen des Arrays für Metadaten
      66. $sql_data_array = xtc_array_merge($sql_data_array, $neu);
      67. xtc_db_perform(TABLE_MANUFACTURERS_INFO, $sql_data_array, 'update', "manufacturers_id = '" . xtc_db_input($manufacturers_id) . "' and languages_id = '" . $language_id . "'");
      68. }
      69. }
      70. if (USE_CACHE == 'true') {
      71. xtc_reset_cache_block('manufacturers');
      72. }
      73. xtc_redirect(xtc_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $manufacturers_id));
      74. break;
      75. case 'deleteconfirm':
      76. $manufacturers_id = xtc_db_prepare_input($_GET['mID']);
      77. if ($_POST['delete_image'] == 'on') {
      78. $manufacturer_query = xtc_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . xtc_db_input($manufacturers_id) . "'");
      79. $manufacturer = xtc_db_fetch_array($manufacturer_query);
      80. $image_location = DIR_FS_DOCUMENT_ROOT . DIR_WS_IMAGES . $manufacturer['manufacturers_image'];
      81. if (file_exists($image_location)) @unlink($image_location);
      82. }
      83. xtc_db_query("delete from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . xtc_db_input($manufacturers_id) . "'");
      84. xtc_db_query("delete from " . TABLE_MANUFACTURERS_INFO . " where manufacturers_id = '" . xtc_db_input($manufacturers_id) . "'");
      85. if ($_POST['delete_products'] == 'on') {
      86. $products_query = xtc_db_query("select products_id from " . TABLE_PRODUCTS . " where manufacturers_id = '" . xtc_db_input($manufacturers_id) . "'");
      87. while ($products = xtc_db_fetch_array($products_query)) {
      88. xtc_remove_product($products['products_id']);
      89. }
      90. } else {
      91. xtc_db_query("update " . TABLE_PRODUCTS . " set manufacturers_id = '' where manufacturers_id = '" . xtc_db_input($manufacturers_id) . "'");
      92. }
      93. if (USE_CACHE == 'true') {
      94. xtc_reset_cache_block('manufacturers');
      95. }
      96. xtc_redirect(xtc_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page']));
      97. break;
      98. }
      99. ?>
      100. <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
      101. <html <?php echo HTML_PARAMS; ?>>
      102. <head>
      103. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $_SESSION['language_charset']; ?>">
      104. <title><?php echo TITLE; ?></title>
      105. <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
      106. <script type="text/javascript" src="includes/general.js"></script>
      107. </head>
      108. <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onLoad="SetFocus();">
      109. <!-- header //-->
      110. <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
      111. <!-- header_eof //-->
      112. <!-- body //-->
      113. <table border="0" width="100%" cellspacing="2" cellpadding="2">
      114. <tr>
      115. <td class="columnLeft2" width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
      116. <!-- left_navigation //-->
      117. <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
      118. <!-- left_navigation_eof //-->
      119. </table></td>
      120. <!-- body_text //-->
      121. <td class="boxCenter" width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
      122. <tr>
      123. <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
      124. <tr>
      125. <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
      126. <td class="pageHeading" align="right"><?php echo xtc_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
      127. </tr>
      128. </table></td>
      129. </tr>
      130. <tr>
      131. <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
      132. <tr>
      133. <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
      134. <tr class="dataTableHeadingRow">
      135. <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_MANUFACTURERS; ?></td>
      136. <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td>
      137. </tr>
      138. <?php
      139. $manufacturers_query_raw = "select manufacturers_id, manufacturers_name, manufacturers_image, date_added, last_modified from " . TABLE_MANUFACTURERS . " order by manufacturers_name";
      140. $manufacturers_split = new splitPageResults($_GET['page'], '20', $manufacturers_query_raw, $manufacturers_query_numrows);
      141. $manufacturers_query = xtc_db_query($manufacturers_query_raw);
      142. while ($manufacturers = xtc_db_fetch_array($manufacturers_query)) {
      143. if (((!$_GET['mID']) || (@$_GET['mID'] == $manufacturers['manufacturers_id'])) && (!$mInfo) && (substr($_GET['action'], 0, 3) != 'new')) {
      144. $manufacturer_products_query = xtc_db_query("select count(*) as products_count from " . TABLE_PRODUCTS . " where manufacturers_id = '" . $manufacturers['manufacturers_id'] . "'");
      145. $manufacturer_products = xtc_db_fetch_array($manufacturer_products_query);
      146. $mInfo_array = xtc_array_merge($manufacturers, $manufacturer_products);
      147. $mInfo = new objectInfo($mInfo_array);
      148. }
      149. if ( (is_object($mInfo)) && ($manufacturers['manufacturers_id'] == $mInfo->manufacturers_id) ) {
      150. echo ' <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . xtc_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $manufacturers['manufacturers_id'] . '&action=edit') . '\'">' . "\n";
      151. } else {
      152. echo ' <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . xtc_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $manufacturers['manufacturers_id']) . '\'">' . "\n";
      153. }
      154. ?>
      155. <td class="dataTableContent"><?php echo $manufacturers['manufacturers_name']; ?></td>
      156. <td class="dataTableContent" align="right"><?php if ( (is_object($mInfo)) && ($manufacturers['manufacturers_id'] == $mInfo->manufacturers_id) ) { echo xtc_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '<a href="' . xtc_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $manufacturers['manufacturers_id']) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>
      157. </tr>
      158. <?php
      159. }
      160. ?>
      161. <tr>
      162. <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
      163. <tr>
      164. <td class="smallText" valign="top"><?php echo $manufacturers_split->display_count($manufacturers_query_numrows, '20', $_GET['page'], TEXT_DISPLAY_NUMBER_OF_MANUFACTURERS); ?></td>
      165. <td class="smallText" align="right"><?php echo $manufacturers_split->display_links($manufacturers_query_numrows, '20', MAX_DISPLAY_PAGE_LINKS, $_GET['page']); ?></td>
      166. </tr>
      167. </table></td>
      168. </tr>
      169. <?php
      170. if ($_GET['action'] != 'new') {
      171. ?>
      172. <tr>
      173. <td align="right" colspan="2" class="smallText"><?php echo xtc_button_link(BUTTON_INSERT, xtc_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=new')); ?></td>
      174. </tr>
      175. <?php
      176. }
      177. ?>
      178. </table></td>
      179. <?php
      180. $heading = array();
      181. $contents = array();
      182. switch ($_GET['action']) {
      183. case 'new':
      184. $heading[] = array('text' => '<b>' . TEXT_HEADING_NEW_MANUFACTURER . '</b>');
      185. $contents = array('form' => xtc_draw_form('manufacturers', FILENAME_MANUFACTURERS, 'action=insert', 'post', 'enctype="multipart/form-data"'));
      186. $contents[] = array('text' => TEXT_NEW_INTRO);
      187. $contents[] = array('text' => '
      188. ' . TEXT_MANUFACTURERS_NAME . '
      189. ' . xtc_draw_input_field('manufacturers_name'));
      190. $contents[] = array('text' => '
      191. ' . TEXT_MANUFACTURERS_IMAGE . '
      192. ' . xtc_draw_file_field('manufacturers_image'));
      193. // ANFANG Einfügen der Eingabe der Meta-Daten für Hersteller
      194. $contents[] = array('text' => '
      195. ' . 'Hersteller-Meta-Title '. '
      196. ' . xtc_draw_input_field('manufacturers_meta_title'));
      197. $contents[] = array('text' => '
      198. ' . 'Hersteller-Meta-Description '. '
      199. ' . xtc_draw_input_field('manufacturers_meta_description'));
      200. $contents[] = array('text' => '
      201. ' . 'Hersteller-Meta-Keywords '. '
      202. ' . xtc_draw_input_field('manufacturers_meta_keywords'));
      203. // ENDE Einfügen der Eingabe der Meta-Daten für Hersteller
      204. $manufacturer_inputs_string = '';
      205. $languages = xtc_get_languages();
      206. for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
      207. $manufacturer_inputs_string .= '
      208. ' . xtc_image(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/admin/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . xtc_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']');
      209. }
      210. $contents[] = array('text' => '
      211. ' . TEXT_MANUFACTURERS_URL . $manufacturer_inputs_string);
      212. $contents[] = array('align' => 'center', 'text' => '
      213. ' . xtc_button(BUTTON_SAVE) . ' ' . xtc_button_link(BUTTON_CANCEL, xtc_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $_GET['mID'])));
      214. break;
      215. case 'edit':
      216. $man_info = "SELECT * FROM manufacturers_info WHERE manufacturers_id = '".$mInfo->manufacturers_id."' LIMIT 1";
      217. $manufacturers_info = mysql_fetch_array(mysql_query($man_info));
      218. $heading[] = array('text' => '<b>' . TEXT_HEADING_EDIT_MANUFACTURER . '</b>');
      219. $contents = array('form' => xtc_draw_form('manufacturers', FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=save', 'post', 'enctype="multipart/form-data"'));
      220. $contents[] = array('text' => TEXT_EDIT_INTRO);
      221. $contents[] = array('text' => '
      222. ' . TEXT_MANUFACTURERS_NAME . '
      223. ' . xtc_draw_input_field('manufacturers_name', $mInfo->manufacturers_name));
      224. $contents[] = array('text' => '
      225. ' . TEXT_MANUFACTURERS_IMAGE . '
      226. ' . xtc_draw_file_field('manufacturers_image') . '
      227. ' . $mInfo->manufacturers_image);
      228. // ANFANG Einfügen der Eingabe der Meta-Daten für Hersteller
      229. $contents[] = array('text' => '
      230. ' . 'Hersteller-Meta-Title '. '
      231. ' . xtc_draw_input_field('manufacturers_meta_title',$manufacturers_info['manufacturers_meta_title']));
      232. $contents[] = array('text' => '
      233. ' . 'Hersteller-Meta-Description '. '
      234. ' . xtc_draw_input_field('manufacturers_meta_description',$manufacturers_info['manufacturers_meta_description']));
      235. $contents[] = array('text' => '
      236. ' . 'Hersteller-Meta-Keywords '. '
      237. ' . xtc_draw_input_field('manufacturers_meta_keywords',$manufacturers_info['manufacturers_meta_keywords']));
      238. // ENDE Einfügen der Eingabe der Meta-Daten für Hersteller
      239. $manufacturer_inputs_string = '';
      240. $languages = xtc_get_languages();
      241. for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
      242. $manufacturer_inputs_string .= '
      243. ' . xtc_image(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/admin/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . xtc_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']', xtc_get_manufacturer_url($mInfo->manufacturers_id, $languages[$i]['id']));
      244. }
      245. $contents[] = array('text' => '
      246. ' . TEXT_MANUFACTURERS_URL . $manufacturer_inputs_string);
      247. $contents[] = array('align' => 'center', 'text' => '
      248. ' . xtc_button(BUTTON_SAVE) . ' ' . xtc_button_link(BUTTON_CANCEL, xtc_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id)));
      249. break;
      250. case 'delete':
      251. $heading[] = array('text' => '<b>' . TEXT_HEADING_DELETE_MANUFACTURER . '</b>');
      252. $contents = array('form' => xtc_draw_form('manufacturers', FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=deleteconfirm'));
      253. $contents[] = array('text' => TEXT_DELETE_INTRO);
      254. $contents[] = array('text' => '
      255. <b>' . $mInfo->manufacturers_name . '</b>');
      256. $contents[] = array('text' => '
      257. ' . xtc_draw_checkbox_field('delete_image', '', true) . ' ' . TEXT_DELETE_IMAGE);
      258. if ($mInfo->products_count > 0) {
      259. $contents[] = array('text' => '
      260. ' . xtc_draw_checkbox_field('delete_products') . ' ' . TEXT_DELETE_PRODUCTS);
      261. $contents[] = array('text' => '
      262. ' . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $mInfo->products_count));
      263. }
      264. $contents[] = array('align' => 'center', 'text' => '
      265. ' . xtc_button(BUTTON_DELETE) . ' ' . xtc_button_link(BUTTON_CANCEL, xtc_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id)));
      266. break;
      267. default:
      268. if (is_object($mInfo)) {
      269. $heading[] = array('text' => '<b>' . $mInfo->manufacturers_name . '</b>');
      270. $contents[] = array('align' => 'center', 'text' => xtc_button_link(BUTTON_EDIT, xtc_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=edit')) . ' ' . xtc_button_link(BUTTON_DELETE, xtc_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=delete')));
      271. $contents[] = array('text' => '
      272. ' . TEXT_DATE_ADDED . ' ' . xtc_date_short($mInfo->date_added));
      273. if (xtc_not_null($mInfo->last_modified)) $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . xtc_date_short($mInfo->last_modified));
      274. $contents[] = array('text' => '
      275. ' . xtc_info_image($mInfo->manufacturers_image, $mInfo->manufacturers_name));
      276. $contents[] = array('text' => '
      277. ' . TEXT_PRODUCTS . ' ' . $mInfo->products_count);
      278. }
      279. break;
      280. }
      281. if ( (xtc_not_null($heading)) && (xtc_not_null($contents)) ) {
      282. echo ' <td width="25%" valign="top">' . "\n";
      283. $box = new box;
      284. echo $box->infoBox($heading, $contents);
      285. echo ' </td>' . "\n";
      286. }
      287. ?>
      288. </tr>
      289. </table></td>
      290. </tr>
      291. </table></td>
      292. <!-- body_text_eof //-->
      293. </tr>
      294. </table>
      295. <!-- body_eof //-->
      296. <!-- footer //-->
      297. <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
      298. <!-- footer_eof //-->
      299. </body>
      300. </html>
      301. <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

      Über eure Hilfe wäre ich dankbar.


      Gruß

      Serkan
      Information
      Hi,

      meine Metatags.php ist geändert worden wegen Bluegate direct_url. Was muss ich da noch anpassen?

      Kannst du mir bitte behilflich sein?

      PHP-Quellcode

      1. <?php
      2. /* -----------------------------------------------------------------------------------------
      3. based on:
      4. (c) 2003 nextcommerce (metatags.php,v 1.7 2003/08/14); www.nextcommerce.org
      5. Released under the GNU General Public License
      6. ---------------------------------------------------------------------------------------*/
      7. //-- Falls die Metas schon gefüllt sind, wird hier nicht überschrieben
      8. (empty($meta_keyw)) ? $meta_keyw = META_KEYWORDS:false;
      9. (empty($meta_descr)) ? $meta_descr = META_DESCRIPTION:false;
      10. (empty($meta_title)) ? $meta_title = TITLE:false;
      11. (empty($_SESSION['language_code'])) ? $_SESSION['language_code'] = 'de':false;
      12. if (strstr($_SERVER['SCRIPT_NAME'], FILENAME_PRODUCT_INFO))
      13. {
      14. if ($product->isProduct())
      15. {
      16. if(!empty($product->data['products_meta_keywords']))
      17. {
      18. $meta_keyw=$product->data['products_meta_keywords'];
      19. }
      20. else{
      21. //-- Wenigstens die Bezeichnung anhängen
      22. $meta_keyw = $product->data['products_name'].', '.$product->data['products_model'].', '.$meta_keyw;
      23. }
      24. if(!empty($product->data['products_meta_description']))
      25. {
      26. $meta_descr = $product->data['products_meta_description'];
      27. }
      28. else{
      29. $meta_descr = $product->data['products_name'].' '.$product->data['products_model'].': '.
      30. $product->data['products_description'].', '.
      31. $meta_descr;
      32. }
      33. $meta_title = $product->data['products_name'].' / '.TITLE;
      34. }
      35. }
      36. elseif(!empty($_GET['cPath']))
      37. {
      38. if (strpos($_GET['cPath'],'_') > 0)
      39. {
      40. $arr = explode('_',xtc_input_validation($_GET['cPath'],'cPath',''));
      41. $_cPath = array_pop($arr);
      42. }
      43. else{
      44. // $_cPath=(int)$_GET['cPath'];
      45. // }
      46. $_cPath=(int)$_GET['cPath'];
      47. if (isset ($_GET['cat'])) {
      48. $site = explode('_', $_GET['cat']);
      49. $cID = $site[0];
      50. $_cPath = str_replace('c', '', $cID);
      51. }
      52. }
      53. $categories_meta_query=xtDBquery("SELECT categories_meta_keywords,
      54. categories_meta_description,
      55. categories_meta_title,
      56. categories_name,
      57. categories_description
      58. FROM ".TABLE_CATEGORIES_DESCRIPTION."
      59. WHERE categories_id='".$_cPath."' and
      60. language_id='".$_SESSION['languages_id']."'");
      61. $categories_meta = xtc_db_fetch_array($categories_meta_query,true);
      62. if(!empty($categories_meta['categories_meta_keywords']))
      63. {
      64. $meta_keyw = $categories_meta['categories_meta_keywords'];
      65. }
      66. else{
      67. $meta_keyw = $categories_meta['categories_name'].', '.$meta_keyw;
      68. }
      69. if(!empty($categories_meta['categories_meta_description']))
      70. {
      71. $meta_descr = $categories_meta['categories_meta_description'];
      72. }
      73. else{
      74. $meta_descr = $categories_meta['categories_name'].': '.
      75. $categories_meta['categories_description'].', '.
      76. $meta_descr;
      77. }
      78. if(!empty($categories_meta['categories_meta_title']))
      79. {
      80. $meta_title = $categories_meta['categories_meta_title'].' / '.TITLE;
      81. }
      82. else{
      83. $meta_title = $categories_meta['categories_name'].' / '.TITLE;
      84. }
      85. }
      86. // content sites
      87. elseif(!empty($_GET['coID']))
      88. {
      89. $contents_meta_query=xtDBquery("SELECT content_meta_title,
      90. content_title,
      91. content_meta_description,
      92. content_text,
      93. content_meta_keywords
      94. FROM ".TABLE_CONTENT_MANAGER."
      95. WHERE content_group='" . (int)$_GET['coID'] . "' and
      96. languages_id='".$_SESSION['languages_id']."'");
      97. $contents_meta = xtc_db_fetch_array($contents_meta_query,true);
      98. if(!empty($contents_meta['content_meta_title']))
      99. {
      100. $meta_title = $contents_meta['content_meta_title'].' / '.TITLE;
      101. }else{
      102. $meta_title = $contents_meta['content_title'].' / '.TITLE;
      103. }
      104. if(!empty($contents_meta['content_meta_description'])){
      105. $meta_descr = $contents_meta['content_meta_description'];
      106. }else{
      107. $meta_descr = $contents_meta['content_text'];
      108. }
      109. if(!empty($contents_meta['content_meta_keywords'])){
      110. $meta_keyw = $contents_meta['content_meta_keywords'] ;
      111. }else{
      112. $meta_keyw = $contents_meta['content_title'].', '.$meta_keyw;
      113. }
      114. }
      115. ?>
      116. <?php
      117. // Anfang Abfrage ob manufacturers_id übergeben wurde
      118. if($_GET['manufacturers_id'])
      119. {
      120. $manufacturers_meta_query = xtDBquery("SELECT manufacturers_meta_title,
      121. manufacturers_meta_description,
      122. manufacturers_meta_keywords
      123. FROM
      124. " . TABLE_MANUFACTURERS_INFO. "
      125. WHERE
      126. manufacturers_id ='". $_GET['manufacturers_id'] ."' AND
      127. languages_id='" . $_SESSION['languages_id'] . "'");
      128. $manufacturers_data = xtc_db_fetch_array($manufacturers_meta_query,true);
      129. ?>
      130. <meta name="description" content="<?php echo $manufacturers_data['manufacturers_meta_description']; ?>" />
      131. <meta name="keywords" content="<?php echo $manufacturers_data['manufacturers_meta_keywords'];?>" />
      132. <title><?php echo $manufacturers_data['manufacturers_meta_title'].' - '.TITLE;?></title>
      133. <?
      134. }
      135. // Ende Abfrage ob manufacturers_id übergeben wurde
      136. else {
      137. }
      138. ?>
      139. <meta name="robots" content="<?php echo META_ROBOTS; ?>" />
      140. <meta name="language" content="<?php echo $_SESSION['language_code']; ?>" />
      141. <meta name="author" content="<?php echo META_AUTHOR; ?>" />
      142. <meta name="publisher" content="<?php echo META_PUBLISHER; ?>" />
      143. <meta name="company" content="<?php echo META_COMPANY; ?>" />
      144. <meta name="page-topic" content="<?php echo META_TOPIC; ?>" />
      145. <meta name="reply-to" content="<?php echo META_REPLY_TO; ?>" />
      146. <meta name="distribution" content="global"/>
      147. <meta name="revisit-after" content="<?php echo META_REVISIT_AFTER; ?>" />
      148. <meta http-equiv="content-language" content="<?php echo $_SESSION['language_code']; ?>" />
      149. <meta http-equiv="cache-control" content="no-cache"/>
      150. <meta name="keywords" content="<?PHP echo $meta_keyw;?>" />
      151. <meta name="description" content="<?PHP echo substr(strip_tags(str_replace("\r\n", " ", $meta_descr)),0,1000);?>" />
      152. <link rel="alternate" type="application/rss+xml" title="Handy-Town - RSS" href="http://www.handy-town.net/rss-news.php"/>
      153. <title><?PHP echo htmlentities($meta_title);?></title>