$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># " . $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><<a href=\"mailto:" . $db->f("email_usr") . "\">" . ereg_replace("@", " at ", htmlentities($db->f("email_usr"))) . "</a>></td>"; echo "</tr>\n"; $i++; } echo "</table>\n"; $bx->box_body_end(); $bx->box_end(); } ?>
$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># " . $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> </td>\n"; } else { echo "<td><a href=\"" . $sess->url("docbydev.php") . $sess->add_query(array("developer" => $db->f("ID"))) . "\">{$num}</a></td>\n"; echo "<td>" . $db->f("NACHNAME"); if ($db->f("VORNAME")) { echo ", " . $db->f("VORNAME");
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 "; } } } echo ">" . $db->f("NACHNAME"); if ($db->f("VORNAME") != "") { echo ", " . $db->f("VORNAME");
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 "; } } } echo ">" . $db->f("NACHNAME") . ", " . $db->f("VORNAME") . "</option>\n"; } ?>
$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; } if (strcmp($password, $cpassword)) { // password are identical? $be->box_full($t->translate("Error"), $t->translate("The passwords are not identical") . ". " . $t->translate("Please try again") . "!"); break; } /* Does the user already exist? NOTE: This should be a transaction, but it isn't... */ $db->query("select * from auth_user where username='******'"); if ($db->nf() > 0) { $be->box_full($t->translate("Error"), $t->translate("User") . " <B>{$username}</B> " . $t->translate("already exists") . "!<br>" . $t->translate("Please select a different Username") . "."); break; } // Create a uid and insert the user... $u_id = md5(uniqid($hash_secret)); $modification_usr = "******"; $creation_usr = "******"; $permlist = "user_pending"; $query = "insert into auth_user values('{$u_id}','{$username}','{$password}','{$realname}','{$email_usr}',{$modification_usr},{$creation_usr},'{$permlist}')"; $db->query($query); if ($db->affected_rows() == 0) { $be->box_full($t->translate("Error"), $t->translate("Registration of new User failed") . ":<br> {$query}"); break; }
<!-- 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) { echo $t->translate("No documents found"); } echo "</td></tr>"; echo "<tr><td colspan=\"2\">"; echo "</td></tr>"; echo "</table>\n"; $bs->box_strip($t->translate("Documents with deleted category")); $db->query("SELECT ID,TITEL, KATEGORIE FROM DOKUMENT WHERE STATUS != 'D'");
<?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>
<?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) { $counter++;
echo $th_body_bgcolor; ?> " topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0"> <!-- content --> <p> <?php $bx->box_begin(); $bx->box_body_begin(); echo "<a href=\"{$sys_url_title}\" target=\"_content\"><img src=\"{$sys_logo_small_image}\" border=\"0\" height=\"{$sys_logo_small_heigth}\" width=\"{$sys_logo_small_width}\" ALT=\"{$sys_logo_small_alt}\"></a>"; $bx->box_body_end(); $bx->box_end(); $bx->box_begin(); $bx->box_title("<font size=\"1\">" . $t->translate("Recent Docs") . "</font>"); $db->query("SELECT * FROM DOKUMENT WHERE STATUS='A' ORDER BY AENDERUNGSDATUM DESC, ID DESC limit 20"); $i = 0; $bx->box_body_begin(); while ($db->next_record()) { echo "<div class=newsind>• "; echo "<a href=\"" . $sys_url . "docbyid.php?id=" . $db->f("ID") . "\" target=\"_content\">" . $db->f("TITEL") . "</a></div>\n"; $i++; } echo "<p><b><font size=\"1\"><a href=\"" . $sys_url . "\" target=\"_content\">more...</a></font></b>\n"; $bx->box_body_end(); $bx->box_end(); ?> </body> </html> <?php @page_close();
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";
<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>
<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> ]