Esempio n. 1
0
				</TD>
	                      </TR>
	                    <TR>
	                        <TD align=right><B><?php 
        echo $t->translate("Author");
        ?>
:</B><BR><font size="1">(<?php 
        echo $t->translate("multiselection possible");
        ?>
)</font></TD>
	                      	<TD>
	                          <select name="mautoren[]" size="15" multiple>
	                    <?php 
        //############################# Autoren holen ##################################
        $db->query("SELECT * FROM AUTOR ORDER BY NACHNAME ASC");
        $db2 = new DB_DocsWell();
        while ($db->next_record()) {
            echo "<option value=\"" . $db->f("ID") . "\" ";
            if (!$mautoren) {
                $db2->query("SELECT * FROM PENDING_ATR_DKMNT WHERE PENDING_ID={$ID}");
                while ($db2->next_record()) {
                    if ($db2->f("AUTOR_ID") == $db->f("ID")) {
                        echo " selected ";
                    }
                }
            } else {
                for ($i = 0; $i < count($mautoren); $i++) {
                    if ($mautoren[$i] == $db->f("ID")) {
                        echo " selected ";
                    }
                }
Esempio n. 2
0
    $bs->box_strip($msg);
    $db->query("SELECT * FROM auth_user WHERE username LIKE '{$by}' ORDER BY username ASC");
    $bx->box_begin();
    if ($by && $by == "%") {
        $bystr = $t->translate("All");
    } else {
        $bystr = ereg_replace("%", "", $by);
    }
    $bx->box_title($t->translate("Users") . ": " . $bystr);
    $bx->box_body_begin();
    echo "<table border=0 align=center cellspacing=1 cellpadding=1 width=100%>\n";
    echo "<tr><td><b>" . $t->translate("No") . ".</b></td><td><b>#&nbsp;" . $t->translate("Docs") . "</b></td><td><b>" . $t->translate("Username") . "</b></td><td><b>" . $t->translate("Realname") . "</b></td><td><b>" . $t->translate("E-Mail") . "</b></td></tr>\n";
    $i = 1;
    while ($db->next_record()) {
        $username = $db->f("username");
        $db2 = new DB_DocsWell();
        $db2->query("SELECT COUNT(*) FROM DOKUMENT d, KATEGORIE k WHERE d.ANGELEGTVON='{$username}' AND d.status!='D' AND d.KATEGORIE=k.ID");
        $db2->next_record();
        $num = "[" . sprintf("%03d", $db2->f("COUNT(*)")) . "]";
        echo "<tr><td>" . sprintf("%d", $i) . "</td>\n";
        echo "<td><a href=\"" . $sess->url("docbyuser.php") . $sess->add_query(array("usr" => $username)) . "\">{$num}</a></td>\n";
        echo "<td>" . $username . "</td>\n";
        echo "<td>" . $db->f("realname") . "</td>";
        echo "<td>&lt;<a href=\"mailto:" . $db->f("email_usr") . "\">" . ereg_replace("@", " at ", htmlentities($db->f("email_usr"))) . "</a>&gt;</td>";
        echo "</tr>\n";
        $i++;
    }
    echo "</table>\n";
    $bx->box_body_end();
    $bx->box_end();
}
Esempio n. 3
0
if (isset($auth) && !empty($auth->auth["perm"])) {
    @page_close();
    page_open(array("sess" => "DocsWell_Session", "auth" => "DocsWell_Auth", "perm" => "DocsWell_Perm"));
}
require "./include/header.inc";
$bx = new box("", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_body_font_color, $th_box_body_align);
$be = new box("", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_error_font_color, $th_box_body_align);
?>

<!-- content -->
<?php 
###
### Submit Handler
###
## Get a database connection
$db = new DB_DocsWell();
// Check if there was a submission
$reg = 0;
while (is_array($HTTP_POST_VARS) && (list($key, $val) = each($HTTP_POST_VARS))) {
    switch ($key) {
        case "register":
            // Register a new user
            $username = trim($username);
            $password = trim($password);
            $cpassword = trim($cpassword);
            $realname = trim($realname);
            $email_usr = trim($email_usr);
            if (empty($username) || empty($password) || empty($cpassword) || empty($email_usr)) {
                // Do we have all necessary data?
                $be->box_full($t->translate("Error"), $t->translate("Please enter") . " <b>" . $t->translate("Username") . "</b>, <b>" . $t->translate("Password") . "</b> " . $t->translate("and") . " <b>" . $t->translate("E-Mail") . "</b>!");
                break;
$title = $t->translate("Authors");
if ($by and $by != "%") {
    $title .= ": " . substr($by, 0, 1);
}
if ($by == "%") {
    $title .= ": " . $t->translate("All");
}
$bx->box_title($title);
$bx->box_body_begin();
?>
<table border=0 align=center cellspacing=1 cellpadding=1 width=100%>
<?php 
echo "<tr><td><b>" . $t->translate("No") . ".</b></td><td><b>#&nbsp;" . $t->translate("Docs") . "</b></td><td><b>" . $t->translate("Names") . "</b></td><td><b>" . $t->translate("E-Mail") . "</b></td></tr>\n";
$i = 1;
while ($db->next_record()) {
    $db2 = new DB_DocsWell();
    $columns = "COUNT(*)";
    $tables = "DOKUMENT d, AUTOR_DOKUMENT ad, KATEGORIE k";
    $where = "ad.AUTOR_ID=" . $db->f("ID") . " \n\t      AND ad.DOKUMENT_ID=d.id\n              AND d.STATUS!='D'\n\t      AND d.KATEGORIE=k.ID";
    $num = "";
    $db2->query("SELECT {$columns} FROM {$tables} WHERE {$where}");
    $db2->next_record();
    $cnt = $db2->f("COUNT(*)");
    if ($cnt > 0) {
        $num = "[" . sprintf("%03d", $cnt) . "]";
        echo "<tr><td>" . sprintf("%d", $i) . "</td>\n";
        $nachname = $db->f("NACHNAME");
        if (empty($nachname)) {
            echo "<td><a href=\"" . $sess->url("docbydev.php") . $sess->add_query(array("developer" => $db->f("ID"))) . "\">{$num}</a></td>\n";
            echo "<td>" . $t->translate("Unknown") . "</td>\n";
            echo "<td>&nbsp;</td>\n";
Esempio n. 5
0
<?php

// Disabling cache
header("Cache-Control: no-cache, must-revalidate");
// HTTP/1.1
header("Pragma: no-cache");
// HTTP/1.0
require "./include/config.inc";
require "./include/lib.inc";
$db = new DB_DocsWell();
if ($dokuid) {
    $db->query("UPDATE DOKUMENT SET BEWERTUNG=BEWERTUNG+{$bewerten}, BEWVONANZP=BEWVONANZP+1 WHERE ID={$dokuid}");
}
$docurl = "{$url}?id={$dokuid}";
?>
<html>
<head>
<?php 
echo "<meta http-equiv=\"refresh\" content=\"0; URL={$docurl}\">\n";
?>
</head>
<body>
   <a href="<?php 
echo $docurl;
?>
">Back</a>
</body>
</html>
				</TD>
	                    </TR>
	                    <TR>
	                        <TD align=right><B><?php 
        echo $t->translate("Author");
        ?>
:</B><BR><font size="1">(<?php 
        echo $t->translate("multiselection possible");
        ?>
)</font></TD>
	                      	<TD>
	                          <select name="mautoren[]" size="5" multiple>
	                    <?php 
        //############################# Autoren holen ##################################
        $db->query("SELECT * FROM AUTOR ORDER BY NACHNAME ASC");
        $db2 = new DB_DocsWell();
        while ($db->next_record()) {
            echo "<option value=\"" . $db->f("ID") . "\" ";
            if (!$mautoren) {
                $db2->query("SELECT * FROM AUTOR_DOKUMENT WHERE DOKUMENT_ID={$ID}");
                while ($db2->next_record()) {
                    if ($db2->f("AUTOR_ID") == $db->f("ID")) {
                        echo " selected ";
                    }
                }
            } else {
                for ($i = 0; $i < count($mautoren); $i++) {
                    if ($mautoren[$i] == $db->f("ID")) {
                        echo " selected ";
                    }
                }
Esempio n. 7
0
">
				       <?php 
        }
        ?>
                        </TD>
                   </TR>
                   <TR>
                        <TD align="right" valign="top"><B><?php 
        echo $t->translate("Category");
        ?>
:</B></TD>
                        <TD>
                                <?php 
        $dbKat = new DB_DocsWell();
        $cat_path = "";
        $dbt = new DB_DocsWell();
        $dbt->query("SELECT * FROM KATEGORIE WHERE ID=" . $kategorie);
        //echo "------>".$db->f("KATID");
        $dbt->next_record();
        $parent = $dbt->f("PARENT_ID");
        $pfad = array();
        while ($parent != 1) {
            array_unshift($pfad, $dbt->f("NAME"));
            $dbt->query("SELECT * FROM KATEGORIE WHERE ID={$parent}");
            $dbt->next_record();
            $parent = $dbt->f("PARENT_ID");
        }
        array_unshift($pfad, $dbt->f("NAME"));
        $counter = 0;
        $anz = count($pfad);
        foreach ($pfad as $onestep) {
    @page_close();
    page_open(array("sess" => "DocsWell_Session", "auth" => "DocsWell_Auth", "perm" => "DocsWell_Perm"));
}
require "header.inc";
$bx = new box("100%", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_body_font_color, $th_box_body_align);
$be = new box("", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_error_font_color, $th_box_body_align);
$bs = new box("100%", $th_strip_frame_color, $th_strip_frame_width, $th_strip_title_bgcolor, $th_strip_title_font_color, $th_strip_title_align, $th_strip_body_bgcolor, $th_strip_body_font_color, $th_strip_body_align);
?>

<!-- content -->
<?php 
if ($config_perm_admfaq != "all" && (!isset($perm) || !$perm->have_perm($config_perm_admfaq))) {
    $be->box_full($t->translate("Error"), $t->translate("Access denied"));
} else {
    $db->query("SELECT ID,TITEL, KATEGORIE FROM DOKUMENT WHERE STATUS !='D'");
    $dbKat = new DB_DocsWell();
    $bx->box_begin();
    $bx->box_title($t->translate("Document and category check"));
    $bx->box_body_begin();
    $bs->box_strip($t->translate("Documents with categories that have further sub-categories (documents should only hang on leaves)"));
    echo "<table width=100% border=0><tr><td>\n";
    $counter = 0;
    while ($db->next_record()) {
        $dbKat->query("SELECT count(*) as anz FROM KATEGORIE WHERE PARENT_ID=" . $db->f("KATEGORIE"));
        $dbKat->next_record();
        if ($dbKat->f("anz") > 0) {
            echo "<a href=\"update_online.php?ID=" . $db->f("ID") . "\">" . $db->f("TITEL") . "</a><br>";
            $counter++;
        }
    }
    if ($counter == 0) {
Esempio n. 9
0
require "./include/prepend.php3";
page_open(array("sess" => "DocsWell_Session"));
// Disabling cache
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Expires: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache, must-revalidate");
// HTTP/1.1
header("Pragma: no-cache");
// HTTP/1.0
require "./include/config.inc";
require "./include/lib.inc";
require "./include/translation.inc";
require "./include/lang.inc";
require "./include/box.inc";
$t = new translation($la);
$db = new DB_DocsWell();
$bx = new box("95%", $th_box_frame_color, 0, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_body_font_color, $th_box_body_align);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta http-equiv="expires" content="0">
   <meta http-equiv="Refresh" content="1200; URL=<?php 
echo $sys_url . "sitebar.php";
?>
">
   <title><?php 
echo $sys_name;
?>
 - <?php 
Esempio n. 10
0
# This is the text backend of the system
#
# This program is free software. You can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 or later of the GPL.
######################################################################
require "./include/prepend.php3";
page_open(array("sess" => "DocsWell_Session"));
if (isset($auth) && !empty($auth->auth["perm"])) {
    page_close();
    page_open(array("sess" => "DocsWell_Session", "auth" => "DocsWell_Auth", "perm" => "DocsWell_Perm"));
}
header("Content-Type: text/plain");
// Disabling cache
header("Cache-Control: no-cache, must-revalidate");
// HTTP/1.1
header("Pragma: no-cache");
// HTTP/1.0
require "./include/config.inc";
require "./include/lib.inc";
$db = new DB_DocsWell();
$db->query("SELECT * FROM DOKUMENT WHERE STATUS='A' ORDER BY AENDERUNGSDATUM DESC limit 10");
$i = 0;
while ($db->next_record()) {
    echo $db->f("TITEL") . "\n";
    $timestamp = mktimestampdw($db->f("AENDERUNGSDATUM"));
    echo timestr($timestamp) . "\n";
    echo $sys_url . "docbyid.php?id=" . $db->f("ID") . "\n";
    $i++;
}
@page_close();
Esempio n. 11
0
require "lib.inc";
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n";
echo "<!DOCTYPE rss PUBLIC \"-//Netscape Communications//DTD RSS 0.91//EN\"\n";
echo "           \"http://my.netscape.com/publish/formats/rss-0.91.dtd\">\n";
echo "<rss version=\"0.91\">\n";
echo "  <channel>\n";
echo "    <title>" . $sys_name . "</title>\n";
echo "    <link>" . $sys_url . "</link>\n";
echo "    <description>" . $sys_name . " - " . $sys_title . "</description>\n";
echo "    <language>en-us</language>\n";
echo "  <image>\n";
echo "    <title>" . $sys_name . "</title>\n";
echo "    <url>" . $sys_url . $sys_logo_image . "</url>\n";
echo "    <link>" . $sys_url . "</link>\n";
echo "    <description>" . $sys_name . " - " . $sys_title . "</description>\n";
echo "    <width>66</width>\n";
echo "    <height>73</height>\n";
echo "  </image>\n";
$db = new DB_DocsWell();
$db->query("SELECT DOKUMENT.TITEL AS titel, SPRACHEDEF.SPRACHE AS sprache, DOKUMENT.AENDERUNGSDATUM, DOKUMENT.ID as id, DOKUMENT.BESCHREIBUNG as beschreibung  FROM DOKUMENT, SPRACHEDEF,auth_user WHERE DOKUMENT.SPRACHE=SPRACHEDEF.ID AND DOKUMENT.ANGELEGTVON=auth_user.username AND DOKUMENT.STATUS='A' ORDER BY DOKUMENT.AENDERUNGSDATUM DESC, DOKUMENT.ID DESC limit 10");
$i = 0;
while ($db->next_record()) {
    echo "  <item>\n";
    echo "    <title>" . $db->f("titel") . " (" . $db->f("sprache") . ")</title>\n";
    echo "    <link>" . $sys_url . "docbyid.php?id=" . $db->f("id") . "</link>\n";
    //  echo "    <description>".wrap($db->f("beschreibung"))."</description>\n";
    echo "  </item>\n";
    $i++;
}
echo "  </channel>\n";
echo "</rss>\n";
Esempio n. 12
0
<html>
<head>
<?
// Disabling cache
header("Cache-Control: no-cache, must-revalidate");     // HTTP/1.1
header("Pragma: no-cache");                             // HTTP/1.0

require "config.inc";
require "lib.inc";

$db = new DB_DocsWell;

if($dokuid) {
     $db->query("UPDATE DOKUMENT SET BEWERTUNG=BEWERTUNG+$bewerten, BEWVONANZP=BEWVONANZP+1 WHERE ID=$dokuid");      
}

$docurl = substr($sys_url, 0, (strlen($sys_url)-1))."$url?id=$dokuid";
   echo "<meta http-equiv=\"refresh\" content=\"0; URL=$docurl\">\n";
?>
</head>
<body>
   <a href="<?php 
echo $docurl;
?>
">back</a>
</body>
</html>
Esempio n. 13
0
	<h3><?php 
echo $sys_name;
?>
 Database Connection</h3>
	<ul>
    	<li>I am now going to try to create a DB_<?php 
echo $sys_name;
?>
 database connection.<br>If an error occures, then you should look at these points and fix them before proceeding:
		<ul>
			<li>Have you introduced the correct database parameters (<i>Host</i>, <i>Database</i> name, <i>User</i> name and <i>Password</i>) in the include/local.inc file?
        	<li>Have you created the database tables and set the defaults? (you've got them in the <i>sql</i> subdirectory)
			<li>Is your database running? ;-)
		</ul>
<?php 
$db = new DB_DocsWell();
if ($db->query("SELECT * FROM auth_user")) {
    ?>
			<li><b><font color="green">Created a DB_<?php 
    echo $sys_name;
    ?>
 database connection successfully.</font></b></li>
        	<?php 
}
?>

	</ul>
	<p>[ <a href="install.php">Go back</a> ] [ <a href="install.php?action=check_session">Next</a> ]