aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Views/Users
diff options
context:
space:
mode:
Diffstat (limited to 'h-source/Application/Views/Users')
-rwxr-xr-xh-source/Application/Views/Users/add.php70
-rw-r--r--h-source/Application/Views/Users/change.php28
-rw-r--r--h-source/Application/Views/Users/confirmation.php42
-rw-r--r--h-source/Application/Views/Users/contributions.php50
-rw-r--r--h-source/Application/Views/Users/forgot.php55
-rwxr-xr-xh-source/Application/Views/Users/login.php57
-rwxr-xr-xh-source/Application/Views/Users/logout.php25
-rw-r--r--h-source/Application/Views/Users/meet.php89
-rw-r--r--h-source/Application/Views/Users/notice.php94
9 files changed, 510 insertions, 0 deletions
diff --git a/h-source/Application/Views/Users/add.php b/h-source/Application/Views/Users/add.php
new file mode 100755
index 0000000..0b8aabc
--- /dev/null
+++ b/h-source/Application/Views/Users/add.php
@@ -0,0 +1,70 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; create account
+ </div>
+
+ <div class="new_account_title">
+ Create new account
+ </div>
+
+ <?php echo $notice;?>
+
+ <form class='formClass' action='<?php echo $this->baseUrl."/users/add/$lang";?>' method='POST'>
+
+ <div class='formEntry'>
+ <span class='entryLabel'>choose the username:</span>
+ <?php echo Html_Form::input('username',$values['username']);?>
+ </div>
+
+ <div class='formEntry'>
+ <span class='entryLabel'>your e-mail address (necessary to confirm the registration):</span>
+ <?php echo Html_Form::input('e_mail',$values['e_mail']);?>
+ </div>
+
+ <div class='formEntry'>
+ <span class='entryLabel'>choose the password:</span>
+ <?php echo Html_Form::password('password',$values['password']);?>
+ </div>
+
+ <div class='formEntry'>
+ <span class='entryLabel'>confirm your password:</span>
+ <?php echo Html_Form::password('confirmation',$values['confirmation']);?>
+ </div>
+
+ <div class="captcha_box">
+ <img src="<?php echo $this->baseUrl?>/image/captcha">
+ </div>
+
+ <div class='formEntry'>
+ <span class='entryLabel'>write the code above:</span>
+ <input type="input" name="captcha" value="">
+ </div>
+
+ <div class='inputEntry'>
+ <input id='insertAction' type='submit' name='insertAction' value='create account'>
+ </div>
+
+ </form>
+
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/Users/change.php b/h-source/Application/Views/Users/change.php
new file mode 100644
index 0000000..623d647
--- /dev/null
+++ b/h-source/Application/Views/Users/change.php
@@ -0,0 +1,28 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="confirm_notice">
+ <p>The link has expired</p>
+ <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p>
+ </div>
+
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/Users/confirmation.php b/h-source/Application/Views/Users/confirmation.php
new file mode 100644
index 0000000..f1a2074
--- /dev/null
+++ b/h-source/Application/Views/Users/confirmation.php
@@ -0,0 +1,42 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; confirmation
+ </div>
+
+ <?php if ($status_confirm) { ?>
+
+ <div class="confirm_notice">
+ <p>The account has been confirmed successfully!</p>
+ <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p>
+ </div>
+
+ <?php } else { ?>
+
+ <div class="confirm_notice">
+ <p>The confirmation link has expired</p>
+ <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p>
+ </div>
+
+ <?php } ?>
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/Users/contributions.php b/h-source/Application/Views/Users/contributions.php
new file mode 100644
index 0000000..2d5995a
--- /dev/null
+++ b/h-source/Application/Views/Users/contributions.php
@@ -0,0 +1,50 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; <a href="<?php echo $this->baseUrl."/users/meet/$lang/$meet_username";?>">meet <b><?php echo $meet_username;?></b></a> &raquo; contributions
+ </div>
+
+ <div class="contrib_explain_box">
+ contributions of <?php echo $meet_username;?>
+ </div>
+
+ <div class="external_users_contrib">
+ <?php foreach ($table as $item) {?>
+ <div class="users_contrib_item">
+
+ <div class="contribution_item">
+ <?php
+
+ $name = $item['hardware']['model'];
+ $type = $item['hardware']['type'];
+ $id_hard = $item['hardware']['id_hard'];
+
+ ?>
+ <?php echo $type;?> <a href="<?php echo $this->baseUrl."/".MyStrings::$reverse[$type]."/view/$lang/$id_hard/".encodeUrl($name);?>"><?php echo $name;?></a>
+ </div>
+
+ </div>
+ <?php } ?>
+ </div>
+
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/Users/forgot.php b/h-source/Application/Views/Users/forgot.php
new file mode 100644
index 0000000..a4c7d20
--- /dev/null
+++ b/h-source/Application/Views/Users/forgot.php
@@ -0,0 +1,55 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; request new password
+ </div>
+
+ <div class="new_account_title">
+ Request new password
+ </div>
+
+ <?php echo $notice;?>
+
+ <form class='formClass' action='<?php echo $this->currPage."/$lang";?>' method='POST'>
+
+ <div class='formEntry'>
+ <span class='entryLabel'>write your username:</span>
+ <input type="input" name="username" value="">
+ </div>
+
+ <div class="captcha_box">
+ <img src="<?php echo $this->baseUrl?>/image/captcha">
+ </div>
+
+ <div class='formEntry'>
+ <span class='entryLabel'>write the code above:</span>
+ <input type="input" name="captcha" value="">
+ </div>
+
+ <div class='inputEntry'>
+ <input id='insertAction' type='submit' name='forgotAction' value='send e-mail'>
+ </div>
+
+ </form>
+
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/Users/login.php b/h-source/Application/Views/Users/login.php
new file mode 100755
index 0000000..5998751
--- /dev/null
+++ b/h-source/Application/Views/Users/login.php
@@ -0,0 +1,57 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <?php if ( strcmp($updating_flag,'no') === 0 ) { ?>
+
+ <?php if (isset($flag)) { ?>
+ <div class="login_note">
+ Sorry.. you have to be logged if you want to insert a new device in the archive or modify an existing one..
+ </div>
+ <?php } ?>
+
+ <?php echo $notice; ?>
+
+ <div class="login_box">
+ <form action = '<?php echo $action;?>' method = 'POST'>
+
+ <table>
+ <tr>
+ <td>Username</td>
+ <td><input class="login_username_input" type='text' name='username'></td>
+ </tr>
+ <tr>
+ <td>Password</td>
+ <td><input class="login_username_input" type='password' name='password'></td>
+ </tr>
+ <tr>
+ <td><input type = 'submit' value = 'login'></td>
+ </tr>
+ </table>
+
+ </form>
+ </div>
+
+ <?php } else { ?>
+
+ <div class="login_note">
+ Sorry, we are updating the website... it is no possible to log-in, register new accounts or request a new password. You will be able to log-in or create a new account as soon as possible. Thanks!
+ </div>
+
+ <?php } ?>
diff --git a/h-source/Application/Views/Users/logout.php b/h-source/Application/Views/Users/logout.php
new file mode 100755
index 0000000..39b5873
--- /dev/null
+++ b/h-source/Application/Views/Users/logout.php
@@ -0,0 +1,25 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div class="logout_box">
+ <div><?php echo $notice;?></div>
+
+ <div><a href="<?php echo $this->baseUrl."/users/login/$lang";?>">login</a></div>
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/Users/meet.php b/h-source/Application/Views/Users/meet.php
new file mode 100644
index 0000000..ee0c708
--- /dev/null
+++ b/h-source/Application/Views/Users/meet.php
@@ -0,0 +1,89 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; meet <b><?php echo $meet_username;?></b>
+ </div>
+
+ <div class="meet_contrib_link">
+ <u>Public profile of <?php echo $meet_username;?></u>. See all <a href="<?php echo $this->baseUrl."/users/contributions/$lang/$meet_username";?>"><b><?php echo $meet_username;?></b> contributions</a>
+ </div>
+
+ <?php foreach ($table as $item) {?>
+ <div class="users_meet_box">
+
+ <div class="meet_item">
+ <div class="meet_item_inner">Username:</div> <?php echo $item['regusers']['username'];?>
+ </div>
+
+ <?php if (strcmp($item['profile']['website'],'') !== 0) { ?>
+ <div class="meet_item">
+ <div class="meet_item_inner">My website:</div> <?php echo vitalizeUrl($item['profile']['website']);?>
+ </div>
+ <?php } ?>
+
+ <?php if (strcmp($item['profile']['real_name'],'') !== 0) { ?>
+ <div class="meet_item">
+ <div class="meet_item_inner">My real name is:</div> <?php echo $item['profile']['real_name'];?>
+ </div>
+ <?php } ?>
+
+ <?php if (strcmp($item['profile']['publish_mail'],'yes') === 0) { ?>
+ <div class="meet_item">
+ <div class="meet_item_inner">My e-mail address:</div> <?php echo $item['regusers']['e_mail'];?>
+ </div>
+ <?php } ?>
+
+ <?php if (strcmp($item['profile']['where_you_are'],'') !== 0) { ?>
+ <div class="meet_item">
+ <div class="meet_item_inner">I'm from:</div> <?php echo $item['profile']['where_you_are'];?>
+ </div>
+ <?php } ?>
+
+ <?php if (strcmp($item['profile']['birth_date'],'') !== 0) { ?>
+ <div class="meet_item">
+ <div class="meet_item_inner">Birthdate:</div> <?php echo $item['profile']['birth_date'];?>
+ </div>
+ <?php } ?>
+
+ <?php if (strcmp($item['profile']['fav_distro'],'') !== 0) { ?>
+ <div class="meet_item">
+ <div class="meet_item_inner">My favourite distro is:</div> <?php echo $item['profile']['fav_distro'];?>
+ </div>
+ <?php } ?>
+
+ <?php if (strcmp($item['profile']['projects'],'') !== 0) { ?>
+ <div class="meet_item">
+ <div class="meet_item_inner">Projects I'm working on:</div> <div><?php echo nl2br($item['profile']['projects']);?></div>
+ </div>
+ <?php } ?>
+
+ <?php if (strcmp($item['profile']['description'],'') !== 0) { ?>
+ <div class="meet_item">
+ <div class="meet_item_inner">My description:</div> <div><?php echo nl2br($item['profile']['description']);?></div>
+ </div>
+ <?php } ?>
+
+ </div>
+ <?php } ?>
+
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/Users/notice.php b/h-source/Application/Views/Users/notice.php
new file mode 100644
index 0000000..d556363
--- /dev/null
+++ b/h-source/Application/Views/Users/notice.php
@@ -0,0 +1,94 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; notice
+ </div>
+
+ <?php if ( isset($_SESSION['status']) ) { ?>
+
+ <?php if ( strcmp($_SESSION['status'],'sent') === 0 ) { ?>
+ <div class="confirm_notice">
+ <p>An e-mail has been sent to your mailbox.</p>
+ <p>If you have received no mail, then check inside the spam too</p>
+ <p>Click on the confirmation link in the e-mail in order to confirm the registration of the new account.</p>
+ <p>The confirmation link will expire in a hour.</p>
+ <p>If you don't want to confirm the account registration then wait one hour and your username and e-mail will be deleted from the database.</p>
+ <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p>
+ </div>
+
+ <?php } else if (strcmp($_SESSION['status'],'regerror') === 0) { ?>
+
+ <div class="confirm_notice">
+ <p>Registration failed</p>
+ <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p>
+ </div>
+
+ <?php } else if (strcmp($_SESSION['status'],'sent_new') === 0) { ?>
+
+ <div class="confirm_notice">
+ <p>An e-mail has been sent to your mailbox.</p>
+ <p>If you have received no mail, then check inside the spam too</p>
+ <p>Click on the confirmation link in the e-mail in order to change the password of your account.</p>
+ <p>The confirmation link will expire in a hour.</p>
+ <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p>
+ </div>
+
+ <?php } else if (strcmp($_SESSION['status'],'sent_new_error') === 0) { ?>
+
+ <div class="confirm_notice">
+ <p>Registration failed</p>
+ <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p>
+ </div>
+
+ <?php } else if (strcmp($_SESSION['status'],'sent_new_password') === 0) { ?>
+
+ <div class="confirm_notice">
+ <p>The new password has been sent to you by mail!</p>
+ <p>If you have received no mail, then check inside the spam too</p>
+ <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p>
+ </div>
+
+ <?php } else if (strcmp($_SESSION['status'],'sent_new_password_error') === 0) { ?>
+
+ <div class="confirm_notice">
+ <p>Operation failed</p>
+ <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p>
+ </div>
+
+ <?php } else if (strcmp($_SESSION['status'],'deleted') === 0) { ?>
+
+ <div class="confirm_notice">
+ <p>Your account has been successfully deleted</p>
+ <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p>
+ </div>
+
+ <?php } ?>
+
+ <?php } else { ?>
+
+ <div class="confirm_notice">
+ <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p>
+ </div>
+
+ <?php } ?>
+ </div> \ No newline at end of file