I have one problem and I can't solve it, I'm working on a downloaded script, and I'm rearranging it for my own needs. I have a table in php with user data, etc. and a section with action buttons, and a button, I would like to put everything in one dropdown button, but I can't succeed. the buttons are pulled from another php (table_serach.php) in the picture you can see what it looks like now and I will extract the part of the code that is in charge of these buttons. I would be grateful if someone could solve the problem
$rButtons = '<div class="btn-group">'; if (($rPermissions["is_admin"]) && (hasPermissions("adv", "edit_user")) OR (($rPermissions["is_reseller"]) && ($rAdminSettings["reseller_reset_isplock"]))) { //if (($rPermissions["is_admin"]) && (hasPermissions("adv", "edit_user"))) { //if (($rPermissions["is_reseller"]) OR (($rPermissions["is_admin"]) && (hasPermissions("adv", "edit_user")))) { $rButtons .= '<button data-toggle="tooltip" data-placement="top" title="" data-original-title="Reset isp" type="button" class="btn btn-light waves-effect waves-light btn-xs" onClick="api('.$rRow["id"].', \'resetispuser\');"><i class="mdi mdi-lock-reset"></i></button> '; } if (($rPermissions["is_admin"]) && (hasPermissions("adv", "edit_user")) OR (($rPermissions["is_reseller"]) && ($rAdminSettings["reseller_can_isplock"]))) { //if (($rPermissions["is_reseller"]) OR (($rPermissions["is_admin"]) && (hasPermissions("adv", "edit_user")))) { if ($rRow["is_isplock"]) { $rButtons .= '<button data-toggle="tooltip" data-placement="top" title="" data-original-title="Unlock isp" type="button" class="btn btn-light waves-effect waves-light btn-xs" onClick="api('.$rRow["id"].', \'unlockk\');"><i class="mdi mdi-lock"></i></button>'; } else { $rButtons .= '<button data-toggle="tooltip" data-placement="top" title="" data-original-title="Lock isp" type="button" class="btn btn-light waves-effect waves-light btn-xs" onClick="api('.$rRow["id"].', \'lockk\');"><i class="mdi mdi-lock-outline"></i></button>'; } } if (((strlen($rRow["admin_notes"]) > 0) && ($rPermissions["is_admin"])) OR (strlen($rRow["reseller_notes"]) > 0)) { $rNotes = ""; if ($rPermissions["is_admin"]) { if (strlen($rRow["admin_notes"]) > 0) { $rNotes .= $rRow["admin_notes"]; } } if (strlen($rRow["reseller_notes"]) > 0) { if (strlen($rNotes) <> 0) { $rNotes .= "\n"; } $rNotes .= $rRow["reseller_notes"]; } $rButtons .= '<button type="button" class="btn btn-light waves-effect waves-light btn-xs" data-toggle="tooltip" data-placement="left" title="" data-original-title="'.$rNotes.'"><i class="mdi mdi-note"></i></button>'; } else { $rButtons .= '<button disabled type="button" class="btn btn-light waves-effect waves-light btn-xs"><i class="mdi mdi-note"></i></button>'; } if ($rPermissions["is_admin"]) { if (hasPermissions("adv", "edit_user")) { $rButtons .= '<a href="./user.php?id='.$rRow["id"].'"><button data-toggle="tooltip" data-placement="top" title="" data-original-title="Edit" type="button" class="btn btn-light waves-effect waves-light btn-xs"><i class="mdi mdi-pencil-outline"></i></button></a> '; } } else { //selecao de bouquets inicio if ((($rPermissions["is_reseller"]) && ($rPermissions["reseller_can_select_bouquets"])) OR ($rPermissions["is_admin"])) { $rButtons .= '<a href="./user_reseller_edit.php?id='.$rRow["id"].'"><button data-toggle="tooltip" data-placement="top" title="" data-original-title="Edit User Bouquets" type="button" class="btn btn-light waves-effect waves-light btn-xs"><i class="mdi mdi-format-line-spacing"></i></button></a>'; } //selecao de bouquets fim $rButtons .= '<a href="./user_reseller.php?id='.$rRow["id"].'"><button data-toggle="tooltip" data-placement="top" title="" data-original-title="Edit" type="button" class="btn btn-light waves-effect waves-light btn-xs"><i class="mdi mdi-pencil-outline"></i></button></a>'; } if ((($rPermissions["is_reseller"]) && ($rPermissions["allow_download"])) OR ($rPermissions["is_admin"])) { $rButtons .= '<button type="button" data-toggle="tooltip" data-placement="top" title="" data-original-title="Download Playlist" class="btn btn-light waves-effect waves-light btn-xs" onClick="download(\''.$rRow["username"].'\', \''.$rRow["password"].'\');"><i class="mdi mdi-arrow-collapse-down"></i></button>'; } if (($rPermissions["is_reseller"]) OR (($rPermissions["is_admin"]) && (hasPermissions("adv", "edit_user")))) { $rButtons .= '<button data-toggle="tooltip" data-placement="top" title="" data-original-title="Kill Connections" type="button" class="btn btn-light waves-effect waves-light btn-xs" onClick="api('.$rRow["id"].', \'kill\');"><i class="fas fa-hammer"></i></button> '; } if (($rPermissions["is_admin"]) && (hasPermissions("adv", "edit_user"))) { if ($rRow["admin_enabled"]) { $rButtons .= '<button data-toggle="tooltip" data-placement="top" title="" data-original-title="Ban" type="button" class="btn btn-light waves-effect waves-light btn-xs" onClick="api('.$rRow["id"].', \'ban\');"><i class="mdi mdi-minus-circle-outline"></i></button>'; } else { $rButtons .= '<button data-toggle="tooltip" data-placement="top" title="" data-original-title="Unban" type="button" class="btn btn-light waves-effect waves-light btn-xs" onClick="api('.$rRow["id"].', \'unban\');"><i class="mdi mdi-minus-circle"></i></button>'; } } if (($rPermissions["is_reseller"]) OR (($rPermissions["is_admin"]) && (hasPermissions("adv", "edit_user")))) { if ($rRow["enabled"]) { $rButtons .= '<button data-toggle="tooltip" data-placement="top" title="" data-original-title="Disable" type="button" class="btn btn-light waves-effect waves-light btn-xs" onClick="api('.$rRow["id"].', \'disable\');"><i class="mdi mdi-checkbox-blank-circle-outline"></i></button> '; } else { $rButtons .= '<button data-toggle="tooltip" data-placement="top" title="" data-original-title="Enable" type="button" class="btn btn-light waves-effect waves-light btn-xs" onClick="api('.$rRow["id"].', \'enable\');"><i class="mdi mdi-checkbox-blank-circle"></i></button> '; } } if ((($rPermissions["is_reseller"]) && ($rPermissions["delete_users"])) OR (($rPermissions["is_admin"]) && (hasPermissions("adv", "edit_user")))) { $rButtons .= '<button data-toggle="tooltip" data-placement="top" title="" data-original-title="Delete" type="button" class="btn btn-light waves-effect waves-light btn-xs" onClick="api('.$rRow["id"].', \'delete\');"><i class="mdi mdi-close"></i></button>'; } $rButtons .= '</div>';
没有评论:
发表评论