init svn after crash, last rev before was 433

Dieser Commit ist enthalten in:
Oldperl 2016-10-06 15:57:01 +00:00
Commit 3b98b5f4e1
1956 geänderte Dateien mit 343580 neuen und 0 gelöschten Zeilen

293
LIZENZ.txt Normale Datei
Datei anzeigen

@ -0,0 +1,293 @@
Contenido is written and distributed under the GNU General Public License which
means that its source code is freely-distributed and available to the general
public.
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your freedom to share
and change it. By contrast, the GNU General Public License is intended to
guarantee your freedom to share and change free software--to make sure the
software is free for all its users. This General Public License applies to most
of the Free Software Foundation's software and to any other program whose
authors commit to using it. (Some other Free Software Foundation software is
covered by the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not price. Our
General Public Licenses are designed to make sure that you have the freedom to
distribute copies of free software (and charge for this service if you wish),
that you receive source code or can get it if you want it, that you can change
the software or use pieces of it in new free programs; and that you know you
can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny
you these rights or to ask you to surrender the rights. These restrictions
translate to certain responsibilities for you if you distribute copies of the
software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for
a fee, you must give the recipients all the rights that you have. You must make
sure that they, too, receive or can get the source code. And you must show them
these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer
you this license which gives you legal permission to copy, distribute and/or
modify the software.
Also, for each author's protection and ours, we want to make certain that
everyone understands that there is no warranty for this free software. If the
software is modified by someone else and passed on, we want its recipients to
know that what they have is not the original, so that any problems introduced
by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We wish
to avoid the danger that redistributors of a free program will individually
obtain patent licenses, in effect making the program proprietary. To prevent
this, we have made it clear that any patent must be licensed for everyone's
free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification
follow.
GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND
MODIFICATION
0. This License applies to any program or other work which contains a notice
placed by the copyright holder saying it may be distributed under the terms
of this General Public License. The "Program", below, refers to any such
program or work, and a "work based on the Program" means either the Program
or any derivative work under copyright law: that is to say, a work
containing the Program or a portion of it, either verbatim or with
modifications and/or translated into another language. (Hereinafter,
translation is included without limitation in the term "modification".) Each
licensee is addressed as "you".
Activities other than copying, distribution and modification are not covered
by this License; they are outside its scope. The act of running the Program
is not restricted, and the output from the Program is covered only if its
contents constitute a work based on the Program (independent of having been
made by running the Program). Whether that is true depends on what the
Program does.
1. You may copy and distribute verbatim copies of the Program's source code as
you receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice and
disclaimer of warranty; keep intact all the notices that refer to this
License and to the absence of any warranty; and give any other recipients
of the Program a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you
may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it, thus
forming a work based on the Program, and copy and distribute such
modifications or work under the terms of Section 1 above, provided that you
also meet all of these conditions:
a) You must cause the modified files to carry prominent notices stating that
you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in whole or
in part contains or is derived from the Program or any part thereof, to
be licensed as a whole at no charge to all third parties under the terms
of this License.
c) If the modified program normally reads commands interactively when run,
you must cause it, when started running for such interactive use in the
most ordinary way, to print or display an announcement including an
appropriate copyright notice and a notice that there is no warranty (or
else, saying that you provide a warranty) and that users may redistribute
the program under these conditions, and telling the user how to view a
copy of this License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on the
Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable
sections of that work are not derived from the Program, and can be
reasonably considered independent and separate works in themselves, then
this License, and its terms, do not apply to those sections when you
distribute them as separate works. But when you distribute the same sections
as part of a whole which is a work based on the Program, the distribution
of the whole must be on the terms of this License, whose permissions for
other licensees extend to the entire whole, and thus to each and every part
regardless of who wrote it. Thus, it is not the intent of this section to
claim rights or contest your rights to work written entirely by you; rather,
the intent is to exercise the right to control the distribution of
derivative or collective works based on the Program.
In addition, mere aggregation of another work not based on the Program with
the Program (or with a work based on the Program) on a volume of a storage
or distribution medium does not bring the other work under the scope of this
License.
3. You may copy and distribute the Program (or a work based on it, under
Section 2) in object code or executable form under the terms of Sections 1
and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source
code, which must be distributed under the terms of Sections 1 and 2 above
on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to
give any third party, for a charge no more than your cost of physically
performing source distribution, a complete machine-readable copy of the
corresponding source code, to be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer to
distribute corresponding source code. (This alternative is allowed only
for noncommercial distribution and only if you received the program in
object code or executable form with such an offer, in accord with
Subsection b above.)
The source code for a work means the preferred form of the work for making
modifications to it. For an executable work, complete source code means all
the source code for all modules it contains, plus any associated interface
definition files, plus the scripts used to control compilation and
installation of the executable. However, as a special exception, the source
code distributed need not include anything that is normally distributed (in
either source or binary form) with the major components (compiler, kernel,
and so on) of the operating system on which the executable runs, unless that
component itself accompanies the executable.
If distribution of executable or object code is made by offering access to
copy from a designated place, then offering equivalent access to copy the
source code from the same place counts as distribution of the source code,
even though third parties are not compelled to copy the source along with
the object code.
4. You may not copy, modify, sublicense, or distribute the Program except as
expressly provided under this License. Any attempt otherwise to copy,
modify, sublicense or distribute the Program is void, and will automatically
terminate your rights under this License. However, parties who have received
copies, or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
5. You are not required to accept this License, since you have not signed it.
However, nothing else grants you permission to modify or distribute the
Program or its derivative works. These actions are prohibited by law if you
do not accept this License. Therefore, by modifying or distributing the
Program (or any work based on the Program), you indicate your acceptance of
this License to do so, and all its terms and conditions for copying,
distributing or modifying the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the Program),
the recipient automatically receives a license from the original licensor to
copy, distribute or modify the Program subject to these terms and conditions.
You may not impose any further restrictions on the recipients' exercise of
the rights granted herein. You are not responsible for enforcing compliance
by third parties to this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot distribute so
as to satisfy simultaneously your obligations under this License and any
other pertinent obligations, then as a consequence you may not distribute
the Program at all. For example, if a patent license would not permit
royalty-free redistribution of the Program by all those who receive copies
directly or indirectly through you, then the only way you could satisfy both
it and this License would be to refrain entirely from distribution of the
Program.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply and
the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents
or other property right claims or to contest validity of any such claims;
this section has the sole purpose of protecting the integrity of the free
software distribution system, which is implemented by public license
practices. Many people have made generous contributions to the wide range
of software distributed through that system in reliance on consistent
application of that system; it is up to the author/donor to decide if he or
she is willing to distribute software through any other system and a
licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a
consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain
countries either by patents or by copyrighted interfaces, the original
copyright holder who places the Program under this License may add an
explicit geographical distribution limitation excluding those countries, so
that distribution is permitted only in or among countries not thus excluded.
In such case, this License incorporates the limitation as if written in the
body of this License.
9. The Free Software Foundation may publish revised and/or new versions of the
General Public License from time to time. Such new versions will be similar
in spirit to the present version, but may differ in detail to address new
problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by the
Free Software Foundation. If the Program does not specify a version number
of this License, you may choose any version ever published by the
Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free programs
whose distribution conditions are different, write to the author to ask for
permission. For software which is copyrighted by the Free Software
Foundation, write to the Free Software Foundation; we sometimes make
exceptions for this. Our decision will be guided by the two goals of
preserving the free status of all derivatives of our free software and of
promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO
THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM
PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Contenido is a Content Management System based on PHP.
Copyright (C) 2000-2008 four for business AG.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any
later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the
Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Contenido, versions 0.9-4.6 and higher,
Copyright (C) 2000-2008 by four for business AG.
Contenido comes with ABSOLUTELY NO WARRANTY.
four for business AG
Nordring 82 B
D-63067 Offenbach am Main
Germany
E-Mail: info@4fb.de
Web: http://www.4fb.de

78
README_.txt Normale Datei
Datei anzeigen

@ -0,0 +1,78 @@
$Id: README_.txt 323 2015-05-28 12:02:34Z oldperl $
----------------------------------------------------------------------------------------------------
This is the readme file for ConLite 2.0
Any help you need you may find by visiting the following links.
CL-Portal http//conlite.org
CL-Forum http://forum.conlite.org
CL-Bugtracker http://bugs.conlite.org
CL-API-Doc http://conlite.conrepo.org/api/4.8.16CL
!!! Attention !!!
We tried to fix all known bugs of 4.8.15 and earlier but cannot give any garanties for that. So use
it on your own risk. If you find any bug or have any idea to enhance ConLite, feel free to visit our
bugtracker and register at http://bugs.conlite.org
Any help and ideas are welcome :)
** Mini FAQ **
What is ConLite (-Edition) of CONTENIDO?
CL (short for ConLite) is dedicated to close the gap between CONTENIDO 4.8.15 and the version 4.9.
In downloadable 4.8.20 (and former 4.8.15) are still a lot of bugs and some missing feautures and
enhancements so one cannot use the version without problems. Our goal is to give you a bugfixed and
really stable version of CONTENIDO till the 4.9 is stable. By the way, there are still a lot of big sides
build with 4.8.x out there where upgrading to 4.9.x is not possible or cost a lot of money.
Why i have to use ConLite?
You don't have to, but feel free to do it. ConLite will show you an easier way to upgrade to CONTENIDO
4.9. The new version of CONTENIDO will have a lot of changes, so you have to do a lot of work
with modules or custom plugins to adapt them to the new version. That's not what ConLite does nor will
do in the future. ConLite will do changes step by step, or better version by version to adapt your
4.8.15 or higher installation to work with the new 4.9 of CONTENIDO. And ConLite will try to give you a
stable and bugfixed CONTENIDO 4.8.x in the future.
Who are the people behind ConLite?
The Team behind the CL-version are some well known guys from CONTENIDO-forum, working since many years with
and within CONTENIDO core or coding modules and plugins for CONTENIDO.
And we love CONTENIDO :)
** Copyright **
The copyright for the code of CONTENIDO still remains to 4fb and the named coders for all codes coming
from 4.8.15 and/or from svn-repository of CONTENDIO.
All ads, enhancements or new parts, coded by the CL-Team are copyright by their named coders or
by CL-Team and conrepo.org.
** Know Bugs **
FS#25 - Collision with pre-installed AMR after Migration
!!! Attention !!!
If you want to upgrade with an installed AMR-plugin, uninstall AMR before upgrade.
We will include a fix for that in one of the next versions of CL
** History / Changelog **
ConLite 1.0
CONTENIDO 4.8.16 CL
20 Bug Report genericdb: urlencode() expects parameter 1 to be string ...
16 Enhancement RSS-Reader austauschen/überarbeiten
31 Optimization Test CL installation with newest PHP and SQL on XAMPP
3 Bug Report Genericdb caching not working
37 Bug Report Upgrade: valid_from and valid_to fields are set to NULL
33 Bug Report Missing include.subnav_blank.php
22 Bug Report Modul xhtml which is not choosable in modularea
10 Optimization Generate API-Doc
34 Bug Report Error when searching article with no criteria
24 Bug Report No reset of subnavigation if a layout is deleted
15 Optimization Add CL readme file
13 Bug Report FEUser-Plugins valide_to and valide_from saving wrong t ...
9 Enhancement Check all translations (i18n)
8 Bug Report adapt genericdb from 4.8.17 CL
5 Bug Report Buttontranslations missing or wrong

52
cms/config.php Normale Datei
Datei anzeigen

@ -0,0 +1,52 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* Configuration File
*
* Requirements:
* @con_php_req 5
*
*
* @package ContenidoBackendArea
* @version 0.1
* @author unknown
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*
*
*
* {@internal
* created unknown
* modified 2008-07-03, bilal arslan, added security fix
*
* $Id: config.php 450 2016-07-20 11:11:12Z oldperl $:
* }}
*
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
// Relative path to contenido directory, for all inclusions, in most cases: "../contenido/"
$contenido_path = "../conlite/";
// If language isn't specified, set this client and language (ID)
$load_lang = "1";
$load_client = "1";
/* Various debugging options */
$frontend_debug["container_display"] = false;
$frontend_debug["module_display"] = false;
$frontend_debug["module_timing"] = false;
$frontend_debug["module_timing_summary"]= false;
/* Set to 1 to brute-force module regeneration */
$force = 0;
?>

523
cms/css/basic-style.css Normale Datei
Datei anzeigen

@ -0,0 +1,523 @@
/*
Simple Responsive Template v 1.2
primary styles
Author: www.prowebdesign.ro
Add your own styles to customize the project.
BASE (MOBILE) SIZE
These are the mobile styles. It's what people see on their phones.
Remember, keep it light: Speed is Important.
*/
/* typography */
body{
color:#666;
font-family:'Ubuntu', Arial, Helvetica, sans-serif;
font-size:1em;
line-height:1.4em;
font-weight:normal;
}
h1, h2, h3, h4, h5, h6{
font-weight:normal;
font-family:'Droid Serif', Arial, Helvetica, sans-serif;
line-height:1.5em;
margin:.45em 0;
padding:0;
}
/* links */
a,
a:visited,
a:active,
a:hover{color:#0099ff;}
a:hover{ text-decoration:none;}
/* Box sizing. Awesome thing. Read about it here: http://www.w3schools.com/cssref/css3_pr_box-sizing.asp */
*{ box-sizing:border-box;
-moz-box-sizing:border-box;}
/* structure */
.wrapper{
width: 92%;
margin: 0 auto;
}
header{
padding:15px 0;
}
#banner{
text-align:center;
}
#hero,
#page-header{
background:#f3f3f3;
border-top:1px solid #e2e2e2;
border-bottom:1px solid #e2e2e2;
padding:20px 0;
}
#hero h1{
line-height:1.2em;
margin-top:0px;
margin-bottom:10px;}
.flexslider{
display:none;
}
#content {
margin:40px 0;
}
aside {
margin:40px 0;
}
p{ margin:0 0 1.5em;}
/* RESPONSIVE IMAGES */
img{ max-width:100%; height:auto;}
/*MAIN MENU*/
.menu-toggle{
display:block;
padding:10px;
margin:20px 0 0;
background:#666;
color:#fff;
cursor:pointer;
text-transform:uppercase;
font-size:20px;
}
.menu-toggle.toggled-on{
background:#0099ff;
}
.srt-menu{
display:none;
}
.srt-menu.toggled-on{
display:block;
position:relative;
z-index:10;
}
.srt-menu{
clear:both;
margin-bottom:60px;
}
.srt-menu li a {
background:#dadada;
display:block;
margin:1px 0;
padding:10px;
text-decoration:none;
}
.srt-menu li a:hover{
background:#0099ff;
color:#fff;
}
.srt-menu li li a {
background:#e8e8e8;
padding-left:40px;
}
.srt-menu li li li a {
background:#efefef;
padding-left:80px;
}
/*SECONDARY MENU*/
#secondary-navigation{
margin-bottom:60px;
}
#secondary-navigation ul{
margin:0;
padding:0;
}
#secondary-navigation ul li a{
background:#E6E6E6;
display:block;
margin:5px 0;
padding:10px;
text-decoration:none;
}
#secondary-navigation ul li a:hover,
#secondary-navigation ul li.active a{
background:#0099ff;
color:#fff;
}
/*SPACE GRID ELEMENTS VERTICALLY, SINCE THEY ARE ONE UNDER ANOTHER SO FAR*/
.grid_1,
.grid_2,
.grid_3,
.grid_4,
.grid_5,
.grid_6,
.grid_7,
.grid_8,
.grid_9,
.grid_10,
.grid_11,
.grid_12 {
margin-bottom:40px;
/*positioning and padding*/
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
}
/*FOOTER*/
footer{
clear:both;
font-size:80%;
padding:20px 0;
}
footer ul{
margin:0;
padding:0;
}
/*colors and backgrounds*/
body{
background:#fff;
}
h1, h2, h3, h4, h5, h6{
color:#333;
}
footer{
background:#333;
color:#ccc;
}
footer h1, footer h2, footer h3, footer h4{
color:#CCC;
margin-bottom:10px;
}
footer ul{
margin:0 0 0 8%;
}
a.buttonlink{
background:#0099ff;
border-radius:7px;
color:#fff;
display:block;
float:left;
margin:10px 15px 10px 0;
padding:10px;
text-decoration:none;
}
a.buttonlink:hover{
background:#8dbc01;
}
.greenelement{
background:#5ec79e;
color:#fff;
}
.violetelement{
background:#887dc2;
color:#fff;
}
/* Contain floats*/
.clearfix:before,
.clearfix:after,
.row:before,
.row:after {
content: " ";
display: table;
}
.clearfix:after,
.container:after,
.row:after{
clear: both;
}
/*
LARGER MOBILE DEVICES
This is for mobile devices with a bit larger screens.
*/
@media only screen and (min-width: 481px) {
#banner{
float:left;
text-align:left;
margin-bottom:-20px;/*this depends on the height of the logo*/
}
.menu-toggle{/*make menu float right, instead of sitting under the logo*/
margin-top:10px; /*this depends on the height of the logo*/
float:right;
}
}
/*
TABLET & SMALLER LAPTOPS
The average viewing window and preferred media query for those is 768px.
But I think that some more breathing space is good:)
*/
@media only screen and (min-width: 920px) {
.wrapper{
max-width: 1200px;
margin: .75em auto;
}
#banner{
float:left;
text-align:left;
margin-bottom:0px;
}
header{
padding:0;
}
#content {
float:left;
width:65%;
}
#content.wide-content{
float:none;
width:100%;
}
.flexslider{
display:block;
/*demo 1 slider theme*/
margin: 0 0 60px;
background: #fff;
border: 4px solid #fff;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-o-border-radius: 4px;
border-radius: 4px;
box-shadow: 0 1px 4px rgba(0,0,0,.2);
-webkit-box-shadow: 0 1px 4px rgba(0,0,0,.2);
-moz-box-shadow: 0 1px 4px rgba(0,0,0,.2);
-o-box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
aside {
float:right;
width:30%;
}
/*** MAIN MENU - ESSENTIAL STYLES ***/
.menu-toggle{display:none;}
#menu-main-navigation{display:block;}
.srt-menu, .srt-menu * {
margin: 0;
padding: 0;
list-style: none;
}
.srt-menu ul {
position: absolute;
display:none;
width: 12em; /* left offset of submenus need to match (see below) */
}
.srt-menu ul li {
width: 100%;
}
.srt-menu li:hover {
visibility: inherit; /* fixes IE7 'sticky bug' */
}
.srt-menu li {
float: left;
position: relative;
margin-left:1px;
}
.srt-menu li li {
margin-left:0px;
}
.srt-menu a {
display: block;
position: relative;
}
.srt-menu li:hover ul,
.srt-menu li.sfHover ul {
display:block;
left: 0;
top: 45px; /* match top ul list item height */
z-index: 99;
-webkit-box-shadow: 2px 3px 2px 0px rgba(00, 00, 00, .3);
box-shadow: 2px 3px 2px 0px rgba(00, 00, 00, .3);
}
ul.srt-menu li:hover li ul,
ul.srt-menu li.sfHover li ul {
top: -999em;
}
ul.srt-menu li li:hover ul,
ul.srt-menu li li.sfHover ul {
left: 12em; /* match ul width */
top: 0;
}
ul.srt-menu li li:hover li ul,
ul.srt-menu li li.sfHover li ul {
top: -999em;
}
ul.srt-menu li li li:hover ul,
ul.srt-menu li li li.sfHover ul {
left: 10em; /* match ul width */
top: 0;
}
/*** DEMO1 SKIN ***/
#topnav, .srt-menu {
float:right;
margin: .35em 0 0 0;
}
.srt-menu a {
text-decoration:none;
}
.srt-menu li a {
background:#fff;
margin:0;
padding:10px 20px;
height:45px;
}
.srt-menu a, .srt-menu a:visited { /* visited pseudo selector so IE6 applies text colour*/
color: #0099ff;
}
.srt-menu li li a {
border-top: 1px solid rgba(255,255,255,.2);
background: #333; /*fallback for old IE*/
background:rgba(0,0,0,.6);
color: #fff;
padding-left:20px;
height:auto;
}
.srt-menu li li a:visited{color:#fff;}
.srt-menu li li li a,
.srt-menu li.active * li a{
padding-left:20px;
background:rgba(0,0,0,.6);
}
.srt-menu li:hover > a,
.srt-menu li.active a{
color:#fff;
background:#0099ff;
}
.srt-menu li li:hover > a{
color:#fff;
background:#0099ff;
}
/*GRID*/
/*
& Columns : 12
*/
.row{
margin-left: -15px;
margin-right: -15px;
}
.grid_1 { width: 8.33333333%; }
.grid_2 { width: 16.66666667%; }
.grid_3 { width: 25%; }
.grid_4 { width: 33.33333333%; }
.grid_5 { width: 41.66666667%; }
.grid_6 { width: 50%; }
.grid_7 { width: 58.33333333%; }
.grid_8 { width: 66.66666667%; }
.grid_9 { width: 75%; }
.grid_10 { width: 83.33333333%; }
.grid_11 { width: 91.66666667%; }
.grid_12 { width: 100%; }
.grid_1,
.grid_2,
.grid_3,
.grid_4,
.grid_5,
.grid_6,
.grid_7,
.grid_8,
.grid_9,
.grid_10,
.grid_11,
.grid_12 {
float: left;
display: block;
}
.rightfloat{float:right;}
/* @notation inspired by tinyGrid, .row and percentage by Twitter Bootstrap
*/
#hero [class*="grid_"] { margin-bottom:-20px;}
}
/*
DESKTOP
This is the average viewing window. So Desktops, Laptops, and
in general anyone not viewing on a mobile device. Here's where
you can add resource intensive styles.
*/
@media only screen and (min-width: 1030px) {
}
/*
LARGE VIEWING SIZE
This is for the larger monitors and possibly full screen viewers.
*/
@media only screen and (min-width: 1240px) {
}
/*
RETINA (2x RESOLUTION DEVICES)
This applies to the retina iPhone (4s) and iPad (2,3) along with
other displays with a 2x resolution.
*/
@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (min--moz-device-pixel-ratio: 1.5),
only screen and (min-device-pixel-ratio: 1.5) {
}
/*
iPHONE 5 MEDIA QUERY
iPhone 5 or iPod Touch 5th generation styles (you can include your own file if you want)
*/
@media (device-height: 568px) and (-webkit-min-device-pixel-ratio: 2) {
}
/*
PRINT STYLESHEET
*/
@media print {
* { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } /* Black prints faster: h5bp.com/s */
a, a:visited { text-decoration: underline; }
a[href]:after { content: " (" attr(href) ")"; }
abbr[title]:after { content: " (" attr(title) ")"; }
.ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } /* Don't show links for images, or javascript/internal links */
pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
thead { display: table-header-group; } /* h5bp.com/t */
tr, img { page-break-inside: avoid; }
img { max-width: 100% !important; }
@page { margin: 0.5cm; }
p, h2, h3 { orphans: 3; widows: 3; }
h2, h3 { page-break-after: avoid; }
}

136
cms/css/conlite-demo.css Normale Datei
Datei anzeigen

@ -0,0 +1,136 @@
form#login_box {
width: 100%;
}
form#login_box fieldset {
padding: 3px;
border-radius: 6px;
}
input[type='submit'] {
background: #0099ff none repeat scroll 0 0;
border: 1px solid;
border-radius: 6px;
color: #fff;
margin: 5px 10px 5px 0;
padding: 5px;
text-decoration: none;
}
footer #colophon {
position: relative;
}
div#social-media-links {
position: absolute;
right: 0;
text-align: right;
width: 20%;
display: inline-block;
}
a.social-media-icon {
width: 32px;
height: 32px;
background-image: url(../images/ico/social_icons_sprite.png);
display: inline-block;
color: rgba(0, 0, 0, 0);
}
.facebook {
background-position: 0 0 !important;
}
.facebook:hover {
background-position: 0 -32px !important;
}
.pinterest {
background-position: -32px 0 !important;
}
.pinterest:hover {
background-position: -32px -32px !important;
}
.youtube {
background-position: -64px 0px !important;
}
.youtube:hover {
background-position: -64px -32px !important;
}
.flickr {
background-position: -96px 0px !important;
}
.flickr:hover{
background-position: -96px -32px !important;
}
.google-plus {
background-position: -128px 0px !important;
}
.google-plus:hover {
background-position: -128px -32px !important;
}
.rss {
background-position: -160px 0 !important;
}
.rss:hover {
background-position: -160px -32px !important;
}
.twitter {
background-position: -192px 0 !important;
}
.twitter:hover {
background-position: -192px -32px !important;
}
.vimeo {
background-position: -224px 0 !important;
}
.vimeo:hover {
background-position: -224px -32px !important;
}
.dribble {
background-position: -256px 0 !important;
}
.dribble:hover {
background-position: -256px -32px !important;
}
.linkedin {
background-position: -288px 0 !important;
}
.linkedin:hover {
background-position: -288px -32px !important;
}
.xing {
background-position: -320px 0 !important;
}
.xing:hover {
background-position: -320px -32px !important;
}
@media only screen and (min-width: 920px) {
form#login_box input {
max-width: 100px;
}
}

4
cms/css/index.php Normale Datei
Datei anzeigen

@ -0,0 +1,4 @@
<?php
header("Location:/index.php");
exit;
?>

530
cms/css/normalize.css vendored Normale Datei
Datei anzeigen

@ -0,0 +1,530 @@
/*! normalize.css v1.1.0 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 6/7/8/9 and Firefox 3.
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary {
display: block;
}
/**
* Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3.
*/
audio,
canvas,
video {
display: inline-block;
*display: inline;
*zoom: 1;
}
/**
* Prevent modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Address styling not present in IE 7/8/9, Firefox 3, and Safari 4.
* Known issue: no IE 6 support.
*/
[hidden] {
display: none;
}
/* ==========================================================================
Base
========================================================================== */
/**
* 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using
* `em` units.
* 2. Prevent iOS text size adjust after orientation change, without disabling
* user zoom.
*/
html {
font-size: 100%; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
-ms-text-size-adjust: 100%; /* 2 */
}
/**
* Address `font-family` inconsistency between `textarea` and other form
* elements.
*/
html,
button,
input,
select,
textarea {
font-family: sans-serif;
}
/**
* Address margins handled incorrectly in IE 6/7.
*/
body {
margin: 0;
}
/* ==========================================================================
Links
========================================================================== */
/**
* Address `outline` inconsistency between Chrome and other browsers.
*/
a:focus {
outline: thin dotted;
}
/**
* Improve readability when focused and also mouse hovered in all browsers.
*/
a:active,
a:hover {
outline: 0;
}
/* ==========================================================================
Typography
========================================================================== */
/**
* Address font sizes and margins set differently in IE 6/7.
* Address font sizes within `section` and `article` in Firefox 4+, Safari 5,
* and Chrome.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
h2 {
font-size: 1.5em;
margin: 0.83em 0;
}
h3 {
font-size: 1.17em;
margin: 1em 0;
}
h4 {
font-size: 1em;
margin: 1.33em 0;
}
h5 {
font-size: 0.83em;
margin: 1.67em 0;
}
h6 {
font-size: 0.67em;
margin: 2.33em 0;
}
/**
* Address styling not present in IE 7/8/9, Safari 5, and Chrome.
*/
abbr[title] {
border-bottom: 1px dotted;
}
/**
* Address style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome.
*/
b,
strong {
font-weight: bold;
}
blockquote {
margin: 1em 40px;
}
/**
* Address styling not present in Safari 5 and Chrome.
*/
dfn {
font-style: italic;
}
/**
* Address differences between Firefox and other browsers.
* Known issue: no IE 6/7 normalization.
*/
hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
/**
* Address styling not present in IE 6/7/8/9.
*/
mark {
background: #ff0;
color: #000;
}
/**
* Address margins set differently in IE 6/7.
*/
p,
pre {
margin: 1em 0;
}
/**
* Correct font family set oddly in IE 6, Safari 4/5, and Chrome.
*/
code,
kbd,
pre,
samp {
font-family: monospace, serif;
_font-family: 'courier new', monospace;
font-size: 1em;
}
/**
* Improve readability of pre-formatted text in all browsers.
*/
pre {
white-space: pre;
white-space: pre-wrap;
word-wrap: break-word;
}
/**
* Address CSS quotes not supported in IE 6/7.
*/
q {
quotes: none;
}
/**
* Address `quotes` property not supported in Safari 4.
*/
q:before,
q:after {
content: '';
content: none;
}
/**
* Address inconsistent and variable font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
/* ==========================================================================
Lists
========================================================================== */
/**
* Address margins set differently in IE 6/7.
*/
dl,
menu,
ol,
ul {
margin: 1em 0;
}
dd {
margin: 0 0 0 40px;
}
/**
* Address paddings set differently in IE 6/7.
*/
menu,
ol,
ul {
padding: 0 0 0 40px;
}
/**
* Correct list images handled incorrectly in IE 7.
*/
nav ul,
nav ol {
list-style: none;
list-style-image: none;
padding:0;
margin:0;
}
/* ==========================================================================
Embedded content
========================================================================== */
/**
* 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3.
* 2. Improve image quality when scaled in IE 7.
*/
img {
border: 0; /* 1 */
-ms-interpolation-mode: bicubic; /* 2 */
}
/**
* Correct overflow displayed oddly in IE 9.
*/
svg:not(:root) {
overflow: hidden;
}
/* ==========================================================================
Figures
========================================================================== */
/**
* Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11.
*/
figure {
margin: 0;
}
/* ==========================================================================
Forms
========================================================================== */
/**
* Correct margin displayed oddly in IE 6/7.
*/
form {
margin: 0;
}
/**
* Define consistent border, margin, and padding.
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct color not being inherited in IE 6/7/8/9.
* 2. Correct text not wrapping in Firefox 3.
* 3. Correct alignment displayed oddly in IE 6/7.
*/
legend {
border: 0; /* 1 */
padding: 0;
white-space: normal; /* 2 */
*margin-left: -7px; /* 3 */
}
/**
* 1. Correct font size not being inherited in all browsers.
* 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5,
* and Chrome.
* 3. Improve appearance and consistency in all browsers.
*/
button,
input,
select,
textarea {
font-size: 100%; /* 1 */
margin: 0; /* 2 */
vertical-align: baseline; /* 3 */
*vertical-align: middle; /* 3 */
}
/**
* Address Firefox 3+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/
button,
input {
line-height: normal;
}
/**
* Address inconsistent `text-transform` inheritance for `button` and `select`.
* All other form control elements do not inherit `text-transform` values.
* Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+.
* Correct `select` style inheritance in Firefox 4+ and Opera.
*/
button,
select {
text-transform: none;
}
/**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Correct inability to style clickable `input` types in iOS.
* 3. Improve usability and consistency of cursor style between image-type
* `input` and others.
* 4. Remove inner spacing in IE 7 without affecting normal text inputs.
* Known issue: inner spacing remains in IE 6.
*/
button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
*overflow: visible; /* 4 */
}
/**
* Re-set default cursor for disabled elements.
*/
button[disabled],
html input[disabled] {
cursor: default;
}
/**
* 1. Address box sizing set to content-box in IE 8/9.
* 2. Remove excess padding in IE 8/9.
* 3. Remove excess padding in IE 7.
* Known issue: excess padding remains in IE 6.
*/
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
*height: 13px; /* 3 */
*width: 13px; /* 3 */
}
/**
* 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
* 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
* (include `-moz` to future-proof).
*/
input[type="search"] {
-webkit-appearance: textfield; /* 1 */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* 2 */
box-sizing: content-box;
}
/**
* Remove inner padding and search cancel button in Safari 5 and Chrome
* on OS X.
*/
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* Remove inner padding and border in Firefox 3+.
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/**
* 1. Remove default vertical scrollbar in IE 6/7/8/9.
* 2. Improve readability and alignment in all browsers.
*/
textarea {
overflow: auto; /* 1 */
vertical-align: top; /* 2 */
}
/* ==========================================================================
Tables
========================================================================== */
/**
* Remove most spacing between table cells.
*/
table {
border-collapse: collapse;
border-spacing: 0;
}

