get_template_vars('INFO_FILE'); $meta_infosdesc['page'] = $template->get_template_vars('PAGE_TITLE'); $meta_infosdesc['comment'] = $template->get_template_vars('COMMENT_IMG'); if (isset($page['section']) and $page['section'] == 'categories' and empty($page['category']['id'])) { $descindex='ttz'; if (!empty($descindex)) { $template->assign('COMMENT_IMG', $descindex); $template->clear_assign('INFO_FILE'); } } } function add_metadesccat() { global $template, $page, $meta_infosdesc; $meta_infosdesc = array(); $meta_infosdesc['info'] = $template->get_template_vars('INFO_FILE'); $meta_infosdesc['page'] = $template->get_template_vars('PAGE_TITLE'); $meta_infosdesc['comment'] = $template->get_template_vars('COMMENT_IMG'); if ( !empty($page['category']['id']) ) { $query = ' select id,comment FROM ' . CATEGORIES_TABLE . ' WHERE id = \''.$page['category']['id'].'\' ;'; $result = pwg_query($query); $row = mysql_fetch_array($result); if (!empty($row['comment'])) { $template->assign('COMMENT_IMG', $row['comment']); $template->clear_assign('INFO_FILE'); } } } function add_metadescimg() { global $template, $page, $meta_infosdesc; $meta_infosdesc = array(); $meta_infosdesc['info'] = $template->get_template_vars('INFO_FILE'); $meta_infosdesc['page'] = $template->get_template_vars('PAGE_TITLE'); $meta_infosdesc['comment'] = $template->get_template_vars('COMMENT_IMG'); if ( !empty($page['image_id']) ) { $query = ' select id,comment FROM ' . IMAGES_TABLE . ' WHERE id = \''.$page['image_id'].'\' ;'; $result = pwg_query($query); $row = mysql_fetch_array($result); if (!empty($row['comment'])) { $template->assign('COMMENT_IMG', $row['comment']); $template->clear_assign('INFO_FILE'); } } } function set_metadesc_back() { global $template, $meta_infosdesc; $template->assign (array ( 'INFO_FILE' => $meta_infosdesc['info'], 'COMMENT_IMG' => $meta_infosdesc['comment'] ) ); } ?>