File: common.php

package info (click to toggle)
cacti 0.6.7-2.2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,000 kB
  • ctags: 1,120
  • sloc: php: 5,059; sql: 922; sh: 302; perl: 81; makefile: 56
file content (24 lines) | stat: -rw-r--r-- 1,088 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?/* 
+-------------------------------------------------------------------------+
| raXnet Authentication Scripts                                           |
+-------------------------------------------------------------------------+
| This code is currently maintained and debugged by Ian Berry, any        |
| questions or comments regarding this code should be directed to:        |
| - iberry@raxnet.net                                                     |
+-------------------------------------------------------------------------+
| - raXnet - http://www.raxnet.net/                                       |
+-------------------------------------------------------------------------+
*/?>
<?
function CreateList($dbid,$sql,$name,$value,$prev) {
	$res_id = mysql_query("$sql",$dbid);
	$rows = mysql_num_rows($res_id);
	
	while ($i < $rows) { 
		?><option value="<? print mysql_result($res_id, $i, $value); ?>"<? 
		if ($prev == mysql_result($res_id, $i, $value)) { 
		?> selected <? } ?>><? print mysql_result($res_id, $i, $name); ?></option><?
		$i++;
	}
}
?>