Пример #1
0
 /**
  * Reset password
  * @return [type] [description]
  */
 public function password()
 {
     if (!$this->auth_role) {
         // Load resources
         $this->load->model('examples_model');
         /// If IP or posted email is on hold, display message
         if ($on_hold = $this->authentication->current_hold_status(TRUE)) {
             $view_data['disabled'] = 1;
         } else {
             // If the form post looks good
             if ($this->tokens->match && $this->input->post('user_email')) {
                 if ($user_data = $this->examples_model->get_recovery_data($this->input->post('user_email'))) {
                     // Check if user is banned
                     if ($user_data->user_banned == '1') {
                         // Log an error if banned
                         $this->authentication->log_error($this->input->post('user_email', TRUE));
                         // Show special message for banned user
                         $view_data['user_banned'] = 1;
                     } else {
                         /**
                          * Use the string generator to create a random string
                          * that will be hashed and stored as the password recovery key.
                          */
                         $this->load->library('generate_string');
                         $recovery_code = $this->generate_string->set_options(array('exclude' => array('char')))->random_string(64)->show();
                         $hashed_recovery_code = $this->_hash_recovery_code($user_data->user_salt, $recovery_code);
                         // Update user record with recovery code and time
                         $this->examples_model->update_user_raw_data($user_data->user_id, array('passwd_recovery_code' => $hashed_recovery_code, 'passwd_recovery_date' => date('Y-m-d H:i:s')));
                         $view_data['special_link'] = secure_anchor('user/verification/' . $user_data->user_id . '/' . $recovery_code, secure_site_url('user/verification/' . $user_data->user_id . '/' . $recovery_code), 'target ="_blank"');
                         $view_data['confirmation'] = 1;
                     }
                 } else {
                     // Log the error
                     $this->authentication->log_error($this->input->post('user_email', TRUE));
                     $view_data['no_match'] = 1;
                 }
             }
         }
         $data['title'] = "Forgot Password";
         $data['content'] = $this->load->view('forgot', isset($view_data) ? $view_data : NULL, TRUE);
         $this->load->view('html_anon', $data);
     } else {
         //Render access denied page
         show_error('You are not authorized to view this page', '403');
     }
 }
    /**
     * Recursive method takes formatted array of categories and turns it into a menu.
     *
     * @param   array   the current categories array to process
     * @param   string  the path between the top level and the current level (all parents)
     * @param   int     how many levels deep we are in nested lists
     */
    private function _make_category_menu($child, $parents = '', $level)
    {
        if ($level > 0) {
            // Start a submenu list:
            $this->menu .= '<ul class="submenu-level-' . $level . '">';
        }
        // Loop through each child
        foreach ($child as $cat_id => $cat_name) {
            // Display the top level header and start submenu wrapper
            if ($level === 0) {
                $this->menu .= '<h4>' . secure_anchor('category' . strtolower($parents . '/' . $cat_name), $cat_name) . '</h4>
					<div class="submenu-div">
						<div class="submenu-listbox">
				';
            } else {
                // Start a list item
                $this->menu .= '<li>' . secure_anchor('category' . strtolower($parents . '/' . $cat_name), $cat_name);
            }
            // Check for children
            if (isset($this->categories[$cat_id])) {
                // Add parents to URL if applicable
                $new_parents = $parents . '/' . $cat_name;
                // Do recursion with new level:
                $new_level = $level + 1;
                $this->_make_category_menu($this->categories[$cat_id], $new_parents, $new_level);
            }
            // Close the submenu wrapper
            if ($level === 0) {
                $this->menu .= '
						</div>
					</div>
				';
            } else {
                // Complete the list item:
                $this->menu .= '</li>';
            }
        }
        if ($level > 0) {
            // Close a submenu list:
            $this->menu .= '</ul>';
        }
    }
