Location: PHPKode > projects > MeBiblio > meBiblio-0.4.8/record_change_mask.inc.php
     
<?	 

     include "dblink.php";
     
     $Indice = $_GET['Indice'];
     
     #$sql = "SELECT Author , Other, Title, Journal, Volume , Page , File , Year  , Indice FROM Citazioni WHERE Indice = ".$Indice;
     #print "Indice =".$_GET['Indice'];
      $sql = "SELECT Author , Other , Title , Journal_ID.Jshort as Journal , Volume , Page , File , Year , Indice , Journal_ID.JID , Class.Classname as Topic , Class.CID , DOI, PACS , arXiv , ISBN , URL , Abstract FROM Citazioni LEFT JOIN Journal_ID on Citazioni.Journal=Journal_ID.JID LEFT JOIN Class on Citazioni.Class_ID=Class.CID  WHERE Indice = ".$_GET['Indice']; 
      $result = mysql_query($sql) or die("Invalid query: " . mysql_error());
        $field = mysql_fetch_row($result);
     
      print "<p>$ChangeBibliography<br>";
      print "<form action=\"index.php?action=dbreplace&Indice=$Indice\" method=\"POST\">";
?>
		<table>
		<tr>
		    <td><? print $LabelAuthor;?>:</td>
		    <td><input class="text" type="text" name="Author" size="40"
		    value="<?print "$field[0]" ?>"></td>
		    <? /**************************************
		    Abstract might be changed from input to textarea
		    ******************************************/?>
		    <td><? print $LabelAbstract;?>:</td>
		    <td><input class="text" type="text" name="Abstract" size="50" value="<?print "$field[16]" ?>"></td>
		<tr>
		    <td><? print $LabelOthers;?>:</td>
		    <td><input class="text" type="text" name="Other" size="60"
		    value="<?print "$field[1]" ?>"></td>
		<tr>
		    <td><?print $LabelTitle;?>:</td>
		    <td><input class="text" type="text" name="Title" size="70"
		    value="<?print "$field[2]" ?>"></td>
		<tr>
		    <td><?print $LabelJournal;?>:</td>
		    <? 
		      $sql = "SELECT JShort , JID , JLong FROM Journal_ID ORDER BY JShort";
		      $result = mysql_query($sql);
		      
		    ?>
		    <td><select class="text" name="Journal">
		    	<option value="NULL"></option>
			<? while ($Journal = mysql_fetch_array($result) ){
				echo "<option value=\"".$Journal[1]."\"";
				if ($Journal[1]==$field[9])
					echo " selected" ;
				echo ">".$Journal[2]."</option>\n";
			}
			?>
			</select></td>
		   <!-- <td><input class="text" type="text" name="Journal" size="30"
		    value="<?print "$field[3]" ?>"></td>-->
		    <td><? print $LabelArXiv;?>:</td>
		    <td><input class="text" type="text" name="arXiv" size="25"
		    value="<?print "$field[14]" ?>"></td>
		<tr>
		    <td><? print $LabelVolume ?>:</td>
		    <td><input class="text" type="text" name="Volume" size="5"
		    value="<?print "$field[4]" ?>"></td>

		    <td><? print $LabelURL;?>:</td>
		    <td><input class="text" type="text" name="URL" size="50" value="<? print "$field[15]"?>"></td>
		<tr>
		    <td><? print $LabelPage?>:</td>
		    <td><input class="text" type="text" name="Page" size="5" 
		    value="<?print "$field[5]" ?>"></td>
		<tr>
		    <td><? print $LabelYear ?>:</td>
		    <td><input class="text" type="text" name="Year" size="4" 
		    value="<?print "$field[7]" ?>"></td>
		<tr>
		    <td><? print $LabelDOI ?>:</td>
		    <td><input class="text" type="text" name="DOI" size="45" 
		    value="<?print "$field[12]" ?>"></td>
		<tr>
		    <td><? print $LabelPACS ?>:</td>
		    <td><input class="text" type="text" name="PACS" size="40" 
		    value="<?print "$field[13]" ?>"></td>
		<tr>
		    <td><? print $LabelISBN; ?>:</td>
		    <td><input class="text" type="text" name="ISBN" size="25" value="<? print "$field[14]" ?>"></td>
		<tr>
		    <td><? print $LabelFilename?>:</td>
		    <td><input class="text" type="text" name="File" size="16" 
		    value="<?print "$field[6]" ?>"></td>
		<tr>
		    <td><? print $LabelTopic ?>:</td>
		    <? 
		      $sql = "SELECT Classname , CID FROM Class ORDER BY Classname";
		      $result = mysql_query($sql);
		      
		      mysql_close($link);
		    ?>
		    <td><select class="text" name="Topic">
		    	<option value="NULL"></option>
			<? while ($Topic = mysql_fetch_array($result) ){
				echo "<option value=\"".$Topic[1]."\"";
				if ($Topic[1]==$field[11])
					echo " selected" ;
				echo ">".$Topic[0]."</option>\n";
			}
			?>
			</select></td>
		<tr>
		    <td>Indice:</td>
		    <td><? print "$Indice"; ?><!--<input class="text" type="text" name="Indice" size="16" 
		    value="<?print "$field[8]" ?>">--></td>
	</table>
<input class="button" type="submit" value="Invia">

<br>
<br>
<br>
<br>
<? 

print "<a href=\"index.php?action=delete_record&Indice=".$Indice."\">Delete this item from the bibliography</a>";

?>
Return current item: MeBiblio