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