Jump to content

simflex

Members
  • Posts

    47
  • Joined

  • Last visited

Everything posted by simflex

  1. I thank all of you very much for your assistance. It is all working well now. Many thanks.
  2. Hello again experts: I have been trying to apply the href tag so that when a user clicks on the title or loc fields, the user will be taken to the details section of the calendar. I am not having any luck. Can you please, please help? Here is the copy I am working on. Many thanks, echo "<a class=smallcalmth target=_WINPOP href=" ; echo "'"."cal_day.php?op=day&catview=".date("Y-m-d", mktime(0,0,0,$smmonth,$i,$smyear))."'>" ; echo "<table border=0 cellspacing=0 cellpadding=0 width=100%>" ; while ($row = mysql_fetch_object($result)){ echo "<tr><td align=center valign=top>" ; echo "<table class=eventborder cellspacing=0 cellpadding=0 width=100%><tr>"; if ($notimeentry==0) { echo "<td align=center class=eventtimeborder valign=top>" ; echo "<div class=smallcalevtime>"; if ($row->starttime=='') echo " " ; else showtime($row->starttime,$row->endtime,1); echo "</div>" ; echo "</td>" ; } echo "<td align=left valign=top width=80% class=eventborder>" ; echo "<div class=smallcalev><b>Subject:</b> "; echo subquot(stripslashes($row->title)); echo "</div>" ; echo "<div class=smallcalev><br/></div>" ; echo "<div class=smallcalev>@ "; echo subquot(stripslashes($row->loc)); echo "</div>" ; echo "</td></tr>" ; echo "</table>" ; } echo "</table>" ; // overlib line echo "',FGCOLOR,'$overlibbgclr',TEXTSIZE,'1',WIDTH,'180',VAUTO,HAUTO);\" onmouseout=\"return nd();\">"; } echo "<div class='datenumfont'>".$i."</div>" ; if ($devtcnt!=0) echo "</a>"; echo "</td>\n\n"; $a++;
  3. To add to your comments, even on a php server, saving the iframe as something.htm still doesn't work. I take that back. It works with a .htm extension as long as it is on a php server. Thanks for your help
  4. Thanks Thorpe for your prompt response. I suppose I didn't explain it well. That, I think, may explain why you moved it to html page. Is there another way to write include("smallcal.php") For instance, if I put it in an iframe like you suggested like this: <table> <tr> <td align="center"><br> <IFRAME SRC="smallcal.php" NAME="Mini Calendar" FRAMEBORDER=0 SCROLLING=auto WIDTH="250" HEIGHT="210" MARGINHEIGHT=0 MARGINWIDTH=10 ALIGN=TOP> </IFRAME> </td> <td align="justified" valign="middle"><br> </td> </tr> </table> As you can see, I can't save this file as smallcal.php because the page I want to display it on is not a php server. If I save it as smallcal.htm, I get the php text, not the calendar. Hope my explanation is clearer. Again, thanks,
  5. Hello experts, Please bear with me for a somewhat silly question. This code below works fine when placed on a php server. echo "<table border=1 align=center width=300><tr><td>"; include ("smallcal.php"); echo "</td></tr></table>"; It allows us to place a mini calendar on the home page of our website. However, we would like place this mini calendar on another server that is not a php server. Is there any way place this calendar on another page on another server? In other words, instead of include("smallcal.php"), can this snip be written to something like <a href="http://servername/calendar/smallcal.php"??? Thanks in advance
  6. Even after I defined $words and assigned a value to it, it still shows nothing, man!
  7. Thank you very much for your assistance. I believe I have made the change but still blank screen. I am very new to this and your assistance is greatly appreciated. <? // numbers to words function // example: 7 -> seven // works with 0 to 15 inclusive //Anything below 0 or greater than 15 invites an error function numbertowords($str){ $words = array(1 => "one", 2 => "two", 3 => "three", 4 => "four", 5 => "five", 6 => "six", 7 => "seven", 8 => "eight", 9 => "nine", 10 => "ten", 11 => "eleven", 12 => "twelve", 13 => "thirteen", 14 => "fourteen", 15 => "fifteen" ); foreach($words as $key => $val){ if(strtolower($str) == $key || $str == $val){ return $val; } } return '';// returns nothing } echo numbertowords($words),"<br>"; ?>
  8. Thanks a lot for the prompt response but it didn't fix the problem. I would like to be able to see the results displayed on the screen.
  9. Hello all, I thought this would be pretty simple. I need to convert numbers 1 to 15 to words and then write out the words. e.g, 1 converted to One, 2 converted to Two, etc Here is the code. I am not getting any errors; just not seeing results being displayed. Thanks a lot for your assistance. <? // numbers to words function // example: 7 -> seven // works with 0 to 10 inclusive //Anything below 0 or greater than 10 invites an error function numbertowords($str){ $words = array(1 => "one", 2 => "two", 3 => "three", 4 => "four", 5 => "five", 6 => "six", 7 => "seven", 8 => "eight", 9 => "nine", 10 => "ten", 11 => "eleven", 12 => "twelve", 13 => "thirteen", 14 => "fourteen", 15 => "fiften): ); foreach($words as $key => $val){ if(strtolower($str) == $key || $str == $val){ return $val; } } return '';// returns nothing echo numbertowords($words),"<br>"; } ?>
  10. hi Teamatomic I know I said last question but this is a followup. Can the comparison be made with the startdates on the array we just used: I was hoping to comare today's date with the dates on this array: <?php$projects=array();$projects['Job_number_1']['Company']='Jammer Construction';$projects['Job_number_1']['title']='application';$projects['Job_number_1']['start']='01-23-2010';$projects['Job_number_1']['end']='01-27-2010';$projects['Job_number_2']['Company']='Star Light Entertainment';$projects['Job_number_2']['title']='website';$projects['Job_number_2']['start']='12-03-2009';$projects['Job_number_2']['end']='12-14-2009'; My problem is how to use the if statement. For instance, if $projects['Job_number_1']['start'] > todays date then show but I know that that is the wrong way to use it but I am hoping to go that route. Thanks very much for your kindness and patience.
  11. If I could ask just *ONE* more question, just one, I promise, please???? For each project in $projects, I want to check if the project startDate is greater than today's date and then I want to print out those projects. If you have time, please help. Thank you so very much. BTW: How do you mark a thread as solved?
  12. You are an angel. May the good Lord Bless you for your kindness. Thanks a lot Teamatomic This is my second thread on this forum. It is the most helpful I have been to so far.
  13. Thanks so much. Without asking for too much, can you please show me an example of how to iterate through your sample code and print the results? I am grateful for your assistance.
  14. Thanks a lot Teamatomic for your response and your kindness. What I had in mind with the array I was trying to create is to iterate through it and print out the information. Can I do that with what you have come up with it? Sorry, please forgive my cheap questions. I am pretty new to php.
  15. Hello, again, I have an array of projects called $sprojects to store information about project title, project name, proect start date and project completion date for all the projects I have done so far which is 8 projects. This is what I have so far: $sprojects = array (0 => "project Name", "1" => "Title","2" => "Startdate"","3" => "enddate"); My question is this, I am asked to do this for 8 projects. Is this all I need? Thanks good people for your kindness.
  16. Ok, in that case, let's leave it like it is now. I thank you so very much for your help. You have been and angel. My first time here and I am really impressed. Thank you.
  17. hi gwolgamott, Please ignore the first part of my issue which says the those who are FT are not getting their departments printed. That is working. It turns out that PHP is case sensitive. I didn't know that till but then again, I am just using for the second day in my entire life. I still need help with the array. Thanks a lot
  18. Yes, very very close. Just having a minor issue. I am getting results like: It is not showing the dept for those in FT which is IT. It just reads, John Peters is male (Nothing else is showing). Those in Administration are showing correctly as Jane Doe is female & is in Administration. And while we are at it, is possible to incorporate one very nice idea from taquitosensei? He made this declaration first: $depts=array("PT"=>"IT","FT"=>"Administration"); Again, thanks very much.
  19. I really appreciate your help. AND NO, you can't be this good and be a dummy at same time. What I have learned early in life is that the sharpest people beat themselves up a lot. I don't know why.
  20. hi gwolgamott, Yes, that is correct. There are several employees. The goal is to run a check to say, if employmentType is FT, then IT else Administration. Then these results are printed out line by line. Thanks again, very, very much
  21. Thanks a bunch guys for your prompt response and for your kindness. I appreciate the code very much. What I really would like to do before printing our results is to perform a check. If employmentType = FT then employee is in IT else employee is in Administration. I don't see the if. You may have done it differently but my newbieness may be the reason why I can't see. Also, when I tested taquitosensei's script, it displayed all the names but only displayed one dept. For instance, the result looks like this: John Peters FT Jane Doe PT IT See that Dept is not being displayed for those employees who are Fulltime(FT). gwolgamott, I will test yours in a sec. Again, thanks to both you, very much
  22. Greetings experts: I am an extreme newbie in PHP and so, please, please be gentle. I gobbled up this script that prints out employee name, sex, and dept. What I really would like help on is how to add an if conditional. For instance, rather than display the records as they are being displayed now like: Employee Name EmploymentType Dept John Peters PT IT Jane Doe FT Administration, I would like an if statement like: If EmploymentType = 'PT' Then $Employee is in IT else $Employee is in Administration end if Then I will list out employees and the depts they are in like: Jane Doe is in Administration John Peters is in IT etc etc I am having the biggest problem with integrating the IF statement with the code below. Thanks a lot in advance. <?php $db_conn = new COM("ADODB.Connection"); $connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("./DB/tbltDiv.mdb").";"; $db_conn->open($connstr); $sql = 'SELECT EployeeName, employmentType, Dept FROM DIVISIONS ORDER BY Dept'; $rs = $db_conn->Execute($sql); ?> <table> <tr> <th>Employee Name</th> <th>employment Type</th> <th>Dept</th> </tr> <?php while (!$rs->EOF) { ?> <tr> <td><?php echo $rs->Fields['EmployeeName']->Value ?></td> <td><?php echo $rs->Fields[employmentType]->Value ?></td> <td><?php echo $rs->Fields['Dept']->Value ?></td> </tr> <?php $rs->MoveNext() ?> <?php } ?> </table> <?php $rs->Close(); $db_conn->Close(); $rs = null; $db_conn = null; ?>
×
×
  • 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.