CyTS und wi_writeGroupPermissions PROBLEM

  • CyTS und wi_writeGroupPermissions PROBLEM

    Hi @ all
    habe letztens mal den thread "CyTS und wi_readGroupPermissions PROBLEM" eröffnet so das hat mit dem auslesen auch ganz gut geklappt aber jetzt besteht das es nicht gepostet wird ^^

    Kann mir da jemand helfen ??
    Danke im Vorraus

    Die wi_writeGroupPermissions Funktion:

    Quellcode

    1. function wi_writeGroupPermissions($sData = array()) {
    2. if (!$cData = $this->wi_readGroupPermissions()) return false;
    3. foreach ($cData as $key => $val)
    4. if (isset($sData[$key]) && ($sData[$key] == 1 || $sData[$key] == 0))
    5. $cData[$key] = $sData[$key];
    6. if (!$this->_wipost("/permissions_server.tscmd", $cData)) return false;
    7. if (!$nData = $this->wi_readGroupPermissions()) return false;
    8. foreach ($cData as $key => $val)
    9. if ($nData[$key] != $val)
    10. return false;
    11. return true;
    12. }
    Alles anzeigen



    Meine Versuche:



    Quellcode

    1. $aha = $cyts->_wiget("/ts_control_sr_sa.html",3);
    2. print '<form action="serverrechte_test.php" method="post">';
    3. print_r($aha[1]);
    4. print '<input name="send" type="submit" value=senden></form>';
    5. if (($_POST['submit'])=='send')
    6. {
    7. $rw = array
    8. (
    9. // SA eingeben
    10. "ugSA_upAccessWebAdminServer" => $_POST['ugSA_upAccessWebAdminServer'],
    11. "ugSA_upAccessTcpServer" => $_POST['ugSA_upAccessTcpServer'],
    12. "ugSA_upAccessVoice" => $_POST['ugSA_upAccessVoice'],
    13. "ugSA_upAdminRegisterPlayer" => $_POST['ugSA_upAdminRegisterPlayer'],
    14. "ugSA_upAdminListDBUsers" => $_POST['ugSA_upAdminListDBUsers'],
    15. "ugSA_upAdminChangeOwnPassword" => $_POST['ugSA_upAdminChangeOwnPassword'],
    16. "ugSA_upAdminChangeUserPassword" => $_POST['ugSA_upAdminChangeUserPassword'],
    17. // usw...
    18. $cyts->_wipost("/permissions_server.tscmd",$rw, 3);
    19. };
    Alles anzeigen


    Der Zweiter versuch:

    Quellcode

    1. $rw = array
    2. (
    3. // SA eingeben
    4. "ugSA_upAccessWebAdminServer" => $_POST['ugSA_upAccessWebAdminServer'],
    5. "ugSA_upAccessTcpServer" => $_POST['ugSA_upAccessTcpServer'],
    6. "ugSA_upAccessVoice" => $_POST['ugSA_upAccessVoice'],
    7. "ugSA_upAdminRegisterPlayer" => $_POST['ugSA_upAdminRegisterPlayer'],
    8. "ugSA_upAdminListDBUsers" => $_POST['ugSA_upAdminListDBUsers'],
    9. "ugSA_upAdminChangeOwnPassword" => $_POST['ugSA_upAdminChangeOwnPassword'],
    10. "ugSA_upAdminChangeUserPassword" => $_POST['ugSA_upAdminChangeUserPassword'],
    11. // usw...
    12. $cyts->wi_writeGroupPermissions($rw);
    Alles anzeigen


    Bitte HILFE !
  • da die ganzen Variablen von extern stammen kann man auch schlecht eine Antwort wissen.
    Ist schon länger her, aber ich vermute ich war da einfach zu faul die üblichen Gegenfragen zu stellen.

    Ersetzte deine Funktion mal durch diese:

    Quellcode

    1. function wi_writeGroupPermissions($sData = array()) {
    2. echo '$sData'; print_r($sData);
    3. if (!$cData = $this->wi_readGroupPermissions()) {
    4. echo '!$cData = $this->wi_readGroupPermissions()';
    5. return false;
    6. }
    7. echo '$cData'; print_r($cData);
    8. foreach ($cData as $key => $val)
    9. if (isset($sData[$key]) && ($sData[$key] == 1 || $sData[$key] == 0))
    10. $cData[$key] = $sData[$key];
    11. echo '$cData'; print_r($cData);
    12. if (!$this->_wipost("/permissions_server.tscmd", $cData)) {
    13. echo '!$this->_wipost("/permissions_server.tscmd", $cData)';
    14. return false;
    15. }
    16. if (!$nData = $this->wi_readGroupPermissions()) {
    17. echo '!$nData = $this->wi_readGroupPermissions()';
    18. return false;
    19. }
    20. foreach ($cData as $key => $val)
    21. if ($nData[$key] != $val) {
    22. echo '$nData[$key] != $val';
    23. return false;
    24. }
    25. echo 'true';
    26. return true;
    27. }
    Alles anzeigen