Esempio n. 1
0
<?php

session_start();
require_once "../libs/datafilter.php";
// validation form data function
require_once "../config/Autoload.php";
//load function to startup classes
if (isset($_POST['father_job'])) {
    Family_father::done_job($_POST['job_id']);
    //update job status in DB
    $_SESSION['info1'] = 'Job is done';
    //user info
    header("Location: ../main.php");
}
<?php

session_start();
require_once "../libs/datafilter.php";
// validation form data function
require_once "../config/autoload.php";
//load function to startup classes
if (isset($_POST['father_job'])) {
    $Father = new Family_father();
    $Father->done_job($_POST['job_id']);
    //update job status in DB
    $_SESSION['info1'] = 'Job is done';
    //user info
    header("Location: ../main.php");
}
Esempio n. 3
0
<?php

session_start();
require_once "./access/access.php";
//Access to the page
require_once "./config/Autoload.php";
//load function to startup classes
$Family = new Family_job();
//create an object of class Family_job (to display all work)
$all_job = $Family->select_all();
//variable (to display all work)
//$Father = new Family_father();         //create an object of class Family_father (to display all father work)
$all_father_job = Family_father::all_job();
//variable (to display all Father work)
$Mother = new Family_mother();
//create an object of class Family_mother (to display all mother work)
$all_mother_job = $Mother->all_job();
//variable (to display all Mother work)
$Child = new Family_child();
//create an object of class Family_child (to display all child work)
$all_child_job = $Child->all_job();
//variable (to display all Child work)
$all_family_member = Family_members::select_all_member();
// select all fammily member
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
     $query = Family_mother::insert($job_id, $member_id, $job_title);
     //call the  method to check user data in MySQL Table
     Family_job::Update($job_id, $f_member);
     //call the method to save in DB the name of the employee
     if ($query === TRUE) {
         $_SESSION['info'] = 'New job add';
         header("Location: ../main.php");
     } else {
         $_SESSION['info'] = 'Error';
         header("Location: ../main.php");
     }
 }
 if ($member_id == 2) {
     //keep the job father
     //$Add_job = new Family_father(); //create ogject of registr_user class
     $query = Family_father::insert($job_id, $member_id, $job_title);
     //call the class method to check user data in MySQL Table
     //$Job_performs = new Family_job();                //create an object of class Family_job
     Family_job::Update($job_id, $f_member);
     //call the method to save in DB the name of the employee
     if ($query === TRUE) {
         $_SESSION['info'] = 'New job add';
         //user info
         header("Location: ../main.php");
     } else {
         $_SESSION['info'] = 'Error';
         //user info
         header("Location: ../main.php");
     }
 }
 if ($member_id == 3) {
Esempio n. 5
0
<?php

session_start();
require_once "./access/access.php";
//Access to the page
require_once "./config/autoload.php";
//load function to startup classes
$Family = new Family_job();
//create an object of class Family_job (to display all work)
$all_job = $Family->select_all();
//variable (to display all work)
$Father = new Family_father();
//create an object of class Family_father (to display all father work)
$all_father_job = $Father->all_job();
//variable (to display all Father work)
$Mother = new Family_mother();
//create an object of class Family_mother (to display all mother work)
$all_mother_job = $Mother->all_job();
//variable (to display all Mother work)
$Child = new Family_child();
//create an object of class Family_child (to display all child work)
$all_child_job = $Child->all_job();
//variable (to display all Child work)
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Домашние заметки</title>
     //call the  method to check user data in MySQL Table
     $Job_performs = new Family_job();
     //create an object of class Family_job
     $Job_performs->Update($job_id, $f_member);
     //call the method to save in DB the name of the employee
     if ($query === TRUE) {
         $_SESSION['info'] = 'New job add';
         header("Location: ../main.php");
     } else {
         $_SESSION['info'] = 'Error';
         header("Location: ../main.php");
     }
 }
 if ($f_member == 'father') {
     //keep the job father
     $Add_job = new Family_father();
     //create ogject of registr_user class
     $query = $Add_job->insert($job_id, $job_title);
     //call the class method to check user data in MySQL Table
     $Job_performs = new Family_job();
     //create an object of class Family_job
     $Job_performs->Update($job_id, $f_member);
     //call the method to save in DB the name of the employee
     if ($query === TRUE) {
         $_SESSION['info'] = 'New job add';
         //user info
         header("Location: ../main.php");
     } else {
         $_SESSION['info'] = 'Error';
         //user info
         header("Location: ../main.php");