Пример #1
0
if (isset($_GET['id'])) {
    $userid = 'User' . $_GET['id'];
    if ($zbp->Config('Howl')->HasKey($userid)) {
        $useractions = $zbp->Config('Howl')->{$userid};
    } else {
        $useractions = array();
    }
    foreach ($useractions as $key => $value) {
        echo '<tr>';
        echo '<th>' . $key . '</th><th><input name="' . $key . '" style="" type="text" value="' . (int) $value . '" class="checkbox"/></th><th><input type="submit" onclick="$(this).parent().parent().find(\'input:text\').val(-1);$(\'#edit\').submit();" class="button" value="删除" /></th>';
        echo '</tr>';
    }
    echo '<tr>';
    echo '<th><select onchange="$(\'#addact\').attr(\'name\',$(this).val());"><option value=""></option>';
    foreach ($actions as $key => $value) {
        echo '<option value="' . $key . '">' . $key . ' (' . Howl_GetRightName($key) . ')</option>';
    }
    echo '</select></th><th><input id="addact" type="text" value="1" class="checkbox"/></th><th><input type="submit" class="button" value="添加" /></th>';
    echo '</tr>';
}
?>
</table>
	  <hr/>

	</form>
	<script type="text/javascript">

	</script>
	<script type="text/javascript">ActiveLeftMenu("aPluginMng");</script>
	<script type="text/javascript">AddHeaderIcon("<?php 
echo $bloghost . 'zb_users/plugin/Howl/logo.png';
Пример #2
0
function MakeInput($group, $key)
{
    global $zbp;
    $zbp->user->Level = $group;
    $check = (int) $zbp->CheckRights($key);
    return '<input name="Group' . $group . '_' . $key . '" style="" type="text" value="' . $check . '" class="checkbox"/>';
}
foreach ($actions as $key => $value) {
    ?>

<tr>
<td class="tdCenter"><?php 
    echo $key;
    ?>
(<b><?php 
    echo Howl_GetRightName($key);
    ?>
</b>)</td>
<?php 
    foreach ($group_key as $groupkey) {
        echo '<td class="tdCenter">';
        echo MakeInput($groupkey, $key);
        echo "</td>\r\n";
    }
    ?>
</tr>
<?php 
}
?>
</table>
	  <hr/>