[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/templates/fallback/content/ -> article_reviews.tpl.php (source)

   1     <table border="0" width="100%" cellspacing="0" cellpadding="0">
   2        <tr>
   3          <td>
   4            <table border="0" width="100%" cellspacing="0" cellpadding="0">
   5              <tr>
   6                <td class="pageHeading" valign="top"><?php echo HEADING_TITLE . '\'' . $articles_name . '\''; ?></td>
   7              </tr>
   8            </table>
   9          </td>
  10        </tr>
  11        <tr>
  12          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  13        </tr>
  14        <tr>
  15          <td>
  16            <table width="100%" border="0" cellspacing="0" cellpadding="2">
  17              <tr>
  18                <td valign="top">
  19                  <table border="0" width="100%" cellspacing="0" cellpadding="2">
  20  <?php
  21    $reviews_query_raw = "select r.reviews_id, left(rd.reviews_text, 100) as reviews_text, r.reviews_rating, r.reviews_read, r.date_added, r.customers_name from " . TABLE_ARTICLE_REVIEWS . " r, " . TABLE_ARTICLE_REVIEWS_DESCRIPTION . " rd where r.articles_id = '" . (int)$article_info['articles_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and r.approved = '1' order by r.reviews_id desc";
  22    $reviews_split = new splitPageResults($reviews_query_raw, MAX_DISPLAY_NEW_REVIEWS);
  23  
  24    if ($reviews_split->number_of_rows > 0) {
  25      if ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3')) {
  26  ?>
  27                    <tr>
  28                      <td>
  29                        <table border="0" width="100%" cellspacing="0" cellpadding="2">
  30                          <tr>
  31                            <td class="smallText"><?php echo $reviews_split->display_count(TEXT_DISPLAY_NUMBER_OF_REVIEWS); ?></td>
  32                            <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $reviews_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info'))); ?></td>
  33                          </tr>
  34                        </table>
  35                      </td>
  36                    </tr>
  37                    <tr>
  38                      <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  39                    </tr>
  40  <?php
  41      }
  42  
  43      $reviews_query = tep_db_query($reviews_split->sql_query);
  44      while ($reviews = tep_db_fetch_array($reviews_query)) {
  45  ?>
  46                    <tr>
  47                      <td>
  48                        <table border="0" width="100%" cellspacing="0" cellpadding="2">
  49                          <tr>
  50                            <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_ARTICLE_REVIEWS_INFO, 'articles_id=' . $article_info['articles_id'] . '&reviews_id=' . $reviews['reviews_id']) . '"><u><b>' . sprintf(TEXT_REVIEW_BY, tep_output_string_protected($reviews['customers_name'])) . '</b></u></a> (' . TEXT_REVIEW_VIEWS . $reviews['reviews_read'] . ')'; ?></td>
  51                            <td class="smallText" align="right"><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, tep_date_long($reviews['date_added'])); ?></td>
  52                          </tr>
  53                        </table>
  54                      </td>
  55                    </tr>
  56                    <tr>
  57                      <td>
  58                        <table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
  59                          <tr class="infoBoxContents">
  60                            <td>
  61                              <table border="0" width="100%" cellspacing="0" cellpadding="2">
  62                                <tr>
  63                                  <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
  64                                  <td valign="top" class="main"><?php echo tep_break_string(tep_output_string_protected($reviews['reviews_text']), 60, '-<br>') . '<br>' . '<a href="' . tep_href_link(FILENAME_ARTICLE_REVIEWS_INFO, 'articles_id=' . $article_info['articles_id'] . '&reviews_id=' . $reviews['reviews_id']) . '">' . TEXT_READ_REVIEW . '</a><br><br><i>' . sprintf(TEXT_REVIEW_RATING, tep_image(DIR_WS_IMAGES . 'stars_' . $reviews['reviews_rating'] . '.gif', sprintf(TEXT_OF_5_STARS, $reviews['reviews_rating'])), sprintf(TEXT_OF_5_STARS, $reviews['reviews_rating'])) . '</i>'; ?></td>
  65                                  <td width="10" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
  66                                </tr>
  67                              </table>
  68                            </td>
  69                          </tr>
  70                        </table>
  71                      </td>
  72                    </tr>
  73                    <tr>
  74                      <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  75                    </tr>
  76  <?php
  77      }
  78    } else {
  79  ?>
  80                    <tr>
  81                      <td><?php new infoBox(array(array('text' => TEXT_NO_ARTICLE_REVIEWS))); ?></td>
  82                    </tr>
  83                    <tr>
  84                      <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  85                    </tr>
  86  <?php
  87    }
  88  
  89    if (($reviews_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) {
  90  ?>
  91                    <tr>
  92                      <td>
  93                        <table border="0" width="100%" cellspacing="0" cellpadding="2">
  94                          <tr>
  95                            <td class="smallText"><?php echo $reviews_split->display_count(TEXT_DISPLAY_NUMBER_OF_REVIEWS); ?></td>
  96                            <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $reviews_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info'))); ?></td>
  97                          </tr>
  98                        </table>
  99                      </td>
 100                    </tr>
 101                    <tr>
 102                      <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 103                    </tr>
 104  <?php
 105    }
 106  ?>
 107                    <tr>
 108                      <td>
 109                        <table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
 110                          <tr class="infoBoxContents">
 111                            <td>
 112                              <table border="0" width="100%" cellspacing="0" cellpadding="2">
 113                                <tr>
 114                                  <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_ARTICLE_INFO, tep_get_all_get_params()) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
 115                                  <td class="main" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_ARTICLE_REVIEWS_WRITE, tep_get_all_get_params()) . '">' . tep_image_button('button_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a>'; ?></td>
 116                                </tr>
 117                              </table>
 118                            </td>
 119                          </tr>
 120                        </table>
 121                      </td>
 122                </tr>
 123              </table></td>
 124          </table></td>
 125        </tr>
 126      </table>


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