Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SQL Remove


d4funky1

Recommended Posts

Hi,

 

How do you delete or remove an sql command that you receive with a contribution.

 

There are a few contributions that don't currently work and i am removing them step by step by following the install instructions backwards.

 

I am now at the part where you would install a SQL command via phpmyadmin and i am looking for the way that i would remove these commands?

 

I have tried changing INSERT INTO to DELETE FROM but i just keep getting an SQL error:

 

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(configuration_id, configuration_title, configuration_key, configuration_value, ' at line 1

 

Any ideas?

 

Many Thanks

D4

Link to comment
Share on other sites

Here it is:

 

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3205,'Product Information Image Width','PRODUCT_INFO_IMAGE_WIDTH','100','The pixel width of images shown on your product information page',4,100,NULL,'2005-01-06 20:24:30',NULL,'');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3206,'Product Information Image Height','PRODUCT_INFO_IMAGE_HEIGHT','0','The pixel height of images shown on your product information page',4,101,NULL,'2005-01-06 20:24:30',NULL,'');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3207,'Image Magic Master Switch','CFG_MASTER_SWITCH','On','Switch OSC Image Magic on or off',333,3,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'On\', \'Off\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3278,'Apply security features to registered customers','CFG_REGISTERED_WATERMARKS','Yes','If this option is set to no, all image security features will be disabled when a registered customer is browsing your site',333,4,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),');

