Jump to content

jmr3460

Members
  • Posts

    289
  • Joined

  • Last visited

Everything posted by jmr3460

  1. Ok I see that more people are using Wordpress by the title of your topics. Anyone out there use Drupal at all. I have researched a little on my topic and have found a Module called Organics Groups which I believe is where I need to go with this topic. So my thought is to create a group Regional member which everyone is a member of. Within that group create a group called Area Member which members can choose which they want to be a member of. Then last create a Group Member type of which are grouped in the area membership as a sub-group if you will. So in theory if a member joins a sub-group Group they are automatically joined to the area and regional group type. So now that all that is out, it would seem a bit of a conflict if group member is created before a group is created. I don't know the process. So my question would be, what is suggested process? Member then group, or group before membership. I am still researching, so the answer is inevitable.
  2. Hello Drupalers, I have been learning Drupal for a couple of months now. I am at a point where I can transfer most of my sites to Drupal sites. I have a couple of sites where the content type or content are as follows. Group Name location 1 meeting 1 format meeting 2 format location 2 Meeting 1 format meeting 2 format Basically a group cold have more that one location and each location could have more than one meeting. My question is how do I set up the content type? Not real sure weather I create three content types and relate those content types to each other or create one content type with content types inside of the group content if that is event possible. Thanks for any and all direction.
  3. OK thanks I will start with that.
  4. Hello all, Not sure if can be done, but looking for starting point. RSS feed not working on a site that I am not getting any support on, so I am looking for another way. I want to download a CSV file to a folder then open and read it then insert information into a database. My question is "Is there a function that would help me to download this CVS file into a specific folder? Thanks for any help.
  5. How about this one? var lat = blackberry.location.latitude; Or this one? var lng = blackberry.location.longitude; I can't get either one of these to write on my phone.
  6. Is the syntax right with this statement: var long = blackberry.location.onLocationUpdate(window.confirm('GPS coordinates good'));
  7. I have now found a confirm box. Problem now is that when I click Ok nothing happens. Here is the new code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <script type="text/javascript"> <!-- function latlng(){ if(blackberry.location.GPSSupported){ document.write("Your device supports GPS lacating"); var long = blackberry.location.onLocationUpdate(window.confirm("Latitude: " + blackberry.location.latitude + " Longitude: " + blackberry.location.longitude)); blackberry.location.refreshLocation(); if (long){ window.location = "http://www.abc.org" } else{ alert("Nothing happened") } } else{ document.write("Your device does not support GPS"); } } --> </script> <head> <title>GPS Testing</title> </head> <body onLoad="latlng();"> </body> </html>
  8. Hello all, I do not do very much Javascript at all. I am basically trying to create a var and insert it either into a hidden form field or a input text field. I am working on a script that gets the GPS location of my Blackberry from my Blackberry. It will be a way for me to log in and out of jobs during the day. I have research the blackberry site and been able to develop a script that get my coordinates and send them to an alert window. This script works great. I have attempted to do this by changing the 'window.alert' to 'document.write' and make a var (I did not get something wright their or for some reason this did not work. I think that this issue is that it takes several seconds to retrieve the coordinates). I was hoping to be pointed to a way that I could insert those alert values into the form fields when I click the alert ok button or maybe when I click the ok button that creates the variables. Can anyone help me with this? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <script type="text/javascript"> <!-- function latlng(){ if(blackberry.location.GPSSupported){ document.write("Your device supports GPS lacating"); blackberry.location.onLocationUpdate(window.alert("Latitude: " + blackberry.location.latitude + " Longitude: " + blackberry.location.longitude)); blackberry.location.refreshLocation(); } else{ document.write("Your device does not support GPS"); } } --> </script> <head> <title>Blackberry GPS Logger</title> </head> <body onLoad="latlng()"> </body> </html> This is what I have so far. Still researching.
  9. Thanks your fix did it. The lines are coming from a blackberry browser and sent to my server via email. when I view the code there are <br /> at the end of every line. I just assumed the \n was there as well. Anyway the next step is to create my database table and insert some data. Thanks very much for the help. Mark
  10. Hey all, I have been working on a Blaclberry app that sends me an email with coord., timestamp and I can add some more. I have been able to open each of the emails with my new script. My goal is to insert the variables I have into a database. All this now is possible except I am getting a notice where there is an empty line of the email body. The bodies of the email look like this: Name: in Latitude: XX.XXXXX Longitude: -XX.XXXXXX Altitude: 108m Timezone: Date: Apr 6, 2011 7:42 AM Description: office Address: Address2: City: State: Country: Postal Code: URL: Phone Number: Sent on the Sprint® Now Network from my BlackBerry® The undefined offsets show up after Description and after Phone number. This is what my script does: Name: in Latitude: 35.12063 Longitude: -89.95295 Altitude: 108m Timezone: Date: Apr 6, 2011 7:42 AM Description: office Notice: Undefined offset: 1 in /home3/simplic5/public_html/gps/gps.php on line 20 : Address: Address2: City: State: Country: Postal Code: URL: Phone Number: Notice: Undefined offset: 1 in /home3/simplic5/public_html/gps/gps.php on line 20 : This is my script: <?php ini_set ("display_errors", "1"); error_reporting(E_ALL); //open database $connection = imap_open("{mail.mailbox.com:143}INBOX", "mark@abc.com", "password"); $message_number = imap_num_msg($connection); $headers = imap_headers($connection); $count = count($headers); for($i=1;$i<=$count;$i++){ $headerinfo = imap_base64(imap_body($connection, $i)); $message = nl2br($headerinfo); $remove_2br = str_replace('<br />\n', '<br />', $message); $messages = explode('<br />', $remove_2br); $num_lines = (count($messages)-1); for($a=0;$a< $num_lines;$a++){ //echo $messages[$a]."<br />"; $data = explode(': ',$messages[$a]); $column = $data[0]; $field = $data[1]; echo $column.": ".$field."<br />\n"; //create sql to insert $field into $column $sql = ""; } } ?> I think that the notice is generated because of the blank line in the email text. I only need about 4 or 5 bits of information. Is there something I can do to delete the blank lines first, then I can process the rest of the email per the script? Thanks for any help! Mark
  11. Hey thanks I got it working. When I looked at the source code of my output I noticed that there was line breaks. I replaced the line breaks with <br /> with n12br() then explode('<br />', $message);. I then count($message) and fun a for loop just to make sure I had it formated the right way. Next I will need to take my array and explode each array value into another array then insert into my database table. Thanks for the reply. I am going to bed now.
  12. I need to break down this statement. I have tried to replace string and my code echos the line without the replaced string and with it. I don;t think that str_replace is how to do what I want to do. <?php $imap = imap_open("{abc.com:143}INBOX", "mark@abc.com", "**********"); $header = imap_header($imap, 1); $messages['body'] = imap_base64(imap_body($imap, 1)); foreach($messages as $message){ $message .= str_replace('Latitude:', ',Latitude: ', $message); echo $message; } ?> This code produces : Name: in Latitude: XX.XXXXXX Longitude: -XX.XXXXXXX Altitude: 46m Timezone: Date: Apr 3, 2011 7:04 PM Description: Address: Address2: City: State: Country: Postal Code: URL: Phone Number: Sent on the Sprint® Now Network from my BlackBerry®Name: in ,Latitude: XX.XXXXXX Longitude: -XX.XXXXXX Altitude: 46m Timezone: Date: Apr 3, 2011 7:04 PM Description: Address: Address2: City: State: Country: Postal Code: URL: Phone Number: Sent on the Sprint® Now Network from my BlackBerry® I am trying to break this statement into data that I can insert into a database table for weekly reports: Name: in Latitude: XX.XXXXXX Longitude: -XX.XXXXXXX Altitude: 46m Timezone: Date: Apr 3, 2011 7:04 PM Description: Address: Address2: City: State: Country: Postal Code: URL: Phone Number: Sent on the Sprint® Now Network from my BlackBerry®
  13. This gets me one step closer to my goal. Where is the solved button now
  14. Yea thanks I was just going to reply with the same information. Thanks for taking out what you took out.
  15. I have the code opening the body now but is is not readable. It looks like this: TmFtZTogaW4NCkxhdGl0dWRlOiAzNS4xNjQxMw0KTG9uZ2l0dWRlOiAtOTAuMTkxNTMNCkFsdGl0 dWRlOiA0Nm0NClRpbWV6b25lOiANCkRhdGU6IEFwciAzLCAyMDExIDc6MDQgUE0NCkRlc2NyaXB0 aW9uOiANCg0KQWRkcmVzczogDQpBZGRyZXNzMjogDQpDaXR5OiANClN0YXRlOiANCkNvdW50cnk6 IA0KUG9zdGFsIENvZGU6IA0KVVJMOiANClBob25lIE51bWJlcjogDQoNClNlbnQgb24gdGhlIFNw cmludK4gTm93IE5ldHdvcmsgZnJvbSBteSBCbGFja0JlcnJ5rg== This is only in the emails that were sent by my blackberry.
  16. Hello all, I have a script I have been working on that retrieves my email from my mail server using some of the imap_functions. Everything works fine except for the emails that were sent from my blackberry. I have done some research and it seem to be something to do with the encoding that the blackberry uses. I have found a little bit of code that I was hoping would solve the issue. My goal is to get the body content from email that was produced with my blackberry and put bits of this body into a database. Then I want to do a report from that database once a week. I have developed a script that will retrieve all other message except from my blackberry. Does anyone know how blackberry encodes their body content? jmr3460
  17. What I found was that when I create an array there is a key created and for me to reference all of then I counted the number of values in the array and then sent an email one at a time until the array key value was equal to the number that was counted in the array. I probably should have done it with a for loop. Anyway I got it to work for now. I am going to work on it later this weekend for a better and cleaner script. All of my other scripts draw the email from a database and I used a while loop.
  18. OK I will look at that. Thanks for the reply
  19. Hey guys, I have an array for sending email from a form and don't know why it is only sending mail to the first email. Can anyone help? $web_contacts = array('webcontact@eascna.org', 'jmr3460@comcast.net'); $table = "<table>\n".$fullname.$email.$comments."</table>\n"; foreach($web_contacts as $web_contact){ $sender = $_POST['email']; $to = trim($web_contact); $subject = "Feedback from Web Form"; $headers = "From: webcontact@whatever.org" . "\r\n" . "Reply-To: $sender" . "\r\n" . "X-Mailer: PHP/" . phpversion(); $headers .= "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $body = "<html><body>".$table."</body></html>"; $mail = mail($to, $subject, $body, $headers); if($mail){ header("Location: thank_you.php?action=feedback"); exit(); } else{ echo "The Server had a hicup please contact the webcontact and let us know when and where this happened."; } } Thanks for any help.
  20. I found it the $email was more than an email address. It is working now. Thanks for the reply.
  21. Problem with this header. $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "From: $to\r\n" . "Reply-To: $email\r\n" . "X-Mailer: PHP/" . phpversion(); $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $body = "<html><body>".$table."</body></html>"; Can anyone tell me why?
  22. Thanks for your reply. I am trying to learn more on security.
  23. I have been doing a little studying and I am seeing a couple of things I am going to change. First after I have the site developed and tested on the online server I am going to turn off display_error in php.ini for one. This is one thing that this guy told me he saw an error at the bottom of the page and was able to do a $_GET and see all of the files and folders in that folder. It came up as a warning or notice first. I have a question about the php.ini file. Can I use a php.ini file that I create from the existing one that my hosting service provides? Or does anyone think that that is a bad idea? Some of the stuff on this file is about Things I am not using. I guess I am really asking if I can customize my php.ini or is every line required?
  24. Thanks for the link. I just downloaded the manual (.chm). Maybe I can get more out of that as far as security. Someone hacked my one of my sites by using ?cmd=ls. How can I stop this from happening again? Is there a way to block the passthru()?
×
×
  • 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.