* @link       http://www.4fb.de
 * @link       http://www.contenido.org
 * 
 * {@internal 
 *   created  2003-05-26
 *   modified 2010-05-20, Murat Purc, removed request check during processing ticket [#CON-307]
 *   
 *   $Id$
 * }}
 * 
 */
define('CON_FRAMEWORK', true);
// Contenido startup process
include_once '../../../includes/startup.php';
cInclude("includes", "cfg_language_de.inc.php");
cInclude("includes", "functions.con.php");
plugin_include('workflow', 'classes/class.workflow.php');
plugin_include('workflow', 'includes/functions.workflow.php');
$workflowartallocations = new WorkflowArtAllocations();
$workflowusersequences = new WorkflowUserSequences();
$workflowartallocations->select();
while ($obj = $workflowartallocations->next()) {
    $starttime = $obj->get("starttime");
    $idartlang = $obj->get("idartlang");
    $lastidusersequence = $obj->get("lastusersequence");
    $usersequence = getCurrentUserSequence($idartlang, 0);
    if ($usersequence != $lastidusersequence) {
        $workflowusersequences->select("idusersequence = '{$usersequence}'");
        if ($wfobj = $workflowusersequences->next()) {
            $wfitem = $wfobj->get("idworkflowitem");
            $pos = $wfobj->get("position");
<?php

cInclude('templates', 'template.right_top_blank.html');
 /**
  * Duplicates the newsletter specified by $itemID
  * @param $itemID integer specifies the newsletter id
  */
 public function duplicate($iItemID)
 {
     global $client, $lang, $auth;
     $client = Contenido_Security::toInteger($client);
     $lang = Contenido_Security::toInteger($lang);
     cInclude("includes", "functions.con.php");
     $oBaseItem = new Newsletter();
     $oBaseItem->loadByPrimaryKey($iItemID);
     $oItem = parent::create();
     $oItem->set("name", $oBaseItem->get("name") . "_" . substr(md5(rand()), 0, 10));
     $iIDArt = 0;
     if ($oBaseItem->get("type") == "html" && $oBaseItem->get("idart") > 0 && $oBaseItem->get("template_idart") > 0) {
         $oClientLang = new cApiClientLanguage(false, $client, $lang);
         if ($oClientLang->getProperty("newsletter", "html_newsletter") == "true") {
             $iIDArt = conCopyArticle($oBaseItem->get("idart"), $oClientLang->getProperty("newsletter", "html_newsletter_idcat"), sprintf(i18n("Newsletter: %s", $plugin_name), $oItem->get("name")));
             conMakeOnline($iIDArt, $lang);
             // Article has to be online for sending...
         }
         unset($oClientLang);
     }
     $oItem->set("idart", $iIDArt);
     $oItem->set("template_idart", $oBaseItem->get("template_idart"));
     $oItem->set("idclient", $client);
     $oItem->set("idlang", $lang);
     $oItem->set("welcome", 0);
     $oItem->set("type", $oBaseItem->get("type"));
     $oItem->set("subject", $oBaseItem->get("subject"));
     $oItem->set("message", $oBaseItem->get("message"));
     $oItem->set("newsfrom", $oBaseItem->get("newsfrom"));
     $oItem->set("newsfromname", $oBaseItem->get("newsfromname"));
     $oItem->set("newsdate", date("Y-m-d H:i:s"), false);
     // But more or less deprecated
     $oItem->set("use_cronjob", $oBaseItem->get("use_cronjob"));
     $oItem->set("send_to", $oBaseItem->get("send_to"));
     $oItem->set("send_ids", $oBaseItem->get("send_ids"));
     $oItem->set("dispatch", $oBaseItem->get("dispatch"));
     $oItem->set("dispatch_count", $oBaseItem->get("dispatch_count"));
     $oItem->set("dispatch_delay", $oBaseItem->get("dispatch_delay"));
     $oItem->set("author", $auth->auth["uid"]);
     $oItem->set("created", date("Y-m-d H:i:s"), false);
     // Copy properties, runtime on-demand allocation of the properties object
     if (!is_object($this->properties)) {
         $this->properties = new PropertyCollection();
     }
     $this->properties->setWhere("idclient", $client);
     $this->properties->setWhere("itemtype", $this->primaryKey);
     $this->properties->setWhere("itemid", $iItemID);
     $this->properties->query();
     while ($oPropertyItem = $this->properties->next()) {
         $oItem->setProperty($oPropertyItem->get("type"), $oPropertyItem->get("name"), $oPropertyItem->get("value"));
     }
     $oItem->store();
     return $oItem;
 }
<?php

cInclude('templates', 'template.left_top_blank.html');
    exit;
}
// If no mode defined, use mode three
if (empty($_GET['mode'])) {
    $_GET['mode'] = 3;
}
// If no action definied
if (empty($_GET['action'])) {
    $_GET['action'] = 'linkchecker';
    $action = "linkchecker";
}
plugin_include('linkchecker', 'includes/config.plugin.php');
plugin_include('linkchecker', 'includes/include.checkperms.php');
plugin_include('linkchecker', 'includes/include.linkchecker_tests.php');
cInclude('pear', 'PEAR.php');
cInclude('pear', 'Cache/Lite.php');
// Initialization
$actionID = 500;
$aCats = array();
$aSearchIDInfosArt = array();
$aSearchIDInfosCatArt = array();
$aSearchIDInfosNonID = array();
$iWhitelist_timeout = 2592000;
// 30 days
// Var initialization
$aUrl = array('cms' => $cfgClient[$client]['path']['htmlpath'], 'contenido' => $cfg['path']['contenido_fullhtml']);
// Template- and languagevars
if ($cronjob != true) {
    $tpl->set('s', 'FULLHTML', $aUrl['contenido']);
    $tpl->set('s', 'MODE', intval($_GET['mode']));
    $tpl->set('s', 'URL', $aUrl['contenido']);
<?php

if (!defined("CON_FRAMEWORK")) {
    define("CON_FRAMEWORK", true);
}
# includes
include_once dirname(__FILE__) . '/../../../includes/startup.php';
cInclude('plugins', 'db_backup/includes/config.plugin.php');
# Parameters
$fStart = isset($_GET['start']) ? floatval($_GET['start']) : microtime(true);
$sFile = $_GET['file'];
$iLine = intval($_GET['line']);
$sWait = $_GET['wait'];
$sProcessed = $_GET['processed'];
$contenido = $_GET['contenido'];
# Defines
$plugin_name = 'db_backup';
# Execution
$ret = restore_tables($cfg['path']['contenido'] . 'data/backup/' . $sFile, $iLine);
if (is_int($ret)) {
    $oTpl = new Template();
    $oTpl->set('s', 'PATH', $cfg['path']['contenido_fullhtml']);
    $oTpl->set('s', 'LABEL_WAIT', $sWait . '&hellip;');
    $oTpl->set('s', 'MESSAGE', $sProcessed . ': ' . $ret);
    $oTpl->set('s', 'SCRIPT', 'document.location.href="' . $cfg['path']['contenido_fullhtml'] . 'plugins/db_backup/includes/ajax.restore.php?mode=1&action=2&file=' . $sFile . '&start=' . $fStart . '&line=' . $ret . '&wait=' . $sWait . '&processed=' . $sProcessed . '&contenido=' . $contenido . '";');
    $oTpl->generate($cfg[$plugin_name]['templates']['ajax_restore']);
} else {
    echo '<script type="text/javascript">document.location.href="' . $cfg['path']['contenido_fullhtml'] . 'main.php?area=' . $plugin_name . '&frame=4&mode=1&action=2&file=' . $sFile . '&start=' . $fStart . '&result=' . ($ret ? 'true' : 'false') . '&contenido=' . $contenido . '";</script>';
}
# functions
function restore_tables($file, $first_line = 0)
if (!defined('CON_FRAMEWORK')) {
    die('Illegal call');
}
$plugin_name = 'newsletter';
if (isset($_GET['idrecipientgroup']) && (int) $_GET['idrecipientgroup'] > 0) {
    $caption = i18n("Overview", $plugin_name);
    $tmp_area = "foo2";
    # Set template data
    $tpl->set("d", "ID", 'c_' . $tpl->dyn_cnt[0]);
    $tpl->set("d", "CLASS", '');
    $tpl->set("d", "OPTIONS", '');
    $tpl->set("d", "CAPTION", '<a class="white" onclick="sub.clicked(this)" target="right_bottom" href="' . $sess->url("main.php?area={$area}&frame=4&idrecipientgroup={$idrecipientgroup}") . '">' . $caption . '</a>');
    $tpl->next();
    if (is_array($cfg['plugins']['recipientslogic'])) {
        foreach ($cfg['plugins']['recipientslogic'] as $plugin) {
            cInclude("plugins", "recipientslogic/{$plugin}/" . $plugin . ".php");
            $className = "recipientslogic_" . $plugin;
            $class = new $className();
            $caption = $class->getFriendlyName();
            $tmp_area = "foo2";
            $tpl->set("d", "ID", 'c_' . $tpl->dyn_cnt[0]);
            $tpl->set("d", "CLASS", '');
            $tpl->set("d", "OPTIONS", '');
            $tpl->set("d", "CAPTION", '<a class="white" onclick="sub.clicked(this)" target="right_bottom" href="' . $sess->url("main.php?area=recipientgroup_rights&frame=4&useplugin={$plugin}&idrecipientgroup={$idrecipientgroup}") . '">' . $caption . '</a>');
            $tpl->next();
        }
    }
    $tpl->set('s', 'COLSPAN', $tpl->dyn_cnt[0] * 2 + 2);
    # Generate the third navigation layer
    $tpl->generate($cfg["path"]["templates"] . $cfg["templates"]["subnav"]);
} else {
 * @since      file available since contenido release <= 4.6
 * 
 * {@internal 
 *   created unknown
 *   modified 2008-07-02, Frederic Schneider, add security fix
 *
 *   $Id$:
 * }}
 * 
 */
if (!defined('CON_FRAMEWORK')) {
    die('Illegal call');
}
// check requests
Contenido_Security::checkRequests();
cInclude("includes", "functions.pathresolver.php");
function str_replace_recursive($array)
{
    if (!is_array($array)) {
        return false;
    }
    $result = array();
    foreach ($array as $value) {
        $result[] = str_replace("e", "", $value);
    }
    return $result;
}
// fetch idartlang for idart
$sql = "SELECT idartlang FROM " . $cfg['tab']['art_lang'] . " WHERE idart=" . Contenido_Security::toInteger($idart) . " AND idlang=" . Contenido_Security::toInteger($lang);
$db->query($sql);
$db->next_record();
 * @link       http://www.contenido.org
 * 
 * @modified	2008-12-05	Andreas Lindner, make select box values for time unit selection language independent
 * {@internal 
 *   created 
 *   
 *   $Id$: 
 * }}
 * 
 */
if (!defined('CON_FRAMEWORK')) {
    die('Illegal call');
}
plugin_include('workflow', 'classes/class.workflow.php');
plugin_include('workflow', 'includes/functions.workflow.php');
cInclude("includes", "functions.encoding.php");
$iIdMarked = (int) $_GET['idworkflowitem'];
$availableWorkflowActions = WorkflowActions::getAvailableWorkflowActions();
$sCurrentEncoding = getEncodingByLanguage($db, $lang, $cfg);
if (htmlentities($adduser, ENT_COMPAT, $sCurrentEncoding) == htmlentities(i18n("Add User", "workflow"), ENT_COMPAT, $sCurrentEncoding)) {
    $action = "workflow_create_user";
}
/* Function: Move step up */
if ($action == "workflow_step_up") {
    $workflowitems = new WorkflowItems();
    $workflowitems->swap($idworkflow, $position, $position - 1);
}
/* Function: Move step down */
if ($action == "workflow_step_down") {
    $workflowitems = new WorkflowItems();
    $workflowitems->swap($idworkflow, $position, $position + 1);