| Server IP : 104.21.21.239 / Your IP : 216.73.217.74 Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5 System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64 User : ec2-user ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/mitzvahm/wwwdevplanner/mod/ |
Upload File : |
<?php include('_mod_security.php'); ?>
<?php
$sql_temp = "DELETE FROM notes_temp WHERE user_id = ".$_SESSION['user_id']." AND event_id = ".$_SESSION['active_event'];
$result_temp = mysqli_query($GLOBALS['con'], $sql_temp) or die('Database error!');
$sql = "SELECT n.id, n.ix_id, n.comment, n.followup_date, n.followup_complete, p.PageIndex, p.notes_title, p.notes_table, p.notes_id_field, p.notes_key_fields, (n.followup_date <= NOW() AND n.followup_complete <> 1) AS past_due FROM notes n INNER JOIN pagecontrol p ON (n.ix = p.PageIndex) WHERE n.user_id = ".$_SESSION['user_id']." AND n.event_id = ".$_SESSION['active_event'];
$sql = $sql." ORDER BY p.notes_seq, p.notes_title, n.ix_id";
$result = mysqli_query($GLOBALS['con'], $sql) or die('Database error!');
$xls_sql = "SELECT note_type, identifier, followup_date, followup_complete, note FROM notes_temp WHERE user_id = ".$_SESSION['user_id']." AND event_id = ".$_SESSION['active_event'];
$ix_list = "notes";
$ix_form = "";
?>
<script>
// ****** Prepare popup form settings *****
var win_page = 'page_form.php';
var win_width = 600;
var win_height = 400;
var print_section = 'div_db_grid';
</script>
<h1>Notes</h1>
<?php //get_notes(); ?>
<?php get_help_guide('help_notes'); ?>
<?php
if (empty($_SESSION['active_event'])) :
?>
<h3>No Bar/Bat Mitzvah defined - please create or activate a Bar/Bat Mitzvah!</h3>
<?php
endif;
?>
<?php //include('mod/_db_navigator_bar.php'); ?>
<div class="db-grid" id="div_db_grid">
<table id="db_grid_main" class="dbgrid" align="center" cellpadding="0" cellspacing="2" border="0" >
<thead>
<tr>
<td width="120" align="center" class="data-grid-label">
Note Type
</td>
<td width="220" align="center" class="data-grid-label">
Identifier
</td>
<td width="95" align="center" class="data-grid-label">
Follow-up Date
</td>
<td width="65" align="center" class="data-grid-label">
Complete
</td>
<td width="400" align="center" class="data-grid-label">
Note
</td>
</tr>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_object($result))
{
?>
<tr>
<td class="data-grid-var" >
<?php
if ($row->ix_id > 0) :
echo '<a href="index.php?IX='.$row->PageIndex.'&id='.$row->ix_id.'">';
else:
echo '<a href="index.php?IX='.$row->PageIndex.'">';
endif;
echo $row->notes_title;
echo '</a>';
?>
</td>
<td class="data-grid-var">
<?php
$identifier = '';
if ($row->ix_id > 0 && !empty($row->notes_table) && !empty($row->notes_key_fields) && !empty($row->notes_id_field)) :
$sql = "SELECT ".$row->notes_key_fields." FROM ".$row->notes_table." WHERE ".$row->notes_id_field." = ".$row->ix_id;
$result_key = mysqli_query($GLOBALS['con'], $sql) or die('Database error!');
if (mysqli_num_rows($result_key) > 0) :
$row_key = mysqli_fetch_object($result_key);
echo '<a href="index.php?IX='.$row->PageIndex.'&id='.$row->ix_id.'">';
foreach ($row_key as $key_value) :
$identifier = $identifier.$key_value." ";
endforeach;
$identifier = trim($identifier);
echo $identifier;
echo '</a>';
endif;
endif;
$sql_temp = "INSERT INTO notes_temp SET ".
"user_id = ".$_SESSION['user_id'].", ".
"event_id = ".$_SESSION['active_event'].", ".
"note_type = '".mysqli_real_escape_string($GLOBALS['con'], trim($row->notes_title))."', ".
"identifier = '".mysqli_real_escape_string($GLOBALS['con'], trim($identifier))."', ".
"followup_date = ".nzdate(mysqli_real_escape_string($GLOBALS['con'], trim($row->followup_date))).", ".
"followup_complete = ".mysqli_real_escape_string($GLOBALS['con'], trim($row->followup_complete)).", ".
"note = '".mysqli_real_escape_string($GLOBALS['con'], trim($row->comment))."' ";
//$result_temp = mysqli_query($GLOBALS['con'], $sql_temp) or die(mysqli_error($GLOBALS['con'])." ===".$sql_temp."===");
$result_temp = mysqli_query($GLOBALS['con'], $sql_temp) or die('Database error!');
?>
</td>
<td class="data-grid-var" <?php if ($row->past_due == 1) : echo ' style="background-color:red; color:white; font-weight:bold;" '; endif; ?>>
<?php echo nzdate_display($row->followup_date); ?>
</td>
<td class="data-grid-var" align="center">
<?php
if ($row->followup_complete == 1) :
echo '<img src="img/check_mark.png" />';
endif;
?>
</td>
<td class="data-grid-var">
<?php echo $row->comment; ?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<div class="form_strip" style="border:none;">
<input type="button" value="Excel ®" onclick="exportExcel('<?php echo urlencode(sys_encrypt(gzcompress($xls_sql,6), $_SESSION['rand_key'])); ?>');" />
<input type="button" value="Print" onclick="printSection(print_section);" />
<input type="button" value="PDF" onclick="pdfSection(print_section);" />
</div>