Passed
Pull Request — master (#2973)
by Christian
09:20
created
html/ops/dbinfo.php 1 patch
Indentation   +118 added lines, -118 removed lines patch added patch discarded remove patch
@@ -15,10 +15,10 @@  discard block
 block discarded – undo
15 15
     function __construct($n, $d, $i, $t, $r, $s) {
16 16
         $this->name = $n;
17 17
         $this->data_size = $d;
18
-		$this->index_size = $i;
19
-		$this->total_size = $t;
20
-		$this->rows = $r;
21
-		$this->size_per_row = $s;
18
+        $this->index_size = $i;
19
+        $this->total_size = $t;
20
+        $this->rows = $r;
21
+        $this->size_per_row = $s;
22 22
     }
23 23
     function __destruct() {
24 24
     }
@@ -42,40 +42,40 @@  discard block
 block discarded – undo
42 42
 
43 43
 // returns formatted data size
44 44
 function size_format($size){
45
-	$retval = 0;
45
+    $retval = 0;
46 46
 
47
-	$KB = 1024;
47
+    $KB = 1024;
48 48
     $MB = 1024*1024;
49 49
     $GB = 1024*1024*1024;
50
-	$TB = 1024*1024*1024*1024;
50
+    $TB = 1024*1024*1024*1024;
51 51
 	
52 52
     if ($size < $KB) {
53
-	    $retval = $size;
53
+        $retval = $size;
54 54
     } elseif (($size > $KB) && ($size < $MB)) {
55
-		$retval = sprintf("%.0fK", ($size / $KB));    
55
+        $retval = sprintf("%.0fK", ($size / $KB));    
56 56
     } elseif ( ($size >= $MB) && ($size < $GB)) {
57
-		$retval = sprintf("%.2fMB", ($size / $MB));
57
+        $retval = sprintf("%.2fMB", ($size / $MB));
58 58
     } elseif ( ($size >= $GB) && ($size < $TB)) {
59
-		$retval = sprintf("%.2fGB", ($size / $GB));
60
-	} elseif ( $size >= $TB ) {
61
-		$retval = sprintf("%.2fTB", ($size / $TB));
62
-	}
63
-	return $retval;
59
+        $retval = sprintf("%.2fGB", ($size / $GB));
60
+    } elseif ( $size >= $TB ) {
61
+        $retval = sprintf("%.2fTB", ($size / $TB));
62
+    }
63
+    return $retval;
64 64
 }
65 65
 
66 66
 
67 67
 // returns the DB data structure as DB_REC
68 68
 function get_db_info($db_name) 
69 69
 {
70
-	// Carl grabbed this from the mysql.com boards http://dev.mysql.com/doc/refman/5.0/en/show-table-status.html  
70
+    // Carl grabbed this from the mysql.com boards http://dev.mysql.com/doc/refman/5.0/en/show-table-status.html  
71 71
     $result = _mysql_query("SHOW TABLE STATUS FROM $db_name");
72 72
 
73 73
     // SQL output
74 74
     // mysql> show table status from [table_name];
75 75
     // | Name | Engine | Version | Row_format | Rows    
76
-	// | Avg_row_length | Data_length | Max_data_length  
77
-	// | Index_length | Data_free  | Auto_increment | Create_time         
78
-	// | Update_time | Check_time | Collation | Checksum | Create_options | Comment |
76
+    // | Avg_row_length | Data_length | Max_data_length  
77
+    // | Index_length | Data_free  | Auto_increment | Create_time         
78
+    // | Update_time | Check_time | Collation | Checksum | Create_options | Comment |
79 79
     //
80 80
 
81 81
     $gdata  = 0;
@@ -83,24 +83,24 @@  discard block
 block discarded – undo
83 83
     $gtotal = 0;
84 84
     $grows  = 0;
85 85
 
86
-	$i = 0;
87
-	$db_rec = array();
88
-	while($myarr = _mysql_fetch_assoc($result)) {
86
+    $i = 0;
87
+    $db_rec = array();
88
+    while($myarr = _mysql_fetch_assoc($result)) {
89 89
 
90
-		// sum grand totals
91
-		$total  =  $myarr["Data_length"] + $myarr["Index_length"];
92
-		$gindex += $myarr["Index_length"];
90
+        // sum grand totals
91
+        $total  =  $myarr["Data_length"] + $myarr["Index_length"];
92
+        $gindex += $myarr["Index_length"];
93 93
         $gdata  += $myarr["Data_length"];
94
-		$grows  += $myarr["Rows"]; 
95
-		$gtotal += $total;
94
+        $grows  += $myarr["Rows"]; 
95
+        $gtotal += $total;
96 96
  
97
-	    $db_rec[$i] = new DB_REC ($myarr["Name"], $myarr["Data_length"], $myarr["Index_length"], $total, $myarr["Rows"], $myarr["Avg_row_length"] );	
98
-		$i++;
99
-	}
97
+        $db_rec[$i] = new DB_REC ($myarr["Name"], $myarr["Data_length"], $myarr["Index_length"], $total, $myarr["Rows"], $myarr["Avg_row_length"] );	
98
+        $i++;
99
+    }
100 100
 
101 101
     $db_rec[$i] = new DB_REC ("Total", $gdata, $gindex, $gtotal, $grows, "" );	
102 102
 
103
-	return $db_rec;
103
+    return $db_rec;
104 104
 }
