Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

I am really frustrated and disappointed


mycreativewishes

Recommended Posts

I have created two posts. My last one was viewed 51 times and only one person ventured to offer any help. Is there anyone in this forum who knows what they are doing??? If so, please answer my questions below, work with me until I have fixed my problem, and make this discussion available for others who would like to accomplish the same thing I am doing.

 

Why not show off a little here???

 

I want to change the link to the footer of my site from osCommerce to my site you can view the store here:

 

https://srs41.hostproserver.com/~owgshopc/o...948ba478952159e

 

2.) Change or remove image links to header portion of site. Please see screenshot.

 

storethumb.jpg

 

Thanks

 

Joe

Link to comment
Share on other sites

What does this have to do with a payment module? If you posted your last one here it's no wonder no one helped you. But I agree with you and feel your pain. This forum isn't really all that up to par.

 

1.) Are you just wanting to remove that credit card logo? If so then go into your index.php

 

Find:

 

 <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

 

Replace with:

 

 <td class="pageHeading" align="right"><?php // echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

 

2.) Did you use the banner manager for that banner in your footer or is it hard coded in your includes/footer.php If it is hard coded please post your footer.php

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

What does this have to do with a payment module? If you posted your last one here it's no wonder no one helped you. But I agree with you and feel your pain. This forum isn't really all that up to par.

 

I think this comment is entirely wrong. There is tons of support here given freely.

 

Many many people who have no knowledge of coding manage to successfully run shops because the people here who can code give their time freely.

 

The answer in my opinion is if you don't like the freely given advice, or don't feel that the advice is forthcoming with suitable speed then it's simple. Pay for it.

 

Some companies are paying £1000s per month to have a working shop and the related support.

 

It really gets to me when people complain about the product/support here

 

IT'S FREE! .. FEEL LUCKY BECAUSE YOU ARE!

Edited by Babygurgles
Link to comment
Share on other sites

This forum isn't really up to par? Are you kidding?

 

One of the best forums on the internet, not to mention the BEST forum for anything dealing with osCommerce.

 

Perhaps the reasons that you don't get responses as fast and in the quantities you'd like is because your questions can be easily found in the documentation and knowledge base. People get tired of answering the same questions and answers that are already there if people would take the time to read and search for them.

 

:'(

Link to comment
Share on other sites

Joe

I haven't got that far with my website yet, however this is what I discovered which might be of help or at least point you (or others) in the right direction to fix your footer banner re-directing to osCommerce.

 

1. I opened your website in a new window

2. I pointed the mouse on the footer image and can immediately see that the file redirect.php is called with the "action=banner".

3. I opened redirect.php file and can see that a SQL query is built to select retrieve the banner URL from the Database:

select banners_url

from " . TABLE_BANNERS . "

where banners_id = ...

 

4. I also viewed the page source and I can clearly see that your gif image is called oscommerce.gif

 

<td align="center"><a href="https://srs41.hostproserver.com/~owgshopc/osCommerce/catalog/redirect.php?action=banner&goto=1&osCsid=076d6ad6916d84847948ba478952159e" target="_blank"><img src="images/banners/oscommerce.gif" border="0" alt="osCommerce" title=" osCommerce " width="499" height="106"></a></td>

 

The fix: You need to locate that Banners table in the Database somehow and modify the url entry to point to your website. This should do the trick. Not sure if the admin section has a facility that will allow you to that BUT hopefully some admin expert out there might help.

 

Good luck,

Chris

Link to comment
Share on other sites

You guys are quoting me but I am here offering help. It is true though, this site is not up to par compared to a year ago. Their is more people asking questions then offering support and more and more questions are going unanswered which makes the search function pointless because you do a search and all you find about 60-70% of the time is abandoned threads with no resolve. If you actually pay attention you will noticed it is the same questions getting asked over and over again. It's those post that get anwsered because everyone knows the answer to them because they are posted over and over again. I mean any newbie can pick up on that after being on the boards for 2 weeks.

 

I think this comment is entirely wrong. There is tons of support here given freely.

 

If you actually pay attention you will noticed it is the same questions getting asked over and over again. It's those post that get anwsered because everyone knows the answer to them because they are posted over and over again. I mean any newbie can pick up on that after being on the boards for 2 weeks. They are all questions that could be found in the Knowledge Base or actually could be resolved through search. You might think their is ton of support given here freely but the quality of it is not like it use to be.

 

The answer in my opinion is if you don't like the freely given advice, or don't feel that the advice is forthcoming with suitable speed then it's simple. Pay for it.

 

You going to loan people that have a problem with the free support here money? Don't you think if they had the money to spend that would be an option.

 

It really gets to me when people complain about the product/support here

 

Truth hurts sorry, I don't know why you take it to heart so muchs. Besides it's not like I see you all that active helping people. Every time I see your posts it is normally thread jacking and arguing with someone about something petty like you did with this thread. I don't how your comments contributed to the question being asked.

 

Perhaps the reasons that you don't get responses as fast and in the quantities you'd like is because your questions can be easily found in the documentation and knowledge base.

 