Пример #3
0
 /**
  * View a sheet
  * 
  * @param int $id ID of the sheet to view
  */
 public function view($id = NULL, $redirect = NULL)
 {
     if ($this->require_role('admin')) {
         $sheet = $this->_checkRecord($id);
         $back_url = 'sheets/index';
         if (isset($redirect)) {
             $back_url = "sheets/index/{$redirect}";
         }
         $data = array('title' => "Fiche N°{$id}", 'content' => 'sheets/view', 'sheet' => $sheet, 'back_url' => $back_url, 'redirect' => $redirect);
         if ($sheet) {
             $poll = $this->main_model->getPoll($sheet);
             $respondent = $this->main_model->getRespondent($sheet);
             $geolocation = $this->main_model->getLocation($sheet);
             $answers = $this->main_model->getAnswers($sheet);
             $id_question = false;
             $answers_data = array();
             $question_answers = array();
             $label = $type = false;
             foreach ($answers as $answer) {
                 if ($id_question != $answer->id_question) {
                     if ($id_question) {
                         $answers_data[$label] = $this->load->view('questions/_draw_question_view', array('answers' => $question_answers, 'type' => $type), TRUE);
                     }
                     $id_question = $answer->id_question;
                     $question_answers = array();
                     $label = $answer->q_order . '. ' . $answer->q_description;
                     $type = $answer->q_type;
                 }
                 $question_answers[] = $answer;
             }
             if ($id_question) {
                 $answers_data[$label] = $this->load->view('questions/_draw_question_view', array('answers' => $question_answers, 'type' => $type), TRUE);
             }
             if ($geolocation->latitude) {
                 $latlong = $geolocation->latitude . ',' . $geolocation->longitude;
                 $location = "<img src='https://maps.googleapis.com/maps/api/staticmap?center={$latlong}&zoom=15&size=400x200&maptype=roadmap\n\t\t\t\t\t\t\t&markers=color:blue|{$latlong}'/>";
             } else {
                 $location = $geolocation->error;
             }
             $createdBy = $this->main_model->getCreatedby($sheet);
             $createdByLink = secure_anchor("users/view/" . $createdBy->user_id, strtoupper($createdBy->pms_user_last_name) . " " . ucfirst($createdBy->pms_user_first_name));
             $data['content_data'] = array('sheet_fields' => array('Date' => date('d/m/Y H:i:s', strtotime($sheet->creation_date)), 'Agent' => $createdByLink, 'Remarque' => $sheet->notes, 'Location' => $location), 'respondent_view' => $this->load->view('respondents/_view_for_sheet', array('respondent' => $respondent), TRUE), 'answers_fields' => $answers_data);
             $data['title'] = "Sondage '" . $poll->code . "' - Fiche N°{$id}";
         }
         $this->load->view('global/layout', $data);
     }
 }
echo script_tag('//ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js') . "\n";
// Add any additional javascript
if (isset($javascripts)) {
    for ($x = 0; $x <= count($javascripts) - 1; $x++) {
        echo script_tag($javascripts["{$x}"]) . "\n";
    }
}
?>
</head>
<body>
<div id="alert-bar">&nbsp;</div>
<div class="wrapper">
	<div id="indicator">
		<div>
			<?php 
echo isset($auth_user_name) ? 'Welcome, ' . $auth_user_name . ' &bull; ' . secure_anchor('user', 'User Index') . ' &bull; ' . secure_anchor('user/logout', 'Logout') : secure_anchor('register', 'Register') . ' &bull; ' . secure_anchor(LOGIN_PAGE, 'Login');
?>
		</div>
	</div>
	<div class="width-limiter">
		<div id="logo">
			<?php 
echo anchor('', img(array('src' => 'img/logo.jpg', 'alt' => WEBSITE_NAME))) . "\n";
?>
		</div>
		<div id="two-left" class="content">
			<?php 
echo isset($content) ? $content : '';
?>
		</div>
		<div id="two-right">
Пример #5
0
} else {
    // EXCESSIVE LOGIN ATTEMPTS ERROR MESSAGE
    echo '
			<div style="border:1px solid red;">
				<p>
					Excessive Login Attempts
				</p>
				<p>
					You have exceeded the maximum number of failed login<br />
					attempts that this website will allow.
				<p>
				<p>
					Your access to login and account recovery has been blocked for ' . (int) config_item('seconds_on_hold') / 60 . ' minutes.
				</p>
				<p>
					Please use the ' . secure_anchor('examples/recover', 'Account Recovery') . ' after ' . (int) config_item('seconds_on_hold') / 60 . ' minutes has passed,<br />
					or contact us if you require assistance gaining access to your account.
				</p>
			</div>
		';
}
if ($this->input->get('logout')) {
    echo '
			<div style="border:1px solid green; text-align:center;">
				<p>Bạn đã ngừng kết nối với hệ thống</p>
			</div>
		';
}
?>
 <?php 
/* End of file login_form.php */
			#menu{float:right;width:25%;}
		}
	</style>
</head>
<body>
<div id="menu">
	<ul>
		<li><?php 
if (isset($auth_user_id)) {
    echo secure_anchor('examples/logout', 'Logout');
} else {
    echo secure_anchor(LOGIN_PAGE . '?redirect=examples', 'Login');
}
?>
</li>
		<li>
			<?php 
echo secure_anchor('examples/optional_login_test', 'Optional Login');
?>
		</li>
		<li>
			<?php 