105 105
 
106 106
 
@@ -108,41 +108,41 @@  discard block
 block discarded – undo
108 108
 function show_db_info($db_name, $db_rec) 
109 109
 { 
110 110
 
111
-	echo "<table cols=6>";
112
-	echo "<tr>";
113
-	echo "<th colspan=6> Database $db_name </th>";
114
-	echo "</tr>";
115
-
116
-	echo "<tr>";
117
-	echo "<th>Table</th>";
118
-	echo "<th>Data Size</th>";
119
-	echo "<th>Index Size</th>";
120
-	echo "<th>Total Size</th>";
121
-	echo "<th>Total Rows</th>";
122
-	echo "<th>Avg. Size per Row</th>";
123
-	echo "</tr>";
124
-
125
-	for ($i = 0; $i < sizeof($db_rec)-1; $i++){ 
126
-		echo "<tr>";
127
-		echo "<td align=left valign=top class=fieldname>" . $db_rec[$i]->name . "</td>";
128
-		echo "<td align=left valign=top class=fieldname>" . size_format($db_rec[$i]->data_size)  . "</td>";
129
-		echo "<td align=left valign=top class=fieldname>" . size_format($db_rec[$i]->index_size) . "</td>";
130
-		echo "<td align=left valign=top class=fieldname>" . size_format($db_rec[$i]->total_size) . "</td>";
111
+    echo "<table cols=6>";
112
+    echo "<tr>";
113
+    echo "<th colspan=6> Database $db_name </th>";
114
+    echo "</tr>";
115
+
116
+    echo "<tr>";
117
+    echo "<th>Table</th>";
118
+    echo "<th>Data Size</th>";
119
+    echo "<th>Index Size</th>";
120
+    echo "<th>Total Size</th>";
121
+    echo "<th>Total Rows</th>";
122
+    echo "<th>Avg. Size per Row</th>";
123
+    echo "</tr>";
124
+
125
+    for ($i = 0; $i < sizeof($db_rec)-1; $i++){ 
126
+        echo "<tr>";
127
+        echo "<td align=left valign=top class=fieldname>" . $db_rec[$i]->name . "</td>";
128
+        echo "<td align=left valign=top class=fieldname>" . size_format($db_rec[$i]->data_size)  . "</td>";
129
+        echo "<td align=left valign=top class=fieldname>" . size_format($db_rec[$i]->index_size) . "</td>";
130
+        echo "<td align=left valign=top class=fieldname>" . size_format($db_rec[$i]->total_size) . "</td>";
131 131
         echo "<td align=left valign=top class=fieldname>" . number_format($db_rec[$i]->rows)     . "</td>";
132 132
         echo "<td align=left valign=top class=fieldname>" . size_format($db_rec[$i]->size_per_row) . "</td>";
133
-		echo "</tr>";
134
-	}
133
+        echo "</tr>";
134
+    }
135 135
 
136
-	// Last record is just a summary
137
-	$i = sizeof($db_rec)-1;
138
-	echo "<tr>";
136
+    // Last record is just a summary
137
+    $i = sizeof($db_rec)-1;
138
+    echo "<tr>";
139 139
     echo "<th align=left>" . $db_rec[$i]->name . "</th>";
140 140
     echo "<th align=left>" . size_format($db_rec[$i]->data_size)  . "</th>";
141 141
     echo "<th align=left>" . size_format($db_rec[$i]->index_size) . "</th>";
142 142
     echo "<th align=left>" . size_format($db_rec[$i]->total_size) . "</th>";
143 143
     echo "<th align=left>" . number_format($db_rec[$i]->rows)     . "</th>";
144 144
     echo "<th align=left></th>";
145
-	echo "</tr>";
145
+    echo "</tr>";
146 146
 
147 147
     echo "</table>";
148 148
 }
