Exemplo n.º 1
0
 function listall($username, $bgcolor1, $bgcolor2, $bgcolor3, $sitename)
 {
     global $prefix, $user_prefix, $db, $module_name;
     openTable();
     echo "<div align=\"center\" class=title>" . _COMPLETELIST . " {$username}</div><br>";
     echo "<table align=center border=1 width=\"90%\">";
     echo "<tr>";
     echo "<td align=center bgcolor={$bgcolor1} width=70><strong><div align=\"center\">" . _DATE . "</div></strong></td>";
     echo "<td align=center bgcolor={$bgcolor1} width=70><strong><div align=\"center\">" . _TIME . "</div></strong></td>";
     echo "<td align=center bgcolor={$bgcolor1}><strong>" . _TITLE . "</strong></td>";
     echo "<td align=center bgcolor={$bgcolor1} width=\"5%\"><strong><div align=\"center\">" . _PUBLIC . "</div></strong></td>";
     echo "<td align=center bgcolor={$bgcolor1} width=\"5%\"><strong><div align=\"center\">" . _EDIT . "</div></strong></td>";
     echo "<td align=center bgcolor={$bgcolor1} width=\"5%\"><strong><div align=\"center\">" . _DELETE . "</div></strong></td>";
     echo "</tr>";
     $sql = "SELECT jid, aid, title, pdate, ptime, mdate, mtime, status, mood FROM " . $prefix . "_journal WHERE aid='{$username}' order by 'jid' DESC";
     $result = $db->sql_query($sql);
     $dcount = 0;
     $pubcount = 0;
     $prvcount = 0;
     while ($row = $db->sql_fetchrow($result)) {
         $jid = intval($row['jid']);
         $title = filter($row['title'], "nohtml");
         $jaid = filter($row['aid'], "nohtml");
         $pdate = filter($row['pdate'], "nohtml");
         $ptime = filter($row['ptime'], "nohtml");
         $dcount = $dcount + 1;
         if ($row['status'] == "yes") {
             $pubcount = $pubcount + 1;
             $row['status'] = _YES;
         } else {
             $prvcount = $prvcount + 1;
             $row['status'] = _NO;
         }
         print "<tr>";
         printf("<td align=center bgcolor={$bgcolor2}><div align=\"center\">%s</div></td>", $row['pdate']);
         printf("<td align=center bgcolor={$bgcolor2}><div align=\"center\">%s</div></td>", $row['ptime']);
         printf("<td align=left bgcolor={$bgcolor2}><a href=\"modules.php?name={$module_name}&file=display&jid=%s\">%s</a>", $jid, $title);
         $sqlscnd = "SELECT cid from " . $user_prefix . "_journal_comments where rid=" . intval($row['jid']);
         $rstscnd = $db->sql_query($sqlscnd);
         $scndcount = 0;
         while ($rowscnd = $db->sql_fetchrow($rstscnd)) {
             $scndcount = $scndcount + 1;
         }
         if ($scndcount == 1) {
             printf(" &#151;&#151; {$scndcount} " . _COMMENT . "</td>");
         } else {
             printf(" &#151;&#151; {$scndcount} " . _COMMENTS . "</td>");
         }
         printf("<td align=center bgcolor={$bgcolor2}><div align=\"center\">%s</div></td>", $row['status']);
         printf("<td align=center bgcolor={$bgcolor2}><div align=\"center\"><a href=\"modules.php?name={$module_name}&file=modify&jid=%s\"><img src='modules/{$module_name}/images/edit.gif' border='0' alt='" . _EDIT . "'></a></div></td>", $row['jid']);
         printf("<td align=center bgcolor={$bgcolor2}><div align=\"center\"><a href=\"modules.php?name={$module_name}&file=delete&jid=%s\"><img src='modules/{$module_name}/images/trash.gif' border='0' alt='" . _DELETE . "'></a></div></td>", $row['jid']);
         print "</tr>";
     }
     echo "</table>";
     if ($prvcount == "") {
         $prvcount = 0;
     }
     if ($pubcount == "") {
         $pubcount = 0;
     }
     if ($dcount == "") {
         $dcount = 0;
     }
     echo "<br><div align=center>{$pubcount} " . _PUBLICENTRIES . " - " . "{$prvcount} " . _PRIVATEENTRIES . " - " . "{$dcount} " . _TOTALENTRIES . "</div>";
     closeTable();
 }
Exemplo n.º 2
0
/* 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 of the License.       */
/************************************************************************/
/* Additional security checking code 2003 by chatserv                   */
/* http://www.nukefixes.com -- http://www.nukeresources.com             */
/************************************************************************/
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
    die("You can't access this file directly...");
}
require_once "mainfile.php";
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$pagetitle = "- " . _USERSJOURNAL . "";
include "header.php";
include "modules/{$module_name}/functions.php";
cookiedecode($user);
$username = $cookie[1];
if ($debug == "true") {
    echo "UserName:{$username}<br>SiteName: {$sitename}";
}
startjournal($sitename, $user);
$onwhat = intval($onwhat);
$sql = "DELETE FROM " . $prefix . "_journal_comments WHERE cid = '{$onwhat}'";
$db->sql_query($sql);
echo "<br>";
openTable();
echo "<div align=center>" . _COMMENTDELETED . "<br><br>";
echo "[ <a href=\"modules.php?name={$module_name}&file=display&jid={$ref}\">" . _RETURNJOURNAL . "</a> ]</div>";
closeTable();
journalfoot();
// ATR, ACP, ATS
$query = "SELECT    id,  (priority + severity) as AggregatedPriority, from_unixtime(due_date) as duedate " . "FROM      mantis_bug_table, mantis_bug_tag_table " . "where     project_id IN (3, 4, 1) " . "and       mantis_bug_table.id =  mantis_bug_tag_table.bug_id " . "and       tag_id = 68 " . "and       status < " . $statusResolved . " " . "ORDER by AggregatedPriority desc";
$fields = array("AggregatedPriority");
openTable($fields);
$nbRows = displayResultsWithFields($query, $fields);
closeTable();
?>
<center><h3><?php 
print $nbRows;
?>
 items</h3></center>
        

<br>
<center><h1> Actions due before V8B3-U2 Release <i></i></h1></center>
<br>
<?php 
$query = "SELECT    mantis_bug_table.id as id, from_unixtime(date_order) as dateRelease, due_date, from_unixtime(due_date) as duedate " . "FROM      mantis_bug_table, mantis_project_version_table " . "where \tmantis_bug_table.project_id = 9 " . "and \t    due_date < date_order " . "and \t    due_date > 1 " . "and \t    mantis_project_version_table.id = 207 " . "and       status < " . $statusResolved . " ";
"ORDER by duedate asc";
//print $query;
$fields = array("duedate", "dateRelease");
openTable($fields);
$nbRows = displayResultsWithFields($query, $fields);
closeTable();
?>
<center><h3><?php 
print $nbRows;
?>
 items</h3></center>
<?php 
html_page_bottom1a();