當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Token::check_a方法代碼示例

本文整理匯總了PHP中Token::check_a方法的典型用法代碼示例。如果您正苦於以下問題:PHP Token::check_a方法的具體用法?PHP Token::check_a怎麽用?PHP Token::check_a使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Token的用法示例。


在下文中一共展示了Token::check_a方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Validate

<?php

require_once '../../core/init.php';
if (Input::exists('post')) {
    $validate = new Validate();
    $_POST['mobile'] = (int) Input::get('mobile');
    $_POST['parents_mobile'] = (int) Input::get('parents_mobile');
    $validation = $validate->check($_POST, array('gender' => array('required' => true), 'programme' => array('required' => true), 'Category' => array('required' => true), 'mobile' => array('required' => true, 'min' => 10, 'max' => 10), 'parents_mobile' => array('required' => true, 'min' => 10, 'max' => 10), 'semester' => array('required' => true), 'department' => array('required' => true), 'courses' => array('required' => true), 'total_credits' => array('required' => true), 'hostel_address' => array('required' => true), 'home_address' => array('required' => true)));
    if ($validate->passed() && Token::check_a(Input::get('token'))) {
        $stud = new Student();
        $name = Session::get('displayname');
        $email = Session::get('student_email');
        $scholar_no = Session::get('sn');
        $session = Session::get('semester_session');
        $category = Input::get('Category');
        $gender = Input::get('gender');
        $programme = strtoupper(Input::get('programme'));
        $semester = Input::get('semester');
        $department = Input::get('department');
        $mobile = Input::get('mobile');
        $parents_mobile = Input::get('parents_mobile');
        $courses = Input::get('courses');
        $courses = explode(' ,', $courses);
        $courses = $courses[1];
        $courses_load = strtoupper(Input::get('loadcode1') . ',' . Input::get('loadcode2'));
        $courses_load = rtrim($courses_load, ',');
        $course_credits = Input::get('course_credits');
        $home_address = Input::get('home_address');
        $hostel_address = Input::get('hostel_address');
        $add = $stud->register($email, $name, $gender, $scholar_no, $category, $programme, $semester, $session, $department, $mobile, $parents_mobile, $courses, $courses_load, $home_address, $hostel_address);
        if ($add == 1) {
開發者ID:mkrdip,項目名稱:Management-Information-System,代碼行數:31,代碼來源:registration.php

示例2: Course

<?php

require_once '../../core/init.php';
if (!loggedIn()) {
    die;
}
if (Input::exists('get')) {
    if (Input::get('sem') !== '' && Input::get('dep') !== '' && Token::check_a(Input::get('token'))) {
        $i = 0;
        $c = new Course();
        $courses = $c->getCoursesAvailable(Input::get('sem'), Input::get('dep'));
        if (!empty($courses)) {
            ?>
           <script ></script>
<input id="courses" type="hidden" name="courses" value=" "/>
            <table class="table">
                <tr>
	                <th>S.No.</th>
	                <th>Subject Name</th>
	                <th>Subject Code</th>
	                <th>Credit Point</th>
	                <th>Select</th>
                </tr>
                <?php 
            $i = 1;
            $total_credit = 0;
            while ($course = $courses->fetch_object()) {
                ?>
                <tr>
                <td><?php 
                echo $i;
開發者ID:mkrdip,項目名稱:Management-Information-System,代碼行數:31,代碼來源:semester_courses.php

示例3: Marks

<?php

require_once '../core/init.php';
require_once ROOT_DIR . 'functions/pie.php';
if (!loggedIn() || !Token::check_a(Input::get('token'))) {
    die;
}
if (Input::exists('get')) {
    $m = new Marks();
    $aa = $m->totalNumOfGivenGrade('10', Input::get('cid'), Input::get('did'));
    $ab = $m->totalNumOfGivenGrade('9', Input::get('cid'), Input::get('did'));
    $bb = $m->totalNumOfGivenGrade('8', Input::get('cid'), Input::get('did'));
    $bc = $m->totalNumOfGivenGrade('7', Input::get('cid'), Input::get('did'));
    $cc = $m->totalNumOfGivenGrade('6', Input::get('cid'), Input::get('did'));
    $cd = $m->totalNumOfGivenGrade('5', Input::get('cid'), Input::get('did'));
    $dd = $m->totalNumOfGivenGrade('4', Input::get('cid'), Input::get('did'));
    $f = $m->totalNumOfGivenGrade('0', Input::get('cid'), Input::get('did'));
    createPie3D(array("AA" => $aa, "AB" => $ab, "BB" => $bb, "BC" => $bc, "CC" => $cc, "CD" => $cd, "DD" => $dd, "F/I/X" => $f));
}
開發者ID:mkrdip,項目名稱:Management-Information-System,代碼行數:19,代碼來源:result_pie.php


注:本文中的Token::check_a方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。