Skip to content

Commit b5a2f8d

Browse files
committed
Initial interface import
0 parents  commit b5a2f8d

File tree

214 files changed

+17379
-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.

214 files changed

+17379
-0
lines changed

interface/index.htm

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2+
<html>
3+
<head>
4+
<title>Scrigo CMS</title>
5+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6+
<meta http-equiv="refresh" content="0;URL=web/index.php">
7+
</head>
8+
9+
<body>
10+
11+
</body>
12+
</html>

interface/lib/app.inc.php

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
<?php
2+
/*
3+
Copyright (c) 2005, Till Brehm, projektfarm Gmbh
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without modification,
7+
are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice,
10+
this list of conditions and the following disclaimer.
11+
* Redistributions in binary form must reproduce the above copyright notice,
12+
this list of conditions and the following disclaimer in the documentation
13+
and/or other materials provided with the distribution.
14+
* Neither the name of ISPConfig nor the names of its contributors
15+
may be used to endorse or promote products derived from this software without
16+
specific prior written permission.
17+
18+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21+
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
23+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
25+
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28+
*/
29+
30+
ob_start("ob_gzhandler");
31+
32+
class app {
33+
34+
var $_language_inc = 0;
35+
var $_wb;
36+
37+
function app() {
38+
39+
global $conf;
40+
41+
if($conf["start_db"] == true) {
42+
$this->load('db_'.$conf["db_type"]);
43+
$this->db = new db;
44+
}
45+
46+
if($conf["start_session"] == true) {
47+
session_start();
48+
$_SESSION["s"]['id'] = session_id();
49+
if($_SESSION["s"]["theme"] == '') $_SESSION["s"]['theme'] = $conf['theme'];
50+
if($_SESSION["s"]["language"] == '') $_SESSION["s"]['language'] = $conf['language'];
51+
}
52+
53+
}
54+
55+
function uses($classes) {
56+
global $conf;
57+
58+
$cl = explode(',',$classes);
59+
if(is_array($cl)) {
60+
foreach($cl as $classname) {
61+
if(!is_object($this->$classname)) {
62+
include_once($conf['classpath'] . "/".$classname.".inc.php");
63+
$this->$classname = new $classname;
64+
}
65+
}
66+
}
67+
68+
}
69+
70+
function load($files) {
71+
72+
global $conf;
73+
$fl = explode(',',$files);
74+
if(is_array($fl)) {
75+
foreach($fl as $file) {
76+
include_once($conf['classpath'] . "/".$file.".inc.php");
77+
}
78+
}
79+
80+
}
81+
82+
/*
83+
0 = DEBUG
84+
1 = WARNING
85+
2 = ERROR
86+
*/
87+
88+
function log($msg, $priority = 0) {
89+
90+
if($priority >= $conf["log_priority"]) {
91+
if (is_writable($conf["log_file"])) {
92+
93+
if (!$fp = fopen ($conf["log_file"], "a")) {
94+
$this->error("Logfile konnte nicht geöffnet werden.");
95+
}
96+
if (!fwrite($fp, date("d.m.Y-H:i")." - ". $msg."\r\n")) {
97+
$this->error("Schreiben in Logfile nicht möglich.");
98+
}
99+
fclose($fp);
100+
101+
} else {
102+
$this->error("Logfile ist nicht beschreibbar.");
103+
}
104+
} // if
105+
} // func
106+
107+
/*
108+
0 = DEBUG
109+
1 = WARNING
110+
2 = ERROR
111+
*/
112+
113+
function error($msg, $priority = 2) {
114+
//$this->uses("error");
115+
//$this->error->message($msg, $priority);
116+
echo $msg;
117+
if($priority == 2) exit;
118+
}
119+
120+
function lng($text)
121+
{
122+
global $conf;
123+
if($this->_language_inc != 1) {
124+
// loading global and module Wordbook
125+
@include_once($conf["rootpath"]."/lib/lang/".$_SESSION["s"]["language"].".lng");
126+
@include_once($conf["rootpath"]."/web/".$_SESSION["s"]["module"]["name"]."/lib/lang/".$_SESSION["s"]["language"].".lng");
127+
$this->_wb = $wb;
128+
$this->_language_inc = 1;
129+
}
130+
131+
if(!empty($this->_wb[$text])) {
132+
$text = $this->_wb[$text];
133+
}
134+
135+
return $text;
136+
}
137+
138+
function tpl_defaults() {
139+
140+
$this->tpl->setVar('theme',$_SESSION["s"]["theme"]);
141+
$this->tpl->setVar('phpsessid',session_id());
142+
143+
}
144+
145+
}
146+
147+
/*
148+
Initialize application (app) object
149+
*/
150+
151+
$app = new app;
152+
153+
?>
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
<?
2+
3+
/*
4+
Copyright (c) 2005, Till Brehm, projektfarm Gmbh
5+
All rights reserved.
6+
7+
Redistribution and use in source and binary forms, with or without modification,
8+
are permitted provided that the following conditions are met:
9+
10+
* Redistributions of source code must retain the above copyright notice,
11+
this list of conditions and the following disclaimer.
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
* Neither the name of ISPConfig nor the names of its contributors
16+
may be used to endorse or promote products derived from this software without
17+
specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22+
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
26+
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
*/
30+
31+
class nodetree {
32+
var $childs;
33+
var $btext;
34+
var $id;
35+
}
36+
37+
class cmstree
38+
{
39+
var $_table;
40+
41+
// $vars enthält:
42+
// - parent :id des Elternelementes
43+
// - type :n = node, i = item
44+
// - doctype_id :id des Dokumententyps, wenn nicht im content Feld
45+
// - title :Titel des Eintrages
46+
// - status :1 = ok, d = delete
47+
// - icon :icon im node-tree, optional
48+
// - modul :modul des Eintrages, noch nicht verwendet
49+
// - doc_id :id des zugehörigen Dokumentes
50+
51+
function node_list()
52+
{
53+
global $app;
54+
55+
$nodes = $app->db->queryAllRecords("SELECT * FROM media_cat order by sort, name");
56+
57+
$optionlist = array();
58+
$my0 = new nodetree();
59+
60+
foreach($nodes as $row) {
61+
62+
$id = "my".$row["media_cat_id"];
63+
$btext = $row["name"];
64+
$ordner = 'my'.$row["parent"];
65+
if(!is_object($$id)) $$id = new nodetree();
66+
$$id->btext = $btext;
67+
$$id->id = $row["media_cat_id"];
68+
69+
if(is_object($$ordner)) {
70+
$$ordner->childs[] = &$$id;
71+
} else {
72+
$$ordner = new nodetree();
73+
$$ordner->childs[] = &$$id;
74+
}
75+
}
76+
77+
$this->ptree($my0,0,$optionlist);
78+
79+
if(is_array($nodes)){
80+
return $optionlist;
81+
} else {
82+
return false;
83+
}
84+
}
85+
86+
function ptree($myobj, $tiefe, &$optionlist){
87+
global $_SESSION;
88+
$tiefe += 1;
89+
$id = $myobj->id;
90+
91+
if(is_array($myobj->childs) and ($_SESSION["s"]["cat_open"][$id] == 1 or $tiefe <= 1)) {
92+
foreach($myobj->childs as $val) {
93+
// kategorie => str_repeat('- &nbsp;',$tiefe) . $val->btext,
94+
95+
// Ergebnisse Formatieren
96+
/*
97+
if($tiefe == 0) {
98+
$kategorie = "<div class='mnuLevel".$tiefe."'><a href='index.php?pg=liste&kat=".$val->id."' class='navKategorien'>".$val->btext."</a></div>";
99+
} elseif ($tiefe == 1) {
100+
$kategorie = "<div class='mnuLevel".$tiefe."'><img src='images/listenpunkt.gif'> <a href='index.php?pg=liste&kat=".$val->id."' class='navKategorien'>".$val->btext."</a></div>";
101+
} else {
102+
$kategorie = "<div class='mnuLevel".$tiefe."'>&nbsp; <a href='index.php?pg=liste&kat=".$val->id."' class='navKategorien'>".str_repeat('- &nbsp;',$tiefe - 1) . $val->btext."</a></div>";
103+
}
104+
*/
105+
$val_id = $val->id;
106+
if($_SESSION["s"]["cat_open"][$val_id] == 1) {
107+
$kategorie = "<div class='mnuLevel".$tiefe."'>&nbsp; <a href='treenavi.php?kat=".$val->id."' class='navtext' onClick=\"parent.content.location='media_list.php?search_media_cat_id=".$val->id."'\" style=\"text-decoration: none;\"><img src='../themes/default/icons/folder.png' border='0'> ".$val->btext."</a></div>";
108+
} else {
109+
$kategorie = "<div class='mnuLevel".$tiefe."'>&nbsp; <a href='treenavi.php?kat=".$val->id."' class='navtext' onClick=\"parent.content.location='media_list.php?search_media_cat_id=".$val->id."'\" style=\"text-decoration: none;\"><img src='../themes/default/icons/folder_closed.png' border='0'> ".$val->btext."</a></div>";
110+
}
111+
112+
113+
$optionlist[] = array( media_cat => $kategorie,
114+
media_cat_id => $val->id,
115+
depth => $tiefe);
116+
$this->ptree($val, $tiefe, $optionlist);
117+
}
118+
}
119+
}
120+
121+
}
122+
?>

0 commit comments

Comments
 (0)