Re: Drako.it
Inviato: 19/10/2008, 15:42
Codice: Seleziona tutto
<?php
/*
osCommerce, Open Source E-Commerce Solutions ---- http://www.oscommerce.com
Copyright (c) 2002 osCommerce
Released under the GNU General Public License
*/
$configuration_query = tep_db_query("select configuration_key as cfgKey, configuration_value as cfgValue from " . TABLE_NEWSDESK_CONFIGURATION . "");
while ($configuration = tep_db_fetch_array($configuration_query)) {
define($configuration['cfgKey'], $configuration['cfgValue']);
}
$newsdesk_var_query = tep_db_query('select p.newsdesk_id, pd.language_id, pd.newsdesk_article_name, pd.newsdesk_article_description, pd.newsdesk_article_shorttext, pd.newsdesk_article_url, pd.newsdesk_article_url_name, p.newsdesk_image, p.newsdesk_image_two, p.newsdesk_image_three, p.newsdesk_date_added, p.newsdesk_last_modified, pd.newsdesk_article_viewed, p.newsdesk_date_available, p.newsdesk_status from ' . TABLE_NEWSDESK . ' p, ' . TABLE_NEWSDESK_DESCRIPTION . ' pd WHERE pd.newsdesk_id = p.newsdesk_id and pd.language_id = "' . $languages_id . '" and newsdesk_status = 1 and p.newsdesk_sticky = 0 ORDER BY newsdesk_date_added DESC LIMIT ' . MAX_DISPLAY_NEWSDESK_NEWS);
$newsdesk_var_query_title = tep_db_query('select p.newsdesk_id, pd.language_id, pd.newsdesk_article_name, pd.newsdesk_article_description, pd.newsdesk_article_shorttext, pd.newsdesk_article_url, pd.newsdesk_article_url_name, p.newsdesk_image, p.newsdesk_image_two, p.newsdesk_image_three, p.newsdesk_date_added, p.newsdesk_last_modified, pd.newsdesk_article_viewed, p.newsdesk_date_available, p.newsdesk_status from ' . TABLE_NEWSDESK . ' p, ' . TABLE_NEWSDESK_DESCRIPTION . ' pd WHERE pd.newsdesk_id = p.newsdesk_id and pd.language_id = "' . $languages_id . '" and newsdesk_status = 1 and p.newsdesk_sticky = 0 ORDER BY newsdesk_date_added DESC LIMIT ' . MAX_DISPLAY_NEWSDESK_NEWS);
$newsdesk_var_title = tep_db_fetch_array($newsdesk_var_query_title);
if (!tep_db_num_rows($newsdesk_var_query)) { // there is no news
} else {
?>
<link href="stylesheet_news.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/yg_browser.js"></script>
<script type="text/javascript" src="js/yahoo_2.0.5.js" ></script>
<script type="text/javascript" src="js/dom_2.0.5.js"></script>
<script type="text/javascript" src="js/event_2.0.5.js"></script>
<!--<script type="text/javascript" src="js/connection_2.0.5.js"></script>-->
<script type="text/javascript" src="js/animation_2.0.5.js"></script>
<!--<script type="text/javascript" src="js/position_1.0.2.js"></script>-->
<!--<script type="text/javascript" src="js/container_2.0.5.js"></script> -->
<!--<script type="text/javascript" src="js/menu_2.0.5.js"></script> -->
<script type="text/javascript" src="js/k-search-2.1.176-it.js"></script>
<script type="text/javascript">
var mm=null; var aIncentiveArray=[];/* arraylist of incentive events */ var gPageTitle=null;
var Util=new KS_Util('Util',oBw,false,"","","/index"); function init() { Util.init(); } YAHOO.util.Event.addListener(this, "load", init);
</script>
<style>
.style1 {color: #FFFFFF}
</style>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="2" valign="top"><img src="images/template/pixel_trans.gif" width="1" height="1" /></td>
</tr>
<tr>
<td height="24" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="25" height="24" ><img src="images/template/BOX_Alto_SX.gif" width="25" height="24" /></td>
<td width="80%" background="images/template/BOX_Alto_BG.gif" class="ch6"><h1 class="style1" id="boa-title"><? echo $newsdesk_var_title['newsdesk_article_name']; ?></h1></td>
<td width="20%" align="right" background="images/template/BOX_Alto_BG.gif" class="ch6">
<div id="boa-progress">
<ul><li id="bp-0" class="active" >
<a href="" onClick="displayFeaturedItem(0);return false;"><img src="images/template/pixel_trans.gif" class="spacer"></a></li><li id="bp-1"><a href="" onClick="displayFeaturedItem(1);return false;"><img src="images/template/pixel_trans.gif" class="spacer"></a></li><li id="bp-2"><a href="" onClick="displayFeaturedItem(2);return false;"><img src="images/template/pixel_trans.gif" class="spacer"></a></li><li id="bp-3"><a href="" onClick="displayFeaturedItem(3);return false;"><img src="images/template/pixel_trans.gif" class="spacer"></a></li><li id="bp-4"><a href="" onClick="displayFeaturedItem(4);return false;"><img src="images/template/pixel_trans.gif" class="spacer"></a>
</li></ul>
</div> </td>
<td ><img src="images/template/BOX_Alto_DX.gif" width="6" height="24" /></td>
</tr>
</table></td>
</tr>
<tr>
<td class="ch7" valign="top" align="center">
<!-- newsdesk //-->
<div id="y-body-green-knowledge-search" class="home">
<div id="middle">
<script>
YAHOO.util.Event.addListener(window, "load", startBoaTimer);
</script>
<div id="boa">
<div id="boa-content">
<?
//tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info_values['newsdesk_article_url']), 'NONSSL', true, false));
$info_box_contents = array();
$row = 0;
while ($newsdesk_var = tep_db_fetch_array($newsdesk_var_query)) {
if ($row == 0){
$class_type = '<div class="ft-content" id="fc-'.$row.'">';
} else {
$class_type = '<div class="ft-content" id="fc-'.$row.'" style="display: none;">';
}
if($newsdesk_var['newsdesk_article_url'] != ''){
$image_link = '<td width="100" height="100" align="center" valign="middle"><a href="'. tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($newsdesk_var['newsdesk_article_url']), 'NONSSL', true, false) .'">'.tep_image(DIR_WS_IMAGES . 'news/' . $newsdesk_var['newsdesk_image'], '', '','120', 'hspace="3" vspace="3" border="0"') .'</a></td>';
}else{
$image_link = '<td width="100" height="100" align="center" valign="middle">'.tep_image(DIR_WS_IMAGES . 'news/' . $newsdesk_var['newsdesk_image'], '', '','120', 'hspace="3" vspace="3" border="0"') .'</td>';
}
$info_box_contents[$row] = array('
<input type="hidden" id="fc-title-'.$row.'" value="' . $newsdesk_var['newsdesk_article_name'] . '">'.$class_type.'
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"><tr>
'.$image_link.'
<td width="1" background="images/template/m09.gif"></td>
<td align="left" width="3"></td>
<td align="left" valign="top"><p><font size="-2" face="Verdana, Arial, Helvetica, sans-serif"><strong><img src="images/dot.gif" width="10" height="9"/> <font size="-2" face="Verdana, Arial, Helvetica, sans-serif">' . tep_date_long($newsdesk_var['newsdesk_date_added']) . '</font></strong><br/><br/></font> '. $newsdesk_var['newsdesk_article_description'] . '
</td>
</tr>
</table>
</div>
<!-- /ft-c -->');
$row++;
}
// Print all the news so the yaho cool effect run on the news site
print $info_box_contents[0][0];
print $info_box_contents[1][0];
print $info_box_contents[2][0];
print $info_box_contents[3][0];
print $info_box_contents[4][0];
?>
<!-- /ft-c -->
<!-- Indicatori in bassod i avanzamento etc etc-->
<div id="boa-bottom">
<div id="boa-controls">
<a id="ctrl-prev" href="" onclick="previousFeaturedItem();return false;"><img src="images/template/pixel_trans.gif" class="spacer"></a>
<a id="ctrl-pause" class="pause" href="" onclick="toggleBoaTimer();return false;"><img src="images/template/pixel_trans.gif" class="spacer"></a>
<a id="ctrl-next" href="" onclick="nextFeaturedItem();return false;"><img src="images/template/pixel_trans.gif" class="spacer"></a>
</div>
</div>
<!-- newsdesk_eof //-->
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td ><img src="images/template/BOX_Basso_SX.gif" width="5" height="5" /></td>
<td width="100%" background="images/template/BOX_Basso_BG.gif" class="ch6"><img src="images/template/pixel_trans.gif" width="1" height="1" /></td>
<td ><img src="images/template/BOX_Basso_DX.gif" width="5" height="5" /></td>
</tr>
</table></td>
</tr>
</table>
<?php
}
?>