Changeset 4267
- Timestamp:
- Sun Jan 1 16:19:53 2006
- Files:
-
- trunk/campsite/implementation/management/priv/lang/ro/users.php (modified) (diff)
- trunk/campsite/implementation/management/priv/lang/zh/users.php (modified) (diff)
- trunk/campsite/implementation/management/priv/lang/ar/users.php (modified) (diff)
- trunk/campsite/implementation/management/priv/lang/en/users.php (modified) (diff)
- trunk/campsite/implementation/management/priv/lang/pt/users.php (modified) (diff)
- trunk/campsite/implementation/management/priv/lang/ru/users.php (modified) (diff)
- trunk/campsite/implementation/management/priv/lang/es/users.php (modified) (diff)
- trunk/campsite/implementation/management/priv/lang/fr/users.php (modified) (diff)
- trunk/campsite/implementation/management/priv/lang/de/users.php (modified) (diff)
- trunk/campsite/implementation/management/priv/lang/hr/users.php (modified) (diff)
- trunk/campsite/implementation/management/priv/lang/cz/users.php (modified) (diff)
- trunk/campsite/implementation/management/priv/localizer/LocalizerFileFormat.php (modified) (diff)
- trunk/campsite/implementation/management/priv/users/users_common.php (modified) (diff)
- trunk/campsite/implementation/management/priv/users/index.php (modified) (diff)
- trunk/campsite/implementation/management/css/clear.png (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
trunk/campsite/implementation/management/priv/lang/ro/users.php
r4204 r4267 1 1 <?php 2 regGS("Reset search form", ""); 2 3 regGS("That user name already exists, please choose a different login name.", ""); 3 4 regGS("User may delete article attachments", ""); -
trunk/campsite/implementation/management/priv/lang/zh/users.php
r4204 r4267 1 1 <?php 2 regGS("Reset search form", ""); 2 3 regGS("That user name already exists, please choose a different login name.", ""); 3 4 regGS("User may delete article attachments", ""); -
trunk/campsite/implementation/management/priv/lang/ar/users.php
r4204 r4267 1 1 <?php 2 regGS("Reset search form", ""); 2 3 regGS("That user name already exists, please choose a different login name.", ""); 3 4 regGS("User may delete article attachments", ""); 4 5 regGS("User may change article attachments", ""); 5 6 regGS("User may add article attachments", ""); 6 regGS("User management", "إدارة المستخدم"); 7 regGS("Set", "مجموعة"); 8 regGS("Update", "تحديث"); 9 regGS("Rights", "حقوق"); 10 regGS("IP Access", "الدخول إلى بروتوكول الإنترنت"); 11 regGS("User Name", "إسم المستخدم"); 7 regGS("Staff management", ""); 8 regGS("Subscriber management", ""); 9 regGS("Account Name", ""); 12 10 regGS("Full Name", "الإسم الكامل"); 13 regGS("Staff", "موظف");14 11 regGS("Delete user $1", " $1 إلغاء المستخدم"); 12 regGS("User list is empty.", ""); 15 13 regGS("You do not have the right to create user accounts.", "لا يحق لك وضع اشتراكات للمستخدم"); 16 14 regGS("Title", "الوظيفة"); … … 42 40 regGS("Media", "إعلام"); 43 41 regGS("Position", "مركز الوظيفة"); 44 regGS("Adding new user account", "إضافة اشتراك لمستخدم جديد"); 42 regGS("Show more user details", ""); 43 regGS("Hide user details", ""); 45 44 regGS("You must select a $1", " $1عليك الاختيار "); 46 45 regGS("The password must be at least 6 characters long and both passwords should match.", "يجب أن تتألف كلمة السر من 6 أحرف على الأقل. كما يجب أن تكون كلمتا السر متشابهتين"); 46 regGS("The user account could not be created.", "لا يمكن وضع اشتراك للمستخدم"); 47 regGS("User account $1 was created successfully.", ""); 48 regGS("Click here to change password", ""); 49 regGS("Old Password", ""); 50 regGS("You do not have the right to change user account permissions.", "لا يحق لك تغيير الاذن لاشتراك المستخدم"); 51 regGS("Permissions for $1 changed", " $1 تغيير السماح ل "); 52 regGS("You do not have the right to change user account information.", "لا يحق لك تغيير معلومات اشتراك المستخدم"); 53 regGS("Click here to customize user permissions", ""); 54 regGS("Click here to use existing user type permissions (discard customization)", ""); 55 regGS("Click here to leave password unchanged", ""); 56 regGS("User account information changed for $1", "معلومات اشتراك المستخدم ل $1"); 57 regGS("The password you typed is incorrect.", "كلمة السر التي طبعتها غير صحيحة"); 58 regGS("You do not have the right to delete user accounts.", "لا يحق لك إلغاء اشتراكات المستخدم"); 59 regGS("Are you sure you want to delete the user account $1 ?", " هل أنت متأكد من أنك تريد إلغاء اشتراك المستخدم $1 ؟"); 60 regGS("User account $1 was deleted successfully.", ""); 61 regGS("User IP access list management", "إدارة قائمة دخول المستخدم إلى بروتوكول الإنترنت"); 62 regGS("No records.", "لا بيانات"); 63 regGS("Start IP", "ابدأ بروتوكول الإنترنت"); 64 regGS("Number of addresses", "عدد العناوين"); 65 regGS("The IP Group $1 has been created.", "وضع مجموعة بروتوكول الإنترنت $1"); 66 regGS("There was an error creating the IP address group.", ""); 67 regGS("Are you sure you want to delete the IP Group $1?", " هل أنت متأكد من أنك تريد إلغاء مجموعة بروتوكول الإنترنت $1؟"); 68 regGS("The IP address group $1 has been deleted.", "تم الغاء مجموعة عنوان بروتوكول الإنترنت $1"); 69 regGS("User '$1' information was changed successfully.", ""); 70 regGS("IP address", ""); 71 regGS("fill in from left to right at least one input box", ""); 72 regGS("User Type", ""); 73 regGS("You must input a valid EMail address.", ""); 74 regGS("The confirm password must be at least 6 characters long and both passwords should match.", ""); 75 regGS("You must input a number between 0 and 255 into the Start IP address' $1 field.", ""); 76 regGS("Delete subscriptions to $1", ""); 77 regGS("Change user account information", "غيّر معلومات اشتراك المستخدم"); 78 regGS("The IP address group $1:$2 conflicts with another existing group.", ""); 79 regGS("Creation Date", ""); 80 regGS("User management", "إدارة المستخدم"); 81 regGS("Set", "مجموعة"); 82 regGS("Update", "تحديث"); 83 regGS("Rights", "حقوق"); 84 regGS("IP Access", "الدخول إلى بروتوكول الإنترنت"); 85 regGS("User Name", "إسم المستخدم"); 86 regGS("Staff", "موظف"); 87 regGS("Adding new user account", "إضافة اشتراك لمستخدم جديد"); 47 88 regGS("You must select an user type.", "يجب إختيار نوع المستخدم"); 48 89 regGS("The user account $1 has been created.", " $1 تم وضع اشتراك للمستخدم"); 49 regGS("The user account could not be created.", "لا يمكن وضع اشتراك للمستخدم");50 90 regGS("Please check if an account with the same user name does not already exist.", "الرجاء التأكد من أن اشتراكاّ باسم هذا المستخدم غير موجود مسبقاً"); 51 91 regGS("Change password", "تغيير كلمة سرّ المستخدم"); 57 97 regGS("User may add/change country entries", "يمكن للمستخدم إضافة بيانات البلدان أم تغييرها"); 58 98 regGS("Edit user account permissions", "السماح لاشتراك المستخدم"); 59 regGS("You do not have the right to change user account permissions.", "لا يحق لك تغيير الاذن لاشتراك المستخدم");60 99 regGS("This user account does not have permissions information.", "ليس لدى اشتراك المستخدم المعلومات الاذن "); 61 100 regGS("Updating user account permissions", "تحديث الاذن لاشتراك المستخدم"); 62 regGS("Permissions for $1 changed", " $1 تغيير السماح ل ");63 101 regGS("User account permissions have been successfuly updated.", "لقد تم تحديث الاذن لاشتراك المستخدم "); 64 102 regGS("User account permissions could not be updated.", "لا يمكن تغيير الاذن لاشتراك المستخدم"); 65 regGS("Change user account information", "غيّر معلومات اشتراك المستخدم");66 regGS("You do not have the right to change user account information.", "لا يحق لك تغيير معلومات اشتراك المستخدم");67 103 regGS("Changing user account information", "تغيير معلومات اشتراك المستخدم"); 68 104 regGS("User account information has been changed.", "تم تغيير معلومات اشتراك المستخدم"); 69 105 regGS("User account information could not be changed.", "لا يمكن تغيير معلومات اشتراك المستخدم"); 70 regGS("User account information changed for $1", "معلومات اشتراك المستخدم ل $1");71 106 regGS("Old password", "كلمة السر القديمة"); 72 107 regGS("New password", "كلمة السر الجديدة"); 73 108 regGS("Confirm new password", "تأكيد كلمة السر الجديدة"); 74 109 regGS("Changing your password", "تغيير كلمة السر الخاصة بك"); 75 regGS("The password you typed is incorrect.", "كلمة السر التي طبعتها غير صحيحة");76 110 regGS("User $1 changed his password", "بدّل المستخدم 1$ كلمة السر الخاصة به"); 77 111 regGS("Delete user account", "الغاء اشتراك المستخدم"); 78 regGS("You do not have the right to delete user accounts.", "لا يحق لك إلغاء اشتراكات المستخدم");79 regGS("Are you sure you want to delete the user account $1 ?", " هل أنت متأكد من أنك تريد إلغاء اشتراك المستخدم $1 ؟");80 112 regGS("Deleting user account", "الغاء اشتراك المستخدم"); 81 113 regGS("The user account $1 could not be deleted.", "لا يمكن إلغاء اشتراك المستخدم $1"); 82 114 regGS("No such user.", "هذا المستخدم غير موجود"); 83 regGS("User IP access list management", "إدارة قائمة دخول المستخدم إلى بروتوكول الإنترنت");84 regGS("No records.", "لا بيانات");85 115 regGS("Delete IP Group $1", "الغاء مجموعة بروتوكول الإنترنت $1"); 86 regGS("Start IP", "ابدأ بروتوكول الإنترنت");87 regGS("Number of addresses", "عدد العناوين");88 116 regGS("IP Access List", "قائمة الدخول إلى بروتوكول الإنترنت"); 89 117 regGS("Adding new IP Group", "إضافة مجموعة جديدة من بروتوكول الإنترنت"); 90 regGS("The IP Group $1 has been created.", "وضع مجموعة بروتوكول الإنترنت $1");91 118 regGS("The IP Group could not be created.", "لا يمكن وضع مجموعة بروتوكول الإنترنت "); 92 119 regGS("Please check if an account with the same IP Group does not already exist.", " الرجاء التأكد من عدم وجود اشتراك يتضمن مجموعة بروتوكول الإنترنت نفسها"); 93 120 regGS("Delete IP Group", " إلغ مجموعة بروتوكول الإنترنت"); 94 121 regGS("You do not have the right to delete IP Groups.", "لا يحق لك إلغاء مجموعات بروتوكول الإنترنت"); 95 regGS("Are you sure you want to delete the IP Group $1?", " هل أنت متأكد من أنك تريد إلغاء مجموعة بروتوكول الإنترنت $1؟");96 122 regGS("No such IP Group.", "ليس هناك مجموعة مماثلة من بروتوكول الإنترنت"); 97 123 regGS("Deleting IP Group", " الغاء مجموعة بروتوكول الإنترنت"); 98 regGS("The IP address group $1 has been deleted.", "تم الغاء مجموعة عنوان بروتوكول الإنترنت $1");99 124 regGS("The IP Group could not be deleted.", "لا يمكن إلغاء مجموعة بروتوكول الإنترنت"); 100 125 regGS("No IP Group.", "لا يوجد مجموعة بروتوكول الإنترنت"); -
trunk/campsite/implementation/management/priv/lang/en/users.php
r4204 r4267 1 1 <?php 2 regGS("Reset search form", "Reset search form"); 2 3 regGS("That user name already exists, please choose a different login name.", "That user name already exists, please choose a different login name."); 3 4 regGS("User may delete article attachments", "User may delete article attachments"); -
trunk/campsite/implementation/management/priv/lang/pt/users.php
r4204 r4267 1 1 <?php 2 regGS("Reset search form", ""); 2 3 regGS("That user name already exists, please choose a different login name.", ""); 3 4 regGS("User may delete article attachments", ""); -
trunk/campsite/implementation/management/priv/lang/ru/users.php
r4204 r4267 1 1 <?php 2 regGS("Reset search form", ""); 2 3 regGS("That user name already exists, please choose a different login name.", ""); 3 4 regGS("User may delete article attachments", ""); -
trunk/campsite/implementation/management/priv/lang/es/users.php
r4204 r4267 1 1 <?php 2 regGS("Reset search form", ""); 2 3 regGS("That user name already exists, please choose a different login name.", ""); 3 4 regGS("User may delete article attachments", ""); -
trunk/campsite/implementation/management/priv/lang/fr/users.php
r4204 r4267 1 1 <?php 2 regGS("Reset search form", ""); 2 3 regGS("That user name already exists, please choose a different login name.", ""); 3 4 regGS("User may delete article attachments", ""); -
trunk/campsite/implementation/management/priv/lang/de/users.php
r4204 r4267 1 1 <?php 2 regGS("Reset search form", ""); 2 3 regGS("That user name already exists, please choose a different login name.", ""); 3 4 regGS("User may delete article attachments", ""); -
trunk/campsite/implementation/management/priv/lang/hr/users.php
r4204 r4267 1 1 <?php 2 regGS("Reset search form", ""); 2 3 regGS("That user name already exists, please choose a different login name.", ""); 3 4 regGS("User may delete article attachments", ""); -
trunk/campsite/implementation/management/priv/lang/cz/users.php
r4204 r4267 1 1 <?php 2 regGS("Reset search form", ""); 2 3 regGS("That user name already exists, please choose a different login name.", ""); 3 4 regGS("User may delete article attachments", ""); -
trunk/campsite/implementation/management/priv/localizer/LocalizerFileFormat.php
r4054 r4267 86 86 // write data to file 87 87 if (PEAR::isError(File::write($filePath, $data, FILE_MODE_WRITE))) { 88 88 // echo "<br>error writing file<br>"; 88 88 return FALSE; 89 89 } 224 224 // write data to file 225 225 if (PEAR::isError(File::write($filePath, $xml, FILE_MODE_WRITE))) { 226 226 // echo "<br>error writing file<br>"; 226 226 return FALSE; 227 227 } -
trunk/campsite/implementation/management/priv/users/users_common.php
r4219 r4267 23 23 } 24 24 25 $defaultUserSearchParameters = array('full_name'=>'', 'user_name'=>'', 'email'=>'', 26 'subscription_how'=>'expires', 'subscription_when'=>'before', 'subscription_date'=>'', 27 'subscription_status'=>'', 'startIP1'=>'', 'startIP2'=>'', 'startIP3'=>'', 'startIP4'=>''); 28 $userSearchParameters = array('full_name'=>'', 'user_name'=>'', 'email'=>'', 29 'subscription_how'=>'expires', 'subscription_when'=>'before', 'subscription_date'=>'', 30 'subscription_status'=>'', 'startIP1'=>'', 'startIP2'=>'', 'startIP3'=>'', 'startIP4'=>''); 31 25 32 function read_user_common_parameters() 26 33 { 27 global $uType, $userOffs, $lpp, $full_name, $user_name, $email, $subscription_how; 28 global $subscription_when, $subscription_date, $subscription_status, $res, $resMsg; 29 global $startIP1, $startIP2, $startIP3, $startIP4; 34 global $uType, $userOffs, $lpp, $res, $resMsg; 35 global $defaultUserSearchParameters, $userSearchParameters; 30 36 31 37 $uType = Input::Get('uType', 'string', ''); 35 41 } 36 42 $lpp = Input::Get('lpp', 'int', 10); 37 $full_name = camp_session_get('full_name', ''); 38 $user_name = camp_session_get('user_name', ''); 39 $email = camp_session_get('email', ''); 40 if ($uType == "Subscribers") { 41 $subscription_how = camp_session_get('subscription_how', ''); 42 $subscription_when = camp_session_get('subscription_when', ''); 43 $subscription_date = camp_session_get('subscription_date', ''); 44 $subscription_status = camp_session_get('subscription_status', ''); 43 foreach ($userSearchParameters as $parameter=>$defaultValue) { 44 $userSearchParameters[$parameter] = 45 camp_session_get($parameter, $defaultUserSearchParameters[$parameter]); 45 46 } 46 47 $res = Input::Get('res', 'string', 'OK'); 47 48 $resMsg = Input::Get('resMsg', 'string', ''); 48 $startIP1 = camp_session_get('StartIP1', 0); 49 $startIP2 = camp_session_get('StartIP2', 0); 50 $startIP3 = camp_session_get('StartIP3', 0); 51 $startIP4 = camp_session_get('StartIP4', 0); 49 } 50 51 function user_search_is_set() 52 { 53 global $defaultUserSearchParameters, $userSearchParameters; 54 55 foreach ($userSearchParameters as $parameter=>$defaultValue) { 56 if ($userSearchParameters[$parameter] != $defaultUserSearchParameters[$parameter]) { 57 return true; 58 } 59 } 60 return false; 61 } 62 63 function reset_user_search_parameters() 64 { 65 global $userSearchParameters, $_REQUEST, $_GET, $_POST, $_SESSION; 66 67 foreach ($userSearchParameters as $parameter=>$defaultValue) { 68 if (isset($_REQUEST[$parameter])) { 69 unset($_REQUEST[$parameter]); 70 } 71 if (isset($_GET[$parameter])) { 72 unset($_GET[$parameter]); 73 } 74 if (isset($_POST[$parameter])) { 75 unset($_POST[$parameter]); 76 } 77 if (isset($_SESSION[$parameter])) { 78 unset($_SESSION[$parameter]); 79 } 80 } 52 81 } 53 82 -
trunk/campsite/implementation/management/priv/users/index.php
r4181 r4267 6 6 list($access, $User) = check_basic_access($_REQUEST); 7 7 8 if (Input::Get('reset_search', 'string', 'false', true) == 'true') { 9 reset_user_search_parameters(); 10 } 8 11 read_user_common_parameters(); // $uType, $userOffs, $lpp, search parameters 9 12 verify_user_type(); … … 49 52 $addLink = "edit.php?" . get_user_urlparams(0, true, true); 50 53 ?> 51 <td><a href="<?php echo $addLink; ?>"> 54 <td style="padding-left: 20px;" valign="bottom"> 55 <a href="<?php echo $addLink; ?>"> 52 56 <img src="<?php echo $Campsite["ADMIN_IMAGE_BASE_URL"]; ?>/add.png" border="0"> 53 57 <?php … … 59 63 } 60 64 ?> 65 </td> 66 <?php if (user_search_is_set()) { ?> 67 <td style="padding-left: 20px;" valign="bottom"> 68 <a href="?reset_search=true<?php echo get_user_urlparams(0, false, true); ?>"> 69 <img src="<?php echo $Campsite["ADMIN_IMAGE_BASE_URL"]; ?>/clear.png" border="0"> 70 <b><?php putGS("Reset search form"); ?></b> 71 </a> 72 </td> 73 <?php } ?> 61 74 </tr> 62 75 </table> … … 68 81 <tr> 69 82 <td style="padding-left: 10px;"><?php putGS("Full Name"); ?></td> 70 <td><input type="text" name="full_name" value="<?php p(htmlspecialchars($ full_name)); ?>" class="input_text" style="width: 150px;"></td>83 <td><input type="text" name="full_name" value="<?php p(htmlspecialchars($userSearchParameters['full_name'])); ?>" class="input_text" style="width: 150px;"></td> 70 83 <td><?php putGS("Account Name"); ?></td> 71 <td><input type="text" name="user_name" value="<?php p(htmlspecialchars($user _name)); ?>" class="input_text" style="width: 70px;"></td>84 <td><input type="text" name="user_name" value="<?php p(htmlspecialchars($userSearchParameters['user_name'])); ?>" class="input_text" style="width: 70px;"></td> 71 84 <td><?php putGS("E-Mail"); ?></td> 72 <td><input type="text" name="email" value="<?php p(htmlspecialchars($ email)); ?>" class="input_text" style="width: 150px;"></td>85 <td><input type="text" name="email" value="<?php p(htmlspecialchars($userSearchParameters['email'])); ?>" class="input_text" style="width: 150px;"></td> 72 85 <td><input type="submit" name="submit_button" value="<?php putGS("Search"); ?>" class="button"></td> 73 86 </tr> … … 81 94 <select name="subscription_how" class="input_select" style="width: 100px;"> 82 95 <?php 83 camp_html_select_option("expires", $subscription_how, getGS("expires")); 84 camp_html_select_option("starts", $subscription_how, getGS("starts")); 96 camp_html_select_option("expires", $userSearchParameters['subscription_how'], getGS("expires")); 97 camp_html_select_option("starts", $userSearchParameters['subscription_how'], getGS("starts")); 85 98 ?> 86 99 </select> 87 100 <select name="subscription_when" class="input_select" style="width: 100px;"> 88 101 <?PHP 89 camp_html_select_option("before", $subscription_when, getGS("before")); 90 camp_html_select_option("after", $subscription_when, getGS("after")); 91 camp_html_select_option("on", $subscription_when, getGS("on")); 102 camp_html_select_option("before", $userSearchParameters['subscription_when'], getGS("before")); 103 camp_html_select_option("after", $userSearchParameters['subscription_when'], getGS("after")); 104 camp_html_select_option("on", $userSearchParameters['subscription_when'], getGS("on")); 92 105 ?> 93 106 </select> 94 <input type="text" name="subscription_date" value="<?php p(htmlspecialchars($ subscription_date)); ?>" class="input_text" style="width: 100px;">107 <input type="text" name="subscription_date" value="<?php p(htmlspecialchars($userSearchParameters['subscription_date'])); ?>" class="input_text" style="width: 100px;"> 94 107 <?php putGS('(yyyy-mm-dd)'); ?> 95 108 <?php putGS("status"); ?>: … … 98 111 <option value=""></option> 99 112 <?PHP 100 camp_html_select_option("active", $subscription_status, getGS("active")); 101 camp_html_select_option("inactive", $subscription_status, getGS("inactive")); 113 camp_html_select_option("active", $userSearchParameters['subscription_status'], getGS("active")); 114 camp_html_select_option("inactive", $userSearchParameters['subscription_status'], getGS("inactive")); 102 115 ?> 103 116 </select> … … 107 120 <td colspan="11" align="center"> 108 121 <?php putGS("IP address"); ?>: 109 <input type="text" class="input_text" name="StartIP1" size="3" maxlength="3" value="<?php if ($startIP1 != 0) echo $startIP1; ?>">. 110 <input type="text" class="input_text" name="StartIP2" size="3" maxlength="3" value="<?php if ($startIP2 != 0) echo $startIP2; ?>">. 111 <input type="text" class="input_text" name="StartIP3" size="3" maxlength="3" value="<?php if ($startIP3 != 0) echo $startIP3; ?>">. 112 <input type="text" class="input_text" name="StartIP4" size="3" maxlength="3" value="<?php if ($startIP4 != 0) echo $startIP4; ?>"> 122 <input type="text" class="input_text" name="startIP1" size="3" maxlength="3" value="<?php if ($userSearchParameters['startIP1'] != 0) echo $userSearchParameters['startIP1']; ?>">. 123 <input type="text" class="input_text" name="startIP2" size="3" maxlength="3" value="<?php if ($userSearchParameters['startIP2'] != 0) echo $userSearchParameters['startIP2']; ?>">. 124 <input type="text" class="input_text" name="startIP3" size="3" maxlength="3" value="<?php if ($userSearchParameters['startIP3'] != 0) echo $userSearchParameters['startIP3']; ?>">. 125 <input type="text" class="input_text" name="startIP4" size="3" maxlength="3" value="<?php if ($userSearchParameters['startIP4'] != 0) echo $userSearchParameters['startIP4']; ?>"> 113 126 (<?php putGS("fill in from left to right at least one input box"); ?>) 114 127 </td> 115 128 </tr> 116 <?php } ?> 129 <?php } // if ($uType == "Subscribers") ?> 116 129 </form> 117 130 </table> … … 133 146 134 147 <?php 135 $sqlBase = "SELECT u.* FROM Users AS u"; 148 $sqlBase = "SELECT DISTINCT u.* FROM Users AS u"; 135 148 $sql = ''; 136 if ($ startIP1!= 0) {149 if ($userSearchParameters['startIP1'] != 0) { 136 149 $sql .= " LEFT JOIN SubsByIP AS sip ON u.Id = sip.IdUser"; 137 150 } 138 if ($subscription_date != "" || $subscription_status != "") { 151 if ($userSearchParameters['subscription_date'] != "" 152 || $userSearchParameters['subscription_status'] != "") { 139 153 $sql .= " LEFT JOIN Subscriptions AS s ON u.Id = s.IdUser"; 140 if ($ subscription_date!= "") {154 if ($userSearchParameters['subscription_date'] != "") { 140 154 $sql .= " LEFT JOIN SubsSections AS ss ON s.Id = ss.IdSubscription"; 141 155 } 142 156 } 143 157 $sql .= " WHERE u.Reader = '$isReader'"; 144 if ($full_name != '') { 145 $sql .= " AND Name like '%" . mysql_escape_string($full_name) . "%'"; 158 if ($userSearchParameters['full_name'] != '') { 159 $sql .= " AND Name like '%" . mysql_escape_string($userSearchParameters['full_name']) . "%'"; 146 160 } 147 if ($user_name != '') { 148 $sql .= " AND UName like '%" . mysql_escape_string($user_name) . "%'"; 161 if ($userSearchParameters['user_name'] != '') { 162 $sql .= " AND UName like '%" . mysql_escape_string($userSearchParameters['user_name']) . "%'"; 149 163 } 150 if ($email != '') { 151 $sql .= " AND EMail like '%" . mysql_escape_string($email) . "%'"; 164 if ($userSearchParameters['email'] != '') { 165 $sql .= " AND EMail like '%" . mysql_escape_string($userSearchParameters['email']) . "%'"; 152 166 } 153 if ($subscription_date != '') { 154 $ss_field = "TO_DAYS(ss.StartDate) - TO_DAYS('$subscription_date')"; 155 if ($subscription_how == 'expires') { 156 $ss_field .= " + Days"; 167 if ($userSearchParameters['subscription_date'] != '') { 168 $ss_field = "TO_DAYS(ss.StartDate) - TO_DAYS('".$userSearchParameters['subscription_date']."')"; 169 if ($userSearchParameters['subscription_how'] == 'expires') { 170 $ss_field .= " + CAST(Days AS SIGNED)"; 157 171 } 158 switch ($ subscription_when) {172 switch ($userSearchParameters['subscription_when']) { 158 172 case 'before': $comp_sign = "<="; break; 159 173 case 'after': $comp_sign = ">="; break; … … 166 180 $sql .= " AND ($ss_field) $comp_sign 0"; 167 181 } 168 if ($subscription_status != "") { 169 $sql .= " AND s.Active = '" . ($subscription_status == 'active' ? 'Y' : 'N') . "'"; 182 if ($userSearchParameters['subscription_status'] != "") { 183 $sql .= " AND s.Active = '" . ($userSearchParameters['subscription_status'] == 'active' ? 'Y' : 'N') . "'"; 170 184 } 171 if ($startIP1 != 0) { 172 $minIP = $startIP1 * 256 * 256 * 256 + $startIP2 * 256 * 256 + $startIP3 * 256 + $startIP4; 173 $maxIP2 = $startIP2 != 0 ? $startIP2 : 255; 174 $maxIP3 = $startIP3 != 0 ? $startIP3 : 255; 175 $maxIP4 = $startIP4 != 0 ? $startIP4 : 255; 176 $maxIP = $startIP1 * 256 * 256 * 256 + $maxIP2 * 256 * 256 + $maxIP3 * 256 + $maxIP4; 185 if ($userSearchParameters['startIP1'] != 0) { 186 $minIP = $userSearchParameters['startIP1'] * 256 * 256 * 256 187 + $userSearchParameters['startIP2'] * 256 * 256 188 + $userSearchParameters['startIP3'] * 256 189 + $userSearchParameters['startIP4']; 190 $maxIP2 = $userSearchParameters['startIP2'] != 0 ? $userSearchParameters['startIP2'] : 255; 191 $maxIP3 = $userSearchParameters['startIP3'] != 0 ? $userSearchParameters['startIP3'] : 255; 192 $maxIP4 = $userSearchParameters['startIP4'] != 0 ? $userSearchParameters['startIP4'] : 255; 193 $maxIP = $userSearchParameters['startIP1'] * 256 * 256 * 256 + $maxIP2 * 256 * 256 + $maxIP3 * 256 + $maxIP4; 177 194 $sql .= " AND ((sip.StartIP >= $minIP AND sip.StartIP <= $maxIP)" 178 195 . " OR ((sip.StartIP - 1 + sip.Addresses) >= $minIP AND (sip.StartIP - 1 + sip.Addresses) <= $maxIP))"; 179 196 } 180 if ($ subscription_date!= "") {197 if ($userSearchParameters['subscription_date'] != "") { 180 197 $sql .= " GROUP BY s.Id"; 181 198 } … … 250 267 echo "</a>"; 251 268 } 252 $old_user_name = $user_name;253 $user_name = $row['UName'];254 269 ?> 255 270 </td> 256 <td><?php echo htmlspecialchars($user_name); ?></TD> 257 <?php 258 $user_name = $old_user_name; 259 $old_email = $email; 260 $email = $row['EMail']; 261 ?> 262 <td><?php echo htmlspecialchars($email); ?></td> 263 271 <td><?php echo htmlspecialchars($row['UName']); ?></TD> 272 <td><?php echo htmlspecialchars($row['EMail']); ?></td> 264 273 <?php if ($uType == "Subscribers" && $User->hasPermission("ManageSubscriptions")) { ?> 265 274 <td><a href="<?php echo "/$ADMIN/users/subscriptions/?f_user_id=$userId"; ?>"> … … 267 276 </td> 268 277 <?php } ?> 269 270 278 <td><?php if ($userType !== false) { echo $userType->getName(); } ?></td> 271 272 279 <td> 273 280 <?php 281 288 </td> 282 289 <?php 283 $email = $old_email;284 290 if ($canDelete) { ?> 285 291 <td align="center">