@@ -152,80 +152,80 @@  discard block
 block discarded – undo
152 152
 // NB: same as show_db_info but with sortable cloumns
153 153
 function sort_db_info($db_name, $db_rec) 
154 154
 { 
155
-	// sort 
156
-	$file_list = array();
155
+    // sort 
156
+    $file_list = array();
157 157
     $file_sort = array();
158 158
 
159
-	$sort =  get_str("sort", true);
160
-	$r = get_str("r", true);
161
-
162
-	// check if its empty
163
-	if(empty($sort)) $sort = "name";
164
-	// check for allowed keys 
165
-	if ((strcmp($sort, "name")!=0) && 
166
-		(strcmp($sort, "data_size")!=0) && 
167
-		(strcmp($sort, "index_size")!=0) && 
168
-		(strcmp($sort, "total_size")!=0)  && 
169
-		(strcmp($sort, "rows")!=0) && 
170
-		(strcmp($sort, "size_per_row")!=0)) 
171
-		$sort = "name";
172
-	if(empty($r)) $r=0;
173
-
174
-	for ($i = 0; $i < sizeof($db_rec)-1; $i++){
175
-		$file_details["name"]         = $db_rec[$i]->name;
176
-		$file_details["data_size"]    = $db_rec[$i]->data_size;
177
-		$file_details["index_size"]   = $db_rec[$i]->index_size;
178
-		$file_details["total_size"]   = $db_rec[$i]->total_size;
179
-	    $file_details["rows"]         = $db_rec[$i]->rows;
180
-		$file_details["size_per_row"] = $db_rec[$i]->size_per_row;
181
-
182
-		$file_list[$i] = $file_details;
183
-		$key = strtolower($file_details[$sort]);
184
-		$file_sort[$i] = $key;
185
-	}
159
+    $sort =  get_str("sort", true);
160
+    $r = get_str("r", true);
161
+
162
+    // check if its empty
163
+    if(empty($sort)) $sort = "name";
164
+    // check for allowed keys 
165
+    if ((strcmp($sort, "name")!=0) && 
166
+        (strcmp($sort, "data_size")!=0) && 
167
+        (strcmp($sort, "index_size")!=0) && 
168
+        (strcmp($sort, "total_size")!=0)  && 
169
+        (strcmp($sort, "rows")!=0) && 
170
+        (strcmp($sort, "size_per_row")!=0)) 
171
+        $sort = "name";
172
+    if(empty($r)) $r=0;
173
+
174
+    for ($i = 0; $i < sizeof($db_rec)-1; $i++){
175
+        $file_details["name"]         = $db_rec[$i]->name;
176
+        $file_details["data_size"]    = $db_rec[$i]->data_size;
177
+        $file_details["index_size"]   = $db_rec[$i]->index_size;
178
+        $file_details["total_size"]   = $db_rec[$i]->total_size;
179
+        $file_details["rows"]         = $db_rec[$i]->rows;
180
+        $file_details["size_per_row"] = $db_rec[$i]->size_per_row;
181
+
182
+        $file_list[$i] = $file_details;
183
+        $key = strtolower($file_details[$sort]);
184
+        $file_sort[$i] = $key;
185
+    }
186 186
 	
187
-	if($r)arsort($file_sort);
187
+    if($r)arsort($file_sort);
188 188
     else  asort($file_sort);
189
-	// -- end sort 
190
-
191
-	echo "<table cols=6>";
192
-	echo "<tr>";
193
-	echo "<th colspan=6> Database $db_name </th>";
194
-	echo "</tr>";
195
-
196
-	echo "<tr>";
197
-	echo "<th><a href='dbinfo.php?sort=name&r=" . (!$r) . "'>Table </a></th>";
198
-	echo "<th><a href='dbinfo.php?sort=data_size&r=" . (!$r) . "'>Data Size</a></th>";
199
-	echo "<th><a href='dbinfo.php?sort=index_size&r=" . (!$r) . "'>Index Size</a></th>";
200
-	echo "<th><a href='dbinfo.php?sort=total_size&r=" . (!$r) . "'>Total Size</a></th>";
201
-	echo "<th><a href='dbinfo.php?sort=rows&r=" . (!$r) . "'>Total Rows</a></th>";
202
-	echo "<th><a href='dbinfo.php?sort=size_per_row&r=" . (!$r) . "'>Avg. Size per Row</a></th>";
203
-	echo "</tr>";
204
-
205
-	$i = 0;
206
-	while ( list($key, $value) = each($file_sort) ) {
207
-		$value = $file_list[$key];
208
-		echo "<tr>"; 
209
-		echo "<td align=left valign=top class=fieldname>" . $value["name"] . "</td>";
210
-		echo "<td align=left valign=top class=fieldname>" . size_format($value["data_size"])  . "</td>";
211
-		echo "<td align=left valign=top class=fieldname>" . size_format($value["index_size"]) . "</td>";
212
-		echo "<td align=left valign=top class=fieldname>" . size_format($value["total_size"]) . "</td>";
189
+    // -- end sort 
190
+
191
+    echo "<table cols=6>";
192
+    echo "<tr>";
193
+    echo "<th colspan=6> Database $db_name </th>";
194
+    echo "</tr>";
195
+
196
+    echo "<tr>";
197
+    echo "<th><a href='dbinfo.php?sort=name&r=" . (!$r) . "'>Table </a></th>";
198
+    echo "<th><a href='dbinfo.php?sort=data_size&r=" . (!$r) . "'>Data Size</a></th>";
199
+    echo "<th><a href='dbinfo.php?sort=index_size&r=" . (!$r) . "'>Index Size</a></th>";
200
+    echo "<th><a href='dbinfo.php?sort=total_size&r=" . (!$r) . "'>Total Size</a></th>";
201
+    echo "<th><a href='dbinfo.php?sort=rows&r=" . (!$r) . "'>Total Rows</a></th>";
202
+    echo "<th><a href='dbinfo.php?sort=size_per_row&r=" . (!$r) . "'>Avg. Size per Row</a></th>";
203
+    echo "</tr>";
204
+
205
+    $i = 0;
206
+    while ( list($key, $value) = each($file_sort) ) {
207
+        $value = $file_list[$key];
208
+        echo "<tr>"; 
209
+        echo "<td align=left valign=top class=fieldname>" . $value["name"] . "</td>";
210
+        echo "<td align=left valign=top class=fieldname>" . size_format($value["data_size"])  . "</td>";
211
+        echo "<td align=left valign=top class=fieldname>" . size_format($value["index_size"]) . "</td>";
212
+        echo "<td align=left valign=top class=fieldname>" . size_format($value["total_size"]) . "</td>";
213 213
         echo "<td align=left valign=top class=fieldname>" . number_format($value["rows"])     . "</td>";
214 214
         echo "<td align=left valign=top class=fieldname>" . size_format($value["size_per_row"]) . "</td>";
215
-		echo "</tr>";
216
-		$i++;
217
-	}
215
+        echo "</tr>";
216
+        $i++;
217
+    }
218 218
 
219
-	// Last record is just a summary
220
-	$i = sizeof($db_rec)-1;
221
-	echo "<tr>";
219
+    // Last record is just a summary
220
+    $i = sizeof($db_rec)-1;
221
+    echo "<tr>";
222 222
     echo "<th align=left>" . $db_rec[$i]->name . "</th>";
223 223
     echo "<th align=left>" . size_format($db_rec[$i]->data_size)  . "</th>";
224 224
     echo "<th align=left>" . size_format($db_rec[$i]->index_size) . "</th>";
225 225
     echo "<th align=left>" . size_format($db_rec[$i]->total_size) . "</th>";
226 226
     echo "<th align=left>" . number_format($db_rec[$i]->rows)     . "</th>";
227 227
     echo "<th align=left></th>";
228
-	echo "</tr>";
228
+    echo "</tr>";
229 229
 
230 230
     echo "</table>";
231 231
 }