4
cms/data/modules/index.php Normale Datei
Datei anzeigen

@ -0,0 +1,4 @@
<?php
header("Location:/index.php");
exit;
?>

66
cms/dbfs.php Normale Datei
Datei anzeigen

@ -0,0 +1,66 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* <Description>
*
* Requirements:
* @con_php_req 5
* @con_template <Templatefiles>
* @con_notice <Notice>
*
*
* @package ContenidoBackendArea
* @author unknown
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*
*
*
* {@internal
* created unknown
* modified 2008-06-16, H. Librenz - Hotfix: checking for potential unsecure calling
* modified 2008-07-03, bilal arslan, added security fix
* modified 2010-05-20, Murat Purc, standardized Contenido startup and security check invocations, see [#CON-307]
*
* $Id: dbfs.php 450 2016-07-20 11:11:12Z oldperl $:
* }}
*
*/
if (!defined("CON_FRAMEWORK")) {
define("CON_FRAMEWORK", true);
}
$contenido_path = '';
# include the config file of the frontend to init the Client and Language Id
include_once ("config.php");
// Contenido startup process
include_once ($contenido_path . 'includes/startup.php');
if ($contenido)
{
page_open(array('sess' => 'Contenido_Session',
'auth' => 'Contenido_Challenge_Crypt_Auth',
'perm' => 'Contenido_Perm'));
} else {
page_open(array('sess' => 'Contenido_Frontend_Session',
'auth' => 'Contenido_Frontend_Challenge_Crypt_Auth',
'perm' => 'Contenido_Perm'));
}
/* Shorten load time */
$client = $load_client;
$dbfs = new DBFSCollection;
$dbfs->outputFile($file);
page_close();
?>

13
cms/error.php Normale Datei
Datei anzeigen

@ -0,0 +1,13 @@
<html>
<head>
<title>Fehler</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="expires" content="0">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Refresh" content="0; URL=http://www.contenido.org">
<meta name="robots" content="follow,noindex">
</head>
<body bgcolor="#ffffff">
&nbsp;
</body>
</html>

BIN
cms/favicon.ico Normale Datei

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 28 KiB

949
cms/front_content.php Normale Datei
Datei anzeigen

@ -0,0 +1,949 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* This file handles the view of an article.
*
* To handle the page we use the Database Abstraction Layer, the Session, Authentication and Permissions Handler of the
* PHPLIB application development toolkit.
*
* The Client Id and the Language Id of an article will be determined depending on file __FRONTEND_PATH__/config.php where
* $load_lang and $load_client are defined.
* Depending on http globals via e.g. front_content.php?idcat=41&idart=34
* the most important Contenido globals $idcat (Category Id), $idart (Article Id), $idcatart, $idartlang will be determined.
*
* The article can be displayed and edited in the Backend or the Frontend.
* The attributes of an article will be considered (an article can be online, offline or protected ...).
*
* It is possible to customize the behavior by including the file __FRONTEND_PATH__/config.local.php or
* the file __FRONTEND_PATH__/config.after.php
*
* If you use 'Frontend User' for protected areas, the category access permission will by handled via the
* Contenido Extension Chainer.
*
* Finally the 'code' of an article will by evaluated and displayed.
*
* Requirements:
* @con_php_req 5.0
* @con_notice If you edit this file you must synchronise the files
* - ./cms/front_content.php
* - ./contenido/external/backendedit/front_content.php
* - ./contenido/external/frontend/front_content.php
*
*
* @package Contenido Frontend
* @version 4.8
* @author Olaf Niemann, Jan Lengowski, Timo A. Hummel et al.
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
* @since file available since contenido release <= 4.6
*/
if (!defined("CON_FRAMEWORK")) {
define("CON_FRAMEWORK", true);
}
$contenido_path = '';
# include the config file of the frontend to init the Client and Language Id
include_once ("config.php");
# Contenido startup process
include_once ($contenido_path . 'includes/startup.php');
cInclude("includes", "functions.con.php");
cInclude("includes", "functions.con2.php");
cInclude("includes", "functions.api.php");
cInclude("includes", "functions.pathresolver.php");
if ($cfg["use_pseudocron"] == true)
{
/* Include cronjob-Emulator */
$oldpwd = getcwd();
chdir($cfg["path"]["contenido"].$cfg["path"]["cronjobs"]);
cInclude("includes", "pseudo-cron.inc.php");
chdir($oldpwd);
}
/*
* Initialize the Database Abstraction Layer, the Session, Authentication and Permissions Handler of the
* PHPLIB application development toolkit
* @see http://sourceforge.net/projects/phplib
*/
if ($contenido)
{
//Backend
page_open(array ('sess' => 'Contenido_Session', 'auth' => 'Contenido_Challenge_Crypt_Auth', 'perm' => 'Contenido_Perm'));
i18nInit($cfg["path"]["contenido"].$cfg["path"]["locale"], $belang);
}
else
{
//Frontend
page_open(array ('sess' => 'Contenido_Frontend_Session', 'auth' => 'Contenido_Frontend_Challenge_Crypt_Auth', 'perm' => 'Contenido_Perm'));
}
/**
* Bugfix
* @see http://contenido.org/forum/viewtopic.php?t=18291
*
* added by H. Librenz (2007-12-07)
*/
//includePluginConf();
/**
* fixed bugfix - using functions brokes variable scopes!
*
* added by H. Librenz (2007-12-21) based on an idea of A. Lindner
*/
require_once $cfg['path']['contenido'] . $cfg['path']['includes'] . 'functions.includePluginConf.php';
$db = new DB_Contenido;
$sess->register("cfgClient");
$sess->register("errsite_idcat");
$sess->register("errsite_idart");
$sess->register("encoding");
if ($cfgClient["set"] != "set")
{
rereadClients();
}
# Check if this request is for a compressed file
if ($_GET['action'] == 'get_compressed') {
# Get the calling parameters
$sFilename = ((isset($_GET['f'])) ? $_GET['f'] : $_GET['amp;f']);
$sContentType = ((isset($_GET['c'])) ? $_GET['c'] : $_GET['amp;c']);
# Output the file using the class output() function
Output_Compressor::output($cfgClient[$client]['path']['frontend'] . 'cache/', $sFilename, $sContentType);
# Don't do anything else
exit();
}
// Call hook after plugins are loaded, added by Murat Purc, 2008-09-07
CEC_Hook::execute('Contenido.Frontend.AfterLoadPlugins');
if (!isset($encoding) || !is_array($encoding) || count($encoding) == 0)
{
// get encodings of all languages
$encoding = array();
$sql = "SELECT idlang, encoding FROM " . $cfg["tab"]["lang"];
$db->query($sql);
while ($db->next_record()) {
$encoding[$db->f('idlang')] = $db->f('encoding');
}
}
// Check frontend globals
// @TODO: Should be outsourced into startup process but requires a better detection (frontend or backend)
Contenido_Security::checkFrontendGlobals();
// update urlbuilder set http base path
Contenido_Url::getInstance()->getUrlBuilder()->setHttpBasePath($cfgClient[$client]['htmlpath']['frontend']);
// Initialize language
if (!isset($lang)) {
// if there is an entry load_lang in frontend/config.php use it, else use the first language of this client
if(isset($load_lang)){
// load_client is set in frontend/config.php
$lang = $load_lang;
}else{
$sql = "SELECT
B.idlang
FROM
".$cfg["tab"]["clients_lang"]." AS A,
".$cfg["tab"]["lang"]." AS B
WHERE
A.idclient='".Contenido_Security::toInteger($client)."' AND
A.idlang = B.idlang
LIMIT
0,1";
$db->query($sql);
$db->next_record();
$lang = $db->f("idlang");
}
}
if (!$sess->is_registered("lang") ) $sess->register("lang");
if (!$sess->is_registered("client") ) $sess->register("client");
if (isset ($username))
{
$auth->login_if(true);
}
/*
* Send HTTP header with encoding
*/
header("Content-Type: text/html; charset={$encoding[$lang]}");
/*
* if http global logout is set e.g. front_content.php?logout=true
* log out the current user.
*/
if (isset ($logout))
{
$auth->logout(true);
$auth->unauth(true);
$auth->auth["uname"] = "nobody";
}
/*
* local configuration
*/
if (file_exists("config.local.php"))
{
@ include ("config.local.php");
}
/*
* If the path variable was passed, try to resolve it to a Category Id
* e.g. front_content.php?path=/company/products/
*/
if (isset($path) && strlen($path) > 1)
{
/* Which resolve method is configured? */
if ($cfg["urlpathresolve"] == true)
{
$iLangCheck = 0;
$idcat = prResolvePathViaURLNames($path, $iLangCheck);
}
else
{
$iLangCheck = 0;
$idcat = prResolvePathViaCategoryNames($path, $iLangCheck);
if(($lang != $iLangCheck) && ((int)$iLangCheck != 0)){
$lang = $iLangCheck;
}
}
}
// error page
$aParams = array (
'client' => $client, 'idcat' => $errsite_idcat[$client], 'idart' => $errsite_idart[$client],
'lang' => $lang, 'error'=> '1'
);
$errsite = 'Location: ' . Contenido_Url::getInstance()->buildRedirect($aParams);
/*
* Try to initialize variables $idcat, $idart, $idcatart, $idartlang
* Note: These variables can be set via http globals e.g. front_content.php?idcat=41&idart=34&idcatart=35&idartlang=42
* If not the values will be computed.
*/
if ($idart && !$idcat && !$idcatart)
{
/* Try to fetch the first idcat */
$sql = "SELECT idcat FROM ".$cfg["tab"]["cat_art"]." WHERE idart = '".Contenido_Security::toInteger($idart)."'";
$db->query($sql);
if ($db->next_record())
{
$idcat = $db->f("idcat");
}
}
unset ($code);
unset ($markscript);
if (!$idcatart)
{
if (!$idart)
{
if (!$idcat)
{
# Note: In earlier Contenido versions the information if an article is startarticle of a category has been stored
# in relation con_cat_art.
if ($cfg["is_start_compatible"] == true)
{
$sql = "SELECT
idart,
B.idcat
FROM
".$cfg["tab"]["cat_art"]." AS A,
".$cfg["tab"]["cat_tree"]." AS B,
".$cfg["tab"]["cat"]." AS C
WHERE
A.idcat=B.idcat AND
B.idcat=C.idcat AND
is_start='1' AND
idclient='".Contenido_Security::toInteger($client)."'
ORDER BY
idtree ASC";
}
else
{
# Note: Now the information if an article is startarticle of a category is stored in relation con_cat_lang.
$sql = "SELECT
A.idart,
B.idcat
FROM
".$cfg["tab"]["cat_art"]." AS A,
".$cfg["tab"]["cat_tree"]." AS B,
".$cfg["tab"]["cat"]." AS C,
".$cfg["tab"]["cat_lang"]." AS D,
".$cfg["tab"]["art_lang"]." AS E
WHERE
A.idcat=B.idcat AND
B.idcat=C.idcat AND
D.startidartlang = E.idartlang AND
D.idlang='".Contenido_Security::toInteger($lang)."' AND
E.idart=A.idart AND
E.idlang='".Contenido_Security::toInteger($lang)."' AND
idclient='".Contenido_Security::toInteger($client)."'
ORDER BY
idtree ASC";
}
$db->query($sql);
if ($db->next_record()) {
$idart = $db->f("idart");
$idcat = $db->f("idcat");
} else {
if($contenido) {
cInclude("includes", "functions.i18n.php");
die(i18n("No start article for this category"));
} else {
if($error == 1) {
die("Fatal error: Could not display error page. Error to display was: 'No start article in this category'");
} else {
header($errsite);
exit;
}
}
}
} else {
$idart = -1;
if ($cfg["is_start_compatible"] == true)
{
$sql = "SELECT idart FROM ".$cfg["tab"]["cat_art"]." WHERE idcat='".Contenido_Security::toInteger($idcat)."' AND is_start='1'";
$db->query($sql);
if ($db->next_record())
{
$idart = $db->f("idart");
}
}
else
{
$sql = "SELECT startidartlang FROM ".$cfg["tab"]["cat_lang"]." WHERE idcat='".Contenido_Security::toInteger($idcat)."' AND idlang='".Contenido_Security::toInteger($lang)."'";
$db->query($sql);
if ($db->next_record())
{
if ($db->f("startidartlang") != 0)
{
$sql = "SELECT idart FROM ".$cfg["tab"]["art_lang"]." WHERE idartlang='".Contenido_Security::toInteger($db->f("startidartlang"))."'";
$db->query($sql);
$db->next_record();
$idart = $db->f("idart");
}
}
}
if ($idart != -1)
{
}
else
{
// error message in backend
if ($contenido)
{
cInclude("includes", "functions.i18n.php");
die(i18n("No start article for this category"));
}
else
{
if ($error == 1)
{
echo "Fatal error: Could not display error page. Error to display was: 'No start article in this category'";
}
else
{
header($errsite);
exit;
}
}
}
}
}
}
else
{
$sql = "SELECT idcat, idart FROM ".$cfg["tab"]["cat_art"]." WHERE idcatart='".Contenido_Security::toInteger($idcatart)."'";
$db->query($sql);
$db->next_record();
$idcat = $db->f("idcat");
$idart = $db->f("idart");
}
/* Get idcatart */
if (0 != $idart && 0 != $idcat)
{
$sql = "SELECT idcatart FROM ".$cfg["tab"]["cat_art"]." WHERE idart = '".Contenido_Security::toInteger($idart)."' AND idcat = '".Contenido_Security::toInteger($idcat)."'";
$db->query($sql);
$db->next_record();
$idcatart = $db->f("idcatart");
}
$idartlang = getArtLang($idart, $lang);
if ($idartlang === false)
{
header($errsite);
exit;
}
/*
* removed database roundtrip for checking
* if cache is enabled
* CON-115
* 2008-06-25 Thorsten Granz
*/
// START: concache, murat purc
if ($cfg["cache"]["disable"] != '1') {
cInclude('frontend', 'includes/concache.php');
$oCacheHandler = new cConCacheHandler($GLOBALS['cfgConCache'], $db);
$oCacheHandler->start($iStartTime); // $iStartTime ist optional und ist die startzeit des scriptes, z. b. am anfang von fron_content.php
}
// END: concache
##############################################
# BACKEND / FRONTEND EDITING
##############################################
/**
* If user has contenido-backend rights.
* $contenido <==> the cotenido backend session as http global
* In Backend: e.g. contenido/index.php?contenido=dac651142d6a6076247d3afe58c8f8f2
* Can also be set via front_content.php?contenido=dac651142d6a6076247d3afe58c8f8f2
*
* Note: In backend the file contenido/external/backendedit/front_content.php is included!
* The reason is to avoid cross-site scripting errors in the backend, if the backend domain differs from
* the frontend domain.
*/
if ($contenido)
{
$perm->load_permissions();
/* Change mode edit / view */
if (isset ($changeview))
{
$sess->register("view");
$view = $changeview;
}
$col = new InUseCollection;
if ($overrideid != "" && $overridetype != "")
{
$col->removeItemMarks($overridetype, $overrideid);
}
/* Remove all own marks */
$col->removeSessionMarks($sess->id);
/* If the override flag is set, override a specific InUseItem */
list ($inUse, $message) = $col->checkAndMark("article", $idartlang, true, i18n("Article is in use by %s (%s)"), true, $cfg['path']['contenido_fullhtml']."external/backendedit/front_content.php?changeview=edit&action=con_editart&idartlang=$idartlang&type=$type&typenr=$typenr&idart=$idart&idcat=$idcat&idcatart=$idcatart&client=$client&lang=$lang");
$sHtmlInUse = '';
$sHtmlInUseMessage = '';
if ($inUse == true)
{
$disabled = 'disabled="disabled"';
$sHtmlInUseCss = '<link rel="stylesheet" type="text/css" href="'.$cfg['path']['contenido_fullhtml'].'styles/inuse.css" />';
$sHtmlInUseMessage = $message;
}
$sql = "SELECT locked FROM ".$cfg["tab"]["art_lang"]." WHERE idart='".Contenido_Security::toInteger($idart)."' AND idlang = '".Contenido_Security::toInteger($lang)."'";
$db->query($sql);
$db->next_record();
$locked = $db->f("locked");
if ($locked == 1)
{
$inUse = true;
$disabled = 'disabled="disabled"';
}
// CEC to check if the user has permission to edit articles in this category
CEC_Hook::setBreakCondition(false, true); // break at "false", default value "true"
$allow = CEC_Hook::executeWhileBreakCondition(
'Contenido.Frontend.AllowEdit', $lang, $idcat, $idart, $auth->auth['uid']
);
if ($perm->have_perm_area_action_item("con_editcontent", "con_editart", $idcat) && $inUse == false && $allow == true)
{
/* Create buttons for editing */
$edit_preview = '<table cellspacing="0" cellpadding="4" border="0">';
if ($view == "edit")
{
$edit_preview = '<tr>
<td width="18">
<a title="Preview" style="font-family: Verdana; font-size: 10px; color: #000000; text-decoration: none" href="'.$sess->url("front_content.php?changeview=prev&idcat=$idcat&idart=$idart").'"><img src="'.$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"].'but_preview.gif" alt="Preview" title="Preview" border="0"></a>
</td>
<td width="18">
<a title="Preview" style="font-family: Verdana; font-size: 10px; color: #000000; text-decoration: none" href="'.$sess->url("front_content.php?changeview=prev&idcat=$idcat&idart=$idart").'">Preview</a>
</td>
</tr>';
}
else
{
$edit_preview = '<tr>
<td width="18">
<a title="Preview" style="font-family: Verdana; font-size: 10px; color: #000000; text-decoration: none" href="'.$sess->url("front_content.php?changeview=edit&idcat=$idcat&idart=$idart").'"><img src="'.$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"].'but_edit.gif" alt="Preview" title="Preview" border="0"></a>
</td>
<td width="18">
<a title="Preview" style="font-family: Verdana; font-size: 10px; color: #000000; text-decoration: none" href="'.$sess->url("front_content.php?changeview=edit&idcat=$idcat&idart=$idart").'">Edit</a>
</td>
</tr>';
}
/* Display articles */
if ($cfg["is_start_compatible"] == true)
{
$sql = "SELECT idart, is_start FROM ".$cfg["tab"]["cat_art"]." WHERE idcat='".Contenido_Security::toInteger($idcat)."' ORDER BY idart";
$db->query($sql);
}
else
{
$sql = "SELECT idart FROM ".$cfg["tab"]["cat_art"]." WHERE idcat='".Contenido_Security::toInteger($idcat)."' ORDER BY idart";
$db->query($sql);
}
$a = 1;
$edit_preview .= '<tr><td colspan="2"><table cellspacing="0" cellpadding="2" border="0"></tr><td style="font-family: verdana; font-size:10; color:#000000; text-decoration:none">Articles in category:<br>';
while ($db->next_record() && ($db->affected_rows() != 1))
{
$class = "font-family:'Verdana'; font-size:10; color:#000000; text-decoration: underline; font-weight:normal";
if (!isset ($idart))
{
if (isStartArticle(getArtLang($idart, $lang), $idcat, $lang))
{
$class = "font-family: verdana; font-size:10; color:#000000; text-decoration: underline ;font-weight:bold";
}
}
else
{
if ($idart == $db->f("idart"))
{
$class = "font-family: verdana; font-size:10; color:#000000; text-decoration: underline; font-weight:bold";
}
}
$edit_preview .= "<a style=\"$class\" href=\"".$sess->url("front_content.php?idart=".$db->f("idart")."&idcat=$idcat")."\">$a</a>&nbsp;";
$a ++;
}
$edit_preview .= '</td></tr></table></td></tr></table>';
}
} // end if $contenido
/* If mode is 'edit' and user has permission to edit articles in the current category */
if ($inUse == false && $allow == true && $view == "edit" && ($perm->have_perm_area_action_item("con_editcontent", "con_editart", $idcat)))
{
cInclude("includes", "functions.tpl.php");
cInclude("includes", "functions.con.php");
include ($cfg["path"]["contenido"].$cfg["path"]["includes"]."include.con_editcontent.php");
}
else
{
##############################################
# FRONTEND VIEW
##############################################
/* Mark submenuitem 'Preview' in the Contenido Backend (Area: Contenido --> Articles --> Preview) */
if ($contenido)
{
$markscript = markSubMenuItem(4, true);
}
unset($edit); // disable editmode
/* 'mode' is preview (Area: Contenido --> Articles --> Preview) or article displayed in the front-end */
$sql = "SELECT
createcode
FROM
".$cfg["tab"]["cat_art"]."
WHERE
idcat = '".Contenido_Security::toInteger($idcat)."' AND
idart = '".Contenido_Security::toInteger($idart)."'";
$db->query($sql);
$db->next_record();
##############################################
# code generation
##############################################
/* Check if code is expired, create new code if needed */
if($db->f("createcode") == 0 && $force == 0 && $cfg['dceModEdit']['use'] !== true && $cfg['dceLayEdit']['use'] !== true) {
$sql = "SELECT code FROM ".$cfg["tab"]["code"]." WHERE idcatart = '".Contenido_Security::toInteger($idcatart)."' AND idlang = '".Contenido_Security::toInteger($lang)."'";
$db->query($sql);
if ($db->num_rows() == 0)
{
/* Include here for performance reasons */
cInclude("includes", "functions.tpl.php");
conGenerateCode($idcat, $idart, $lang, $client);
$sql = "SELECT code FROM ".$cfg["tab"]["code"]." WHERE idcatart = '".Contenido_Security::toInteger($idcatart)."' AND idlang = '".Contenido_Security::toInteger($lang)."'";
$db->query($sql);
}
if ($db->next_record())
{
$code = stripslashes($db->f("code"));
}
else
{
if ($contenido)
$code = "echo \"No code available.\";";
else
{
if ($error == 1)
{
echo "Fatal error: Could not display error page. Error to display was: 'No code available'";
}
else
{
header($errsite);
exit;
}
}
}
} else {
$sql = "DELETE FROM ".$cfg["tab"]["code"]." WHERE idcatart = '".Contenido_Security::toInteger($idcatart)."'";
$db->query($sql);
cInclude("includes", "functions.con.php");
cInclude("includes", "functions.tpl.php");
cInclude("includes", "functions.mod.php");
conGenerateCode($idcat, $idart, $lang, $client);
$sql = "SELECT code FROM ".$cfg["tab"]["code"]." WHERE idcatart = '".Contenido_Security::toInteger($idcatart)."' AND idlang = '".Contenido_Security::toInteger($lang)."'";
$db->query($sql);
$db->next_record();
$code = stripslashes($db->f("code"));
}
/* Add mark Script to code if user is in the backend */
$code = preg_replace("/<\/head>/i", "$markscript\n</head>", $code, 1);
/* If article is in use, display notification */
if ($sHtmlInUseCss && $sHtmlInUseMessage) {
$code = preg_replace("/<\/head>/i", "$sHtmlInUseCss\n</head>", $code, 1);
$code = preg_replace("/(<body[^>]*)>/i", "\${1}> \n $sHtmlInUseMessage", $code, 1);
}
/* Check if category is public */
$sql = "SELECT public FROM ".$cfg["tab"]["cat_lang"]." WHERE idcat='".Contenido_Security::toInteger($idcat)."' AND idlang='".Contenido_Security::toInteger($lang)."'";
$db->query($sql);
$db->next_record();
$public = $db->f("public");
##############################################
# protected categories
##############################################
if ($public == 0)
{
if ($auth->auth["uid"] == "nobody")
{
$sql = "SELECT user_id, value FROM ".$cfg["tab"]["user_prop"]." WHERE type='frontend' and name='allowed_ip'";
$db->query($sql);
while ($db->next_record())
{
$user_id = $db->f("user_id");
$range = urldecode($db->f("value"));
$slash = strpos($range, "/");
if ($slash == false)
{
$netmask = "255.255.255.255";
$network = $range;
}
else
{
$network = substr($range, 0, $slash);
$netmask = substr($range, $slash +1, strlen($range) - $slash -1);
}
if (IP_match($network, $netmask, $_SERVER["REMOTE_ADDR"]))
{
$sql = "SELECT idright
FROM ".$cfg["tab"]["rights"]." AS A,
".$cfg["tab"]["actions"]." AS B,
".$cfg["tab"]["area"]." AS C
WHERE B.name = 'front_allow' AND C.name = 'str' AND A.user_id = '".Contenido_Security::escapeDB($user_id, $db2)."' AND A.idcat = '".Contenido_Security::toInteger($idcat)."'
AND A.idarea = C.idarea AND B.idaction = A.idaction";
$db2 = new DB_Contenido;
$db2->query($sql);
if ($db2->num_rows() > 0)
{
$auth->auth["uid"] = $user_id;
$validated = 1;
}
}
}
if ($validated != 1)
{
// CEC to check category access
CEC_Hook::setBreakCondition(true, false); // break at "true", default value "false"
$allow = CEC_Hook::executeWhileBreakCondition(
'Contenido.Frontend.CategoryAccess', $lang, $idcat, $auth->auth['uid']
);
$auth->login_if(!$allow);
}
}
else
{
// CEC to check category access
CEC_Hook::setBreakCondition(true, false); // break at "true", default value "false"
$allow = CEC_Hook::executeWhileBreakCondition(
'Contenido.Frontend.CategoryAccess', $lang, $idcat, $auth->auth['uid']
);
/*
added 2008-11-18 Timo Trautmann
in backendeditmode also check if logged in backenduser has permission to view preview of page
*/
if ($allow == false && $contenido && $perm->have_perm_area_action_item("con_editcontent", "con_editart", $idcat)) {
$allow = true;
}
if (!$allow)
{
header($errsite);
exit;
}
}
}
##############################################
# statistic
##############################################
$oStatCol = new cApiStatCollection();
$oStatCol->trackView($idcatart);
/*
* Check if an article is start article of the category
*/
if ($cfg["is_start_compatible"] == true)
{
$sql = "SELECT is_start FROM ".$cfg["tab"]["cat_art"]." WHERE idcatart='".Contenido_Security::toInteger($idcatart)."'";
$db->query($sql);
$db->next_record();
$isstart = $db->f("is_start");
}
else
{
$sql = "SELECT startidartlang FROM ".$cfg["tab"]["cat_lang"]." WHERE idcat='".Contenido_Security::toInteger($idcat)."' AND idlang = '".Contenido_Security::toInteger($lang)."'";
$db->query($sql);
$db->next_record();
if ($db->f("idartlang") == $idartlang)
{
$isstart = 1;
}
else
{
$isstart = 0;
}
}
##############################################
# time management
##############################################
$sql = "SELECT timemgmt FROM ".$cfg["tab"]["art_lang"]." WHERE idart='".Contenido_Security::toInteger($idart)."' AND idlang = '".Contenido_Security::toInteger($lang)."'";
$db->query($sql);
$db->next_record();
if (($db->f("timemgmt") == "1") && ($isstart != 1))
{
$sql = "SELECT online, redirect, redirect_url FROM ".$cfg["tab"]["art_lang"]." WHERE idart='".Contenido_Security::toInteger($idart)."' AND idlang = '".Contenido_Security::toInteger($lang)."'
AND NOW() > datestart AND NOW() < dateend";
}
else
{
$sql = "SELECT online, redirect, redirect_url FROM ".$cfg["tab"]["art_lang"]." WHERE idart='".Contenido_Security::toInteger($idart)."' AND idlang = '".Contenido_Security::toInteger($lang)."'";
}
$db->query($sql);
$db->next_record();
$online = $db->f("online");
$redirect = $db->f("redirect");
$redirect_url = $db->f("redirect_url");
@ eval ("\$"."redirect_url = \"$redirect_url\";"); // transform variables
$insert_base = getEffectiveSetting('generator', 'basehref', "true");
/*
* generate base url
*/
if ($insert_base == "true")
{
$is_XHTML = getEffectiveSetting('generator', 'xhtml', "false");
$str_base_uri = $cfgClient[$client]["path"]["htmlpath"];
// CEC for base href generation
$str_base_uri = CEC_Hook::executeAndReturn('Contenido.Frontend.BaseHrefGeneration', $str_base_uri);
if ($is_XHTML == "true") {
$baseCode = '<base href="'.$str_base_uri.'" />';
} else {
$baseCode = '<base href="'.$str_base_uri.'">';
}
$code = str_ireplace_once("<head>", "<head>\n".$baseCode, $code);
}
/*
* Handle online (offline) articles
*/
if ($online)
{
if ($redirect == '1' && $redirect_url != '')
{
page_close();
/*
* Redirect to the URL defined in article properties
*/
$oUrl = Contenido_Url::getInstance();
if ($oUrl->isIdentifiableFrontContentUrl($redirect_url)) {
// perform urlbuilding only for identified internal urls
$aUrl = $oUrl->parse($redirect_url);
if (!isset($aUrl['params']['lang'])) {
$aUrl['params']['lang'] = $lang;
}
$redirect_url = $oUrl->buildRedirect($aUrl['params']);
}
header("Location: $redirect_url");
exit;
}
else
{
if ($cfg["debug"]["codeoutput"])
{
echo "<textarea>".clHtmlSpecialChars($code)."</textarea>";
}
/*
* That's it! The code of an article will be evaluated.
* The code of an article is basically a PHP script which is cached in the database.
* Layout and Modules are merged depending on the Container definitions of the Template.
*/
$aExclude = explode(',', getEffectiveSetting('frontend.no_outputbuffer', 'idart', ''));
if (in_array(Contenido_Security::toInteger($idart), $aExclude)) {
eval ("?>\n".$code."\n<?php\n");
} else {
// write html output into output buffer and assign it to an variable
ob_start();
eval ("?>\n".$code."\n<?php\n");
$htmlCode = ob_get_contents();
ob_end_clean();
// process CEC to do some preparations before output
$htmlCode = CEC_Hook::executeAndReturn('Contenido.Frontend.HTMLCodeOutput', $htmlCode);
// process CEC to handle the compression of the output
$htmlCode = CEC_Hook::executeAndReturn('Contenido.Frontend.HTMLCodeCompression', $htmlCode);
// print output
echo $htmlCode;
}
}
}
else
{
# if user is in the backend display offline articles
if ($contenido)
{
eval ("?>\n".$code."\n<?php\n");
}
else
{
if ($error == 1)
{
echo "Fatal error: Could not display error page. Error to display was: 'No contenido session variable set. Probable error cause: Start article in this category is not set on-line.'";
}
else
{
header($errsite);
exit;
}
}
}
}
/*
* removed database roundtrip for checking
* if cache is enabled
* CON-115
* 2008-06-25 Thorsten Granz
*/
// START: concache, murat purc
if ($cfg["cache"]["disable"] != '1') {
$oCacheHandler->end();
#echo $oCacheHandler->getInfo();
}
// END: concache
/*
* configuration settings after the site is displayed.
*/
if (file_exists("config.after.php"))
{
@ include ("config.after.php");
}
if (isset ($savedlang))
{
$lang = $savedlang;
}
$db->disconnect();
page_close();
?>

