OSDN Git Service

初回コミット(v2.6.17.1)
[magic3/magic3.git] / templates / pwc007_music / html / com_user / user / form.php
1 <?php // no direct access
2 defined('_JEXEC') or die('Restricted access'); ?>
3 <script language="javascript" type="text/javascript">
4 /* <![CDATA[ */
5 function submitbutton( pressbutton ) {
6         var form = document.userform;
7         var r = new RegExp("[<|\>|\"|\'|\%|\;|\(|\)|\&|\+|\-]", "i");
8
9         if (pressbutton == 'cancel') {
10                 form.task.value = 'cancel';
11                 form.submit();
12                 return;
13         }
14
15         // do field validation
16         if (form.name.value == "") {
17                 alert( "<?php echo JText::_( 'Please enter your name.', true );?>" );
18         } else if (form.email.value == "") {
19                 alert( "<?php echo JText::_( 'Please enter a valid e-mail address.', true );?>" );
20         } else if (((form.password.value != "") || (form.password2.value != "")) && (form.password.value != form.password2.value)){
21                 alert( "<?php echo JText::_( 'REGWARN_VPASS2', true );?>" );
22         } else if (r.exec(form.password.value)) {
23                 alert( "<?php printf( JText::_( 'VALID_AZ09', true ), JText::_( 'Password', true ), 4 );?>" );
24         } else {
25                 form.submit();
26         }
27 }
28 /* ]]> */
29 </script>
30 <form action="index.php" method="post" name="userform">
31 <div class="Post">
32     <div class="Post-body">
33 <div class="Post-inner">
34
35 <?php if ($this->params->def('show_page_title', 1)): ?>
36 <h2 class="PostHeaderIcon-wrapper"><?php echo JHTML::_('image.site', 'PostHeaderIcon.png', null, null, null, JText::_("PostHeaderIcon"), array('width' => '24', 'height' => '31')); ?> <span class="PostHeader">
37 <span class="componentheading<?php echo $this->params->get('pageclass_sfx')?>"><?php echo $this->escape($this->params->get('page_title')); ?></span>
38 </span>
39 </h2>
40
41 <?php endif; ?>
42 <div class="PostContent">
43
44 <table cellpadding="5" cellspacing="0" border="0" width="100%">
45 <tr>
46         <td>
47                 <label for="username">
48                         <?php echo JText::_( 'User Name' ); ?>:
49                 </label>
50         </td>
51         <td>
52                 <span id="username"><?php echo $this->user->get('username');?></span>
53         </td>
54 </tr>
55 <tr>
56         <td width="120">
57                 <label for="name">
58                         <?php echo JText::_( 'Your Name' ); ?>:
59                 </label>
60         </td>
61         <td>
62                 <input class="inputbox" type="text" id="name" name="name" value="<?php echo $this->user->get('name');?>" size="40" />
63         </td>
64 </tr>
65 <tr>
66         <td>
67                 <label for="email">
68                         <?php echo JText::_( 'email' ); ?>:
69                 </label>
70         </td>
71         <td>
72                 <input class="inputbox" type="text" id="email" name="email" value="<?php echo $this->user->get('email');?>" size="40" />
73         </td>
74 </tr>
75 <?php if($this->user->get('password')) : ?>
76 <tr>
77         <td>
78                 <label for="password">
79                         <?php echo JText::_( 'Password' ); ?>:
80                 </label>
81         </td>
82         <td>
83                 <input class="inputbox" type="password" id="password" name="password" value="" size="40" />
84         </td>
85 </tr>
86 <tr>
87         <td>
88                 <label for="password2">
89                         <?php echo JText::_( 'Verify Password' ); ?>:
90                 </label>
91         </td>
92         <td>
93                 <input class="inputbox" type="password" id="password2" name="password2" size="40" />
94         </td>
95 </tr>
96 <?php endif; ?>
97 </table>
98 <?php if(isset($this->params)) :  echo $this->params->render( 'params' ); endif; ?>
99         <button class="button" type="submit" onclick="submitbutton( this.form );return false;"><?php echo JText::_('Save'); ?></button>
100
101         <input type="hidden" name="username" value="<?php echo $this->user->get('username');?>" />
102         <input type="hidden" name="id" value="<?php echo $this->user->get('id');?>" />
103         <input type="hidden" name="gid" value="<?php echo $this->user->get('gid');?>" />
104         <input type="hidden" name="option" value="com_user" />
105         <input type="hidden" name="task" value="save" />
106         <?php echo JHTML::_( 'form.token' ); ?>
107
108 </div>
109 <div class="cleared"></div>
110
111
112 </div>
113
114     </div>
115 </div>
116
117 </form>