Update website consent page

This commit is contained in:
james 2011-03-27 17:11:36 +00:00
parent a1b0c33a64
commit b519726d73

View File

@ -34,18 +34,15 @@
echo "<br />";
if(is_array($_POST['changed']))
{
if(is_array($_POST['changed'])) {
$numchanged=0;
foreach($_POST['changed'] AS $id=>$val)
{
if($val==1)
{
foreach($_POST['changed'] AS $id=>$val) {
if($val==1) {
$numchanged++;
$webfirst=$_POST['webfirst'][$id]=="yes"?"yes":"no";
$weblast=$_POST['weblast'][$id]=="yes"?"yes":"no";
$webphoto=$_POST['webphoto'][$id]=="yes"?"yes":"no";
mysql_query("UPDATE students SET
mysql_query("UPDATE users SET
webfirst='$webfirst',
weblast='$weblast',
webphoto='$webphoto'
@ -71,24 +68,24 @@
<?
$sq=mysql_query("SELECT students.firstname,
students.lastname,
students.id,
$sq=mysql_query("SELECT users.firstname,
users.lastname,
users.id,
projects.projectnumber,
students.webfirst,
students.weblast,
students.webphoto
users.webfirst,
users.weblast,
users.webphoto
FROM
students,
users,
registrations,
projects
WHERE
students.registrations_id=registrations.id
users.registrations_id=registrations.id
AND ( registrations.status = 'complete' OR registrations.status='paymentpending' )
AND projects.registrations_id=registrations.id
AND registrations.conferences_id='".$conference['id']."'
AND projects.conferences_id='".$conference['id']."'
AND students.conferences_id='".$conference['id']."'
AND users.conferences_id='".$conference['id']."'
ORDER BY projectnumber
");
echo mysql_error();