echo secure_anchor('examples/simple_verification', 'Simple Verification');
?>
		</li>
	</ul>
</div>

<?php 
/* End of file page_header.php */
/* Location: /views/examples/page_header.php */
 * @package     Community Auth
 * @author      Robert B Gottier
 * @copyright   Copyright (c) 2011 - 2015, Robert B Gottier. (http://brianswebdesign.com/)
 * @license     BSD - http://www.opensource.org/licenses/BSD-3-Clause
 * @link        http://community-auth.com
 */
?>

<h1>Category Menu</h1>
<p>
	It seems a popular question to ask how to make a menu that is created by categories in a database. It isn't really all that hard to do, but it requires a recursive function. Check the category_menu.php controller to see how the menu is built. You should be able to apply your own custom styling and turn the menu into just about anything you want to see.
</p>

<?php 
echo '<div id="category-menu">
			<h3>' . secure_anchor('category', 'Category Menu') . '</h3>
			' . $category_menu . '
		</div>';
?>
<div style="float:right;width:260px;margin:2em 0 0 0;">
	<table class="simple_table" style="width:260px;">
		<caption style="color:#bf1e2e;font-weight:bold;font-size:100%;">Category Data From Database</caption>
		<thead>
			<tr>
				<th>Category ID</th>
				<th>Category Name</th>
				<th>Parent ID</th>
			</tr>
		</thead>
		<tbody>
}
?>

  <?php 
if (isset($recovery_error)) {
    ?>
    <div class="callout callout-danger">
      <h4>No usable data for account recovery</h4>
      <p>Account recovery links expire after 
        <?php 
    echo (int) config_item('recovery_code_expiration') / (60 * 60);
    ?>
  
        hours.<br />
        You will need to use the <?php 
    echo secure_anchor('user/password', 'Account Recovery');
    ?>
        form to send yourself a new link.
      </p>
    </div>
    <?php 
    $showform = 0;
    ?>
  <?php 
}
?>

  <?php 
