"Fossies" - the Fresh Open Source Software Archive

Member "eventh/modfile.php" (12 Jul 2010, 4684 Bytes) of package /linux/privat/old/eventh-1.1.11.tar.gz:


The requested HTML page contains a <FORM> tag that is unusable on "Fossies" in "automatic" (rendered) mode so that page is shown as HTML source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "modfile.php" see the Fossies "Dox" file reference documentation.

    1 <?
    2 /*
    3     This file is part of Event Horizon (EVH).
    4 
    5     EVH is free software; you can redistribute it and/or modify
    6     it under the terms of the GNU General Public License as published by
    7     the Free Software Foundation; either version 3 of the License, or
    8     (at your option) any later version.
    9 
   10     EVH is distributed in the hope that it will be useful,
   11     but WITHOUT ANY WARRANTY; without even the implied warranty of
   12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   13     GNU General Public License for more details.
   14 
   15     You should have received a copy of the GNU General Public License
   16     along with this program.  If not, see <http://www.gnu.org/licenses/>.
   17 */
   18 
   19 include "inc.php";
   20 
   21 if (isset($vercode) and $vercode != '') $VerificationNumber = $vercode;
   22 if (isset($modemail) and $modemail != '') $YourEmail = $modemail;
   23 
   24 // Protect against XSS vulnerabilities;
   25 $YourEmail = htmlspecialchars($YourEmail);
   26 $VerificationNumber = htmlspecialchars($VerificationNumber);
   27 
   28 $query='select Sessions.id, Sessions.dnldcode, Sessions.modcode, Sessions.avail, Sessions.srcemail, Sessions.destemail, Files.id, Files.description, Files.name from Sessions,Files where Sessions.srcemail="' . $YourEmail . '" and Sessions.modcode="' . $VerificationNumber . '" and Files.sessionid=Sessions.id';
   29 $res = mysql_query($query,$dbh) or die("<p><b>A fatal database error occured</b>.\n<br />Query: " . $query . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());
   30 ?>
   31 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
   32 <html>
   33 <head>
   34 <title><?=$appname; ?> - Edit File Information</title>
   35 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   36 <link href="default.css" rel="stylesheet" type="text/css">
   37 </head>
   38 <body>
   39 <?=$titleandmenu; ?>
   40 <form action="modapply.php" method="post" enctype="multipart/form-data" name="form1">
   41 <div align="center" class="content-text">  </div>
   42 <?
   43 if (mysql_num_rows($res) == 0) die('<p align="center" class="content-text">No matching file found.</p>');
   44 
   45 while($row = mysql_fetch_row($res)){ ?>
   46     <input name="fileid" type="hidden" value="<?=$row[6]; ?>">
   47     <input name="sessid" type="hidden" value="<?=$row[0]; ?>">
   48     <input name="dnldpass" type="hidden" value="<?=$row[1]; ?>">
   49     <input name="fname" type="hidden" value="<?=$row[8]; ?>">
   50     <input name="srcemail" type="hidden" value="<?=$row[4]; ?>">
   51     <input name="ba" type="hidden" value="<?=$ba; ?>">
   52     <input name="browser" type="hidden" id="browser" value="">
   53     <table width="500"  border="0" align="center" cellpadding="3" cellspacing="1" class="border">
   54     <tr>
   55     <th width="150" align="left" valign="top" nowrap class="header" scope="row">Source Email </th>
   56     <td align="left" valign="middle" nowrap class="content" scope="row"><?=stripslashes($row[4]); ?></td>
   57     </tr>   
   58     <tr>
   59     <th width="150" align="left" valign="top" nowrap class="header" scope="row">Destination Email(s) </th>
   60     <td align="left" valign="middle" nowrap class="content" scope="row"><input name="DestinationEmail" type="text" id="DestinationEmail" size="30" value="<?=stripslashes($row[5]); ?>"></td>
   61     </tr>
   62     <tr>
   63     <th width="150" align="left" valign="top" nowrap class="header" scope="row">Availability Period</th>
   64     <td align="left" valign="middle" nowrap class="content" scope="row"><select name="AvailabilityPeriod" id="AvailabilityPeriod">
   65     <?
   66     $queryavail = 'select * from Availability where 1';
   67     $resavail = mysql_query($queryavail,$dbh) or die('<p><b>A fatal database error occured</b>.\n<br />Query: ' . $queryavail . '<br />\nError: (' . mysql_errno() . ') ' . mysql_error());
   68     while ($rowavail = mysql_fetch_row($resavail)) {
   69     if ($rowavail[1] == $row[3]) $selectedavail = ' selected';
   70         else $selectedavail = '';
   71         echo '<option value="' . $rowavail[1] . '"' . $selectedavail . '>' . $rowavail[2] . '</option>';
   72         }
   73     ?>
   74     </select></td>
   75     </tr>
   76     <tr>
   77     <th align="left" valign="top" nowrap class="header" scope="row">Description</th>
   78     <td align="left" valign="middle" nowrap class="content" scope="row"><input name="File1Description" type="text" id="File1Description" size="50" value="<?=stripslashes($row[7]); ?>"></td>
   79     </tr>
   80     </table>
   81     <center><a href="modapply.php?del=1&sessid=<?=$row[0]; ?>&vercode=<?=$row[1]; ?>">delete</a></center>
   82     <p>
   83     <?
   84 }   
   85 ?>
   86 <p align="center"><br>
   87   <input name="Submit" type="submit" id="Submit" onClick="MM_validateForm('YourEmail','','RisEmail','DestinationEmaill','','RisEmail','File1','','R');return document.MM_returnValue" value="Save">
   88 </p>
   89 </form>
   90 <?
   91 print $footer;
   92 ?>
   93 </body>
   94 </html>