gregy Posted November 16, 2004 Share Posted November 16, 2004 Hi! Any idea how to change this code <?php /* $Id: osc_active_desktop V 2.0 2003/03/07 23:03:52 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License Developped by Gyakutsuki */ // store this file in your admin directory to get the correct paths require('includes/application_top.php'); // make a connection to the database... now tep_db_connect() or die('Unable to connect to database server!'); $command_query = tep_db_query("select o.orders_id, date_purchased, customers_name, products_name, payment_method, products_quantity, final_price, op.orders_products_id from orders o, orders_products op WHERE o.orders_id = op.orders_id and orders_status='1' ORDER BY date_purchased DESC"); $whos_online_query = tep_db_query("select DISTINCTROW customer_id from " . TABLE_WHOS_ONLINE); $customers_query = tep_db_query("select DISTINCTROW customers_id from " . TABLE_CUSTOMERS); ?> <html> <head> <title><?php echo TEXT_ORDERS; ?></title> <meta http-equiv="Content-Type" content="text/html; charset=windows-1250"> <META HTTP-EQUIV=Refresh CONTENT="<?php echo REFRESH_RATE;?>"> <link rel="stylesheet" type="text/css" href="../stylesheet.css"> <script> <!-- function imp(){ if (!window.print){ alert("<?php echo TEXT_NS_ALERT; ?>") return } window.print() } //--> </script> </head> <body> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td align="left" width="62%"> <font size="2" face="Verdana"><b><?php echo TEXT_DESKTOP; // echo STORE_NAME; ?></b></font> </td> <td align="right" width="28%"> <a href="<?php echo '';?>"><font size="1" face="Verdana" color="#000000"> <b><?php echo TEXT_ADMIN; ?></b></font></a> | <a href="<?php echo ''. HTTP_SERVER; ?>"><font size="1" face="Verdana" color="#000000"><b><?php echo TEXT_CATALOG; ?></b></font></a> | <a href="javascript:imp()" target="_self"><font size="1" face="Verdana" color="#000000"><b><?php echo TEXT_PRINT; ?></b></font></a> </td> <td align="right" width="10%"> </td> </tr> <tr> <td align="left" colspan="2"> <!-- <div align="right"> <font size="1" face="Verdana"><?php echo strftime(DATE_FORMAT_LONG); ?></font> </div> --> </td> <td align="left" width="10%"></td> </tr> <tr> <td align="left" colspan="2"> <font size="1" face="Verdana" color="#000000"><?php echo TEXT_NBR_CLIENTS_ONLINE; ?> <?php echo (tep_db_num_rows($whos_online_query)) . ' ' . TEXT_CLIENTS; ?></font> <a href="<?php echo '' . 'whos_online.php?selected_box=tools'?>"> <img border="0" src="<?php echo '../images/arrow_green.gif" width="13" height="13"'?>> </a> </td> <td align="left" width="10%"></td> </tr> <tr> <td align="left" colspan="2"> <font size="1" face="Verdana" color="#000000"><?php echo TEXT_NBR_CLIENTS_REG; ?> <?php echo (tep_db_num_rows($customers_query)). ' ' . TEXT_CLIENTS; ?></font> <a href="<?php echo ''. 'customers.php?selected_box=customers'?>"> <img border="0" src="<?php echo '../images/arrow_green.gif" width="13" height="13"'?>> </a> </td> <td align="left" width="10%"></td> </tr> <tr> <td align="left" colspan="2"> <font size="1" face="Verdana" color="#000000"><?php echo TEXT_NBR_ORDERS; ?> <?php echo (tep_db_num_rows($command_query)). ' ' . TEXT_ORDERS; ?></font> <a href="<?php echo '' .'orders.php'?>"> <img border="0" src="<?php echo '../images/arrow_green.gif" width="13" height="13"'?>> </a> </td> <td align="left" width="10%"></td> </tr> <tr> <!-- <td align="left" colspan="2"> <font size="1" face="Verdana" color="#000000">User Tracking</font> <a href="<?php echo '' . 'user_tracking.php'?>"> <img border="0" src="<?php echo '../images/arrow_green.gif" width="13" height="13"'?>> </a> </td> --> <td align="left" width="10%"></td> </tr> </table> <table border="0"> <tr class="infoBoxContents" align="center"> <td><strong><?php echo TEXT_ORDER_ID; ?></strong></td> <td><strong><?php echo TEXT_DATEOFPURCHASE; ?></strong></td> <td><strong><?php echo TEXT_CLIENTNAME; ?></strong></td> <td><strong><?php echo TEXT_PRODUCT; ?></strong></td> <td><strong><?php echo TEXT_PAYMETHOD?></strong></td> <td><strong><?php echo TEXT_QTY; ?></strong></td> <td><strong><?php echo TEXT_PRICE; ?></strong></td> <td><strong><?php echo TEXT_TOTAL; ?></strong></td> </tr> <?php while ($command = tep_db_fetch_array($command_query)) { $attributes_query = tep_db_query("select products_options, products_options_values from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES." oa where orders_id = " . $command['orders_id'] . " and orders_products_id = " . $command['orders_products_id'] . ";"); ?> <tr class="moduleRowOver"> <td align="left"><font face="verdana" size="2"> <?php echo $command['orders_id']; ?></font></td> <td align="left"><font face="verdana" size="2"> <?php echo $command['date_purchased']; ?></font></td> <td align="left"><font face="verdana" size="2"> <a href=" <?php echo '' .'orders.php?selected_box=customers&page=1&oID='. $command['orders_id'] .'&action=edit'?>"> <?php echo $command['customers_name']; ?></a></font></td> <td align="left"><font face="verdana" size="2"><?php echo $command['products_name'] . '<BR>'; while ($attrib = tep_db_fetch_array($attributes_query)) { echo " - " . $attrib['products_options'] . " " . $attrib['products_options_values'] . "<br>"; } ?></font></td> <td align="left"><font face="verdana" size="2"><?php echo $command['payment_method']; ?></font></td> <td align="center"><font face="verdana" size="2"><?php echo $command['products_quantity']; ?></font></td> <td align="right"><font face="verdana" size="2"><?php echo $command['final_price']; ?></font></td> <td align="right"><font face="verdana" size="2"><?php echo $command['products_quantity']*$command['final_price']; ?></font></td> </tr> <?php }; ?> </table> </body> </html> to display prices with tax incl. It's a great contribution. thanx Quote Link to comment Share on other sites More sharing options...
gregy Posted January 1, 2005 Author Share Posted January 1, 2005 is it only with me or is more common probelm .. osc active desktop is not displaying online visitors .. while infobox on main page says i.e. 22 visitors osc active desktop says 1 .. hmm .. any idea? Quote Link to comment Share on other sites More sharing options...
higgalls Posted January 7, 2005 Share Posted January 7, 2005 is it only with me or is more common probelm .. osc active desktop is not displaying online visitors .. while infobox on main page says i.e. 22 visitors osc active desktop says 1 .. hmm .. any idea? <{POST_SNAPBACK}> It uses the number of actually signed-in customers, and not the number of any customer online (i.e. whether they are signed in or not). Quote Link to comment Share on other sites More sharing options...
gregy Posted January 7, 2005 Author Share Posted January 7, 2005 can this be modified to visitors .. not signed customers? Quote Link to comment Share on other sites More sharing options...
higgalls Posted January 7, 2005 Share Posted January 7, 2005 (edited) can this be modified to visitors .. not signed customers? <{POST_SNAPBACK}> Yeah it sure can. I was in the process of modifying the Active Desktop , but I havent had time to finish modifying it. What I hate about it is that it treats each product as if it is a separate order. I would much prefer it to list the customer once, and then list the products underneath the customers details. Look in the first few lines of the osc_active_desktop.php file, and there should be a line which starts with " $whos_online_query = ............" Try changing that line to " $whos_online_query = tep_db_query("select customer_id from " . TABLE_WHOS_ONLINE);" Hopefully that will be it (I cant remember if it required anymore changes). Let me know if it doesnt work. Cheers, Chris :) Edited January 7, 2005 by The_Bear Quote Link to comment Share on other sites More sharing options...
gregy Posted January 7, 2005 Author Share Posted January 7, 2005 (edited) Yeah it sure can. I was in the process of modifying the Active Desktop, but I havent had time to finish modifying it. What I hate about it is that it treats each product as if it is a separate order. I would much prefer it to list the customer once, and then list the products underneath the customers details. Look in the first few lines of the osc_active_desktop.php file, and there should be a line which starts with "? $whos_online_query = ............" Try changing that line to "? $whos_online_query = tep_db_query("select customer_id from " . TABLE_WHOS_ONLINE);" Hopefully that will be it (I cant remember if it required anymore changes). Let me know if it doesnt work. Cheers, Chris :) <{POST_SNAPBACK}> it works .. thank you ... if you will work on new version it would be great .. i also hate this each product ... Edited January 8, 2005 by w2vy Quote Link to comment Share on other sites More sharing options...
radders Posted January 7, 2005 Share Posted January 7, 2005 I wouldn't have ithought it would be that difficult to change it, after all Active Desktop it basically just an autorefresh header with a few links and a list of orders. You could design your own page to list the orders the way you want them and add the autorefresh header. Quote Link to comment Share on other sites More sharing options...
axelsegebrecht Posted January 8, 2005 Share Posted January 8, 2005 Hi folks, I've updated the files now with the above included and some more. You can find it here: http://www.oscommerce.com/community/contri...,active+desktop Axel. Quote Link to comment Share on other sites More sharing options...
gregy Posted January 8, 2005 Author Share Posted January 8, 2005 thanx a lot .. already set on desktop :) looking forward of ToDo things ;) Quote Link to comment Share on other sites More sharing options...
axelsegebrecht Posted January 8, 2005 Share Posted January 8, 2005 thanx a lot .. already set on desktop :) looking forward of ToDo things ;) <{POST_SNAPBACK}> Glad you like it mate. I've been hacking OSC for over 24 hours non-stop but it's my frist 24 hrs with it ;) /me concentrates on the phpbb/osc marriage thus escaping his todo list... A. Quote Link to comment Share on other sites More sharing options...
♥Gyakutsuki Posted January 8, 2005 Share Posted January 8, 2005 Hello, Thank to continue my first development. I have just a comment after version 2. If you use in admin osc active desktop with admin access level, the contribution does'nt work. I It's for that, i put the osc active desktop in a sub directories catalog. After you can insert an .htaccess for the security. Quote Regards ----------------------------------------- Loïc Contact me by skype for business Contact me @gyakutsuki for an answer on the forum Link to comment Share on other sites More sharing options...
gregy Posted January 8, 2005 Author Share Posted January 8, 2005 Hello, Thank to continue my first development. I have just a comment after version 2. If you use in admin osc active desktop with admin access level, the contribution does'nt work. I It's for that, i put the osc active desktop in a sub directories catalog. After you can insert an .htaccess for the security. <{POST_SNAPBACK}> hmm .. strange .. all of sudden it doesn't work one or another way? .. how about other users .. does it works for you? Quote Link to comment Share on other sites More sharing options...
gregy Posted January 9, 2005 Author Share Posted January 9, 2005 it works .. i uploaded it again .. it works well ... Quote Link to comment Share on other sites More sharing options...
axelsegebrecht Posted January 9, 2005 Share Posted January 9, 2005 Hello, Thank to continue my first development. I have just a comment after version 2. If you use in admin osc active desktop with admin access level, the contribution does'nt work. I It's for that, i put the osc active desktop in a sub directories catalog. After you can insert an .htaccess for the security. <{POST_SNAPBACK}> Hey no problem, thanks for coming up with the mod in the first place :) Not sure what you mean about the access level though. I'm simply using an .htaccess file for it and tell Windoze to use my user/pass and it works fine. I imagine it would be the same with any other form of auth used? A. Quote Link to comment Share on other sites More sharing options...
♥Gyakutsuki Posted January 10, 2005 Share Posted January 10, 2005 I am agree with .htaccess. There is no problem. Admin acces level allow a right on one or several files. But if you try to access the admin directory with http.../admin/osc_active_desktop. There is a problem. If you know the solution, i would know it. Quote Regards ----------------------------------------- Loïc Contact me by skype for business Contact me @gyakutsuki for an answer on the forum Link to comment Share on other sites More sharing options...
gregy Posted January 10, 2005 Author Share Posted January 10, 2005 (edited) I am agree with .htaccess. There is no problem. Admin acces level allow a right on one or several files. But if you try to access the admin directory with http.../admin/osc_active_desktop. There is a problem. If you know the solution, i would know it. <{POST_SNAPBACK}> is it possible that it stops to show orders when certain number of orders is already displayed??? .. i'm stucked ... i't not showing more orders ... if i edit last order via phpmyadmin (i.e. just a letter in name) to see refreshment, it works .. but not showing last 10 orders .. hmm STUPID ME .. all orders shown have status "In Progress" .. those that should be displayed are already set to delivery status :thumbsup: Edited January 10, 2005 by gregy Quote Link to comment Share on other sites More sharing options...
homewetbar Posted January 19, 2005 Share Posted January 19, 2005 Question: Are there any potential security risks involved in using this contribution? Quote Most Valuable OsCommerce Contributions: Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294 FedEx Automated Labels -- Contribution 2244 RMA Returns system -- Contribution 1136 Sort Products By Dropdown -- Contribution 4312 Ultimate SEO URLs -- Contribution 2823 Credit Class & Gift Voucher -- Contribution 282 Cross-Sell -- Contribution 5347 Link to comment Share on other sites More sharing options...
gregy Posted January 19, 2005 Author Share Posted January 19, 2005 Question: Are there any potential security risks involved in using this contribution? <{POST_SNAPBACK}> just be sure to put it in the locked directory i.e. /admin Quote Link to comment Share on other sites More sharing options...
gregy Posted February 22, 2005 Author Share Posted February 22, 2005 any idea how to display prices with tax in active desktop? thanx Quote Link to comment Share on other sites More sharing options...
gregy Posted February 23, 2005 Author Share Posted February 23, 2005 one more .. why is horizontal slider at the bottom alyways displayed .. even if page fits into display .. ? thanx Quote Link to comment Share on other sites More sharing options...
dsatchell Posted March 7, 2005 Share Posted March 7, 2005 Could someone show me how to integrate another contrib into this one or how to execute another file from this file whenever it refreshes. I have this contrib (and it is great) and I also have the Auto Update Exchange Rates file on my site. I want to have Active Desktop make a call to (execute) update_currencies.php I have tried to do it myself but I can't get it to work. Thanx, Dave. Quote Link to comment Share on other sites More sharing options...
mickeymouse Posted March 9, 2005 Share Posted March 9, 2005 Hey all, I just updated this package with a few goodies: Changes: - Products now display currency symbols - Currency decimals automatically set at your OSC defaults - Product prices now include tax - Broke out orders into 2 categories, "Pending" and "In Process" to give you a better handle on what all you have in the works - Added some nice graphics to make it visually more appealing - Screenshot enclosed Haven't been able to develop a work-around for those w/ the admin access level contribution installed though. Hope ya like it. You can download it here: http://www.oscommerce.com/community/contributions,1925 Quote I only do what my Rice Krispies tell me to do! Link to comment Share on other sites More sharing options...
MikeOz Posted March 10, 2005 Share Posted March 10, 2005 I get the following error when using this contribution on two different stores and was wondering if anyone else has seen this: Total 1064 - You have an error in your SQL syntax near '; ' at line 1 select products_id, products_tax_class_id from products p where p.products_id = 34; [TEP STOP] Quote Link to comment Share on other sites More sharing options...
mickeymouse Posted March 10, 2005 Share Posted March 10, 2005 I get the following error when using this contribution on two different stores and was wondering if anyone else has seen this: <{POST_SNAPBACK}> Have you altered your products table structure at all? I have this running on 3 different shops with no problems. Greg Quote I only do what my Rice Krispies tell me to do! Link to comment Share on other sites More sharing options...
gregy Posted March 12, 2005 Author Share Posted March 12, 2005 hi there is no instructions on altering product tabel structure .. and previous version was working OK. bytheway .. congratulations on update .. what i read in readme.txt!!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.