/adei/trunk

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

« back to all changes in this revision

Viewing changes to classes/welcome.php

  • Committer: Suren A. Chilingaryan
  • Date: 2009-02-07 08:54:17 UTC
  • Revision ID: csa@dside.dyndns.org-20090207085417-b088uxuvcz49ezqy
Massive rewrite of DRAW (unfinished): multiple groups and axis

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
2
 
3
 
class WELCOME {
 
3
require($ADEI_ROOTDIR . "/classes/drawtext.php");
 
4
 
 
5
 
 
6
class WELCOME extends DRAWText {
4
7
 var $req;
5
8
 var $height, $width;
6
9
 var $graph;
9
12
 var $ready;
10
13
 
11
14
 function __construct(REQUEST $req = NULL) {
12
 
    global $TMP_PATH;
13
 
    global $GRAPH_DEFAULT_HEIGHT;
14
 
    global $GRAPH_DEFAULT_WIDTH;
15
 
    
16
 
    if ($req) $this->req = $req;
17
 
    else $this->req = new REQUEST();
18
 
    
19
 
 
20
 
    if (isset($this->req->props['height'])) $this->height = $this->req->props['height'];
21
 
    else $this->height = $GRAPH_DEFAULT_HEIGHT;
22
 
    if (isset($this->req->props['width'])) $this->width = $this->req->props['width'];
23
 
    else $this->width = $GRAPH_DEFAULT_WIDTH;
24
 
 
25
 
    $this->tmpfile = $this->GetTmpFile();
 
15
    parent::__construct($req);
26
16
 
27
17
    if (is_file($TMP_PATH . "/" .  $this->tmpfile)) $this->ready = true;
28
18
    else $this->ready = false;
32
22
    global $ADEI_SESSION;
33
23
    global $TMP_PATH;
34
24
 
35
 
 
36
 
    $props = $this->req->props;
37
 
    unset($props['window']);
38
 
    unset($props['format']);
39
 
    unset($props['mask_mode']);
40
 
    unset($props['resample']);
41
 
    unset($props['filename']);
42
 
 
43
25
    $dir = "clients/" . $ADEI_SESSION . "/";
44
26
 
45
27
    if (!is_dir($TMP_PATH . "/" .  $dir)) {
121
103
*/    
122
104
//    $text->Stroke( $this->graph->img); 
123
105
 }
124
 
 
125
 
 function Save($file = false) {
126
 
    global $TMP_PATH;
127
 
 
128
 
    if ($this->ready) {
129
 
        if ($file) {
130
 
            copy($TMP_PATH . "/" .  $this->tmpfile, $file);
131
 
            return true;
132
 
        }
133
 
 
134
 
        return $this->tmpfile;
135
 
    }
136
 
 
137
 
    if ($file) {
138
 
        $this->graph->Stroke($file);
139
 
        return true;
140
 
    }
141
 
 
142
 
    $this->graph->Stroke($TMP_PATH . "/" . $this->tmpfile);
143
 
    return $this->tmpfile;
144
 
 }
145
 
 
146
 
 static function Display($file = false) {
147
 
    global $TMP_PATH;
148
 
    
149
 
    if ($file) {
150
 
        if (preg_match("/^[A-Za-z0-9\/_]\.png$/",$str)) return false;
151
 
        return @readfile($TMP_PATH . "/" . $file);
152
 
    }
153
 
 
154
 
    return false;    
155
 
 }
156
106
}
157
107
 
158
108
?>
 
 
b'\\ No newline at end of file'