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


PHP get_persondata函数代码示例

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


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

示例1: is_user_logged_in

/**
 * Checks if a visitor is logged in or not.
 * 
 * @since 6.2.10
 * @return boolean
 */
function is_user_logged_in()
{
    $person = get_person_by('personID', get_persondata('personID'));
    if ('' != $person->personID) {
        return true;
    }
    return false;
}
开发者ID:parkerj,项目名称:eduTrac-SIS,代码行数:14,代码来源:auth-function.php

示例2: unlink

    $file3 = $app->config('cookies.savepath') . 'cookies.' . $vars3['data'];
    if (file_exists($file3)) {
        unlink($file3);
    }
    $app->cookies->remove("SWITCH_USERNAME");
    /**
     * After the login as user cookies have been
     * removed from the server and the browser,
     * we need to set fresh cookies for the
     * original logged in user.
     */
    if (isset($_COOKIE['ET_REMEMBER']) && $app->cookies->getSecureCookie('ET_REMEMBER') === 'rememberme') {
        $app->cookies->setSecureCookie('ET_COOKNAME', $id, _h(get_option('cookieexpire')) !== '' ? _h(get_option('cookieexpire')) : $app->config('cookie.lifetime'));
    } else {
        $app->cookies->setSecureCookie('ET_COOKNAME', $id, $app->config('cookie.lifetime') !== '' ? $app->config('cookie.lifetime') : 86400);
    }
    redirect(get_base_url() . 'dashboard' . '/');
});
$app->get('/logout/', function () {
    etsis_logger_activity_log_write('Authentication', 'Logout', get_name(get_persondata('personID')), get_persondata('uname'));
    /**
     * This function is documented in app/functions/auth-function.php.
     * 
     * @since 6.2.0
     */
    etsis_clear_auth_cookie();
    redirect(get_base_url() . 'login' . '/');
});
$app->setError(function () use($app) {
    $app->view->display('error/404', ['title' => '404 Error']);
});
开发者ID:parkerj,项目名称:eduTrac-SIS,代码行数:31,代码来源:index.router.php

示例3: date

	                        <input class="form-control" type="text" name="weekly_hours" id="weekly_hours" />
		                </div>
		            </div>
		            <!-- // Group END -->
		           	</div>
		           	</div>
				</div>
				<!-- // Modal body END -->
				<!-- Modal footer -->
				<div class="modal-footer">
					<input type="hidden" name="addDate" value="<?php 
echo date('Y-m-d');
?>
" />
                    <input type="hidden" name="addedBy" value="<?php 
echo get_persondata('personID');
?>
" />
		        	<button type="submit" class="btn btn-default"><?php 
echo _t('Submit');
?>
</button>
					<a href="#" class="btn btn-primary" data-dismiss="modal"><?php 
echo _t('Cancel');
?>
</a>
				</div>
				<!-- // Modal footer END -->
			</div>
		</div>
		</form>
开发者ID:parkerj,项目名称:eduTrac-SIS,代码行数:31,代码来源:jobs.php

