Index: trunk/admin/users/adduser.php =================================================================== diff -u -r13 -r374 --- trunk/admin/users/adduser.php (.../adduser.php) (revision 13) +++ trunk/admin/users/adduser.php (.../adduser.php) (revision 374) @@ -14,7 +14,7 @@ ############################################################## if(!strlen($pathtoroot)) { - $path=dirname(realpath($_SERVER['SCRIPT_FILENAME'])); + $path=dirname(realpath(__FILE__)); if(strlen($path)) { /* determine the OS type for path parsing */ @@ -96,7 +96,7 @@ //$objUserGroupsList = new clsUserGroupList(); //Multiedit init -if ($_GET["new"] == 1) +if ( GetVar('new') == 1) { $c = new clsPortalUser(NULL); $c->Set("CreatedOn", time()); @@ -111,7 +111,7 @@ } else { - $en = (int)$_GET["en"]; + $en = GetVar('en'); if (isset($_POST["itemlist"])) { $objUsers->CopyToEditTable("ResourceId",$_POST["itemlist"]); @@ -190,15 +190,16 @@ > - "> + "> + > - + @@ -307,10 +308,12 @@ $CustomFieldUI = $objCustomFields->GetFieldUIList(TRUE); if($CustomFieldUI->NumItems()>0) { + $objCustomDataList->SetTable('edit'); + + if((int)$c->Get("ResourceId")>0) - { $objCustomDataList->LoadResource($c->Get("ResourceId")); - } + $headings = $CustomFieldUI->GetHeadingList(); //echo "
";print_r($objCustomFields); echo "
"; for($i=0;$i<=count($headings);$i++) @@ -322,6 +325,7 @@ $Items = $CustomFieldUI->GetHeadingItems($h); foreach($Items as $f) { + if ($f->TabIndex) $n = substr($f->name,1); $cfield = $objCustomFields->GetItemByField("FieldName",$n,FALSE); if(is_object($cfield)) @@ -334,18 +338,20 @@ } print "\n"; print " ".$f->GetPrompt()."\n"; - print " ".$f->ItemFormElement().""; + + print " ".$f->ItemFormElement(17).""; if(is_object($f->NextItem)) { $n = $f->NextItem; - print " ".$n->ItemFormElement().""; + print " ".$n->ItemFormElement(17).""; } else print "  \n"; print "\n"; } } } + $objCustomDataList->SetTable('live'); } ?> >