Please login to merge, or discard this patch.
html/ops/db_schemaversion.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 $updates = array();
29 29
 foreach ($db_updates as $db_update) {
30 30
     if ($db_update[0] > $db_revision) {
31
-		$db_revision = $db_update[0];
31
+        $db_revision = $db_update[0];
32 32
     }
33 33
 }
34 34
 
Please login to merge, or discard this patch.
html/ops/nvidia.php 1 patch
Indentation   +80 added lines, -80 removed lines patch added patch discarded remove patch
@@ -68,93 +68,93 @@
 block discarded – undo
68 68
 }
69 69
 
70 70
 function analyze_nvidia() {
71
-	$hosts_total = 0;     // number of hosts 6.2 or better
72
-	$hosts_gpu = 0;     // number with an nvidia gpu
73
-	$rac_total =0;
74
-	$rac_gpu = 0;
75
-	$linux_total = 0;
76
-	$linux_gpus = 0;
77
-	$windows_total = 0;
78
-	$windows_gpus = 0;
79
-	$model = array();   // name -> count
80
-	$ram = array();     // size -> count
81
-	$driver = array();  // vers -> count
82
-	$ngpus = array();   // ngpus -> count
71
+    $hosts_total = 0;     // number of hosts 6.2 or better
72
+    $hosts_gpu = 0;     // number with an nvidia gpu
73
+    $rac_total =0;
74
+    $rac_gpu = 0;
75
+    $linux_total = 0;
76
+    $linux_gpus = 0;
77
+    $windows_total = 0;
78
+    $windows_gpus = 0;
79
+    $model = array();   // name -> count
80
+    $ram = array();     // size -> count
81
+    $driver = array();  // vers -> count
82
+    $ngpus = array();   // ngpus -> count
83 83
 
84
-	$hosts = BoincHost::enum("expavg_credit > 10 and serialnum<>''");
85
-	foreach($hosts as $host) {
86
-		$boinc_vers = parse_vers($host->serialnum);
87
-		if (!$boinc_vers) continue;
88
-		if ($boinc_vers->major < 6) continue;
89
-		$is_linux = false;
90
-		if (strstr($host->os_name, "Linux")) {
91
-			$linux_total++;
92
-			$is_linux = true;
93
-		} else if (strstr($host->os_name, "Windows")) {
94
-			$windows_total++;
95
-		} else {
96
-			continue;
97
-		}
98
-		$hosts_total++;
99
-		$rac_total += $host->expavg_credit;
100
-		$gpu = parse_cuda($host->serialnum);
101
-		if (!$gpu) {
102
-			continue;
103
-		}
104
-		$hosts_gpu++;
105
-		$rac_gpu += $host->expavg_credit;
106
-		if ($is_linux) {
107
-			$linux_gpus++;
108
-		} else {
109
-			$windows_gpus++;
110
-		}
111
-		inc($model, $gpu->model);
112
-		inc($ram, $gpu->ram);
113
-		inc($driver, $gpu->driver);
114
-		inc($ngpus, $gpu->ngpus);
115
-	}
84
+    $hosts = BoincHost::enum("expavg_credit > 10 and serialnum<>''");
85
+    foreach($hosts as $host) {
86
+        $boinc_vers = parse_vers($host->serialnum);
87
+        if (!$boinc_vers) continue;
88
+        if ($boinc_vers->major < 6) continue;
89
+        $is_linux = false;
90
+        if (strstr($host->os_name, "Linux")) {
91
+            $linux_total++;
92
+            $is_linux = true;
93
+        } else if (strstr($host->os_name, "Windows")) {
94
+            $windows_total++;
95
+        } else {
96
+            continue;
97
+        }
98
+        $hosts_total++;
99
+        $rac_total += $host->expavg_credit;
100
+        $gpu = parse_cuda($host->serialnum);
101
+        if (!$gpu) {
102
+            continue;
103
+        }
104
+        $hosts_gpu++;
105
+        $rac_gpu += $host->expavg_credit;
106
+        if ($is_linux) {
107
+            $linux_gpus++;
108
+        } else {
109
+            $windows_gpus++;
110
+        }
111
+        inc($model, $gpu->model);
112
+        inc($ram, $gpu->ram);
113
+        inc($driver, $gpu->driver);
114
+        inc($ngpus, $gpu->ngpus);
115
+    }
116 116
 
117
-	$pct = 100*($hosts_gpu/$hosts_total);
118
-	echo "ntotal: $hosts_total   ngpus: $hosts_gpu ($pct %)\n";
119
-	$pct = 100*($windows_gpus/$windows_total);
120
-	echo "Windows: total $windows_total gpus $windows_gpus ($pct %)\n";
121
-	$pct = 100*($linux_gpus/$linux_total);
122
-	echo "Linux: total $linux_total gpus $linux_gpus ($pct %)\n";
117
+    $pct = 100*($hosts_gpu/$hosts_total);
118
+    echo "ntotal: $hosts_total   ngpus: $hosts_gpu ($pct %)\n";
119
+    $pct = 100*($windows_gpus/$windows_total);
120
+    echo "Windows: total $windows_total gpus $windows_gpus ($pct %)\n";
121
+    $pct = 100*($linux_gpus/$linux_total);
122
+    echo "Linux: total $linux_total gpus $linux_gpus ($pct %)\n";
123 123
 
124
-	$rac_non_gpu = $rac_total - $rac_gpu;
125
-	$hosts_non_gpu = $hosts_total - $hosts_gpu;
126
-	$a = $rac_gpu/$hosts_gpu;
127
-	$b = $rac_non_gpu/$hosts_non_gpu;
128
-	echo "Avg RAC: GPU: $a non-GPU: $b\n";
124
+    $rac_non_gpu = $rac_total - $rac_gpu;
125
+    $hosts_non_gpu = $hosts_total - $hosts_gpu;
126
+    $a = $rac_gpu/$hosts_gpu;
127
+    $b = $rac_non_gpu/$hosts_non_gpu;
128
+    echo "Avg RAC: GPU: $a non-GPU: $b\n";
129 129
 
130
-	arsort($model);
131
-	foreach($model as $m=>$c) {
132
-		echo "$m $c\n";
133
-	}
134
-	print_r($ram);
135
-	print_r($driver);
136
-	print_r($ngpus);
130
+    arsort($model);
131
+    foreach($model as $m=>$c) {
132
+        echo "$m $c\n";
133
+    }
134
+    print_r($ram);
135
+    print_r($driver);
136
+    print_r($ngpus);
137 137
 }