if (isset($disabled)) {
    ?>
    <div class="callout callout-danger">
Пример #9
0
 /**
  * View a polls detail
  * 
  * @param int $id ID of the poll to view
  */
 public function view($id = NULL)
 {
     if ($this->require_role('admin,super-agent')) {
         $poll = $this->_checkRecord($id);
         $data = array('title' => "Detail d'un sondage", 'content' => 'polls/view', 'js_to_load' => array('polls.js'), 'poll' => $poll);
         if ($poll) {
             $poll->sheets_count = $this->main_model->countSheets($poll);
             $warning = False;
             $questions = $this->main_model->getQuestionsWithAnswers($poll);
             $data['questions'] = $questions;
             foreach ($questions as $question) {
                 $warning = $warning || $question->warning;
             }
             $data['warning'] = $warning;
             $createdBy = $this->main_model->getCreatedby($poll);
             $createdByLink = secure_anchor("users/view/" . $createdBy->user_id, strtoupper($createdBy->pms_user_last_name) . " " . ucfirst($createdBy->pms_user_first_name));
             $data['content_data'] = array('fields' => array('Code interne' => $poll->code, 'Client' => $poll->customer, 'Libellé' => $poll->label, 'Description' => $poll->description, 'Date de début' => isset($poll->start_date) ? date('d/m/Y', strtotime($poll->start_date)) : '', 'Date de fin' => isset($poll->end_date) ? date('d/m/Y', strtotime($poll->end_date)) : '', 'Nbr maximum de fiches' => $poll->max_surveys_number, 'Actif' => $poll->actif ? 'OUI' : 'NON', 'Date de création' => date('d/m/Y H:i:s', strtotime($poll->creation_date)), 'Dernière modification' => date('d/m/Y H:i:s', strtotime($poll->update_date)), 'Créé par' => $createdByLink));
         }
         $this->load->view('global/layout', $data);
     }
 }
				if you require assistance gaining access to your account.
			</p>
		</div>
	';
} else {
    if (isset($user_banned)) {
        echo '
		<div class="feedback error_message">
			<p class="feedback_header">
				Account locked by ' . WEBSITE_NAME . '.
			</p>
			<p style="margin:.4em 0 0 0;">
				You have attempted to use the password recovery system using 
				an email address that belongs to an account that has been 
				purposely denied access to the authenticated areas of this website. 
				If you feel this is an error, you may ' . secure_anchor('contact', 'Contact') . ' ' . WEBSITE_NAME . ' 
				to make an inquiry regarding the status of the account.
			</p>
		</div>
	';
    } else {
        if (isset($confirmation)) {
            echo '
		<div class="feedback confirmation">
			<p>
				We have sent you an email with instructions on how 
				to recover your username and/or password.
			</p>
		</div>
	';
        } else {
Пример #11
0
                                                      <!-- Brand and toggle get grouped for better mobile display -->
                                              <div class="navbar-header">
                                                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#menu">
                                                    <i class="fa fa-bars"></i>
                                                    </button>
                                              </div>
                                                      <!-- Collect the nav links, forms, and other content for toggling -->
                                                      <div class="collapse navbar-collapse" id="menu">
                                                            <ul class="nav navbar-nav navbar-right">
                                                                  <li class="active"><a href="#intro">Trang chủ</a></li>
																   <li><a href="#service">Dịch vụ</a></li>
                                                                  <li><a href="#works">Chính sách</a></li>
                                                                    <li><a href="#Registra">Đăng ký</a></li>
                                                                  <?php 
if (isset($auth_user_name) && $auth_user_name != '') {
    echo '<li data-toggle="tooltip" data-placement="right" title="Click to Logout">' . secure_anchor('/userauth/logout', 'Chào ' . $auth_user_name) . '</li>';
} else {
    echo '<li><a href="login">Đăng nhập</a></li>';
}
?>
                                                            </ul>
                                                      </div>
                                                      <!-- /.Navbar-collapse -->
                                                </div>
                                          </div>
                                    </div>
                              </div>
                              <!-- /.container -->
                        </nav>
    </div>
    <!-- /Navigation -->
Пример #12
0
Файл: view.php Проект: Assem/PMS
    ?>
	<h1 class="pmsH1">Fiche sondage</h1>
	<?php 
    $this->load->view('global/flash_messages', array('title' => $title));
    ?>
	
	<?php 
    if ($warning) {
        ?>
		<img class="action-icon" src="/assets/img/warning.png" title="Des questions sans réponses!" />
	<?php 
    }
    ?>
	
	<?php 
    echo secure_anchor('sheets/index/poll-' . $poll->id, $poll->sheets_count . ' Fiches', array('title' => 'Consulter les fiches', 'class' => 'counter_link'));
    ?>
	
	<div class="view-menu">
		<?php 
    echo drawActionsMenuItem('polls/edit/' . $poll->id, 'edit.png', 'Editer');
    ?>
		<?php 
    echo drawActionsMenuItem('polls/stats/' . $poll->id, 'charts.png', 'Statistiques');
    ?>
		<?php 
    echo drawActionsMenuItem('polls/delete/' . $poll->id, 'delete.png', 'Supprimer', 'delete-action');
    ?>
		<div style='text-align: left; float:left'>
			<?php 
    echo drawActionsMenuItem('sheets/delete_all/' . $poll->id, 'delete-all.png', 'Supprimer toutes les fiches', 'delete-all-action');
				</p>
				<ul>
					' . $validation_errors . '
				</ul>
				<p>
					USER NOT REGISTERED
				</p>
			</div>
		';
    }
    // CONFIRMATION MESSAGE - TYPE 1 *********************
    if (isset($validation_passed) && $reg_mode == 1) {
        echo '
			<div class="feedback confirmation">
				<p>
					Thank you for registering. You may now ' . secure_anchor(LOGIN_PAGE, 'login') . '.
				</p>
			</div>
		';
    }
    // CONFIRMATION MESSAGE - TYPE 2 *********************
    if (isset($validation_passed) && $reg_mode == 2) {
        echo '
			<div class="feedback confirmation">
				<p>
					Please check your email to confirm your account.<br />
					Click the link contained in the email.
				</p>
			</div>
		';
    }
Пример #14
0
        ?>
</a></li>
		<?php 
    }
    ?>
	</ul>
	<?php 
    foreach ($polls as $poll) {
        ?>
		<div id="<?php 
        echo $poll->id;
        ?>
">
			<div class="map-header">
				<?php 
        echo secure_anchor('polls/view/' . $poll->id, $poll->label) . $poll->show_count;
        ?>
			</div>
			<div class="map-canvas" id="<?php 
        echo $poll->id . "-map";
        ?>
"></div>
		</div>
	<?php 
    }
    ?>
</div>
<?php 
} else {
    ?>
	<h3>Pas sondages encours!</h3>
Пример #15
0
<div id="menu">
	<ul>
		<li><?php 
if (isset($auth_user_id)) {
    echo secure_anchor('examples/logout', 'Logout');
} else {
    echo secure_anchor(LOGIN_PAGE . '?redirect=examples', 'Login');
}
?>
</li>
		<li>
			<?php 
echo secure_anchor('examples/optional_login_test', 'Optional Login');
?>
		</li>
		<li>
			<?php 
echo secure_anchor('examples/simple_verification', 'Simple Verification');
?>
		</li>
		<li>
			<?php 
echo secure_anchor('examples/create_user', 'Create User');
?>
		</li>
	</ul>
</div>

<?php 
/* End of file page_header.php */
/* Location: /views/examples/page_header.php */
Пример #16
0
Файл: menu.php Проект: Assem/PMS
					<li <?php 
    echo $active_controller == 'users' ? 'class="active"' : '';
    ?>
><?php 
    echo secure_anchor('users/index', 'Utilisateurs');
    ?>
</li>
					<li <?php 
    echo $active_controller == 'settings' ? 'class="active"' : '';
    ?>
><?php 
    echo secure_anchor('settings/index', 'Configurations');
    ?>
</li>
				<?php 
}
?>
				<li class="logout"><?php 
