Merge pull request 'Merge latest PHP8 changes to develop' (#31) from dev_php8 into develop

Reviewed-on: #31
Dieser Commit ist enthalten in:
Ortwin Pinke 2022-05-23 17:18:43 +00:00
Commit 6a150745dd
84 geänderte Dateien mit 4531 neuen und 3471 gelöschten Zeilen

4
.gitignore vendored
Datei anzeigen

@ -17,3 +17,7 @@
/cms/dflip/ /cms/dflip/
/cms/js/firstlevel/ /cms/js/firstlevel/
/conlite/external/**/.git /conlite/external/**/.git
/dievino/
/conlite/logs/debug.log
/cms/data/config/production/config.mod_rewrite.php
/cms/data/config/production/config.local.php

Datei anzeigen

@ -14,7 +14,11 @@
# $Id: htaccess_simple.txt 145 2019-10-25 16:00:47Z oldperl $ # $Id: htaccess_simple.txt 145 2019-10-25 16:00:47Z oldperl $
################################################################################ ################################################################################
#SetEnv CONLITE_ENVIRONMENT development # easily set this enviroment variable to the config you want to use
# add a config folder with the same name in data/config and cms/data/config
# and use your custom config for development
#SetEnv CONLITE_ENVIRONMENT develop
<IfModule mod_rewrite.c> <IfModule mod_rewrite.c>
@ -33,7 +37,7 @@
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR] RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} ftp://.*$ [NC,OR] RewriteCond %{QUERY_STRING} ftp://.*$ [NC,OR]
RewriteCond %{QUERY_STRING} http[s]*://.*$ [NC] RewriteCond %{QUERY_STRING} http[s]*://.*$ [NC]
RewriteRule ^.* - [F,L] # all matching conditions from above will end in nirvana RewriteRule ^.* - [F,L,DPI] # all matching conditions from above will end in nirvana
# Rewrite request to root to front_content.php # Rewrite request to root to front_content.php
RewriteRule ^$ front_content.php [QSA,L] RewriteRule ^$ front_content.php [QSA,L]
@ -44,7 +48,7 @@
RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ - [NC,L,DPI]
# Pass other requests to front_content.php # Pass other requests to front_content.php
RewriteRule ^.*$ front_content.php [QSA,NC,L] RewriteRule ^.*$ front_content.php [QSA,NC,L]

Datei anzeigen

@ -1,5 +1,5 @@
---------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------
This is the readme file for ConLite 2.1.3 This is the readme file for ConLite 2.2.0 beta
Any help you need you may find by visiting the following links. Any help you need you may find by visiting the following links.
@ -56,6 +56,8 @@ FS#25 - Collision with pre-installed AMR after Migration
** History / Changelog ** ** History / Changelog **
ConLite 2.2.0 beta
ConLite 2.1.3 ConLite 2.1.3
ConLite 2.1.2 ConLite 2.1.2
ConLite 2.1.1 ConLite 2.1.1
@ -81,4 +83,4 @@ CONTENIDO 4.8.16 CL
* 13 Bug Report FEUser-Plugins valide_to and valide_from saving wrong t ... * 13 Bug Report FEUser-Plugins valide_to and valide_from saving wrong t ...
* 9 Enhancement Check all translations (i18n) * 9 Enhancement Check all translations (i18n)
* 8 Bug Report adapt genericdb from 4.8.17 CL * 8 Bug Report adapt genericdb from 4.8.17 CL
* 5 Bug Report Buttontranslations missing or wrong * 5 Bug Report Buttontranslations missing or wrong

Datei anzeigen

@ -1,4 +0,0 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

Datei-Diff unterdrückt, da er zu groß ist Diff laden

Datei anzeigen

