forked from science-ation/science-ation
properly install config types and type values
properly rollover config types and type values
This commit is contained in:
parent
1aa5ef0332
commit
620353e8fa
@ -68,12 +68,14 @@
|
|||||||
$q=mysql_query("SELECT * FROM config WHERE year='$currentfairyear'");
|
$q=mysql_query("SELECT * FROM config WHERE year='$currentfairyear'");
|
||||||
echo mysql_error();
|
echo mysql_error();
|
||||||
while($r=mysql_fetch_object($q))
|
while($r=mysql_fetch_object($q))
|
||||||
mysql_query("INSERT INTO config (var,val,category,ord,description,year) VALUES (
|
mysql_query("INSERT INTO config (var,val,category,ord,description,type,type_values,year) VALUES (
|
||||||
'".mysql_escape_string($r->var)."',
|
'".mysql_escape_string($r->var)."',
|
||||||
'".mysql_escape_string($r->val)."',
|
'".mysql_escape_string($r->val)."',
|
||||||
'".mysql_escape_string($r->category)."',
|
'".mysql_escape_string($r->category)."',
|
||||||
'".mysql_escape_string($r->ord)."',
|
'".mysql_escape_string($r->ord)."',
|
||||||
'".mysql_escape_string($r->description)."',
|
'".mysql_escape_string($r->description)."',
|
||||||
|
'".mysql_escape_string($r->type)."',
|
||||||
|
'".mysql_escape_string($r->type_values)."',
|
||||||
'".mysql_escape_string($newfairyear)."')");
|
'".mysql_escape_string($newfairyear)."')");
|
||||||
|
|
||||||
//now the dates
|
//now the dates
|
||||||
|
@ -115,12 +115,12 @@ if($_POST['action']=="save")
|
|||||||
{
|
{
|
||||||
//add the actual fair name, and just insert the defaults of everything else
|
//add the actual fair name, and just insert the defaults of everything else
|
||||||
if($r->var=="fairname")
|
if($r->var=="fairname")
|
||||||
mysql_query("INSERT INTO config (var,val,description,category,ord,year) VALUES ('$r->var','".mysql_escape_string(stripslashes($_POST['fairname']))."','".mysql_escape_string($r->description)."','".mysql_escape_string($r->category)."','$r->ord','".$_POST['fairyear']."')");
|
mysql_query("INSERT INTO config (var,val,description,category,ord,year,type,type_values) VALUES ('$r->var','".mysql_escape_string(stripslashes($_POST['fairname']))."','".mysql_escape_string($r->description)."','".mysql_escape_string($r->category)."','$r->ord','".$_POST['fairyear']."','".mysql_escape_string($r->type)."','".mysql_escape_string($r->type_values)."')");
|
||||||
//add the fair manager as well
|
//add the fair manager as well
|
||||||
else if($r->var=="fairmanager")
|
else if($r->var=="fairmanager")
|
||||||
mysql_query("INSERT INTO config (var,val,description,category,ord,year) VALUES ('$r->var','".mysql_escape_string(stripslashes($_POST['email']))."','".mysql_escape_string($r->description)."','".mysql_escape_string($r->category)."','$r->ord','".$_POST['fairyear']."')");
|
mysql_query("INSERT INTO config (var,val,description,category,ord,year,type,type_values) VALUES ('$r->var','".mysql_escape_string(stripslashes($_POST['email']))."','".mysql_escape_string($r->description)."','".mysql_escape_string($r->category)."','$r->ord','".$_POST['fairyear']."','".mysql_escape_string($r->type)."','".mysql_escape_string($r->type_values)."')");
|
||||||
else
|
else
|
||||||
mysql_query("INSERT INTO config (var,val,description,category,ord,year) VALUES ('$r->var','$r->val','".mysql_escape_string($r->description)."','".mysql_escape_string($r->category)."','$r->ord','".$_POST['fairyear']."')");
|
mysql_query("INSERT INTO config (var,val,description,category,ord,year,type,type_values) VALUES ('$r->var','$r->val','".mysql_escape_string($r->description)."','".mysql_escape_string($r->category)."','$r->ord','".$_POST['fairyear']."','".mysql_escape_string($r->type)."','".mysql_escape_string($r->type_values)."')");
|
||||||
}
|
}
|
||||||
|
|
||||||
//copy over the dates defautls
|
//copy over the dates defautls
|
||||||
|
Loading…
x
Reference in New Issue
Block a user