コード例 #1
0
       echo '<form id="readWrite" name="readWrite" action="' . $_SERVER['PHP_SELF'] . '?page=wp-group-restriction/manage_groups&amp;mode=update&amp;id=' . $pageID . '" method="post">';
       echo '<script type="text/javascript"><!--
 
 function select_all(name, value) {
   formblock = document.getElementById("readWrite");
   forminputs = formblock.getElementsByTagName("input");
   for (i = 0; i < forminputs.length; i++) {
     // regex here to check name attribute
     var regex = new RegExp(name, "i");
     if (regex.test(forminputs[i].getAttribute("name"))) {
       forminputs[i].checked = value;
     }
   }
 }
 //--></script>';
       $count = $groups->getGroupsCount();
       if ($count > 0) {
           $pageGroups = $groups->getAllGroupsWithPage($pageID);
           if (isset($pageGroups)) {
               echo "<table id='the-list-x' width='100%' cellpadding='3' cellspacing='3'>";
               echo "<tr class=\"thead\">";
               echo "<th scope='col' rowspan='2'>Page</th>";
               echo "<th scope='col' colspan='3'>Exclusive Access</th>";
               echo "</tr>";
               echo "<tr class=\"thead\">";
               echo "<th scope='col' style='width:7em'>Read</th>";
               echo "<th scope='col' style='width:7em'>Write</th>";
               echo "</tr>";
               $alt = true;
               //print groups!!!
               foreach ($pageGroups as $group) {