include "particle_html.php"; include_once "general_access.php"; function charge_conj($userid,$password,$id) { # delete the modes for the particle $result=mysql_query("delete from decay_modes where incomingid=".$id); # copy the modes for the conjugate particle $result=mysql_query("select BR,decayon,star,description,decayer,outgoingID1,". "outgoingID2,outgoingID3,". "outgoingID4,outgoingID5,outgoingID6,outgoingID7 ". "from decay_modes where incomingid=-".$id); while($mode=mysql_fetch_array($result)) { # get the id code for the outgoing particles for($i=0;$i<7;++$i) { $out[$i]=$mode[5+$i]; if($out[$i]!=0) { $part=mysql_query("select ID from particles where ID=-".$out[$i]); while($test=mysql_fetch_array($part)){$out[$i]=-$out[$i];} } } # add the conjugate mode $add = mysql_query("insert into decay_modes (incomingID,BR,decayon,star,". "outgoingID1,outgoingID2,outgoingID3,outgoingID4,outgoingID5,". "outgoingID6,outgoingID7,description,decayer) values(". " \"" . add_slash($id) . "\", " . " \"" . add_slash($mode[0]) . "\", " . " \"" . add_slash($mode[1]) . "\", " . " \"" . add_slash($mode[2]) . "\", " . " \"" . add_slash($out[0]) . "\", " . " \"" . add_slash($out[1]) . "\", " . " \"" . add_slash($out[2]) . "\", " . " \"" . add_slash($out[3]) . "\", " . " \"" . add_slash($out[4]) . "\", " . " \"" . add_slash($out[5]) . "\", " . " \"" . add_slash($out[6]) . "\", " . " \"" . add_slash($mode[3]) . "\", " . " \"" . add_slash($mode[4]) . "\")"); if(!$add){print("Failed to add a mode
");} } $particle = particle_html($id); print($particle); } # ?>