示例4: get_persondata

     $clone->courseShortTitle = $crse->courseShortTitle;
     $clone->preReq = $crse->preReq;
     $clone->allowAudit = $crse->allowAudit;
     $clone->allowWaitlist = $crse->allowWaitlist;
     $clone->minEnroll = $crse->minEnroll;
     $clone->seatCap = $crse->seatCap;
     $clone->startDate = $crse->startDate;
     $clone->currStatus = $crse->currStatus;
     $clone->statusDate = $app->db->NOW();
     $clone->approvedDate = $app->db->NOW();
     $clone->approvedBy = get_persondata('personID');
     if ($clone->save()) {
         $ID = $clone->lastInsertId();
         etsis_cache_flush_namespace('crse');
         $app->flash('success_message', $flashNow->notice(200));
         etsis_logger_activity_log_write('New Record', 'Cloned Course', $crse->courseCode, get_persondata('uname'));
         redirect(get_base_url() . 'crse' . '/' . (int) $ID . '/');
     } else {
         $app->flash('error_message', $flashNow->notice(409));
         redirect($app->req->server['HTTP_REFERER']);
     }
 });
 $app->post('/dept/', function () use($app) {
     etsis_cache_flush_namespace('dept');
     $dept = $app->db->department();
     foreach ($_POST as $k => $v) {
         $dept->{$k} = $v;
     }
     $dept->save();
     $ID = $dept->lastInsertId();
     $department = $app->db->department()->where('deptID = ?', $ID);
开发者ID:parkerj,项目名称:eduTrac-SIS,代码行数:31,代码来源:course.router.php

示例5: _t

?>
" class="glyphicons home"><i></i><?php 
echo _t('Home');
?>
</a></li>
				<?php 
if (is_user_logged_in()) {
    ?>
				<li class="dropdown dd-1">
					<a href="" data-toggle="dropdown" class="glyphicons show_lines"><i></i><?php 
    echo _t('My Menu');
    ?>
 <span class="caret"></span></a>
					<ul class="dropdown-menu pull-left">
						<li<?php 
    echo checkStuMenuAccess(get_persondata('personID'));
    ?>
 class="dropdown submenu">
                            <a data-toggle="dropdown" class="dropdown-toggle glyphicons chevron-right"><i></i><?php 
    echo _t('Student');
    ?>
</a>
                            <ul class="dropdown-menu submenu-show submenu-hide pull-right">
                                <li<?php 
    echo ml('booking_module');
    ?>
><a href="<?php 
    echo get_base_url();
    ?>
stu/timetable/"><?php 
    echo _t('Timetable');
开发者ID:parkerj,项目名称:eduTrac-SIS,代码行数:31,代码来源:default.layout.php

示例6: exit

if (!defined('BASE_PATH')) {
    exit('No direct script access allowed');
}
/**
 * myeduTrac Student Schedule View
 *  
 * @license GPLv3
 * 
 * @since       4.3
 * @package     eduTrac SIS
 * @author      Joshua Parker <joshmac3@icloud.com>
 */
$app = \Liten\Liten::getInstance();
$app->view->extend('_layouts/myet/' . _h(get_option('myet_layout')) . '.layout');
$app->view->block('myet');
$stu = get_student(get_persondata('personID'));
?>

<div class="col-md-12">
    
    <?php 
get_stu_header($stu->stuID);
?>
    
    <div class="separator line bottom"></div>

	<h3 class="glyphicons calendar"><i></i><?php 
echo _h($schedule[0]['termCode']);
?>
 <?php 
echo _t('Schedule');
开发者ID:parkerj,项目名称:eduTrac-SIS,代码行数:31,代码来源:schedule.php

示例7: get_persondata

         * 
         * @since 6.1.00
         * @return mixed
         */
        $app->hook->do_action('myet_student_course_registration');
        // Flash messages for success or error
        if ($ID > 0) {
            $st = $app->db->stu_acad_cred()->select('courseSection')->where('stuID = ?', get_persondata('personID'))->_and_()->where('LastUpdate = ?', $now);
            $qry = $st->find(function ($data) {
                $array = [];
                foreach ($data as $d) {
                    $array[] = $d;
                }
                return $array;
            });
            if (count($qry[0]['courseSection']) > 0) {
                if (get_option('registrar_email_address') != '') {
                    $email->course_registration(get_persondata('personID'), $_POST['termCode'], get_base_url());
                }
            }
            etsis_cache_flush_namespace('student_account');
            $app->flash('success_message', $flashNow->notice(200));
        } else {
            $app->flash('error_message', $flashNow->notice(409));
        }
        redirect($app->req->server['HTTP_REFERER']);
    });
});
$app->setError(function () use($app) {
    $app->view->display('error/404', ['title' => '404 Error']);
});
开发者ID:parkerj,项目名称:eduTrac-SIS,代码行数:31,代码来源:courses.router.php

示例8: etsis_desktop_notify

