Changeset 164
- Timestamp:
- Sep 24, 2003, 9:30:24 PM (21 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/user_list.php
r98 r164 30 30 //------------------------------------------------------------------ add a user 31 31 $errors = array(); 32 if ( isset( $_POST['submit '] ) )32 if ( isset( $_POST['submit_add_user'] ) ) 33 33 { 34 34 $errors = register_user( … … 46 46 $vtp->closeSession( $sub, 'errors' ); 47 47 } 48 else 48 else if ( isset( $_POST['submit_add_user'] ) ) 49 49 { 50 50 $_POST = array(); … … 221 221 $vtp->closeSession( $sub, 'category' ); 222 222 // mail management : creation of the mail address if asked by administrator 223 if ( isset( $_GET['mail'] ) ) 224 { 225 $mail_address = array(); 226 $i = 0; 223 if ( isset( $_POST['submit_generate_mail'] ) and isset( $_GET['mail'] ) ) 224 { 225 $mails = array(); 227 226 $query = 'SELECT id,mail_address'; 228 227 $query.= ' FROM '.PREFIX_TABLE.'users'; … … 231 230 while ( $row = mysql_fetch_array( $result ) ) 232 231 { 233 $key = 'mail-'.$row['id']; 234 if ( $_POST[$key] == 1 ) 235 { 236 $mail_address[$i++] = $row['mail_address']; 237 } 232 if ( $_POST['mail-'.$row['id']] == 1 ) 233 array_push( $mails, $row['mail_address'] ); 238 234 } 239 235 $mail_destination = ''; 240 for ( $i = 0; $i < sizeof( $mail_address ); $i++ ) 241 { 242 $mail_destination.= $mail_address[$i]; 243 if ( sizeof( $mail_address ) > 1 ) 244 { 245 $mail_destination.= ';'; 246 } 247 } 248 if ( sizeof( $mail_address ) > 0 ) 236 foreach ( $mails as $i => $mail_address ) { 237 if ( $i > 0 ) $mail_destination.= ','; 238 $mail_destination.= $mail_address; 239 } 240 if ( sizeof( $mails ) > 0 ) 249 241 { 250 242 $vtp->addSession( $sub, 'mail_link' ); -
trunk/template/default/admin/user_list.vtp
r101 r164 32 32 {#login} : <input type="text" name="username" value="{#f_username}" /> 33 33 {#password} : <input type="text" name="password" value="{#f_password}" /> 34 <input type="submit" value="{#add}" name="submit " />34 <input type="submit" value="{#add}" name="submit_add_user" /> 35 35 </div> 36 36 </form> … … 38 38 39 39 <!--VTP_users--> 40 <form method="post" action="{#form_action}" name="{#form_name}">40 <form method="post" action="{#form_action}"> 41 41 <table width="100%"> 42 42 <!--VTP_category--> … … 91 91 <input type="button" value="{#listuser_button_all}" onClick="SelectAll(this.form)" style="margin-left:5px;margin-right:5px;" /> 92 92 <input type="button" value="{#listuser_button_invert}" onClick="Inverser(this.form)" style="margin-left:5px;margin-right:5px;" /> 93 <input type="submit" value="{#listuser_button_create_address}" style="margin-left:5px;margin-right:5px;" />93 <input type="submit" value="{#listuser_button_create_address}" name="submit_generate_mail" style="margin-left:5px;margin-right:5px;" /> 94 94 <!--VTP_mail_link--> 95 95 <a href="mailto:{#mailto}">mailto:{#mail_address_start}...</a>
Note: See TracChangeset
for help on using the changeset viewer.