[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

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

   1  <table width="100%" border="0" cellspacing="2" cellpadding="1">
   2   
   3      <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
   4          <tr> 
   5            <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
   6                <tr> 
   7                   <td class="pageHeading" valign="top"><?php //echo HEADING_TITLE ; ?>
   8                   </td>
   9                  <td align="right"></td>
  10                </tr>
  11              </table></td>
  12          </tr>
  13          <tr> 
  14            <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  15          </tr>
  16          
  17            <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
  18  <?php
  19    if ($article_check['total'] < 1) {
  20  ?>
  21        <tr>
  22          <td class="pageHeading" ><?php echo HEADING_ARTICLE_NOT_FOUND; ?></td>
  23        </tr>
  24        <tr>
  25          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  26        </tr>
  27        <tr>
  28          <td class="main" ><?php echo TEXT_ARTICLE_NOT_FOUND; ?></td>
  29        </tr>
  30  <?php
  31    } else {
  32      $article_info_query = tep_db_query("select a.articles_id, a.articles_date_added, a.articles_date_available, a.authors_id, ad.articles_name, ad.articles_description, ad.articles_url, au.authors_name from " . TABLE_ARTICLES . " a left join " . TABLE_AUTHORS . " au using(authors_id), " . TABLE_ARTICLES_DESCRIPTION . " ad where a.articles_status = '1' and a.articles_id = '" . (int)$HTTP_GET_VARS['articles_id'] . "' and ad.articles_id = a.articles_id and ad.language_id = '" . (int)$languages_id . "'");
  33      $article_info = tep_db_fetch_array($article_info_query);
  34  
  35      tep_db_query("update " . TABLE_ARTICLES_DESCRIPTION . " set articles_viewed = articles_viewed+1 where articles_id = '" . (int)$HTTP_GET_VARS['articles_id'] . "' and language_id = '" . (int)$languages_id . "'");
  36  
  37      $articles_name = $article_info['articles_name'];
  38      $articles_author_id = $article_info['authors_id'];
  39      $articles_author = $article_info['authors_name'];
  40  ?>
  41        <tr>
  42          <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
  43            <tr>
  44              <td class="pageHeading" valign="bottom"><?php echo $articles_name; ?></td>
  45               <td class="main" align="right" valign="bottom">
  46               <?php
  47               if (tep_not_null($articles_author) && DISPLAY_AUTHOR_ARTICLE_LISTING == 'true') echo TEXT_BY . '<a href="' . tep_href_link(FILENAME_ARTICLES,'authors_id=' . $articles_author_id) . '">' . $articles_author . '</a>';
  48               ?>
  49               </td>
  50            </tr>
  51          </table></td>
  52        </tr>
  53        <tr>
  54          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  55        </tr>
  56        <tr>
  57          <td class="main">
  58            <p><?php echo stripslashes($article_info['articles_description']); ?></p>
  59          </td>
  60        </tr>
  61  <?php
  62      if (tep_not_null($article_info['articles_url'])) {
  63  ?>
  64        <tr>
  65          <td class="main"><?php //echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($article_info['articles_url']), 'NONSSL', true, false)); 
  66          echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=arturl&goto=' . urlencode($article_info['articles_url']), 'NONSSL', true, false)); ?></td>
  67        </tr>
  68        <tr>
  69          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  70        </tr>
  71  <?php
  72      }
  73  if (DISPLAY_DATE_ADDED_ARTICLE_LISTING == 'true') {
  74      if ($article_info['articles_date_available'] > date('Y-m-d H:i:s')) {
  75  ?>
  76        <tr>
  77          <td align="left" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($article_info['articles_date_available'])); ?></td>
  78        </tr>
  79  <?php
  80      } else {
  81  ?>
  82        <tr>
  83          <td align="left" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($article_info['articles_date_added'])); ?></td>
  84        </tr>
  85  <?php
  86      }
  87  }
  88  ?>
  89        <tr>
  90          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  91        </tr>
  92  <?php
  93    if (ENABLE_ARTICLE_REVIEWS == 'true') {
  94      $reviews_query = tep_db_query("SELECT COUNT(*) as count from " . TABLE_ARTICLE_REVIEWS . " where articles_id = '" . (int)$HTTP_GET_VARS['articles_id'] . "' and approved = '1'");
  95      $reviews = tep_db_fetch_array($reviews_query);
  96  ?>
  97        <tr>
  98          <td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td>
  99        </tr>
 100  <?php
 101      if ($reviews['count'] <= 0) {
 102  ?>
 103        <tr>
 104          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 105        </tr>
 106        <tr>
 107          <td class="main"><?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>
 108        </tr>
 109  <?php
 110      } else {
 111  ?>
 112        <tr>
 113          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 114        </tr>
 115        <tr>
 116          <td class="main"><?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> '; ?><?php echo '<a href="' . tep_href_link(FILENAME_ARTICLE_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>
 117        </tr>
 118  <?php
 119      }
 120    }
 121  ?>
 122       </form>
 123  <!-- tell_a_friend //-->
 124        <tr>
 125          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 126        </tr>
 127            <tr>
 128              <td>
 129  <?php
 130    if (ENABLE_TELL_A_FRIEND_ARTICLE == 'true') {
 131      if (isset($HTTP_GET_VARS['articles_id'])) {
 132        $info_box_contents = array();
 133        $info_box_contents[] = array('text' => BOX_TEXT_TELL_A_FRIEND);
 134  
 135        new infoBoxHeading($info_box_contents, false, false);
 136  
 137        $info_box_contents = array();
 138        $info_box_contents[] = array('form' => tep_draw_form('tell_a_friend', tep_href_link(FILENAME_TELL_A_FRIEND, '', 'NONSSL', false), 'get'),
 139                                     'align' => 'left',
 140                                     'text' => TEXT_TELL_A_FRIEND . '&nbsp;' . tep_draw_input_field('to_email_address', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . '&nbsp;' . tep_image_submit('button_tell_a_friend.gif', BOX_HEADING_TELL_A_FRIEND) . tep_draw_hidden_field('articles_id', $HTTP_GET_VARS['articles_id']) . tep_hide_session_id() );
 141  
 142        new infoBox($info_box_contents);
 143      }
 144    }
 145  ?>
 146              </td>
 147            </tr>
 148        <tr>
 149          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 150        </tr>          
 151  <!-- tell_a_friend_eof //-->
 152        <tr>
 153          <td>
 154  <?php
 155  //added for cross-sell
 156     if ( (USE_CACHE == 'true') && !SID) {
 157       include(DIR_WS_MODULES . FILENAME_ARTICLES_XSELL);
 158     } else {
 159       include(DIR_WS_MODULES . FILENAME_ARTICLES_XSELL);
 160      }
 161     }
 162  ?>
 163              </table></td>
 164         
 165        </table>
 166    
 167        
 168        
 169      </td>
 170    </tr>
 171  </table>


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