include "configs.inc";
include "top.php";
mysql_connect("$db_host","$db_user","$db_pass");
mysql_select_db("$db");
if($action == 'addstrand') {
mysql_query("INSERT INTO strands (sid,strand,points) VALUES ('',\"$strand\",\"$points\")");
print "
$strand
";
print "";
$points = split(";",$points);
foreach($points as $point) {
print "- $point";
}
} elseif($action == 'addpoint') {
$strands = mysql_query("SELECT * FROM strands WHERE strand=\"$strand\"");
$strand = mysql_fetch_array($strands);
$points = "$strand[points]" . ";$point";
mysql_query("UPDATE strands SET points=\"$points\" WHERE sid=\"$strand[sid]\"");
print "
$strand[strand]
";
print "";
$points = split(";",$points);
foreach($points as $point) {
print "- $point";
}
} elseif($action == 'listall') {
$strands = mysql_query("SELECT * FROM strands where sid>19");
while($strand = mysql_fetch_array($strands)) {
print "
";
print "$strand[strand] - ";
$points = split(";",$strand[points]);
foreach($points as $point) {
print "$point, ";
}
print "
";
print "
";
}
} elseif($strand) {
$strands = mysql_query("SELECT * FROM strands WHERE strand=\"$strand\"");
$strand = mysql_fetch_array($strands);
print "$strand[strand]
";
print "";
$points = split(";",$strand[points]);
foreach($points as $point) {
print "- $point";
}
print "
- ";
print "
";
} else {
print "\n";
$strands = mysql_query("SELECT * FROM strands ORDER BY sid");
while($strand = mysql_fetch_array($strands)) {
$link = ereg_replace(" ","%20",$strand[strand]);
print "- $strand[strand]";
}
print "
";
print "
List all Strands (Printable)
";
print "Other than adding strands, if there's a correction to be made, E-Mail me
\n";
print "
Add Strand