Or because their is not as many knowledgeable people here as their use to be that can answer more complicated OSC coding questions and trouble shooting.

 

People get tired of answering the same questions and answers that are already there if people would take the time to read and search for them.

 

Like I said previously give a newbie 2 weeks and they can figure it out the the same questions are getting asked over and over. You haven't been here all that long and you have noticed that. So if the same questions are getting asked over and over again and most of them are going unanswered then wouldn't you agree that would make the search function of the forum pointless since it will return unresolved threads? Which makes the only questions people can answer are the ones that are being asked over and over again because they are being asked over and over again.

 

This forum isn't the same as it used to be plain and simple.

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

The fix: You need to locate that Banners table in the Database somehow and modify the url entry to point to your website. This should do the trick. Not sure if the admin section has a facility that will allow you to that BUT hopefully some admin expert out there might help.

 

I wasn't sure if they used the banner manager or hard coded the banner in the footer. Since it is being used with the banner manager this is a easy fix.

 

This is what you do....

 

Go to your OSC Admin

 

Select Tools

 

Then select banner manger

 

Click the banner you want to edit and then select edit.

 

Then just change the Banner URL: to yours and you are set.

 

Then click update and your are set.

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

I have already answered the question related to the banner in another support tread, have a look....

 

 

Re-posting and bumping are actions which are parts of the problems in getting relevant search results.

Link to comment
Share on other sites

This forum isn't really all that up to par.

 

 

That is simply not true. I have always received prompt excellent help any time I need it.

 

If the question has been searched for first, asked politely and clearly then there is never an issue.

 

Perhaps "Is there anyone in this forum who knows what they are doing???" is an example of how not to get help?

Link to comment
Share on other sites

asked politely and clearly then there is never an issue.

 

That is not true because this forum lacks quality OSC coders. I am not saying their is not people here that don't know OSC and it's framework, just saying their is not enough of them here offering support. You have only been here a year so you have not seen how much this forum has changed over the years. You have also not asked that complicated of questions. You asked a more complicated question that doesn't involve how to change my logo, or text in the next page etc, etc. then you will find your posts going unanswered.

 

I spent two months waiting for an answering to a problem and it was before I started actively donating my time offering help in hopes it would help me with my problem. It had more then enough information. It had a highly detailed description of my problem, I listed code, and screen shots. It has been 3 months and still no solution because no one knows how to fix it because their are more people here looking for help then offering and the ones that are offering help can only anwser the questions they have seen the anwser to over and over again.

 

So compared to a couple of years ago this forum is not up to par as it use to be. I actively donate my time and I see this.

 

Perhaps "Is there anyone in this forum who knows what they are doing???" is an example of how not to get help?

 

Seems to have worked, don't ya think?

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

That is simply not true. I have always received prompt excellent help any time I need it.

 

If the question has been searched for first, asked politely and clearly then there is never an issue.

 

Perhaps "Is there anyone in this forum who knows what they are doing???" is an example of how not to get help?

 

You said it...

 

If the question has been searched for first

 

Most of the time problems are not searched for and people like myself get fed up of looking at the same questions time and time again. But then that may be a side affect of a successful forum??

Regards

 

Mark A Reynolds

Link to comment
Share on other sites

people like myself get fed up of looking at the same questions time and time again.

 

Amen......

 

 

So would you agree if people see the same thing over and over again then the only questions that get anwsered are the ones that people know the anwser to because it has been seen over and over again.

 

If you only have a handful of knowledgeable people that know how OSC work beyond these easy questions being asked and they don't offer support that often then how is the community as a whole going to become more knowledgeable and able to pass this on? It seems this forum is stuck in an endless circle that isn't expanding as far as knowledgeable members.

 

Like I said, I have said before and I will say it again and you can give me hell all you want. I blame the moderators of this forum for at least not showing their face every once in a while to help with the harder framework questions. They use to be very active but you never see them anymore and when they were here they were very helpful. Now everyones fate relies on the help of someone else and if they don't know how to help you then you are screwed. I would be more tempted to become a community sponsor if they offered a little more support for their product. Yes I know the argument will come out, "They gave you a free cart solution" but what good is that if you don't have any support to help with any issues you might have a long the way.

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

Amen......

So would you agree if people see the same thing over and over again then the only questions that get anwsered are the ones that people know the anwser to because it has been seen over and over again.

 

If you only have a handful of knowledgeable people that know how OSC work beyond these easy questions being asked and they don't offer support that often then how is the community as a whole going to become more knowledgeable and able to pass this on? It seems this forum is stuck in an endless circle that isn't expanding as far as knowledgeable members.

 

Like I said, I have said before and I will say it again and you can give me hell all you want. I blame the moderators of this forum for at least not showing their face every once in a while to help with the harder framework questions. They use to be very active but you never see them anymore and when they were here they were very helpful. Now everyones fate relies on the help of someone else and if they don't know how to help you then you are screwed. I would be more tempted to become a community sponsor if they offered a little more support for their product. Yes I know the argument will come out, "They gave you a free cart solution" but what good is that if you don't have any support to help with any issues you might have a long the way.

 