@ -93,7 +93,7 @@ if ($cfg["use_pseudocron"] == true) {
* PHPLIB application development toolkit * PHPLIB application development toolkit
* @see http://sourceforge.net/projects/phplib * @see http://sourceforge.net/projects/phplib
*/ */
if ($contenido) { if (!empty($contenido)) {
//Backend //Backend
page_open(array('sess' => 'Contenido_Session', 'auth' => 'Contenido_Challenge_Crypt_Auth', 'perm' => 'Contenido_Perm')); page_open(array('sess' => 'Contenido_Session', 'auth' => 'Contenido_Challenge_Crypt_Auth', 'perm' => 'Contenido_Perm'));
i18nInit($cfg["path"]["contenido"] . $cfg["path"]["locale"], $belang); i18nInit($cfg["path"]["contenido"] . $cfg["path"]["locale"], $belang);
@ -102,33 +102,24 @@ if ($contenido) {
page_open(array('sess' => 'Contenido_Frontend_Session', 'auth' => 'Contenido_Frontend_Challenge_Crypt_Auth', 'perm' => 'Contenido_Perm')); 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'; require_once $cfg['path']['contenido'] . $cfg['path']['includes'] . 'functions.includePluginConf.php';
$db = new DB_Contenido; // Call hook after plugins are loaded, added by Murat Purc, 2008-09-07
CEC_Hook::execute('Contenido.Frontend.AfterLoadPlugins');
$db = new DB_ConLite();
$sess->register("cfgClient"); $sess->register("cfgClient");
$sess->register("errsite_idcat"); $sess->register("errsite_idcat");
$sess->register("errsite_idart"); $sess->register("errsite_idart");
$sess->register("encoding"); $sess->register("encoding");
if ($cfgClient["set"] != "set") { if (empty($cfgClient["set"]) || $cfgClient["set"] != "set") {
rereadClients(); rereadClients();
} }
# Check if this request is for a compressed file # Check if this request is for a compressed file
if ($_GET['action'] == 'get_compressed') { if (isset($_GET['action']) && $_GET['action'] == 'get_compressed') {
# Get the calling parameters # Get the calling parameters
$sFilename = ((isset($_GET['f'])) ? $_GET['f'] : $_GET['amp;f']); $sFilename = ((isset($_GET['f'])) ? $_GET['f'] : $_GET['amp;f']);
$sContentType = ((isset($_GET['c'])) ? $_GET['c'] : $_GET['amp;c']); $sContentType = ((isset($_GET['c'])) ? $_GET['c'] : $_GET['amp;c']);
@ -264,9 +255,9 @@ if ($idart && !$idcat && !$idcatart) {
unset($code); unset($code);
unset($markscript); unset($markscript);
if (!$idcatart) { if (empty($idcatart)) {
if (!$idart) { if (empty($idart)) {
if (!$idcat) { if (empty($idcat)) {
# Note: In earlier Contenido versions the information if an article is startarticle of a category has been stored # Note: In earlier Contenido versions the information if an article is startarticle of a category has been stored
# in relation con_cat_art. # in relation con_cat_art.
if ($cfg["is_start_compatible"] == true) { if ($cfg["is_start_compatible"] == true) {
@ -313,7 +304,7 @@ if (!$idcatart) {
$idart = $db->f("idart"); $idart = $db->f("idart");
$idcat = $db->f("idcat"); $idcat = $db->f("idcat");
} else { } else {
if ($contenido) { if (!empty($contenido)) {
cInclude("includes", "functions.i18n.php"); cInclude("includes", "functions.i18n.php");
die(i18n("No start article for this category")); die(i18n("No start article for this category"));
} else { } else {
@ -525,7 +516,7 @@ if ($contenido) {
/* If mode is 'edit' and user has permission to edit articles in the current category */ /* 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))) { if (empty($inUse) && (isset($allow) && $allow == true) && $view == "edit" && ($perm->have_perm_area_action_item("con_editcontent", "con_editart", $idcat))) {
cInclude("includes", "functions.tpl.php"); cInclude("includes", "functions.tpl.php");
cInclude("includes", "functions.con.php"); cInclude("includes", "functions.con.php");
include ($cfg["path"]["contenido"] . $cfg["path"]["includes"] . "include.con_editcontent.php"); include ($cfg["path"]["contenido"] . $cfg["path"]["includes"] . "include.con_editcontent.php");
@ -606,10 +597,12 @@ if ($inUse == false && $allow == true && $view == "edit" && ($perm->have_perm_ar
} }
/* Add mark Script to code if user is in the backend */ /* Add mark Script to code if user is in the backend */
$code = preg_replace("/<\/head>/i", "$markscript\n</head>", $code, 1); if(!empty($markscript)) {
$code = preg_replace("/<\/head>/i", "$markscript\n</head>", $code, 1);
}
/* If article is in use, display notification */ /* If article is in use, display notification */
if ($sHtmlInUseCss && $sHtmlInUseMessage) { if (!empty($sHtmlInUseCss) && !empty($sHtmlInUseMessage)) {
$code = preg_replace("/<\/head>/i", "$sHtmlInUseCss\n</head>", $code, 1); $code = preg_replace("/<\/head>/i", "$sHtmlInUseCss\n</head>", $code, 1);
$code = preg_replace("/(<body[^>]*)>/i", "\${1}> \n $sHtmlInUseMessage", $code, 1); $code = preg_replace("/(<body[^>]*)>/i", "\${1}> \n $sHtmlInUseMessage", $code, 1);
} }
@ -652,7 +645,7 @@ if ($inUse == false && $allow == true && $view == "edit" && ($perm->have_perm_ar
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) . "' 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"; AND A.idarea = C.idarea AND B.idaction = A.idaction";
$db2 = new DB_Contenido; $db2 = new DB_ConLite();
$db2->query($sql); $db2->query($sql);
if ($db2->num_rows() > 0) { if ($db2->num_rows() > 0) {
@ -852,5 +845,4 @@ if (isset($savedlang)) {
} }
$db->disconnect(); $db->disconnect();
page_close(); page_close();
?>

Datei anzeigen

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

Datei anzeigen

@ -92,6 +92,10 @@ class DB_Sql extends DB_Sql_Abstract {
return null; return null;
} }
// PHP 8.1 fix
$driver = new mysqli_driver();
$driver->report_mode = MYSQLI_REPORT_OFF;
$dbh = mysqli_init(); $dbh = mysqli_init();
//print_r($dbh); //print_r($dbh);
if (!$dbh) { if (!$dbh) {
@ -123,7 +127,7 @@ class DB_Sql extends DB_Sql_Abstract {
$aCon['socket'] = null; $aCon['socket'] = null;
} }
if (!isset($aCon['flags'])) { if (!isset($aCon['flags'])) {
$aCon['flags'] = null; $aCon['flags'] = MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT;
} }
if (!isset($aCon['database'])) { if (!isset($aCon['database'])) {
$aCon['database'] = null; $aCon['database'] = null;
@ -134,10 +138,10 @@ class DB_Sql extends DB_Sql_Abstract {
); );
if (isset($aCon['charset'])) { if (!empty($aCon['charset'])) {
@mysqli_set_charset($dbh, $aCon['charset']); mysqli_set_charset($dbh, $aCon['charset']);
} else { } else {
@mysqli_set_charset($dbh, 'utf8'); mysqli_set_charset($dbh, 'utf8');
} }
//echo mysqli_character_set_name($dbh); //echo mysqli_character_set_name($dbh);
@ -326,30 +330,30 @@ class DB_Sql extends DB_Sql_Abstract {
} }
/** /**
* @see DB_Sql_Abstract::_metaData() * @see DB_Sql_Abstract::_metaData()
* * Due to compatibility problems with Table we changed the behavior * * Due to compatibility problems with Table we changed the behavior
* of metadata(); * of metadata();
* depending on $full, metadata returns the following values: * depending on $full, metadata returns the following values:
* *
* - full is false (default): * - full is false (default):
* $result[]: * $result[]:
* [0]["table"] table name * [0]["table"] table name
* [0]["name"] field name * [0]["name"] field name
* [0]["type"] field type * [0]["type"] field type
* [0]["len"] field length * [0]["len"] field length
* [0]["flags"] field flags * [0]["flags"] field flags
* *
* - full is true * - full is true
* $result[]: * $result[]:
* ["num_fields"] number of metadata records * ["num_fields"] number of metadata records
* [0]["table"] table name * [0]["table"] table name
* [0]["name"] field name * [0]["name"] field name
* [0]["type"] field type * [0]["type"] field type
* [0]["len"] field length * [0]["len"] field length
* [0]["flags"] field flags * [0]["flags"] field flags
* ["meta"][field name] index of field named "field name" * ["meta"][field name] index of field named "field name"
* This last one could be used if you have a field name, but no index. * This last one could be used if you have a field name, but no index.
* Test: if (isset($result['meta']['myfield'])) { ... * Test: if (isset($result['meta']['myfield'])) { ...
*/ */
protected function _metaData($table = '', $full = false) { protected function _metaData($table = '', $full = false) {
$count = 0; $count = 0;
@ -392,7 +396,7 @@ class DB_Sql extends DB_Sql_Abstract {
$count = 0; $count = 0;
while ($finfo = $id->fetch_field()) { while ($finfo = $id->fetch_field()) {
//rint_r($finfo); //rint_r($finfo);
$res[$count]['table'] = $finfo->table; $res[$count]['table'] = $finfo->table;
$res[$count]['name'] = $finfo->name; $res[$count]['name'] = $finfo->name;
$res[$count]['type'] = $this->_aDataTypes[$finfo->type]; $res[$count]['type'] = $this->_aDataTypes[$finfo->type];
@ -420,10 +424,13 @@ class DB_Sql extends DB_Sql_Abstract {
* @see DB_Sql_Abstract::escape() * @see DB_Sql_Abstract::escape()
*/ */
public function escape($sString) { public function escape($sString) {
if(is_null($sString)) {
$sString = '';
}
$sResult = ''; $sResult = '';
if (is_resource($this->Link_ID) || $this->connect()) { if (is_resource($this->Link_ID) || $this->connect()) {
$sResult = mysqli_real_escape_string($this->Link_ID, $sString); $sResult = mysqli_real_escape_string($this->Link_ID, $sString);
}; }
return $sResult; return $sResult;
} }
@ -440,7 +447,7 @@ class DB_Sql extends DB_Sql_Abstract {
$return[$i]['table_name'] = $info[0]; $return[$i]['table_name'] = $info[0];
$return[$i]['tablespace_name'] = $this->Database; $return[$i]['tablespace_name'] = $this->Database;
$return[$i]['database'] = $this->Database; $return[$i]['database'] = $this->Database;
$i ++; $i++;
} }
mysqli_free_result($h); mysqli_free_result($h);

Datei anzeigen

@ -36,7 +36,7 @@ class cApiUploadCollection extends ItemCollection {
public function sync($dir, $file) { public function sync($dir, $file) {
global $client; global $client;
if (strstr(strtolower($_ENV["OS"]), 'windows') === FALSE) { if (!empty($_ENV["OS"]) && strstr(strtolower($_ENV["OS"]), 'windows') === FALSE) {
#Unix style OS distinguish between lower and uppercase file names, i.e. test.gif is not the same as Test.gif #Unix style OS distinguish between lower and uppercase file names, i.e. test.gif is not the same as Test.gif
$this->select("dirname = BINARY '$dir' AND filename = BINARY '$file' AND idclient = '$client'"); $this->select("dirname = BINARY '$dir' AND filename = BINARY '$file' AND idclient = '$client'");
} else { } else {

Datei anzeigen

@ -17,13 +17,14 @@
* @link http://www.conlite.org ConLite.org * @link http://www.conlite.org ConLite.org
*/ */
// security check // security check
defined('CON_FRAMEWORK') or die('Illegal call'); defined('CON_FRAMEWORK') or die('Illegal call');
/*
if (!class_exists("HTML_Common2")) { if (!class_exists("HTML_Common2")) {
cInclude("pear", "HTML/Common2.php"); cInclude("pear", "HTML/Common2.php");
} }
*/
/* Global ID counter */ /* Global ID counter */
$cHTMLIDCount = 0; $cHTMLIDCount = 0;
@ -32,7 +33,7 @@ $cHTMLIDCount = 0;
* *
* @author Ortwin Pinke <o.pinke@conlite.org> * @author Ortwin Pinke <o.pinke@conlite.org>
*/ */
class cHTML extends HTML_Common2 { class cHTML extends cHTML5Common {
/** /**
* Storage of the open SGML tag template * Storage of the open SGML tag template

Datei anzeigen

@ -0,0 +1,584 @@
<?php
/**
* @category ConLite
* @package Core
* @subpackage cHTML5
* @since 2.2
* @author Ortwin Pinke <o.pinke@conlite.org>
* @copyright (c) 2022, conlite.org
* @license http://www.gnu.de/documents/gpl.en.html GPL v3 (english version)
* @license http://www.gnu.de/documents/gpl.de.html GPL v3 (deutsche Version)
* @link http://www.conlite.org ConLite.org
*/
/*
* HTML_Common2: port of HTML_Common package to PHP5
*
* PHP version 5
*
* LICENSE:
*
* Copyright (c) 2004-2012, Alexey Borzov <avb@php.net>
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * The names of the authors may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @category HTML
* @package HTML_Common2
* @author Alexey Borzov <avb@php.net>
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version SVN: $Id$
* @link http://pear.php.net/package/HTML_Common2
*/
/*
* Base class for HTML classes
*
* Implements methods for working with HTML attributes, parsing and generating
* attribute strings. Port of HTML_Common class for PHP4 originally written by
* Adam Daniel with contributions from numerous other developers.
*
* @category HTML
* @package HTML_Common2
* @author Alexey Borzov <avb@php.net>
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version Release: 2.1.0
* @link http://pear.php.net/package/HTML_Common2
*/
abstract class cHTML5Common implements ArrayAccess
{
/**
* Associative array of attributes
* @var array
*/
protected $attributes = array();
/**
* Changes to attributes in this list will be announced via onAttributeChange()
* method rather than performed by HTML_Common2 class itself
* @var array
* @see onAttributeChange()
*/
protected $watchedAttributes = array();
/**
* Indentation level of the element
* @var int
*/
private $_indentLevel = 0;
/**
* Comment associated with the element
* @var string
*/
private $_comment = null;
/**
* Global options for all elements generated by subclasses of HTML_Common2
*
* Preset options are
* - 'charset': charset parameter used in htmlspecialchars() calls,
* defaults to 'ISO-8859-1'
* - 'indent': string used to indent HTML elements, defaults to "\11"
* - 'linebreak': string used to indicate linebreak, defaults to "\12"
*
* @var array
*/
private static $_options = array(
'charset' => 'ISO-8859-1',
'indent' => "\11",
'linebreak' => "\12"
);
/**
* Sets global option(s)
*
* @param string|array $nameOrOptions Option name or array ('option name' => 'option value')
* @param mixed $value Option value, if first argument is not an array
*/
public static function setOption($nameOrOptions, $value = null)
{
if (is_array($nameOrOptions)) {
foreach ($nameOrOptions as $k => $v) {
self::setOption($k, $v);
}
} else {
$linebreaks = array('win' => "\15\12", 'unix' => "\12", 'mac' => "\15");
if ('linebreak' == $nameOrOptions && isset($linebreaks[$value])) {
$value = $linebreaks[$value];
}
self::$_options[$nameOrOptions] = $value;
}
}
/**
* Returns global option(s)
*
* @param string $name Option name
*
* @return mixed Option value, null if option does not exist,
* array of all options if $name is not given
*/
public static function getOption($name = null)
{
if (null === $name) {
return self::$_options;
} else {
return isset(self::$_options[$name])? self::$_options[$name]: null;
}
}
/**
* Parses the HTML attributes given as string
*
* @param string $attrString HTML attribute string
*
* @return array An associative array of attributes
*/
protected static function parseAttributes($attrString)
{
$attributes = array();
if (preg_match_all(
"/(([A-Za-z_:]|[^\\x00-\\x7F])([A-Za-z0-9_:.-]|[^\\x00-\\x7F])*)" .
"([ \\n\\t\\r]+)?(=([ \\n\\t\\r]+)?(\"[^\"]*\"|'[^']*'|[^ \\n\\t\\r]*))?/",
$attrString,
$regs
)) {
for ($i = 0; $i < count($regs[1]); $i++) {
$name = trim($regs[1][$i]);
$check = trim($regs[0][$i]);
$value = trim($regs[7][$i]);
if ($name == $check) {
$attributes[strtolower($name)] = strtolower($name);
} else {
if (!empty($value) && ($value[0] == '\'' || $value[0] == '"')) {
$value = substr($value, 1, -1);
}
$attributes[strtolower($name)] = $value;
}
}
}
return $attributes;
}
/**
* Creates a valid attribute array from either a string or an array
*
* @param string|array $attributes Array of attributes or HTML attribute string
*
* @return array An associative array of attributes
*/
protected static function prepareAttributes($attributes)
{
$prepared = array();
if (is_string($attributes)) {
return self::parseAttributes($attributes);
} elseif (is_array($attributes)) {
foreach ($attributes as $key => $value) {
if (is_int($key)) {
$key = strtolower($value);
$prepared[$key] = $key;
} else {
$prepared[strtolower($key)] = (string)$value;
}
}
}
return $prepared;
}
/**
* Removes an attribute from an attribute array
*
* @param array &$attributes Attribute array
* @param string $name Name of attribute to remove
*/
protected static function removeAttributeArray(array &$attributes, $name)
{
unset($attributes[strtolower($name)]);
}
/**
* Creates HTML attribute string from array
*
* @param array $attributes Attribute array
*
* @return string Attribute string
*/
protected static function getAttributesString(array $attributes)
{
$str = '';
$charset = self::getOption('charset');
foreach ($attributes as $key => $value) {
$str .= ' ' . $key . '="' . htmlspecialchars($value, ENT_QUOTES, $charset) . '"';
}
return $str;
}
/**
* Class constructor, sets default attributes
*
* @param array|string $attributes Array of attribute 'name' => 'value' pairs
* or HTML attribute string
*/
public function __construct($attributes = null)
{
$this->mergeAttributes($attributes);
}
/**
* Sets the value of the attribute
*
* @param string $name Attribute name
* @param string $value Attribute value (will be set to $name if omitted)
*
* @return HTML_Common2
*/
public function setAttribute($name, $value = null)
{
$name = strtolower($name);
if (is_null($value)) {
$value = $name;
}
if (in_array($name, $this->watchedAttributes)) {
$this->onAttributeChange($name, $value);
} else {
$this->attributes[$name] = (string)$value;
}
return $this;
}
/**
* Returns the value of an attribute
*
* @param string $name Attribute name
*
* @return string|null Attribute value, null if attribute does not exist
*/
public function getAttribute($name)
{
$name = strtolower($name);
return isset($this->attributes[$name])? $this->attributes[$name]: '';
}
/**
* Sets the attributes
*
* @param string|array $attributes Array of attribute 'name' => 'value' pairs
* or HTML attribute string
*
* @return HTML_Common2
*/
public function setAttributes($attributes)
{
$attributes = self::prepareAttributes($attributes);
$watched = array();
foreach ($this->watchedAttributes as $watchedKey) {
if (isset($attributes[$watchedKey])) {
$this->setAttribute($watchedKey, $attributes[$watchedKey]);
unset($attributes[$watchedKey]);
} else {
$this->removeAttribute($watchedKey);
}
if (isset($this->attributes[$watchedKey])) {
$watched[$watchedKey] = $this->attributes[$watchedKey];
}
}
$this->attributes = array_merge($watched, $attributes);
return $this;
}
/**
* Returns the attribute array or string
*
* @param bool $asString Whether to return attributes as string
*
* @return array|string
*/
public function getAttributes($asString = false)
{
if ($asString) {
return self::getAttributesString($this->attributes);
} else {
return $this->attributes;
}
}
/**
* Merges the existing attributes with the new ones
*
* @param array|string $attributes Array of attribute 'name' => 'value' pairs
* or HTML attribute string
*
* @return HTML_Common2
*/
public function mergeAttributes($attributes)
{
$attributes = self::prepareAttributes($attributes);
foreach ($this->watchedAttributes as $watchedKey) {
if (isset($attributes[$watchedKey])) {
$this->onAttributeChange($watchedKey, $attributes[$watchedKey]);
unset($attributes[$watchedKey]);
}
}
$this->attributes = array_merge($this->attributes, $attributes);
return $this;
}
/**
* Removes an attribute
*
* @param string $attribute Name of attribute to remove
*
* @return HTML_Common2
*/
public function removeAttribute($attribute)
{
if (in_array(strtolower($attribute), $this->watchedAttributes)) {
$this->onAttributeChange(strtolower($attribute), null);
} else {
self::removeAttributeArray($this->attributes, $attribute);
}
return $this;
}
/**
* Sets the indentation level
*
* @param int $level Indentation level
*
* @return HTML_Common2
*/
public function setIndentLevel($level)
{
$level = intval($level);
if (0 <= $level) {
$this->_indentLevel = $level;
}
return $this;
}
/**
* Gets the indentation level
*
* @return int
*/
public function getIndentLevel()
{
return $this->_indentLevel;
}
/**
* Returns the string to indent the element
*
* @return string
*/
protected function getIndent()
{
return str_repeat(self::getOption('indent'), $this->getIndentLevel());
}
/**
* Sets the comment for the element
*
* @param string $comment String to output as HTML comment
*
* @return HTML_Common2
*/
public function setComment($comment)
{
$this->_comment = $comment;
return $this;
}
/**
* Returns the comment associated with the element
*
* @return string
*/
public function getComment()
{
return $this->_comment;
}
/**
* Checks whether the element has given CSS class
*
* @param string $class CSS Class name
*
* @return bool
*/
public function hasClass($class)
{
$regex = '/(^|\s)' . preg_quote($class, '/') . '(\s|$)/';
return (bool)preg_match($regex, $this->getAttribute('class'));
}
/**
* Adds the given CSS class(es) to the element
*
* @param string|array $class Class name, multiple class names separated by
* whitespace, array of class names
*
* @return HTML_Common2
*/
public function addClass($class)
{
if (!is_array($class)) {
$class = preg_split('/\s+/', $class, null, PREG_SPLIT_NO_EMPTY);
}
$curClass = preg_split(
'/\s+/', $this->getAttribute('class'), null, PREG_SPLIT_NO_EMPTY
);
foreach ($class as $c) {
if (!in_array($c, $curClass)) {
$curClass[] = $c;
}
}
$this->setAttribute('class', implode(' ', $curClass));
return $this;
}
/**
* Removes the given CSS class(es) from the element
*
* @param string|array $class Class name, multiple class names separated by
* whitespace, array of class names
*
* @return HTML_Common2
*/
public function removeClass($class)
{
if (!is_array($class)) {
$class = preg_split('/\s+/', $class, null, PREG_SPLIT_NO_EMPTY);
}
$curClass = array_diff(
preg_split(
'/\s+/', $this->getAttribute('class'), null, PREG_SPLIT_NO_EMPTY
),
$class
);
if (0 == count($curClass)) {
$this->removeAttribute('class');
} else {
$this->setAttribute('class', implode(' ', $curClass));
}
return $this;
}
/**
* Returns the HTML representation of the element
*
* This magic method allows using the instances of HTML_Common2 in string
* contexts
*
* @return string
*/
abstract public function __toString();
/**
* Called if trying to change an attribute with name in $watchedAttributes
*
* This method is called for each attribute whose name is in the
* $watchedAttributes array and which is being changed by setAttribute(),
* setAttributes() or mergeAttributes() or removed via removeAttribute().
* Note that the operation for the attribute is not carried on after calling
* this method, it is the responsibility of this method to change or remove
* (or not) the attribute.
*
* @param string $name Attribute name
* @param string $value Attribute value, null if attribute is being removed
*/
protected function onAttributeChange($name, $value = null)
{
}
/**
* Whether or not an offset (HTML attribute) exists
*
* @param string $offset An offset to check for.
*
* @return boolean Returns true on success or false on failure.
* @link http://php.net/manual/en/arrayaccess.offsetexists.php
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->attributes[strtolower($offset)]);
}
/**
* Returns the value at specified offset (i.e. attribute name)
*
* @param string $offset The offset to retrieve.
*
* @return string|null
* @link http://php.net/manual/en/arrayaccess.offsetget.php
* @see getAttribute()
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->getAttribute($offset);
}
/**
* Assigns a value to the specified offset (i.e. attribute name)
*
* @param string $offset The offset to assign the value to
* @param string $value The value to set
*
* @return void
* @link http://php.net/manual/en/arrayaccess.offsetset.php
* @see setAttribute()
*/
#[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
if (null !== $offset) {
$this->setAttribute($offset, $value);
} else {
// handles $foo[] = 'disabled';
$this->setAttribute($value);
}
}
/**
* Unsets an offset (i.e. removes an attribute)
*
* @param string $offset The offset to unset
*
* @return void
* @link http://php.net/manual/en/arrayaccess.offsetunset.php
* @see removeAttribute
*/
#[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
$this->removeAttribute($offset);
}
}

Datei anzeigen

@ -283,7 +283,7 @@ class Article extends Item
*/ */
public function getContent($type, $id = NULL) public function getContent($type, $id = NULL)
{ {
if ($type == '') { if (empty($type)) {
return 'Class ' . get_class($this) . ': content-type must be specified!'; return 'Class ' . get_class($this) . ': content-type must be specified!';
} }
@ -295,7 +295,7 @@ class Article extends Item
if (is_null($id)) { if (is_null($id)) {
// return Array // return Array
return $this->content[$type]; return (empty($this->content[$type]))?'':$this->content[$type];
} }
// return String // return String

Datei anzeigen

@ -238,7 +238,7 @@ class cAutoload {
* @return (string|null) Path and filename or null * @return (string|null) Path and filename or null
*/ */
private static function _getContenidoClassFile($className) { private static function _getContenidoClassFile($className) {
$file = isset(self::$_includeFiles[$className]) ? self::$_conRootPath . self::$_includeFiles[$className] : null; $file = isset(self::$_includeFiles[$className]) ? self::$_conRootPath . self::$_includeFiles[$className] : '';
return self::_validateClassAndFile($className, $file); return self::_validateClassAndFile($className, $file);
} }
@ -247,7 +247,7 @@ class cAutoload {
* *
* @param string $className * @param string $className
* @param string $filePathName * @param string $filePathName
* @return (string|null) The file if validation was successfull, otherwhise null * @return (string) The file if validation was successfull, otherwhise empty
*/ */
private static function _validateClassAndFile($className, $filePathName) { private static function _validateClassAndFile($className, $filePathName) {
if (class_exists($className)) { if (class_exists($className)) {
@ -256,14 +256,14 @@ class cAutoload {
'file' => str_replace(self::$_conRootPath, '', $filePathName), 'file' => str_replace(self::$_conRootPath, '', $filePathName),
'error' => self::ERROR_CLASS_EXISTS 'error' => self::ERROR_CLASS_EXISTS
); );
return null; return '';
} elseif (!is_file($filePathName)) { } elseif (!is_file($filePathName)) {
self::$_errors[] = array( self::$_errors[] = array(
'class' => $className, 'class' => $className,
'file' => str_replace(self::$_conRootPath, '', $filePathName), 'file' => str_replace(self::$_conRootPath, '', $filePathName),
'error' => self::ERROR_FILE_NOT_FOUND 'error' => self::ERROR_FILE_NOT_FOUND
); );
return null; return '';
} }
return $filePathName; return $filePathName;

Datei anzeigen

@ -1712,8 +1712,13 @@ abstract class Item extends cItemBaseAbstract {
* @return mixed Filtered data * @return mixed Filtered data
*/ */
public function _inFilter($mData) { public function _inFilter($mData) {
if (is_numeric($mData) || is_array($mData)) if (is_numeric($mData) || is_array($mData)) {
return $mData; return $mData;
}
if(is_null($mData)) {
$mData = '';
}
foreach ($this->_arrInFilters as $_function) { foreach ($this->_arrInFilters as $_function) {
if (function_exists($_function)) { if (function_exists($_function)) {

Datei anzeigen

@ -672,7 +672,7 @@ class cHTMLSelectElement extends cHTMLFormElement {
*/ */
function setDefault($lvalue) { function setDefault($lvalue) {
$bSet = false; $bSet = false;
$lvalue = cString::nullToString($lvalue);
if (is_array($this->_options)) { if (is_array($this->_options)) {
foreach ($this->_options as $key => $value) { foreach ($this->_options as $key => $value) {
if (strcmp($value->getAttribute("value"), $lvalue) == 0) { if (strcmp($value->getAttribute("value"), $lvalue) == 0) {

Datei anzeigen

@ -715,4 +715,19 @@ class cString extends cStringMultiByteWrapper {
return $string; return $string;
} }
/**
* Convert null string to empty string
*
* @param string $string
* @return string
*/
public static function nullToString($string) {
//var_dump($string);
if(empty($string) || is_null($string)) {
$string = '';
}
//var_dump($string);
return $string;
}
} }

Datei anzeigen

@ -174,10 +174,10 @@ class UI_Menu {
foreach ($this->link as $key => $value) { foreach ($this->link as $key => $value) {
if ($value != NULL) { if ($value != NULL) {
if ($this->imagewidth[$key] != 0) { if (!empty($this->imagewidth[$key]) && !empty ($this->image[$key])) {
$value->setContent('<img border="0" src="' . $this->image[$key] . '" width="' . $this->imagewidth[$key] . '">'); $value->setContent('<img border="0" src="' . $this->image[$key] . '" width="' . $this->imagewidth[$key] . '">');
$img = $value->render(); $img = $value->render();
} else { } else if(!empty ($this->image[$key])) {
$value->setContent('<img border="0" src="' . $this->image[$key] . '">'); $value->setContent('<img border="0" src="' . $this->image[$key] . '">');
$img = $value->render(); $img = $value->render();
} }
@ -186,14 +186,12 @@ class UI_Menu {
} else { } else {
$link = $this->title[$key]; $link = $this->title[$key];
if ($this->image[$key] != "") { if (!empty($this->image[$key])) {
if ($this->imagewidth[$key] != 0) { if ($this->imagewidth[$key] != 0) {
$img = '<img border="0" src="' . $this->image[$key] . '" width="' . $this->imagewidth[$key] . '">'; $img = '<img border="0" src="' . $this->image[$key] . '" width="' . $this->imagewidth[$key] . '">';
} else { } else {
$img = '<img border="0" src="' . $this->image[$key] . '">'; $img = '<img border="0" src="' . $this->image[$key] . '">';
} }
} else {
$img = "&nbsp;";
} }
} }
@ -212,21 +210,24 @@ class UI_Menu {
$bgColor = $cfg["color"]["table_light_active"]; $bgColor = $cfg["color"]["table_light_active"];
} }
if ($this->extra[$key] == 'id="marked" ') { if (!empty($this->extra[$key]) && $this->extra[$key] == 'id="marked" ') {
$bgColor = $cfg["color"]["table_light_active"]; $bgColor = $cfg["color"]["table_light_active"];
} }
} }
$tpl->set('d', 'NAME', $link); $tpl->set('d', 'NAME', $link);
if ($this->image[$key] == "") { if (empty($this->image[$key])) {
$tpl->set('d', 'ICON', ''); $tpl->set('d', 'ICON', '');
} else { } else {
$tpl->set('d', 'ICON', $img); $tpl->set('d', 'ICON', $img);
} }
if ($this->extra[$key] != "" || $this->rowmark == true) { if (!empty($this->extra[$key]) || $this->rowmark == true) {
$extraadd = ""; $extraadd = "";
if(empty($this->extra[$key])) {
$this->extra[$key] = '';
}
if ($this->rowmark == true) { if ($this->rowmark == true) {
$extraadd = 'onmouseover="row.over(this)" onmouseout="row.out(this)" onclick="row.click(this)"'; $extraadd = 'onmouseover="row.over(this)" onmouseout="row.out(this)" onclick="row.click(this)"';
@ -439,7 +440,7 @@ class UI_Table_Form {
if (is_array($this->items)) { if (is_array($this->items)) {
foreach ($this->items as $key => $value) { foreach ($this->items as $key => $value) {
if ($this->itemType[$key] == 'subheader') { if (isset($this->itemType[$key]) && $this->itemType[$key] == 'subheader') {
$subheader = '<tr class="text_medium" style="background-color: ' . $cfg["color"]["table_header"] . ';">'; $subheader = '<tr class="text_medium" style="background-color: ' . $cfg["color"]["table_header"] . ';">';
$subheader .= '<td colspan="2" valign="top" style="border: 0px;border-top: 0px; border-bottom:0px; border-right:1px;border-color: ' . $cfg["color"]["table_border"] . '; border-style: solid;">' . $this->captions[$key] . '</td></tr>'; $subheader .= '<td colspan="2" valign="top" style="border: 0px;border-top: 0px; border-bottom:0px; border-right:1px;border-color: ' . $cfg["color"]["table_border"] . '; border-style: solid;">' . $this->captions[$key] . '</td></tr>';
@ -703,6 +704,7 @@ class UI_Page {
class Link { class Link {
var $alt = '';
var $link; var $link;
var $title; var $title;
var $targetarea; var $targetarea;
@ -770,7 +772,8 @@ class Link {
function render() { function render() {
global $sess, $cfg; global $sess, $cfg;
$custom = '';
$attributes = '';
if ($this->alt != "") { if ($this->alt != "") {
$alt = 'alt="' . $this->alt . '" title="' . $this->alt . '" '; $alt = 'alt="' . $this->alt . '" title="' . $this->alt . '" ';
} else { } else {
@ -819,7 +822,7 @@ class Link {
break; break;
} }
if ($this->images == '') { if (empty($this->images)) {
return ($link . $this->content . "</a>"); return ($link . $this->content . "</a>");
} else { } else {
list($this->img_width, $this->img_height, $this->img_type, $this->img_attr) = getimagesize($cfg['path']['contenido'] . $this->images); list($this->img_width, $this->img_height, $this->img_type, $this->img_attr) = getimagesize($cfg['path']['contenido'] . $this->images);
@ -910,6 +913,7 @@ class UI_List {
$colcount = 0; $colcount = 0;
if (is_array($this->cells)) { if (is_array($this->cells)) {
$dark = true;
foreach ($this->cells as $row => $cells) { foreach ($this->cells as $row => $cells) {
$thefont = ''; $thefont = '';
$unne = ''; $unne = '';
@ -928,7 +932,7 @@ class UI_List {
$bgColor = $cfg["color"]["table_light"]; $bgColor = $cfg["color"]["table_light"];
} }
if ($this->bgcolor[$row] != "") { if (!empty($this->bgcolor[$row])) {
$bgColor = $this->bgcolor[$row]; $bgColor = $this->bgcolor[$row];
} }
@ -936,7 +940,7 @@ class UI_List {
$count = 0; $count = 0;
foreach ($cells as $key => $value) { foreach ($cells as $key => $value) {
$thefontDispl = $thefont . $this->extra[$row][$key]; $thefontDispl = $thefont . (empty($this->extra[$row][$key]))?'':$this->extra[$row][$key];
$count++; $count++;
$tpl2->reset(); $tpl2->reset();
@ -966,7 +970,7 @@ class UI_List {
$tpl2->set('s', 'ALIGN', 'left'); $tpl2->set('s', 'ALIGN', 'left');
} }
if ($this->cellvalignment[$row][$key] != "") { if (!empty($this->cellvalignment[$row][$key])) {
$tpl2->set('s', 'VALIGN', $this->cellvalignment[$row][$key]); $tpl2->set('s', 'VALIGN', $this->cellvalignment[$row][$key]);
} else { } else {
$tpl2->set('s', 'VALIGN', 'top'); $tpl2->set('s', 'VALIGN', 'top');
@ -1027,10 +1031,10 @@ class cScrollList {
var $listStart; var $listStart;
/** /**
* sortable flag * sortable array
* @var string * @var array
*/ */
var $sortable; protected $_aSortable;
/** /**
* sortlink * sortlink
@ -1080,7 +1084,7 @@ class cScrollList {
$this->resultsPerPage = 0; $this->resultsPerPage = 0;
$this->listStart = 1; $this->listStart = 1;
$this->sortable = false; $this->_aSortable = [];
$this->objTable = new cHTMLTable(); $this->objTable = new cHTMLTable();
if ($defaultstyle == true) { if ($defaultstyle == true) {
@ -1126,7 +1130,7 @@ class cScrollList {
* @param $sortable boolean true or false * @param $sortable boolean true or false
*/ */
function setSortable($key, $sortable) { function setSortable($key, $sortable) {
$this->sortable[$key] = $sortable; $this->_aSortable[$key] = $sortable;
} }
/** /**
@ -1298,8 +1302,7 @@ class cScrollList {
$this->sortkey = $field; $this->sortkey = $field;
$this->sortmode = $order; $this->sortmode = $order;
$field = intval($field) + 1;
$field = $field + 1;
$this->data = array_csort($this->data, "$field", $order); $this->data = array_csort($this->data, "$field", $order);
} }
@ -1330,8 +1333,8 @@ class cScrollList {
/* Render header */ /* Render header */
foreach ($this->header as $key => $value) { foreach ($this->header as $key => $value) {
if (is_array($this->sortable)) { if (is_array($this->_aSortable)) {
if (array_key_exists($key, $this->sortable) && $this->sortable[$key] == true) { if (array_key_exists($key, $this->_aSortable) && $this->_aSortable[$key] == true) {
$this->sortlink->setContent($value); $this->sortlink->setContent($value);
$this->sortlink->setCustom("sortby", $key); $this->sortlink->setCustom("sortby", $key);

Datei anzeigen

@ -377,6 +377,10 @@ class User {
*/ */
function getUserProperty($type, $name, $group = false) { function getUserProperty($type, $name, $group = false) {
global $cfg, $perm; global $cfg, $perm;
if(empty($this->values)) {
return false;
}
if (!is_object($perm)) { if (!is_object($perm)) {
$perm = new Contenido_Perm(); $perm = new Contenido_Perm();

Datei anzeigen

@ -58,7 +58,7 @@ class cRegistry {
public static function getFrontendPath() { public static function getFrontendPath() {
$cfgClient = self::getClientConfig(); $cfgClient = self::getClientConfig();
$client = self::getClientId(); $client = self::getClientId();
return $cfgClient[$client]['path']['frontend']; return (empty($cfgClient))?'':$cfgClient[$client]['path']['frontend'];
} }
/** /**

Datei anzeigen

@ -69,7 +69,7 @@ class cApiLayout extends Item {
* @param mixed $mId Specifies the ID of item to load * @param mixed $mId Specifies the ID of item to load
*/ */
public function __construct($mId = false) { public function __construct($mId = false) {
global $cfg; $cfg = cRegistry::getConfig();
parent::__construct($cfg["tab"]["lay"], "idlay"); parent::__construct($cfg["tab"]["lay"], "idlay");
$this->setFilters(array(), array()); $this->setFilters(array(), array());
@ -78,7 +78,7 @@ class cApiLayout extends Item {
$this->_setLayPath(); $this->_setLayPath();
} }
$oClient = new cApiClient($client); $oClient = new cApiClient(cRegistry::getClientId());
$aClientProp = $oClient->getPropertiesByType('layfileedit'); $aClientProp = $oClient->getPropertiesByType('layfileedit');
if(count($aClientProp) > 0) { if(count($aClientProp) > 0) {
$this->_aLayFileEditConf = array_merge($this->_aLayFileEditConf, $aClientProp); $this->_aLayFileEditConf = array_merge($this->_aLayFileEditConf, $aClientProp);

Datei anzeigen

@ -912,7 +912,7 @@ class cApiModule extends Item {
} }
private function _displayNoteFromFile($bIsOldPath = FALSE) { private function _displayNoteFromFile($bIsOldPath = FALSE) {
if ($this->_bNoted === true) { if (isset($this->_bNoted) && $this->_bNoted === true) {
return; return;
} }
global $frame, $area; global $frame, $area;
@ -1052,6 +1052,8 @@ class cApiModule extends Item {
class cApiModuleTranslationCollection extends ItemCollection { class cApiModuleTranslationCollection extends ItemCollection {
protected $_error; protected $_error;
protected $f_obj;
/** /**
* Constructor Function * Constructor Function

Datei-Diff unterdrückt, da er zu groß ist Diff laden

Datei anzeigen

@ -0,0 +1,2 @@
/local
/localhost

Datei anzeigen

@ -0,0 +1 @@

Datei anzeigen

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

Datei anzeigen

@ -8,9 +8,11 @@
* *
* Requirements: * Requirements:
* @con_php_req 5 * @con_php_req 5
* @con_template <Templatefiles>
* @con_notice <Notice>
*
* *
* @package ContenidoBackendArea * @package ContenidoBackendArea
* @version <version>
* @author unknown * @author unknown
* @copyright four for business AG <www.4fb.de> * @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt * @license http://www.contenido.org/license/LIZENZ.txt
@ -20,15 +22,17 @@
* *
* *
* {@internal * {@internal
* created unknown * created unknown
* modified 2008-06-16, H. Librenz - Hotfix: checking for potential unsecure calling * modified 2008-06-16, H. Librenz - Hotfix: checking for potential unsecure calling
* modified 2008-07-04, bilal arslan, added security fix * 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$: * $Id$:
* }} * }}
* *
*/ */
if (!defined("CON_FRAMEWORK")) {
if (!defined("CON_FRAMEWORK")) {
define("CON_FRAMEWORK", true); define("CON_FRAMEWORK", true);
} }
@ -36,12 +40,8 @@ $contenido_path = '';
# include the config file of the frontend to init the Client and Language Id # include the config file of the frontend to init the Client and Language Id
include_once ("config.php"); include_once ("config.php");
// include security class and check request variables // Contenido startup process
include_once ($contenido_path . 'classes/class.security.php'); include_once ($contenido_path . 'includes/startup.php');
Contenido_Security::checkRequests();
include_once ($contenido_path . "includes/startup.php");
cInclude("includes", "functions.general.php");
if ($contenido) if ($contenido)
{ {

19
conlite/external/frontend/environment.php vendored Normale Datei
Datei anzeigen

@ -0,0 +1,19 @@
<?php
// Load environment config file
$configEnv = str_replace('\\', '/', realpath(dirname(__FILE__) . '/')) . '/data/config/config.environment.php';
if (file_exists($configEnv)) {
include_once($configEnv);
}
if (!defined('CL_ENVIRONMENT')) {
if (getenv('CONLITE_ENVIRONMENT')) {
define('CL_ENVIRONMENT', getenv('CONLITE_ENVIRONMENT'));
} if (getenv('CONTENIDO_ENVIRONMENT')) {
define('CL_ENVIRONMENT', getenv('CONTENIDO_ENVIRONMENT'));
} else {
define('CL_ENVIRONMENT', 'production');
}
}
//echo CL_ENVIRONMENT;

BIN
conlite/external/frontend/favicon.ico vendored Normale Datei

Binäre Datei nicht angezeigt.

Nachher

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

Datei-Diff unterdrückt, da er zu groß ist Diff laden

Datei anzeigen

@ -1,40 +1,25 @@
<?php <?php
/** /**
* Project: * file: front_crcloginform.inc.php
* Contenido Content Management System
* *
* Description: * @package ConLite
* <Description> * @subpackage Frontend
* * @version $Rev$
* Requirements: * @author Ortwin Pinke
* @con_php_req 5 * @copyright conrepo.org
* @con_template <Templatefiles> * @link http://conlite.conrepo.org
* @con_notice <Notice>
*
*
* @package ContenidoBackendArea
* @version <version>
* @author Jan Lengowski * @author Jan Lengowski
* @copyright four for business AG <www.4fb.de> * @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt * @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de * @link http://www.4fb.de
* @link http://www.contenido.org * @link http://www.contenido.org
*
*
*
* {@internal
* created 2003-01-21
* modified 2005-09-29, Andreas Lindner
* modified 2008-07-04, bilal arslan, added security fix
* modified 2008-11-18, Murat Purc, add usage of Contenido_Url to create urls to frontend pages and redesign of HTML markup
* modified 2009-01-03, Murat Purc, synchronized with cms/front_crcloginform.inc.php
* modified 2011-02-07, Dominik Ziegler, fixed check of but_ok.gif and changed input type button to submit
* *
* $Id$: * $Id$:
* }}
*
*/ */
/**
* security check
*/
if(!defined('CON_FRAMEWORK')) { if(!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
@ -108,18 +93,17 @@ if ( file_exists($cfgClient[$client]['path']['frontend'] . 'images/but_ok.gif')
} }
?> ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <!DOCTYPE html>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $encoding[$lang] ?>" /> <meta charset="<?php echo $encoding[$lang] ?>" />
<title>:: :: :: :: Contenido Login</title> <title>:: :: :: :: Contenido Login</title>
<script type="text/javascript"><!-- <script type="text/javascript">
if (top != self) { if (top != self) {
top.location.href = self.location.href; top.location.href = self.location.href;
} }
// --></script> </script>
<style type="text/css"><!-- <style type="text/css">
* {margin:0; padding:0;} * {margin:0; padding:0;}
html, body {height: 100%;} html, body {height: 100%;}
body {background-color:#fff; font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 11px; color:#000;} body {background-color:#fff; font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 11px; color:#000;}
@ -134,7 +118,7 @@ if ( file_exists($cfgClient[$client]['path']['frontend'] . 'images/but_ok.gif')
#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 .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 .formRow {padding:0 10px; height:31px;}
#login .clear {clear:both;} #login .clear {clear:both;}
// --></style> </style>
</head> </head>
<body> <body>
@ -156,13 +140,14 @@ if ( file_exists($cfgClient[$client]['path']['frontend'] . 'images/but_ok.gif')
</form> </form>
</div> </div>
<script type="text/javascript"><!-- <script type="text/javascript">
if (document.login.username.value == '') { <!--
document.login.username.focus(); if (document.login.username.value == '') {
} else { document.login.username.focus();
document.login.password.focus(); } else {
} document.login.password.focus();
// --></script> }
// -->
</script>
</body> </body>
</html> </html>

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$
*/
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$
*/
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

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -26,548 +27,504 @@
* *
* $Id$: * $Id$:
*/ */
if (!defined('CON_FRAMEWORK')) {
if(!defined('CON_FRAMEWORK')) { die('Illegal call');
die('Illegal call');
} }
// Select box with additional functions for category and article selection // Select box with additional functions for category and article selection
class cHTMLInputSelectElement extends cHTMLSelectElement 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);
}
/**
* 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 __construct($sName, $iWidth = "", $sID = "", $bDisabled = false, $iTabIndex = null, $sAccessKey = "") {
cHTMLSelectElement :: __construct($sName, $iWidth, $sID, $bDisabled, $iTabIndex, $sAccessKey);
}
/** /**
* Function addArticles. Adds articles to select box values. * Function addArticles. Adds articles to select box values.
* *
* @param int $iIDCat idcat of the category to be listed * @param int $iIDCat idcat of the category to be listed
* @param bool $bColored Add color information to option elements * @param bool $bColored Add color information to option elements
* @param bool $bArtOnline If true, only online articles will be added * @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) * @param string $sSpaces Just some "&nbsp;" to show data hierarchically (used in conjunction with addCategories)
* *
* @return int Number of items added * @return int Number of items added
**/ * */
function addArticles ($iIDCat, $bColored = false, $bArtOnline = true, $sSpaces = "") function addArticles($iIDCat, $bColored = false, $bArtOnline = true, $sSpaces = "") {
{ global $cfg, $lang;
global $cfg, $lang;
$oDB = new DB_ConLite; $oDB = new DB_Contenido;
if (is_numeric($iIDCat) && $iIDCat > 0) if (is_numeric($iIDCat) && $iIDCat > 0) {
{ $sSQL = "SELECT tblArtLang.title AS title, tblArtLang.idartlang AS idartlang, tblCatArt.idcat AS idcat, ";
$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 .= "tblCatArt.idcatart AS idcatart, tblCatArt.is_start AS isstart, tblArtLang.online AS online, "; $sSQL .= "tblCatLang.startidartlang as idstartartlang ";
$sSQL .= "tblCatLang.startidartlang as idstartartlang "; $sSQL .= "FROM " . $cfg["tab"]["art_lang"] . " AS tblArtLang, " . $cfg["tab"]["cat_art"] . " AS tblCatArt, ";
$sSQL .= "FROM ".$cfg["tab"]["art_lang"]." AS tblArtLang, ".$cfg["tab"]["cat_art"]." AS tblCatArt, "; $sSQL .= $cfg["tab"]["cat_lang"] . " AS tblCatLang ";
$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 ";
$sSQL .= "WHERE tblCatArt.idcat = '".Contenido_Security::toInteger($iIDCat)."' AND tblCatLang.idcat = tblCatArt.idcat AND tblCatLang.idlang = tblArtLang.idlang AND ";
if ($bArtOnline) { if ($bArtOnline) {
$sSQL .= "tblArtLang.online = '1' AND "; $sSQL .= "tblArtLang.online = '1' AND ";
} }
$sSQL .= "tblArtLang.idart = tblCatArt.idart AND tblArtLang.idlang = '".Contenido_Security::escapeDB($lang, $oDB)."' "; $sSQL .= "tblArtLang.idart = tblCatArt.idart AND tblArtLang.idlang = '" . Contenido_Security::escapeDB($lang, $oDB) . "' ";
if ($cfg["is_start_compatible"] == true) { if ($cfg["is_start_compatible"] == true) {
$sSQL .= "ORDER BY tblCatArt.is_start DESC, tblArtLang.title"; // Getting start article as first article $sSQL .= "ORDER BY tblCatArt.is_start DESC, tblArtLang.title"; // Getting start article as first article
} else { } else {
$sSQL .= "ORDER BY tblArtLang.title"; $sSQL .= "ORDER BY tblArtLang.title";
} }
$oDB->query($sSQL); $oDB->query($sSQL);
$iCount = $oDB->num_rows(); $iCount = $oDB->num_rows();
if ($iCount == 0) { if ($iCount == 0) {
return 0; return 0;
} else { } else {
$iCounter = count($this->_options); $iCounter = count($this->_options);
while ($oDB->next_record()) while ($oDB->next_record()) {
{ // Generate new option element
// Generate new option element $oOption = new cHTMLOptionElement($sSpaces . "&nbsp;&nbsp;&nbsp;" . substr(urldecode($oDB->f("title")), 0, 32), $oDB->f("idcatart"));
$oOption = new cHTMLOptionElement($sSpaces."&nbsp;&nbsp;&nbsp;".substr(urldecode($oDB->f("title")), 0, 32), $oDB->f("idcatart"));
if ($bColored) if ($bColored) {
{ $bIsStartArticle = false;
$bIsStartArticle = false; if ($cfg["is_start_compatible"] == true && $oDB->f("isstart") == 1) {
if ($cfg["is_start_compatible"] == true && $oDB->f("isstart") == 1) { // Compatible mode and "start article" flag is set
// Compatible mode and "start article" flag is set $bIsStartArticle = true;
$bIsStartArticle = true; } else if ($cfg["is_start_compatible"] != true && $oDB->f("idstartartlang") == $oDB->f("idartlang")) {
} 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)
// No compatible mode and current article is start article (idstartartlang is the same for all records within a category) $bIsStartArticle = true;
$bIsStartArticle = true; }
}
if ($bIsStartArticle) if ($bIsStartArticle) {
{ if ($oDB->f("online") == 0) {
if ($oDB->f("online") == 0) { // Start article, but offline -> red
// Start article, but offline -> red $oOption->setStyle("color: #ff0000;");
$oOption->setStyle("color: #ff0000;"); } else {
} else { // Start article -> blue
// Start article -> blue $oOption->setStyle("color: #0000ff;");
$oOption->setStyle("color: #0000ff;"); }
} } else if ($oDB->f("online") == 0) {
} else if ($oDB->f("online") == 0) { // Offline article -> grey
// Offline article -> grey $oOption->setStyle("color: #666666;");
$oOption->setStyle("color: #666666;"); }
} }
}
// Add option element to the list // Add option element to the list
$this->addOptionElement($iCounter, $oOption); $this->addOptionElement($iCounter, $oOption);
$iCounter++; $iCounter++;
} }
return $iCount; return $iCount;
} }
} else { } else {
return 0; return 0;
} }
} }
/** /**
* Function addCategories. Adds category elements (optionally including articles) to select box values. * 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! * 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... * 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 int $iMaxLevel Max. level shown (to be exact: except this level)
* @param bool $bColored Add color information to option elements * @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 $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 $bCatPublic If true, only add idcat as value, if cat is public
* @param bool $bWithArt Add also articles per category * @param bool $bWithArt Add also articles per category
* @param bool $bArtOnline If true, show only online articles * @param bool $bArtOnline If true, show only online articles
* *
* @return int Number of items added * @return int Number of items added
**/ * */
function addCategories ($iMaxLevel = 0, $bColored = false, $bCatVisible = true, $bCatPublic = true, function addCategories($iMaxLevel = 0, $bColored = false, $bCatVisible = true, $bCatPublic = true,
$bWithArt = false, $bArtOnline = true) $bWithArt = false, $bArtOnline = true) {
{ global $cfg, $client, $lang;
global $cfg, $client, $lang;
$oDB = new DB_ConLite; $oDB = new DB_Contenido;
$sSQL = "SELECT tblCat.idcat AS idcat, tblCatLang.name AS name, "; $sSQL = "SELECT tblCat.idcat AS idcat, tblCatLang.name AS name, ";
$sSQL .= "tblCatLang.visible AS visible, tblCatLang.public AS public, tblCatTree.level AS level "; $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 .= "FROM " . $cfg["tab"]["cat"] . " AS tblCat, " . $cfg["tab"]["cat_lang"] . " AS tblCatLang, ";
$sSQL .= $cfg["tab"]["cat_tree"]." AS tblCatTree "; $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 .= "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 "; $sSQL .= "tblCatLang.idcat = tblCat.idcat AND tblCatTree.idcat = tblCat.idcat ";
if ($iMaxLevel > 0) { if ($iMaxLevel > 0) {
$sSQL .= "AND tblCatTree.level < '".Contenido_Security::escapeDB($iMaxLevel, $oDB)."' "; $sSQL .= "AND tblCatTree.level < '" . Contenido_Security::escapeDB($iMaxLevel, $oDB) . "' ";
} }
$sSQL .= "ORDER BY tblCatTree.idtree"; $sSQL .= "ORDER BY tblCatTree.idtree";
$oDB->query($sSQL); $oDB->query($sSQL);
$iCount = $oDB->num_rows(); $iCount = $oDB->num_rows();
if ($iCount == 0) { if ($iCount == 0) {
return false; return false;
} else { } else {
$iCounter = count($this->_options); $iCounter = count($this->_options);
while ($oDB->next_record()) while ($oDB->next_record()) {
{ $sSpaces = "";
$sSpaces = ""; $sStyle = "";
$sStyle = ""; $iID = $oDB->f("idcat");
$iID = $oDB->f("idcat");
for ($i = 0; $i < $oDB->f("level"); $i++) { for ($i = 0; $i < $oDB->f("level"); $i++) {
$sSpaces .= "&nbsp;&nbsp;&nbsp;"; $sSpaces .= "&nbsp;&nbsp;&nbsp;";
} }
// Generate new option element // Generate new option element
if (($bCatVisible && $oDB->f("visible") == 0) || if (($bCatVisible && $oDB->f("visible") == 0) || ($bCatPublic && $oDB->f("public") == 0)) {
($bCatPublic && $oDB->f("public") == 0)) { // If category has to be visible or public and it isn't, don't add value
// If category has to be visible or public and it isn't, don't add value $sValue = "";
$sValue = ""; } else if ($bWithArt) {
} else if ($bWithArt) { // If article will be added, set negative idcat as value
// If article will be added, set negative idcat as value $sValue = "-" . $iID;
$sValue = "-".$iID; } else {
} else { // Show only categories - and everything is fine...
// Show only categories - and everything is fine... $sValue = $iID;
$sValue = $iID; }
} $oOption = new cHTMLOptionElement($sSpaces . ">&nbsp;" . urldecode($oDB->f("name")), $sValue);
$oOption = new cHTMLOptionElement($sSpaces.">&nbsp;".urldecode($oDB->f("name")), $sValue);
// Coloring option element, restricted shows grey color // Coloring option element, restricted shows grey color
$oOption->setStyle("background-color: #EFEFEF"); $oOption->setStyle("background-color: #EFEFEF");
if ($bColored && ($oDB->f("visible") == 0 || $oDB->f("public") == 0)) { if ($bColored && ($oDB->f("visible") == 0 || $oDB->f("public") == 0)) {
$oOption->setStyle("color: #666666;"); $oOption->setStyle("color: #666666;");
} }
// Add option element to the list // Add option element to the list
$this->addOptionElement($iCounter, $oOption); $this->addOptionElement($iCounter, $oOption);
if ($bWithArt) { if ($bWithArt) {
$iArticles = $this->addArticles($iID, $bColored, $bArtOnline, $sSpaces); $iArticles = $this->addArticles($iID, $bColored, $bArtOnline, $sSpaces);
$iCount += $iArticles; $iCount += $iArticles;
} }
$iCounter = count($this->_options); $iCounter = count($this->_options);
} }
} }
return $iCount; return $iCount;
} }
/** /**
* Function addTypesFromArt. Adds types and type ids which are available for the specified article * Function addTypesFromArt. Adds types and type ids which are available for the specified article
* *
* @param int $iIDCatArt Article id * @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') * @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 * @return int Number of items added
**/ * */
function addTypesFromArt ($iIDCatArt, $sTypeRange = "") function addTypesFromArt($iIDCatArt, $sTypeRange = "") {
{ global $cfg, $lang;
global $cfg, $lang;
$oDB = new DB_ConLite; $oDB = new DB_Contenido;
if (is_numeric($iIDCatArt) && $iIDCatArt > 0) 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 = "SELECT tblContent.typeid AS typeid, tblContent.idtype AS idtype, tblType.type AS type, tblType.description AS description, "; $sSQL .= "tblContent.value AS value ";
$sSQL .= "tblContent.value AS value "; $sSQL .= "FROM " . $cfg["tab"]["content"] . " AS tblContent, " . $cfg["tab"]["art_lang"] . " AS tblArtLang, ";
$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 .= $cfg["tab"]["cat_art"]." AS tblCatArt, ".$cfg["tab"]["type"]." AS tblType "; $sSQL .= "WHERE tblContent.idtype = tblType.idtype AND tblContent.idartlang = tblArtLang.idartlang AND ";
$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) . "' ";
$sSQL .= "tblArtLang.idart = tblCatArt.idart AND tblArtLang.idlang = '". Contenido_Security::escapeDB($lang, $oDB)."' AND tblCatArt.idcatart = '". Contenido_Security::toInteger($iIDCatArt)."' ";
if ($sTypeRange != "") { if ($sTypeRange != "") {
$sSQL .= "AND tblContent.idtype IN (". Contenido_Security::escapeDB($sTypeRange, $oDB).") "; $sSQL .= "AND tblContent.idtype IN (" . Contenido_Security::escapeDB($sTypeRange, $oDB) . ") ";
} }
$sql .= "ORDER BY tblContent.idtype, tblContent.typeid"; $sql .= "ORDER BY tblContent.idtype, tblContent.typeid";
$oDB->query($sSQL); $oDB->query($sSQL);
$iCount = $oDB->num_rows(); $iCount = $oDB->num_rows();
if ($iCount == 0) { if ($iCount == 0) {
return false; return false;
} else { } else {
while ($oDB->next_record()) while ($oDB->next_record()) {
{ $sTypeIdentifier = "tblData.idtype = '" . $oDB->f('idtype') . "' AND tblData.typeid = '" . $oDB->f('typeid') . "'";
$sTypeIdentifier = "tblData.idtype = '".$oDB->f('idtype')."' AND tblData.typeid = '".$oDB->f('typeid')."'";
// Generate new option element // Generate new option element
$oOption = new cHTMLOptionElement($oDB->f('type')."[".$oDB->f('typeid')."]: ".substr(strip_tags(urldecode($oDB->f("value"))), 0, 50), $sTypeIdentifier); $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 // Add option element to the list
$this->addOptionElement($sTypeIdentifier, $oOption); $this->addOptionElement($sTypeIdentifier, $oOption);
} }
return $iCount; return $iCount;
} }
} else { } else {
return false; 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;
}
}
}
}
/**
* 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 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() var $_sTplCellCode;
{ var $_sTplTableFile;
global $cfg; 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;
$this->_sPadding = 2; function __construct() {
$this->_sBorder = 0; global $cfg;
$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->_sPadding = 2;
{ $this->_sBorder = 0;
$this->_sTplCellCode = $sCode; $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) function setTableTemplateFile($sPath) {
{ $this->_sTplTableFile = $sPath;
$this->_sTplTableFile = $sPath; }
}
function setLightColor($sColor)
{
$this->_sColorLight = $sColor;
}
function setDarkColor($sColor)
{
$this->_sColorDark = $sColor;
}
function setAddMultiSelJS($bEnabled = true) function setLightColor($sColor) {
{ $this->_sColorLight = $sColor;
$this->_bAddMultiSelJS = (bool)$bEnabled; }
}
function setWidth ($sWidth) function setDarkColor($sColor) {
{ $this->_sColorDark = $sColor;
$this->_sWidth = $sWidth; }
}
function setPadding ($sPadding)
{
$this->_sPadding = $sPadding;
}
function setBorder ($sBorder) function setAddMultiSelJS($bEnabled = true) {
{ $this->_bAddMultiSelJS = (bool) $bEnabled;
$this->_sBorder = $sBorder; }
}
function setBorderColor ($sBorderColor) function setWidth($sWidth) {
{ $this->_sWidth = $sWidth;
$this->_sBorderColor = $sBorderColor; }
}
function setSolidBorder ($bSolidBorder = true)
{
$this->_bSolidBorder = (bool)$bSolidBorder;
}
function setCell ($sRow, $sCell, $sContent) function setPadding($sPadding) {
{ $this->_sPadding = $sPadding;
$this->_aCells[$sRow][$sCell] = $sContent; }
$this->_aCellAlignment[$sRow][$sCell] = "";
}
function setCellAlignment ($sRow, $sCell, $sAlignment) function setBorder($sBorder) {
{ $this->_sBorder = $sBorder;
$this->_aCellAlignment[$sRow][$sCell] = $sAlignment; }
}
function setCellVAlignment ($sRow, $sCell, $sAlignment) function setBorderColor($sBorderColor) {
{ $this->_sBorderColor = $sBorderColor;
$this->_aCellVAlignment[$sRow][$sCell] = $sAlignment; }
}
function setCellColspan ($sRow, $sCell, $iColSpan) function setSolidBorder($bSolidBorder = true) {
{ $this->_bSolidBorder = (bool) $bSolidBorder;
$this->_aCellColSpan[$sRow][$sCell] = $iColSpan; }
}
function setCellClass ($sRow, $sCell, $sClass) function setCell($sRow, $sCell, $sContent) {
{ $this->_aCells[$sRow][$sCell] = $sContent;
$this->_aCellClass[$sRow][$sCell] = $sClass; $this->_aCellAlignment[$sRow][$sCell] = "";
} }
function setRowBgColor ($sRow, $sColor) function setCellAlignment($sRow, $sCell, $sAlignment) {
{ $this->_aCellAlignment[$sRow][$sCell] = $sAlignment;
$this->_aRowBgColor[$sRow] = $sColor; }
}
function setRowExtra ($sRow, $sExtra)
{
$this->_aRowExtra[$sRow] = $sExtra;
}
function _addMultiSelJS() function setCellVAlignment($sRow, $sCell, $sAlignment) {
{ $this->_aCellVAlignment[$sRow][$sCell] = $sAlignment;
// 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 function setCellColspan($sRow, $sCell, $iColSpan) {
// if (!fncUpdateSel) in JS has not worked... $this->_aCellColSpan[$sRow][$sCell] = $iColSpan;
}
$sSkript = ' <script type="text/javascript"><!--'."\n". function setCellClass($sRow, $sCell, $sClass) {
' try {'."\n". $this->_aCellClass[$sRow][$sCell] = $sClass;
' 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 setRowBgColor($sRow, $sColor) {
} $this->_aRowBgColor[$sRow] = $sColor;
}
function render($bPrint = false)
{
$oTable = new Template;
$oTable->reset();
$oTable->set('s', 'CELLPADDING', $this->_sPadding); function setRowExtra($sRow, $sExtra) {
$oTable->set('s', 'BORDER', $this->_sBorder); $this->_aRowExtra[$sRow] = $sExtra;
$oTable->set('s', 'BORDERCOLOR', $this->_sBorderColor); }
$iColCount = 0; function _addMultiSelJS() {
$bDark = false; // Trick: To save multiple selections in <select>-Element, add some JS which saves the
$sBgColor = ""; // selection, comma separated in a hidden input field on change.
$bMultiSelJSAdded = false; // Try ... catch prevents error messages, if function is added more than once
if (is_array($this->_aCells)) // if (!fncUpdateSel) in JS has not worked...
{
foreach ($this->_aCells as $sRow => $aCells)
{
$iColCount++;
//$bDark = !$bDark;
$sLine = "";
$iCount = 0;
foreach ($aCells as $sCell => $sData)
{
$iCount++;
$sTplCell = $this->_sTplCellCode;
if ($this->_bSolidBorder) $sSkript = ' <script type="text/javascript"><!--' . "\n" .
{ ' try {' . "\n" .
if ($iCount < count($aCells)) ' function fncUpdateSel(sSelectBox, sStorage)' . "\n" .
{ ' {' . "\n" .
if ($iColCount < count($this->_aCells)) { ' var sSelection = "";' . "\n" .
$sTplCell = str_replace('{EXTRA}', 'border: 0px; border-right: 1px; border-bottom: 1px; border-color: '.$this->_sBorderColor.'; border-style: solid;', $sTplCell); ' var oSelectBox = document.getElementsByName(sSelectBox)[0];' . "\n" .
} else { ' var oStorage = document.getElementsByName(sStorage)[0];' . "\n" .
$sTplCell = str_replace('{EXTRA}', 'border: 0px; border-right: 1px; border-color: '.$this->_sBorderColor.'; border-style: solid;', $sTplCell); ' ' . "\n" .
} ' if (oSelectBox && oStorage)' . "\n" .
} else if ($iColCount < count($this->_aCells)) { ' {' . "\n" .
$sTplCell = str_replace('{EXTRA}', 'border: 0px; border-bottom: 1px; border-color: '.$this->_sBorderColor.'; border-style: solid;', $sTplCell); ' for (i = 0; i < oSelectBox.length; i++)' . "\n" .
} else { ' {' . "\n" .
$sTplCell = str_replace('{EXTRA}', '', $sTplCell); ' if(oSelectBox.options[i].selected == true)' . "\n" .
} ' {' . "\n" .
} ' if (sSelection != "")' . "\n" .
' sSelection = sSelection + ",";' . "\n" .
if ($this->_aCellAlignment[$sRow][$sCell] != "") { ' sSelection = sSelection + oSelectBox.options[i].value;' . "\n" .
$sTplCell = str_replace('{ALIGN}', $this->_aCellAlignment[$sRow][$sCell], $sTplCell); ' }' . "\n" .
} else { ' }' . "\n" .
$sTplCell = str_replace('{ALIGN}', 'left', $sTplCell); ' oStorage.value = sSelection;' . "\n" .
} ' }' . "\n" .
' }' . "\n" .
if ($this->_aCellVAlignment[$sRow][$sCell] != "") { ' } catch (e) { }' . "\n" .
$sTplCell = str_replace('{VALIGN}', $this->_aCellVAlignment[$sRow][$sCell], $sTplCell); ' //--></script>' . "\n";
} else {
$sTplCell = str_replace('{VALIGN}', 'top', $sTplCell);
}
if ($this->_aCellColSpan[$sRow][$sCell] != "") { return $sSkript;
$sTplCell = str_replace('{COLSPAN}', $this->_aCellColSpan[$sRow][$sCell], $sTplCell); }
} else {
$sTplCell = str_replace('{COLSPAN}', '1', $sTplCell);
}
if ($this->_aCellClass[$sRow][$sCell] != "") { function render($bPrint = false) {
$sTplCell = str_replace('{CLASS}', $this->_aCellClass[$sRow][$sCell], $sTplCell); $oTable = new Template;
} else { $oTable->reset();
$sTplCell = str_replace('{CLASS}', 'text', $sTplCell);
}
// Multi selection javascript $oTable->set('s', 'CELLPADDING', $this->_sPadding);
if ($this->_bAddMultiSelJS) { $oTable->set('s', 'BORDER', $this->_sBorder);
$sData = $this->_addMultiSelJS() . $sData; $oTable->set('s', 'BORDERCOLOR', $this->_sBorderColor);
$this->_bAddMultiSelJS = false;
} $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;
}
}
$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;
}
}
} }
?> ?>

Datei anzeigen

@ -0,0 +1,40 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
*
*
* @package Frontend
* @subpackage Functions
* @version $Rev$
* @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$:
*/
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,521 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
*
*
* @package Frontend
* @subpackage Functions
* @version $Rev$
* @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$:
*/
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_ConLite();
$FrontendPermissionCollection = new FrontendPermissionCollection;
$visible = false;
if ($public != 0) {
$visible = true;
$groups = array();
} 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;
}

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;
}
?>

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,2 @@
This folder is marked as deprecated and will be deleted in next versions of ConLite.
Please use folders in data-directory instead!

Datei anzeigen

@ -112,7 +112,7 @@ class cTinyMCEEditor extends cWYSIWYGEditor {
} }
// GZIP // GZIP
if ($this->_aSettings["contenido_gzip"] == "true") { if (isset($this->_aSettings["contenido_gzip"]) && $this->_aSettings["contenido_gzip"] == "true") {
$this->setGZIPMode(true); $this->setGZIPMode(true);
} else { } else {
$this->setGZIPMode(false); $this->setGZIPMode(false);

Datei anzeigen

@ -31,6 +31,8 @@ if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
$bDebug = false;
if (!$idcat) { if (!$idcat) {
$idcat = Contenido_Security::toInteger($_REQUEST['idcat']); $idcat = Contenido_Security::toInteger($_REQUEST['idcat']);
} }

Datei anzeigen

@ -89,12 +89,12 @@ class FrontendList
* @param $endwrap Wrap for the list end * @param $endwrap Wrap for the list end
* @param $itemwrap Wrap for a single item * @param $itemwrap Wrap for a single item
*/ */
function FrontendList ($startwrap, $endwrap, $itemwrap) function __construct($startwrap, $endwrap, $itemwrap)
{ {
$this->resultsPerPage = 0; $this->resultsPerPage = 0;
$this->listStart = 1; $this->listStart = 1;
$this->itemwrap = $itemwrap; $this->itemwrap = (is_null($itemwrap))?'':$itemwrap;
$this->startwrap = $startwrap; $this->startwrap = $startwrap;
$this->endwrap = $endwrap; $this->endwrap = $endwrap;
} }

Datei anzeigen

@ -264,20 +264,19 @@ function conGenerateCode($idcat, $idart, $lang, $client, $layout = false) {
$template = $db->f("template"); $template = $db->f("template");
$a_c[$value] = preg_replace("/(&\$)/", "", $a_c[$value]);
$tmp1 = preg_split("/&/", $a_c[$value]);
$varstring = array(); $varstring = array();
if (!empty($a_c[$value])) {
$a_c[$value] = preg_replace("/(&\$)/", "", $a_c[$value]);
$tmp1 = preg_split("/&/", $a_c[$value]);
foreach ($tmp1 as $key1 => $value1) { foreach ($tmp1 as $key1 => $value1) {
$tmp2 = explode("=", $value1); $tmp2 = explode("=", $value1);
foreach ($tmp2 as $key2 => $value2) { foreach ($tmp2 as $key2 => $value2) {
$varstring["$tmp2[0]"] = $tmp2[1]; $varstring["$tmp2[0]"] = $tmp2[1];
}
} }
} }
$CiCMS_Var = '$C' . $value . 'CMS_VALUE'; $CiCMS_Var = '$C' . $value . 'CMS_VALUE';
$CiCMS_VALUE = ''; $CiCMS_VALUE = '';
@ -305,7 +304,7 @@ function conGenerateCode($idcat, $idart, $lang, $client, $layout = false) {
$output = '<?php $modstart' . $value . ' = getmicrotime(); ?' . '>' . $output . '<?php $modend' . $value . ' = getmicrotime()+0.001; $modtime' . $value . ' = $modend' . $value . ' - $modstart' . $value . '; ?' . '>'; $output = '<?php $modstart' . $value . ' = getmicrotime(); ?' . '>' . $output . '<?php $modend' . $value . ' = getmicrotime()+0.001; $modtime' . $value . ' = $modend' . $value . ' - $modstart' . $value . '; ?' . '>';
} }
if ($fedebug != "") { if (!empty($fedebug)) {
$output = addslashes('<?php echo \'<img onclick="javascript:showmod' . $value . '();" src="' . $cfg['path']['contenido_fullhtml'] . 'images/but_preview.gif">\'; ?' . '>' . "<br>") . $output; $output = addslashes('<?php echo \'<img onclick="javascript:showmod' . $value . '();" src="' . $cfg['path']['contenido_fullhtml'] . 'images/but_preview.gif">\'; ?' . '>' . "<br>") . $output;
$output = $output . addslashes('<?php echo \'<script language="javascript">function showmod' . $value . ' () { window.alert(\\\'\'. "' . addslashes($fedebug) . '".\'\\\');} </script>\'; ?' . '>'); $output = $output . addslashes('<?php echo \'<script language="javascript">function showmod' . $value . ' () { window.alert(\\\'\'. "' . addslashes($fedebug) . '".\'\\\');} </script>\'; ?' . '>');
} }
@ -471,7 +470,7 @@ function conGenerateCode($idcat, $idart, $lang, $client, $layout = false) {
} }
//add system meta tag if there is no user meta tag //add system meta tag if there is no user meta tag
if ($bExists == false && strlen($aAutValue['content']) > 0) { if ($bExists == false && isset($aAutValue['content']) && strlen($aAutValue['content']) > 0) {
array_push($metatags, $aAutValue); array_push($metatags, $aAutValue);
} }
} }
@ -481,7 +480,7 @@ function conGenerateCode($idcat, $idart, $lang, $client, $layout = false) {
foreach ($metatags as $value) { foreach ($metatags as $value) {
if (getEffectiveSetting('generator', 'html5', "false") == "true") { if (getEffectiveSetting('generator', 'html5', "false") == "true") {
if ($value['name'] == 'date') if (isset($value['name']) && $value['name'] == 'date')
continue; continue;
} }
if (!empty($value['content'])) { if (!empty($value['content'])) {
@ -497,7 +496,7 @@ function conGenerateCode($idcat, $idart, $lang, $client, $layout = false) {
$oMetaTagGen->removeAttribute("id"); $oMetaTagGen->removeAttribute("id");
/* Check if metatag already exists */ /* Check if metatag already exists */
if (preg_match('/(<meta(?:\s+)name(?:\s*)=(?:\s*)(?:\\\\"|\\\\\')(?:\s*)' . $value["name"] . '(?:\s*)(?:\\\\"|\\\\\')(?:[^>]+)>\r?\n?)/i', $code, $aTmetatagfound)) { if (isset($value["name"]) && preg_match('/(<meta(?:\s+)name(?:\s*)=(?:\s*)(?:\\\\"|\\\\\')(?:\s*)' . $value["name"] . '(?:\s*)(?:\\\\"|\\\\\')(?:[^>]+)>\r?\n?)/i', $code, $aTmetatagfound)) {
$code = str_replace($aTmetatagfound[1], $oMetaTagGen->render() . "\n", $code); $code = str_replace($aTmetatagfound[1], $oMetaTagGen->render() . "\n", $code);
} else if (array_key_exists("charset", $value) } else if (array_key_exists("charset", $value)
&& preg_match('/(<meta(?:\s+)charset(?:\s*)=(?:\s*)(?:\\\\"|\\\\\')(?:\s*)(.*)(?:\s*)(?:\\\\"|\\\\\')(?:\s*)(?:\s*|\/)(?:[\^\>]+)\r?\n?)/i', $code, $aTmetatagfound)) { && preg_match('/(<meta(?:\s+)charset(?:\s*)=(?:\s*)(?:\\\\"|\\\\\')(?:\s*)(.*)(?:\s*)(?:\\\\"|\\\\\')(?:\s*)(?:\s*|\/)(?:[\^\>]+)\r?\n?)/i', $code, $aTmetatagfound)) {

Datei anzeigen

@ -210,7 +210,8 @@ function fileEdit($filename, $sCode, $path) {
if (is_writable($path . $filename)) { if (is_writable($path . $filename)) {
if (strlen(stripslashes(trim($sCode))) > 0) { if (strlen(stripslashes(trim($sCode))) > 0) {
if (!empty($sCode)) { if (!empty($sCode)) {
$sCode = mb_convert_encoding($sCode, 'UTF-8', 'OLD-ENCODING'); mb_detect_encoding($sCode);
$sCode = mb_convert_encoding($sCode, 'UTF-8',mb_detect_encoding($sCode));
} }
cFileHandler::write($path . $filename, $sCode); cFileHandler::write($path . $filename, $sCode);
return true; return true;
@ -235,7 +236,8 @@ function fileEdit($filename, $sCode, $path) {
function getFileContent($filename, $path) { function getFileContent($filename, $path) {
$sCode = cFileHandler::read($path . $filename); $sCode = cFileHandler::read($path . $filename);
if (!empty($sCode)) { if (!empty($sCode)) {
$sCode = mb_convert_encoding($sCode, 'UTF-8', 'OLD-ENCODING'); mb_detect_encoding($sCode);
$sCode = mb_convert_encoding($sCode, 'UTF-8', mb_detect_encoding($sCode));
} }
return $sCode; return $sCode;
} }

Datei anzeigen

@ -1732,6 +1732,9 @@ function sendPostRequest($host, $path, $data, $referer = "", $port = 80) {
} }
function is_dbfs($file) { function is_dbfs($file) {
if(is_null($file)) {
$file = '';
}
if (substr($file, 0, 5) == "dbfs:") { if (substr($file, 0, 5) == "dbfs:") {
return true; return true;
} }

Datei-Diff unterdrückt, da er zu groß ist Diff laden

Datei anzeigen

@ -208,12 +208,13 @@ function tplBrowseLayoutForContainers($idlay, $raw_code = NULL) {
preg_match_all("/CMS_CONTAINER\[([0-9]*)\]/", $code, $a_container); preg_match_all("/CMS_CONTAINER\[([0-9]*)\]/", $code, $a_container);
$iPosBody = stripos($code, '<body>'); $iPosBody = stripos($code, '<body>');
$sCodeBeforeHeader = substr($code, 0, $iPosBody); $sCodeBeforeHeader = substr($code, 0, $iPosBody);
if (!empty($a_container)) {
foreach ($a_container[1] as $value) { foreach ($a_container[1] as $value) {
if (preg_match("/CMS_CONTAINER\[$value\]/", $sCodeBeforeHeader)) { if (preg_match("/CMS_CONTAINER\[$value\]/", $sCodeBeforeHeader)) {
$containerinf[$idlay][$value]["is_body"] = false; $containerinf[$idlay][$value]["is_body"] = false;
} else { } else {
$containerinf[$idlay][$value]["is_body"] = true; $containerinf[$idlay][$value]["is_body"] = true;
}
} }
} }
@ -230,11 +231,13 @@ function tplBrowseLayoutForContainers($idlay, $raw_code = NULL) {
$container[] = $value; $container[] = $value;
} }
} }
asort($container); asort($container);
if (is_array($container)) { if (is_array($container) && !empty($container)) {
$tmp_returnstring = implode("&", $container); $tmp_returnstring = implode("&", $container);
} else {
$tmp_returnstring = "";
} }
return $tmp_returnstring; return $tmp_returnstring;
} }
@ -291,7 +294,7 @@ function tplGetContainerTypes($idlay, $container) {
global $db; global $db;
global $cfg; global $cfg;
global $containerinf; global $containerinf;
$list = array(); $list = array();
if (is_array($containerinf[$idlay])) { if (is_array($containerinf[$idlay])) {
@ -359,16 +362,14 @@ function tplPreparseLayout($idlay, $raw_code = NULL) {
if ($parser->iNodeName == "container" && $parser->iNodeType == NODE_TYPE_ELEMENT) { if ($parser->iNodeName == "container" && $parser->iNodeType == NODE_TYPE_ELEMENT) {
$idcontainer = $parser->iNodeAttributes["id"]; $idcontainer = $parser->iNodeAttributes["id"];
$mode = $parser->iNodeAttributes["mode"]; $sMode = (isset($parser->iNodeAttributes["mode"]))?$parser->iNodeAttributes["mode"]:'optional';
$sDefault = (isset($parser->iNodeAttributes["default"]))?$parser->iNodeAttributes["default"]:'';
if ($mode == "") { $sTypes = (isset($parser->iNodeAttributes["types"]))?$parser->iNodeAttributes["types"]:'';
$mode = "optional";
}
$containerinf[$idlay][$idcontainer]["name"] = $parser->iNodeAttributes["name"]; $containerinf[$idlay][$idcontainer]["name"] = $parser->iNodeAttributes["name"];
$containerinf[$idlay][$idcontainer]["mode"] = $mode; $containerinf[$idlay][$idcontainer]["mode"] = $sMode;
$containerinf[$idlay][$idcontainer]["default"] = $parser->iNodeAttributes["default"]; $containerinf[$idlay][$idcontainer]["default"] = $sDefault;
$containerinf[$idlay][$idcontainer]["types"] = $parser->iNodeAttributes["types"]; $containerinf[$idlay][$idcontainer]["types"] = $sTypes;
$containerinf[$idlay][$idcontainer]["is_body"] = $bIsBody; $containerinf[$idlay][$idcontainer]["is_body"] = $bIsBody;
} }
} }
@ -726,7 +727,6 @@ function tplAutoFillModules($idtpl) {
if ($db_autofill->next_record()) { if ($db_autofill->next_record()) {
$idmod = $db_autofill->f("idmod"); $idmod = $db_autofill->f("idmod");
$sql = "SELECT idcontainer FROM " . $cfg["tab"]["container"] . " WHERE idtpl = '" . Contenido_Security::toInteger($idtpl) . "' AND number = '" . Contenido_Security::toInteger($container) . "'"; $sql = "SELECT idcontainer FROM " . $cfg["tab"]["container"] . " WHERE idtpl = '" . Contenido_Security::toInteger($idtpl) . "' AND number = '" . Contenido_Security::toInteger($container) . "'";
$db_autofill->query($sql); $db_autofill->query($sql);
@ -760,7 +760,6 @@ function tplAutoFillModules($idtpl) {
if ($db_autofill->next_record()) { if ($db_autofill->next_record()) {
$idmod = $db_autofill->f("idmod"); $idmod = $db_autofill->f("idmod");
$sql = "SELECT idcontainer, idmod FROM " . $cfg["tab"]["container"] $sql = "SELECT idcontainer, idmod FROM " . $cfg["tab"]["container"]
. " WHERE idtpl = '" . Contenido_Security::toInteger($idtpl) . "' AND number = '" . Contenido_Security::toInteger($container) . "'"; . " WHERE idtpl = '" . Contenido_Security::toInteger($idtpl) . "' AND number = '" . Contenido_Security::toInteger($container) . "'";

Datei anzeigen

@ -46,9 +46,13 @@ if (!defined('CON_FRAMEWORK')) {
* string is shorter there will be no tooltipp * string is shorter there will be no tooltipp
* @return string - string, which contains short path name and tooltipp if neccessary * @return string - string, which contains short path name and tooltipp if neccessary
*/ */
function generateDisplayFilePath($sDisplayPath, $iLimit) { function generateDisplayFilePath($mDisplayPath, $mLimit) {
$sDisplayPath = (string) trim($sDisplayPath); if(is_null($mDisplayPath)) {
$iLimit = (int) $iLimit; $sDisplayPath = '';
} else {
$sDisplayPath = (string) trim($mDisplayPath);
}
$iLimit = intval($mLimit);
if (strlen($sDisplayPath) > $iLimit) { if (strlen($sDisplayPath) > $iLimit) {
$sDisplayPathShort = capiStrTrimHard($sDisplayPath, $iLimit); $sDisplayPathShort = capiStrTrimHard($sDisplayPath, $iLimit);
@ -58,18 +62,18 @@ function generateDisplayFilePath($sDisplayPath, $iLimit) {
$aPathFragments = explode('/', $sDisplayPath); $aPathFragments = explode('/', $sDisplayPath);
foreach ($aPathFragments as $sFragment) { foreach ($aPathFragments as $sFragment) {
if ($sFragment != '') { if (empty($sFragment)) {
if (strlen($sFragment) > ($iLimit - 5)) { continue;
$sFragment = capiStrTrimHard($sFragment, $iLimit); }
}
if ($iCharcount + strlen($sFragment) + 1 > $iLimit) { if (strlen($sFragment) > ($iLimit - 5)) {
$sTooltippString .= '<br>' . $sFragment . '/'; $sFragment = capiStrTrimHard($sFragment, $iLimit);
$iCharcount = strlen($sFragment); } else if ($iCharcount + strlen($sFragment) + 1 > $iLimit) {
} else { $sTooltippString .= '<br>' . $sFragment . '/';
$iCharcount = $iCharcount + 1 + strlen($sFragment); $iCharcount = strlen($sFragment);
$sTooltippString .= $sFragment . '/'; } else {
} $iCharcount = $iCharcount + 1 + strlen($sFragment);
$sTooltippString .= $sFragment . '/';
} }
} }
@ -111,8 +115,7 @@ function uplDirectoryListRecursive($currentdir, $startdir = NULL, $files = array
foreach ($sorted_files as $file) { foreach ($sorted_files as $file) {
if ($file != ".." && $file != ".") { if ($file != ".." && $file != ".") {
if ((filetype(getcwd() . "/" . $file) == "dir") && if ((filetype(getcwd() . "/" . $file) == "dir") && (opendir(getcwd() . "/" . $file) !== false)) {
(opendir(getcwd() . "/" . $file) !== false)) {
$a_file['name'] = $file; $a_file['name'] = $file;
$a_file['depth'] = $depth; $a_file['depth'] = $depth;
$a_file['pathstring'] = $pathstring . $file . '/'; $a_file['pathstring'] = $pathstring . $file . '/';
@ -802,7 +805,7 @@ function uplCreateFriendlyName($filename, $spacer = "_") {
$newfilename = ""; $newfilename = "";
if (!is_array($cfg['upl']['allow_additional_chars'])) { if (!isset($cfg['upl']['allow_additional_chars']) || !is_array($cfg['upl']['allow_additional_chars'])) {
$filename = str_replace(" ", $spacer, $filename); $filename = str_replace(" ", $spacer, $filename);
} elseif (in_array(' ', $cfg['upl']['allow_additional_chars']) === FALSE) { } elseif (in_array(' ', $cfg['upl']['allow_additional_chars']) === FALSE) {
$filename = str_replace(" ", $spacer, $filename); $filename = str_replace(" ", $spacer, $filename);
@ -823,7 +826,7 @@ function uplCreateFriendlyName($filename, $spacer = "_") {
} }
#Check for additionally allowed charcaters in $cfg['upl']['allow_additional_chars'] (must be array of chars allowed) #Check for additionally allowed charcaters in $cfg['upl']['allow_additional_chars'] (must be array of chars allowed)
if (is_array($cfg['upl']['allow_additional_chars']) && !$bFound) { if (isset($cfg['upl']['allow_additional_chars']) && is_array($cfg['upl']['allow_additional_chars']) && !$bFound) {
if (in_array($atom, $cfg['upl']['allow_additional_chars'])) { if (in_array($atom, $cfg['upl']['allow_additional_chars'])) {
$newfilename .= $atom; $newfilename .= $atom;
} }

Datei anzeigen

@ -475,7 +475,7 @@ if (is_numeric($idcat) && ($idcat >= 0)) {
} }
$imgsrc .= '.gif'; $imgsrc .= '.gif';
$tmp_img = '';
if (($perm->have_perm_area_action("con", "con_makestart") || $perm->have_perm_area_action_item("con", "con_makestart", $idcat)) && $idcat != 0) { if (($perm->have_perm_area_action("con", "con_makestart") || $perm->have_perm_area_action_item("con", "con_makestart", $idcat)) && $idcat != 0) {
if ($is_start == false) { if ($is_start == false) {
$tmp_link = '<a href="' . $sess->url("main.php?area=con&amp;idcat=$idcat&amp;action=con_makestart&amp;idcatart=$idcatart&amp;frame=4&is_start=1&amp;next=$next") . '" title="' . i18n("Flag as start article") . '"><img src="images/' . $imgsrc . '" border="0" title="' . i18n("Flag as start article") . '" alt="' . i18n("Flag as start article") . '" style="margin-left:3px;"></a>'; $tmp_link = '<a href="' . $sess->url("main.php?area=con&amp;idcat=$idcat&amp;action=con_makestart&amp;idcatart=$idcatart&amp;frame=4&is_start=1&amp;next=$next") . '" title="' . i18n("Flag as start article") . '"><img src="images/' . $imgsrc . '" border="0" title="' . i18n("Flag as start article") . '" alt="' . i18n("Flag as start article") . '" style="margin-left:3px;"></a>';

Datei anzeigen

@ -596,7 +596,8 @@ if ($action == "con_newart" && $newart != true) {
</script>'; </script>';
foreach ($availableTags as $key => $value) { foreach ($availableTags as $key => $value) {
$tpl->set('d', 'METAINPUT', 'META' . $value); // @todo seems to be unused, check if we can delete it (op 17.05.2022)
//$tpl->set('d', 'METAINPUT', 'META' . $value);
switch ($value["fieldtype"]) { switch ($value["fieldtype"]) {
case "text": case "text":

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -32,56 +33,50 @@
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) {
if(!defined('CON_FRAMEWORK')) { die('Illegal call');
die('Illegal call');
} }
cInclude("includes","functions.str.php"); cInclude("includes", "functions.str.php");
cInclude("includes","functions.tpl.php"); cInclude("includes", "functions.tpl.php");
cInclude('includes', 'functions.lang.php'); cInclude('includes', 'functions.lang.php');
if(!isset($oTpl) || !is_object($oTpl)) { if (!isset($oTpl) || !is_object($oTpl)) {
$oTpl = new Template(); $oTpl = new Template();
} }
$oTpl->reset(); $oTpl->reset();
global $sess, $frame, $area; global $sess, $frame, $area;
$idcat = ( isset($_GET['idcat']) && is_numeric($_GET['idcat'])) ? $_GET['idcat'] : -1; $idcat = ( isset($_GET['idcat']) && is_numeric($_GET['idcat'])) ? $_GET['idcat'] : -1;
//Get sync options //Get sync options
if (isset($syncoptions)) if (isset($syncoptions)) {
{ $syncfrom = (int) $syncoptions;
$syncfrom = (int) $syncoptions; $remakeCatTable = true;
$remakeCatTable = true;
} }
if (!isset($syncfrom)) if (!isset($syncfrom)) {
{ $syncfrom = -1;
$syncfrom = -1;
} }
$syncoptions = $syncfrom; $syncoptions = $syncfrom;
$oTpl->set('s', 'SYNC_LANG', $syncfrom); $oTpl->set('s', 'SYNC_LANG', $syncfrom);
########################################## ##########################################
# Delete a saved search # Delete a saved search
########################################## ##########################################
$bShowArticleSearch = false; $bShowArticleSearch = false;
if( isset($_GET['delsavedsearch']) ) if (isset($_GET['delsavedsearch'])) {
{ if (isset($_GET['itemtype']) && sizeof($_GET['itemtype']) > 0 && isset($_GET['itemid']) && sizeof($_GET['itemid']) > 0) {
if( isset($_GET['itemtype']) && sizeof($_GET['itemtype'])>0 && isset($_GET['itemid']) && sizeof($_GET['itemid'])>0 ) $propertyCollection = new PropertyCollection;
{ $propertyCollection->deleteProperties($_GET['itemtype'], $_GET['itemid']);
$propertyCollection = new PropertyCollection; $bShowArticleSearch = true;
$propertyCollection->deleteProperties($_GET['itemtype'], $_GET['itemid']); }
$bShowArticleSearch = true;
}
} }
if( isset($_GET['save_search']) && $_GET['save_search'] == 'true') { if (isset($_GET['save_search']) && $_GET['save_search'] == 'true') {
$bShowArticleSearch = true; $bShowArticleSearch = true;
} }
@ -91,22 +86,22 @@ if( isset($_GET['save_search']) && $_GET['save_search'] == 'true') {
# modified 20/04/2007 by H. Librenz for backend search # modified 20/04/2007 by H. Librenz for backend search
$arrDays = array(); $arrDays = array();
for ($i = 0; $i < 32; $i ++) { for ($i = 0; $i < 32; $i++) {
if ($i == 0) { if ($i == 0) {
$arrDays[$i] = '--'; $arrDays[$i] = '--';
} else { } else {
$arrDays[$i] = $i; $arrDays[$i] = $i;
} }
} }
$arrMonths = array(); $arrMonths = array();
for ($i = 0; $i < 13; $i++) { for ($i = 0; $i < 13; $i++) {
if ($i == 0) { if ($i == 0) {
$arrMonths[$i] = '--'; $arrMonths[$i] = '--';
} else { } else {
$arrMonths[$i] = $i; $arrMonths[$i] = $i;
} }
} }
$arrYears = array(); $arrYears = array();
@ -114,20 +109,20 @@ $arrYears = array();
$arrYears[0] = '-----'; $arrYears[0] = '-----';
$sActualYear = (int) date("Y"); $sActualYear = (int) date("Y");
for ($i = $sActualYear-10; $i < $sActualYear+30; $i++) { for ($i = $sActualYear - 10; $i < $sActualYear + 30; $i++) {
$arrYears[$i] = $i; $arrYears[$i] = $i;
} }
$arrUsers = array(); $arrUsers = array();
$query = "SELECT * FROM ".$cfg['tab']['phplib_auth_user_md5']." ORDER BY realname"; $query = "SELECT * FROM " . $cfg['tab']['phplib_auth_user_md5'] . " ORDER BY realname";
$arrUsers['n/a'] = '-'; $arrUsers['n/a'] = '-';
$db->query($query); $db->query($query);
while ($db->next_record()) { while ($db->next_record()) {
$arrUsers[$db->f('username')] = $db->f('realname'); $arrUsers[$db->f('username')] = $db->f('realname');
} }
$arrDateTypes = array(); $arrDateTypes = array();
@ -137,16 +132,16 @@ $arrDateTypes['created'] = i18n('Date created');
$arrDateTypes['lastmodified'] = i18n('Date modified'); $arrDateTypes['lastmodified'] = i18n('Date modified');
$arrDateTypes['published'] = i18n('Date published'); $arrDateTypes['published'] = i18n('Date published');
$articleLink="editarticle"; $articleLink = "editarticle";
$oListOptionRow = new cFoldingRow("3498dbba-ed4a-4618-8e49-3a3635396e22", i18n("Article Search"), $articleLink, $bShowArticleSearch); $oListOptionRow = new cFoldingRow("3498dbba-ed4a-4618-8e49-3a3635396e22", i18n("Article Search"), $articleLink, $bShowArticleSearch);
$oTpl->set('s', 'ARTICLELINK', $articleLink); $oTpl->set('s', 'ARTICLELINK', $articleLink);
#Textfeld #Textfeld
$oTextboxArtTitle = new cHTMLTextbox("bs_search_text", (isset($_REQUEST["bs_search_text"])?$_REQUEST["bs_search_text"]:''), 10); $oTextboxArtTitle = new cHTMLTextbox("bs_search_text", (isset($_REQUEST["bs_search_text"]) ? $_REQUEST["bs_search_text"] : ''), 10);
$oTextboxArtTitle->setStyle('width:135px;'); $oTextboxArtTitle->setStyle('width:135px;');
#Artikel_ID-Feld #Artikel_ID-Feld
$oTextboxArtID = new cHTMLTextbox("bs_search_id", (isset($_REQUEST["bs_search_id"])?$_REQUEST["bs_search_id"]:''), 10); $oTextboxArtID = new cHTMLTextbox("bs_search_id", (isset($_REQUEST["bs_search_id"]) ? $_REQUEST["bs_search_id"] : ''), 10);
$oTextboxArtID->setStyle('width:135px;'); $oTextboxArtID->setStyle('width:135px;');
#Date type #Date type
@ -155,10 +150,10 @@ $oSelectArtDateType->autoFill($arrDateTypes);
$oSelectArtDateType->setStyle('width:135px;'); $oSelectArtDateType->setStyle('width:135px;');
$oSelectArtDateType->setEvent("Change", "toggle_tr_visibility('tr_date_from');toggle_tr_visibility('tr_date_to');"); $oSelectArtDateType->setEvent("Change", "toggle_tr_visibility('tr_date_from');toggle_tr_visibility('tr_date_to');");
if (isset($_REQUEST["bs_search_date_type"]) && $_REQUEST["bs_search_date_type"] !='') { if (isset($_REQUEST["bs_search_date_type"]) && $_REQUEST["bs_search_date_type"] != '') {
$oSelectArtDateType->setDefault($_REQUEST["bs_search_date_type"]); $oSelectArtDateType->setDefault($_REQUEST["bs_search_date_type"]);
} else { } else {
$oSelectArtDateType->setDefault('n/a'); $oSelectArtDateType->setDefault('n/a');
} }
#DateFrom #DateFrom
@ -175,21 +170,21 @@ $oSelectArtDateFromYear->setStyle('width:55px;');
$oSelectArtDateFromYear->autoFill($arrYears); $oSelectArtDateFromYear->autoFill($arrYears);
if (isset($_REQUEST["bs_search_date_from_day"]) && $_REQUEST["bs_search_date_from_day"] > 0) { if (isset($_REQUEST["bs_search_date_from_day"]) && $_REQUEST["bs_search_date_from_day"] > 0) {
$oSelectArtDateFromDay->setDefault($_REQUEST["bs_search_date_from_day"]); $oSelectArtDateFromDay->setDefault($_REQUEST["bs_search_date_from_day"]);
} else { } else {
$oSelectArtDateFromDay->setDefault(0); $oSelectArtDateFromDay->setDefault(0);
} }
if (isset($_REQUEST["bs_search_date_from_month"]) && $_REQUEST["bs_search_date_from_month"] > 0) { if (isset($_REQUEST["bs_search_date_from_month"]) && $_REQUEST["bs_search_date_from_month"] > 0) {
$oSelectArtDateFromMonth->setDefault($_REQUEST["bs_search_date_from_month"]); $oSelectArtDateFromMonth->setDefault($_REQUEST["bs_search_date_from_month"]);
} else { } else {
$oSelectArtDateFromMonth->setDefault(0); $oSelectArtDateFromMonth->setDefault(0);
} }
if (isset($_REQUEST["bs_search_date_from_year"]) && $_REQUEST["bs_search_date_from_year"] > 0) { if (isset($_REQUEST["bs_search_date_from_year"]) && $_REQUEST["bs_search_date_from_year"] > 0) {
$oSelectArtDateFromYear->setDefault($_REQUEST["bs_search_date_from_year"]); $oSelectArtDateFromYear->setDefault($_REQUEST["bs_search_date_from_year"]);
} else { } else {
$oSelectArtDateFromYear->setDefault(0); $oSelectArtDateFromYear->setDefault(0);
} }
#DateTo #DateTo
@ -206,21 +201,21 @@ $oSelectArtDateToYear->setStyle('width:55px;');
$oSelectArtDateToYear->autoFill($arrYears); $oSelectArtDateToYear->autoFill($arrYears);
if (isset($_REQUEST["bs_search_date_to_day"]) && $_REQUEST["bs_search_date_to_day"] > 0) { if (isset($_REQUEST["bs_search_date_to_day"]) && $_REQUEST["bs_search_date_to_day"] > 0) {
$oSelectArtDateToDay->setDefault($_REQUEST["bs_search_date_to_day"]); $oSelectArtDateToDay->setDefault($_REQUEST["bs_search_date_to_day"]);
} else { } else {
$oSelectArtDateToDay->setDefault(0); $oSelectArtDateToDay->setDefault(0);
} }
if (isset($_REQUEST["bs_search_date_to_month"]) && $_REQUEST["bs_search_date_to_month"] > 0) { if (isset($_REQUEST["bs_search_date_to_month"]) && $_REQUEST["bs_search_date_to_month"] > 0) {
$oSelectArtDateToMonth->setDefault($_REQUEST["bs_search_date_to_month"]); $oSelectArtDateToMonth->setDefault($_REQUEST["bs_search_date_to_month"]);
} else { } else {
$oSelectArtDateToMonth->setDefault(0); $oSelectArtDateToMonth->setDefault(0);
} }
if (isset($_REQUEST["bs_search_date_to_year"]) && $_REQUEST["bs_search_date_to_year"] > 0) { if (isset($_REQUEST["bs_search_date_to_year"]) && $_REQUEST["bs_search_date_to_year"] > 0) {
$oSelectArtDateToYear->setDefault($_REQUEST["bs_search_date_to_year"]); $oSelectArtDateToYear->setDefault($_REQUEST["bs_search_date_to_year"]);
} else { } else {
$oSelectArtDateToYear->setDefault(0); $oSelectArtDateToYear->setDefault(0);
} }
#Author #Author
@ -228,57 +223,56 @@ $oSelectArtAuthor = new cHTMLSelectElement("bs_search_author");
$oSelectArtAuthor->setStyle('width:135px;'); $oSelectArtAuthor->setStyle('width:135px;');
$oSelectArtAuthor->autoFill($arrUsers); $oSelectArtAuthor->autoFill($arrUsers);
if (isset($_REQUEST["bs_search_author"]) && $_REQUEST["bs_search_author"] !='') { if (isset($_REQUEST["bs_search_author"]) && $_REQUEST["bs_search_author"] != '') {
$oSelectArtAuthor->setDefault($_REQUEST["bs_search_author"]); $oSelectArtAuthor->setDefault($_REQUEST["bs_search_author"]);
} else { } else {
$oSelectArtAuthor->setDefault('n/a'); $oSelectArtAuthor->setDefault('n/a');
} }
$oSubmit = new cHTMLButton("submit", i18n("Search")); $oSubmit = new cHTMLButton("submit", i18n("Search"));
$content = '<div id="artsearch" style="border: 1px solid #B3B3B3; border-top: none; margin:0;padding:0; padding-bottom: 10px;background: '.$cfg['color']['table_dark'].';">'; $content = '<div id="artsearch" style="border: 1px solid #B3B3B3; border-top: none; margin:0;padding:0; padding-bottom: 10px;background: ' . $cfg['color']['table_dark'] . ';">';
$content .= '<form action="backend_search.php" method="post" name="backend_search" target="right_bottom" id="backend_search">'; $content .= '<form action="backend_search.php" method="post" name="backend_search" target="right_bottom" id="backend_search">';
$content .= '<table dir="' . langGetTextDirection($lang) . '">';
$content .= '<table dir="'.langGetTextDirection($lang).'">'; $content .= '<input type="hidden" name="area" value="' . $area . '">';
$content .= '<input type="hidden" name="area" value="'.$area.'">'; $content .= '<input type="hidden" name="frame" value="' . $frame . '">';
$content .= '<input type="hidden" name="frame" value="'.$frame.'">'; $content .= '<input type="hidden" name="contenido" value="' . $sess->id . '">';
$content .= '<input type="hidden" name="contenido" value="'.$sess->id.'">'; $content .= '<input type="hidden" name="speach" value="' . $lang . '">';
$content .= '<input type="hidden" name="speach" value="'.$lang.'">';
$content .= '<tr>'; $content .= '<tr>';
$content .= '<td style="padding-left: 15px;">'. i18n("Title/Content").'</td>'; $content .= '<td style="padding-left: 15px;">' . i18n("Title/Content") . '</td>';
$content .= '<td>'.$oTextboxArtTitle->render().'</td>'; $content .= '<td>' . $oTextboxArtTitle->render() . '</td>';
$content .= '</tr>'; $content .= '</tr>';
$content .= '<tr>'; $content .= '<tr>';
$content .= '<td style="padding-left: 15px;">'. i18n("Article ID").'</td>'; $content .= '<td style="padding-left: 15px;">' . i18n("Article ID") . '</td>';
$content .= '<td>'.$oTextboxArtID->render().'</td>'; $content .= '<td>' . $oTextboxArtID->render() . '</td>';
$content .= '</tr>'; $content .= '</tr>';
$content .= '<tr>'; $content .= '<tr>';
$content .= '<td style="padding-left: 15px;">'. i18n("Datum").'</td>'; $content .= '<td style="padding-left: 15px;">' . i18n("Datum") . '</td>';
$content .= '<td><nobr>'.$oSelectArtDateType->render().'</nobr></td>'; $content .= '<td><nobr>' . $oSelectArtDateType->render() . '</nobr></td>';
$content .= '</tr>'; $content .= '</tr>';
$content .= '<tr id="tr_date_from" style="display:none;">'; $content .= '<tr id="tr_date_from" style="display:none;">';
$content .= '<td>'. i18n("Date from").'</td>'; $content .= '<td>' . i18n("Date from") . '</td>';
$content .= '<td><nobr>'.$oSelectArtDateFromDay->render().$oSelectArtDateFromMonth->render().$oSelectArtDateFromYear->render().'</nobr></td>'; $content .= '<td><nobr>' . $oSelectArtDateFromDay->render() . $oSelectArtDateFromMonth->render() . $oSelectArtDateFromYear->render() . '</nobr></td>';
$content .= '</tr>'; $content .= '</tr>';
$content .= '<tr id="tr_date_to" style="display:none;">'; $content .= '<tr id="tr_date_to" style="display:none;">';
$content .= '<td>'. i18n("Date to").'</td>'; $content .= '<td>' . i18n("Date to") . '</td>';
$content .= '<td><nobr>'.$oSelectArtDateToDay->render().$oSelectArtDateToMonth->render().$oSelectArtDateToYear->render().'</nobr></td>'; $content .= '<td><nobr>' . $oSelectArtDateToDay->render() . $oSelectArtDateToMonth->render() . $oSelectArtDateToYear->render() . '</nobr></td>';
$content .= '</tr>'; $content .= '</tr>';
$content .= '<tr>'; $content .= '<tr>';
$content .= '<td style="padding-left: 15px;">'. i18n("Author").'</td>'; $content .= '<td style="padding-left: 15px;">' . i18n("Author") . '</td>';
$content .= '<td><nobr>'.$oSelectArtAuthor->render().'</nobr></td>'; $content .= '<td><nobr>' . $oSelectArtAuthor->render() . '</nobr></td>';
$content .= '</tr>'; $content .= '</tr>';
$content .= '<tr>'; $content .= '<tr>';
$content .= '<td>&nbsp;</td>'; $content .= '<td>&nbsp;</td>';
$content .= '<td>'.$oSubmit->render().'</td>'; $content .= '<td>' . $oSubmit->render() . '</td>';
$content .= '</tr>'; $content .= '</tr>';
$content .= '</table>'; $content .= '</table>';
$content .= '</form>'; $content .= '</form>';
@ -288,7 +282,7 @@ $content .= '</form>';
*/ */
$content .= '<div class="artikel_search">'; $content .= '<div class="artikel_search">';
$content .= '<div style="font-weight:bold; margin-bottom: 10px;">'.i18n("Saved Searches").':</div>'; $content .= '<div style="font-weight:bold; margin-bottom: 10px;">' . i18n("Saved Searches") . ':</div>';
$proppy = new PropertyCollection(); $proppy = new PropertyCollection();
$savedSearchList = $proppy->getAllValues('type', 'savedsearch', $auth); $savedSearchList = $proppy->getAllValues('type', 'savedsearch', $auth);
@ -298,40 +292,37 @@ $init_itemtype = '';
$content .= '<ul class="artikel_search">'; $content .= '<ul class="artikel_search">';
// Recently edited articles search - predefined, not deleteable // Recently edited articles search - predefined, not deleteable
$searchRecentlyEdited = "javascript:conMultiLink('right_bottom', 'backend_search.php?area=".$area."&frame=4&contenido=".$sess->id."&recentedit=true'); resetSearchForm();"; $searchRecentlyEdited = "javascript:conMultiLink('right_bottom', 'backend_search.php?area=" . $area . "&frame=4&contenido=" . $sess->id . "&recentedit=true'); resetSearchForm();";
$content .= '<li style="margin-bottom: 3px;"><img style="vertical-align:middle; padding-left: 3px;" src="images/delete_inact.gif" /><a style="padding-left: 3px;" href="'.$searchRecentlyEdited.'">'.i18n("Recently edited articles").'</a></li>'; $content .= '<li style="margin-bottom: 3px;"><img style="vertical-align:middle; padding-left: 3px;" src="images/delete_inact.gif" /><a style="padding-left: 3px;" href="' . $searchRecentlyEdited . '">' . i18n("Recently edited articles") . '</a></li>';
// My articles search - predefined, not deleteable // My articles search - predefined, not deleteable
$searchMyArticles = "javascript:conMultiLink('right_bottom', 'backend_search.php?area=".$area."&frame=4&contenido=".$sess->id."&myarticles=true'); resetSearchForm();"; $searchMyArticles = "javascript:conMultiLink('right_bottom', 'backend_search.php?area=" . $area . "&frame=4&contenido=" . $sess->id . "&myarticles=true'); resetSearchForm();";
$content .= '<li style="margin-bottom: 3px;"><img style="vertical-align:middle;padding-left: 3px;" src="images/delete_inact.gif" /><a style="padding-left: 3px;" href="'.$searchMyArticles.'">'.i18n("My articles").'</a></li>'; $content .= '<li style="margin-bottom: 3px;"><img style="vertical-align:middle;padding-left: 3px;" src="images/delete_inact.gif" /><a style="padding-left: 3px;" href="' . $searchMyArticles . '">' . i18n("My articles") . '</a></li>';
// Workflow // Workflow
$link = $sess->url("main.php?area=con_workflow&frame=4"); $link = $sess->url("main.php?area=con_workflow&frame=4");
$sWorflowLink = 'conMultiLink(\'right_bottom\', \''.$link.'\'); resetSearchForm();'; $sWorflowLink = 'conMultiLink(\'right_bottom\', \'' . $link . '\'); resetSearchForm();';
$content .= '<li style="margin-bottom: 3px;"><img style="vertical-align:middle;padding-left: 3px;" src="images/delete_inact.gif" /><a style="padding-left: 3px;" href="javascript:'.$sWorflowLink.'">'.i18n("Workflow").'</a></li>'; $content .= '<li style="margin-bottom: 3px;"><img style="vertical-align:middle;padding-left: 3px;" src="images/delete_inact.gif" /><a style="padding-left: 3px;" href="javascript:' . $sWorflowLink . '">' . i18n("Workflow") . '</a></li>';
foreach ($savedSearchList as $value) foreach ($savedSearchList as $value) {
{ if (($init_itemid != $value['itemid']) && ($init_itemtype != $value['itemtype'])) {
if( ($init_itemid != $value['itemid']) && ($init_itemtype != $value['itemtype']) ) $init_itemid = $value['itemid'];
{ $init_itemtype = $value['itemtype'];
$init_itemid = $value['itemid'];
$init_itemtype = $value['itemtype']; // Create delete icon
$deleteSearch = "javascript:conMultiLink('left_top', 'main.php?area=" . $area . "&frame=1&delsavedsearch=true&contenido=" . $sess->id . "&itemid=" . $value['itemid'] . "&itemtype=" . $value['itemtype'] . "')";
// Create delete icon $content .= '<li style="margin-bottom: 3px;">';
$deleteSearch = "javascript:conMultiLink('left_top', 'main.php?area=".$area."&frame=1&delsavedsearch=true&contenido=".$sess->id."&itemid=".$value['itemid']."&itemtype=".$value['itemtype']."')"; $content .= '<a href="' . $deleteSearch . '"><img style="padding-left: 3px; vertical-align:middle;" src="images/delete.gif" /></a>';
$content .= '<li style="margin-bottom: 3px;">';
$content .= '<a href="'.$deleteSearch.'"><img style="padding-left: 3px; vertical-align:middle;" src="images/delete.gif" /></a>'; // create new link
$savedSearchLink = "javascript:conMultiLink('right_bottom', 'backend_search.php?area=" . $area . "&frame=4&contenido=" . $sess->id . "&itemid=" . $value['itemid'] . "&itemtype=" . $value['itemtype'] . "')";
// create new link $content .= '<a style="padding-left: 3px;" href="' . $savedSearchLink . '">';
$savedSearchLink = "javascript:conMultiLink('right_bottom', 'backend_search.php?area=".$area."&frame=4&contenido=".$sess->id."&itemid=".$value['itemid']."&itemtype=".$value['itemtype']."')"; }
$content .= '<a style="padding-left: 3px;" href="'.$savedSearchLink.'">'; // Name the link
} if ($value['name'] == 'save_name') {
// Name the link $content .= $value['value'] . '</a>';
if($value['name'] == 'save_name') $content .= '</li>';
{ }
$content .= $value['value'] . '</a>';
$content .= '</li>';
}
} }
$content .= '</ul>'; $content .= '</ul>';
$content .= '</div>'; $content .= '</div>';
@ -351,38 +342,37 @@ $sql = "SELECT
idtpl, idtpl,
name name
FROM FROM
".$cfg['tab']['tpl']." " . $cfg['tab']['tpl'] . "
WHERE WHERE
idclient = '".Contenido_Security::toInteger($client)."' idclient = '" . Contenido_Security::toInteger($client) . "'
ORDER BY ORDER BY
name"; name";
$db->query($sql); $db->query($sql);
$oTpl->set('s', 'ID', 'oTplSel'); $oTpl->set('s', 'ID', 'oTplSel');
$oTpl->set('s', 'CLASS', 'text_medium'); $oTpl->set('s', 'CLASS', 'text_medium');
$oTpl->set('s', 'OPTIONS', ''); $oTpl->set('s', 'OPTIONS', '');
$oTpl->set('s', 'SESSID', $sess->id); $oTpl->set('s', 'SESSID', $sess->id);
$oTpl->set('s', 'BELANG', $belang); $oTpl->set('s', 'BELANG', $belang);
$oTpl->set('d', 'VALUE', '0'); $oTpl->set('d', 'VALUE', '0');
$oTpl->set('d', 'CAPTION', i18n("Choose template")); $oTpl->set('d', 'CAPTION', i18n("Choose template"));
$oTpl->set('d', 'SELECTED', ''); $oTpl->set('d', 'SELECTED', '');
$oTpl->next(); $oTpl->next();
$oTpl->set('d', 'VALUE', '0'); $oTpl->set('d', 'VALUE', '0');
$oTpl->set('d', 'CAPTION', '--- '. i18n("none"). ' ---'); $oTpl->set('d', 'CAPTION', '--- ' . i18n("none") . ' ---');
$oTpl->set('d', 'SELECTED', ''); $oTpl->set('d', 'SELECTED', '');
$oTpl->next(); $oTpl->next();
$categoryLink="editcat"; $categoryLink = "editcat";
$editCategory = new cFoldingRow("3498dbbb-ed4a-4618-8e49-3a3635396e22", i18n("Edit Category"), $categoryLink); $editCategory = new cFoldingRow("3498dbbb-ed4a-4618-8e49-3a3635396e22", i18n("Edit Category"), $categoryLink);
while ($db->next_record()) { while ($db->next_record()) {
$oTplname = $db->f('name'); $oTplname = $db->f('name');
if (strlen($oTplname) > 18) if (strlen($oTplname) > 18) {
{
$oTplname = substr($oTplname, 0, 15) . "..."; $oTplname = substr($oTplname, 0, 15) . "...";
} }
$oTpl->set('d', 'VALUE', $db->f('idtpl')); $oTpl->set('d', 'VALUE', $db->f('idtpl'));
@ -391,25 +381,25 @@ while ($db->next_record()) {
$oTpl->next(); $oTpl->next();
} }
// Template Dropdown // Template Dropdown
$editCat = '<div style="height:110px;padding-top:5px; padding-left: 17px; margin-bottom:-1px; border-right:1px solid #B3B3B3">'; $editCat = '<div style="height:110px;padding-top:5px; padding-left: 17px; margin-bottom:-1px; border-right:1px solid #B3B3B3">';
$editCat .= i18n("Template:") . "<br />"; $editCat .= i18n("Template:") . "<br />";
$editCat .= '<div style="">'; $editCat .= '<div style="">';
$editCat .= $oTpl->generate($cfg['path']['templates'] . $cfg['templates']['generic_select'], true); $editCat .= $oTpl->generate($cfg['path']['templates'] . $cfg['templates']['generic_select'], true);
$editCat .='<a id="changetpl" href="#"><img style="vertical-align: middle;" src="images/submit.gif" border="0"></a><br />'; $editCat .= '<a id="changetpl" href="#"><img style="vertical-align: middle;" src="images/submit.gif" border="0"></a><br />';
$editCat .= '</div>'; $editCat .= '</div>';
// Category // Category
$editCat .= '<div style="margin: 5px 0 5px 0;">'; $editCat .= '<div style="margin: 5px 0 5px 0;">';
$oTpl->set('s', 'CAT_HREF', $sess->url("main.php?area=con_tplcfg&action=tplcfg_edit&frame=4&mode=art").'&idcat='); $oTpl->set('s', 'CAT_HREF', $sess->url("main.php?area=con_tplcfg&action=tplcfg_edit&frame=4&mode=art") . '&idcat=');
$oTpl->set('s', 'IDCAT', $idcat); $oTpl->set('s', 'IDCAT', $idcat);
$editCat .= '<div id="oTemplatecfg_label"><a href="javascript:configureCategory();"><img style="vertical-align: middle;" id="oTemplatecfg" vspace="3" hspace="2" src="'.$cfg["path"]["images"].'but_cat_conf2.gif" border="0" title="'.i18n("Configure Category").'" alt="'.i18n("Configure Category").'"><a>'; $editCat .= '<div id="oTemplatecfg_label"><a href="javascript:configureCategory();"><img style="vertical-align: middle;" id="oTemplatecfg" vspace="3" hspace="2" src="' . $cfg["path"]["images"] . 'but_cat_conf2.gif" border="0" title="' . i18n("Configure Category") . '" alt="' . i18n("Configure Category") . '"><a>';
$editCat .= '<a href="javascript:configureCategory();">'.i18n("Configure Category").'</a></div>'; $editCat .= '<a href="javascript:configureCategory();">' . i18n("Configure Category") . '</a></div>';
// Online / Offline // Online / Offline
$editCat .= '<div id="oOnline_label"><a href="#"><img style="vertical-align: middle;" id="oOnline" src="images/offline.gif" vspace="2" hspace="2" border="0" title="'.i18n("Online / Offline").'" alt="'.i18n("Online / Offline").'"></a>'; $editCat .= '<div id="oOnline_label"><a href="#"><img style="vertical-align: middle;" id="oOnline" src="images/offline.gif" vspace="2" hspace="2" border="0" title="' . i18n("Online / Offline") . '" alt="' . i18n("Online / Offline") . '"></a>';
$editCat .= '<a href="#">'.i18n("Online / Offline").'</a></div>'; $editCat .= '<a href="#">' . i18n("Online / Offline") . '</a></div>';
// Lock / Unlock // Lock / Unlock
$editCat .= '<div id="oLock_label"><a href="#"><img style="vertical-align: middle;" id="oLock" src="images/folder_lock.gif" vspace="2" hspace="2" border="0" title="'.i18n("Lock / Unlock").'" alt="'.i18n("Lock / Unlock").'"></a>'; $editCat .= '<div id="oLock_label"><a href="#"><img style="vertical-align: middle;" id="oLock" src="images/folder_lock.gif" vspace="2" hspace="2" border="0" title="' . i18n("Lock / Unlock") . '" alt="' . i18n("Lock / Unlock") . '"></a>';
$editCat .= '<a href="#">'.i18n("Lock / Unlock").'</a></div>'; $editCat .= '<a href="#">' . i18n("Lock / Unlock") . '</a></div>';
$editCat .= '<br />'; $editCat .= '<br />';
$editCat .= '</div>'; $editCat .= '</div>';
$editCat .= '</div>'; $editCat .= '</div>';
@ -418,95 +408,90 @@ $editCategory->setContentData($editCat);
$oTpl->set('s', 'EDIT', $editCategory->render()); $oTpl->set('s', 'EDIT', $editCategory->render());
$oTpl->set('s', 'CATEGORYLINK', $categoryLink); $oTpl->set('s', 'CATEGORYLINK', $categoryLink);
##################################### #####################################
# Collapse / Expand / Config Category # Collapse / Expand / Config Category
##################################### #####################################
$selflink = "main.php"; $selflink = "main.php";
$expandlink = $sess->url($selflink . "?area=$area&frame=2&expand=all"); $expandlink = $sess->url($selflink . "?area=$area&frame=2&expand=all");
$collapselink = $sess->url($selflink . "?area=$area&frame=2&collapse=all"); $collapselink = $sess->url($selflink . "?area=$area&frame=2&collapse=all");
$collapseimg = '<a target="left_bottom" class="black" id="collapser" href="'.$collapselink.'" alt="'.i18n("close all").'" title="'.i18n("Close all categories").'"><img src="images/close_all.gif" border="0">&nbsp;'.i18n("close all").'</a>'; $collapseimg = '<a target="left_bottom" class="black" id="collapser" href="' . $collapselink . '" alt="' . i18n("close all") . '" title="' . i18n("Close all categories") . '"><img src="images/close_all.gif" border="0">&nbsp;' . i18n("close all") . '</a>';
$expandimg = '<a target="left_bottom"class="black" id="expander" href="'.$expandlink.'" alt="'.i18n("open all").'" title="'.i18n("Open all categories").'"><img src="images/open_all.gif" border="0">&nbsp;'.i18n("open all").'</a>'; $expandimg = '<a target="left_bottom"class="black" id="expander" href="' . $expandlink . '" alt="' . i18n("open all") . '" title="' . i18n("Open all categories") . '"><img src="images/open_all.gif" border="0">&nbsp;' . i18n("open all") . '</a>';
$oTpl->set('s', 'MINUS', $collapseimg); $oTpl->set('s', 'MINUS', $collapseimg);
$oTpl->set('s', 'PLUS', $expandimg); $oTpl->set('s', 'PLUS', $expandimg);
/**************/ /* * *********** */
/* SYNCSTUFF */ /* SYNCSTUFF */
/**************/ /* * *********** */
$languages = getLanguageNamesByClient($client); $languages = getLanguageNamesByClient($client);
$sListId = '';
if (count($languages) > 1 && $perm->have_perm_area_action($area, "con_synccat")) { if (count($languages) > 1 && $perm->have_perm_area_action($area, "con_synccat")) {
$sListId = 'sync'; $sListId = 'sync';
$oListOptionRow = new cFoldingRow("4808dbba-ed4a-4618-8e49-3a3635396e22", i18n("Synchronize from"), $sListId); $oListOptionRow = new cFoldingRow("4808dbba-ed4a-4618-8e49-3a3635396e22", i18n("Synchronize from"), $sListId);
if (($syncoptions > 0) && ($syncoptions != $lang)) { if (($syncoptions > 0) && ($syncoptions != $lang)) {
$oListOptionRow->setExpanded (true); $oListOptionRow->setExpanded(true);
} }
#'dir="' . langGetTextDirection($lang) . '"'); #'dir="' . langGetTextDirection($lang) . '"');
$selectbox = new cHTMLSelectElement("syncoptions"); $selectbox = new cHTMLSelectElement("syncoptions");
$option = new cHTMLOptionElement("--- ".i18n("None")." ---", -1); $option = new cHTMLOptionElement("--- " . i18n("None") . " ---", -1);
$selectbox->addOptionElement(-1, $option); $selectbox->addOptionElement(-1, $option);
foreach ($languages as $languageid => $languagename) foreach ($languages as $languageid => $languagename) {
{ if ($lang != $languageid && $perm->have_perm_client_lang($client, $languageid)) {
if ($lang != $languageid && $perm->have_perm_client_lang($client, $languageid)) $option = new cHTMLOptionElement($languagename . " (" . $languageid . ")", $languageid);
{ $selectbox->addOptionElement($languageid, $option);
$option = new cHTMLOptionElement($languagename . " (".$languageid.")",$languageid); }
$selectbox->addOptionElement($languageid, $option);
}
} }
$selectbox->setDefault($syncoptions); $selectbox->setDefault($syncoptions);
$form = new UI_Form("syncfrom"); $form = new UI_Form("syncfrom");
$form->setVar("area",$area); $form->setVar("area", $area);
$form->setVar("frame", $frame); $form->setVar("frame", $frame);
$form->add("sel", $selectbox->render()); $form->add("sel", $selectbox->render());
$link = $sess->url("main.php?area=".$area."&frame=2").'&syncoptions='; $link = $sess->url("main.php?area=" . $area . "&frame=2") . '&syncoptions=';
$sJsLink = 'conMultiLink(\'left_bottom\', \''.$link.'\'+document.getElementsByName(\'syncoptions\')[0].value+\'&refresh_syncoptions=true\');'; $sJsLink = 'conMultiLink(\'left_bottom\', \'' . $link . '\'+document.getElementsByName(\'syncoptions\')[0].value+\'&refresh_syncoptions=true\');';
$oTpl->set('s', 'UPDATE_SYNC_REFRESH_FRAMES', $sJsLink); $oTpl->set('s', 'UPDATE_SYNC_REFRESH_FRAMES', $sJsLink);
$form->add("submit", '<img style="vertical-align:middle; margin-left:5px;" onMouseover="this.style.cursor=\'pointer\'" onclick="updateCurLanguageSync();" src="'.$cfg["path"]["contenido_fullhtml"].$cfg['path']['images'].'submit.gif">');
$sSyncButton = '<div id="sync_cat_single" style="display:none;"><a href="javascript:generateSyncAction(0);"><img style="vertical-align: middle;" src="images/but_sync_cat.gif" vspace="2" hspace="2" border="0" title="'.i18n("Copy to current language").'" alt="'.i18n("Copy to current language").'"></a>'; $form->add("submit", '<img style="vertical-align:middle; margin-left:5px;" onMouseover="this.style.cursor=\'pointer\'" onclick="updateCurLanguageSync();" src="' . $cfg["path"]["contenido_fullhtml"] . $cfg['path']['images'] . 'submit.gif">');
$sSyncButton .= '<a href="javascript:generateSyncAction(0);">'.i18n("Copy to current language").'</a></div>';
$sSyncButtonMultiple = '<div id="sync_cat_multiple" style="display:none;"><a href="javascript:generateSyncAction(1);"><img style="vertical-align: middle;" src="images/but_sync_cat.gif" vspace="2" hspace="2" border="0" title="'.i18n("Also copy subcategories").'" alt="'.i18n("Also copy subcategories").'"></a>'; $sSyncButton = '<div id="sync_cat_single" style="display:none;"><a href="javascript:generateSyncAction(0);"><img style="vertical-align: middle;" src="images/but_sync_cat.gif" vspace="2" hspace="2" border="0" title="' . i18n("Copy to current language") . '" alt="' . i18n("Copy to current language") . '"></a>';
$sSyncButtonMultiple .= '<a href="javascript:generateSyncAction(1);">'.i18n("Also copy subcategories").'</a></div>'; $sSyncButton .= '<a href="javascript:generateSyncAction(0);">' . i18n("Copy to current language") . '</a></div>';
$sSyncButtonMultiple = '<div id="sync_cat_multiple" style="display:none;"><a href="javascript:generateSyncAction(1);"><img style="vertical-align: middle;" src="images/but_sync_cat.gif" vspace="2" hspace="2" border="0" title="' . i18n("Also copy subcategories") . '" alt="' . i18n("Also copy subcategories") . '"></a>';
$content = '<table style="padding:3px; margin-left:12px; border-right: 1px solid #B3B3B3;" width="100%" border="0" dir="'.langGetTextDirection($lang).'"> $sSyncButtonMultiple .= '<a href="javascript:generateSyncAction(1);">' . i18n("Also copy subcategories") . '</a></div>';
$content = '<table style="padding:3px; margin-left:12px; border-right: 1px solid #B3B3B3;" width="100%" border="0" dir="' . langGetTextDirection($lang) . '">
<tr> <tr>
<td>'.$form->render().'</td> <td>' . $form->render() . '</td>
</tr> </tr>
<tr> <tr>
<td>'.$sSyncButton.$sSyncButtonMultiple.'</td> <td>' . $sSyncButton . $sSyncButtonMultiple . '</td>
</tr> </tr>
</table>'; </table>';
$oListOptionRow->setContentData($content); $oListOptionRow->setContentData($content);
$oTpl->set('s', 'SYNCRONIZATION',$oListOptionRow->render()); $oTpl->set('s', 'SYNCRONIZATION', $oListOptionRow->render());
$oTpl->set('s', 'SYNCLINK', $sListId); $oTpl->set('s', 'SYNCLINK', $sListId);
$sSyncLink = $sess->url($selflink . "?area=$area&frame=2&action=con_synccat"); $sSyncLink = $sess->url($selflink . "?area=$area&frame=2&action=con_synccat");
$oTpl->set('s', 'SYNC_HREF', $sSyncLink); $oTpl->set('s', 'SYNC_HREF', $sSyncLink);
} else { } else {
$oTpl->set('s', 'SYNCRONIZATION',''); $oTpl->set('s', 'SYNCRONIZATION', '');
$oTpl->set('s', 'SYNCLINK',$sListId); $oTpl->set('s', 'SYNCLINK', $sListId);
$oTpl->set('s', 'SYNC_HREF', ''); $oTpl->set('s', 'SYNC_HREF', '');
} }
/* /*
* necessary for expanding/collapsing of navigation tree per javascript/AJAX (I. van Peeren) * necessary for expanding/collapsing of navigation tree per javascript/AJAX (I. van Peeren)
*/ */
$oTpl->set('s', 'AREA', $area); $oTpl->set('s', 'AREA', $area);
$oTpl->set('s', 'SESSION', $contenido); $oTpl->set('s', 'SESSION', $contenido);
$oTpl->set('s', 'AJAXURL', $cfg['path']['contenido_fullhtml'].'ajaxmain.php'); $oTpl->set('s', 'AJAXURL', $cfg['path']['contenido_fullhtml'] . 'ajaxmain.php');
########################################## ##########################################
# Help # Help
########################################## ##########################################
$oTpl->set('s', 'HELPSCRIPT', setHelpContext("con")); $oTpl->set('s', 'HELPSCRIPT', setHelpContext("con"));
$oTpl->generate($cfg['path']['templates'] . $cfg['templates']['con_left_top']); $oTpl->generate($cfg['path']['templates'] . $cfg['templates']['con_left_top']);
?>

Datei anzeigen

@ -158,7 +158,7 @@ if ($fegroup->virgin == false && $fegroup->get("idclient") == $client)
$fegroup->store(); $fegroup->store();
} }
if (count($messages) > 0) if (is_array($messages) && count($messages) > 0)
{ {
$notis = $notification->returnNotification("warning", implode("<br>", $messages)) . "<br>"; $notis = $notification->returnNotification("warning", implode("<br>", $messages)) . "<br>";
} }

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -29,111 +30,93 @@
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
// @TODO: check the code beneath is necessary // @TODO: check the code beneath is necessary
if ($_REQUEST['useplugin'] != "category") { if ($_REQUEST['useplugin'] != "category") {
die ('Illegal call!'); die('Illegal call!');
} }
$page = new cPage; $page = new cPage;
if (!in_array($useplugin, $cfg['plugins']['frontendlogic'])) if (!in_array($useplugin, $cfg['plugins']['frontendlogic'])) {
{ $page->setContent(i18n("Invalid plugin"));
$page->setContent(i18n("Invalid plugin"));
} else { } else {
cInclude("plugins", "frontendlogic/$useplugin/".$useplugin.".php"); cInclude("plugins", "frontendlogic/$useplugin/" . $useplugin . ".php");
$className = "frontendlogic_".$useplugin; $className = "frontendlogic_" . $useplugin;
$class = new $className; $class = new $className;
$perms = new FrontendPermissionCollection; $perms = new FrontendPermissionCollection;
$rights = new UI_Table_Form("rights");
$rights->setVar("area", $area);
$rights->setVar("frame", $frame);
$rights->setVar("useplugin", $useplugin);
$rights->setVar("idfrontendgroup", $idfrontendgroup);
$rights->setVar("action", "fegroups_save_perm");
$rights = new UI_Table_Form("rights"); $actions = $class->listActions();
$rights->setVar("area", $area); $items = $class->listItems();
$rights->setVar("frame", $frame);
$rights->setVar("useplugin", $useplugin);
$rights->setVar("idfrontendgroup", $idfrontendgroup);
$rights->setVar("action", "fegroups_save_perm");
$actions = $class->listActions(); if ($action == "fegroups_save_perm") {
$items = $class->listItems(); $myitems = $items;
$myitems["__GLOBAL__"] = "__GLOBAL__";
if ($action == "fegroups_save_perm") foreach ($actions as $action => $text) {
{ foreach ($myitems as $item => $text) {
$myitems = $items;
$myitems["__GLOBAL__"] = "__GLOBAL__";
foreach ($actions as $action => $text) if ($item === "__GLOBAL__") {
{ $varname = "action_$action";
foreach ($myitems as $item => $text) } else {
{ $varname = "item_" . $item . "_$action";
}
if ($item === "__GLOBAL__") if ($_POST[$varname] == 1) {
{ $perms->setPerm($idfrontendgroup, $useplugin, $action, $item);
$varname = "action_$action"; } else {
} else { $perms->removePerm($idfrontendgroup, $useplugin, $action, $item);
$varname = "item_".$item."_$action"; }
} }
}
if ($_POST[$varname] == 1)
{
$perms->setPerm($idfrontendgroup, $useplugin, $action, $item);
} else {
$perms->removePerm($idfrontendgroup, $useplugin, $action, $item);
}
}
}
}
$rights->addHeader(sprintf(i18n("Permissions for plugin '%s'"), $class->getFriendlyName()));
foreach ($actions as $key => $action)
{
$check[$key] = new cHTMLCheckbox("action_$key", 1);
$check[$key]->setLabelText($action." ".i18n("(All)"));
if ($perms->checkPerm($idfrontendgroup, $useplugin, $key, "__GLOBAL__"))
{
$check[$key]->setChecked(true);
}
}
$rights->add(i18n("Global rights"), $check);
foreach ($actions as $key => $action)
{
unset($check);
if (count($items) > 0)
{
foreach ($items as $item => $value)
{
$check[$item] = new cHTMLCheckbox("item_".$item."_".$key, 1);
$check[$item]->setLabelText($value);
if ($perms->checkPerm($idfrontendgroup, $useplugin, $key, $item))
{
$check[$item]->setChecked(true);
}
}
$rights->add($action, $check);
} else {
$rights->add($action, i18n("No items found"));
}
} }
$page->setContent($rights->render()); $rights->addHeader(sprintf(i18n("Permissions for plugin '%s'"), $class->getFriendlyName()));
foreach ($actions as $key => $action) {
$check[$key] = new cHTMLCheckbox("action_$key", 1);
$check[$key]->setLabelText($action . " " . i18n("(All)"));
if ($perms->checkPerm($idfrontendgroup, $useplugin, $key, "__GLOBAL__")) {
$check[$key]->setChecked(true);
}
}
$rights->add(i18n("Global rights"), $check);
foreach ($actions as $key => $action) {
unset($check);
if (is_array($items) && count($items) > 0) {
foreach ($items as $item => $value) {
$check[$item] = new cHTMLCheckbox("item_" . $item . "_" . $key, 1);
$check[$item]->setLabelText($value);
if ($perms->checkPerm($idfrontendgroup, $useplugin, $key, $item)) {
$check[$item]->setChecked(true);
}
}
$rights->add($action, $check);
} else {
$rights->add($action, i18n("No items found"));
}
}
$page->setContent($rights->render());
} }
$page->render(); $page->render();
?>

Datei anzeigen

@ -162,7 +162,7 @@ if ($oFeUser->virgin == false && $oFeUser->get("idclient") == $client) {
if($bStore) $oFeUser->store(); if($bStore) $oFeUser->store();
} }
if (count($messages) > 0) { if (is_array($messages) && count($messages) > 0) {
$notis = $notification->returnNotification("warning", implode("<br>", $messages)) . "<br>"; $notis = $notification->returnNotification("warning", implode("<br>", $messages)) . "<br>";
} }

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -27,9 +28,8 @@
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) {
if(!defined('CON_FRAMEWORK')) { die('Illegal call');
die('Illegal call');
} }
$tpl->set('s', 'CLASS', 'text_medium'); $tpl->set('s', 'CLASS', 'text_medium');
@ -42,7 +42,6 @@ $tpl->set('s', 'SID', $sess->id);
$clients = $classclient->getAccessibleClients(); $clients = $classclient->getAccessibleClients();
$tpl2 = new Template; $tpl2 = new Template;
$tpl2->set('s', 'ID', 'editclient'); $tpl2->set('s', 'ID', 'editclient');
$tpl2->set('s', 'NAME', 'editclient'); $tpl2->set('s', 'NAME', 'editclient');
@ -53,23 +52,20 @@ $iClientcount = count($clients);
foreach ($clients as $key => $value) { foreach ($clients as $key => $value) {
if ($client == $key) if ($client == $key) {
{ $selected = "selected";
$selected = "selected"; } else {
} else { $selected = "";
$selected = ""; }
}
if (strlen($value['name']) > 15) if (strlen($value['name']) > 15) {
{ $value['name'] = substr($value['name'], 0, 12) . "...";
$value['name'] = substr($value['name'],0,12). "..."; }
}
$tpl2->set('d', 'VALUE', $key);
$tpl2->set('d', 'CAPTION', $value['name']);
$tpl2->set('d', 'SELECTED', $selected);
$tpl2->next();
$tpl2->set('d', 'VALUE', $key);
$tpl2->set('d', 'CAPTION', $value['name']);
$tpl2->set('d', 'SELECTED', $selected);
$tpl2->next();
} }
$select = $tpl2->generate($cfg["path"]["templates"] . $cfg['templates']['generic_select'], true); $select = $tpl2->generate($cfg["path"]["templates"] . $cfg['templates']['generic_select'], true);
@ -77,13 +73,11 @@ $select = $tpl2->generate($cfg["path"]["templates"] . $cfg['templates']['generic
$tpl->set('s', 'CLIENTSELECT', $select); $tpl->set('s', 'CLIENTSELECT', $select);
if ($perm->have_perm_area_action($area, "lang_newlanguage") && $iClientcount > 0) { if ($perm->have_perm_area_action($area, "lang_newlanguage") && $iClientcount > 0) {
$tpl->set('s', 'NEWLANG', '<a class="addfunction" href="javascript:languageNewConfirm()">'.i18n("Create language").'</a>'); $tpl->set('s', 'NEWLANG', '<a class="addfunction" href="javascript:languageNewConfirm()">' . i18n("Create language") . '</a>');
} else if ($iClientcount == 0) { } else if ($iClientcount == 0) {
$tpl->set('s', 'NEWLANG', i18n('No Client selected')); $tpl->set('s', 'NEWLANG', i18n('No Client selected'));
} else { } else {
$tpl->set('s', 'NEWLANG', ''); $tpl->set('s', 'NEWLANG', '');
} }
$tpl->generate($cfg['path']['templates'] . $cfg['templates']['lang_left_top']); $tpl->generate($cfg['path']['templates'] . $cfg['templates']['lang_left_top']);
?>

Datei anzeigen

@ -107,7 +107,11 @@ if (!$layout->virgin) {
} }
$types = array_unique($types); $types = array_unique($types);
$layout->setProperty("layout", "used-types", implode($types, ";")); if (version_compare(PHP_VERSION, '7.4.0', '>=')) {
$layout->setProperty("layout", "used-types", implode(";", $types));
} else {
$layout->setProperty("layout", "used-types", implode($types, ";"));
}
$msg = ""; $msg = "";

Datei anzeigen

@ -49,7 +49,7 @@ while ($layout = $oLayouts->next()) {
} }
$name = $layout->get('name'); $name = $layout->get('name');
$descr = $layout->get('description'); $descr = cString::nullToString($layout->get('description'));
$idlay = $layout->get('idlay'); $idlay = $layout->get('idlay');
if (strlen($descr) > 64) { if (strlen($descr) > 64) {
@ -102,7 +102,7 @@ while ($layout = $oLayouts->next()) {
$tpl->set('d', 'TODO', $todo->render()); $tpl->set('d', 'TODO', $todo->render());
if (stripslashes($_REQUEST['idlay']) == $idlay) { if (filter_var($_REQUEST['idlay'], FILTER_SANITIZE_NUMBER_INT) == $idlay) {
$tpl->set('d', 'ID', 'marked'); $tpl->set('d', 'ID', 'marked');
} else { } else {
$tpl->set('d', 'ID', ''); $tpl->set('d', 'ID', '');

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -27,16 +28,18 @@
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) {
if(!defined('CON_FRAMEWORK')) { die('Illegal call');
die('Illegal call');
} }
// check request
$_REQUEST["sortby"] = (empty($_REQUEST["sortby"]))?'': htmlspecialchars($_REQUEST["sortby"]);
$_REQUEST["sortorder"] = (empty($_REQUEST["sortorder"]))?'': htmlspecialchars($_REQUEST["sortorder"]);
$_REQUEST["filter"] = (empty($_REQUEST["filter"]))?'': htmlspecialchars($_REQUEST["filter"]);
$oUser = new cApiUser($auth->auth["uid"]); $oUser = new cApiUser($auth->auth["uid"]);
if (!isset($elemperpage) || !is_numeric($elemperpage) || $elemperpage < 0) if (!isset($elemperpage) || !is_numeric($elemperpage) || $elemperpage < 0) {
{ $elemperpage = $oUser->getProperty("itemsperpage", $area);
$elemperpage = $oUser->getProperty("itemsperpage", $area);
$_REQUEST['elemperpage'] = $elemperpage; $_REQUEST['elemperpage'] = $elemperpage;
if ((int) $elemperpage <= 0) { if ((int) $elemperpage <= 0) {
$oUser->setProperty("itemsperpage", $area, 25); $oUser->setProperty("itemsperpage", $area, 25);
@ -66,31 +69,28 @@ $tpl->set('s', 'OPTIONS', '');
$tpl->set('s', 'SID', $sess->id); $tpl->set('s', 'SID', $sess->id);
$tpl->set('s', 'SESSID', $sess->id); $tpl->set('s', 'SESSID', $sess->id);
$tpl2 = new Template; $tpl2 = new Template;
$tpl2->set('s', 'NAME', 'restrict'); $tpl2->set('s', 'NAME', 'restrict');
$tpl2->set('s', 'CLASS', 'text_medium'); $tpl2->set('s', 'CLASS', 'text_medium');
$tpl2->set('s', 'OPTIONS', 'onchange="userChangeRestriction()"'); $tpl2->set('s', 'OPTIONS', 'onchange="userChangeRestriction()"');
$limit = array( $limit = array(
"2" => i18n("All"), "2" => i18n("All"),
"1" => i18n("Frontend only"), "1" => i18n("Frontend only"),
"3" => i18n("Backend only")); "3" => i18n("Backend only"));
foreach ($limit as $key => $value) { foreach ($limit as $key => $value) {
if ($restrict == $key) if (!empty($restrict) && $restrict == $key) {
{ $selected = "selected";
$selected = "selected"; } else {
} else { $selected = "";
$selected = ""; }
}
$tpl2->set('d', 'VALUE', $key);
$tpl2->set('d', 'CAPTION', $value);
$tpl2->set('d', 'SELECTED', $selected);
$tpl2->next();
$tpl2->set('d', 'VALUE', $key);
$tpl2->set('d', 'CAPTION', $value);
$tpl2->set('d', 'SELECTED', $selected);
$tpl2->next();
} }
$select = $tpl2->generate($cfg["path"]["templates"] . $cfg['templates']['generic_select'], true); $select = $tpl2->generate($cfg["path"]["templates"] . $cfg['templates']['generic_select'], true);
@ -100,9 +100,9 @@ $tpl->set('s', 'ACTION', '');
$tmp_mstr = '<div style="margin: 0pt 0pt 0pt 17px; height: 2em; padding-bottom: 5px;"> $tmp_mstr = '<div style="margin: 0pt 0pt 0pt 17px; height: 2em; padding-bottom: 5px;">
<a class="addfunction" href="javascript:conMultiLink(\'%s\', \'%s\')">%s</a></div>'; <a class="addfunction" href="javascript:conMultiLink(\'%s\', \'%s\')">%s</a></div>';
$area = "user"; $area = "user";
$mstr = sprintf($tmp_mstr, 'right_bottom',$sess->url("main.php?area=user_create&frame=4"),i18n("Create user")); $mstr = sprintf($tmp_mstr, 'right_bottom', $sess->url("main.php?area=user_create&frame=4"), i18n("Create user"));
if ($perm->have_perm_area_action('user_create', "user_createuser")) { if ($perm->have_perm_area_action('user_create', "user_createuser")) {
$tpl->set('s', 'NEWUSER', $mstr); $tpl->set('s', 'NEWUSER', $mstr);
} else { } else {
$tpl->set('s', 'NEWUSER', ''); $tpl->set('s', 'NEWUSER', '');
@ -112,15 +112,15 @@ $tpl->set('s', 'CAPTION', '');
################# #################
# List Options # List Options
################# #################
$aSortByOptions = array( "username" => i18n("User name"), $aSortByOptions = array("username" => i18n("User name"),
"realname" => i18n("Name")); "realname" => i18n("Name"));
$aSortOrderOptions = array( "asc" => i18n("Ascending"),
"desc" => i18n("Descending"));
$listOptionId="listoption"; $aSortOrderOptions = array("asc" => i18n("Ascending"),
"desc" => i18n("Descending"));
$listOptionId = "listoption";
$tpl->set('s', 'LISTOPLINK', $listOptionId); $tpl->set('s', 'LISTOPLINK', $listOptionId);
$oListOptionRow = new cFoldingRow( "5498dbba-ed4a-4618-8e49-3a3635396e22", i18n("List options"), $listOptionId); $oListOptionRow = new cFoldingRow("5498dbba-ed4a-4618-8e49-3a3635396e22", i18n("List options"), $listOptionId);
$oListOptionRow->setExpanded('true'); $oListOptionRow->setExpanded('true');
$oSelectItemsPerPage = new cHTMLSelectElement("elemperpage"); $oSelectItemsPerPage = new cHTMLSelectElement("elemperpage");
$oSelectItemsPerPage->autoFill(array(25 => 25, 50 => 50, 75 => 75, 100 => 100)); $oSelectItemsPerPage->autoFill(array(25 => 25, 50 => 50, 75 => 75, 100 => 100));
@ -137,31 +137,31 @@ $oSelectSortOrder->setDefault($_REQUEST["sortorder"]);
$oTextboxFilter = new cHTMLTextbox("filter", $_REQUEST["filter"], 20); $oTextboxFilter = new cHTMLTextbox("filter", $_REQUEST["filter"], 20);
$oTextboxFilter->setStyle('width:114px;'); $oTextboxFilter->setStyle('width:114px;');
$content = '<div style="border-bottom: 1px solid #B3B3B3; padding-left: 17px; background: '.$cfg['color']['table_dark'].';">'; $content = '<div style="border-bottom: 1px solid #B3B3B3; padding-left: 17px; background: ' . $cfg['color']['table_dark'] . ';">';
$content .= '<form action="javascript:execFilter(\''.$sess->id.'\');" id="filter" name="filter" method="get">'; $content .= '<form action="javascript:execFilter(\'' . $sess->id . '\');" id="filter" name="filter" method="get">';
$content .= '<table>'; $content .= '<table>';
$content .= '<input type="hidden" name="area" value="'.$area.'">'; $content .= '<input type="hidden" name="area" value="' . $area . '">';
$content .= '<input type="hidden" name="frame" value="1">'; $content .= '<input type="hidden" name="frame" value="1">';
$content .= '<input type="hidden" name="contenido" value="'.$sess->id.'">'; $content .= '<input type="hidden" name="contenido" value="' . $sess->id . '">';
$content .= '<tr>'; $content .= '<tr>';
$content .= '<td>'. i18n("Items / page").'</td>'; $content .= '<td>' . i18n("Items / page") . '</td>';
$content .= '<td>'.$oSelectItemsPerPage->render().'</td>'; $content .= '<td>' . $oSelectItemsPerPage->render() . '</td>';
$content .= '</tr>'; $content .= '</tr>';
$content .= '<tr>'; $content .= '<tr>';
$content .= '<td>'. i18n("Sort by").'</td>'; $content .= '<td>' . i18n("Sort by") . '</td>';
$content .= '<td>'.$oSelectSortBy->render().'</td>'; $content .= '<td>' . $oSelectSortBy->render() . '</td>';
$content .= '</tr>'; $content .= '</tr>';
$content .= '<tr>'; $content .= '<tr>';
$content .= '<td>'. i18n("Sort order").'</td>'; $content .= '<td>' . i18n("Sort order") . '</td>';
$content .= '<td>'.$oSelectSortOrder->render().'</td>'; $content .= '<td>' . $oSelectSortOrder->render() . '</td>';
$content .= '</tr>'; $content .= '</tr>';
$content .= '<tr>'; $content .= '<tr>';
$content .= '<td>'. i18n("Search for").'</td>'; $content .= '<td>' . i18n("Search for") . '</td>';
$content .= '<td>'.$oTextboxFilter->render().'</td>'; $content .= '<td>' . $oTextboxFilter->render() . '</td>';
$content .= '</tr>'; $content .= '</tr>';
$content .= '<tr>'; $content .= '<tr>';
$content .= '<td>&nbsp;</td>'; $content .= '<td>&nbsp;</td>';
$content .= '<td><input type="submit" value="'.i18n("Apply").'"></td>'; $content .= '<td><input type="submit" value="' . i18n("Apply") . '"></td>';
$content .= '</tr>'; $content .= '</tr>';
$content .= '</table>'; $content .= '</table>';
$content .= '</form>'; $content .= '</form>';
@ -172,7 +172,7 @@ $tpl->set('s', 'LISTOPTIONS', $oListOptionRow->render());
######### #########
# Paging # Paging
######### #########
$cApiUserCollection = new cApiUserCollection; $cApiUserCollection = new cApiUserCollection;
$cApiUserCollection->query(); $cApiUserCollection->query();
$iItemCount = $cApiUserCollection->count(); $iItemCount = $cApiUserCollection->count();
@ -188,12 +188,12 @@ $oPagerLink->setCustom("area", $area);
$oPagerLink->enableAutomaticParameterAppend(); $oPagerLink->enableAutomaticParameterAppend();
$oPagerLink->setCustom("contenido", $sess->id); $oPagerLink->setCustom("contenido", $sess->id);
$pagerID="pager"; $pagerID = "pager";
$page = (isset($page))?$page:1;
$oPager = new cObjectPager("44b41691-0dd4-443c-a594-66a8164e25fd", $iItemCount, $elemperpage, $page, $oPagerLink, "page", $pagerID); $oPager = new cObjectPager("44b41691-0dd4-443c-a594-66a8164e25fd", $iItemCount, $elemperpage, $page, $oPagerLink, "page", $pagerID);
$oPager->setExpanded('true'); $oPager->setExpanded('true');
$tpl->set('s', 'PAGINGLINK', $pagerID); $tpl->set('s', 'PAGINGLINK', $pagerID);
$tpl->set('s', 'PAGING', $oPager->render()); $tpl->set('s', 'PAGING', $oPager->render());
$tpl->generate($cfg['path']['templates'] . $cfg['templates']['rights_left_top']); $tpl->generate($cfg['path']['templates'] . $cfg['templates']['rights_left_top']);
?> ?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -28,9 +29,8 @@
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) {
if(!defined('CON_FRAMEWORK')) { die('Illegal call');
die('Illegal call');
} }
@ -40,25 +40,27 @@ $cApiUserCollection = new cApiUserCollection;
$cApiUserCollection->query(); $cApiUserCollection->query();
$iSumUsers = $cApiUserCollection->count(); $iSumUsers = $cApiUserCollection->count();
if (isset($_REQUEST["sortby"]) && $_REQUEST["sortby"] != "") if (empty($_REQUEST["sortby"])) {
{ $_REQUEST["sortby"] = 'username';
$cApiUserCollection->setOrder($_REQUEST["sortby"]. " ". $_REQUEST["sortorder"]); $_REQUEST["sortorder"] = 'asc';
} else { $cApiUserCollection->setOrder("username asc");
$cApiUserCollection->setOrder("username asc");
} }
if (isset($_REQUEST["filter"]) && $_REQUEST["filter"] != "") $cApiUserCollection->setOrder($_REQUEST["sortby"] . " " . $_REQUEST["sortorder"]);
{
$cApiUserCollection->setWhereGroup("default", "username", "%".$_REQUEST["filter"]."%", "LIKE"); if (!empty($_REQUEST["filter"])) {
$cApiUserCollection->setWhereGroup("default", "realname", "%".$_REQUEST["filter"]."%", "LIKE"); $cApiUserCollection->setWhereGroup("default", "username", "%" . $_REQUEST["filter"] . "%", "LIKE");
$cApiUserCollection->setWhereGroup("default", "email", "%".$_REQUEST["filter"]."%", "LIKE"); $cApiUserCollection->setWhereGroup("default", "realname", "%" . $_REQUEST["filter"] . "%", "LIKE");
$cApiUserCollection->setWhereGroup("default", "telephone", "%".$_REQUEST["filter"]."%", "LIKE"); $cApiUserCollection->setWhereGroup("default", "email", "%" . $_REQUEST["filter"] . "%", "LIKE");
$cApiUserCollection->setWhereGroup("default", "address_street", "%".$_REQUEST["filter"]."%", "LIKE"); $cApiUserCollection->setWhereGroup("default", "telephone", "%" . $_REQUEST["filter"] . "%", "LIKE");
$cApiUserCollection->setWhereGroup("default", "address_zip", "%".$_REQUEST["filter"]."%", "LIKE"); $cApiUserCollection->setWhereGroup("default", "address_street", "%" . $_REQUEST["filter"] . "%", "LIKE");
$cApiUserCollection->setWhereGroup("default", "address_city", "%".$_REQUEST["filter"]."%", "LIKE"); $cApiUserCollection->setWhereGroup("default", "address_zip", "%" . $_REQUEST["filter"] . "%", "LIKE");
$cApiUserCollection->setWhereGroup("default", "address_country", "%".$_REQUEST["filter"]."%", "LIKE"); $cApiUserCollection->setWhereGroup("default", "address_city", "%" . $_REQUEST["filter"] . "%", "LIKE");
$cApiUserCollection->setWhereGroup("default", "address_country", "%" . $_REQUEST["filter"] . "%", "LIKE");
$cApiUserCollection->setInnerGroupCondition("default", "OR");
$cApiUserCollection->setInnerGroupCondition("default", "OR");
} else {
$_REQUEST["filter"] = '';
} }
$cApiUserCollection->query(); $cApiUserCollection->query();
@ -67,108 +69,87 @@ $aCurrentUserAccessibleClients = $classclient->getAccessibleClients();
$iMenu = 0; $iMenu = 0;
$iItemCount = 0; $iItemCount = 0;
$mPage = $_REQUEST["page"]; $mPage = (isset($_REQUEST["page"])) ? (int) $_REQUEST["page"] : 1;
if ($mPage == 0) $elemperpage = (isset($_REQUEST["elemperpage"])) ? (int) $_REQUEST["elemperpage"] : 25;
{
$mPage = 1;
}
$elemperpage = $_REQUEST["elemperpage"];
if ($elemperpage == 0)
{
$elemperpage = 25;
}
$mlist = new UI_Menu; $mlist = new UI_Menu;
$sToday = date('Y-m-d'); $sToday = date('Y-m-d');
if (($elemperpage * $mPage) >= $iSumUsers + $elemperpage && $mPage != 1) {
if (($elemperpage*$mPage) >= $iSumUsers+$elemperpage && $mPage != 1) {
$_REQUEST["page"]--; $_REQUEST["page"]--;
$mPage--; $mPage--;
} }
while ($cApiUser = $cApiUserCollection->next()) while ($cApiUser = $cApiUserCollection->next()) {
{ $userid = $cApiUser->get("user_id");
$userid = $cApiUser->get("user_id");
$aUserPermissions = explode(',', $cApiUser->get('perms'));
$bDisplayUser = false;
if (in_array("sysadmin", $aCurrentUserPermissions)) $aUserPermissions = explode(',', $cApiUser->get('perms'));
{
$bDisplayUser = false;
if (in_array("sysadmin", $aCurrentUserPermissions)) {
$bDisplayUser = true; $bDisplayUser = true;
} }
foreach ($aCurrentUserAccessibleClients as $key => $value) foreach ($aCurrentUserAccessibleClients as $key => $value) {
{ if (in_array("client[$key]", $aUserPermissions)) {
if (in_array("client[$key]", $aUserPermissions))
{
$bDisplayUser = true; $bDisplayUser = true;
} }
} }
foreach ($aUserPermissions as $sLocalPermission) foreach ($aUserPermissions as $sLocalPermission) {
{ if (in_array($sLocalPermission, $aCurrentUserPermissions)) {
if (in_array($sLocalPermission, $aCurrentUserPermissions))
{
$bDisplayUser = true; $bDisplayUser = true;
} }
} }
$link = new cHTMLLink; $link = new cHTMLLink;
$link->setMultiLink("user", "", "user_overview", ""); $link->setMultiLink("user", "", "user_overview", "");
$link->setCustom("userid", $cApiUser->get("user_id")); $link->setCustom("userid", $cApiUser->get("user_id"));
if ($bDisplayUser == true)
{
$iItemCount++;
if ($iItemCount > ($elemperpage * ($mPage - 1)) && $iItemCount < (($elemperpage * $mPage) + 1)) if ($bDisplayUser == true) {
{ $iItemCount++;
if ($perm->have_perm_area_action('user',"user_delete") ) {
$message = sprintf(i18n("Do you really want to delete the user %s?"), $cApiUser->get("username"));
$delTitle = i18n("Delete user");
$deletebutton = '<a title="'.$delTitle.'" href="javascript://" onclick="box.confirm(\''.$delTitle.'\', \''.$message.'\', \'deleteBackenduser(\\\''.$userid.'\\\')\')"><img src="'.$cfg['path']['images'].'delete.gif" border="0" title="'.$delTitle.'" alt="'.$delTitle.'"></a>';
} else {
$deletebutton = "";
}
$iMenu++; if ($iItemCount > ($elemperpage * ($mPage - 1)) && $iItemCount < (($elemperpage * $mPage) + 1)) {
if ($perm->have_perm_area_action('user', "user_delete")) {
if (($sToday < $cApiUser->get("valid_from") $message = sprintf(i18n("Do you really want to delete the user %s?"), $cApiUser->get("username"));
&& $cApiUser->get("valid_from") != '0000-00-00'
&& $cApiUser->get("valid_from") != '1000-01-01' $delTitle = i18n("Delete user");
$deletebutton = '<a title="' . $delTitle . '" href="javascript://" onclick="box.confirm(\'' . $delTitle . '\', \'' . $message . '\', \'deleteBackenduser(\\\'' . $userid . '\\\')\')"><img src="' . $cfg['path']['images'] . 'delete.gif" border="0" title="' . $delTitle . '" alt="' . $delTitle . '"></a>';
} else {
$deletebutton = "";
}
$iMenu++;
if (($sToday < $cApiUser->get("valid_from")
&& $cApiUser->get("valid_from") != '0000-00-00'
&& $cApiUser->get("valid_from") != '1000-01-01'
&& $cApiUser->get("valid_from") != '') && $cApiUser->get("valid_from") != '')
|| ($sToday > $cApiUser->get("valid_to") || ($sToday > $cApiUser->get("valid_to")
&& $cApiUser->get("valid_to") != '0000-00-00' && $cApiUser->get("valid_to") != '0000-00-00'
&& $cApiUser->get("valid_to") != '1000-01-01' && $cApiUser->get("valid_to") != '1000-01-01'
&& $cApiUser->get("valid_from") != '')) { && $cApiUser->get("valid_from") != '')) {
$mlist->setTitle($iMenu, '<span style="color:#b3b3b8">'.$cApiUser->get("username")."<br>".$cApiUser->get("realname").'</span>'); $mlist->setTitle($iMenu, '<span style="color:#b3b3b8">' . $cApiUser->get("username") . "<br>" . $cApiUser->get("realname") . '</span>');
} else { } else {
$mlist->setTitle($iMenu, $cApiUser->get("username")."<br>".$cApiUser->get("realname")); $mlist->setTitle($iMenu, $cApiUser->get("username") . "<br>" . $cApiUser->get("realname"));
} }
$mlist->setLink($iMenu, $link); $mlist->setLink($iMenu, $link);
$mlist->setActions($iMenu, "delete", $deletebutton); $mlist->setActions($iMenu, "delete", $deletebutton);
if ($_GET['userid'] == $cApiUser->get("user_id")) { if (!empty($_GET['userid']) && $_GET['userid'] == $cApiUser->get("user_id")) {
$mlist->setExtra($iMenu, 'id="marked" '); $mlist->setExtra($iMenu, 'id="marked" ');
} }
} }
} }
} }
$deleteScript = '<script type="text/javascript"> $deleteScript = '<script type="text/javascript">
/* Session-ID */ /* Session-ID */
var sid = "'.$sess->id.'"; var sid = "' . $sess->id . '";
/* Create messageBox /* Create messageBox
instance */ instance */
@ -191,26 +172,26 @@ $deleteScript = '<script type="text/javascript">
url += \'&sortorder=\' +form.sortorder.value; url += \'&sortorder=\' +form.sortorder.value;
url += \'&filter=\' +form.filter.value; url += \'&filter=\' +form.filter.value;
url += \'&elemperpage=\' +form.elemperpage.value; url += \'&elemperpage=\' +form.elemperpage.value;
url += \'&page=\' +\''.$mPage.'\'; url += \'&page=\' +\'' . $mPage . '\';
parent.parent.right.right_bottom.location.href = url; parent.parent.right.right_bottom.location.href = url;
parent.parent.right.right_top.location.href = \'main.php?area=user&frame=3&contenido=\'+sid; parent.parent.right.right_top.location.href = \'main.php?area=user&frame=3&contenido=\'+sid;
} }
</script>'; </script>';
$markActiveScript = '<script type="text/javascript"> $markActiveScript = '<script type="text/javascript">
if (document.getElementById(\'marked\')) { if (document.getElementById(\'marked\')) {
row.markedRow = document.getElementById(\'marked\'); row.markedRow = document.getElementById(\'marked\');
} }
</script>'; </script>';
//<script type="text/javascript" src="scripts/rowMark.js"></script> //<script type="text/javascript" src="scripts/rowMark.js"></script>
$oPage->setMargin(0); $oPage->setMargin(0);
$oPage->addScript('rowMark.js', '<script language="JavaScript" src="scripts/rowMark.js"></script>'); $oPage->addScript('rowMark.js', '<script language="JavaScript" src="scripts/rowMark.js"></script>');
$oPage->addScript('parameterCollector.js', '<script language="JavaScript" src="scripts/parameterCollector.js"></script>'); $oPage->addScript('parameterCollector.js', '<script language="JavaScript" src="scripts/parameterCollector.js"></script>');
$oPage->addScript('messagebox', '<script type="text/javascript" src="scripts/messageBox.js.php?contenido='.$sess->id.'"></script>'); $oPage->addScript('messagebox', '<script type="text/javascript" src="scripts/messageBox.js.php?contenido=' . $sess->id . '"></script>');
$oPage->addScript('delete', $deleteScript); $oPage->addScript('delete', $deleteScript);
$oPage->setContent($mlist->render(false).$markActiveScript); $oPage->setContent($mlist->render(false) . $markActiveScript);
//generate current content for Object Pager //generate current content for Object Pager
$oPagerLink = new cHTMLLink; $oPagerLink = new cHTMLLink;
@ -225,10 +206,10 @@ $oPagerLink->setCustom("area", $area);
$oPagerLink->enableAutomaticParameterAppend(); $oPagerLink->enableAutomaticParameterAppend();
$oPagerLink->setCustom("contenido", $sess->id); $oPagerLink->setCustom("contenido", $sess->id);
$pagerID="pager"; $pagerID = "pager";
$page = (empty($page))?1:(int)$page;
$oPager = new cObjectPager("44b41691-0dd4-443c-a594-66a8164e25fd", $iItemCount, $elemperpage, $page, $oPagerLink, "page", $pagerID); $oPager = new cObjectPager("44b41691-0dd4-443c-a594-66a8164e25fd", $iItemCount, $elemperpage, $page, $oPagerLink, "page", $pagerID);
//add slashes, to insert in javascript //add slashes, to insert in javascript
$sPagerContent = $oPager->render(1); $sPagerContent = $oPager->render(1);
$sPagerContent = str_replace('\\', '\\\\', $sPagerContent); $sPagerContent = str_replace('\\', '\\\\', $sPagerContent);
@ -237,7 +218,7 @@ $sPagerContent = str_replace('\'', '\\\'', $sPagerContent);
//send new object pager to left_top //send new object pager to left_top
$sRefreshPager = ' $sRefreshPager = '
<script type="text/javascript"> <script type="text/javascript">
var sNavigation = \''.$sPagerContent.'\'; var sNavigation = \'' . $sPagerContent . '\';
var left_top = parent.left_top; var left_top = parent.left_top;
if (left_top.document) { if (left_top.document) {
var oPager = left_top.document.getElementById(\'44b41691-0dd4-443c-a594-66a8164e25fd\'); var oPager = left_top.document.getElementById(\'44b41691-0dd4-443c-a594-66a8164e25fd\');
@ -249,8 +230,6 @@ $sRefreshPager = '
} }
} }
</script>'; </script>';
$oPage->addScript('refreshpager', $sRefreshPager); $oPage->addScript('refreshpager', $sRefreshPager);
$oPage->render(); $oPage->render();
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -35,15 +36,13 @@
* TODO error handling!!! * TODO error handling!!!
* TODO export functions to new ConUser object! * TODO export functions to new ConUser object!
*/ */
if (!defined('CON_FRAMEWORK')) {
if(!defined('CON_FRAMEWORK')) { die('Illegal call');
die('Illegal call');
} }
cInclude('includes', 'functions.rights.php'); cInclude('includes', 'functions.rights.php');
if (!($perm->have_perm_area_action($area, $action) || $perm->have_perm_area_action('user', $action))) { if (!($perm->have_perm_area_action($area, $action) || $perm->have_perm_area_action('user', $action))) {
// access denied // access denied
$notification->displayNotification("error", i18n("Permission denied")); $notification->displayNotification("error", i18n("Permission denied"));
@ -55,8 +54,8 @@ if (!isset($userid)) {
return; return;
} }
$aPerms = array(); $aPerms = array();
$bError = false; $bError = false;
$sNotification = ''; $sNotification = '';
// delete user // delete user
@ -65,11 +64,11 @@ if ($action == 'user_delete') {
$oUsers->deleteUserByID($userid); $oUsers->deleteUserByID($userid);
$sql = "DELETE FROM " . $cfg["tab"]["groupmembers"] $sql = "DELETE FROM " . $cfg["tab"]["groupmembers"]
. " WHERE user_id = '" . Contenido_Security::escapeDB($userid, $db) . "'"; . " WHERE user_id = '" . Contenido_Security::escapeDB($userid, $db) . "'";
$db->query($sql); $db->query($sql);
$sql = "DELETE FROM " . $cfg["tab"]["rights"] $sql = "DELETE FROM " . $cfg["tab"]["rights"]
." WHERE user_id = '" . Contenido_Security::escapeDB($userid, $db) . "'"; . " WHERE user_id = '" . Contenido_Security::escapeDB($userid, $db) . "'";
$db->query($sql); $db->query($sql);
$sNotification = $notification->displayNotification("info", i18n("User deleted")); $sNotification = $notification->displayNotification("info", i18n("User deleted"));
@ -87,7 +86,7 @@ if ($action == 'user_delete') {
</body> </body>
</html> </html>
'; ';
$tpl->reset(); $tpl->reset();
$tpl->set('s', 'NOTIFICATION', $sNotification); $tpl->set('s', 'NOTIFICATION', $sNotification);
$tpl->generate($sTemplate); $tpl->generate($sTemplate);
@ -158,13 +157,19 @@ $oUser = new User();
$oUser->loadUserByUserID(Contenido_Security::escapeDB($userid, $db)); $oUser->loadUserByUserID(Contenido_Security::escapeDB($userid, $db));
// delete user property // delete user property
if (is_string($del_userprop_type) && is_string($del_userprop_name)) { if (!empty($del_userprop_type)
&& !empty($del_userprop_name)
&& is_string($del_userprop_type)
&& is_string($del_userprop_name)) {
$oUser->deleteUserProperty($del_userprop_type, $del_userprop_name); $oUser->deleteUserProperty($del_userprop_type, $del_userprop_name);
} }
// edit user property // edit user property
if (is_string($userprop_type) && is_string($userprop_name) && is_string($userprop_value) if (!empty($userprop_type)
&& !empty($userprop_type) && !empty($userprop_name)) { && !empty($userprop_name)
&& is_string($userprop_type)
&& is_string($userprop_name)
&& is_string($userprop_value)) {
$oUser->setUserProperty($userprop_type, $userprop_name, $userprop_value); $oUser->setUserProperty($userprop_type, $userprop_name, $userprop_value);
} }
@ -174,16 +179,16 @@ if (count($aPerms) == 0 || $action == '' || !isset($action)) {
$tpl->reset(); $tpl->reset();
$tpl->set('s','SID', $sess->id); $tpl->set('s', 'SID', $sess->id);
$tpl->set('s','NOTIFICATION', $sNotification); $tpl->set('s', 'NOTIFICATION', $sNotification);
$form = '<form name="user_properties" method="post" action="'.$sess->url("main.php?").'"> $form = '<form name="user_properties" method="post" action="' . $sess->url("main.php?") . '">
'.$sess->hidden_session(true).' ' . $sess->hidden_session(true) . '
<input type="hidden" name="area" value="'.$area.'"> <input type="hidden" name="area" value="' . $area . '">
<input type="hidden" name="action" value="user_edit"> <input type="hidden" name="action" value="user_edit">
<input type="hidden" name="frame" value="'.$frame.'"> <input type="hidden" name="frame" value="' . $frame . '">
<input type="hidden" name="userid" value="'.$userid.'"> <input type="hidden" name="userid" value="' . $userid . '">
<input type="hidden" name="idlang" value="'.$lang.'">'; <input type="hidden" name="idlang" value="' . $lang . '">';
$tpl->set('s', 'FORM', $form); $tpl->set('s', 'FORM', $form);
$tpl->set('s', 'GET_USERID', $userid); $tpl->set('s', 'GET_USERID', $userid);
@ -193,9 +198,8 @@ $tpl->set('s', 'SUBMITTEXT', i18n("Save changes"));
$tpl->set('s', 'CANCELTEXT', i18n("Discard changes")); $tpl->set('s', 'CANCELTEXT', i18n("Discard changes"));
$tpl->set('s', 'CANCELLINK', $sess->url("main.php?area=$area&frame=4&userid=$userid")); $tpl->set('s', 'CANCELLINK', $sess->url("main.php?area=$area&frame=4&userid=$userid"));
$tpl->set('d', 'CATNAME', i18n("Property")); $tpl->set('d', 'CATNAME', i18n("Property"));
$tpl->set('d', 'BGCOLOR', $cfg["color"]["table_header"]); $tpl->set('d', 'BGCOLOR', $cfg["color"]["table_header"]);
$tpl->set('d', 'BORDERCOLOR', $cfg["color"]["table_border"]); $tpl->set('d', 'BORDERCOLOR', $cfg["color"]["table_border"]);
$tpl->set('d', 'CATFIELD', i18n("Value")); $tpl->set('d', 'CATFIELD', i18n("Value"));
$tpl->next(); $tpl->next();
@ -203,7 +207,7 @@ $tpl->next();
$tpl->set('d', 'CATNAME', i18n("Username")); $tpl->set('d', 'CATNAME', i18n("Username"));
$tpl->set('d', 'BGCOLOR', $cfg["color"]["table_light"]); $tpl->set('d', 'BGCOLOR', $cfg["color"]["table_light"]);
$tpl->set('d', 'BORDERCOLOR', $cfg["color"]["table_border"]); $tpl->set('d', 'BORDERCOLOR', $cfg["color"]["table_border"]);
$tpl->set('d', 'CATFIELD', $oUser->getField('username').'<img align="top" src="images/spacer.gif" height="20">'); $tpl->set('d', 'CATFIELD', $oUser->getField('username') . '<img align="top" src="images/spacer.gif" height="20">');
$tpl->next(); $tpl->next();
$tpl->set('d', 'CATNAME', i18n("Name")); $tpl->set('d', 'CATNAME', i18n("Name"));
@ -213,7 +217,7 @@ $tpl->set('d', 'CATFIELD', formGenerateField("text", "realname", $oUser->getFiel
$tpl->next(); $tpl->next();
// @since 2006-07-04 Display password fields only if not authenticated via LDAP/AD // @since 2006-07-04 Display password fields only if not authenticated via LDAP/AD
if ($msysadmin || $oUser->getField('password') != 'active_directory_auth') { if ((isset($msysadmin) && $msysadmin) || $oUser->getField('password') != 'active_directory_auth') {
$tpl->set('d', 'CATNAME', i18n("New password")); $tpl->set('d', 'CATNAME', i18n("New password"));
$tpl->set('d', 'BGCOLOR', $cfg["color"]["table_light"]); $tpl->set('d', 'BGCOLOR', $cfg["color"]["table_light"]);
$tpl->set('d', 'BORDERCOLOR', $cfg["color"]["table_border"]); $tpl->set('d', 'BORDERCOLOR', $cfg["color"]["table_border"]);
@ -280,14 +284,14 @@ $oClientsCollection = new cApiClientCollection();
$aClients = $oClientsCollection->getAvailableClients(); $aClients = $oClientsCollection->getAvailableClients();
$sClientCheckboxes = ''; $sClientCheckboxes = '';
foreach ($aClients as $idclient => $item) { foreach ($aClients as $idclient => $item) {
if (in_array("admin[".$idclient."]", $aAuthPerms) || in_array('sysadmin', $aAuthPerms)){ if (in_array("admin[" . $idclient . "]", $aAuthPerms) || in_array('sysadmin', $aAuthPerms)) {
$sClientCheckboxes .= formGenerateCheckbox("madmin[".$idclient."]", $idclient, in_array("admin[".$idclient."]", $aPerms), $item['name']." (".$idclient.")")."<br>"; $sClientCheckboxes .= formGenerateCheckbox("madmin[" . $idclient . "]", $idclient, in_array("admin[" . $idclient . "]", $aPerms), $item['name'] . " (" . $idclient . ")") . "<br>";
} }
} }
if ($sClientCheckboxes !== '' && !in_array('sysadmin', $aPerms)) { if ($sClientCheckboxes !== '' && !in_array('sysadmin', $aPerms)) {
$tpl->set('d', 'CATNAME', i18n("Administrator")); $tpl->set('d', 'CATNAME', i18n("Administrator"));
$tpl->set('d', 'BORDERCOLOR', $cfg["color"]["table_border"]); $tpl->set('d', 'BORDERCOLOR', $cfg["color"]["table_border"]);
$tpl->set('d', 'BGCOLOR', $cfg["color"]["table_dark"]); $tpl->set('d', 'BGCOLOR', $cfg["color"]["table_dark"]);
$tpl->set('d', 'CATFIELD', $sClientCheckboxes); $tpl->set('d', 'CATFIELD', $sClientCheckboxes);
$tpl->next(); $tpl->next();
@ -296,14 +300,14 @@ if ($sClientCheckboxes !== '' && !in_array('sysadmin', $aPerms)) {
// clients perms // clients perms
$sClientCheckboxes = ''; $sClientCheckboxes = '';
foreach ($aClients as $idclient => $item) { foreach ($aClients as $idclient => $item) {
if ((in_array("client[".$idclient."]", $aAuthPerms) || in_array('sysadmin', $aAuthPerms) || in_array("admin[".$idclient."]", $aAuthPerms)) && !in_array("admin[".$idclient."]", $aPerms)) { if ((in_array("client[" . $idclient . "]", $aAuthPerms) || in_array('sysadmin', $aAuthPerms) || in_array("admin[" . $idclient . "]", $aAuthPerms)) && !in_array("admin[" . $idclient . "]", $aPerms)) {
$sClientCheckboxes .= formGenerateCheckbox("mclient[".$idclient."]", $idclient, in_array("client[".$idclient."]", $aPerms), $item['name']." (". $idclient . ")")."<br>"; $sClientCheckboxes .= formGenerateCheckbox("mclient[" . $idclient . "]", $idclient, in_array("client[" . $idclient . "]", $aPerms), $item['name'] . " (" . $idclient . ")") . "<br>";
} }
} }
if ($sClientCheckboxes !== '' && !in_array('sysadmin', $aPerms)) { if ($sClientCheckboxes !== '' && !in_array('sysadmin', $aPerms)) {
$tpl->set('d', 'CATNAME', i18n("Access clients")); $tpl->set('d', 'CATNAME', i18n("Access clients"));
$tpl->set('d', 'BORDERCOLOR', $cfg["color"]["table_border"]); $tpl->set('d', 'BORDERCOLOR', $cfg["color"]["table_border"]);
$tpl->set('d', 'BGCOLOR', $cfg["color"]["table_light"]); $tpl->set('d', 'BGCOLOR', $cfg["color"]["table_light"]);
$tpl->set('d', 'CATFIELD', $sClientCheckboxes); $tpl->set('d', 'CATFIELD', $sClientCheckboxes);
$tpl->next(); $tpl->next();
@ -313,14 +317,14 @@ if ($sClientCheckboxes !== '' && !in_array('sysadmin', $aPerms)) {
$aClientsLanguages = getAllClientsAndLanguages(); $aClientsLanguages = getAllClientsAndLanguages();
$sClientCheckboxes = ''; $sClientCheckboxes = '';
foreach ($aClientsLanguages as $item) { foreach ($aClientsLanguages as $item) {
if (($perm->have_perm_client("lang[".$item['idlang']."]") || $perm->have_perm_client("admin[".$item['idclient']."]")) && !in_array("admin[".$item['idclient']."]", $aPerms)) { if (($perm->have_perm_client("lang[" . $item['idlang'] . "]") || $perm->have_perm_client("admin[" . $item['idclient'] . "]")) && !in_array("admin[" . $item['idclient'] . "]", $aPerms)) {
$sClientCheckboxes .= formGenerateCheckbox("mlang[".$item['idlang']."]", $item['idlang'], in_array("lang[".$item['idlang']."]", $aPerms), $item['langname']." (". $item['clientname'] .")") ."<br>"; $sClientCheckboxes .= formGenerateCheckbox("mlang[" . $item['idlang'] . "]", $item['idlang'], in_array("lang[" . $item['idlang'] . "]", $aPerms), $item['langname'] . " (" . $item['clientname'] . ")") . "<br>";
} }
} }
if ($sClientCheckboxes != '' && !in_array('sysadmin', $aPerms)) { if ($sClientCheckboxes != '' && !in_array('sysadmin', $aPerms)) {
$tpl->set('d', 'CATNAME', i18n("Access languages")); $tpl->set('d', 'CATNAME', i18n("Access languages"));
$tpl->set('d', 'BORDERCOLOR', $cfg["color"]["table_border"]); $tpl->set('d', 'BORDERCOLOR', $cfg["color"]["table_border"]);
$tpl->set('d', 'BGCOLOR', $cfg["color"]["table_dark"]); $tpl->set('d', 'BGCOLOR', $cfg["color"]["table_dark"]);
$tpl->set('d', 'CATFIELD', $sClientCheckboxes); $tpl->set('d', 'CATFIELD', $sClientCheckboxes);
$tpl->next(); $tpl->next();
@ -329,11 +333,11 @@ if ($sClientCheckboxes != '' && !in_array('sysadmin', $aPerms)) {
// user properties // user properties
$aProperties = $oUser->getUserProperties(); $aProperties = $oUser->getUserProperties();
$sPropRows = ''; $sPropRows = '';
foreach ($aProperties as $entry) { foreach ($aProperties as $entry) {
$type = $entry['type']; $type = $entry['type'];
if ($type != 'system') { if ($type != 'system') {
$name = $entry['name']; $name = $entry['name'];
$value = $entry['value']; $value = $entry['value'];
$sPropRows .= ' $sPropRows .= '
<tr class="text_medium"> <tr class="text_medium">
@ -347,11 +351,11 @@ foreach ($aProperties as $entry) {
} }
} }
$table = ' $table = '
<table width="100%" cellspacing="0" cellpadding="2" style="border:1px solid '.$cfg["color"]["table_border"].';"> <table width="100%" cellspacing="0" cellpadding="2" style="border:1px solid ' . $cfg["color"]["table_border"] . ';">
<tr style="background-color:'.$cfg["color"]["table_header"].'" class="text_medium"> <tr style="background-color:' . $cfg["color"]["table_header"] . '" class="text_medium">
<td>'.i18n("Area/Type").'</td> <td>' . i18n("Area/Type") . '</td>
<td>'.i18n("Property").'</td> <td>' . i18n("Property") . '</td>
<td>'.i18n("Value").'</td> <td>' . i18n("Value") . '</td>
<td>&nbsp;</td> <td>&nbsp;</td>
</tr> </tr>
' . $sPropRows . ' ' . $sPropRows . '
@ -364,7 +368,7 @@ $table = '
</table>'; </table>';
$tpl->set('d', 'CATNAME', i18n("User-defined properties")); $tpl->set('d', 'CATNAME', i18n("User-defined properties"));
$tpl->set('d', 'BORDERCOLOR', $cfg["color"]["table_border"]); $tpl->set('d', 'BORDERCOLOR', $cfg["color"]["table_border"]);
$tpl->set('d', 'BGCOLOR', $cfg["color"]["table_light"]); $tpl->set('d', 'BGCOLOR', $cfg["color"]["table_light"]);
$tpl->set('d', 'CATFIELD', $table); $tpl->set('d', 'CATFIELD', $table);
$tpl->next(); $tpl->next();
@ -383,9 +387,9 @@ $sCurrentValueFrom = trim(str_replace('1000-01-01', '', $sCurrentValueFrom));
$sInputValidFrom = '<style type="text/css">@import url(./scripts/jscalendar/calendar-contenido.css);</style> $sInputValidFrom = '<style type="text/css">@import url(./scripts/jscalendar/calendar-contenido.css);</style>
<script type="text/javascript" src="./scripts/jscalendar/calendar.js"></script> <script type="text/javascript" src="./scripts/jscalendar/calendar.js"></script>
<script type="text/javascript" src="./scripts/jscalendar/lang/calendar-'.substr(strtolower($belang),0,2).'.js"></script> <script type="text/javascript" src="./scripts/jscalendar/lang/calendar-' . substr(strtolower($belang), 0, 2) . '.js"></script>
<script type="text/javascript" src="./scripts/jscalendar/calendar-setup.js"></script>'; <script type="text/javascript" src="./scripts/jscalendar/calendar-setup.js"></script>';
$sInputValidFrom .= '<input type="text" id="valid_from" name="valid_from" value="'.$sCurrentValueFrom.'" />&nbsp;<img src="images/calendar.gif" id="trigger" /">'; $sInputValidFrom .= '<input type="text" id="valid_from" name="valid_from" value="' . $sCurrentValueFrom . '" />&nbsp;<img src="images/calendar.gif" id="trigger" /">';
$sInputValidFrom .= '<script type="text/javascript"> $sInputValidFrom .= '<script type="text/javascript">
Calendar.setup({ Calendar.setup({
inputField: "valid_from", inputField: "valid_from",
@ -406,7 +410,7 @@ $sCurrentValueTo = str_replace('00:00:00', '', $oUser->getField('valid_to'));
$sCurrentValueTo = trim(str_replace('0000-00-00', '', $sCurrentValueTo)); $sCurrentValueTo = trim(str_replace('0000-00-00', '', $sCurrentValueTo));
$sCurrentValueTo = trim(str_replace('1000-01-01', '', $sCurrentValueTo)); $sCurrentValueTo = trim(str_replace('1000-01-01', '', $sCurrentValueTo));
$sInputValidTo = '<input type="text" id="valid_to" name="valid_to" value="'.$sCurrentValueTo.'" />&nbsp;<img src="images/calendar.gif" id="trigger_to" /">'; $sInputValidTo = '<input type="text" id="valid_to" name="valid_to" value="' . $sCurrentValueTo . '" />&nbsp;<img src="images/calendar.gif" id="trigger_to" /">';
$sInputValidTo .= '<script type="text/javascript"> $sInputValidTo .= '<script type="text/javascript">
Calendar.setup({ Calendar.setup({
inputField: "valid_to", inputField: "valid_to",
@ -418,7 +422,7 @@ $sInputValidTo .= '<script type="text/javascript">
</script>'; </script>';
$tpl->set('d', 'CATNAME', i18n("Valid to")); $tpl->set('d', 'CATNAME', i18n("Valid to"));
$tpl->set('d', 'BORDERCOLOR', $cfg["color"]["table_border"]); $tpl->set('d', 'BORDERCOLOR', $cfg["color"]["table_border"]);
$tpl->set('d', 'BGCOLOR', $cfg["color"]["table_light"]); $tpl->set('d', 'BGCOLOR', $cfg["color"]["table_light"]);
$tpl->set('d', 'CATFIELD', $sInputValidTo); $tpl->set('d', 'CATFIELD', $sInputValidTo);
$tpl->next(); $tpl->next();
@ -445,7 +449,7 @@ if (($sCurrentValueFrom > $sCurrentDate) || ($sCurrentValueTo < $sCurrentDate))
$tpl->set('d', 'CATNAME', '&nbsp;'); $tpl->set('d', 'CATNAME', '&nbsp;');
$tpl->set('d', 'BORDERCOLOR', $cfg["color"]["table_border"]); $tpl->set('d', 'BORDERCOLOR', $cfg["color"]["table_border"]);
$tpl->set('d', 'BGCOLOR', $cfg["color"]["table_dark"]); $tpl->set('d', 'BGCOLOR', $cfg["color"]["table_dark"]);
$tpl->set('d', 'CATFIELD', '<span style="color:'.$sAccountColor.';">'.$sAccountState.'</span>'); $tpl->set('d', 'CATFIELD', '<span style="color:' . $sAccountColor . ';">' . $sAccountState . '</span>');
$tpl->next(); $tpl->next();
// Show backend user's group memberships // Show backend user's group memberships
@ -458,12 +462,11 @@ if (count($aGroups) > 0) {
} }
$tpl->set('d', 'CATNAME', i18n("Group membership")); $tpl->set('d', 'CATNAME', i18n("Group membership"));
$tpl->set('d', 'BORDERCOLOR', $cfg["color"]["table_border"]); $tpl->set('d', 'BORDERCOLOR', $cfg["color"]["table_border"]);
$tpl->set('d', 'BGCOLOR', $cfg["color"]["table_dark"]); $tpl->set('d', 'BGCOLOR', $cfg["color"]["table_dark"]);
$tpl->set('d', 'CATFIELD', $sGroups); $tpl->set('d', 'CATFIELD', $sGroups);
$tpl->next(); $tpl->next();
// Generate template // Generate template
$tpl->generate($cfg['path']['templates'] . $cfg['templates']['rights_overview']); $tpl->generate($cfg['path']['templates'] . $cfg['templates']['rights_overview']);
?> ?>

Datei anzeigen

@ -111,6 +111,7 @@ $aManagedProperties = array(
); );
$aSettings = getSystemProperties(1); $aSettings = getSystemProperties(1);
$sNotification = '';
if (isset($_POST['action']) && $_POST['action'] == 'edit_sysconf' && $perm->have_perm_area_action($area, 'edit_sysconf')) { if (isset($_POST['action']) && $_POST['action'] == 'edit_sysconf' && $perm->have_perm_area_action($area, 'edit_sysconf')) {
$bStored = false; $bStored = false;
@ -192,5 +193,4 @@ if ($perm->have_perm_area_action($area, 'edit_sysconf')) {
$oPage->setContent($notification->returnNotification("error", i18n('Access denied'), 1)); $oPage->setContent($notification->returnNotification("error", i18n('Access denied'), 1));
} }
$oPage->addScript('setMenu', $sJs); $oPage->addScript('setMenu', $sJs);
$oPage->render(); $oPage->render();
?>

Datei anzeigen

@ -38,6 +38,7 @@ $aManagedValues = array('versioning_prune_limit', 'update_check', 'update_news_f
'system_mail_sender_name', 'pw_request_enable', 'maintenance_mode', 'edit_area_activated', 'system_mail_sender_name', 'pw_request_enable', 'maintenance_mode', 'edit_area_activated',
'backend_preferred_idclient', 'generator_basehref', 'generator_xhtml', 'imagemagick_available', 'backend_preferred_idclient', 'generator_basehref', 'generator_xhtml', 'imagemagick_available',
'system_insight_editing_activated'); 'system_insight_editing_activated');
$sWarning = '';
if ($action == "systemsettings_save_item") { if ($action == "systemsettings_save_item") {
if (!in_array($systype . '_' . $sysname, $aManagedValues)) { if (!in_array($systype . '_' . $sysname, $aManagedValues)) {

Datei anzeigen

@ -44,14 +44,14 @@ if (($action == "tpl_new") && (!$perm->have_perm_area_action_anyitem($area, $act
} }
$sql = "SELECT $sql = "SELECT
a.idtpl, a.name as name, a.description, a.idlay, b.description as laydescription, a.defaulttemplate a.idtpl, a.name as name, a.description, a.idlay, b.description as laydescription, a.defaulttemplate
FROM FROM
" . $cfg['tab']['tpl'] . " AS a " . $cfg['tab']['tpl'] . " AS a
LEFT JOIN LEFT JOIN
" . $cfg['tab']['lay'] . " AS b " . $cfg['tab']['lay'] . " AS b
ON a.idlay=b.idlay ON a.idlay=b.idlay
WHERE a.idtpl='" . Contenido_Security::toInteger($idtpl) . "' WHERE a.idtpl='" . Contenido_Security::toInteger($idtpl) . "'
ORDER BY name"; ORDER BY name";
$db->query($sql); $db->query($sql);
@ -65,11 +65,11 @@ if (($action == "tpl_new") && (!$perm->have_perm_area_action_anyitem($area, $act
} }
$sql = "SELECT $sql = "SELECT
number, idmod number, idmod
FROM FROM
" . $cfg['tab']['container'] . " " . $cfg['tab']['container'] . "
WHERE WHERE
idtpl='" . Contenido_Security::toInteger($idtpl) . "'"; idtpl='" . Contenido_Security::toInteger($idtpl) . "'";
$db->query($sql); $db->query($sql);
while ($db->next_record()) { while ($db->next_record()) {
@ -93,12 +93,12 @@ if (($action == "tpl_new") && (!$perm->have_perm_area_action_anyitem($area, $act
$tpl2->next(); $tpl2->next();
} }
$sql = "SELECT $sql = "SELECT
idlay, name idlay, name
FROM FROM
" . $cfg['tab']['lay'] . " " . $cfg['tab']['lay'] . "
WHERE WHERE
idclient='" . Contenido_Security::toInteger($client) . "' idclient='" . Contenido_Security::toInteger($client) . "'
ORDER BY name"; ORDER BY name";
$db->query($sql); $db->query($sql);
@ -119,12 +119,12 @@ if (($action == "tpl_new") && (!$perm->have_perm_area_action_anyitem($area, $act
$select = $tpl2->generate($cfg['path']['templates'] . $cfg['templates']['generic_select'], true); $select = $tpl2->generate($cfg['path']['templates'] . $cfg['templates']['generic_select'], true);
$sql = "SELECT $sql = "SELECT
idmod, name, type idmod, name, type
FROM FROM
" . $cfg['tab']['mod'] . " " . $cfg['tab']['mod'] . "
WHERE WHERE
idclient='" . Contenido_Security::toInteger($client) . "' idclient='" . Contenido_Security::toInteger($client) . "'
ORDER BY name"; ORDER BY name";
$db->query($sql); $db->query($sql);
@ -153,7 +153,6 @@ if (($action == "tpl_new") && (!$perm->have_perm_area_action_anyitem($area, $act
$descr = new cHTMLTextarea("description", $description); $descr = new cHTMLTextarea("description", $description);
$form->add(i18n("Description"), $descr->render()); $form->add(i18n("Description"), $descr->render());
$standardcb = new cHTMLCheckbox("vdefault", 1, "", $vdefault); $standardcb = new cHTMLCheckbox("vdefault", 1, "", $vdefault);
$form->add(i18n("Default"), $standardcb->toHTML(false)); $form->add(i18n("Default"), $standardcb->toHTML(false));
@ -165,7 +164,13 @@ if (($action == "tpl_new") && (!$perm->have_perm_area_action_anyitem($area, $act
$raw_code = ($oLayout->virgin) ? "" : $oLayout->getLayout(); $raw_code = ($oLayout->virgin) ? "" : $oLayout->getLayout();
tplPreparseLayout($idlay, $raw_code); tplPreparseLayout($idlay, $raw_code);
$tmp_returnstring = tplBrowseLayoutForContainers($idlay, $raw_code); $tmp_returnstring = tplBrowseLayoutForContainers($idlay, $raw_code);
$a_container = explode("&", $tmp_returnstring); var_dump($tmp_returnstring);
if(empty($tmp_returnstring)) {
$a_container = [];
} else {
$a_container = explode("&", $tmp_returnstring);
}
foreach ($a_container as $key => $value) { foreach ($a_container as $key => $value) {
if ($value != 0) { if ($value != 0) {
// Loop through containers **************** // Loop through containers ****************
@ -212,7 +217,7 @@ if (($action == "tpl_new") && (!$perm->have_perm_area_action_anyitem($area, $act
} }
$allowedtypes = tplGetContainerTypes($idlay, $value); $allowedtypes = tplGetContainerTypes($idlay, $value);
foreach ($modules as $key => $val) { foreach ($modules as $key => $val) {
$option = new cHTMLOptionElement($val["name"], $key); $option = new cHTMLOptionElement($val["name"], $key);
@ -250,5 +255,4 @@ if (($action == "tpl_new") && (!$perm->have_perm_area_action_anyitem($area, $act
} }
$page->render(); $page->render();
} }
?>

Datei anzeigen

@ -278,7 +278,7 @@ $tpl->set('s', 'TEMPLATECAPTION', i18n("Template"));
$tpl2 = new Template; $tpl2 = new Template;
$tpl2->set('s', 'NAME', 'idtpl'); $tpl2->set('s', 'NAME', 'idtpl');
$tpl2->set('s', 'CLASS', 'text_medium'); $tpl2->set('s', 'CLASS', 'text_medium');
$disabled2 = '';
if (!$perm->have_perm_area_action_item("con", "con_changetemplate", $idcat)) { if (!$perm->have_perm_area_action_item("con", "con_changetemplate", $idcat)) {
$disabled2 = 'disabled="disabled"'; $disabled2 = 'disabled="disabled"';
} }

Datei anzeigen

@ -73,6 +73,10 @@ if (!isset($path) && $sess->is_registered("upl_last_path")) {
$path = $upl_last_path; $path = $upl_last_path;
} }
if(is_null($path)) {
$path = '';
}
$appendparameters = $_REQUEST["appendparameters"]; $appendparameters = $_REQUEST["appendparameters"];
if (!isset($action)) if (!isset($action))

Datei anzeigen

@ -347,7 +347,7 @@ class UploadList extends FrontendList {
case "xbm": case "xbm":
case "wbmp": case "wbmp":
$sCacheThumbnail = uplGetThumbnail($data, 150); $sCacheThumbnail = uplGetThumbnail($data, 150);
$sCacheName = substr($sCacheThumbnail, strrpos($sCacheThumbnail, "/") + 1, strlen($sCacheThumbnail) - (strrchr($sCacheThumbnail, '/') + 1)); $sCacheName = substr($sCacheThumbnail, strrpos($sCacheThumbnail, "/") + 1, strlen($sCacheThumbnail) - (strlen(strrchr($sCacheThumbnail, '/')) + 1));
$sFullPath = $cfgClient[$client]['path']['frontend'] . 'cache/' . $sCacheName; $sFullPath = $cfgClient[$client]['path']['frontend'] . 'cache/' . $sCacheName;
if (file_exists($sFullPath)) { if (file_exists($sFullPath)) {
$aDimensions = getimagesize($sFullPath); $aDimensions = getimagesize($sFullPath);
@ -430,17 +430,21 @@ class UploadList extends FrontendList {
* @param type $sErrorMessage * @param type $sErrorMessage
* @return type * @return type
*/ */
function uplRender($path, $sortby, $sortmode, $startpage = 1, $thumbnailmode, $sErrorMessage) { function uplRender($path, $sortby, $sortmode, $startpage, $thumbnailmode, $sErrorMessage) {
global $cfg, $client, $cfgClient, $area, $frame, $sess, $browserparameters, $appendparameters, $perm, $auth, $sReloadScript, $notification, $bDirectoryIsWritable; global $cfg, $client, $cfgClient, $area, $frame, $sess, $browserparameters, $appendparameters, $perm, $auth, $sReloadScript, $notification, $bDirectoryIsWritable;
if ($sortby == "") { if(empty($sortby)) {
$sortby = 3; $sortby = 3;
$sortmode = "ASC"; $sortmode = "ASC";
} }
if ($startpage == "") { if(empty($startpage)) {
$startpage = 1; $startpage = 1;
} }
if(is_null($path)) {
$path = '';
}
$thisfile = $sess->url("main.php?idarea=$area&frame=$frame&path=$path&thumbnailmode=$thumbnailmode&appendparameters=$appendparameters"); $thisfile = $sess->url("main.php?idarea=$area&frame=$frame&path=$path&thumbnailmode=$thumbnailmode&appendparameters=$appendparameters");
$scrollthisfile = $thisfile . "&sortmode=$sortmode&sortby=$sortby&appendparameters=$appendparameters"; $scrollthisfile = $thisfile . "&sortmode=$sortmode&sortby=$sortby&appendparameters=$appendparameters";

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -31,63 +32,61 @@
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) {
if(!defined('CON_FRAMEWORK')) { die('Illegal call');
die('Illegal call');
} }
cInclude('pear', 'XML/Parser.php'); cInclude('pear', 'XML/Parser.php');
cInclude('pear', 'XML/RSS.php'); cInclude('pear', 'XML/RSS.php');
if(!isset($oTpl) || !is_object($oTpl)) { if (!isset($oTpl) || !is_object($oTpl)) {
$oTpl = new Template(); $oTpl = new Template();
} }
$oTpl->reset(); $oTpl->reset();
if ($saveLoginTime == true) { if ($saveLoginTime == true) {
$sess->register("saveLoginTime"); $sess->register("saveLoginTime");
$saveLoginTime= 0; $saveLoginTime = 0;
$vuser= new User(); $vuser = new User();
$vuser->loadUserByUserID($auth->auth["uid"]); $vuser->loadUserByUserID($auth->auth["uid"]);
$lastTime= $vuser->getUserProperty("system", "currentlogintime");
$timestamp= date("Y-m-d H:i:s");
$vuser->setUserProperty("system", "currentlogintime", $timestamp);
$vuser->setUserProperty("system", "lastlogintime", $lastTime);
$lastTime = $vuser->getUserProperty("system", "currentlogintime");
$timestamp = date("Y-m-d H:i:s");
$vuser->setUserProperty("system", "currentlogintime", $timestamp);
$vuser->setUserProperty("system", "lastlogintime", $lastTime);
} }
$vuser= new User(); $vuser = new User();
$vuser->loadUserByUserID($auth->auth["uid"]); $vuser->loadUserByUserID($auth->auth["uid"]);
$lastlogin= $vuser->getUserProperty("system", "lastlogintime"); $lastlogin = $vuser->getUserProperty("system", "lastlogintime");
if ($lastlogin == "") { if ($lastlogin == "") {
$lastlogin= i18n("No Login Information available."); $lastlogin = i18n("No Login Information available.");
} }
$aNotifications = array(); $aNotifications = array();
// notification for requested password // notification for requested password
if($vuser->getField('using_pw_request') == 1) { if ($vuser->getField('using_pw_request') == 1) {
//$sPwNoti = $notification->returnNotification("warning", i18n("You're logged in with a temporary password. Please change your password.")); //$sPwNoti = $notification->returnNotification("warning", i18n("You're logged in with a temporary password. Please change your password."));
$aNotifications[] = i18n("You're logged in with a temporary password. Please change your password."); $aNotifications[] = i18n("You're logged in with a temporary password. Please change your password.");
} }
// Check, if setup folder is still available // Check, if setup folder is still available
if (file_exists(dirname(dirname(dirname(__FILE__)))."/setup")) { if (file_exists(dirname(dirname(dirname(__FILE__))) . "/setup")) {
$aNotifications[] = i18n("The setup directory still exists. Please remove the setup directory before you continue."); $aNotifications[] = i18n("The setup directory still exists. Please remove the setup directory before you continue.");
} }
// Check, if sysadmin and/or admin accounts are still using well-known default passwords // Check, if sysadmin and/or admin accounts are still using well-known default passwords
$sDate = date('Y-m-d'); $sDate = date('Y-m-d');
$sSQL = "SELECT * FROM ".$cfg["tab"]["phplib_auth_user_md5"]." $sSQL = "SELECT * FROM " . $cfg["tab"]["phplib_auth_user_md5"] . "
WHERE (username = 'sysadmin' AND password = '48a365b4ce1e322a55ae9017f3daf0c0' WHERE (username = 'sysadmin' AND password = '48a365b4ce1e322a55ae9017f3daf0c0'
AND (valid_from <= '".Contenido_Security::escapeDB($sDate, $db)."' OR valid_from = '0000-00-00' OR valid_from = '1000-01-01' OR valid_from is NULL) AND AND (valid_from <= '" . Contenido_Security::escapeDB($sDate, $db) . "' OR valid_from = '0000-00-00' OR valid_from = '1000-01-01' OR valid_from is NULL) AND
(valid_to >= '".Contenido_Security::escapeDB($sDate, $db)."' OR valid_to = '0000-00-00' OR valid_to is NULL)) (valid_to >= '" . Contenido_Security::escapeDB($sDate, $db) . "' OR valid_to = '0000-00-00' OR valid_to is NULL))
OR (username = 'admin' AND password = '21232f297a57a5a743894a0e4a801fc3' OR (username = 'admin' AND password = '21232f297a57a5a743894a0e4a801fc3'
AND (valid_from <= '".Contenido_Security::escapeDB($sDate, $db)."' OR valid_from = '0000-00-00' OR valid_from = '1000-01-01' OR valid_from is NULL) AND AND (valid_from <= '" . Contenido_Security::escapeDB($sDate, $db) . "' OR valid_from = '0000-00-00' OR valid_from = '1000-01-01' OR valid_from is NULL) AND
(valid_to >= '".Contenido_Security::escapeDB($sDate, $db)."' OR valid_to = '0000-00-00' OR valid_to = '1000-01-01' OR valid_to is NULL)) (valid_to >= '" . Contenido_Security::escapeDB($sDate, $db) . "' OR valid_to = '0000-00-00' OR valid_to = '1000-01-01' OR valid_to is NULL))
"; ";
$db->query($sSQL); $db->query($sSQL);
@ -97,7 +96,7 @@ if ($db->num_rows() > 0) {
if (count($aNotifications) > 0) { if (count($aNotifications) > 0) {
$oNotification = new Contenido_Notification(); $oNotification = new Contenido_Notification();
$sNotification = $oNotification->messageBox("warning", implode("<br />", $aNotifications), 1). "<br />"; $sNotification = $oNotification->messageBox("warning", implode("<br />", $aNotifications), 1) . "<br />";
} else { } else {
$sNotification = ""; $sNotification = "";
} }
@ -109,128 +108,126 @@ $userid = $auth->auth["uid"];
$oTpl->set('s', 'WELCOME', "<b>" . i18n("Welcome") . " </b>" . $vuser->getRealname($userid, true) . "."); $oTpl->set('s', 'WELCOME', "<b>" . i18n("Welcome") . " </b>" . $vuser->getRealname($userid, true) . ".");
$oTpl->set('s', 'LASTLOGIN', i18n("Last login") . ": " . $lastlogin); $oTpl->set('s', 'LASTLOGIN', i18n("Last login") . ": " . $lastlogin);
$clients= $classclient->getAccessibleClients(); $clients = $classclient->getAccessibleClients();
$cApiClient= new cApiClient; $cApiClient = new cApiClient;
$warnings= array (); $warnings = array();
if (count($clients) > 1) { if (count($clients) > 1) {
$clientform= '<form style="margin: 0px" name="clientselect" method="post" target="_top" action="' . $sess->url("index.php") . '">'; $clientform = '<form style="margin: 0px" name="clientselect" method="post" target="_top" action="' . $sess->url("index.php") . '">';
$select= new cHTMLSelectElement("changeclient"); $select = new cHTMLSelectElement("changeclient");
$choices= array (); $choices = array();
foreach ($clients as $key => $v_client) { foreach ($clients as $key => $v_client) {
if ($perm->hasClientPermission($key)) { if ($perm->hasClientPermission($key)) {
$cApiClient->loadByPrimaryKey($key); $cApiClient->loadByPrimaryKey($key);
if ($cApiClient->hasLanguages()) { if ($cApiClient->hasLanguages()) {
$choices[$key]= $v_client['name'] . " (" . $key . ')'; $choices[$key] = $v_client['name'] . " (" . $key . ')';
} else { } else {
$warnings[]= sprintf(i18n("Client %s (%s) has no languages"), $v_client['name'], $key); $warnings[] = sprintf(i18n("Client %s (%s) has no languages"), $v_client['name'], $key);
}
}
}
$select->autoFill($choices);
$select->setDefault($client);
$clientselect= $select->render();
$oTpl->set('s', 'CLIENTFORM', $clientform);
$oTpl->set('s', 'CLIENTFORMCLOSE', "</form>");
$oTpl->set('s', 'CLIENTSDROPDOWN', $clientselect);
if ($perm->have_perm() && count($warnings) > 0) {
$oTpl->set('s', 'WARNINGS', "<br>" . $notification->messageBox("warning", implode("<br>", $warnings), 0));
} else {
$oTpl->set('s', 'WARNINGS', '');
}
$oTpl->set('s', 'OKBUTTON', '<input type="image" src="images/but_ok.gif" alt="' . i18n("Change client") . '" title="' . i18n("Change client") . '" border="0">');
} else {
$oTpl->set('s', 'OKBUTTON', '');
$sClientForm = '';
if ( count($clients) == 0 ) {
$sClientForm = i18n('No clients available!');
}
$oTpl->set('s', 'CLIENTFORM', $sClientForm);
$oTpl->set('s', 'CLIENTFORMCLOSE', '');
foreach ($clients as $key => $v_client) {
if ($perm->hasClientPermission($key)) {
$cApiClient->loadByPrimaryKey($key);
if ($cApiClient->hasLanguages()) {
$name= $v_client['name'] . " (" . $key . ')';
} else {
$warnings[]= sprintf(i18n("Client %s (%s) has no languages"), $v_client['name'], $key);
}
} }
} }
}
$select->autoFill($choices);
$select->setDefault($client);
$clientselect = $select->render();
$oTpl->set('s', 'CLIENTFORM', $clientform);
$oTpl->set('s', 'CLIENTFORMCLOSE', "</form>");
$oTpl->set('s', 'CLIENTSDROPDOWN', $clientselect);
if ($perm->have_perm() && count($warnings) > 0) { if ($perm->have_perm() && count($warnings) > 0) {
$oTpl->set('s', 'WARNINGS', "<br>" . $notification->messageBox("warning", implode("<br>", $warnings), 0)); $oTpl->set('s', 'WARNINGS', "<br>" . $notification->messageBox("warning", implode("<br>", $warnings), 0));
} else { } else {
$oTpl->set('s', 'WARNINGS', ''); $oTpl->set('s', 'WARNINGS', '');
} }
$oTpl->set('s', 'OKBUTTON', '<input type="image" src="images/but_ok.gif" alt="' . i18n("Change client") . '" title="' . i18n("Change client") . '" border="0">');
$oTpl->set('s', 'CLIENTSDROPDOWN', $name); } else {
$oTpl->set('s', 'OKBUTTON', '');
$sClientForm = '';
if (count($clients) == 0) {
$sClientForm = i18n('No clients available!');
}
$oTpl->set('s', 'CLIENTFORM', $sClientForm);
$oTpl->set('s', 'CLIENTFORMCLOSE', '');
foreach ($clients as $key => $v_client) {
if ($perm->hasClientPermission($key)) {
$cApiClient->loadByPrimaryKey($key);
if ($cApiClient->hasLanguages()) {
$name = $v_client['name'] . " (" . $key . ')';
} else {
$warnings[] = sprintf(i18n("Client %s (%s) has no languages"), $v_client['name'], $key);
}
}
}
if ($perm->have_perm() && count($warnings) > 0) {
$oTpl->set('s', 'WARNINGS', "<br>" . $notification->messageBox("warning", implode("<br>", $warnings), 0));
} else {
$oTpl->set('s', 'WARNINGS', '');
}
$oTpl->set('s', 'CLIENTSDROPDOWN', $name);
} }
$props= new PropertyCollection; $props = new PropertyCollection;
$props->select("itemtype = 'idcommunication' AND idclient='$client' AND type = 'todo' AND name = 'status' AND value != 'done'"); $props->select("itemtype = 'idcommunication' AND idclient='$client' AND type = 'todo' AND name = 'status' AND value != 'done'");
$todoitems= array (); $aItemsTodo = [];
while ($prop= $props->next()) { while ($prop = $props->next()) {
$todoitems[]= $prop->get("itemid"); $aItemsTodo[] = $prop->get("itemid");
} }
if (count($todoitems) > 0) { if (count($aItemsTodo) > 0) {
$in= "idcommunication IN (" . implode(",", $todoitems) . ")"; $in = "idcommunication IN (" . implode(",", $aItemsTodo) . ")";
} else { } else {
$in= 1; $in = 1;
} }
$todoitems= new TODOCollection; $todoitems = new TODOCollection();
$recipient= $auth->auth["uid"]; $recipient = $auth->auth["uid"];
$todoitems->select("recipient = '$recipient' AND idclient='$client' AND $in"); $todoitems->select("recipient = '$recipient' AND idclient='$client' AND $in");
while ($todo= $todoitems->next()) { $iItemsTodoOpen = 0;
if ($todo->getProperty("todo", "status") != "done") { while ($todo = $todoitems->next()) {
$todoitems++; if ($todo->getProperty("todo", "status") != "done") {
} $iItemsTodoOpen++;
}
} }
$sTaskTranslation = ''; $sTaskTranslation = '';
if ($todoitems->count() == 1) { if ($iItemsTodoOpen == 1) {
$sTaskTranslation = i18n("Reminder list: %d Task open"); $sTaskTranslation = i18n("Reminder list: %d Task open");
} else { } else {
$sTaskTranslation = i18n("Reminder list: %d Tasks open"); $sTaskTranslation = i18n("Reminder list: %d Tasks open");
} }
$mycontenido_overview= '<a class="blue" href="' . $sess->url("main.php?area=mycontenido&frame=4") . '">' . i18n("Overview") . '</a>'; $mycontenido_overview = '<a class="blue" href="' . $sess->url("main.php?area=mycontenido&frame=4") . '">' . i18n("Overview") . '</a>';
$mycontenido_lastarticles= '<a class="blue" href="' . $sess->url("main.php?area=mycontenido_recent&frame=4") . '">' . i18n("Recently edited articles") . '</a>'; $mycontenido_lastarticles = '<a class="blue" href="' . $sess->url("main.php?area=mycontenido_recent&frame=4") . '">' . i18n("Recently edited articles") . '</a>';
$mycontenido_tasks= '<a class="blue" href="' . $sess->url("main.php?area=mycontenido_tasks&frame=4") . '">' . sprintf($sTaskTranslation, $todoitems->count()) . '</a>'; $mycontenido_tasks = '<a class="blue" href="' . $sess->url("main.php?area=mycontenido_tasks&frame=4") . '">' . sprintf($sTaskTranslation, $iItemsTodoOpen) . '</a>';
$mycontenido_settings= '<a class="blue" href="' . $sess->url("main.php?area=mycontenido_settings&frame=4") . '">' . i18n("Settings") . '</a>'; $mycontenido_settings = '<a class="blue" href="' . $sess->url("main.php?area=mycontenido_settings&frame=4") . '">' . i18n("Settings") . '</a>';
$oTpl->set('s', 'MYCONTENIDO_OVERVIEW', $mycontenido_overview); $oTpl->set('s', 'MYCONTENIDO_OVERVIEW', $mycontenido_overview);
$oTpl->set('s', 'MYCONTENIDO_LASTARTICLES', $mycontenido_lastarticles); $oTpl->set('s', 'MYCONTENIDO_LASTARTICLES', $mycontenido_lastarticles);
$oTpl->set('s', 'MYCONTENIDO_TASKS', $mycontenido_tasks); $oTpl->set('s', 'MYCONTENIDO_TASKS', $mycontenido_tasks);
$oTpl->set('s', 'MYCONTENIDO_SETTINGS', $mycontenido_settings); $oTpl->set('s', 'MYCONTENIDO_SETTINGS', $mycontenido_settings);
$admins= $classuser->getSystemAdmins(true); $admins = $classuser->getSystemAdmins(true);
$sAdminTemplate = '<li class="welcome">%s, %s</li>'; $sAdminTemplate = '<li class="welcome">%s, %s</li>';
$sAdminName= ""; $sAdminName = "";
$sAdminEmail = ""; $sAdminEmail = "";
$sOutputAdmin = ""; $sOutputAdmin = "";
foreach ($admins as $key => $value) { foreach ($admins as $key => $value) {
if ($value["email"] != "") { if ($value["email"] != "") {
$sAdminEmail= '<a class="blue" href="mailto:' . $value["email"] . '">' . $value["email"] . '</a>'; $sAdminEmail = '<a class="blue" href="mailto:' . $value["email"] . '">' . $value["email"] . '</a>';
$sAdminName= $value['realname']; $sAdminName = $value['realname'];
$sOutputAdmin .= sprintf($sAdminTemplate, $sAdminName, $sAdminEmail); $sOutputAdmin .= sprintf($sAdminTemplate, $sAdminName, $sAdminEmail);
} }
} }
$oTpl->set('s', 'ADMIN_EMAIL', $sOutputAdmin); $oTpl->set('s', 'ADMIN_EMAIL', $sOutputAdmin);
@ -238,14 +235,14 @@ $oTpl->set('s', 'ADMIN_EMAIL', $sOutputAdmin);
$oTpl->set('s', 'SYMBOLHELP', '<a href="' . $sess->url("frameset.php?area=symbolhelp&frame=4") . '">' . i18n("Symbol help") . '</a>'); $oTpl->set('s', 'SYMBOLHELP', '<a href="' . $sess->url("frameset.php?area=symbolhelp&frame=4") . '">' . i18n("Symbol help") . '</a>');
if (isset($cfg["contenido"]["handbook_path"]) && file_exists($cfg["contenido"]["handbook_path"])) { if (isset($cfg["contenido"]["handbook_path"]) && file_exists($cfg["contenido"]["handbook_path"])) {
$oTpl->set('s', 'CONTENIDOMANUAL', '<a href="' . $cfg["contenido"]["handbook_url"] . '" target="_blank">' . i18n("Contenido Manual") . '</a>'); $oTpl->set('s', 'CONTENIDOMANUAL', '<a href="' . $cfg["contenido"]["handbook_url"] . '" target="_blank">' . i18n("Contenido Manual") . '</a>');
} else { } else {
$oTpl->set('s', 'CONTENIDOMANUAL', ''); $oTpl->set('s', 'CONTENIDOMANUAL', '');
} }
// For display current online user in Contenido-Backend // For display current online user in Contenido-Backend
$aMemberList= array (); $aMemberList = array();
$oActiveUsers= new ActiveUsers($db, $cfg, $auth); $oActiveUsers = new ActiveUsers($db, $cfg, $auth);
$iNumberOfUsers = 0; $iNumberOfUsers = 0;
// Start() // Start()
@ -255,17 +252,17 @@ $oActiveUsers->startUsersTracking();
$iNumberOfUsers = $oActiveUsers->getNumberOfUsers(); $iNumberOfUsers = $oActiveUsers->getNumberOfUsers();
// Find all User who is online // Find all User who is online
$aMemberList= $oActiveUsers->findAllUser(); $aMemberList = $oActiveUsers->findAllUser();
// Template for display current user // Template for display current user
$sTemplate = ""; $sTemplate = "";
$sOutput = ""; $sOutput = "";
$sTemplate= '<li class="welcome">%s, %s</li>'; $sTemplate = '<li class="welcome">%s, %s</li>';
foreach ($aMemberList as $key) { foreach ($aMemberList as $key) {
$sRealName= $key['realname']; $sRealName = $key['realname'];
$aPerms['0']= $key['perms']; $aPerms['0'] = $key['perms'];
$sOutput .= sprintf($sTemplate, $sRealName, $aPerms['0']); $sOutput .= sprintf($sTemplate, $sRealName, $aPerms['0']);
} }
// set template welcome // set template welcome
@ -273,12 +270,11 @@ $oTpl->set('s', 'USER_ONLINE', $sOutput);
$oTpl->set('s', 'Anzahl', $iNumberOfUsers); $oTpl->set('s', 'Anzahl', $iNumberOfUsers);
// rss feed // rss feed
if($perm->isSysadmin($vuser) && isset($cfg["backend"]["newsfeed"]) && $cfg["backend"]["newsfeed"] == true){ if ($perm->isSysadmin($vuser) && isset($cfg["backend"]["newsfeed"]) && $cfg["backend"]["newsfeed"] == true) {
$newsfeed = 'some news'; $newsfeed = 'some news';
$oTpl->set('s', 'CONTENIDO_NEWS', $newsfeed); $oTpl->set('s', 'CONTENIDO_NEWS', $newsfeed);
} } else {
else{ $oTpl->set('s', 'CONTENIDO_NEWS', '');
$oTpl->set('s', 'CONTENIDO_NEWS', '');
} }
// check for new updates // check for new updates
@ -287,5 +283,4 @@ $sUpdateNotifierOutput = $oUpdateNotifier->displayOutput();
$oTpl->set('s', 'UPDATENOTIFICATION', $sUpdateNotifierOutput); $oTpl->set('s', 'UPDATENOTIFICATION', $sUpdateNotifierOutput);
$oTpl->generate($cfg["path"]["templates"] . $cfg["templates"]["welcome"]); $oTpl->generate($cfg["path"]["templates"] . $cfg["templates"]["welcome"]);
?> ?>

Datei anzeigen

@ -194,9 +194,15 @@ function logMessage($msg, $PC_writeDir, $PC_useLog, $PC_debug) {
} }
function lTrimZeros($number) { function lTrimZeros($number) {
/*
while ($number[0] == '0') { while ($number[0] == '0') {
$number = substr($number, 1); $number = substr($number, 1);
} }
*
*/
$number = intval(ltrim($number, '0'));
return (is_numeric($number))?$number:0; return (is_numeric($number))?$number:0;
} }

4
conlite/includes/startup.php Ausführbare Datei → Normale Datei
Datei anzeigen

@ -71,7 +71,7 @@ if (!defined('CL_ENVIRONMENT')) {
*/ */
if (!defined('CL_VERSION')) { if (!defined('CL_VERSION')) {
define('CL_VERSION', '2.1.3'); define('CL_VERSION', '2.2.0 beta');
} }
@ -228,4 +228,4 @@ if($cfg['debug']['sendnocacheheader']) {
header("Pragma: no-cache"); // HTTP 1.0. header("Pragma: no-cache"); // HTTP 1.0.
header("Expires: 0"); // Proxies. header("Expires: 0"); // Proxies.
} }
?> ?>

Datei anzeigen

@ -225,7 +225,7 @@ class MetaTagCreatorHtml5 {
* @return boolean * @return boolean
*/ */
protected function _addFacebookMetaTags() { protected function _addFacebookMetaTags() {
if(!$this->_aConfig['add_facebook_meta']) return; if(empty($this->_aConfig['add_facebook_meta'])) return;
// add always article data, cause they needed for fb-meta // add always article data, cause they needed for fb-meta
if($this->_aConfig['add_article_meta'] === false) { if($this->_aConfig['add_article_meta'] === false) {
$this->_aConfig['add_article_meta'] = true; $this->_aConfig['add_article_meta'] = true;

@ -1 +1 @@
Subproject commit 3217b73d08e1b76193f02d2d912134320ef40bfe Subproject commit 91b0fd8c15cdf1b5e9704c8720a40f959e7eb4fe

Datei anzeigen

@ -212,7 +212,7 @@ class pimSetupPluginInstall extends pimSetupBase {
private function _addNavMain() { private function _addNavMain() {
$aAttributes = array(); $aAttributes = array();
$iCountNavMain = count(self::$XmlNavMain->nav); $iCountNavMain = (is_countable(self::$XmlNavMain->nav))?count(self::$XmlNavMain->nav):0;
if ($iCountNavMain > 0) { if ($iCountNavMain > 0) {
$oNavMainColl = new cApiNavMainCollection(); $oNavMainColl = new cApiNavMainCollection();

Datei anzeigen

@ -1,106 +0,0 @@
var display_url;
function createMenu (menuname, items, links)
{
document.writeln('<div id="' + menuname + '" class="skin0" onMouseover="highlightie5(event)" onMouseout="lowlightie5(event)" onClick="jumptoie5(event)" display:none>');
document.writeln('<div class="skin1">Context Menu</div>');
for (var i = 0; i < items.length; i++)
{
if (items[i] == "--")
{
document.writeln('<hr style="line-height:4px;border: 0px;border-bottom:1px;border-color: black; border-style: solid;">');
} else {
document.writeln('<div class="menuitems" url="' + links[i] + '">' + items[i] + '</div>');
}
}
document.writeln('</div>');
document.getElementById(menuname).style.display = '';
}
var ie5 = document.all && document.getElementById
var ns6 = document.getElementById && !document.all
if (ie5 || ns6)
//var menuobj=document.getElementById("ie5menu")
function showmenuie5(e){
if (ie5)
{
menuobj = document.getElementById(window.event.srcElement.getAttribute("helpid"));
} else
{
menuobj = document.getElementById(e.target.getAttribute("helpid"));
}
//Find out how close the mouse is to the corner of the window
var rightedge = ie5? document.body.clientWidth - event.clientX : window.innerWidth - e.clientX
var bottomedge = ie5? document.body.clientHeight - event.clientY : window.innerHeight - e.clientY
//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge < menuobj.offsetWidth)
//move the horizontal position of the menu to the left by it's width
menuobj.style.left = ie5? document.body.scrollLeft + event.clientX - menuobj.offsetWidth : window.pageXOffset + e.clientX - menuobj.offsetWidth
else
//position the horizontal position of the menu where the mouse was clicked
menuobj.style.left = ie5? document.body.scrollLeft + event.clientX : window.pageXOffset + e.clientX
//same concept with the vertical position
if (bottomedge < menuobj.offsetHeight)
menuobj.style.top = ie5? document.body.scrollTop + event.clientY - menuobj.offsetHeight : window.pageYOffset + e.clientY - menuobj.offsetHeight
else
menuobj.style.top = ie5? document.body.scrollTop + event.clientY : window.pageYOffset + e.clientY
menuobj.style.visibility = "visible"
return false;
}
function hidemenuie5(e){
if (typeof menuobj == "object")
{
menuobj.style.visibility = "hidden"
}
}
function highlightie5(e){
var firingobj = ie5? event.srcElement : e.target
if (firingobj.className == "menuitems" || ns6 && firingobj.parentNode.className == "menuitems"){
if (ns6 && firingobj.parentNode.className == "menuitems") firingobj = firingobj.parentNode //up one node
firingobj.style.backgroundColor = "#F4F8BD"
firingobj.style.color = "black"
firingobj.style.cursor = "pointer"
if (display_url == 1)
window.status = event.srcElement.url
}
}
function lowlightie5(e){
var firingobj = ie5? event.srcElement : e.target
if (firingobj.className == "menuitems" || ns6 && firingobj.parentNode.className == "menuitems"){
if (ns6 && firingobj.parentNode.className == "menuitems") firingobj = firingobj.parentNode //up one node
firingobj.style.backgroundColor = ""
firingobj.style.color = "black"
window.status = ''
}
}
function jumptoie5(e){
var firingobj = ie5? event.srcElement : e.target
if (firingobj.className == "menuitems" || ns6 && firingobj.parentNode.className == "menuitems"){
if (ns6 && firingobj.parentNode.className == "menuitems") firingobj = firingobj.parentNode
if (firingobj.getAttribute("target"))
window.open(firingobj.getAttribute("url"), firingobj.getAttribute("target"))
else
window.location = firingobj.getAttribute("url")
}
}
var menuobj;
if (ie5 || ns6){
//menuobj.style.display=''
document.oncontextmenu = showmenuie5
document.onclick = hidemenuie5
}

Datei anzeigen

@ -1,227 +1,229 @@
<html> <html>
<head> <head>
<title></title> <title></title>
<meta http-equiv="expires" content="0"> <meta http-equiv="expires" content="0">
<meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache"> <meta http-equiv="pragma" content="no-cache">
<link rel="stylesheet" type="text/css" href="styles/contenido.css"> <link rel="stylesheet" type="text/css" href="styles/contenido.css">
<style type="text/css">@import url(scripts/jscalendar/calendar-contenido.css);</style> <style type="text/css">@import url(scripts/jscalendar/calendar-contenido.css);</style>
<script type="text/javascript" src="scripts/jscalendar/calendar.js"></script> <script type="text/javascript" src="scripts/jscalendar/calendar.js"></script>
<script type="text/javascript" src="scripts/jscalendar/lang/calendar-{CAL_LANG}.js"></script> <script type="text/javascript" src="scripts/jscalendar/lang/calendar-{CAL_LANG}.js"></script>
<script type="text/javascript" src="scripts/jscalendar/calendar-setup.js"></script> <script type="text/javascript" src="scripts/jscalendar/calendar-setup.js"></script>
<script type="text/javascript" src="scripts/messageBox.js.php?contenido={SID}"></script> <script type="text/javascript" src="scripts/messageBox.js.php?contenido={SID}"></script>
<script type="text/javascript"> <script type="text/javascript">
var sid = "{SID}"; var sid = "{SID}";
box = new messageBox("", "", "", 0, 0); box = new messageBox("", "", "", 0, 0);
function removeAssignments(idart, idcat) { function removeAssignments(idart, idcat) {
url = 'main.php?area=con_editart'; url = 'main.php?area=con_editart';
url += '&action=remove_assignments'; url += '&action=remove_assignments';
url += '&frame=4'; url += '&frame=4';
url += '&idart=' + idart; url += '&idart=' + idart;
url += '&idcat=' + idcat; url += '&idcat=' + idcat;
url += '&contenido=' + sid; url += '&contenido=' + sid;
window.location.href = url; window.location.href = url;
} }
function disableFunctionsOnTimeControl() function disableFunctionsOnTimeControl()
{ {
// Timecontrol enabled => disable Online and Startaticle // Timecontrol enabled => disable Online and Startaticle
if(document.getElementById("timemgmt").checked == true) if (document.getElementById("timemgmt").checked == true)
{ {
document.getElementById("is_start").checked = false; document.getElementById("is_start").checked = false;
document.getElementById("is_start").disabled = true; document.getElementById("is_start").disabled = true;
if (document.getElementById("datestart").value != '') { if (document.getElementById("datestart").value != '') {
document.getElementById("online").checked = false; document.getElementById("online").checked = false;
document.getElementById("online").disabled = true; document.getElementById("online").disabled = true;
} }
} }
// Timecontrol disable => enable Online and Startarticle // Timecontrol disable => enable Online and Startarticle
else else
{ {
document.getElementById("is_start").disabled = false; document.getElementById("is_start").disabled = false;
document.getElementById("online").disabled = false; document.getElementById("online").disabled = false;
} }
if (document.getElementById("datestart").value == '') { if (document.getElementById("datestart").value == '') {
document.getElementById("online").disabled = false; document.getElementById("online").disabled = false;
} }
} }
</script> </script>
</head> </head>
<body style="margin: 10px" onload="disableFunctionsOnTimeControl()"> <body style="margin: 10px" onload="disableFunctionsOnTimeControl()">
<div class="categorypath">{CATEGORY}</div> <div class="categorypath">{CATEGORY}</div>
<form method="post" name="art_props" action="{ACTION}"> <form method="post" name="art_props" action="{ACTION}">
<input type="hidden" name="action" value="con_saveart"> <input type="hidden" name="action" value="con_saveart">
{HIDDENSESSION} {HIDDENSESSION}
{HIDDENFIELDS} {HIDDENFIELDS}
<input type="hidden" name="tmp_firstedit" value="{TMP_FIRSTEDIT}"> <input type="hidden" name="tmp_firstedit" value="{TMP_FIRSTEDIT}">
<input type="hidden" name="idart" value="{IDART}"> <input type="hidden" name="idart" value="{IDART}">
<input type="hidden" name="idcat" value="{IDCAT}"> <input type="hidden" name="idcat" value="{IDCAT}">
<input type="hidden" name="idartlang" value="{IDARTLANG}"> <input type="hidden" name="idartlang" value="{IDARTLANG}">
<table cellspacing="0" cellpadding="2" border="0">
{NOTIFICATION} <table cellspacing="0" cellpadding="2" border="0">
<tr valign="top"> {NOTIFICATION}
<td class="text_medium" style="border: 1px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{TITEL}</td>
<td colspan="3" class="text_medium" style="border: 1px; border-left:0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{TITEL-FIELD}</td>
</tr>
<!-- plugin Advanced Mod Rewrite - edit by stese //-->
<tr valign="top">
<td class="text_medium" style="border:1px; border-top:0px; border-color:#B3B3B3; border-style:solid; background-color:#fff">{URLNAME}</td>
<td colspan="3" class="text_medium" style="border: 1px; border-top:0px; border-left:0px; border-color: #B3B3B3; border-style: solid; background-color:#fff">{URLNAME-FIELD}</td>
</tr>
<!-- end plugin Advanced Mod Rewrite //-->
<tr valign="top"> <tr valign="top">
<td width="25%" class="text_medium" style="border: 1px; border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{DIRECTLINKTEXT}</td> <td class="text_medium" style="border: 1px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{TITEL}</td>
<td width="75%" colspan="3" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{DIRECTLINK}</td> <td colspan="3" class="text_medium" style="border: 1px; border-left:0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{TITEL-FIELD}</td>
</tr>
<tr valign="top">
<td width="25%" class="text_medium" style="border: 1px;border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{ARTIKELART}</td>
<td width="75%" colspan="3" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{ARTIKELARTSELECT}</td>
</tr>
<tr valign="top">
<td width="25%" class="text_medium" style="border: 1px; border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{ARTIKELID}</td>
<td width="25%" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{ARTID}</td>
<td width="25%" class="text_medium" style="border: 1px;border-top: 0px; border-left:0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{ZUORDNUNGSID}</td>
<td width="25%" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{ALLOCID}</td>
</tr>
<tr valign="top">
<td width="25%" class="text_medium" style="border: 1px; border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{ERSTELLT}</td>
<td width="25%" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{ERSTELLUNGS-DATUM}</td>
<td width="25%" class="text_medium" style="border: 1px;border-top: 0px; border-left:0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{AUTHOR_CREATOR}</td>
<td width="25%" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{AUTOR-ERSTELLUNGS-NAME}</td>
</tr>
<tr valign="top">
<td class="text_medium" style="border: 1px;border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{LETZTE-AENDERUNG}</td>
<td class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{AENDERUNGS-DATUM}</td>
<td class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{AUTHOR_MODIFIER}</td>
<td class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{AUTOR-AENDERUNG-NAME}</td>
</tr>
<tr valign="top">
<td class="text_medium" style="border: 1px;border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{PUBLISHING_DATE_LABEL}</td>
<td class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{PUBLISHING_DATE}</td>
<td class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{PUBLISHER}</td>
<td class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{PUBLISHER_NAME}</td>
</tr>
<tr valign="top">
<td class="text_medium" style="border: 1px;border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{WEITERLEITUNG}</td>
<td valign="bottom" colspan="3" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>{CHECKBOX}</td>
<td>{URL}</td>
<td>{CHECKBOX-NEWWINDOW}</td>
</tr> </tr>
</table>
</td>
</tr>
<tr>
<td class="text_medium" valign="top" style="border: 1px;border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">i18n("Time control")</td>
<td colspan="3" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">
<table border="0" cellspacing="0" cellpadding="0">
<tr><td valign="top"><input type="checkbox" onclick="javascript:disableFunctionsOnTimeControl();" name="timemgmt" id="timemgmt" value="1" {TIMEMGMTCHECKED}></td><td colspan="2" class="text_medium"><label for="timemgmt">i18n("Use time control")</label></td>
<tr><td valign="top">&nbsp;</td>
<td class="text_medium">i18n("Start date"):</td><td><input type="text" name="datestart" id="datestart" onkeyup = "disableFunctionsOnTimeControl();" onchange = "disableFunctionsOnTimeControl();" value="{STARTDATE}" {SDOPTS} size="20" maxlength="40" class="text_medium">
{CHOOSESTART}</td></tr>
<tr><td valign="top">&nbsp;</td> <!-- plugin Advanced Mod Rewrite - edit by stese //-->
<td class="text_medium">i18n("End date"):</td><td><input type="text" name="dateend" id="dateend" value="{ENDDATE}" {EDOPTS} size="20" maxlength="40" class="text_medium"> <tr valign="top">
{CHOOSEEND}</td></tr> <td class="text_medium" style="border:1px; border-top:0px; border-color:#B3B3B3; border-style:solid; background-color:#fff">{URLNAME}</td>
<tr><td valign="top"><input type="checkbox" id="time_move_cat" name="time_move_cat" value="1" {MOVETOCATCHECKED}></td> <td colspan="3" class="text_medium" style="border: 1px; border-top:0px; border-left:0px; border-color: #B3B3B3; border-style: solid; background-color:#fff">{URLNAME-FIELD}</td>
<td class="text_medium"><label for="time_move_cat">i18n("When expired, move to category"):</label></td><td>{MOVETOCATEGORYSELECT}</td></tr> </tr>
<tr><td valign="top"><input type="checkbox" id="time_online_move" name="time_online_move" value="1" {ONLINEAFTERMOVECHECKED}></td> <!-- end plugin Advanced Mod Rewrite //-->
<td colspan="2" class="text_medium"><label for="time_online_move">i18n("Make online after move")</label></td></tr>
</table>
</td></tr>
<tr valign="top">
<td class="text_medium" style="border: 1px;border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{ONLINE}</td>
<td class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{ONLINE-CHECKBOX}</td>
<td class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{STARTARTIKEL}</td>
<td class="text_medium" style="border: 1px;border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{STARTARTIKEL-CHECKBOX}</td>
</tr>
<tr valign="top">
<td class="text_medium" style="border: 1px;border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{SORTIERUNG}</td>
<td colspan="3" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{SORTIERUNG-FIELD}</td>
</tr>
<tr valign="top"> <tr valign="top">
<td class="text_medium" style="border: 1px;border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{STRUKTUR}</td> <td width="25%" class="text_medium" style="border: 1px; border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{DIRECTLINKTEXT}</td>
<td colspan="3" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{STRUKTUR-FIELD}</td> <td width="75%" colspan="3" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{DIRECTLINK}</td>
</tr> </tr>
<tr valign="top">
<td class="text_medium" style="border: 1px;border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{SUMMARY}</td>
<td colspan="3" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{SUMMARY-INPUT}</td>
</tr>
<tr>
<td class="text_medium" style="border: 1px;border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">i18n("Page title")</td>
<td colspan="3" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{TITLE-INPUT}</td>
</tr>
<tr> <tr valign="top">
<td class="text_medium" style="border: 1px;border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">i18n("Meta tags")</td> <td width="25%" class="text_medium" style="border: 1px;border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{ARTIKELART}</td>
<td colspan="3" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">&nbsp;</td> <td width="75%" colspan="3" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{ARTIKELARTSELECT}</td>
</tr> </tr>
<!-- BEGIN:BLOCK -->
<tr>
<td style="border: 1px; border-right: 0px; border-top:0px; border-bottom: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF" class="text_medium" valign="top">{METATITLE}</td>
<td colspan="3" style="border: 1px; border-top:0px; border-bottom: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF" class="text_medium" valign="top">{METAFIELDTYPE}</td>
</tr>
<!-- END:BLOCK -->
<tr>
<td style="border: 1px; border-right: 0px; border-top:0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF" class="text_medium" valign="top">&nbsp;</td>
<td colspan="3" style="border: 1px; border-top:0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF" class="text_medium" valign="top">&nbsp;</td>
</tr>
<tr><td colspan="4" class="text_medium" align="right"><input accesskey="s" type="image" {BUTTONDISABLE} src="images/{BUTTONIMAGE}"></td></tr>
</table> <tr valign="top">
<td width="25%" class="text_medium" style="border: 1px; border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{ARTIKELID}</td>
<td width="25%" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{ARTID}</td>
<td width="25%" class="text_medium" style="border: 1px;border-top: 0px; border-left:0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{ZUORDNUNGSID}</td>
<td width="25%" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{ALLOCID}</td>
</tr>
</form>
<script language="javascript"> <tr valign="top">
<td width="25%" class="text_medium" style="border: 1px; border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{ERSTELLT}</td>
<td width="25%" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{ERSTELLUNGS-DATUM}</td>
<td width="25%" class="text_medium" style="border: 1px;border-top: 0px; border-left:0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{AUTHOR_CREATOR}</td>
<td width="25%" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{AUTOR-ERSTELLUNGS-NAME}</td>
</tr>
/* Create a reference to the
Article Object in frame 'right_top' */
artObj = parent.parent.frames["left"].frames["left_top"].artObj;
if ( parent.parent.frames["right"].frames["right_top"].document.getElementById('c_1') ) { <tr valign="top">
menuItem = parent.parent.frames["right"].frames["right_top"].document.getElementById('c_1'); <td class="text_medium" style="border: 1px;border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{LETZTE-AENDERUNG}</td>
parent.parent.frames["right"].frames["right_top"].sub.clicked(menuItem.firstChild); <td class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{AENDERUNGS-DATUM}</td>
} <td class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{AUTHOR_MODIFIER}</td>
<td class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{AUTOR-AENDERUNG-NAME}</td>
{DATAPUSH} </tr>
</script> <tr valign="top">
</body> <td class="text_medium" style="border: 1px;border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{PUBLISHING_DATE_LABEL}</td>
<td class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{PUBLISHING_DATE}</td>
<td class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{PUBLISHER}</td>
<td class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{PUBLISHER_NAME}</td>
</tr>
<tr valign="top">
<td class="text_medium" style="border: 1px;border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{WEITERLEITUNG}</td>
<td valign="bottom" colspan="3" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>{CHECKBOX}</td>
<td>{URL}</td>
<td>{CHECKBOX-NEWWINDOW}</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="text_medium" valign="top" style="border: 1px;border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">i18n("Time control")</td>
<td colspan="3" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">
<table border="0" cellspacing="0" cellpadding="0">
<tr><td valign="top"><input type="checkbox" onclick="javascript:disableFunctionsOnTimeControl();" name="timemgmt" id="timemgmt" value="1" {TIMEMGMTCHECKED}></td><td colspan="2" class="text_medium"><label for="timemgmt">i18n("Use time control")</label></td>
<tr><td valign="top">&nbsp;</td>
<td class="text_medium">i18n("Start date"):</td><td><input type="text" name="datestart" id="datestart" onkeyup = "disableFunctionsOnTimeControl();" onchange = "disableFunctionsOnTimeControl();" value="{STARTDATE}" {SDOPTS} size="20" maxlength="40" class="text_medium">
{CHOOSESTART}</td></tr>
<tr><td valign="top">&nbsp;</td>
<td class="text_medium">i18n("End date"):</td><td><input type="text" name="dateend" id="dateend" value="{ENDDATE}" {EDOPTS} size="20" maxlength="40" class="text_medium">
{CHOOSEEND}</td></tr>
<tr><td valign="top"><input type="checkbox" id="time_move_cat" name="time_move_cat" value="1" {MOVETOCATCHECKED}></td>
<td class="text_medium"><label for="time_move_cat">i18n("When expired, move to category"):</label></td><td>{MOVETOCATEGORYSELECT}</td></tr>
<tr><td valign="top"><input type="checkbox" id="time_online_move" name="time_online_move" value="1" {ONLINEAFTERMOVECHECKED}></td>
<td colspan="2" class="text_medium"><label for="time_online_move">i18n("Make online after move")</label></td></tr>
</table>
</td></tr>
<tr valign="top">
<td class="text_medium" style="border: 1px;border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{ONLINE}</td>
<td class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{ONLINE-CHECKBOX}</td>
<td class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{STARTARTIKEL}</td>
<td class="text_medium" style="border: 1px;border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{STARTARTIKEL-CHECKBOX}</td>
</tr>
<tr valign="top">
<td class="text_medium" style="border: 1px;border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{SORTIERUNG}</td>
<td colspan="3" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{SORTIERUNG-FIELD}</td>
</tr>
<tr valign="top">
<td class="text_medium" style="border: 1px;border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{STRUKTUR}</td>
<td colspan="3" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{STRUKTUR-FIELD}</td>
</tr>
<tr valign="top">
<td class="text_medium" style="border: 1px;border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{SUMMARY}</td>
<td colspan="3" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{SUMMARY-INPUT}</td>
</tr>
<tr>
<td class="text_medium" style="border: 1px;border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">i18n("Page title")</td>
<td colspan="3" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">{TITLE-INPUT}</td>
</tr>
<tr>
<td class="text_medium" style="border: 1px;border-top: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">i18n("Meta tags")</td>
<td colspan="3" class="text_medium" style="border: 1px; border-top: 0px; border-left:0px;border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF">&nbsp;</td>
</tr>
<!-- BEGIN:BLOCK -->
<tr>
<td style="border: 1px; border-right: 0px; border-top:0px; border-bottom: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF" class="text_medium" valign="top">{METATITLE}</td>
<td colspan="3" style="border: 1px; border-top:0px; border-bottom: 0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF" class="text_medium" valign="top">{METAFIELDTYPE}</td>
</tr>
<!-- END:BLOCK -->
<tr>
<td style="border: 1px; border-right: 0px; border-top:0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF" class="text_medium" valign="top">&nbsp;</td>
<td colspan="3" style="border: 1px; border-top:0px; border-color: #B3B3B3; border-style: solid; background-color: #FFFFFF" class="text_medium" valign="top">&nbsp;</td>
</tr>
<tr><td colspan="4" class="text_medium" align="right"><input accesskey="s" type="image" {BUTTONDISABLE} src="images/{BUTTONIMAGE}"></td></tr>
</table>
</form>
<script language="javascript">
/* Create a reference to the
Article Object in frame 'right_top' */
artObj = parent.parent.frames["left"].frames["left_top"].artObj;
if (parent.parent.frames["right"].frames["right_top"].document.getElementById('c_1')) {
menuItem = parent.parent.frames["right"].frames["right_top"].document.getElementById('c_1');
parent.parent.frames["right"].frames["right_top"].sub.clicked(menuItem.firstChild);
}
{
DATAPUSH
}
</script>
</body>
</html> </html>

Datei anzeigen

@ -18,10 +18,10 @@
<tr> <tr>
<td class="text_medium" style="border: 0px; border-bottom:1px; border-color: #a9aec2; border-style: solid"> <td class="text_medium" style="border: 0px; border-bottom:1px; border-color: #a9aec2; border-style: solid">
<br><b>Current version:</b><br> <br><b>Current version:</b><br>
Carsten Peters, Markus H&uuml;bner, Ortwin Pinke, Ren&eacute; Mansveld, Steffen Reddig, Thomas Dubbert Carsten Peters, Markus H&uuml;bner, Ortwin Pinke, Lars Lämmerhirt
<br><br> <br><br>
<b>Special thanks to all contributors of the former releases and bugreporters.</b><br> <b>Special thanks to all contributors of the former releases and bugreporters.</b><br>
- Ren&eacute; Mansveld, Steffen Reddig, Thomas Dubbert
<br><br> <br><br>
<b>Special thanks to all contributors of Contenido up to 4.8.15, which ConLite is based upon.</b><br> <b>Special thanks to all contributors of Contenido up to 4.8.15, which ConLite is based upon.</b><br>
Andreas Kummer, Andreas Lindner, Bilal Arslan, Bj&ouml;rn Behrens, Christa Tabara, Christian End, Conrad Leu, Dominik Ziegler, Frederic Schneider, Harald Wirths, Holger Librenz, Ingo van Peeren, Jonas Vogel, Kristina Birkenbeul, Marco Prey, Martin Horwath, Murat Pur&ccedil;, Oliver Lohkemper, Rudi Bieller, Timo Trautmann, Thorsten Granz, Thomas Sch&auml;fer-Tertilt, Tobias Klonk, Daniel Rothmaler, Guido, i-fekt, Helen Sch&auml;fer, Jan Lengowski, John van Aerle, Maria Martha Sanchez-Straub, Marco Jahn, Martin Hahn, Marion Fischer, Olaf Niemann, Robert Herbert, Stefan Jelner, Timo A. Hummel, Willi Man Andreas Kummer, Andreas Lindner, Bilal Arslan, Bj&ouml;rn Behrens, Christa Tabara, Christian End, Conrad Leu, Dominik Ziegler, Frederic Schneider, Harald Wirths, Holger Librenz, Ingo van Peeren, Jonas Vogel, Kristina Birkenbeul, Marco Prey, Martin Horwath, Murat Pur&ccedil;, Oliver Lohkemper, Rudi Bieller, Timo Trautmann, Thorsten Granz, Thomas Sch&auml;fer-Tertilt, Tobias Klonk, Daniel Rothmaler, Guido, i-fekt, Helen Sch&auml;fer, Jan Lengowski, John van Aerle, Maria Martha Sanchez-Straub, Marco Jahn, Martin Hahn, Marion Fischer, Olaf Niemann, Robert Herbert, Stefan Jelner, Timo A. Hummel, Willi Man

Datei anzeigen

@ -174,6 +174,7 @@ return array(
'cHTML5Button' => 'conlite/classes/cHTML5/class.chtml5.button.php', 'cHTML5Button' => 'conlite/classes/cHTML5/class.chtml5.button.php',
'cHTML5Meta' => 'conlite/classes/cHTML5/class.chtml5.meta.php', 'cHTML5Meta' => 'conlite/classes/cHTML5/class.chtml5.meta.php',
'cHTML' => 'conlite/classes/cHTML5/class.chtml.php', 'cHTML' => 'conlite/classes/cHTML5/class.chtml.php',
'cHTML5Common' => 'conlite/classes/cHTML5/class.chtml5.common.php',
'cHTML5List' => 'conlite/classes/cHTML5/class.chtml5.list.php', 'cHTML5List' => 'conlite/classes/cHTML5/class.chtml5.list.php',
'XML_doc' => 'conlite/classes/class.xml.php', 'XML_doc' => 'conlite/classes/class.xml.php',
'Contenido_FrontendNavigation_Breadcrumb' => 'conlite/classes/Contenido_FrontendNavigation/Contenido_FrontendNavigation_Breadcrumb.class.php', 'Contenido_FrontendNavigation_Breadcrumb' => 'conlite/classes/Contenido_FrontendNavigation/Contenido_FrontendNavigation_Breadcrumb.class.php',

Datei anzeigen

@ -139,27 +139,28 @@ $cfg['native_i18n'] = false;
*/ */
/* Don't display errors */ /* Don't display errors */
@ini_set("display_errors", false); ini_set("display_errors", false);
/* Log errors to a file */ /* Log errors to a file */
@ini_set("log_errors", true); ini_set("log_errors", true);
/* The file in which we write the error log */ /* The file in which we write the error log */
@ini_set("error_log", $cfg['path']['conlite_logs'] . "errorlog.txt"); ini_set("error_log", $cfg['path']['conlite_logs'] . "errorlog.txt");
/* Report all errors except warnings */ /**
if ($cfg["develop"]["show_errors"] && $_SERVER['SERVER_NAME'] == "local.dceserver.de") { * Report all errors except warnings
* @todo change first if to use a local config var for servername
*
**/
if ($cfg["develop"]["show_errors"]
&& filter_input(INPUT_SERVER, 'SERVER_NAME', FILTER_SANITIZE_STRING) == "local.dceserver.de") {
error_reporting(E_ALL); error_reporting(E_ALL);
} else { } else {
if ($cfg["develop"]["show_deprecated"]) { if ($cfg["develop"]["show_deprecated"]) {
error_reporting(E_ALL ^ E_NOTICE); error_reporting(E_ALL ^ E_NOTICE);
} else { } else {
if (version_compare(PHP_VERSION, '5.3.0', '<')) { // remove unknown deprecated for PHP < 5.3 if (version_compare(PHP_VERSION, '7.4.0', '>=')) {
error_reporting(E_ALL ^ E_NOTICE);
} else if (version_compare(PHP_VERSION, '7.0.0', '>=')) {
error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_USER_DEPRECATED ^ E_WARNING); error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_USER_DEPRECATED ^ E_WARNING);
} else if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_USER_DEPRECATED ^ E_STRICT);
} else { } else {
error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_USER_DEPRECATED); error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_USER_DEPRECATED);
} }
@ -321,5 +322,4 @@ $cfg['password']['numbers_mandatory'] = 3;
* Content Type Settings * Content Type Settings
*/ */
// Define here all content types which includes special module translations (dont forget the prefix "CMS_"!) // Define here all content types which includes special module translations (dont forget the prefix "CMS_"!)
$cfg['translatable_content_types'] = array('CMS_TEASER', 'CMS_FILELIST'); $cfg['translatable_content_types'] = array('CMS_TEASER', 'CMS_FILELIST');
?>

Datei anzeigen

@ -1,6 +1,6 @@
auxiliary.org-netbeans-modules-php-smarty.smarty-framework=true auxiliary.org-netbeans-modules-php-smarty.smarty-framework=true
include.path=${php.global.include.path} include.path=${php.global.include.path}
php.version=PHP_73 php.version=PHP_81
source.encoding=UTF-8 source.encoding=UTF-8
src.dir=. src.dir=.
tags.asp=false tags.asp=false

Datei anzeigen

@ -513,7 +513,8 @@ abstract class HTML_Common2 implements ArrayAccess
* @return boolean Returns true on success or false on failure. * @return boolean Returns true on success or false on failure.
* @link http://php.net/manual/en/arrayaccess.offsetexists.php * @link http://php.net/manual/en/arrayaccess.offsetexists.php
*/ */
public function offsetExists($offset) #[ReturnTypeWillChange]
public function offsetExists($offset)
{ {
return isset($this->attributes[strtolower($offset)]); return isset($this->attributes[strtolower($offset)]);
} }
@ -527,6 +528,7 @@ abstract class HTML_Common2 implements ArrayAccess
* @link http://php.net/manual/en/arrayaccess.offsetget.php * @link http://php.net/manual/en/arrayaccess.offsetget.php
* @see getAttribute() * @see getAttribute()
*/ */
#[ReturnTypeWillChange]
public function offsetGet($offset) public function offsetGet($offset)
{ {
return $this->getAttribute($offset); return $this->getAttribute($offset);
@ -542,6 +544,7 @@ abstract class HTML_Common2 implements ArrayAccess
* @link http://php.net/manual/en/arrayaccess.offsetset.php * @link http://php.net/manual/en/arrayaccess.offsetset.php
* @see setAttribute() * @see setAttribute()
*/ */
#[ReturnTypeWillChange]
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
{ {
if (null !== $offset) { if (null !== $offset) {
@ -561,6 +564,7 @@ abstract class HTML_Common2 implements ArrayAccess
* @link http://php.net/manual/en/arrayaccess.offsetunset.php * @link http://php.net/manual/en/arrayaccess.offsetunset.php
* @see removeAttribute * @see removeAttribute
*/ */
#[ReturnTypeWillChange]
public function offsetUnset($offset) public function offsetUnset($offset)
{ {
$this->removeAttribute($offset); $this->removeAttribute($offset);

Datei anzeigen

@ -180,7 +180,7 @@ INSERT INTO !PREFIX!_files VALUES('402', '402', 'include.js_history.php', 'main'
INSERT INTO !PREFIX!_files VALUES('403', '403', 'include.html_tpl_history.php', 'main'); INSERT INTO !PREFIX!_files VALUES('403', '403', 'include.html_tpl_history.php', 'main');
INSERT INTO !PREFIX!_files VALUES('415', '415', 'include.system_configuration.php', 'main'); INSERT INTO !PREFIX!_files VALUES('415', '415', 'include.system_configuration.php', 'main');
INSERT INTO !PREFIX!_files VALUES('503', '52', 'include.subnav.php', 'main'); INSERT INTO !PREFIX!_files VALUES('503', '52', 'include.subnav.php', 'main');
INSERT INTO !PREFIX!_files VALUES('700', '52', 'include.subnav_blank.php', 'main'); INSERT INTO !PREFIX!_files VALUES('700', '52', 'include.subnav.php', 'main');
INSERT INTO !PREFIX!_files VALUES('813', '811', 'include.system_purge.php', 'main'); INSERT INTO !PREFIX!_files VALUES('813', '811', 'include.system_purge.php', 'main');
INSERT INTO !PREFIX!_files VALUES('814', '812', 'include.system_db_backup.php', 'main'); INSERT INTO !PREFIX!_files VALUES('814', '812', 'include.system_db_backup.php', 'main');
INSERT INTO !PREFIX!_files VALUES('990', '990', 'pluginmanager/includes/include.right_bottom.php', 'main'); INSERT INTO !PREFIX!_files VALUES('990', '990', 'pluginmanager/includes/include.right_bottom.php', 'main');

Datei anzeigen

@ -1,23 +1,23 @@
DELETE FROM !PREFIX!_type WHERE idtype < 10000; DELETE FROM !PREFIX!_type WHERE idtype < 10000;
INSERT INTO !PREFIX!_type VALUES('22', 'CMS_QRCODE', '/**\r\n * CMS_QRCODE\r\n */ \r\n$tmp = $a_content[''CMS_QRCODE''][$val];\r\n$tmp = urldecode($tmp); \r\n\r\n$tmp = AddSlashes(AddSlashes($tmp)); \r\n$tmp = str_replace("\\\\\\''", "''", $tmp); \r\n$tmp = str_replace("\\$", ''\\\\\\$'', $tmp); \r\n\r\n$q = array("", "L", "M", "Q", "H");\r\n$quality = intval(getEffectiveSetting("qrcode", "quality"));\r\nif ($quality == 0) {\r\n setSystemProperty("qrcode", "quality", 1);\r\n setSystemProperty("qrcode", "blocksize", 3);\r\n setSystemProperty("qrcode", "border", 2);\r\n $quality = 1;\r\n}\r\n$quality = $q[$quality];\r\n$blocksize = intval(getEffectiveSetting("qrcode", "blocksize", 3));\r\n$border = intval(getEffectiveSetting("qrcode", "border", 2));\r\n\r\nif ($edit) {\r\n # In editor we always generate a new image because of possible changes\r\n $tmp2 = "\r\necho ''<strong>QR Code</strong><br />(online only)<br />'';\r\n@unlink(''" . $cfgClient[$client]["path"]["frontend"] . "cache/QR-Code-" . $idart . "-" . $val . ".png'');";\r\n \r\n # Edit anchor and image\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_QRCODE&typenr=$val&lang=$lang");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_QRCODE_'' . $val . ''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'', ''" . $editLink . "'');");\r\n # Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"] . $cfg["path"]["images"] . "but_edittext.gif");\r\n $editButton->setBorder(0);\r\n $editButton->setStyleDefinition("margin-right", "2px");\r\n \r\n $editAnchor->setContent($editButton);\r\n \r\n # Process for tmp2put with echo\r\n $finalEditButton = $editAnchor->render();\r\n \r\n $tmp2 .= "echo ''" . $finalEditButton . "'';";\r\n} else {\r\n # In frontend and preview we only generate a new image if it was deleted\r\n $tmp2 = "\r\nif (!is_file(''" . $cfgClient[$client][''path''][''frontend''] . "cache/QR-Code-" . $idart . "-" . $val . ".png'')) {\r\n define(''QR_CACHE_DIR'', ''" . $cfgClient[$client][''path''][''frontend''] . "cache/phpqrcode/'');\r\n if (!is_dir(QR_CACHE_DIR)) {\r\n mkdir(QR_CACHE_DIR);\r\n }";\r\n if (isStartArticle($idartlang, $idcat, $lang)) {\r\n $tmp2 .= "\r\n QRcode::png(''" . ((strlen($tmp)) ? $tmp : Contenido_Url::getInstance()->build(array(''idcat'' => $idcat, ''client'' => $client, ''lang'' => $lang), true)) . "'', ''" . $cfgClient[$client][''path''][''frontend''] . ''cache/QR-Code-'' . $idart . ''-'' . $val . ''.png'' . "'', ''" . $quality . "'', " . $blocksize . ", " . $border . ");";\r\n } else {\r\n $tmp2 .= "\r\n QRcode::png(''" . ((strlen($tmp)) ? $tmp : Contenido_Url::getInstance()->build(array(''idcat'' => $idcat, ''idart'' => $idart, ''client'' => $client, ''lang'' => $lang), true)) . "'', ''" . $cfgClient[$client][''path''][''frontend''] . ''cache/QR-Code-'' . $idart . ''-'' . $val . ''.png'' . "'', ''" . $quality . "'', " . $blocksize . ", " . $border . ");";\r\n }\r\n $tmp2 .= "\r\n}\r\necho ''<img src=\\"" . $cfgClient[$client]["path"]["htmlpath"] . "cache/QR-Code-" . $idart . "-" . $val . ".png\\" alt=\\"QR Code\\" /><br />'';";\r\n}\r\n$tmp = $tmp2;', 'QR Code', '0', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'); INSERT INTO !PREFIX!_type VALUES('22', 'CMS_QRCODE', '/**\r\n * CMS_QRCODE\r\n */ \r\n$tmp = $a_content[''CMS_QRCODE''][$val];\r\n$tmp = urldecode($tmp); \r\n\r\n$tmp = AddSlashes(AddSlashes($tmp)); \r\n$tmp = str_replace("\\\\\\''", "''", $tmp); \r\n$tmp = str_replace("\\$", ''\\\\\\$'', $tmp); \r\n\r\n$q = array("", "L", "M", "Q", "H");\r\n$quality = intval(getEffectiveSetting("qrcode", "quality"));\r\nif ($quality == 0) {\r\n setSystemProperty("qrcode", "quality", 1);\r\n setSystemProperty("qrcode", "blocksize", 3);\r\n setSystemProperty("qrcode", "border", 2);\r\n $quality = 1;\r\n}\r\n$quality = $q[$quality];\r\n$blocksize = intval(getEffectiveSetting("qrcode", "blocksize", 3));\r\n$border = intval(getEffectiveSetting("qrcode", "border", 2));\r\n\r\nif (!empty($edit)) {\r\n # In editor we always generate a new image because of possible changes\r\n $tmp2 = "\r\necho ''<strong>QR Code</strong><br />(online only)<br />'';\r\n@unlink(''" . $cfgClient[$client]["path"]["frontend"] . "cache/QR-Code-" . $idart . "-" . $val . ".png'');";\r\n \r\n # Edit anchor and image\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_QRCODE&typenr=$val&lang=$lang");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_QRCODE_'' . $val . ''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'', ''" . $editLink . "'');");\r\n # Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"] . $cfg["path"]["images"] . "but_edittext.gif");\r\n $editButton->setBorder(0);\r\n $editButton->setStyleDefinition("margin-right", "2px");\r\n \r\n $editAnchor->setContent($editButton);\r\n \r\n # Process for tmp2put with echo\r\n $finalEditButton = $editAnchor->render();\r\n \r\n $tmp2 .= "echo ''" . $finalEditButton . "'';";\r\n} else {\r\n # In frontend and preview we only generate a new image if it was deleted\r\n $tmp2 = "\r\nif (!is_file(''" . $cfgClient[$client][''path''][''frontend''] . "cache/QR-Code-" . $idart . "-" . $val . ".png'')) {\r\n define(''QR_CACHE_DIR'', ''" . $cfgClient[$client][''path''][''frontend''] . "cache/phpqrcode/'');\r\n if (!is_dir(QR_CACHE_DIR)) {\r\n mkdir(QR_CACHE_DIR);\r\n }";\r\n if (isStartArticle($idartlang, $idcat, $lang)) {\r\n $tmp2 .= "\r\n QRcode::png(''" . ((strlen($tmp)) ? $tmp : Contenido_Url::getInstance()->build(array(''idcat'' => $idcat, ''client'' => $client, ''lang'' => $lang), true)) . "'', ''" . $cfgClient[$client][''path''][''frontend''] . ''cache/QR-Code-'' . $idart . ''-'' . $val . ''.png'' . "'', ''" . $quality . "'', " . $blocksize . ", " . $border . ");";\r\n } else {\r\n $tmp2 .= "\r\n QRcode::png(''" . ((strlen($tmp)) ? $tmp : Contenido_Url::getInstance()->build(array(''idcat'' => $idcat, ''idart'' => $idart, ''client'' => $client, ''lang'' => $lang), true)) . "'', ''" . $cfgClient[$client][''path''][''frontend''] . ''cache/QR-Code-'' . $idart . ''-'' . $val . ''.png'' . "'', ''" . $quality . "'', " . $blocksize . ", " . $border . ");";\r\n }\r\n $tmp2 .= "\r\n}\r\necho ''<img src=\\"" . $cfgClient[$client]["path"]["htmlpath"] . "cache/QR-Code-" . $idart . "-" . $val . ".png\\" alt=\\"QR Code\\" /><br />'';";\r\n}\r\n$tmp = $tmp2;', 'QR Code', '0', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00');
INSERT INTO !PREFIX!_type VALUES('18', 'CMS_EASYIMGEDIT', '/**\r\n * CMS_EASYIMGEDIT\r\n */\r\n$tmp = "";\r\nif ($edit) {\r\n\r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_EASYIMG&typenr=$val&lang=$lang");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_EASYIMGEDIT_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editimage.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $tmp.$finalEditButton;\r\n}', '', '0', '', '0000-00-00 00:00:00', '2009-04-14 13:56:58'); INSERT INTO !PREFIX!_type VALUES('18', 'CMS_EASYIMGEDIT', '/**\r\n * CMS_EASYIMGEDIT\r\n */\r\n$tmp = "";\r\nif (!empty($edit)) {\r\n\r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_EASYIMG&typenr=$val&lang=$lang");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_EASYIMGEDIT_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editimage.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $tmp.$finalEditButton;\r\n}', '', '0', '', '0000-00-00 00:00:00', '2009-04-14 13:56:58');
INSERT INTO !PREFIX!_type VALUES('19', 'CMS_DATE', '$tmp = $a_content["CMS_DATE"][$val];\r\n\r\n$oCmsDate = new Cms_Date($tmp, $val, $idartlang, $editLink, $cfg, $db, count($a_content["CMS_DATE"]), $belang);\r\n\r\nif($edit){\r\n\r\n$tmp = $oCmsDate->getAllWidgetEdit();\r\n\r\n}else{\r\n\r\n$tmp = $oCmsDate->getAllWidgetView();\r\n\r\n}', 'Date', '0', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'); INSERT INTO !PREFIX!_type VALUES('19', 'CMS_DATE', '$tmp = $a_content["CMS_DATE"][$val];\r\n\r\n$oCmsDate = new Cms_Date($tmp, $val, $idartlang, $editLink, $cfg, $db, count($a_content["CMS_DATE"]), $belang);\r\n\r\nif(!empty($edit)){\r\n\r\n$tmp = $oCmsDate->getAllWidgetEdit();\r\n\r\n}else{\r\n\r\n$tmp = $oCmsDate->getAllWidgetView();\r\n\r\n}', 'Date', '0', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00');
INSERT INTO !PREFIX!_type VALUES('20', 'CMS_TEASER', '$tmp = $a_content["CMS_TEASER"][$val];\r\n\r\n$oCmsTeaser = new Cms_Teaser($tmp, $val, $idartlang, $editLink, $cfg, $db, $belang, $client, $lang, $cfgClient, $sess);\r\n\r\nif($edit){\r\n\r\n$tmp = $oCmsTeaser->getAllWidgetEdit();\r\n\r\n}else{\r\n\r\n$tmp = $oCmsTeaser->getAllWidgetView();\r\n\r\n}', 'Teaser', '0', '', '2009-04-20 13:12:14', '0000-00-00 00:00:00'); INSERT INTO !PREFIX!_type VALUES('20', 'CMS_TEASER', '$tmp = $a_content["CMS_TEASER"][$val];\r\n\r\n$oCmsTeaser = new Cms_Teaser($tmp, $val, $idartlang, $editLink, $cfg, $db, $belang, $client, $lang, $cfgClient, $sess);\r\n\r\nif(!empty($edit)){\r\n\r\n$tmp = $oCmsTeaser->getAllWidgetEdit();\r\n\r\n}else{\r\n\r\n$tmp = $oCmsTeaser->getAllWidgetView();\r\n\r\n}', 'Teaser', '0', '', '2009-04-20 13:12:14', '0000-00-00 00:00:00');
INSERT INTO !PREFIX!_type VALUES('21', 'CMS_FILELIST', '$tmp = $a_content["CMS_FILELIST"][$val];\r\n\r\n$oCmsFileList = new Cms_FileList($tmp, $val, $idartlang, $editLink, $cfg, $db, $belang, $client, $lang, $cfgClient, $sess);\r\n\r\nif($edit){\r\n\r\n$tmp = $oCmsFileList->getAllWidgetEdit();\r\n\r\n}else{\r\n\r\n$tmp = $oCmsFileList->getAllWidgetView();\r\n\r\n}', '', '0', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'); INSERT INTO !PREFIX!_type VALUES('21', 'CMS_FILELIST', '$tmp = $a_content["CMS_FILELIST"][$val];\r\n\r\n$oCmsFileList = new Cms_FileList($tmp, $val, $idartlang, $editLink, $cfg, $db, $belang, $client, $lang, $cfgClient, $sess);\r\n\r\nif(!empty($edit)){\r\n\r\n$tmp = $oCmsFileList->getAllWidgetEdit();\r\n\r\n}else{\r\n\r\n$tmp = $oCmsFileList->getAllWidgetView();\r\n\r\n}', '', '0', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00');
INSERT INTO !PREFIX!_type VALUES('17', 'CMS_HTMLTEXT', '/**\r\n * CMS_HTMLTEXT\r\n */\r\ncInclude("includes", "functions.lang.php");\r\n\r\n$content = $a_content[''CMS_HTMLTEXT''][$val];\r\n$content = urldecode($content);\r\n$content = htmldecode($content);\r\n$content = strip_tags($content);\r\n\r\n$content = str_replace("&nbsp;", " ", $content);\r\n\r\n$content = htmlspecialchars($content);\r\nif ($content == "")\r\n{\r\n $content = "&nbsp;";\r\n}\r\n\r\n$content = nl2br($content);\r\n\r\nif ($edit) {\r\n\r\n $div = new cHTMLDiv;\r\n $div->setID("HTMLTEXT_".$db->f("idtype")."_".$val);\r\n $div->setEvent("focus", "this.style.border=''1px solid #bb5577''");\r\n $div->setEvent("blur", "this.style.border=''1px dashed #bfbfbf''");\r\n $div->setStyleDefinition("border", "1px dashed #bfbfbf");\r\n $div->updateAttributes(array("contentEditable" => "true"));\r\n $div->setStyleDefinition("direction", langGetTextDirection($lang));\r\n \r\n $editlink = new cHTMLLink;\r\n $editlink->setClass(''CMS_HTMLTEXT_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editlink->setLink($sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_HTMLTEXT&typenr=$val&lang=$lang"));\r\n \r\n $editimg = new cHTMLImage;\r\n $editimg->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edittext.gif");\r\n \r\n $savelink = new cHTMLLink;\r\n $savelink->setClass(''CMS_HTMLTEXT_''.$val.''_SAVE CMS_LINK_SAVE'');\r\n $savelink->setLink("javascript:setcontent(''$idartlang'',''0'')");\r\n \r\n $saveimg = new cHTMLImage;\r\n $saveimg->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_ok.gif");\r\n \r\n $savelink->setContent($saveimg);\r\n \r\n $editlink->setContent($editimg);\r\n \r\n $div->setContent($content);\r\n\r\n $tmp = implode("", array($div->render(), $editlink->render(), " ", $savelink->render()));\r\n $tmp = str_replace(''"'', ''\\"'', $tmp);\r\n} else {\r\n $tmp = $content;\r\n $tmp = str_replace(''"'', ''\\"'', $tmp);\r\n}\r\n\r\n\r\n$tmp = addslashes($tmp);\r\n$tmp = str_replace(''$'', ''\\\\\\$'', $tmp);', 'Text / Standard', '0', '', '2002-05-13 19:04:13', '2009-04-14 13:56:58'); INSERT INTO !PREFIX!_type VALUES('17', 'CMS_HTMLTEXT', '/**\r\n * CMS_HTMLTEXT\r\n */\r\ncInclude("includes", "functions.lang.php");\r\n\r\n$content = $a_content[''CMS_HTMLTEXT''][$val];\r\n$content = urldecode($content);\r\n$content = htmldecode($content);\r\n$content = strip_tags($content);\r\n\r\n$content = str_replace("&nbsp;", " ", $content);\r\n\r\n$content = htmlspecialchars($content);\r\nif ($content == "")\r\n{\r\n $content = "&nbsp;";\r\n}\r\n\r\n$content = nl2br($content);\r\n\r\nif (!empty($edit)) {\r\n\r\n $div = new cHTMLDiv;\r\n $div->setID("HTMLTEXT_".$db->f("idtype")."_".$val);\r\n $div->setEvent("focus", "this.style.border=''1px solid #bb5577''");\r\n $div->setEvent("blur", "this.style.border=''1px dashed #bfbfbf''");\r\n $div->setStyleDefinition("border", "1px dashed #bfbfbf");\r\n $div->updateAttributes(array("contentEditable" => "true"));\r\n $div->setStyleDefinition("direction", langGetTextDirection($lang));\r\n \r\n $editlink = new cHTMLLink;\r\n $editlink->setClass(''CMS_HTMLTEXT_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editlink->setLink($sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_HTMLTEXT&typenr=$val&lang=$lang"));\r\n \r\n $editimg = new cHTMLImage;\r\n $editimg->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edittext.gif");\r\n \r\n $savelink = new cHTMLLink;\r\n $savelink->setClass(''CMS_HTMLTEXT_''.$val.''_SAVE CMS_LINK_SAVE'');\r\n $savelink->setLink("javascript:setcontent(''$idartlang'',''0'')");\r\n \r\n $saveimg = new cHTMLImage;\r\n $saveimg->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_ok.gif");\r\n \r\n $savelink->setContent($saveimg);\r\n \r\n $editlink->setContent($editimg);\r\n \r\n $div->setContent($content);\r\n\r\n $tmp = implode("", array($div->render(), $editlink->render(), " ", $savelink->render()));\r\n $tmp = str_replace(''"'', ''\\"'', $tmp);\r\n} else {\r\n $tmp = $content;\r\n $tmp = str_replace(''"'', ''\\"'', $tmp);\r\n}\r\n\r\n\r\n$tmp = addslashes($tmp);\r\n$tmp = str_replace(''$'', ''\\\\\\$'', $tmp);', 'Text / Standard', '0', '', '2002-05-13 19:04:13', '2009-04-14 13:56:58');
INSERT INTO !PREFIX!_type VALUES('16', 'CMS_SIMPLELINKEDIT', '/**\r\n * CMS_LINKEDIT\r\n */\r\n$tmp = "";\r\nif ($edit) {\r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_SIMPLELINK&typenr=$val");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_SIMPLELINKEDIT_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editlink.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $tmp.$finalEditButton;\r\n}', '', '0', '', '0000-00-00 00:00:00', '2009-04-14 13:56:58'); INSERT INTO !PREFIX!_type VALUES('16', 'CMS_SIMPLELINKEDIT', '/**\r\n * CMS_LINKEDIT\r\n */\r\n$tmp = "";\r\nif (!empty($edit)) {\r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_SIMPLELINK&typenr=$val");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_SIMPLELINKEDIT_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editlink.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $tmp.$finalEditButton;\r\n}', '', '0', '', '0000-00-00 00:00:00', '2009-04-14 13:56:58');
INSERT INTO !PREFIX!_type VALUES('14', 'CMS_IMGEDIT', '/**\r\n * CMS_IMGEDIT\r\n */\r\n$tmp = '''';\r\n\r\nif ($edit) {\r\n \r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_IMG&typenr=$val&lang=$lang");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_IMGEDIT_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editimage.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $tmp.$finalEditButton;\r\n}', 'Edit button for an image', '0', '', '0000-00-00 00:00:00', '2009-04-14 13:58:44'); INSERT INTO !PREFIX!_type VALUES('14', 'CMS_IMGEDIT', '/**\r\n * CMS_IMGEDIT\r\n */\r\n$tmp = '''';\r\n\r\nif (!empty($edit)) {\r\n \r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_IMG&typenr=$val&lang=$lang");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_IMGEDIT_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editimage.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $tmp.$finalEditButton;\r\n}', 'Edit button for an image', '0', '', '0000-00-00 00:00:00', '2009-04-14 13:58:44');
INSERT INTO !PREFIX!_type VALUES('15', 'CMS_IMGTITLE', '/**\r\n * CMS_IMGTITLE\r\n */\r\n$tmp = $a_content["CMS_IMGDESCR"][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = addslashes($tmp);', 'Title of an image', '0', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'); INSERT INTO !PREFIX!_type VALUES('15', 'CMS_IMGTITLE', '/**\r\n * CMS_IMGTITLE\r\n */\r\n$tmp = $a_content["CMS_IMGDESCR"][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = addslashes($tmp);', 'Title of an image', '0', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00');
INSERT INTO !PREFIX!_type VALUES('13', 'CMS_RAWLINK', '/**\r\n* CMS_RAWLINK\r\n*/\r\nglobal $cfgClient;\r\nglobal $client;\r\n\r\n$tmp = urldecode($a_content["CMS_LINK"][$val]);\r\n\r\n/* internal link */\r\nif ( is_numeric($tmp) ) {\r\n $tmp = "front_content.php?idcatart=". $tmp."&client=".$client."&lang=".$lang;\r\n if ($edit) $tmp = $sess->url("$tmp");\r\n\r\n}', 'Raw Link without transformation', '0', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'); INSERT INTO !PREFIX!_type VALUES('13', 'CMS_RAWLINK', '/**\r\n* CMS_RAWLINK\r\n*/\r\nglobal $cfgClient;\r\nglobal $client;\r\n\r\n$tmp = urldecode($a_content["CMS_LINK"][$val]);\r\n\r\n/* internal link */\r\nif ( is_numeric($tmp) ) {\r\n $tmp = "front_content.php?idcatart=". $tmp."&client=".$client."&lang=".$lang;\r\n if (!empty($edit)) $tmp = $sess->url("$tmp");\r\n\r\n}', 'Raw Link without transformation', '0', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00');
INSERT INTO !PREFIX!_type VALUES('11', 'CMS_LINKTITLE', '/**\r\n * CMS_LINKTITLE\r\n */\r\n$tmp = $a_content["CMS_LINKDESCR"][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = addslashes($tmp);\r\n\r\n', 'Title of a Link', '0', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'); INSERT INTO !PREFIX!_type VALUES('11', 'CMS_LINKTITLE', '/**\r\n * CMS_LINKTITLE\r\n */\r\n$tmp = $a_content["CMS_LINKDESCR"][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = addslashes($tmp);\r\n\r\n', 'Title of a Link', '0', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00');
INSERT INTO !PREFIX!_type VALUES('12', 'CMS_LINKEDIT', '/**\r\n * CMS_LINKEDIT\r\n */\r\n$tmp = "";\r\n\r\nif ($edit) {\r\n \r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_LINK&typenr=$val");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_LINKEDIT_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editlink.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $finalEditButton;\r\n \r\n}', 'Link edit button', '0', '', '0000-00-00 00:00:00', '2009-04-14 13:56:58'); INSERT INTO !PREFIX!_type VALUES('12', 'CMS_LINKEDIT', '/**\r\n * CMS_LINKEDIT\r\n */\r\n$tmp = "";\r\n\r\nif (!empty($edit)) {\r\n \r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_LINK&typenr=$val");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_LINKEDIT_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editlink.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $finalEditButton;\r\n \r\n}', 'Link edit button', '0', '', '0000-00-00 00:00:00', '2009-04-14 13:56:58');
INSERT INTO !PREFIX!_type VALUES('9', 'CMS_HEAD', '/**\r\n * CMS_HEAD\r\n */\r\n$tmp = $a_content["CMS_HEAD"][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = str_replace("''", "\\''", $tmp);\r\n$tmp = str_replace("\\$",''\\\\\\$'',$tmp); \r\n\r\nif ($edit) {\r\n\r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_HEAD&typenr=$val&lang=$lang");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_HEAD_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edithead.gif");\r\n $editButton->setBorder(0);\r\n $editButton->setStyleDefinition("margin-right", "2px");\r\n \r\n $editAnchor->setContent($editButton);\r\n \r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $tmp.$finalEditButton;\r\n}', 'Headline / Standard', '0', '', '2002-05-13 19:02:34', '2009-04-14 13:56:58'); INSERT INTO !PREFIX!_type VALUES('9', 'CMS_HEAD', '/**\r\n * CMS_HEAD\r\n */\r\n$tmp = $a_content["CMS_HEAD"][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = str_replace("''", "\\''", $tmp);\r\n$tmp = str_replace("\\$",''\\\\\\$'',$tmp); \r\n\r\nif (!empty($edit)) {\r\n\r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_HEAD&typenr=$val&lang=$lang");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_HEAD_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edithead.gif");\r\n $editButton->setBorder(0);\r\n $editButton->setStyleDefinition("margin-right", "2px");\r\n \r\n $editAnchor->setContent($editButton);\r\n \r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $tmp.$finalEditButton;\r\n}', 'Headline / Standard', '0', '', '2002-05-13 19:02:34', '2009-04-14 13:56:58');
INSERT INTO !PREFIX!_type VALUES('10', 'CMS_SWF', '/**\r\n * CMS_SWF\r\n */\r\n\r\nif ( !is_object($db2) ) $db2 = new DB_Contenido;\r\n\r\n$tmp_id = $a_content[''CMS_SWF''][$val];\r\n\r\n$sql = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE idclient=''".$client."'' AND idupl=''".$tmp_id."'' AND filetype = ''swf''";\r\n\r\n$db2->query($sql);\r\n\r\nif ( $db2->next_record() ) {\r\n\r\n $tmp_swf = $cfgClient[$client]["upload"] . $db2->f("dirname") . $db2->f("filename");\r\n \r\n $aImgSize = @getimagesize($tmp_swf);\r\n\r\n $width = $aImgSize[0];\r\n $height = $aImgSize[1];\r\n\r\n $tmp = ''<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"\r\n codebase="http://download.macromedia.com\r\n /pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"\r\n width="''.$width.''" height="''.$height.''" id="movie" align="">\r\n <param name="movie" value="''.$tmp_swf.''">\r\n <embed src="''.$tmp_swf.''" quality="high" width="''.$width.''"\r\n height="''.$height.''" name="movie" align="" type="application/x-shockwave-flash"\r\n plug inspage="http://www.macromedia.com/go/getflashplayer">\r\n </object>'';\r\n} else {\r\n $tmp = '''';\r\n}\r\n\r\n\r\nif( $edit ) {\r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_SWF&typenr=$val");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_SWF_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editswf.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n \r\n $tmp = ''<table cellspacing="0" cellpadding="0" border="0"><tr><td>''.$tmp.''</td></tr><tr><td>''.$finalEditButton.''</td></tr></table>'';\r\n}\r\n\r\n$tmp = addslashes( addslashes($tmp) ); \r\n$tmp = str_replace( "\\\\\\''", "''", $tmp ); ', 'Flash Movie', '0', '', '0000-00-00 00:00:00', '2009-04-14 13:56:58'); INSERT INTO !PREFIX!_type VALUES('10', 'CMS_SWF', '/**\r\n * CMS_SWF\r\n */\r\n\r\nif ( !is_object($db2) ) $db2 = new DB_Contenido;\r\n\r\n$tmp_id = $a_content[''CMS_SWF''][$val];\r\n\r\n$sql = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE idclient=''".$client."'' AND idupl=''".$tmp_id."'' AND filetype = ''swf''";\r\n\r\n$db2->query($sql);\r\n\r\nif ( $db2->next_record() ) {\r\n\r\n $tmp_swf = $cfgClient[$client]["upload"] . $db2->f("dirname") . $db2->f("filename");\r\n \r\n $aImgSize = @getimagesize($tmp_swf);\r\n\r\n $width = $aImgSize[0];\r\n $height = $aImgSize[1];\r\n\r\n $tmp = ''<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"\r\n codebase="http://download.macromedia.com\r\n /pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"\r\n width="''.$width.''" height="''.$height.''" id="movie" align="">\r\n <param name="movie" value="''.$tmp_swf.''">\r\n <embed src="''.$tmp_swf.''" quality="high" width="''.$width.''"\r\n height="''.$height.''" name="movie" align="" type="application/x-shockwave-flash"\r\n plug inspage="http://www.macromedia.com/go/getflashplayer">\r\n </object>'';\r\n} else {\r\n $tmp = '''';\r\n}\r\n\r\n\r\nif( !empty($edit) ) {\r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_SWF&typenr=$val");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_SWF_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editswf.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n \r\n $tmp = ''<table cellspacing="0" cellpadding="0" border="0"><tr><td>''.$tmp.''</td></tr><tr><td>''.$finalEditButton.''</td></tr></table>'';\r\n}\r\n\r\n$tmp = addslashes( addslashes($tmp) ); \r\n$tmp = str_replace( "\\\\\\''", "''", $tmp ); ', 'Flash Movie', '0', '', '0000-00-00 00:00:00', '2009-04-14 13:56:58');
INSERT INTO !PREFIX!_type VALUES('7', 'CMS_LINKTARGET', '/**\r\n * CMS_LINKTARGET\r\n */\r\n$tmp = $a_content["CMS_LINKTARGET"][$val];\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = str_replace("''", "\\''", $tmp);\r\n$tmp = urldecode($tmp);', 'Frame', '0', '', '2002-05-13 19:04:43', '2002-05-13 19:04:43'); INSERT INTO !PREFIX!_type VALUES('7', 'CMS_LINKTARGET', '/**\r\n * CMS_LINKTARGET\r\n */\r\n$tmp = $a_content["CMS_LINKTARGET"][$val];\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = str_replace("''", "\\''", $tmp);\r\n$tmp = urldecode($tmp);', 'Frame', '0', '', '2002-05-13 19:04:43', '2002-05-13 19:04:43');
INSERT INTO !PREFIX!_type VALUES('8', 'CMS_LINKDESCR', '/**\r\n * CMS_LINKDESCR\r\n */\r\n$tmp = $a_content["CMS_LINKDESCR"][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = str_replace("''", "\\''", $tmp);\r\nif ($edit) {\r\n\r\n\r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_LINK&typenr=$val");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_LINKDESCR_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editlink.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $tmp.$finalEditButton;\r\n}', 'Description', '0', '', '2002-05-13 19:05:00', '2009-04-14 13:56:58'); INSERT INTO !PREFIX!_type VALUES('8', 'CMS_LINKDESCR', '/**\r\n * CMS_LINKDESCR\r\n */\r\n$tmp = $a_content["CMS_LINKDESCR"][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = str_replace("''", "\\''", $tmp);\r\nif (!empty($edit)) {\r\n\r\n\r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_LINK&typenr=$val");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_LINKDESCR_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editlink.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $tmp.$finalEditButton;\r\n}', 'Description', '0', '', '2002-05-13 19:05:00', '2009-04-14 13:56:58');
INSERT INTO !PREFIX!_type VALUES('6', 'CMS_LINK', '/**\r\n* CMS_LINK\r\n*/\r\n\r\n$tmp = urldecode($a_content["CMS_LINK"][$val]);\r\n\r\n/* internal link */\r\nif ( is_numeric($tmp) ) {\r\n $tmp = "front_content.php?idcatart=". $tmp."&client=".$client."&lang=".$lang;\r\n if ($edit) $tmp = $sess->url("$tmp");\r\n\r\n} else {\r\n\r\n if (!preg_match(''/^(http|https|ftp|telnet|gopher):\\/\\/((?:[a-zA-Z0-9_-]+\\.?)+):?(\\d*)/'', $tmp)) {\r\n // it''s a relative link, or an absolute link with unsupported protocol\r\n if (substr($tmp,0,4) == "www." || $tmp == "") { // only check if it could be a domainname\r\n $tmp = "http://".$tmp;\r\n }\r\n }\r\n\r\n}', 'Link', '0', '', '2002-05-13 19:04:36', '2002-05-13 19:04:36'); INSERT INTO !PREFIX!_type VALUES('6', 'CMS_LINK', '/**\r\n* CMS_LINK\r\n*/\r\n\r\n$tmp = urldecode($a_content["CMS_LINK"][$val]);\r\n\r\n/* internal link */\r\nif ( is_numeric($tmp) ) {\r\n $tmp = "front_content.php?idcatart=". $tmp."&client=".$client."&lang=".$lang;\r\n if (!empty($edit)) $tmp = $sess->url("$tmp");\r\n\r\n} else {\r\n\r\n if (!preg_match(''/^(http|https|ftp|telnet|gopher):\\/\\/((?:[a-zA-Z0-9_-]+\\.?)+):?(\\d*)/'', $tmp)) {\r\n // it''s a relative link, or an absolute link with unsupported protocol\r\n if (substr($tmp,0,4) == "www." || $tmp == "") { // only check if it could be a domainname\r\n $tmp = "http://".$tmp;\r\n }\r\n }\r\n\r\n}', 'Link', '0', '', '2002-05-13 19:04:36', '2002-05-13 19:04:36');
INSERT INTO !PREFIX!_type VALUES('4', 'CMS_IMG', '/**\r\n * CMS_IMG\r\n */\r\n \r\n$tmp = $a_content["CMS_IMG"][$val];\r\n$tmp = urldecode($tmp);\r\nif($tmp==""||$tmp=="0"){\r\n$tmp="";\r\n\r\n}else{\r\n\r\nif (is_numeric($tmp))\r\n{\r\n$sql = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE idclient=''".$client."'' AND idupl=''".$tmp."''";\r\n\r\n$db2 = new DB_Contenido;\r\n$db2->query($sql);\r\n\r\nif ( $db2->next_record() ) {\r\n\r\n $tmp = $cfgClient[$client]["path"]["htmlpath"].$cfgClient[$client]["upload"].$db2->f("dirname").$db2->f("filename");\r\n }\r\n}\r\n\r\n $tmp = htmlspecialchars($tmp);\r\n$tmp = urldecode($tmp);\r\n $tmp = str_replace("''", "\\''", $tmp);\r\n}', 'Image', '0', '', '2002-05-13 19:04:21', '2002-05-13 19:04:21'); INSERT INTO !PREFIX!_type VALUES('4', 'CMS_IMG', '/**\r\n * CMS_IMG\r\n */\r\n \r\n$tmp = $a_content["CMS_IMG"][$val];\r\n$tmp = urldecode($tmp);\r\nif($tmp==""||$tmp=="0"){\r\n$tmp="";\r\n\r\n}else{\r\n\r\nif (is_numeric($tmp))\r\n{\r\n$sql = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE idclient=''".$client."'' AND idupl=''".$tmp."''";\r\n\r\n$db2 = new DB_Contenido;\r\n$db2->query($sql);\r\n\r\nif ( $db2->next_record() ) {\r\n\r\n $tmp = $cfgClient[$client]["path"]["htmlpath"].$cfgClient[$client]["upload"].$db2->f("dirname").$db2->f("filename");\r\n }\r\n}\r\n\r\n $tmp = htmlspecialchars($tmp);\r\n$tmp = urldecode($tmp);\r\n $tmp = str_replace("''", "\\''", $tmp);\r\n}', 'Image', '0', '', '2002-05-13 19:04:21', '2002-05-13 19:04:21');
INSERT INTO !PREFIX!_type VALUES('5', 'CMS_IMGDESCR', '/**\r\n * CMS_IMGDESCR\r\n */\r\n$tmp = $a_content["CMS_IMGDESCR"][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = htmlentities($tmp,ENT_QUOTES);\r\n\r\n\r\nif ($edit) {\r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_IMG&typenr=$val&lang=$lang");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_IMGDESCR_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editimage.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $tmp.$finalEditButton;\r\n}', 'Description', '0', '', '2002-05-13 19:04:28', '2009-04-14 13:56:58'); INSERT INTO !PREFIX!_type VALUES('5', 'CMS_IMGDESCR', '/**\r\n * CMS_IMGDESCR\r\n */\r\n$tmp = $a_content["CMS_IMGDESCR"][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = htmlentities($tmp,ENT_QUOTES);\r\n\r\n\r\nif (!empty($edit)) {\r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_IMG&typenr=$val&lang=$lang");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_IMGDESCR_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editimage.gif");\r\n $editButton->setBorder(0);\r\n \r\n $editAnchor->setContent($editButton);\r\n\r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $tmp.$finalEditButton;\r\n}', 'Description', '0', '', '2002-05-13 19:04:28', '2009-04-14 13:56:58');
INSERT INTO !PREFIX!_type VALUES('3', 'CMS_TEXT', '/**\r\n * CMS_TEXT\r\n */\r\ncInclude("includes", "functions.lang.php");\r\n\r\n$tmp = $a_content["CMS_TEXT"][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = nl2br($tmp);\r\n$tmp = str_replace("''", "\\''", $tmp);\r\n$tmp = str_replace("\\$",''\\\\\\$'',$tmp);\r\n\r\n$tmp = str_replace("<br />","<br>", $tmp);\r\nif ($edit) {\r\n\r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_TEXT&typenr=$val&lang=$lang");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_TEXT_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edittext.gif");\r\n $editButton->setBorder(0);\r\n $editButton->setStyleDefinition("margin-right", "2px");\r\n \r\n $editAnchor->setContent($editButton);\r\n \r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $tmp.$finalEditButton;\r\n}', 'Text / Standard', '0', '', '2002-05-13 19:04:13', '2009-04-14 13:56:58'); INSERT INTO !PREFIX!_type VALUES('3', 'CMS_TEXT', '/**\r\n * CMS_TEXT\r\n */\r\ncInclude("includes", "functions.lang.php");\r\n\r\n$tmp = $a_content["CMS_TEXT"][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = nl2br($tmp);\r\n$tmp = str_replace("''", "\\''", $tmp);\r\n$tmp = str_replace("\\$",''\\\\\\$'',$tmp);\r\n\r\n$tmp = str_replace("<br />","<br>", $tmp);\r\nif (!empty($edit)) {\r\n\r\n /* Edit anchor and image */\r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_TEXT&typenr=$val&lang=$lang");\r\n $editAnchor = new cHTMLLink;\r\n $editAnchor->setClass(''CMS_TEXT_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''".$editLink."'');");\r\n //Save all content\r\n \r\n $editButton = new cHTMLImage;\r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edittext.gif");\r\n $editButton->setBorder(0);\r\n $editButton->setStyleDefinition("margin-right", "2px");\r\n \r\n $editAnchor->setContent($editButton);\r\n \r\n /* Process for output with echo */\r\n $finalEditButton = $editAnchor->render();\r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton));\r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton);\r\n\r\n $tmp = $tmp.$finalEditButton;\r\n}', 'Text / Standard', '0', '', '2002-05-13 19:04:13', '2009-04-14 13:56:58');
INSERT INTO !PREFIX!_type VALUES('1', 'CMS_HTMLHEAD', '/**\r\n * CMS_HTMLHEAD\r\n */ \r\n$tmp = $a_content[''CMS_HTMLHEAD''][$val];\r\n$tmp = urldecode($tmp); \r\n\r\n$tmp = AddSlashes(AddSlashes($tmp)); \r\n$tmp = str_replace("\\\\\\''","''",$tmp); \r\n$tmp = str_replace("\\$",''\\\\\\$'',$tmp); \r\n\r\ncInclude("includes", "functions.lang.php"); \r\n\r\nif ($edit) {\r\n if ($tmp == "") { \r\n $tmp = "&nbsp;"; \r\n } \r\n $insiteEditingDIV = new cHTMLDiv; \r\n $insiteEditingDIV->setId("HTMLHEAD_".$db->f("idtype")."_".$val);\r\n $insiteEditingDIV->setEvent("Focus", "this.style.border=''1px solid #bb5577'';"); \r\n $insiteEditingDIV->setEvent("Blur", "this.style.border=''1px dashed #bfbfbf'';"); \r\n $insiteEditingDIV->setStyleDefinition("border", "1px dashed #bfbfbf"); \r\n $insiteEditingDIV->setStyleDefinition("direction", langGetTextDirection($lang)); \r\n \r\n $insiteEditingDIV->updateAttributes(array("contentEditable" => "true")); \r\n \r\n $insiteEditingDIV->setContent("_REPLACEMENT_"); \r\n \r\n\r\n /* Edit anchor and image */ \r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_HTMLHEAD&typenr=$val");\r\n $editAnchor = new cHTMLLink; \r\n $editAnchor->setClass(''CMS_HTMLHEAD_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''" . $editLink . "'');"); \r\n \r\n $editButton = new cHTMLImage; \r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edithead.gif");\r\n $editButton->setBorder(0); \r\n $editButton->setStyleDefinition("margin-right", "2px"); \r\n \r\n $editAnchor->setContent($editButton); \r\n \r\n \r\n /* Save anchor and image */ \r\n $saveAnchor = new cHTMLLink; \r\n $saveAnchor->setClass(''CMS_HTMLHEAD_''.$val.''_SAVE CMS_LINK_SAVE'');\r\n $saveAnchor->setLink("javascript:setcontent(''$idartlang'',''0'')"); \r\n \r\n $saveButton = new cHTMLImage; \r\n $saveButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_ok.gif"); \r\n $saveButton->setBorder(0); \r\n \r\n $saveAnchor->setContent($saveButton); \r\n\r\n /* Process for output with echo */ \r\n $finalEditButton = $editAnchor->render(); \r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton)); \r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton); \r\n \r\n $finalEditingDiv = $insiteEditingDIV->render(); \r\n $finalEditingDiv = AddSlashes(AddSlashes($finalEditingDiv)); \r\n $finalEditingDiv = str_replace("\\\\\\''","''",$finalEditingDiv); \r\n \r\n $finalEditingDiv = str_replace("_REPLACEMENT_", $tmp, $finalEditingDiv); \r\n \r\n $finalSaveButton = $saveAnchor->render(); \r\n $finalSaveButton = AddSlashes(AddSlashes($finalSaveButton)); \r\n $finalSaveButton = str_replace("\\\\\\''","''",$finalSaveButton); \r\n \r\n $tmp = $finalEditingDiv . $finalEditButton . $finalSaveButton;\r\n}', 'Headline / HTML', '0', '', '0000-00-00 00:00:00', '2009-04-14 13:56:58'); INSERT INTO !PREFIX!_type VALUES('1', 'CMS_HTMLHEAD', '/**\r\n * CMS_HTMLHEAD\r\n */ \r\n$tmp = $a_content[''CMS_HTMLHEAD''][$val];\r\n$tmp = urldecode($tmp); \r\n\r\n$tmp = AddSlashes(AddSlashes($tmp)); \r\n$tmp = str_replace("\\\\\\''","''",$tmp); \r\n$tmp = str_replace("\\$",''\\\\\\$'',$tmp); \r\n\r\ncInclude("includes", "functions.lang.php"); \r\n\r\nif (!empty($edit)) {\r\n if ($tmp == "") { \r\n $tmp = "&nbsp;"; \r\n } \r\n $insiteEditingDIV = new cHTMLDiv; \r\n $insiteEditingDIV->setId("HTMLHEAD_".$db->f("idtype")."_".$val);\r\n $insiteEditingDIV->setEvent("Focus", "this.style.border=''1px solid #bb5577'';"); \r\n $insiteEditingDIV->setEvent("Blur", "this.style.border=''1px dashed #bfbfbf'';"); \r\n $insiteEditingDIV->setStyleDefinition("border", "1px dashed #bfbfbf"); \r\n $insiteEditingDIV->setStyleDefinition("direction", langGetTextDirection($lang)); \r\n \r\n $insiteEditingDIV->updateAttributes(array("contentEditable" => "true")); \r\n \r\n $insiteEditingDIV->setContent("_REPLACEMENT_"); \r\n \r\n\r\n /* Edit anchor and image */ \r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_HTMLHEAD&typenr=$val");\r\n $editAnchor = new cHTMLLink; \r\n $editAnchor->setClass(''CMS_HTMLHEAD_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''" . $editLink . "'');"); \r\n \r\n $editButton = new cHTMLImage; \r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edithead.gif");\r\n $editButton->setBorder(0); \r\n $editButton->setStyleDefinition("margin-right", "2px"); \r\n \r\n $editAnchor->setContent($editButton); \r\n \r\n \r\n /* Save anchor and image */ \r\n $saveAnchor = new cHTMLLink; \r\n $saveAnchor->setClass(''CMS_HTMLHEAD_''.$val.''_SAVE CMS_LINK_SAVE'');\r\n $saveAnchor->setLink("javascript:setcontent(''$idartlang'',''0'')"); \r\n \r\n $saveButton = new cHTMLImage; \r\n $saveButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_ok.gif"); \r\n $saveButton->setBorder(0); \r\n \r\n $saveAnchor->setContent($saveButton); \r\n\r\n /* Process for output with echo */ \r\n $finalEditButton = $editAnchor->render(); \r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton)); \r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton); \r\n \r\n $finalEditingDiv = $insiteEditingDIV->render(); \r\n $finalEditingDiv = AddSlashes(AddSlashes($finalEditingDiv)); \r\n $finalEditingDiv = str_replace("\\\\\\''","''",$finalEditingDiv); \r\n \r\n $finalEditingDiv = str_replace("_REPLACEMENT_", $tmp, $finalEditingDiv); \r\n \r\n $finalSaveButton = $saveAnchor->render(); \r\n $finalSaveButton = AddSlashes(AddSlashes($finalSaveButton)); \r\n $finalSaveButton = str_replace("\\\\\\''","''",$finalSaveButton); \r\n \r\n $tmp = $finalEditingDiv . $finalEditButton . $finalSaveButton;\r\n}', 'Headline / HTML', '0', '', '0000-00-00 00:00:00', '2009-04-14 13:56:58');
INSERT INTO !PREFIX!_type VALUES('2', 'CMS_HTML', '/** \r\n * CMS_HTML \r\n */ \r\n$tmp = $a_content[''CMS_HTML''][$val]; \r\n$tmp = urldecode($tmp); \r\n\r\n$tmp = AddSlashes(AddSlashes($tmp)); \r\n$tmp = str_replace("\\\\\\''","''",$tmp); \r\n$tmp = str_replace("\\$",''\\\\\\$'',$tmp); \r\n\r\ncInclude("includes", "functions.lang.php"); \r\n\r\nif ($edit) { \r\n if ($tmp == "") { \r\n $tmp = "&nbsp;"; \r\n } \r\n $insiteEditingDIV = new cHTMLDiv; \r\n $insiteEditingDIV->setId("HTML_".$db->f("idtype")."_".$val); \r\n $insiteEditingDIV->setEvent("Focus", "this.style.border=''1px solid #bb5577'';"); \r\n $insiteEditingDIV->setEvent("Blur", "this.style.border=''1px dashed #bfbfbf'';"); \r\n $insiteEditingDIV->setStyleDefinition("border", "1px dashed #bfbfbf"); \r\n $insiteEditingDIV->setStyleDefinition("direction", langGetTextDirection($lang)); \r\n \r\n $insiteEditingDIV->updateAttributes(array("contentEditable" => "true")); \r\n \r\n $insiteEditingDIV->setContent("_REPLACEMENT_"); \r\n \r\n\r\n /* Edit anchor and image */ \r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_HTML&typenr=$val"); \r\n $editAnchor = new cHTMLLink; \r\n $editAnchor->setClass(''CMS_HTML_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''" . $editLink . "'');"); \r\n \r\n $editButton = new cHTMLImage; \r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edithtml.gif"); \r\n $editButton->setBorder(0); \r\n $editButton->setStyleDefinition("margin-right", "2px"); \r\n \r\n $editAnchor->setContent($editButton); \r\n \r\n \r\n /* Save anchor and image */ \r\n $saveAnchor = new cHTMLLink; \r\n $saveAnchor->setClass(''CMS_HTML_''.$val.''_SAVE CMS_LINK_SAVE'');\r\n $saveAnchor->setLink("javascript:setcontent(''$idartlang'',''0'')"); \r\n \r\n $saveButton = new cHTMLImage; \r\n $saveButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_ok.gif"); \r\n $saveButton->setBorder(0); \r\n \r\n $saveAnchor->setContent($saveButton); \r\n\r\n /* Process for output with echo */ \r\n $finalEditButton = $editAnchor->render(); \r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton)); \r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton); \r\n \r\n $finalEditingDiv = $insiteEditingDIV->render(); \r\n $finalEditingDiv = AddSlashes(AddSlashes($finalEditingDiv)); \r\n $finalEditingDiv = str_replace("\\\\\\''","''",$finalEditingDiv); \r\n \r\n $finalEditingDiv = str_replace("_REPLACEMENT_", $tmp, $finalEditingDiv); \r\n \r\n $finalSaveButton = $saveAnchor->render(); \r\n $finalSaveButton = AddSlashes(AddSlashes($finalSaveButton)); \r\n $finalSaveButton = str_replace("\\\\\\''","''",$finalSaveButton); \r\n \r\n $tmp = $finalEditingDiv . $finalEditButton . $finalSaveButton;\r\n}', 'Text / HTML', '0', '', '2002-05-13 19:04:13', '2009-04-14 13:56:58'); INSERT INTO !PREFIX!_type VALUES('2', 'CMS_HTML', '/** \r\n * CMS_HTML \r\n */ \r\n$tmp = $a_content[''CMS_HTML''][$val]; \r\n$tmp = urldecode($tmp); \r\n\r\n$tmp = AddSlashes(AddSlashes($tmp)); \r\n$tmp = str_replace("\\\\\\''","''",$tmp); \r\n$tmp = str_replace("\\$",''\\\\\\$'',$tmp); \r\n\r\ncInclude("includes", "functions.lang.php"); \r\n\r\nif (!empty($edit)) { \r\n if ($tmp == "") { \r\n $tmp = "&nbsp;"; \r\n } \r\n $insiteEditingDIV = new cHTMLDiv; \r\n $insiteEditingDIV->setId("HTML_".$db->f("idtype")."_".$val); \r\n $insiteEditingDIV->setEvent("Focus", "this.style.border=''1px solid #bb5577'';"); \r\n $insiteEditingDIV->setEvent("Blur", "this.style.border=''1px dashed #bfbfbf'';"); \r\n $insiteEditingDIV->setStyleDefinition("border", "1px dashed #bfbfbf"); \r\n $insiteEditingDIV->setStyleDefinition("direction", langGetTextDirection($lang)); \r\n \r\n $insiteEditingDIV->updateAttributes(array("contentEditable" => "true")); \r\n \r\n $insiteEditingDIV->setContent("_REPLACEMENT_"); \r\n \r\n\r\n /* Edit anchor and image */ \r\n $editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_HTML&typenr=$val"); \r\n $editAnchor = new cHTMLLink; \r\n $editAnchor->setClass(''CMS_HTML_''.$val.''_EDIT CMS_LINK_EDIT'');\r\n $editAnchor->setLink("javascript:setcontent(''$idartlang'',''" . $editLink . "'');"); \r\n \r\n $editButton = new cHTMLImage; \r\n $editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edithtml.gif"); \r\n $editButton->setBorder(0); \r\n $editButton->setStyleDefinition("margin-right", "2px"); \r\n \r\n $editAnchor->setContent($editButton); \r\n \r\n \r\n /* Save anchor and image */ \r\n $saveAnchor = new cHTMLLink; \r\n $saveAnchor->setClass(''CMS_HTML_''.$val.''_SAVE CMS_LINK_SAVE'');\r\n $saveAnchor->setLink("javascript:setcontent(''$idartlang'',''0'')"); \r\n \r\n $saveButton = new cHTMLImage; \r\n $saveButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_ok.gif"); \r\n $saveButton->setBorder(0); \r\n \r\n $saveAnchor->setContent($saveButton); \r\n\r\n /* Process for output with echo */ \r\n $finalEditButton = $editAnchor->render(); \r\n $finalEditButton = AddSlashes(AddSlashes($finalEditButton)); \r\n $finalEditButton = str_replace("\\\\\\''","''",$finalEditButton); \r\n \r\n $finalEditingDiv = $insiteEditingDIV->render(); \r\n $finalEditingDiv = AddSlashes(AddSlashes($finalEditingDiv)); \r\n $finalEditingDiv = str_replace("\\\\\\''","''",$finalEditingDiv); \r\n \r\n $finalEditingDiv = str_replace("_REPLACEMENT_", $tmp, $finalEditingDiv); \r\n \r\n $finalSaveButton = $saveAnchor->render(); \r\n $finalSaveButton = AddSlashes(AddSlashes($finalSaveButton)); \r\n $finalSaveButton = str_replace("\\\\\\''","''",$finalSaveButton); \r\n \r\n $tmp = $finalEditingDiv . $finalEditButton . $finalSaveButton;\r\n}', 'Text / HTML', '0', '', '2002-05-13 19:04:13', '2009-04-14 13:56:58');

Datei anzeigen

@ -37,6 +37,6 @@ define('C_SETUP_STEPFILE', 'images/steps/s%d.png');
define('C_SETUP_STEPFILE_ACTIVE', 'images/steps/s%da.png'); define('C_SETUP_STEPFILE_ACTIVE', 'images/steps/s%da.png');
define('C_SETUP_STEPWIDTH', 28); define('C_SETUP_STEPWIDTH', 28);
define('C_SETUP_STEPHEIGHT', 28); define('C_SETUP_STEPHEIGHT', 28);
define('C_SETUP_MIN_PHP_VERSION', '7.2.0'); define('C_SETUP_MIN_PHP_VERSION', '7.4.0');
define('C_SETUP_MAX_PHP_VERSION', '8.0.3'); define('C_SETUP_MAX_PHP_VERSION', '8.2.0');
define('C_SETUP_VERSION', '2.1.3'); define('C_SETUP_VERSION', '2.2.0 beta');

Datei anzeigen

@ -33,9 +33,10 @@ ini_set("error_log", "../data/logs/setup_errorlog.txt");
header('Content-Type: text/html; charset=UTF-8'); header('Content-Type: text/html; charset=UTF-8');
// Check php version // Check php version
if (version_compare(PHP_VERSION, C_SETUP_MIN_PHP_VERSION, '<') if (version_compare(PHP_VERSION, C_SETUP_MIN_PHP_VERSION, '<')) {
|| version_compare(PHP_VERSION, C_SETUP_MAX_PHP_VERSION, '>')) {
die("You need PHP >= " . C_SETUP_MIN_PHP_VERSION . " to install ConLite " . C_SETUP_VERSION . ". Sorry, even the setup doesn't work otherwise. Your version: " . PHP_VERSION . "\n"); die("You need PHP >= " . C_SETUP_MIN_PHP_VERSION . " to install ConLite " . C_SETUP_VERSION . ". Sorry, even the setup doesn't work otherwise. Your version: " . PHP_VERSION . "\n");
} else if (version_compare(PHP_VERSION, C_SETUP_MAX_PHP_VERSION, '>=')) {
die("You need PHP < " . C_SETUP_MAX_PHP_VERSION . " to install ConLite " . C_SETUP_VERSION . ". Sorry, even the setup doesn't work otherwise. Your version: " . PHP_VERSION . "\n");
} }

Datei anzeigen

@ -31,6 +31,8 @@ if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
//print_r($_SESSION);
class cSetupSetupSummary extends cSetupMask { class cSetupSetupSummary extends cSetupMask {
public function __construct($step, $previous, $next) { public function __construct($step, $previous, $next) {