@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | * @author Taiwen Jiang <[email protected]> |
23 | 23 | */ |
24 | 24 | |
25 | -include __DIR__ . '/header.php'; |
|
25 | +include __DIR__.'/header.php'; |
|
26 | 26 | $xoops = Xoops::getInstance(); |
27 | 27 | |
28 | 28 | $xoops->header(); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | } else { |
44 | 44 | if ($thisuser->getVar('level') > 0) { |
45 | 45 | $xoops->redirect( |
46 | - $xoops->url('modules/' . $xoops->module->getVar('dirname', 'n'). '/index.php'), |
|
46 | + $xoops->url('modules/'.$xoops->module->getVar('dirname', 'n').'/index.php'), |
|
47 | 47 | 5, |
48 | 48 | XoopsLocale::E_SELECTED_ACCOUNT_IS_ALREADY_ACTIVATED, |
49 | 49 | false |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $xoopsMailer->setTemplate('activated.tpl'); |
59 | 59 | $xoopsMailer->assign('SITENAME', $xoops->getConfig('sitename')); |
60 | 60 | $xoopsMailer->assign('ADMINMAIL', $xoops->getConfig('adminmail')); |
61 | - $xoopsMailer->assign('SITEURL', \XoopsBaseConfig::get('url') . "/"); |
|
61 | + $xoopsMailer->assign('SITEURL', \XoopsBaseConfig::get('url')."/"); |
|
62 | 62 | $xoopsMailer->setToUsers($thisuser); |
63 | 63 | $xoopsMailer->setFromEmail($xoops->getConfig('adminmail')); |
64 | 64 | $xoopsMailer->setFromName($xoops->getConfig('sitename')); |
@@ -69,12 +69,12 @@ discard block |
||
69 | 69 | } else { |
70 | 70 | printf(XoopsLocale::SF_NOTIFICATION_EMAIL_SENT_TO, $thisuser->getVar('uname')); |
71 | 71 | } |
72 | - include __DIR__ . '/footer.php'; |
|
72 | + include __DIR__.'/footer.php'; |
|
73 | 73 | } else { |
74 | 74 | $xoops->redirect( |
75 | - $xoops->url('modules/' . $xoops->module->getVar('dirname', 'n') . '/user.php'), |
|
75 | + $xoops->url('modules/'.$xoops->module->getVar('dirname', 'n').'/user.php'), |
|
76 | 76 | 5, |
77 | - XoopsLocale::S_YOUR_ACCOUNT_ACTIVATED . ' ' . XoopsLocale::LOGIN_WITH_REGISTERED_PASSWORD, |
|
77 | + XoopsLocale::S_YOUR_ACCOUNT_ACTIVATED.' '.XoopsLocale::LOGIN_WITH_REGISTERED_PASSWORD, |
|
78 | 78 | false |
79 | 79 | ); |
80 | 80 | } |
@@ -101,15 +101,15 @@ discard block |
||
101 | 101 | $xoopsMailer->setTemplate('register.tpl'); |
102 | 102 | $xoopsMailer->assign('SITENAME', $xoops->getConfig('sitename')); |
103 | 103 | $xoopsMailer->assign('ADMINMAIL', $xoops->getConfig('adminmail')); |
104 | - $xoopsMailer->assign('SITEURL', \XoopsBaseConfig::get('url') . "/"); |
|
104 | + $xoopsMailer->assign('SITEURL', \XoopsBaseConfig::get('url')."/"); |
|
105 | 105 | $xoopsMailer->setToUsers($getuser[0]); |
106 | 106 | $xoopsMailer->setFromEmail($xoops->getConfig('adminmail')); |
107 | 107 | $xoopsMailer->setFromName($xoops->getConfig('sitename')); |
108 | 108 | $xoopsMailer->setSubject(sprintf(XoopsLocale::F_USER_ACTIVATION_KEY_FOR, $getuser->getVar('uname'))); |
109 | 109 | if (!$xoopsMailer->send()) { |
110 | - echo XoopsLocale::S_YOU_ARE_NOW_REGISTERED . ' ' . XoopsLocale::EMAIL_HAS_NOT_BEEN_SENT_WITH_ACTIVATION_KEY; |
|
110 | + echo XoopsLocale::S_YOU_ARE_NOW_REGISTERED.' '.XoopsLocale::EMAIL_HAS_NOT_BEEN_SENT_WITH_ACTIVATION_KEY; |
|
111 | 111 | } else { |
112 | - echo XoopsLocale::S_YOU_ARE_NOW_REGISTERED . ' ' . XoopsLocale::EMAIL_HAS_BEEN_SENT_WITH_ACTIVATION_KEY; |
|
112 | + echo XoopsLocale::S_YOU_ARE_NOW_REGISTERED.' '.XoopsLocale::EMAIL_HAS_BEEN_SENT_WITH_ACTIVATION_KEY; |
|
113 | 113 | } |
114 | 114 | } else { |
115 | 115 | $form = new Xoops\Form\ThemeForm('', 'form', 'activate.php'); |
@@ -120,4 +120,4 @@ discard block |
||
120 | 120 | |
121 | 121 | $xoops->registry()->get('profile_breadcrumbs')->addItem(new Link(['caption' => _PROFILE_MA_REGISTER])); |
122 | 122 | |
123 | -include __DIR__ . '/footer.php'; |
|
123 | +include __DIR__.'/footer.php'; |
@@ -30,23 +30,23 @@ discard block |
||
30 | 30 | $xoops = Xoops::getInstance(); |
31 | 31 | |
32 | 32 | if ($oldversion < 162) { |
33 | - $xoopsDB->queryF("UPDATE `" . $xoopsDB->prefix("profile_field") . " SET field_valuetype=2 WHERE field_name=umode"); |
|
33 | + $xoopsDB->queryF("UPDATE `".$xoopsDB->prefix("profile_field")." SET field_valuetype=2 WHERE field_name=umode"); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | if ($oldversion < 100) { |
37 | 37 | |
38 | 38 | // Drop old category table |
39 | - $sql = "DROP TABLE " . $xoopsDB->prefix("profile_category"); |
|
39 | + $sql = "DROP TABLE ".$xoopsDB->prefix("profile_category"); |
|
40 | 40 | $xoopsDB->queryF($sql); |
41 | 41 | |
42 | 42 | // Drop old field-category link table |
43 | - $sql = "DROP TABLE " . $xoopsDB->prefix("profile_fieldcategory"); |
|
43 | + $sql = "DROP TABLE ".$xoopsDB->prefix("profile_fieldcategory"); |
|
44 | 44 | $xoopsDB->queryF($sql); |
45 | 45 | |
46 | 46 | // Create new tables for new profile module |
47 | - $xoopsDB->queryFromFile(\XoopsBaseConfig::get('root-path') . "/modules/" . $module->getVar('dirname', 'n') . "/sql/mysql.sql"); |
|
47 | + $xoopsDB->queryFromFile(\XoopsBaseConfig::get('root-path')."/modules/".$module->getVar('dirname', 'n')."/sql/mysql.sql"); |
|
48 | 48 | |
49 | - include_once __DIR__ . "/install.php"; |
|
49 | + include_once __DIR__."/install.php"; |
|
50 | 50 | xoops_module_install_profile($module); |
51 | 51 | $goupperm_handler = $xoops->getHandlerGroupPermission(); |
52 | 52 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $skip_fields = $field_handler->getUserVars(); |
56 | 56 | $skip_fields[] = 'newemail'; |
57 | 57 | $skip_fields[] = 'pm_link'; |
58 | - $sql = "SELECT * FROM `" . $xoopsDB->prefix("user_profile_field") . "` WHERE `field_name` NOT IN ('" . implode("', '", $skip_fields) . "')"; |
|
58 | + $sql = "SELECT * FROM `".$xoopsDB->prefix("user_profile_field")."` WHERE `field_name` NOT IN ('".implode("', '", $skip_fields)."')"; |
|
59 | 59 | $result = $xoopsDB->query($sql); |
60 | 60 | $fields = array(); |
61 | 61 | while (false !== ($myrow = $xoopsDB->fetchArray($result))) { |
@@ -72,14 +72,14 @@ discard block |
||
72 | 72 | $field_handler->insert($object, true); |
73 | 73 | |
74 | 74 | $gperm_itemid = $object->getVar('field_id'); |
75 | - $sql = "UPDATE " . $xoopsDB->prefix("system_permission") . " SET gperm_itemid = " . $gperm_itemid . " WHERE gperm_itemid = " . $myrow['fieldid'] . " AND gperm_modid = " . $module->getVar('mid') . " AND gperm_name IN ('profile_edit', 'profile_search')"; |
|
75 | + $sql = "UPDATE ".$xoopsDB->prefix("system_permission")." SET gperm_itemid = ".$gperm_itemid." WHERE gperm_itemid = ".$myrow['fieldid']." AND gperm_modid = ".$module->getVar('mid')." AND gperm_name IN ('profile_edit', 'profile_search')"; |
|
76 | 76 | $xoopsDB->queryF($sql); |
77 | 77 | |
78 | 78 | $groups_visible = $goupperm_handler->getGroupIds("profile_visible", $myrow['fieldid'], $module->getVar('mid')); |
79 | 79 | $groups_show = $goupperm_handler->getGroupIds("profile_show", $myrow['fieldid'], $module->getVar('mid')); |
80 | 80 | foreach ($groups_visible as $ugid) { |
81 | 81 | foreach ($groups_show as $pgid) { |
82 | - $sql = "INSERT INTO " . $xoopsDB->prefix("profile_visibility") . " (field_id, user_group, profile_group) " . " VALUES " . " ({$gperm_itemid}, {$ugid}, {$pgid})"; |
|
82 | + $sql = "INSERT INTO ".$xoopsDB->prefix("profile_visibility")." (field_id, user_group, profile_group) "." VALUES "." ({$gperm_itemid}, {$ugid}, {$pgid})"; |
|
83 | 83 | $xoopsDB->queryF($sql); |
84 | 84 | } |
85 | 85 | } |
@@ -90,19 +90,19 @@ discard block |
||
90 | 90 | |
91 | 91 | // Copy data from profile table |
92 | 92 | foreach ($fields as $field) { |
93 | - $xoopsDB->queryF("UPDATE `" . $xoopsDB->prefix("profile_profile") . "` u, `" . $xoopsDB->prefix("user_profile") . "` p SET u.{$field} = p.{$field} WHERE u.profile_id=p.profileid"); |
|
93 | + $xoopsDB->queryF("UPDATE `".$xoopsDB->prefix("profile_profile")."` u, `".$xoopsDB->prefix("user_profile")."` p SET u.{$field} = p.{$field} WHERE u.profile_id=p.profileid"); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | // Drop old profile table |
97 | - $sql = "DROP TABLE " . $xoopsDB->prefix("user_profile"); |
|
97 | + $sql = "DROP TABLE ".$xoopsDB->prefix("user_profile"); |
|
98 | 98 | $xoopsDB->queryF($sql); |
99 | 99 | |
100 | 100 | // Drop old field module |
101 | - $sql = "DROP TABLE " . $xoopsDB->prefix("user_profile_field"); |
|
101 | + $sql = "DROP TABLE ".$xoopsDB->prefix("user_profile_field"); |
|
102 | 102 | $xoopsDB->queryF($sql); |
103 | 103 | |
104 | 104 | // Remove not used items |
105 | - $sql = "DELETE FROM " . $xoopsDB->prefix("system_permission") . " WHERE `gperm_modid` = " . $module->getVar('mid') . " AND `gperm_name` IN ('profile_show', 'profile_visible')"; |
|
105 | + $sql = "DELETE FROM ".$xoopsDB->prefix("system_permission")." WHERE `gperm_modid` = ".$module->getVar('mid')." AND `gperm_name` IN ('profile_show', 'profile_visible')"; |
|
106 | 106 | $xoopsDB->queryF($sql); |
107 | 107 | } |
108 | 108 | |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | $profile_handler->cleanOrphan($xoopsDB->prefix("system_user"), "uid", "profile_id"); |
111 | 111 | $field_handler = $xoops->getModuleHandler('field', $module->getVar('dirname', 'n')); |
112 | 112 | $user_fields = $field_handler->getUserVars(); |
113 | - $criteria = new Criteria("field_name", "('" . implode("', '", $user_fields) . "')", "IN"); |
|
113 | + $criteria = new Criteria("field_name", "('".implode("', '", $user_fields)."')", "IN"); |
|
114 | 114 | $field_handler->updateAll("field_config", 0, $criteria); |
115 | 115 | |
116 | 116 | return true; |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $myts = \Xoops\Core\Text\Sanitizer::getInstance(); |
98 | 98 | if ($step_no == 1 && $xoops->getConfig('reg_dispdsclmr') != 0 && $xoops->getConfig('reg_disclaimer') != '') { |
99 | 99 | $disc_tray = new Xoops\Form\ElementTray(XoopsLocale::DISCLAIMER, '<br />'); |
100 | - $disc_text = new Xoops\Form\Label("", "<div class=\"pad5\">" . $myts->displayTarea($xoops->getConfig('reg_disclaimer'), 1) . "</div>"); |
|
100 | + $disc_text = new Xoops\Form\Label("", "<div class=\"pad5\">".$myts->displayTarea($xoops->getConfig('reg_disclaimer'), 1)."</div>"); |
|
101 | 101 | $disc_tray->addElement($disc_text); |
102 | 102 | $agree_chk = new Xoops\Form\Checkbox('', 'agree_disc'); |
103 | 103 | $agree_chk->addOption(1, XoopsLocale::I_AGREE_TO_THE_ABOVE); |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | //If the user is an admin and is editing someone else |
170 | 170 | $pwd_text = new Xoops\Form\Password('', 'password'); |
171 | 171 | $pwd_text2 = new Xoops\Form\Password('', 'vpass'); |
172 | - $pwd_tray = new Xoops\Form\ElementTray(XoopsLocale::PASSWORD . '<br />' . XoopsLocale::TYPE_NEW_PASSWORD_TWICE_TO_CHANGE_IT); |
|
172 | + $pwd_tray = new Xoops\Form\ElementTray(XoopsLocale::PASSWORD.'<br />'.XoopsLocale::TYPE_NEW_PASSWORD_TWICE_TO_CHANGE_IT); |
|
173 | 173 | $pwd_tray->addElement($pwd_text); |
174 | 174 | $pwd_tray->addElement($pwd_text2); |
175 | 175 | $elements[0][] = array('element' => $pwd_tray, 'required' => 0); //cannot set an element tray required |
@@ -238,8 +238,8 @@ discard block |
||
238 | 238 | $title = isset($categories[$k]) ? $categories[$k]['cat_title'] : _PROFILE_MA_DEFAULT; |
239 | 239 | $desc = isset($categories[$k]) ? $categories[$k]['cat_description'] : ""; |
240 | 240 | //$form->addElement(new Xoops\Form\Label("<div class='break'>{$title}</div>", $desc), false); |
241 | - $desc = ($desc != '' ? ' - ' . $desc : ''); |
|
242 | - $form->insertBreak($title . $desc); |
|
241 | + $desc = ($desc != '' ? ' - '.$desc : ''); |
|
242 | + $form->insertBreak($title.$desc); |
|
243 | 243 | foreach (array_keys($elements[$k]) as $i) { |
244 | 244 | $form->addElement($elements[$k][$i]['element'], $elements[$k][$i]['required']); |
245 | 245 | } |
@@ -78,9 +78,9 @@ discard block |
||
78 | 78 | global $xoopsDB; |
79 | 79 | $module_id = $xoops->registry()->get('profile_id'); |
80 | 80 | |
81 | - $xoopsDB->queryF("INSERT INTO " . $xoopsDB->prefix("profile_profile") . " (profile_id) " . " SELECT uid " . " FROM " . $xoopsDB->prefix("system_user")); |
|
81 | + $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix("profile_profile")." (profile_id) "." SELECT uid "." FROM ".$xoopsDB->prefix("system_user")); |
|
82 | 82 | |
83 | - $sql = "INSERT INTO " . $xoopsDB->prefix("system_permission") . " (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) " . " VALUES " . " (" . FixedGroups::ADMIN . ", " . FixedGroups::ADMIN . ", {$module_id}, 'profile_access'), " . " (" . FixedGroups::ADMIN . ", " . FixedGroups::USERS . ", {$module_id}, 'profile_access'), " . " (" . FixedGroups::USERS . ", " . FixedGroups::USERS . ", {$module_id}, 'profile_access'), " . " (" . FixedGroups::ANONYMOUS . ", " . FixedGroups::USERS . ", {$module_id}, 'profile_access') " . " "; |
|
83 | + $sql = "INSERT INTO ".$xoopsDB->prefix("system_permission")." (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) "." VALUES "." (".FixedGroups::ADMIN.", ".FixedGroups::ADMIN.", {$module_id}, 'profile_access'), "." (".FixedGroups::ADMIN.", ".FixedGroups::USERS.", {$module_id}, 'profile_access'), "." (".FixedGroups::USERS.", ".FixedGroups::USERS.", {$module_id}, 'profile_access'), "." (".FixedGroups::ANONYMOUS.", ".FixedGroups::USERS.", {$module_id}, 'profile_access') "." "; |
|
84 | 84 | $xoopsDB->queryF($sql); |
85 | 85 | |
86 | 86 | } |
@@ -171,22 +171,22 @@ discard block |
||
171 | 171 | global $xoopsDB; |
172 | 172 | $gperm_itemid = $field_id; |
173 | 173 | $gperm_modid = $module_id; |
174 | - $sql = "INSERT INTO " . $xoopsDB->prefix("system_permission") . " (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) " . " VALUES " . ($canedit |
|
175 | - ? " (" . FixedGroups::ADMIN . ", {$gperm_itemid}, {$gperm_modid}, 'profile_edit'), " : "") . ($canedit == 1 |
|
176 | - ? " (" . FixedGroups::USERS . ", {$gperm_itemid}, {$gperm_modid}, 'profile_edit'), " |
|
177 | - : "") . " (" . FixedGroups::ADMIN . ", {$gperm_itemid}, {$gperm_modid}, 'profile_search'), " . " (" . FixedGroups::USERS . ", {$gperm_itemid}, {$gperm_modid}, 'profile_search') " . " "; |
|
174 | + $sql = "INSERT INTO ".$xoopsDB->prefix("system_permission")." (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) "." VALUES ".($canedit |
|
175 | + ? " (".FixedGroups::ADMIN.", {$gperm_itemid}, {$gperm_modid}, 'profile_edit'), " : "").($canedit == 1 |
|
176 | + ? " (".FixedGroups::USERS.", {$gperm_itemid}, {$gperm_modid}, 'profile_edit'), " |
|
177 | + : "")." (".FixedGroups::ADMIN.", {$gperm_itemid}, {$gperm_modid}, 'profile_search'), "." (".FixedGroups::USERS.", {$gperm_itemid}, {$gperm_modid}, 'profile_search') "." "; |
|
178 | 178 | $xoopsDB->queryF($sql); |
179 | 179 | |
180 | 180 | if ($visible) { |
181 | - $sql = "INSERT INTO " . $xoopsDB->prefix("profile_visibility") |
|
181 | + $sql = "INSERT INTO ".$xoopsDB->prefix("profile_visibility") |
|
182 | 182 | . " (field_id, user_group, profile_group) " |
183 | 183 | . " VALUES " |
184 | - . " ({$gperm_itemid}, " . FixedGroups::ADMIN . ", " . FixedGroups::ADMIN . "), " |
|
185 | - . " ({$gperm_itemid}, " . FixedGroups::ADMIN . ", " . FixedGroups::USERS . "), " |
|
186 | - . " ({$gperm_itemid}, " . FixedGroups::USERS . ", " . FixedGroups::ADMIN . "), " |
|
187 | - . " ({$gperm_itemid}, " . FixedGroups::USERS . ", " . FixedGroups::USERS . "), " |
|
188 | - . " ({$gperm_itemid}, " . FixedGroups::ANONYMOUS . ", " . FixedGroups::ADMIN . "), " |
|
189 | - . " ({$gperm_itemid}, " . FixedGroups::ANONYMOUS . ", " . FixedGroups::USERS . ")" . " "; |
|
184 | + . " ({$gperm_itemid}, ".FixedGroups::ADMIN.", ".FixedGroups::ADMIN."), " |
|
185 | + . " ({$gperm_itemid}, ".FixedGroups::ADMIN.", ".FixedGroups::USERS."), " |
|
186 | + . " ({$gperm_itemid}, ".FixedGroups::USERS.", ".FixedGroups::ADMIN."), " |
|
187 | + . " ({$gperm_itemid}, ".FixedGroups::USERS.", ".FixedGroups::USERS."), " |
|
188 | + . " ({$gperm_itemid}, ".FixedGroups::ANONYMOUS.", ".FixedGroups::ADMIN."), " |
|
189 | + . " ({$gperm_itemid}, ".FixedGroups::ANONYMOUS.", ".FixedGroups::USERS.")"." "; |
|
190 | 190 | $xoopsDB->queryF($sql); |
191 | 191 | } |
192 | 192 | } |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | $xoops = Xoops::getInstance(); |
200 | 200 | $xoops->db(); |
201 | 201 | global $xoopsDB; |
202 | - $xoopsDB->query("INSERT INTO " . $xoopsDB->prefix("profile_category") . " VALUES (0, " . $xoopsDB->quote($name) . ", '', {$weight})"); |
|
202 | + $xoopsDB->query("INSERT INTO ".$xoopsDB->prefix("profile_category")." VALUES (0, ".$xoopsDB->quote($name).", '', {$weight})"); |
|
203 | 203 | } |
204 | 204 | |
205 | 205 | /** |
@@ -212,5 +212,5 @@ discard block |
||
212 | 212 | $xoops = Xoops::getInstance(); |
213 | 213 | $xoops->db(); |
214 | 214 | global $xoopsDB; |
215 | - $xoopsDB->query("INSERT INTO " . $xoopsDB->prefix("profile_regstep") . " VALUES (0, " . $xoopsDB->quote($name) . ", " . $xoopsDB->quote($desc) . ", {$order}, {$save})"); |
|
215 | + $xoopsDB->query("INSERT INTO ".$xoopsDB->prefix("profile_regstep")." VALUES (0, ".$xoopsDB->quote($name).", ".$xoopsDB->quote($desc).", {$order}, {$save})"); |
|
216 | 216 | } |
@@ -54,4 +54,4 @@ |
||
54 | 54 | define("_PROFILE_MI_ABOUT", "About"); |
55 | 55 | define("_PROFILE_MI_HOME", "Home"); |
56 | 56 | |
57 | -define("_PROFILE_MA_THEME","Theme"); |
|
57 | +define("_PROFILE_MA_THEME", "Theme"); |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | // Translator: XOOPS Translation Team |
5 | 5 | |
6 | 6 | define("_PROFILE_MA_REGISTER_NOTGROUP", "New user is not registered to corresponding groups."); |
7 | -define("_PROFILE_MA_FINISH_LOGIN","Your account has been created successfully, please click to log on."); |
|
7 | +define("_PROFILE_MA_FINISH_LOGIN", "Your account has been created successfully, please click to log on."); |
|
8 | 8 | define("_PROFILE_MA_REGISTER_FINISH", "Thanks for registering"); |
9 | 9 | define("_PROFILE_MA_REGISTER_STEPS", "Register steps:"); |
10 | 10 | |
@@ -15,10 +15,10 @@ discard block |
||
15 | 15 | define("_PROFILE_MA_EXPIRED", "The process has been expired, please go back to try again."); |
16 | 16 | |
17 | 17 | |
18 | -define("_PROFILE_MA_RECENTACTIVITY","Recent Activities"); |
|
19 | -define("_PROFILE_MA_ACTIVATE","Activate"); |
|
20 | -define("_PROFILE_MA_DEACTIVATE","Deactivate"); |
|
21 | -define("_PROFILE_MA_SENDPM","Send Message"); |
|
18 | +define("_PROFILE_MA_RECENTACTIVITY", "Recent Activities"); |
|
19 | +define("_PROFILE_MA_ACTIVATE", "Activate"); |
|
20 | +define("_PROFILE_MA_DEACTIVATE", "Deactivate"); |
|
21 | +define("_PROFILE_MA_SENDPM", "Send Message"); |
|
22 | 22 | |
23 | 23 | //changepass.php |
24 | 24 | define("_PROFILE_MA_CHANGEPASSWORD", "Change Password"); |
@@ -48,8 +48,8 @@ discard block |
||
48 | 48 | define("_PROFILE_MA_EMAILCHANGED", "Your Email Address Has Been Changed"); |
49 | 49 | define("_PROFILE_MA_SITEDEFAULT", "Site default"); |
50 | 50 | |
51 | -define("_PROFILE_MA_USERINFO","User profile"); |
|
52 | -define("_PROFILE_MA_REGISTER","Registration form"); |
|
51 | +define("_PROFILE_MA_USERINFO", "User profile"); |
|
52 | +define("_PROFILE_MA_REGISTER", "Registration form"); |
|
53 | 53 | |
54 | 54 | define("_PROFILE_MA_ACTUS", "Active Users: %s"); |
55 | 55 | define("_PROFILE_MA_FOUNDUSER", "%s users found"); |
@@ -49,10 +49,10 @@ discard block |
||
49 | 49 | define("_PROFILE_AM_PROF_SEARCH", "Searchable by these groups"); |
50 | 50 | define("_PROFILE_AM_PROF_ACCESS", "Profile accessible by these groups"); |
51 | 51 | define("_PROFILE_AM_PROF_ACCESS_DESC", |
52 | - "<ul>" . |
|
53 | - "<li>Admin groups: If a user belongs to admin groups, the current user has access if and only if one of the current user's groups is allowed to access admin group; else</li>" . |
|
54 | - "<li>Non basic groups: If a user belongs to one or more non basic groups (NOT admin, user, anonymous), the current user has access if and only if one of the current user's groups is allowed to allowed to any of the non basic groups; else</li>" . |
|
55 | - "<li>User group: If a user belongs to User group only, the current user has access if and only if one of his groups is allowed to access User group</li>" . |
|
52 | + "<ul>". |
|
53 | + "<li>Admin groups: If a user belongs to admin groups, the current user has access if and only if one of the current user's groups is allowed to access admin group; else</li>". |
|
54 | + "<li>Non basic groups: If a user belongs to one or more non basic groups (NOT admin, user, anonymous), the current user has access if and only if one of the current user's groups is allowed to allowed to any of the non basic groups; else</li>". |
|
55 | + "<li>User group: If a user belongs to User group only, the current user has access if and only if one of his groups is allowed to access User group</li>". |
|
56 | 56 | "</ul>"); |
57 | 57 | |
58 | 58 | define("_PROFILE_AM_FIELDVISIBLE", "The field "); |
@@ -86,10 +86,10 @@ discard block |
||
86 | 86 | // User management |
87 | 87 | define("_PROFILE_AM_EDITUSER", "Edit User"); |
88 | 88 | define("_PROFILE_AM_SELECTUSER", "Select User"); |
89 | -define("_PROFILE_AM_ADDUSER","Add User"); |
|
90 | -define("_PROFILE_AM_THEME","Theme"); |
|
91 | -define("_PROFILE_AM_RANK","Rank"); |
|
92 | -define("_PROFILE_AM_USERDONEXIT","User doesn't exist!"); |
|
89 | +define("_PROFILE_AM_ADDUSER", "Add User"); |
|
90 | +define("_PROFILE_AM_THEME", "Theme"); |
|
91 | +define("_PROFILE_AM_RANK", "Rank"); |
|
92 | +define("_PROFILE_AM_USERDONEXIT", "User doesn't exist!"); |
|
93 | 93 | define("_PROFILE_MA_USERLEVEL", "User Level"); |
94 | 94 | |
95 | 95 | define("_PROFILE_MA_ACTIVE", "Active"); |
@@ -118,4 +118,4 @@ discard block |
||
118 | 118 | define("_PROFILE_AM_CATEGORY_LIST", "List of categories"); |
119 | 119 | define("_PROFILE_AM_STEP_LIST", "List of registration step"); |
120 | 120 | define("_PROFILE_AM_FIELD_LIST", "List of fields"); |
121 | -define("_PROFILE_AM_ERROR_WEIGHT","You need a positive integer"); |
|
121 | +define("_PROFILE_AM_ERROR_WEIGHT", "You need a positive integer"); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | * @author Taiwen Jiang <[email protected]> |
21 | 21 | */ |
22 | 22 | |
23 | -include __DIR__ . '/header.php'; |
|
23 | +include __DIR__.'/header.php'; |
|
24 | 24 | $xoops = Xoops::getInstance(); |
25 | 25 | $email = isset($_GET['email']) ? trim($_GET['email']) : ''; |
26 | 26 | $email = isset($_POST['email']) ? trim($_POST['email']) : $email; |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $xoopsMailer->setTemplate("lostpass2.tpl"); |
48 | 48 | $xoopsMailer->assign("SITENAME", $xoops->getConfig('sitename')); |
49 | 49 | $xoopsMailer->assign("ADMINMAIL", $xoops->getConfig('adminmail')); |
50 | - $xoopsMailer->assign("SITEURL", \XoopsBaseConfig::get('url') . "/"); |
|
50 | + $xoopsMailer->assign("SITEURL", \XoopsBaseConfig::get('url')."/"); |
|
51 | 51 | $xoopsMailer->assign("IP", $_SERVER['REMOTE_ADDR']); |
52 | 52 | $xoopsMailer->assign("NEWPWD", $newpass); |
53 | 53 | $xoopsMailer->setToUsers($user); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | if (!$xoopsDB->queryF($sql)) { |
65 | 65 | $xoops->header(); |
66 | 66 | echo XoopsLocale::E_USER_NOT_UPDATED; |
67 | - include __DIR__ . '/footer.php'; |
|
67 | + include __DIR__.'/footer.php'; |
|
68 | 68 | } |
69 | 69 | $xoops->redirect("user.php", 3, sprintf(XoopsLocale::SF_PASSWORD_SENT_TO, $user->getVar("uname")), false); |
70 | 70 | // If no Code, send it |
@@ -74,9 +74,9 @@ discard block |
||
74 | 74 | $xoopsMailer->setTemplate("lostpass1.tpl"); |
75 | 75 | $xoopsMailer->assign("SITENAME", $xoops->getConfig('sitename')); |
76 | 76 | $xoopsMailer->assign("ADMINMAIL", $xoops->getConfig('adminmail')); |
77 | - $xoopsMailer->assign("SITEURL", \XoopsBaseConfig::get('url') . "/"); |
|
77 | + $xoopsMailer->assign("SITEURL", \XoopsBaseConfig::get('url')."/"); |
|
78 | 78 | $xoopsMailer->assign("IP", $_SERVER['REMOTE_ADDR']); |
79 | - $xoopsMailer->assign("NEWPWD_LINK", \XoopsBaseConfig::get('url') . "/modules/profile/lostpass.php?email={$email}&code=" . $areyou); |
|
79 | + $xoopsMailer->assign("NEWPWD_LINK", \XoopsBaseConfig::get('url')."/modules/profile/lostpass.php?email={$email}&code=".$areyou); |
|
80 | 80 | $xoopsMailer->setToUsers($user); |
81 | 81 | $xoopsMailer->setFromEmail($xoops->getConfig('adminmail')); |
82 | 82 | $xoopsMailer->setFromName($xoops->getConfig('sitename')); |
@@ -88,6 +88,6 @@ discard block |
||
88 | 88 | echo "<h4>"; |
89 | 89 | printf(XoopsLocale::F_CONFIRMATION_EMAIL_SENT, $user->getVar('uname')); |
90 | 90 | echo "</h4>"; |
91 | - include __DIR__ . '/footer.php'; |
|
91 | + include __DIR__.'/footer.php'; |
|
92 | 92 | } |
93 | 93 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | * @author Taiwen Jiang <[email protected]> |
23 | 23 | */ |
24 | 24 | |
25 | -include __DIR__ . '/header.php'; |
|
25 | +include __DIR__.'/header.php'; |
|
26 | 26 | |
27 | 27 | $xoops = Xoops::getInstance(); |
28 | 28 | $op = 'main'; |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $xoops->tpl()->assign('lang_youremail', XoopsLocale::C_YOUR_EMAIL); |
53 | 53 | $xoops->tpl()->assign('lang_sendpassword', XoopsLocale::SEND_PASSWORD); |
54 | 54 | $xoops->tpl()->assign('mailpasswd_token', $xoops->security()->createToken()); |
55 | - include __DIR__ . '/footer.php'; |
|
55 | + include __DIR__.'/footer.php'; |
|
56 | 56 | } |
57 | 57 | if (!empty($_GET['xoops_redirect'])) { |
58 | 58 | $redirect = trim($_GET['xoops_redirect']); |
@@ -64,11 +64,11 @@ discard block |
||
64 | 64 | } |
65 | 65 | } |
66 | 66 | if (!$isExternal) { |
67 | - header('Location: ' . $redirect); |
|
67 | + header('Location: '.$redirect); |
|
68 | 68 | exit(); |
69 | 69 | } |
70 | 70 | } |
71 | - header('Location: ./userinfo.php?uid=' . $xoops->user->getVar('uid')); |
|
71 | + header('Location: ./userinfo.php?uid='.$xoops->user->getVar('uid')); |
|
72 | 72 | exit(); |
73 | 73 | } |
74 | 74 | |
@@ -85,8 +85,8 @@ discard block |
||
85 | 85 | if ($xoops->isUser()) { |
86 | 86 | $xoops->getHandlerOnline()->destroy($xoops->user->getVar('uid')); |
87 | 87 | } |
88 | - $message = XoopsLocale::S_YOU_ARE_NOW_LOGGED_OUT . '<br />' . XoopsLocale::S_THANK_YOU_FOR_VISITING_OUR_SITE; |
|
89 | - $xoops->redirect(\XoopsBaseConfig::get('url') . '/', 1, $message); |
|
88 | + $message = XoopsLocale::S_YOU_ARE_NOW_LOGGED_OUT.'<br />'.XoopsLocale::S_THANK_YOU_FOR_VISITING_OUR_SITE; |
|
89 | + $xoops->redirect(\XoopsBaseConfig::get('url').'/', 1, $message); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | if ($op === 'actv') { |
@@ -98,18 +98,18 @@ discard block |
||
98 | 98 | if ($op === 'delete') { |
99 | 99 | $xoops->getConfigs(); |
100 | 100 | if (!$xoops->isUser() || $xoops->getConfig('self_delete') != 1) { |
101 | - $xoops->redirect(\XoopsBaseConfig::get('url') . '/', 5, XoopsLocale::E_NO_ACTION_PERMISSION); |
|
101 | + $xoops->redirect(\XoopsBaseConfig::get('url').'/', 5, XoopsLocale::E_NO_ACTION_PERMISSION); |
|
102 | 102 | } else { |
103 | 103 | $groups = $xoops->user->getGroups(); |
104 | 104 | if (in_array(FixedGroups::ADMIN, $groups)) { |
105 | 105 | // users in the webmasters group may not be deleted |
106 | - $xoops->redirect(\XoopsBaseConfig::get('url') . '/', 5, XoopsLocale::E_USER_IN_WEBMASTER_GROUP_CANNOT_BE_REMOVED); |
|
106 | + $xoops->redirect(\XoopsBaseConfig::get('url').'/', 5, XoopsLocale::E_USER_IN_WEBMASTER_GROUP_CANNOT_BE_REMOVED); |
|
107 | 107 | } |
108 | 108 | $ok = !isset($_POST['ok']) ? 0 : (int)($_POST['ok']); |
109 | 109 | if ($ok != 1) { |
110 | - include __DIR__ . '/header.php'; |
|
111 | - echo $xoops->confirm(array('op' => 'delete', 'ok' => 1), 'user.php', XoopsLocale::Q_ARE_YOU_SURE_TO_DELETE_ACCOUNT . '<br/>' . XoopsLocale::THIS_WILL_REMOVE_ALL_YOUR_INFO); |
|
112 | - include __DIR__ . '/footer.php'; |
|
110 | + include __DIR__.'/header.php'; |
|
111 | + echo $xoops->confirm(array('op' => 'delete', 'ok' => 1), 'user.php', XoopsLocale::Q_ARE_YOU_SURE_TO_DELETE_ACCOUNT.'<br/>'.XoopsLocale::THIS_WILL_REMOVE_ALL_YOUR_INFO); |
|
112 | + include __DIR__.'/footer.php'; |
|
113 | 113 | } else { |
114 | 114 | $del_uid = $xoops->user->getVar("uid"); |
115 | 115 | if (false != $xoops->getHandlerMember()->deleteUser($xoops->user)) { |
@@ -118,9 +118,9 @@ discard block |
||
118 | 118 | if ($xoops->isActiveModule('notifications')) { |
119 | 119 | Notifications::getInstance()->getHandlerNotification()->unsubscribeByUser($del_uid); |
120 | 120 | } |
121 | - $xoops->redirect(\XoopsBaseConfig::get('url') . '/', 5, XoopsLocale::S_YOUR_ACCOUNT_DELETED); |
|
121 | + $xoops->redirect(\XoopsBaseConfig::get('url').'/', 5, XoopsLocale::S_YOUR_ACCOUNT_DELETED); |
|
122 | 122 | } |
123 | - $xoops->redirect(\XoopsBaseConfig::get('url') . '/', 5, XoopsLocale::E_NO_ACTION_PERMISSION); |
|
123 | + $xoops->redirect(\XoopsBaseConfig::get('url').'/', 5, XoopsLocale::E_NO_ACTION_PERMISSION); |
|
124 | 124 | } |
125 | 125 | } |
126 | 126 | } |