INSERT INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) VALUES (333,'Image Magic','Configuration options for the OSC Image Magic contribution',4,1);

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3279,'Help support the OSC Image Magic Project','','Make a donation', CONCAT('Reward the author & support future releases. Please click the button below to make a donation<p><a href=\"http://www.celtware.com/im/donate.php?ref=',FLOOR(0 + (RAND(UNIX_TIMESTAMP()) * 9999999999999999)),'\"><img src=\"http://www.celtware.com/im/donate.php?ref=img',FLOOR(0 + (RAND(UNIX_TIMESTAMP()) * 9999999999999999)),'\" border=\"0\"></a>'),333,-1,'2005-10-03 03:08:38','1899-12-29','','tep_cfg_readonly(');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3208,'Process Store\'s Graphics','CFG_PROCESS_GRAPHICS','False','If this is set to true, ALL store graphics will be processed and cached, including buttons, clip art etc. The default, recommended setting for this is False',333,6,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3209,'Auto Clean Cache','CFG_CACHE_AUTO_CLEAN','True','If selected, the cache will automatically be cleared of un-needed items. Set to true if you want to sacrifice a small amount of performance for server disk space saving',333,9,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3210,'Encrypt Image Filenames','CFG_ENCRYPT_FILENAMES','False','If you select this option all of your filenames will be encrypted. This option will prevent visitors from discovering your image filenames. Use it in combination with image watermarking to prevent theft of your images.',333,12,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3211,'Filename Encryption Key','CFG_ENCRYPTION_KEY','changeme','If you have switched on image filename encryption, then enter a string here to be used as the encryption key',333,15,NULL,'2005-01-06 20:24:30',NULL,'');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3212,'Apply Internet Explorer PNG Transparency work-around?','CFG_PNG_BUG','False','This option will switch on a work-around so that PNG alpha transparency images will display correctly in Internet Explorer<br><b>Note:</b> Two files need to be modified to enable this - See readme.',333,18,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3213,'Use Resampling','CFG_USE_RESAMPLING','True','If selected, thumbnails will be resampled rather than resized. Resampling creates much higher quality thumbnails.',333,21,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3214,'Create Truecolour Thumbnails','CFG_CREATE_TRUECOLOR','True','Create True color Thumbnails? Better quality overall but set to false if you have GD version < 2.01 or if creating transparent thumbnails.',333,24,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3215,'Output GIFs as JPEGs','CFG_GIFS_AS_JPEGS','False','Set this option true if you have GD version > 1.6 and want to output GIFs as JPGs. Note that transparencies will not be retained (set matte colour below). If you have GD Library < 1.6 with GIF create support, GIFs will be output as GIFs.',333,27,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3220,'\'GIF as JPEG\' Matte colour (HEX)','CFG_MATTE_COLOR','FFFFFF','Enter the HEX colour value that transparent backgrounds will be converted to if GIFs output as JPGs',333,28,NULL,'2005-01-06 20:24:30',NULL,'');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3216,'Cache Thumbnails on the Server','CFG_TN_SERVER_CACHE','True','Set to true if you want to cache previously processed thumbnails on disk. This will add to disk space but will save your processor from having to create a new thumbnail for every visitor. (recommended)',333,30,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3219,'Cache Thumbnails in user\'s browser','CFG_TN_BROWSER_CACHE','True','Set to true if you want browsers to be able to cache viewed thumbnails in their own cache. This will save bandwidth for every visitor that views the same thumbnail again. (recommended)',333,31,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3217,'Thumbnail Cache directory','CFG_TN_CACHE_DIRECTORY','/thumbnails','Directory where cached thumbnails will be stored. <br><b>Note:</b> This directory should be automatically created, if not, do so manually and chmod it to 777',333,33,NULL,'2005-01-06 20:24:30',NULL,'');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3218,'Use 404 Response if image not found?','CFG_USE_404','True','If set to true a 404 (not found) response will be sent (broken image), otherwise a small error picture will be shown',333,36,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3221,'Allow thumbnails larger than original','CFG_ALLOW_LARGER','True','Set to true if you want to allow scaling UP of source image files.',333,45,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3271,'Center if thumbnail larger than original','CFG_CENTER_THUMB','False','If your source is smaller than the thumbnail, should it be centered on the larger thumbnail rather than resized?<br><b>Note:</b> \'Allow thumbnails larger than original\' (above) must be set to true',333,46,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3222,'JPEG Quality - Pop-up Images','POPUP_JPEG_QUALITY','100','The output quality of JPEG pop-up images.',333,48,NULL,'2005-01-06 20:24:30',NULL,NULL);

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3223,'JPEG Quality - Product Information Thumbnails','PRODUCT_JPEG_QUALITY','100','The output quality of JPEG thumbnails displayed on your product information page',333,51,NULL,'2005-01-06 20:24:30',NULL,NULL);

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3224,'JPEG Quality - Category Thumbnails','CATEGORY_JPEG_QUALITY','100','The output quality of category JPEG thumbnails',333,52,NULL,'2005-01-06 20:24:30',NULL,NULL);

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3265,'JPEG Quality - Heading Thumbnails','HEADING_JPEG_QUALITY','100','The output quality of heading JPEG thumbnails',333,53,NULL,'2005-01-06 20:24:30',NULL,NULL);

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3260,'JPEG Quality - Small Thumbnails','SMALL_JPEG_QUALITY','100','The output quality of your small sized JPEG thumbnails',333,55,NULL,'2005-01-06 20:24:30',NULL,NULL);

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3225,'Graphic Watermark in Pop-up Images','USE_WATERMARK_IMAGE_POPUP','No','Do you wish to use a watermark image in your pop-up product image?<br><b>Note:</b>Graphic Watermarks will NOT be added to GIF images',333,57,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3226,'Graphic Watermark in Product Information Thumbnails','USE_WATERMARK_IMAGE_PRODUCT','No','Do you wish to use a watermark image in your product information thumbnails?<br><b>Note:</b>Graphic Watermarks will NOT be added to GIF images',333,58,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3227,'Graphic Watermark in Category Thumbnails','USE_WATERMARK_IMAGE_CATEGORY','No','Do you wish to use a watermark image in your category thumbnails?<br><b>Note:</b>Graphic Watermarks will NOT be added to GIF images',333,59,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3266,'Graphic Watermark in Heading Thumbnails','USE_WATERMARK_IMAGE_HEADING','No','Do you wish to use a watermark image in your heading thumbnails?<br><b>Note:</b>Graphic Watermarks will NOT be added to GIF images',333,60,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3261,'Graphic Watermark in Small Thumbnails','USE_WATERMARK_IMAGE_SMALL','No','Do you wish to use a watermark image in your small thumbnails<br><b>Note:</b>Graphic Watermarks will NOT be added to GIF images?',333,61,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3228,'Watermark Image File','WATERMARK_IMAGE','','Select which watermark image you wish to use<br><br>New watermark images may be installed in your:<br><b>/catalog/includes/imagemagic/watermarks/</b><br>directory<br>',333,66,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_pull_down_installed_watermarks(');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3229,'Image Watermark Transparency','WATERMARK_IMAGE_OPACITY','20','Enter a value of 0 to 100 to set the opacity value of your watermark image (0=transparent, 100=opaque)',333,69,NULL,'2005-01-06 20:24:30',NULL,'');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3230,'Image Watermark Position','WATERMARK_IMAGE_POSITION','Top','Select where you would like your watermark image to be positioned on your thumbnail',333,71,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_pull_down_watermark_alignment(');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3231,'Image Watermark Margin','WATERMARK_IMAGE_MARGIN','0','Enter the offset in pixels where you would like your watermark image to be positioned',333,72,NULL,'2005-01-06 20:24:30',NULL,'');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3270,'Resize Watermark Image','CFG_RESIZE_WATERMARK','True','If selected, your watermark image will be resized in the same ratio as your source image, otherwise the watermark image will always be added full-sized',333,73,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3232,'Text Watermark in Pop-up Images','USE_WATERMARK_TEXT_POPUP','No','Do you wish to use watermark text in your pop-up product images?<br><b>Note:</b>Text Watermarks do not work well with GIF images',333,75,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3233,'Text Watermark in Product Information Thumbnails','USE_WATERMARK_TEXT_PRODUCT','No','Do you wish to use watermark text in your product information thumbnails?<br><b>Note:</b>Text Watermarks do not work well with GIF images',333,76,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3234,'Text Watermark in Category Thumbnails','USE_WATERMARK_TEXT_CATEGORY','No','Do you wish to use watermark text in your category thumbnails?<br><b>Note:</b>Text Watermarks do not work well with GIF images',333,77,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3267,'Text Watermark in Heading Thumbnails','USE_WATERMARK_TEXT_HEADING','No','Do you wish to use watermark text in your heading thumbnails?<br><b>Note:</b>Text Watermarks do not work well with GIF images',333,78,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3262,'Text Watermark in Small Thumbnails','USE_WATERMARK_TEXT_SMALL','No','Do you wish to use watermark text in your small thumbnails?<br><b>Note:</b>Text Watermarks do not work well with GIF images',333,79,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3235,'Watermark Text','WATERMARK_TEXT','Sample','Enter the text you wish to appear in your thumbnails as a watermark',333,84,NULL,'2005-01-06 20:24:30',NULL,'');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3236,'Text Watermark Font Name','WATERMARK_TEXT_FONT','arial.ttf','Select the font filename you wish to use for watermark text<br><br>New TTF fonts may be installed in your:<br><b>/catalog/includes/imagemagic/fonts/</b><br>directory<br>',333,87,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_pull_down_installed_fonts(');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3237,'Text Watermark Size','WATERMARK_TEXT_SIZE','10','Enter the font point size of your text watermark',333,90,NULL,'2005-01-06 20:24:30',NULL,'');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3238,'Text Watermark Colour (HEX)','WATERMARK_TEXT_COLOR','000000','Enter the hex value for the colour of your text watermark',333,93,NULL,'2005-01-06 20:24:30',NULL,'');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3239,'Text Watermark Transparency','WATERMARK_TEXT_OPACITY','20','Enter a value of 0 to 100 to set the transparency value of your watermark text (0=transparent, 100=opaque)',333,96,NULL,'2005-01-06 20:24:30',NULL,'');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3240,'Text Watermark Position','WATERMARK_TEXT_POSITION','Top','Select where you would like your watermark text to be positioned on your thumbnails',333,99,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_pull_down_watermark_alignment(');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3241,'Text Watermark Margin','WATERMARK_TEXT_MARGIN','0','Enter the offset in pixels where you would like your watermark text to be positioned',333,102,NULL,'2005-01-06 20:24:30',NULL,'');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3242,'Text Watermark Angle','WATERMARK_TEXT_ANGLE','0','Enter the counter-clockwise angle of the text watermark',333,105,NULL,'2005-01-06 20:24:30',NULL,'');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3243,'Auto Adjust Brightness','BRIGHTNESS_ADJUST','0','Enter an amount between -255 and 255 which your thumbnail brightness will be adjusted by<br><b>Note:</b> This will not work with GIF images',333,108,NULL,'2005-01-06 20:24:30',NULL,'');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3244,'Auto Adjust Contrast','CONTRAST_ADJUST','0','Enter an amount between -255 and 255 which your thumbnail contrast will be adjusted by<br><b>Note:</b> This will not work with GIF images',333,111,NULL,'2005-01-06 20:24:30',NULL,'');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3245,'Frame Pop-up Images','FRAME_POPUP','No','Do you want to include a frame around your pop-up product images?',333,114,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3246,'Frame Product Information Thumbnails','FRAME_PRODUCT','No','Do you want to include a frame around your product information thumbnails?',333,115,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3247,'Frame Category Thumbnails','FRAME_CATEGORY','No','Do you want to include a frame around your category thumbnails?',333,116,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3268,'Frame Heading Thumbnails','FRAME_HEADING','No','Do you want to include a frame around your heading thumbnails?',333,117,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3263,'Frame Small Thumbnails','FRAME_SMALL','No','Do you want to include a frame around your small thumbnails?',333,118,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3248,'Frame Width','FRAME_WIDTH','4','Enter the width in pixels of the thumbnail frame',333,120,NULL,'2005-01-06 20:24:30',NULL,'');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3249,'Frame Depth','FRAME_EDGE_WIDTH','4','Enter the 3D depth of the frame in pixels',333,123,NULL,'2005-01-06 20:24:30',NULL,'');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3250,'Frame Colour (HEX)','FRAME_COLOR','CCCCCC','Enter the HEX colour of the thumbnail frame',333,126,NULL,'2005-01-06 20:24:30',NULL,'');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3251,'Frame Inside 3D Highlight Colour (HEX)','FRAME_INSIDE_COLOR1','FFFFFF','Enter the colour (in hex) you wish the frame\'s inside higlight colour to be',333,129,NULL,'2005-01-06 20:24:30',NULL,'');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3252,'Frame Inside 3D Shadow Colour (HEX)','FRAME_INSIDE_COLOR2','000000','Enter the colour (in hex) you wish the frame\'s inside shadow colour to be',333,132,NULL,'2005-01-06 20:24:30',NULL,'');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3253,'Buttonize Pop-up Images','BEVEL_POPUP','No','Do you want to add a 3D button effect to your pop-up images?',333,133,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3254,'Buttonize Product Information Thumbnails','BEVEL_PRODUCT','No','Do you want to add a 3D button effect to your product information thumbnails?',333,134,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3255,'Buttonize Category Thumbnails','BEVEL_CATEGORY','No','Do you want to add a 3D button effect to your category thumbnails?',333,135,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3269,'Buttonize Heading Thumbnails','BEVEL_HEADING','No','Do you want to add a 3D button effect to your heading thumbnails?',333,136,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3264,'Buttonize Small Thumbnails','BEVEL_SMALL','No','Do you want to add a 3D button effect to your small thumbnails?',333,137,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3256,'Button Height','BEVEL_HEIGHT','4','Enter the height in pixels of the 3D button effect',333,144,NULL,'2005-01-06 20:24:30',NULL,'');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3257,'Button Highlight Colour (HEX)','BEVEL_HIGHLIGHT','CCCCCC','Enter the colour (in hex) you wish the button\'s higlight colour to be',333,147,NULL,'2005-01-06 20:24:30',NULL,'');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3258,'Button Shadow Colour (HEX)','BEVEL_SHADOW','000000','Enter the colour (in hex) you wish the button\'s shadow colour to be',333,150,NULL,'2005-01-06 20:24:30',NULL,'');

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3259,'Last Hash (System Use - Read Only)','LAST_HASH','','Stores the last hash value of the thumbnail configuration settings. This will allow the script to detect when they have changed and maintain the cache.',333,153,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_readonly(');

 

Thanks

D4

Link to comment
Share on other sites

okay,

 

I have used the code above and this seems to have removed the image magic from my admin panel, however, i am still receiving the following error message whenever i click on any of my admin panel options:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/configuration.php on line 62

 

Line 62 in this file states:

 

<td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

 

any ideas?

 

Many Thanks

D4

Link to comment
Share on other sites

Make sure you have tep_draw_separator() defined in admin/includes/fuctions/html_output.php:

 

////
// Output a separator either through whitespace, or with an image
 function tep_draw_separator($image = 'pixel_black.gif', $width = '100%', $height = '1') {
return tep_image(DIR_WS_IMAGES . $image, '', $width, $height);
 }

Contributions

 

Discount Coupon Codes

Donations

Link to comment
Share on other sites

okay,

 

starting at line 140 i have the following code:

 

////

// Output a separator either through whitespace, or with an image

function tep_draw_separator($image = 'pixel_black.gif', $width = '100%', $height = '1') {

return tep_image(DIR_WS_IMAGES . $image, '', $width, $height);

}

 

Am i blind or is this the same as you have pasted above?

 

where could this error be coming from?

 

Many Thanks

D4

Link to comment
Share on other sites

I've noticed that when i click on different sections of the admin panel, config, catalog, reports etc... it shows a different file name with a fatal error however on checking them out they are all along the lines of:

 

<td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

 

give or take some height and width dimensions.

 

There must be a common factor in all this but i wouldn't know where to start.

 

Many Thanks

D4

Link to comment
Share on other sites

Hi,

 

Okay i have been through each category and sub-category in the admin panel and below have listed all the errors for each.

 

Configuration:

 

All Sub Categories

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/configuration.php on line 62

 

Catalog:

 

Categories / Products:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/categories.php on line 739

 

Product Options:

 

Fatal error: Call to undefined function tep_black_line() in /catalog/admin/products_attributes.php on line 312

 

Manufacturers:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/manufacturers.php on line 130

 

Reviews:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/reviews.php on line 67

 

Specials:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/specials.php on line 121

 

Products Expected:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/products_expected.php on line 44

 

Modules:

 

Payment Modules:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/modules.php on line 96

 

Shipping Modules:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/modules.php on line 96

 

Order Total Modules:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/modules.php on line 96

 

Customers:

 

Customers:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/customers.php on line 698

 

Orders:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/orders.php on line 330

 

Locations / Taxes:

 

Countries:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/countries.php on line 77

 

Zones:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/zones.php on line 75

 

Tax Zones:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/geo_zones.php on line 140

 

Tax Classes:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/tax_classes.php on line 73

 

Tax Rates:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/tax_rates.php on line 79

 

Localization:

 

Currencies:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/currencies.php on line 140

 

Languages:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/languages.php on line 148

 

Orders Status:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/orders_status.php on line 120

 

Reports:

 

Best Viewed Products:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/stats_products_viewed.php on line 42

 

Best Products Purchased:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/stats_products_purchased.php on line 42

 

Best Customer Orders-Total:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/stats_customers.php on line 45

 

Tools:

 

Database Backup Manager:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/backup.php on line 337

 

Banner Manager:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/banner_manager.php on line 221

 

Cache Control:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/cache.php on line 59

 

Define Language:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/define_language.php on line 85

 

File Manager:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/file_manager.php on line 133

 

Google Position:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/google_position.php on line 191

 

Send Email To Customers:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/mail.php on line 85

 

Newsletter Manager:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/newsletters.php on line 127

 

Server Information:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/server_info.php on line 43

 

Who's Online:

 

Fatal error: Call to undefined function tep_draw_separator() in /catalog/admin/whos_online.php on line 50

 

I have picked out three at random and these are the errors on those lines:

 

admin/configuration.php line 62

 

			<td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

 

admin/countries.php line 77

 

			<td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

 

admin/whos_online.php line 50

 

			<td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

 

I have restored the original html_output.php file from my oscommerce download but can't seem to shift this error.

 

Many Thanks

D4

Link to comment
Share on other sites

Here it is:

 

<?php
/*
 $Id: html_output.php,v 1.29 2003/06/25 20:32:44 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

////
// The HTML href link wrapper function
 function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL') {
if ($page == '') {
  die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');
}
if ($connection == 'NONSSL') {
  $link = HTTP_SERVER . DIR_WS_ADMIN;
} elseif ($connection == 'SSL') {
  if (ENABLE_SSL == 'true') {
	$link = HTTPS_SERVER . DIR_WS_ADMIN;
  } else {
	$link = HTTP_SERVER . DIR_WS_ADMIN;
  }
} else {
  die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');
}
if ($parameters == '') {
  $link = $link . $page . '?' . SID;
} else {
  $link = $link . $page . '?' . $parameters . '&' . SID;
}

while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

return $link;
 }

 function tep_catalog_href_link($page = '', $parameters = '', $connection = 'NONSSL') {
if ($connection == 'NONSSL') {
  $link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;
} elseif ($connection == 'SSL') {
  if (ENABLE_SSL_CATALOG == 'true') {
	$link = HTTPS_CATALOG_SERVER . DIR_WS_CATALOG;
  } else {
	$link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;
  }
} else {
  die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');
}
if ($parameters == '') {
  $link .= $page;
} else {
  $link .= $page . '?' . $parameters;
}

while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

return $link;
 }

////
// The HTML image wrapper function
// BOF Image Magic 
function tep_image($src, $alt = '', $width = '', $height = '', $params = '') {  
 global $product_info;

 //Allow for a new intermediate sized thumbnail size to be set 
 //without any changes having to be made to the product_info page itself. 
 //(see the lengths I go to to make your life easier :-)
 if (strstr($_SERVER['PHP_SELF'],"product_info.php")) {

	if (isset($product_info['products_image']) 
			   && $src == DIR_WS_IMAGES . $product_info['products_image']
			   && $product_info[products_id]==$_GET['products_id'])  {   //final check just to make sure that we don't interfere with other contribs
		$width = PRODUCT_INFO_IMAGE_WIDTH == 0?'':PRODUCT_INFO_IMAGE_WIDTH;
		$height = PRODUCT_INFO_IMAGE_HEIGHT == 0?'':PRODUCT_INFO_IMAGE_HEIGHT;
		$product_info_image=true;
		$page="prod_info"; 
	}
 }

 //Detect whether this is a pop-up image
 if (strstr($_SERVER['PHP_SELF'],"popup_image.php")) $page="popup";

 //do we apply the IE PNG alpha transparency fix?
 if  (strstr(strtolower($src),".png") && CFG_PNG_BUG=="True") $fix_png = true;

 //send the image for processing unless told otherwise
 $image = '<img src="' . $src . '"'; //set up the image tag just in case we don't want to process
 if (CFG_MASTER_SWITCH=="On") $calculate = true;
 else $calculate=false;

 // Don't calculate if the image is set to a "%" width
 if (strstr($width,'%') == true || strstr($height,'%') == true) $calculate = false; 

 // Dont calculate if a pixel image is being passed (hope you dont have pixels for sale)
 if (strstr($image, 'pixel')) $calculate = false;


 $image_size = @getimagesize($src);


 // Decide whether or not we want to process this image
 if (($width == '' && $height == '' && $page != 'popup' ) || ($width == $image_size[0] && $height == $image_size[0] && $page != 'popup')) {  
	if (CFG_PROCESS_GRAPHICS=="False") $calculate = false; //looks like this is a store graphic rather than product image
 }	

 // Is this image good to go?
 if (CONFIG_CALCULATE_IMAGE_SIZE && $calculate) { 

 if ($image_size) { 

  $ratio = $image_size[1] / $image_size[0];

  // Set the width and height to the proper ratio
  if (!$width && $height) { 
	$ratio = $height / $image_size[1]; 
	$width = intval($image_size[0] * $ratio); 
  } elseif ($width && !$height) { 
	$ratio = $width / $image_size[0]; 
	$height = intval($image_size[1] * $ratio); 
  } elseif (!$width && !$height && !$over_ride) { 
	$width = $image_size[0]; 
	$height = $image_size[1]; 
  } 

  //Encrypt the image filename if switched on
	if (CFG_ENCRYPT_FILENAMES == "True" && CFG_ENCRYPTION_KEY !="") {
		  $result = '';
		  $key=CFG_ENCRYPTION_KEY;
		  for($i=0; $i<strlen($src); $i++) {
			  $char = substr($src, $i, 1);
			  $keychar = substr($key, ($i % strlen($key))-1, 1);
			  $char = chr(ord($char)+ord($keychar));
			  $result.=$char;
		  }
		  $src=urlencode(base64_encode($result));
	}

   //Return the html
	$image = '<img src="imagemagic.php?img='.$src.'&w='.
	tep_output_string($width).'&h='.tep_output_string($height).'&page='.$page.'"';

} elseif (IMAGE_REQUIRED == 'false') { 
  return false; 
} 
 }  

//If the size asked for is greater than the image itself, we check the configs to see if this is allowed and if not over-ride
 if ($width > $image_size[0] || $height > $image_size[1]) {
	if (CFG_ALLOW_LARGER  != 'True'){
		  $width=$image_size[0];
		  $height=$image_size[1];
		  $over_ride = true;
	}
 }
 // Add remaining image parameters if they exist
 if ($width) { 
$image .= ' width="' . tep_output_string($width) . '"'; 
 } 

 if ($height) { 
$image .= ' height="' . tep_output_string($height) . '"'; 
 }	 

 if (tep_not_null($params)) $image .= ' ' . $params;

 $image .= ' border="0" alt="' . tep_output_string($alt) . '"';

 if (tep_not_null($alt)) {
$image .= ' title="' . tep_output_string($alt) . '"';
 }

 if ($fix_png && CFG_MASTER_SWITCH=="On") {
	$image .= ' onload="fixPNG(this)"'; 
 }

 $image .= '>';   
 return $image; 
}
//EOF Image Magic

////
// javascript to dynamically update the states/provinces list when the country is changed
// TABLES: zones
 function tep_js_zone_list($country, $form, $field) {
$countries_query = tep_db_query("select distinct zone_country_id from " . TABLE_ZONES . " order by zone_country_id");
$num_country = 1;
$output_string = '';
while ($countries = tep_db_fetch_array($countries_query)) {
  if ($num_country == 1) {
	$output_string .= '  if (' . $country . ' == "' . $countries['zone_country_id'] . '") {' . "\n";
  } else {
	$output_string .= '  } else if (' . $country . ' == "' . $countries['zone_country_id'] . '") {' . "\n";
  }

  $states_query = tep_db_query("select zone_name, zone_id from " . TABLE_ZONES . " where zone_country_id = '" . $countries['zone_country_id'] . "' order by zone_name");

  $num_state = 1;
  while ($states = tep_db_fetch_array($states_query)) {
	if ($num_state == '1') $output_string .= '	' . $form . '.' . $field . '.options[0] = new Option("' . PLEASE_SELECT . '", "");' . "\n";
	$output_string .= '	' . $form . '.' . $field . '.options[' . $num_state . '] = new Option("' . $states['zone_name'] . '", "' . $states['zone_id'] . '");' . "\n";
	$num_state++;
  }
  $num_country++;
}
$output_string .= '  } else {' . "\n" .
				  '	' . $form . '.' . $field . '.options[0] = new Option("' . TYPE_BELOW . '", "");' . "\n" .
				  '  }' . "\n";

return $output_string;
 }

////
// Output a form
 function tep_draw_form($name, $action, $parameters = '', $method = 'post', $params = '') {
$form = '<form name="' . tep_output_string($name) . '" action="';
if (tep_not_null($parameters)) {
  $form .= tep_href_link($action, $parameters);
} else {
  $form .= tep_href_link($action);
}
$form .= '" method="' . tep_output_string($method) . '"';
if (tep_not_null($params)) {
  $form .= ' ' . $params;
}
$form .= '>';

return $form;
 }

////
// Output a form input field
 function tep_draw_input_field($name, $value = '', $parameters = '', $required = false, $type = 'text', $reinsert_value = true) {
$field = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';

if (isset($GLOBALS[$name]) && ($reinsert_value == true) && is_string($GLOBALS[$name])) {
  $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"';
} elseif (tep_not_null($value)) {
  $field .= ' value="' . tep_output_string($value) . '"';
}

if (tep_not_null($parameters)) $field .= ' ' . $parameters;

$field .= '>';

if ($required == true) $field .= TEXT_FIELD_REQUIRED;

return $field;
 }

////
// Output a form password field
 function tep_draw_password_field($name, $value = '', $required = false) {
$field = tep_draw_input_field($name, $value, 'maxlength="40"', $required, 'password', false);

return $field;
 }

////
// Output a form filefield
 function tep_draw_file_field($name, $required = false) {
$field = tep_draw_input_field($name, '', '', $required, 'file');

return $field;
 }

////
// Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field()
 function tep_draw_selection_field($name, $type, $value = '', $checked = false, $compare = '') {
$selection = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';

if (tep_not_null($value)) $selection .= ' value="' . tep_output_string($value) . '"';

if ( ($checked == true) || (isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && ($GLOBALS[$name] == 'on')) || (isset($value) && isset($GLOBALS[$name]) && (stripslashes($GLOBALS[$name]) == $value)) || (tep_not_null($value) && tep_not_null($compare) && ($value == $compare)) ) {
  $selection .= ' CHECKED';
}

$selection .= '>';

return $selection;
 }

////
// Output a form checkbox field
 function tep_draw_checkbox_field($name, $value = '', $checked = false, $compare = '') {
return tep_draw_selection_field($name, 'checkbox', $value, $checked, $compare);
 }

////
// Output a form radio field
 function tep_draw_radio_field($name, $value = '', $checked = false, $compare = '') {
return tep_draw_selection_field($name, 'radio', $value, $checked, $compare);
 }

////
// Output a form textarea field
 function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) {
$field = '<textarea name="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"';

if (tep_not_null($parameters)) $field .= ' ' . $parameters;

$field .= '>';

if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) {
  $field .= tep_output_string_protected(stripslashes($GLOBALS[$name]));
} elseif (tep_not_null($text)) {
  $field .= tep_output_string_protected($text);
}

$field .= '</textarea>';

return $field;
 }

////
// Output a form hidden field
 function tep_draw_hidden_field($name, $value = '', $parameters = '') {
$field = '<input type="hidden" name="' . tep_output_string($name) . '"';

if (tep_not_null($value)) {
  $field .= ' value="' . tep_output_string($value) . '"';
} elseif (isset($GLOBALS[$name]) && is_string($GLOBALS[$name])) {
  $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"';
}

if (tep_not_null($parameters)) $field .= ' ' . $parameters;

$field .= '>';

return $field;
 }

////
// Output a form pull down menu
 function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) {
$field = '<select name="' . tep_output_string($name) . '"';

if (tep_not_null($parameters)) $field .= ' ' . $parameters;

$field .= '>';

if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);

for ($i=0, $n=sizeof($values); $i<$n; $i++) {
  $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';
  if ($default == $values[$i]['id']) {
	$field .= ' SELECTED';
  }

  $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';
}
$field .= '</select>';

if ($required == true) $field .= TEXT_FIELD_REQUIRED;

return $field;
 }
?>

Link to comment
Share on other sites

!!!!!!FOOL FOOL FOOL!!!!!!!

 

I've sorted the problem

 

kgt - thanks for all your help.

 

I guess when you've been sat at your pc for a while looking at code you tend to miss the obvious.

 

Thanks again.

D4

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 years later...
!!!!!!FOOL FOOL FOOL!!!!!!!

 

I've sorted the problem

 

kgt - thanks for all your help.

 

I guess when you've been sat at your pc for a while looking at code you tend to miss the obvious.

 

Thanks again.

D4

 

D4 - How did you solve it? My right column is now in the center, also. I've checked everything that KGT suggested. Care to share? Guess this may be outdated - anyone have an answer? KGT? Jack?

 

Thanks! Michele

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...