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


PHP FormVariables类代码示例

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


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

示例1: extract

 * feasible for technical reasons, the Appropriate Legal Notices must display
 * the words "Powered by TimeTrex".
 ********************************************************************************/
/*
 * $Revision: 11151 $
 * $Id: Login.php 11151 2013-10-14 22:00:30Z ipso $
 * $Date: 2013-10-14 15:00:30 -0700 (Mon, 14 Oct 2013) $
 */
require_once '../includes/global.inc.php';
$authenticate = FALSE;
require_once Environment::getBasePath() . 'includes/Interface.inc.php';
$smarty->assign('title', TTi18n::gettext('Secure Login'));
/*
 * Get FORM variables
 */
extract(FormVariables::GetVariables(array('action', 'user_name', 'password', 'password_reset', 'language')));
$validator = new Validator();
$action = Misc::findSubmitButton();
switch ($action) {
    case 'submit':
        //Debug::setVerbosity( 11 );
        Debug::Text('User Name: ' . $user_name, __FILE__, __LINE__, __METHOD__, 10);
        if (isset($config_vars['other']['web_session_expire']) and $config_vars['other']['web_session_expire'] != '') {
            $authentication->setEnableExpireSession((int) $config_vars['other']['web_session_expire']);
        }
        $authentication_result = $authentication->Login($user_name, $password);
        if ($authentication_result === TRUE) {
            $authentication->Check();
            Debug::text('Login Language: ' . $language, __FILE__, __LINE__, __METHOD__, 10);
            TTi18n::setCountry(TTi18n::getCountryFromLocale());
            TTi18n::setLanguage($language);
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:Login.php

示例2: extract

 */
require_once '../../includes/global.inc.php';
//Debug::setVerbosity(11);
$skip_message_check = TRUE;
require_once Environment::getBasePath() . 'includes/Interface.inc.php';
if (!$permission->Check('schedule', 'enabled') or !($permission->Check('schedule', 'edit') or $permission->Check('schedule', 'edit_own') or $permission->Check('schedule', 'edit_child'))) {
    $permission->Redirect(FALSE);
    //Redirect
}
$smarty->assign('title', TTi18n::gettext($title = 'Mass Schedule'));
// See index.php
BreadCrumb::setCrumb($title);
/*
 * Get FORM variables
 */
extract(FormVariables::GetVariables(array('action', 'id', 'data', 'filter_user_id')));
$data = Misc::preSetArrayValues($data, array('start_date_stamp', 'end_date_stamp', 'start_time', 'end_time'), NULL);
if (isset($data)) {
    if ($data['start_date_stamp'] != '' and !is_numeric($data['start_date_stamp']) and $data['end_date_stamp'] != '' and !is_numeric($data['end_date_stamp']) and $data['start_time'] != '' and !is_numeric($data['end_time']) and $data['end_time'] != '' and !is_numeric($data['end_time'])) {
        $data['start_full_time_stamp'] = TTDate::parseDateTime($data['start_date_stamp'] . ' ' . $data['start_time']);
        $data['end_full_time_stamp'] = TTDate::parseDateTime($data['end_date_stamp'] . ' ' . $data['end_time']);
    } else {
        $data['start_full_time_stamp'] = NULL;
        $data['end_full_time_stamp'] = NULL;
    }
    if ($data['start_date_stamp'] != '') {
        $data['start_date_stamp'] = TTDate::parseDateTime($data['start_date_stamp']);
    }
    if ($data['end_date_stamp'] != '') {
        $data['end_date_stamp'] = TTDate::parseDateTime($data['end_date_stamp']);
    }
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:AddMassSchedule.php

示例3: extract

 * $Id: EditUserAbsence.php 9993 2013-05-24 20:16:41Z ipso $
 * $Date: 2013-05-24 13:16:41 -0700 (Fri, 24 May 2013) $
 */
require_once '../../includes/global.inc.php';
require_once Environment::getBasePath() . 'includes/Interface.inc.php';
//Debug::setVerbosity(11);
if (!$permission->Check('absence', 'enabled') or !($permission->Check('absence', 'edit') or $permission->Check('absence', 'edit_own') or $permission->Check('absence', 'edit_child'))) {
    $permission->Redirect(FALSE);
    //Redirect
}
$smarty->assign('title', TTi18n::gettext($title = 'Edit Absence'));
// See index.php
/*
 * Get FORM variables
 */
extract(FormVariables::GetVariables(array('action', 'id', 'user_id', 'date_stamp', 'udt_data')));
if (isset($udt_data)) {
    if ($udt_data['total_time'] != '') {
        $udt_data['total_time'] = TTDate::parseTimeUnit($udt_data['total_time']);
    }
}
$udtf = TTnew('UserDateTotalFactory');
$action = Misc::findSubmitButton();
$action = strtolower($action);
switch ($action) {
    case 'delete':
        Debug::Text('Delete!', __FILE__, __LINE__, __METHOD__, 10);
        //Debug::setVerbosity(11);
        $udtlf = TTnew('UserDateTotalListFactory');
        $udtlf->getById($udt_data['id']);
        if ($udtlf->getRecordCount() > 0) {
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:EditUserAbsence.php

示例4: extract

 * $Revision: 5178 $
 * $Id: EditPayPeriodSchedule.php 5178 2011-08-30 21:13:34Z ipso $
 * $Date: 2011-08-30 14:13:34 -0700 (Tue, 30 Aug 2011) $
 */
require_once '../../includes/global.inc.php';
require_once Environment::getBasePath() . 'includes/Interface.inc.php';
if (!$permission->Check('pay_period_schedule', 'enabled') or !($permission->Check('pay_period_schedule', 'edit') or $permission->Check('pay_period_schedule', 'edit_own'))) {
    $permission->Redirect(FALSE);
    //Redirect
}
$smarty->assign('title', TTi18n::gettext($title = 'Edit Pay Period Schedule'));
// See index.php
/*
 * Get FORM variables
 */
extract(FormVariables::GetVariables(array('action', 'id', 'user_id', 'pay_period_schedule_data')));
//var_dump($pay_period_schedule_data);
if (isset($pay_period_schedule_data)) {
    if (isset($pay_period_schedule_data['anchor_date'])) {
        $pay_period_schedule_data['anchor_date'] = TTDate::parseDateTime($pay_period_schedule_data['anchor_date']);
    }
    if (isset($pay_period_schedule_data['day_start_time'])) {
        $pay_period_schedule_data['day_start_time'] = TTDate::parseTimeUnit($pay_period_schedule_data['day_start_time']);
    }
    if (isset($pay_period_schedule_data['new_day_trigger_time'])) {
        $pay_period_schedule_data['new_day_trigger_time'] = TTDate::parseTimeUnit($pay_period_schedule_data['new_day_trigger_time']);
    }
    if (isset($pay_period_schedule_data['maximum_shift_time'])) {
        $pay_period_schedule_data['maximum_shift_time'] = TTDate::parseTimeUnit($pay_period_schedule_data['maximum_shift_time']);
    }
}
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:EditPayPeriodSchedule.php

示例5: extract

 * $Revision: 5519 $
 * $Id: PremiumPolicyList.php 5519 2011-11-15 19:28:49Z ipso $
 * $Date: 2011-11-15 11:28:49 -0800 (Tue, 15 Nov 2011) $
 */
require_once '../../includes/global.inc.php';
require_once Environment::getBasePath() . 'includes/Interface.inc.php';
if (!$permission->Check('premium_policy', 'enabled') or !($permission->Check('premium_policy', 'view') or $permission->Check('premium_policy', 'view_own'))) {
    $permission->Redirect(FALSE);
    //Redirect
}
$smarty->assign('title', TTi18n::gettext($title = 'Premium Policy List'));
// See index.php
/*
 * Get FORM variables
 */
extract(FormVariables::GetVariables(array('action', 'page', 'sort_column', 'sort_order', 'ids')));
URLBuilder::setURL($_SERVER['SCRIPT_NAME'], array('sort_column' => $sort_column, 'sort_order' => $sort_order, 'page' => $page));
$sort_array = NULL;
if ($sort_column != '') {
    $sort_array = array($sort_column => $sort_order);
}
Debug::Arr($ids, 'Selected Objects', __FILE__, __LINE__, __METHOD__, 10);
$action = Misc::findSubmitButton();
switch ($action) {
    case 'add':
        Redirect::Page(URLBuilder::getURL(NULL, 'EditPremiumPolicy.php', FALSE));
        break;
    case 'delete':
    case 'undelete':
        if (strtolower($action) == 'delete') {
            $delete = TRUE;
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:PremiumPolicyList.php

示例6: extract

 * $Id: EditUserTax.php 1246 2007-09-14 23:47:42Z ipso $
 * $Date: 2007-09-14 16:47:42 -0700 (Fri, 14 Sep 2007) $
 */
require_once '../../includes/global.inc.php';
require_once Environment::getBasePath() . 'includes/Interface.inc.php';
//Debug::setVerbosity(11);
if (!$permission->Check('user_tax', 'enabled') or !($permission->Check('user_tax', 'edit') or $permission->Check('user_tax', 'edit_own'))) {
    $permission->Redirect(FALSE);
    //Redirect
}
$smarty->assign('title', TTi18n::gettext($title = 'Edit Employee Tax Options'));
// See index.php
/*
 * Get FORM variables
 */
extract(FormVariables::GetVariables(array('action', 'user_id', 'tax_data', 'data_saved')));
$utf = new UserTaxFactory();
$action = Misc::findSubmitButton();
switch ($action) {
    case 'submit':
        Debug::Text('Submit!', __FILE__, __LINE__, __METHOD__, 10);
        $utf->setId($tax_data['id']);
        $utf->setUser($tax_data['user_id']);
        if (isset($tax_data['federal_claim'])) {
            $utf->setFederalClaim($tax_data['federal_claim']);
        }
        if (isset($tax_data['provincial_claim'])) {
            $utf->setProvincialClaim($tax_data['provincial_claim']);
        }
        if ($tax_data['federal_additional_deduction'] != '') {
            $utf->setFederalAdditionalDeduction($tax_data['federal_additional_deduction']);
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:EditUserTax.php

示例7: extract

/*
 * $Revision: 3021 $
 * $Id: Requirements.php 3021 2009-11-11 23:33:03Z ipso $
 * $Date: 2009-11-11 15:33:03 -0800 (Wed, 11 Nov 2009) $
 */
@ini_set('display_errors', true);
$disable_database_connection = TRUE;
require_once '../../includes/global.inc.php';
$authenticate = FALSE;
require_once Environment::getBasePath() . 'includes/Interface.inc.php';
$smarty->assign('title', TTi18n::gettext($title = '2. System Check Acceptance'));
// See index.php
/*
 * Get FORM variables
 */
extract(FormVariables::GetVariables(array('action', 'data', 'external_installer')));
if (DEPLOYMENT_ON_DEMAND == FALSE) {
    $cache->clean();
    //Clear all cache.
}
$smarty->clear_all_cache();
$install_obj = new Install();
if ($install_obj->isInstallMode() == FALSE) {
    Redirect::Page(URLBuilder::getURL(NULL, 'install.php'));
}
$action = Misc::findSubmitButton();
switch ($action) {
    case 'phpinfo':
        phpinfo();
        exit;
        break;
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:Requirements.php

示例8: extract

 * $Date: 2009-01-19 17:13:01 -0800 (Mon, 19 Jan 2009) $
 */
require_once '../../includes/global.inc.php';
require_once Environment::getBasePath() . 'includes/Interface.inc.php';
//Debug::setVerbosity(11);
if (!$permission->Check('pay_stub', 'enabled') or !($permission->Check('pay_stub', 'view') or $permission->Check('pay_stub', 'view_own'))) {
    $permission->Redirect(FALSE);
    //Redirect
}
$smarty->assign('title', TTi18n::gettext($title = 'Employee Pay Stub'));
// See index.php
BreadCrumb::setCrumb($title);
/*
 * Get FORM variables
 */
extract(FormVariables::GetVariables(array('action', 'page', 'sort_column', 'sort_order', 'hide_employer_rows', 'id', 'ids')));
switch ($action) {
    default:
        if (isset($id) and !isset($ids)) {
            $ids = array($id);
        }
        if (count($ids) > 0) {
            $pslf = new PayStubListFactory();
            if ($permission->Check('pay_stub', 'view')) {
                $pslf->getByCompanyIdAndId($current_company->getId(), $ids);
            } else {
                $pslf->getByUserIdAndId($current_user->getId(), $ids);
            }
            //foreach ($ids as $id) {
            $i = 0;
            foreach ($pslf as $pay_stub_obj) {
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:ViewPayStub.php

示例9: extract

 * $Date: 2011-10-25 09:23:28 -0700 (Tue, 25 Oct 2011) $
 */
require_once '../../includes/global.inc.php';
require_once Environment::getBasePath() . 'includes/Interface.inc.php';
//require_once(Environment::getBasePath() .'classes/class.progressbar.php');
//Debug::setVerbosity(11);
if (!$permission->Check('pay_period_schedule', 'enabled') or !($permission->Check('pay_period_schedule', 'edit') or $permission->Check('pay_period_schedule', 'edit_own'))) {
    $permission->Redirect(FALSE);
    //Redirect
}
$smarty->assign('title', TTi18n::gettext($title = 'View Pay Period'));
// See index.php
/*
 * Get FORM variables
 */
extract(FormVariables::GetVariables(array('action', 'pay_period_id', 'status_id')));
$ppf = TTnew('PayPeriodFactory');
$action = Misc::findSubmitButton();
switch ($action) {
    case 'submit':
        $pplf = TTnew('PayPeriodListFactory');
        $pplf->getByIdAndCompanyId($pay_period_id, $current_company->getId());
        foreach ($pplf as $pay_period_obj) {
            $pay_period_obj->setStatus($status_id);
            $pay_period_obj->save();
        }
        Redirect::Page(URLBuilder::getURL(array('pay_period_id' => $pay_period_id), 'ViewPayPeriod.php'));
        break;
    case 'generate_paystubs':
        Debug::Text('Generate Pay Stubs!', __FILE__, __LINE__, __METHOD__, 10);
        Redirect::Page(URLBuilder::getURL(array('action' => 'generate_paystubs', 'pay_period_ids' => $pay_period_id, 'next_page' => URLBuilder::getURL(array('filter_pay_period_id' => $pay_period_id), '../pay_stub/PayStubList.php')), '../progress_bar/ProgressBarControl.php'));
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:ViewPayPeriod.php

示例10: extract

 * You should have received a copy of the GNU Affero General Public License along
 * with this program; if not, see http://www.gnu.org/licenses or write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 *
 * You can contact TimeTrex headquarters at Unit 22 - 2475 Dobbin Rd. Suite
 * #292 Westbank, BC V4T 2E9, Canada or at email address info@timetrex.com.
 *
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 *
 * In accordance with Section 7(b) of the GNU Affero General Public License
 * version 3, these Appropriate Legal Notices must retain the display of the
 * "Powered by TimeTrex" logo. If the display of the logo is not reasonably
 * feasible for technical reasons, the Appropriate Legal Notices must display
 * the words "Powered by TimeTrex".
 ********************************************************************************/
/*
 * $Revision: 1902 $
 * $Id: DownForMaintenance.php 1902 2008-06-06 17:27:56Z ipso $
 * $Date: 2008-06-06 10:27:56 -0700 (Fri, 06 Jun 2008) $
 */
$disable_database_connection = TRUE;
require_once '../includes/global.inc.php';
$authenticate = FALSE;
require_once Environment::getBasePath() . 'includes/Interface.inc.php';
extract(FormVariables::GetVariables(array('exception')));
$smarty->assign('title', TTi18n::gettext('Down for Maintenance'));
$smarty->assign('exception', strtolower($exception));
$smarty->display('DownForMaintenance.tpl');
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:DownForMaintenance.php

示例11: extract

 * $Date: 2009-01-27 10:18:32 -0800 (Tue, 27 Jan 2009) $
 */
require_once '../../includes/global.inc.php';
require_once Environment::getBasePath() . 'includes/Interface.inc.php';
//Debug::setVerbosity(11);
if (!$permission->Check('punch', 'enabled') or !($permission->Check('punch', 'view') or $permission->Check('punch', 'view_own'))) {
    $permission->Redirect(FALSE);
    //Redirect
}
$smarty->assign('title', TTi18n::gettext($title = 'Hour List'));
// See index.php
BreadCrumb::setCrumb($title);
/*
 * Get FORM variables
 */
extract(FormVariables::GetVariables(array('action', 'page', 'sort_column', 'sort_order', 'filter_user_id', 'filter_date', 'filter_system_time', 'prev_day', 'next_day', 'prev_week', 'next_week', 'ids')));
if ($filter_user_id != '') {
    $user_id = $filter_user_id;
} else {
    $user_id = $current_user->getId();
}
if ($filter_date != '') {
    $filter_date = TTDate::getBeginDayEpoch(TTDate::parseDateTime($filter_date));
}
if (isset($prev_day)) {
    $filter_date = TTDate::getBeginDayEpoch($filter_date - 86400);
} elseif (isset($next_day)) {
    $filter_date = TTDate::getBeginDayEpoch($filter_date + 86400);
}
if (isset($prev_week)) {
    $filter_date = TTDate::getBeginDayEpoch($filter_date - 86400 * 7);
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:UserDateTotalList.php

示例12: extract

 * $Id: ViewUserAccrualList.php 6791 2012-05-17 19:46:31Z ipso $
 * $Date: 2012-05-17 12:46:31 -0700 (Thu, 17 May 2012) $
 */
require_once '../../includes/global.inc.php';
require_once Environment::getBasePath() . 'includes/Interface.inc.php';
if (!$permission->Check('accrual', 'enabled') or !($permission->Check('accrual', 'view') or $permission->Check('accrual', 'view_own') or $permission->Check('accrual', 'view_child'))) {
    $permission->Redirect(FALSE);
    //Redirect
}
$smarty->assign('title', TTi18n::gettext($title = 'Accrual List'));
// See index.php
BreadCrumb::setCrumb($title);
/*
 * Get FORM variables
 */
extract(FormVariables::GetVariables(array('action', 'page', 'sort_column', 'sort_order', 'user_id', 'accrual_policy_id', 'ids')));
if ($permission->Check('accrual', 'view') or $permission->Check('accrual', 'view_child')) {
    $user_id = $user_id;
} else {
    $user_id = $current_user->getId();
}
URLBuilder::setURL($_SERVER['SCRIPT_NAME'], array('user_id' => $user_id, 'accrual_policy_id' => $accrual_policy_id, 'sort_column' => $sort_column, 'sort_order' => $sort_order, 'page' => $page));
$sort_array = NULL;
if ($sort_column != '') {
    $sort_array = array($sort_column => $sort_order);
}
Debug::Arr($ids, 'Selected Objects', __FILE__, __LINE__, __METHOD__, 10);
$action = Misc::findSubmitButton();
switch ($action) {
    case 'add':
        Redirect::Page(URLBuilder::getURL(NULL, 'EditUserAccrual.php'));
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:ViewUserAccrualList.php

示例13: extract

 * $Date: 2012-06-18 13:23:23 -0700 (Mon, 18 Jun 2012) $
 */
require_once '../../includes/global.inc.php';
require_once Environment::getBasePath() . 'includes/Interface.inc.php';
//Debug::setVerbosity(11);
if (!$permission->Check('pay_stub_amendment', 'enabled') or !($permission->Check('pay_stub_amendment', 'view') or $permission->Check('pay_stub_amendment', 'view_child') or $permission->Check('pay_stub_amendment', 'view_own'))) {
    $permission->Redirect(FALSE);
    //Redirect
}
$smarty->assign('title', TTi18n::gettext($title = 'Pay Stub Amendment List'));
// See index.php
BreadCrumb::setCrumb($title);
/*
 * Get FORM variables
 */
extract(FormVariables::GetVariables(array('action', 'form', 'page', 'filter_data', 'sort_column', 'sort_order', 'saved_search_id', 'filter_user_id', 'recurring_ps_amendment_id', 'export_type', 'ids')));
$columns = array('-1010-first_name' => TTi18n::gettext('First Name'), '-1020-middle_name' => TTi18n::gettext('Middle Name'), '-1030-last_name' => TTi18n::gettext('Last Name'), '-1040-status' => TTi18n::gettext('Status'), '-1050-type' => TTi18n::gettext('Type'), '-1060-pay_stub_account_name' => TTi18n::gettext('Account'), '-1070-effective_date' => TTi18n::gettext('Effective Date'), '-1080-amount' => TTi18n::gettext('Amount'), '-1090-rate' => TTi18n::gettext('Rate'), '-1100-units' => TTi18n::gettext('Units'), '-1110-description' => TTi18n::gettext('Description'), '-1120-ytd_adjustment' => TTi18n::gettext('YTD'));
if ($saved_search_id == '' and !isset($filter_data['columns'])) {
    //Default columns.
    $filter_data['columns'] = array('-1010-first_name', '-1030-last_name', '-1040-status', '-1060-pay_stub_account_name', '-1070-effective_date', '-1080-amount', '-1110-description');
    if ($sort_column == '') {
        $sort_column = $filter_data['sort_column'] = 'effective_date';
        $sort_order = $filter_data['sort_order'] = 'desc';
    }
}
$ugdlf = TTnew('UserGenericDataListFactory');
$ugdf = TTnew('UserGenericDataFactory');
$pplf = TTnew('PayPeriodListFactory');
//Get Permission Hierarchy Children first, as this can be used for viewing, or editing.
$hlf = TTnew('HierarchyListFactory');
$permission_children_ids = $hlf->getHierarchyChildrenByCompanyIdAndUserIdAndObjectTypeID($current_company->getId(), $current_user->getId());
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:PayStubAmendmentList.php

示例14: extract

 * $Id: UserRequestList.php 4207 2011-02-02 00:54:08Z ipso $
 * $Date: 2011-02-01 16:54:08 -0800 (Tue, 01 Feb 2011) $
 */
require_once '../../includes/global.inc.php';
require_once Environment::getBasePath() . 'includes/Interface.inc.php';
if (!$permission->Check('request', 'enabled') or !($permission->Check('request', 'view') or $permission->Check('request', 'view_own') or $permission->Check('request', 'view_child'))) {
    $permission->Redirect(FALSE);
    //Redirect
}
$smarty->assign('title', TTi18n::gettext($title = 'Request List'));
// See index.php
BreadCrumb::setCrumb($title);
/*
 * Get FORM variables
 */
extract(FormVariables::GetVariables(array('action', 'page', 'sort_column', 'sort_order', 'filter_user_id', 'filter_start_date', 'filter_end_date', 'ids')));
URLBuilder::setURL($_SERVER['SCRIPT_NAME'], array('filter_user_id' => $filter_user_id, 'filter_start_date' => $filter_start_date, 'filter_end_date' => $filter_end_date, 'sort_column' => $sort_column, 'sort_order' => $sort_order, 'page' => $page));
$sort_array = NULL;
if ($sort_column != '') {
    $sort_array = array($sort_column => $sort_order);
}
$filter_data = array();
//Get Permission Hierarchy Children first, as this can be used for viewing, or editing.
$permission_children_ids = array();
if ($permission->Check('request', 'view') == FALSE) {
    $hlf = TTnew('HierarchyListFactory');
    $permission_children_ids = $hlf->getHierarchyChildrenByCompanyIdAndUserIdAndObjectTypeID($current_company->getId(), $current_user->getId());
    if ($permission->Check('request', 'view_child') == FALSE) {
        $permission_children_ids = array();
    }
    if ($permission->Check('request', 'view_own')) {
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:UserRequestList.php

示例15: extract

 * $Date: 2009-07-31 13:50:37 -0700 (Fri, 31 Jul 2009) $
 */
require_once '../../includes/global.inc.php';
//Debug::setVerbosity(11);
$skip_message_check = TRUE;
require_once Environment::getBasePath() . 'includes/Interface.inc.php';
if (!$permission->Check('punch', 'enabled') or !($permission->Check('punch', 'edit') or $permission->Check('punch', 'edit_own') or $permission->Check('punch', 'edit_child'))) {
    $permission->Redirect(FALSE);
    //Redirect
}
$smarty->assign('title', TTi18n::gettext($title = 'Edit Punch'));
// See index.php
/*
 * Get FORM variables
 */
extract(FormVariables::GetVariables(array('action', 'id', 'punch_control_id', 'user_id', 'date_stamp', 'status_id', 'pc_data')));
$punch_full_time_stamp = NULL;
if (isset($pc_data)) {
    if ($pc_data['date_stamp'] != '' and $pc_data['time_stamp'] != '') {
        $punch_full_time_stamp = TTDate::parseDateTime($pc_data['date_stamp'] . ' ' . $pc_data['time_stamp']);
        $pc_data['punch_full_time_stamp'] = $punch_full_time_stamp;
        $pc_data['time_stamp'] = $punch_full_time_stamp;
    } else {
        $pc_data['punch_full_time_stamp'] = NULL;
    }
    if ($pc_data['date_stamp'] != '') {
        $pc_data['date_stamp'] = TTDate::parseDateTime($pc_data['date_stamp']);
    }
}
$pcf = new PunchControlFactory();
$pf = new PunchFactory();
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:EditPunch.php


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