Changeset 1620
- Timestamp:
- Nov 29, 2006, 5:18:11 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/user_list.php
r1489 r1620 47 47 48 48 $users = array(); 49 49 50 50 // filter 51 51 $filter = array(); 52 52 53 53 if (isset($_GET['username']) and !empty($_GET['username'])) 54 54 { … … 84 84 $order_by = $_GET['order_by']; 85 85 } 86 86 87 87 $direction = 'ASC'; 88 88 if (isset($_GET['direction']) … … 141 141 } 142 142 $user_nums = array_flip($user_ids); 143 143 144 144 if (count($user_ids) > 0) 145 145 { … … 158 158 } 159 159 } 160 160 161 161 return $users; 162 162 } … … 221 221 { 222 222 $collection = array(); 223 223 224 224 switch ($_POST['target']) 225 225 { … … 273 273 sprintf( 274 274 l10n('%d users deleted'), 275 count($collection) 275 count($collection) 276 276 ) 277 277 ); … … 300 300 { 301 301 $datas = array(); 302 302 303 303 $query = ' 304 304 SELECT user_id … … 307 307 ;'; 308 308 $associated = array_from_query($query, 'user_id'); 309 309 310 310 $associable = array_diff($collection, $associated); 311 311 312 312 if (count($associable) > 0) 313 313 { … … 318 318 'user_id'=>$item)); 319 319 } 320 320 321 321 mass_inserts(USER_GROUP_TABLE, 322 322 array('group_id', 'user_id'), … … 324 324 } 325 325 } 326 326 327 327 if (-1 != $_POST['dissociate']) 328 328 { … … 334 334 pwg_query($query); 335 335 } 336 336 337 337 // properties to set for the collection (a user list) 338 338 $datas = array(); 339 339 $dbfields = array('primary' => array('user_id'), 'update' => array()); 340 340 341 341 $formfields = 342 342 array('nb_image_line', 'nb_line_page', 'template', 'language', 343 343 'recent_period', 'maxwidth', 'expand', 'show_nb_comments', 344 344 'maxheight', 'status', 'enabled_high'); 345 345 346 346 $true_false_fields = array('expand', 'show_nb_comments', 'enabled_high'); 347 347 if ($conf['allow_adviser']) … … 350 350 array_push($true_false_fields, 'adviser'); 351 351 } 352 352 353 353 foreach ($formfields as $formfield) 354 354 { … … 362 362 $test = $formfield.'_action'; 363 363 } 364 364 365 365 if ($_POST[$test] != 'leave') 366 366 { … … 368 368 } 369 369 } 370 370 371 371 // updating elements is useful only if needed... 372 372 if (count($dbfields['update']) > 0) 373 373 { 374 374 $datas = array(); 375 375 376 376 foreach ($collection as $user_id) 377 377 { 378 378 $data = array(); 379 379 $data['user_id'] = $user_id; 380 380 381 381 // TODO : verify if submited values are semanticaly correct 382 382 foreach ($dbfields['update'] as $dbfield) … … 405 405 array_push($datas, $data); 406 406 } 407 407 408 408 mass_updates(USER_INFOS_TABLE, $dbfields, $datas); 409 409 } … … 458 458 'L_AUTH_USER'=>$lang['permuser_only_private'], 459 459 'L_GROUP_ADD_USER' => $lang['group_add_user'], 460 'L_SUBMIT'=>$lang['submit'],461 460 'L_STATUS'=>$lang['user_status'], 462 'L_PASSWORD' => $lang['password'],463 'L_EMAIL' => $lang['mail_address'],464 461 'L_ORDER_BY' => $lang['order_by'], 465 462 'L_ACTIONS' => $lang['actions'], … … 467 464 'L_PERMISSIONS' => $lang['permissions'], 468 465 'L_USERS_LIST' => $lang['title_liste_users'], 469 'L_LANGUAGE' => $lang['language'],470 466 'L_NB_IMAGE_LINE' => $lang['nb_image_per_row'], 471 467 'L_NB_LINE_PAGE' => $lang['nb_row_per_page'], … … 476 472 'L_MAXWIDTH' => $lang['maxwidth'], 477 473 'L_MAXHEIGHT' => $lang['maxheight'], 478 'L_YES' => $lang['yes'],479 'L_NO' => $lang['no'],480 'L_SUBMIT' => $lang['submit'],481 'L_RESET' => $lang['reset'],482 474 'L_DELETE' => $lang['user_delete'], 483 475 'L_DELETE_HINT' => $lang['user_delete_hint'], 484 476 485 477 'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=user_list', 486 478 487 479 'F_ADD_ACTION' => $base_url, 488 480 'F_USERNAME' => @$_GET['username'], … … 635 627 $selected = ''; 636 628 } 637 629 638 630 $template->assign_block_vars( 639 631 $blockname, … … 661 653 $selected = ''; 662 654 } 663 655 664 656 $template->assign_block_vars( 665 657 $blockname, … … 722 714 $selected = ''; 723 715 } 724 716 725 717 $template->assign_block_vars( 726 718 $blockname, … … 753 745 $selected = ''; 754 746 } 755 747 756 748 $template->assign_block_vars( 757 749 $blockname, -
trunk/language/en_UK.iso-8859-1/common.lang.php
r1615 r1620 421 421 $lang['comments_del'] = 'delete this comment'; 422 422 $lang['comments_title'] = 'Comments from the users of the site'; 423 $lang['confirm_password_hint'] = 'You only have to confirm your new password if you wish to change it.';424 423 $lang['created after %s (%s)'] = 'created after %s (%s)'; 425 424 $lang['created before %s (%s)'] = 'created before %s (%s)'; … … 428 427 $lang['customize'] = 'Customize'; 429 428 $lang['customize_page_title'] = 'Your Gallery Customization '; 430 $lang['customize_title'] = 'Customization';431 429 $lang['day'][0] = 'Sunday'; 432 430 $lang['day'][1] = 'Monday'; … … 502 500 $lang['nbm_unknown_identifier'] = 'Unknown identifier'; 503 501 $lang['new_password'] = 'New password'; 504 $lang['new_password_hint'] = 'You only have to give a password if you wish to change it.';505 502 $lang['new_rate'] = 'Rate this picture'; 506 503 $lang['next_page'] = 'Next'; … … 511 508 $lang['only_members'] = 'Only members can access this page'; 512 509 $lang['password updated'] = 'password updated'; 513 $lang['password'] = 'Password';514 $lang['password_hint'] = 'You only have to give your password if you wish to change your e-mail';515 510 $lang['periods_error'] = 'Recent period must be a positive integer value'; 516 511 $lang['picture'] = 'picture'; … … 530 525 $lang['recent_pics_cat_hint'] = 'displays most recent pictures'; 531 526 $lang['redirect_msg'] = 'Redirection...'; 532 $lang['reg_confirm'] = 'Confirm password';533 527 $lang['reg_err_login1'] = 'Please, enter a login'; 534 528 $lang['reg_err_login2'] = 'login mustn\'t end with a space character'; -
trunk/language/fr_FR.iso-8859-1/common.lang.php
r1615 r1620 420 420 $lang['comments_del'] = 'Supprimer ce commentaire'; 421 421 $lang['comments_title'] = 'Commentaires des utilisateurs'; 422 $lang['confirm_password_hint'] = 'Vous n\'avez à confirmer votre mot de passe que si vous désirez en changer.';423 422 $lang['created after %s (%s)'] = 'créée après le %s (%s)'; 424 423 $lang['created before %s (%s)'] = 'créée avant le %s (%s)'; … … 427 426 $lang['customize'] = 'Personnaliser'; 428 427 $lang['customize_page_title'] = 'Personnalisation de votre affichage '; 429 $lang['customize_title'] = 'Personnaliser';430 428 $lang['day'][0] = 'Dimanche'; 431 429 $lang['day'][1] = 'Lundi'; … … 501 499 $lang['nbm_unknown_identifier'] = 'Identifiants inconnus'; 502 500 $lang['new_password'] = 'Nouveau mot de passe'; 503 $lang['new_password_hint'] = 'Vous n\'avez à confirmer votre mot de passe que si vous désirez en changer.';504 501 $lang['new_rate'] = 'Votez pour cette image'; 505 502 $lang['next_page'] = 'Suivant'; … … 510 507 $lang['only_members'] = 'Seuls les membres enregistrés peuvent accéder à cette page'; 511 508 $lang['password updated'] = 'mot de passe mis à jour'; 512 $lang['password'] = 'Mot de passe';513 $lang['password_hint'] = 'Vous n\'avez à donner votre mot de passe que si vous désirez en changer.';514 509 $lang['periods_error'] = 'La période de nouveauté doit être un entier positif'; 515 510 $lang['picture'] = 'image'; … … 529 524 $lang['recent_pics_cat_hint'] = 'afficher les images les plus récentes'; 530 525 $lang['redirect_msg'] = 'Redirection...'; 531 $lang['reg_confirm'] = 'Confirmer le mot de passe';532 526 $lang['reg_err_login1'] = 'S\'il vous plaît, entrer un nom utilisateur'; 533 527 $lang['reg_err_login2'] = 'le nom utilisateur ne doit pas se terminer par un espace'; -
trunk/profile.php
r1614 r1620 64 64 array_push($errors, $lang['nb_line_page_error']); 65 65 } 66 66 67 67 if ($_POST['maxwidth'] != '' 68 68 and (!preg_match($int_pattern, $_POST['maxwidth']) … … 89 89 array_push($errors, $mail_error); 90 90 } 91 91 92 92 if (!empty($_POST['use_new_pwd'])) 93 93 { … … 98 98 l10n('New password confirmation does not correspond')); 99 99 } 100 100 101 101 // changing password requires old password 102 102 $query = ' … … 106 106 ;'; 107 107 list($current_password) = mysql_fetch_row(pwg_query($query)); 108 108 109 109 if ($conf['pass_convert']($_POST['password']) != $current_password) 110 110 { … … 112 112 } 113 113 } 114 114 115 115 if (count($errors) == 0) 116 116 { 117 117 // mass_updates function 118 118 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 119 119 120 120 // update common user informations 121 121 $fields = array($conf['user_fields']['email']); … … 137 137 'update' => $fields), 138 138 array($data)); 139 139 140 140 // update user "additional" informations (specific to PhpWebGallery) 141 141 $fields = array( … … 143 143 'expand', 'show_nb_comments', 'recent_period', 'template' 144 144 ); 145 145 146 146 $data = array(); 147 147 $data['user_id'] = $_POST['userid']; 148 148 149 149 foreach ($fields as $field) 150 150 { … … 157 157 array('primary' => array('user_id'), 'update' => $fields), 158 158 array($data)); 159 159 160 160 // redirection 161 161 redirect(make_index_url()); … … 176 176 177 177 $expand = ($userdata['expand'] == 'true') ? 'EXPAND_TREE_YES':'EXPAND_TREE_NO'; 178 178 179 179 $nb_comments = 180 180 ($userdata['show_nb_comments'] == 'true') ? 'NB_COMMENTS_YES':'NB_COMMENTS_NO'; 181 181 182 182 $template->assign_vars( 183 183 array( … … 190 190 'MAXWIDTH'=>@$userdata['maxwidth'], 191 191 'MAXHEIGHT'=>@$userdata['maxheight'], 192 192 193 193 $expand=>'checked="checked"', 194 194 $nb_comments=>'checked="checked"', 195 196 'L_TITLE' => $lang['customize_title'],197 'L_REGISTRATION_INFO' => $lang['register_title'],198 'L_PREFERENCES' => $lang['preferences'],199 'L_USERNAME' => $lang['Username'],200 'L_EMAIL' => $lang['mail_address'],201 'L_CURRENT_PASSWORD' => $lang['password'],202 'L_CURRENT_PASSWORD_HINT' => $lang['password_hint'],203 'L_NEW_PASSWORD' => $lang['new_password'],204 'L_NEW_PASSWORD_HINT' => $lang['new_password_hint'],205 'L_CONFIRM_PASSWORD' => $lang['reg_confirm'],206 'L_CONFIRM_PASSWORD_HINT' => $lang['confirm_password_hint'],207 'L_LANG_SELECT'=>$lang['language'],208 'L_NB_IMAGE_LINE'=>$lang['nb_image_per_row'],209 'L_NB_ROW_PAGE'=>$lang['nb_row_per_page'],210 'L_STYLE_SELECT'=>$lang['theme'],211 'L_RECENT_PERIOD'=>$lang['recent_period'],212 'L_EXPAND_TREE'=>$lang['auto_expand'],213 'L_NB_COMMENTS'=>$lang['show_nb_comments'],214 'L_MAXWIDTH'=>$lang['maxwidth'],215 'L_MAXHEIGHT'=>$lang['maxheight'],216 'L_YES'=>$lang['yes'],217 'L_NO'=>$lang['no'],218 'L_SUBMIT'=>$lang['submit'],219 'L_RESET'=>$lang['reset'],220 'L_RETURN' => $lang['home'],221 'L_RETURN_HINT' => $lang['home_hint'],222 195 223 196 'U_RETURN' => make_index_url(), 224 197 225 198 'F_ACTION'=>$url_action, 226 199 )); … … 242 215 $selected = ''; 243 216 } 244 217 245 218 $template->assign_block_vars( 246 219 $blockname, … … 268 241 $selected = ''; 269 242 } 270 243 271 244 $template->assign_block_vars( 272 245 $blockname, -
trunk/template/yoga/admin/user_list.tpl
r1244 r1620 10 10 <legend>{lang:Add a user}</legend> 11 11 <label>{lang:Username} <input type="text" name="login" maxlength="50" size="20" /></label> 12 <label>{ L_PASSWORD} <input type="text" name="password" /></label>13 <input type="submit" name="submit_add" value="{ L_SUBMIT}" {TAG_INPUT_ENABLED} />12 <label>{lang:Password} <input type="text" name="password" /></label> 13 <input type="submit" name="submit_add" value="{lang:submit}" {TAG_INPUT_ENABLED} /> 14 14 </fieldset> 15 15 </form> 16 16 17 <form class="filter" method="get" name="filter" action="{F_FILTER_ACTION}"> 17 <form class="filter" method="get" name="filter" action="{F_FILTER_ACTION}"> 18 18 <fieldset> 19 19 <legend>{lang:Filter}</legend> … … 58 58 </label> 59 59 60 <input type="submit" name="submit_filter" value="{ L_SUBMIT}" {TAG_INPUT_ENABLED}/>60 <input type="submit" name="submit_filter" value="{lang:submit}" {TAG_INPUT_ENABLED}/> 61 61 62 62 </fieldset> … … 71 71 <th>{lang:Username}</th> 72 72 <th>{L_STATUS}</th> 73 <th>{ L_EMAIL}</th>73 <th>{lang:Email address}</th> 74 74 <th>{lang:Groups}</th> 75 75 <th>{L_PROPERTIES}</th> … … 123 123 <label><input type="radio" name="adviser" value="leave" checked="checked" /> {lang:leave}</label> 124 124 / {lang:set to} 125 <label><input type="radio" name="adviser" value="true" {ADVISER_YES} />{ L_YES}</label>126 <label><input type="radio" name="adviser" value="false" {ADVISER_NO} />{ L_NO}</label>125 <label><input type="radio" name="adviser" value="true" {ADVISER_YES} />{lang:yes}</label> 126 <label><input type="radio" name="adviser" value="false" {ADVISER_NO} />{lang:no}</label> 127 127 </td> 128 128 </tr> … … 175 175 <label><input type="radio" name="enabled_high" value="leave" checked="checked" /> {lang:leave}</label> 176 176 / {lang:set to} 177 <label><input type="radio" name="enabled_high" value="true" {ENABLED_HIGH_YES} />{ L_YES}</label>178 <label><input type="radio" name="enabled_high" value="false" {ENABLED_HIGH_NO} />{ L_NO}</label>177 <label><input type="radio" name="enabled_high" value="true" {ENABLED_HIGH_YES} />{lang:yes}</label> 178 <label><input type="radio" name="enabled_high" value="false" {ENABLED_HIGH_NO} />{lang:no}</label> 179 179 </td> 180 180 </tr> … … 224 224 225 225 <tr> 226 <td>{ L_LANGUAGE}</td>226 <td>{lang:language}</td> 227 227 <td> 228 228 <label><input type="radio" name="language_action" value="leave" checked="checked" /> {lang:leave}</label> … … 251 251 <label><input type="radio" name="expand" value="leave" checked="checked" /> {lang:leave}</label> 252 252 / {lang:set to} 253 <label><input type="radio" name="expand" value="true" {EXPAND_YES} />{ L_YES}</label>254 <label><input type="radio" name="expand" value="false" {EXPAND_NO} />{ L_NO}</label>253 <label><input type="radio" name="expand" value="true" {EXPAND_YES} />{lang:yes}</label> 254 <label><input type="radio" name="expand" value="false" {EXPAND_NO} />{lang:no}</label> 255 255 </td> 256 256 </tr> … … 261 261 <label><input type="radio" name="show_nb_comments" value="leave" checked="checked" /> {lang:leave}</label> 262 262 / {lang:set to} 263 <label><input type="radio" name="show_nb_comments" value="true" {SHOW_NB_COMMENTS_YES} />{ L_YES}</label>264 <label><input type="radio" name="show_nb_comments" value="false" {SHOW_NB_COMMENTS_NO} />{ L_NO}</label>263 <label><input type="radio" name="show_nb_comments" value="true" {SHOW_NB_COMMENTS_YES} />{lang:yes}</label> 264 <label><input type="radio" name="show_nb_comments" value="false" {SHOW_NB_COMMENTS_NO} />{lang:no}</label> 265 265 </td> 266 266 </tr> … … 301 301 302 302 <p> 303 <input type="submit" value="{ L_SUBMIT}" name="pref_submit" {TAG_INPUT_ENABLED} />304 <input type="reset" value="{ L_RESET}" name="pref_reset" />303 <input type="submit" value="{lang:submit}" name="pref_submit" {TAG_INPUT_ENABLED} /> 304 <input type="reset" value="{lang:reset}" name="pref_reset" /> 305 305 </p> 306 306 -
trunk/template/yoga/identification.tpl
r1615 r1620 37 37 <li> 38 38 <span class="property"> 39 <label for="password">{lang: password}</label>39 <label for="password">{lang:Password}</label> 40 40 </span> 41 41 <input tabindex="2" class="login" type="password" name="password" id="password" size="25" maxlength="25" /> -
trunk/template/yoga/menubar.tpl
r1615 r1620 100 100 101 101 <label> 102 {lang: password}102 {lang:Password} 103 103 <input type="password" name="password" size="15"> 104 104 </label> -
trunk/template/yoga/profile.tpl
r1491 r1620 21 21 22 22 <fieldset> 23 <legend>{ L_REGISTRATION_INFO}</legend>23 <legend>{lang:register_title}</legend> 24 24 <input type="hidden" name="userid" value="{USERID}" /> 25 25 <ul> … … 36 36 <li> 37 37 <span class="property"> 38 <label for="password">{ L_CURRENT_PASSWORD}</label>38 <label for="password">{lang:Password}</label> 39 39 </span> 40 40 <input type="password" name="password" id="password" value=""> … … 42 42 <li> 43 43 <span class="property"> 44 <label for="use_new_pwd">{ L_NEW_PASSWORD}</label>44 <label for="use_new_pwd">{lang:new_password}</label> 45 45 </span> 46 46 <input type="password" name="use_new_pwd" id="use_new_pwd" value=""> … … 48 48 <li> 49 49 <span class="property"> 50 <label for="passwordConf">{ L_CONFIRM_PASSWORD}</label>50 <label for="passwordConf">{lang:Confirm Password}</label> 51 51 </span> 52 52 <input type="password" name="passwordConf" id="passwordConf" value=""> … … 56 56 57 57 <fieldset> 58 <legend>{ L_PREFERENCES}</legend>58 <legend>{lang:preferences}</legend> 59 59 60 60 <ul> 61 61 <li> 62 62 <span class="property"> 63 <label for="nb_image_line">{ L_NB_IMAGE_LINE}</label>63 <label for="nb_image_line">{lang:nb_image_per_row}</label> 64 64 </span> 65 65 <input type="text" size="3" maxlength="2" name="nb_image_line" id="nb_image_line" value="{NB_IMAGE_LINE}"> … … 67 67 <li> 68 68 <span class="property"> 69 <label for="nb_line_page">{ L_NB_ROW_PAGE}</label>69 <label for="nb_line_page">{lang:nb_row_per_page}</label> 70 70 </span> 71 71 <input type="text" size="3" maxlength="2" name="nb_line_page" id="nb_line_page" value="{NB_ROW_PAGE}" > … … 73 73 <li> 74 74 <span class="property"> 75 <label for="template">{ L_STYLE_SELECT}</label>75 <label for="template">{lang:theme}</label> 76 76 </span> 77 77 <select name="template" id="template"> … … 83 83 <li> 84 84 <span class="property"> 85 <label for="language">{ L_LANG_SELECT}</label>85 <label for="language">{lang:language}</label> 86 86 </span> 87 87 <select name="language" id="language"> … … 93 93 <li> 94 94 <span class="property"> 95 <label for="recent_period">{ L_RECENT_PERIOD}</label>95 <label for="recent_period">{lang:recent_period}</label> 96 96 </span> 97 97 <input type="text" size="3" maxlength="2" name="recent_period" id="recent_period" value="{RECENT_PERIOD}"> 98 98 </li> 99 99 <li> 100 <span class="property">{ L_EXPAND_TREE}</span>101 <label><input type="radio" name="expand" value="true" {EXPAND_TREE_YES}> { L_YES}</label>102 <label><input type="radio" name="expand" value="false" {EXPAND_TREE_NO}> { L_NO}</label>100 <span class="property">{lang:auto_expand}</span> 101 <label><input type="radio" name="expand" value="true" {EXPAND_TREE_YES}> {lang:yes}</label> 102 <label><input type="radio" name="expand" value="false" {EXPAND_TREE_NO}> {lang:no}</label> 103 103 </li> 104 104 <li> 105 <span class="property">{ L_NB_COMMENTS}</span>106 <label><input type="radio" name="show_nb_comments" value="true" {NB_COMMENTS_YES}> { L_YES}</label>107 <label><input type="radio" name="show_nb_comments" value="false" {NB_COMMENTS_NO}> { L_NO}</label>105 <span class="property">{lang:show_nb_comments}</span> 106 <label><input type="radio" name="show_nb_comments" value="true" {NB_COMMENTS_YES}> {lang:yes}</label> 107 <label><input type="radio" name="show_nb_comments" value="false" {NB_COMMENTS_NO}> {lang:no}</label> 108 108 </li> 109 109 <li> 110 110 <span class="property"> 111 <label for="maxwidth">{ L_MAXWIDTH}</label>111 <label for="maxwidth">{lang:maxwidth}</label> 112 112 </span> 113 113 <input type="text" size="4" maxlength="4" name="maxwidth" id="maxwidth" value="{MAXWIDTH}"> … … 115 115 <li> 116 116 <span class="property"> 117 <label for="maxheight">{ L_MAXHEIGHT}</label>117 <label for="maxheight">{lang:maxheight}</label> 118 118 </span> 119 119 <input type="text" size="4" maxlength="4" name="maxheight" id="maxheight" value="{MAXHEIGHT}"> … … 123 123 124 124 <p class="bottomButtons"> 125 <input type="submit" name="validate" value="{ L_SUBMIT}">126 <input type="reset" name="reset" value="{ L_RESET}" class="reset">125 <input type="submit" name="validate" value="{lang:submit}"> 126 <input type="reset" name="reset" value="{lang:reset}" class="reset"> 127 127 </p> 128 128
Note: See TracChangeset
for help on using the changeset viewer.