Example #1
0
 /**
  * Zeigt das gesamte DIV an
  */
 function show()
 {
     echo "<div ";
     if ($this->XPOS > 0 || $this->YPOS > 0) {
         $tmp = ":absolute; ";
         if ($this->YPOS > 0) {
             $tmp .= " top:" . $this->YPOS . "px; ";
         }
         if ($this->XPOS > 0) {
             $tmp .= " left:" . $this->XPOS . "px; ";
         }
         $this->setStyle("position", $tmp);
     }
     $this->getToolTipTag();
     $this->showStyles();
     echo " > ";
     if ($this->KOPFTEXT_NEED) {
         /*
          * Bei berechtigung, Kopftext bearbeiten.
          */
         if ($_SESSION['config']->CURRENTUSER->STATUS == "admin" || $_SESSION['config']->CURRENTUSER->STATUS == "user") {
             if (isset($_REQUEST['changeHeadInfo']) && strlen($_REQUEST['changeHeadInfo']) > 5) {
                 $ktRl = substr($_REQUEST['changeHeadInfo'], 5);
                 $dbtbl = new DbTable($_SESSION['config']->DBCONNECT, "kopftexte", array("text"), "", "", "", "runlink = '" . $ktRl . "' ");
                 if ($dbtbl->getRowCount() == 0) {
                     $dbtblInsert = new DbTable($_SESSION['config']->DBCONNECT, "kopftexte", array("runlink", "parent", "text"), "", "", "", "runlink = '" . $ktRl . "' ");
                     $dbtblInsert->insertRowByArray(array($ktRl, null, ""));
                     $dbtbl->refresh();
                 }
                 if (isset($_REQUEST['DbTableUpdate' . $dbtbl->TABLENAME]) && $_REQUEST['DbTableUpdate' . $dbtbl->TABLENAME] == "Speichern") {
                     $dbtbl->doUpdate();
                 }
                 $frm = $dbtbl->getUpdateAllMask();
                 $frm->add(new Hiddenfield("changeHeadInfo", $_REQUEST['changeHeadInfo']));
                 $frm->show();
             } else {
                 $sp = new Spacer(5);
                 $sp->show();
                 $txKtb = new Text("Kopftext bearbeiten<br>");
                 $txKtb->setFilter(false);
                 $lnk = new Link("?changeHeadInfo=Cnge-" . $_SESSION['runLink'], $txKtb);
                 $lnk->show();
             }
         }
         $tx = new Text(getKopfText());
         $tx->setFilter(false);
         $tx->show();
     }
     if ($this->getObjectCount() > 0) {
         foreach ($this->OBJECTS as $obj) {
             $obj->show();
         }
     }
     //--------------
     include $this->FILE;
     //--------------
     echo "</div>";
 }
<?php

/**
 * @author Daniel Scheidler
 * @copyright April 2008
 */
$actionLog = new DbTable($_SESSION['config']->DBCONNECT, "action_log", array("sessionid", "userid", "zeit", "request_dump"));
$uId = $_SESSION['config']->CURRENTUSER->USERID;
if (strlen($uId) <= 0) {
    $uId = -1;
}
$rowArray = array($_REQUEST['CySess'], $uId, time(), getArrayText($_REQUEST));
//Wenn keine Login-Informationen enthalten sind...
if (!(strpos(" " . getArrayText($_REQUEST), "pw") > 0 && strpos(" " . getArrayText($_REQUEST), "user") > 0)) {
    $actionLog->insertRowByArray($rowArray);
}
// Daten die älter als eine Woche sind entfernen
$sql = "DELETE FROM action_log WHERE zeit < " . (time() - 129600);
$_SESSION['config']->DBCONNECT->executeQuery($sql);
function getArrayText($arr)
{
    $ret = "";
    foreach ($arr as $key => $val) {
        $ret .= $key . "\n" . htmlspecialchars($val, ENT_QUOTES) . "\n\n";
    }
    return $ret;
}