hits; $ip=$_SERVER['REMOTE_ADDR']; if(mysql_num_rows(mysql_query("select * from okips where addr='$ip'"))==0) { // if it is not one of Laura's recognized IP addresses $hits=$hits+1; mysql_query("update hits set hits=$hits"); } function listviruses($liszt) { if($liszt!=""){ $virusids=explode("/","$liszt"); print "";} else {print "(none)";} } print "

Virus/Virus Interactions

"; $action=$_POST['action']; $limlist=$_POST['limlist']; $limlistdesc=$_POST['limlistdesc']; if($limlist==""){ $vvis=mysql_query("select * from vvis order by vvitype, vvisubtype"); while($row=mysql_fetch_object($vvis)) { $idno=$row->idno; if($limlist<>""){$limlist.="/";} $limlist.="$idno"; } } $limlistarray=explode("/",$limlist); $ct=count($limlistarray); if($action==""){print "

Welcome to the Virus-virus interactions Database

A virus-virus interaction (VVI) a measurable difference in the course of infection of one virus as a result of a concurrent or prior infection by a different species or strain of virus. (Click here for more information about VVIs and this website.)

This database organizes VVI into three main types: (1) Direct Interactions, (2) Indirect Interactions, and (3) Immunlogical Interactions (a subset of indirect interactions limited to organisms equipped with an adaptive immune system).

Each of these categories is further subdivided in to 4 to 6 subtypes (click here to view the subtypes.)

We welcome comments and contributions of VVI we have missed. (Send e-mail to KasmanL@musc.edu.)

Search the database or click \"view\" below to see a list all currently indexed VVIs.

";} if($action=="keywordlimit2") { $kwd=$_POST["kwd"]; $limlistdesc.="(Keyword=$kwd)"; foreach($limlistarray as $limlistidno){ if(mysql_num_rows(mysql_query("select * from vvis where idno='$limlistidno' and summary regexp '$kwd'"))>0){ if($newlimlist<>""){$newlimlist.="/";} $newlimlist.="$limlistidno"; }} $action="makenewlimlist"; } if($action=="vvilimit3") { $vvitype=$_POST["vvitype"]; $vvisubtype=$_POST["vvisubtype"]; $inttyperow=mysql_fetch_object(mysql_query("select * from vvitypes where idno=$vvitype")); $inttype=$inttyperow->name; if($vvisubtype>-1){ $intsubtyperow=mysql_fetch_object(mysql_query("select * from vvisubtypes where idno=$vvisubtype")); $intsubtype=$intsubtyperow->name; $limlistdesc.="(Interaction Type=$inttype/$intsubtype)"; foreach($limlistarray as $limlistidno){ if(mysql_num_rows(mysql_query("select * from vvis where idno='$limlistidno' and vvitype='$vvitype' and vvisubtype='$vvisubtype'"))>0){ if($newlimlist<>""){$newlimlist.="/";} $newlimlist.="$limlistidno"; }}} else { $limlistdesc.="(Interaction Type=$inttype)"; foreach($limlistarray as $limlistidno){ if(mysql_num_rows(mysql_query("select * from vvis where idno='$limlistidno' and vvitype='$vvitype'"))>0){ if($newlimlist<>""){$newlimlist.="/";} $newlimlist.="$limlistidno"; }}} $action="makenewlimlist"; } if($action=="viruslimit3") { $vfamily=$_POST["vfamily"]; $virusid=$_POST["virusid"]; $vvirusidv="v".$virusid."v"; $famnamerow=mysql_fetch_object(mysql_query("select * from vfamilies where idno=$vfamily")); $famname=$famnamerow->name; if($virusid>-1){ $vnamerow=mysql_fetch_object(mysql_query("select * from viruses where idno=$virusid")); $vname=$vnamerow->name; $limlistdesc.="(Virus=$famname/$vname)"; foreach($limlistarray as $limlistidno){ if(mysql_num_rows(mysql_query("select * from vvis where idno='$limlistidno' and viruses regexp '$vvirusidv'"))>0){ if($newlimlist<>""){$newlimlist.="/";} $newlimlist.="$limlistidno"; }}} else { $limlistdesc.="(Virus Family=$famname)"; $query="select * from vvis where idno='REPLACEME' and ("; $viruses=mysql_query("select * from viruses where vfamily=$vfamily"); while($row=mysql_fetch_object($viruses)){ $vnum=$row->idno; $query.="or viruses regexp 'v".$vnum."v' "; } $query=str_replace("(or","(",$query).")"; foreach($limlistarray as $limlistidno){ $testquery=str_replace("REPLACEME","$limlistidno",$query); if(mysql_num_rows(mysql_query($testquery))>0){ if($newlimlist<>""){$newlimlist.="/";} $newlimlist.="$limlistidno"; }} } $action="makenewlimlist"; } if($action=="makenewlimlist") { $limlist=$newlimlist; $limlistarray=explode("/",$limlist); $ct=count($limlistarray); if($newlimlist==""){$limlist="EMPTY";$ct=0;} $action=""; } if($action=="") { print ""; if($limlistdesc==""){ $bigtext="View all $ct VVIs currently in the database."; } else { $bigtext="View Search Results (view a list of the $ct VVIs you selected)"; } print ""; print ""; print ""; print ""; if($limlistdesc<>""){ print ""; } print "
"; if($limlistdesc==""){print "There are currently $ct VVI in this database. To view them all now, click on the \"View VVIs\" button below. Or, select one of the three other buttons to place some limits on those to be viewed.";} elseif($limlist=="EMPTY"){print "Sorry! There are no entries in the database matching your criteria \"$limlistdesc\". Please try another search or notify us if you are aware of a VVI that meets these conditions and should be listed here.";} else {print "There are currently $ct VVIs in this database that meet your specified criteria (\"$limlistdesc\"). To view them all now, click on the \"View VVIs\" button below. Or, select one of the three other buttons to place additional limits on those to be viewed.";} print "
$bigtext
Limit by VVI Type (add limitations based on the type of interaction)
Limit by Virus (add limitations based on the viruses involved)
Limit by Keyword (add limitations based on a keyword in the description)
New Search (click here to clear the list of restrictions entered so far)
"; } if($action=="Limit by VVI Type"){ print "

Adding new limitation based on VVI Type (Step 1 of 2)

"; print "Select VVI Type: "; $vvitypes=mysql_query("select * from vvitypes"); print "



"; } if($action=="vvilimit2"){ print "

Adding new limitation based on VVI Type (Step 2 of 2)

"; print "Select VVI Sub-Type: "; $vvitype=$_POST["vvitype"]; $row=mysql_fetch_object(mysql_query("select * from vvitypes where idno=$vvitype")); $name=$row->name; print "Interaction Type Selected: $name"; $vvisubtypes=mysql_query("select * from vvisubtypes where vvitype=$vvitype"); print "



"; } if($action=="Limit by Virus"){ print "

Adding new limitation based on Virus (Step 1 of 2)

"; print "Select Virus Family: "; $vfamilies=mysql_query("select * from vfamilies order by name"); print "



"; } if($action=="viruslimit2"){ print "

Adding new limitation based on Virus (Step 2 of 2)

"; print "Select Viruses: "; $vfamily=$_POST["vfamily"]; $row=mysql_fetch_object(mysql_query("select * from vfamilies where idno=$vfamily")); $name=$row->name; print "Virus Family Selected: $name"; $viruses=mysql_query("select * from viruses where vfamily=$vfamily order by name"); print "



"; } if($action=="Limit by Keyword"){ print "

Adding new limitation based on Keyword (Step 1 of 1)

"; print "Enter Keyword: "; print "



"; } if($action=="viewvvi") { $idno=$_POST['idno']; $row=mysql_fetch_object(mysql_query("select * from vvis where idno='$idno'")); $viruses=$row->viruses; $vvitype=$row->vvitype; $vvisubtype=$row->vvisubtype; $summary=stripslashes($row->summary); $refs=stripslashes($row->refs); $contributors=stripslashes($row->contributors); if($contributors==''){ $contributors='Laura Kasman (MUSC)'; } $contributorliszt=explode("//",$contributors); $inttyperow=mysql_fetch_object(mysql_query("select * from vvitypes where idno=$vvitype")); $inttype=$inttyperow->name; $intcolor=$inttyperow->color; $intsubtyperow=mysql_fetch_object(mysql_query("select * from vvisubtypes where idno=$vvisubtype")); $intsubtype=$intsubtyperow->name; print ""; print ""; print ""; print ""; print ""; $exploderefs=explode("\n",$refs); print ""; $len=count($contributorliszt); if($len>1){ $plural='s'; } else { $plural=''; } print ""; print "
VVI Type$inttype
VVI Subtype$intsubtype
Viruses"; listviruses($viruses); print "
Summary$summary
References"; foreach($exploderefs as $ref) { if(ereg("[hH][tT][tT][pP]://",$ref)) { print "$ref
"; } else { print "$ref
"; } } print "
ContributorsPrimary Contributor$plural to this Summary:
    "; foreach($contributorliszt as $contributor){ print "
  • $contributor
  • "; } print "


"; } if($action=="View VVIs") { $vvis=mysql_query("select * from vvis order by vvitype, vvisubtype"); print ""; print ""; while($row=mysql_fetch_object($vvis)) { $idno=$row->idno; if(in_array($idno,$limlistarray)){ $viruses=$row->viruses; $vvitype=$row->vvitype; $vvisubtype=$row->vvisubtype; $summary=substr(stripslashes($row->summary),0,80)."..."; $inttyperow=mysql_fetch_object(mysql_query("select * from vvitypes where idno=$vvitype")); $inttype=$inttyperow->name; $intcolor=$inttyperow->color; $intsubtyperow=mysql_fetch_object(mysql_query("select * from vvisubtypes where idno=$vvisubtype")); $intsubtype=$intsubtyperow->name; print ""; print ""; print ""; print ""; print ""; } } print "
ViewInteraction TypeVirusesSummary
$inttype ($intsubtype)"; listviruses($viruses); print "$summary
"; } ?>


Virus/Virus Interaction Homepage / Laura Kasman / Medical University of South Carolina

Website: Alex Kasman, College of Charleston