153
cms/front_crcloginform.inc.php Normale Datei
Datei anzeigen

@ -0,0 +1,153 @@
<?php
/**
* file: front_crcloginform.inc.php
*
* @package ConLite
* @subpackage Frontend
* @version $Rev: 450 $
* @author Ortwin Pinke
* @copyright conrepo.org
* @link http://conlite.conrepo.org
* @author Jan Lengowski
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*
* $Id: front_crcloginform.inc.php 450 2016-07-20 11:11:12Z oldperl $:
*/
/**
* security check
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
global $cfg, $idcat, $idart, $idcatart, $lang, $client, $username, $encoding;
$err_catart = trim(getEffectiveSetting("login_error_page", "idcatart", ""));
$err_cat = trim(getEffectiveSetting("login_error_page", "idcat", ""));
$err_art = trim(getEffectiveSetting("login_error_page", "idart", ""));
$oUrl = Contenido_Url::getInstance();
$sClientHtmlPath = $cfgClient[$client]['path']['htmlpath'];
$sUrl = $sClientHtmlPath . 'front_content.php';
$sErrorUrl = $sUrl;
$bRedirect = false;
if ($err_catart != '') {
$sErrorUrl .= '?idcatart=' . $err_catart . '&lang=' . $lang;
$bRedirect = true;
} elseif ($err_art != '' && $err_cat != '') {
$sErrorUrl .= '?idcat=' . $err_cat . '&idart=' . $err_art . '&lang=' . $lang;
$bRedirect = true;
} elseif ($err_cat != '') {
$sErrorUrl .= '?idcat=' . $err_cat . '&lang=' . $lang;
$bRedirect = true;
} elseif ($err_art != '') {
$sErrorUrl .= '?idart=' . $err_art . '&lang=' . $lang;
$bRedirect = true;
}
if ($bRedirect) {
$aUrl = $oUrl->parse($sess->url($sErrorUrl));
$sErrorUrl = $oUrl->buildRedirect($aUrl['params']);
header('Location: ' . $sErrorUrl);
exit();
}
if (isset($_GET['return']) || isset($_POST['return'])){
$aLocator = array('lang=' . (int) $lang);
if ($idcat > 0) {
$aLocator[] = 'idcat=' . intval($idcat);
}
if ($idart > 0) {
$aLocator[] = 'idart=' . intval($idart);
}
if (isset($_POST['username']) || isset($_GET['username'])){
$aLocator[] = 'wrongpass=1';
}
$sErrorUrl = $sUrl . '?' . implode('&', $aLocator);
$aUrl = $oUrl->parse($sess->url($sErrorUrl));
$sErrorUrl = $oUrl->buildRedirect($aUrl['params']);
header ('Location: ' . $sErrorUrl);
exit();
}
// set form action
$sFormAction = $sess->url($sUrl . '?idcat=' . intval($idcat) . '&lang=' . $lang);
$aUrl = $oUrl->parse($sFormAction);
$sFormAction = $oUrl->build($aUrl['params']);
// set login input image, use button as fallback
if ( file_exists($cfgClient[$client]['path']['frontend'] . 'images/but_ok.gif') ) {
$sLoginButton = '<input type="image" title="Login" alt="Login" src="' . $sClientHtmlPath . 'images/but_ok.gif" />' . "\n";
} else {
$sLoginButton = '<input type="submit" title="Login" value="Login" style="font-size:90%;font-weight:bold;background-color:' . $cfg['color']['table_header'] . ';border:1px solid ' . $cfg['color']['table_border'] . ';" />' . "\n";
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="<?php echo $encoding[$lang] ?>" />
<title>:: :: :: :: Contenido Login</title>
<script type="text/javascript">
if (top != self) {
top.location.href = self.location.href;
}
</script>
<style type="text/css">
* {margin:0; padding:0;}
html, body {height: 100%;}
body {background-color:#fff; font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 11px; color:#000;}
a img {border:none;}
#loginPageWrap {
width:230px; height:120px; text-align:center; border:1px solid <?php echo $cfg['color']['table_border'] ?>; background-color:<?php echo $cfg['color']['table_light'] ?>;
position:absolute; left:50%; top:50%; margin-left:-115px; margin-top:-60px;
}
#login {text-align:left;}
#login label {display:block; float:left; width:70px; }
#login input.text {float:right; width:130px; margin:0; }
#login .formHeader {font-weight:bold; background-color:<?php echo $cfg['color']['table_header'] ?>; border-bottom:1px solid <?php echo $cfg['color']['table_border'] ?>; padding:3px; margin-bottom:10px;}
#login .formRow {padding:0 10px; height:31px;}
#login .clear {clear:both;}
</style>
</head>
<body>
<div id="loginPageWrap">
<form id="login" name="login" method="post" action="<?php echo $sFormAction; ?>">
<input type="hidden" name="vaction" value="login" />
<input type="hidden" name="formtimestamp" value="<?php echo time(); ?>" />
<input type="hidden" name="idcat" value="<?php echo intval($idcat); ?>" />
<div class="formHeader">Login</div>
<div class="formRow">
<label for="username">Username:</label><input type="text" class="text" name="username" id="username" size="20" maxlength="32" value="<?php echo ( isset($this->auth['uname']) ) ? $this->auth['uname'] : '' ?>" /><br class="clear" />
</div>
<div class="formRow">
<label for="password">Password:</label><input type="password" class="text" name="password" id="password" size="20" maxlength="32" /><br class="clear" />
</div>
<div class="formRow" style="text-align:right">
<?php echo $sLoginButton ?>
</div>
</form>
</div>
<script type="text/javascript">
<!--
if (document.login.username.value == '') {
document.login.username.focus();
} else {
document.login.password.focus();
}
// -->
</script>
</body>
</html>

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 2.6 KiB

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 1.8 KiB

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 1.1 KiB

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 1.1 KiB

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 1.0 KiB

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 1.1 KiB

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 2.1 KiB

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 2.1 KiB

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 2.5 KiB

BIN
cms/images/basic-pic1.jpg Normale Datei

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 146 KiB

BIN
cms/images/basic-pic2.jpg Normale Datei

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 126 KiB

BIN
cms/images/basic-pic3.jpg Normale Datei

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 126 KiB

BIN
cms/images/basic-pic4.jpg Normale Datei

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 53 KiB

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 8.6 KiB

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 12 KiB

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 9.5 KiB

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 14 KiB

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 2.7 KiB

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 5.5 KiB

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 26 KiB

4
cms/images/index.php Normale Datei
Datei anzeigen

@ -0,0 +1,4 @@
<?php
header("Location:/index.php");
exit;
?>

BIN
cms/images/logo-small.png Normale Datei

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 3.4 KiB

BIN
cms/images/logo.png Normale Datei

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 10 KiB

Datei anzeigen

@ -0,0 +1,85 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* Recursive loop over given category for building a frontend navigation
*
* @package Frontend
* @subpackage Navigation
* @version 1.0.0
* @author Rudi Bieller
* @copyright four for business AG <www.4fb.de>
*
* $Id: Contenido_NavMain_Util.class.php 450 2016-07-20 11:11:12Z oldperl $
*/
class Contenido_NavMain_Util {
/**
* Recursive Loop over all (sub)categories.
* Each level will be assigned a css class navmainStandardLevel_x
*
* @param Contenido_Category $oCategory
* @param Contenido_FrontendNavigation $oFrontendNavigation
* @param Template $oTpl
* @param string $sUrlStyle
* @param array $aCfg
* @param int $iLang
* @param array $aLevelInfo Information for marking active cat per levels
* @param array $aDepthInfo Info on level depth / where to stop. Format: array(iCurrentLoopCount, iMaxLoopCount)
* @return void
*/
public static function loopCats(Contenido_Category $oCategory, Contenido_FrontendNavigation $oFrontendNavigation, Template $oTpl, array $aCfg, $iLang, array $aLevelInfo, $iCurrentPageIdcat, array $aDepthInfo = array()) {
$aDepthInfo[0] = isset($aDepthInfo[0]) ? $aDepthInfo[0] + 1 : 1;
$aDepthInfo[1] = isset($aDepthInfo[1]) ? $aDepthInfo[1] : 1;
// display current item
$iItemLevel = $oFrontendNavigation->getLevel($oCategory->getIdCat());
if (!isset($aLevelInfo[$oCategory->getIdCat()])) {
$aLevelInfo[$oCategory->getIdCat()] = array();
}
$oCurrentSubcategories = $oFrontendNavigation->getSubCategories($oCategory->getIdCat());
$aLevelInfo[$oCategory->getIdCat()]['has_children'] = $oCurrentSubcategories->count() > 0;
$aLevelInfo[$oCategory->getIdCat()]['first_child_item'] = -1;
$aLevelInfo[$oCategory->getIdCat()]['last_child_item'] = -1;
$bMarkActive = $oCategory->getIdCat() == $iCurrentPageIdcat || $oFrontendNavigation->isInPathToRoot($oCategory->getIdCat(), $iCurrentPageIdcat);
if ($oCurrentSubcategories->count() > 0) {
$aLevelInfo[$oCategory->getIdCat()]['first_child_item'] = $oCurrentSubcategories[0]->getIdCat();
$aLevelInfo[$oCategory->getIdCat()]['last_child_item'] = $oCurrentSubcategories[$oCurrentSubcategories->count()-1]->getIdCat();
}
// this is just for sample client - modify to your needs!
if (($aCfg['url_builder']['name'] == 'front_content') || ($aCfg['url_builder']['name'] == 'MR')) {
$aParams = array('lang' => $iLang, 'idcat' => $oCategory->getIdCat());
} else {
$aParams = array('a' => $oCategory->getIdCat(),
'idcat' => $oCategory->getIdCat(), // needed to build category path
'lang' => $iLang, // needed to build category path
'level' => 1); // needed to build category path
}
// fill template with values
$oTpl->set('d', 'name', $oCategory->getCategoryLanguage()->getName());
$oTpl->set('d', 'css_level', $iItemLevel);
$oTpl->set('d', 'css_first_item', ($aLevelInfo[$oCategory->getIdParent()]['first_child_item'] == $oCategory->getIdCat() ? ' first' : ''));
$oTpl->set('d', 'css_last_item', ($aLevelInfo[$oCategory->getIdParent()]['last_child_item'] == $oCategory->getIdCat() ? ' last' : ''));
$oTpl->set('d', 'css_active_item', ($bMarkActive === true ? ' active' : ''));
try {
$oTpl->set('d', 'url', Contenido_Url::getInstance()->build($aParams));
} catch (InvalidArgumentException $e) {
$oTpl->set('d', 'url', '#');
}
$oTpl->next();
// continue until max level depth
if ($aDepthInfo[1] > $aDepthInfo[0]) {
// check if current item has sub-items to be displayed
$bShowFollowUps = ($oCategory->getIdCat() == $iCurrentPageIdcat || $oFrontendNavigation->isInPathToRoot($oCategory->getIdCat(), $iCurrentPageIdcat))
? true : false;
if ($bShowFollowUps === true && $oCurrentSubcategories->count() > 0) {
$oSubCategories = $oCurrentSubcategories;
foreach ($oSubCategories as $oSubCategory) {
self::loopCats($oSubCategory, $oFrontendNavigation, $oTpl, $aCfg, $iLang, $aLevelInfo, $iCurrentPageIdcat, $aDepthInfo);
}
}
}
}
}
?>

Datei anzeigen

@ -0,0 +1,66 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* Recursive loop over given category for building a sitemap navigation
*
* @package Frontend
* @subpackage Navigation
* @version 1.0.0
* @author Rudi Bieller
* @copyright four for business AG <www.4fb.de>
*
* $Id: Contenido_Sitemap_Util.class.php 450 2016-07-20 11:11:12Z oldperl $
*/
class Contenido_Sitemap_Util {
/**
* Recursive Loop over all (sub)categories.
* Each level will be assigned a css class sitemapStandardLevel_x
*
* @param Contenido_Category $oCategory
* @param Contenido_FrontendNavigation $oFrontendNavigation
* @param Template $oTpl
* @param string $sUrlStyle
* @param array $aCfg
* @param int $iLang
* @param array $aDepthInfo Info on level depth / where to stop. Format: array(iCurrentLoopCount, iMaxLoopCount)
* @return void
*/
public static function loopCats(Contenido_Category $oCategory, Contenido_FrontendNavigation $oFrontendNavigation, Template $oTpl, $sUrlStyle, array $aCfg, $iLang, array $aDepthInfo = array()) {
$aDepthInfo[0] = isset($aDepthInfo[0]) ? $aDepthInfo[0] + 1 : 1;
$aDepthInfo[1] = isset($aDepthInfo[1]) ? $aDepthInfo[1] : 1;
// display current item
$iItemLevel = $oFrontendNavigation->getLevel($oCategory->getIdCat());
// this is just for sample client - modify to your needs!
if (($aCfg['url_builder']['name'] == 'front_content') || ($aCfg['url_builder']['name'] == 'MR')) {
$aParams = array('lang' => $iLang, 'idcat' => $oCategory->getIdCat());
} else {
$aParams = array('a' => $oCategory->getIdCat(),
'idcat' => $oCategory->getIdCat(), // needed to build category path
'lang' => $iLang, // needed to build category path
'level' => 1); // needed to build category path
}
// fill template with values
$oTpl->set('d', 'name', $oCategory->getCategoryLanguage()->getName());
$oTpl->set('d', 'css_level', $iItemLevel);
try {
$oTpl->set('d', 'url', Contenido_Url::getInstance()->build($aParams));
} catch (InvalidArgumentException $e) {
$oTpl->set('d', 'url', '#');
}
$oTpl->next();
// continue until max level depth
if ($aDepthInfo[1] > $aDepthInfo[0]) {
// check if current item has sub-items
$oSubCategories = $oFrontendNavigation->getSubCategories($oCategory->getIdCat());
if ($oSubCategories->count() > 0) {
foreach ($oSubCategories as $oSubCategory) {
self::loopCats($oSubCategory, $oFrontendNavigation, $oTpl, $sUrlStyle, $aCfg, $iLang, $aDepthInfo);
}
}
}
}
}
?>

Datei anzeigen

@ -0,0 +1,531 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* Handles the "PEAR Cache Output" functionality.
*
* @package Frontend
* @subpackage Cache
* @version $Rev: 450 $
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*
* $Id: class.concache.php 450 2016-07-20 11:11:12Z oldperl $:
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class cConCache{
/**
* PEAR Cache Output Object
*
* @var obj $_oPearCache
*/
var $_oPearCache;
/**
* Flag 2 activate caching.
*
* @var bool $_bEnableCaching
*/
var $_bEnableCaching = false;
/**
* Flag for output of debug informations.
*
* @var bool $_bDebug
*/
var $_bDebug = false;
/**
* Flag 2 print html comment including some debug informations.
*
* @var bool $_bHtmlComment
*/
var $_bHtmlComment = false;
/**
* Start time of caching.
*
* @var int $_iStartTime
*/
var $_iStartTime;
/**
* Option array 4 generating cache identifier (e. g. $_GET,$_POST, $_COOKIE, ...).
*
* @var array _aIDOptions
*/
var $_aIDOptions;
/**
* Option array 4 pear caching.
*
* @var array $_aIDOptions
*/
var $_aCacheOptions;
/**
* Handler array 2 store code, beeing executed on some events.
* We have actually two events:
* - 'beforeoutput': code to execute before doing the output
* - 'afteroutput' code to execute after output
*
* @var array $_aEventCode
*/
var $_aEventCode;
/**
* Unique identifier for caching.
*
* @var string $_sID
*/
var $_sID;
/**
* Directory 2 store cached output.
*
* @var string $_sDir
*/
var $_sDir = 'cache/';
/**
* Subdirectory 2 store cached output.
*
* @var string $_sGroup
*/
var $_sGroup = 'default';
/**
* Substring 2 add as prefix to cache-filename.
*
* @var string $_sPrefix
*/
var $_sPrefix = 'cache_';
/**
* Default lifetime of cached files.
*
* @var int $_iLifetime
*/
var $_iLifetime = 3600;
/**
* Used 2 store debug message.
*
* @var string $_sDebugMsg
*/
var $_sDebugMsg = '';
/**
* HTML code template used for debug message.
*
* @var string $_sDebugTpl
*/
var $_sDebugTpl = '<div>%s</div>';
/**
* HTML comment template used for generating some debug infos.
*
* @var string $_sDebugTpl
*/
var $_sHtmlCommentTpl = '
<!--
CACHESTATE: %s
TIME: %s
VALID UNTIL: %s
-->
';
/**
* Constructor of cConCache
*
* @param string $cachedir Directory 2 cache files
* @param string $cachegroup Subdirectory 2 cache files
* @param string $cacheprefix Prefixname 2 add 2 cached files
*/
function cConCache($cachedir=null, $cachegroup=null, $cacheprefix=null){
// wherever you want the cache files
if(!is_null($cachedir)){
$this->_sDir = $cachedir;
}
// subdirectory where you want the cache files
if(!is_null($cachegroup)){
$this->_sGroup = $cachegroup;
}
// optional a filename prefix
if(!is_null($cacheprefix)){
$this->_sPrefix = $cacheprefix;
}
// config options are passed to the cache as an array
$this->_aCacheOptions = array('cache_dir' => $this->_sDir, 'filename_prefix' => $this->_sPrefix);
} // function cConCache()
/**
* Set/Get the flag 2 enable caching.
*
* @param bool $enable True 2 enable chaching or false
* @return mixed Enable flag or void
*/
function enable($enable=null){
if(!is_null($enable) && is_bool($enable)){
$this->_bEnableCaching = $enable;
} else {
return $this->_bEnableCaching;
}
} // function enable()
/**
* Set/Get the flag 2 debug cache object (prints out miss/hit state with execution time).
*
* @param bool $debug True 2 activate debugging or false.
* @return mixed Debug flag or void
*/
function debug($debug){
if(!is_null($debug) && is_bool($debug)){
$this->_bDebug = $debug;
} else {
return $this->_bDebug;
}
} // function debug()
/**
* Set/Get flag 2 print out cache info as html comment.
*
* @param bool $htmlcomment True debugging or false.
* @return void Htmlcomment flag or void
*/
function htmlComment($htmlcomment){
if(!is_null($htmlcomment) && is_bool($htmlcomment)){
$this->_bHtmlComment = $htmlcomment;
} else {
return $this->_bHtmlComment;
}
} // function htmlComment()
/**
* Set/Get caching lifetime in seconds.
*
* @param int $seconds New Lifetime in seconds
* @return mixed Actual lifetime or void
*/
function lifetime($seconds=null){
if ($seconds != null && is_numeric($seconds) && $seconds > 0) {
$this->_iLifetime = $seconds;
} else {
return $this->_iLifetime;
}
} // function lifetime()
/**
* Set/Get template to use on printing the chache info.
*
* @param string $template Template string including the '%s' format definition.
* @return void
*/
function infoTemplate($template){
$this->_sDebugTpl = $template;
} // function infoTemplate()
/**
* Add option 4 caching (e. g. $_GET,$_POST, $_COOKIE, ...). Used 2 generate the id for caching.
*
* @param string $name Name of option
* @param string $option Value of option (any variable)
* @return void
*/
function addOption($name, $option){
$this->_aIDOptions[$name] = $option;
} // function addOption()
/**
* Returns information cache hit/miss and execution time if caching is enabled.
*
* @return string Information about cache if caching is enabled, otherwhise nothing.
*/
function getInfo(){
if(!$this->_bEnableCaching){ return; }
return $this->_sDebugMsg;
} // function getInfo()
/**
* Handles PEAR caching. The script will be terminated by calling die(), if any cached
* content is found.
*
* @param int $iPageStartTime Optional start time, e. g. start time of main script
* @return void
*/
function start($iPageStartTime=null){
if(!$this->_bEnableCaching){ return; }
$this->_iStartTime = $this->_getMicroTime();
// set cache object and unique id
$this->_initPEARCache();
// check if it's cached and start the output buffering if neccessary
if ($content = $this->_oPearCache->start($this->_sID, $this->_sGroup)) {
//raise beforeoutput event
$this->_raiseEvent('beforeoutput');
$iEndTime = $this->_getMicroTime();
if ($this->_bHtmlComment) {
$time = sprintf("%2.4f", $iEndTime - $this->_iStartTime);
$exp = date('Y-m-d H:i:s', $this->_oPearCache->container->expires);
$content .= sprintf($this->_sHtmlCommentTpl, 'HIT', $time.' sec.', $exp);
if ($iPageStartTime != null && is_numeric($iPageStartTime)) {
$content .= '<!-- ['.sprintf("%2.4f", $iEndTime - $iPageStartTime).'] -->';
}
}
if ($this->_bDebug) {
$info = sprintf("HIT: %2.4f sec.", $iEndTime - $this->_iStartTime);
$info = sprintf($this->_sDebugTpl, $info);
$content = str_ireplace('</body>', $info."\n</body>", $content);
}
echo $content;
//raise afteroutput event
$this->_raiseEvent('afteroutput');
die();
}
} // function start()
/**
* Handles ending of PEAR caching.
*
* @return void
*/
function end(){
if (!$this->_bEnableCaching){ return; }
// this might go into your auto_append file. store the data into the cache, default lifetime is set in $this->_iLifetime
$this->_oPearCache->endPrint($this->_iLifetime, __FILE__ . ' ' . filemtime(__FILE__));
if ($this->_bDebug) {
$this->_sDebugMsg .= "\n".sprintf("MISS: %2.4f sec.\n", $this->_getMicroTime() - $this->_iStartTime);
$this->_sDebugMsg = sprintf($this->_sDebugTpl, $this->_sDebugMsg);
}
} // function end()
/**
* Removes any cached content if exists.
* This is nesessary to delete cached articles, if they are changed on backend.
*
* @return void
*/
function removeFromCache(){
// set cache object and unique id
$this->_initPEARCache();
$bExists = $this->_oPearCache->isCached($this->_sID, $this->_sGroup);
if ($bExists) {
$this->_oPearCache->remove($this->_sID, $this->_sGroup);
}
} // function removeFromCache()
/*
* Creates one-time a instance of PEAR cache output object and also the unique id,
* if propery $this->_oPearCache is not set.
*
* @return void
* @access private
*/
function _initPEARCache(){
if (is_object($this->_oPearCache)) {
return;
}
// create a output cache object mode - file storage
cInclude('pear', 'Cache/Output.php');
$this->_oPearCache = new Cache_Output('file', $this->_aCacheOptions);
// generate an ID from whatever might influence the script behavoiur
$this->_sID = $this->_oPearCache->generateID($this->_aIDOptions);
} // function _initPEARCache()
/**
* Raises any defined event code by using eval().
*
* @param string $name Name of event 2 raise
* @return void
* @access private
*/
function _raiseEvent($name){
// check if event exists, get out if not
if (!isset($this->_aEventCode[$name]) && !is_array($this->_aEventCode[$name])) {
return;
}
// loop array and execute each defined php-code
foreach ($this->_aEventCode[$name] as $code) {
eval($code);
}
} // function _raiseEvent()
/**
* Returns microtime (Unix-Timestamp), used to calculate time of execution.
*
* @return float Timestamp
* @access private
*/
function _getMicroTime(){
$mtime = explode(' ', microtime());
$mtime = $mtime[1] + $mtime[0];
return $mtime;
} // function _getMicroTime()
} // class cConCache
/**
* @class cConCacheHandler
* @brief Class cConCacheHandler. This is used to set configuration
* and to manage caching output
* @version 0.9
* @date 07.07.2006
* @author Murat Purc <murat@purc.de>
* @copyright <EFBFBD> Murat Purc 2006
*/
class cConCacheHandler extends cConCache {
/**
* Constructor of cConCacheHandler.
* Does some checks and sets the configuration of cache object.
*
* @param array $aConf Configuration of caching as follows:
* - $a['excludecontenido'] bool. don't cache output, if we have a contenido variable,
* e. g. on calling frontend preview from backend
* - $a['enable'] bool. activate caching of frontend output
* - $a['debug'] bool. compose debuginfo (hit/miss and execution time of caching)
* - $a['infotemplate'] string. debug information template
* - $a['htmlcomment'] bool. add a html comment including several debug messages to output
* - $a['lifetime'] int. lifetime in seconds 2 cache output
* - $a['cachedir'] string. directory where cached content is 2 store.
* - $a['cachegroup'] string. cache group, will be a subdirectory inside cachedir
* - $a['cacheprefix'] string. add prefix 2 stored filenames
* - $a['idoptions'] array. several variables 2 create a unique id, if the output depends
* on them. e. g. array('uri'=>$_SERVER['REQUEST_URI'],'post'=>$_POST,'get'=>$_GET);
* @param obj $db Reference 2 Contenido database object
* @param int $iCreateCode Flag of createcode state from table con_cat_art
*/
function cConCacheHandler($aConf, &$db, $iCreateCode=null) {
// check if caching is allowed on contenido variable
if ($aConf['excludecontenido'] == true) {
if (isset($GLOBALS['contenido'])) {
// contenido variable exists, set state and get out here
$this->_bEnableCaching = false;
return;
}
}
// set enable state of caching
if (is_bool($aConf['enable'])) {
$this->_bEnableCaching = $aConf['enable'];
}
if ($this->_bEnableCaching == false) {
return;
}
// check if current article shouldn't be cached (by stese)
$sExcludeIdarts = getEffectiveSetting('cache', 'excludeidarts', false);
if ($sExcludeIdarts && strlen($sExcludeIdarts)>0) {
$sExcludeIdarts = preg_replace("/[^0-9,]/", '', $sExcludeIdarts);
$aExcludeIdart = explode(',', $sExcludeIdarts);
if (in_array($GLOBALS['idart'], $aExcludeIdart)) {
$this->_bEnableCaching = false;
return;
}
}
$this->_oDB = $db;
// set caching configuration
parent::cConCache($aConf['cachedir'], $aConf['cachegroup']);
$this->debug($aConf['debug']);
$this->htmlComment($aConf['htmlcomment']);
$this->lifetime($aConf['lifetime']);
$this->infoTemplate($aConf['infotemplate']);
foreach ($aConf['idoptions'] as $name => $var) {
$this->addOption($name, $var);
}
if (is_array($aConf['raiseonevent'])) {
$this->_aEventCode = $aConf['raiseonevent'];
}
// check, if code is to create
$this->_bEnableCaching = !$this->_isCode2Create($iCreateCode);
if ($this->_bEnableCaching == false) {
$this->removeFromCache();
}
} // function cConCacheHandler()
/**
* Checks, if the create code flag is set. Output will be loaded from cache, if no code is 2 create.
* It also checks the state of global variable $force.
*
* @param mixed $iCreateCode State of create code (0 or 1). The state will be loaded from database if value is "null"
* @return bool True if code is to create, otherwhise false.
* @access private
*/
function _isCode2Create($iCreateCode){
if ($this->_bEnableCaching == false) {
return;
}
// check content of global variable $force, get out if is's set to '1'
if (isset($GLOBALS['force']) && is_numeric($GLOBALS['force']) && $GLOBALS['force'] == 1) {
return true;
}
if (is_null($iCreateCode)) {
// check if code is expired
$oApiCatArtColl = new cApiCategoryArticleCollection('idart="'.$GLOBALS['idart'].'" AND idcat="'.$GLOBALS['idcat'].'"');
if ($oApiCatArt = $oApiCatArtColl->next()) {
$iCreateCode = $oApiCatArt->get('createcode');
unset($oApiCatArt);
}
unset($oApiCatArtColl);
}
return ($iCreateCode == 1) ? true : false;
} // function _isCode2Create()
} // class cConCacheHandler
?>

Datei anzeigen