/**
 * Desktop Notifications
 * 
 * Used to pass notifications to the desktop.
 * 
 * @since 6.2.11
 * @param string $title Give title of notification.
 * @param string $message Message that should be displayed.
 * @param bool $hide True if notification hides automatically.
 */
function etsis_desktop_notify($title, $message, $hide = 'true')
{
    $app = \Liten\Liten::getInstance();
    $script = "<script type=\"text/javascript\">\n                \$(function(){\n                    PNotify.desktop.permission();\n                    (new PNotify({\n                        title: '{$title}',\n                        text: '{$message}',\n                        addclass: 'growl',\n                        styling: 'fontawesome',\n                        width: \"400px\",\n                        type: \"notice\",\n                        shadow: true,\n                        hide: {$hide},\n                        delay: 200000,\n                        desktop: {\n                            desktop: true,\n                            fallback: true,\n                            icon: '" . getSchoolPhoto(get_persondata('personID'), get_persondata('email')) . "'\n                        },\n                        mobile: {\n                            swipe_dismiss: true,\n                            styling: true\n                        }\n                    }));\n                });\n            </script>";
    return $app->hook->apply_filter('pnotify', $app->flash('pnotify', $script));
}
开发者ID:parkerj,项目名称:eduTrac-SIS,代码行数:16,代码来源:notify-function.php

示例9: getJobID

function getJobID()
{
    $app = \Liten\Liten::getInstance();
    $job = $app->db->staff_meta()->select('jobID')->where('staffID = ?', get_persondata('personID'))->_and_()->where('hireDate = (SELECT MAX(hireDate) FROM staff_meta WHERE staffID = ?)', get_persondata('personID'))->findOne();
    return _h($job->jobID);
}
开发者ID:parkerj,项目名称:eduTrac-SIS,代码行数:6,代码来源:db-function.php

