Guest Posted January 31, 2011 Share Posted January 31, 2011 I just installed the latest update. Nothing has changed for me. It looks and works just like the the very older version I had installed. Quote Link to comment Share on other sites More sharing options...
SteveDallas Posted February 1, 2011 Share Posted February 1, 2011 I just installed the latest update. Nothing has changed for me. It looks and works just like the the very older version I had installed. The latest version was just a bug fix for some problems that could occur with catalog/contrib_tracker.php, which is the code that checks the RSS feed for updates and sends email messages that one of your contributions has been updated. The old version checked the name of the contribution, but it is possible for two contributions to have the same title, which led to a problem when both contributions are updated at the same time. It would also lead to "false positive" notifications. You'd get an update notice and the status would turn to red if the non-installed contribution (with the same name) was updated. The new test uses the link, which contains the contribution number. I saw this when the following contributions were updated at the same time: http://addons.oscommerce.com/info/5914 http://addons.oscommerce.com/info/7798 (Just a pointer to the other one so that people searching v2.3 contributions can find it) --Glen Quote Link to comment Share on other sites More sharing options...
lupole Posted April 13, 2011 Share Posted April 13, 2011 If anyone is interested, I have made the necessary changes for this contribution to work with osc v2.3.1. Quote Link to comment Share on other sites More sharing options...
marretjeca Posted April 25, 2011 Share Posted April 25, 2011 If anyone is interested, I have made the necessary changes for this contribution to work with osc v2.3.1. Yes, I am very much interested. :) Where can i find this updated version? Thanks, Marja Quote Link to comment Share on other sites More sharing options...
dennish Posted February 13, 2012 Share Posted February 13, 2012 Hello Glen, I have used your contribution for some time, which proved to be a great help. Recently I upgraded to version 1.7.18 (my osC is still 2.2rc2a). Now, I am getting this warning in the BE: Warning: Invalid argument supplied for foreach() in oscommerce-2.2rc2a/catalog/admin/contrib_tracker.php on line 119 I assumed this issue was already fixed (See your post of 24 September 2009, 16:07)? Any thoughts? Thanks in advance. Kind regards, Dennis Quote Link to comment Share on other sites More sharing options...
dennish Posted February 20, 2012 Share Posted February 20, 2012 Just to add some information to my previous post (13/2): I also get e-mail (title: Contrib Tracker Error) with the following contents: Array ( [title] => osCommerce Contributions [language] => en [link] => http://www.oscommerce.com [description] => osCommerce, Sell With Emotion [copyright] => Copyright (c) 2010 osCommerce [managingEditor] => hpdl@[member='oscommerce'].com [image] => Array ( [0] => Array ( [title] => osCommerce [url] => http://www.oscommerce.com/images/oscommerce_88x31.gif [link] => http://www.oscommerce.com ) ) ) In the last couple of days (18/2) I received one normal alert regarding http://addons.oscommerce.com/info/1435, which was updated on 11/2. Quote Link to comment Share on other sites More sharing options...
dennish Posted February 23, 2012 Share Posted February 23, 2012 Hello, At the moment I am migrating my shop to osC 2.3.1. Unfortunately the update of Contribution Tracker by amaische (9/9/2011) contains some errors (among which the use of double HTML <head> and <body> tags). In an effort to adapt admin/contrib_tracker.php I came up with this code: <?php /* $Id: contrib_tracker.php,v 1.7.17 2009/09/05 15:57:07 stevedallas Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com 05 Sep 2009 GCH 1.7.17 Complete rewrite of RDF file handling. No longer requires or creates a cache file Complete rewrite of XML parsing - no longer uses rdf_class.php 28 Nov 2008 GCH 1.7.14 Several bug fixes in insert routine for correct processing of non-osCommerce support site contributions date added can now be edited clears sID on page change 26 Nov 2008 lildog 1.7.13 When adding a new contrib date added and last official update were getting mixed up changed a couple of variables so they are more obvious 08 Nov 2008 GCH 1.7.12 Quick Add now searches for a support topic and inserts it into the database Insert now adds support topic if user didn't provide one and one exists in the contribution description Quick Add and Insert no longer add duplicate records toggleDivBlock() now uses the code from osC 2.2RC2a Extensive use of tep_get_all_get_params() to preserve parameters - no longer loses sort order on updates Fixed two minor HTML errors that occurred with empty searches and an empty contrib_tracker table Clicking anywhere on a row in the table of contributions will select it Fixed the operation of the manual check button (manualcheckall worked; manualcheck didn't) 08 Nov 2008 lildog 1.7.11 realigned buttons in insert contribution page 07 Nov 2008 lildog 1.7.10 My sql needed quotes around 'LAST_CONFIG_CHECK' from version 1.7.8. 07 Nov 2008 lildog 1.7.9 Fixed Insert so it works with contributions with apostrophes in their titles 28 Oct 2008 GCH 1.7.8 Changed config update to use key LAST_CONFIG_CHECK instead of raw configuration_id, which is installation dependent Rebuilt all tables to ensure correct HTML structure Re-created missing Javascript function toggleDivBlock() to make "info" links work in editor Modified logic to suppress search, quick add, and last update boxes in edit and preview modes Escaped a ton of ampersands to "&" for HTML 4.01 Transitional DTD conformance (Note that some modes still generate non-conforming HTML due to minor bugs in osC functions tep_draw_form() and tep_draw_textarea_field() ) Simplified status icon display code Copyright (c) 2003 osCommerce Released under the GNU General Public License _________________________________________________________________ Contribution Tracker MODULE for osC Admin By Admin of www.silvermoon-jewelry.com Based on: Admin_notes: Original Code By: Robert Hellemans of www.RuddlesMills.com RSS News for OSC These are LIVE SHOPS - So please, no TEST accounts etc... We will report you to your ISP if you abuse our websites! ##### make a function to display month's english and vise versa. #### */ // Contributions added by HBS: // - HBS: lines 777 require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTRIB_TRACKER); require(DIR_WS_FUNCTIONS . 'contrib_tracker.php'); $xmlURL='http://feedproxy.feedburner.com/osCommerce_Contributions'; $addonsURL='http://addons.oscommerce.com/'; $contribsURL='http://addons.oscommerce.com/info/'; $contrib_supportURL='http://www.oscommerce.com/forums/index.php?showtopic='; $addonsRDFURL='http://www.oscommerce.com/oscommerce_contributions.rdf'; $format = '%Y-%m-%d %H:%M:%S'; // Causes problem with BE menu - Start /* //Function to parse the RDF feed //Does not rely on PHP XML parser due to issues. function parse_xml($text) { $reg_exp = '/<(\w+)[^>]*>(.*?)<\/\\1>/s'; preg_match_all($reg_exp, $text, $match); foreach ($match[1] as $key=>$val) { if ( preg_match($reg_exp, $match[2][$key]) ) { $array[$val][] = parse_xml($match[2][$key]); } else { if ( preg_match('/<!\[CDATA\[(.*?)\]\]>/s',$match[2][$key], $string) ) { $array[$val] = $string[1]; } else { $array[$val] = $match[2][$key]; } } } return $array; } //rss file path // THIS GETS THE FEED AND PARSES IT $data = @file_get_contents($xmlURL); if (!$data && (extension_loaded('curl') == 1)) { $data = curl_get_osc_contents($xmlURL); } if ($data) { $response = parse_xml($data); $articlelist = $response['rss'][0]['channel'][0]; foreach ($articlelist['item'] as $article ) { $thelink = $article['link']; $thetitle = $article['title']; $osc_rss_pubdate_raw = $article['pubDate']; $osc_rss_pubdate = strtotime($osc_rss_pubdate_raw); $osc_rss_pubdate = strftime ($format, $osc_rss_pubdate); // add backslashes to characters that need escaping $thetitle=addslashes($thetitle); // UPDATE THE CONTRIBUTIONS THAT ARE IN THE RSS FILE tep_db_query("UPDATE " . TABLE_CONTRIB_TRACKER . " SET status ='0', contr_last_modified = '" . $osc_rss_pubdate . "' where contrib_name = '" . $thetitle . "' and last_update < '" . $osc_rss_pubdate . "'"); } } */ // Causes problem with BE menu - End switch ($HTTP_GET_VARS['action']) { case 'setflag': tep_set_contrib_query_status($HTTP_GET_VARS['id'], $HTTP_GET_VARS['flag'], $HTTP_GET_VARS['contr_last_modified']); tep_redirect(tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('flag', 'action', 'id', 'contr_last_modified')))); break; case 'updatecheck': $contrib_query = "update " . TABLE_CONFIGURATION . " set configuration_value = '" . $HTTP_POST_VARS['lastcheck'] . "', last_modified = now() where configuration_key = 'LAST_CONFIG_CHECK'"; if (tep_db_query($contrib_query)){ $messageStack->add_session(MESSAGE_UPDATECHECK_SUCCESS, 'success'); }else{ $messageStack->add_session(MESSAGE_UPDATECHECK_ERROR, 'error'); } tep_redirect(tep_href_link(FILENAME_CONTRIB_TRACKER, (array('action')))); break; case 'insert': if ($HTTP_POST_VARS['today_date']){ $date_updated =date("Y-m-d H:M:S"); }else{ $date_updated=strtotime($HTTP_POST_VARS['last_update']); $date_updated=strftime ($format, $date_updated); } if ($HTTP_POST_VARS['today_date2']){ $date_added =date("Y-m-d H:M:S"); }else{ $date_added=strtotime($HTTP_POST_VARS['note_created']); $date_added=strftime ($format, $date_added); } $new_contrib_id=$HTTP_POST_VARS['contrib_id_new']; $contrib_name=stripslashes($HTTP_POST_VARS['contrib_name_new']); $contrib_link=old_to_new_url($HTTP_POST_VARS['contrib_link_new']); if ($contrib_link == '') { $contrib_link = $contribsURL . $new_contrib_id; } //check whether contrib is already in database if ($HTTP_POST_VARS['contrib_id_new'] !=='') { $contrib_raw = "select contrib_osc_id from " . TABLE_CONTRIB_TRACKER . " where contrib_osc_id = " . $HTTP_POST_VARS['contrib_id_new']; $contrib_query = tep_db_query($contrib_raw); $record_found = (tep_db_num_rows($contrib_query) !== 0); } else { $record_found = false; } if (!$record_found){ //if the id is empty get it $new_contrib_id=get_contrib_id($contrib_link,$new_contrib_id); //get contribs info from it's URL if(!empty($new_contrib_id)){ contrib_check($new_contrib_id); } //set flag to red if need be if (strtotime($date_updated) < strtotime($last_osc_update)){ $status='0'; } else { $status='1'; } //Add support link if user didn't provide one and one exists in the contrib info if ($HTTP_POST_VARS['contrib_link_support'] !='') { $contrib_support_link = $HTTP_POST_VARS['contrib_link_support']; } elseif ($contrib_support_topic) { $contrib_support_link = $contrib_supportURL . $contrib_support_topic; } else { $contrib_support_link = ''; } $contrib_query = "insert into " . TABLE_CONTRIB_TRACKER . " (contr_id, contrib_osc_id, contrib_name, contrib_link, contrib_support, config_comments, note_created, contr_last_modified, status, last_update, contrib_vers) values ('','" . $HTTP_POST_VARS['contrib_id_new'] . "','" . addslashes($contrib_name) . "','" . $contrib_link . "','" . $contrib_support_link . "','" . $HTTP_POST_VARS['config_comments'] . "', '" . $date_added . "', '" . $last_osc_update . "', '" . $status . "', '" . $date_updated . "', '" . $HTTP_POST_VARS['contrib_vers'] . "' )"; if ( tep_db_query($contrib_query) ){ $messageStack->add_session(MESSAGE_INSERT_SUCCESS, 'success'); } else { $messageStack->add_session(MESSAGE_INSERT_ERROR, 'error'); } } else { $messageStack->add_session(MESSAGE_INSERT_DUPLICATE, 'error'); } tep_redirect(tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action')))); break; case 'update': if (($old_status!=='1' && $status=='1') || ($HTTP_POST_VARS['today_date'])){ $last_update=date("Y-m-d H:M:S"); }else{ $last_update=$HTTP_POST_VARS['last_update']; } //Get the creation date $note_created=$HTTP_POST_VARS['note_created']; //convert old links to new ones $link=old_to_new_url($HTTP_POST_VARS['contrib_link_new']); $new_contrib_id=$HTTP_POST_VARS['contrib_id_new']; $contrib_name=$HTTP_POST_VARS['contrib_name_new']; //if the id is empty get it $new_contrib_id=get_contrib_id($link,$new_contrib_id); //if the name is empty get it if (empty($contrib_name) && !empty($new_contrib_id)){ contrib_check($new_contrib_id); }else{ $contrib_name=$HTTP_POST_VARS['contrib_name_new']; } //tep_db_query("update " .TABLE_CONTRIB_TRACKER . " set contr_last_modified = now(), status = '" . $HTTP_POST_VARS['status'] . "', contrib_osc_id = '" . $new_contrib_id . "',contrib_name = '" . $contrib_name . "', contrib_link = '" . $HTTP_POST_VARS['contrib_link_new'] . "', config_comments = '" . $HTTP_POST_VARS['config_comments'] . "', last_update = '" .$last_update. "', contrib_vers= '" . $HTTP_POST_VARS['contrib_vers'] . "' where contr_id = '" . $HTTP_POST_VARS['contr_id'] . "'"); $contrib_query = "update " .TABLE_CONTRIB_TRACKER . " set contr_last_modified = now(), status = '" . $HTTP_POST_VARS['status'] . "', contrib_osc_id = '" . $new_contrib_id . "',contrib_name = '" . $contrib_name . "', contrib_link = '" . $link . "', contrib_support = '" . $HTTP_POST_VARS['contrib_link_support'] . "', config_comments = '" . $HTTP_POST_VARS['config_comments'] . "', last_update = '" . $last_update . "', note_created = '" . $note_created . "', contrib_vers= '" . $HTTP_POST_VARS['contrib_vers'] . "' where contr_id = '" . $HTTP_POST_VARS['contr_id'] . "'"; if ( tep_db_query($contrib_query) ){ $messageStack->add_session(MESSAGE_UPDATE_SUCCESS, 'success'); }else{ $messageStack->add_session(MESSAGE_UPDATE_SUCCESS, 'error'); } tep_redirect(tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action', 'sID')) . 'sID=' . $contr_id)); break; case 'deleteconfirm': $contr_id = tep_db_prepare_input($HTTP_GET_VARS['sID']); // tep_db_query("delete from " . TABLE_CONTRIB_TRACKER. " where contr_id = '" . tep_db_input($contr_id) . "'"); $contrib_query = "delete from " . TABLE_CONTRIB_TRACKER. " where contr_id = '" . tep_db_input($contr_id) . "'"; if ( tep_db_query($contrib_query) ){ $messageStack->add_session(MESSAGE_DELETE_SUCCESS, 'success'); }else{ $messageStack->add_session(MESSAGE_DELETE_ERROR, 'error'); } tep_redirect(tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action', 'sID')))); break; case 'manualcheck': contrib_check($HTTP_GET_VARS['oscID']); //if the date is newer then update the contrib database entry $update_query="UPDATE " . TABLE_CONTRIB_TRACKER . " SET status ='0', contr_last_modified = '" . $last_osc_update . "' WHERE contrib_osc_id = '" . $HTTP_GET_VARS['oscID'] . "' and last_update < '" . $last_osc_update . "'"; if ( tep_db_query($update_query) ){ $messageStack->add_session(MESSAGE_UPDATE_SUCCESS, 'success'); }else{ $messageStack->add_session(MESSAGE_UPDATE_ERROR, 'error'); } tep_redirect(tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action', 'oscID', 'contr_last_modified', 'lastupdate')))); break; case 'quick_insert': if (is_numeric($HTTP_POST_VARS['contrib_quick_insert'])){ $date_updated =date("Y-m-d H:M:S"); $date_added =date("Y-m-d H:M:S"); $new_contrib_id=$HTTP_POST_VARS['contrib_quick_insert']; $new_contrib_id = substr($HTTP_POST_VARS['contrib_quick_insert'] , strrpos($HTTP_POST_VARS['contrib_link_new'] , '/') +1); //check whether contrib is already in database $contrib_raw = "select contrib_osc_id from " . TABLE_CONTRIB_TRACKER . " where contrib_osc_id = " . $HTTP_POST_VARS['contrib_quick_insert']; $contrib_query = tep_db_query($contrib_raw); if (tep_db_num_rows($contrib_query) == 0){ //the get contrib info contrib_check($HTTP_POST_VARS['contrib_quick_insert']); $newvers=''; //set flag to green $status='1'; if ($contrib_support_topic) { $contrib_support_link = $contrib_supportURL . $contrib_support_topic; } else { $contrib_support_link = ''; } $contrib_query = "insert into " . TABLE_CONTRIB_TRACKER . " (contr_id, contrib_osc_id, contrib_name, contrib_link, contrib_support, config_comments, note_created, contr_last_modified, status, last_update, contrib_vers) values ('','" . $HTTP_POST_VARS['contrib_quick_insert'] . "','" . addslashes($contrib_name) . "','" . $contribsURL . $HTTP_POST_VARS['contrib_quick_insert'] . "','" . $contrib_support_link . "','" . '' . "', '" . $date_added . "', '".$last_osc_update."', '".$status."', '" . $date_updated . "', '" . $newvers . "' )"; if ( tep_db_query($contrib_query) ){ $messageStack->add_session(MESSAGE_INSERT_SUCCESS, 'success'); } else { $messageStack->add_session(MESSAGE_INSERT_ERROR, 'error'); } } else { $messageStack->add_session(MESSAGE_INSERT_DUPLICATE, 'error'); } tep_redirect(tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action')))); } break; case 'manualcheckall': //$admin_query_query_raw = "select contr_id, contrib_osc_id, contrib_name, contrib_link, contrib_support, status, note_created , contr_last_modified, last_update,config_comments, contrib_vers from " . TABLE_CONTRIB_TRACKER . " order by contrib_name "; $manualcheckall_raw = "select contr_id, contrib_osc_id, contrib_name, status, note_created , contr_last_modified, last_update from " . TABLE_CONTRIB_TRACKER . " order by contrib_name "; $manualcheckall_query = tep_db_query($manualcheckall_raw); if (tep_db_num_rows($manualcheckall_query) == 0){ $messageStack->add_session(MESSAGE_MANUALALL_NONE_ERROR, 'error'); }else{ while ($admin_quer = tep_db_fetch_array($manualcheckall_query)) { $sInfo_array = array_merge($admin_quer); /*print_r($sInfo_array[contrib_osc_id]); echo '<br>';*/ $contrib_osc_id=$sInfo_array[contrib_osc_id]; contrib_check($contrib_osc_id); //if the date is newer then update the contrib database entry $update_query="UPDATE " . TABLE_CONTRIB_TRACKER . " SET status ='0', contr_last_modified = '" . $last_osc_update . "' WHERE contrib_osc_id = '" . $contrib_osc_id . "' and last_update < '" . $last_osc_update . "'"; if ( !tep_db_query($update_query) ){ //$messageStack->add_session(MESSAGE_MANUALALL_SUCCESS, 'success'); //}else{ $messageStack->add_session(MESSAGE_MANUALALL_ERROR.$sInfo_array[contrib_name], 'error'); } } } tep_redirect(tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action')))); break; } require(DIR_WS_INCLUDES . 'template_top.php'); ?> <!-- <script language="javascript" type="text/javascript"> function toggleDivBlock(id) { if (document.getElementById) { itm = document.getElementById(id); } else if (document.all){ itm = document.all[id]; } else if (document.layers){ itm = document.layers[id]; } if (itm) { if (itm.style.display != "none") { itm.style.display = "none"; } else { itm.style.display = "block"; } } } </script> --> <?php // set sub title if ( $HTTP_GET_VARS['action'] == 'readonly') $HEADING_SUB_TITLE = HEADING_SUB_TITLE_READONLY; if ( $HTTP_GET_VARS['action'] == 'delete') $HEADING_SUB_TITLE = HEADING_SUB_TITLE_DELETE; if ( $HTTP_GET_VARS['action'] == 'update') $HEADING_SUB_TITLE = HEADING_SUB_TITLE_EDIT; if ( $HTTP_GET_VARS['action'] == 'edit') $HEADING_SUB_TITLE = HEADING_SUB_TITLE_EDIT; if ( $HTTP_GET_VARS['action'] == 'new') $HEADING_SUB_TITLE = HEADING_SUB_TITLE_INSERT; if ( $HTTP_GET_VARS['action'] == 'setflag') $HEADING_SUB_TITLE = HEADING_SUB_TITLE_SETFLAG; if ( $HTTP_GET_VARS['action'] == '') $HEADING_SUB_TITLE = HEADING_SUB_TITLE; ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <td width="100%" valign="top"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?> <?php echo '<a href="'.$addonsURL.'" target="_blank">' . tep_image(DIR_WS_IMAGES . 'html_badge.gif', HEADING_CONTRIB_HTML_SUPPORT_SITE, '80', '15') . '</a> <a href="'. $addonsURL .'" target="_blank">' . tep_image(DIR_WS_IMAGES . 'rss_badge.gif', HEADING_CONTRIB_RSS_SUPPORT_SITE, '80', '15') . '</a>'; ?> <br><font class="smallText"><?php echo $HEADING_SUB_TITLE; ?></font> </td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', 10, 1); ?></td> <?php if ($HTTP_GET_VARS['action'] != 'new' && $HTTP_GET_VARS['action'] != 'edit' && $HTTP_GET_VARS['action'] != 'readonly') { if (htmlspecialchars(StripSlashes(@$HTTP_GET_VARS["search"])) == ''){ $searchquery = ''; } else { $searchquery = htmlspecialchars(StripSlashes(@$HTTP_GET_VARS["search"])) ; } ?> <td align="right"> <table border="0" width="100%" cellspacing="0" cellpadding="1"> <tr> <td class="smallText" align="right"> <?php echo tep_draw_form('search', FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action')), 'get'); echo HEADING_TITLE_CONTRIBSEARCH . ' ' . tep_draw_input_field('search', $searchquery, "onFocus=\"if (this.value == 'enter search query') { this.value='' }\""); ?> </form> </td> </tr> <tr> <td class="smallText" align="right"> <?php echo tep_draw_form('quick_insert', FILENAME_CONTRIB_TRACKER, 'action=quick_insert', 'post'); echo TEXT_QUICKOSC_ID .' '. TEXT_ID_QUICK_NEW . ' ' . tep_draw_input_field('contrib_quick_insert', '', "onFocus=\"if (this.value == 'enter contrib ID') { this.value='' }\""); ?> </form> </td> </tr> <tr> <?php if ($HTTP_GET_VARS['action']== 'editlastcheck') { ?> <!-- SHOW THE TITLE AND A FIELD TO ENTER A NEW DATE --> <td class="smallText" align="right"> <?php echo tep_draw_form('lastcheck', FILENAME_CONTRIB_TRACKER,'action=updatecheck&id=' . $admin_quer['contr_id'] . '&page=' . $HTTP_GET_VARS['page'] . '&sID=' . $HTTP_GET_VARS['sID'], 'post'); echo HEADING_LAST_CHECK . ' ' . tep_draw_input_field('lastcheck', LAST_CONFIG_CHECK); ?> </form> </td> <?php } else { ?> <!-- // JUST SHOW THE TITLE AND DATE FOR LAST MANUAL UPDATE AS A LINK --> <td class="smallText" align="right"> <?php echo ' <a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action', 'id')) . 'action=editlastcheck&id=' . $admin_quer['contr_id'], 'NONSSL') . '">'.HEADING_LAST_CHECK.' '.LAST_CONFIG_CHECK .'</a>'; ?> </td> <?php } ?> </tr> </table> </td> <?php } ?> </tr> <?php if ( ($HTTP_GET_VARS['action'] == 'new') || ($HTTP_GET_VARS['action'] == 'edit') ) { if ($HTTP_GET_VARS['action'] == 'new'){ $form_action = 'insert'; }else if ($HTTP_GET_VARS['action'] == 'edit'){ $form_action = 'update'; } // UPDATE A CONTRIBUTION ENTRY if ( ($HTTP_GET_VARS['action'] == 'edit') && ($HTTP_GET_VARS['sID']) ) { $product_query = tep_db_query("select contr_id, contrib_osc_id, contrib_name, contrib_link, contrib_support, status, config_comments, last_update, note_created,contrib_vers from " . TABLE_CONTRIB_TRACKER . " where contr_id = '" . $HTTP_GET_VARS['sID'] . "'"); $product = tep_db_fetch_array($product_query); $sInfo = new objectInfo($product); } else { $sInfo = new objectInfo(array()); $contr_array = array(); } ?> <tr> <td> <form name="new_contr" <?php echo 'action="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action', 'info', 'sID')) . 'action=' . $form_action, 'NONSSL') . '"'; ?> method="post"><?php if ($form_action == 'update') echo tep_draw_hidden_field('contr_id', $HTTP_GET_VARS['sID']) ; ?> <br> <table border="0" cellspacing="0" cellpadding="2"> <?php if ($HTTP_GET_VARS['action'] == 'new'){ ?> <tr class="dataTableRow"> <td class="dataTableContent"><?php echo TEXT_OSC_ID; ?></td> <td class="dataTableContent"><?php echo tep_draw_input_field('contrib_id_new', $sInfo-> contrib_osc_id, 'size=10 maxlength=10').' '. TEXT_ID_NOTE_NEW; ?></td> </tr> <?php }else if ($HTTP_GET_VARS['action'] == 'edit'){ ?> <tr class="dataTableRow"> <td class="dataTableContent"><?php echo TEXT_OSC_ID; ?> <?php echo tep_draw_hidden_field('contrib_id_new', $sInfo-> contrib_osc_id);?></td> <td class="dataTableContent"><?php echo $sInfo-> contrib_osc_id; ?></td> </tr> <?php } ?> <tr class="dataTableRow"> <td class="dataTableContent"><?php echo TEXT_NAME_VERSION; ?></td> <td class="dataTableContent"><?php echo tep_draw_input_field('contrib_name_new', $sInfo-> contrib_name, 'size=50 maxlength=255').' '. TEXT_NAME_NOTE_NEW; ?></td> </tr> <tr class="dataTableRow"> <td class="dataTableContent"><?php echo TEXT_INFO_HTML; ?></td> <td class="dataTableContent"><?php echo tep_draw_input_field('contrib_link_new', $sInfo-> contrib_link, 'size=50 maxlength=255').' '.TEXT_OSC_URL; ?></td> </tr> <tr class="dataTableRow"> <td class="dataTableContent"><?php echo TEXT_INFO_SUPPORT; ?></td> <td class="dataTableContent"><?php echo tep_draw_input_field('contrib_link_support', $sInfo-> contrib_support, 'size=50 maxlength=255').' '.TEXT_OSC_SUPPORT; ?></td> </tr> <!-- // insert version number field --> <tr class="dataTableRow"> <td class="dataTableContent"><?php echo TEXT_VERSION_NUMBER; ?> </td> <td class="dataTableContent"><?php echo tep_draw_input_field('contrib_vers', $sInfo->contrib_vers, 'size=50 maxlength=30').' '. TEXT_VERSION_NOTE_NEW; ?></td> </tr> <tr class="dataTableRow"> <td class="dataTableContent"><?php echo TEXT_INFO_TO_REMEMBER; ?> </td> <td class="dataTableContent"><?php echo tep_draw_input_field('last_update',$sInfo->last_update, 'size=50 maxlength=30'). ' '. tep_draw_checkbox_field('today_date', $today_date,'',''). ' '. TEXT_TODAY_DATE.' '. TEXT_INT_DATE_NEW; ?></td> </tr> <tr class="dataTableRow"> <td class="dataTableContent"><?php echo TEXT_INFO_DATE_ADDED; ?> </td> <td class="dataTableContent"><?php echo tep_draw_input_field('note_created',$sInfo->note_created, 'size=50 maxlength=30'). ' '. tep_draw_checkbox_field('today_date2', $today_date,'',''). ' '. TEXT_TODAY_DATE.' '. TEXT_ADD_DATE_NEW; ?></td> </tr> <tr class="dataTableRow"> <td valign="top" class="dataTableContent"><?php echo TEXT_CONFIG_COMMENTS; ?> </TD> <td class="dataTableContent"><?php echo tep_draw_textarea_field('config_comments', 'soft', '70', '15', ($sInfo->config_comments)) ; ?></td> </tr> <?php if ( $HTTP_GET_VARS['action'] == 'edit') { ?> <tr class="dataTableRow"> <td class="dataTableContent"><?php echo TEXT_CONFIG_STATUS; ?> </td> <td class="dataTableContent"><?php echo tep_draw_input_field('status', $sInfo->status, 'size=2 maxlength=1'); ?> 0 = <?php echo tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', TEXT_NEW_UPDATE_EXISTS , 10, 10); ?> <?php echo TEXT_NEW_UPDATE_EXISTS; ?> 1 = <?php echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', TEXT_NO_NEW_UPDATE , 10, 10); ?> <?php echo TEXT_NO_NEW_UPDATE; ?> 2 = <?php echo TEXT_NO_STATUS; ?> <td><?php echo tep_draw_hidden_field('old_status', $sInfo->status);?></td> </tr> <?php } ?> </table> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main" colspan=2 align="right" valign="top"><br><?php echo (($form_action == 'insert') ? tep_image_submit('button_insert.gif', IMAGE_INSERT) : tep_image_submit('button_update.gif', IMAGE_UPDATE)) . ' <a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action'))). '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a> <a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params()) . '" onclick="reset();">' . tep_image_button('button_reset.gif', IMAGE_RESET) . '</a>'; ?></td> </table> </form> </td> </tr> <?php } elseif ($HTTP_GET_VARS['action'] != 'readonly') { ?> <tr> <td colspan=3> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <!-- TABLE HEADINGS AND SORT ICONS--> <td valign="top"> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"> <a href="<?php echo "$PHP_SELF?sort=2a" . "&page=" . $HTTP_GET_VARS['page'] . "&sID=" . $HTTP_GET_VARS['sID']; ?>"><?php echo tep_image(DIR_WS_IMAGES . 'icon_up.gif', IMAGE_BUTTON_UPSORT); ?></a><a href="<?php echo "$PHP_SELF?sort=2d" . "&page=" . $HTTP_GET_VARS['page'] . "&sID=" . $HTTP_GET_VARS['sID']; ?>"><?php echo tep_image(DIR_WS_IMAGES . 'icon_down.gif', IMAGE_BUTTON_DOWNSORT); ?></a><br><?php echo TABLE_HEADING_NAME; ?></td> <td class="dataTableHeadingContent" align="center"><br><?php echo TABLE_HEADING_VERSION; ?> </td><td class="dataTableHeadingContent" align="center"><a href="<?php echo "$PHP_SELF?sort=4a" . "&page=" . $HTTP_GET_VARS['page'] . "&sID=" . $HTTP_GET_VARS['sID']; ?>"><?php echo tep_image(DIR_WS_IMAGES . 'icon_up.gif', IMAGE_BUTTON_UPSORT); ?></a><a href="<?php echo "$PHP_SELF?sort=4d" . "&page=" . $HTTP_GET_VARS['page'] . "&sID=" . $HTTP_GET_VARS['sID']; ?>"><?php echo tep_image(DIR_WS_IMAGES . 'icon_down.gif', IMAGE_BUTTON_DOWNSORT); ?></a> <br><?php echo TABLE_HEADING_STATUS; ?></td> <td class="dataTableHeadingContent" align="right"><br><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php switch ($sort) { case "2a": $order_it_by = "contrib_name, status "; break; case "2d": $order_it_by = "contrib_name DESC, status "; break; case "4a": $order_it_by = "status, contrib_name"; break; case "4d": $order_it_by = "status DESC, contrib_name"; break; case "5a": $order_it_by = "last_update, contrib_name"; break; case "5d": $order_it_by = "last_update DESC, contrib_name"; break; default: $order_it_by = "status, contrib_name"; } // IF THIS IS A SEARCH GET THE SEARCH RESULTS FROM THE DB if ($HTTP_GET_VARS['search']) { //contrib_support->'" . $HTTP_POST_VARS['contrib_link_support'] . "', $admin_query_query_raw = "select contr_id, contrib_osc_id, contrib_name, contrib_link, contrib_support, status, note_created , contr_last_modified, last_update,config_comments, contrib_vers from " . TABLE_CONTRIB_TRACKER . " where contrib_name like '%" . $HTTP_GET_VARS['search'] . "%' order by " . $order_it_by . " "; $admin_query_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $admin_query_query_raw, $admin_query_query_numrows); $admin_query_query = tep_db_query($admin_query_query_raw); if (tep_db_num_rows($admin_query_query) == 0) echo '<tr><td class="dataTableContent" align="left">' . TEXT_NO_DATA . "</td></tr>\n"; } else { // IF THIS IS NOT A SEARCH SO GET ALL THE DATABASE ENTRIES $admin_query_query_raw = "select contr_id, contrib_osc_id, contrib_name, contrib_link, contrib_support, status, note_created , contr_last_modified, last_update,config_comments, contrib_vers from " . TABLE_CONTRIB_TRACKER . " order by " . $order_it_by . " "; $admin_query_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $admin_query_query_raw, $admin_query_query_numrows); $admin_query_query = tep_db_query($admin_query_query_raw); if (tep_db_num_rows($admin_query_query) == 0) echo '<tr><td class="dataTableContent" align="right">' . TEXT_EMPTY_DATABASE . "</td></tr>\n"; } while ($admin_quer = tep_db_fetch_array($admin_query_query)) { if ( ((!$HTTP_GET_VARS['sID']) || ($HTTP_GET_VARS['sID'] == $admin_quer['contr_id'])) && (!$sInfo) ) { $sInfo_array = array_merge($admin_quer); $sInfo = new objectInfo($sInfo_array); } if ($HTTP_GET_VARS['search'] == '') { if ( (is_object($sInfo)) && ($admin_quer['contr_id'] == $sInfo->contr_id)) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('sID')) . 'sID=' . $admin_quer['contr_id']) . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('sID')) . 'sID=' . $admin_quer['contr_id']) . '\'">' . "\n"; } } else { $searchresult_query_query_raw = "select contr_id from " . TABLE_CONTRIB_TRACKER . " order by " . $order_it_by . " "; $searchresult_query_query = tep_db_query($searchresult_query_query_raw); $searchresult_page= round($searchresult_query_query_numrows / MAX_DISPLAY_SEARCH_RESULTS)-1; // INSERT CONTRIB NAMES INTO PAGE if ( (is_object($sInfo)) && ($admin_quer['contr_id'] == $sInfo->contr_id)) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('sID')) . 'sID=' . $admin_quer['contr_id']) . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('sID')) . 'sID=' . $admin_quer['contr_id']) . '\'">' . "\n"; } } ?> <td class="dataTableContent"> <?php if ($admin_quer['contrib_link']){ echo '<a target="_blank" href="' . $admin_quer['contrib_link'] . '" name="' . $admin_quer['contrib_name'] . '">' . $admin_quer['contrib_name'].'</a>'; }else{ echo $admin_quer['contrib_name']; } ?> </td> <td class="dataTableContent" align="center"><?php echo $admin_quer['contrib_vers'];?></td> <td class="dataTableContent" align="center"> <?php // SHOW THE STATUS ICONS // contr_last_modified if ($admin_quer['status'] == '0') { echo tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', TEXT_NEW_UPDATE_EXISTS, 10, 10) . ' '; } else { echo '<a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action')) . 'action=setflag&flag=0&id=' . $admin_quer['contr_id'] . '&contr_last_modified=' . $admin_quer['contr_last_modified'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', TEXT_SET_NEW_UPDATE_EXISTS, 10, 10) . '</a> '; } if ($admin_quer['status'] == '1') { echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', TEXT_NO_NEW_UPDATE, 10, 10); } else { echo '<a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action')) . 'action=setflag&flag=1&id=' . $admin_quer['contr_id'] . '&contr_last_modified=' . $admin_quer['contr_last_modified'] , 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', TEXT_SET_NO_NEW_UPDATE, 10, 10) . '</a>'; } ?> </td> <td class="dataTableContent" align="right"> <?php // INSERT THE ACTION ICONS if ($admin_quer['contrib_support']) { echo '<a target="_blank" href="' . $admin_quer['contrib_support'] . '">' .tep_image(DIR_WS_IMAGES . 'icon_help.gif', TEXT_OSC_SUPPORT_THREAD) . '</a> '; } if ($admin_quer['contrib_osc_id']){ echo '<a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action')) . 'action=manualcheck&oscID=' . $admin_quer['contrib_osc_id'].'&sID=' . $admin_quer['contr_id']) . '">' .tep_image(DIR_WS_IMAGES . 'icon_manual_check.jpg', TEXT_MANUAL_CHECK) . '</a> '; } if (htmlspecialchars(StripSlashes(@$HTTP_GET_VARS["search"])) == '') { $reference = 'page'; } else { $reference = 'search'; } if ( (is_object($sInfo)) && ($admin_quer['contr_id'] == $sInfo->contr_id) ) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action', 'sID')) . 'sID=' . $admin_quer['contr_id']) . '">' .tep_image(DIR_WS_IMAGES . 'icon_info.gif', TEXT_INFO) . '</a>'; } ?> </td> </tr> <?php } ?> <tr> <td colspan="5"> <table border="0" width="100%" cellpadding="0"cellspacing="2"> <tr> <td class="smallText" valign="top"><?php echo $admin_query_split->display_count($admin_query_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_RECORDS); ?></td> <td class="smallText" align="right"><?php echo $admin_query_split->display_links($admin_query_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], 'sort=' . $HTTP_GET_VARS['sort']); ?></td> </tr> <?php if (!$HTTP_GET_VARS['action']) { ?> <tr> <td class="smallText" colspan="2" align="right"> <?php echo '<a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action')) . 'action=manualcheckall') . '">' . tep_image_button('button_check_all.gif', IMAGE_CHECKALL) . '</a>'; ?> <?php echo '<a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, 'action=new') . '">' . tep_image_button('button_insert.gif', IMAGE_INSERT) . '</a>'; ?> </td> </tr> <!-- // INSERT THE HELP NOTES --> <tr> <td class="smallText" colspan="2" align="left"> <?php echo '<B>'. TEXT_HELP_NOTES_HEADER . '</B><br><ul>' . TEXT_HELP_NOTES . '</ul><br><BR>'; ?> </td> </tr> <tr> <!-- // INSERT NEWEST CONTRIBS FROM RSS --> <td class="smallText" colspan="2" align="left"> <B><?php echo TEXT_CONTRIB_HEADER; ?></B> <br> <?php if (is_array($articlelist)) { echo "<ol>\n"; foreach ($articlelist['item'] as $article ) { $thelink = $article['link']; $thetitle = $article['title']; echo "<li><a href=\"" . $thelink . "\" target=\"_blank\">" . $thetitle . "</a></li>\n"; } echo "</ol>\n"; } else { echo "ERROR: Could not open RDF feed\n"; } ?> </td> </tr> <?php } ?> </table> </td> </tr> </table> </td> <?php $heading = array(); $contents = array(); // RIGHT COLUMN STUFF switch ($HTTP_GET_VARS['action']) { case 'delete': $heading[] = array('text' => '<center><b>' . TEXT_INFO_HEADING_DELETE . '</b></center>'); $contents = array('form' => tep_draw_form('install_contr_del', FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action')) . 'action=deleteconfirm')); $contents[] = array('text' => TEXT_INFO_DELETE_INTRO); $contents[] = array('text' => '<br><b>' . $sInfo-> contrib_name . '</b>'); $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action')) . 'sID=' . $sInfo->contr_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (is_object($sInfo)) { $heading[] = array('text' => '<center><b>' . $sInfo->contrib_name . '</b></center>'); $contents[] = array('align' => 'center', 'text' => '<b>'.TEXT_VERSION_NUMBER .'</b> '.$sInfo-> contrib_vers); // HBS - Start // $contents[] = array('text' => '<b>' . TEXT_INFO_TO_REMEMBER . '</b><BR> ' . $sInfo->last_update); $contents[] = array('text' => '<b>' . TEXT_INFO_TO_REMEMBER . '</b><BR> ' . tep_date_short($sInfo->last_update)); // $contents[] = array('text' => '<br> <b>' . TEXT_INFO_DATE_ADDED . '</b><BR> ' . $sInfo->note_created); $contents[] = array('text' => '<br> <b>' . TEXT_INFO_DATE_ADDED . '</b><BR> ' . tep_date_short($sInfo->note_created)); // $contents[] = array('text' => '<b>' . TEXT_INFO_LAST_MODIFIED . '</b><BR> ' . $sInfo->contr_last_modified . '<BR><BR>'); $contents[] = array('text' => '<b>' . TEXT_INFO_LAST_MODIFIED . '</b><BR> ' . tep_date_short($sInfo->contr_last_modified) . '<BR><BR>'); // HBS - End $contents[] = array('text' => '<b>' .TEXT_CONFIG_COMMENTS .'</b> '. $sInfo->config_comments); $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action', 'sID')) . 'sID=' . $sInfo->contr_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action', 'sID')) . 'sID=' . $sInfo->contr_id . '&action=delete') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a><br><br> <a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action', 'sID')) . 'sID=' . $sInfo->contr_id . '&action=readonly') . '">' . tep_image_button('button_preview.gif', IMAGE_PREVIEW) . '</a>' ); } break; } if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?> </tr> </table> </td> </tr> <?php } elseif ($HTTP_GET_VARS['action'] == 'readonly') { // BOF READONLY/PREVIEW $product_query = tep_db_query("select contr_id, contrib_osc_id, contrib_name,contrib_link, status, config_comments, note_created, contr_last_modified, last_update from " . TABLE_CONTRIB_TRACKER . " where contr_id = '" . $HTTP_GET_VARS['sID'] . "'"); $product = tep_db_fetch_array($product_query); $sInfo = new objectInfo($product); if ($sInfo->status == '0') $status_desc = IMAGE_ICON_STATUS_GREEN; if ($sInfo->status == '1') $status_desc = IMAGE_ICON_STATUS_RED; if ($sInfo->status == '2') $status_desc = IMAGE_ICON_STATUS_NONE; ?> <tr> <td colspan=3> <br> <table border="0" cellspacing="0" cellpadding="2" class="formArea" align="center"> <tr class="dataTableRow"> <td class="dataTableContent" NOWRAP><b><?php echo TEXT_OSC_ID; ?> </b></td> <td class="formAreaTitle"><b><font color=blue><?php echo $sInfo-> contrib_osc_id; ?></font></b></td> </tr> <tr class="dataTableRow"> <td class="dataTableContent" NOWRAP><b><?php echo TEXT_NAME_VERSION; ?> </b></td> <td class="formAreaTitle"><b><font color=blue><?php echo $sInfo-> contrib_name; ?></font></b></td> </tr> <tr class="dataTableRow"> <td class="dataTableContent" NOWRAP><b><?php echo TEXT_INFO_SUPPORT; ?> </b></td> <td class="formAreaTitle"><b><font color=blue><?php echo $sInfo->contrib_support; ?></font></b></td> </tr> <tr class="dataTableRowOver"> <td VALIGN="top" class="dataTableContent" NOWRAP><b><?php echo TEXT_CONFIG_COMMENTS; ?> </b></td> <td class="dataTableContent"><?php echo nl2br($sInfo->config_comments); ?></td> </tr> <tr class="dataTableRowOver"> <td class="dataTableContent" NOWRAP><b><?php echo TEXT_INFO_TO_REMEMBER; ?> </b></td> <td class="dataTableContent"><?php echo $sInfo->last_update; ?></td> </tr> <tr class="dataTableRow"> <td class="dataTableContent" NOWRAP><b><?php echo TEXT_INFO_DATE_ADDED; ?> </b></td> <td class="dataTableContent"><?php echo $sInfo->note_created; ?></td> </tr> <tr class="dataTableRowOver"> <td class="dataTableContent" NOWRAP><b><?php echo TEXT_INFO_LAST_MODIFIED; ?> </b></td> <td class="dataTableContent"><?php if ($sInfo->contr_last_modified != '0000-00-00 00:00:00') echo $sInfo->contr_last_modified; ?></td> </tr> <tr class="dataTableRow"> <td class="dataTableContent" NOWRAP><b><?php echo TEXT_INFO_STATUS; ?> </b></td> <td class="dataTableContent"><?php echo $sInfo->status . ': ' . $status_desc; ?></td> </tr> </table> </td> </tr> <tr> <td colspan=3 align="center" class="main"> <br> <?php echo '<a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action', 'sID')) . 'sID=' . $sInfo->contr_id, 'NONSSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?> </td> </tr> <?php } // EOF readonly ?> </table> <?php require(DIR_WS_INCLUDES . 'template_bottom.php'); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> However the call to the function parse_xml (or rather the function itself) interferes with the proper functioning of the BE menu on the left side in osC 2.3.1 (I simply narrowed the problem down by eliminating different sections of the code and subsequent testing). However, I am no professional programmer and any help with fixing the parse_xml / BE menu issue is very welcome. Thanks in advance. Kind regards, Dennis Quote Link to comment Share on other sites More sharing options...
dennish Posted May 2, 2012 Share Posted May 2, 2012 (edited) Happy to report back to the list with a solution to the issue raised in post # 257 To solve the issue with the BE menu and the parse_xml function I searched the web and found another solution to turn the RSS feed into an array the Contribution Tracker can work with: MagpieRSS: RSS for PHP. You can download the necessary scripts at http://magpierss.sourceforge.net/ (just look for download. I used version 0.72). Copy the included 4 files (rss_fetch.inc, rss_parser.inc, rss_cache.inc, and rss_utils.inc) and the directory extlib into a new directory called magpierss in your osC admin directory. Add a new directory cache to the magpierss directory and set the permissions to 744 (you can do all this with your FTP software for uploading files). As a final step replace the file catalog/admin/contrib_tracker.php by the code listed below. <?php /* $Id: contrib_tracker.php,v 1.7.17 2009/09/05 15:57:07 stevedallas Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com 05 Sep 2009 GCH 1.7.17 Complete rewrite of RDF file handling. No longer requires or creates a cache file Complete rewrite of XML parsing - no longer uses rdf_class.php 28 Nov 2008 GCH 1.7.14 Several bug fixes in insert routine for correct processing of non-osCommerce support site contributions date added can now be edited clears sID on page change 26 Nov 2008 lildog 1.7.13 When adding a new contrib date added and last official update were getting mixed up changed a couple of variables so they are more obvious 08 Nov 2008 GCH 1.7.12 Quick Add now searches for a support topic and inserts it into the database Insert now adds support topic if user didn't provide one and one exists in the contribution description Quick Add and Insert no longer add duplicate records toggleDivBlock() now uses the code from osC 2.2RC2a Extensive use of tep_get_all_get_params() to preserve parameters - no longer loses sort order on updates Fixed two minor HTML errors that occurred with empty searches and an empty contrib_tracker table Clicking anywhere on a row in the table of contributions will select it Fixed the operation of the manual check button (manualcheckall worked; manualcheck didn't) 08 Nov 2008 lildog 1.7.11 realigned buttons in insert contribution page 07 Nov 2008 lildog 1.7.10 My sql needed quotes around 'LAST_CONFIG_CHECK' from version 1.7.8. 07 Nov 2008 lildog 1.7.9 Fixed Insert so it works with contributions with apostrophes in their titles 28 Oct 2008 GCH 1.7.8 Changed config update to use key LAST_CONFIG_CHECK instead of raw configuration_id, which is installation dependent Rebuilt all tables to ensure correct HTML structure Re-created missing Javascript function toggleDivBlock() to make "info" links work in editor Modified logic to suppress search, quick add, and last update boxes in edit and preview modes Escaped a ton of ampersands to "&" for HTML 4.01 Transitional DTD conformance (Note that some modes still generate non-conforming HTML due to minor bugs in osC functions tep_draw_form() and tep_draw_textarea_field() ) Simplified status icon display code Copyright (c) 2003 osCommerce Released under the GNU General Public License _________________________________________________________________ Contribution Tracker MODULE for osC Admin By Admin of www.silvermoon-jewelry.com Based on: Admin_notes: Original Code By: Robert Hellemans of www.RuddlesMills.com RSS News for OSC These are LIVE SHOPS - So please, no TEST accounts etc... We will report you to your ISP if you abuse our websites! ##### make a function to display month's english and vise versa. #### */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTRIB_TRACKER); require(DIR_WS_FUNCTIONS . 'contrib_tracker.php'); $xmlURL='http://feedproxy.feedburner.com/osCommerce_Contributions'; $addonsURL='http://addons.oscommerce.com/'; $contribsURL='http://addons.oscommerce.com/info/'; $contrib_supportURL='http://www.oscommerce.com/forums/index.php?showtopic='; $addonsRDFURL='http://www.oscommerce.com/oscommerce_contributions.rdf'; $format = '%Y-%m-%d %H:%M:%S'; //rss file path // THIS GETS THE FEED AND PARSES IT require_once('magpierss/rss_fetch.inc'); $url = $xmlURL; $rss = fetch_rss($url); foreach ($rss->items as $item) { $thelink = $item['link']; $thetitle = $item['title']; $osc_rss_pubdate_raw = $item['pubdate']; $osc_rss_pubdate = strtotime($osc_rss_pubdate_raw); $osc_rss_pubdate = strftime ($format, $osc_rss_pubdate); // add backslashes to characters that need escaping $thetitle=addslashes($thetitle); // UPDATE THE CONTRIBUTIONS THAT ARE IN THE RSS FILE tep_db_query("UPDATE " . TABLE_CONTRIB_TRACKER . " SET status ='0', contr_last_modified = '" . $osc_rss_pubdate . "' where contrib_name = '" . $thetitle . "' and last_update < '" . $osc_rss_pubdate . "'"); } switch ($HTTP_GET_VARS['action']) { case 'setflag': tep_set_contrib_query_status($HTTP_GET_VARS['id'], $HTTP_GET_VARS['flag'], $HTTP_GET_VARS['contr_last_modified']); tep_redirect(tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('flag', 'action', 'id', 'contr_last_modified')))); break; case 'updatecheck': $contrib_query = "update " . TABLE_CONFIGURATION . " set configuration_value = '" . $HTTP_POST_VARS['lastcheck'] . "', last_modified = now() where configuration_key = 'LAST_CONFIG_CHECK'"; if (tep_db_query($contrib_query)){ $messageStack->add_session(MESSAGE_UPDATECHECK_SUCCESS, 'success'); }else{ $messageStack->add_session(MESSAGE_UPDATECHECK_ERROR, 'error'); } tep_redirect(tep_href_link(FILENAME_CONTRIB_TRACKER, (array('action')))); break; case 'insert': if ($HTTP_POST_VARS['today_date']){ $date_updated =date("Y-m-d H:M:S"); }else{ $date_updated=strtotime($HTTP_POST_VARS['last_update']); $date_updated=strftime ($format, $date_updated); } if ($HTTP_POST_VARS['today_date2']){ $date_added =date("Y-m-d H:M:S"); }else{ $date_added=strtotime($HTTP_POST_VARS['note_created']); $date_added=strftime ($format, $date_added); } $new_contrib_id=$HTTP_POST_VARS['contrib_id_new']; $contrib_name=stripslashes($HTTP_POST_VARS['contrib_name_new']); $contrib_link=old_to_new_url($HTTP_POST_VARS['contrib_link_new']); if ($contrib_link == '') { $contrib_link = $contribsURL . $new_contrib_id; } //check whether contrib is already in database if ($HTTP_POST_VARS['contrib_id_new'] !=='') { $contrib_raw = "select contrib_osc_id from " . TABLE_CONTRIB_TRACKER . " where contrib_osc_id = " . $HTTP_POST_VARS['contrib_id_new']; $contrib_query = tep_db_query($contrib_raw); $record_found = (tep_db_num_rows($contrib_query) !== 0); } else { $record_found = false; } if (!$record_found){ //if the id is empty get it $new_contrib_id=get_contrib_id($contrib_link,$new_contrib_id); //get contribs info from it's URL if(!empty($new_contrib_id)){ contrib_check($new_contrib_id); } //set flag to red if need be if (strtotime($date_updated) < strtotime($last_osc_update)){ $status='0'; } else { $status='1'; } //Add support link if user didn't provide one and one exists in the contrib info if ($HTTP_POST_VARS['contrib_link_support'] !='') { $contrib_support_link = $HTTP_POST_VARS['contrib_link_support']; } elseif ($contrib_support_topic) { $contrib_support_link = $contrib_supportURL . $contrib_support_topic; } else { $contrib_support_link = ''; } $contrib_query = "insert into " . TABLE_CONTRIB_TRACKER . " (contr_id, contrib_osc_id, contrib_name, contrib_link, contrib_support, config_comments, note_created, contr_last_modified, status, last_update, contrib_vers) values ('','" . $HTTP_POST_VARS['contrib_id_new'] . "','" . addslashes($contrib_name) . "','" . $contrib_link . "','" . $contrib_support_link . "','" . $HTTP_POST_VARS['config_comments'] . "', '" . $date_added . "', '" . $last_osc_update . "', '" . $status . "', '" . $date_updated . "', '" . $HTTP_POST_VARS['contrib_vers'] . "' )"; if ( tep_db_query($contrib_query) ){ $messageStack->add_session(MESSAGE_INSERT_SUCCESS, 'success'); } else { $messageStack->add_session(MESSAGE_INSERT_ERROR, 'error'); } } else { $messageStack->add_session(MESSAGE_INSERT_DUPLICATE, 'error'); } tep_redirect(tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action')))); break; case 'update': if (($old_status!=='1' && $status=='1') || ($HTTP_POST_VARS['today_date'])){ $last_update=date("Y-m-d H:M:S"); }else{ $last_update=$HTTP_POST_VARS['last_update']; } //Get the creation date $note_created=$HTTP_POST_VARS['note_created']; //convert old links to new ones $link=old_to_new_url($HTTP_POST_VARS['contrib_link_new']); $new_contrib_id=$HTTP_POST_VARS['contrib_id_new']; $contrib_name=$HTTP_POST_VARS['contrib_name_new']; //if the id is empty get it $new_contrib_id=get_contrib_id($link,$new_contrib_id); //if the name is empty get it if (empty($contrib_name) && !empty($new_contrib_id)){ contrib_check($new_contrib_id); }else{ $contrib_name=$HTTP_POST_VARS['contrib_name_new']; } //tep_db_query("update " .TABLE_CONTRIB_TRACKER . " set contr_last_modified = now(), status = '" . $HTTP_POST_VARS['status'] . "', contrib_osc_id = '" . $new_contrib_id . "',contrib_name = '" . $contrib_name . "', contrib_link = '" . $HTTP_POST_VARS['contrib_link_new'] . "', config_comments = '" . $HTTP_POST_VARS['config_comments'] . "', last_update = '" .$last_update. "', contrib_vers= '" . $HTTP_POST_VARS['contrib_vers'] . "' where contr_id = '" . $HTTP_POST_VARS['contr_id'] . "'"); $contrib_query = "update " .TABLE_CONTRIB_TRACKER . " set contr_last_modified = now(), status = '" . $HTTP_POST_VARS['status'] . "', contrib_osc_id = '" . $new_contrib_id . "',contrib_name = '" . $contrib_name . "', contrib_link = '" . $link . "', contrib_support = '" . $HTTP_POST_VARS['contrib_link_support'] . "', config_comments = '" . $HTTP_POST_VARS['config_comments'] . "', last_update = '" . $last_update . "', note_created = '" . $note_created . "', contrib_vers= '" . $HTTP_POST_VARS['contrib_vers'] . "' where contr_id = '" . $HTTP_POST_VARS['contr_id'] . "'"; if ( tep_db_query($contrib_query) ){ $messageStack->add_session(MESSAGE_UPDATE_SUCCESS, 'success'); }else{ $messageStack->add_session(MESSAGE_UPDATE_SUCCESS, 'error'); } tep_redirect(tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action', 'sID')) . 'sID=' . $contr_id)); break; case 'deleteconfirm': $contr_id = tep_db_prepare_input($HTTP_GET_VARS['sID']); // tep_db_query("delete from " . TABLE_CONTRIB_TRACKER. " where contr_id = '" . tep_db_input($contr_id) . "'"); $contrib_query = "delete from " . TABLE_CONTRIB_TRACKER. " where contr_id = '" . tep_db_input($contr_id) . "'"; if ( tep_db_query($contrib_query) ){ $messageStack->add_session(MESSAGE_DELETE_SUCCESS, 'success'); }else{ $messageStack->add_session(MESSAGE_DELETE_ERROR, 'error'); } tep_redirect(tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action', 'sID')))); break; case 'manualcheck': contrib_check($HTTP_GET_VARS['oscID']); //if the date is newer then update the contrib database entry $update_query="UPDATE " . TABLE_CONTRIB_TRACKER . " SET status ='0', contr_last_modified = '" . $last_osc_update . "' WHERE contrib_osc_id = '" . $HTTP_GET_VARS['oscID'] . "' and last_update < '" . $last_osc_update . "'"; if ( tep_db_query($update_query) ){ $messageStack->add_session(MESSAGE_UPDATE_SUCCESS, 'success'); }else{ $messageStack->add_session(MESSAGE_UPDATE_ERROR, 'error'); } tep_redirect(tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action', 'oscID', 'contr_last_modified', 'lastupdate')))); break; case 'quick_insert': if (is_numeric($HTTP_POST_VARS['contrib_quick_insert'])){ $date_updated =date("Y-m-d H:M:S"); $date_added =date("Y-m-d H:M:S"); $new_contrib_id=$HTTP_POST_VARS['contrib_quick_insert']; $new_contrib_id = substr($HTTP_POST_VARS['contrib_quick_insert'] , strrpos($HTTP_POST_VARS['contrib_link_new'] , '/') +1); //check whether contrib is already in database $contrib_raw = "select contrib_osc_id from " . TABLE_CONTRIB_TRACKER . " where contrib_osc_id = " . $HTTP_POST_VARS['contrib_quick_insert']; $contrib_query = tep_db_query($contrib_raw); if (tep_db_num_rows($contrib_query) == 0){ //the get contrib info contrib_check($HTTP_POST_VARS['contrib_quick_insert']); $newvers=''; //set flag to green $status='1'; if ($contrib_support_topic) { $contrib_support_link = $contrib_supportURL . $contrib_support_topic; } else { $contrib_support_link = ''; } $contrib_query = "insert into " . TABLE_CONTRIB_TRACKER . " (contr_id, contrib_osc_id, contrib_name, contrib_link, contrib_support, config_comments, note_created, contr_last_modified, status, last_update, contrib_vers) values ('','" . $HTTP_POST_VARS['contrib_quick_insert'] . "','" . addslashes($contrib_name) . "','" . $contribsURL . $HTTP_POST_VARS['contrib_quick_insert'] . "','" . $contrib_support_link . "','" . '' . "', '" . $date_added . "', '".$last_osc_update."', '".$status."', '" . $date_updated . "', '" . $newvers . "' )"; if ( tep_db_query($contrib_query) ){ $messageStack->add_session(MESSAGE_INSERT_SUCCESS, 'success'); } else { $messageStack->add_session(MESSAGE_INSERT_ERROR, 'error'); } } else { $messageStack->add_session(MESSAGE_INSERT_DUPLICATE, 'error'); } tep_redirect(tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action')))); } break; case 'manualcheckall': //$admin_query_query_raw = "select contr_id, contrib_osc_id, contrib_name, contrib_link, contrib_support, status, note_created , contr_last_modified, last_update,config_comments, contrib_vers from " . TABLE_CONTRIB_TRACKER . " order by contrib_name "; $manualcheckall_raw = "select contr_id, contrib_osc_id, contrib_name, status, note_created , contr_last_modified, last_update from " . TABLE_CONTRIB_TRACKER . " order by contrib_name "; $manualcheckall_query = tep_db_query($manualcheckall_raw); if (tep_db_num_rows($manualcheckall_query) == 0){ $messageStack->add_session(MESSAGE_MANUALALL_NONE_ERROR, 'error'); }else{ while ($admin_quer = tep_db_fetch_array($manualcheckall_query)) { $sInfo_array = array_merge($admin_quer); /*print_r($sInfo_array[contrib_osc_id]); echo '<br />';*/ $contrib_osc_id=$sInfo_array[contrib_osc_id]; contrib_check($contrib_osc_id); //if the date is newer then update the contrib database entry $update_query="UPDATE " . TABLE_CONTRIB_TRACKER . " SET status ='0', contr_last_modified = '" . $last_osc_update . "' WHERE contrib_osc_id = '" . $contrib_osc_id . "' and last_update < '" . $last_osc_update . "'"; if ( !tep_db_query($update_query) ){ //$messageStack->add_session(MESSAGE_MANUALALL_SUCCESS, 'success'); //}else{ $messageStack->add_session(MESSAGE_MANUALALL_ERROR.$sInfo_array[contrib_name], 'error'); } } } tep_redirect(tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action')))); break; } require(DIR_WS_INCLUDES . 'template_top.php'); ?> <!-- <script language="javascript" type="text/javascript"> function toggleDivBlock(id) { if (document.getElementById) { itm = document.getElementById(id); } else if (document.all){ itm = document.all[id]; } else if (document.layers){ itm = document.layers[id]; } if (itm) { if (itm.style.display != "none") { itm.style.display = "none"; } else { itm.style.display = "block"; } } } </script> --> <?php // set sub title if ( $HTTP_GET_VARS['action'] == 'readonly') $HEADING_SUB_TITLE = HEADING_SUB_TITLE_READONLY; if ( $HTTP_GET_VARS['action'] == 'delete') $HEADING_SUB_TITLE = HEADING_SUB_TITLE_DELETE; if ( $HTTP_GET_VARS['action'] == 'update') $HEADING_SUB_TITLE = HEADING_SUB_TITLE_EDIT; if ( $HTTP_GET_VARS['action'] == 'edit') $HEADING_SUB_TITLE = HEADING_SUB_TITLE_EDIT; if ( $HTTP_GET_VARS['action'] == 'new') $HEADING_SUB_TITLE = HEADING_SUB_TITLE_INSERT; if ( $HTTP_GET_VARS['action'] == 'setflag') $HEADING_SUB_TITLE = HEADING_SUB_TITLE_SETFLAG; if ( $HTTP_GET_VARS['action'] == '') $HEADING_SUB_TITLE = HEADING_SUB_TITLE; ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <td width="100%" valign="top"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?> <?php echo '<a href="'.$addonsURL.'" target="_blank">' . tep_image(DIR_WS_IMAGES . 'html_badge.gif', HEADING_CONTRIB_HTML_SUPPORT_SITE, '80', '15') . '</a> <a href="'. $addonsURL .'" target="_blank">' . tep_image(DIR_WS_IMAGES . 'rss_badge.gif', HEADING_CONTRIB_RSS_SUPPORT_SITE, '80', '15') . '</a>'; ?> <br /><font class="smallText"><?php echo $HEADING_SUB_TITLE; ?></font> </td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', 10, 1); ?></td> <?php if ($HTTP_GET_VARS['action'] != 'new' && $HTTP_GET_VARS['action'] != 'edit' && $HTTP_GET_VARS['action'] != 'readonly') { if (htmlspecialchars(StripSlashes(@$HTTP_GET_VARS["search"])) == ''){ $searchquery = ''; } else { $searchquery = htmlspecialchars(StripSlashes(@$HTTP_GET_VARS["search"])) ; } ?> <td align="right"> <table border="0" width="100%" cellspacing="0" cellpadding="1"> <tr> <td class="smallText" align="right"> <?php echo tep_draw_form('search', FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action')), 'get'); echo HEADING_TITLE_CONTRIBSEARCH . ' ' . tep_draw_input_field('search', $searchquery, "onFocus=\"if (this.value == 'enter search query') { this.value='' }\""); ?> </form> </td> </tr> <tr> <td class="smallText" align="right"> <?php echo tep_draw_form('quick_insert', FILENAME_CONTRIB_TRACKER, 'action=quick_insert', 'post'); echo TEXT_QUICKOSC_ID .' '. TEXT_ID_QUICK_NEW . ' ' . tep_draw_input_field('contrib_quick_insert', '', "onFocus=\"if (this.value == 'enter contrib ID') { this.value='' }\""); ?> </form> </td> </tr> <tr> <?php if ($HTTP_GET_VARS['action']== 'editlastcheck') { ?> <!-- SHOW THE TITLE AND A FIELD TO ENTER A NEW DATE --> <td class="smallText" align="right"> <?php echo tep_draw_form('lastcheck', FILENAME_CONTRIB_TRACKER,'action=updatecheck&id=' . $admin_quer['contr_id'] . '&page=' . $HTTP_GET_VARS['page'] . '&sID=' . $HTTP_GET_VARS['sID'], 'post'); echo HEADING_LAST_CHECK . ' ' . tep_draw_input_field('lastcheck', LAST_CONFIG_CHECK); ?> </form> </td> <?php } else { ?> <!-- // JUST SHOW THE TITLE AND DATE FOR LAST MANUAL UPDATE AS A LINK --> <td class="smallText" align="right"> <?php echo ' <a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action', 'id')) . 'action=editlastcheck&id=' . $admin_quer['contr_id'], 'NONSSL') . '">'.HEADING_LAST_CHECK.' '.LAST_CONFIG_CHECK .'</a>'; ?> </td> <?php } ?> </tr> </table> </td> <?php } ?> </tr> <?php if ( ($HTTP_GET_VARS['action'] == 'new') || ($HTTP_GET_VARS['action'] == 'edit') ) { if ($HTTP_GET_VARS['action'] == 'new'){ $form_action = 'insert'; }else if ($HTTP_GET_VARS['action'] == 'edit'){ $form_action = 'update'; } // UPDATE A CONTRIBUTION ENTRY if ( ($HTTP_GET_VARS['action'] == 'edit') && ($HTTP_GET_VARS['sID']) ) { $product_query = tep_db_query("select contr_id, contrib_osc_id, contrib_name, contrib_link, contrib_support, status, config_comments, last_update, note_created,contrib_vers from " . TABLE_CONTRIB_TRACKER . " where contr_id = '" . $HTTP_GET_VARS['sID'] . "'"); $product = tep_db_fetch_array($product_query); $sInfo = new objectInfo($product); } else { $sInfo = new objectInfo(array()); $contr_array = array(); } ?> <tr> <td> <form name="new_contr" <?php echo 'action="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action', 'info', 'sID')) . 'action=' . $form_action, 'NONSSL') . '"'; ?> method="post"><?php if ($form_action == 'update') echo tep_draw_hidden_field('contr_id', $HTTP_GET_VARS['sID']) ; ?> <br /> <table border="0" cellspacing="0" cellpadding="2"> <?php if ($HTTP_GET_VARS['action'] == 'new'){ ?> <tr class="dataTableRow"> <td class="dataTableContent"><?php echo TEXT_OSC_ID; ?></td> <td class="dataTableContent"><?php echo tep_draw_input_field('contrib_id_new', $sInfo-> contrib_osc_id, 'size=10 maxlength=10').' '. TEXT_ID_NOTE_NEW; ?></td> </tr> <?php }else if ($HTTP_GET_VARS['action'] == 'edit'){ ?> <tr class="dataTableRow"> <td class="dataTableContent"><?php echo TEXT_OSC_ID; ?> <?php echo tep_draw_hidden_field('contrib_id_new', $sInfo-> contrib_osc_id);?></td> <td class="dataTableContent"><?php echo $sInfo-> contrib_osc_id; ?></td> </tr> <?php } ?> <tr class="dataTableRow"> <td class="dataTableContent"><?php echo TEXT_NAME_VERSION; ?></td> <td class="dataTableContent"><?php echo tep_draw_input_field('contrib_name_new', $sInfo-> contrib_name, 'size=50 maxlength=255').' '. TEXT_NAME_NOTE_NEW; ?></td> </tr> <tr class="dataTableRow"> <td class="dataTableContent"><?php echo TEXT_INFO_HTML; ?></td> <td class="dataTableContent"><?php echo tep_draw_input_field('contrib_link_new', $sInfo-> contrib_link, 'size=50 maxlength=255').' '.TEXT_OSC_URL; ?></td> </tr> <tr class="dataTableRow"> <td class="dataTableContent"><?php echo TEXT_INFO_SUPPORT; ?></td> <td class="dataTableContent"><?php echo tep_draw_input_field('contrib_link_support', $sInfo-> contrib_support, 'size=50 maxlength=255').' '.TEXT_OSC_SUPPORT; ?></td> </tr> <!-- // insert version number field --> <tr class="dataTableRow"> <td class="dataTableContent"><?php echo TEXT_VERSION_NUMBER; ?> </td> <td class="dataTableContent"><?php echo tep_draw_input_field('contrib_vers', $sInfo->contrib_vers, 'size=50 maxlength=30').' '. TEXT_VERSION_NOTE_NEW; ?></td> </tr> <tr class="dataTableRow"> <td class="dataTableContent"><?php echo TEXT_INFO_TO_REMEMBER; ?> </td> <td class="dataTableContent"><?php echo tep_draw_input_field('last_update',$sInfo->last_update, 'size=50 maxlength=30'). ' '. tep_draw_checkbox_field('today_date', $today_date,'',''). ' '. TEXT_TODAY_DATE.' '. TEXT_INT_DATE_NEW; ?></td> </tr> <tr class="dataTableRow"> <td class="dataTableContent"><?php echo TEXT_INFO_DATE_ADDED; ?> </td> <td class="dataTableContent"><?php echo tep_draw_input_field('note_created',$sInfo->note_created, 'size=50 maxlength=30'). ' '. tep_draw_checkbox_field('today_date2', $today_date,'',''). ' '. TEXT_TODAY_DATE.' '. TEXT_ADD_DATE_NEW; ?></td> </tr> <tr class="dataTableRow"> <td valign="top" class="dataTableContent"><?php echo TEXT_CONFIG_COMMENTS; ?> </TD> <td class="dataTableContent"><?php echo tep_draw_textarea_field('config_comments', 'soft', '70', '15', ($sInfo->config_comments)) ; ?></td> </tr> <?php if ( $HTTP_GET_VARS['action'] == 'edit') { ?> <tr class="dataTableRow"> <td class="dataTableContent"><?php echo TEXT_CONFIG_STATUS; ?> </td> <td class="dataTableContent"><?php echo tep_draw_input_field('status', $sInfo->status, 'size=2 maxlength=1'); ?> 0 = <?php echo tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', TEXT_NEW_UPDATE_EXISTS , 10, 10); ?> <?php echo TEXT_NEW_UPDATE_EXISTS; ?> 1 = <?php echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', TEXT_NO_NEW_UPDATE , 10, 10); ?> <?php echo TEXT_NO_NEW_UPDATE; ?> 2 = <?php echo TEXT_NO_STATUS; ?> <td><?php echo tep_draw_hidden_field('old_status', $sInfo->status);?></td> </tr> <?php } ?> </table> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main" colspan=2 align="right" valign="top"><br /><?php echo (($form_action == 'insert') ? tep_image_submit('button_insert.gif', IMAGE_INSERT) : tep_image_submit('button_update.gif', IMAGE_UPDATE)) . ' <a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action'))). '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a> <a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params()) . '" onclick="reset();">' . tep_image_button('button_reset.gif', IMAGE_RESET) . '</a>'; ?></td> </table> </form> </td> </tr> <?php } elseif ($HTTP_GET_VARS['action'] != 'readonly') { ?> <tr> <td colspan=3> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <!-- TABLE HEADINGS AND SORT ICONS--> <td valign="top"> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"> <a href="<?php echo "$PHP_SELF?sort=2a" . "&page=" . $HTTP_GET_VARS['page'] . "&sID=" . $HTTP_GET_VARS['sID']; ?>"><?php echo tep_image(DIR_WS_IMAGES . 'icon_up.gif', IMAGE_BUTTON_UPSORT); ?></a><a href="<?php echo "$PHP_SELF?sort=2d" . "&page=" . $HTTP_GET_VARS['page'] . "&sID=" . $HTTP_GET_VARS['sID']; ?>"><?php echo tep_image(DIR_WS_IMAGES . 'icon_down.gif', IMAGE_BUTTON_DOWNSORT); ?></a><br /><?php echo TABLE_HEADING_NAME; ?></td> <td class="dataTableHeadingContent" align="center"><br /><?php echo TABLE_HEADING_VERSION; ?> </td><td class="dataTableHeadingContent" align="center"><a href="<?php echo "$PHP_SELF?sort=4a" . "&page=" . $HTTP_GET_VARS['page'] . "&sID=" . $HTTP_GET_VARS['sID']; ?>"><?php echo tep_image(DIR_WS_IMAGES . 'icon_up.gif', IMAGE_BUTTON_UPSORT); ?></a><a href="<?php echo "$PHP_SELF?sort=4d" . "&page=" . $HTTP_GET_VARS['page'] . "&sID=" . $HTTP_GET_VARS['sID']; ?>"><?php echo tep_image(DIR_WS_IMAGES . 'icon_down.gif', IMAGE_BUTTON_DOWNSORT); ?></a> <br /><?php echo TABLE_HEADING_STATUS; ?></td> <td class="dataTableHeadingContent" align="right"><br /><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php switch ($sort) { case "2a": $order_it_by = "contrib_name, status "; break; case "2d": $order_it_by = "contrib_name DESC, status "; break; case "4a": $order_it_by = "status, contrib_name"; break; case "4d": $order_it_by = "status DESC, contrib_name"; break; case "5a": $order_it_by = "last_update, contrib_name"; break; case "5d": $order_it_by = "last_update DESC, contrib_name"; break; default: $order_it_by = "status, contrib_name"; } // IF THIS IS A SEARCH GET THE SEARCH RESULTS FROM THE DB if ($HTTP_GET_VARS['search']) { //contrib_support->'" . $HTTP_POST_VARS['contrib_link_support'] . "', $admin_query_query_raw = "select contr_id, contrib_osc_id, contrib_name, contrib_link, contrib_support, status, note_created , contr_last_modified, last_update,config_comments, contrib_vers from " . TABLE_CONTRIB_TRACKER . " where contrib_name like '%" . $HTTP_GET_VARS['search'] . "%' order by " . $order_it_by . " "; $admin_query_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $admin_query_query_raw, $admin_query_query_numrows); $admin_query_query = tep_db_query($admin_query_query_raw); if (tep_db_num_rows($admin_query_query) == 0) echo '<tr><td class="dataTableContent" align="left">' . TEXT_NO_DATA . "</td></tr>\n"; } else { // IF THIS IS NOT A SEARCH SO GET ALL THE DATABASE ENTRIES $admin_query_query_raw = "select contr_id, contrib_osc_id, contrib_name, contrib_link, contrib_support, status, note_created , contr_last_modified, last_update,config_comments, contrib_vers from " . TABLE_CONTRIB_TRACKER . " order by " . $order_it_by . " "; $admin_query_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $admin_query_query_raw, $admin_query_query_numrows); $admin_query_query = tep_db_query($admin_query_query_raw); if (tep_db_num_rows($admin_query_query) == 0) echo '<tr><td class="dataTableContent" align="right">' . TEXT_EMPTY_DATABASE . "</td></tr>\n"; } while ($admin_quer = tep_db_fetch_array($admin_query_query)) { if ( ((!$HTTP_GET_VARS['sID']) || ($HTTP_GET_VARS['sID'] == $admin_quer['contr_id'])) && (!$sInfo) ) { $sInfo_array = array_merge($admin_quer); $sInfo = new objectInfo($sInfo_array); } if ($HTTP_GET_VARS['search'] == '') { if ( (is_object($sInfo)) && ($admin_quer['contr_id'] == $sInfo->contr_id)) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('sID')) . 'sID=' . $admin_quer['contr_id']) . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('sID')) . 'sID=' . $admin_quer['contr_id']) . '\'">' . "\n"; } } else { $searchresult_query_query_raw = "select contr_id from " . TABLE_CONTRIB_TRACKER . " order by " . $order_it_by . " "; $searchresult_query_query = tep_db_query($searchresult_query_query_raw); $searchresult_page= round($searchresult_query_query_numrows / MAX_DISPLAY_SEARCH_RESULTS)-1; // INSERT CONTRIB NAMES INTO PAGE if ( (is_object($sInfo)) && ($admin_quer['contr_id'] == $sInfo->contr_id)) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('sID')) . 'sID=' . $admin_quer['contr_id']) . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('sID')) . 'sID=' . $admin_quer['contr_id']) . '\'">' . "\n"; } } ?> <td class="dataTableContent"> <?php if ($admin_quer['contrib_link']){ echo '<a target="_blank" href="' . $admin_quer['contrib_link'] . '" name="' . $admin_quer['contrib_name'] . '">' . $admin_quer['contrib_name'].'</a>'; }else{ echo $admin_quer['contrib_name']; } ?> </td> <td class="dataTableContent" align="center"><?php echo $admin_quer['contrib_vers'];?></td> <td class="dataTableContent" align="center"> <?php // SHOW THE STATUS ICONS // contr_last_modified if ($admin_quer['status'] == '0') { echo tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', TEXT_NEW_UPDATE_EXISTS, 10, 10) . ' '; } else { echo '<a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action')) . 'action=setflag&flag=0&id=' . $admin_quer['contr_id'] . '&contr_last_modified=' . $admin_quer['contr_last_modified'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', TEXT_SET_NEW_UPDATE_EXISTS, 10, 10) . '</a> '; } if ($admin_quer['status'] == '1') { echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', TEXT_NO_NEW_UPDATE, 10, 10); } else { echo '<a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action')) . 'action=setflag&flag=1&id=' . $admin_quer['contr_id'] . '&contr_last_modified=' . $admin_quer['contr_last_modified'] , 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', TEXT_SET_NO_NEW_UPDATE, 10, 10) . '</a>'; } ?> </td> <td class="dataTableContent" align="right"> <?php // INSERT THE ACTION ICONS if ($admin_quer['contrib_support']) { echo '<a target="_blank" href="' . $admin_quer['contrib_support'] . '">' .tep_image(DIR_WS_IMAGES . 'icon_help.gif', TEXT_OSC_SUPPORT_THREAD) . '</a> '; } if ($admin_quer['contrib_osc_id']){ echo '<a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action')) . 'action=manualcheck&oscID=' . $admin_quer['contrib_osc_id'].'&sID=' . $admin_quer['contr_id']) . '">' .tep_image(DIR_WS_IMAGES . 'icon_manual_check.jpg', TEXT_MANUAL_CHECK) . '</a> '; } if (htmlspecialchars(StripSlashes(@$HTTP_GET_VARS["search"])) == '') { $reference = 'page'; } else { $reference = 'search'; } if ( (is_object($sInfo)) && ($admin_quer['contr_id'] == $sInfo->contr_id) ) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action', 'sID')) . 'sID=' . $admin_quer['contr_id']) . '">' .tep_image(DIR_WS_IMAGES . 'icon_info.gif', TEXT_INFO) . '</a>'; } ?> </td> </tr> <?php } ?> <tr> <td colspan="5"> <table border="0" width="100%" cellpadding="0"cellspacing="2"> <tr> <td class="smallText" valign="top"><?php echo $admin_query_split->display_count($admin_query_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_RECORDS); ?></td> <td class="smallText" align="right"><?php echo $admin_query_split->display_links($admin_query_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], 'sort=' . $HTTP_GET_VARS['sort']); ?></td> </tr> <?php if (!$HTTP_GET_VARS['action']) { ?> <tr> <td class="smallText" colspan="2" align="right"> <?php echo '<a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action')) . 'action=manualcheckall') . '">' . tep_image_button('button_check_all.gif', IMAGE_CHECKALL) . '</a>'; ?> <?php echo '<a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, 'action=new') . '">' . tep_image_button('button_insert.gif', IMAGE_INSERT) . '</a>'; ?> </td> </tr> <!-- // INSERT THE HELP NOTES --> <tr> <td class="smallText" colspan="2" align="left"> <?php echo '<strong>'. TEXT_HELP_NOTES_HEADER . '</strong><br /><ul>' . TEXT_HELP_NOTES . '</ul><br /><br />'; ?> </td> </tr> <tr> <!-- // INSERT NEWEST CONTRIBS FROM RSS --> <td class="smallText" colspan="2" align="left"> <strong><?php echo TEXT_CONTRIB_HEADER; ?></strong> <br /> <?php if (is_array($rss->items)) { echo "<ol>\n"; foreach ($rss->items as $item ) { $thelink = $item['link']; $thetitle = $item['title']; echo "<li><a href=\"" . $thelink . "\" target=\"_blank\">" . $thetitle . "</a></li>\n"; } echo "</ol>\n"; } else { echo "ERROR: Could not open RDF feed\n"; } ?> </td> </tr> <?php } ?> </table> </td> </tr> </table> </td> <?php $heading = array(); $contents = array(); // RIGHT COLUMN STUFF switch ($HTTP_GET_VARS['action']) { case 'delete': $heading[] = array('text' => '<center><strong>' . TEXT_INFO_HEADING_DELETE . '</strong></center>'); $contents = array('form' => tep_draw_form('install_contr_del', FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action')) . 'action=deleteconfirm')); $contents[] = array('text' => TEXT_INFO_DELETE_INTRO); $contents[] = array('text' => '<br /><strong>' . $sInfo-> contrib_name . '</strong>'); $contents[] = array('align' => 'center', 'text' => '<br />' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action')) . 'sID=' . $sInfo->contr_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (is_object($sInfo)) { $heading[] = array('text' => '<center><strong>' . $sInfo->contrib_name . '</strong></center>'); $contents[] = array('align' => 'center', 'text' => '<strong>'.TEXT_VERSION_NUMBER .'</strong> '.$sInfo-> contrib_vers); // HBS - Start // $contents[] = array('text' => '<strong>' . TEXT_INFO_TO_REMEMBER . '</strong><br /> ' . $sInfo->last_update); $contents[] = array('text' => '<strong>' . TEXT_INFO_TO_REMEMBER . '</strong><br /> ' . tep_date_short($sInfo->last_update)); // $contents[] = array('text' => '<br /> <strong>' . TEXT_INFO_DATE_ADDED . '</strong><br /> ' . $sInfo->note_created); $contents[] = array('text' => '<br /> <strong>' . TEXT_INFO_DATE_ADDED . '</strong><br /> ' . tep_date_short($sInfo->note_created)); // $contents[] = array('text' => '<strong>' . TEXT_INFO_LAST_MODIFIED . '</strong><br /> ' . $sInfo->contr_last_modified . '<br /><br />'); $contents[] = array('text' => '<strong>' . TEXT_INFO_LAST_MODIFIED . '</strong><br /> ' . tep_date_short($sInfo->contr_last_modified) . '<br /><br />'); // HBS - End $contents[] = array('text' => '<strong>' .TEXT_CONFIG_COMMENTS .'</strong> '. $sInfo->config_comments); $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action', 'sID')) . 'sID=' . $sInfo->contr_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action', 'sID')) . 'sID=' . $sInfo->contr_id . '&action=delete') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a><br /><br /> <a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action', 'sID')) . 'sID=' . $sInfo->contr_id . '&action=readonly') . '">' . tep_image_button('button_preview.gif', IMAGE_PREVIEW) . '</a>' ); } break; } if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?> </tr> </table> </td> </tr> <?php } elseif ($HTTP_GET_VARS['action'] == 'readonly') { // BOF READONLY/PREVIEW $product_query = tep_db_query("select contr_id, contrib_osc_id, contrib_name,contrib_link, status, config_comments, note_created, contr_last_modified, last_update from " . TABLE_CONTRIB_TRACKER . " where contr_id = '" . $HTTP_GET_VARS['sID'] . "'"); $product = tep_db_fetch_array($product_query); $sInfo = new objectInfo($product); if ($sInfo->status == '0') $status_desc = IMAGE_ICON_STATUS_GREEN; if ($sInfo->status == '1') $status_desc = IMAGE_ICON_STATUS_RED; if ($sInfo->status == '2') $status_desc = IMAGE_ICON_STATUS_NONE; ?> <tr> <td colspan=3> <br /> <table border="0" cellspacing="0" cellpadding="2" class="formArea" align="center"> <tr class="dataTableRow"> <td class="dataTableContent" NOWRAP><strong><?php echo TEXT_OSC_ID; ?> </strong></td> <td class="formAreaTitle"><strong><font color=blue><?php echo $sInfo-> contrib_osc_id; ?></font></strong></td> </tr> <tr class="dataTableRow"> <td class="dataTableContent" NOWRAP><strong><?php echo TEXT_NAME_VERSION; ?> </strong></td> <td class="formAreaTitle"><strong><font color=blue><?php echo $sInfo-> contrib_name; ?></font></strong></td> </tr> <tr class="dataTableRow"> <td class="dataTableContent" NOWRAP><strong><?php echo TEXT_INFO_SUPPORT; ?> </strong></td> <td class="formAreaTitle"><strong><font color=blue><?php echo $sInfo->contrib_support; ?></font></strong></td> </tr> <tr class="dataTableRowOver"> <td VALIGN="top" class="dataTableContent" NOWRAP><strong><?php echo TEXT_CONFIG_COMMENTS; ?> </strong></td> <td class="dataTableContent"><?php echo nl2br($sInfo->config_comments); ?></td> </tr> <tr class="dataTableRowOver"> <td class="dataTableContent" NOWRAP><strong><?php echo TEXT_INFO_TO_REMEMBER; ?> </strong></td> <td class="dataTableContent"><?php echo $sInfo->last_update; ?></td> </tr> <tr class="dataTableRow"> <td class="dataTableContent" NOWRAP><strong><?php echo TEXT_INFO_DATE_ADDED; ?> </strong></td> <td class="dataTableContent"><?php echo $sInfo->note_created; ?></td> </tr> <tr class="dataTableRowOver"> <td class="dataTableContent" NOWRAP><strong><?php echo TEXT_INFO_LAST_MODIFIED; ?> </strong></td> <td class="dataTableContent"><?php if ($sInfo->contr_last_modified != '0000-00-00 00:00:00') echo $sInfo->contr_last_modified; ?></td> </tr> <tr class="dataTableRow"> <td class="dataTableContent" NOWRAP><strong><?php echo TEXT_INFO_STATUS; ?> </strong></td> <td class="dataTableContent"><?php echo $sInfo->status . ': ' . $status_desc; ?></td> </tr> </table> </td> </tr> <tr> <td colspan=3 align="center" class="main"> <br /> <?php echo '<a href="' . tep_href_link(FILENAME_CONTRIB_TRACKER, tep_get_all_get_params(array('action', 'sID')) . 'sID=' . $sInfo->contr_id, 'NONSSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?> </td> </tr> <?php } // EOF readonly ?> </table> <?php require(DIR_WS_INCLUDES . 'template_bottom.php'); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Done! Now you can enjoy Contribtion Tracker on osC 2.3.1 like you used to. NOTE: If your website is running on PHP 5.3 or higher you need to make an additional adjustment to the new catalog/admin/magpierss/rss_parse.inc file. Replace on line 153: list($ns, $el) = split( ':', $element, 2); By: // PHP 5.3 compliance - Start // list($ns, $el) = split( ':', $element, 2); list($ns, $el) = preg_split ( ':', $element, 2); // PHP 5.3 compliance - End For documentation see http://www.php.net/manual/en/function.preg-split.php Edited May 2, 2012 by dennish Quote Link to comment Share on other sites More sharing options...
Guest Posted June 1, 2012 Share Posted June 1, 2012 See, this is one of those times where I shoulda ran a good search in the OSC Contributions before building my newest coolest addon! :)=) You beat me to the punch :) Just installed this one and I might say, "great minds think alike". -or maybe the functionality et al was just the most logical way to get the tasks done. Although, the cronjob setup is a nice touch. Kudohs! I'll play around a bit and give some feedback etc in a bit. Maybe contribute any items/procedures that I may have done for mine that is not present in yours (if it's a worthwhile update of course)? I'll let you know what I find out. Thanks for the time and effort :)) Oh, super slick too btw :)) -Art (amseek) Quote Link to comment Share on other sites More sharing options...
Guest Posted June 1, 2012 Share Posted June 1, 2012 I can see one thing right off the bat if you're into it. I was currently in at the point of creating a batch import of multiple contributions at once. Would be simple one entry per line set up (comma separated values per field or similar). Wouldn't be too hard to adjust to your formatting I'm sure. Interested? -Art Quote Link to comment Share on other sites More sharing options...
dennish Posted July 18, 2013 Share Posted July 18, 2013 (edited) Just a small correction on post #258: The replacement code in catalog/admin/magpierss/rss_parse.inc for PHP 5.3 or higher compliance should be: // PHP 5.3 compliance - Start // list($ns, $el) = split( ':', $element, 2); list($ns, $el) = preg_split ( '/:/', $element, 2); // PHP 5.3 compliance - End This should take care of any Warning: preg_split() [function.preg-split]: No ending delimiter ':' found Edited July 18, 2013 by dennish Quote Link to comment Share on other sites More sharing options...
dennish Posted October 7, 2013 Share Posted October 7, 2013 (edited) To comply with osC 2.3.3.2 and higher in catalog/contrib_tracker.php (around line 209) replace: if (mysql_affected_rows()) { By: if (mysqli_affected_rows(tep_db_connect())) { Edited October 7, 2013 by dennish Quote Link to comment Share on other sites More sharing options...
♥kymation Posted October 7, 2013 Share Posted October 7, 2013 You should use the osCommerce database functions to maintain compatibility when future changes occur. That line should be: if (tep_db_affected_rows(tep_db_connect())) { Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
SteveDallas Posted March 29, 2014 Share Posted March 29, 2014 The RSS feed is broken and if you use the scheduled updates feature of this add-on, you will likely receive error messages. The osC team is working on fixing it. See: http://www.oscommerce.com/forums/topic/396536-dashboard-lastest-add-ons-no-longer-showing-information/ Quote Link to comment Share on other sites More sharing options...
SteveDallas Posted March 29, 2014 Share Posted March 29, 2014 (edited) I have uploaded new versions for both osC v2.2 and v2.3. The osC 2.3 version is based mostly on the changes that amaische made a while back. It is now a full package with installation instructions specific to osC 2.3. Tested on osC 2.3.3.4. Both versions have some minor changes to better deal with the RSS feed when it is broken. For osC 2.2: http://addons.oscommerce.com/info/4815 For osC 2.3: http://addons.oscommerce.com/info/9030 Edited March 29, 2014 by SteveDallas Quote Link to comment Share on other sites More sharing options...
surfalot Posted July 24, 2014 Share Posted July 24, 2014 New packages have been uploaded with new features, updates, and a few fixes. After working with it for a while, I found some changes and conveniences that made sense to me and my clients including some input database handling rewrites for safety and security. Hope everyone likes this update. See the changelog for details. Some highlights: + fulfilled the wish list item of a more friendly date display. + added support for retrieving support topic IDs from the new style forum links + you may now simply enter a topic ID into the support link field and the code will build the full link. + added optional date columns to the main page list display. Simply check the box of the date you want to show (and/or sort by), and voila! + added &view=getlastpost to the support links to save some time by jumping to the end of the support topics + added #tabs-hist to contribution link to jump directly to the list of contributions on its page. + added osCommerce 2.3's date picker to date input fields for osC v2.3 version of Contribution Tracker. + added osCommerce 2.2ms2's date picker to date input fields for osC v2.2 version of Contribution Tracker. Contribution Tracker v1.8.0 for osCommerce v2.2ms2 (all releases): http://addons.oscommerce.com/info/4815 Contribution Tracker v1.8.0 for osCommerce v2.3.x: http://addons.oscommerce.com/info/9106 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.