Blame | Letzte Änderung | Log anzeigen | RSS feed
<?php/*** @package Content-management* @author Lars Tiefland <tiefland@weban.de>* @copyright 2010 Webagentur Niewerth* @license propietary http://www.weban.de* @version $Rev: 3931 $* @filesource**//**** @package Content-management* @author Lars Tiefland <tiefland@weban.de>* @copyright 2010 Webagentur Niewerth*/// SVN: $Id: logbuch.php 3931 2011-09-16 08:17:57Z tiefland $define( "Range", 100 );require_once "common.php";require_once "smarty/libs/SmartyPaginate.class.php";require_once "includes/pagination.php";$daten = array();$filter = array( "mode" => array( "filter" => FILTER_CALLBACK, "options" =>"check_mode" ), "id" => FILTER_SANITIZE_NUMBER_INT, );$out = filter_input_array( INPUT_GET, $filter );$mode = $out["mode"];$id = $out["id"];$rufname = $mode;$sql = "SELECT SQL_CALC_FOUND_ROWSlb.*,lba.name AS art,a.userFROMlogbuch lbJOINlogbuch_arten lbaONlba.ID=lb.artJOINcontent_management.Access AS aONa.ID=lb.userWHERErufname='$rufname'ANDlb.vorgang=$idORDER BYdatum DESCLIMIT" . SmartyPaginate::getcurrentIndex() . ", " . Range . "";switch ( $mode ){case "bestellung":$skript = "/Warenwirtschaft/bestellungen.php";$param = "Bestellung";break;case "artikel":$skript = "/Online-Shop/artikel.php";$param = "action=edit&ID";break;case "directory":$skript = "/Online-Shop/directory.php";$param = "action=edit&ID";break;default:$sql = "SELECT SQL_CALC_FOUND_ROWSlb.*,lba.name AS art,lba.rufname,a.userFROMlogbuch lbJOINlogbuch_arten lbaONlba.ID=lb.artJOINcontent_management.Access AS aONa.ID=lb.userORDER BYdatum DESCLIMIT" . SmartyPaginate::getcurrentIndex() . ", " . Range . "";break;}$res = mysql_query( $sql );$sql_2 = "SELECTFOUND_ROWS() AS total";$res_2 = mysql_query( $sql_2 );$row_2 = mysql_fetch_assoc( $res_2 );$total = $row_2["total"];pagination( $total );while ( $row = mysql_fetch_assoc( $res ) ){if ( isset( $row["rufname"] ) ){switch ( $row["rufname"] ){case "bestellung":$row["skript"] = "/Warenwirtschaft/bestellungen.php";$row["param"] = "Bestellung";break;case "artikel":$row["skript"] = "/Online-Shop/artikel.php";$row["param"] = "action=edit&ID";break;case "directory":$row["skript"] = "/Online-Shop/directory.php";$row["param"] = "action=edit&ID";break;}}else{$row["skript"] = $script;$row["param"] = $param;}$daten[] = $row;}$GLOBALS["ui"]->assign( "daten", $daten );if ( $mode ){$GLOBALS["ui"]->display( "common/logbuch.tpl" );}else{$GLOBALS["ui"]->assign( "file", "common/logbuch.tpl" );$GLOBALS["ui"]->display( "common/page.tpl" );}function check_mode(){$modes = array( "bestellung", "directory", "artikel", "" );if ( in_array( $_GET["mode"], $modes ) ){return $_GET["mode"];}else{return null;}} ?>