示例10: elseif

     } elseif (count($q[0]['staffID']) <= 0) {
         $app->view->display('error/404', ['title' => '404 Error']);
     } else {
         $app->view->display('hr/add', ['title' => 'Add Position', 'cssArray' => $css, 'jsArray' => $js, 'job' => $q]);
     }
 });
 $app->match('GET|POST', '/positions/(\\d+)/', function ($id) use($app, $css, $js, $flashNow) {
     if ($app->req->isPost()) {
         $position = $app->db->staff_meta();
         foreach ($_POST as $k => $v) {
             $position->{$k} = $v;
         }
         $position->where('sMetaID = ?', _filter_input_int(INPUT_POST, 'sMetaID'));
         if ($position->update()) {
             $app->flash('success_message', $flashNow->notice(200));
             etsis_logger_activity_log_write('Update Record', 'Job Position', get_name($id), get_persondata('uname'));
         } else {
             $app->flash('error_message', $flashNow->notice(409));
         }
         redirect($app->req->server['HTTP_REFERER']);
     }
     $jobs = $app->db->staff_meta()->select('staff_meta.*,b.title,b.hourly_wage')->select('b.weekly_hours,c.grade')->_join('job', 'staff_meta.jobID = b.ID', 'b')->_join('pay_grade', 'b.pay_grade = c.ID ', 'c')->where('staff_meta.staffID = ?', $id);
     $q = $jobs->find(function ($data) {
         $array = [];
         foreach ($data as $d) {
             $array[] = $d;
         }
         return $array;
     });
     /**
      * If the database table doesn't exist, then it
开发者ID:parkerj,项目名称:eduTrac-SIS,代码行数:31,代码来源:hr.router.php

示例11:

                <?php 
    }
}
?>
				</tbody>
				<!-- // Table body END -->
				
			</table>
			<!-- // Table END -->
            
            <hr class="separator" />
    			
			<!-- Form actions -->
			<div class="form-actions">
				<?php 
if ($grade[0]['facID'] == get_persondata('personID') || $acl->userHasRole(8) || hasPermission('submit_final_grades')) {
    ?>
			    <?php 
    if ($grade[0]['stuID'] != '') {
        ?>
			    <input type="hidden" name="attCredit" value="<?php 
        echo _h($grade[0]['minCredit']);
        ?>
" />
			    <input type="hidden" name="courseSecID" value="<?php 
        echo _h($grade[0]['courseSecID']);
        ?>
" />
				<button type="submit" class="btn btn-icon btn-primary glyphicons circle_ok"><i></i><?php 
        echo _t('Submit');
        ?>
开发者ID:parkerj,项目名称:eduTrac-SIS,代码行数:31,代码来源:section-fgrade.php

示例12: redirect

     } else {
         $app->flash('error_message', $flashNow->notice(409));
     }
     redirect($app->req->server['HTTP_REFERER']);
 });
 $app->get('/deleteSTAC/(\\d+)/', function ($id) use($app, $flashNow) {
     $q = $app->db->query("DELETE \n\t\t\t\t\t\ta.*,b.*,c.* \n\t\t\t\t\t\tFROM transfer_credit a \n\t\t\t\t\t\tLEFT JOIN stu_acad_cred b ON a.stuAcadCredID = b.stuAcadCredID  \n\t\t\t\t\t\tLEFT JOIN stu_course_sec c ON b.stuID = c.stuID AND b.courseSecID = c.courseSecID \n\t\t\t\t\t\tWHERE a.stuAcadCredID = ?", [$id]);
     if ($q) {
         $app->flash('success_message', $flashNow->notice(200));
     } else {
         $app->flash('error_message', $flashNow->notice(409));
     }
     redirect($app->req->server['HTTP_REFERER']);
 });
 $app->get('/getEvents/', function () use($app, $css, $js) {
     $meta = $app->db->event_meta()->setTableAlias('a')->select('a.*,b.roomCode,c.buildingCode,e.bgcolor')->_join('room', 'a.roomCode = b.roomCode', 'b')->_join('building', 'b.buildingCode = c.buildingCode', 'c')->_join('event', 'a.eventID = d.eventID', 'd')->_join('event_category', 'd.catID = e.catID', 'e')->_join('stu_acad_cred', 'd.termCode = f.termCode AND d.title = f.courseSecCode', 'f')->where('f.stuID = ?', get_persondata('personID'));
     $q = $meta->find(function ($data) {
         $array = [];
         foreach ($data as $d) {
             $array[] = $d;
         }
         return $array;
     });
     if (count($q[0]['eventID']) > 0) {
         $events = [];
         foreach ($q as $r) {
             $eventArray['eMID'] = $r['eventMetaID'];
             $eventArray['eID'] = $r['eventID'];
             $eventArray['buildingCode'] = $r['buildingCode'];
             $eventArray['roomCode'] = $r['roomCode'];
             $eventArray['title'] = $r['title'];
开发者ID:parkerj,项目名称:eduTrac-SIS,代码行数:31,代码来源:student.router.php

示例13: hasPermission

 public function hasPermission($permKey)
 {
     $roles = $this->_app->db->query("SELECT \r\n\t\t\t\t\t\ta.ID \r\n\t\t\t\t\tFROM \r\n\t\t\t\t\t\trole a \r\n\t\t\t\t\tLEFT JOIN \r\n\t\t\t\t\t\tperson_roles b \r\n\t\t\t\t\tON \r\n\t\t\t\t\t\ta.ID = b.roleID \r\n\t\t\t\t\tWHERE \r\n\t\t\t\t\t\ta.permission LIKE ? \r\n\t\t\t\t\tAND \r\n\t\t\t\t\t\tb.personID = ?", ["%{$permKey}%", get_persondata('personID')]);
     $q1 = $roles->find(function ($data) {
         $array = [];
         foreach ($data as $d) {
             $array[] = $d;
         }
         return $array;
     });
     $perms = $this->_app->db->query('SELECT ID FROM person_perms WHERE permission LIKE ? AND personID = ?', ["%{$permKey}%", get_persondata('personID')]);
     $q2 = $perms->find(function ($data) {
         $array = [];
         foreach ($data as $d) {
             $array[] = $d;
         }
         return $array;
     });
     if (count($q1) > 0) {
         return true;
     } elseif (count($q2) > 0) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:parkerj,项目名称:eduTrac-SIS,代码行数:26,代码来源:ACL.php

示例14: getSchoolPhoto

?>
</a></span>
                                        <span class="media display-block margin-none">
                                            <span class="pull-left display-block thumb"><?php 
echo getSchoolPhoto(get_persondata('personID'), get_persondata('email'), '38');
?>
</span>
                                            <a href="<?php 
echo get_base_url();
?>
profile/"><?php 
echo get_persondata('fname') . ' ' . get_persondata('lname');
?>
</a><br />
                                            <?php 
echo get_persondata('email');
?>
                                        </span>
                                        <span class="clearfix"></span>
                                    </span>
                                </li>
                                <?php 
if (isset($_COOKIE['SWITCH_USERBACK'])) {
    ?>
                                    <li>
                                        <a href="<?php 
    echo get_base_url();
    ?>
switchUserBack/<?php 
    echo $app->cookies->getSecureCookie('SWITCH_USERBACK');
    ?>
开发者ID:parkerj,项目名称:eduTrac-SIS,代码行数:31,代码来源:core-admin-bar.php

示例15: etsis_logger_activity_log_write

         $inst->where('institutionID = ?', $id);
         if ($inst->update()) {
             $app->flash('success_message', $flashNow->notice(200));
             etsis_logger_activity_log_write('Update Record', 'Institution', _filter_input_string(INPUT_POST, 'instName'), get_persondata('uname'));
         } else {
             $app->flash('error_message', $flashNow->notice(409));
         }
         redirect($app->req->server['HTTP_REFERER']);
     }
     $inst = $app->db->institution()->where('institutionID = ?', (int) $id)->findOne();
     $app->view->display('application/view-inst', ['title' => $inst->instName, 'cssArray' => $css, 'jsArray' => $js, 'inst' => $inst]);
 });
 $app->get('/applications/', function () use($app, $json_url) {
     $css = ['css/admin/module.admin.page.alt.form_elements.min.css', 'css/admin/module.admin.page.alt.tables.min.css'];
     $js = ['components/modules/admin/forms/elements/bootstrap-select/assets/lib/js/bootstrap-select.js?v=v2.1.0', 'components/modules/admin/forms/elements/bootstrap-select/assets/custom/js/bootstrap-select.init.js?v=v2.1.0', 'components/modules/admin/forms/elements/select2/assets/lib/js/select2.js?v=v2.1.0', 'components/modules/admin/forms/elements/select2/assets/custom/js/select2.init.js?v=v2.1.0', 'components/modules/admin/forms/elements/bootstrap-datepicker/assets/lib/js/bootstrap-datepicker.js?v=v2.1.0', 'components/modules/admin/forms/elements/bootstrap-datepicker/assets/custom/js/bootstrap-datepicker.init.js?v=v2.1.0', 'components/modules/admin/forms/elements/bootstrap-timepicker/assets/lib/js/bootstrap-timepicker.js?v=v2.1.0', 'components/modules/admin/forms/elements/bootstrap-timepicker/assets/custom/js/bootstrap-timepicker.init.js?v=v2.1.0'];
     $appl = $app->db->application()->where('personID = ?', (int) get_persondata('personID'));
     $q = $appl->find(function ($data) {
         $array = [];
         foreach ($data as $d) {
             $array[] = $d;
         }
         return $array;
     });
     $app->view->display('application/appls', ['title' => 'My Applications', 'cssArray' => $css, 'jsArray' => $js, 'appls' => $q]);
 });
 $app->post('/applicantLookup/', function () use($app, $json_url) {
     $appl = get_person_by('personID', $_POST['personID']);
     $json = ['input#person' => $appl->lname . ', ' . $appl->fname];
     echo json_encode($json);
 });
 $app->get('/deleteInstAttend/(\\d+)/', function ($id) use($app, $flashNow) {
开发者ID:parkerj,项目名称:eduTrac-SIS,代码行数:31,代码来源:appl.router.php


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