138 138
 
139 139
 function analyze_all() {
140
-	$total = 0;
141
-	$nnv = 0;
142
-	$nati = 0;
143
-	$nboth = 0;
144
-	$hosts = BoincHost::enum("expavg_credit > 10 and serialnum<>''");
145
-	foreach($hosts as $host) {
146
-		$boinc_vers = parse_vers($host->serialnum);
147
-		if (!$boinc_vers) continue;
148
-		if ($boinc_vers->major < 6) continue;
149
-		if ($boinc_vers->major == 6 && $boinc_vers->minor < 10) continue;
150
-		$total++;
151
-		$has_nv = strstr($host->serialnum, 'CUDA');
152
-		$has_ati = strstr($host->serialnum, 'ATI');
153
-		if ($has_nv) $nnv++;
154
-		if ($has_ati) $nati++;
155
-		if ($has_nv && $has_ati) $nboth++;
156
-	}
157
-	echo "total: $total NVIDIA: $nnv ATI: $nati both: $nboth\n";
140
+    $total = 0;
141
+    $nnv = 0;
142
+    $nati = 0;
143
+    $nboth = 0;
144
+    $hosts = BoincHost::enum("expavg_credit > 10 and serialnum<>''");
145
+    foreach($hosts as $host) {
146
+        $boinc_vers = parse_vers($host->serialnum);
147
+        if (!$boinc_vers) continue;
148
+        if ($boinc_vers->major < 6) continue;
149
+        if ($boinc_vers->major == 6 && $boinc_vers->minor < 10) continue;
150
+        $total++;
151
+        $has_nv = strstr($host->serialnum, 'CUDA');
152
+        $has_ati = strstr($host->serialnum, 'ATI');
153
+        if ($has_nv) $nnv++;
154
+        if ($has_ati) $nati++;
155
+        if ($has_nv && $has_ati) $nboth++;
156
+    }
157
+    echo "total: $total NVIDIA: $nnv ATI: $nati both: $nboth\n";
158 158
 }
