Jump to content

dc_jt

Members
  • Posts

    290
  • Joined

  • Last visited

    Never

Everything posted by dc_jt

  1. Is there a way of hiding a div without clicking a button? Basically ive got a form which when complete needs to be hidden. The way its set up is this: 1. Got the main form in register page. 2. This posts to userRegister page (within a div) where all validation is done and form gets saved to database etc. However, at the bottom I set a thank you for registering p tag to show instead of the form. At the moment it just displays above the form (as that is where this div is) but I need the form div to be hidden so that when its complete the form dissapears and you just have the thank you message. Hope this makes sense and someone can help. Thanks
  2. dc_jt

    Text Only

    Thanks for the reply, just wondering what would be the best way to use the session. Shall I just refresh the page using $_SERVER['REQUEST_URI'] or send to a separate page and direct back to the page they clicked?
  3. Hi I tried searching but couldnt find anything relevant. I was wondering what the best way is to do a switch between text only and a graphical version of a dynamic website? Is it to basically set a session and switch between the two css style sheets depending on the session? Thanks
  4. Hi Can someone please help me with PHP DIG. Ive tried their forum but there isnt much activity so thought I would try here. Basically ive got it all setup on my local server and it works fine. Now ive set it up on my live server and it wont index the site. I have tried indexing other sites and they work but my one wont. When I go into /phpdig/admin/index.php and I enter the URL and click 'Dig This' it takes about 10 minutes and then doesnt find anything. Please someone help, I need to put this site live this morning Cry Thanks
  5. Sorry, I will do, thanks
  6. Hi Can someone please help me with PHP DIG. Ive tried their forum but there isnt much activity so thought I would try here. Basically ive got it all setup on my local server and it works fine. Now ive set it up on my live server and it wont index the site. I have tried indexing other sites and they work but my one wont. When I go into /phpdig/admin/index.php and I enter the URL and click 'Dig This' it takes about 10 minutes and then doesnt find anything. Please someone help, I need to put this site live this morning :'( Thanks
  7. Its ok I got it using <?php for($i = 0;$i<12;$i++){ $time = strtotime("today - $i months");?> <li><a href="<?=$_SERVER['PHP_SELF']?>?iMonth=<?=date("m",$time)?>"><?=date("M",$time)?></a></li> <?php } ?> Thanks anyway
  8. Hi Im looking to list all months of the year in reverse order for example for this month it will list like November October September August July June May April March Feb Jan December I have done the following which gets it in normal order Jan-Dec: $mnths = array('','January','February','March','April','May','June','July','August','September','October','November','December'); <?php for ($i=1;$i<=12;$i++) {?> <li><a href="<?=$_SERVER['PHP_SELF']?>?iMonth=<?=$i?>"><?=$mnths[$i]?></a></li> <?php }?> Anyone help? Thanks
  9. Hi I dont think you quite understand what I mean. I know how to get all the columns but I want to return the table NAME (news and regional) as well as the columns. Therefore, when each column is returned as: id, title, content id, title, content it will be returned as news, id, title, content regional, id, title, content So when it is ouput I can see which colums have come from which table. Any idea?? Thanks
  10. Hi my code is below: I am returning all fields from news and from regional, however I want to determine where the fields have come from when I ouput the data, therefore I need to return the table name with the fields. Is this possible? Something like SELECT *, tablename from news...??? $sSql = "SELECT * from news WHERE publish_date <= '$now' AND hide = '0' UNION SELECT * from regional WHERE publish_date <= '$now' AND hide = '0' ORDER BY publish_date DESC LIMIT 30";
  11. Thanks but will this still track that a user has clicked the url blahblah.com/blah/ ??
  12. Hi I want to redirect a url to the homepage but still track this in google analytics. Therefore my page, www.blahblah.com/blah/ needs to redirect to www.blahblah.com/index.php so I have created a folder called blah and index.php which only contains: <?php die(header("Location: /index.php")); ?> This redirects the user back, however will this still be tracked in google analytics? I need a quick answer please. Thanks
  13. Hi I have a template html form which contains for example name and address. When I am viewing this person I want to click a button which will fill in this form with the relevant name and address and then email it to an email address. I would prefer to attach this form in a pdf format. Is this possible? Thanks
  14. Basically I have installer_id and revisit_installer_id These are stored in the jobs table. I want to link each of these to the installer table, something like: LEFT OUTER JOIN installers ON jobs.installer_id = installers.installer_id But I also need to join installers ON jobs.revisit_id = installers.installer_id This isnt right though. How do I do this? Thanks
  15. hi im using the following ticker which used to have an a link on it but i want to remove it, therefore i have just changed the location to #. However, I want to remove the link altogether. I tried removing var theSiteLinks = new Array(); and print('theSiteLinks['.$i.'] = "'.htmlentities('#').'";'."\n"); but then the ticker wouldnt work. any suggestions? thanks <?php require_once($_SERVER['DOCUMENT_ROOT'].'/config.inc.php'); require_once(LOCAL_CLASSES.'/Tables/RCLTblTicker.class.php'); $oTblTicker = new RCLTblTicker(); //$db = new RCLDB; $query = $oTblTicker->GetTicker(); // $result = mysql_query("SELECT * FROM news WHERE live='1' ORDER BY date_added DESC LIMIT 4",$db); $num_rows = mysql_num_rows($query); if($num_rows > 0) { ?> <div id="ticker_area"> <div class="ticker_area_label">LATEST NEWS</div> <div class="ticker_text"> <a id="tickerAnchor" href="#" target="_top"></a> <script language="JavaScript" type="text/javascript" src="tickerEngine.js"></script> <script language="JavaScript" type="text/javascript"> <!-- var theCharacterTimeout = 50; var theStoryTimeout = 5000; var theWidgetOne = "_"; var theWidgetTwo = "-"; var theWidgetNone = ""; var theLeadString = ""; var theSummaries = new Array(); var theSiteLinks = new Array(); var theSiteWindows = new Array(); var theItemCount = <?=$num_rows?>; <?php $i = 0; while($oquery = mysql_fetch_object($query)) { print('theSummaries['.$i.'] = "'.$oquery->title.'";'."\n"); print('theSiteLinks['.$i.'] = "'.htmlentities('#').'";'."\n"); print('theSiteWindows['.$i.'] = '.($line['new_window'] == 1 ? "true" : "false").";\n"); $i++; } ?> startTicker(); //--> </script> <?php } ?></div> </div>
  16. Hi I want to format the following so that each heading is in bold how would I do that: Also I want to add a title at the beginning (where I have put TITLE HERE) $message = 'The following information has been submitted through the contact form:'."\n"."\n". (TITLE HERE) 'Type of Enquiry: ' .$enquiry_type."\n". 'Title: ' .$title."\n". 'First Name: ' .$first_name."\n". 'Surname: ' .$surname."\n". 'Email: '.$email."\n". 'Address: '.$address."\n". 'City/Town: '.$city_town."\n". 'County: '.$county."\n".'Postcode: '.$postcode."\n". 'Telephone: '.$telephone."\n". 'Mobile: '.$mobile."\n". 'Telephone: '.$telephone."\n". 'How did you hear about us?: '.$heard_from."\n". 'Areas of Interest: '.$areas_of_interest[0].$areas_of_interest[1].$areas_of_interest[2].$areas_of_interest[3].$areas_of_interest[4]. 'Enquiry: '.$enquiry."\n". 'E-News Signup: '.$newsletter; Thanks
  17. Hi I have the following submit buttons on my form. One checks if all answers are entered, the other doesnt. (The draft = 1 doesnt check, draft = 0 does). However, they both seem to post draft as 0, even when I click the Submit button and not the Save button, does anyone know why? Thanks <p align="right"><input name="Save" type="submit" class="formbutton" value="SAVE" /></p> <input type="hidden" name="mode" value="apply" /> <input type="hidden" name="iStaffId" value="<?=$_GET['iStaffId']?>" /> <input type="hidden" name="iPhaseId" value="<?=$_GET['iPhaseId']?>" /> <input type="hidden" name="iReflectionId" value="<?=$_GET['iReflectionId']?>" /> <input type="hidden" name="draft" value="1" /> <input type="hidden" name="iReflectionCompleteId" value="<?=$getAnswer->reflection_complete_id?>" /> <p align="right"><input name="Submit" type="submit" class="formbutton" value="SUBMIT" /></p> <input type="hidden" name="mode" value="apply" /> <input type="hidden" name="iStaffId" value="<?=$_GET['iStaffId']?>" /> <input type="hidden" name="iPhaseId" value="<?=$_GET['iPhaseId']?>" /> <input type="hidden" name="iReflectionId" value="<?=$_GET['iReflectionId']?>" /> <input type="hidden" name="draft" value="0" /> <input type="hidden" name="iReflectionCompleteId" value="<?=$getAnswer->reflection_complete_id?>" />
  18. Hi heres the scenario: There are 3 documents 1,2 and 3 Person A completes document 1 on 1/1/2007, document 2 on 2/1/2007 and document 3 on 3/1/2007 Therefore, completes them all by 3/1/2007 Person B completes document 1 on 4/1/2007, document 2 on 2/1/2007 and document 3 on 3/1/2007 Therefore, completes them all by 4/1/2007 This is held in a table like id person_id document_id date_completed How do I order them by who completed them all first? Hope someone can help Thanks
  19. *UPDATE* I have realised now, everyone who lands in $aCulpritStaff[] = $aStaff;, I need to remove from $aCompletedGroups because these people have not completed all groups. Therefore, how would I loop through $aCulpritStaff and remove these from aCompletedGroups ?? Thanks
  20. Hi Now listen carefully, this could get complicated. I have to find all staff who have submitted ALL groups on time for a particular phase. If you see my code below, you can see what ive done so far. This only results in showing staff who have NOT completed all groups on time. If I take the ! off if (!$aCompletedGroups[$aStaff['staff_id']][$aGroup['reflection_id']]) then this could still find staff members who have completed 2 out of 3 because this looks for staff who have completed any not all. If you dont understand fully, let me know and Ill try and explain in more detail but you should be able to see by my code what Im trying to do. Thanks By the way reflection_id is basically group_id. $aCulpritStaff = array(); //Get all completed groups for this phase. $aGetCompletedGroups = $oTblReflections->GetCompletedGroups($_GET['iPhaseId']); //Loop through each completed group and set $aCompletedGroups array as a row. foreach ($aGetCompletedGroups as $aRow) { $aCompletedGroups[$aRow['staff_id']][$aRow['reflection_id']] = 1; } //Get all staff for this course $aGetStaff = $oTblStaff->GetCourseStaff($_GET['iCourseId']); //Get all groups for this phase $aGetGroups = $oTblReflections->GetAllGroups($_GET['iPhaseId']); //Loop through each staff member foreach ($aGetStaff as $aStaff) { //Loop through each document foreach ($aGetGroups as $aGroup) { //If $aCompletedGroups array doesnt match the $aCompletedGroups set above using the staff loop and //the group loop to populate it, then add this staff member to the $aCulpritStaff array which holds all data //on staff member. if (!$aCompletedGroups[$aStaff['staff_id']][$aGroup['reflection_id']]) { $aCulpritStaff[] = $aStaff; break; } } }
  21. Sorry think Ive found it, does the array_unique function do this? Thanks Edit: No this doesnt work Anyone?
  22. Thanks for the help, I think this is what Im looking for. One question though, when I am getting all documents which have been downloaded how do I prevent the array showing more than one of the same document id? For example, if someone downloads the document 10 times it will show in the array 10 times, I just want it to be included in the array once? Thanks
  23. Right so far ive got an array of all staff members for the course. All documents for the phase in an array. And all documents for that phase that have been downloaded in an array. Not sure what to do next though. Check the downloaded array against the 'All documents' array somehow? Thanks
  24. Hi I need to find all staff members who have not downloaded ALL documents for a particular phase. I.e Each staff member is linked to a course and each course has many phases. E.g Course 1 contains Phase A which has documents 1,2,3,4, Phase B has documents 5,6,7,8 I need to find all staff members from this course who havent downloaded all documents for a particular phase. I.e All staff from course 1 who havent downloaded documents 1,2,3 AND 4. I have a document_download table which stores when a staff member downloads a document like: document_download table id staff_id document_id date_downloaded staff table staff_id name address etc Course table course_id name etc Phase table phaase_id course_id etc Document table document_id name Im not sure whats the best way either in a query or using while loops or something but I really need help on this. Thanks in advance
×
×
  • 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.