echo secure_anchor('users/logout', 'Déconnexion');
?>
</li>
			</ul>
			<span class="welcome-span"><?php 
echo "Bonjour [{$auth_user_name}] {$auth_last_name} {$auth_first_name}";
?>
</span>
		</div>
		<!-- /.navbar-collapse -->
	</div>
	<!-- /.container -->
</nav>
Пример #17
0
Файл: edit.php Проект: Assem/PMS
    ?>
		<?php 
    echo drawActionsMenuItem('questions/delete/' . $question->id, 'delete.png', 'Supprimer', 'delete-action');
    ?>
	</div>
	
	<?php 
    echo form_open('questions/edit/' . $question->id);
    ?>
	<?php 
    drawModelData($fields, 2, 'edit-form');
    ?>
	
	<div id="generate_yes_no" style="display: none; float: right;">
		<?php 
    echo secure_anchor('answers/add_yes_no/' . $question->id, '<input type="button" id="generate_yes_no_button" name="generate_yes_no_button" title="Générer OUI/NON réponses" value="+ OUI/NON" class="submit-button"/>');
    ?>
	</div>
	
	<div class="required-notice">* Champ obligatoire</div>
	<?php 
    echo form_submit('submit', 'Enregistrer', array('class' => 'submit-button'));
    ?>
	<?php 
    echo form_reset('reset', 'Réinitialiser', array('class' => 'submit-button'));
    ?>
	
	<?php 
    if ($question->type != 'free_text') {
        $this->load->view('answers/_list', array('question' => $question, 'answers' => $answers, 'action' => 'edit'));
    }
 * Community Auth - Registration Confirmation Email View
 *
 * Community Auth is an open source authentication application for CodeIgniter 2.2.2
 *
 * @package     Community Auth
 * @author      Robert B Gottier
 * @copyright   Copyright (c) 2011 - 2015, Robert B Gottier. (http://brianswebdesign.com/)
 * @license     BSD - http://www.opensource.org/licenses/BSD-3-Clause
 * @link        http://community-auth.com
 */
?>

<h1>Registration Confirmation</h1>
<p>
	This email contains a link to confirm your email address, 
	which is part of the registration process for an account 
	at <?php 
echo WEBSITE_NAME;
?>
. Please click the following 
	link below to confirm your registration.
	<br />
	<br />
	<?php 
echo secure_anchor('register/email_confirmation/' . $registration_id, secure_base_url() . 'register/email_confirmation/' . $registration_id, 'target ="_blank" style="color: orange; text-decoration: none;"');
?>
</p>

<?php 
/* End of file registration-confirmation-registrant.php */
/* Location: /application/views/email_templates/registration-confirmation-registrant.php */
Пример #19
0
foreach ($geolocations as $geolocation) {
    ?>
					<tr style="border-color: gray;">
						<td>
							<?php 
    echo date('d/m/Y H:i:s', strtotime($geolocation->creation_date));
    ?>
						</td>
						<td>
							<?php 
    echo secure_anchor("users/view/" . $geolocation->id_user, strtoupper($geolocation->pms_user_last_name) . " " . ucfirst($geolocation->pms_user_first_name));
    ?>
						</td>
						<td>
							<?php 
    echo secure_anchor("sheets/view/" . $geolocation->id_sheet, $geolocation->id_sheet);
    ?>
						</td>
						<td>
							<?php 
    echo $geolocation->error;
    ?>
						</td>
					</tr>
				<?php 
}
?>
			</tbody>
		</table>
	</div>
</div>
			<div id="submit_box">
				<input type="submit" name="submit" value="Login" id="submit_button"  />
			</div>
		</div>
	</div>
</form>

<?php 
} else {
    // EXCESSIVE LOGIN ATTEMPTS ERROR MESSAGE
    echo '
			<div class="feedback error_message">
				<p class="feedback_header">
					Excessive Login Attempts
				</p>
				<p style="margin:.4em 0 0 0;">
					You have exceeded the maximum number of failed login<br />
					attempts that the ' . WEBSITE_NAME . ' website will allow.
				<p>
				<p style="margin:.4em 0 0 0;">
					Your access to login and account recovery has been blocked for ' . (int) config_item('seconds_on_hold') / 60 . ' minutes.
				</p>
				<p style="margin:.4em 0 0 0;">
					Please use the ' . secure_anchor('user/recover', 'Account Recovery') . ' after ' . (int) config_item('seconds_on_hold') / 60 . ' minutes has passed,<br />
					or ' . secure_anchor('contact', 'Contact') . ' ' . WEBSITE_NAME . '  if you require assistance gaining access to your account.
				</p>
			</div>
		';
}
/* End of file login_form.php */
/* Location: /application/views/auth/login_form.php */
		</div>
	</fieldset>
	<fieldset>
		<legend>Profile Image</legend>
		<div class="profile_image">
			<?php 
