Jump to content

erayfield

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

erayfield's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. It sounds like you need the following: registration --- web page form for following information- student first, student last, student middle, student email, username, password, parent1 Name, parent1 email, parent2 Name, parent2 email table with those columns, plus a primary key ---- log in page -containing user name and password -->check against username password, get primary key from table (userPK) -------------------------------------////// teacher interface - username and password if there is just one teacher, you could just make a private location that only the user would have access to --- web page allowing the input of demerits - I'd just do a drop down for students, if there are under 45 of them, drop down for ActionID , NumberDemerit interface would need Student ID Date ActionID NumberDemerit Merit table with same information as above table Actions- ActionID, ActionDescription, NumberDemerits Then you would program the rest do the rest - each time the student logs in you could check if they have a merit or not, each time a student has a demerit, verify their total count is less that 6, if == 6 send out email. You could send out a warning if student is at 4 if you wanted. That's a rough draft, start at one point and just keep going forward. so, 3, maybe 4 tables in database pages - 6 login for student login for teacher ---- text for email display page for student page for input of demerits when user logs out, page that says they are logged out maybe a splash page-
  2. I commented out your first display call, that is what was showing the first echo, then, since I didn't know where you were getting for ob_get_content(), just threw in a string to be returned - try this: <?php class Template { /************************************************* * echos out the passed in data * @param string $valueToDisplay what should be the screen output * @return void *************************************************/ public function display($valueToDisplay) { echo $valueToDisplay; } /************************************************* * replaces the variable with the value * * @param string $variable - what should be replaced * @param string $value - value to insert * @return string containing value rather than variable *************************************************/ public function assign($variable, $value) { if (!is_array($value)) { ob_start(); $contents = $this->get_page(); $contents = str_replace($variable, $value, $contents); ob_end_clean(); return $contents; } } /************************************************* * gets web page, with 'placeHolder' set * * @return string of html page **************************************************/ protected function get_page() { return '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><title> placeHolder </title></head><body>hi, this is your web page, <br /><h2>placeHolder</h2></body></html>'; } } $placeHolder = "placeHolder"; $replacePlaceHolderWithThis = "replaced place holder with this string "; $template = new Template(); //$template->display($placeHolder); $page = $template->assign($placeHolder, $replacePlaceHolderWithThis); $template->display($page); ?>
×
×
  • 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.