Jump to content

Addam

Members
  • Content Count

    158
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Addam

  • Rank
    member
  • Birthday 11/23/1979
  1. ok... Here is what you do in this case. One of the geat things about php is that it allows you to break the code and write pure html then put the code back together. Example: <?php if($findData['Coverimage'][0] != NULL) { ?> <img src="<?php echo $findData['Coverimage'][0]; ?>"> <?php }else{ ?> no image... <?php } ?> Basically, I wrapped the PHP code around the HTML. So when it finds an image it will write a completely new html tag. If not, it will write "no image...". Copy and paste the code above and you should see what I'm talking about. I think that is what you are looking for. ~Addam~
  2. Try using <a href="#" onClick="alert('link');">click me</a> Basically, use the "onClick" function in a link to call a javascript function. If you copy and paste the abovelink, you will see it in action.
  3. I'm not sure if you are going in this direction, but you might want to build your Project Management Application as a web based application. I say that because it's probably more work than necessary to build it using FMP by itself (considering all you want to do). This way you can use PHP to communicate with BOTH FMP7 and MySQL. If your client is moving form FMP4 to 7, then they are already in for an nice size learning curve. If it's built right, it will be easier to manage in the long run. Just a suggestion.
  4. Have you tried: if($findData['Coverimage'][0] != NULL) { get the image }
  5. Here is some syntax you can modify and then use: Your request should look something like this: $max = 15; $skipSize = $_GET['skip']; $request=new FX("127.0.0.1"); $request->SetDBData("mydatabase.fp5","mylayout",$max); $request->AddDBParam("field","value","eq"); $request->FMSkipRecords($skipSize); $result=$request->FMFind(); Your previous and next could look like this: <table> <tr> <td style="width:200px;text-align:right;"> <?php if (strlen($result['linkPrevious']) < 1) { ?> &laquo;- Previous <?php } else { ?> <a href="<?php echo $_SERVER['PHP_SELF'] ?>?skip=<?php echo($skipSize - $max) ?>"><strong>&laquo;- Previous</strong></a> <?php } ?> </td> <td style="width:200px;text-align:left;"> <?php if (strlen($result['linkNext']) < 1) { ?> Next -&raquo; <?php } else { ?> <a href="<?php echo $_SERVER['PHP_SELF'] ?>?skip=<?php echo($skipSize + $max) ?>"><strong>Next -&raquo;</strong></a> <?php } ?> </td> </tr> </table> IF you modify the request code to fit your situation, the second code should work as is. I hope this helps! ~Addam~
  6. Addam

    Emailing to a Group

    I'm not sure if this will help, but one thing you might want to try is adding 4 fields... One - TO (calculation) Two - CC (calculation) Three - BCC (calculation) Four - SELECTION (selectable) The "Selection" field will have values that are preset to "TO, CC, BCC, none". In your script, you can run something that say's (in so many words), "Find this group of records and then replace the "Selection" with "CC" for all, then insert those results into your email field, then return them back to "none". Now the calculation field for CC's you would calculate everything that has "CC" selected and render the email addresses in one long string that you format. That way it will always be correct, no matter what is selected. This concept would be true for all "TO, CC, and BCC" fields (writen slightly different for each one). It will repeat the same for all or if you choose to select them manually, that will still work just take out the "replace" section. Again, I'm not sure if this is what you were looking for but hopefully it will point you in the right direction.
  7. That's it! I also had some rearanging of code to do but that was correct. I guess after you work for 10 hrs. straight, your brain starts to cook! Thanks!
  8. Here is the deal... Repeating fields are translated (in so many words) to actuall arrays themselves. So if you have 1 repeating field with 3 entries, you would get their information by: $instance['repeatingfield'][0]; $instance['repeatingfield'][1]; $instance['repeatingfield'][2]; and so on... If you wanted to display a list you would use something like this: <?php for ($i=0; $i < count($instance['repeatingfield']) ; $i++){ echo $instance['repeatingfield'][$i]; } ?> This would return the list of values inside the repeating field. Hope this helps!! ~Addam~
  9. Hi Everyone! I'm doing some conversions for a client and I'm trying to find date conflicts in scheduling. Now, I've successfully broke down the day's and times to UNIX time. SETUP: 1) I gather the requestors information $startDate and $endDate. 2) I gather the information from the database for that user. PROBLEM: I'm having trouble trying to get a handle to conflicts in date and start times. Logically I would step through each record and say: "if the requested start date is BEFORE the database END DATE but NOT AFTER the database START DATE, then all is well..." else return an error. I think I'm headed in the right direction but I'm lost as to HOW to put this together in PHP Syntax. Can anyone help!? Thanks a bunch!
  10. Thank you for posting this. I was fighting with that all day! ~Addam~
  11. Just curious... We are sending out emails using FMP. Now in using this, we need to open a url inside the body of our message. How would we pull that off in FMP. We've made a work around using CDML & PHP, but I'm sure there has to be a way to do it straight out of FMP. Any suggestions?
  12. Have you ever thought of using CWP? If you were to do that, then you can wrap the entire page in a "div" with parameters of a "8 1/2 x 11" pixel scheme or whatever size you need.
  13. HI Garry... Thanks again for your input. I'm still kind of struggling with this, but I'm sure I'm headed the right direction. There is one thing I'm going to point out that all should know... When using the code you posted for editing multiple records... If you are going to be using a field that contains more than 1 value "word"... Example: $addam = "Addam Driver"; and not $addam="AddamDriver" wrap your "$tag" in the "rawqurlencode()" tag... This will parse it and properly send the information back to FMP. Example: if $addam = "Addam Driver"... You would right this as: rawurlencode($addam) in your http: request line. This was causing me so many problems until I opened my PHP book and ran across it. Hope this helps someone... ~Addam~
  14. Hi Garry! I was able to understand and get the edit functions to work. My problem was I kept getting warning and notices on the screen and treating them as ERRORS thinking it wasn't working. My brain was fried. I'm good now though. I do have one question though. I may have come up with a method of "Finding Multiple Records" however, I'm not sure if it would be the way to go, but it's what I came up with. Basically the user group would get a list. The then would select all they wanted to edit and click on a link that say's "Edit Selected". I've worked this out with JavaScript & CDML before, by using a form field to keep track of the array (it's easier) then, set a form value equal to all of the requests and CDML would find them. I'm kind of puzzled on this moving using PHP. Using FX, I can find one record with ease, even multiple ones, but it's all preset. Do you or anyone out there know of a way to do this type of backend transaction with ease? Thanks a million!
  15. Thank you sooo much! I'm REALLY having a hard time here. CHEERS!!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.