I am not so into long answers but i will say this

 

I have a search page that i once had in my signature saying "Search OSC Forums" and it got removed - Since that day I very rarely come on here. I have in the past asked to be included as a community sponsor and to this day I have had no replies...maybe they don't need the money ;)

 

I thought I would have the search link as they have restricted the search on this forum and mine is much easier to use

Regards

 

Mark A Reynolds

Link to comment
Share on other sites

What does this have to do with a payment module? If you posted your last one here it's no wonder no one helped you. But I agree with you and feel your pain. This forum isn't really all that up to par.

 

1.) Are you just wanting to remove that credit card logo? If so then go into your index.php

 

Find:

 

 <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

 

Replace with:

 

 <td class="pageHeading" align="right"><?php // echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

 

2.) Did you use the banner manager for that banner in your footer or is it hard coded in your includes/footer.php If it is hard coded please post your footer.php

 

Thanks for your reply. I don't know how to post a new topic straight out. Maybe I am overlooking how to do that.

 

The credit card image at the top right I have figured out over much searching of the different php pages.

 

The banner I created is simply the osCommerce.gif. I created another .gif and named it the same thing to replace the default osCommerce banner at the bottom. Being the case, I could not change the link. I have looked in the footer for the hyperlink, the banner manager, configuration, almost every source code I could find. I looked under includes folder, the admin folder, etc.

 

If you know where that hyperlink is please direct me specifically to it. Right now I am at a loss.

 

Thanks

 

PS. I have a 2002 Silverado, step-side, 4.3 liter. I love it. I've put over 50,000 miles on it and it still runs good.

 

Joe

Link to comment
Share on other sites

The banner I created is simply the osCommerce.gif. I created another .gif and named it the same thing to replace the default osCommerce banner at the bottom. Being the case, I could not change the link. I have looked in the footer for the hyperlink, the banner manager, configuration, almost every source code I could find. I looked under includes folder, the admin folder, etc.

 

If you know where that hyperlink is please direct me specifically to it. Right now I am at a loss.

 

If I am understanding your question....

 

You have replaced the Oscommerce banner with your own image and you want to change the hyperlink?

 

If so then it is in admin in the banner manager. Just change the banner URL.

Link to comment
Share on other sites

Not to be a stick in the mud, but because you post in the wrong section is the reason why your post went unanswered.

 

Second, removing the link to osCommerce actually violates the terms and agreement of osC and GNL or whatever it is called, and once removed you will not be given any support until it is put back on.

 

If you want to change the look and feel of your store with little headaches and have it the way you really want it i would suggest you download the STS contrib.

 

As to the side topic that is going on, there are less ppl who are willing to help others who need the help then what there use to be.

 

There are some members who feel that becasue the person does not know PHP its their fault and wont lift a finger.

 

While there has been others who when they get the chance do offer their support and help when they can.

 

What some of you must realize, is this site has thousands if not millions of ppl registered here, and then you have thousands of posts being posted, and while some may be repeated questions, you have to realize not everyone understands exactly what is going on.

 

For instance when I first joined here, I have read all the documentation on how to change the layout of osC, and design basics, but it left me clueless, so i posted. Even commented in my post that I read the osC manual and all the stuff online and am still lost.

 

I got a snippy response back from a regular member oh it is easy and then refered me back to the design Basics thread, which was not any help for me to begin with.

 

People have to remember that there is a lot of ppl who needs put in laymen terms and or spelled out, just refering to a post or giving a quick answer does not always help.

 

And for the record, things have been on a decline in knowledgeable ppl here, heck I would easily bet that half if not more than half of the contributions here there is no support for as their creators have gone on to something else. which is understandable, but that is also a reason why post go unanswered.

Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

Link to comment
Share on other sites

Not to be a stick in the mud, but because you post in the wrong section is the reason why your post went unanswered.

 

Second, removing the link to osCommerce actually violates the terms and agreement of osC and GNL or whatever it is called, and once removed you will not be given any support until it is put back on.

 

If you want to change the look and feel of your store with little headaches and have it the way you really want it i would suggest you download the STS contrib.

 

As to the side topic that is going on, there are less ppl who are willing to help others who need the help then what there use to be.

 

There are some members who feel that becasue the person does not know PHP its their fault and wont lift a finger.

 

While there has been others who when they get the chance do offer their support and help when they can.

 

What some of you must realize, is this site has thousands if not millions of ppl registered here, and then you have thousands of posts being posted, and while some may be repeated questions, you have to realize not everyone understands exactly what is going on.

 

For instance when I first joined here, I have read all the documentation on how to change the layout of osC, and design basics, but it left me clueless, so i posted. Even commented in my post that I read the osC manual and all the stuff online and am still lost.

 

I got a snippy response back from a regular member oh it is easy and then refered me back to the design Basics thread, which was not any help for me to begin with.

 

People have to remember that there is a lot of ppl who needs put in laymen terms and or spelled out, just refering to a post or giving a quick answer does not always help.

 

