[Openfirst-cvscommit] projects notes.php,1.10,1.11
Brought to you by:
xtimg
From: <i-...@us...> - 2003-10-13 23:04:05
|
Update of /cvsroot/openfirst/projects In directory sc8-pr-cvs1:/tmp/cvs-serv550/projects Modified Files: notes.php Log Message: Bug fixes, download support. Index: notes.php =================================================================== RCS file: /cvsroot/openfirst/projects/notes.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** notes.php 13 Oct 2003 03:32:33 -0000 1.10 --- notes.php 13 Oct 2003 23:04:02 -0000 1.11 *************** *** 37,42 **** // Create button process if(isset($_POST['create'])){ ! ! $bindata = file_get_contents($_FILES['notefile']['tmp_name'])){ $bindata = base64_encode($bindata); --- 37,42 ---- // Create button process if(isset($_POST['create'])){ ! ! if($bindata = file_get_contents($_FILES['notefile']['tmp_name'])){ $bindata = base64_encode($bindata); *************** *** 47,51 **** Description = '".$_POST['description']."', Commiter = '".$user->user."', ! AttachedFile = '".$bindata."', Dates = '".time()."'") or die(ofirst_dberror()); --- 47,52 ---- Description = '".$_POST['description']."', Commiter = '".$user->user."', ! AttachedFile = '".$bindata."', ! mime = '".$_FILES['notefile']['type']."', Dates = '".time()."'") or die(ofirst_dberror()); *************** *** 53,56 **** --- 54,58 ---- die(include($footer)); } + } // Addcompletion button process *************** *** 101,105 **** <td class="sub" width="17%">Date</td> <td class="sub" width="63%">Note Write Up</td> ! <td class="sub" width="15%">Commiter</td> </tr> <?php --- 103,108 ---- <td class="sub" width="17%">Date</td> <td class="sub" width="63%">Note Write Up</td> ! <td class="sub" width="10%">Commiter</td> ! <td class="sub" width="5%">Attachment</td> </tr> <?php *************** *** 115,118 **** --- 118,124 ---- <td><?php echo $notes->Description; ?></td> <td><?php echo $notes->Commiter; ?></td> + <?php if($notes->mime!=""){ ?> + <td><a href="getfile.php?id=<?php echo $notes->ID; ?>">Download</a></td> + <?php } else { echo("<td> </td>"); } ?> </tr> <?php *************** *** 122,126 **** if(ofirst_dbnum_rows($query) == 0){ echo "\n <tr>\n <td> </td>\n <td> </td>\n <td>There are no notes for this task!</td>\n <td> </td>\n </tr>\n"; ! } ?> </table></td> --- 128,132 ---- if(ofirst_dbnum_rows($query) == 0){ echo "\n <tr>\n <td> </td>\n <td> </td>\n <td>There are no notes for this task!</td>\n <td> </td>\n </tr>\n"; ! } ?> </table></td> *************** *** 138,144 **** } } ! ! // Show administrator the add option no matter what ! if($user->membertype == "administrator"){ $show = true; } if($show){ --- 144,150 ---- } } ! ! // Show administrator the add option no matter what ! if($user->membertype == "administrator"){ $show = true; } if($show){ *************** *** 183,186 **** --- 189,193 ---- } } + include($footer); ?> |