// PROFILE IMAGE
echo img(!empty($user_data->profile_image) ? $user_data->profile_image : 'img/default-profile-image.jpg', FALSE, $upload_destination == 'database' && !empty($user_data->profile_image) ? TRUE : FALSE);
// DELETE PROFILE IMAGE LINK
$attrs['id'] = 'delete-profile-image';
// If there is no profile image uploaded, hide the delete link
if (empty($user_data->profile_image)) {
    $attrs['style'] = 'display:none;';
}
echo '<br />' . secure_anchor('user/delete_profile_image', 'Delete Profile Image', $attrs);
// Get upload config array for display to user
$upload_config = config_item('upload_configuration_profile_image');
?>
		</div>
		<div id="upload_details">
			<table class="simple_table">
				<caption>Upload Requirements</caption>
				<tbody>
					<tr>
						<td>Max Image File Size</td>
						<td class="align-right"><?php 
echo $upload_config['max_size'];
?>
 kb</td>
					</tr>
 * @author      Robert B Gottier
 * @copyright   Copyright (c) 2011 - 2015, Robert B Gottier. (http://brianswebdesign.com/)
 * @license     BSD - http://www.opensource.org/licenses/BSD-3-Clause
 * @link        http://community-auth.com
 */
?>

<h1>User Account Recovery</h1>
<p>
	This email contains a link to recover your username and 
	password for <?php 
echo WEBSITE_NAME;
?>
. If you are trying to 
	login to <?php 
echo WEBSITE_NAME;
?>
, and cannot remember your 
	username or password, please click on the link below. If you 
	did not request to recover your login information, please 
	respond to this message so we can check your account.
</p>
<p>
	<?php 
echo secure_anchor('user/recovery_verification/' . $user_data->user_id . '/' . $recovery_code, secure_base_url() . 'user/recovery_verification/' . $user_data->user_id . '/' . $recovery_code, 'target ="_blank" style="color: orange; text-decoration: none;"');
?>
</p>

<?php 
/* End of file user-recovery.php */
/* Location: /application/views/email_templates/user-recovery.php */
Пример #23
0
</h1>
	<?php 
    echo secure_anchor('sheets/index/poll-' . $poll->id, $poll->sheets_count . ' Fiches au total', array('title' => 'Consulter les fiches', 'class' => 'counter_link'));
    ?>
	<div class="view-menu">
		<?php 
    echo drawActionsMenuItem('polls/view/' . $poll->id, 'back.png', 'Revenir');
    ?>
	</div>
	<?php 
    foreach ($graphs_data as $question) {
        ?>
		<div class="question_stats">
			<h4 class="question_tilte">
				<?php 
        echo secure_anchor('questions/view/' . $question['details']->id, $question['details']->order . '.' . $question['details']->description);
        if ($question['details']->required) {
            echo '<font color="red">*</font>';
        }
        ?>
			</h4>
			
			<div class="graph_holder" id="q_<?php 
        echo $question['details']->id;
        ?>
">
			</div>
		</div>
	<?php 
    }
    ?>
</li>
</ul>
<h2>Installation</h2>
<p>
	<b>Installation of Community Auth is super easy.</b> Most of the installation of Community Auth is the same as <a href="http://codeigniter.com/user_guide/installation/index.html" rel="external">installing CodeIgniter</a>. The main difference is that you must create and populate a MySQL database for Community Auth, while CodeIgniter does not require this during installation. Because CodeIgniter installation by itself can be problematic, please go to the <a href="http://forum.codeigniter.com" rel="external">CodeIgniter Forum</a> and ask for help if are having problems.
</p>
<p>
	Note: You will not need to create a session table when you install CodeIgniter. The Community Auth installer creates the session table whether you use it or not. Also, having tables in an existing database will cause the Community Auth installer to fail. If you have an existing application and existing tables, you would need to backup your database, wipe it clean, run the Community Auth installer, then add your tables back to the database. It sounds like a pain, but your decision to install an authentication library or application as an afterthought has brought about this unfortunate scenario.
</p>
<h3>Run Init Controller</h3>
<p>
	If you haven't done so already, edit the authentication config file located at <b>/application/config/authentication.php</b> in your text editor. Set the <b>Disable Installer</b> setting to FALSE.
</p>
<p>
	Browse to the <?php 
echo secure_anchor('init', 'init controller');
?>
, and use the interface to populate your database with tables, create your admin, or create a set of test users.
</p>
<p style="color:red;font-weight:bold;">
	Please disable or remove the init controller <br />and the sql file when you are finished.<br />Change the Disable Installer setting back to TRUE.
</p>
<p style="font-size:85%;">
	You might consider running the installer in maintenance mode. By doing this, regular site visitors will not see the warning in the alert bar.
<p>
<h3>Final Installation Notes</h3>
<p>
	The <b>/application/config/config.php</b> configuration file distributed with Community Auth has the 'index_page' setting set as blank, which is not the default setting for CodeIgniter, but is set that way because of Community Auth's attempt to utilize mod_rewrite for the removal of 'index.php' from all URLs. If you don't have mod_rewrite enabled and you experience problems with installation or usage, you should change the value of 'index_page' back to 'index.php'.
</p>
<p>
	Support for Apache configuration settings, mod_rewrite, or other server configuration is out of the scope of the documentation for Community Auth. Again, please go to the <a href="http://forum.codeigniter.com" rel="external">CodeIgniter Forum</a> and ask for help if are having problems, since these types of problems are more related to CodeIgniter installation than Community Auth installation. 
Пример #25
0
			</p>
		</div>
	';
    $showform = 0;
}
if (isset($recovery_error)) {
    echo '
		<div style="border:1px solid red;">
			<p>
				No usable data for account recovery.
			</p>
			<p>
				Account recovery links expire after 
				' . (int) config_item('recovery_code_expiration') / (60 * 60) . ' 
				hours.<br />You will need to use the 
				' . secure_anchor('examples/recover', 'Account Recovery') . ' form 
				to send yourself a new link.
			</p>
		</div>
	';
    $showform = 0;
}
if (isset($disabled)) {
    echo '
		<div style="border:1px solid red;">
			<p>
				Account recovery is disabled.
			</p>
			<p>
				You have exceeded the maximum login attempts or exceeded the 
				allowed number of password recovery attempts. 
        echo '
		<div class="feedback error_message">
			<p class="feedback_header">
				' . ucfirst($type) . ' Creation Contained The Following Errors:
			</p>
			<ul>
				' . $validation_errors . '
			</ul>
			<p>
				' . strtoupper($type) . ' NOT CREATED
			</p>
		</div>
	';
    }
}
if (isset($level, $type)) {
    echo $user_creation_form;
} else {
    echo '
		<p>Please choose a user type to create:</p>
		<ul class="std-list">
	';
    foreach ($roles as $k => $v) {
        if ($k < $auth_level) {
            echo '<li>' . secure_anchor('administration/create_user/' . $v, $v) . '</li>';
        }
    }
    echo '</ul>';
}
/* End of file create_user.php */
/* Location: /application/views/administration/create_user.php */
Пример #27
0
 /**
  * User recovery form
  */
 public function recover()
 {
     // Load resources
     $this->load->model('examples_model');
     /// If IP or posted email is on hold, display message
     if ($on_hold = $this->authentication->current_hold_status(TRUE)) {
         $view_data['disabled'] = 1;
     } else {
         // If the form post looks good
         if ($this->tokens->match && $this->input->post('user_email')) {
             if ($user_data = $this->examples_model->get_recovery_data($this->input->post('user_email'))) {
                 // Check if user is banned
                 if ($user_data->user_banned == '1') {
                     // Log an error if banned
                     $this->authentication->log_error($this->input->post('user_email', TRUE));
                     // Show special message for banned user
                     $view_data['user_banned'] = 1;
                 } else {
                     /**
                      * Use the string generator to create a random string
                      * that will be hashed and stored as the password recovery key.
                      */
                     $this->load->library('generate_string');
                     $recovery_code = $this->generate_string->set_options(array('exclude' => array('char')))->random_string(64)->show();
                     // Update user record with recovery code and time
                     $this->examples_model->update_user_raw_data($user_data->user_id, array('passwd_recovery_code' => $this->authentication->hash_passwd($recovery_code), 'passwd_recovery_date' => date('Y-m-d H:i:s')));
                     $view_data['special_link'] = secure_anchor('examples/recovery_verification/' . $user_data->user_id . '/' . $recovery_code, secure_site_url('examples/recovery_verification/' . $user_data->user_id . '/' . $recovery_code), 'target ="_blank"');
                     $view_data['confirmation'] = 1;
                 }
             } else {
                 // Log the error
                 $this->authentication->log_error($this->input->post('user_email', TRUE));
                 $view_data['no_match'] = 1;
             }
         }
     }
     echo $this->load->view('examples/page_header', '', TRUE);
     echo $this->load->view('examples/recover_form', isset($view_data) ? $view_data : '', TRUE);
     echo $this->load->view('examples/page_footer', '', TRUE);
 }
			</p>
		</div>
	';
    $showform = 0;
}
if (isset($disabled)) {
    echo '
		<div class="feedback error_message">
			<p class="feedback_header">
				Account recovery is disabled.
			</p>
			<p style="margin:.4em 0 0 0;">
				You have exceeded the maximum login attempts or exceeded the 
				allowed number of password recovery attempts. 
				Please wait ' . (int) config_item('seconds_on_hold') / 60 . ' 
				minutes, or ' . secure_anchor('contact', 'Contact') . ' ' . WEBSITE_NAME . ' 
				if you require assistance gaining access to your account.
			</p>
		</div>
	';
    $showform = 0;
}
if ($showform == 1) {
    if (isset($user_name, $recovery_code, $user_id)) {
        if (isset($display_instructions)) {
            echo '
				<p>
					Your login user name is <i>' . $user_name . '</i><br />
					Please write this down, and change your password now:
				</p>
			';
Пример #29
0
Файл: view.php Проект: Assem/PMS
if (!$user) {
    ?>
	<div class="alert alert-danger">
        <a href="#" class="close" data-dismiss="alert">&times;</a>
        <strong>Erreur! </strong>Utilisateur introuvable!
    </div>
<?php 
} else {
    ?>
	<h1 class="pmsH1">Fiche utilisateur</h1>
	<?php 
    $this->load->view('global/flash_messages', array('title' => $title));
    ?>
	<?php 
    echo secure_anchor('sheets/index/user-' . $user->user_id, $user->sheets_number . ' Fiches', array('title' => 'Consulter les fiches', 'class' => 'counter_link'));
    ?>
	<div class="view-menu">
		<?php 
    echo drawActionsMenuItem('users/edit/' . $user->user_id, 'edit.png', 'Editer');
    ?>
		<?php 
    echo drawActionsMenuItem('users/delete/' . $user->user_id, 'delete.png', 'Supprimer', 'delete-action');
    ?>
	</div>
	<?php 
    drawModelData($fields, 2, 'view-form');
    ?>
	
	<div id="positions_map">
		<h3>Dernière position</h3>
    echo $this->uri->segment(2) == 'settings' ? secure_anchor('register/settings', 'Registration Mode', array('id' => 'active')) : secure_anchor('register/settings', 'Registration Mode');
    echo '</li>';
    echo '<li>';
    echo $this->uri->segment(2) == 'deny_access' ? secure_anchor('administration/deny_access', 'Deny Access', array('id' => 'active')) : secure_anchor('administration/deny_access', 'Deny Access');
    echo '</li>';
}
// If any user is logged in
if (isset($auth_level)) {
    echo '<li>';
    echo $this->uri->segment(2) == 'uploader_controls' ? secure_anchor('custom_uploader/uploader_controls', 'Custom Uploader', array('id' => 'active')) : secure_anchor('custom_uploader/uploader_controls', 'Custom Uploader');
    echo '</li>';
    echo '<li>';
    echo $this->uri->segment(1) == 'auto_populate' ? secure_anchor('auto_populate', 'Auto Populate', array('id' => 'active')) : secure_anchor('auto_populate', 'Auto Populate');
    echo '</li>';
    echo '<li>';
    echo $this->uri->segment(1) == 'category_menu' ? secure_anchor('category_menu', 'Category Menu', array('id' => 'active')) : secure_anchor('category_menu', 'Category Menu');
    echo '</li>';
}
?>
				</ul>
			</div>
		</div>
		<div class="content">
			<?php 
echo isset($content) ? $content : '';
?>
		</div>
		<div class="push">&nbsp;</div>
	</div>
</div>
<div class="footer">