[ Index ] |
PHP Cross Reference of osCMax 2.0.4 |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 $Id: authors.php 3 2006-05-27 04:59:07Z user $ 4 5 osCMax Power E-Commerce 6 http://oscdox.com 7 8 Copyright 2006 osCMax 9 10 Released under the GNU General Public License 11 */ 12 13 // Most of this file is changed or moved to BTS - Basic Template System - format. 14 15 $authors_query = tep_db_query("select authors_id, authors_name from " . TABLE_AUTHORS . " order by authors_name"); 16 if ($number_of_author_rows = tep_db_num_rows($authors_query)) { 17 18 ?> 19 <!-- authors //--> 20 <?php 21 $boxHeading = BOX_HEADING_AUTHORS; 22 $corner_left = 'square'; 23 $corner_right = 'square'; 24 $box_base_name = 'authors'; // for easy unique box template setup (added BTSv1.2) 25 26 $box_id = $box_base_name . 'Box'; // for CSS styling paulm (editted BTSv1.2) 27 28 // $info_box_contents = array(); 29 // $info_box_contents[] = array('text' => BOX_HEADING_AUTHORS); 30 31 // new infoBoxHeading($info_box_contents, false, false); 32 33 34 if ($number_of_author_rows <= MAX_DISPLAY_AUTHORS_IN_A_LIST) { 35 // Display a list 36 $authors_list = ''; 37 while ($authors = tep_db_fetch_array($authors_query)) { 38 $authors_name = ((strlen($authors['authors_name']) > MAX_DISPLAY_AUTHOR_NAME_LEN) ? substr($authors['authors_name'], 0, MAX_DISPLAY_AUTHOR_NAME_LEN) . '..' : $authors['authors_name']); 39 if (isset($HTTP_GET_VARS['authors_id']) && ($HTTP_GET_VARS['authors_id'] == $authors['authors_id'])) $authors_name = '<b>' . $authors_name .'</b>'; 40 $authors_list .= '<a href="' . tep_href_link(FILENAME_ARTICLES, 'authors_id=' . $authors['authors_id']) . '">' . $authors_name . '</a><br>'; 41 } 42 43 $authors_list = substr($authors_list, 0, -4); 44 45 // $info_box_contents = array(); 46 $boxContent = $authors_list; 47 } else { 48 // Display a drop-down 49 $authors_array = array(); 50 if (MAX_AUTHORS_LIST < 2) { 51 $authors_array[] = array('id' => '', 'text' => PULL_DOWN_DEFAULT); 52 } 53 54 while ($authors = tep_db_fetch_array($authors_query)) { 55 $authors_name = ((strlen($authors['authors_name']) > MAX_DISPLAY_AUTHOR_NAME_LEN) ? substr($authors['authors_name'], 0, MAX_DISPLAY_AUTHOR_NAME_LEN) . '..' : $authors['authors_name']); 56 $authors_array[] = array('id' => $authors['authors_id'], 57 'text' => $authors_name); 58 } 59 60 $boxContent = array(); 61 $boxContent[] = array('form' => tep_draw_form('authors', tep_href_link(FILENAME_ARTICLES, '', 'NONSSL', false), 'get'), 62 'text' => tep_draw_pull_down_menu('authors_id', $authors_array, (isset($HTTP_GET_VARS['authors_id']) ? $HTTP_GET_VARS['authors_id'] : ''), 'onChange="this.form.submit();" size="' . MAX_AUTHORS_LIST . '" style="width: 100%"') . tep_hide_session_id()); 63 } 64 65 // new infoBox($info_box_contents); 66 67 } 68 ?> 69 70 <!-- authors_eof //--> 71 <?php 72 73 include (bts_select('boxes', $box_base_name)); // BTS 1.5 74 75 $boxContent = ''; 76 $boxHeading = ''; 77 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Jan 1 13:43:16 2010 | Cross-referenced by PHPXref 0.7 |