\n"; print "\t" . getMLText("access_mode_none") . "\n"; print "\t" . getMLText("access_mode_read") . "\n"; print "\t" . getMLText("access_mode_readwrite") . "\n"; print "\t" . getMLText("access_mode_all") . "\n"; print "\n"; } $folderid = (isset($_GET['folderid'])) ? (int) $_GET['folderid'] : NULL; //$folder = getFolder($folderid); if(!$folder = getFolder($folderid)) { $GLOBALS['phpgw']->redirect_link('out/out.ViewFolder.php?error=accesso denegado!'); } if ($folder->getAccessMode($user) < M_READWRITE) $GLOBALS['phpgw']->redirect_link('out/out.ViewFolder.php?error=accesso denegado!'); //$allUsers = getAllUsers(); //foreach($allUsers as $c=>$v) // echo "El vector con indice $c tiene el valor $v "; //while (list($clave, $valor) = each($allUsers)) { //echo "El vector con indice $clave tiene el valor $valor "; //} //asort($allUsers); //uasort($allUsers,'ordenar'); $accounts = $GLOBALS['phpgw']->accounts->get_list('accounts'); $allUsers = array(); for ($i = 0; $i < count($accounts); $i++) { $id = $accounts[$i]["account_id"]; $login = $accounts[$i]["account_lid"]; $fullName = $accounts[$i]['account_firstname'].' '.$accounts[$i]['account_lastname']; $email = $accounts[$i]["account_email"]; $isAdmin = phpgw_is_admin($id); $pwd = ''; $comment = ''; //$myCollection->add($id,$login,$fullName,$email,$isAdmin,$pwd,$comment); $allUsers[$i]=new User($id, $login, $pwd, $fullName, $email, $comment, $isAdmin); } //$allUsers->sortDataSet("fullName"); function cmpNames($a,$b) { //Use sort() for simple alphabetical comparison //Convert to lowercase to ensure consistent behaviour $sortable = array(strtolower($a->_fullName),strtolower($b->_fullName)); $sorted = $sortable; sort($sorted); //If the names have switched position, return -1. Otherwise, return 1. return ($sorted[0] == $sortable[0]) ? -1 : 1; } uasort($allUsers, "cmpNames"); // $allGroups = getAllGroups(); $phpgw_groups = $GLOBALS['phpgw']->accounts->get_list('groups'); $allGroups= array(); for ($i = 0; $i < count($phpgw_groups); $i++) $allGroups[$i] = new Group($phpgw_groups[$i]["account_id"], $phpgw_groups[$i]["account_lid"], ''); function cmpNamesg($a,$b) { //Use sort() for simple alphabetical comparison //Convert to lowercase to ensure consistent behaviour $sortable = array(strtolower($a->_name),strtolower($b->_name)); $sorted = $sortable; sort($sorted); //If the names have switched position, return -1. Otherwise, return 1. return ($sorted[0] == $sortable[0]) ? -1 : 1; } uasort($allGroups, "cmpNamesg"); //Sort by name: //$myCollection->sortDataSet("fullName"); //print_r($myCollection->dataSet); //$allUsers[]->sortDataSet("fullName"); //Sort by x //$myCollection->sortDataSet("login"); //print_r($myCollection->dataSet); //Sort by y //$myCollection->sortDataSet("id"); //print_r($myCollection->dataSet); //Sort by order added //$myCollection->sortDataSet("added"); //print_r($myCollection->dataSet); //if ($folder->getAccessMode($user) < M_ALL) //die ("Access denied"); printHTMLHead( getMLText("folder_title", array("foldername" => $folder->getName()) ) ); ?> getName()); $owner = $folder->getOwner(); if($user->getID()==1120 ||$owner->getID()==$user->getID()){ //Nur admin darf Besitzer �ndern if ($user->isAdmin()) { printStartBox(getMLText("set_owner")); ?> getOwner(); foreach ($allUsers as $currUser) { if ($currUser->getID() == $settings->_guestID) continue; print "getID()."\""; if ($currUser->getID() == $owner->getID()) print " selected"; print ">" . $currUser->getFullname() . "\n"; } ?> "; if ($folder->inheritsAccess()) { printMLText("inherits_access_msg", array( "copyurl" => "../op/op.FolderAccess.php?folderid=".$folderid."&action=notinherit&mode=copy", "emptyurl" => "../op/op.FolderAccess.php?folderid=".$folderid."&action=notinherit&mode=empty")); printEndBox(); printFolderPageEnd($folder); printHTMLFoot(); exit(); } if($user->getID()==1120 ){ printMLText("does_not_inherit_access_msg", array("inheriturl" => "../op/op.FolderAccess.php?folderid=".$folderid."&action=inherit")); } print ""; $accessList = $folder->getAccessList(); //printNextBox(getMLText("default_access")); ?> ".getMLText("empty_access_list").""; } else { $rownum = count($accessList["users"])+count($accessList["groups"])+1; ?> getUser(); print "\n"; print "\n"; print "\n"; print "getID()."\">\n"; print "\n"; print "\n"; print "". $userObj->getFullName() . "\n"; print "\n"; printAccessModeSelection($userAccess->getMode()); print "\n"; print "\n"; print "getID()."\">\n"; print "\n"; print "\n"; } foreach ($accessList["groups"] as $groupAccess) { $groupObj = $groupAccess->getGroup(); $mode = $groupAccess->getMode(); print ""; print ""; print ""; print "getID()."\">"; print ""; print ""; print "". $groupObj->getName() . ""; print ""; printAccessModeSelection($groupAccess->getMode()); print "\n"; print ""; print "getID()."\">"; print ""; print ""; } } ?> : ------------------------------- getID() == $settings->_guestID) continue; print "getID()."\">" . $userObj->getFullName() . "\n"; } ?> : ------------------------------- getID()."\">" . $groupObj->getName() . "\n"; ?> :
El vector con indice $c tiene el valor $v
El vector con indice $clave tiene el valor $valor