function UserView($option, $uid) { global $database; if ($uid == 0) { mosNotAuth(); return; } $user_id = intval(mosGetParam($_REQUEST, 'userid', 0)); if ($user_id == 0) { $user_id = $uid; } // echo "<script>alert('$user_id');</script>"; include_once "administrator/components/com_user_extended/user_extended.class.php"; $row = new mosUser_Extended($database); $row->load($user_id); $urow = new mosUser($database); $urow->load($user_id); $u_name = $urow->name; $u_username = $urow->username; $u_email = $urow->email; UserExtended_content::UserView($option, $row, $u_name, $u_username, $u_email); }
function userEdit($row, $option, $submitvalue) { ?> <script language="javascript" type="text/javascript"> function submitbutton() { var form = document.EditUser; var r = new RegExp("[^0-9A-Za-z]", "i"); if (form.name.value == "") { alert( "<?php echo _REGWARN_NAME; ?> " ); <?php // form validation for required fields global $database, $mainframe; $sql = "select * from #__user_extended_config WHERE id='1'"; $database->SetQuery($sql); $rows22 = $database->LoadObjectList(); $row11 = $rows22[0]; // field validation if ($row11->user1_must && $row11->user1_show) { ?> } else if (form.user1.value == "") { alert( "<?php echo $row11->user1_name . ' ' . _UEXT_ISREQUIRED; ?> ." ); <?php } if ($row11->user2_must && $row11->user2_show) { ?> } else if (form.user2.value == "") { alert( "<?php echo $row11->user2_name . ' ' . _UEXT_ISREQUIRED; ?> ." ); <?php } if ($row11->user3_must && $row11->user3_show) { ?> } else if (form.user3.value == "") { alert( "<?php echo $row11->user3_name . ' ' . _UEXT_ISREQUIRED; ?> ." ); <?php } if ($row11->user4_must && $row11->user4_show) { ?> } else if (form.user4.value == "") { alert( "<?php echo $row11->user4_name . ' ' . _UEXT_ISREQUIRED; ?> ." ); <?php } if ($row11->user5_must && $row11->user5_show) { ?> } else if (form.user5.value == "") { alert( "<?php echo $row11->user5_name . ' ' . _UEXT_ISREQUIRED; ?> ." ); <?php } if ($row11->user6_must && $row11->user6_show) { ?> } else if (form.user6.value == "") { alert( "<?php echo $row11->user6_name . ' ' . _UEXT_ISREQUIRED; ?> ." ); <?php } if ($row11->user7_must && $row11->user7_show) { ?> } else if (form.user7.value == "") { alert( "<?php echo $row11->user7_name . ' ' . _UEXT_ISREQUIRED; ?> ." ); <?php } if ($row11->user8_must && $row11->user8_show) { ?> } else if (form.user8.value == "") { alert( "<?php echo $row11->user8_name . ' ' . _UEXT_ISREQUIRED; ?> ." ); <?php } if ($row11->user9_must && $row11->user9_show) { ?> } else if (form.user9.value == "") { alert( "<?php echo $row11->user9_name . ' ' . _UEXT_ISREQUIRED; ?> ." ); <?php } if ($row11->user10_must && $row11->user10_show) { ?> } else if (form.user10.value == "") { alert( "<?php echo $row11->user10_name . ' ' . _UEXT_ISREQUIRED; ?> ." ); <?php } if ($row11->user11_must && $row11->user11_show) { ?> } else if (form.user11.value == "") { alert( "<?php echo $row11->user11_name . ' ' . _UEXT_ISREQUIRED; ?> ." ); <?php } if ($row11->user12_must && $row11->user12_show) { ?> } else if (form.user12.value == "") { alert( "<?php echo $row11->user12_name . ' ' . _UEXT_ISREQUIRED; ?> ." ); <?php } if ($row11->user13_must && $row11->user13_show) { ?> } else if (form.user13.value == "") { alert( "<?php echo $row11->user13_name . ' ' . _UEXT_ISREQUIRED; ?> ." ); <?php } if ($row11->user14_must && $row11->user14_show) { ?> } else if (form.user14.value == "") { alert( "<?php echo $row11->user14_name . ' ' . _UEXT_ISREQUIRED; ?> ." ); <?php } if ($row11->user15_must && $row11->user15_show) { ?> } else if (form.user15.value == "") { alert( "<?php echo $row11->user15_name . ' ' . _UEXT_ISREQUIRED; ?> ." ); <?php } ?> } else { form.submit(); } } </script> <form action="index.php" method="post" name="EditUser"> <table cellpadding="5" cellspacing="0" border="0" width="100%"> <tr> <td class="componentheading" colspan="5"><?php echo _EDIT_TITLE; ?> </td> </tr> <tr> <td width=85><?php echo _YOUR_NAME; ?> </td> <td><input class="inputbox" type="text" name="name" value="<?php echo $row->name; ?> " /></td> </tr> <tr> <td><?php echo _EMAIL; ?> </td> <td><input class="inputbox" type="text" name="email" value="<?php echo $row->email; ?> " size="30" /></td> <tr> <td><?php echo _UNAME; ?> </td> <td><input class="inputbox" type="text" name="username" value="<?php echo $row->username; ?> " /></td> </tr> <tr> <td><?php echo _PASS; ?> </td> <td><input class="inputbox" type="password" name="password" value="" /></td> </tr> <tr> <td><?php echo _VPASS; ?> </td> <td><input class="inputbox" type="password" name="verifyPass" /></td> </tr> <tr> <td colspan="2" class="componentheading"><?php echo _UEXT_DETAILS; ?> </td> </tr> <?php //Extended User details form. global $database; global $mosConfig_lang, $mosConfig_mbf_content; // neu mambelfish include_once "administrator/components/com_user_extended/user_extended.class.php"; $rowExtended = new mosUser_Extended_Config($database); $rowExtended->load('1'); $rowExUser = new mosUser_Extended($database); $rowExUser->load($row->id); ?> <?php if ($rowExtended->user1_show == "1") { ?> <tr> <td> <?php echo $rowExtended->user1_name; // original /* $rowExtended->user1_name; // $category->load( $id ); // muster $rowExtended = MambelFish::translate( $rowExtended, 'categories', $mosConfig_lang); echo $rowExtended.' testmic'; */ ?> </td> <td><input name="user1" type="text" class="inputbox" size="<?php echo $rowExtended->user1_size; ?> " maxlength="<?php echo $rowExtended->user1_size; ?> " value="<?php echo $rowExUser->user1; ?> "> <span class="error"><?php if ($rowExtended->user1_must == "1") { echo _UEXT_REQUIRED; } ?> </span></td> </tr> <?php } if ($rowExtended->user2_show == "1") { ?> <tr> <td><?php echo $rowExtended->user2_name; ?> </td> <td><input name="user2" type="text" class="inputbox" size="<?php echo $rowExtended->user2_size; ?> " maxlength="<?php echo $rowExtended->user2_size; ?> " value="<?php echo $rowExUser->user2; ?> "> <span class="error"><?php if ($rowExtended->user2_must == "1") { echo _UEXT_REQUIRED; } ?> </span></td> </tr> <?php } if ($rowExtended->user3_show == "1") { ?> <tr> <td><?php echo $rowExtended->user3_name; ?> </td> <td><input name="user3" type="text" class="inputbox" size="<?php echo $rowExtended->user3_size; ?> " maxlength="<?php echo $rowExtended->user3_size; ?> " value="<?php echo $rowExUser->user3; ?> "> <span class="error"><?php if ($rowExtended->user3_must == "1") { echo _UEXT_REQUIRED; } ?> </span></td> </tr> <?php } ?> <?php if ($rowExtended->user4_show == "1") { ?> <tr> <td><?php echo $rowExtended->user4_name; ?> </td> <td><input name="user4" type="text" class="inputbox" size="<?php echo $rowExtended->user4_size; ?> " maxlength="<?php echo $rowExtended->user4_size; ?> " value="<?php echo $rowExUser->user4; ?> "> <span class="error"><?php if ($rowExtended->user4_must == "1") { echo _UEXT_REQUIRED; } ?> </span></td> </tr> <?php } ?> <?php if ($rowExtended->user5_show == "1") { ?> <tr> <td><?php echo $rowExtended->user5_name; ?> </td> <td><input name="user5" type="text" class="inputbox" size="<?php echo $rowExtended->user5_size; ?> " maxlength="<?php echo $rowExtended->user5_size; ?> " value="<?php echo $rowExUser->user5; ?> "> <span class="error"><?php if ($rowExtended->user5_must == "1") { echo _UEXT_REQUIRED; } ?> </span></td> </tr> <?php } ?> <?php if ($rowExtended->user6_show == "1") { ?> <tr> <td><?php echo $rowExtended->user6_name; ?> </td> <td><input name="user6" type="text" class="inputbox" size="<?php echo $rowExtended->user6_size; ?> " maxlength="<?php echo $rowExtended->user6_size; ?> " value="<?php echo $rowExUser->user6; ?> "> <span class="error"><?php if ($rowExtended->user6_must == "1") { echo _UEXT_REQUIRED; } ?> </span></td> </tr> <?php } ?> <?php if ($rowExtended->user7_show == "1") { ?> <tr> <td><?php echo $rowExtended->user7_name; ?> </td> <td><input name="user7" type="text" class="inputbox" size="<?php echo $rowExtended->user7_size; ?> " maxlength="<?php echo $rowExtended->user7_size; ?> " value="<?php echo $rowExUser->user7; ?> "> <span class="error"><?php if ($rowExtended->user7_must == "1") { echo _UEXT_REQUIRED; } ?> </span></td> </tr> <?php } ?> <?php if ($rowExtended->user8_show == "1") { ?> <tr> <td><?php echo $rowExtended->user8_name; ?> </td> <td><input name="user8" type="text" class="inputbox" size="<?php echo $rowExtended->user8_size; ?> " maxlength="<?php echo $rowExtended->user8_size; ?> " value="<?php echo $rowExUser->user8; ?> "> <span class="error"><?php if ($rowExtended->user8_must == "1") { echo _UEXT_REQUIRED; } ?> </span></td> </tr> <?php } ?> <?php if ($rowExtended->user9_show == "1") { ?> <tr> <td><?php echo $rowExtended->user9_name; ?> </td> <td><input name="user9" type="text" class="inputbox" size="<?php echo $rowExtended->user9_size; ?> " maxlength="<?php echo $rowExtended->user9_size; ?> " value="<?php echo $rowExUser->user9; ?> "> <span class="error"><?php if ($rowExtended->user9_must == "1") { echo _UEXT_REQUIRED; } ?> </span></td> </tr> <?php } ?> <?php if ($rowExtended->user10_show == "1") { ?> <tr> <td><?php echo $rowExtended->user10_name; ?> </td> <td><input name="user10" type="text" class="inputbox" size="<?php echo $rowExtended->user10_size; ?> " maxlength="<?php echo $rowExtended->user10_size; ?> " value="<?php echo $rowExUser->user10; ?> "> <span class="error"><?php if ($rowExtended->user10_must == "1") { echo _UEXT_REQUIRED; } ?> </span></td> </tr> <?php } ?> <?php if ($rowExtended->user11_show == "1") { ?> <tr> <td><?php echo $rowExtended->user11_name; ?> </td> <td><input name="user11" type="text" class="inputbox" size="<?php echo $rowExtended->user11_size; ?> " maxlength="<?php echo $rowExtended->user11_size; ?> " value="<?php echo $rowExUser->user11; ?> "> <span class="error"><?php if ($rowExtended->user11_must == "1") { echo _UEXT_REQUIRED; } ?> </span></td> </tr> <?php } ?> <?php if ($rowExtended->user12_show == "1") { ?> <tr> <td><?php echo $rowExtended->user12_name; ?> </td> <td><input name="user12" type="text" class="inputbox" size="<?php echo $rowExtended->user12_size; ?> " maxlength="<?php echo $rowExtended->user12_size; ?> " value="<?php echo $rowExUser->user12; ?> "> <span class="error"><?php if ($rowExtended->user12_must == "1") { echo _UEXT_REQUIRED; } ?> </span></td> </tr> <?php } ?> <?php if ($rowExtended->user13_show == "1") { ?> <tr> <td><?php echo $rowExtended->user13_name; ?> </td> <td><input name="user13" type="text" class="inputbox" size="<?php echo $rowExtended->user13_size; ?> " maxlength="<?php echo $rowExtended->user13_size; ?> " value="<?php echo $rowExUser->user13; ?> "> <span class="error"><?php if ($rowExtended->user13_must == "1") { echo _UEXT_REQUIRED; } ?> </span></td> </tr> <?php } ?> <?php if ($rowExtended->user14_show == "1") { ?> <tr> <td><?php echo $rowExtended->user14_name; ?> </td> <td><input name="user14" type="text" class="inputbox" size="<?php echo $rowExtended->user14_size; ?> " maxlength="<?php echo $rowExtended->user14_size; ?> " value="<?php echo $rowExUser->user14; ?> "> <span class="error"><?php if ($rowExtended->user14_must == "1") { echo _UEXT_REQUIRED; } ?> </span></td> </tr> <?php } ?> <?php if ($rowExtended->user15_show == "1") { ?> <tr> <td><?php echo $rowExtended->user15_name; ?> </td> <td><input name="user15" type="text" class="inputbox" size="<?php echo $rowExtended->user15_size; ?> " maxlength="<?php echo $rowExtended->user15_size; ?> " value="<?php echo $rowExUser->user15; ?> "> <span class="error"><?php if ($rowExtended->user15_must == "1") { echo _UEXT_REQUIRED; } ?> </span></td> </tr> <?php } ?> <tr> <td colspan="2"> <input class="button" type="button" value="<?php echo $submitvalue; ?> " onclick="submitbutton()"/> </td> </tr> </table> <input type="hidden" name="id" value="<?php echo $row->id; ?> " /> <input type="hidden" name="option" value="<?php echo $option; ?> "> <input type="hidden" name="task" value="saveUserEdit" /> </form> <?php }