Jump to content

barkster

Members
  • Posts

    194
  • Joined

  • Last visited

Everything posted by barkster

  1. I've been searching around trying to find a way to send customer information to process an order to USPS to ship and I cannot find anything. I've looked over their web tools and mainly see stuff for getting rates etc. I found a few classes on calculating postage but nothing on processing an order for shipment. Is this possible or anyone know of a class that I can use to do this? Thanks
  2. Ok, thanks I'll have to research transactions. Never messed with that
  3. That works but how would you do inventory on that? Say if package 1 had product 3 & 5 in it then when you checkout you want to deduct 1 for each in the inventory. How do you know if it is a combo product vs a single item product. Thanks for the help.
  4. I was asked to create a shopping cart/product system that would allow the owner of the site to create combos from multiple products on the site to offer package deal if purchased together. I'm not quite sure how to handle this. I was going to put the combo's in a separate table but he wants the inventory to be updated based on the individual products purchased in the combo and that's where I got stuck. Any suggestions on how to handle this in the database and in the cart? Thanks
  5. I was asked to create a shopping cart/product system that would allow the owner of the site to create combos from multiple products on the site to offer package deal if purchased together. I'm not quite sure how to handle this. I was going to put the combo's in a separate table but he wants the inventory to be updated based on the individual products purchased in the combo and that's where I got stuck. Any suggestions on how to handle this in the database and in the cart? Thanks
  6. That was it. Funny too cause when I restarted dreamweaver it showed the missing tag. When I made it show missing tags I guess it needed a restart. Thanks for the sites I found them after you named them correctly. I was searching for css validation cause I thought I had a style wrong. Thanks
  7. That what I tried to do, what site or program do I use to do this. I used a few sites and dreamweaver checker and didn't find it. Thanks
  8. I cannot figure out why this page looks fine in firefox but huge in IE? I'm using fixed text? Any ideas? Is there a way to debug/check my css for IE and Firefox? I've tried a few site and they check out fine but that doesn't mean they are right. http://www.amobilebailbonds.com
  9. I do need to fix that but what I did for now was just urldecode the name in my upload script. I guess I see what is happening the browser is expecting the [1] and the filename is encoded so it can't see it. I wasn't thinking about encoding at first cause the two names matched but the browser was decoding expecting the [1]. Thanks
  10. But what I'm saying is the filename is hallcorner01%5b1%5d.jpg on the server, not hallcorner01[1].jpg
  11. I'm have an uploader program in java that I use to upload some images and it is encoding the names but I cannot view them on the site. For instance the file is on the server as hallcorner01%5b1%5d.jpg but cannot browse to it, says not found but copied from my ftp server hallcorner01%5b1%5d.jpg is there. Why isn't apache seeing this?
  12. I see what your saying my problem is that only the images in the folder are password protected so when the page is displayed, you see the page and then when the first image loads it fires the authentication. I'm probably going about this wrong. I want to password protect some folder so that they cannot be hotlinked and be opened directly from the link. The only way I new to protect them was by using at htaccess/htpasswd file. How else could I do this so the files in the folder cannot be viewed without a password input. Thanks for the help.
  13. I'm trying to do something like this, this is rough. I want to restrict with my stand htaccess file and htpasswd file but if the user who created the directory created it, then I don't want them to have to login. I was hoping I could pass the authentication through code somehow so apache thought it has been authenticated. function authenticate($realm) { header('WWW-Authenticate: Basic realm="'.$realm.'"'); header('HTTP/1.0 401 Unauthorized'); echo "You must enter a valid login ID and password to access this gallery\n"; exit; } if(!$msg) { session_start(); //check to see if private if($row['Password']=="1"){ //$auth = $row['UserID'].$row['Folder']; $foldername = $row['Folder']; if($_SESSION['UserID']==$row['UserID']) { define('USER_AUTHENTICATED',true); $_SERVER['PHP_AUTH_USER']=$foldername; $_SERVER['PHP_AUTH_PW']=$row['Pwd']; } require_once 'http_authenticate.php'; //validate login information echo $_SERVER['PHP_AUTH_DIGEST']; if(isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])){ // this simply means that they have submitted the login form for this realm $htpasswd = "Gallery/".$row['UserID']."/".$row['Folder']."/.htpasswd"; $auth=http_authenticate($_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW'],$htpasswd); define('USER_AUTHENTICATED',$auth); } if($foldername == $_SERVER['PHP_AUTH_USER'] && $_SESSION['UserID']!=$row['UserID']) { authenticate($row['Folder']); } if($_SESSION['UserID']!=$row['UserID']) { if(defined('USER_AUTHENTICATED') && USER_AUTHENTICATED) { // authentication successful - show the content } else { authenticate($row['Folder']); } }
  14. I've have some folder that are password protected with htaccess files and htpasswd files. On users that own the folders I want them to be able to view without having to login when they view files in that folder. I thought that it may be possible by setting $_SERVER['PHP_AUTH_USER'] & $_SERVER['PHP_AUTH_PW'] variables but it doesn't seem to work. Is there a way I can make php think that the user is authenticated for that resource?
  15. Don't know it is part of a script that I was using from here http://koivi.com/php-http-auth/ it used to work on my old server and now it just hangs after you put in the username/password If I take out && USER_AUTHENTICATED and just put if(defined('USER_AUTHENTICATED')){ It shows the page content when it prompts for the username/password. With it in there on my old server it does not show the content until successful authentication.
  16. I was using this small script to prompt for password on some password protected folders. It was working great but I've moved servers and now the script hangs on the line "if(defined('USER_AUTHENTICATED') && USER_AUTHENTICATED){" It doesn't like the "USER_AUTHENTICATED" but if I take it out it shows the page while it is prompting for password which I don't want. What could be causing this, is USER_AUTHENTICATED a global variable or something? Not quite sure. Thanks require_once 'http_authenticate.php'; if(isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])){ // this simply means that they have submitted the login form for this realm $htpasswd = "Gallery/".$row['UserID']."/".$row['Folder']."/.htpasswd"; $auth=http_authenticate($_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW'],$htpasswd); define('USER_AUTHENTICATED',$auth); } if(defined('USER_AUTHENTICATED') && USER_AUTHENTICATED){ // authentication successful - show the content echo '<?xml version="1.0" encoding="iso-8859-1"?>',"\n"; } else { // the user has not been authenticated, present a login form. header('WWW-Authenticate: Basic realm="'.$row['Folder'].'"'); header('HTTP/1.0 401 Unauthorized'); // if cancel the login form, below is what they get exit('Authentication is required to view this page.'); }
  17. Cool, those look better than my hack. Thanks
  18. I've been playing with it more and this is what I've come up with but I was hoping for simpler solution function newfilename($filename) { $len = strlen($filename)-9; $string = substr($filename,0,$len); $ext = explode('.',$filename); $ext = $ext[count($ext)-1]; return $string . "." . $ext; }
  19. Well that would work in theory but I forgot to mention there could be numbers in the rest of the name.
  20. I have a filename string that I need to strip out the last 5 character off the filename preserving the extension. Can anyone help me with this? Thanks Example: largefile12398.jpg would become largefile.jpg
  21. Thanks, that got me in the right place!!
  22. I've tried that and it gives me duplicate rows if there are more than one image. I need to get all rows in the Ad table and if there is an image get the first occurrence. See below --Sql-- SELECT DISTINCT Ads.AdID, Ads.CatID, images.Image FROM Ads Left Join images ON Ads.AdID = images.AdID --results-- AdID CatID Image 338 40_5 null 337 10_99 null 336 30 null 335 30 null 334 20 null 333 30 TestImage.jpg 333 30 TestImage2.jpg 333 30 TestImage3.jpg 332 30 null
  23. I have a table called ads and a second table called images that has a list of images for each as by adID I want to do a query for each and and get the first image(imageID) from the images table. If there insn't a image then would be null. How can I make a query like this? I tried a subquery but didn't work for me. --Ads-- AdID AdName --Images-- ImageID AdID ImageName
  24. I'm trying to do a regex to allow only alphanumeric and the underscore but I can't get it to work. I've tested on a few reg testers and it worked there but I can't get it to work on my page. javascript var rah = new RegExp(/([^A-Za-z0-9_])/); if (!rah.test(f.tbgalleryname.value)) { alert("Your folder name has illegal characters.\nCan only contain alphanumeric characters (a-z 0-9 _)"); return false; }
  25. This is what my host said. This is because PHP is running commands using the "nobody" username, while your permissions are for "usernameremoved" You'll need to convert to PHPsuExec to get this fixed up. Changing over to PHPsuExec can break some sites if they have .htaccess with php flags in it. Read this for more information: https://www.power360hosting.com/support/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=16&nav=0,3,14 When you're ready we can recompile Apache for you with PHPsuExec. I've gone ahead and fixed the permissions for the directories already there. Also, when you convert to phpsuexec, your scripts can't be more than 755 (so 777 will not work).
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.