-
Notifications
You must be signed in to change notification settings - Fork 0
/
step04.php
61 lines (58 loc) · 2.21 KB
/
step04.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
$proteinas = $_POST['proteinas']; // Proteínas
$rel = '<b>Proteins studied</b><br />' . $proteinas;
$listaProteinas = split(' ', $proteinas);
?>
<html>
<head>
<title>.:: BioNet ::.</title>
</head>
<body>
<font face="verdana">
<center>
<img src="imgs/BioNet.png" width="262" height="66" onLoad="window.parent.frames[1].location='flow.php?textoSoft=<?=$rel?>'" /><br />
<img src="imgs/FluxoSoftware04.png" width="500" height="220" /><br /><br />
</center>
<table bgcolor="#FFD42A" width="100%">
<tr><td>
<table bgcolor="#FFFFAA" width="100%">
<tr><td>
Select the occurrences of proteins that you want to use.
</td></tr>
</table>
</td></tr>
</table><br />
<form name="mostraRede" action="step05.php" method="post" enctype="multipart/form-data">
<input type="submit" name="next" value="Next" />
<input type="button" name="back" value="Back" onClick="history.go(-2)" /><br /><br />
<font size="2">
<?php
// Mostra lista de proteínas
foreach($listaProteinas as $proteina){
$proteina = trim($proteina);
if($proteina){
echo '<b>' . $proteina . '</b><br /><br />';
$proteinaFile = file('http://string-db.org/api/tsv-no-header/resolve?identifier=' . $proteina . '&species=9606');
if(is_array($proteinaFile)){
// Mostra lista de ocorrências da proteína
foreach($proteinaFile as $vals){
// Separa id e texto
$er = '(([A-Z0-9.]+)\s(.*?ens)\s(.*))'; // Expressão regular
preg_match_all($er, $vals, $matches, PREG_SET_ORDER);
foreach($matches as $match){
echo '<input name="proteinasSelecionadas[]" title="' . $match[1] . '" type="checkbox" value="' . $match[1] . '" /> ';
echo $match[3] . '<br />';
}
echo '<br />';
}
}
}
}
?>
</font>
<input type="submit" name="next" value="Next" />
<input type="button" name="back" value="Back" onClick="history.go(-2)" />
</form>
</font>
</body>
</html>