@ -0,0 +1,573 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* Various derived HTML class elements especially useful
* in the input area of modules
* Simple table generation class especially useful to generate
* backend configuration table. May be used also in Frontend,
* but note the globally used variables ($cfg)
*
* Usage: Store file in client/includes folder (generate the
* includes folder, if not available). Include the file
* in your modules using
* cInclude("frontend", "includes/class.input.helper.php");
*
* @package Frontend
* @subpackage InputHelpers
* @version 2.1 (formerly known as functions.input.helper.php)
* @author Björn Behrens (HerrB), http://www.btech.de
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*
* $Id: class.input.helper.php 450 2016-07-20 11:11:12Z oldperl $:
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
// Select box with additional functions for category and article selection
class cHTMLInputSelectElement extends cHTMLSelectElement
{
/**
* Constructor. Creates an HTML select field (aka "DropDown").
*
* @param string $sName Name of the element
* @param int $iWidth Width of the select element
* @param string $sID ID of the element
* @param string $bDisabled Item disabled flag (non-empty to set disabled)
* @param int $iTabIndex Tab index for form elements
* @param string $sAccesskey Key to access the field
*
* @return none
**/
function cHTMLInputSelectElement ($sName, $iWidth = "", $sID = "", $bDisabled = false, $iTabIndex = null, $sAccessKey = "")
{
cHTMLSelectElement :: __construct($sName, $iWidth, $sID, $bDisabled, $iTabIndex, $sAccessKey);
}
/**
* Function addArticles. Adds articles to select box values.
*
* @param int $iIDCat idcat of the category to be listed
* @param bool $bColored Add color information to option elements
* @param bool $bArtOnline If true, only online articles will be added
* @param string $sSpaces Just some "&nbsp;" to show data hierarchically (used in conjunction with addCategories)
*
* @return int Number of items added
**/
function addArticles ($iIDCat, $bColored = false, $bArtOnline = true, $sSpaces = "")
{
global $cfg, $lang;
$oDB = new DB_Contenido;
if (is_numeric($iIDCat) && $iIDCat > 0)
{
$sSQL = "SELECT tblArtLang.title AS title, tblArtLang.idartlang AS idartlang, tblCatArt.idcat AS idcat, ";
$sSQL .= "tblCatArt.idcatart AS idcatart, tblCatArt.is_start AS isstart, tblArtLang.online AS online, ";
$sSQL .= "tblCatLang.startidartlang as idstartartlang ";
$sSQL .= "FROM ".$cfg["tab"]["art_lang"]." AS tblArtLang, ".$cfg["tab"]["cat_art"]." AS tblCatArt, ";
$sSQL .= $cfg["tab"]["cat_lang"]." AS tblCatLang ";
$sSQL .= "WHERE tblCatArt.idcat = '".Contenido_Security::toInteger($iIDCat)."' AND tblCatLang.idcat = tblCatArt.idcat AND tblCatLang.idlang = tblArtLang.idlang AND ";
if ($bArtOnline) {
$sSQL .= "tblArtLang.online = '1' AND ";
}
$sSQL .= "tblArtLang.idart = tblCatArt.idart AND tblArtLang.idlang = '".Contenido_Security::escapeDB($lang, $oDB)."' ";
if ($cfg["is_start_compatible"] == true) {
$sSQL .= "ORDER BY tblCatArt.is_start DESC, tblArtLang.title"; // Getting start article as first article
} else {
$sSQL .= "ORDER BY tblArtLang.title";
}
$oDB->query($sSQL);
$iCount = $oDB->num_rows();
if ($iCount == 0) {
return 0;
} else {
$iCounter = count($this->_options);
while ($oDB->next_record())
{
// Generate new option element
$oOption = new cHTMLOptionElement($sSpaces."&nbsp;&nbsp;&nbsp;".substr(urldecode($oDB->f("title")), 0, 32), $oDB->f("idcatart"));
if ($bColored)
{
$bIsStartArticle = false;
if ($cfg["is_start_compatible"] == true && $oDB->f("isstart") == 1) {
// Compatible mode and "start article" flag is set
$bIsStartArticle = true;
} else if ($cfg["is_start_compatible"] != true && $oDB->f("idstartartlang") == $oDB->f("idartlang")) {
// No compatible mode and current article is start article (idstartartlang is the same for all records within a category)
$bIsStartArticle = true;
}
if ($bIsStartArticle)
{
if ($oDB->f("online") == 0) {
// Start article, but offline -> red
$oOption->setStyle("color: #ff0000;");
} else {
// Start article -> blue
$oOption->setStyle("color: #0000ff;");
}
} else if ($oDB->f("online") == 0) {
// Offline article -> grey
$oOption->setStyle("color: #666666;");
}
}
// Add option element to the list
$this->addOptionElement($iCounter, $oOption);
$iCounter++;
}
return $iCount;
}
} else {
return 0;
}
}
/**
* Function addCategories. Adds category elements (optionally including articles) to select box values.
* Note: Using "with articles" adds the articles also - but the categories will get a negative value!
* There is no way to distinguish between a category id and an article id...
*
* @param int $iMaxLevel Max. level shown (to be exact: except this level)
* @param bool $bColored Add color information to option elements
* @param bool $bCatVisible If true, only add idcat as value, if cat is visible
* @param bool $bCatPublic If true, only add idcat as value, if cat is public
* @param bool $bWithArt Add also articles per category
* @param bool $bArtOnline If true, show only online articles
*
* @return int Number of items added
**/
function addCategories ($iMaxLevel = 0, $bColored = false, $bCatVisible = true, $bCatPublic = true,
$bWithArt = false, $bArtOnline = true)
{
global $cfg, $client, $lang;
$oDB = new DB_Contenido;
$sSQL = "SELECT tblCat.idcat AS idcat, tblCatLang.name AS name, ";
$sSQL .= "tblCatLang.visible AS visible, tblCatLang.public AS public, tblCatTree.level AS level ";
$sSQL .= "FROM ".$cfg["tab"]["cat"]." AS tblCat, ".$cfg["tab"]["cat_lang"]." AS tblCatLang, ";
$sSQL .= $cfg["tab"]["cat_tree"]." AS tblCatTree ";
$sSQL .= "WHERE tblCat.idclient = '".Contenido_Security::escapeDB($client, $oDB)."' AND tblCatLang.idlang = '".Contenido_Security::escapeDB($lang, $oDB)."' AND ";
$sSQL .= "tblCatLang.idcat = tblCat.idcat AND tblCatTree.idcat = tblCat.idcat ";
if ($iMaxLevel > 0) {
$sSQL .= "AND tblCatTree.level < '".Contenido_Security::escapeDB($iMaxLevel, $oDB)."' ";
}
$sSQL .= "ORDER BY tblCatTree.idtree";
$oDB->query($sSQL);
$iCount = $oDB->num_rows();
if ($iCount == 0) {
return false;
} else {
$iCounter = count($this->_options);
while ($oDB->next_record())
{
$sSpaces = "";
$sStyle = "";
$iID = $oDB->f("idcat");
for ($i = 0; $i < $oDB->f("level"); $i++) {
$sSpaces .= "&nbsp;&nbsp;&nbsp;";
}
// Generate new option element
if (($bCatVisible && $oDB->f("visible") == 0) ||
($bCatPublic && $oDB->f("public") == 0)) {
// If category has to be visible or public and it isn't, don't add value
$sValue = "";
} else if ($bWithArt) {
// If article will be added, set negative idcat as value
$sValue = "-".$iID;
} else {
// Show only categories - and everything is fine...
$sValue = $iID;
}
$oOption = new cHTMLOptionElement($sSpaces.">&nbsp;".urldecode($oDB->f("name")), $sValue);
// Coloring option element, restricted shows grey color
$oOption->setStyle("background-color: #EFEFEF");
if ($bColored && ($oDB->f("visible") == 0 || $oDB->f("public") == 0)) {
$oOption->setStyle("color: #666666;");
}
// Add option element to the list
$this->addOptionElement($iCounter, $oOption);
if ($bWithArt) {
$iArticles = $this->addArticles($iID, $bColored, $bArtOnline, $sSpaces);
$iCount += $iArticles;
}
$iCounter = count($this->_options);
}
}
return $iCount;
}
/**
* Function addTypesFromArt. Adds types and type ids which are available for the specified article
*
* @param int $iIDCatArt Article id
* @param string $sTypeRange Komma separated list of Contenido type ids which may be in the resulting list (e.g. '1','17','28')
*
* @return int Number of items added
**/
function addTypesFromArt ($iIDCatArt, $sTypeRange = "")
{
global $cfg, $lang;
$oDB = new DB_Contenido;
if (is_numeric($iIDCatArt) && $iIDCatArt > 0)
{
$sSQL = "SELECT tblContent.typeid AS typeid, tblContent.idtype AS idtype, tblType.type AS type, tblType.description AS description, ";
$sSQL .= "tblContent.value AS value ";
$sSQL .= "FROM ".$cfg["tab"]["content"]." AS tblContent, ".$cfg["tab"]["art_lang"]." AS tblArtLang, ";
$sSQL .= $cfg["tab"]["cat_art"]." AS tblCatArt, ".$cfg["tab"]["type"]." AS tblType ";
$sSQL .= "WHERE tblContent.idtype = tblType.idtype AND tblContent.idartlang = tblArtLang.idartlang AND ";
$sSQL .= "tblArtLang.idart = tblCatArt.idart AND tblArtLang.idlang = '". Contenido_Security::escapeDB($lang, $oDB)."' AND tblCatArt.idcatart = '". Contenido_Security::toInteger($iIDCatArt)."' ";
if ($sTypeRange != "") {
$sSQL .= "AND tblContent.idtype IN (". Contenido_Security::escapeDB($sTypeRange, $oDB).") ";
}
$sql .= "ORDER BY tblContent.idtype, tblContent.typeid";
$oDB->query($sSQL);
$iCount = $oDB->num_rows();
if ($iCount == 0) {
return false;
} else {
while ($oDB->next_record())
{
$sTypeIdentifier = "tblData.idtype = '".$oDB->f('idtype')."' AND tblData.typeid = '".$oDB->f('typeid')."'";
// Generate new option element
$oOption = new cHTMLOptionElement($oDB->f('type')."[".$oDB->f('typeid')."]: ".substr(strip_tags(urldecode($oDB->f("value"))), 0, 50), $sTypeIdentifier);
// Add option element to the list
$this->addOptionElement($sTypeIdentifier, $oOption);
}
return $iCount;
}
} else {
return false;
}
}
/**
* Selects specified elements as selected
*
* @param array $aElements Array with "values" of the cHTMLOptionElement to set
*
* @return none
*/
function setSelected($aElements)
{
if (is_array($this->_options) && is_array($aElements))
{
foreach ($this->_options as $sKey => $oOption)
{
if (in_array($oOption->getAttribute("value"), $aElements))
{
$oOption->setSelected(true);
$this->_options[$sKey] = $oOption;
} else {
$oOption->setSelected(false);
$this->_options[$sKey] = $oOption;
}
}
}
}
}
class UI_Config_Table
{
var $_sTplCellCode;
var $_sTplTableFile;
var $_sWidth;
var $_sBorder;
var $_sBorderColor;
var $_bSolidBorder;
var $_sPadding;
var $_aCells;
var $_aCellAlignment;
var $_aCellVAlignment;
var $_aCellColSpan;
var $_aCellClass;
var $_aRowBgColor;
var $_aRowExtra;
var $_bAddMultiSelJS;
var $_sColorLight;
var $_sColorDark;
function UI_Config_Table()
{
global $cfg;
$this->_sPadding = 2;
$this->_sBorder = 0;
$this->_sBorderColor = $cfg['color']['table_border'];
$this->_sTplCellCode = ' <td align="{ALIGN}" valign="{VALIGN}" class="{CLASS}" colspan="{COLSPAN}" style="{EXTRA}white-space:nowrap;" nowrap="nowrap">{CONTENT}</td>'."\n";
$this->_sTplTableFile = $cfg['path']['contenido'].$cfg['path']['templates'].$cfg['templates']['generic_list'];
$this->_sColorLight = $cfg['color']['table_light'];
$this->_sColorDark = $cfg['color']['table_dark'];
}
function setCellTemplate($sCode)
{
$this->_sTplCellCode = $sCode;
}
function setTableTemplateFile($sPath)
{
$this->_sTplTableFile = $sPath;
}
function setLightColor($sColor)
{
$this->_sColorLight = $sColor;
}
function setDarkColor($sColor)
{
$this->_sColorDark = $sColor;
}
function setAddMultiSelJS($bEnabled = true)
{
$this->_bAddMultiSelJS = (bool)$bEnabled;
}
function setWidth ($sWidth)
{
$this->_sWidth = $sWidth;
}
function setPadding ($sPadding)
{
$this->_sPadding = $sPadding;
}
function setBorder ($sBorder)
{
$this->_sBorder = $sBorder;
}
function setBorderColor ($sBorderColor)
{
$this->_sBorderColor = $sBorderColor;
}
function setSolidBorder ($bSolidBorder = true)
{
$this->_bSolidBorder = (bool)$bSolidBorder;
}
function setCell ($sRow, $sCell, $sContent)
{
$this->_aCells[$sRow][$sCell] = $sContent;
$this->_aCellAlignment[$sRow][$sCell] = "";
}
function setCellAlignment ($sRow, $sCell, $sAlignment)
{
$this->_aCellAlignment[$sRow][$sCell] = $sAlignment;
}
function setCellVAlignment ($sRow, $sCell, $sAlignment)
{
$this->_aCellVAlignment[$sRow][$sCell] = $sAlignment;
}
function setCellColspan ($sRow, $sCell, $iColSpan)
{
$this->_aCellColSpan[$sRow][$sCell] = $iColSpan;
}
function setCellClass ($sRow, $sCell, $sClass)
{
$this->_aCellClass[$sRow][$sCell] = $sClass;
}
function setRowBgColor ($sRow, $sColor)
{
$this->_aRowBgColor[$sRow] = $sColor;
}
function setRowExtra ($sRow, $sExtra)
{
$this->_aRowExtra[$sRow] = $sExtra;
}
function _addMultiSelJS()
{
// Trick: To save multiple selections in <select>-Element, add some JS which saves the
// selection, comma separated in a hidden input field on change.
// Try ... catch prevents error messages, if function is added more than once
// if (!fncUpdateSel) in JS has not worked...
$sSkript = ' <script type="text/javascript"><!--'."\n".
' try {'."\n".
' function fncUpdateSel(sSelectBox, sStorage)'."\n".
' {'."\n".
' var sSelection = "";'."\n".
' var oSelectBox = document.getElementsByName(sSelectBox)[0];'."\n".
' var oStorage = document.getElementsByName(sStorage)[0];'."\n".
' '."\n".
' if (oSelectBox && oStorage)'."\n".
' {'."\n".
' for (i = 0; i < oSelectBox.length; i++)'."\n".
' {'."\n".
' if(oSelectBox.options[i].selected == true)'."\n".
' {'."\n".
' if (sSelection != "")'."\n".
' sSelection = sSelection + ",";'."\n".
' sSelection = sSelection + oSelectBox.options[i].value;'."\n".
' }'."\n".
' }'."\n".
' oStorage.value = sSelection;'."\n".
' }'."\n".
' }'."\n".
' } catch (e) { }'."\n".
' //--></script>'."\n";
return $sSkript;
}
function render($bPrint = false)
{
$oTable = new Template;
$oTable->reset();
$oTable->set('s', 'CELLPADDING', $this->_sPadding);
$oTable->set('s', 'BORDER', $this->_sBorder);
$oTable->set('s', 'BORDERCOLOR', $this->_sBorderColor);
$iColCount = 0;
$bDark = false;
$sBgColor = "";
$bMultiSelJSAdded = false;
if (is_array($this->_aCells))
{
foreach ($this->_aCells as $sRow => $aCells)
{
$iColCount++;
//$bDark = !$bDark;
$sLine = "";
$iCount = 0;
foreach ($aCells as $sCell => $sData)
{
$iCount++;
$sTplCell = $this->_sTplCellCode;
if ($this->_bSolidBorder)
{
if ($iCount < count($aCells))
{
if ($iColCount < count($this->_aCells)) {
$sTplCell = str_replace('{EXTRA}', 'border: 0px; border-right: 1px; border-bottom: 1px; border-color: '.$this->_sBorderColor.'; border-style: solid;', $sTplCell);
} else {
$sTplCell = str_replace('{EXTRA}', 'border: 0px; border-right: 1px; border-color: '.$this->_sBorderColor.'; border-style: solid;', $sTplCell);
}
} else if ($iColCount < count($this->_aCells)) {
$sTplCell = str_replace('{EXTRA}', 'border: 0px; border-bottom: 1px; border-color: '.$this->_sBorderColor.'; border-style: solid;', $sTplCell);
} else {
$sTplCell = str_replace('{EXTRA}', '', $sTplCell);
}
}
if ($this->_aCellAlignment[$sRow][$sCell] != "") {
$sTplCell = str_replace('{ALIGN}', $this->_aCellAlignment[$sRow][$sCell], $sTplCell);
} else {
$sTplCell = str_replace('{ALIGN}', 'left', $sTplCell);
}
if ($this->_aCellVAlignment[$sRow][$sCell] != "") {
$sTplCell = str_replace('{VALIGN}', $this->_aCellVAlignment[$sRow][$sCell], $sTplCell);
} else {
$sTplCell = str_replace('{VALIGN}', 'top', $sTplCell);
}
if ($this->_aCellColSpan[$sRow][$sCell] != "") {
$sTplCell = str_replace('{COLSPAN}', $this->_aCellColSpan[$sRow][$sCell], $sTplCell);
} else {
$sTplCell = str_replace('{COLSPAN}', '1', $sTplCell);
}
if ($this->_aCellClass[$sRow][$sCell] != "") {
$sTplCell = str_replace('{CLASS}', $this->_aCellClass[$sRow][$sCell], $sTplCell);
} else {
$sTplCell = str_replace('{CLASS}', 'text', $sTplCell);
}
// Multi selection javascript
if ($this->_bAddMultiSelJS) {
$sData = $this->_addMultiSelJS() . $sData;
$this->_bAddMultiSelJS = false;
}
$sTplCell = str_replace('{CONTENT}', $sData, $sTplCell);
$sLine .= $sTplCell;
}
// Row
$oTable->set('d', 'ROWS', $sLine);
if ($this->_aRowBgColor[$sRow] != "") {
$sBgColor = $this->_aRowBgColor[$sRow];
} else if ($sBgColor == $this->_sColorLight) {
$sBgColor = $this->_sColorDark;
} else {
$sBgColor = $this->_sColorLight;
}
$oTable->set('d', 'BGCOLOR', $sBgColor);
if ($this->_aRowExtra[$sRow] != "") {
$oTable->set('d', 'EXTRA', $this->_aRowExtra[$sRow]);
} else {
$oTable->set('d', 'EXTRA', '');
}
$oTable->next();
}
}
if ($this->_sWidth) {
// Table: Width
$oTable->set('s', 'EXTRA', 'width: '.$this->_sWidth.';');
} else {
$oTable->set('s', 'EXTRA', '');
}
$sRendered = $oTable->generate($this->_sTplTableFile, true, false);
if ($bPrint == true) {
echo $sRendered;
} else {
return $sRendered;
}
}
}
?>

170
cms/includes/concache.php Normale Datei
Datei anzeigen

