Changeset 2562230
- Timestamp:
- 07/11/2021 11:44:30 AM (5 years ago)
- Location:
- tradetracker-store
- Files:
-
- 194 added
- 26 edited
-
tags/4.6.59 (added)
-
tags/4.6.59/Tradetracker-Store.php (added)
-
tags/4.6.59/cache (added)
-
tags/4.6.59/css (added)
-
tags/4.6.59/css/base-jquery-ui.css (added)
-
tags/4.6.59/css/black-tie-jquery-ui.css (added)
-
tags/4.6.59/css/blitzer-jquery-ui.css (added)
-
tags/4.6.59/css/cupertino-jquery-ui.css (added)
-
tags/4.6.59/css/dark-hive-jquery-ui.css (added)
-
tags/4.6.59/css/dot-luv-jquery-ui.css (added)
-
tags/4.6.59/css/eggplant-jquery-ui.css (added)
-
tags/4.6.59/css/excite-bike-jquery-ui.css (added)
-
tags/4.6.59/css/flick-jquery-ui.css (added)
-
tags/4.6.59/css/hot-sneaks-jquery-ui.css (added)
-
tags/4.6.59/css/humanity-jquery-ui.css (added)
-
tags/4.6.59/css/le-frog-jquery-ui.css (added)
-
tags/4.6.59/css/mint-choc-jquery-ui.css (added)
-
tags/4.6.59/css/overcast-jquery-ui.css (added)
-
tags/4.6.59/css/pepper-grinder-jquery-ui.css (added)
-
tags/4.6.59/css/redmond-jquery-ui.css (added)
-
tags/4.6.59/css/smoothness-jquery-ui.css (added)
-
tags/4.6.59/css/south-street-jquery-ui.css (added)
-
tags/4.6.59/css/start-jquery-ui.css (added)
-
tags/4.6.59/css/sunny-jquery-ui.css (added)
-
tags/4.6.59/css/swanky-purse-jquery-ui.css (added)
-
tags/4.6.59/css/trontastic-jquery-ui.css (added)
-
tags/4.6.59/css/ui-darkness-jquery-ui.css (added)
-
tags/4.6.59/css/ui-lightness-jquery-ui.css (added)
-
tags/4.6.59/css/vader-jquery-ui.css (added)
-
tags/4.6.59/debug.php (added)
-
tags/4.6.59/front.php (added)
-
tags/4.6.59/functions.php (added)
-
tags/4.6.59/images (added)
-
tags/4.6.59/images/No_image.png (added)
-
tags/4.6.59/images/ajax-loader.gif (added)
-
tags/4.6.59/images/more.png (added)
-
tags/4.6.59/import (added)
-
tags/4.6.59/import/database.php (added)
-
tags/4.6.59/import/xml.php (added)
-
tags/4.6.59/import/xmlsplit.php (added)
-
tags/4.6.59/js (added)
-
tags/4.6.59/js/expand.js (added)
-
tags/4.6.59/menu (added)
-
tags/4.6.59/menu/expand.js (added)
-
tags/4.6.59/menu/faq.php (added)
-
tags/4.6.59/menu/images (added)
-
tags/4.6.59/menu/images/Premium-addons.png (added)
-
tags/4.6.59/menu/images/add-edit-stores.png (added)
-
tags/4.6.59/menu/images/debug.png (added)
-
tags/4.6.59/menu/images/enhanced-distribution.png (added)
-
tags/4.6.59/menu/images/item-selection.png (added)
-
tags/4.6.59/menu/images/kruisje.png (added)
-
tags/4.6.59/menu/images/layout-settings.png (added)
-
tags/4.6.59/menu/images/more.png (added)
-
tags/4.6.59/menu/images/overlay.png (added)
-
tags/4.6.59/menu/images/product-page.png (added)
-
tags/4.6.59/menu/images/screenshot-1.png (added)
-
tags/4.6.59/menu/images/tb-close.png (added)
-
tags/4.6.59/menu/images/vinkje.png (added)
-
tags/4.6.59/menu/images/xml-feed-options.png (added)
-
tags/4.6.59/menu/itemselect.php (added)
-
tags/4.6.59/menu/layout.php (added)
-
tags/4.6.59/menu/main.js (added)
-
tags/4.6.59/menu/menu.css (added)
-
tags/4.6.59/menu/menu.php (added)
-
tags/4.6.59/menu/news.php (added)
-
tags/4.6.59/menu/pluginsettings.php (added)
-
tags/4.6.59/menu/premium.php (added)
-
tags/4.6.59/menu/releaselog.php (added)
-
tags/4.6.59/menu/search.php (added)
-
tags/4.6.59/menu/showlayout.php (added)
-
tags/4.6.59/menu/store.php (added)
-
tags/4.6.59/menu/style.css (added)
-
tags/4.6.59/menu/xmlfeed.php (added)
-
tags/4.6.59/menu/xmloption.php (added)
-
tags/4.6.59/readme.txt (added)
-
tags/4.6.59/screenshot-1.png (added)
-
tags/4.6.59/screenshot-2.png (added)
-
tags/4.6.59/screenshot-3.png (added)
-
tags/4.6.59/splits (added)
-
tags/4.6.59/tinymce (added)
-
tags/4.6.59/tinymce/cart.png (added)
-
tags/4.6.59/tinymce/test.js (added)
-
tags/4.6.59/tinymce/tinyTT.php (added)
-
tags/4.6.59/tinymce/tinymce.php (added)
-
tags/4.6.59/tinymce/ttmce.js (added)
-
tags/4.6.59/translation (added)
-
tags/4.6.59/translation/default.mo (added)
-
tags/4.6.59/translation/default.po (added)
-
tags/4.6.59/translation/tradetracker-store-nl_NL.mo (added)
-
tags/4.6.59/translation/tradetracker-store-nl_NL.po (added)
-
tags/4.6.59/translation/ttstore-nl_NL.mo (added)
-
tags/4.6.59/translation/ttstore-nl_NL.po (added)
-
tags/4.6.59/uninstall.php (added)
-
tags/4.6.59/upgrading.php (added)
-
tags/4.6.59/widget (added)
-
tags/4.6.59/widget/widget.php (added)
-
tags/4.6.60 (added)
-
tags/4.6.60/Tradetracker-Store.php (added)
-
tags/4.6.60/cache (added)
-
tags/4.6.60/css (added)
-
tags/4.6.60/css/base-jquery-ui.css (added)
-
tags/4.6.60/css/black-tie-jquery-ui.css (added)
-
tags/4.6.60/css/blitzer-jquery-ui.css (added)
-
tags/4.6.60/css/cupertino-jquery-ui.css (added)
-
tags/4.6.60/css/dark-hive-jquery-ui.css (added)
-
tags/4.6.60/css/dot-luv-jquery-ui.css (added)
-
tags/4.6.60/css/eggplant-jquery-ui.css (added)
-
tags/4.6.60/css/excite-bike-jquery-ui.css (added)
-
tags/4.6.60/css/flick-jquery-ui.css (added)
-
tags/4.6.60/css/hot-sneaks-jquery-ui.css (added)
-
tags/4.6.60/css/humanity-jquery-ui.css (added)
-
tags/4.6.60/css/le-frog-jquery-ui.css (added)
-
tags/4.6.60/css/mint-choc-jquery-ui.css (added)
-
tags/4.6.60/css/overcast-jquery-ui.css (added)
-
tags/4.6.60/css/pepper-grinder-jquery-ui.css (added)
-
tags/4.6.60/css/redmond-jquery-ui.css (added)
-
tags/4.6.60/css/smoothness-jquery-ui.css (added)
-
tags/4.6.60/css/south-street-jquery-ui.css (added)
-
tags/4.6.60/css/start-jquery-ui.css (added)
-
tags/4.6.60/css/sunny-jquery-ui.css (added)
-
tags/4.6.60/css/swanky-purse-jquery-ui.css (added)
-
tags/4.6.60/css/trontastic-jquery-ui.css (added)
-
tags/4.6.60/css/ui-darkness-jquery-ui.css (added)
-
tags/4.6.60/css/ui-lightness-jquery-ui.css (added)
-
tags/4.6.60/css/vader-jquery-ui.css (added)
-
tags/4.6.60/debug.php (added)
-
tags/4.6.60/front.php (added)
-
tags/4.6.60/functions.php (added)
-
tags/4.6.60/images (added)
-
tags/4.6.60/images/No_image.png (added)
-
tags/4.6.60/images/ajax-loader.gif (added)
-
tags/4.6.60/images/more.png (added)
-
tags/4.6.60/import (added)
-
tags/4.6.60/import/database.php (added)
-
tags/4.6.60/import/xml.php (added)
-
tags/4.6.60/import/xmlsplit.php (added)
-
tags/4.6.60/js (added)
-
tags/4.6.60/js/expand.js (added)
-
tags/4.6.60/menu (added)
-
tags/4.6.60/menu/expand.js (added)
-
tags/4.6.60/menu/faq.php (added)
-
tags/4.6.60/menu/images (added)
-
tags/4.6.60/menu/images/Premium-addons.png (added)
-
tags/4.6.60/menu/images/add-edit-stores.png (added)
-
tags/4.6.60/menu/images/debug.png (added)
-
tags/4.6.60/menu/images/enhanced-distribution.png (added)
-
tags/4.6.60/menu/images/item-selection.png (added)
-
tags/4.6.60/menu/images/kruisje.png (added)
-
tags/4.6.60/menu/images/layout-settings.png (added)
-
tags/4.6.60/menu/images/more.png (added)
-
tags/4.6.60/menu/images/overlay.png (added)
-
tags/4.6.60/menu/images/product-page.png (added)
-
tags/4.6.60/menu/images/screenshot-1.png (added)
-
tags/4.6.60/menu/images/tb-close.png (added)
-
tags/4.6.60/menu/images/vinkje.png (added)
-
tags/4.6.60/menu/images/xml-feed-options.png (added)
-
tags/4.6.60/menu/itemselect.php (added)
-
tags/4.6.60/menu/layout.php (added)
-
tags/4.6.60/menu/main.js (added)
-
tags/4.6.60/menu/menu.css (added)
-
tags/4.6.60/menu/menu.php (added)
-
tags/4.6.60/menu/news.php (added)
-
tags/4.6.60/menu/pluginsettings.php (added)
-
tags/4.6.60/menu/premium.php (added)
-
tags/4.6.60/menu/releaselog.php (added)
-
tags/4.6.60/menu/search.php (added)
-
tags/4.6.60/menu/showlayout.php (added)
-
tags/4.6.60/menu/store.php (added)
-
tags/4.6.60/menu/style.css (added)
-
tags/4.6.60/menu/xmlfeed.php (added)
-
tags/4.6.60/menu/xmloption.php (added)
-
tags/4.6.60/readme.txt (added)
-
tags/4.6.60/screenshot-1.png (added)
-
tags/4.6.60/screenshot-2.png (added)
-
tags/4.6.60/screenshot-3.png (added)
-
tags/4.6.60/splits (added)
-
tags/4.6.60/tinymce (added)
-
tags/4.6.60/tinymce/cart.png (added)
-
tags/4.6.60/tinymce/test.js (added)
-
tags/4.6.60/tinymce/tinyTT.php (added)
-
tags/4.6.60/tinymce/tinymce.php (added)
-
tags/4.6.60/tinymce/ttmce.js (added)
-
tags/4.6.60/translation (added)
-
tags/4.6.60/translation/default.mo (added)
-
tags/4.6.60/translation/default.po (added)
-
tags/4.6.60/translation/tradetracker-store-nl_NL.mo (added)
-
tags/4.6.60/translation/tradetracker-store-nl_NL.po (added)
-
tags/4.6.60/translation/ttstore-nl_NL.mo (added)
-
tags/4.6.60/translation/ttstore-nl_NL.po (added)
-
tags/4.6.60/uninstall.php (added)
-
tags/4.6.60/upgrading.php (added)
-
tags/4.6.60/widget (added)
-
tags/4.6.60/widget/widget.php (added)
-
trunk/Tradetracker-Store.php (modified) (2 diffs)
-
trunk/debug.php (modified) (16 diffs)
-
trunk/front.php (modified) (16 diffs)
-
trunk/functions.php (modified) (7 diffs)
-
trunk/import/database.php (modified) (4 diffs)
-
trunk/import/xmlsplit.php (modified) (2 diffs)
-
trunk/js/expand.js (modified) (1 diff)
-
trunk/menu/expand.js (modified) (1 diff)
-
trunk/menu/faq.php (modified) (1 diff)
-
trunk/menu/itemselect.php (modified) (17 diffs)
-
trunk/menu/layout.php (modified) (17 diffs)
-
trunk/menu/menu.css (modified) (1 diff)
-
trunk/menu/menu.php (modified) (8 diffs)
-
trunk/menu/news.php (modified) (1 diff)
-
trunk/menu/pluginsettings.php (modified) (21 diffs)
-
trunk/menu/premium.php (modified) (6 diffs)
-
trunk/menu/releaselog.php (modified) (1 diff)
-
trunk/menu/search.php (modified) (6 diffs)
-
trunk/menu/showlayout.php (modified) (2 diffs)
-
trunk/menu/store.php (modified) (29 diffs)
-
trunk/menu/xmlfeed.php (modified) (12 diffs)
-
trunk/menu/xmloption.php (modified) (11 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/tinymce/tinyTT.php (modified) (1 diff)
-
trunk/upgrading.php (modified) (1 diff)
-
trunk/widget/widget.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tradetracker-store/trunk/Tradetracker-Store.php
r2554252 r2562230 3 3 * Plugin Name: Tradetracker-Store 4 4 * Plugin URI: https://wpaffiliatefeed.com 5 * Version: 4.6. 595 * Version: 4.6.60 6 6 * Description: A Plugin that will add a TradeTracker affiliate feed to your site with several options to choose from. 7 7 * Author: Robert Braam … … 13 13 global $wpdb; 14 14 $TT_Storepro_table_prefix=$wpdb->prefix.'tradetracker_'; 15 define( 'TT_STORE_pluginurl', plugin_dir_url( __FILE__ ) ); 15 16 define( 'TT_STORE_pluginpath', plugin_dir_path( __FILE__ ) ); 16 17 define('TT_StorePRO_TABLE_PREFIX', $TT_Storepro_table_prefix); -
tradetracker-store/trunk/debug.php
r2554244 r2562230 16 16 17 17 <div id="TB_overlay" class="TB_overlayBG"></div> 18 <div id="TB_window1" style="left: auto;margin-left: auto;margin-right: auto; margin-top: 0;right: auto;top: 48px;visibility: visible;z-index:100051;width: <?php echo $adminwidth; ?>px;">18 <div id="TB_window1" style="left: auto;margin-left: auto;margin-right: auto; margin-top: 0;right: auto;top: 48px;visibility: visible;z-index:100051;width: <?php echo esc_attr($adminwidth); ?>px;"> 19 19 <div id="ttstorebox"> 20 20 <div id="TB_title"> … … 26 26 </div> 27 27 </div> 28 <div id="ttstoreboxoptions" style="max-height:<?php echo $adminheight; ?>px;">28 <div id="ttstoreboxoptions" style="max-height:<?php echo esc_attr($adminheight); ?>px;"> 29 29 <?php 30 30 echo "<strong>"; … … 87 87 _e('Premium gives this error:', 'tradetracker-store'); 88 88 echo " "; 89 echo $response->get_error_message();;89 echo esc_attr($response->get_error_message()); 90 90 echo "</font><br>"; 91 91 } else { … … 119 119 echo "</strong><br>"; 120 120 foreach ( $head_footer_errors as $error ) 121 echo '<font color=red>' . esc_html($error ) . '</font><br>';121 echo '<font color=red>' . wp_kses_post($error ) . '</font><br>'; 122 122 } else { 123 123 echo "<p><strong>"; … … 142 142 foreach ( $storetableoverview as $overview ) 143 143 { 144 echo "<tr><td>". $overview->Field."</td>";145 echo "<td>". $overview->Type."</td></tr>";144 echo "<tr><td>".esc_attr($overview->Field)."</td>"; 145 echo "<td>".esc_attr($overview->Type)."</td></tr>"; 146 146 } 147 147 echo "</table>"; … … 159 159 foreach ( $multitableoverview as $overview ) 160 160 { 161 echo "<tr><td>". $overview->Field."</td>";162 echo "<td>". $overview->Type."</td></tr>";161 echo "<tr><td>".esc_attr($overview->Field)."</td>"; 162 echo "<td>".esc_attr($overview->Type)."</td></tr>"; 163 163 } 164 164 echo "</table>"; … … 176 176 foreach ( $extratableoverview as $overview ) 177 177 { 178 echo "<tr><td>". $overview->Field."</td>";179 echo "<td>". $overview->Type."</td></tr>";178 echo "<tr><td>".esc_attr($overview->Field)."</td>"; 179 echo "<td>".esc_attr($overview->Type)."</td></tr>"; 180 180 } 181 181 echo "</table>"; … … 193 193 foreach ( $layouttableoverview as $overview ) 194 194 { 195 echo "<tr><td>". $overview->Field."</td>";196 echo "<td>". $overview->Type."</td></tr>";195 echo "<tr><td>".esc_attr($overview->Field)."</td>"; 196 echo "<td>".esc_attr($overview->Type)."</td></tr>"; 197 197 } 198 198 echo "</table>"; … … 211 211 foreach ( $itemtableoverview as $overview ) 212 212 { 213 echo "<tr><td>". $overview->Field."</td>";214 echo "<td>". $overview->Type."</td></tr>";213 echo "<tr><td>".esc_attr($overview->Field)."</td>"; 214 echo "<td>".esc_attr($overview->Type)."</td></tr>"; 215 215 } 216 216 echo "</table>"; … … 228 228 foreach ( $xmltableoverview as $overview ) 229 229 { 230 echo "<tr><td>". $overview->Field."</td>";231 echo "<td>". $overview->Type."</td></tr>";230 echo "<tr><td>".esc_attr($overview->Field)."</td>"; 231 echo "<td>".esc_attr($overview->Type)."</td></tr>"; 232 232 } 233 233 echo "</table>"; … … 245 245 foreach ( $cattableoverview as $overview ) 246 246 { 247 echo "<tr><td>". $overview->Field."</td>";248 echo "<td>". $overview->Type."</td></tr>";247 echo "<tr><td>".esc_attr($overview->Field)."</td>"; 248 echo "<td>".esc_attr($overview->Type)."</td></tr>"; 249 249 } 250 250 echo "</table>"; … … 255 255 echo "</strong>"; 256 256 echo "<p>"; 257 echo $ttmemoryusage;257 echo wp_kses_post($ttmemoryusage); 258 258 259 259 … … 269 269 function ttstoreerrordetect($show) { 270 270 global $head_footer_errors; 271 $foldersplits = plugin_dir_path( __FILE__ )."splits/";272 $foldercache = plugin_dir_path( __FILE__ )."cache/";271 $foldersplits = TT_STORE_plugipath."splits/"; 272 $foldercache = TT_STORE_plugipath."cache/"; 273 273 274 274 $tterror = "no"; … … 298 298 if ($tterror == "yes"){ 299 299 $warning = __('Error detected in TradeTracker Store plugin, please see <a href=admin.php?page=tt-store&option=debug>debug page</a>','tradetracker-store'); 300 add_action('admin_notices', create_function( '', "echo \"<div class='error'><p> $warning</p></div>\";" ) );300 add_action('admin_notices', create_function( '', "echo \"<div class='error'><p>esc_attr($warning)</p></div>\";" ) ); 301 301 if($show=="yes"){ 302 302 return "yes"; … … 362 362 $updatebgtext = __('Run update in background','tradetracker-store'); 363 363 $resettext = __('Restart import','tradetracker-store'); 364 echo "<div class=\"updated\"><p><strong>". $update." ".get_option("Tradetracker_xml_update")." | ".get_option("Tradetracker_feedsimported")." | <a href=\"admin.php?page=tt-store&update=yes\">".$updatetext."</a> | <a href=\"admin.php?page=tt-store&bgupdate=yes\">".$updatebgtext."</a> | <a href=\"admin.php?page=tt-store&reset=yes\">".$resettext."</a></strong></p></div>";364 echo "<div class=\"updated\"><p><strong>".esc_attr($update)." ".get_option("Tradetracker_xml_update")." | ".get_option("Tradetracker_feedsimported")." | <a href=\"admin.php?page=tt-store&update=yes\">".esc_attr($updatetext)."</a> | <a href=\"admin.php?page=tt-store&bgupdate=yes\">".esc_attr($updatebgtext)."</a> | <a href=\"admin.php?page=tt-store&reset=yes\">".esc_attr($resettext)."</a></strong></p></div>"; 365 365 $errorfile = get_option("Tradetracker_importerror"); 366 366 if(!empty($errorfile)){ … … 369 369 $osmessage = __('<strong>The following XML splits gave an error or were empty during the last import. So they are possibly not imported. More information about this can be found <a href="http://wpaffiliatefeed.com/624/frequently-asked-questions/my-import-gives-an-error/">here</a> </strong>','tradetracker-store'); 370 370 $osmessage .= str_replace($oldvalue,$newvalue,$errorfile); 371 echo "<div class='error'>". $osmessage." <a href=\"admin.php?page=tt-store&errordel=yes\">Close</a></div>";371 echo "<div class='error'>".esc_attr($osmessage)." <a href=\"admin.php?page=tt-store&errordel=yes\">Close</a></div>"; 372 372 } 373 373 } -
tradetracker-store/trunk/front.php
r2554244 r2562230 4 4 ..--==[ Function to add the stylesheet for the store ]==--.. 5 5 */ 6 add_filter( 'wp_kses_allowed_html', 'prefix_filter_allowed_html', 10, 2 ); 7 /** 8 * Add "onclick" to allowed KSES output. 9 * 10 * @param $allowed 11 * @param $context 12 * @return mixed 13 */ 14 function prefix_filter_allowed_html( $allowed, $context ) { 15 if ( 'post' === $context ) { 16 $allowed['a']['onclick'] = true; 17 } 18 19 return $allowed; 20 } 6 21 function TTstore_scripts() { 7 22 wp_enqueue_script( 'jquery' ); … … 13 28 wp_localize_script( 'ttstoreexpand-script', 'ttstoreexpand_object', 14 29 array( 15 'imgurl' => plugin_dir_url( __FILE__ ).'/images/more.png'30 'imgurl' => TT_STORE_pluginurl.'/images/more.png' 16 31 )); 17 32 $ttsliderenable = get_option("Tradetracker_sliderenable"); … … 58 73 } 59 74 if(get_option("Tradetracker_usecss") == "1"){ 60 //echo "<link rel=\"stylesheet\" href=\"". get_option('Tradetracker_csslink')."\" type=\"text/css\" />";75 //echo "<link rel=\"stylesheet\" href=\"".esc_url(get_option('Tradetracker_csslink'))."\" type=\"text/css\" />"; 61 76 //echo "<link href=\"http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/themes/".$ttslidertheme."/jquery-ui.css\" rel=\"stylesheet\" type=\"text/css\"/>"; 62 77 … … 67 82 global $ttstorelayouttable; 68 83 global $ttstoremultitable; 69 $style .="<style type=\"text/css\" media=\"screen\">";84 echo "<style type=\"text/css\" media=\"screen\">"; 70 85 $multi=$wpdb->get_results("SELECT multiname, laywidth, layfont, layfontsize, laycolortitle, laycolorbuttonfont, laycolorbutton, laycolorborder, laycolorfooter, laycolorimagebg, laycolorfont FROM ".$ttstoremultitable.",".$ttstorelayouttable." where ".$ttstoremultitable.".multilayout=".$ttstorelayouttable.".id"); 71 86 foreach ($multi as $multi_val){ … … 150 165 151 166 } 152 $style .= "\n.cleared {border: medium none;clear: both;float: none;font-size: 1px;margin: 0;padding: 0;}"; 153 $style .= "\n.ttstorelink a { font-size:0px; }"; 154 $style .= "</style>"; 155 echo $style; 167 $style .= "\n.ttstore_moreinfo{display:none;}"; 168 echo wp_filter_nohtml_kses($style); 169 echo "\n.cleared {border: medium none;clear: both;float: none;font-size: 1px;margin: 0;padding: 0;}"; 170 echo "\n.ttstorelink a { font-size:0px; }"; 171 echo "</style>"; 172 156 173 } 157 174 } … … 207 224 if(isset($_GET['ipp'])){ 208 225 if(is_numeric($_GET['ipp']) && $_GET['ipp'] > "0"){ 209 $itemsperpage = $_GET['ipp'];226 $itemsperpage = ttstore_sanitize($_GET['ipp']); 210 227 } else { 211 228 $itemsperpage = $wpdb->get_var( "SELECT multipageamount FROM $ttstoremultitable where id='".$winkelvol."';" ); … … 226 243 } 227 244 if(isset($_GET['multisorting'])){ 228 $userperpage .= "<input type=\"hidden\" value=\"". esc_attr($_GET['multisorting'])."\" name=\"multisorting\">";245 $userperpage .= "<input type=\"hidden\" value=\"".ttstore_sanitize($_GET['multisorting'])."\" name=\"multisorting\">"; 229 246 } 230 247 if(isset($_GET['multiorder'])){ 231 $userperpage .= "<input type=\"hidden\" value=\"". esc_attr($_GET['multiorder'])."\" name=\"multiorder\">";248 $userperpage .= "<input type=\"hidden\" value=\"".ttstore_sanitize($_GET['multiorder'])."\" name=\"multiorder\">"; 232 249 } 233 250 $userperpage .= __('Items per page: ','tradetracker-store'); … … 281 298 if(isset($_GET['ipp'])){ 282 299 if(is_numeric($_GET['ipp']) && $_GET['ipp'] > "0" ){ 283 $ipp = $_GET['ipp'];300 $ipp = ttstore_sanitize($_GET['ipp']); 284 301 } else { 285 302 $ipp = $max_items; … … 290 307 if(isset($_GET['pmin']) && isset($_GET['pmax'])){ 291 308 if(is_numeric($_GET['pmin']) && is_numeric($_GET['pmax'])){ 292 $min_price = $_GET['pmin'];293 $max_pricecur = $_GET['pmax'];309 $min_price = ttstore_sanitize($_GET['pmin']); 310 $max_pricecur = ttstore_sanitize($_GET['pmax']); 294 311 } else { 295 312 $min_price = $min_price; … … 444 461 } 445 462 if(isset($_GET['ipp']) && is_numeric($_GET['ipp']) && $_GET['ipp']>"0"){ 446 $itemsperpage = $_GET['ipp'];463 $itemsperpage = ttstore_sanitize($_GET['ipp']); 447 464 } else { 448 465 $itemsperpage = $multi_val->multipageamount; … … 450 467 $pages = ceil($totalitems / $itemsperpage)-1; 451 468 if(isset($_GET['tsp']) && is_numeric($_GET['tsp'])){ 452 $currentpage = $_GET['tsp'];469 $currentpage = ttstore_sanitize($_GET['tsp']); 453 470 $nextpage = $currentpage * $multi_val->multipageamount; 454 471 } else { … … 618 635 } 619 636 if(isset($_GET['ipp']) && is_numeric($_GET['ipp']) && $_GET['ipp']>"0"){ 620 $itemsperpage = $_GET['ipp'];637 $itemsperpage = ttstore_sanitize($_GET['ipp']); 621 638 } else { 622 639 $itemsperpage = $multi_val->multipageamount; … … 624 641 $pages = ceil($totalitems / $itemsperpage)-1; 625 642 if(isset($_GET['tsp']) && is_numeric($_GET['tsp'])){ 626 $currentpage = $_GET['tsp'];643 $currentpage = ttstore_sanitize($_GET['tsp']); 627 644 $nextpage = $currentpage * $multi_val->multipageamount; 628 645 if($totalitems <= $nextpage ){ … … 722 739 } 723 740 } 724 $storeitems = " ";741 $storeitems = "<div class\"TTSTore_store\">"; 725 742 $i="1"; 726 743 foreach ($visits as $product){ … … 741 758 $moretext = __('More info', 'tradetracker-store'); 742 759 $more = "<div class=\"".$storename."store-more store-more\"> 743 <img src=\"".plugin_dir_url( __FILE__ )."/images/more.png\" style=\"border:0;\" border=\"0\" name=\"img".$i."\" width=\"11\" height=\"13\" border=\"0\" >744 <a href=\"#first\" onClick=\"shoh('".$ i."');\" >".$moretext."</a>745 <div style=\"display: none;\" id=\"".$ i."\">760 <img src=\"".plugin_dir_url( __FILE__ )."/images/more.png\" style=\"border:0;\" border=\"0\" id=\"img".$storename."".$i."\" width=\"11\" height=\"13\" border=\"0\" > 761 <a href=\"#first\" onClick=\"shoh('".$storename."".$i."');\" >".$moretext."</a> 762 <div style=\"display: none;\" id=\"".$storename."".$i."\" class=\"ttstore_moreinfo\"> 746 763 <table style=\"width:".$widthmore."px;\" width=\"".$widthmore."\">".$extraname."</table> 747 764 </div> … … 870 887 } 871 888 $storeitems .= "<!-- These items are shown using the TradeTracker Store plugin - http://wpaffiliatefeed.com -->"; 889 $storeitems .= "</div>"; 872 890 if ($usedhow == 1){ 873 891 return $storeitems; 874 892 } 875 893 if ($usedhow == 2){ 876 echo $storeitems;894 echo wp_kses_post($storeitems); 877 895 } 878 896 -
tradetracker-store/trunk/functions.php
r2554244 r2562230 11 11 } 12 12 } 13 function ttstore_sanitize($array_or_string) { 14 if( is_string($array_or_string) ){ 15 $array_or_string = sanitize_text_field($array_or_string); 16 }elseif( is_array($array_or_string) ){ 17 foreach ( $array_or_string as $key => &$value ) { 18 if ( is_array( $value ) ) { 19 $value = sanitize_text_or_array_field($value); 20 } 21 else { 22 $value = sanitize_text_field( $value ); 23 } 24 } 25 } 26 27 return $array_or_string; 28 } 13 29 function tt_store_arrayDiffEmulation($arrayFrom, $arrayAgainst) 14 30 { … … 53 69 if($response['body'] != $updatetime){ 54 70 $url = 'https://wpaffiliatefeed.com/tradetracker-store/sites.xml'; 55 $permfile = plugin_dir_path( __FILE__ )."cache/sites.xml";71 $permfile = TT_STORE_plugipath."cache/sites.xml"; 56 72 $tmpfile = download_url( $url, $timeout = 300 ); 57 73 copy( $tmpfile, $permfile ); … … 59 75 60 76 $url = 'https://wpaffiliatefeed.com/tradetracker-store/faq.xml'; 61 $permfile = plugin_dir_path( __FILE__ )."cache/faq.xml";77 $permfile = TT_STORE_plugipath."cache/faq.xml"; 62 78 $tmpfile = download_url( $url, $timeout = 300 ); 63 79 copy( $tmpfile, $permfile ); … … 65 81 66 82 $url = 'https://wpaffiliatefeed.com/category/news/feed/'; 67 $permfile = plugin_dir_path( __FILE__ )."cache/news.xml";83 $permfile = TT_STORE_plugipath."cache/news.xml"; 68 84 $tmpfile = download_url( $url, $timeout = 300 ); 69 85 copy( $tmpfile, $permfile ); … … 71 87 72 88 $url = 'https://wpaffiliatefeed.com/category/news/feed/'; 73 $permfile = plugin_dir_path( __FILE__ )."cache/releaselog.xml";89 $permfile = TT_STORE_plugipath."cache/releaselog.xml"; 74 90 $tmpfile = download_url( $url, $timeout = 300 ); 75 91 copy( $tmpfile, $permfile ); … … 117 133 } 118 134 function loadpremium(){ 119 $foldercache = plugin_dir_path( __FILE__ )."cache/";135 $foldercache = TT_STORE_pluginpath."cache/"; 120 136 if(is_writable($foldercache)){ 121 137 $providers = get_option('Tradetracker_premiumapi'); … … 137 153 function premium_updater(){ 138 154 global $wpdb; 139 $foldercache = plugin_dir_path( __FILE__ )."cache/";155 $foldercache = TT_STORE_plugipath."cache/"; 140 156 $us = $_SERVER['HTTP_HOST']; 141 157 delete_option('tt_premium_function'); -
tradetracker-store/trunk/import/database.php
r2554244 r2562230 132 132 if ($xmlcronjob == "0"){ 133 133 $feednumercount = $xmlfeednumber; 134 echo "<br /><strong>Feeds Completed: </strong> ". $feednumercount."/".count($xmlfeed)."";134 echo "<br /><strong>Feeds Completed: </strong> ".esc_attr($feednumercount)."/".count($xmlfeed).""; 135 135 $feedsimported = sprintf(__('<strong>Feeds Completed: </strong> %1$s / %2$s','tradetracker-store'), $feednumercount, count($xmlfeed)); 136 136 update_option( "Tradetracker_feedsimported", $feedsimported ); … … 141 141 echo "<div style=\"width:".round($percent * $scale)."px;\"></div>"; 142 142 echo "</div>".round($percent,'2')."%"; 143 echo "<br /><strong>Currently Importing: </strong>". $xmlfeed[$xmlfeednumber][0];143 echo "<br /><strong>Currently Importing: </strong>".esc_attr($xmlfeed[$xmlfeednumber][0]); 144 144 //echo "<br /><strong>File: </strong>".$files[$xmldatabasecount]; 145 145 tt_store_log_me("TT Database: ".$xmlfeed[$xmlfeednumber][0]); … … 246 246 foreach($product->additional->children() as $datachild){ 247 247 if($datachild['name']!=""){ 248 echo " ik doe dit ";249 248 if($i == $totalextra){ 250 249 $queryextra .= "('".$productID."', '".$datachild['name']."', '".str_replace("'","''", $datachild)."')"; … … 316 315 echo convert(memory_get_peak_usage()); 317 316 echo "/".convert(str2bytes(ini_get('memory_limit'))); 318 echo "<br /><strong>Items imported:</strong><br />". $item_count;317 echo "<br /><strong>Items imported:</strong><br />".esc_attr($item_count); 319 318 } 320 319 $ttmemoryusage = get_option("Tradetracker_memoryusage"); -
tradetracker-store/trunk/import/xmlsplit.php
r2554252 r2562230 25 25 $exportfile = fopen($folderhome."/$newfile","w"); 26 26 $url = $xmlfile; 27 $permfile = plugin_dir_path( __FILE__ ).".cache/cache.xml";27 $permfile = TT_STORE_plugipath.".cache/cache.xml"; 28 28 $tmpfile = download_url( $url, $timeout = 300 ); 29 29 copy( $tmpfile, $permfile ); … … 124 124 //$needed = array("product>", "<productID>", "</productID>"); 125 125 $url = $xmlfile; 126 $permfile = plugin_dir_path( __FILE__ ).".cache/cache.xml";126 $permfile = TT_STORE_plugipath.".cache/cache.xml"; 127 127 $tmpfile = download_url( $url, $timeout = 300 ); 128 128 copy( $tmpfile, $permfile ); -
tradetracker-store/trunk/js/expand.js
r2554244 r2562230 53 53 54 54 if (document.getElementById) { // DOM3 = IE5, NS6 55 if (document.getElementById(id).style.display == " none"){56 document.getElementById(id).style.display = ' block';57 filter(("img"+id),'img in');55 if (document.getElementById(id).style.display == "block"){ 56 document.getElementById(id).style.display = 'none'; 57 filter(("img"+id),'imgout'); 58 58 } else { 59 filter(("img"+id),'img out');60 document.getElementById(id).style.display = ' none';59 filter(("img"+id),'imgin'); 60 document.getElementById(id).style.display = 'block'; 61 61 } 62 62 } else { 63 63 if (document.layers) { 64 if (document.id.display == "none"){ 64 if (document.id.display == "block"){ 65 document.id.display = 'none'; 66 filter(("img"+id),'imgout'); 67 } else { 68 filter(("img"+id),'imgin'); 65 69 document.id.display = 'block'; 66 filter(("img"+id),'imgin');67 } else {68 filter(("img"+id),'imgout');69 document.id.display = 'none';70 70 } 71 71 } else { 72 if (document.all.id.style.visibility == " none"){73 document.all.id.style.display = ' block';72 if (document.all.id.style.visibility == "block"){ 73 document.all.id.style.display = 'none'; 74 74 } else { 75 75 filter(("img"+id),'imgout'); 76 document.all.id.style.display = ' none';76 document.all.id.style.display = 'block'; 77 77 } 78 78 } -
tradetracker-store/trunk/menu/expand.js
r2554244 r2562230 53 53 54 54 if (document.getElementById) { // DOM3 = IE5, NS6 55 if (document.getElementById(id).style.display == " none"){56 document.getElementById(id).style.display = ' block';57 filter(("img"+id),'img in');55 if (document.getElementById(id).style.display == "block"){ 56 document.getElementById(id).style.display = 'none'; 57 filter(("img"+id),'imgout'); 58 58 } else { 59 filter(("img"+id),'img out');60 document.getElementById(id).style.display = ' none';59 filter(("img"+id),'imgin'); 60 document.getElementById(id).style.display = 'block'; 61 61 } 62 62 } else { 63 63 if (document.layers) { 64 if (document.id.display == "none"){ 64 if (document.id.display == "block"){ 65 document.id.display = 'none'; 66 filter(("img"+id),'imgout'); 67 } else { 68 filter(("img"+id),'imgin'); 65 69 document.id.display = 'block'; 66 filter(("img"+id),'imgin');67 } else {68 filter(("img"+id),'imgout');69 document.id.display = 'none';70 70 } 71 71 } else { 72 if (document.all.id.style.visibility == " none"){73 document.all.id.style.display = ' block';72 if (document.all.id.style.visibility == "block"){ 73 document.all.id.style.display = 'none'; 74 74 } else { 75 75 filter(("img"+id),'imgout'); 76 document.all.id.style.display = ' none';76 document.all.id.style.display = 'block'; 77 77 } 78 78 } -
tradetracker-store/trunk/menu/faq.php
r519638 r2562230 17 17 if(!isset($faqcategory)){ 18 18 $faqcategory = $faqs->faqcategory; 19 echo "<li><strong> $faqcategory</strong></li>";20 echo "<li><a href=\"". $faqs->faqadres."\" target=\"_blank\">".$faqs->faqnaam."</a></li>";19 echo "<li><strong>".esc_attr($faqcategory)."</strong></li>"; 20 echo "<li><a href=\"".esc_url($faqs->faqadres)."\" target=\"_blank\">".esc_attr($faqs->faqnaam)."</a></li>"; 21 21 } else if($faqs->faqcategory != "".$faqcategory.""){ 22 22 $faqcategory = $faqs->faqcategory; 23 echo "<li><strong> $faqcategory</strong></li>";24 echo "<li><a href=\"". $faqs->faqadres."\" target=\"_blank\">".$faqs->faqnaam."</a></li>";23 echo "<li><strong>".esc_attr($faqcategory)."</strong></li>"; 24 echo "<li><a href=\"".esc_url($faqs->faqadres)."\" target=\"_blank\">".esc_attr($faqs->faqnaam)."</a></li>"; 25 25 } else { 26 echo "<li><a href=\"". $faqs->faqadres."\" target=\"_blank\">".$faqs->faqnaam."</a></li>";26 echo "<li><a href=\"".esc_url($faqs->faqadres)."\" target=\"_blank\">".esc_attr($faqs->faqnaam)."</a></li>"; 27 27 } 28 28 } -
tradetracker-store/trunk/menu/itemselect.php
r2554244 r2562230 32 32 33 33 <div id="TB_overlay" class="TB_overlayBG"></div> 34 <div id="TB_window1" style="left: auto;margin-left: auto;margin-right: auto; margin-top: 0;right: auto;top: 48px;visibility: visible;z-index:100051;width: <?php echo $adminwidth; ?>px;">34 <div id="TB_window1" style="left: auto;margin-left: auto;margin-right: auto; margin-top: 0;right: auto;top: 48px;visibility: visible;z-index:100051;width: <?php echo esc_attr($adminwidth); ?>px;"> 35 35 <div id="ttstorebox"> 36 36 <div id="TB_title"> … … 42 42 </div> 43 43 </div> 44 <div id="ttstoreboxoptions" style="max-height:<?php echo $adminheight; ?>px;">45 <table width="<?php echo $adminwidth-15; ?>">44 <div id="ttstoreboxoptions" style="max-height:<?php echo esc_attr($adminheight); ?>px;"> 45 <table width="<?php echo esc_attr($adminwidth-15); ?>"> 46 46 <tr> 47 47 <td> … … 83 83 <tr> 84 84 <td> 85 <?php echo $layout_val->multiname; ?>85 <?php echo esc_attr($layout_val->multiname); ?> 86 86 </td> 87 87 <td> 88 88 <?php if($layout_val->id > "1"){ ?> 89 <a href="admin.php?page=tt-store&option=store&function=new&return=item&multiid=<?php echo $layout_val->id; ?>"><?php _e("Edit Store", "ttstore"); ?></a>89 <a href="admin.php?page=tt-store&option=store&function=new&return=item&multiid=<?php echo esc_attr($layout_val->id); ?>"><?php _e("Edit Store", "ttstore"); ?></a> 90 90 <?php } ?> 91 91 </td> 92 92 <td> 93 <a href="admin.php?page=tt-store&option=itemselect&function=select&multiid=<?php echo $layout_val->id; ?>"><?php _e("Select Items", "ttstore"); ?></a>93 <a href="admin.php?page=tt-store&option=itemselect&function=select&multiid=<?php echo esc_attr($layout_val->id); ?>"><?php _e("Select Items", "ttstore"); ?></a> 94 94 </td> 95 95 <td> 96 96 <?php if(isset($productcount)){ ?> 97 <a href="admin.php?page=tt-store&option=itemselect&function=delete&multiid=<?php echo $layout_val->id; ?>"><?php printf(__('All %d selected Item(s)', 'tradetracker-store'), $productcount); ?></a>97 <a href="admin.php?page=tt-store&option=itemselect&function=delete&multiid=<?php echo esc_attr($layout_val->id); ?>"><?php printf(__('All %d selected Item(s)', 'tradetracker-store'), $productcount); ?></a> 98 98 <?php } ?> 99 99 </td> 100 100 <td> 101 101 <?php if(isset($emptyproductcount) && $emptyproductcount > "0"){ ?> 102 <a href="admin.php?page=tt-store&option=itemselect&function=deleteempty&multiid=<?php echo $layout_val->id; ?>"><?php echo $emptyproductcount; ?> <?php _e("items no longer in a feed", "ttstore"); ?></a>102 <a href="admin.php?page=tt-store&option=itemselect&function=deleteempty&multiid=<?php echo esc_attr($layout_val->id); ?>"><?php echo esc_attr($emptyproductcount); ?> <?php _e("items no longer in a feed", "ttstore"); ?></a> 103 103 <?php $emptyproductcount = ""; ?> 104 104 <?php } ?> … … 106 106 <td> 107 107 <?php if(isset($multiid) && $layout_val->id == $multiid){ 108 echo $deleted;108 echo esc_html($deleted); 109 109 } ?> 110 110 </td> … … 132 132 $multiid = intval($_GET['multiid']); 133 133 if( isset($_POST[ $ttstoresubmit ]) && $_POST[ $ttstoresubmit ] == 'Y' ) { 134 $Tradetracker_items = $_POST['item']; 135 if (is_array($Tradetracker_items)) { 136 foreach ($Tradetracker_items as &$tag) { 137 $tag = esc_attr($tag); 138 } 139 unset($tag ); 140 } else { 141 $Tradetracker_items = esc_attr($Tradetracker_items); 142 } 134 $Tradetracker_items = ttstore_sanitize($_POST['item']); 143 135 if((isset($Tradetracker_items) && $Tradetracker_items != "") || $Tradetracker_items == ""){ 144 136 $query = "DELETE FROM `".$ttstoreitemtable."` WHERE `".$ttstoreitemtable."`.`storeID` = ".$multiid.""; … … 389 381 390 382 <div id="TB_overlay" class="TB_overlayBG"></div> 391 <div id="TB_window1" style="left: auto;margin-left: auto;margin-right: auto; margin-top: 0;right: auto;top: 48px;visibility: visible;z-index:100051;width: <?php echo $adminwidth; ?>px;">383 <div id="TB_window1" style="left: auto;margin-left: auto;margin-right: auto; margin-top: 0;right: auto;top: 48px;visibility: visible;z-index:100051;width: <?php echo esc_attr($adminwidth); ?>px;"> 392 384 <div id="ttstorebox"> 393 385 <div id="TB_title"> … … 399 391 </div> 400 392 </div> 401 <div id="ttstoreboxoptions" style="max-height:<?php echo $adminheight; ?>px;">393 <div id="ttstoreboxoptions" style="max-height:<?php echo esc_attr($adminheight); ?>px;"> 402 394 <form class="" action="admin.php" method="get"> 403 395 <input type="hidden" name="page" value="tt-store"> 404 396 <input type="hidden" name="option" value="itemselect"> 405 397 <input type="hidden" name="function" value="select"> 406 <input type="hidden" name="multiid" value="<?php echo $multiid;?>">407 <input type="hidden" name="limit" value="<?php echo $limit;?>">408 <input type="hidden" name="order" value="<?php echo $order;?>">409 <input class="s" type="text" name="search" value="<?php if(isset($keyword)) { echo $keyword;} ?>">398 <input type="hidden" name="multiid" value="<?php echo esc_attr($multiid);?>"> 399 <input type="hidden" name="limit" value="<?php echo esc_attr($limit);?>"> 400 <input type="hidden" name="order" value="<?php echo esc_attr($order);?>"> 401 <input class="s" type="text" name="search" value="<?php if(isset($keyword)) { echo esc_attr($keyword);} ?>"> 410 402 <?php if(!isset($_GET['title'])&&!isset($_GET['description'])){ ?> 411 403 <input type="checkbox" name="title" checked="checked" value="yes">title … … 433 425 <input class="searchsubmit" type="submit" title="search item" value="Search"> 434 426 </form> 435 <table width="<?php echo $adminwidth-30; ?>" border="0">427 <table width="<?php echo esc_attr($adminwidth-30); ?>" border="0"> 436 428 <tr> 437 429 <td width="50%" align="left"> 438 <?php _e("Showing products", "ttstore"); ?> <b><? echo $first; ?></b> - <b><?php echo $last; ?></b> <?php _e("of", "ttstore"); ?> <b><?php echo $numrows; ?></b>430 <?php _e("Showing products", "ttstore"); ?> <b><? echo esc_attr($first); ?></b> - <b><?php echo esc_attr($last); ?></b> <?php _e("of", "ttstore"); ?> <b><?php echo esc_attr($numrows); ?></b> 439 431 </td> 440 432 <td width="50%" align="right"> 441 <?php if ($currentpage != 0) { $back_page = $currentpage - $limit; echo("<a href=\"admin.php?page=tt-store&option=itemselect&function=select". $searchlink."&multiid=".$multiid."&order=$order".$filterurl."¤tpage=$back_page&limit=$limit\"><</a>");} ?> <?php _e("Page", "ttstore"); ?> <b><?php echo $current; ?></b> <?php _e("of", "ttstore"); ?> <b><?php echo $total; ?></b> <?php if (!((($currentpage+$limit) / $limit) >= $pages) && $pages != 1) { $next_page = $currentpage + $limit; echo("<a href=\"admin.php?page=tt-store&option=itemselect&function=select".$searchlink."&multiid=".$multiid."&order=$order".$filterurl."¤tpage=$next_page&limit=$limit\">></a>");} ?>433 <?php if ($currentpage != 0) { $back_page = $currentpage - $limit; echo("<a href=\"admin.php?page=tt-store&option=itemselect&function=select".esc_attr($searchlink)."&multiid=".esc_attr($multiid)."&order=$order".esc_attr($filterurl)."¤tpage=".esc_attr($back_page)."&limit=".esc_attr($limit)."\"><</a>");} ?> <?php _e("Page", "ttstore"); ?> <b><?php echo esc_attr($current); ?></b> <?php _e("of", "ttstore"); ?> <b><?php echo esc_attr($total); ?></b> <?php if (!((($currentpage+$limit) / $limit) >= $pages) && $pages != 1) { $next_page = $currentpage + $limit; echo("<a href=\"admin.php?page=tt-store&option=itemselect&function=select".esc_attr($searchlink)."&multiid=".esc_attr($multiid)."&order=$order".esc_attr($filterurl)."¤tpage=".esc_attr($next_page)."&limit=".esc_attr($limit)."\">></a>");} ?> 442 434 </td> 443 435 </tr> 444 436 <tr> 445 437 <td colspan="2" align="right"> 446 <?php _e("Results per-page:", "ttstore"); ?> <a href="admin.php?page=tt-store&option=itemselect&function=select<?php echo $searchlink; ?>&multiid=<?php echo $multiid; ?>&order=<?php echo $order; ?><?php echo $filterurl; ?>¤tpage=<?php echo $currentpage; ?>&limit=100">100</a> | <a href="admin.php?page=tt-store&option=itemselect&function=select<?php echo $searchlink; ?>&multiid=<?php echo $multiid; ?>&order=<?php echo $order; ?><?php echo $filterurl;?>¤tpage=<?php echo $currentpage; ?>&limit=200">200</a> | <a href="admin.php?page=tt-store&option=itemselect&function=select<?php echo $searchlink; ?>&multiid=<?php echo $multiid; ?>&order=<?php echo $order; ?><?php echo $filterurl;?>¤tpage=<?php echo $currentpage; ?>&limit=500">500</a> | <a href="admin.php?page=tt-store&option=itemselect&function=select<?php echo $searchlink; ?>&multiid=<?php echo $multiid; ?>&order=<?php echo $order; ?><?php echo $filterurl; ?>¤tpage=<?php echo $currentpage; ?>&limit=1000">1000</a>438 <?php _e("Results per-page:", "ttstore"); ?> <a href="admin.php?page=tt-store&option=itemselect&function=select<?php echo esc_attr($searchlink); ?>&multiid=<?php echo esc_attr($multiid); ?>&order=<?php echo esc_attr($order); ?><?php echo esc_attr($filterurl); ?>¤tpage=<?php echo esc_attr($currentpage); ?>&limit=100">100</a> | <a href="admin.php?page=tt-store&option=itemselect&function=select<?php echo esc_attr($searchlink); ?>&multiid=<?php echo esc_attr($multiid); ?>&order=<?php echo esc_attr($order); ?><?php echo esc_attr($filterurl);?>¤tpage=<?php echo esc_attr($currentpage); ?>&limit=200">200</a> | <a href="admin.php?page=tt-store&option=itemselect&function=select<?php echo esc_attr($searchlink); ?>&multiid=<?php echo esc_attr($multiid); ?>&order=<?php echo esc_attr($order); ?><?php echo esc_attr($filterurl);?>¤tpage=<?php echo esc_attr($currentpage); ?>&limit=500">500</a> | <a href="admin.php?page=tt-store&option=itemselect&function=select<?php echo esc_attr($searchlink); ?>&multiid=<?php echo esc_attr($multiid); ?>&order=<?php echo esc_attr($order); ?><?php echo esc_attr($filterurl); ?>¤tpage=<?php echo esc_attr($currentpage); ?>&limit=1000">1000</a> 447 439 </td> 448 440 </tr> … … 498 490 } 499 491 } 500 echo "<table width=\" <?php echo $adminwidth-15; ?>\" border=\"0\" style=\"border-width: 0px;padding:0px;border-spacing:0px;\">";492 echo "<table width=\"".esc_attr($adminwidth-15)."\" border=\"0\" style=\"border-width: 0px;padding:0px;border-spacing:0px;\">"; 501 493 echo "<tr><td width=\"20\">"; 502 494 if(!isset($_GET['selected']) || $_GET['selected']==""){ 503 echo "<b><a href=\"admin.php?page=tt-store&option=itemselect&limit=". $limit."&function=select".$searchlink."&multiid=".$multiid."&order=".$order."".$filterurl."&selected=yes\">"; _e('Selected', 'tradetracker-store'); echo "</a></b>";504 } else { 505 echo "<b><a href=\"admin.php?page=tt-store&option=itemselect&limit=". $limit."&function=select".$searchlink."".$filterurl."&multiid=".$multiid."\">"; _e('Selected', 'tradetracker-store'); echo "</a></b>";495 echo "<b><a href=\"admin.php?page=tt-store&option=itemselect&limit=".esc_attr($limit)."&function=select".esc_attr($searchlink)."&multiid=".esc_attr($multiid)."&order=".esc_attr($order)."".esc_attr($filterurl)."&selected=yes\">"; _e('Selected', 'tradetracker-store'); echo "</a></b>"; 496 } else { 497 echo "<b><a href=\"admin.php?page=tt-store&option=itemselect&limit=".esc_attr($limit)."&function=select".esc_attr($searchlink)."".esc_attr($filterurl)."&multiid=".esc_attr($multiid)."\">"; _e('Selected', 'tradetracker-store'); echo "</a></b>"; 506 498 } 507 499 echo "</td><td width=\"200\">"; 508 echo "<b><a href=\"admin.php?page=tt-store&option=itemselect&limit=". $limit."&function=select".$searchlink."&multiid=".$multiid."&order=productID".$filterurl."\">"; _e('ProductID', 'tradetracker-store'); echo "</a></b>";500 echo "<b><a href=\"admin.php?page=tt-store&option=itemselect&limit=".esc_attr($limit)."&function=select".esc_attr($searchlink)."&multiid=".esc_attr($multiid)."&order=productID".esc_attr($filterurl)."\">"; _e('ProductID', 'tradetracker-store'); echo "</a></b>"; 509 501 echo "</td><td width=\"435\">"; 510 echo "<b><a href=\"admin.php?page=tt-store&option=itemselect&limit=". $limit."&function=select".$searchlink."&multiid=".$multiid."&order=name".$filterurl."\">"; _e('Product name', 'tradetracker-store'); echo "</a></b>";502 echo "<b><a href=\"admin.php?page=tt-store&option=itemselect&limit=".esc_attr($limit)."&function=select".esc_attr($searchlink)."&multiid=".esc_attr($multiid)."&order=name".esc_attr($filterurl)."\">"; _e('Product name', 'tradetracker-store'); echo "</a></b>"; 511 503 echo "</td><td width=\"180\">"; 512 echo "<b><a href=\"admin.php?page=tt-store&option=itemselect&limit=". $limit."&function=select".$searchlink."&multiid=".$multiid."&order=xmlfeed".$filterurl."\">"; _e('XMLFeed', 'tradetracker-store'); echo "</a></b>";504 echo "<b><a href=\"admin.php?page=tt-store&option=itemselect&limit=".esc_attr($limit)."&function=select".esc_attr($searchlink)."&multiid=".esc_attr($multiid)."&order=xmlfeed".esc_attr($filterurl)."\">"; _e('XMLFeed', 'tradetracker-store'); echo "</a></b>"; 513 505 echo "</td><td width=\"50\">"; 514 echo "<b><a href=\"admin.php?page=tt-store&option=itemselect&limit=". $limit."&function=select".$searchlink."&multiid=".$multiid."&order=price".$filterurl."\">"; _e('Price', 'tradetracker-store'); echo "</a></b>";506 echo "<b><a href=\"admin.php?page=tt-store&option=itemselect&limit=".esc_attr($limit)."&function=select".esc_attr($searchlink)."&multiid=".esc_attr($multiid)."&order=price".esc_attr($filterurl)."\">"; _e('Price', 'tradetracker-store'); echo "</a></b>"; 515 507 echo "</td><td width=\"65\">"; 516 508 echo "<b>"; _e('Currency', 'tradetracker-store'); echo "</b>"; … … 521 513 522 514 echo "<form name=\"form2\" method=\"post\" action=\"\">"; 523 echo $ttstorehidden;515 echo esc_attr($ttstorehidden); 524 516 $array2=""; 525 517 $colors = "1"; … … 531 523 } 532 524 $array2 .= ",".$product->productID.""; 533 echo "<tr style=\"". $tdbgcolor.";\"><td>";525 echo "<tr style=\"".esc_attr($tdbgcolor).";\"><td>"; 534 526 if(isset($_GET['selected']) && $_GET['selected']=="yes"){ 535 527 if(!empty($productID) && in_array($product->productID, $productID, true)) 536 528 { 537 echo "<input type=\"checkbox\" checked=\"yes\" name=\"item[]\" value=". $product->productID." /></td><td>";529 echo "<input type=\"checkbox\" checked=\"yes\" name=\"item[]\" value=".esc_attr($product->productID)." /></td><td>"; 538 530 $xmlfeedname = get_option('Tradetracker_xmlname'); 539 echo $product->productID;531 echo esc_attr($product->productID); 540 532 echo "</td><td><span class=\"link1\"><a href=\"javascript: void(0)\">"; 541 echo $product->name;542 echo "<span><img src=\"". $imageURL."\" width=\"400px\"></span></a></span></td><td>";533 echo esc_attr($product->name); 534 echo "<span><img src=\"".esc_url($imageURL)."\" width=\"400px\"></span></a></span></td><td>"; 543 535 $xmlfeed=$wpdb->get_var("SELECT xmlname FROM ".$ttstorexmltable." where id=".$product->xmlfeed.""); 544 echo $xmlfeed;536 echo esc_attr($xmlfeed); 545 537 echo "</td><td>"; 546 echo $product->price;538 echo esc_attr($product->price); 547 539 echo "</td><td>"; 548 echo $product->currency;540 echo esc_attr($product->currency); 549 541 $extraname = ""; 550 542 $extravar =""; … … 560 552 } 561 553 if($extraname != ""){ 562 echo "</td><td><span class=\"link\"><a href=\"javascript: void(0)\">"; _e("Yes", "ttstore"); echo "<span><table><tr>". $extraname."</tr><tr>".$extravar."</tr></table> </span></a></span></td></tr>";554 echo "</td><td><span class=\"link\"><a href=\"javascript: void(0)\">"; _e("Yes", "ttstore"); echo "<span><table><tr>".esc_attr($extraname)."</tr><tr>".esc_attr($extravar)."</tr></table> </span></a></span></td></tr>"; 563 555 } else { 564 556 echo "</td><td>"; _e("No", "ttstore"); echo "</td></tr>"; … … 574 566 if(!empty($productID) && in_array($product->productID, $productID, true)) 575 567 { 576 echo "<input type=\"checkbox\" checked=\"yes\" name=\"item[]\" value=". $product->productID." /></td><td>";568 echo "<input type=\"checkbox\" checked=\"yes\" name=\"item[]\" value=".esc_attr($product->productID)." /></td><td>"; 577 569 } else { 578 echo "<input type=\"checkbox\" name=\"item[]\" value=". $product->productID." /></td><td>";570 echo "<input type=\"checkbox\" name=\"item[]\" value=".esc_attr($product->productID)." /></td><td>"; 579 571 } 580 572 if($product->imageURL==""){ … … 584 576 } 585 577 $xmlfeedname = get_option('Tradetracker_xmlname'); 586 echo $product->productID;578 echo esc_attr($product->productID); 587 579 echo "</td><td><span class=\"link1\"><a href=\"javascript: void(0)\">"; 588 echo $product->name;589 echo "<span><img src=\"". $imageURL."\" width=\"400px\">$product->description</a></span></span></td><td>";580 echo esc_attr($product->name); 581 echo "<span><img src=\"".esc_url($imageURL)."\" width=\"400px\">$product->description</a></span></span></td><td>"; 590 582 $xmlfeed=$wpdb->get_var("SELECT xmlname FROM ".$ttstorexmltable." where id=".$product->xmlfeed.""); 591 echo $xmlfeed;583 echo esc_attr($xmlfeed); 592 584 echo "</td><td>"; 593 echo $product->price;585 echo esc_attr($product->price); 594 586 echo "</td><td>"; 595 echo $product->currency;587 echo esc_attr($product->currency); 596 588 $extraname = ""; 597 589 $extravar =""; … … 607 599 } 608 600 if($extraname != ""){ 609 echo "</td><td><span class=\"link\"><a href=\"javascript: void(0)\">"; _e("Yes", "ttstore"); echo "<span><table><tr>". $extraname."</tr><tr>".$extravar."</tr></table> </span></a></span></td></tr>";601 echo "</td><td><span class=\"link\"><a href=\"javascript: void(0)\">"; _e("Yes", "ttstore"); echo "<span><table><tr>".esc_attr($extraname)."</tr><tr>".esc_attr($extravar)."</tr></table> </span></a></span></td></tr>"; 610 602 } else { 611 603 echo "</td><td>"; _e("No", "ttstore"); echo "</td></tr>"; … … 626 618 if(isset($result)){ 627 619 $result = implode(",", $result); 628 echo "<input type=\"hidden\" name=\"itemsother\" value=\"". $result."\" />";620 echo "<input type=\"hidden\" name=\"itemsother\" value=\"".esc_attr($result)."\" />"; 629 621 } 630 622 } … … 635 627 if ($currentpage != 0) { // Don't show back link if current page is first page. 636 628 $back_page = $currentpage - $limit; 637 echo("<a href=\"admin.php?page=tt-store&option=itemselect&function=select". $searchlink."&multiid=".$multiid."&order=$order".$filterurl."¤tpage=$back_page&limit=$limit\">back</a> \n");629 echo("<a href=\"admin.php?page=tt-store&option=itemselect&function=select".esc_attr($searchlink)."&multiid=".esc_attr($multiid)."&order=$order".esc_attr($filterurl)."¤tpage=".esc_attr($back_page)."&limit=".esc_attr($limit)."\">back</a> \n"); 638 630 } 639 631 for ($i=1; $i <= $pages; $i++){ 640 632 $ppage = $limit*($i - 1); 641 633 if ($ppage == $currentpage){ 642 echo("<b> $i</b> \n"); // If current page don't give link, just text.634 echo("<b>".esc_attr($i)."</b> \n"); // If current page don't give link, just text. 643 635 }else{ 644 echo("<a href=\"admin.php?page=tt-store&option=itemselect&function=select". $searchlink."&multiid=".$multiid."&order=$order".$filterurl."¤tpage=$ppage&limit=$limit\">$i</a> \n");636 echo("<a href=\"admin.php?page=tt-store&option=itemselect&function=select".esc_attr($searchlink)."&multiid=".esc_attr($multiid)."&order=$order".esc_attr($filterurl)."¤tpage=".esc_attr($ppage)."&limit=".esc_attr($limit)."\">".esc_attr($i)."</a> \n"); 645 637 } 646 638 } 647 639 if (!((($currentpage+$limit) / $limit) >= $pages) && $pages != 1) { // If last page don't give next link. 648 640 $next_page = $currentpage + $limit; 649 echo(" <a href=\"admin.php?page=tt-store&option=itemselect&function=select". $searchlink."&multiid=".$multiid."&order=$order".$filterurl."¤tpage=$next_page&limit=$limit\">next</a>\n");641 echo(" <a href=\"admin.php?page=tt-store&option=itemselect&function=select".esc_attr($searchlink)."&multiid=".esc_attr($multiid)."&order=$order".esc_attr($filterurl)."¤tpage=".esc_attr($next_page)."&limit=".esc_attr($limit)."\">next</a>\n"); 650 642 } 651 643 echo "</td></tr></table>"; -
tradetracker-store/trunk/menu/layout.php
r2554244 r2562230 68 68 //see if form has been submitted 69 69 if( isset($_POST[ $ttstoresubmit ]) && $_POST[ $ttstoresubmit ] == 'Y' ) { 70 $Tradetracker_width_val = sanitize_text_field($_POST[ $Tradetracker_width_name ]);71 $Tradetracker_layoutname_val = sanitize_text_field($_POST[ $Tradetracker_layoutname_name ]);72 $Tradetracker_font_val = sanitize_text_field($_POST[ $Tradetracker_font_name ]);73 $Tradetracker_fontsize_val = sanitize_text_field($_POST[ $Tradetracker_fontsize_name ]);74 $Tradetracker_colortitle_val = sanitize_text_field($_POST[ $Tradetracker_colortitle_name ]);75 $Tradetracker_colorfooter_val = sanitize_text_field($_POST[ $Tradetracker_colorfooter_name ]);76 $Tradetracker_colorimagebg_val = sanitize_text_field($_POST[ $Tradetracker_colorimagebg_name ]);77 $Tradetracker_colorfont_val = sanitize_text_field($_POST[ $Tradetracker_colorfont_name ]);78 $Tradetracker_colorborder_val = sanitize_text_field($_POST[ $Tradetracker_colorborder_name ]);79 $Tradetracker_colorbutton_val = sanitize_text_field($_POST[ $Tradetracker_colorbutton_name ]);80 $Tradetracker_colorbuttonfont_val = sanitize_text_field($_POST[ $Tradetracker_colorbuttonfont_name ]);70 $Tradetracker_width_val = ttstore_sanitize($_POST[ $Tradetracker_width_name ]); 71 $Tradetracker_layoutname_val = ttstore_sanitize($_POST[ $Tradetracker_layoutname_name ]); 72 $Tradetracker_font_val = ttstore_sanitize($_POST[ $Tradetracker_font_name ]); 73 $Tradetracker_fontsize_val = ttstore_sanitize($_POST[ $Tradetracker_fontsize_name ]); 74 $Tradetracker_colortitle_val = ttstore_sanitize($_POST[ $Tradetracker_colortitle_name ]); 75 $Tradetracker_colorfooter_val = ttstore_sanitize($_POST[ $Tradetracker_colorfooter_name ]); 76 $Tradetracker_colorimagebg_val = ttstore_sanitize($_POST[ $Tradetracker_colorimagebg_name ]); 77 $Tradetracker_colorfont_val = ttstore_sanitize($_POST[ $Tradetracker_colorfont_name ]); 78 $Tradetracker_colorborder_val = ttstore_sanitize($_POST[ $Tradetracker_colorborder_name ]); 79 $Tradetracker_colorbutton_val = ttstore_sanitize($_POST[ $Tradetracker_colorbutton_name ]); 80 $Tradetracker_colorbuttonfont_val = ttstore_sanitize($_POST[ $Tradetracker_colorbuttonfont_name ]); 81 81 82 82 if($Tradetracker_width_val=="" || $Tradetracker_layoutname_val ==""){ … … 188 188 <?php $adminheight = get_option("Tradetracker_adminheight"); ?> 189 189 <div id="TB_overlay" class="TB_overlayBG"></div> 190 <div id="TB_window1" style="left: auto;margin-left: auto;margin-right: auto; margin-top: 0;right: auto;top: 48px;visibility: visible;z-index:100051;width: <?php echo $adminwidth; ?>px;">190 <div id="TB_window1" style="left: auto;margin-left: auto;margin-right: auto; margin-top: 0;right: auto;top: 48px;visibility: visible;z-index:100051;width: <?php echo esc_attr($adminwidth); ?>px;"> 191 191 <div id="ttstorebox"> 192 192 <div id="TB_title"> … … 199 199 </div> 200 200 201 <div id="ttstoreboxoptions" style="max-height:<?php echo $adminheight; ?>px;">202 <table width="<?php echo $adminwidth-15; ?>">201 <div id="ttstoreboxoptions" style="max-height:<?php echo esc_attr($adminheight); ?>px;"> 202 <table width="<?php echo esc_attr($adminwidth-15); ?>"> 203 203 <tr> 204 204 <td colspan="4"> … … 251 251 <tr> 252 252 <td> 253 <?php echo $layout_val->layname; ?>254 </td> 255 <td> 256 <?php echo $layout_val->laywidth; ?>257 </td> 258 <td> 259 <?php echo $layout_val->layfont; ?>260 </td> 261 <td> 262 <?php echo $layout_val->layfontsize; ?>263 </td> 264 <td> 265 <?php echo $layout_val->laycolortitle; ?>266 </td> 267 <td> 268 <?php echo $layout_val->laycolorimagebg; ?>269 </td> 270 <td> 271 <?php echo $layout_val->laycolorfooter; ?>272 </td> 273 <td> 274 <?php echo $layout_val->laycolorfont; ?>275 </td> 276 <td> 277 <?php echo $layout_val->laycolorborder; ?>278 </td> 279 <td> 280 <?php echo $layout_val->laycolorbutton; ?>281 </td> 282 <td> 283 <?php echo $layout_val->laycolorbuttonfont; ?>284 </td> 285 <td> 286 <?php if($layout_val->id>"1"){ echo "<a href=\"admin.php?page=tt-store&option=layout&function=new&layoutid=". $layout_val->id."\">".__('Edit','tradetracker-store')."</a>"; } ?>253 <?php echo esc_attr($layout_val->layname); ?> 254 </td> 255 <td> 256 <?php echo esc_attr($layout_val->laywidth); ?> 257 </td> 258 <td> 259 <?php echo esc_attr($layout_val->layfont); ?> 260 </td> 261 <td> 262 <?php echo esc_attr($layout_val->layfontsize); ?> 263 </td> 264 <td> 265 <?php echo esc_attr($layout_val->laycolortitle); ?> 266 </td> 267 <td> 268 <?php echo esc_attr($layout_val->laycolorimagebg); ?> 269 </td> 270 <td> 271 <?php echo esc_attr($layout_val->laycolorfooter); ?> 272 </td> 273 <td> 274 <?php echo esc_attr($layout_val->laycolorfont); ?> 275 </td> 276 <td> 277 <?php echo esc_attr($layout_val->laycolorborder); ?> 278 </td> 279 <td> 280 <?php echo esc_attr($layout_val->laycolorbutton); ?> 281 </td> 282 <td> 283 <?php echo esc_attr($layout_val->laycolorbuttonfont); ?> 284 </td> 285 <td> 286 <?php if($layout_val->id>"1"){ echo "<a href=\"admin.php?page=tt-store&option=layout&function=new&layoutid=".esc_attr($layout_val->id)."\">".__('Edit','tradetracker-store')."</a>"; } ?> 287 287 </td> 288 288 </tr> … … 305 305 <div id="TB_overlay" class="TB_overlayBG"></div> 306 306 307 <div id="TB_window1" style="left: auto;margin-left: auto;margin-right: auto; margin-top: 0;right: auto;top: 48px;visibility: visible;z-index:100051;width: <?php echo $adminwidth; ?>px;">307 <div id="TB_window1" style="left: auto;margin-left: auto;margin-right: auto; margin-top: 0;right: auto;top: 48px;visibility: visible;z-index:100051;width: <?php echo esc_attr($adminwidth); ?>px;"> 308 308 <div id="ttstorebox"> 309 309 <form name="form1" method="post" action=""> … … 318 318 </div> 319 319 <?php $adminheight = get_option("Tradetracker_adminheight"); ?> 320 <div id="ttstoreboxoptions" style="max-height:<?php echo $adminheight; ?>px;">320 <div id="ttstoreboxoptions" style="max-height:<?php echo esc_attr($adminheight); ?>px;"> 321 321 <div id="ttstoreboxlayout"> 322 322 </div> 323 <input type="hidden" name="layoutid" value="<?php if(isset($layoutid)){ echo $layoutid;} ?>">324 <table width="<?php echo $adminwidth-15; ?>">323 <input type="hidden" name="layoutid" value="<?php if(isset($layoutid)){ echo esc_attr($layoutid);} ?>"> 324 <table width="<?php echo esc_attr($adminwidth-15); ?>"> 325 325 <tr> 326 326 <td> … … 330 330 </td> 331 331 <td> 332 <input type="text" name="<?php echo $Tradetracker_layoutname_name; ?>" class="target" id="layoutname" value="<?php if(isset($Tradetracker_layoutname_val)){ echo $Tradetracker_layoutname_val; }?>" size="20" <?php if($readonlylock == "yes"){echo "readonly";} ?>>332 <input type="text" name="<?php echo $Tradetracker_layoutname_name; ?>" class="target" id="layoutname" value="<?php if(isset($Tradetracker_layoutname_val)){ echo esc_attr($Tradetracker_layoutname_val); }?>" size="20" <?php if($readonlylock == "yes"){echo "readonly";} ?>> 333 333 <?php if(isset($error)){ echo "<font color=\"red\">*</font>"; }?> 334 334 </td> … … 341 341 </td> 342 342 <td> 343 <input type="text" name="<?php echo $Tradetracker_width_name; ?>" class="target" id="layoutwidth" value="<?php if(isset($Tradetracker_width_val)){ echo $Tradetracker_width_val;} ?>" size="20" <?php if($readonlylock == "yes"){echo "readonly";} ?>>343 <input type="text" name="<?php echo $Tradetracker_width_name; ?>" class="target" id="layoutwidth" value="<?php if(isset($Tradetracker_width_val)){ echo esc_attr($Tradetracker_width_val);} ?>" size="20" <?php if($readonlylock == "yes"){echo "readonly";} ?>> 344 344 <?php if(isset($error)){ echo "<font color=\"red\">*</font>"; }?> 345 345 </td> … … 353 353 </td> 354 354 <td> 355 <input type="text" name="<?php echo $Tradetracker_font_name; ?>" class="target" id="layoutfont" value="<?php if(isset($Tradetracker_font_val)){ echo $Tradetracker_font_val;} ?>" size="20" <?php if($readonlylock == "yes"){echo "readonly";} ?>>355 <input type="text" name="<?php echo $Tradetracker_font_name; ?>" class="target" id="layoutfont" value="<?php if(isset($Tradetracker_font_val)){ echo esc_attr($Tradetracker_font_val);} ?>" size="20" <?php if($readonlylock == "yes"){echo "readonly";} ?>> 356 356 <a href="http://www.w3schools.com/cssref/css_websafe_fonts.asp" target="_blank">WebSafe Fonts</a> 357 357 </td> … … 365 365 </td> 366 366 <td> 367 <input type="text" name="<?php echo $Tradetracker_fontsize_name; ?>" class="target" id="layoutfontsize" value="<?php if(isset($Tradetracker_fontsize_val)){ echo $Tradetracker_fontsize_val;} ?>" size="20" <?php if($readonlylock == "yes"){echo "readonly";} ?>>367 <input type="text" name="<?php echo $Tradetracker_fontsize_name; ?>" class="target" id="layoutfontsize" value="<?php if(isset($Tradetracker_fontsize_val)){ echo esc_attr($Tradetracker_fontsize_val);} ?>" size="20" <?php if($readonlylock == "yes"){echo "readonly";} ?>> 368 368 </td> 369 369 </tr> … … 376 376 </td> 377 377 <td> 378 <input type="text" name="<?php echo $Tradetracker_colortitle_name; ?>" class="target" id="layoutcolortitle" value="<?php if(isset($Tradetracker_colortitle_val)){ echo $Tradetracker_colortitle_val;} ?>" size="20" <?php if($readonlylock == "yes"){echo "readonly";} ?>>378 <input type="text" name="<?php echo $Tradetracker_colortitle_name; ?>" class="target" id="layoutcolortitle" value="<?php if(isset($Tradetracker_colortitle_val)){ echo esc_attr($Tradetracker_colortitle_val);} ?>" size="20" <?php if($readonlylock == "yes"){echo "readonly";} ?>> 379 379 <a href="http://www.2createawebsite.com/build/hex-colors.html#colorgenerator" target="_blank">Color Picker</a> <?php _e("(use hex code including #. Like: #000000)", 'tradetracker-store' ); ?> 380 380 </td> … … 388 388 </td> 389 389 <td> 390 <input type="text" name="<?php echo $Tradetracker_colorimagebg_name; ?>" class="target" id="layoutcolorimagebg" value="<?php if(isset($Tradetracker_colorimagebg_val)){ echo $Tradetracker_colorimagebg_val;} ?>" size="20" <?php if($readonlylock == "yes"){echo "readonly";} ?>>390 <input type="text" name="<?php echo $Tradetracker_colorimagebg_name; ?>" class="target" id="layoutcolorimagebg" value="<?php if(isset($Tradetracker_colorimagebg_val)){ echo esc_attr($Tradetracker_colorimagebg_val);} ?>" size="20" <?php if($readonlylock == "yes"){echo "readonly";} ?>> 391 391 </td> 392 392 </tr> … … 399 399 </td> 400 400 <td> 401 <input type="text" name="<?php echo $Tradetracker_colorfooter_name; ?>" class="target" id="layoutcolorfooter" value="<?php if(isset($Tradetracker_colorfooter_val)){ echo $Tradetracker_colorfooter_val;} ?>" size="20" <?php if($readonlylock == "yes"){echo "readonly";} ?>>401 <input type="text" name="<?php echo $Tradetracker_colorfooter_name; ?>" class="target" id="layoutcolorfooter" value="<?php if(isset($Tradetracker_colorfooter_val)){ echo esc_attr($Tradetracker_colorfooter_val);} ?>" size="20" <?php if($readonlylock == "yes"){echo "readonly";} ?>> 402 402 </td> 403 403 </tr> … … 409 409 </td> 410 410 <td> 411 <input type="text" name="<?php echo $Tradetracker_colorborder_name; ?>" class="target" id="layoutcolorborder" value="<?php if(isset($Tradetracker_colorborder_val)){ echo $Tradetracker_colorborder_val;} ?>" size="20" <?php if($readonlylock == "yes"){echo "readonly";} ?>>411 <input type="text" name="<?php echo $Tradetracker_colorborder_name; ?>" class="target" id="layoutcolorborder" value="<?php if(isset($Tradetracker_colorborder_val)){ echo esc_attr($Tradetracker_colorborder_val);} ?>" size="20" <?php if($readonlylock == "yes"){echo "readonly";} ?>> 412 412 </td> 413 413 </tr> … … 419 419 </td> 420 420 <td> 421 <input type="text" name="<?php echo $Tradetracker_colorbutton_name; ?>" class="target" id="layoutcolorbutton" value="<?php if(isset($Tradetracker_colorbutton_val)){ echo $Tradetracker_colorbutton_val;} ?>" size="20" <?php if($readonlylock == "yes"){echo "readonly";} ?>>421 <input type="text" name="<?php echo $Tradetracker_colorbutton_name; ?>" class="target" id="layoutcolorbutton" value="<?php if(isset($Tradetracker_colorbutton_val)){ echo esc_attr($Tradetracker_colorbutton_val);} ?>" size="20" <?php if($readonlylock == "yes"){echo "readonly";} ?>> 422 422 </td> 423 423 </tr> … … 429 429 </td> 430 430 <td> 431 <input type="text" name="<?php echo $Tradetracker_colorbuttonfont_name; ?>" class="target" id="layoutcolorbuttonfont" value="<?php if(isset($Tradetracker_colorbuttonfont_val)){ echo $Tradetracker_colorbuttonfont_val; } ?>" size="20" <?php if($readonlylock == "yes"){echo "readonly";} ?>>431 <input type="text" name="<?php echo $Tradetracker_colorbuttonfont_name; ?>" class="target" id="layoutcolorbuttonfont" value="<?php if(isset($Tradetracker_colorbuttonfont_val)){ echo esc_attr($Tradetracker_colorbuttonfont_val); } ?>" size="20" <?php if($readonlylock == "yes"){echo "readonly";} ?>> 432 432 </td> 433 433 </tr> … … 439 439 </td> 440 440 <td> 441 <input type="text" name="<?php echo $Tradetracker_colorfont_name; ?>" class="target" id="layoutcolorfont" value="<?php if(isset($Tradetracker_colorfont_val)){ echo $Tradetracker_colorfont_val;} ?>" size="20" <?php if($readonlylock == "yes"){echo "readonly";} ?>>441 <input type="text" name="<?php echo $Tradetracker_colorfont_name; ?>" class="target" id="layoutcolorfont" value="<?php if(isset($Tradetracker_colorfont_val)){ echo esc_attr($Tradetracker_colorfont_val);} ?>" size="20" <?php if($readonlylock == "yes"){echo "readonly";} ?>> 442 442 </td> 443 443 </tr> -
tradetracker-store/trunk/menu/menu.css
r544295 r2562230 136 136 137 137 .ttstore-moreinfo { 138 display: none; 138 139 -moz-transition-duration: 0.4s; 139 140 background: none repeat scroll 0 0 #FFFFFF; -
tradetracker-store/trunk/menu/menu.php
r2554244 r2562230 20 20 function ttstore_admin_css() { 21 21 wp_enqueue_style( 'TTStore_Admin_menu', plugins_url( 'menu.css' , __FILE__ ), array(), '1.0' ); 22 wp_enqueue_script('loadjsttadmin', plugins_url( 'expand.js' , __FILE__ ));22 wp_enqueue_script('loadjsttadmin', TT_STORE_pluginurl. 'menu/expand.js'); 23 23 wp_localize_script( 'loadjsttadmin', 'ttstoreexpand_object', 24 24 array( 25 'imgurl' => plugin_dir_url( __DIR__ ).'/images/more.png'25 'imgurl' => TT_STORE_pluginurl.'images/more.png' 26 26 ) 27 27 ); … … 42 42 43 43 <style type="text/css" media="screen"> 44 #ttstorebox { width:<?php echo $adminwidth; ?>px; }45 #ttstoreboxtop {width: <?php echo $adminwidth-10; ?>px;}46 #ttstoreboxoptions {width:<?php echo $adminwidth-10; ?>px;}47 #ttstoreboxbottom {width: <?php echo $adminwidth-10; ?>px;}44 #ttstorebox { width:<?php echo esc_attr($adminwidth); ?>px; } 45 #ttstoreboxtop {width: <?php echo esc_attr($adminwidth-10); ?>px;} 46 #ttstoreboxoptions {width:<?php echo esc_attr($adminwidth-10); ?>px;} 47 #ttstoreboxbottom {width: <?php echo esc_attr($adminwidth-10); ?>px;} 48 48 </style> 49 49 <?php … … 225 225 ".$menuarray[$row]["Vink"]." 226 226 </div>"; 227 $readmore .= "<img src=\"".plugins_url( 'images\more.png' , __FILE__ )."\" style=\"border:0;\" border=\"0\" name=\"img".$menuarray[$row]["Name"]."\" width=\"0\" height=\"0\">227 $readmore .= "<img src=\"".plugins_url( 'images\more.png' , __FILE__ )."\" style=\"border:0;\" border=\"0\" id=\"img".$menuarray[$row]["Name"]."\" width=\"0\" height=\"0\"> 228 228 <div style=\"display: none;\" id=\"".$menuarray[$row]["Name"]."\" class=\"ttstore-moreinfo\"> 229 229 ".$menuarray[$row]["Longdesc"]." … … 231 231 $i++; 232 232 if($i=="3"){ 233 echo $readmore;233 echo wp_kses_post($readmore); 234 234 $i=0; 235 235 $readmore=""; … … 237 237 238 238 } 239 echo $readmore;239 echo wp_kses_post($readmore); 240 240 echo "</div>"; 241 241 … … 259 259 $site_dir = $foldercache.'sites.xml'; 260 260 if (!file_exists($site_dir)) { 261 $site_dir = 'https://wpaffiliatefeed.com/tradetracker-store/sites.xml'; 262 $ch = curl_init($site_dir); 263 $fp = fopen($foldercache."sites.xml", "w"); 264 curl_setopt($ch, CURLOPT_HEADER, 0); 265 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 266 curl_setopt($ch, CURLOPT_FILE, $fp); 267 curl_exec($ch); 268 curl_close($ch); 269 fclose($fp); 261 $url = 'https://wpaffiliatefeed.com/tradetracker-store/sites.xml'; 262 $permfile = TT_STORE_plugipath."cache/sites.xml"; 263 $tmpfile = download_url( $url, $timeout = 300 ); 264 copy( $tmpfile, $permfile ); 265 unlink( $tmpfile ); 270 266 $site_dir = fopen($foldercache."sites.xml","r"); 271 267 } … … 275 271 foreach($sites as $site) // loop through our items 276 272 { 277 echo "<li><a href=\"". $site->siteadres."\" target=\"_blank\">".$site->sitenaam."</a>";273 echo "<li><a href=\"".esc_url($site->siteadres)."\" target=\"_blank\">".esc_attr($site->sitenaam)."</a>"; 278 274 } 279 275 } … … 301 297 foreach($news as $newsmsg) // loop through our items 302 298 { 303 echo "<strong><a href=\"". $newsmsg->item->link."\">".$newsmsg->item->title."</a></strong><br><strong>Posted: ".date("d M Y",strtotime($newsmsg->item->pubDate))."</strong><br>".$newsmsg->item->description."";299 echo "<strong><a href=\"".esc_url($newsmsg->item->link)."\">".esc_attr($newsmsg->item->title)."</a></strong><br><strong>Posted: ".date("d M Y",strtotime($newsmsg->item->pubDate))."</strong><br>".esc_attr($newsmsg->item->description).""; 304 300 } 305 301 } -
tradetracker-store/trunk/menu/news.php
r567134 r2562230 14 14 foreach($news->channel->item as $newsmsg) // loop through our items 15 15 { 16 echo "<li><strong><a href=\"". $newsmsg->link."\">".$newsmsg->title."</a></strong><br><strong>Posted: ".date("d M Y",strtotime($newsmsg->pubDate))."</strong><br>".$newsmsg->description."</li>";16 echo "<li><strong><a href=\"".esc_url($newsmsg->link)."\">".esc_attr($newsmsg->title)."</a></strong><br><strong>Posted: ".date("d M Y",strtotime($newsmsg->pubDate))."</strong><br>".esc_attr($newsmsg->description)."</li>"; 17 17 } 18 18 echo "</ul>"; -
tradetracker-store/trunk/menu/pluginsettings.php
r2554244 r2562230 49 49 //see if form has been submitted 50 50 if( isset($_POST[ $ttstoresubmit ]) && $_POST[ $ttstoresubmit ] == 'Y' ) { 51 $Tradetracker_fancylink_val = sanitize_text_field($_POST[ $Tradetracker_fancylink_name ]);52 $Tradetracker_debugemail_val = sanitize_text_field($_POST[ $Tradetracker_debugemail_name ]);53 $Tradetracker_importtool_val = sanitize_text_field($_POST[ $Tradetracker_importtool_name ]);54 $Tradetracker_loadextra_val = sanitize_text_field($_POST[ $Tradetracker_loadextra_name ]);55 $Tradetracker_removelayout_val = sanitize_text_field($_POST[ $Tradetracker_removelayout_name ]);56 $Tradetracker_removestores_val = sanitize_text_field($_POST[ $Tradetracker_removestores_name ]);57 $Tradetracker_removeproducts_val = sanitize_text_field($_POST[ $Tradetracker_removeproducts_name ]);58 $Tradetracker_removexml_val = sanitize_text_field($_POST[ $Tradetracker_removexml_name ]);59 $Tradetracker_removeother_val = sanitize_text_field($_POST[ $Tradetracker_removeother_name ]);60 $Tradetracker_adminheight_val = sanitize_text_field($_POST[ $Tradetracker_adminheight_name ]);61 $Tradetracker_adminwidth_val = sanitize_text_field($_POST[ $Tradetracker_adminwidth_name ]);62 $Tradetracker_showurl_val = sanitize_text_field($_POST[ $Tradetracker_showurl_name ]);63 $Tradetracker_usecss_val = sanitize_text_field($_POST[ $Tradetracker_usecss_name ]);64 $Tradetracker_csslink_val = sanitize_text_field($_POST[ $Tradetracker_csslink_name ]);65 $Tradetracker_TTnewcategory_val = sanitize_text_field($_POST[ $Tradetracker_TTnewcategory_name ]);66 $Tradetracker_slidertheme_val = sanitize_text_field($_POST[ $Tradetracker_slidertheme_name ]);67 $Tradetracker_sliderenable_val = sanitize_text_field($_POST[ $Tradetracker_sliderenable_name ]);51 $Tradetracker_fancylink_val = ttstore_sanitize($_POST[ $Tradetracker_fancylink_name ]); 52 $Tradetracker_debugemail_val = ttstore_sanitize($_POST[ $Tradetracker_debugemail_name ]); 53 $Tradetracker_importtool_val = ttstore_sanitize($_POST[ $Tradetracker_importtool_name ]); 54 $Tradetracker_loadextra_val = ttstore_sanitize($_POST[ $Tradetracker_loadextra_name ]); 55 $Tradetracker_removelayout_val = ttstore_sanitize($_POST[ $Tradetracker_removelayout_name ]); 56 $Tradetracker_removestores_val = ttstore_sanitize($_POST[ $Tradetracker_removestores_name ]); 57 $Tradetracker_removeproducts_val = ttstore_sanitize($_POST[ $Tradetracker_removeproducts_name ]); 58 $Tradetracker_removexml_val = ttstore_sanitize($_POST[ $Tradetracker_removexml_name ]); 59 $Tradetracker_removeother_val = ttstore_sanitize($_POST[ $Tradetracker_removeother_name ]); 60 $Tradetracker_adminheight_val = ttstore_sanitize($_POST[ $Tradetracker_adminheight_name ]); 61 $Tradetracker_adminwidth_val = ttstore_sanitize($_POST[ $Tradetracker_adminwidth_name ]); 62 $Tradetracker_showurl_val = ttstore_sanitize($_POST[ $Tradetracker_showurl_name ]); 63 $Tradetracker_usecss_val = ttstore_sanitize($_POST[ $Tradetracker_usecss_name ]); 64 $Tradetracker_csslink_val = ttstore_sanitize($_POST[ $Tradetracker_csslink_name ]); 65 $Tradetracker_TTnewcategory_val = ttstore_sanitize($_POST[ $Tradetracker_TTnewcategory_name ]); 66 $Tradetracker_slidertheme_val = ttstore_sanitize($_POST[ $Tradetracker_slidertheme_name ]); 67 $Tradetracker_sliderenable_val = ttstore_sanitize($_POST[ $Tradetracker_sliderenable_name ]); 68 68 69 69 if ( get_option("Tradetracker_fancylink") != $Tradetracker_fancylink_val) { … … 128 128 129 129 <div id="TB_overlay" class="TB_overlayBG"></div> 130 <div id="TB_window1" style="left: auto;margin-left: auto;margin-right: auto; margin-top: 0;right: auto;top: 48px;visibility: visible;z-index:100051;width: <?php echo $adminwidth; ?>px;">130 <div id="TB_window1" style="left: auto;margin-left: auto;margin-right: auto; margin-top: 0;right: auto;top: 48px;visibility: visible;z-index:100051;width: <?php echo esc_attr($adminwidth); ?>px;"> 131 131 <div id="ttstorebox"> 132 132 <form name="form1" method="post" action=""> … … 140 140 </div> 141 141 </div> 142 <div id="ttstoreboxoptions" style="max-height:<?php echo $adminheight; ?>px;">143 <table width="<?php echo $adminwidth-15; ?>">142 <div id="ttstoreboxoptions" style="max-height:<?php echo esc_attr($adminheight); ?>px;"> 143 <table width="<?php echo esc_attr($adminwidth)-15; ?>"> 144 144 <tr> 145 145 <td width="400px"> … … 151 151 </td> 152 152 <td> 153 <input type="radio" name="<?php echo $Tradetracker_TTnewcategory_name; ?>" <?php if($Tradetracker_TTnewcategory_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store');?>154 <br> 155 <input type="radio" name="<?php echo $Tradetracker_TTnewcategory_name; ?>" <?php if($Tradetracker_TTnewcategory_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store');?>153 <input type="radio" name="<?php echo esc_attr($Tradetracker_TTnewcategory_name); ?>" <?php if($Tradetracker_TTnewcategory_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store');?> 154 <br> 155 <input type="radio" name="<?php echo esc_attr($Tradetracker_TTnewcategory_name); ?>" <?php if($Tradetracker_TTnewcategory_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store');?> 156 156 </td> 157 157 </tr> … … 168 168 </td> 169 169 <td> 170 <input type="radio" name="<?php echo $Tradetracker_sliderenable_name; ?>" <?php if($Tradetracker_sliderenable_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store');?>171 <br> 172 <input type="radio" name="<?php echo $Tradetracker_sliderenable_name; ?>" <?php if($Tradetracker_sliderenable_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store');?>170 <input type="radio" name="<?php echo esc_attr($Tradetracker_sliderenable_name); ?>" <?php if($Tradetracker_sliderenable_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store');?> 171 <br> 172 <input type="radio" name="<?php echo esc_attr($Tradetracker_sliderenable_name); ?>" <?php if($Tradetracker_sliderenable_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store');?> 173 173 </td> 174 174 </tr> … … 182 182 </td> 183 183 <td> 184 <select name="<?php echo $Tradetracker_slidertheme_name; ?>">184 <select name="<?php echo esc_attr($Tradetracker_slidertheme_name); ?>"> 185 185 <option <?php if($Tradetracker_slidertheme_val == "base") { echo "selected=\"selected\""; } ?> value="base">Base</option> 186 186 <option <?php if($Tradetracker_slidertheme_val == "ui-lightness") { echo "selected=\"selected\""; } ?> value="ui-lightness">Ui Lightness</option> … … 226 226 </td> 227 227 <td> 228 <input type="radio" name="<?php echo $Tradetracker_usecss_name; ?>" <?php if($Tradetracker_usecss_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store');?>229 <br> 230 <input type="radio" name="<?php echo $Tradetracker_usecss_name; ?>" <?php if($Tradetracker_usecss_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store');?>228 <input type="radio" name="<?php echo esc_attr($Tradetracker_usecss_name); ?>" <?php if($Tradetracker_usecss_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store');?> 229 <br> 230 <input type="radio" name="<?php echo esc_attr($Tradetracker_usecss_name); ?>" <?php if($Tradetracker_usecss_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store');?> 231 231 </td> 232 232 </tr> … … 238 238 </td> 239 239 <td> 240 <input type="text" name="<?php echo $Tradetracker_csslink_name; ?>" value="<?php echo $Tradetracker_csslink_val; ?>" size="70"> <br />240 <input type="text" name="<?php echo esc_attr($Tradetracker_csslink_name); ?>" value="<?php echo esc_attr($Tradetracker_csslink_val); ?>" size="70"> <br /> 241 241 <?php $exampleurl = plugins_url( 'style.css' , __FILE__ ); ?> 242 242 <?php printf(__('Make sure this is not saved in the plugins folder. Cause that will be overwritten with an update. For an example go to <a href="%s" target="_blank">here</a>','tradetracker-store'),$exampleurl);?> … … 255 255 </td> 256 256 <td> 257 <input type="radio" name="<?php echo $Tradetracker_debugemail_name; ?>" <?php if($Tradetracker_debugemail_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store');?>258 <br> 259 <input type="radio" name="<?php echo $Tradetracker_debugemail_name; ?>" <?php if($Tradetracker_debugemail_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store');?>257 <input type="radio" name="<?php echo esc_attr($Tradetracker_debugemail_name); ?>" <?php if($Tradetracker_debugemail_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store');?> 258 <br> 259 <input type="radio" name="<?php echo esc_attr($Tradetracker_debugemail_name); ?>" <?php if($Tradetracker_debugemail_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store');?> 260 260 </td> 261 261 </tr> … … 267 267 </td> 268 268 <td> 269 <input type="radio" name="<?php echo $Tradetracker_fancylink_name; ?>" <?php if($Tradetracker_fancylink_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store');?>270 <br> 271 <input type="radio" name="<?php echo $Tradetracker_fancylink_name; ?>" <?php if($Tradetracker_fancylink_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store');?>269 <input type="radio" name="<?php echo esc_attr($Tradetracker_fancylink_name); ?>" <?php if($Tradetracker_fancylink_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store');?> 270 <br> 271 <input type="radio" name="<?php echo esc_attr($Tradetracker_fancylink_name); ?>" <?php if($Tradetracker_fancylink_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store');?> 272 272 </td> 273 273 </tr> … … 280 280 <td> 281 281 <?php if (ini_get('allow_url_fopen') == true) { ?> 282 <input type="radio" name="<?php echo $Tradetracker_importtool_name; ?>" <?php if($Tradetracker_importtool_val==1) {echo "checked";} ?> value="1"> <?php _e('Fopen (most reliable)','tradetracker-store'); ?>282 <input type="radio" name="<?php echo esc_attr($Tradetracker_importtool_name); ?>" <?php if($Tradetracker_importtool_val==1) {echo "checked";} ?> value="1"> <?php _e('Fopen (most reliable)','tradetracker-store'); ?> 283 283 <?php } ?> 284 284 <?php if (function_exists('curl_init')) { ?> 285 285 <br> 286 <input type="radio" name="<?php echo $Tradetracker_importtool_name; ?>" <?php if($Tradetracker_importtool_val==2){echo "checked";} ?> value="2"> <?php _e('Curl/Fwrite (can run out of memory)','tradetracker-store'); ?>286 <input type="radio" name="<?php echo esc_attr($Tradetracker_importtool_name); ?>" <?php if($Tradetracker_importtool_val==2){echo "checked";} ?> value="2"> <?php _e('Curl/Fwrite (can run out of memory)','tradetracker-store'); ?> 287 287 <br> 288 <input type="radio" name="<?php echo $Tradetracker_importtool_name; ?>" <?php if($Tradetracker_importtool_val==3){echo "checked";} ?> value="3"> <?php _e('Curl (sometimes causes issues)','tradetracker-store'); ?>288 <input type="radio" name="<?php echo esc_attr($Tradetracker_importtool_name); ?>" <?php if($Tradetracker_importtool_val==3){echo "checked";} ?> value="3"> <?php _e('Curl (sometimes causes issues)','tradetracker-store'); ?> 289 289 <?php } ?> 290 290 </td> … … 297 297 </td> 298 298 <td> 299 <input type="radio" name="<?php echo $Tradetracker_loadextra_name; ?>" <?php if($Tradetracker_loadextra_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store'); ?>300 <br> 301 <input type="radio" name="<?php echo $Tradetracker_loadextra_name; ?>" <?php if($Tradetracker_loadextra_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store'); ?> <?php _e('(Can prevent timeouts, But then you cannot show extra fields)','tradetracker-store'); ?>299 <input type="radio" name="<?php echo esc_attr($Tradetracker_loadextra_name); ?>" <?php if($Tradetracker_loadextra_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store'); ?> 300 <br> 301 <input type="radio" name="<?php echo esc_attr($Tradetracker_loadextra_name); ?>" <?php if($Tradetracker_loadextra_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store'); ?> <?php _e('(Can prevent timeouts, But then you cannot show extra fields)','tradetracker-store'); ?> 302 302 </td> 303 303 </tr> … … 309 309 </td> 310 310 <td> 311 <input type="text" name="<?php echo $Tradetracker_adminheight_name; ?>" value="<?php echo $Tradetracker_adminheight_val; ?>" size="20">311 <input type="text" name="<?php echo esc_attr($Tradetracker_adminheight_name); ?>" value="<?php echo esc_attr($Tradetracker_adminheight_val); ?>" size="20"> 312 312 </td> 313 313 </tr> … … 319 319 </td> 320 320 <td> 321 <input type="text" name="<?php echo $Tradetracker_adminwidth_name; ?>" value="<?php echo $Tradetracker_adminwidth_val; ?>" size="20">321 <input type="text" name="<?php echo esc_attr($Tradetracker_adminwidth_name); ?>" value="<?php echo esc_attr($Tradetracker_adminwidth_val); ?>" size="20"> 322 322 </td> 323 323 </tr> … … 329 329 </td> 330 330 <td> 331 <input type="radio" name="<?php echo $Tradetracker_showurl_name; ?>" <?php if($Tradetracker_showurl_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store'); ?>332 <br> 333 <input type="radio" name="<?php echo $Tradetracker_showurl_name; ?>" <?php if($Tradetracker_showurl_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store'); ?>331 <input type="radio" name="<?php echo esc_attr($Tradetracker_showurl_name); ?>" <?php if($Tradetracker_showurl_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store'); ?> 332 <br> 333 <input type="radio" name="<?php echo esc_attr($Tradetracker_showurl_name); ?>" <?php if($Tradetracker_showurl_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store'); ?> 334 334 </td> 335 335 </tr> … … 346 346 </td> 347 347 <td> 348 <input type="radio" name="<?php echo $Tradetracker_removelayout_name; ?>" <?php if($Tradetracker_removelayout_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store'); ?>349 <br> 350 <input type="radio" name="<?php echo $Tradetracker_removelayout_name; ?>" <?php if($Tradetracker_removelayout_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store'); ?>348 <input type="radio" name="<?php echo esc_attr($Tradetracker_removelayout_name); ?>" <?php if($Tradetracker_removelayout_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store'); ?> 349 <br> 350 <input type="radio" name="<?php echo esc_attr($Tradetracker_removelayout_name); ?>" <?php if($Tradetracker_removelayout_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store'); ?> 351 351 </td> 352 352 </tr> … … 358 358 </td> 359 359 <td> 360 <input type="radio" name="<?php echo $Tradetracker_removestores_name; ?>" <?php if($Tradetracker_removestores_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store'); ?>361 <br> 362 <input type="radio" name="<?php echo $Tradetracker_removestores_name; ?>" <?php if($Tradetracker_removestores_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store'); ?>360 <input type="radio" name="<?php echo esc_attr($Tradetracker_removestores_name); ?>" <?php if($Tradetracker_removestores_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store'); ?> 361 <br> 362 <input type="radio" name="<?php echo esc_attr($Tradetracker_removestores_name); ?>" <?php if($Tradetracker_removestores_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store'); ?> 363 363 </td> 364 364 </tr> … … 370 370 </td> 371 371 <td> 372 <input type="radio" name="<?php echo $Tradetracker_removeproducts_name; ?>" <?php if($Tradetracker_removeproducts_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store'); ?>373 <br> 374 <input type="radio" name="<?php echo $Tradetracker_removeproducts_name; ?>" <?php if($Tradetracker_removeproducts_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store'); ?>372 <input type="radio" name="<?php echo esc_attr($Tradetracker_removeproducts_name); ?>" <?php if($Tradetracker_removeproducts_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store'); ?> 373 <br> 374 <input type="radio" name="<?php echo esc_attr($Tradetracker_removeproducts_name); ?>" <?php if($Tradetracker_removeproducts_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store'); ?> 375 375 </td> 376 376 </tr> … … 382 382 </td> 383 383 <td> 384 <input type="radio" name="<?php echo $Tradetracker_removexml_name; ?>" <?php if($Tradetracker_removexml_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store'); ?>385 <br> 386 <input type="radio" name="<?php echo $Tradetracker_removexml_name; ?>" <?php if($Tradetracker_removexml_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store'); ?>384 <input type="radio" name="<?php echo esc_attr($Tradetracker_removexml_name); ?>" <?php if($Tradetracker_removexml_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store'); ?> 385 <br> 386 <input type="radio" name="<?php echo esc_attr($Tradetracker_removexml_name); ?>" <?php if($Tradetracker_removexml_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store'); ?> 387 387 </td> 388 388 </tr> … … 394 394 </td> 395 395 <td> 396 <input type="radio" name="<?php echo $Tradetracker_removeother_name; ?>" <?php if($Tradetracker_removeother_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store'); ?>397 <br> 398 <input type="radio" name="<?php echo $Tradetracker_removeother_name; ?>" <?php if($Tradetracker_removeother_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store'); ?>396 <input type="radio" name="<?php echo esc_attr($Tradetracker_removeother_name); ?>" <?php if($Tradetracker_removeother_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store'); ?> 397 <br> 398 <input type="radio" name="<?php echo esc_attr($Tradetracker_removeother_name); ?>" <?php if($Tradetracker_removeother_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store'); ?> 399 399 </td> 400 400 </tr> … … 404 404 <?php 405 405 if(isset($saved)){ 406 echo $saved;406 echo wp_kses_post($saved); 407 407 } 408 408 ?> -
tradetracker-store/trunk/menu/premium.php
r2554244 r2562230 13 13 //see if form has been submitted 14 14 if( isset($_POST[ $ttstoresubmit ]) && $_POST[ $ttstoresubmit ] == 'Y' ) { 15 $premiumapi = $_POST['premiumapi']; 16 if (is_array($premiumapi)) { 17 foreach ($premiumapi as &$tag) { 18 $tag = esc_attr($tag); 19 } 20 unset($tag ); 21 } else { 22 $premiumapi = esc_attr($premiumapi); 23 } 24 $premiumprov = $_POST['premiumprov']; 25 if (is_array($premiumprov)) { 26 foreach ($premiumprov as &$tag) { 27 $tag = esc_attr($tag); 28 } 29 unset($tag ); 30 } else { 31 $premiumprov = esc_attr($premiumprov); 32 } 15 $premiumapi = ttstore_sanitize($_POST['premiumapi']); 16 $premiumprov = ttstore_sanitize($_POST['premiumprov']); 33 17 $Tradetracker_premiumprov_val = $premiumprov; 34 $Tradetracker_premiumapi_val = str_replace(" ","", $_POST['premiumapi']);18 $Tradetracker_premiumapi_val = str_replace(" ","", ttstore_sanitize($_POST['premiumapi'])); 35 19 $remove_null_number = true; 36 20 $Tradetracker_premiumapi_val = array_combine($Tradetracker_premiumprov_val, $Tradetracker_premiumapi_val); 37 21 if ( get_option("Tradetracker_premiumapi") != $Tradetracker_premiumapi_val) { 38 echo "and this";39 22 update_option( $Tradetracker_premiumapi_name, $Tradetracker_premiumapi_val ); 40 23 update_option('Tradetracker_premiumupdate', "" ); … … 49 32 <?php $adminheight = get_option("Tradetracker_adminheight"); ?> 50 33 <div id="TB_overlay" class="TB_overlayBG"></div> 51 <div id="TB_window1" style="left: auto;margin-left: auto;margin-right: auto; margin-top: 0;right: auto;top: 48px;visibility: visible;z-index:100051;width: <?php echo $adminwidth; ?>px;">34 <div id="TB_window1" style="left: auto;margin-left: auto;margin-right: auto; margin-top: 0;right: auto;top: 48px;visibility: visible;z-index:100051;width: <?php echo esc_attr($adminwidth); ?>px;"> 52 35 <div id="ttstorebox"> 53 36 <form name="form1" method="post" action=""> … … 61 44 </div> 62 45 </div> 63 <div id="ttstoreboxoptions" style="max-height:<?php echo $adminheight; ?>px;">64 <table width="<?php echo $adminwidth-15; ?>">46 <div id="ttstoreboxoptions" style="max-height:<?php echo esc_attr($adminheight); ?>px;"> 47 <table width="<?php echo esc_attr($adminwidth)-15; ?>"> 65 48 <tr><td colspan="2"><b><?php _e('Add extra productfeed providers','tradetracker-store'); ?></b></td></tr> 66 49 <?php … … 80 63 <tr> 81 64 <td> 82 <label for="<?php echo $key; ?>" title="<?php printf(__('If you bought an API key to use %s please fill it in here.','tradetracker-store'),$key); ?>" class="info">65 <label for="<?php echo esc_attr($key); ?>" title="<?php printf(__('If you bought an API key to use %s please fill it in here.','tradetracker-store'),$key); ?>" class="info"> 83 66 <?php printf(__('%s APIKey:', 'tradetracker-store'),$key); ?> 84 67 </label> 85 68 </td> 86 69 <td> 87 <input type="hidden" name="premiumprov[<?php echo $i;?>]" value="<?php echo $key; ?>">88 <input type="text" name="premiumapi[<?php echo $i;?>]" value="<?php echo $Tradetracker_premiumapi_val[$key]; ?>" size="40"> <?php echo $accepted; ?>70 <input type="hidden" name="premiumprov[<?php echo esc_attr($i);?>]" value="<?php echo esc_attr($key); ?>"> 71 <input type="text" name="premiumapi[<?php echo esc_attr($i);?>]" value="<?php echo esc_attr($Tradetracker_premiumapi_val[$key]); ?>" size="40"> <?php echo esc_attr($accepted); ?> 89 72 </td> 90 73 </tr> … … 110 93 <tr> 111 94 <td> 112 <label for="<?php echo $key; ?>" title="<?php printf(__('If you bought an API key to use %s please fill it in here.','tradetracker-store'),$key); ?>" class="info">95 <label for="<?php echo esc_attr($key); ?>" title="<?php printf(__('If you bought an API key to use %s please fill it in here.','tradetracker-store'),$key); ?>" class="info"> 113 96 <?php printf(__('%s APIKey:', 'tradetracker-store'),$key); ?> 114 97 </label> 115 98 </td> 116 99 <td> 117 <input type="hidden" name="premiumprov[<?php echo $i;?>]" value="<?php echo $key; ?>">118 <input type="text" name="premiumapi[<?php echo $i;?>]" value="<?php echo $Tradetracker_premiumapi_val[$key]; ?>" size="40"> <?php echo $accepted; ?>100 <input type="hidden" name="premiumprov[<?php echo esc_attr($i);?>]" value="<?php echo esc_attr($key); ?>"> 101 <input type="text" name="premiumapi[<?php echo esc_attr($i);?>]" value="<?php echo esc_attr($Tradetracker_premiumapi_val[$key]); ?>" size="40"> <?php echo esc_attr($accepted); ?> 119 102 </td> 120 103 </tr> … … 128 111 <?php 129 112 if(isset($saved)){ 130 echo $saved;113 echo wp_kses_post($saved); 131 114 } 132 115 ?> -
tradetracker-store/trunk/menu/releaselog.php
r567134 r2562230 14 14 foreach($rllog->channel->item as $newsmsg) // loop through our items 15 15 { 16 echo "<li><strong><a href=\"". $newsmsg->link."\">".$newsmsg->title."</a></strong><br><strong>Posted: ".date("d M Y",strtotime($newsmsg->pubDate))."</strong><br>".$newsmsg->description."</li>";16 echo "<li><strong><a href=\"".esc_url($newsmsg->link)."\">".esc_attr($newsmsg->title)."</a></strong><br><strong>Posted: ".date("d M Y",strtotime($newsmsg->pubDate))."</strong><br>".esc_attr($newsmsg->description)."</li>"; 17 17 } 18 18 echo "</ul>"; -
tradetracker-store/trunk/menu/search.php
r2554244 r2562230 18 18 19 19 //get posted data 20 $Tradetracker_searchlayout_val = sanitize_text_field($_POST[ $Tradetracker_searchlayout_name ]);20 $Tradetracker_searchlayout_val = ttstore_sanitize($_POST[ $Tradetracker_searchlayout_name ]); 21 21 22 22 //save the posted value in the database … … 33 33 <?php $adminheight = get_option("Tradetracker_adminheight"); ?> 34 34 <div id="TB_overlay" class="TB_overlayBG"></div> 35 <div id="TB_window1" style="left: auto;margin-left: auto;margin-right: auto; margin-top: 0;right: auto;top: 48px;visibility: visible;z-index:100051;width: <?php echo $adminwidth; ?>px;">35 <div id="TB_window1" style="left: auto;margin-left: auto;margin-right: auto; margin-top: 0;right: auto;top: 48px;visibility: visible;z-index:100051;width: <?php echo esc_attr($adminwidth); ?>px;"> 36 36 <div id="ttstorebox"> 37 37 <form name="form1" method="post" action=""> … … 45 45 </div> 46 46 </div> 47 <div id="ttstoreboxoptions" style="max-height:<?php echo $adminheight; ?>px;">48 <table width="<?php echo $adminwidth-15; ?>">47 <div id="ttstoreboxoptions" style="max-height:<?php echo esc_attr($adminheight); ?>px;"> 48 <table width="<?php echo esc_attr($adminwidth)-15; ?>"> 49 49 <tr> 50 50 <td> … … 54 54 </td> 55 55 <td> 56 <select width="200" style="width: 200px" name="<?php echo $Tradetracker_searchlayout_name; ?>">56 <select width="200" style="width: 200px" name="<?php echo esc_attr($Tradetracker_searchlayout_name); ?>"> 57 57 <?php 58 58 … … 62 62 63 63 if($layout_val->id == get_option("Tradetracker_searchlayout")) { 64 echo "<option selected=\"selected\" value=\"". $layout_val->id."\">$layout_val->multiname</option>";64 echo "<option selected=\"selected\" value=\"".esc_attr($layout_val->id)."\">$layout_val->multiname</option>"; 65 65 } else { 66 echo "<option value=\"". $layout_val->id."\">$layout_val->multiname</option>";66 echo "<option value=\"".esc_attr($layout_val->id)."\">$layout_val->multiname</option>"; 67 67 } 68 68 } … … 82 82 <?php 83 83 if(isset($saved)){ 84 echo $saved;84 echo wp_kses_post($saved); 85 85 } 86 86 ?> -
tradetracker-store/trunk/menu/showlayout.php
r2554244 r2562230 1 1 <?php 2 $name = esc_attr($_POST['layoutname']);3 $width = esc_attr($_POST['layoutwidth']);2 $name = ttstore_sanitize($_POST['layoutname']); 3 $width = ttstore_sanitize($_POST['layoutwidth']); 4 4 if($width == ""){ 5 5 $width="200"; 6 6 } 7 $font = esc_attr($_POST['layoutfont']);8 $fontsize = esc_attr($_POST['layoutfontsize']);9 $colortitle = esc_attr($_POST['layoutcolortitle']);10 $colorimagebg = esc_attr($_POST['layoutcolorimagebg']);11 $colorfooter = esc_attr($_POST['layoutcolorfooter']);12 $colorborder = esc_attr($_POST['layoutcolorborder']);13 $colorbutton = esc_attr($_POST['layoutcolorbutton']);14 $colorbuttonfont = esc_attr($_POST['layoutcolorbuttonfont']);15 $colorfont = esc_attr($_POST['layoutcolorfont']);7 $font = ttstore_sanitize($_POST['layoutfont']); 8 $fontsize = ttstore_sanitize($_POST['layoutfontsize']); 9 $colortitle = ttstore_sanitize($_POST['layoutcolortitle']); 10 $colorimagebg = ttstore_sanitize($_POST['layoutcolorimagebg']); 11 $colorfooter = ttstore_sanitize($_POST['layoutcolorfooter']); 12 $colorborder = ttstore_sanitize($_POST['layoutcolorborder']); 13 $colorbutton = ttstore_sanitize($_POST['layoutcolorbutton']); 14 $colorbuttonfont = ttstore_sanitize($_POST['layoutcolorbuttonfont']); 15 $colorfont = ttstore_sanitize($_POST['layoutcolorfont']); 16 16 17 17 18 18 $widthtitle = $width-6; 19 19 echo "<style type=\"text/css\" media=\"screen\">"; 20 echo ".store-outerbox{width:". $width."px;color:".$colorfont.";font-family:".$font.";float:left;min-height:353px;border:solid 1px ".$colorborder.";position:relative;}";21 echo ".store-titel{width:". $widthtitle."px;background-color:".$colortitle.";color:".$colorfont.";float:left;position:relative;height:30px;line-height:15px;font-size:".$fontsize."px;padding:3px;font-weight:bold;text-align:center;}";22 echo ".store-image{width:". $width."px;height:180px;padding:0px;overflow:hidden;margin: auto;background-color:".$colorimagebg.";}";20 echo ".store-outerbox{width:".esc_attr($width)."px;color:".esc_attr($colorfont).";font-family:".esc_attr($font).";float:left;min-height:353px;border:solid 1px ".esc_attr($colorborder).";position:relative;}"; 21 echo ".store-titel{width:".esc_attr($widthtitle)."px;background-color:".esc_attr($colortitle).";color:".esc_attr($colorfont).";float:left;position:relative;height:30px;line-height:15px;font-size:".esc_attr($fontsize)."px;padding:3px;font-weight:bold;text-align:center;}"; 22 echo ".store-image{width:".esc_attr($width)."px;height:180px;padding:0px;overflow:hidden;margin: auto;background-color:".esc_attr($colorimagebg).";}"; 23 23 echo ".store-image img{display: block;border:0px;margin: auto;}"; 24 echo ".store-footer{width:". $width."px;background-color:".$colorfooter.";float:left;position:relative;min-height:137px;}";25 echo ".store-description{width:". $widthtitle."px;color:".$colorfont.";position:relative;top:5px;left:5px;height:90px;line-height:14px;font-size:".$fontsize."px;overflow:auto;}";26 echo ".store-more{min-height:20px; width:". $widthtitle."px;position: relative;float: left;margin-top:10px;margin-left:5px;margin-bottom: 5px;}";24 echo ".store-footer{width:".esc_attr($width)."px;background-color:".esc_attr($colorfooter).";float:left;position:relative;min-height:137px;}"; 25 echo ".store-description{width:".esc_attr($widthtitle)."px;color:".esc_attr($colorfont).";position:relative;top:5px;left:5px;height:90px;line-height:14px;font-size:".esc_attr($fontsize)."px;overflow:auto;}"; 26 echo ".store-more{min-height:20px; width:".esc_attr($widthtitle)."px;position: relative;float: left;margin-top:10px;margin-left:5px;margin-bottom: 5px;}"; 27 27 echo ".store-more img{margin:0px !important;}"; 28 echo ".store-price {border: 0 solid #65B9C1;color: #4E4E4E !important;float: right;font-size: ". $fontsize."px !important;font-weight: bold !important;height: 30px !important;position: relative;text-align: center !important;width: 80px !important;}";29 echo ".store-price table {background-color: ". $colorfooter." !important;border: 1px none !important;border-collapse: inherit !important;float: right;margin-left: 1px;margin-top: 1px;text-align: center !important;}";28 echo ".store-price {border: 0 solid #65B9C1;color: #4E4E4E !important;float: right;font-size: ".esc_attr($fontsize)."px !important;font-weight: bold !important;height: 30px !important;position: relative;text-align: center !important;width: 80px !important;}"; 29 echo ".store-price table {background-color: ".esc_attr($colorfooter)." !important;border: 1px none !important;border-collapse: inherit !important;float: right;margin-left: 1px;margin-top: 1px;text-align: center !important;}"; 30 30 echo ".store-price table tr {padding: 1px !important;}"; 31 31 echo ".store-price table tr td {padding: 1px !important;}"; 32 32 echo ".store-price table td, table th, table tr {border: 1px solid #CCCCCC;padding: 0 !important;}"; 33 echo ".store-price table td.euros {font-size: ". $fontsize."px !important;letter-spacing: -1px !important; }";34 echo ".store-price {background-color: ". $colorborder." !important;}";35 echo ".buttons a, .buttons button {height:18px;background-color: ". $colorbutton.";border: 1px solid ".$colorbutton.";bottom: 0;color: ".$colorbuttonfont.";cursor: pointer;display: block;float: left;font-size: ".$fontsize."px;font-weight: bold;margin-top: 0;padding: 5px 10px 5px 7px;position: relative;text-decoration: none;width: 100px;}";33 echo ".store-price table td.euros {font-size: ".esc_attr($fontsize)."px !important;letter-spacing: -1px !important; }"; 34 echo ".store-price {background-color: ".esc_attr($colorborder)." !important;}"; 35 echo ".buttons a, .buttons button {height:18px;background-color: ".esc_attr($colorbutton).";border: 1px solid ".esc_attr($colorbutton).";bottom: 0;color: ".esc_attr($colorbuttonfont).";cursor: pointer;display: block;float: left;font-size: ".esc_attr($fontsize)."px;font-weight: bold;margin-top: 0;padding: 5px 10px 5px 7px;position: relative;text-decoration: none;width: 100px;}"; 36 36 echo ".buttons button {overflow: visible;padding: 4px 10px 3px 7px;width: auto;}"; 37 37 echo ".buttons button[type] {line-height: 17px;padding: 5px 10px 5px 7px;}"; 38 38 echo ":first-child + html button[type] {padding: 4px 10px 3px 7px;}"; 39 39 echo ".buttons button img, .buttons a img {border: medium none;margin: 0 3px -3px 0 !important;padding: 0;}"; 40 echo ".button.regular, .buttons a.regular {color: ". $colorbuttonfont.";}";41 echo ".buttons a.regular:hover, button.regular:hover {background-color: #4E4E4E;border: 1px solid #4E4E4E;color: ". $colorbuttonfont.";}";42 echo ".buttons a.regular:active {background-color: #FFFFFF;border: 1px solid ". $colorbutton.";color: ".$colorbuttonfont.";}";40 echo ".button.regular, .buttons a.regular {color: ".esc_attr($colorbuttonfont).";}"; 41 echo ".buttons a.regular:hover, button.regular:hover {background-color: #4E4E4E;border: 1px solid #4E4E4E;color: ".esc_attr($colorbuttonfont).";}"; 42 echo ".buttons a.regular:active {background-color: #FFFFFF;border: 1px solid ".esc_attr($colorbutton).";color: ".esc_attr($colorbuttonfont).";}"; 43 43 echo "</style>"; 44 44 … … 46 46 <div class="store-outerbox"> 47 47 <div class="store-titel"> 48 <?php echo $name; ?>48 <?php echo esc_attr($name); ?> 49 49 </div> 50 50 <div class="store-image"> 51 <img src="" style="max-width:<?php echo $width; ?>px;max-height:180px;">51 <img src="" style="max-width:<?php echo esc_attr($width); ?>px;max-height:180px;"> 52 52 </div> 53 53 <div class="store-footer"> 54 54 <div class="store-description"> 55 The description for the item you can buy using the <?php echo $font; ?> font using font-size <?php echo $fontsize; ?>55 The description for the item you can buy using the <?php echo esc_attr($font); ?> font using font-size <?php echo esc_attr($fontsize); ?> 56 56 </div> 57 57 <div class="store-more"></div> -
tradetracker-store/trunk/menu/store.php
r2554244 r2562230 35 35 } 36 36 if(isset($_GET['delete'])){ 37 $delete = absint($_GET['delete']);37 $delete = ttstore_sanitize($_GET['delete']); 38 38 if($delete>"1"){ 39 39 $wpdb->query("DELETE FROM ".$ttstoremultitable." WHERE `id` = ".$delete.""); … … 43 43 if (isset($_GET['multiid']) || isset($_POST['multiid'])){ 44 44 if(isset($_GET['multiid'])){ 45 $multiid = absint($_GET['multiid']);45 $multiid = ttstore_sanitize($_GET['multiid']); 46 46 } 47 47 if(isset($_POST['multiid'])){ 48 $multiid = absint($_POST['multiid']);48 $multiid = ttstore_sanitize($_POST['multiid']); 49 49 } 50 50 $multi=$wpdb->get_results("SELECT buynow, multixmlfeed, multisorting, multiorder,multimaxprice,multiminprice, multicurrency, multiproductpage, multiname, multilayout, multiamount, multipageamount, multilightbox, categories FROM ".$ttstoremultitable." where id='".$multiid."'"); … … 118 118 if( isset($_POST[ $ttstoresubmit ]) && $_POST[ $ttstoresubmit ] == 'Y' ) { 119 119 // Read their posted value 120 $Tradetracker_buynow_val = sanitize_text_field($_POST[ $Tradetracker_buynow_name ]);121 $Tradetracker_multixmlfeed_val = sanitize_text_field($_POST[ $Tradetracker_multixmlfeed_name ]);122 $Tradetracker_multiname_val = sanitize_text_field($_POST[ $Tradetracker_multiname_name ]);123 $Tradetracker_multisorting_val = sanitize_text_field($_POST[ $Tradetracker_multisorting_name ]);124 $Tradetracker_multiorder_val = sanitize_text_field($_POST[ $Tradetracker_multiorder_name ]);125 $Tradetracker_multilayout_val = sanitize_text_field($_POST[ $Tradetracker_multilayout_name ]);126 $Tradetracker_multiamount_val = sanitize_text_field($_POST[ $Tradetracker_multiamount_name ]);127 $Tradetracker_multipageamount_val = sanitize_text_field($_POST[ $Tradetracker_multipageamount_name ]);128 $Tradetracker_multilightbox_val = sanitize_text_field($_POST[ $Tradetracker_multilightbox_name ]);129 $Tradetracker_multiproductpage_val = sanitize_text_field($_POST[ $Tradetracker_multiproductpage_name ]);130 $Tradetracker_multimaxprice_val = sanitize_text_field($_POST[ $Tradetracker_multimaxprice_name ]);131 $Tradetracker_multiminprice_val = sanitize_text_field($_POST[ $Tradetracker_multiminprice_name ]);132 $Tradetracker_multicurrency_val = sanitize_text_field($_POST[ $Tradetracker_multicurrency_name ]);120 $Tradetracker_buynow_val = ttstore_sanitize($_POST[ $Tradetracker_buynow_name ]); 121 $Tradetracker_multixmlfeed_val = ttstore_sanitize($_POST[ $Tradetracker_multixmlfeed_name ]); 122 $Tradetracker_multiname_val = ttstore_sanitize($_POST[ $Tradetracker_multiname_name ]); 123 $Tradetracker_multisorting_val = ttstore_sanitize($_POST[ $Tradetracker_multisorting_name ]); 124 $Tradetracker_multiorder_val = ttstore_sanitize($_POST[ $Tradetracker_multiorder_name ]); 125 $Tradetracker_multilayout_val = ttstore_sanitize($_POST[ $Tradetracker_multilayout_name ]); 126 $Tradetracker_multiamount_val = ttstore_sanitize($_POST[ $Tradetracker_multiamount_name ]); 127 $Tradetracker_multipageamount_val = ttstore_sanitize($_POST[ $Tradetracker_multipageamount_name ]); 128 $Tradetracker_multilightbox_val = ttstore_sanitize($_POST[ $Tradetracker_multilightbox_name ]); 129 $Tradetracker_multiproductpage_val = ttstore_sanitize($_POST[ $Tradetracker_multiproductpage_name ]); 130 $Tradetracker_multimaxprice_val = ttstore_sanitize($_POST[ $Tradetracker_multimaxprice_name ]); 131 $Tradetracker_multiminprice_val = ttstore_sanitize($_POST[ $Tradetracker_multiminprice_name ]); 132 $Tradetracker_multicurrency_val = ttstore_sanitize($_POST[ $Tradetracker_multicurrency_name ]); 133 133 if(isset($_POST[ $Tradetracker_categories_name ])){ 134 $Tradetracker_categories_val = serialize( $_POST[ $Tradetracker_categories_name ]);134 $Tradetracker_categories_val = serialize(ttstore_sanitize($_POST[ $Tradetracker_categories_name ])); 135 135 } else { 136 136 $Tradetracker_categories_val = ""; … … 218 218 ?> 219 219 <script type="text/javascript"> 220 window.location.href='<?php echo $exitlink; ?>';220 window.location.href='<?php echo esc_url($exitlink); ?>'; 221 221 </script> 222 222 <?php … … 233 233 <?php $adminheight = get_option("Tradetracker_adminheight"); ?> 234 234 <div id="TB_overlay" class="TB_overlayBG"></div> 235 <div id="TB_window1" style="left: auto;margin-left: auto;margin-right: auto; margin-top: 0;right: auto;top: 48px;visibility: visible;z-index:100051;width: <?php echo $adminwidth; ?>px;">235 <div id="TB_window1" style="left: auto;margin-left: auto;margin-right: auto; margin-top: 0;right: auto;top: 48px;visibility: visible;z-index:100051;width: <?php echo esc_attr($adminwidth); ?>px;"> 236 236 <div id="ttstorebox"> 237 237 <div id="TB_title"> … … 243 243 </div> 244 244 </div> 245 <div id="ttstoreboxoptions" style="max-height:<?php echo $adminheight; ?>px;">246 <table width="<?php echo $adminwidth-15; ?>">245 <div id="ttstoreboxoptions" style="max-height:<?php echo esc_attr($adminheight); ?>px;"> 246 <table width="<?php echo esc_attr($adminwidth)-15; ?>"> 247 247 <tr> 248 248 <td> … … 284 284 </tr> 285 285 <?php 286 $sort = $_GET['sort'];286 $sort = sanitize_text_field($_GET['sort']); 287 287 if(!isset($sort) || $sort == ""){ 288 288 $sort = 'id'; … … 293 293 <tr> 294 294 <td> 295 <?php echo $store_val->id; ?>296 </td> 297 <td> 298 <?php echo $store_val->multiname; ?>299 </td> 300 <td> 301 <?php echo $store_val->multisorting; ?>302 </td> 303 <td> 304 <?php echo $store_val->multiorder; ?>305 </td> 306 <td> 307 <?php echo $store_val->layname; ?>308 </td> 309 <td> 310 <?php if ($store_val->multixmlfeed == "*"){_e('All Feeds','tradetracker-store');} else { $xmlfeed=$wpdb->get_var("SELECT xmlname FROM ".$ttstorexmltable." where id=".$store_val->multixmlfeed.""); echo $xmlfeed; }?>311 </td> 312 <td> 313 <?php echo $store_val->buynow; ?>314 </td> 315 <td> 316 <?php echo $store_val->multiamount; ?>295 <?php echo esc_attr($store_val->id); ?> 296 </td> 297 <td> 298 <?php echo esc_attr($store_val->multiname); ?> 299 </td> 300 <td> 301 <?php echo esc_attr($store_val->multisorting); ?> 302 </td> 303 <td> 304 <?php echo esc_attr($store_val->multiorder); ?> 305 </td> 306 <td> 307 <?php echo esc_attr($store_val->layname); ?> 308 </td> 309 <td> 310 <?php if ($store_val->multixmlfeed == "*"){_e('All Feeds','tradetracker-store');} else { $xmlfeed=$wpdb->get_var("SELECT xmlname FROM ".$ttstorexmltable." where id=".$store_val->multixmlfeed.""); echo esc_attr($xmlfeed); }?> 311 </td> 312 <td> 313 <?php echo esc_attr($store_val->buynow); ?> 314 </td> 315 <td> 316 <?php echo esc_attr($store_val->multiamount); ?> 317 317 </td> 318 318 <td> … … 320 320 </td> 321 321 <td> 322 <?php if($store_val->id>"1"){ echo "<a href=\"admin.php?page=tt-store&option=store&function=new&multiid=". $store_val->id."\">".__('Edit','tradetracker-store')."</a>"; } ?>323 </td> 324 <td> 325 <?php if($store_val->id>"1"){ echo "<a href=\"admin.php?page=tt-store&option=store&delete=". $store_val->id."\">".__('Delete','tradetracker-store')."</a>"; } ?>326 </td> 327 <td> 328 <?php if($store_val->id>"1"){ echo "<a href=\"admin.php?page=tt-store&option=store&function=new©id=". $store_val->id."\">".__('Copy','tradetracker-store')."</a>"; } ?>322 <?php if($store_val->id>"1"){ echo "<a href=\"admin.php?page=tt-store&option=store&function=new&multiid=".esc_attr($store_val->id)."\">".__('Edit','tradetracker-store')."</a>"; } ?> 323 </td> 324 <td> 325 <?php if($store_val->id>"1"){ echo "<a href=\"admin.php?page=tt-store&option=store&delete=".esc_attr($store_val->id)."\">".__('Delete','tradetracker-store')."</a>"; } ?> 326 </td> 327 <td> 328 <?php if($store_val->id>"1"){ echo "<a href=\"admin.php?page=tt-store&option=store&function=new©id=".esc_attr($store_val->id)."\">".__('Copy','tradetracker-store')."</a>"; } ?> 329 329 </td> 330 330 </tr> … … 348 348 <?php $adminheight = get_option("Tradetracker_adminheight"); ?> 349 349 <div id="TB_overlay" class="TB_overlayBG"></div> 350 <div id="TB_window1" style="left: auto;margin-left: auto;margin-right: auto; margin-top: 0;right: auto;top: 48px;visibility: visible;z-index:100051;width: <?php echo $adminwidth; ?>px;">350 <div id="TB_window1" style="left: auto;margin-left: auto;margin-right: auto; margin-top: 0;right: auto;top: 48px;visibility: visible;z-index:100051;width: <?php echo esc_attr($adminwidth); ?>px;"> 351 351 <div id="ttstorebox"> 352 352 <form name="form1" method="post" action=""> … … 360 360 </div> 361 361 </div> 362 <div id="ttstoreboxoptions" style="max-height:<?php echo $adminheight; ?>px;">363 364 <input type="hidden" name="multiid" value="<?php if(isset($multiid)){ echo $multiid;} ?>">362 <div id="ttstoreboxoptions" style="max-height:<?php echo esc_attr($adminheight); ?>px;"> 363 364 <input type="hidden" name="multiid" value="<?php if(isset($multiid)){ echo esc_attr($multiid);} ?>"> 365 365 <?php if(isset($returnpage)){ echo "<input type=\"hidden\" name=\"return\" value=\"item\">"; }?> 366 <table width="<?php echo $adminwidth-15; ?>">366 <table width="<?php echo esc_attr($adminwidth)-15; ?>"> 367 367 <tr> 368 368 <td> … … 372 372 </td> 373 373 <td> 374 <input type="text" name="<?php echo $Tradetracker_multiname_name; ?>" value="<?php if(isset($Tradetracker_multiname_val)) {echo $Tradetracker_multiname_val;} ?>" size="30">374 <input type="text" name="<?php echo esc_attr($Tradetracker_multiname_name); ?>" value="<?php if(isset($Tradetracker_multiname_val)) {echo esc_attr($Tradetracker_multiname_val);} ?>" size="30"> 375 375 <?php if(isset($error)){ echo "<font color=\"red\">*</font>"; }?> 376 376 <?php _e('This cannot start with a number','tradetracker-store'); ?> … … 384 384 </td> 385 385 <td> 386 <select width="200" style="width: 200px" name="<?php echo $Tradetracker_multisorting_name; ?>">386 <select width="200" style="width: 200px" name="<?php echo esc_attr($Tradetracker_multisorting_name); ?>"> 387 387 <?php 388 388 $sorting=array('rand()','price', 'categorie', 'name'); 389 389 foreach ($sorting as $sorting_val){ 390 390 if(isset($Tradetracker_multisorting_val) && $sorting_val == $Tradetracker_multisorting_val) { 391 echo "<option selected=\"selected\" value=\"". $sorting_val."\">$sorting_val</option>";391 echo "<option selected=\"selected\" value=\"".esc_attr($sorting_val)."\">$sorting_val</option>"; 392 392 } else { 393 echo "<option value=\"". $sorting_val."\">$sorting_val</option>";393 echo "<option value=\"".esc_attr($sorting_val)."\">$sorting_val</option>"; 394 394 } 395 395 } … … 406 406 </td> 407 407 <td> 408 <select width="200" style="width: 200px" name="<?php echo $Tradetracker_multiorder_name; ?>">408 <select width="200" style="width: 200px" name="<?php echo esc_attr($Tradetracker_multiorder_name); ?>"> 409 409 <?php 410 410 $ordering=array('desc','asc'); 411 411 foreach ($ordering as $ordering_val){ 412 412 if(isset($Tradetracker_multiorder_val) && $ordering_val == $Tradetracker_multiorder_val) { 413 echo "<option selected=\"selected\" value=\"". $ordering_val."\">$ordering_val</option>";413 echo "<option selected=\"selected\" value=\"".esc_attr($ordering_val)."\">$ordering_val</option>"; 414 414 } else { 415 echo "<option value=\"". $ordering_val."\">$ordering_val</option>";415 echo "<option value=\"".esc_attr($ordering_val)."\">$ordering_val</option>"; 416 416 } 417 417 } … … 428 428 </td> 429 429 <td> 430 <select width="200" style="width: 200px" name="<?php echo $Tradetracker_multilayout_name; ?>">430 <select width="200" style="width: 200px" name="<?php echo esc_attr($Tradetracker_multilayout_name); ?>"> 431 431 <?php 432 432 $layout=$wpdb->get_results("SELECT id, layname FROM ".$ttstorelayouttable.""); 433 433 foreach ($layout as $layout_val){ 434 434 if(isset($Tradetracker_multilayout_val) && $layout_val->id == $Tradetracker_multilayout_val) { 435 echo "<option selected=\"selected\" value=\"". $layout_val->id."\">$layout_val->layname</option>";435 echo "<option selected=\"selected\" value=\"".esc_attr($layout_val->id)."\">$layout_val->layname</option>"; 436 436 } else { 437 echo "<option value=\"". $layout_val->id."\">$layout_val->layname</option>";437 echo "<option value=\"".esc_attr($layout_val->id)."\">$layout_val->layname</option>"; 438 438 } 439 439 } … … 456 456 </td> 457 457 <td> 458 <input type="radio" name="<?php echo $Tradetracker_multiproductpage_name; ?>" <?php if(isset($Tradetracker_multiproductpage_val) && $Tradetracker_multiproductpage_val=="1") {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store'); ?>458 <input type="radio" name="<?php echo esc_attr($Tradetracker_multiproductpage_name); ?>" <?php if(isset($Tradetracker_multiproductpage_val) && $Tradetracker_multiproductpage_val=="1") {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store'); ?> 459 459 <br> 460 <input type="radio" name="<?php echo $Tradetracker_multiproductpage_name; ?>" <?php if((isset($Tradetracker_multiproductpage_val) && $Tradetracker_multiproductpage_val=="0") || !isset($Tradetracker_multiproductpage_val)){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store'); ?>460 <input type="radio" name="<?php echo esc_attr($Tradetracker_multiproductpage_name); ?>" <?php if((isset($Tradetracker_multiproductpage_val) && $Tradetracker_multiproductpage_val=="0") || !isset($Tradetracker_multiproductpage_val)){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store'); ?> 461 461 </td> 462 462 </tr> … … 465 465 } 466 466 if (!isset($productpage)){ 467 echo "<input type=\"hidden\" name=\"". $Tradetracker_multiproductpage_name."\" value=\"".$Tradetracker_multiproductpage_val."\">";467 echo "<input type=\"hidden\" name=\"".esc_attr($Tradetracker_multiproductpage_name)."\" value=\"".esc_attr($Tradetracker_multiproductpage_val)."\">"; 468 468 } 469 469 } … … 477 477 </td> 478 478 <td> 479 <select width="200" style="width: 200px" name="<?php echo $Tradetracker_multixmlfeed_name; ?>" onchange="toggleOther();">479 <select width="200" style="width: 200px" name="<?php echo esc_attr($Tradetracker_multixmlfeed_name); ?>" onchange="toggleOther();"> 480 480 <?php 481 481 if(!isset($$Tradetracker_multixmlfeed_val) || $Tradetracker_multixmlfeed_val == "*"){ … … 488 488 foreach ($xmlfeed as $xml) { 489 489 if($Tradetracker_multixmlfeed_val != "*" && $Tradetracker_multixmlfeed_val == $xml->id) { 490 echo "<option selected=\"selected\" value=\"". $xml->id."\">".$xml->xmlname."</option>";490 echo "<option selected=\"selected\" value=\"".esc_attr($xml->id)."\">".esc_attr($xml->xmlname)."</option>"; 491 491 } else { 492 echo "<option value=\"". $xml->id."\">".$xml->xmlname."</option>";492 echo "<option value=\"".esc_attr($xml->id)."\">".esc_attr($xml->xmlname)."</option>"; 493 493 } 494 494 } … … 533 533 if(is_serialized($Tradetracker_categories_val)){ 534 534 if(in_array($categorieselect->categorieid, unserialize($Tradetracker_categories_val), true)) { 535 echo "<input type=\"checkbox\" checked=\"yes\" name=\"". $Tradetracker_categories_name."[]\" value=\"".$categorieselect->categorieid."\" />".$xmlfeedname[$categorieselect->xmlfeed]->xmlname." - ".$categorieselect->categorie."<br />";535 echo "<input type=\"checkbox\" checked=\"yes\" name=\"".esc_attr($Tradetracker_categories_name)."[]\" value=\"".esc_attr($categorieselect->categorieid)."\" />".esc_attr($xmlfeedname[$categorieselect->xmlfeed]->xmlname)." - ".esc_attr($categorieselect->categorie)."<br />"; 536 536 } else { 537 echo "<input type=\"checkbox\" name=\"". $Tradetracker_categories_name."[]\" value=\"".$categorieselect->categorieid."\" />".$xmlfeedname[$categorieselect->xmlfeed]->xmlname." - ".$categorieselect->categorie."<br />";537 echo "<input type=\"checkbox\" name=\"".esc_attr($Tradetracker_categories_name)."[]\" value=\"".esc_attr($categorieselect->categorieid)."\" />".esc_attr($xmlfeedname[$categorieselect->xmlfeed]->xmlname)." - ".esc_attr($categorieselect->categorie)."<br />"; 538 538 } 539 539 } else { 540 echo "<input type=\"checkbox\" name=\"". $Tradetracker_categories_name."[]\" value=\"".$categorieselect->categorieid."\" />".$xmlfeedname[$categorieselect->xmlfeed]->xmlname." - ".$categorieselect->categorie."<br />";540 echo "<input type=\"checkbox\" name=\"".esc_attr($Tradetracker_categories_name)."[]\" value=\"".esc_attr($categorieselect->categorieid)."\" />".esc_attr($xmlfeedname[$categorieselect->xmlfeed]->xmlname)." - ".esc_attr($categorieselect->categorie)."<br />"; 541 541 } 542 542 echo "</td></tr>"; … … 562 562 </td> 563 563 <td> 564 <input type="text" name="<?php echo $Tradetracker_buynow_name; ?>" value="<?php if(isset($Tradetracker_buynow_val)) { echo $Tradetracker_buynow_val; }?>" size="30">564 <input type="text" name="<?php echo esc_attr($Tradetracker_buynow_name); ?>" value="<?php if(isset($Tradetracker_buynow_val)) { echo esc_attr($Tradetracker_buynow_val); }?>" size="30"> 565 565 </td> 566 566 </tr> … … 572 572 </td> 573 573 <td> 574 <input type="text" name="<?php echo $Tradetracker_multiamount_name; ?>" value="<?php if (!isset($Tradetracker_multiamount_val)) {echo "10"; } else {echo $Tradetracker_multiamount_val;} ?>" size="30">574 <input type="text" name="<?php echo esc_attr($Tradetracker_multiamount_name); ?>" value="<?php if (!isset($Tradetracker_multiamount_val)) {echo "10"; } else {echo esc_attr($Tradetracker_multiamount_val);} ?>" size="30"> 575 575 <?php if(isset($error)){ echo "<font color=\"red\">*</font>"; }?> <?php _e('use 0 if you don\'t want a limit at all','tradetracker-store'); ?> 576 576 </td> … … 583 583 </td> 584 584 <td> 585 <input type="text" name="<?php echo $Tradetracker_multipageamount_name; ?>" value="<?php if (!isset($Tradetracker_multipageamount_val)) {echo "10"; } else {echo $Tradetracker_multipageamount_val;} ?>" size="30">585 <input type="text" name="<?php echo esc_attr($Tradetracker_multipageamount_name); ?>" value="<?php if (!isset($Tradetracker_multipageamount_val)) {echo "10"; } else {echo esc_attr($Tradetracker_multipageamount_val);} ?>" size="30"> 586 586 <?php if(isset($error)){ echo "<font color=\"red\">*</font>"; }?> <?php _e('Use 0 if you want to show all items on 1 page','tradetracker-store'); ?> 587 587 </td> … … 597 597 </td> 598 598 <td> 599 <input type="text" name="<?php echo $Tradetracker_multiminprice_name; ?>" value="<?php if (!isset($Tradetracker_multiminprice_val)) {echo "0"; } else {echo $Tradetracker_multiminprice_val;} ?>" size="30">599 <input type="text" name="<?php echo esc_attr($Tradetracker_multiminprice_name); ?>" value="<?php if (!isset($Tradetracker_multiminprice_val)) {echo "0"; } else {echo esc_attr($Tradetracker_multiminprice_val);} ?>" size="30"> 600 600 <?php if(isset($error)){ echo "<font color=\"red\">*</font>"; }?> <?php _e('use 0 if you don\'t want a pricelimit at all','tradetracker-store'); ?> 601 601 </td> … … 608 608 </td> 609 609 <td> 610 <input type="text" name="<?php echo $Tradetracker_multimaxprice_name; ?>" value="<?php if (!isset($Tradetracker_multimaxprice_val)) {echo "0"; } else {echo $Tradetracker_multimaxprice_val;} ?>" size="30">610 <input type="text" name="<?php echo esc_attr($Tradetracker_multimaxprice_name); ?>" value="<?php if (!isset($Tradetracker_multimaxprice_val)) {echo "0"; } else {echo esc_attr($Tradetracker_multimaxprice_val);} ?>" size="30"> 611 611 <?php if(isset($error)){ echo "<font color=\"red\">*</font>"; }?> <?php _e('use 0 if you don\'t want a pricelimit at all','tradetracker-store'); ?> 612 612 </td> 613 613 </tr> 614 614 <?php } else { 615 echo "<input type=\"hidden\" name=\"". $Tradetracker_multimaxprice_name."\" value=\"".$Tradetracker_multimaxprice_val."\">";616 echo "<input type=\"hidden\" name=\"". $Tradetracker_multiminprice_name."\" value=\"".$Tradetracker_multiminprice_val."\">";615 echo "<input type=\"hidden\" name=\"".esc_attr($Tradetracker_multimaxprice_name)."\" value=\"".esc_attr($Tradetracker_multimaxprice_val)."\">"; 616 echo "<input type=\"hidden\" name=\"".esc_attr($Tradetracker_multiminprice_name)."\" value=\"".esc_attr($Tradetracker_multiminprice_val)."\">"; 617 617 } ?> 618 618 <tr> … … 623 623 </td> 624 624 <td> 625 <select width="200" style="width: 200px" name="<?php echo $Tradetracker_multicurrency_name; ?>">625 <select width="200" style="width: 200px" name="<?php echo esc_attr($Tradetracker_multicurrency_name); ?>"> 626 626 <?php 627 627 $currency=array('u20AC','u0024', 'u20a4', 'u007Au0142'); … … 629 629 $curdisplay = str_replace('u','&#x',$currency_val). ";"; 630 630 if(isset($Tradetracker_multicurrency_val) && $currency_val == $Tradetracker_multicurrency_val) { 631 echo "<option selected=\"selected\" value=\"". $currency_val."\">$curdisplay </option>";631 echo "<option selected=\"selected\" value=\"".esc_attr($currency_val)."\">$curdisplay </option>"; 632 632 } else { 633 echo "<option value=\"". $currency_val."\">$curdisplay </option>";633 echo "<option value=\"".esc_attr($currency_val)."\">$curdisplay </option>"; 634 634 } 635 635 } … … 647 647 </td> 648 648 <td> 649 <input type="radio" name="<?php echo $Tradetracker_multilightbox_name; ?>" <?php if(isset($Tradetracker_multilightbox_val) && $Tradetracker_multilightbox_val=="1") {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store'); ?> (<a href="http://wordpress.org/extend/plugins/wp-jquery-lightbox/" target="_blank"><?php _e('You will need this plugin','tradetracker-store'); ?></a>)650 </td> 651 </tr> 652 <tr> 653 <td> 654 </td> 655 <td> 656 <input type="radio" name="<?php echo $Tradetracker_multilightbox_name; ?>" <?php if((isset($Tradetracker_multilightbox_val) && $Tradetracker_multilightbox_val=="0") || !isset($Tradetracker_multilightbox_val)){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store'); ?>649 <input type="radio" name="<?php echo esc_attr($Tradetracker_multilightbox_name); ?>" <?php if(isset($Tradetracker_multilightbox_val) && $Tradetracker_multilightbox_val=="1") {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store'); ?> (<a href="http://wordpress.org/extend/plugins/wp-jquery-lightbox/" target="_blank"><?php _e('You will need this plugin','tradetracker-store'); ?></a>) 650 </td> 651 </tr> 652 <tr> 653 <td> 654 </td> 655 <td> 656 <input type="radio" name="<?php echo esc_attr($Tradetracker_multilightbox_name); ?>" <?php if((isset($Tradetracker_multilightbox_val) && $Tradetracker_multilightbox_val=="0") || !isset($Tradetracker_multilightbox_val)){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store'); ?> 657 657 </td> 658 658 </tr> … … 662 662 <?php 663 663 if(isset($saved)){ 664 echo $saved;664 echo wp_kses_post($saved); 665 665 } 666 666 if(isset($error)){ 667 echo $error;667 echo wp_kses_post($error); 668 668 } 669 669 ?> -
tradetracker-store/trunk/menu/xmlfeed.php
r2554252 r2562230 31 31 $xmlfile = $xmlfeed->xmlfeed; 32 32 $url = $xmlfile; 33 $permfile = plugin_dir_path( __FILE__ ).".cache/cache.xml";33 $permfile = TT_STORE_plugipath.".cache/cache.xml"; 34 34 $tmpfile = download_url( $url, $timeout = 300 ); 35 35 copy( $tmpfile, $permfile ); … … 48 48 $buffer = stream_get_line($handle, 10000); 49 49 echo "<br><a href=\"admin.php?page=tt-store&option=xmlfeed\">Back</a>"; 50 echo "<br><strong>XMLlink:</strong> ". $xmlfile;51 echo "<br><strong>XMLname:</strong> ". $xmlfeed->xmlname;50 echo "<br><strong>XMLlink:</strong> ".esc_attr($xmlfile); 51 echo "<br><strong>XMLname:</strong> ".esc_attr($xmlfeed->xmlname); 52 52 if(isset($server)){ 53 echo "<br><strong>Server message:</strong> ". $server;53 echo "<br><strong>Server message:</strong> ".esc_attr($server); 54 54 } 55 55 if(isset($error)){ 56 echo "<br><strong>Possible error:</strong> ". $error;56 echo "<br><strong>Possible error:</strong> ".esc_attr($error); 57 57 } 58 58 echo "<pre>"; … … 77 77 if( isset($_POST[ $ttstoresubmit ]) && $_POST[ $ttstoresubmit ] == 'Y' ) { 78 78 if(isset($_POST['xmlfeedid']) && !empty($_POST['xmlfeedid'])){ 79 $Tradetracker_xmlid_val = sanitize_text_field($_POST['xmlfeedid']);80 $Tradetracker_xml_val = sanitize_text_field($_POST['xmlfeed']);81 $Tradetracker_xmlconv_val = sanitize_text_field($_POST['xmlfeedconv']);82 $Tradetracker_xmlname_val = sanitize_text_field($_POST['xmlname']);83 $Tradetracker_autoimport_val = sanitize_text_field($_POST['autoimport']);79 $Tradetracker_xmlid_val = ttstore_sanitize($_POST['xmlfeedid']); 80 $Tradetracker_xml_val = ttstore_sanitize($_POST['xmlfeed']); 81 $Tradetracker_xmlconv_val = ttstore_sanitize($_POST['xmlfeedconv']); 82 $Tradetracker_xmlname_val = ttstore_sanitize($_POST['xmlname']); 83 $Tradetracker_autoimport_val = ttstore_sanitize($_POST['autoimport']); 84 84 if(!empty($Tradetracker_xml_val)){ 85 85 $wpdb->update( … … 111 111 } else { 112 112 //get posted data 113 $Tradetracker_xml_val = sanitize_text_field($_POST['xmlfeed']);114 $Tradetracker_xmlconv_val = sanitize_text_field($_POST['xmlfeedconv']);115 $Tradetracker_xmlname_val = sanitize_text_field($_POST['xmlname']);116 $Tradetracker_autoimport_val = sanitize_text_field($_POST['autoimport']);113 $Tradetracker_xml_val = ttstore_sanitize($_POST['xmlfeed']); 114 $Tradetracker_xmlconv_val = ttstore_sanitize($_POST['xmlfeedconv']); 115 $Tradetracker_xmlname_val = ttstore_sanitize($_POST['xmlname']); 116 $Tradetracker_autoimport_val = ttstore_sanitize($_POST['autoimport']); 117 117 if(!empty($Tradetracker_xml_val)){ 118 118 $currentpage["xmlfeed"]=$Tradetracker_xml_val; … … 140 140 <?php $adminheight = get_option("Tradetracker_adminheight"); ?> 141 141 <div id="TB_overlay" class="TB_overlayBG"></div> 142 <div id="TB_window1" style="left: auto;margin-left: auto;margin-right: auto; margin-top: 0;right: auto;top: 48px;visibility: visible;z-index:100051;width: <?php echo $adminwidth; ?>px;">142 <div id="TB_window1" style="left: auto;margin-left: auto;margin-right: auto; margin-top: 0;right: auto;top: 48px;visibility: visible;z-index:100051;width: <?php echo esc_attr($adminwidth); ?>px;"> 143 143 <div id="ttstorebox"> 144 144 <form name="form1" method="post" action=""> … … 153 153 </div> 154 154 <div id="ttstoreboxoptions" style="max-height:<?php echo $adminheight; ?>px;"> 155 <table width="<?php echo $adminwidth-15; ?>">155 <table width="<?php echo esc_attr($adminwidth)-15; ?>"> 156 156 <?php 157 157 $xmlfeed=$wpdb->get_results("SELECT xmlfeed, xmlname, xmlprovider, autoimport, id FROM ".$ttstorexmltable." order by xmlname"); … … 186 186 foreach ($xmlfeed as $xml) { 187 187 echo "<tr><td>"; 188 echo "<a href=\"". $xml->xmlfeed."\">Feed</a>";189 echo "</td><td>"; 190 echo $xml->xmlname;191 echo "</td><td>"; 192 echo $xml->xmlprovider;193 echo "</td><td>"; 194 echo "<a href=\"admin.php?page=tt-store&option=xmlfeed&edit=". $xml->id."\">".__("Edit","ttstore")."</a>";195 echo "</td><td>"; 196 echo "<a href=\"admin.php?page=tt-store&option=xmlfeed&delete=". $xml->id."\">".__("Delete","ttstore")."</a>";197 echo "</td><td>"; 198 echo "<a href=\"admin.php?page=tt-store&option=xmlfeed&test=". $xml->id."\">".__("Test","ttstore")."</a>";188 echo "<a href=\"".esc_url($xml->xmlfeed)."\">Feed</a>"; 189 echo "</td><td>"; 190 echo esc_attr($xml->xmlname); 191 echo "</td><td>"; 192 echo esc_attr($xml->xmlprovider); 193 echo "</td><td>"; 194 echo "<a href=\"admin.php?page=tt-store&option=xmlfeed&edit=".esc_attr($xml->id)."\">".__("Edit","ttstore")."</a>"; 195 echo "</td><td>"; 196 echo "<a href=\"admin.php?page=tt-store&option=xmlfeed&delete=".esc_attr($xml->id)."\">".__("Delete","ttstore")."</a>"; 197 echo "</td><td>"; 198 echo "<a href=\"admin.php?page=tt-store&option=xmlfeed&test=".esc_attr($xml->id)."\">".__("Test","ttstore")."</a>"; 199 199 echo "</td><td>"; 200 200 if($xml->autoimport == "1"){ … … 209 209 } 210 210 ?> 211 <table width="<?php echo $adminwidth-15; ?>">211 <table width="<?php echo esc_attr($adminwidth)-15; ?>"> 212 212 <tr> 213 213 <td> … … 228 228 $oldfeed = $wpdb->get_row("SELECT xmlfeed, xmlname, xmlprovider, id, autoimport FROM ".$ttstorexmltable." where id='$TTedit'"); 229 229 echo "<tr><td>"; 230 echo "<input type=\"text\" name=\"xmlfeed\" value=\"". $oldfeed->xmlfeed."\" size=\"50\">";231 echo "</td><td>"; 232 echo "<input type=\"text\" name=\"xmlname\" value=\"". $oldfeed->xmlname."\" size=\"20\">";233 echo "</td><td>"; 234 echo "<input type=\"hidden\" name=\"xmlfeedid\" value=\"". $oldfeed->id."\" size=\"40\">";230 echo "<input type=\"text\" name=\"xmlfeed\" value=\"".esc_attr($oldfeed->xmlfeed)."\" size=\"50\">"; 231 echo "</td><td>"; 232 echo "<input type=\"text\" name=\"xmlname\" value=\"".esc_attr($oldfeed->xmlname)."\" size=\"20\">"; 233 echo "</td><td>"; 234 echo "<input type=\"hidden\" name=\"xmlfeedid\" value=\"".esc_attr($oldfeed->id)."\" size=\"40\">"; 235 235 236 236 if(get_option('tt_premium_provider')=="") { … … 241 241 foreach($provider as $providers) { 242 242 if($providers == $oldfeed->xmlprovider){ 243 echo "<option value=\"". $providers."\" selected=\"selected\">".$providers."</option>";243 echo "<option value=\"".esc_attr($providers)."\" selected=\"selected\">".esc_attr($providers)."</option>"; 244 244 } else { 245 echo "<option value=\"". $providers."\">".$providers."</option>";245 echo "<option value=\"".esc_attr($providers)."\">".esc_attr($providers)."</option>"; 246 246 } 247 247 } … … 265 265 $provider = get_option('tt_premium_provider'); 266 266 foreach($provider as $providers) { 267 echo "<option value=\"". $providers."\">".$providers."</option>";267 echo "<option value=\"".esc_attr($providers)."\">".esc_attr($providers)."</option>"; 268 268 } 269 269 echo "</select>"; … … 285 285 <?php 286 286 if(isset($saved)){ 287 echo $saved;287 echo wp_kses_post($saved); 288 288 } 289 289 ?> -
tradetracker-store/trunk/menu/xmloption.php
r2554244 r2562230 31 31 32 32 //get posted data 33 $Tradetracker_xmlfeedsperupdate_val = sanitize_text_field($_POST[ $Tradetracker_xmlfeedsperupdate_name ]); 34 $Tradetracker_xmlupdate_val = sanitize_text_field($_POST[ $Tradetracker_xmlupdate_name ]); 35 $Tradetracker_currency_val = $_POST[ $Tradetracker_currency_name ]; 36 if (is_array($Tradetracker_currency_val)) { 37 foreach ($Tradetracker_currency_val as &$tag) { 38 $tag = esc_attr($tag); 39 } 40 unset($tag ); 41 } else { 42 $Tradetracker_currency_val = esc_attr($Tradetracker_currency_val); 43 } 44 $Tradetracker_currencyloc_val = $_POST[ $Tradetracker_currencyloc_name ]; 45 if (is_array($Tradetracker_currencyloc_val)) { 46 foreach ($Tradetracker_currencyloc_val as &$tag) { 47 $tag = esc_attr($tag); 48 } 49 unset($tag ); 50 } else { 51 $Tradetracker_currencyloc_val = esc_attr($Tradetracker_currencyloc_val); 52 } 33 $Tradetracker_xmlfeedsperupdate_val = ttstore_sanitize($_POST[ $Tradetracker_xmlfeedsperupdate_name ]); 34 $Tradetracker_xmlupdate_val = ttstore_sanitize($_POST[ $Tradetracker_xmlupdate_name ]); 35 $Tradetracker_currency_val = ttstore_sanitize($_POST[ $Tradetracker_currency_name ]); 36 $Tradetracker_currencyloc_val = ttstore_sanitize($_POST[ $Tradetracker_currencyloc_name ]); 53 37 if(isset($_POST['extra'])){ 54 $extraPost = $_POST['extra']; 55 if (is_array($extraPost)) { 56 foreach ($extraPost as &$tag) { 57 $tag = esc_attr($tag); 58 } 59 unset($tag ); 60 } else { 61 $extraPost = esc_attr($extraPost); 62 } 38 $extraPost = ttstore_sanitize($_POST['extra']); 63 39 $Tradetracker_extra_val = $extraPost; 64 40 } else { … … 67 43 if(isset($_POST['oldcur'])){ 68 44 $Tradetracker_newcur_val = ""; 69 $a1=$_POST['oldcur']; 70 if (is_array($a1)) { 71 foreach ($a1 as &$tag) { 72 $tag = esc_attr($tag); 73 } 74 unset($tag ); 75 } else { 76 $a1 = esc_attr($a1); 77 } 78 79 $a2 = $_POST['newcur']; 80 if (is_array($a2)) { 81 foreach ($a2 as &$tag) { 82 $tag = esc_attr($tag); 83 } 84 unset($tag ); 85 } else { 86 $a2 = esc_attr($a2); 87 } 45 $a1=ttstore_sanitize($_POST['oldcur']); 46 $a2 = ttstore_sanitize($_POST['newcur']); 88 47 $Tradetracker_newcur_val = array_combine($a1,$a2); 89 48 } else { … … 119 78 <?php $adminheight = get_option("Tradetracker_adminheight"); ?> 120 79 <div id="TB_overlay" class="TB_overlayBG"></div> 121 <div id="TB_window1" style="left: auto;margin-left: auto;margin-right: auto; margin-top: 0;right: auto;top: 48px;visibility: visible;z-index:100051;width: <?php echo $adminwidth; ?>px;">80 <div id="TB_window1" style="left: auto;margin-left: auto;margin-right: auto; margin-top: 0;right: auto;top: 48px;visibility: visible;z-index:100051;width: <?php echo esc_attr($adminwidth); ?>px;"> 122 81 <div id="ttstorebox"> 123 82 <form name="form1" method="post" action=""> … … 131 90 </div> 132 91 </div> 133 <div id="ttstoreboxoptions" style="max-height:<?php echo $adminheight; ?>px;">134 <table width="<?php echo $adminwidth-15; ?>">92 <div id="ttstoreboxoptions" style="max-height:<?php echo esc_attr($adminheight); ?>px;"> 93 <table width="<?php echo esc_attr($adminwidth)-15; ?>"> 135 94 <tr> 136 95 <td> … … 156 115 if(!empty($Tradetracker_extra_val)){ 157 116 if(in_array($extraselect[extrafield], $Tradetracker_extra_val, true)) { 158 echo "<input type=\"checkbox\" checked=\"yes\" name=\"extra[]\" value=\"". $extraselect[extrafield]."\" />".$extraselect[extrafield]."<br />";117 echo "<input type=\"checkbox\" checked=\"yes\" name=\"extra[]\" value=\"".esc_attr($extraselect[extrafield])."\" />".esc_attr($extraselect[extrafield])."<br />"; 159 118 } else { 160 echo "<input type=\"checkbox\" name=\"extra[]\" value=\"". $extraselect[extrafield]."\" />".$extraselect[extrafield]."<br />";119 echo "<input type=\"checkbox\" name=\"extra[]\" value=\"".esc_attr($extraselect[extrafield])."\" />".esc_attr($extraselect[extrafield])."<br />"; 161 120 } 162 121 } else { 163 echo "<input type=\"checkbox\" name=\"extra[]\" value=\"". $extraselect[extrafield]."\" />".$extraselect[extrafield]."<br />";122 echo "<input type=\"checkbox\" name=\"extra[]\" value=\"".esc_attr($extraselect[extrafield])."\" />".esc_attr($extraselect[extrafield])."<br />"; 164 123 } 165 124 if($i=="1"){ … … 183 142 </td> 184 143 <td> 185 <input type="text" name="<?php echo $Tradetracker_xmlupdate_name; ?>" value="<?php if($Tradetracker_xmlupdate_val==""){ echo "00:00:00"; } else { echo $Tradetracker_xmlupdate_val;} ?>" size="20"> <?php _e('Time has to be in hh:mm:ss','tradetracker-store'); ?>144 <input type="text" name="<?php echo esc_attr($Tradetracker_xmlupdate_name); ?>" value="<?php if($Tradetracker_xmlupdate_val==""){ echo "00:00:00"; } else { echo esc_attr($Tradetracker_xmlupdate_val);} ?>" size="20"> <?php _e('Time has to be in hh:mm:ss','tradetracker-store'); ?> 186 145 </td> 187 146 </tr> … … 193 152 </td> 194 153 <td> 195 <input type="text" name="<?php echo $Tradetracker_xmlfeedsperupdate_name; ?>" value="<?php if($Tradetracker_xmlfeedsperupdate_val==""){ echo "0"; } else { echo $Tradetracker_xmlfeedsperupdate_val;} ?>" size="20"> <?php _e('0 if you want it to go through all feeds, else it will import x amount of feeds every 10 minutes till all feeds are imported','tradetracker-store'); ?>154 <input type="text" name="<?php echo esc_attr($Tradetracker_xmlfeedsperupdate_name); ?>" value="<?php if($Tradetracker_xmlfeedsperupdate_val==""){ echo "0"; } else { echo esc_attr($Tradetracker_xmlfeedsperupdate_val);} ?>" size="20"> <?php _e('0 if you want it to go through all feeds, else it will import x amount of feeds every 10 minutes till all feeds are imported','tradetracker-store'); ?> 196 155 </td> 197 156 </tr> … … 203 162 </td> 204 163 <td> 205 <input type="radio" name="<?php echo $Tradetracker_currency_name; ?>" <?php if($Tradetracker_currency_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store'); ?>164 <input type="radio" name="<?php echo esc_attr($Tradetracker_currency_name); ?>" <?php if($Tradetracker_currency_val==1) {echo "checked";} ?> value="1"> <?php _e('Yes','tradetracker-store'); ?> 206 165 <br> 207 <input type="radio" name="<?php echo $Tradetracker_currency_name; ?>" <?php if($Tradetracker_currency_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store'); ?>166 <input type="radio" name="<?php echo esc_attr($Tradetracker_currency_name); ?>" <?php if($Tradetracker_currency_val==0){echo "checked";} ?> value="0"> <?php _e('No','tradetracker-store'); ?> 208 167 </td> 209 168 </tr> … … 215 174 </td> 216 175 <td> 217 <input type="radio" name="<?php echo $Tradetracker_currencyloc_name; ?>" <?php if($Tradetracker_currencyloc_val==1) {echo "checked";} ?> value="1"> <?php _e('After the price','tradetracker-store'); ?>176 <input type="radio" name="<?php echo esc_attr($Tradetracker_currencyloc_name); ?>" <?php if($Tradetracker_currencyloc_val==1) {echo "checked";} ?> value="1"> <?php _e('After the price','tradetracker-store'); ?> 218 177 <br> 219 <input type="radio" name="<?php echo $Tradetracker_currencyloc_name; ?>" <?php if($Tradetracker_currencyloc_val==0){echo "checked";} ?> value="0"> <?php _e('Before the price','tradetracker-store'); ?>178 <input type="radio" name="<?php echo esc_attr($Tradetracker_currencyloc_name); ?>" <?php if($Tradetracker_currencyloc_val==0){echo "checked";} ?> value="0"> <?php _e('Before the price','tradetracker-store'); ?> 220 179 </td> 221 180 </tr> … … 252 211 <tr> 253 212 <td> 254 <input type="text" readonly="readonly" name="oldcur[<?php echo $i; ?>]" value="<?php echo $currency_val->currency; ?>">255 </td> 256 <td> 257 <input type="text" name="newcur[<?php echo $i; ?>]" value="<?php echo $array[$key]; ?>">213 <input type="text" readonly="readonly" name="oldcur[<?php echo esc_attr($i); ?>]" value="<?php echo esc_attr($currency_val->currency); ?>"> 214 </td> 215 <td> 216 <input type="text" name="newcur[<?php echo esc_attr($i); ?>]" value="<?php echo esc_attr($array[$key]); ?>"> 258 217 </td> 259 218 </tr> … … 268 227 <?php 269 228 if(isset($saved)){ 270 echo $saved;229 echo wp_kses_post($saved); 271 230 } 272 231 ?> -
tradetracker-store/trunk/readme.txt
r2554252 r2562230 5 5 Requires at least: 4 6 6 Tested up to: 5.7.2 7 Stable tag: 4.6. 597 Stable tag: 4.6.60 8 8 9 9 A plugin that lets you import an XML productfeed from TradeTracker. … … 42 42 43 43 == Changelog == 44 = 4.6.60 = 45 - Escaped all echo's of variables 46 44 47 = 4.6.59 = 45 48 - Rewrote the importer to fully rely on the download function within Wordpress instead of Curl -
tradetracker-store/trunk/tinymce/tinyTT.php
r2554244 r2562230 81 81 $storeoverview=$wpdb->get_results("SELECT id, multiname FROM ".$ttstoremultitable.""); 82 82 foreach ($storeoverview as $store_val){ 83 echo "<option value=\"". $store_val->id."\">".$store_val->multiname."</option>";83 echo "<option value=\"".esc_attr($store_val->id)."\">".esc_attr($store_val->multiname)."</option>"; 84 84 } 85 85 ?> -
tradetracker-store/trunk/upgrading.php
r2554244 r2562230 352 352 $file = $Tradetracker_xml_val; 353 353 foreach($file as $key => $value) { 354 echo "<tr><td>";355 354 if($key !=""){ 356 355 $wpdb->insert( -
tradetracker-store/trunk/widget/widget.php
r2554244 r2562230 61 61 foreach ($storeoverview as $store_val){ 62 62 if($instance['TT_number']==$store_val->id){ 63 echo "<option value=\"". $store_val->id."\" selected=\"selected\">".$store_val->multiname."</option>";63 echo "<option value=\"".esc_attr($store_val->id)."\" selected=\"selected\">".esc_attr($store_val->multiname)."</option>"; 64 64 } else { 65 echo "<option value=\"". $store_val->id."\">".$store_val->multiname."</option>";65 echo "<option value=\"".esc_attr($store_val->id)."\">".esc_attr($store_val->multiname)."</option>"; 66 66 } 67 67 }
Note: See TracChangeset
for help on using the changeset viewer.