ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/shardiwal/target.php
Revision: 13
Committed: Wed Feb 2 04:17:00 2011 UTC (5 years, 10 months ago) by rakeshshardiwal
File size: 5036 byte(s)
Log Message:
project almost done
Line File contents
1 <?php
2 $id = $_GET['id'];
3 include "site_header.php";
4 include "config.php";
5 /*
6 * MySQL connection
7 */
8 $gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) or
9 die( 'Could not open connection to server' );
10
11 mysql_select_db( $gaSql['db'], $gaSql['link'] ) or
12 die( 'Could not select database '. $gaSql['db'] );
13
14 /*
15 * SQL queries
16 * Get data to display
17 */
18 $sQuery = "
19 SELECT * FROM drug_targets where drug_target_id = '$id'
20 ";
21 $rResult = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
22 while($row = mysql_fetch_array($rResult))
23 {
24 $target_name = $row['target_name'];
25 $gene_name = $row['gene_name'];
26 $genBank_id = $row['genBank_id'];
27 $protein_id = $row['protein_id'];
28 $pdb_id = $row['pdb_id'];
29 $swissprot_id = $row['swissprot_id'];
30 $synonyms = $row['synonyms'];
31 $sequence = $row['sequence'];
32 $mol_weight = $row['mol_weight'];
33
34 $theoretical_pi = $row['theoretical_pi'];
35 $function = $row['function'];
36 $process = $row['process'];
37 $component = $row['component'];
38 $specific_function = $row['specific_function'];
39 $pathway = $row['pathway'];
40
41 $reaction = $row['reaction'];
42 $Pfam_domain_function = $row['Pfam_domain_function'];
43 $transmembrane_regions = $row['transmembrane_regions'];
44 $type = $row['type'];
45 $references = $row['references'];
46 $SPN = $row['SPN'];
47
48 }
49 $typeclass = "nonstructured";
50 if($type == 'Structural Protein'){
51 $typeclass="structured";
52 }
53
54 ?>
55 <div id="site_body">
56 <div class="title">Biological Targets</div>
57 <div>
58 <table id="protein_information" cellpadding="0" cellspacing="10" border="0" class="highlight_links" >
59 <tr>
60 <td colspan="2" class="center "><?php echo $target_name ?></td>
61 </tr>
62 <tr>
63 <td colspan="2" class="center "><?php echo "$gene_name" ?></td>
64 </tr>
65 <tr>
66 <td colspan="2" class="center ">
67 <table>
68 <tr>
69 <td width="40%;" style="text-align:left;">Theoretical PI: <?php echo "$theoretical_pi" ?></td>
70 <td width="60%;" style="text-align:left;">Mol weight: <?php echo "$mol_weight" ?></td>
71 </tr>
72 <tr>
73 <td width="40%;" style="text-align:left;">GenBank id: <a target=\"_blank\" href=\"http://www.ncbi.nlm.nih.gov/nuccore/<?php echo "$genBank_id" ?>\"><?php echo "$genBank_id" ?></a></td>
74 <td width="60%;" style="text-align:left;">Protein id: <a target=\"_blank\" href=\"http://www.ncbi.nlm.nih.gov/protein/<?php echo "$protein_id" ?>\"><?php echo "$protein_id" ?></a></td>
75 </tr>
76 <tr>
77 <td width="40%;" style="text-align:left;">PDB id: <a target="_blank" href="http://www.rcsb.org/pdb/explore/explore.do?pdbId=<?php echo "$pdb_id" ?>"><?php echo "$pdb_id" ?></a></td>
78 <td width="60%;" style="text-align:left;">Swissprot id: <a target="_blank" href="http://pir.uniprot.org/uniprot/?query=<?php echo "$swissprot_id" ?>&sort=score"><?php echo "$swissprot_id" ?></a></td>
79 </tr>
80 </table>
81
82 </td>
83 </tr>
84 <tr>
85 <td width="125px;">Structure:</td>
86 <td><img src="http://www.rcsb.org/pdb/images/<?php echo $pdb_id ?>_bio_r_250.jpg"/></td>
87 </tr>
88 <tr>
89 <td width="125px;">Function:</td>
90 <td><?php echo $function ?></td>
91 </tr>
92 <tr>
93 <td width="125px;">Specific Function:</td>
94 <td><?php echo $specific_function ?></td>
95 </tr>
96 <tr>
97 <td width="125px;">Synonyms:</td>
98 <td><?php echo $synonyms ?></td>
99 </tr>
100 <tr>
101 <td width="125px;">Component:</td>
102 <td><?php echo $component ?></td>
103 </tr>
104 <tr>
105 <td width="125px;">Process:</td>
106 <td><?php echo $process ?></td>
107 </tr>
108 <tr>
109 <td width="125px;">Pathway:</td>
110 <td><?php echo $pathway ?></td>
111 </tr>
112 <tr>
113 <td width="125px;">Reaction:</td>
114 <td><?php echo $reaction ?></td>
115 </tr>
116 <tr>
117 <td width="125px;">Pfam domain function:</td>
118 <td><?php echo $Pfam_domain_function ?></td>
119 </tr>
120 <tr>
121 <td width="125px;">Transmembrane Regions:</td>
122 <td><?php echo $transmembrane_regions ?></td>
123 </tr>
124 <tr>
125 <td width="125px;">Type:</td>
126 <td><?php echo $type ?></td>
127 </tr>
128 <tr>
129 <td width="125px;">Sequence:</td>
130 <td><?php echo $sequence ?></td>
131 </tr>
132 <tr>
133 <td width="125px;">SPN's:</td>
134 <td><?php
135 $reference = split(',', $SPN);
136 foreach ($reference as &$value) {
137 $value = trim($value);
138 echo "<a target=\"_blank\" href=\"http://www.snpedia.com/index.php/$value\">$value</a><br>";
139 }
140 ?></td>
141 </tr>
142 <tr>
143 <td width="125px;">References:</td>
144 <td><?php
145 $reference = split(',', $references);
146 foreach ($reference as &$value) {
147 $value = trim($value);
148 echo "<a target=\"_blank\" href=\"http://www.ncbi.nlm.nih.gov/pubmed?term=$value\">$value</a><br>";
149 }
150 ?></td>
151 </tr>
152 </table>
153 </div>
154 </div>
155 <?php include "site_footer.php" ?>
156 <script>
157 $(".each_protein").tooltip();
158 </script>

Properties

Name Value
svn:eol-style native