diff --git a/admin/committees.php b/admin/committees.php index 06b5d60..b497759 100644 --- a/admin/committees.php +++ b/admin/committees.php @@ -166,6 +166,10 @@ if($_POST['add_member']) if($_POST['save']) { + //FIXME: deal with what the user can actually do based on their own permissions + if($_POST['access_admin']=="Y") $a_admin='Y'; else $a_admin='N'; + if($_POST['access_config']=="Y") $a_config='Y'; else $a_config='N'; + if($_POST['access_super']=="Y") $a_super='Y'; else $a_super='N'; mysql_query("UPDATE committees_members SET ". "name='".$_POST['name']."', ". "organization='".$_POST['organization']."', ". @@ -175,6 +179,9 @@ if($_POST['save']) "phonework='".$_POST['phonework']."', ". "phonecell='".$_POST['phonecell']."', ". "fax='".$_POST['fax']."', ". + "access_admin='$a_admin', ". + "access_config='$a_config', ". + "access_super='$a_super', ". "displayemail='".$_POST['displayemail']."' ". " WHERE id='".$_POST['save']."'"); @@ -224,31 +231,30 @@ if($_GET['edit'] || $edit) $e=$edit; $q=mysql_query("SELECT * FROM committees_members WHERE id='$e'"); $r=mysql_fetch_object($q); - echo "

Edit Committee Member

"; - echo "<< Back to Committees Editor\n"; + echo "

".i18n("Edit Committee Member")."

"; + echo "<< ".i18n("Back to Committees Editor")."\n"; // echo "
\n"; echo "\n"; - echo "\n"; + echo "\n"; echo ""; // echo "\n"; - echo ""; + + echo ""; + + + echo "\n"; echo "
"; - // echo ""; - echo ""; + echo ""; $cq=mysql_query("SELECT committees.name, committees.id, committees_link.title, committees_link.ord FROM committees,committees_link WHERE committees_link.committees_id=committees.id AND committees_link.committees_members_id='$e' ORDER BY committees.name"); - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; // echo "\n"; // echo "
Name:name\">
".i18n("Name").":name\" />
Committees:"; + echo "
".i18n("Committees").":"; if(mysql_num_rows($cq)) { echo ""; - echo ""; + echo ""; while($cr=mysql_fetch_object($cq)) { - echo ""; + echo ""; } echo "
CommitteeTitle in CommitteeOrder
".i18n("Committee")."".i18n("Title in Committee")."".i18n("Order")."
$cr->nameid]\" value=\"$cr->title\" />id]\" value=\"$cr->ord\" size=3>
$cr->nameid]\" value=\"$cr->title\" />id]\" value=\"$cr->ord\" size=\"3\" />
"; @@ -256,21 +262,21 @@ if($_GET['edit'] || $edit) else echo "None"; echo "
Organization:organization\" />
Email (Public):email\" />
Email (Private):emailprivate\" />
Display Emails:"; + echo "
".i18n("Organization").":organization\" />
".i18n("Email (Public)").":email\" />
".i18n("Email (Private)").":emailprivate\" />
".i18n("Display Emails").":"; if($r->displayemail=="N") $checked="checked=\"checked\""; else $checked=""; - echo "No"; + echo "".i18n("No"); echo "     "; if($r->displayemail=="Y") $checked="checked=\"checked\""; else $checked=""; - echo "Yes"; + echo "".i18n("Yes"); echo "
Phone (Home):phonehome\" />
Phone (Work):phonework\" />
Phone (Cell):phonecell\" />
Fax:fax\">
".i18n("Phone (Home)").":phonehome\" />
".i18n("Phone (Work)").":phonework\" />
".i18n("Phone (Cell)").":phonecell\" />
".i18n("Fax").":fax\" />
Picture:
"; @@ -282,9 +288,22 @@ if($_GET['edit'] || $edit) // echo "No Picture"; // echo "
"; - echo "

"; - echo "\n"; + echo "

".i18n("Access Controls").":"; + if($r->access_admin=="Y") $checked="checked=\"checked\""; else $checked=""; + echo " ".i18n("Administration")."
"; + if($r->access_config=="Y") $checked="checked=\"checked\""; else $checked=""; + echo " ".i18n("Configuration")."
"; + if($r->access_super=="Y") $checked="checked=\"checked\""; else $checked=""; + echo " ".i18n("Superuser")."
"; + + echo "
"; + echo "

"; + echo "\n"; echo "
\n"; @@ -296,23 +315,23 @@ else echo ""; echo "
"; - echo "

Add Committee

\n"; + echo "

".i18n("Add Committee")."

\n"; echo "\n"; echo "\n"; - echo ""; - echo " \n"; + echo ""; + echo " \n"; echo "
Committee Name:
".i18n("Committee Name").":
\n"; echo "\n"; echo "
 "; - echo "

Add Committee Member

\n"; + echo "

".i18n("Add Committee Member")."

\n"; echo "
\n"; echo "\n"; - echo "\n"; - echo " \n"; + echo " \n"; echo "
Member Name: "; + echo "
".i18n("Member Name").": "; echo "\n"; echo "
\n"; echo "
\n"; @@ -321,21 +340,21 @@ else echo "
"; - echo "

Committee Member Management

\n"; + echo "

".i18n("Committee Member Management")."

\n"; echo "
\n"; echo ""; echo ""; + echo ""; echo "
"; echo ""; echo ""; $q=mysql_query("SELECT * FROM committees_members ORDER BY name"); echo ""; - echo "\n"; + echo "\n"; while($r=mysql_fetch_object($q)) { echo "\n"; @@ -361,7 +380,7 @@ else //The Edit or Remove Div - echo "
"; echo "
"; @@ -373,7 +392,7 @@ else $q=mysql_query("SELECT * FROM committees ORDER BY ord,name"); if(mysql_num_rows($q)) { - echo "

Committees

"; + echo "

".i18n("Committees")."

"; echo "
\n"; echo ""; while($r=mysql_fetch_object($q)) @@ -434,7 +453,7 @@ else } echo "\n"; } - echo "\n"; + echo "\n"; echo "
 
"; echo "
\n"; }