@ -0,0 +1,170 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* File with configuration of concache
*
* Requirements:
* @con_php_req 5
*
* @package Frontend
* @subpackage Cache
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*
*
* @class cConCache
* @file concache.php
* @version 0.9
* @date 2006-07-07
*
* {@internal
* created 2006-07-07
* modified 2008-07-03, bilal arslan, added security fix
*
* $Id: concache.php 450 2016-07-20 11:11:12Z oldperl $:
* }}
*
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
// uncomment following line 4 debugging any occured errors and warnings
#error_reporting(E_ALL);
/**
* configuration array of frontend caching
* @var array $cfgConCache
*/
global $cfgConCache;
global $auth;
/**
* don't cache output, if we have a contenido variable, e. g. on calling frontend preview from backend
* @var bool $cfgConCache['excludecontenido']
*/
$cfgConCache['excludecontenido'] = true;
/**
* activate caching of frontend output
* @var bool $cfgConCache['enable']
*/
$cfgConCache['enable'] = true;
/**
* compose debuginfo (hit/miss and execution time of caching)
* @var bool $cfgConCache['debug']
*/
$cfgConCache['debug'] = false;
/**
* debug information template
* @var string $cfgConCache['infotemplate']
*/
$cfgConCache['infotemplate'] = '<div id="debug">%s</div>';
/**
* add a html comment including several debug messages to output
* @var bool $cfgConCache['htmlcomment']
*/
$cfgConCache['htmlcomment'] = true;
/**
* lifetime in seconds 2 cache output
* @var int $cfgConCache['lifetime']
*/
$cfgConCache['lifetime'] = 3600;
/**
* directory where cached content is 2 store.
* @var string $cfgConCache['cachedir']
*/
$cfgConCache['cachedir'] = $cfgClient[$client]['path']['frontend'].'cache/';
/**
* cache group, will be a subdirectory inside cachedir
* @var string $cfgConCache['cachegroup']
*/
$cfgConCache['cachegroup'] = 'content';
/**
* add prefix 2 stored filenames
* @var string $cfgConCache['cacheprefix']
*/
$cfgConCache['cacheprefix'] = 'cache_';
/**
* array of several variables 2 create a unique id, if the output depends on them.
* default variables are $_SERVER['REQUEST_URI'], $_POST and $_GET. its also possible to add the
* auth object, if output differs on authentificated user.
* @var array $cfgConCache['idoptions']
*/
$cfgConCache['idoptions'] = array(
'uri' => &$_SERVER['REQUEST_URI'],
'post' => &$_POST,
'get' => &$_GET,
'auth' => &$auth->auth['perm']
);
/**
* array of eventhandler, beeing raised on some events.
* we have actually two events:
* - 'beforeoutput': code to execute before doing the output
* - 'afteroutput' code to execute after output
* you can define any php-code beeing 2 excute on raising a event.
* be aware to define a correct php-code block including finishing semicolon ';'
* example:
* [code]
* $cfgConCache['raiseonevent']['beforeoutput'] = array(
* 'functionCall_One();',
* 'functionCall_Two();',
* 'functionCall_Three();'
* [/code]
* on raising a beforeoutput event the code 'functionCall_One();',
* 'functionCall_Two();' and 'functionCall_Three();' will be executes
* one after another.
*
* [code]
* $cfgConCache['raiseonevent'] = array(
* 'beforeoutput' => array('echo("<pre>beforeoutput</pre>");'),
* 'afteroutput' => array('echo("<pre>afteroutput</pre>");')
* );
* [/code]
* another example with output
*/
// define code 2 update contenido statistics
// this will be excuted on 'afteroutput' event of cache object
// set Security fix
$sStatCode = '
$sql = \'SELECT idcatart FROM \'.$GLOBALS[\'cfg\'][\'tab\'][\'stat\'].\' WHERE idcatart="\'.Contenido_Security::toInteger($GLOBALS[\'idcatart\']).\'" AND idlang="\'.Contenido_Security::toInteger($GLOBALS[\'lang\']).\'"\';
$GLOBALS[\'db\']->query($sql);
if ($GLOBALS[\'db\']->next_record()) {
$sql = \'UPDATE \'.$GLOBALS[\'cfg\'][\'tab\'][\'stat\'].\' SET visited=visited + 1 WHERE idcatart="\'.Contenido_Security::toInteger($GLOBALS[\'idcatart\']).\'" AND idclient="\'.Contenido_Security::toInteger($GLOBALS[\'client\']).\'" AND idlang="\'.Contenido_Security::toInteger($GLOBALS[\'lang\']).\'"\';
} else {
$next = $GLOBALS[\'db\']->nextid($GLOBALS[\'cfg\'][\'tab\'][\'stat\']); $next = Contenido_Security::escapeDB($next, $db);
$sql = \'INSERT INTO \'.$GLOBALS[\'cfg\'][\'tab\'][\'stat\'].\' (visited, idcatart, idlang, idstat, idclient) VALUES (1, "\'.Contenido_Security::toInteger($GLOBALS[\'idcatart\']).\'", "\'. Contenido_Security::toInteger($GLOBALS[\'lang\']).\'", "\'.$next.\'", "\'. Contenido_Security::toInteger($GLOBALS[\'client\']).\'")\';
}
$GLOBALS[\'db\']->query($sql);
';
$cfgConCache['raiseonevent'] = array(
'beforeoutput' => array('/* some code here */'),
'afteroutput' => array($sStatCode, 'page_close();')
);
// include concache file
cInclude('frontend', 'includes/class.concache.php');
?>

Datei anzeigen

@ -0,0 +1,40 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
*
*
* @package Frontend
* @subpackage Functions
* @version $Rev: 450 $
* @author unknown
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*
* $Id: functions.include.php 450 2016-07-20 11:11:12Z oldperl $:
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
function getTeaserImage ($text,$return = 'path') {
$regEx = "/<img[^>]*?>.*?/i";
$match = array();
preg_match($regEx, $text, $match);
$regEx = "/(src)(=)(['\"]?)([^\"']*)(['\"]?)/i";
$img = array();
preg_match($regEx, $match[0], $img);
if ($return == 'path') {
return $img[4];
} else {
return $match[0];
}
}
?>

Datei anzeigen

@ -0,0 +1,572 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
*
*
* @package Frontend
* @subpackage Functions
* @version $Rev: 450 $
* @author unknown
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*
* $Id: functions.navigation.php 450 2016-07-20 11:11:12Z oldperl $:
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
// create Navigation array for one level
function createNavigationArray($start_id, $db)
{
global $user, $cfg, $client, $lang, $auth;
$navigation = array();
$FrontendPermissionCollection = new FrontendPermissionCollection;
// SECURITY-FIX
$sql = "SELECT
A.idcat,
C.name,
C.public,
C.idcatlang
FROM
".$cfg["tab"]["cat_tree"]." AS A,
".$cfg["tab"]["cat"]." AS B,
".$cfg["tab"]["cat_lang"]." AS C
WHERE
A.idcat = B.idcat AND
B.idcat = C.idcat AND
B.idclient = '".Contenido_Security::escapeDB($client, $db)."' AND
C.idlang = '".Contenido_Security::escapeDB($lang, $db)."' AND
C.visible = '1' AND
B.parentid = '".Contenido_Security::escapeDB($start_id, $db)."'
ORDER BY
A.idtree";
$db->query($sql);
while($db->next_record())
{
$cat_id = $db->f("idcat");
$cat_idlang = $db->f("idcatlang");
$visible=false;
if($db->f("public")!=0){
$visible = true;
}elseif(($auth->auth['uid']!='')&&($auth->auth['uid']!='nobody')){
$FrontendGroupMemberCollection = new FrontendGroupMemberCollection;
$FrontendGroupMemberCollection->setWhere("idfrontenduser",$auth->auth['uid']);
$FrontendGroupMemberCollection->query();
$groups = array();
while ($member = $FrontendGroupMemberCollection->next()){
$groups[] = $member->get("idfrontendgroup");
}
}
if(count($groups)>0){
for($i=0;$i<count($groups);$i++){
if($FrontendPermissionCollection->checkPerm($groups[$i],'category','access',$cat_idlang, true)){
$visible=true;
}
}
}
if($visible){
$navigation[$cat_id] = array("idcat" => $cat_id,
"name" => $db->f("name"),
"target" => '_self', # you can not call getTarget($cat_id, &$db) at this point with the same db instance!
"public" => $db->f("public"));
}
} // end while
$db->free();
return $navigation;
}
/**
* Return target of a given category id
*
* @deprecated
*/
function getTarget($cat_id, $db) {
global $cfg, $client, $lang;
// SECURITY-FIX
$sql = "SELECT
a.external_redirect AS ext
FROM
".$cfg["tab"]["art_lang"]." AS a,
".$cfg["tab"]["cat_art"]." AS b,
".$cfg["tab"]["cat"]." AS c
WHERE
b.idcat = '".Contenido_Security::escapeDB($cat_id, $db)."' AND
c.idclient = '".Contenido_Security::escapeDB($client, $db)."' AND
c.idcat = b.idcat AND
a.idart = b.idart AND
a.idlang = '".Contenido_Security::escapeDB($lang, $db)."'";
$db->query($sql);
$db->next_record();
$target = ( $db->f('ext') == 0 ) ? '_self' : '_blank';
$db->free();
return $target;
}
/**
* Return true if $parentid is parent of $catid
*/
function isParent($parentid, $catid, $db) {
global $cfg, $client, $lang;
// SECURITY-FIX
$sql = "SELECT
a.parentid
FROM
".$cfg["tab"]["cat"]." AS a,
".$cfg["tab"]["cat_lang"]." AS b
WHERE
a.idclient = '". Contenido_Security::escapeDB($client, $db)."' AND
b.idlang = '".Contenido_Security::escapeDB($lang, $db)."' AND
a.idcat = b.idcat AND
a.idcat = '".Contenido_Security::escapeDB($catid, $db)."'";
$db->query($sql);
$db->next_record();
$pre = $db->f("parentid");
if($parentid == $pre)
{
return true;
}
else
{
return false;
}
}
function getParent($preid, &$db) {
global $cfg, $client, $lang;
// SECURITY-FIX
$sql = "SELECT
a.parentid
FROM
".$cfg["tab"]["cat"]." AS a,
".$cfg["tab"]["cat_lang"]." AS b
WHERE
a.idclient = '".Contenido_Security::escapeDB($client, $db)."' AND
b.idlang = '".Contenido_Security::escapeDB($lang, $db)."' AND
a.idcat = b.idcat AND
a.idcat = '".Contenido_Security::escapeDB($preid, $db)."'";
$db->query($sql);
if ($db->next_record())
{
return $db->f("parentid");
}else
{
return false;
}
}
function getLevel($catid, &$db)
{
global $cfg, $client, $lang;
// SECURITY-FIX
$sql = "SELECT
level
FROM
".$cfg["tab"]["cat_tree"]."
WHERE
idcat = '". Contenido_Security::escapeDB($catid, $db)."' ";
$db->query($sql);
if ($db->next_record())
{
return $db->f("level");
}else
{
return false;
}
}
/**
* Return path of a given category up to a certain level
*/
function getCategoryPath($cat_id, $level, $reverse = true, &$db) {
$root_path = array();
array_push($root_path, $cat_id);
$parent_id = $cat_id;
while (getLevel($parent_id, $db) != false AND getLevel($parent_id, $db) > $level AND getLevel($parent_id, $db) >= 0)
{
$parent_id = getParent($parent_id, $db);
if ($parent_id != false)
{
array_push($root_path, $parent_id);
}
}
if ($reverse == true)
{
$root_path = array_reverse($root_path);
}
return $root_path;
}
/**
* Return location string of a given category
*/
function getLocationString($iStartCat, $level, $seperator, $sLinkStyleClass, $sTextStyleClass, $fullweblink = false, $reverse = true, $mod_rewrite = true, $db)
{
global $sess, $cfgClient, $client;
$aCatPath = getCategoryPath($iStartCat, $level, $reverse, $db);
if(is_array($aCatPath) AND count($aCatPath) > 0)
{
$aLocation = array();
foreach($aCatPath as $value)
{
if (!$fullweblink)
{
if ($mod_rewrite == true)
{
$linkUrl = $sess->url("index-a-$value.html");
}else
{
$linkUrl = $sess->url("front_content.php?idcat=$value");
}
}else
{
if ($mod_rewrite == true)
{
$linkUrl = $sess->url($cfgClient[$client]["path"]["htmlpath"] . "index-a-$value.html");
}else
{
$linkUrl = $sess->url($cfgClient[$client]["path"]["htmlpath"] . "front_content.php?idcat=$value");
}
}
$name = getCategoryName($value, $db);
$aLocation[] = '<a href="'.$linkUrl.'" class="'.$sLinkStyleClass.'"><nobr>'.$name.'</nobr></a>';
}
}
$sLocation = implode($seperator, $aLocation);
$sLocation = '<span class="'.$sTextStyleClass.'">'.$sLocation.'</span>';
return $sLocation;
}
/**
*
* get subtree by a given id
*
* @param int $idcat Id of category
* @return array Array with all deeper categories
*
* @copyright four for business AG <www.4fb.de>
*/
function getSubTree($idcat_start, $db)
{
global $client, $cfg;
// SECURITY-FIX
$sql = "SELECT
B.idcat, A.level
FROM
".$cfg["tab"]["cat_tree"]." AS A,
".$cfg["tab"]["cat"]." AS B
WHERE
A.idcat = B.idcat AND
idclient = '". Contenido_Security::escapeDB($client, $db)."'
ORDER BY
idtree";
$db->query($sql);
$subCats = false;
$curLevel = 0;
while ($db->next_record())
{
if ($db->f("idcat") == $idcat_start)
{
$curLevel = $db->f("level");
$subCats = true;
} else if ($db->f("level") <= $curLevel) // ending part of tree
{
$subCats = false;
}
if ($subCats == true) { //echo "true"; echo $db->f("idcat"); echo "<br>";
$deeper_cats[] = $db->f("idcat");
}
}
return $deeper_cats;
}
function getTeaserDeeperCategories($iIdcat, $db)
{
global $client, $cfg, $lang;
// SECURITY-FIX
$sql = "SELECT
B.parentid, B.idcat
FROM
".$cfg["tab"]["cat_tree"]." AS A,
".$cfg["tab"]["cat"]." AS B,
".$cfg["tab"]["cat_lang"]." AS C
WHERE
A.idcat = B.idcat AND
B.idcat = C.idcat AND
C.idlang = '". Contenido_Security::escapeDB($lang, $db)."' AND
C.visible = '1' AND
B.idclient = '". Contenido_Security::escapeDB($client, $db) ."'
ORDER BY
idtree";
$db->query($sql);
$subCats = false;
$curLevel = 0;
while ($db->next_record()) {
if ($db->f("idcat") == $iIdcat)
{
$curLevel = $db->f("level");
$subCats = true;
} else if ($curLevel == $db->f("level")) // ending part of tree
{
$subCats = false;
}
if ($subCats == true) {
$deeper_cats[] = $db->f("idcat");
}
}
return $deeper_cats;
}
/**
*
* get subtree by a given id, without protected and invisible categories
*
* @param int $idcat Id of category
* @return array Array with all deeper categories
*
* @copyright four for business AG <www.4fb.de>
*/
function getProtectedSubTree($idcat_start, $db)
{
global $client, $cfg, $lang;
// SECURITY-FIX
$sql = "SELECT
B.parentid, B.idcat
FROM
".$cfg["tab"]["cat_tree"]." AS A,
".$cfg["tab"]["cat"]." AS B,
".$cfg["tab"]["cat_lang"]." AS C
WHERE
A.idcat = B.idcat AND
B.idcat = C.idcat AND
C.idlang = '".Contenido_Security::escapeDB($lang, $db)."' AND
C.visible = '1' AND
C.public = '1' AND
B.idclient = '".Contenido_Security::escapeDB($client, $db)."'
ORDER BY
idtree";
$db->query($sql);
$subCats = false;
$curLevel = 0;
while ( $db->next_record() ) {
if ($db->f("idcat") == $idcat_start)
{
$curLevel = $db->f("level");
$subCats = true;
} else if ($curLevel == $db->f("level")) // ending part of tree
{
$subCats = false;
}
if ($subCats == true) { //echo "true"; echo $db->f("idcat"); echo "<br>";
$deeper_cats[] = $db->f("idcat");
}
}
return $deeper_cats;
}
/**
* Return category name
*/
function getCategoryName($cat_id, &$db) {
global $cfg, $client, $lang;
// SECURITY-FIX
$sql = "SELECT
*
FROM
".$cfg["tab"]["cat"]." AS A,
".$cfg["tab"]["cat_lang"]." AS B
WHERE
A.idcat = B.idcat AND
A.idcat = '". Contenido_Security::escapeDB($cat_id, $db)."' AND
A.idclient = '".Contenido_Security::escapeDB($client, $db)."' AND
B.idlang = '".Contenido_Security::escapeDB($lang, $db)."'
";
$db->query($sql);
if ($db->next_record())
{
$cat_name = $db->f("name");
return $cat_name;
}
else
{
return '';
}
} // end function
// get direct subcategories of a given category
function getSubCategories($parent_id, $db) {
$subcategories = array();
global $cfg, $client, $lang;
// SECURITY-FIX
$sql = "SELECT
A.idcat
FROM
".$cfg["tab"]["cat_tree"]." AS A,
".$cfg["tab"]["cat"]." AS B,
".$cfg["tab"]["cat_lang"]." AS C
WHERE
A.idcat = B.idcat AND
B.idcat = C.idcat AND
B.idclient = '". Contenido_Security::escapeDB($client, $db)."' AND
C.idlang = '".Contenido_Security::escapeDB($lang, $db)."' AND
C.visible = '1' AND
C.public = '1' AND
B.parentid = '".Contenido_Security::escapeDB($parent_id, $db)."'
ORDER BY
A.idtree";
$db->query($sql);
while ( $db->next_record() ) {
$subcategories[] = $db->f("idcat");
} // end while
return $subcategories;
} // end function
// get direct subcategories with protected categories
function getProtectedSubCategories($parent_id, $db) {
$subcategories = array();
unset($subcategories);
global $cfg, $client, $lang;
// SECURITY-FIX
$sql = "SELECT
A.idcat
FROM
".$cfg["tab"]["cat_tree"]." AS A,
".$cfg["tab"]["cat"]." AS B,
".$cfg["tab"]["cat_lang"]." AS C
WHERE
A.idcat = B.idcat AND
B.idcat = C.idcat AND
B.idclient = '".Contenido_Security::escapeDB($client, $db)."' AND
C.idlang = '".Contenido_Security::escapeDB($lang, $db)."' AND
B.parentid = '".Contenido_Security::escapeDB($parent_id, $db)."'
ORDER BY
A.idtree";
$db->query($sql);
while ( $db->next_record() ) {
$subcategories[] = $db->f("idcat");
} // end while
return $subcategories;
} // end function
function checkCatPermission($idcatlang, $public) {
#Check if current user has permissions to access cat
global $auth;
$oDB = new DB_Contenido;
$FrontendPermissionCollection = new FrontendPermissionCollection;
$visible=false;
if($public!=0){
$visible = true;
}elseif(($auth->auth['uid']!='')&&($auth->auth['uid']!='nobody')){
$FrontendGroupMemberCollection = new FrontendGroupMemberCollection;
$FrontendGroupMemberCollection->setWhere("idfrontenduser",$auth->auth['uid']);
$FrontendGroupMemberCollection->query();
$groups = array();
while ($member = $FrontendGroupMemberCollection->next()){
$groups[] = $member->get("idfrontendgroup");
}
}
if(count($groups)>0){
for($i=0;$i<count($groups);$i++){
if($FrontendPermissionCollection->checkPerm($groups[$i],'category','access',$idcatlang, true)){
$visible=true;
}
}
}
return $visible;
}
?>

59
cms/includes/rss.inc.php Normale Datei
Datei anzeigen

@ -0,0 +1,59 @@
<?php
function myfile($url) {
// URL zerlegen
$parsedurl = @parse_url($url);
// Host ermitteln, ungültigen Aufruf abfangen
if (empty($parsedurl['host'])) {
return null;
}
$host = $parsedurl['host'];
// Pfadangabe ermitteln
if (empty($parsedurl['path'])) {
$documentpath = '/';
} else {
$documentpath = $parsedurl['path'];
}
// Parameter ermitteln
if (!empty($parsedurl['query'])) {
$documentpath .= '?' . $parsedurl['query'];
}
// Port ermitteln
if (!empty($parsedurl['port'])) {
$port = $parsedurl['port'];
} else {
$port = 80;
}
// Socket öffnen
$fp = @fsockopen($host, $port, $errno, $errstr, 30);
if (!$fp) {
return null;
}
// Request senden
fputs ($fp, "GET {$documentpath} HTTP/1.0\r\nHost: {$host}\r\n\r\n");
// Header auslesen
do {
$line = chop(fgets($fp));
} while ((!empty($line)) && (!feof($fp)));
// Daten auslesen
$result = Array();
while (!feof($fp)) {
$result[] = fgets($fp);
}
// Socket schliessen
fclose($fp);
// Ergebnis-Array zurückgeben
return $result;
}
function prepareStringForOutput($sIn, $sCode = 'ISO-8859-1') {
global $encoding, $lang;
if ((strtoupper($sCode) == 'UTF-8') && (strtoupper($encoding[$lang]) != 'UTF-8')) {
$sOut = utf8_decode($sIn);
} elseif ((strtoupper($encoding[$lang]) == 'UTF-8') && (strtoupper($sCode) != 'UTF-8')) {
$sOut = utf8_encode($sIn);
} else {
$sOut = $sIn;
}
return $sOut;
}
?>

160
cms/includes/rss_php.php Normale Datei
Datei anzeigen

@ -0,0 +1,160 @@
<?php
/*
RSS_PHP - the PHP DOM based RSS Parser
Author: <rssphp.net>
Published: 200801 :: blacknet :: via rssphp.net
RSS_PHP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.
Usage:
See the documentation at http://rssphp.net/documentation
Examples:
Can be found online at http://rssphp.net/examples
*/
class rss_php {
public $document;
public $channel;
public $items;
/****************************
public load methods
***/
# load RSS by URL
public function load($url=false, $unblock=true) {
if($url) {
if($unblock) {
$this->loadParser(file_get_contents($url, false, $this->randomContext()));
} else {
$this->loadParser(file_get_contents($url));
}
}
}
# load raw RSS data
public function loadRSS($rawxml=false) {
if($rawxml) {
$this->loadParser($rawxml);
}
}
/****************************
public load methods
@param $includeAttributes BOOLEAN
return array;
***/
# return full rss array
public function getRSS($includeAttributes=false) {
if($includeAttributes) {
return $this->document;
}
return $this->valueReturner();
}
# return channel data
public function getChannel($includeAttributes=false) {
if($includeAttributes) {
return $this->channel;
}
return $this->valueReturner($this->channel);
}
# return rss items
public function getItems($includeAttributes=false) {
if($includeAttributes) {
return $this->items;
}
return $this->valueReturner($this->items);
}
/****************************
internal methods
***/
private function loadParser($rss=false) {
if($rss) {
$this->document = array();
$this->channel = array();
$this->items = array();
$DOMDocument = new DOMDocument;
$DOMDocument->strictErrorChecking = false;
$DOMDocument->loadXML($rss);
$this->document = $this->extractDOM($DOMDocument->childNodes);
}
}
private function valueReturner($valueBlock=false) {
if(!$valueBlock) {
$valueBlock = $this->document;
}
foreach($valueBlock as $valueName => $values) {
if(isset($values['value'])) {
$values = $values['value'];
}
if(is_array($values)) {
$valueBlock[$valueName] = $this->valueReturner($values);
} else {
$valueBlock[$valueName] = $values;
}
}
return $valueBlock;
}
private function extractDOM($nodeList,$parentNodeName=false) {
$itemCounter = 0;
foreach($nodeList as $values) {
if(substr($values->nodeName,0,1) != '#') {
if($values->nodeName == 'item') {
$nodeName = $values->nodeName.':'.$itemCounter;
$itemCounter++;
} else {
$nodeName = $values->nodeName;
}
$tempNode[$nodeName] = array();
if($values->attributes) {
for($i=0;$values->attributes->item($i);$i++) {
$tempNode[$nodeName]['properties'][$values->attributes->item($i)->nodeName] = $values->attributes->item($i)->nodeValue;
}
}
if(!$values->firstChild) {
$tempNode[$nodeName]['value'] = $values->textContent;
} else {
$tempNode[$nodeName]['value'] = $this->extractDOM($values->childNodes, $values->nodeName);
}
if(in_array($parentNodeName, array('channel','rdf:RDF'))) {
if($values->nodeName == 'item') {
$this->items[] = $tempNode[$nodeName]['value'];
} elseif(!in_array($values->nodeName, array('rss','channel'))) {
$this->channel[$values->nodeName] = $tempNode[$nodeName];
}
}
} elseif(substr($values->nodeName,1) == 'text') {
$tempValue = trim(preg_replace('/\s\s+/',' ',str_replace("\n",' ', $values->textContent)));
if($tempValue) {
$tempNode = $tempValue;
}
} elseif(substr($values->nodeName,1) == 'cdata-section'){
$tempNode = $values->textContent;
}
}
return $tempNode;
}
private function randomContext() {
$headerstrings = array();
$headerstrings['User-Agent'] = 'Mozilla/5.0 (Windows; U; Windows NT 5.'.rand(0,2).'; en-US; rv:1.'.rand(2,9).'.'.rand(0,4).'.'.rand(1,9).') Gecko/2007'.rand(10,12).rand(10,30).' Firefox/2.0.'.rand(0,1).'.'.rand(1,9);
$headerstrings['Accept-Charset'] = rand(0,1) ? 'en-gb,en;q=0.'.rand(3,8) : 'en-us,en;q=0.'.rand(3,8);
$headerstrings['Accept-Language'] = 'en-us,en;q=0.'.rand(4,6);
$setHeaders = 'Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5'."\r\n".
'Accept-Charset: '.$headerstrings['Accept-Charset']."\r\n".
'Accept-Language: '.$headerstrings['Accept-Language']."\r\n".
'User-Agent: '.$headerstrings['User-Agent']."\r\n";
$contextOptions = array(
'http'=>array(
'method'=>"GET",
'header'=>$setHeaders
)
);
return stream_context_create($contextOptions);
}
}
?>

Datei anzeigen

@ -0,0 +1,859 @@
<?php
/*
* Project:
* Spider IT Deutschland ConLite and Contenido Extensions
*
* Description:
* File with useful helper functions
*
* Requirements:
* @con_php_req 5
*
* @package Frontend
* @author René Mansveld <R.Mansveld@Spider-IT.de>
* @copyright Spider IT Deutschland <www.Spider-IT.de>
* @license MIT <http://en.wikipedia.org/wiki/MIT_License> <http://de.wikipedia.org/wiki/MIT-Lizenz>
* (see below)
* @link http://www.Spider-IT.de
* @link http://www.conlite.org
* @link http://www.contenido.org
*
* @file spider-it.functions.inc.php
* @version 1.2
* @date 2012-11-21
*
* {@internal
* created 2012-09-14
* modified 2012-10-10
* modified 2012-10-14
* modified 2012-10-22
* modified 2012-10-24
* modified 2012-10-30
* modified 2012-11-21
*
* $Id: spider-it.functions.inc.php 450 2016-07-20 11:11:12Z oldperl $:
* }
*
*/
/*
* Copyright (c) 2012 Spider IT Deutschland
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without
* limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
* Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions
* of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
* TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
*
* Hiermit wird unentgeltlich, jeder Person, die eine Kopie der Software und der zugehörigen Dokumentationen (die
* "Software") erhält, die Erlaubnis erteilt, sie uneingeschränkt zu benutzen, inklusive und ohne Ausnahme, dem
* Recht, sie zu verwenden, kopieren, ändern, fusionieren, verlegen, verbreiten, unterlizenzieren und/oder zu
* verkaufen, und Personen, die diese Software erhalten, diese Rechte zu geben, unter den folgenden Bedingungen:
*
* Der obige Urheberrechtsvermerk und dieser Erlaubnisvermerk sind in allen Kopien oder Teilkopien der Software
* beizulegen.
*
* DIE SOFTWARE WIRD OHNE JEDE AUSDRÜCKLICHE ODER IMPLIZIERTE GARANTIE BEREITGESTELLT, EINSCHLIESSLICH DER GARANTIE
* ZUR BENUTZUNG FÜR DEN VORGESEHENEN ODER EINEM BESTIMMTEN ZWECK SOWIE JEGLICHER RECHTSVERLETZUNG, JEDOCH NICHT
* DARAUF BESCHRÄNKT. IN KEINEM FALL SIND DIE AUTOREN ODER COPYRIGHTINHABER FÜR JEGLICHEN SCHADEN ODER SONSTIGE
* ANSPRÜCHE HAFTBAR ZU MACHEN, OB INFOLGE DER ERFÜLLUNG EINES VERTRAGES, EINES DELIKTES ODER ANDERS IM ZUSAMMENHANG
* MIT DER SOFTWARE ODER SONSTIGER VERWENDUNG DER SOFTWARE ENTSTANDEN.
*/
# Functions in this file:
# debug()
# sitCascadedArraySort()
# sitConvertCmykJpgToSrgbJpg()
# sitExplodeAssociative()
# sitExplodeCascading()
# sitExplodeLines()
# sitGetFilesInDirectory()
# sitGetImageDescription()
# sitGetRemoteContentToFile()
# sitGetSubdirs()
# sitImgScale()
# sitMoveAllUploadFiles()
# sitSafeStringEscape()
# sitSendHtmlMail()
# sitSetClientProperty()
# sitTeaserText()
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
# debug()
#
# Zeigt Debugging-Informationen auf der Webseite
#
# Parameter:
# $value - Der anzuzeigende Wert
# $type - Der Typ des Wertes (optional)
# Möglichkeiten:
# '' - Text / Array / Object
# 'sql' - SQL-Anweisungen (Aufruf sollte nach $db->query() erfolgen)
#
# Der Wert wird aufbereitet per echo auf der Webseite
# ausgegeben, wobei die Funktion selbstständig zwischen
# einzelnen Werte, Arrays und Objekte unterscheidet.
# Der 2. Parameter $type dient besondere Fälle, wie z.B.
# 'sql' für SQL-Anweisungen, welche dann individuell
# aufbereitet werden.
function debug($value, $type = '') {
global $db, $debug;
if ($debug) {
echo '<div style="font-size: 14px;">';
switch (strtolower($type)) {
case 'sql':
echo '<pre style="margin-top: 0px;">' . str_replace(array(str_repeat(chr(32), 4), chr(9)), '', $value) . '</pre>Records: ' . intval(@$db->num_rows());
break;
default:
if (is_array($value)) {
echo '<pre>'; var_dump($value); echo '</pre>';
} elseif (is_object($value)) {
echo 'Object:<pre style="margin-top: 0px;">'; var_dump($value); echo '</pre>';
} else {
echo $value;
}
break;
}
echo '</div>';
}
}
# sitCascadedArraySort()
#
# Sortiert ein kaskadiertes Array nach Spalten
#
# Parameter:
# Zu sortierendes Array
# Liste aus Feldnamen, Sortierarten und Sortierrichtungen (siehe
# array_multisort, de.php.net/manual/de/function.array-multisort.php)
#
# Sortiert ein mehrdimentionales Array nach den angegebenen Spalten
# nach den vorgegebenen Sortierarten und -richtungen (je Spalte anzugeben)
# Beispiel:
# $x = sitCascadedArraySort($x, 'Name', SORT_STRING, SORT_ASC, 'Vorname', SORT_STRING, SORT_ASC);
function sitCascadedArraySort() {
$args = func_get_args();
$marray = array_shift($args);
if (count($marray)) {
$msortline = 'return(array_multisort(';
foreach ($args as $arg) {
$i ++;
if (is_string($arg)) {
foreach ($marray as $row) {
$sortarr[$i][] = $row[$arg];
}
} else {
$sortarr[$i] = $arg;
}
$msortline .= '$sortarr['.$i.'],';
}
$msortline .= '$marray));';
eval($msortline);
}
return $marray;
}
# sitConvertCmykJpgToSrgbJpg()
#
# Wandelt JPG-Bilder mit CMYK Farbprofil in sRGB Farbprofil um
#
# Parameter:
# $path - Kompletter Pfad zum Bild
#
# Da der Internet Explorer keine JPG-Bilder (.jpg / .jpeg) mit CMYK Farbprofil
# darstellen kann, müssen diese Bilder in das sRGB Farbprofil (für das Web)
# umgewandelt werden. Diese Funktion prüft das Bild und wandelt es ggf. um.
function sitConvertCmykJpgToSrgbJpg($path) {
if ((strtolower(substr($path, -4)) == '.jpg') || (strtolower(substr($path, -5)) == '.jpeg')) {
exec('identify -verbose ' . $path . ' >' . $path . '.txt');
$tmp = file($path . '.txt');
unlink($path . '.txt');
for ($i = 0, $n = count($tmp); $i < $n; $i ++) {
$a = explode(':', $tmp[$i]);
if (trim($a[0]) == 'Colorspace') {
if (strpos($a[1], 'RGB') === false) {
# Bild ist in CMYK
exec('convert ' . $path . ' -profile sRGB.icc -colorspace sRGB ' . $path . '.jpg');
unlink($path);
rename($path . '.jpg', $path);
}
break;
}
}
}
}
# sitExplodeAssociative()
#
# Zerlegt eine Zeichenfolge in ein assoziatives Array.
#
# Parameter:
# $delimiter - Array mit Trennzeichen zum Zerlegen der Zeichenfolge
# $string - Zu zerlegende Zeichenfolge
#
# Das erste Trennzeichen bildet das Array, das zweite Trennzeichen
# splittet auf Key und Value.
function sitExplodeAssociative($delimiters = array(), $string = '') {
$tmp = explode($delimiters[0], $string);
$ret = array();
for ($i = 0, $n = count($tmp); $i < $n; $i ++) {
$t = explode($delimiters[1], $tmp[$i]);
$ret[$t[0]] = $t[1];
}
return $ret;
}
# sitExplodeCascading()
#
# Zerlegt eine Zeichenfolge in ein kaskadiertes Array.
#
# Parameter:
# $delimiter - Array mit Trennzeichen zum Zerlegen der Zeichenfolge
# $string - Zu zerlegende Zeichenfolge
#
# Das erste Trennzeichen bildet das Hauptarray, jedes weitere
# Trennzeichen darin ein Unterarray (mehrere Ebenen).
function sitExplodeCascading($delimiters = array(), $string = '') {
$tmp = explode($delimiters[0], $string);
array_shift($delimiters);
for ($i = 0, $n = count($tmp); $i < $n; $i ++) {
$tmp[$i] = sitMultipleExplode($delimiters, $tmp[$i]);
}
return $tmp;
}
# sitExplodeLines()
#
# Zerlegt einen Text in einzelnen Zeilen
#
# Parameter:
# $string - Zu zerlegende Zeichenfolge
#
# Zerlegt den Text unabhängig der Zeilenumbruchart in ein Array
# mit den einzelnen Zeilen.
function sitExplodeLines($string) {
return explode("\n", str_replace("\r\n", "\n", $string));
}
# sitGetFilesInDirectory()
#
# Liest Dateien in ein Verzeichnis
#
# Parameter:
# $path - Kompletter Pfad des zu lesenden Verzeichnisses
# $filter - Filter für gefundenen Dateien (optional)
# $sort - Sortierreihenfolge (optional)
#
# Liest die Dateien in ein Verzeichnis und filtert und sortiert diese bei Bedarf.
# $filter kann ein Array mit mehrere Filter sein, z.B. array('*.jp*g', '*.gif', '*.png').
# $sort kann 'asc', 'desc', SORT_ASC oder SORT_DESC sein, oder weggelassen werden.
function sitGetFilesInDirectory($path, $filter = '*', $sort = '') {
define('FNM_CASEFOLD', 16);
$aFiles = array();
if (is_dir($path)) {
if (!is_array($filter)) {
$filter = array($filter);
}
if ($oDir = opendir($path)) {
while (($sFile = readdir($oDir)) !== false) {
if (is_dir($path . $sFile)) {
continue;
} else {
for ($i = 0, $n = count($filter); $i < $n; $i ++) {
if (fnmatch($filter[$i], $sFile, FNM_CASEFOLD)) {
$aFiles[] = $sFile;
break;
}
}
}
}
closedir($oDir);
if (strlen($sort)) {
sort($aFiles, SORT_STRING);
if (($sort == 'desc') || ($sort == SORT_DESC)) {
$aFiles = array_reverse($aFiles);
}
}
}
}
return $aFiles;
}
# sitGetImageDescription()
#
# Liest die Bildbeschreibung aus der Datenbank
#
# Parameter:
# $idupl - ID des Bildeintrags in der Datenbank
#
# Liest die zum Bild gehörenden Beschreibung entweder aus der Tabelle ..._upl_meta
# oder (falls leer) aus der Tabelle ..._upl und liefert diese zurück.
function sitGetImageDescription($idupl) {
global $db, $cfg;
$sDesc = '';
$sql = 'SELECT description
FROM ' . $cfg['tab']['upl_meta'] . '
WHERE (idupl=' . $idupl . ')';
$db->query($sql);
if ($db->next_record()) {
$sDesc = urldecode(str_replace(array('%0D%0A', '%0D', '%0A'), '<br />', $db->f('description')));
}
if (strlen(trim($sDesc)) == 0) {
$sql = 'SELECT description
FROM ' . $cfg['tab']['upl'] . '
WHERE (idupl=' . $idupl . ')';
$db->query($sql);
if ($db->next_record()) {
$sDesc = $db->f('description');
}
}
return $sDesc;
}
# sitGetRemoteContentToFile()
#
# Holt entfernten Inhalt ab und speichert diesen lokal
#
# Parameter:
# $url - Die Adresse von wo der Inhalt geholt werden soll
# $file - Die Datei in der gespeichert werden soll (inkl. Pfad)
# $errno - Die Fehlernummer (Rückgabe)
# $errmsg - Die Fehlerbeschreibung (Rückgabe)
#
# Die Daten (Webseite, Bild, Feed usw) werden per cURL geholt,
# wobei Weiterleitungen gefolgt werden.
# Diese Methode ist unabhängig von allow_url_fopen und verarbeitet
# auch Anfragen per https (SSL).
function sitGetRemoteContentToFile($url, $file, $errno, $errmsg) {
$options = array(
CURLOPT_RETURNTRANSFER => true, // return web page
CURLOPT_HEADER => false, // don't return headers
CURLOPT_FOLLOWLOCATION => true, // follow redirects
CURLOPT_ENCODING => "", // handle compressed
CURLOPT_USERAGENT => "spider", // who am i
CURLOPT_AUTOREFERER => true, // set referer on redirect
CURLOPT_CONNECTTIMEOUT => 10, // timeout on connect
CURLOPT_TIMEOUT => 10, // timeout on response
CURLOPT_MAXREDIRS => 10, // stop after 10 redirects
);
$ch = curl_init($url);
curl_setopt_array($ch, $options);
$content = curl_exec($ch);
$errno = curl_errno($ch);
$errmsg = curl_error($ch);
$header = curl_getinfo($ch);
curl_close($ch);
if (($errno == 0) && ($header['http_code'] == 200)) {
# Content in Datei speichern
if ($fp = fopen($file, 'w')) {
fputs($fp, $content);
fclose($fp);
return true;
} else {
$errno = -1;
$errmsg = 'Can\'t write to file ' . $file;
return false;
}
} else {
return false;
}
}
# sitGetSubdirs()
#
# Listet Unterverzeichnisse eines Verzeichnisses
#
# Parameter:
# $dir - Übergeordnetes Verzeichnis
# $levels - Anzahl Ebenen an Unterverzeichnisse die mit aufgelistet werden sollen
# $__dirs - interner Parameter für Rekursion
#
# Listet die Unterverzeichnisse eines Verzeichnisses inkl. aller Unterverzeichnisse
# bis zu der angegebenen Anzahl an Ebenen (die Tiefe).
function sitGetSubdirs($dir, $levels = 1, $__dirs = array()) {
$a = array();
$p = opendir($dir);
while (($s = readdir($p)) !== false) {
if (($s == '.') || ($s == '..')) {
continue;
}
if (is_dir($dir . ((substr($dir, -1) == '/') ? '' : '/') . $s)) {
$a[] = $dir . ((substr($dir, -1) == '/') ? '' : '/') . $s . '/';
}
}
closedir($p);
sort($a, SORT_STRING);
for ($i = 0; $i < count($a); $i ++) {
$__dirs[] = $a[$i];
if ($levels > 1) {
$__dirs = sitGetSubdirs($a[$i], ($levels - 1), $__dirs);
}
}
return $__dirs;
}
# sitImgScale()
#
# Skaliert oder zoomt ein Bild auch mit Transparenz
#
# Parameter:
# $img - Pfad und Dateiname der Originaldatei relativ zum Mandantenverzeichnis
# $maxX - Maximale Breite des neuen Bildes
# $maxY - Maximale Höhe des neuen Bildes
# $crop - Bild darf beschnitten werden (optional)
# $expand - Bild darf vergrößert werden
# $cacheTime - Ältere Version nutzen oder überschreiben
# $wantHQ - Bild soll in hoher Qualität sein
# $quality - Qualität bei JPG und GIF
# $keepType - Dateityp beibehalten
# $fixedSize - Zielbild wird auf angegebene Größe erstellt und transparent (GIF und PNG) gefüllt
# $fixedBG - Bei $fixedSize und JPG wird dies die Hintergrundfarbe des umgebenden Bereichs
#
# Erstellt im cache Verzeichnis eine skalierte Version des Originalbildes
# wie auch die Con-Funktion capiImgScale(), aber behält Transparenz in GIF
# und PNG Bilder bei. Der zusätzliche Parameter $fixedSize ermöglicht es,
# das Zielbild mit fixe Abmessungen zu erstellen und das skalierte Bild
# darin zu zentrieren, wobei der umgebenden Bereich bei GIF und PNG Bilder
# transparent, bei JPG Bilder mit der in $fixedBG angegebenen Farbe gefüllt
# wird. Ist $fixedBG nicht angegeben, wird weiß (#FFF) angenommen.
function sitImgScale($img, $maxX = 0, $maxY = 0, $crop = false, $expand = false, $cacheTime = 10, $wantHQ = true, $quality = 75, $keepType = false, $fixedSize = false, $fixedBG = 'FFFFFF') {
global $cfgClient, $client, $lang;
if (($maxX <= 0) && ($maxY <= 0)) {
return false;
}
# Cache
$md5 = capiImgScaleGetMD5CacheFile($img, $maxX, $maxY, $crop, $expand);
list($oWidth, $oHeight, $oType) = @getimagesize($cfgClient[$client]['path']['frontend'] . $img);
switch ($oType) {
case IMAGETYPE_GIF:
$cfileName = $md5 . '.gif';
break;
case IMAGETYPE_JPEG:
if ($keepType) {
$cfileName = $md5 . '.jpg';
} else {
$cfileName = $md5 . '.png';
}
break;
case IMAGETYPE_PNG:
$cfileName = $md5 . '.png';
break;
default:
return false;
}
$cacheFile = $cfgClient[$client]['path']['frontend'] . 'cache/' . $cfileName;
$webFile = $cfgClient[$client]['path']['htmlpath'] . 'cache/' . $cfileName;
if (file_exists($cacheFile)) {
if ($cacheTime == 0) {
# Datei läuft nicht ab, also direkt ausgeben
return $webFile;
} elseif ((filemtime($cacheFile) + (60 * $cacheTime)) < time()) {
# Datei ist abgelaufen
unlink($cacheFile);
} else {
# Datei ist noch nicht abgelaufen
return $webFile;
}
}
# Bild neu aufbauen
$nLeft = 0;
$nTop = 0;
$nWidth = 0;
$nHeight = 0;
if ($fixedSize) {
$iWidth = $maxX;
$iHeight = $maxY;
# Abmessung und Position in neues Bild berechnen
if (($oWidth > $maxX) || ($oHeight > $maxY) || ($expand)) {
# Bild ist größer oder soll vergrößert werden
if ($crop) {
$faktor = max($maxX / $oWidth, $maxY / $oHeight);
} else {
$faktor = min($maxX / $oWidth, $maxY / $oHeight);
}
if ($faktor == ($maxX / $oWidth)) {
$nLeft = 0;
$nWidth = $maxX;
$nHeight = floor($oHeight * $faktor);
$nTop = floor(($maxY - $nHeight) / 2);
} else {
$nTop = 0;
$nHeight = $maxY;
$nWidth = floor($oWidth * $faktor);
$nLeft = floor(($maxX - $nWidth) / 2);
}
} else {
$nLeft = floor(($maxX - $oWidth) / 2);
$nTop = floor(($maxY / $oHeight) / 2);
$nWidth = $oWidth;
$nHeight = $oHeight;
}
} else {
# Abmessung des neuen Bildes berechnen
if (($oWidth > $maxX) || ($oHeight > $maxY) || ($expand)) {
if ($crop) {
$faktor = max($maxX / $oWidth, $maxY / $oHeight);
} else {
$faktor = min($maxX / $oWidth, $maxY / $oHeight);
}
if ($faktor == ($maxX / $oWidth)) {
$nWidth = $maxX;
$nHeight = floor($oHeight * $faktor);
$iWidth = $maxX;
$iHeight = (($nHeight > $maxY) ? $maxY : $nHeight);
$nTop = (($nHeight > $maxY) ? floor(($maxY - $nHeight) / 2) : 0);
} else {
$nHeight = $maxY;
$nWidth = floor($oWidth * $faktor);
$iHeight = $maxY;
$iWidth = (($nWidth > $maxX) ? $maxX : $nWidth);
$nLeft = (($nWidth > $maxX) ? floor(($maxX - $nWidth) / 2) : 0);
}
} else {
# Bild ist kleiner und soll nicht vergrößert werden
$iWidth = $nWidth = $oWidth;
$iHeight = $nHeight = $oHeight;
}
}
# Bild einlesen
switch ($oType) {
case IMAGETYPE_GIF:
$image = imagecreatefromgif($img);
break;
case IMAGETYPE_JPEG:
$image = imagecreatefromjpeg($img);
break;
case IMAGETYPE_PNG:
$image = imagecreatefrompng($img);
break;
default:
return false;
}
# Neues Bild erzeugen und Hintergrundfarbe einstellen
$nImage = imagecreatetruecolor($iWidth, $iHeight);
if (($oType == IMAGETYPE_GIF) || ($oType == IMAGETYPE_PNG)) {
$transIdx = imagecolortransparent($image);
if ($transIdx >= 0) {
# Es gibt eine transparente Farbe (GIF oder PNG8)
$transColor = imagecolorsforindex($image, $transIdx);
$transIdx = imagecolorallocate($nImage, $transColor['red'], $transColor['green'], $transColor['blue']);
imagefill($nImage, 0, 0, $transIdx);
imagecolortransparent($nImage, $transIdx);
} elseif ($oType == IMAGETYPE_PNG) {
# Ein PNG24 kriegt ein transparenter Hintergrund per Alpha-Kanal
imagealphablending($nImage, false);
$oColor = imagecolorallocatealpha($nImage, 0, 0, 0, 127);
imagefill($nImage, 0, 0, $oColor);
imagesavealpha($nImage, true);
}
} else {
$debug = 1;
if ($keepType) {
# Andere Bilder (JPG) kriegen eine Hintergrundfarbe
$oColor = imagecolorallocate($nImage, hexdec(substr($fixedBG, 0, 2)), hexdec(substr($fixedBG, 2, 2)), hexdec(substr($fixedBG, 4, 2)));
#debug('imagecolorallocate($nImage, ' . hexdec(substr($fixedBG, 0, 2)) . ', ' . hexdec(substr($fixedBG, 2, 2)) . ', ' . hexdec(substr($fixedBG, 4, 2)) . ') = ' . $oColor);
# imagefill($nImage, 0, 0, $oColor);
imagefilledrectangle($nImage, 0, 0, $iWidth, $iHeight, $oColor);
} else {
# JPG-Bilder werden in PNG24 umgewandelt
$oType = IMAGETYPE_PNG;
imagealphablending($nImage, false);
$oColor = imagecolorallocatealpha($nImage, 0, 0, 0, 127);
# imagefill($nImage, 0, 0, $oColor);
imagefilledRectangle($nImage, 0, 0, $iWidth, $iHeight, $oColor);
imagesavealpha($nImage, true);
}
}
# Das Originalbild skaliert hinein kopieren
imagecopyresampled($nImage, $image, $nLeft, $nTop, 0, 0, $nWidth, $nHeight, $oWidth, $oHeight);
# Das neue Bild speichern
switch ($oType) {
case IMAGETYPE_GIF:
imagegif($nImage, $cacheFile);
break;
case IMAGETYPE_JPEG:
imagejpeg($nImage, $cacheFile);
break;
case IMAGETYPE_PNG:
imagepng($nImage, $cacheFile);
break;
}
# Aufräumen
imagedestroy($image);
imagedestroy($nImage);
# Pfad zurück liefern
return $webFile;
}
# sitMoveAllUploadFiles()
#
# Verschiebt alle Dateien eines Verzeichnisses
#
# Parameter:
# $source - Quellverzeichnis
# $dest - Zielverzeichnis
#
# Verschiebt alle Dateien eines Verzeichnisses im Upload-Bereich (unter /upload/)
# und passt die Einträge in der Datenbank entsprechend an.
function sitMoveAllUploadFiles($source, $dest) {
global $cfgClient, $client, $db, $cfg;
$source .= ((substr($source, -1) == '/') ? '' : '/');
$dest .= ((substr($dest, -1) == '/') ? '' : '/');
$a = array();
$p = opendir($cfgClient[$client]['upl']['path'] . $source);
while (($s = readdir($p)) !== false) {
if (is_dir($cfgClient[$client]['upl']['path'] . $source . $s)) {
continue;
} elseif (strlen($s) > 2) {
$a[] = $s;
}
}
for ($i = 0, $n = count($a); $i < $n; $i ++) {
rename($cfgClient[$client]['upl']['path'] . $source . $a[$i], $cfgClient[$client]['upl']['path'] . $dest . $a[$i]);
$sql = 'UPDATE ' . $cfg['tab']['upl'] . '
SET dirname = "' . $dest . '"
WHERE ((dirname="' . $source . '")
AND (filename="' . $a[$i] . '"))';
$db->query($sql);
}
}
# sitSafeStringEscape()
#
# Escaped eine Zeichenfolge für SQL-Anweisungen
#
# Parameter:
# $string - Zu escapenden Zeichenfolge
#
# Escaped eine Zeichenfolge so, dass diese sicher in die Datenbank eingetragen
# werden kann.
function sitSafeStringEscape($string) {
$escapeCount = 0;
$targetString = '';
for($offset = 0; $offset < strlen($string); $offset ++) {
switch ($c = $string{$offset}) {
case "'":
if ($escapeCount % 2 == 0) {
$targetString .= "\\";
}
$escapeCount = 0;
$targetString .= $c;
break;
case '"':
if ($escapeCount % 2 == 0) {
$targetString .= "\\";
}
$escapeCount = 0;
$targetString .= $c;
break;
case '\\':
$escapeCount ++ ;
$targetString .= $c;
break;
default:
$escapeCount = 0;
$targetString .= $c;
}
}
return $targetString;
}
# sitSendHtmlMail()
#
# Sendet eine HTML-Mail mit HTML- und Textteil
#
# Parameter:
# $html - HTML-Teil der Mail
# $subject - Betreffzeile der Mail
# $receipients - Array von Empfänger ('name' und 'email', mehrere möglich)
# $attachments - Dateipfad oder Array von Dateipfade für Anhänge (optional)
# $sname - Absendername (optional)
# $smail - Absenderadresse (optional)
# $mailer - Versandmethode ('mail' / 'qmail' / 'sendmail' / 'smtp') (optional)
# $sserver - SMTP-Server Adresse (optional)
# $slogin - SMTP Login (optional)
# $spass - SMTP Passwort (optional)
# $sport - SMTP Port (optional)
#
# Sendet eine HTML-Mail mit HTML- und Textteil an einen oder mehrere Empfänger
# mit keinen oder mehrere Anhänge und liefert den Erfolgsstatus zurück.
# Die Angaben zum Absender und den Mailer werden, sofern sie nicht mit angegeben
# sind, aus den Mandanten- bzw. Systemeinstellungen ausgelesen.
# - email - absende-name
# - email - absender-email
# - email - mailer
# - email - smtp-server
# - email - smtp-login
# - email - smtp-passwort
# - email - smtp-port - 25
# Die Empfänger werden als Array aus Name(n) und Email-Adresse(n) übergeben.
# Beispiel 1: array('name' => 'xyz', 'email' => 'xyz@abc.de');
# Beispiel 2: array(array('name' => 'xyz', 'email' => 'xyz@abc.de'), array('name'...
function sitSendHtmlMail($html, $subject, $receipients, $attachments = '', $sname = '', $smail = '', $mailer = '', $sserver = '', $slogin = '', $spass = '', $sport = '') {
# Eingaben ergänzen
if (!is_array($attachments)) {
$attachments = array($attachments);
}
$sname = ((strlen($sname)) ? $sname : getEffectiveSetting('email', 'absender-name'));
$smail = ((strlen($smail)) ? $smail : getEffectiveSetting('email', 'absender-email'));
if (strlen($sname) == 0) {
$sname = $smail;
}
$mailer = strtolower(((strlen($mailer)) ? $mailer : getEffectiveSetting('email', 'mailer')));
if (strlen($mailer) == 0) {
$mailer = 'mail';
}
if ($mailer == 'smtp') {
$sserver = ((strlen($sserver)) ? $sserver : getEffectiveSetting('email', 'smtp-server'));
$slogin = ((strlen($slogin)) ? $slogin : getEffectiveSetting('email', 'smtp-login'));
$spass = ((strlen($spass)) ? $spass : getEffectiveSetting('email', 'smtp-passwort'));
$sport = intval(((strlen($sport)) ? $sport : getEffectiveSetting('email', 'smtp-port')));
if ($sport == 0) {
$sport = 25;
}
}
# Prüfen, ob genügend Angaben vorliegen
if ((strlen($html) == 0) || (strlen($subject) == 0)) {
return false;
}
if ((!is_array($receipients)) || ((strlen($receipients['email']) == 0) && (strlen($receipients[0]['email']) == 0))) {
return false;
}
if (strlen($smail) == 0) {
return false;
}
if (($mailer == 'smtp') && ((strlen($sserver) == 0) || (strlen($slogin) == 0) || (strlen($spass) == 0))) {
return false;
}
# Mail aufbereiten und versenden
$oMail = new PHPMailer();
$oMail->IsHTML(true);
$oMail->Mailer = $mailer;
if ($mailer == 'smtp') {
$oMail->SMTPAuth = true;
$oMail->Host = $sserver;
$oMail->Port = $sport;
$oMail->Username = $slogin;
$oMail->Password = $spass;
}
$oMail->Subject = $subject;
$oMail->From = $smail;
$oMail->FromName = $sname;
if (is_array($receipients[0])) {
for ($i = 0, $n = count($receipients); $i < $n; $i ++) {
if (strlen($receipients[$i]['email'])) {
$oMail->AddAddress($receipients[$i]['email'], ((strlen($receipients[$i]['name'])) ? $receipients[$i]['name'] : $receipients[$i]['email']));
}
}
} else {
$oMail->AddAddress($receipients['email'], ((strlen($receipients['name'])) ? $receipients['name'] : $receipients['email']));
}
$oMail->Body = $html;
# Nur-Text-Bereich -->
$sMsg = substr($html, strpos($html, '<body'));
$sMsg = str_replace(array("\n", '</p>', '<br />', '<br>'), array('', "</p>\n\n", "\n", "\n"), $sMsg);
$sMsg = trim(strip_tags($sMsg));
$sMsg = explode("\n", $sMsg);
for ($i = 0, $n = count($sMsg); $i < $n; $i ++) {
$sMsg[$i] = trim($sMsg[$i]);
}
$sMsg = implode("\n", $sMsg);
$sMsg = html_entity_decode($sMsg);
$sMsg = capiStrReplaceDiacritics($sMsg);
# <-- Nur-Text-Bereich
$oMail->AltBody = $sMsg;
for ($i = 0, $n = count($attachments); $i < $n; $i ++) {
if (is_file($attachments[$i])) {
$oMail->AddAttachment($attachments[$i]);
}
}
$oMail->WordWrap = 76;
return $oMail->Send();
}
# sitSetClientProperty()
#
# Speichert eine Mandanteneinstellung
#
# Parameter:
# $type - Typ des Entrags (Text)
# $name - Name des Eintrags
# $value - Wert des Eintrags (Text)
#
# Speichert ein Eintrag in den Mandanteneinstellungen, überschreibt dabei
# eine gleichnamige vorhandene Einstellung.
function sitSetClientProperty($type, $name, $value) {
global $client, $cfg;
if ((strlen($type)) && (strlen($name))) {
$type = sitSafeStringEscape($type);
$name = sitSafeStringEscape($name);
$value = sitSafeStringEscape($value);
$db = new DB_Contenido();
$sql = 'SELECT value
FROM ' . $cfg['tab']['properties'] . '
WHERE ((idclient=' . $client . ')
AND (itemtype="clientsetting")
AND (type="' . $type . '")
AND (name="' . $name . '"))';
$db->query($sql);
if ($db->next_record()) {
$sql = 'UPDATE ' . $cfg['tab']['properties'] . '
SET value = "' . $value . '",
modified = "' . date('Y-m-d H:i:n') . '",
modifiedby = "' . $auth->auth['uid'] . '"
WHERE ((idclient=' . $client . ')
AND (itemtype="clientsetting")
AND (type="' . $type . '")
AND (name="' . $name . '"))';
} else {
$sql = 'INSERT INTO ' . $cfg['tab']['properties'] . ' (idclient, itemtype, itemid, type, name, value, author, created, modified, modifiedby)
VALUES (' . $client . ', "clientsetting", 1, "' . $type . '", "' . $name . '", "' . $value . '", "' . $auth->auth['uid'] . '", "' . date('Y-m-d H:i:n') . '", "' . date('Y-m-d H:i:n') . '", "' . $auth->auth['uid'] . '")';
}
$db->query($sql);
}
}
# sitTeaserText()
#
# Teasert einen Text an
#
# Parameter:
# $text - Zu teasernden Text
# $maxlength - Maximale Länge des Textes
#
# Der Text wird auf die maximale Anzahl Zeichen gekürzt, wobei der Schnitt nicht
# mitten im Wort erfolgt, sondern davor.
# Zuvor werden aus dem Text noch alle HTML-Tags entfernt.
# Wenn der Text gekürzt wird (nur wenn der Text länger als der maximalen Anzahl
# Zeichen ist), wird ein HTML-Zeichen &hellip; (...) angehängt.
function sitTeaserText($text, $maxlength) {
$sText1 = strip_tags(str_replace(array("\r\n", "\n"), ' ', $text));
$sText2 = capiStrTrimAfterWord($sText1, intval($maxlength));
if (strlen($sText2) < strlen($sText1)) {
$sText2 .= '&hellip;';
}
return $sText2;
}
?>

5
cms/index.php Normale Datei
Datei anzeigen

@ -0,0 +1,5 @@
<?php
header("Location: front_content.php");
?>

Datei anzeigen

@ -0,0 +1,71 @@
/*
* jQuery FlexSlider v2.0
* http://www.woothemes.com/flexslider/
*
* Copyright 2012 WooThemes
* Free to use under the GPLv2 license.
* http://www.gnu.org/licenses/gpl-2.0.html
*
* Contributing author: Tyler Smith (@mbmufffin)
*/
/* Browser Resets */
.flex-container a:active,
.flexslider a:active,
.flex-container a:focus,
.flexslider a:focus {outline: none;}
.slides,
.flex-control-nav,
.flex-direction-nav {margin: 0; padding: 0; list-style: none;}
/* FlexSlider Necessary Styles
*********************************/
.flexslider {margin: 0; padding: 0; min-height:150px; background:url(images/loader.gif) no-repeat center center;}
.flexslider .slides > li {display: none; -webkit-backface-visibility: hidden;} /* Hide the slides before the JS is loaded. Avoids image jumping */
.flexslider .slides img {width: 100%; display: block;}
.flex-pauseplay span {text-transform: capitalize;}
/* Clearfix for the .slides element */
.slides:after {content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0;}
html[xmlns] .slides {display: block;}
* html .slides {height: 1%;}
/* No JavaScript Fallback */
/* If you are not using another script, such as Modernizr, make sure you
* include js that eliminates this class on page load */
.no-js .slides > li:first-child {display: block;}
/* FlexSlider Default Theme
*********************************/
.flexslider {position: relative; zoom: 1; }
.flex-viewport {max-height: 2000px; -webkit-transition: all 1s ease; -moz-transition: all 1s ease; transition: all 1s ease;}
.loading .flex-viewport {max-height: 300px;}
.flexslider .slides {zoom: 1;}
.flexslider .flex-caption{ margin:10px 7px;}
.carousel li {margin-right: 5px}
/* Direction Nav */
.flex-direction-nav {*height: 0;}
.flex-direction-nav a {width: 30px; height: 30px; margin: -20px 0 0; display: block; background: url(images/bg_direction_nav.png) no-repeat 0 0; position: absolute; top: 50%; z-index: 10; cursor: pointer; text-indent: -9999px; opacity: 0; -webkit-transition: all .3s ease;}
.flex-direction-nav .flex-next {background-position: 100% 0; opacity: 0.8; right: 5px;}
.flex-direction-nav .flex-prev {opacity: 0.8; left: 5px;}
.flexslider:hover .flex-next:hover, .flexslider:hover .flex-prev:hover {opacity: 1;}
.flex-direction-nav .flex-disabled {opacity: .3!important; filter:alpha(opacity=30); cursor: default;}
/* Control Nav */
.flex-control-nav {width: 100%; position: absolute; bottom: -40px; text-align: center;}
.flex-control-nav li {margin: 0 6px; display: inline-block; zoom: 1; *display: inline;}
.flex-control-paging li a {width: 11px; height: 11px; display: block; background: #666; background: rgba(0,0,0,0.5); cursor: pointer; text-indent: -9999px; -webkit-border-radius: 20px; -moz-border-radius: 20px; -o-border-radius: 20px; border-radius: 20px; box-shadow: inset 0 0 3px rgba(0,0,0,0.3);}
.flex-control-paging li a:hover { background: #333; background: rgba(0,0,0,0.7); }
.flex-control-paging li a.flex-active { background: #000; background: rgba(0,0,0,0.9); cursor: default; }
.flex-control-thumbs {margin: 5px 0 0; position: static; overflow: hidden;}
.flex-control-thumbs li {width: 25%; float: left; margin: 0;}
.flex-control-thumbs img {width: 100%; display: block; opacity: .7; cursor: pointer;}
.flex-control-thumbs img:hover {opacity: 1;}
.flex-control-thumbs .flex-active {opacity: 1; cursor: default;}

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 1.8 KiB

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 673 B

38
cms/js/flexslider/jquery.flexslider-min.js vendored Normale Datei
Datei anzeigen

@ -0,0 +1,38 @@
/*
* jQuery FlexSlider v2.1
* Copyright 2012 WooThemes
* Contributing Author: Tyler Smith
*/
;(function(d){d.flexslider=function(i,k){var a=d(i),c=d.extend({},d.flexslider.defaults,k),e=c.namespace,p="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch,t=p?"touchend":"click",l="vertical"===c.direction,m=c.reverse,h=0<c.itemWidth,r="fade"===c.animation,s=""!==c.asNavFor,f={};d.data(i,"flexslider",a);f={init:function(){a.animating=!1;a.currentSlide=c.startAt;a.animatingTo=a.currentSlide;a.atEnd=0===a.currentSlide||a.currentSlide===a.last;a.containerSelector=c.selector.substr(0,
c.selector.search(" "));a.slides=d(c.selector,a);a.container=d(a.containerSelector,a);a.count=a.slides.length;a.syncExists=0<d(c.sync).length;"slide"===c.animation&&(c.animation="swing");a.prop=l?"top":"marginLeft";a.args={};a.manualPause=!1;var b=a,g;if(g=!c.video)if(g=!r)if(g=c.useCSS)a:{g=document.createElement("div");var n=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"],e;for(e in n)if(void 0!==g.style[n[e]]){a.pfx=n[e].replace("Perspective","").toLowerCase();
a.prop="-"+a.pfx+"-transform";g=!0;break a}g=!1}b.transitions=g;""!==c.controlsContainer&&(a.controlsContainer=0<d(c.controlsContainer).length&&d(c.controlsContainer));""!==c.manualControls&&(a.manualControls=0<d(c.manualControls).length&&d(c.manualControls));c.randomize&&(a.slides.sort(function(){return Math.round(Math.random())-0.5}),a.container.empty().append(a.slides));a.doMath();s&&f.asNav.setup();a.setup("init");c.controlNav&&f.controlNav.setup();c.directionNav&&f.directionNav.setup();c.keyboard&&
(1===d(a.containerSelector).length||c.multipleKeyboard)&&d(document).bind("keyup",function(b){b=b.keyCode;if(!a.animating&&(39===b||37===b))b=39===b?a.getTarget("next"):37===b?a.getTarget("prev"):!1,a.flexAnimate(b,c.pauseOnAction)});c.mousewheel&&a.bind("mousewheel",function(b,g){b.preventDefault();var d=0>g?a.getTarget("next"):a.getTarget("prev");a.flexAnimate(d,c.pauseOnAction)});c.pausePlay&&f.pausePlay.setup();c.slideshow&&(c.pauseOnHover&&a.hover(function(){!a.manualPlay&&!a.manualPause&&a.pause()},
function(){!a.manualPause&&!a.manualPlay&&a.play()}),0<c.initDelay?setTimeout(a.play,c.initDelay):a.play());p&&c.touch&&f.touch();(!r||r&&c.smoothHeight)&&d(window).bind("resize focus",f.resize);setTimeout(function(){c.start(a)},200)},asNav:{setup:function(){a.asNav=!0;a.animatingTo=Math.floor(a.currentSlide/a.move);a.currentItem=a.currentSlide;a.slides.removeClass(e+"active-slide").eq(a.currentItem).addClass(e+"active-slide");a.slides.click(function(b){b.preventDefault();var b=d(this),g=b.index();
!d(c.asNavFor).data("flexslider").animating&&!b.hasClass("active")&&(a.direction=a.currentItem<g?"next":"prev",a.flexAnimate(g,c.pauseOnAction,!1,!0,!0))})}},controlNav:{setup:function(){a.manualControls?f.controlNav.setupManual():f.controlNav.setupPaging()},setupPaging:function(){var b=1,g;a.controlNavScaffold=d('<ol class="'+e+"control-nav "+e+("thumbnails"===c.controlNav?"control-thumbs":"control-paging")+'"></ol>');if(1<a.pagingCount)for(var n=0;n<a.pagingCount;n++)g="thumbnails"===c.controlNav?
'<img src="'+a.slides.eq(n).attr("data-thumb")+'"/>':"<a>"+b+"</a>",a.controlNavScaffold.append("<li>"+g+"</li>"),b++;a.controlsContainer?d(a.controlsContainer).append(a.controlNavScaffold):a.append(a.controlNavScaffold);f.controlNav.set();f.controlNav.active();a.controlNavScaffold.delegate("a, img",t,function(b){b.preventDefault();var b=d(this),g=a.controlNav.index(b);b.hasClass(e+"active")||(a.direction=g>a.currentSlide?"next":"prev",a.flexAnimate(g,c.pauseOnAction))});p&&a.controlNavScaffold.delegate("a",
"click touchstart",function(a){a.preventDefault()})},setupManual:function(){a.controlNav=a.manualControls;f.controlNav.active();a.controlNav.live(t,function(b){b.preventDefault();var b=d(this),g=a.controlNav.index(b);b.hasClass(e+"active")||(g>a.currentSlide?a.direction="next":a.direction="prev",a.flexAnimate(g,c.pauseOnAction))});p&&a.controlNav.live("click touchstart",function(a){a.preventDefault()})},set:function(){a.controlNav=d("."+e+"control-nav li "+("thumbnails"===c.controlNav?"img":"a"),
a.controlsContainer?a.controlsContainer:a)},active:function(){a.controlNav.removeClass(e+"active").eq(a.animatingTo).addClass(e+"active")},update:function(b,c){1<a.pagingCount&&"add"===b?a.controlNavScaffold.append(d("<li><a>"+a.count+"</a></li>")):1===a.pagingCount?a.controlNavScaffold.find("li").remove():a.controlNav.eq(c).closest("li").remove();f.controlNav.set();1<a.pagingCount&&a.pagingCount!==a.controlNav.length?a.update(c,b):f.controlNav.active()}},directionNav:{setup:function(){var b=d('<ul class="'+
e+'direction-nav"><li><a class="'+e+'prev" href="#">'+c.prevText+'</a></li><li><a class="'+e+'next" href="#">'+c.nextText+"</a></li></ul>");a.controlsContainer?(d(a.controlsContainer).append(b),a.directionNav=d("."+e+"direction-nav li a",a.controlsContainer)):(a.append(b),a.directionNav=d("."+e+"direction-nav li a",a));f.directionNav.update();a.directionNav.bind(t,function(b){b.preventDefault();b=d(this).hasClass(e+"next")?a.getTarget("next"):a.getTarget("prev");a.flexAnimate(b,c.pauseOnAction)});
p&&a.directionNav.bind("click touchstart",function(a){a.preventDefault()})},update:function(){var b=e+"disabled";1===a.pagingCount?a.directionNav.addClass(b):c.animationLoop?a.directionNav.removeClass(b):0===a.animatingTo?a.directionNav.removeClass(b).filter("."+e+"prev").addClass(b):a.animatingTo===a.last?a.directionNav.removeClass(b).filter("."+e+"next").addClass(b):a.directionNav.removeClass(b)}},pausePlay:{setup:function(){var b=d('<div class="'+e+'pauseplay"><a></a></div>');a.controlsContainer?
(a.controlsContainer.append(b),a.pausePlay=d("."+e+"pauseplay a",a.controlsContainer)):(a.append(b),a.pausePlay=d("."+e+"pauseplay a",a));f.pausePlay.update(c.slideshow?e+"pause":e+"play");a.pausePlay.bind(t,function(b){b.preventDefault();d(this).hasClass(e+"pause")?(a.manualPause=!0,a.manualPlay=!1,a.pause()):(a.manualPause=!1,a.manualPlay=!0,a.play())});p&&a.pausePlay.bind("click touchstart",function(a){a.preventDefault()})},update:function(b){"play"===b?a.pausePlay.removeClass(e+"pause").addClass(e+
"play").text(c.playText):a.pausePlay.removeClass(e+"play").addClass(e+"pause").text(c.pauseText)}},touch:function(){function b(b){j=l?d-b.touches[0].pageY:d-b.touches[0].pageX;p=l?Math.abs(j)<Math.abs(b.touches[0].pageX-e):Math.abs(j)<Math.abs(b.touches[0].pageY-e);if(!p||500<Number(new Date)-k)b.preventDefault(),!r&&a.transitions&&(c.animationLoop||(j/=0===a.currentSlide&&0>j||a.currentSlide===a.last&&0<j?Math.abs(j)/q+2:1),a.setProps(f+j,"setTouch"))}function g(){i.removeEventListener("touchmove",
b,!1);if(a.animatingTo===a.currentSlide&&!p&&null!==j){var h=m?-j:j,l=0<h?a.getTarget("next"):a.getTarget("prev");a.canAdvance(l)&&(550>Number(new Date)-k&&50<Math.abs(h)||Math.abs(h)>q/2)?a.flexAnimate(l,c.pauseOnAction):r||a.flexAnimate(a.currentSlide,c.pauseOnAction,!0)}i.removeEventListener("touchend",g,!1);f=j=e=d=null}var d,e,f,q,j,k,p=!1;i.addEventListener("touchstart",function(j){a.animating?j.preventDefault():1===j.touches.length&&(a.pause(),q=l?a.h:a.w,k=Number(new Date),f=h&&m&&a.animatingTo===
a.last?0:h&&m?a.limit-(a.itemW+c.itemMargin)*a.move*a.animatingTo:h&&a.currentSlide===a.last?a.limit:h?(a.itemW+c.itemMargin)*a.move*a.currentSlide:m?(a.last-a.currentSlide+a.cloneOffset)*q:(a.currentSlide+a.cloneOffset)*q,d=l?j.touches[0].pageY:j.touches[0].pageX,e=l?j.touches[0].pageX:j.touches[0].pageY,i.addEventListener("touchmove",b,!1),i.addEventListener("touchend",g,!1))},!1)},resize:function(){!a.animating&&a.is(":visible")&&(h||a.doMath(),r?f.smoothHeight():h?(a.slides.width(a.computedW),
a.update(a.pagingCount),a.setProps()):l?(a.viewport.height(a.h),a.setProps(a.h,"setTotal")):(c.smoothHeight&&f.smoothHeight(),a.newSlides.width(a.computedW),a.setProps(a.computedW,"setTotal")))},smoothHeight:function(b){if(!l||r){var c=r?a:a.viewport;b?c.animate({height:a.slides.eq(a.animatingTo).height()},b):c.height(a.slides.eq(a.animatingTo).height())}},sync:function(b){var g=d(c.sync).data("flexslider"),e=a.animatingTo;switch(b){case "animate":g.flexAnimate(e,c.pauseOnAction,!1,!0);break;case "play":!g.playing&&
!g.asNav&&g.play();break;case "pause":g.pause()}}};a.flexAnimate=function(b,g,n,i,k){s&&1===a.pagingCount&&(a.direction=a.currentItem<b?"next":"prev");if(!a.animating&&(a.canAdvance(b,k)||n)&&a.is(":visible")){if(s&&i)if(n=d(c.asNavFor).data("flexslider"),a.atEnd=0===b||b===a.count-1,n.flexAnimate(b,!0,!1,!0,k),a.direction=a.currentItem<b?"next":"prev",n.direction=a.direction,Math.ceil((b+1)/a.visible)-1!==a.currentSlide&&0!==b)a.currentItem=b,a.slides.removeClass(e+"active-slide").eq(b).addClass(e+
"active-slide"),b=Math.floor(b/a.visible);else return a.currentItem=b,a.slides.removeClass(e+"active-slide").eq(b).addClass(e+"active-slide"),!1;a.animating=!0;a.animatingTo=b;c.before(a);g&&a.pause();a.syncExists&&!k&&f.sync("animate");c.controlNav&&f.controlNav.active();h||a.slides.removeClass(e+"active-slide").eq(b).addClass(e+"active-slide");a.atEnd=0===b||b===a.last;c.directionNav&&f.directionNav.update();b===a.last&&(c.end(a),c.animationLoop||a.pause());if(r)p?(a.slides.eq(a.currentSlide).css({opacity:0,
zIndex:1}),a.slides.eq(b).css({opacity:1,zIndex:2}),a.slides.unbind("webkitTransitionEnd transitionend"),a.slides.eq(a.currentSlide).bind("webkitTransitionEnd transitionend",function(){c.after(a)}),a.animating=!1,a.currentSlide=a.animatingTo):(a.slides.eq(a.currentSlide).fadeOut(c.animationSpeed,c.easing),a.slides.eq(b).fadeIn(c.animationSpeed,c.easing,a.wrapup));else{var q=l?a.slides.filter(":first").height():a.computedW;h?(b=c.itemWidth>a.w?2*c.itemMargin:c.itemMargin,b=(a.itemW+b)*a.move*a.animatingTo,
b=b>a.limit&&1!==a.visible?a.limit:b):b=0===a.currentSlide&&b===a.count-1&&c.animationLoop&&"next"!==a.direction?m?(a.count+a.cloneOffset)*q:0:a.currentSlide===a.last&&0===b&&c.animationLoop&&"prev"!==a.direction?m?0:(a.count+1)*q:m?(a.count-1-b+a.cloneOffset)*q:(b+a.cloneOffset)*q;a.setProps(b,"",c.animationSpeed);if(a.transitions){if(!c.animationLoop||!a.atEnd)a.animating=!1,a.currentSlide=a.animatingTo;a.container.unbind("webkitTransitionEnd transitionend");a.container.bind("webkitTransitionEnd transitionend",
function(){a.wrapup(q)})}else a.container.animate(a.args,c.animationSpeed,c.easing,function(){a.wrapup(q)})}c.smoothHeight&&f.smoothHeight(c.animationSpeed)}};a.wrapup=function(b){!r&&!h&&(0===a.currentSlide&&a.animatingTo===a.last&&c.animationLoop?a.setProps(b,"jumpEnd"):a.currentSlide===a.last&&(0===a.animatingTo&&c.animationLoop)&&a.setProps(b,"jumpStart"));a.animating=!1;a.currentSlide=a.animatingTo;c.after(a)};a.animateSlides=function(){a.animating||a.flexAnimate(a.getTarget("next"))};a.pause=
function(){clearInterval(a.animatedSlides);a.playing=!1;c.pausePlay&&f.pausePlay.update("play");a.syncExists&&f.sync("pause")};a.play=function(){a.animatedSlides=setInterval(a.animateSlides,c.slideshowSpeed);a.playing=!0;c.pausePlay&&f.pausePlay.update("pause");a.syncExists&&f.sync("play")};a.canAdvance=function(b,g){var d=s?a.pagingCount-1:a.last;return g?!0:s&&a.currentItem===a.count-1&&0===b&&"prev"===a.direction?!0:s&&0===a.currentItem&&b===a.pagingCount-1&&"next"!==a.direction?!1:b===a.currentSlide&&
!s?!1:c.animationLoop?!0:a.atEnd&&0===a.currentSlide&&b===d&&"next"!==a.direction?!1:a.atEnd&&a.currentSlide===d&&0===b&&"next"===a.direction?!1:!0};a.getTarget=function(b){a.direction=b;return"next"===b?a.currentSlide===a.last?0:a.currentSlide+1:0===a.currentSlide?a.last:a.currentSlide-1};a.setProps=function(b,g,d){var e,f=b?b:(a.itemW+c.itemMargin)*a.move*a.animatingTo;e=-1*function(){if(h)return"setTouch"===g?b:m&&a.animatingTo===a.last?0:m?a.limit-(a.itemW+c.itemMargin)*a.move*a.animatingTo:a.animatingTo===
a.last?a.limit:f;switch(g){case "setTotal":return m?(a.count-1-a.currentSlide+a.cloneOffset)*b:(a.currentSlide+a.cloneOffset)*b;case "setTouch":return b;case "jumpEnd":return m?b:a.count*b;case "jumpStart":return m?a.count*b:b;default:return b}}()+"px";a.transitions&&(e=l?"translate3d(0,"+e+",0)":"translate3d("+e+",0,0)",d=void 0!==d?d/1E3+"s":"0s",a.container.css("-"+a.pfx+"-transition-duration",d));a.args[a.prop]=e;(a.transitions||void 0===d)&&a.container.css(a.args)};a.setup=function(b){if(r)a.slides.css({width:"100%",
"float":"left",marginRight:"-100%",position:"relative"}),"init"===b&&(p?a.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+c.animationSpeed/1E3+"s ease",zIndex:1}).eq(a.currentSlide).css({opacity:1,zIndex:2}):a.slides.eq(a.currentSlide).fadeIn(c.animationSpeed,c.easing)),c.smoothHeight&&f.smoothHeight();else{var g,n;"init"===b&&(a.viewport=d('<div class="'+e+'viewport"></div>').css({overflow:"hidden",position:"relative"}).appendTo(a).append(a.container),a.cloneCount=0,a.cloneOffset=
0,m&&(n=d.makeArray(a.slides).reverse(),a.slides=d(n),a.container.empty().append(a.slides)));c.animationLoop&&!h&&(a.cloneCount=2,a.cloneOffset=1,"init"!==b&&a.container.find(".clone").remove(),a.container.append(a.slides.first().clone().addClass("clone")).prepend(a.slides.last().clone().addClass("clone")));a.newSlides=d(c.selector,a);g=m?a.count-1-a.currentSlide+a.cloneOffset:a.currentSlide+a.cloneOffset;l&&!h?(a.container.height(200*(a.count+a.cloneCount)+"%").css("position","absolute").width("100%"),
setTimeout(function(){a.newSlides.css({display:"block"});a.doMath();a.viewport.height(a.h);a.setProps(g*a.h,"init")},"init"===b?100:0)):(a.container.width(200*(a.count+a.cloneCount)+"%"),a.setProps(g*a.computedW,"init"),setTimeout(function(){a.doMath();a.newSlides.css({width:a.computedW,"float":"left",display:"block"});c.smoothHeight&&f.smoothHeight()},"init"===b?100:0))}h||a.slides.removeClass(e+"active-slide").eq(a.currentSlide).addClass(e+"active-slide")};a.doMath=function(){var b=a.slides.first(),
d=c.itemMargin,e=c.minItems,f=c.maxItems;a.w=a.width();a.h=b.height();a.boxPadding=b.outerWidth()-b.width();h?(a.itemT=c.itemWidth+d,a.minW=e?e*a.itemT:a.w,a.maxW=f?f*a.itemT:a.w,a.itemW=a.minW>a.w?(a.w-d*e)/e:a.maxW<a.w?(a.w-d*f)/f:c.itemWidth>a.w?a.w:c.itemWidth,a.visible=Math.floor(a.w/(a.itemW+d)),a.move=0<c.move&&c.move<a.visible?c.move:a.visible,a.pagingCount=Math.ceil((a.count-a.visible)/a.move+1),a.last=a.pagingCount-1,a.limit=1===a.pagingCount?0:c.itemWidth>a.w?(a.itemW+2*d)*a.count-a.w-
d:(a.itemW+d)*a.count-a.w-d):(a.itemW=a.w,a.pagingCount=a.count,a.last=a.count-1);a.computedW=a.itemW-a.boxPadding};a.update=function(b,d){a.doMath();h||(b<a.currentSlide?a.currentSlide+=1:b<=a.currentSlide&&0!==b&&(a.currentSlide-=1),a.animatingTo=a.currentSlide);if(c.controlNav&&!a.manualControls)if("add"===d&&!h||a.pagingCount>a.controlNav.length)f.controlNav.update("add");else if("remove"===d&&!h||a.pagingCount<a.controlNav.length)h&&a.currentSlide>a.last&&(a.currentSlide-=1,a.animatingTo-=1),
f.controlNav.update("remove",a.last);c.directionNav&&f.directionNav.update()};a.addSlide=function(b,e){var f=d(b);a.count+=1;a.last=a.count-1;l&&m?void 0!==e?a.slides.eq(a.count-e).after(f):a.container.prepend(f):void 0!==e?a.slides.eq(e).before(f):a.container.append(f);a.update(e,"add");a.slides=d(c.selector+":not(.clone)",a);a.setup();c.added(a)};a.removeSlide=function(b){var e=isNaN(b)?a.slides.index(d(b)):b;a.count-=1;a.last=a.count-1;isNaN(b)?d(b,a.slides).remove():l&&m?a.slides.eq(a.last).remove():
a.slides.eq(b).remove();a.doMath();a.update(e,"remove");a.slides=d(c.selector+":not(.clone)",a);a.setup();c.removed(a)};f.init()};d.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7E3,animationSpeed:600,initDelay:0,randomize:!1,pauseOnAction:!0,pauseOnHover:!1,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",
keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:0,maxItems:0,move:0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){}};d.fn.flexslider=function(i){void 0===i&&(i={});if("object"===typeof i)return this.each(function(){var a=d(this),c=a.find(i.selector?i.selector:".slides > li");1===c.length?(c.fadeIn(400),
i.start&&i.start(a)):void 0==a.data("flexslider")&&new d.flexslider(this,i)});var k=d(this).data("flexslider");switch(i){case "play":k.play();break;case "pause":k.pause();break;case "next":k.flexAnimate(k.getTarget("next"),!0);break;case "prev":case "previous":k.flexAnimate(k.getTarget("prev"),!0);break;default:"number"===typeof i&&k.flexAnimate(i,!0)}}})(jQuery);

