Esempio n. 1
0
File: index.php Progetto: cfhb/MIS
 public function __construct($value = '')
 {
     $this->_model = "computers_model";
     $this->_catid = 20;
     parent::__construct();
     # code...
 }
Esempio n. 2
0
File: index.php Progetto: cfhb/MIS
 public function __construct($value = '')
 {
     $this->_model = "office_model";
     $this->_catid = 22;
     parent::__construct();
     # code...
 }
Esempio n. 3
0
<?php

$page_title = 'Редактирование должности';
$id = intval(get_request_variable('id', 0));
$name = get_request_variable('name', '');
$remark = get_request_variable('remark', '');
$save = get_request_variable('save', '');
$_REQUEST['callback'] = get_request_variable('callback', '');
$office = new office();
$office->id_office = $id;
if ($id > 0) {
    if (!$office->Load()) {
        $office->id_office = 0;
    }
}
if ($save) {
    $office->name = $name;
    $office->remark = $remark;
    $errors = $office->IsValidData();
    if (count($errors) == 0) {
        $db = db_class::get_instance();
        $db->begin();
        $office->Save();
        $db->commit();
    }
}
include SITE_FILE_ROOT . 'template/simple_header.php';
include SITE_FILE_ROOT . 'template/' . $STORAGE['module'] . '/' . $STORAGE['action'] . '.php';
include SITE_FILE_ROOT . 'template/simple_footer.php';
Esempio n. 4
0
<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
class office
{
    public function documentWrite()
    {
        echo "I am document writ" . "<br>";
        return $this;
    }
    public function ducomentRead()
    {
        echo "I am document read." . "<br>";
        return $this;
    }
    public function documentPrint()
    {
        echo 'I am document printing.' . "<br>";
        return $this;
    }
}
$word = new office();
$word->documentWrite()->ducomentRead()->documentPrint();
Esempio n. 5
0
<?php

$page_title = 'Удаление должности';
$errors = array();
$id = intval(get_request_variable('id', 0));
$_REQUEST['callback'] = get_request_variable('callback', '');
$office = new office();
$office->id_office = $id;
if ($id > 0) {
    if ($office->Load()) {
        $errors = $office->IsValidData();
        if (!$errors) {
            $office->Delete();
        }
    }
}
include SITE_FILE_ROOT . 'template/simple_header.php';
include SITE_FILE_ROOT . 'template/' . $STORAGE['module'] . '/' . $STORAGE['action'] . '.php';
include SITE_FILE_ROOT . 'template/simple_footer.php';