Jump to content


  • Posts

  • Joined

  • Last visited

About ZulfadlyAshBurn

  • Birthday 04/22/1995

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ZulfadlyAshBurn's Achievements

Regular Member

Regular Member (3/5)



  1. Those are just variable names. I found a way to store the goals and task in the db and to call them back as an array which is separated by ",". The issue I'm facing is that when the page is loaded and the goal is marked as completed, the goal is added into the array before the page loads completely.
  2. I'm looking a application design. I may have something that I can work with however I'm having issue with the $_SESSION. dummy.php (To Create dummy array and store into session) <?php session_start(); $route = array(); $visited = array(); $wordlist = "goal1,goal2,goal3"; $route = array_merge($route, array_map('trim', explode(",", $wordlist))); $_SESSION['route'] = $route; $_SESSION['visited'] = $visited; ?> destroy.php (Remove all session in page to re-create new array using dummy.php) <?php session_start(); print_r($_SESSION['route']); session_destroy(); print_r($_SESSION['route']); ?> run.php (using get method eg. "run.php?id=goal1") <?php session_start(); // route is arary pulled from DB (dummy.php) $route = $_SESSION['route']; print_r($route); // visited is an array in store in session $visited = $_SESSION['visited']; print_r($visited); // result to compare the array in db and session $result=array_diff($route,$visited); print_r($result); if(isset($_GET['id'])) { if (current($result) == $_GET['id']) { array_push($visited, $_GET['id']); echo "Visited" . $_GET['id']; // update session $_SESSION['visited'] = $visited; } else { echo "Visit in order"; } } ?> The issue I'm facing currently is then when the page runs, the data(id) is stored in to the $_SESSION['visited'] before the whole page runs from the top.
  3. I'm trying to create an application where the admin is able to add mutiple goals. For example, - Goal 1 - Goal 2 - Goal 3 Once the goals have been set, he then can generate a task for users to follow the goals for a specific users. For example USER A Goal 3, Goal 2, Goal 1 USER B Goal 2, Goal 1, Goal 3 USER C Goal 1, Goal 2, Goal 3 The user have to follow the goal as set and can only proceed to the next goal one the previous one has been completed. The goals will defer everyday. Anyone can guide me to the right direction?
  4. How can I do this? 1 = 1 2 = 2 3 = 3 4 = 4 5 = 5 And the value will reset after 5 meaning 6 = 1 7 = 2 8 = 3 9 = 4 10 = 5 So when I call a function as pass 9, it will return me 4.
  5. If I worked morning shift, its shift 1. If I worked night shift, it's shift 2. There is no fixed schedule thus when they key in their entry, it checks if the time is after 1800hrs. But sometimes their shift extends to the next morning which is shift 1 but I want the shift to remain as shift 2.
  6. My mistake, added another echo instead of return on the function.
  7. Currently the code is run and the shift value is added into the database with other data. However sometimes the night shift overruns the morning shift time and thus the shift value will change to 1 instead. I was think of setting a cookie when the user logged in and store the session for 12hours. However I cannot confirm the time of their login this the 12hours cookie will overrun into the next shift.
  8. I'm creating a shift system where it stores into database which shift is the user in. However sometimes their shift extends over the other shift. How can I implement it better I'm currently using the time to get which shift they are on. There are two shift. 1) morning: 0800 - 1930hrs 2) night: 1930 - 0800hrs Sometimes the shift will overrun. How do I maintain on which shift they were. $whatshift = (int) date("Hi"); if ($whatshift > "0800" && $whatshift < "1800") { $shift = 1; } else { $shift = 2; }
  9. Managed to get CSS to work. Had to do inline CSS for it work tho.
  10. I'm unable to include the css in the PDF. I'm using TCPDF.
  11. You can implement a function to check if the time is 12:00 pm. If so, echo 12:00 noon. I've created a simple script. Hope it helps. function isNoon($format) { global $date; $timenow = date('g:i a'); if ($timenow == "12:00 pm") { echo date('l, F j\,') . " 12:00 noon"; } else { return $date->format($format); } } To adapt this into your code, you can try this. <?php $tas_start_datetime = tribe_get_start_date(); function isNoon($format) { global $date; $timenow = date('g:i a'); if ($timenow == "12:00 pm") { echo date('l, F j\,') . " 12:00 noon"; } else { return $date->format($format); } } ?><strong>Los Angeles, USA: </strong><?php $date = new DateTime($tas_start_datetime, new DateTimeZone('America/Los_Angeles')); echo isNoon('l, F j\, g:i a') . "\n"; ?><br/><strong>Detroit, USA: </strong><?php $date->setTimezone(new DateTimeZone('America/Detroit')); echo isNoon('l, F j\, g:i a') . "\n"; ?><br/><strong>Accra, Ghana: </strong><?php $date->setTimezone(new DateTimeZone('Africa/Accra')); echo isNoon('l, F j\, g:i a') . "\n"; ?><br/><strong>London, UK: </strong><?php $date->setTimezone(new DateTimeZone('Europe/London')); echo isNoon('l, F j\, g:i a') . "\n"; ?><br/><strong>Lagos, Nigeria: </strong><?php $date->setTimezone(new DateTimeZone('Africa/Lagos')); echo isNoon('l, F j\, g:i a') . "\n"; ?><br/><strong>Auckland, New Zealand: </strong><?php $date->setTimezone(new DateTimeZone('Pacific/Auckland')); echo isNoon('l, F j\, g:i a') . "\n"; ?>
  12. I have created a PHP page where the contents are pulled from DB. Is there a way that I can save the file with the output and stylesheet to PDF with a click of a button.
  13. There is no page title?! EDIT: Design looks and but also looks the old o.0 Only one page done? Design is nice though
  14. Why would you need it in the first place? Do you know how it works and what it is for?
  15. For you to upload and download files from your server. See more
  • 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.