Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdataStructs.php
More file actions
Latest commit
executable file
·85 lines (80 loc) · 2.24 KB
/
Copy pathdataStructs.php
File metadata and controls
executable file
·85 lines (80 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
class User{
private$userName;
private$PasswordHash;
private$homeFolder;
private$Promitions;
function__construct($NewUserName, $NewPasswordHash, $NewPromitions){
$this->userName = $NewUserName;//sets all of the instance varuables
$this->PasswordHash = $NewPasswordHash;
$this->homeFolder = "home/".$this->userName;
$this->Promitions = $NewPromitions;
}
functioncreatePublicSession(){ //this function creates _SESSION vauables for public use you do this to set the active user
$_SESSION['UserName'] = $this->userName;
$_SESSION['Promitions'] = $this->Promitions;
$_SESSION['Home'] = $this->homeFolder;
$_SESSION['pass'] = $this->PasswordHash;
}
functionsetGroup($newPromitions){
$this->Promitions = $newPromitions;
$this->saveChanges(); //saves the new promitions
}
functionsaveChanges(){
//i need to finnish this at some point
return0;
}
functiongetUserName(){
return$this->userName;
}
functiongetPassHash(){
return$this->PasswordHash;
}
functiongethomeFolder(){
return$this->homeFolder;
}
functiongetPromitions(){
return$this->Promitions;
}
}
/*
* this is class used to stor all of the exautables on the OS includeing apps, and settings
*/
class application{
private$appName;
private$appLocation;
private$iconLocation;
private$type; //this is "app" or "set"
function__construct($type, $name, $location, $icon="NULL"){
$this->type = $type;
$this->appName = $name;
$this->appLocation = $location;
$this->iconLocation = $this->findicon($icon);
}
privatefunctionfindicon($iconLocation){
if ($iconLocation == "NULL"){
return"images/clone_icon.png";
} else {
return$iconLocation;
}
}
functionrenderAppString(){
if ($this->type == "app"){
return'<a href="apps/'.$this->appLocation.'"><div class="appIcon"><center><img src="
'.$this->iconLocation.'"></center><p>'.$this->appName.'</p></div></a>';
}elseif($this->type == "set"){
return'<a href="'.$this->appLocation.'"><div class="appIcon2"><center><img src="
'.$this->iconLocation.'"></center><p>'.$this->appName.'</p></div></a>';
}
}
functiongetAppName(){
return$this->appName;
}
functiongetAppLocal(){
return$this->appLocation;
}
functiongetIconLocal(){
return$this->iconLocation;
}
}
?>