a lil laziness in modifying asgard and a lil requirement to geta site ready
made me write a tiuny script to change your topic scores - not too
intutive - but very simple and handy and does the job
simply take the below php script and modify the database name and passwd and
stuff to match yours and run it to be able to change/add scores for
topics....
<?
//set score
//DATABASE
$DB_SELECT = "midgard";
$DB_PSWD = "midgard";
$DB_USER = "midgard";
$HOST = "localhost";
$PORT = 3306;
/*connect to database*/
$connection = mysql_connect($HOST.":".$PORT, $DB_USER, $DB_PSWD);
mysql_select_db($DB_SELECT);
//setting scores
$sql="select * from topic where sitegroup=1 order by up,score";
$resultinv=mysql_query($sql);
echo "<form action=setscore.php3 method=post>";
while ($row=mysql_fetch_array($resultinv))
{
$sql="update topic set score=".$HTTP_POST_VARS[$row[id]]." where
id=$row[id]";
$result=mysql_query($sql);
if ($HTTP_POST_VARS[$row[id]]=="")
$HTTP_POST_VARS[$row[id]]=$row[score];
if ($row["up"]<>$up)
echo "<br>";
$up=$row["up"];
echo $row[name].":<input type=text name=".$row["id"]." size=3
value=".$HTTP_POST_VARS[$row[id]]."><br>";
}
echo "<input type=submit value=Submit name=B1>";
echo "</form>";
exit;
?>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]