Location: PHPKode > projects > Opensheet > opensheet/include/notes.inc.php
<?php 
# Работа с комментариями


$note =new Timesheet;
$notes = $note->get_notes($user_index,$year,$month);

echo ' <div class="comment">';
echo "<div class='close'><a href='#' id='close'><img src='images/button_cancel.png'></a></div>";

echo "<table  style='margin:5%;background:#FFC266;border-collapse:separate;border: 1px black solid;width: 90%; '>";
echo "<form  name='add_notes' action='' method='POST' >";
echo "<tr class='note'><td style='background:#FFA466;width: 5%;'>".gettext("date")."</td><td style='background:#FF9900;width: 10%;'>".gettext("project")."</td><td style='background:#FF9900;width: 5%;'>".gettext("hours")."</td><td style='background:#FF9900;width: 80%;'>".gettext("notes")."</td></tr>";
foreach ($notes as $day=>$project_array){
	foreach ($project_array as $project_id=>$value){
		if (isset($notes[$day][$project_id]['task'])){
			foreach ($value['task'] as $task_index=>$task_data){
				echo "<tr class='note'><td>$day</td><td>".$task_data['task_name']."</td><td>".$task_data['hours']."</td><td><textarea style='border: 0px;height: 32px;width: 100%;' rows='1' cols='70' name='notes[task_notes][".$task_index."][".$day."]'>".$task_data['note']."</textarea></td></tr>";	
			}
			
		}else{
			foreach ($value as $project_datas){
					echo "<tr class='note'><td>$day</td><td>".$project_datas['proj_name']."</td><td>".$project_datas['hours']."</td><td><textarea style='border: 0px;height: 32px;width: 100%;' rows='1' cols='70' name='notes[project_notes][".$project_id."][".$day."]'>".$project_datas['note']."</textarea></td></tr>";	
			}	
	 	}
	}	
}


echo "</table>";



echo '<center><input type="image" src="images/go.png" value="Click here"  style="width: 60px; height: 50px; background: #2ED633;"></center>';
echo '<input type="hidden" name="user_id" value="'.$user_index.'">';
echo '<input type="hidden" name="year" value="'.$year.'">';
echo '<input type="hidden" name="month" value="'.$month.'">';
echo '<input type="hidden" name="add_notes" value="add_notes">';
echo '</form></div>';
echo '</div>';
echo '<div class="in_end" style="padding: 1px; background:#fc0; height:1000px;">';
include ('end.php');




?>
Return current item: Opensheet