当前位置: 首页>>代码示例>>PHP>>正文


PHP secure_anchor函数代码示例

本文整理汇总了PHP中secure_anchor函数的典型用法代码示例。如果您正苦于以下问题:PHP secure_anchor函数的具体用法?PHP secure_anchor怎么用?PHP secure_anchor使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了secure_anchor函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: password

 /**
  * 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');
     }
 }
开发者ID:rajuyohannan,项目名称:codeigniter-admin,代码行数:50,代码来源:User.php

示例2: _make_category_menu

    /**
     * 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>';
        }
    }
开发者ID:Osub,项目名称:Community-Auth-For-CodeIgniter-3,代码行数:49,代码来源:category_menu.php

示例3: view

 /**
  * 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);
     }
 }
开发者ID:Assem,项目名称:PMS,代码行数:52,代码来源:Sheets.php

示例4: script_tag

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">
开发者ID:Osub,项目名称:Community-Auth-For-CodeIgniter-3,代码行数:31,代码来源:installation_template.php

示例5: config_item

} 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 */
开发者ID:ducthang128,项目名称:VPS_v2,代码行数:31,代码来源:login_form.php

示例6: secure_anchor

			#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 */
开发者ID:luisnarro,项目名称:codeigniterDartProjectGitHub,代码行数:31,代码来源:page_header.php

示例7: secure_anchor

 * @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>
开发者ID:Osub,项目名称:Community-Auth-For-CodeIgniter-3,代码行数:30,代码来源:category_menu.php

示例8: echo

}
?>

  <?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">
开发者ID:rajuyohannan,项目名称:codeigniter-admin,代码行数:31,代码来源:verfication.php

示例9: view

 /**
  * 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);
     }
 }
开发者ID:Assem,项目名称:PMS,代码行数:26,代码来源:Polls.php

示例10: secure_anchor

				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 {
开发者ID:Osub,项目名称:Community-Auth-For-CodeIgniter-3,代码行数:31,代码来源:recover_form.php

示例11: secure_anchor

                                                      <!-- 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 -->
开发者ID:ducthang128,项目名称:VPS_v2,代码行数:31,代码来源:welcome_message.php

示例12: array

    ?>
	<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');
开发者ID:Assem,项目名称:PMS,代码行数:31,代码来源:view.php

示例13: secure_anchor

				</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>
		';
    }
开发者ID:Osub,项目名称:Community-Auth-For-CodeIgniter-3,代码行数:31,代码来源:registration_form.php

示例14: foreach

        ?>
</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>
开发者ID:Assem,项目名称:PMS,代码行数:31,代码来源:index.php

示例15: secure_anchor

<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 */
开发者ID:railsgem,项目名称:htdocs,代码行数:31,代码来源:page_header.php


注:本文中的secure_anchor函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。