4
cms/js/index.php Normale Datei
Datei anzeigen

@ -0,0 +1,4 @@
<?php
header("Location:/index.php");
exit;
?>

Datei anzeigen

@ -0,0 +1,294 @@
/* Cookies Directive - The rewrite. Now a jQuery plugin
* Version: 2.0.1
* Author: Ollie Phillips
* 24 October 2013
*/
;(function($) {
$.cookiesDirective = function(options) {
// Default Cookies Directive Settings
var settings = $.extend({
//Options
explicitConsent: true,
position: 'top',
duration: 10,
limit: 0,
message: null,
cookieScripts: null,
privacyPolicyUri: 'privacy.html',
inlineAction: false,
scriptWrapper: function(){},
// Styling
fontFamily: 'helvetica',
fontColor: '#FFFFFF',
fontSize: '13px',
backgroundColor: '#000000',
backgroundOpacity: '80',
linkColor: '#CA0000',
// Messages
multipleCookieScriptBeginningLabel: ' We use ',
and: ' and ',
multipleCookieScriptEndLabel: ' scripts, which all set cookies. ',
singleCookieScriptBeginningLabel: ' We use a ',
singleCookieScriptEndLabel: ' script which sets cookies.',
explicitCookieDeletionWarning: 'You may delete and block all cookies from this site, but parts of the site will not work.',
explicitFindOutMore: 'To find out more about cookies on this website, see our',
privacyPolicyLinkText: ' privacy policy',
explicitCheckboxLabel: 'You must tick the "I accept cookies from this site" box to accept',
explicitCookieAcceptanceLabel: 'I accept cookies from this site',
explicitCookieAcceptButtonText: 'Continue',
impliedDisclosureText: ' More details can be found in our',
impliedSubmitText: 'Do not show this message again',
}, options);
// Perform consent checks
if(!getCookie('cookiesDirective')) {
if(settings.limit > 0) {
// Display limit in force, record the view
if(!getCookie('cookiesDisclosureCount')) {
setCookie('cookiesDisclosureCount',1,1);
} else {
var disclosureCount = getCookie('cookiesDisclosureCount');
disclosureCount ++;
setCookie('cookiesDisclosureCount',disclosureCount,1);
}
// Have we reached the display limit, if not make disclosure
if(settings.limit >= getCookie('cookiesDisclosureCount')) {
disclosure(settings);
}
} else {
// No display limit
disclosure(settings);
}
// If we don't require explicit consent, load up our script wrapping function
if(!settings.explicitConsent) {
settings.scriptWrapper.call();
}
} else {
// Cookies accepted, load script wrapping function
settings.scriptWrapper.call();
}
};
// Used to load external javascript files into the DOM
$.cookiesDirective.loadScript = function(options) {
var settings = $.extend({
uri: '',
appendTo: 'body'
}, options);
var elementId = String(settings.appendTo);
var sA = document.createElement("script");
sA.src = settings.uri;
sA.type = "text/javascript";
sA.onload = sA.onreadystatechange = function() {
if ((!sA.readyState || sA.readyState == "loaded" || sA.readyState == "complete")) {
return;
}
}
switch(settings.appendTo) {
case 'head':
$('head').append(sA);
break;
case 'body':
$('body').append(sA);
break;
default:
$('#' + elementId).append(sA);
}
}
// Helper scripts
// Get cookie
var getCookie = function(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
// Set cookie
var setCookie = function(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
// Detect IE < 9
var checkIE = function(){
var version;
if (navigator.appName == 'Microsoft Internet Explorer') {
var ua = navigator.userAgent;
var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
if (re.exec(ua) != null) {
version = parseFloat(RegExp.$1);
}
if (version <= 8.0) {
return true;
} else {
if(version == 9.0) {
if(document.compatMode == "BackCompat") {
// IE9 in quirks mode won't run the script properly, set to emulate IE8
var mA = document.createElement("meta");
mA.content = "IE=EmulateIE8";
document.getElementsByTagName('head')[0].appendChild(mA);
return true;
} else {
return false;
}
}
return false;
}
} else {
return false;
}
}
// Disclosure routines
var disclosure = function(options) {
var settings = options;
settings.css = 'fixed';
// IE 9 and lower has issues with position:fixed, either out the box or in compatibility mode - fix that
if(checkIE()) {
settings.position = 'top';
settings.css = 'absolute';
}
// Any cookie setting scripts to disclose
var scriptsDisclosure = '';
if (settings.cookieScripts) {
var scripts = settings.cookieScripts.split(',');
var scriptsCount = scripts.length;
var scriptDisclosureTxt = '';
if(scriptsCount>1) {
for(var t=0; t < scriptsCount - 1; t++) {
scriptDisclosureTxt += scripts[t] + ', ';
}
scriptsDisclosure = settings.multipleCookieScriptBeginningLabel + scriptDisclosureTxt.substring(0, scriptDisclosureTxt.length - 2) + settings.and + scripts[scriptsCount - 1] + settings.multipleCookieScriptEndLabel;
} else {
scriptsDisclosure = setting.singleCookieScriptBeginningLabel + scripts[0] + settings.singleCookieScriptEndLabel;
}
}
// Create overlay, vary the disclosure based on explicit/implied consent
// Set our disclosure/message if one not supplied
var html = '';
html += '<div id="epd">';
html += '<div id="cookiesdirective" style="position:'+ settings.css +';'+ settings.position + ':-300px;left:0px;width:100%;'
html += 'height:auto;background:' + settings.backgroundColor + ';opacity:.' + settings.backgroundOpacity + ';';
html += '-ms-filter: “alpha(opacity=' + settings.backgroundOpacity + ')”; filter: alpha(opacity=' + settings.backgroundOpacity + ');';
html += '-khtml-opacity: .' + settings.backgroundOpacity + '; -moz-opacity: .' + settings.backgroundOpacity + ';';
html += 'color:' + settings.fontColor + ';font-family:' + settings.fontFamily + ';font-size:' + settings.fontSize + ';';
html += 'text-align:center;z-index:1000;">';
html += '<div style="position:relative;height:auto;width:90%;padding:10px;margin-left:auto;margin-right:auto;">';
if(!settings.message) {
if(settings.explicitConsent) {
// Explicit consent message
settings.message = 'This site uses cookies. Some of the cookies we ';
settings.message += 'use are essential for parts of the site to operate and have already been set.';
} else {
// Implied consent message
settings.message = 'We have placed cookies on your computer to help make this website better.';
}
}
html += settings.message;
// Build the rest of the disclosure for implied and explicit consent
if(settings.explicitConsent) {
// Explicit consent disclosure
html += scriptsDisclosure + settings.explicitCookieDeletionWarning;
html += settings.explicitFindOutMore + '<a style="color:'+ settings.linkColor + ';font-weight:bold;';
html += 'font-family:' + settings.fontFamily + ';font-size:' + settings.fontSize + ';" href="'+ settings.privacyPolicyUri + '">'+ settings.privacyPolicyLinkText +'</a>.';
html += '<div id="epdnotick" style="color:#ca0000;display:none;margin:2px;"><span style="background:#cecece;padding:2px;">' + settings.explicitCheckboxLabel + '</span></div>'
html += '<div style="margin-top:5px;';
if(settings.inlineAction) {
html += 'display:inline-block;margin-left:5px';
}
html += '">' + settings.explicitCookieAcceptanceLabel + '<input type="checkbox" name="epdagree" id="epdagree" />&nbsp;';
html += '<input type="submit" name="explicitsubmit" id="explicitsubmit" value="' + settings.explicitCookieAcceptButtonText + '"/><br/></div></div>';
} else {
// Implied consent disclosure
html += scriptsDisclosure + settings.impliedDisclosureText + ' <a style="color:'+ settings.linkColor + ';';
html += 'font-weight:bold;font-family:' + settings.fontFamily + ';font-size:' + settings.fontSize + ';" href="'+ settings.privacyPolicyUri + '">' + settings.privacyPolicyLinkText + '</a>.';
html += '<div style="margin-top:5px;';
if(settings.inlineAction) {
html += 'display:inline-block;margin-left:5px';
}
html += '"><input type="submit" name="impliedsubmit" id="impliedsubmit" value="' + settings.impliedSubmitText + '"/></div></div>';
}
html += '</div></div>';
$('body').append(html);
// Serve the disclosure, and be smarter about branching
var dp = settings.position.toLowerCase();
if(dp != 'top' && dp!= 'bottom') {
dp = 'top';
}
var opts = new Array();
if(dp == 'top') {
opts['in'] = {'top':'0'};
opts['out'] = {'top':'-300'};
} else {
opts['in'] = {'bottom':'0'};
opts['out'] = {'bottom':'-300'};
}
// Start animation
$('#cookiesdirective').animate(opts['in'], 1000, function() {
// Set event handlers depending on type of disclosure
if(settings.explicitConsent) {
// Explicit, need to check a box and click a button
$('#explicitsubmit').click(function() {
if($('#epdagree').is(':checked')) {
// Set a cookie to prevent this being displayed again
setCookie('cookiesDirective',1,365);
// Close the overlay
$('#cookiesdirective').animate(opts['out'],1000,function() {
// Remove the elements from the DOM and reload page
$('#cookiesdirective').remove();
location.reload(true);
});
} else {
// We need the box checked we want "explicit consent", display message
$('#epdnotick').css('display', 'block');
}
});
} else {
// Implied consent, just a button to close it
$('#impliedsubmit').click(function() {
// Set a cookie to prevent this being displayed again
setCookie('cookiesDirective',1,365);
// Close the overlay
$('#cookiesdirective').animate(opts['out'],1000,function() {
// Remove the elements from the DOM and reload page
$('#cookiesdirective').remove();
});
});
}
// Set a timer to remove the warning after 'settings.duration' seconds
setTimeout(function(){
$('#cookiesdirective').animate({
opacity:'0'
},2000, function(){
$('#cookiesdirective').css(dp,'-300px');
});
}, settings.duration * 1000);
});
}
})(jQuery);

4
cms/js/libs/jquery-1.9.0.min.js vendored Normale Datei

Dateidiff unterdrückt, weil mindestens eine Zeile zu lang ist

4
cms/js/libs/modernizr-2.6.2.min.js vendored Normale Datei

Dateidiff unterdrückt, weil mindestens eine Zeile zu lang ist

42
cms/js/main.js Normale Datei
Datei anzeigen

@ -0,0 +1,42 @@
// Fireup the plugins
$(document).ready(function(){
// initialise slideshow
$('.flexslider').flexslider({
animation: "slide",
start: function(slider){
$('body').removeClass('loading');
}
});
});
/**
* Handles toggling the navigation menu for small screens.
*/
( function() {
var button = document.getElementById( 'topnav' ).getElementsByTagName( 'div' )[0],
menu = document.getElementById( 'topnav' ).getElementsByTagName( 'ul' )[0];
if ( undefined === button )
return false;
// Hide button if menu is missing or empty.
if ( undefined === menu || ! menu.childNodes.length ) {
button.style.display = 'none';
return false;
}
button.onclick = function() {
if ( -1 == menu.className.indexOf( 'srt-menu' ) )
menu.className = 'srt-menu';
if ( -1 != button.className.indexOf( 'toggled-on' ) ) {
button.className = button.className.replace( ' toggled-on', '' );
menu.className = menu.className.replace( ' toggled-on', '' );
} else {
button.className += ' toggled-on';
menu.className += ' toggled-on';
}
};
} )();

4
cms/logs/index.php Normale Datei
Datei anzeigen

@ -0,0 +1,4 @@
<?php
header("Location:/index.php");
exit;
?>

2
cms/robots.txt Normale Datei
Datei anzeigen

@ -0,0 +1,2 @@
User-agent: *
Disallow:

Datei anzeigen

@ -0,0 +1,9 @@
<form id="login_box" action="{form_action}" method="post">
<fieldset>
<legend>Login</legend>
<input type="hidden" name="return" value="true" />
<input type="text" placeholder="{label_name}" id="username" name="username" />
<input type="password" placeholder="{label_pass}" id="password" name="password" />
<input id="loginBtn" type="submit" name="login" value="{label_login}" />
</fieldset>
</form>

Datei anzeigen

@ -0,0 +1,18 @@
<!-- developer design for file list -->
<h3>{TITLE}</h3>
<!--
Possible place holders for entries:
FILELINK, FILENAME, FILEEXTENSION, FILESIZE, FILESIZE_UNIT,
FILECREATIONDATE, FILEMODIFYDATE, FILEDIRCTORY,
FILEMETA_DESCRIPTION, FILEMETA_KEYWORDS, FILEMETA_MEDIANAME,
FILEMETA_INTERNAL_NOTICE, FILEMETA_COPYRIGHT
-->
<!-- BEGIN:BLOCK -->
<div style="float: left;margin-bottom: 20px;width:47%;padding-right:5px">
<b><a href="{FILELINK}">{FILENAME}</a></b> ({FILEEXTENSION})<br />
<span style="color: rgb(170, 170, 170);">{LABEL_FILESIZE}</span> {FILESIZE} {FILESIZE_UNIT}<br />
<span style="color: rgb(170, 170, 170);">{LABEL_UPLOAD_DATE}</span> {FILECREATIONDATE}<br />
{FILEMETA_DESCRIPTION}
</div>
<!-- END:BLOCK -->
<br style="clear:both" />

Datei anzeigen

@ -0,0 +1,11 @@
<div style="width:400px">
<p style="font-weight:bold; font-style:italic;">{TITLE}</p>
<!-- BEGIN:BLOCK -->
<div style="margin-bottom:10px; width: 192px; float:left; padding:3px;">
<div style="color:#aaa;">{PUBLISHED}</div>
<p style="font-weight:bold; margin-top:2px; margin-bottom:2px;"><a href="{ART_URL}">{TITLE}</a></p>
{IMAGE}{TEXT} <a href="{ART_URL}">{MORE}</a>
</div>
<!-- END:BLOCK -->
</div>
<div style="clear:both;"></div>

Datei anzeigen

@ -0,0 +1,11 @@
<div style="width:400px">
<p style="font-weight:bold; font-style:italic;">{TITLE}</p>
<!-- BEGIN:BLOCK -->
<div style="margin-bottom:10px;padding:3px;">
<div style="float:right; color:#aaa;">{PUBLISHED}</div>
<p style="font-weight:bold; margin-top:2px; margin-bottom:2px;"><a href="{ART_URL}">{TITLE}</a></p>
{IMAGE}{TEXT} <a href="{ART_URL}">{MORE}</a>
</div>
<!-- END:BLOCK -->
</div>
<div style="clear:both;"></div>

Datei anzeigen

@ -0,0 +1,6 @@
<!--
Dude, this page rocks! The gentle musicians of Contenido are proud to present this brilliant example.
Contenido is a free and easy to use open source Content Management System created by four for business AG and licensed under GNU/GPL 2.
Contenido is copyright 2001-2010 of four for business AG. Modules are copyright of their respective owners.
Information and contribution at http://www.contenido.org
//-->

Datei anzeigen

@ -0,0 +1 @@
<p>&copy; 2012-2013 <a href="http://www.ConLite.org" target="_blank">ConLite</a></p>

Datei anzeigen

@ -0,0 +1 @@
<p>&copy; 2012-2013 <a href="http://www.ConLite.org" target="_blank">ConLite</a></p>

4
cms/templates/header.html Normale Datei
Datei anzeigen

@ -0,0 +1,4 @@
<div id="headBody" class="clearfix"{css-style}>
<a id="logoTop" href="{url}" title="{title}"><img src="images/logo_oben.gif" alt="" /></a>
<h1>{headline}</h1>
</div>

Datei anzeigen

@ -0,0 +1 @@
<h1>{HEADLINE}</h1>

Datei anzeigen

@ -0,0 +1,55 @@
<div id="contactForm">
<form action="{form_action}" method="post">
<input type="hidden" name="send" value="1" />
<div class="contactRow clearfix" style="font-size: 0.8em;">* {PFLICHTFELDER}</div>
<div class="contactRow clearfix">
<label for="Anrede">{ANREDE}</label>
<input type="radio" name="Anrede" value="{ANREDE_OPTION1}" id="Anrede" checked="checked" style="width:auto;border:0;" /> {ANREDE_OPTION1}
<input type="radio" name="Anrede" value="{ANREDE_OPTION2}" style="width:auto;border:0;" /> {ANREDE_OPTION2}
</div>
<div class="contactRow clearfix">
<label for="Vorname">{VORNAME} *</label>
<input type="text" name="Vorname" id="Vorname" class="eingabe" maxlength="100"/>
</div>
<div class="contactRow clearfix">
<label for="Nachname">{NACHNAME} *</label>
<input type="text" name="Nachname" id="Nachname" class="eingabe" maxlength="100"/>
</div>
<div class="contactRow clearfix">
<label for="Firma">{FIRMA} *</label>
<input type="text" name="Firma" id="Firma" class="eingabe" maxlength="100"/>
</div>
<div class="contactRow clearfix">
<label for="Strasse">{STRASSE} *</label>
<input type="text" name="Strasse" id="Strasse" class="eingabe" maxlength="100"/>
</div>
<div class="contactRow clearfix">
<label for="PLZOrt">{PLZORT} *</label>
<input type="text" name="PLZOrt" id="PLZOrt" class="eingabe" maxlength="100"/>
</div>
<div class="contactRow clearfix">
<label for="Telefon">{TELEFON} *</label>
<input type="text" name="Telefon" id="Telefon" class="eingabe" maxlength="100"/>
</div>
<div class="contactRow clearfix">
<label for="EMail">{EMAIL} *</label>
<input type="text" name="EMail" id="EMail" class="eingabe" maxlength="100"/>
</div>
<div class="contactRow clearfix">
<label for="Anliegen">{ANLIEGEN} *</label>
<textarea name="Anliegen" id="Anliegen"></textarea>
</div>
<div id="contactFormSubmit" class="clearfix">
<label></label>
<div class="uneditable-input" style="padding: 0px 0px 4px 0px; border: 0px none;">
<div id="contactFormSubmitLeft">
<input type="reset" value="{LOESCHEN}" />
</div>
<div id="contactFormSubmitRight">
<input type="submit" value="{ABSCHICKEN}" />
</div>
</div>
</div>
</form>
</div>

Datei anzeigen

@ -0,0 +1,5 @@
<h3>{headline}</h3>
<div id="logoutText">
{text}
<a href="{url}" title="{label_logout}">{label_logout}&nbsp;&nbsp;<img src="images/link_pfeil.gif" alt="" /></a>
</div>

Datei anzeigen

@ -0,0 +1 @@
<a id="logoBottom" href="http://www.contenido.org/" title="Zur Contenido Homepage"><img src="images/logo_unten.gif" alt="Contenido Logo" /></a>

Datei anzeigen

@ -0,0 +1,4 @@
<ul id="metaNavigation" class="nav">
{items}
</ul>

Datei anzeigen

@ -0,0 +1,3 @@
<!-- BEGIN:BLOCK -->
<li><a href="{url}" title="{title}">{label}</a></li>
<!-- END:BLOCK -->

Datei anzeigen

@ -0,0 +1,8 @@
<div class="menu-toggle">Menu</div>
<ul class="srt-menu" id="menu-main-navigation">
<!-- BEGIN:BLOCK -->
<li class="navmainStandardLevel_{css_level}{css_first_item}{css_last_item}{css_active_item}">
<a href="{url}" title="{name}" class="navmainStandardLevel_{css_level}{css_first_item}{css_last_item}{css_active_item}">{name}</a>
</li>
<!-- END:BLOCK -->
</ul>

Datei anzeigen

@ -0,0 +1,5 @@
<!-- BEGIN:BLOCK -->
<li class="navmainStandardLevel_{css_level}">
<a href="{url}" title="{name}" class="sitemapStandardLevel_{css_level}">{name}</a>
</li>
<!-- END:BLOCK -->

Datei anzeigen

@ -0,0 +1,3 @@
<ul class="navmainStandardMainCat">
{list_items}
</ul>

Datei anzeigen

@ -0,0 +1,31 @@
<br/>
<form method="post" action="{FORM_ACTION}" name="newsletterform"{FORM_TARGET}>
<div id="contactForm">
<div class="contactRow clearfix">
<label for="emailname">{EMAILNAME}</label>
<input id="emailname" type="text" name="emailname" value="" class="eingabe" maxlength="100"/>
</div>
<div class="contactRow clearfix">
<label for="email">{EMAIL}</label>
<input id="email" type="text" name="email" value="" class="eingabe" maxlength="100"/>
</div>
<div class="contactRow clearfix" style="padding-bottom:5px;">
<label for="action">&nbsp;</label>
<select name="action" class="eingabe" maxlength="100" style="float:left; margin-right:3px;">
<option value="subscribe" selected>{SUBSCRIBE}</option>
<option value="delete">{DELETE}</option>
</select>
{EXTRAHTML}
</div>
<hr class="clearfix" style="border: 1px solid #f1f1f1; width: 430px;"/>
<div id="contactFormSubmit" class="clearfix">
<div id="contactFormSubmitLeft">
<input type="reset" value="{LOESCHEN}" />
</div>
<div id="contactFormSubmitRight">
<input type="submit" value="{ABSCHICKEN}" />
</div>
</div>
</div>
</form>
<br/>

Datei anzeigen

@ -0,0 +1 @@
{CONTENT}

5
cms/templates/rss.html Normale Datei
Datei anzeigen

@ -0,0 +1,5 @@
<ul>
<!-- BEGIN:BLOCK -->
<li><a target="_blank" href="{LINK}">{TITLE}</a></li>
<!-- END:BLOCK -->
</ul>

Datei anzeigen

@ -0,0 +1,4 @@
<!-- BEGIN:BLOCK -->
<h3><a href="{LINK}" title="Link zu '{TITLE}'">{TITLE}</a></h3>
<p>{IMAGE}{DESCRIPTION} <a href="{LINK}" title="Link zu '{TITLE}'" class="extern" target="_blank">{READ_ON}</a></p>
<!-- END:BLOCK -->

Datei anzeigen

@ -0,0 +1,7 @@
<div class="suchausgabe">
<!-- BEGIN:BLOCK -->
<h2><a href="{LINK}" target="_blank" title="Link zu '{TITLE}'">{TITLE}</a></h2>
<p>{IMAGE}{DESCRIPTION} <a href="{LINK}" title="Link zu '{TITLE}'" target="_blank">{READ_ON}</a></p>
<hr class="noshade"/>
<!-- END:BLOCK -->
</div>

Datei anzeigen

@ -0,0 +1,7 @@
<div id="search">
<form action="{form_action}" method="post">
<label for="searchterm">{label_search}</label>
<input type="text" id="searchterm" name="searchterm" />
<input type="image" id="search_send" name="search_send" src="images/navi_pfeil_zu.gif" class="sbmt" />
</form>
</div>

Datei anzeigen

@ -0,0 +1,13 @@
<div id="searchResults">
<p class="message">{MESSAGE}</p>
<!-- BEGIN:BLOCK -->
<div class="searchResultItem">
<h2>{NUM}. <a title="{TITLE}" href="{HREF}" target="{TARGET}">{CATNAME}</a></h2>
<p style="padding:0;margin:0 0 10px 0;">
{HEADLINE}
</p>
<img src="images/link_pfeil_klein.gif" alt="" /> <a title="{TITLE}" href="{HREF}" target="{TARGET}">{more}</a>
</div>
<!-- END:BLOCK -->
<p class="result">{result_page}&nbsp;&nbsp;{PREV}{PAGES}{NEXT}</p>
</div>

Datei anzeigen

@ -0,0 +1,137 @@
<script type="text/javascript">
//<![CDATA[
// Symbole fuer die Navigation (Bilder oder Zeichen)
var naviLeftSymbol{INSTANCE} = '&lt;';
var naviRightSymbol{INSTANCE} = '&gt;';
// Ab hier keine Aenderungen !!!
var numImages{INSTANCE} = {NUM_IMAGES};
var aImages{INSTANCE} = new Array({IMAGES_ARRAY});
var aThumbs{INSTANCE} = new Array();
{THUMBS_ARRAY}
var iThumbs{INSTANCE} = {THUMBS_PER_ARRAY};
var iArrays{INSTANCE} = {THUMB_ARRAYS};
var aPopups{INSTANCE} = new Array({POPUPS_ARRAY});
var aDescr{INSTANCE} = new Array({DESCR_ARRAY});
{PRELOAD_IMAGES}
function simpleGallery{INSTANCE}ShowImage(No) {
if ({USE_POPUP}) {
document.getElementById('SimpleGallery{INSTANCE}Image').innerHTML = '<' + 'a href="javascript:simpleGallery{INSTANCE}ShowImagePopup(' + No + ')"' + '>' + '<' + 'img src="' + aImages{INSTANCE}[(No - 1)] + '" alt="" /' + '>' + '<' + '/a' + '>';
document.getElementById('SimpleGallery{INSTANCE}PopupLink').setAttribute('onclick', 'simpleGallery{INSTANCE}ShowImagePopup(' + No + ')');
} else {
document.getElementById('SimpleGallery{INSTANCE}Image').innerHTML = '<' + 'img src="' + aImages{INSTANCE}[(No - 1)] + '" alt="" /' + '>';
}
document.getElementById('SimpleGallery{INSTANCE}ImageInfo').innerHTML = No + '/' + numImages{INSTANCE};
document.getElementById('SimpleGallery{INSTANCE}ImageDescription').innerHTML = aDescr{INSTANCE}[(No - 1)];
document.getElementById('SimpleGallery{INSTANCE}Navigation').innerHTML = '<' + 'a href="javascript:simpleGallery{INSTANCE}ShowImage(' + ((No == 1) ? numImages{INSTANCE} : (No - 1)) + ');"' + '>' + naviLeftSymbol{INSTANCE} + '<' + '/a' + '>' + '&nbsp;' + '<' + 'a href="javascript:simpleGallery{INSTANCE}ShowImage(' + ((No == numImages{INSTANCE}) ? 1 : (No + 1)) + ');"' + '>' + naviRightSymbol{INSTANCE} + '<' + '/a' + '>';
var ImgL = new Image(); ImgL.src = aPopups{INSTANCE}[(No - 1)];
}
var iCurrent = -1;
var iBlock = 0;
function simpleGallery{INSTANCE}ShowImagePopup(No) {
if (iCurrent == -1) {
setTimeout('simpleGallery{INSTANCE}PreloadLargeImages()', 2000);
}
if (iCurrent != No) {
iCurrent = No;
simpleGallery{INSTANCE}ShowThumbs(No);
document.getElementById('SimpleGallery{INSTANCE}ImageArea').innerHTML = '<'+'img src="' + aPopups{INSTANCE}[(No - 1)] + '" alt="" /' + '>';
document.getElementById('SimpleGallery{INSTANCE}DescriptionArea').innerHTML = aDescr{INSTANCE}[(No - 1)];
document.getElementById('SimpleGallery{INSTANCE}DarkBackground').style.display = 'block';
document.getElementById('SimpleGallery{INSTANCE}ImageWindow').style.display = 'block';
document.getElementById('SimpleGallery{INSTANCE}PopupImageNaviLeft').setAttribute('onclick', 'simpleGallery{INSTANCE}ShowImagePopup(' + ((No == 1) ? numImages{INSTANCE} : (No - 1)) + ')');
document.getElementById('SimpleGallery{INSTANCE}PopupImageNaviRight').setAttribute('onclick', 'simpleGallery{INSTANCE}ShowImagePopup(' + ((No == numImages{INSTANCE}) ? 1 : (No + 1)) + ')');
var ImgL0 = new Image(); ImgL0.src = aPopups{INSTANCE}[((No == 1) ? (numImages{INSTANCE} - 1) : (No - 2))];
var ImgL1 = new Image(); ImgL1.src = aPopups{INSTANCE}[((No == numImages{INSTANCE}) ? 1 : No)];
}
}
function simpleGallery{INSTANCE}CloseImagePopup() {
document.getElementById('SimpleGallery{INSTANCE}ImageWindow').style.display = 'none';
document.getElementById('SimpleGallery{INSTANCE}DarkBackground').style.display = 'none';
iCurrent = 0;
iBlock = 0;
}
function simpleGallery{INSTANCE}ShowThumbs(No) {
var iThumbsArrayNo = Math.ceil(No / iThumbs{INSTANCE});
var sThumbs = '';
iBlock = iThumbsArrayNo;
for (var i = 0; i < iThumbs{INSTANCE}; i ++) {
if (i < aThumbs{INSTANCE}[iThumbsArrayNo].length) {
sThumbs += '<' + 'div style="float: left; margin: 0px 1px; padding: 2px 2px 0px 2px; width: {THUMB_BLOCK_WIDTH}px; height: {THUMB_BLOCK_HEIGHT}px; text-align: center; border: 1px solid #' + (((i + ((iThumbsArrayNo - 1) * iThumbs{INSTANCE}) + 1) == No) ? '000' : 'FFF') + ';"' + '>' + '<' + 'a href="javascript:simpleGallery{INSTANCE}ShowImagePopup(' + (i + ((iThumbsArrayNo - 1) * iThumbs{INSTANCE}) + 1) + ')"' + '>' + '<' + 'img src="' + aThumbs{INSTANCE}[iThumbsArrayNo][i] + '" alt="" onmousemove="simpleGallery{INSTANCE}ShowImagePopup(' + (i + ((iThumbsArrayNo - 1) * iThumbs{INSTANCE}) + 1) + ')" style="width: 100px; height: 75px;" /' + '>' + '<' + '/a' + '>' + '<' + 'br /' + '>' + (((i + ((iThumbsArrayNo - 1) * iThumbs{INSTANCE}) + 1) == No) ? '<' + 'span style="line-height: 20px; background-color: #FFF;"' + '>' + '&nbsp;' + No + '/' + numImages{INSTANCE} : '') + '&nbsp;' + '<' + '/span' + '>' + '<' + '/div' + '>';
}
}
document.getElementById('SimpleGallery{INSTANCE}ThumbsAreaThumbs').innerHTML = sThumbs;
if (iThumbsArrayNo > 1) {
document.getElementById('SimpleGallery{INSTANCE}ThumbsAreaNaviLeft').innerHTML = '<' + 'a href="javascript:simpleGallery{INSTANCE}ShowImagePopup(' + ((iThumbs{INSTANCE} * iThumbsArrayNo) - iThumbs{INSTANCE}) + ')"' + '>' + '<' + 'img src="images/SimpleGallery/NaviLeft.png" alt="" /' + '>' + '<' + '/a' + '>';
} else {
document.getElementById('SimpleGallery{INSTANCE}ThumbsAreaNaviLeft').innerHTML = '<' + 'img src="images/SimpleGallery/NaviLeftDisabled.png" alt="" /' + '>';
}
if (iThumbsArrayNo < iArrays{INSTANCE}) {
document.getElementById('SimpleGallery{INSTANCE}ThumbsAreaNaviRight').innerHTML = '<' + 'a href="javascript:simpleGallery{INSTANCE}ShowImagePopup(' + ((iThumbs{INSTANCE} * iThumbsArrayNo) + 1) + ')"' + '>' + '<' + 'img src="images/SimpleGallery/NaviRight.png" alt="" /' + '>' + '<' + '/a' + '>';
} else {
document.getElementById('SimpleGallery{INSTANCE}ThumbsAreaNaviRight').innerHTML = '<' + 'img src="images/SimpleGallery/NaviRightDisabled.png" alt="" /' + '>';
}
}
function simpleGallery{INSTANCE}PreloadLargeImages() {
{PRELOAD_THUMB_IMAGES}
}
//]]>
</script>
<div id="SimpleGallery{INSTANCE}" class="SimpleGallery" style="width: {WIDTH}px;">
<div style="position: relative; margin: 0px 50px 10px 50px;">
<div id="SimpleGallery{INSTANCE}PopupLink" style="position: absolute;{SHOW_POPUP} width: {IMAGE_WIDTH}px; height: {IMAGE_HEIGHT}px; background: url('images/SimpleGallery/ZoomOverlay.png') center center no-repeat; opacity: 0; filter: alpha(opacity=0); transition: opacity 0.3s ease 0s; cursor: pointer;" onmouseover="this.style.opacity=1; this.style.filter='alpha(opacity=70)'; this.style.transition='opacity 0.5s ease 0s';" onmouseout="this.style.opacity=0; this.style.filter='alpha(opacity=0)'; this.style.transition='opacity 0.3s ease 0s';"></div>
<div id="SimpleGallery{INSTANCE}Image" class="SimpleGalleryImage"></div>
</div>
<div id="SimpleGallery{INSTANCE}ImageInfo" class="SimpleGalleryImageInfo" style="float: left;"></div>
<div id="SimpleGallery{INSTANCE}Navigation" class="SimpleGalleryNavigation" style="float: right;"></div>
<div id="SimpleGallery{INSTANCE}ImageDescription" class="SimpleGalleryImageDescription" style="margin: 0px 50px; padding-left: 4px; border-left: 1px solid #999;"></div>
<div style="clear: both;"></div>
</div>
<script type="text/javascript">
//<![CDATA[
simpleGallery{INSTANCE}ShowImage(1);
//]]>
</script>
<div id="SimpleGallery{INSTANCE}DarkBackground" onclick="simpleGallery{INSTANCE}CloseImagePopup();" style="position: fixed; left: 0px; top: 0px; width: 100%; height: 100%; z-index: 200; display: none; background-color: #000; opacity: 0.6;"></div>
<div id="SimpleGallery{INSTANCE}ImageWindow" style="position: fixed; left: 0px; top: 0px; width: 100%; height: 100%; z-index: 210; display: none; font-family: Arial, Verdana, sans-serif;">
<table border="0" cellspacing="0" cellpadding="0" style="width: 100%; height: 100%;">
<tr><td onclick="simpleGallery{INSTANCE}CloseImagePopup();"></td></tr>
<tr valign="middle" style="height: 1%;">
<td onclick="simpleGallery{INSTANCE}CloseImagePopup();"></td>
<td align="center" style="width: 1%; background-color: transparent;">
<div style="display: inline-block; position: relative; width: {POPUP_WIDTH}px; text-align: left; color: #000; background-color: #FFF; border: 8px solid #FFF;">
<div style="position: absolute; top: -24px; right: -24px;">
<img src="images/SimpleGallery/ClosePopup.png" alt="Schlie&szlig;en" onclick="simpleGallery{INSTANCE}CloseImagePopup();" style="cursor: pointer;" />
</div>
<div style="float: left;">
<div>
<div style="position: relative; margin-bottom: 8px; width: {POPUP_IMAGE_WIDTH}px; height: {POPUP_IMAGE_HEIGHT}px; background: url('images/SimpleGallery/Loading.gif') center center no-repeat;">
<div style="position: absolute; width: {POPUP_IMAGE_WIDTH}px; height: {POPUP_IMAGE_HEIGHT}px; opacity: 0.5; filter: alpha(opacity=50); transition: opacity 0.3s ease 0s; cursor: pointer;" onmouseover="this.style.opacity=1; this.style.filter='alpha(opacity=70)'; this.style.transition='opacity 0.5s ease 0s';" onmouseout="this.style.opacity=0; this.style.filter='alpha(opacity=0)'; this.style.transition='opacity 0.3s ease 0s';">
<div id="SimpleGallery{INSTANCE}PopupImageNaviLeft" style="position: absolute; left: 0px; width: 50%; height: {POPUP_IMAGE_HEIGHT}px; background: url('images/SimpleGallery/PopupImageNaviLeft.png') center left no-repeat;"></div>
<div id="SimpleGallery{INSTANCE}PopupImageNaviRight" style="position: absolute; right: 0px; width: 50%; height: {POPUP_IMAGE_HEIGHT}px; background: url('images/SimpleGallery/PopupImageNaviRight.png') center right no-repeat;"></div>
</div>
<div id="SimpleGallery{INSTANCE}ImageArea"></div>
</div>
<div id="SimpleGallery{INSTANCE}ThumbsArea" style="width: {POPUP_IMAGE_WIDTH}px; height: 101px; overflow: hidden;">
<div id="SimpleGallery{INSTANCE}ThumbsAreaNaviLeft" style="float: left; padding: 39px 1px; width: 10px; height: 21px; border: 1px solid #CCC;"><img src="images/SimpleGallery/NaviLeftDisabled.png" alt="" /></div>
<div id="SimpleGallery{INSTANCE}ThumbsAreaNaviRight" style="float: right; padding: 39px 1px; width: 10px; height: 21px; border: 1px solid #CCC;"><img src="images/SimpleGallery/NaviRightDisabled.png" alt="" /></div>
<div id="SimpleGallery{INSTANCE}ThumbsAreaThumbs" style="padding: 2px 0px; height: 95px; font-size: 14px; border: 0px solid #CCC; border-width: 1px 0px;"></div>
<div style="clear: both;"></div>
</div>
</div>
</div>
<div style="float: right; margin-left: 8px; width: 220px;">
<div id="SimpleGallery{INSTANCE}DescriptionArea" class="SimpleGalleryDescriptionArea"></div>
</div>
<div style="clear: both;"></div>
</div>
</td>
<td onclick="simpleGallery{INSTANCE}CloseImagePopup();"></td>
</tr>
<tr><td onclick="simpleGallery{INSTANCE}CloseImagePopup();"></td></tr>
</table>
</div>

Datei anzeigen

@ -0,0 +1,7 @@
<ul class="sitemapStandardMainCat">
<!-- BEGIN:BLOCK -->
<li class="sitemapStandardLevel_{css_level}">
<a href="{url}" title="{name}" class="sitemapStandardLevel_{css_level}">{name}</a>
</li>
<!-- END:BLOCK -->
</ul>

Datei anzeigen

@ -0,0 +1,5 @@
<!-- BEGIN:BLOCK -->
<li class="sitemapStandardLevel_{css_level}">
<a href="{url}" title="{name}" class="sitemapStandardLevel_{css_level}">{name}</a>
</li>
<!-- END:BLOCK -->

Datei anzeigen

@ -0,0 +1,3 @@
<ul class="sitemapStandardMainCat">
{list_items}
</ul>

Datei anzeigen

@ -0,0 +1 @@
<h2>{SUBHEADLINE}</h2>

Datei anzeigen

@ -0,0 +1,7 @@
<h1>{TITLE}</h1>
<div class="artikelliste">
<!-- BEGIN:BLOCK -->
<h2><a href="{HREF}">{HEADLINE}</a></h2>
<p>{IMG}{TEXT} <a href="{HREF}" title="{MORE}">{MORE} &rsaquo;</a></p>
<!-- END:BLOCK -->
</div>

Datei anzeigen

@ -0,0 +1,7 @@
<!-- BEGIN:BLOCK -->
<div class="teaserItem">
<h3><a href="{LINK}" title="{TITLE}">{TITLE}</a></h3>
{DESCRIPTION}
<a href="{LINK}" title="{TITLE}" class="more" target="_blank">{READ_ON}</a>
</div>
<!-- END:BLOCK -->

Datei anzeigen

@ -0,0 +1,3 @@
<div class="textItem">
{text}
</div>

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 246 KiB

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 133 KiB

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 157 KiB

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 156 KiB

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 146 KiB

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 172 KiB

338
conlib/auth.inc Normale Datei
Datei anzeigen

@ -0,0 +1,338 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* Session Management for PHP3
* Internet Images srl
*
* Requirements:
* @con_php_req 5
* @con_template <Templatefiles>
* @con_notice <Notice>
*
*
* @package ContenidoBackendArea
* @version <version>
* @author Boris Erdmann, Kristian Koehntopp, Massimiliano Masserelli
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
* @since file available since contenido release <Contenido Version>
* @deprecated file deprecated in contenido release <Contenido Version>
*
* {@internal
* created 2002-07-21
* modified 2008-07-03, bilal arslan, added security fix
*
* $Id: auth.inc 1315 2011-03-03 00:02:52Z xmurrix $:
* }}
*
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class Auth {
var $classname = "Auth";
var $persistent_slots = array("auth");
var $lifetime = 15; ## Max allowed idle time before
## reauthentication is necessary.
## If set to 0, auth never expires.
var $refresh = 0; ## Refresh interval in minutes.
## When expires auth data is refreshed
## from db using auth_refreshlogin()
## method. Set to 0 to disable refresh
var $mode = "log"; ## "log" for login only systems,
## "reg" for user self registration
var $magic = ""; ## Used in uniqid() generation
var $nobody = false; ## If true, a default auth is created...
var $cancel_login = "cancel_login"; ## The name of a button that can be
## used to cancel a login form
## End of user qualifiable settings.
var $auth = array(); ## Data array
var $in = false;
var $db;
##
## Initialization
##
function start() {
$cl = $this->cancel_login;
global $sess, $$cl;
## This is for performance, I guess but I'm not sure if it could
## be safely removed -- negro
if (! $this->in) {
$sess->register("auth");
$this->in = true;
}
## back compatibility: if d_c is set, create db object
if(isset($this->database_class)) {
$class = $this->database_class;
$this->db = new $class;
}
# Check current auth state. Should be one of
# 1) Not logged in (no valid auth info or auth expired)
# 2) Logged in (valid auth info)
# 3) Login in progress (if $$cl, revert to state 1)
if ($this->is_authenticated()) {
$uid = $this->auth["uid"];
switch ($uid) {
case "form":
# Login in progress
if ($$cl) {
# If $$cl is set, delete all auth info
# and set state to "Not logged in", so eventually
# default or automatic authentication may take place
$this->unauth();
$state = 1;
} else {
# Set state to "Login in progress"
$state = 3;
}
break;
default:
# User is authenticated and auth not expired
$state = 2;
break;
}
} else {
# User is not (yet) authenticated
$this->unauth();
$state = 1;
}
switch ($state) {
case 1:
# No valid auth info or auth is expired
# Check for user supplied automatic login procedure
if ( $uid = $this->auth_preauth() ) {
$this->auth["uid"] = $uid;
$this->auth["exp"] = time() + (60 * $this->lifetime);
$this->auth["refresh"] = time() + (60 * $this->refresh);
return true;
}
# Check for "log" vs. "reg" mode
switch ($this->mode) {
case "yes":
case "log":
if ($this->nobody) {
# Authenticate as nobody
$this->auth["uid"] = "nobody";
# $this->auth["uname"] = "nobody";
$this->auth["exp"] = 0x7fffffff;
$this->auth["refresh"] = 0x7fffffff;
return true;
} else {
# Show the login form
$this->auth_loginform();
$this->auth["uid"] = "form";
$this->auth["exp"] = 0x7fffffff;
$this->auth["refresh"] = 0x7fffffff;
$sess->freeze();
exit;
}
break;
case "reg":
if ($this->nobody) {
# Authenticate as nobody
$this->auth["uid"] = "nobody";
# $this->auth["uname"] = "nobody";
$this->auth["exp"] = 0x7fffffff;
$this->auth["refresh"] = 0x7fffffff;
return true;
} else {
# Show the registration form
$this->auth_registerform();
$this->auth["uid"] = "form";
$this->auth["exp"] = 0x7fffffff;
$this->auth["refresh"] = 0x7fffffff;
$sess->freeze();
exit;
}
break;
default:
# This should never happen. Complain.
echo "Error in auth handling: no valid mode specified.\n";
$sess->freeze();
exit;
}
break;
case 2:
# Valid auth info
# Refresh expire info
## DEFAUTH handling: do not update exp for nobody.
if ($uid != "nobody")
$this->auth["exp"] = time() + (60 * $this->lifetime);
break;
case 3:
# Login in progress, check results and act accordingly
switch ($this->mode) {
case "yes":
case "log":
#if ( $uid = $this->auth_preauth() ) {
# $this->auth["uid"] = $uid;
# $this->auth["exp"] = time() + (60 * $this->lifetime);
# $this->auth["refresh"] = time() + (60 * $this->refresh);
# return true;
#}
if ( $uid = $this->auth_validatelogin() ) {
$this->auth["uid"] = $uid;
$this->auth["exp"] = time() + (60 * $this->lifetime);
$this->auth["refresh"] = time() + (60 * $this->refresh);
return true;
} else {
$this->auth_loginform();
$this->auth["uid"] = "form";
$this->auth["exp"] = 0x7fffffff;
$this->auth["refresh"] = 0x7fffffff;
$sess->freeze();
exit;
}
break;
case "reg":
if ($uid = $this->auth_doregister()) {
$this->auth["uid"] = $uid;
$this->auth["exp"] = time() + (60 * $this->lifetime);
$this->auth["refresh"] = time() + (60 * $this->refresh);
return true;
} else {
$this->auth_registerform();
$this->auth["uid"] = "form";
$this->auth["exp"] = 0x7fffffff;
$this->auth["refresh"] = 0x7fffffff;
$sess->freeze();
exit;
}
break;
default:
# This should never happen. Complain.
echo "Error in auth handling: no valid mode specified.\n";
$sess->freeze();
exit;
break;
}
break;
default:
# This should never happen. Complain.
echo "Error in auth handling: invalid state reached.\n";
$sess->freeze();
exit;
break;
}
}
function login_if( $t ) {
if ( $t ) {
$this->unauth(); # We have to relogin, so clear current auth info
$this->nobody = false; # We are forcing login, so default auth is
# disabled
$this->start(); # Call authentication code
}
}
function unauth($nobody = false) {
$this->auth["uid"] = "";
$this->auth["perm"] = "";
$this->auth["exp"] = 0;
## Back compatibility: passing $nobody to this method is
## deprecated
if ($nobody) {
$this->auth["uid"] = "nobody";
$this->auth["perm"] = "";
$this->auth["exp"] = 0x7fffffff;
}
}
function logout($nobody = "") {
global $sess;
$sess->unregister("auth");
unset($this->auth["uname"]);
$this->unauth($nobody == "" ? $this->nobody : $nobody);
$sess->freeze();
return true;
}
function is_authenticated() {
if (
isset($this->auth["uid"])
&&
$this->auth["uid"]
&&
(($this->lifetime <= 0) || (time() < $this->auth["exp"]))
) {
# If more than $this->refresh minutes are passed since last check,
# perform auth data refreshing. Refresh is only done when current
# session is valid (registered, not expired).
if (
($this->refresh > 0)
&&
($this->auth["refresh"])
&&
($this->auth["refresh"] < time())
) {
if ( $this->auth_refreshlogin() ) {
$this->auth["refresh"] = time() + (60 * $this->refresh);
} else {
return false;
}
}
return $this->auth["uid"];
} else {
return false;
}
}
########################################################################
##
## Helper functions
##
function url() {
return $GLOBALS["sess"]->self_url();
}
function purl() {
print $GLOBALS["sess"]->self_url();
}
## This method can authenticate a user before the loginform
## is being displayed. If it does, it must set a valid uid
## (i.e. nobody IS NOT a valid uid) just like auth_validatelogin,
## else it shall return false.
function auth_preauth() { return false; }
##
## Authentication dummies. Must be overridden by user.
##
function auth_loginform() { ; }
function auth_validatelogin() { ; }
function auth_refreshlogin() { ; }
function auth_registerform() { ; }
function auth_doregister() { ; }
}
?>

107
conlib/ct_file.inc Normale Datei
Datei anzeigen

@ -0,0 +1,107 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* PHPLIB Data Storage Container using DBM Files
* Code inspired by ct_shm.inc v 1.1
*
* Requirements:
* @con_php_req 5
* @con_template <Templatefiles>
* @con_notice <Notice>
*
*
* @package ContenidoBackendArea
* @version 1.1
* @author Oliver Teuber <oliver@teuber.com>
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
* @since file available since contenido release <Contenido Version>
* @deprecated file deprecated in contenido release <Contenido Version>
*
* {@internal
* created 2000-01-01
* modified 2008-07-03, bilal arslan, added security fix
*
* $Id: ct_file.inc 740 2008-08-27 10:45:04Z timo.trautmann $:
* }}
*
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class CT_File {
##
## Define these parameters by overwriting or by
## deriving your own class from it (recommened)
##
var $file_path = ""; ## Path where to store the session files
## writable by the web server UID
## end of configuration
function ac_start() {
# Not needed in this instance
}
function ac_get_lock() {
# Not needed in this instance
}
function ac_release_lock() {
# Not needed in this instance
}
function ac_newid($str, $name) {
return $str;
}
function ac_store($id, $name, $str) {
$f=fopen($this->file_path . "$id$name",'w+');
if($f<0)
{
return false;
}
fputs($f,urlencode($str));
fclose($f);
return true;
}
function ac_delete($id, $name) {
unlink($this->file_path."$id$name");
}
function ac_gc($gc_time, $name) {
}
function ac_halt($s) {
echo "<b>$s</b>";
exit;
}
function ac_get_value($id, $name) {
if(file_exists($this->file_path."$id$name"))
{
$f=fopen($this->file_path."$id$name",'r');
if($f<0)
return '';
$s=fgets($f,10240);
fclose($f);
return urldecode($s);
}
else
return '';
}
}
?>