159 159
 
160 160
 analyze_all();
Please login to merge, or discard this patch.
html/ops/repair_validator_problem.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,14 +25,14 @@
 block discarded – undo
25 25
 
26 26
 // activate/deactivate script
27 27
 if (1) {
28
-  echo "
28
+    echo "
29 29
 This script needs to be activated before it can be run.
30 30
 Once you understand what the script does you can change the 
31 31
 if (1) to if (0) at the top of the file to activate it.
32 32
 Be sure to deactivate the script after using it to make sure
33 33
 it is not accidentally run. 
34 34
 ";
35
-  exit;
35
+    exit;
36 36
 }
37 37
 
38 38
 db_init();
Please login to merge, or discard this patch.
html/ops/eah_server_status.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,9 +41,9 @@
 block discarded – undo
41 41
 }
42 42
 
43 43
 function find_oldest() {
44
-   $result=_mysql_query("select name,create_time from result where server_state=2 order by create_time limit 1");
45
-   $x = _mysql_fetch_object($result);
46
-   return $x->create_time;
44
+    $result=_mysql_query("select name,create_time from result where server_state=2 order by create_time limit 1");
45
+    $x = _mysql_fetch_object($result);
46
+    return $x->create_time;
47 47
 }
48 48
 
49 49
 function daemon_status($host, $pidname) {
Please login to merge, or discard this patch.
html/ops/opsw.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
     db_init();
44 44
 
45
-   wap_begin();
45
+    wap_begin();
46 46
 
47 47
     // keep a 'running tab' in wapstr in case exceeds 1K WAP limit
48 48
 
@@ -56,15 +56,15 @@  discard block
 block discarded – undo
56 56
     //$wapstr .= "#Activ: " . getSingleQuery("select count(distinct hostid) from cpdnexpt.trickle "
57 57
     //   . "where trickledate>=" . sprintf("%d", mktime() - (3600*24*7))) . "<br/>";
58 58
 
59
-   // finally get last 5 trickles for everyone
60
-   //$wapstr .= show_trickles("a", 0, 5, 1);
59
+    // finally get last 5 trickles for everyone
60
+    //$wapstr .= show_trickles("a", 0, 5, 1);
61 61
 
62
-   // limit wap output to 1KB
63
-   if (strlen($wapstr)>1024)
64
-       echo substr($wapstr,0,1024);
65
-   else
66
-       echo $wapstr;
62
+    // limit wap output to 1KB
63
+    if (strlen($wapstr)>1024)
64
+        echo substr($wapstr,0,1024);
65
+    else
66
+        echo $wapstr;
67 67
 
68
-   wap_end();
68
+    wap_end();
69 69
 
70 70
 ?>
Please login to merge, or discard this patch.
html/ops/mass_email.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
 
85 85
     $result = _mysql_query($query);
86 86
     while ($user = _mysql_fetch_object($result)) {
87
-    	// TODO: might want to also replace TOTAL_CREDIT, RAC, and similar.
87
+        // TODO: might want to also replace TOTAL_CREDIT, RAC, and similar.
88 88
         $body_to_send = str_replace("USERNAME", $user->name, $body);
89 89
         $body_to_send .= "\n\nTo opt out of future emails from ".PROJECT.", please edit your project preferences at ".secure_url_base()."prefs.php?subset=project\n";
90 90
         $retval = send_email($user, $subject, $body_to_send);
Please login to merge, or discard this patch.
html/ops/db_form.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,10 +35,10 @@  discard block
 block discarded – undo
35 35
 start_table();
36 36
 
37 37
 switch($table){
38
-	case "platform": 
39
-		break;
40
-	case "app": 
41
-		break;
38
+    case "platform": 
39
+        break;
40
+    case "app": 
41
+        break;
42 42
     case "app_version":
43 43
         print_detail_field();
44 44
         print_query_field();
@@ -89,8 +89,8 @@  discard block
 block discarded – undo
89 89
     case "user":
90 90
         print_query_field();
91 91
         break;
92
-	default:
93
-		echo "Unknown table name\n";
92
+    default:
93
+        echo "Unknown table name\n";
94 94
         exit();
95 95
 }
96 96
 
Please login to merge, or discard this patch.
html/ops/manage_special_users.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     WHERE CONVERT(special_user, DECIMAL) > 0 and prefs.userid=user.id"
39 39
 );
40 40
 for ($i=1; $i<=_mysql_num_rows($result); $i++){
41
-	$foo = _mysql_fetch_object($result);
41
+    $foo = _mysql_fetch_object($result);
42 42
     echo "<form action=\"manage_special_users_action.php\" method=\"POST\">\n";
43 43
     echo "<input type=\"hidden\" name=\"userid\" value=\"$foo->userid\"
44 44
         <tr><td>$foo->name ($foo->id)</td>
Please login to merge, or discard this patch.