/adei/ui

To get this branch, use:
bzr branch http://darksoft.org/webbzr/adei/ui

« back to all changes in this revision

Viewing changes to classes/mask.php

  • Committer: Suren A. Chilingaryan
  • Date: 2008-04-02 10:23:22 UTC
  • Revision ID: csa@dside.dyndns.org-20080402102322-okib92sicg2dx3o3
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
class MASK {
 
4
 var $name;
 
5
 var $ids;
 
6
 
 
7
 function __construct(&$props = NULL) {
 
8
    if (($props)&&(isset($props["db_mask"]))&&($props["db_mask"]!="")) {
 
9
        $this->ids = split(",", $props["db_mask"]);
 
10
        if (count($this->ids)) {
 
11
            $this->name = "custom";
 
12
        } else {
 
13
            $this->ids = false;
 
14
            $this->name = "all";
 
15
        } 
 
16
    } else {
 
17
        $this->ids = false;
 
18
        $this->name = "all";
 
19
    }
 
20
 }
 
21
 
 
22
 function Check($id) {
 
23
    if (($this->ids===false)||(in_array($id, $this->ids))) return true;
 
24
    return false;
 
25
 }
 
26
}
 
27
?>
 
 
b'\\ No newline at end of file'