And for the record, things have been on a decline in knowledgeable ppl here, heck I would easily bet that half if not more than half of the contributions here there is no support for as their creators have gone on to something else. which is understandable, but that is also a reason why post go unanswered.

 

Thanks for the reply. I have noticed that there are a lot of people who aren't knowledgeable in php. However, we can all learn as we go. I am also just learning html. Some things are simple, others aren't. It takes time and the other who do know the codes, didn't learn it overnight and should remember where they came from. They needed help at that time to learn as well.

 

Anyway....with people like us, and posts like this, others who need help will be able to it. If we don't know, as we get time, we can help them find out.

 

I have sent a message to all team members about my problems and requested help. Got no response from any of them. The only help I have received in the recent past was through bluenoteweb.com. Chris Dunning is a team member. He helped me overcome some of the errors with installing the viakix module.

 

Thanks for making me aware of the user agreement. I don't think I saw that part. However, because I have searched for that hyperlink for about one month now, could you at least show me where it is at? At least it will satisfy my curiosity.

 

Thanks

 

Joe

Link to comment
Share on other sites

:( I tried to answer above but you ignored me.

 

What he is talking about now is the documentation stating that removing the "powered by oscommerce" will viod his version and basically he will not get any support.

 

He did not ignore your post.

Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

Link to comment
Share on other sites

LOL... yeah that was an easy one, I just went through all 118 pages of the manual and was readinng through post and the license that came with osC.

 

Well it looks like your fine, you can leave off the "powered by oscommerce"

 

It is entirely within your right however to add to the copyright notice to claim rights on the changes you have made.

 

The osCommerce copyright announcement displayed on the Catalog side of osCommerce Online Merchant can, however, be modified, and even be removed.

 

Please note that the osCommerce Online Merchant Administration Tool copyright announcement must still exist regardless if the default osCommerce-copyrighted Administration Tool theme has been modified.

 

The separate text "Powered by osCommerce", or similar text, displayed on both Administration Tool and Catalog modules is optional to have displayed.

Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

Link to comment
Share on other sites

:( I tried to answer above but you ignored me.

 

 

I didn't mean to ignore you. Just didn't see your reply.

 

I have looked in the banner manager and can't seem to find the url. Below is the code I have for that source. Please direct me as to where to find the url there.

 

Thanks

 

<?php

/*

$Id: banner_manager.php,v 1.73 2003/06/29 22:50:51 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

 

$banner_extension = tep_banner_image_extension();

 

if (tep_not_null($action)) {

switch ($action) {

case 'setflag':

if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) {

tep_set_banner_status($HTTP_GET_VARS['bID'], $HTTP_GET_VARS['flag']);

 

$messageStack->add_session(SUCCESS_BANNER_STATUS_UPDATED, 'success');

} else {

$messageStack->add_session(ERROR_UNKNOWN_STATUS_FLAG, 'error');

}

 

tep_redirect(tep_href_link(FILENAME_BANNER_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $HTTP_GET_VARS['bID']));

break;

case 'insert':

case 'update':

if (isset($HTTP_POST_VARS['banners_id'])) $banners_id = tep_db_prepare_input($HTTP_POST_VARS['banners_id']);

$banners_title = tep_db_prepare_input($HTTP_POST_VARS['banners_title']);

$banners_url = tep_db_prepare_input($HTTP_POST_VARS['banners_url']);

$new_banners_group = tep_db_prepare_input($HTTP_POST_VARS['new_banners_group']);

$banners_group = (empty($new_banners_group)) ? tep_db_prepare_input($HTTP_POST_VARS['banners_group']) : $new_banners_group;

$banners_html_text = tep_db_prepare_input($HTTP_POST_VARS['banners_html_text']);

$banners_image_local = tep_db_prepare_input($HTTP_POST_VARS['banners_image_local']);

$banners_image_target = tep_db_prepare_input($HTTP_POST_VARS['banners_image_target']);

$db_image_location = '';

$expires_date = tep_db_prepare_input($HTTP_POST_VARS['expires_date']);

$expires_impressions = tep_db_prepare_input($HTTP_POST_VARS['expires_impressions']);

$date_scheduled = tep_db_prepare_input($HTTP_POST_VARS['date_scheduled']);

 

$banner_error = false;

if (empty($banners_title)) {

$messageStack->add(ERROR_BANNER_TITLE_REQUIRED, 'error');

$banner_error = true;

}

 

if (empty($banners_group)) {

$messageStack->add(ERROR_BANNER_GROUP_REQUIRED, 'error');

$banner_error = true;

}

 

if (empty($banners_html_text)) {

if (empty($banners_image_local)) {

$banners_image = new upload('banners_image');

$banners_image->set_destination(DIR_FS_CATALOG_IMAGES . $banners_image_target);

if ( ($banners_image->parse() == false) || ($banners_image->save() == false) ) {

$banner_error = true;

}

}

}

 

if ($banner_error == false) {

$db_image_location = (tep_not_null($banners_image_local)) ? $banners_image_local : $banners_image_target . $banners_image->filename;

$sql_data_array = array('banners_title' => $banners_title,

'banners_url' => $banners_url,

'banners_image' => $db_image_location,

'banners_group' => $banners_group,

'banners_html_text' => $banners_html_text);

 

if ($action == 'insert') {

$insert_sql_data = array('date_added' => 'now()',

'status' => '1');

 

$sql_data_array = array_merge($sql_data_array, $insert_sql_data);

 

tep_db_perform(TABLE_BANNERS, $sql_data_array);

 

$banners_id = tep_db_insert_id();

 

$messageStack->add_session(SUCCESS_BANNER_INSERTED, 'success');

} elseif ($action == 'update') {

tep_db_perform(TABLE_BANNERS, $sql_data_array, 'update', "banners_id = '" . (int)$banners_id . "'");

 

$messageStack->add_session(SUCCESS_BANNER_UPDATED, 'success');

}

 

if (tep_not_null($expires_date)) {

list($day, $month, $year) = explode('/', $expires_date);

 

$expires_date = $year .

((strlen($month) == 1) ? '0' . $month : $month) .

((strlen($day) == 1) ? '0' . $day : $day);

 

tep_db_query("update " . TABLE_BANNERS . " set expires_date = '" . tep_db_input($expires_date) . "', expires_impressions = null where banners_id = '" . (int)$banners_id . "'");

} elseif (tep_not_null($expires_impressions)) {

tep_db_query("update " . TABLE_BANNERS . " set expires_impressions = '" . tep_db_input($expires_impressions) . "', expires_date = null where banners_id = '" . (int)$banners_id . "'");

}

 

if (tep_not_null($date_scheduled)) {

list($day, $month, $year) = explode('/', $date_scheduled);

 

$date_scheduled = $year .

((strlen($month) == 1) ? '0' . $month : $month) .

((strlen($day) == 1) ? '0' . $day : $day);

 

tep_db_query("update " . TABLE_BANNERS . " set status = '0', date_scheduled = '" . tep_db_input($date_scheduled) . "' where banners_id = '" . (int)$banners_id . "'");

}

 

tep_redirect(tep_href_link(FILENAME_BANNER_MANAGER, (isset($HTTP_GET_VARS['page']) ? 'page=' . $HTTP_GET_VARS['page'] . '&' : '') . 'bID=' . $banners_id));

} else {

$action = 'new';

}

break;

case 'deleteconfirm':

$banners_id = tep_db_prepare_input($HTTP_GET_VARS['bID']);

 

if (isset($HTTP_POST_VARS['delete_image']) && ($HTTP_POST_VARS['delete_image'] == 'on')) {

$banner_query = tep_db_query("select banners_image from " . TABLE_BANNERS . " where banners_id = '" . (int)$banners_id . "'");

$banner = tep_db_fetch_array($banner_query);

 

if (is_file(DIR_FS_CATALOG_IMAGES . $banner['banners_image'])) {

if (is_writeable(DIR_FS_CATALOG_IMAGES . $banner['banners_image'])) {

unlink(DIR_FS_CATALOG_IMAGES . $banner['banners_image']);

} else {

$messageStack->add_session(ERROR_IMAGE_IS_NOT_WRITEABLE, 'error');

}

} else {

$messageStack->add_session(ERROR_IMAGE_DOES_NOT_EXIST, 'error');

}

}

 

tep_db_query("delete from " . TABLE_BANNERS . " where banners_id = '" . (int)$banners_id . "'");

tep_db_query("delete from " . TABLE_BANNERS_HISTORY . " where banners_id = '" . (int)$banners_id . "'");

 

if (function_exists('imagecreate') && tep_not_null($banner_extensio)) {

if (is_file(DIR_WS_IMAGES . 'graphs/banner_infobox-' . $banners_id . '.' . $banner_extension)) {

if (is_writeable(DIR_WS_IMAGES . 'graphs/banner_infobox-' . $banners_id . '.' . $banner_extension)) {

unlink(DIR_WS_IMAGES . 'graphs/banner_infobox-' . $banners_id . '.' . $banner_extension);

}

}

 

if (is_file(DIR_WS_IMAGES . 'graphs/banner_yearly-' . $banners_id . '.' . $banner_extension)) {

if (is_writeable(DIR_WS_IMAGES . 'graphs/banner_yearly-' . $banners_id . '.' . $banner_extension)) {

unlink(DIR_WS_IMAGES . 'graphs/banner_yearly-' . $banners_id . '.' . $banner_extension);

}

}

 

if (is_file(DIR_WS_IMAGES . 'graphs/banner_monthly-' . $banners_id . '.' . $banner_extension)) {

if (is_writeable(DIR_WS_IMAGES . 'graphs/banner_monthly-' . $banners_id . '.' . $banner_extension)) {

unlink(DIR_WS_IMAGES . 'graphs/banner_monthly-' . $banners_id . '.' . $banner_extension);

}

}

 

if (is_file(DIR_WS_IMAGES . 'graphs/banner_daily-' . $banners_id . '.' . $banner_extension)) {

if (is_writeable(DIR_WS_IMAGES . 'graphs/banner_daily-' . $banners_id . '.' . $banner_extension)) {

unlink(DIR_WS_IMAGES . 'graphs/banner_daily-' . $banners_id . '.' . $banner_extension);

}

}

}

 

$messageStack->add_session(SUCCESS_BANNER_REMOVED, 'success');

 

tep_redirect(tep_href_link(FILENAME_BANNER_MANAGER, 'page=' . $HTTP_GET_VARS['page']));

break;

}

}

 

// check if the graphs directory exists

$dir_ok = false;

if (function_exists('imagecreate') && tep_not_null($banner_extension)) {

if (is_dir(DIR_WS_IMAGES . 'graphs')) {

if (is_writeable(DIR_WS_IMAGES . 'graphs')) {

$dir_ok = true;

} else {

$messageStack->add(ERROR_GRAPHS_DIRECTORY_NOT_WRITEABLE, 'error');

}

} else {

$messageStack->add(ERROR_GRAPHS_DIRECTORY_DOES_NOT_EXIST, 'error');

}

}

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">

<script language="javascript" src="includes/general.js"></script>

<script language="javascript"><!--

function popupImageWindow(url) {

window.open(url,'popupImageWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res

izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le

ft=150')

}

//--></script>

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">

<div id="spiffycalendar" class="text"></div>

<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

 

<!-- body //-->

<table border="0" width="100%" cellspacing="2" cellpadding="2">

<tr>

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">

<!-- left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

<!-- left_navigation_eof //-->

</table></td>

<!-- body_text //-->

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

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

</tr>

</table></td>

</tr>

<?php

if ($action == 'new') {

$form_action = 'insert';

 

$parameters = array('expires_date' => '',

'date_scheduled' => '',

'banners_title' => '',

'banners_url' => '',

'banners_group' => '',

'banners_image' => '',

'banners_html_text' => '',

'expires_impressions' => '');

 

$bInfo = new objectInfo($parameters);

 

if (isset($HTTP_GET_VARS['bID'])) {

$form_action = 'update';

 

$bID = tep_db_prepare_input($HTTP_GET_VARS['bID']);

 

$banner_query = tep_db_query("select banners_title, banners_url, banners_image, banners_group, banners_html_text, status, date_format(date_scheduled, '%d/%m/%Y') as date_scheduled, date_format(expires_date, '%d/%m/%Y') as expires_date, expires_impressions, date_status_change from " . TABLE_BANNERS . " where banners_id = '" . (int)$bID . "'");

$banner = tep_db_fetch_array($banner_query);

 

$bInfo->objectInfo($banner);

} elseif (tep_not_null($HTTP_POST_VARS)) {

$bInfo->objectInfo($HTTP_POST_VARS);

}

 

$groups_array = array();

$groups_query = tep_db_query("select distinct banners_group from " . TABLE_BANNERS . " order by banners_group");

while ($groups = tep_db_fetch_array($groups_query)) {

$groups_array[] = array('id' => $groups['banners_group'], 'text' => $groups['banners_group']);

}

?>

<link rel="stylesheet" type="text/css" href="includes/javascript/spiffyCal/spiffyCal_v2_1.css">

<script language="JavaScript" src="includes/javascript/spiffyCal/spiffyCal_v2_1.js"></script>

<script language="javascript">

var dateExpires = new ctlSpiffyCalendarBox("dateExpires", "new_banner", "expires_date","btnDate1","<?php echo $bInfo->expires_date; ?>",scBTNMODE_CUSTOMBLUE);

var dateScheduled = new ctlSpiffyCalendarBox("dateScheduled", "new_banner", "date_scheduled","btnDate2","<?php echo $bInfo->date_scheduled; ?>",scBTNMODE_CUSTOMBLUE);

</script>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr><?php echo tep_draw_form('new_banner', FILENAME_BANNER_MANAGER, (isset($HTTP_GET_VARS['page']) ? 'page=' . $HTTP_GET_VARS['page'] . '&' : '') . 'action=' . $form_action, 'post', 'enctype="multipart/form-data"'); if ($form_action == 'update') echo tep_draw_hidden_field('banners_id', $bID); ?>

<td><table border="0" cellspacing="0" cellpadding="2">

<tr>

<td class="main"><?php echo TEXT_BANNERS_TITLE; ?></td>

<td class="main"><?php echo tep_draw_input_field('banners_title', $bInfo->banners_title, '', true); ?></td>

</tr>

<tr>

<td class="main"><?php echo TEXT_BANNERS_URL; ?></td>

<td class="main"><?php echo tep_draw_input_field('banners_url', $bInfo->banners_url); ?></td>

</tr>

<tr>

<td class="main" valign="top"><?php echo TEXT_BANNERS_GROUP; ?></td>

<td class="main"><?php echo tep_draw_pull_down_menu('banners_group', $groups_array, $bInfo->banners_group) . TEXT_BANNERS_NEW_GROUP . '<br>' . tep_draw_input_field('new_banners_group', '', '', ((sizeof($groups_array) > 0) ? false : true)); ?></td>

</tr>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td class="main" valign="top"><?php echo TEXT_BANNERS_IMAGE; ?></td>

<td class="main"><?php echo tep_draw_file_field('banners_image') . ' ' . TEXT_BANNERS_IMAGE_LOCAL . '<br>' . DIR_FS_CATALOG_IMAGES . tep_draw_input_field('banners_image_local', (isset($bInfo->banners_image) ? $bInfo->banners_image : '')); ?></td>

</tr>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td class="main"><?php echo TEXT_BANNERS_IMAGE_TARGET; ?></td>

<td class="main"><?php echo DIR_FS_CATALOG_IMAGES . tep_draw_input_field('banners_image_target'); ?></td>

</tr>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td valign="top" class="main"><?php echo TEXT_BANNERS_HTML_TEXT; ?></td>

<td class="main"><?php echo tep_draw_textarea_field('banners_html_text', 'soft', '60', '5', $bInfo->banners_html_text); ?></td>

</tr>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td class="main"><?php echo TEXT_BANNERS_SCHEDULED_AT; ?><br><small>(dd/mm/yyyy)</small></td>

<td valign="top" class="main"><script language="javascript">dateScheduled.writeControl(); dateScheduled.dateFormat="dd/MM/yyyy";</script></td>

</tr>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td valign="top" class="main"><?php echo TEXT_BANNERS_EXPIRES_ON; ?><br><small>(dd/mm/yyyy)</small></td>

<td class="main"><script language="javascript">dateExpires.writeControl(); dateExpires.dateFormat="dd/MM/yyyy";</script><?php echo TEXT_BANNERS_OR_AT . '<br>' . tep_draw_input_field('expires_impressions', $bInfo->expires_impressions, 'maxlength="7" size="7"') . ' ' . TEXT_BANNERS_IMPRESSIONS; ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="main"><?php echo TEXT_BANNERS_BANNER_NOTE . '<br>' . TEXT_BANNERS_INSERT_NOTE . '<br>' . TEXT_BANNERS_EXPIRCY_NOTE . '<br>' . TEXT_BANNERS_SCHEDULE_NOTE; ?></td>

<td class="main" align="right" valign="top" nowrap><?php echo (($form_action == 'insert') ? tep_image_submit('button_insert.gif', IMAGE_INSERT) : tep_image_submit('button_update.gif', IMAGE_UPDATE)). '  <a href="' . tep_href_link(FILENAME_BANNER_MANAGER, (isset($HTTP_GET_VARS['page']) ? 'page=' . $HTTP_GET_VARS['page'] . '&' : '') . (isset($HTTP_GET_VARS['bID']) ? 'bID=' . $HTTP_GET_VARS['bID'] : '')) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td>

</tr>

</table></td>

</form></tr>

<?php

} else {

?>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr class="dataTableHeadingRow">

<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_BANNERS; ?></td>

<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_GROUPS; ?></td>

<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_STATISTICS; ?></td>

<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_STATUS; ?></td>

<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td>

</tr>

<?php

$banners_query_raw = "select banners_id, banners_title, banners_image, banners_group, status, expires_date, expires_impressions, date_status_change, date_scheduled, date_added from " . TABLE_BANNERS . " order by banners_title, banners_group";

$banners_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $banners_query_raw, $banners_query_numrows);

$banners_query = tep_db_query($banners_query_raw);

while ($banners = tep_db_fetch_array($banners_query)) {

$info_query = tep_db_query("select sum(banners_shown) as banners_shown, sum(banners_clicked) as banners_clicked from " . TABLE_BANNERS_HISTORY . " where banners_id = '" . (int)$banners['banners_id'] . "'");

$info = tep_db_fetch_array($info_query);

 

if ((!isset($HTTP_GET_VARS['bID']) || (isset($HTTP_GET_VARS['bID']) && ($HTTP_GET_VARS['bID'] == $banners['banners_id']))) && !isset($bInfo) && (substr($action, 0, 3) != 'new')) {

$bInfo_array = array_merge($banners, $info);

$bInfo = new objectInfo($bInfo_array);

}

 

$banners_shown = ($info['banners_shown'] != '') ? $info['banners_shown'] : '0';

$banners_clicked = ($info['banners_clicked'] != '') ? $info['banners_clicked'] : '0';

 

if (isset($bInfo) && is_object($bInfo) && ($banners['banners_id'] == $bInfo->banners_id)) {

echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_BANNER_STATISTICS, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $bInfo->banners_id) . '\'">' . "\n";

} else {

echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_BANNER_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $banners['banners_id']) . '\'">' . "\n";

}

?>

<td class="dataTableContent"><?php echo '<a href="java script:popupImageWindow(\'' . FILENAME_POPUP_IMAGE . '?banner=' . $banners['banners_id'] . '\')">' . tep_image(DIR_WS_IMAGES . 'icon_popup.gif', 'View Banner') . '</a> ' . $banners['banners_title']; ?></td>

<td class="dataTableContent" align="right"><?php echo $banners['banners_group']; ?></td>

<td class="dataTableContent" align="right"><?php echo $banners_shown . ' / ' . $banners_clicked; ?></td>

<td class="dataTableContent" align="right">

<?php

if ($banners['status'] == '1') {

echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', 'Active', 10, 10) . '  <a href="' . tep_href_link(FILENAME_BANNER_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $banners['banners_id'] . '&action=setflag&flag=0') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', 'Set Inactive', 10, 10) . '</a>';

} else {

echo '<a href="' . tep_href_link(FILENAME_BANNER_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $banners['banners_id'] . '&action=setflag&flag=1') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', 'Set Active', 10, 10) . '</a>  ' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', 'Inactive', 10, 10);

}

?></td>

<td class="dataTableContent" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_BANNER_STATISTICS, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $banners['banners_id']) . '">' . tep_image(DIR_WS_ICONS . 'statistics.gif', ICON_STATISTICS) . '</a> '; if (isset($bInfo) && is_object($bInfo) && ($banners['banners_id'] == $bInfo->banners_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_BANNER_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $banners['banners_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>

</tr>

<?php

}

?>

<tr>

<td colspan="5"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="smallText" valign="top"><?php echo $banners_split->display_count($banners_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_BANNERS); ?></td>

<td class="smallText" align="right"><?php echo $banners_split->display_links($banners_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page']); ?></td>

</tr>

<tr>

<td align="right" colspan="2"><?php echo '<a href="' . tep_href_link(FILENAME_BANNER_MANAGER, 'action=new') . '">' . tep_image_button('button_new_banner.gif', IMAGE_NEW_BANNER) . '</a>'; ?></td>

</tr>

</table></td>

</tr>

</table></td>

<?php

$heading = array();

$contents = array();

switch ($action) {

case 'delete':

$heading[] = array('text' => '<b>' . $bInfo->banners_title . '</b>');

 

$contents = array('form' => tep_draw_form('banners', FILENAME_BANNER_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $bInfo->banners_id . '&action=deleteconfirm'));

$contents[] = array('text' => TEXT_INFO_DELETE_INTRO);

$contents[] = array('text' => '<br><b>' . $bInfo->banners_title . '</b>');

if ($bInfo->banners_image) $contents[] = array('text' => '<br>' . tep_draw_checkbox_field('delete_image', 'on', true) . ' ' . TEXT_INFO_DELETE_IMAGE);

$contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_BANNER_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $HTTP_GET_VARS['bID']) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');

break;

default:

if (is_object($bInfo)) {

$heading[] = array('text' => '<b>' . $bInfo->banners_title . '</b>');

 

$contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_BANNER_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $bInfo->banners_id . '&action=new') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_BANNER_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $bInfo->banners_id . '&action=delete') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a>');

$contents[] = array('text' => '<br>' . TEXT_BANNERS_DATE_ADDED . ' ' . tep_date_short($bInfo->date_added));

 

if ( (function_exists('imagecreate')) && ($dir_ok) && ($banner_extension) ) {

$banner_id = $bInfo->banners_id;

$days = '3';

include(DIR_WS_INCLUDES . 'graphs/banner_infobox.php');

$contents[] = array('align' => 'center', 'text' => '<br>' . tep_image(DIR_WS_IMAGES . 'graphs/banner_infobox-' . $banner_id . '.' . $banner_extension));

} else {

include(DIR_WS_FUNCTIONS . 'html_graphs.php');

$contents[] = array('align' => 'center', 'text' => '<br>' . tep_banner_graph_infoBox($bInfo->banners_id, '3'));

}

 

$contents[] = array('text' => tep_image(DIR_WS_IMAGES . 'graph_hbar_blue.gif', 'Blue', '5', '5') . ' ' . TEXT_BANNERS_BANNER_VIEWS . '<br>' . tep_image(DIR_WS_IMAGES . 'graph_hbar_red.gif', 'Red', '5', '5') . ' ' . TEXT_BANNERS_BANNER_CLICKS);

 

if ($bInfo->date_scheduled) $contents[] = array('text' => '<br>' . sprintf(TEXT_BANNERS_SCHEDULED_AT_DATE, tep_date_short($bInfo->date_scheduled)));

 

if ($bInfo->expires_date) {

$contents[] = array('text' => '<br>' . sprintf(TEXT_BANNERS_EXPIRES_AT_DATE, tep_date_short($bInfo->expires_date)));

} elseif ($bInfo->expires_impressions) {

$contents[] = array('text' => '<br>' . sprintf(TEXT_BANNERS_EXPIRES_AT_IMPRESSIONS, $bInfo->expires_impressions));

}

 

if ($bInfo->date_status_change) $contents[] = array('text' => '<br>' . sprintf(TEXT_BANNERS_STATUS_CHANGE, tep_date_short($bInfo->date_status_change)));

}

break;

}

 

if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {

echo ' <td width="25%" valign="top">' . "\n";

 

$box = new box;

echo $box->infoBox($heading, $contents);

 

echo ' </td>' . "\n";

}

?>

</tr>

</table></td>

</tr>

<?php

}

?>

</table></td>

<!-- body_text_eof //-->

</tr>

</table>

<!-- body_eof //-->

 

<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

<br>

</body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

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...