Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(361)

Side by Side Diff: DB/API_REST/show_graph.php

Issue 335100043: DB with histogram
Patch Set: Fixing last bug Created 6 years, 3 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « DB/API_REST/request.php ('k') | DB/API_REST/thread_database.php » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <?php
2 ini_set('display_errors', 1);
3
4 include_once('config.php');
5 $link_capacity = 300; //Mb/s
6 $output = shell_exec('rm -rf log_graph/*.log ');
7
8 if($_SERVER['REQUEST_METHOD'] == "GET"){
9 $get_request = $_GET;
10
11 if(strcmp($get_request['x'], '1') == 0 ){
12
13 $all_link = $bdd->query("SELECT src_switch, dst_switch FROM topo logy WHERE event = 'link_up' AND src_switch < dst_switch ORDER BY src_switch ");
14 ················
15 echo "<h1>See all the link below</h1>";
16 echo "</br>"."error database: ";
17 if($all_link->errorCode()==0){
18 echo "no error";
19 }else{
20 echo "error: ";
21 print_r($all_link->errorInfo());
22 }
23 echo "</br>";
24 echo "<form action=\"draw_link.php\" method=\"post\">";
25 while ($link = $all_link->fetch()) {
26 $hyperlink = $link['src_switch'] . $link['dst_switch'];
27 echo "<input type=\"checkbox\" name=\"check_list[]\" val ue=\"".$hyperlink."\"><label>".$hyperlink."</label>". " ";
28 }
29 echo "
30 </br>
31 <input type=\"text\" name=\"time\" placeholder=\"time (m in)\" />
32 <input type=\"submit\" value=\"Show\" />
33 </p> ";
34
35 }
36
37 if(strcmp($get_request['x'], '0') == 0 ){
38 echo "
39 <form action=\"draw_graphs.php\" method=\"post\">
40 <p>
41 <input type=\"text\" name=\"time\" placeholder=\"time (m in)\" />
42 <input type=\"submit\" value=\"Show\" />
43 </p> ";
44
45 }
46
47
48 }
49
OLDNEW
« no previous file with comments | « DB/API_REST/request.php ('k') | DB/API_REST/thread_database.php » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b