118
conlib/ct_ldap.inc Normale Datei
Datei anzeigen

@ -0,0 +1,118 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* PHPLIB Data Storage Container a LDAP database
*
* Requirements:
* @con_php_req 5
*
*
* @package ContenidoBackendArea
* @version 1.1
* @author Sascha Schumann <sascha@schumann.cx>
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
* @since file available since contenido release <Contenido Version>
* @deprecated file deprecated in contenido release <Contenido Version>
*
* {@internal
* created 2000-01-01
* modified 2008-07-03, bilal arslan, added security fix
*
* $Id: ct_ldap.inc 1315 2011-03-03 00:02:52Z xmurrix $:
* }}
*
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class CT_Ldap {
##
## Configurable parameters
##
var $ldap_host = "localhost";
var $ldap_port = 389;
var $basedn = "dc=your-domain, dc=com";
var $rootdn = "cn=root, dc=your-domain, dc=com";
var $rootpw = "secret";
var $objclass = "phplibdata";
## end of configuration
var $ds;
function ac_start() {
$this->ds = ldap_connect($this->ldap_host, $this->ldap_port);
if(!$this->ds) {
$this->ac_halt("LDAP connect failed");
}
if(!ldap_bind($this->ds, $this->rootdn, $this->rootpw)) {
$this->ac_halt("LDAP bind failed");
}
}
function ac_halt($msg="") {
echo "Session_ldap failed: <b>".htmlentities($msg)."</b><p>\n";
exit;
}
function ac_store($id, $name, $str) {
$dn = "cn=$id_$name, ".$this->basedn;
$entry = array(
"cn" => "$id_$name",
"str" => $str,
"objectclass" => $this->objclass
);
if(!@ldap_modify($this->ds, $dn, $entry)) {
if(!ldap_add($this->ds, $dn, $entry)) {
$this->ac_halt("LDAP add failed");
}
}
}
function ac_delete($id, $name) {
ldap_delete($this->ds, "cn=$id_$name, ".$this->basedn);
}
function ac_get_value($id, $name) {
$sr = ldap_search($this->ds, $this->basedn, "cn=$id_$name");
$inf = ldap_get_entries($this->ds, $sr);
$str = $inf[0]["str"][0];
ldap_free_result($sr);
return $str;
}
function ac_release_lock() {
}
function ac_get_lock() {
}
function ac_newid($str, $name) {
return $str;
}
function ac_auth($username, $password) {
## we need a username and a md5() encrypted password
$sr = ldap_search($this->ds, $this->basedn, "username=$username");
if(ldap_count_entries($this->ds, $sr) > 0) {
$inf = ldap_get_entries($this->ds, $sr);
$passmd5 = $inf[0]["password"][0];
if(md5($password) == $passmd5) {
return array($inf[0]["uid"][0],
$inf[0]["perms"][0]);
}
}
return array();
}
};
?>

72
conlib/ct_null.inc Normale Datei
Datei anzeigen

@ -0,0 +1,72 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* PHPLIB Data Storage Container using nothing
*
* Requirements:
* @con_php_req 5
* @con_notice
* I wrote this for a quickie test of a website on a server
* where I could not use any other container
* It's also a good skeleton for writing a new container
*
*
* @package ContenidoBackendArea
* @version <version>
* @author Sascha Schumann <sascha@schumann.cx>
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
* @since file available since contenido release <Contenido Version>
* @deprecated file deprecated in contenido release <Contenido Version>
*
* {@internal
* created 2000-01-01
* modified 2008-07-03, bilal arslan, added security fix
*
* $Id: ct_null.inc 1315 2011-03-03 00:02:52Z xmurrix $:
* }}
*
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class CT_Null {
function ac_start() {
}
function ac_get_lock() {
}
function ac_release_lock() {
}
function ac_newid($str, $name) {
return $str;
}
function ac_store($id, $name, $str) {
return true;
}
function ac_delete($id, $name) {
}
function ac_gc($gc_time, $name) {
}
function ac_halt($s) {
echo "<b>$s</b>";
exit;
}
function ac_get_value($id, $name) {
return "";
}
}
?>

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen