Skip to content

Commit 42c97f4

Browse files
committed
FINISHED VERSION 1.0.0
0 parents  commit 42c97f4

File tree

326 files changed

+29272
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

326 files changed

+29272
-0
lines changed

.htaccess

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Order Deny,Allow
2+
allow from all
3+
4+
Options -Indexes

LICENSE.txt

Lines changed: 619 additions & 0 deletions
Large diffs are not rendered by default.

README.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*=================================================================================*\
2+
|* This file is part of InMaFSS *|
3+
|* InMaFSS - INformation MAnagement for School Systems - Keep yourself up to date! *|
4+
|* ############################################################################### *|
5+
|* Copyright (C) flx5 *|
6+
|* E-Mail: [email protected] *|
7+
|* ############################################################################### *|
8+
|* InMaFSS is free software; you can redistribute it and/or modify *|
9+
|* it under the terms of the GNU Affero General Public License as published by *|
10+
|* the Free Software Foundation; either version 3 of the License, *|
11+
|* or (at your option) any later version. *|
12+
|* ############################################################################### *|
13+
|* InMaFSS is distributed in the hope that it will be useful, *|
14+
|* but WITHOUT ANY WARRANTY; without even the implied warranty of *|
15+
|* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *|
16+
|* See the GNU Affero General Public License for more details. *|
17+
|* ############################################################################### *|
18+
|* You should have received a copy of the GNU Affero General Public License *|
19+
|* along with InMaFSS; if not, see http://www.gnu.org/licenses/. *|
20+
|* ############################################################################### *|
21+
|* InMaFSS uses the following Third-Party Software: *|
22+
|* - TinyMCE (http://www.tinymce.com) *|
23+
|* - Tigra Calendar (http://www.softcomplex.com/products/tigra_calendar/) *|
24+
\*=================================================================================*/
25+

api.php

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?php
2+
/*=================================================================================*\
3+
|* This file is part of InMaFSS *|
4+
|* InMaFSS - INformation MAnagement for School Systems - Keep yourself up to date! *|
5+
|* ############################################################################### *|
6+
|* Copyright (C) flx5 *|
7+
|* E-Mail: [email protected] *|
8+
|* ############################################################################### *|
9+
|* InMaFSS is free software; you can redistribute it and/or modify *|
10+
|* it under the terms of the GNU Affero General Public License as published by *|
11+
|* the Free Software Foundation; either version 3 of the License, *|
12+
|* or (at your option) any later version. *|
13+
|* ############################################################################### *|
14+
|* InMaFSS is distributed in the hope that it will be useful, *|
15+
|* but WITHOUT ANY WARRANTY; without even the implied warranty of *|
16+
|* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *|
17+
|* See the GNU Affero General Public License for more details. *|
18+
|* ############################################################################### *|
19+
|* You should have received a copy of the GNU Affero General Public License *|
20+
|* along with InMaFSS; if not, see http://www.gnu.org/licenses/. *|
21+
\*=================================================================================*/
22+
23+
24+
require_once("global.php");
25+
26+
if(trim($apikey) == "") {
27+
die("NO API KEY SET!");
28+
}
29+
30+
if(!isset($_GET['key']) || $_GET['key'] != $apikey) {
31+
die("ERR|You have not been authenticated!");
32+
}
33+
34+
if(!isset($_GET['action'])) {
35+
die("ERR|You must specify an action!");
36+
}
37+
38+
switch($_GET['action']) {
39+
case 'plan_update':
40+
if(!isset($_POST['data'])) {
41+
die("ERR|You have to POST the content of your files!");
42+
}
43+
$files = explode(chr(1),$_POST['data']);
44+
include("./inc/parse.php");
45+
$p = new parse();
46+
47+
foreach($files as $file) {
48+
$p->parseHTML($file);
49+
}
50+
51+
$p->UpdateDatabase();
52+
echo "OK|";
53+
break;
54+
55+
default:
56+
die("ERR|Unknown action!");
57+
break;
58+
}
59+
?>

global.php

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
<?php
2+
/*=================================================================================*\
3+
|* This file is part of InMaFSS *|
4+
|* InMaFSS - INformation MAnagement for School Systems - Keep yourself up to date! *|
5+
|* ############################################################################### *|
6+
|* Copyright (C) flx5 *|
7+
|* E-Mail: [email protected] *|
8+
|* ############################################################################### *|
9+
|* InMaFSS is free software; you can redistribute it and/or modify *|
10+
|* it under the terms of the GNU Affero General Public License as published by *|
11+
|* the Free Software Foundation; either version 3 of the License, *|
12+
|* or (at your option) any later version. *|
13+
|* ############################################################################### *|
14+
|* InMaFSS is distributed in the hope that it will be useful, *|
15+
|* but WITHOUT ANY WARRANTY; without even the implied warranty of *|
16+
|* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *|
17+
|* See the GNU Affero General Public License for more details. *|
18+
|* ############################################################################### *|
19+
|* You should have received a copy of the GNU Affero General Public License *|
20+
|* along with InMaFSS; if not, see http://www.gnu.org/licenses/. *|
21+
\*=================================================================================*/
22+
23+
24+
/*=================================================================================*\
25+
|* This file is part of InMaFSS *|
26+
|* InMaFSS - INformation MAnagement for School Systems - Keep yourself up to date! *|
27+
|* ############################################################################### *|
28+
|* Copyright (C) flx5 *|
29+
|* E-Mail: [email protected] *|
30+
|* ############################################################################### *|
31+
|* InMaFSS is free software; you can redistribute it and/or modify *|
32+
|* it under the terms of the GNU Affero General Public License as published by *|
33+
|* the Free Software Foundation; either version 3 of the License, *|
34+
|* or (at your option) any later version. *|
35+
|* ############################################################################### *|
36+
|* InMaFSS is distributed in the hope that it will be useful, *|
37+
|* but WITHOUT ANY WARRANTY; without even the implied warranty of *|
38+
|* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *|
39+
|* See the GNU Affero General Public License for more details. *|
40+
|* ############################################################################### *|
41+
|* You should have received a copy of the GNU Affero General Public License *|
42+
|* along with InMaFSS; if not, see http://www.gnu.org/licenses/. *|
43+
\*=================================================================================*/
44+
45+
46+
define('DS', DIRECTORY_SEPARATOR);
47+
define('CWD', str_replace('manage' . DS, '', dirname(__FILE__) . DS));
48+
define('WWW', "http://localhost/schule");
49+
50+
if(file_exists(CWD."install.php") && file_exists(CWD."inc/config.php")) {
51+
#die("ERROR: YOU HAVE TO REMOVE THE install.php BEFORE YOU WILL BE ABLE TO USE THIS!");
52+
}
53+
54+
if(!file_exists(CWD."inc/config.php") && !file_exists(CWD."install.php")) {
55+
die("ERROR: CONFIG AND INSTALLER NOT FOUND!");
56+
}
57+
58+
if(!file_exists(CWD."inc/config.php") && file_exists(CWD."install.php")) {
59+
header("Location: ".WWW."/install.php");
60+
exit;
61+
}
62+
63+
require_once("inc/config.php");
64+
require_once("inc/core.php");
65+
require_once("inc/sql.php");
66+
require_once("inc/lang.php");
67+
require_once("inc/tpl.php");
68+
require_once("inc/update.php");
69+
70+
$core = new core();
71+
$lang = new lang($clang);
72+
$sql = new MySQL();
73+
$tpl = new tpl();
74+
$update = new Update();
75+
76+
$sql->connect($dbhost, $dbusr, $dbpass, $dbname);
77+
78+
session_start();
79+
80+
if(isset($_SESSION['user']) && isset($_SESSION['timestamp'])) {
81+
define('LOGGED_IN',true);
82+
define('USERNAME', $_SESSION['user']);
83+
} else {
84+
define('LOGGED_IN',false);
85+
define('USERNAME', 'GUEST');
86+
}
87+
88+
function lang() {
89+
global $lang;
90+
91+
return $lang;
92+
}
93+
94+
function filter($input) {
95+
global $core;
96+
return $core->filter($input);
97+
}
98+
99+
function dbquery($input) {
100+
global $sql;
101+
return $sql->dbquery($input);
102+
}
103+
104+
function config($var) {
105+
global $$var;
106+
return $$var;
107+
}
108+
?>

images/exclamation.png

701 Bytes
Loading

inc/.htaccess

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Order Deny,Allow
2+
Deny from all

inc/core.php

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
/*=================================================================================*\
3+
|* This file is part of InMaFSS *|
4+
|* InMaFSS - INformation MAnagement for School Systems - Keep yourself up to date! *|
5+
|* ############################################################################### *|
6+
|* Copyright (C) flx5 *|
7+
|* E-Mail: [email protected] *|
8+
|* ############################################################################### *|
9+
|* InMaFSS is free software; you can redistribute it and/or modify *|
10+
|* it under the terms of the GNU Affero General Public License as published by *|
11+
|* the Free Software Foundation; either version 3 of the License, *|
12+
|* or (at your option) any later version. *|
13+
|* ############################################################################### *|
14+
|* InMaFSS is distributed in the hope that it will be useful, *|
15+
|* but WITHOUT ANY WARRANTY; without even the implied warranty of *|
16+
|* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *|
17+
|* See the GNU Affero General Public License for more details. *|
18+
|* ############################################################################### *|
19+
|* You should have received a copy of the GNU Affero General Public License *|
20+
|* along with InMaFSS; if not, see http://www.gnu.org/licenses/. *|
21+
\*=================================================================================*/
22+
23+
24+
class core {
25+
public function SystemError($title, $text)
26+
{
27+
echo '<div style="width: 80%; padding: 15px 15px 15px 15px; margin: 50px auto; background-color: #F6CECE; font-family: arial; font-size: 12px; color: #000000; border: 1px solid #FF0000;">';
28+
echo '<img src="' . WWW . '/images/exclamation.png" style="float: left;" title="Error">&nbsp;';
29+
echo '<b>' . $title. '</b><br />';
30+
echo '&nbsp;' . $text;
31+
echo '<hr size="1" style="width: 100%; margin: 15px 0px 15px 0px;" />';
32+
echo 'Script execution was aborted. We apoligize for the possible inconvenience. If this problem is persistant, please contact an Administrator.';
33+
echo '</div>';
34+
exit;
35+
}
36+
37+
public function generatePW($username, $password) {
38+
global $salt;
39+
return sha1($salt.md5($password.$salt.$username));
40+
}
41+
42+
public function filter($input) {
43+
return mysql_real_escape_string(stripslashes(trim($input)));
44+
}
45+
}

inc/lang.php

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<?php
2+
/*=================================================================================*\
3+
|* This file is part of InMaFSS *|
4+
|* InMaFSS - INformation MAnagement for School Systems - Keep yourself up to date! *|
5+
|* ############################################################################### *|
6+
|* Copyright (C) flx5 *|
7+
|* E-Mail: [email protected] *|
8+
|* ############################################################################### *|
9+
|* InMaFSS is free software; you can redistribute it and/or modify *|
10+
|* it under the terms of the GNU Affero General Public License as published by *|
11+
|* the Free Software Foundation; either version 3 of the License, *|
12+
|* or (at your option) any later version. *|
13+
|* ############################################################################### *|
14+
|* InMaFSS is distributed in the hope that it will be useful, *|
15+
|* but WITHOUT ANY WARRANTY; without even the implied warranty of *|
16+
|* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *|
17+
|* See the GNU Affero General Public License for more details. *|
18+
|* ############################################################################### *|
19+
|* You should have received a copy of the GNU Affero General Public License *|
20+
|* along with InMaFSS; if not, see http://www.gnu.org/licenses/. *|
21+
\*=================================================================================*/
22+
23+
24+
class lang {
25+
var $language;
26+
var $local;
27+
var $file;
28+
public function lang($lang) {
29+
$this->language = $lang;
30+
$this->local = Array();
31+
$this->file = CWD.DS."inc".DS."lang".DS.$lang.".php";
32+
33+
if(!file_exists($this->file)) {
34+
global $core;
35+
$core->SystemError('Language system error', 'Could not load language: ' . $this->language);
36+
return;
37+
}
38+
}
39+
40+
public function add($keys){
41+
if(is_array($keys)){
42+
foreach($keys as $key){
43+
require($this->file);
44+
$this->local = array_merge($this->local,$loc);
45+
}
46+
}else{
47+
$key = $keys;
48+
require($this->file);
49+
$this->local = array_merge($this->local,$loc);
50+
}
51+
return true;
52+
}
53+
54+
public function loc($id, $output = true) {
55+
if(array_key_exists($id, $this->local)) {
56+
if($output) {
57+
echo $this->local[$id];
58+
return;
59+
}
60+
return $this->local[$id];
61+
}
62+
global $core;
63+
$core->SystemError('Language System Error', 'Could not find index '. $id);
64+
}
65+
}

0 commit comments

Comments
 (0)