View Single Post
  #1  
Old 08-25-2013, 09:39 AM
Isura Isura is offline
Member
 
Join Date: Jun 2011
Posts: 38
Gender: Female
Credits: 11,378
Isura is on a distinguished road
Default Using checkboxes to select adoptables

Hello,

I'm working on a group function to sort pets in different groups for Ruinily. It works fine so far I only have one small problem:

Current it's only possible to move one creature to one group at once. Since this is unpractical if people have a lot of pets, I want to do the selection over 'checkboxes':

PHP Code:
<form method='post'
...
<
input type='checkbox' name='movecreature[]' value='{$adopt->aid}' />
...
</
form
Unfortunately, the mysidia script doesn't allowe the transmission of arrays over post or get. I think the reason is the secure function in the input class:

PHP Code:
private function secure($data){
if(
is_array($data) and SUBDIR != "AdminCP") die ("Hacking Attempt!");
...

(Or in Mys v.1.3.3:)

PHP Code:
private function secure($data){
if(
is_array($data)) die ("Hacking Attempt!");
...

Is there a way to formulate an exception for a certain post variable? Something like:

PHP Code:
if(is_array($data) and !is_array($_POST("movecreature"))) die ("Hacking Attempt!"); 
I'm really thankful for every idea to solve this problem .
(Sorry for my bad english ^^)
__________________
Reply With Quote