user support development started
authorCalin Burloiu <calin.burloiu@gmail.com>
Mon, 12 Sep 2011 09:38:35 +0000 (12:38 +0300)
committerCalin Burloiu <calin.burloiu@gmail.com>
Mon, 12 Sep 2011 09:41:50 +0000 (12:41 +0300)
application/controllers/user.php [new file with mode: 0644]
application/language/english/user_lang.php [new file with mode: 0644]
application/views/header.php
application/views/user/login_view.php [new file with mode: 0644]

diff --git a/application/controllers/user.php b/application/controllers/user.php
new file mode 100644 (file)
index 0000000..33c50d9
--- /dev/null
@@ -0,0 +1,62 @@
+<?php
+
+/**
+ * Class User controls video hierarchy and searching
+ *
+ * @category   Controller
+ * @author             Călin-Andrei Burloiu
+ */
+class User extends CI_Controller {
+       
+       public function __construct()
+       {
+               parent::__construct();
+       
+               $this->lang->load('user');
+       }
+       
+       public function index()
+       {
+       }
+       
+       public function login()
+       {               
+               $this->load->library('form_validation');
+               
+               if ($this->form_validation->run() == FALSE)
+               {
+                       $params = array(        'title' => $this->config->item('site_name'),
+                                                                               'css' => array(
+                                                                                       'catalog.css'
+                                                                               ),
+                                                                               //'js' => array(),
+                                                                               //'metas' => array('description'=>'')
+                       );
+                       $this->load->library('html_head_params', $params);
+                       
+                       // **
+                       // ** LOADING VIEWS
+                       // **
+                       $this->load->view('html_begin', $this->html_head_params);
+                       $this->load->view('header', array('selected_menu' => 'login'));
+                       
+                       $this->load->view('user/login_view', array());
+                       
+                       $this->load->view('footer');
+                       $this->load->view('html_end');
+               }
+               else
+               {
+                       header('Location: ' . site_url());
+                       return;
+               }
+       }
+       
+       public function _check_login($username, $password)
+       {
+               return TRUE;
+       }
+}
+
+/* End of file user.php */
+/* Location: ./application/controllers/user.php */
diff --git a/application/language/english/user_lang.php b/application/language/english/user_lang.php
new file mode 100644 (file)
index 0000000..d892d50
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+
+$lang['user_username'] = 'User Name';
+$lang['user_username_or_email'] = 'User Name or E-mail';
+$lang['user_password'] = 'Password';
+$lang['user_password_confirmation'] = 'Password Confirmation';
+$lang['user_old_password'] = 'Old Password';
+$lang['user_new_password'] = 'New Password';
+$lang['user_new_password_confirmation'] = 'New Password Confirmation';
+$lang['user_email'] = 'E-mail';
+$lang['user_first_name'] = 'First Name';
+$lang['user_last_name'] = 'Last Name';
+$lang['user_birth_date'] = 'Birth Date';
+$lang['user_country'] = 'Country';
+$lang['user_locality'] = 'Locality';
+$lang['user_ui_lang'] = 'Site Interface Language';
+$lang['user_time_zone'] = 'Time Zone';
+$lang['user_role'] = 'Roles';
+$lang['user_auth_src'] = 'Authentication Source';
+$lang['user_video_prefs'] = 'Video Preferences';
+
+/* End of file user_lang.php */
+/* Location: ./application/language/english/user_lang.php */
\ No newline at end of file
index 0a8609e..c312ade 100644 (file)
        <?php echo ($selected_menu == 'contact' ? 'class="selected"' : '') ?>><?php echo $this->lang->line('ui_nav_menu_contact') ?>
        </a></li>
 
-       <!--<li class="menu-right"><a href="#<?php //echo site_url('register') ?>"
+       <li class="menu-right"><a href="<?php echo '#'//site_url('register') ?>"
                <?php echo ($selected_menu == 'register' ? 'class="selected"' : '') ?>><?php echo $this->lang->line('ui_nav_menu_register') ?></a></li>
                
-       <li class="menu-right"><a href="#<?php //echo site_url('login') ?>" 
-               <?php echo ($selected_menu == 'login' ? 'class="selected"' : '') ?>><?php echo $this->lang->line('ui_nav_menu_log_in') ?></a></li>-->
+       <li class="menu-right"><a href="<?php echo site_url('user/login') ?>" 
+               <?php echo ($selected_menu == 'login' ? 'class="selected"' : '') ?>><?php echo $this->lang->line('ui_nav_menu_log_in') ?></a></li>
 </ul>
 
 <div id="header">
diff --git a/application/views/user/login_view.php b/application/views/user/login_view.php
new file mode 100644 (file)
index 0000000..db1b9bc
--- /dev/null
@@ -0,0 +1,20 @@
+<table>
+       <tr>
+               <th><?php echo $this->lang->line('user_username_or_email'). ': ' ?></th>
+               <td>
+                       <input type="text" name="username" size="32" />
+               </td>
+       </tr>
+       <tr>
+               <th><?php echo $this->lang->line('user_password'). ': ' ?></th>
+               <td>
+                       <input type="password" name="password" size="32" />
+               </td>
+       </tr>
+       <tr>
+               <td></td>
+               <td>
+                       <input type="submit" value="<?php echo $this->lang->line('ui_nav_menu_log_in') ?>" />
+               </td>
+       </tr>
+</table>
\ No newline at end of file