Jump to content

jpepper

Members
  • Posts

    12
  • Joined

  • Last visited

jpepper's Achievements

Apprentice

Apprentice (3/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. Great job on the server 65 migration guys. This was relatively painless from the our end and our setup is not the most trivial account. Upgrading the hardware/os is very proactive and thats just one of the things I really like about tch. Small inconviences now stop big inconviences later. Thanks John
  2. Can you include files from the servers php PEAR libraries or do you have to install PEAR on you own account level manually. Thanks
  3. If I understand you correctly you don't want to do actual credit card processing. It is more of an internal system for tracking who needs what. The traditional custom solution would be using PHP for server side scripting and mysql for the db. It should be fairly straight forward. Generally I use phpmyadmin to setup the db. Probably can do just 2 tables: Users table would be something like : username/firstname/lastname/password/level Orders table would be something like: order_id/status (requested/approved), + card option fields. You would need order php pages to gather the orders. You would also need process php pages to approve orders and email orders to print shop. You can either do user setup using phpmyadmin.. or you can write pages for it. If you can't find anything packaged that fits the bill, this is an approach to solving it in a custom way. Hope this helps.
  4. You can still do it, you just need a 2 field foreign key. Yes it will throw error #1062 - Duplicate entry BTW what is the acutal purpose of your app. How is it going to be used? (If you don't mind me asking)
  5. I believe you are mistaken about not being able to modify a primary key. At least using mysql you can. Primary keys just have to be unique. Since presumably you would have no overlapping areas in your db, you should be able to guarantee uniqueness without an additional id. The following does work as long as 1,1 is not already in the db. CREATE TABLE `test` ( `x` int(10) unsigned NOT NULL default '0', `y` int(10) unsigned NOT NULL default '0', `data` varchar(255) NOT NULL default '', PRIMARY KEY (`x`,`y`) ) TYPE=MyISAM COMMENT='test'; INSERT INTO `test` VALUES (1, 2, 'testdata'); UPDATE `test` SET `y` = '1' WHERE `x` =1 AND `y` =2;
  6. Sounds like you are on the correct track using a 2d primary key as coords. Personally I think I would use a multi keyed primary id being the upper left hand coordinates of the system. If you keep the x,y separate you should be able to do queries in ranges. IE: all maps with x coordinates < b but greater than a and with y coordiants > c but less then d. You may even play around with letting some client side scripting display the actual data and grab just the map string from the site. This could let you do fast scrolling around your map without refreshing the page. JP
  7. Glad to help. Sorry.. I cant think of any way to make it faster. Depending on your application you might be able to cache the output table if page requests for the same info are common, but I don't know how dynamic your data is.
  8. If I understand you correctly you want the states in a single string so that you can easily store the states in a database. If you want to access the strings states directly without exploding the string into an array just use the string index operator $str = "hello"; echo $str{0}; // outputs 'h' echo $str{1}; // outputs 'e' since your array is 10,10 you would have a string of length 100. to calculate the 1d index from a 2d co-ordinate you just do the following: $rowLength = 10; $numRows = 10; $stringIndex = ($rowIndex * $rowLength) + $colIndex; echo $str{$stringIndex}; so if you want to access the character in the string at row 0, column 5.. $stringIndex would be (0 * 10) + 5 = 5. Row 2 at column 3 would be (2 * 10) + 3 = 23; hope this helps
  9. Keep in mind that the weakness of using script logins to protect a folder is that it only protects your scripts from being accessed. For example you can use it to stop users from accessing .php pages but I don't believe you can't stop them from accessing resources such as images, simple html or other resources. If you do stick with HTTP authentication via .htaccess you can still access the username/ password information inside of scripts using variables $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'] If you really don't want to use a popup login box there are techniques you can use to protect non script resources using php scripts. Place the resources in a location outside the public_html area and display them to your users via a php script. See : http://www.phpdeveloper.org/section/tutorial/52 for an example of this. hope this helps.
  10. Thanks all. Good to be here. I found that imap_fetch_overview had the same problem as imap_header_info. It crashed the page. I did however find that imap_fetchheader was able to get the raw header. I then hacked together a my_imap_header to fetch the header and parse it. That seems to work, but you loose all the Unseen and Recent information about the email. I will try all this from a different box to see if it is the imap servers issue or something about the php compilation we are using. Thanks again jpepper
  11. In messing around with the php imap functions I found that the imap_header and imap_headerinfo functions cause the whole page not to load as soon as they were called. I am able to successfully get the body of a message but not the header. I also found the same behavior when I tried to use pofHQ-wapMAIL program. Does anyone have any suggestions? Thanks
×
×
  • Create New...