Пример #1
0
<!DOCTYPE html>

<?php 
include_once 'php/PersonView.php';
include_once 'php/LoginManager.php';
if (isset($_GET['id'])) {
    $id = filter_input(INPUT_GET, 'id');
    $view = new PersonView($id);
    $login = new LoginManager("person.php?id={$id}");
    $return = "../person.php?id={$id}";
} else {
    header("Location: index.php");
    exit;
}
?>

<html>
    <head>
        <meta charset="UTF-8">
        <title><?php 
echo $view->getTitle();
?>
</title>
        <link rel="stylesheet" href="style/main.css">
        <link rel="stylesheet" href="style/movie.css">
        <link rel="stylesheet" href="style/person.css">
        <link rel="stylesheet" href="style/overlay.css">
        <link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/notify/0.4.0/notify.min.js"></script>
        <script src="script/notifications.js"></script>
Пример #2
0
<?php

require_once dirname(__FILE__) . '/configuration.php';
require_once dirname(__FILE__) . '/PersonView.php';
require_once dirname(__FILE__) . '/Person.php';
if (isset($_GET['idPerson']) && is_int($_GET['idPerson']) && $_GET['idPerson'] > -1) {
    require_once dirname(__FILE__) . '/Person.php';
    $person = new Person();
    $person->setIdPerson($_GET['idPerson']);
    $person->setCompletePerson();
    //$body = PersonView::buildListItem;
} else {
    $title = 'Inimeste nimed';
    $persons = Person::getPersons();
    $body = PersonView::buildList(array('persons' => $persons));
}
require_once dirname(__FILE__) . '/PageView.php';
echo PageView::buildPage(array('title' => $title, 'body' => $body));
Пример #3
0
            break;
    }
    header("Location: {$PHP_SELF}?id={$model->id}&action=1");
}
include 'header.php';
echo '<p><font class=title>Person</font></p>';
if (isset($find)) {
    $result = $model->result($find);
    $view = new PersonView(&$model);
    $view->browse($result);
    die;
}
if (isset($id)) {
    $model->select($id);
}
$view = new PersonView(&$model);
if (!isset($action)) {
    $action = 0;
}
$view->edit($action);
class PersonModel
{
    var $id;
    var $name;
    var $addr;
    var $country;
    var $status;
    function setData($id, $name, $addr, $country, $status)
    {
        $this->id = strtoupper($id);
        $this->name = strtoupper($name);