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


PHP Redirect::Page方法代码示例

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


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

示例1: SystemSettingListFactory

        } else {
            $obj = new SystemSettingListFactory();
        }
        $obj->setName('anonymous_update_notify');
        if (isset($data['anonymous_update_notify']) and $data['anonymous_update_notify'] == 1) {
            $obj->setValue(1);
        } elseif (getTTProductEdition() == TT_PRODUCT_PROFESSIONAL) {
            $obj->setValue(0);
        } else {
            $obj->setValue(0);
        }
        if ($obj->isValid()) {
            $obj->Save();
        }
        $ttsc = new TimeTrexSoapClient();
        $ttsc->saveRegistrationKey();
        $handle = fopen('http://www.timetrex.com/' . URLBuilder::getURL(array('v' => $install_obj->getFullApplicationVersion(), 'page' => 'system_setting', 'update_notify' => (int) $data['update_notify'], 'anonymous_update_notify' => (int) $data['anonymous_update_notify']), 'pre_install.php'), "r");
        fclose($handle);
        Redirect::Page(URLBuilder::getURL(array('external_installer' => $external_installer), 'Company.php'));
        break;
    default:
        Debug::Text('Request URI: ' . $_SERVER['REQUEST_URI'], __FILE__, __LINE__, __METHOD__, 10);
        $data = array('host_name' => $_SERVER['HTTP_HOST'], 'base_url' => str_replace('/install', '', dirname($_SERVER['REQUEST_URI'])), 'log_dir' => $config_vars['path']['log'], 'storage_dir' => $config_vars['path']['storage'], 'cache_dir' => $config_vars['cache']['dir']);
        $smarty->assign_by_ref('data', $data);
        break;
}
$handle = @fopen('http://www.timetrex.com/' . URLBuilder::getURL(array('v' => $install_obj->getFullApplicationVersion(), 'page' => 'system_setting'), 'pre_install.php'), "r");
@fclose($handle);
$smarty->assign_by_ref('install_obj', $install_obj);
$smarty->assign_by_ref('external_installer', $external_installer);
$smarty->display('install/SystemSettings.tpl');
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:SystemSettings.php

示例2: PolicyGroupListFactory

             $pgf->setMealPolicy(array());
         }
         if (isset($data['break_policy_ids'])) {
             $pgf->setBreakPolicy($data['break_policy_ids']);
         } else {
             $pgf->setBreakPolicy(array());
         }
         if (isset($data['holiday_policy_ids'])) {
             $pgf->setHolidayPolicy($data['holiday_policy_ids']);
         } else {
             $pgf->setHolidayPolicy(array());
         }
         if ($pgf->isValid()) {
             $pgf->Save();
             $pgf->CommitTransaction();
             Redirect::Page(URLBuilder::getURL(NULL, 'PolicyGroupList.php'));
             break;
         }
     }
     $pgf->FailTransaction();
 default:
     if (isset($id)) {
         BreadCrumb::setCrumb($title);
         $pglf = new PolicyGroupListFactory();
         $pglf->getByIdAndCompanyID($id, $current_company->getID());
         foreach ($pglf as $pg_obj) {
             //Debug::Arr($station,'Department', __FILE__, __LINE__, __METHOD__,10);
             $data = array('id' => $pg_obj->getId(), 'name' => $pg_obj->getName(), 'meal_policy_ids' => $pg_obj->getMealPolicy(), 'break_policy_ids' => $pg_obj->getBreakPolicy(), 'holiday_policy_ids' => $pg_obj->getHolidayPolicy(), 'exception_policy_control_id' => $pg_obj->getExceptionPolicyControlID(), 'user_ids' => $pg_obj->getUser(), 'over_time_policy_ids' => $pg_obj->getOverTimePolicy(), 'premium_policy_ids' => $pg_obj->getPremiumPolicy(), 'round_interval_policy_ids' => $pg_obj->getRoundIntervalPolicy(), 'accrual_policy_ids' => $pg_obj->getAccrualPolicy(), 'created_date' => $pg_obj->getCreatedDate(), 'created_by' => $pg_obj->getCreatedBy(), 'updated_date' => $pg_obj->getUpdatedDate(), 'updated_by' => $pg_obj->getUpdatedBy(), 'deleted_date' => $pg_obj->getDeletedDate(), 'deleted_by' => $pg_obj->getDeletedBy());
         }
     }
     $none_array_option = array('0' => TTi18n::gettext('-- None --'));
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:EditPolicyGroup.php

示例3: unset

            $cj_obj = $cjlf->getCurrent();
            if (PRODUCTION == TRUE and DEMO_MODE == FALSE and $cj_obj->getLastRunDate() < time() - 172800 and $cj_obj->getCreatedDate() < time() - 172800) {
                $cron_out_of_date = 1;
            } else {
                $cron_out_of_date = 0;
            }
        }
        unset($cjlf, $cj_obj);
    } else {
        Debug::text('User NOT! Authenticated', __FILE__, __LINE__, __METHOD__, 10);
        if (isset($enable_wap) and $enable_wap == TRUE) {
            Redirect::Page(URLBuilder::getURL(NULL, Environment::GetBaseURL() . 'wap/wap_login.php'));
        } elseif (isset($enable_iphone) and $enable_iphone == TRUE) {
            Redirect::Page(URLBuilder::getURL(NULL, Environment::GetBaseURL() . 'iphone/login/login.php'));
        } else {
            Redirect::Page(URLBuilder::getURL(NULL, Environment::GetBaseURL() . 'Login.php'));
        }
        //exit;
    }
}
require_once Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'smarty' . DIRECTORY_SEPARATOR . 'libs' . DIRECTORY_SEPARATOR . 'Smarty.class.php';
$smarty = new Smarty();
$smarty->compile_check = TRUE;
$smarty->template_dir = Environment::getTemplateDir();
$smarty->compile_dir = Environment::getTemplateCompileDir();
$smarty->assign('css_file', 'global.css.php');
$smarty->assign('IMAGES_URL', Environment::getImagesURL());
$smarty->assign('BASE_PATH', Environment::getBasePath());
$smarty->assign('APPLICATION_NAME', APPLICATION_NAME);
$smarty->assign('APPLICATION_VERSION', APPLICATION_VERSION);
$smarty->assign('DEPLOYMENT_ON_DEMAND', DEPLOYMENT_ON_DEMAND);
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:Interface.inc.php

示例4: getTTProductEdition

require_once Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'Exception.class.php';
require_once Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'Debug.class.php';
if (isset($_SERVER['REQUEST_URI'])) {
    Debug::Text('URI: ' . $_SERVER['REQUEST_URI'], __FILE__, __LINE__, __METHOD__, 10);
}
Debug::Text('Version: ' . APPLICATION_VERSION . ' Edition: ' . getTTProductEdition() . ' Production: ' . (int) PRODUCTION . ' Demo Mode: ' . (int) DEMO_MODE, __FILE__, __LINE__, __METHOD__, 10);
$profiler = new Profiler(true);
if (function_exists('bcscale')) {
    bcscale(10);
}
Debug::setEnable((bool) $config_vars['debug']['enable']);
Debug::setEnableTidy(FALSE);
Debug::setEnableDisplay((bool) $config_vars['debug']['enable_display']);
Debug::setBufferOutput((bool) $config_vars['debug']['buffer_output']);
Debug::setEnableLog((bool) $config_vars['debug']['enable_log']);
Debug::setVerbosity((int) $config_vars['debug']['verbosity']);
if (Debug::getEnable() == TRUE and Debug::getEnableDisplay() == TRUE) {
    ini_set('display_errors', 1);
} else {
    ini_set('display_errors', 0);
}
//Make sure we are using SSL if required.
if ($config_vars['other']['force_ssl'] == 1 and !isset($_SERVER['HTTPS']) and isset($_SERVER['HTTP_HOST']) and isset($_SERVER['REQUEST_URI']) and !isset($disable_https) and !isset($enable_wap) and php_sapi_name() != 'cli') {
    Redirect::Page('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
    exit;
}
if (isset($enable_wap) and $enable_wap == TRUE) {
    header('Content-type: text/vnd.wap.wml', TRUE);
}
require_once 'Cache.inc.php';
require_once 'Database.inc.php';
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:global.inc.php

示例5: TTnew

     if (strtolower($action) == 'delete') {
         $delete = TRUE;
     } else {
         $delete = FALSE;
     }
     $pplf = TTnew('PremiumPolicyListFactory');
     foreach ($ids as $id) {
         $pplf->getByIdAndCompanyId($id, $current_company->getId());
         foreach ($pplf as $pp_obj) {
             $pp_obj->setDeleted($delete);
             if ($pp_obj->isValid()) {
                 $pp_obj->Save();
             }
         }
     }
     Redirect::Page(URLBuilder::getURL(NULL, 'PremiumPolicyList.php'));
     break;
 default:
     BreadCrumb::setCrumb($title);
     $pplf = TTnew('PremiumPolicyListFactory');
     $pplf->getByCompanyId($current_company->getId());
     $pager = new Pager($pplf);
     $type_options = $pplf->getOptions('type');
     $show_no_policy_group_notice = FALSE;
     foreach ($pplf as $pp_obj) {
         if ((int) $pp_obj->getColumn('assigned_policy_groups') == 0) {
             $show_no_policy_group_notice = TRUE;
         }
         $policies[] = array('id' => $pp_obj->getId(), 'name' => $pp_obj->getName(), 'type_id' => $pp_obj->getType(), 'type' => $type_options[$pp_obj->getType()], 'assigned_policy_groups' => (int) $pp_obj->getColumn('assigned_policy_groups'), 'deleted' => $pp_obj->getDeleted());
     }
     $smarty->assign_by_ref('policies', $policies);
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:PremiumPolicyList.php

示例6: TTnew

     }
     $ppf->setStartDate($data['start_date']);
     $ppf->setEndDate($data['end_date'] + 59);
     $ppf->setTransactionDate($data['transaction_date'] + 59);
     if (isset($data['advance_end_date'])) {
         $ppf->setAdvanceEndDate($data['advance_end_date']);
     }
     if (isset($data['advance_transaction_date'])) {
         $ppf->setAdvanceTransactionDate($data['advance_transaction_date']);
     }
     $ppf->setEnableImportData(TRUE);
     //Import punches when creating new pay periods.
     if ($ppf->isValid()) {
         $ppf->Save();
         $ppf->CommitTransaction();
         Redirect::Page(URLBuilder::getURL(array('id' => $data['pay_period_schedule_id']), 'PayPeriodList.php'));
         break;
     }
     $ppf->FailTransaction();
 default:
     if (isset($id)) {
         BreadCrumb::setCrumb($title);
         $pplf = TTnew('PayPeriodListFactory');
         $pplf->getByIdAndCompanyId($id, $current_company->getId());
         foreach ($pplf as $pp_obj) {
             //Debug::Arr($station,'Department', __FILE__, __LINE__, __METHOD__,10);
             $data = array('id' => $pp_obj->getId(), 'company_id' => $pp_obj->getCompany(), 'pay_period_schedule_id' => $pp_obj->getPayPeriodSchedule(), 'pay_period_schedule_type_id' => $pp_obj->getPayPeriodScheduleObject()->getType(), 'start_date' => $pp_obj->getStartDate(), 'end_date' => $pp_obj->getEndDate(), 'transaction_date' => $pp_obj->getTransactionDate(), 'advance_end_date' => $pp_obj->getAdvanceEndDate(), 'advance_transaction_date' => $pp_obj->getAdvanceTransactionDate(), 'deleted' => $pp_obj->getDeleted(), 'created_date' => $pp_obj->getCreatedDate(), 'created_by' => $pp_obj->getCreatedBy(), 'updated_date' => $pp_obj->getUpdatedDate(), 'updated_by' => $pp_obj->getUpdatedBy(), 'deleted_date' => $pp_obj->getDeletedDate(), 'deleted_by' => $pp_obj->getDeletedBy());
         }
     } else {
         if (isset($pay_period_schedule_id) and $pay_period_schedule_id != '') {
             $ppslf = TTnew('PayPeriodScheduleListFactory');
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:EditPayPeriod.php

示例7: switch

$action = Misc::findSubmitButton();
switch ($action) {
    case 'phpinfo':
        phpinfo();
        exit;
        break;
    case 'back':
        Debug::Text('Back', __FILE__, __LINE__, __METHOD__, 10);
        Redirect::Page(URLBuilder::getURL(NULL, 'install.php'));
        break;
    case 'next':
        Debug::Text('Next', __FILE__, __LINE__, __METHOD__, 10);
        if ($external_installer == 1) {
            Redirect::Page(URLBuilder::getURL(array('external_installer' => $external_installer), 'DatabaseSchema.php'));
        } else {
            Redirect::Page(URLBuilder::getURL(NULL, 'DatabaseConfig.php'));
        }
        break;
    default:
        break;
}
$handle = @fopen('http://www.timetrex.com/' . URLBuilder::getURL(array_merge(array('v' => $install_obj->getFullApplicationVersion(), 'page' => 'require'), $install_obj->getFailedRequirements()), 'pre_install.php'), "r");
@fclose($handle);
$check_all_requirements = $install_obj->checkAllRequirements();
if ($external_installer == 1 and $check_all_requirements == 0 and $install_obj->checkTimeTrexVersion() == 0) {
    //Using external installer and there is no missing requirements, automatically send to next page.
    Redirect::Page(URLBuilder::getURL(array('external_installer' => $external_installer, 'action:next' => 'next'), $_SERVER['SCRIPT_NAME']));
}
$smarty->assign_by_ref('install_obj', $install_obj);
$smarty->assign_by_ref('external_installer', $external_installer);
$smarty->display('install/Requirements.tpl');
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:Requirements.php

示例8: Redirect

 function Redirect($result)
 {
     if ($result !== TRUE) {
         Redirect::Page(URLBuilder::getURL(NULL, Environment::getBaseURL() . '/permission/PermissionDenied.php'));
     }
     return TRUE;
 }
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:7,代码来源:Permission.class.php

示例9: TTnew

     if (isset($department_data['other_id3'])) {
         $df->setOtherID3($department_data['other_id3']);
     }
     if (isset($department_data['other_id4'])) {
         $df->setOtherID4($department_data['other_id4']);
     }
     if (isset($department_data['other_id5'])) {
         $df->setOtherID5($department_data['other_id5']);
     }
     if ($df->isValid()) {
         $df->Save(FALSE);
         if (isset($department_data['branch_list'])) {
             $df->setBranch($department_data['branch_list']);
             $df->Save(TRUE);
         }
         Redirect::Page(URLBuilder::getURL(NULL, 'DepartmentList.php'));
         break;
     }
 default:
     if (isset($id)) {
         BreadCrumb::setCrumb($title);
         $dlf = TTnew('DepartmentListFactory');
         $dlf->GetByIdAndCompanyId($id, $current_company->getId());
         foreach ($dlf as $department) {
             Debug::Arr($department, 'Department', __FILE__, __LINE__, __METHOD__, 10);
             $department_data = array('id' => $department->getId(), 'company_name' => $current_company->getName(), 'status' => $department->getStatus(), 'name' => $department->getName(), 'manual_id' => $department->getManualID(), 'branch_list' => $department->getBranch(), 'other_id1' => $department->getOtherID1(), 'other_id2' => $department->getOtherID2(), 'other_id3' => $department->getOtherID3(), 'other_id4' => $department->getOtherID4(), 'other_id5' => $department->getOtherID5(), 'created_date' => $department->getCreatedDate(), 'created_by' => $department->getCreatedBy(), 'updated_date' => $department->getUpdatedDate(), 'updated_by' => $department->getUpdatedBy(), 'deleted_date' => $department->getDeletedDate(), 'deleted_by' => $department->getDeletedBy());
         }
     } elseif ($action != 'submit') {
         $next_available_manual_id = DepartmentListFactory::getNextAvailableManualId($current_company->getId());
         $department_data = array('next_available_manual_id' => $next_available_manual_id);
     }
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:EditDepartment.php

示例10: TTnew

     if (isset($data['force_over_time_policy'])) {
         $hpf->setForceOverTimePolicy(TRUE);
     } else {
         $hpf->setForceOverTimePolicy(FALSE);
     }
     $hpf->setMinimumTime($data['minimum_time']);
     $hpf->setMaximumTime($data['maximum_time']);
     $hpf->setAbsencePolicyID($data['absence_policy_id']);
     $hpf->setRoundIntervalPolicyID($data['round_interval_policy_id']);
     if ($hpf->isValid()) {
         $hpf->Save(FALSE);
         $hpf->setRecurringHoliday($data['recurring_holiday_ids']);
         if ($hpf->isValid()) {
             $hpf->Save();
             $hpf->CommitTransaction();
             Redirect::Page(URLBuilder::getURL(NULL, 'HolidayPolicyList.php'));
             break;
         }
     }
     $hpf->FailTransaction();
 default:
     if (isset($id)) {
         BreadCrumb::setCrumb($title);
         $hplf = TTnew('HolidayPolicyListFactory');
         $hplf->getByIdAndCompanyID($id, $current_company->getID());
         foreach ($hplf as $hp_obj) {
             //Debug::Arr($station,'Department', __FILE__, __LINE__, __METHOD__,10);
             $data = array('id' => $hp_obj->getId(), 'name' => $hp_obj->getName(), 'type_id' => $hp_obj->getType(), 'default_schedule_status_id' => $hp_obj->getDefaultScheduleStatus(), 'minimum_employed_days' => $hp_obj->getMinimumEmployedDays(), 'minimum_worked_period_days' => $hp_obj->getMinimumWorkedPeriodDays(), 'minimum_worked_days' => $hp_obj->getMinimumWorkedDays(), 'worked_scheduled_days' => $hp_obj->getWorkedScheduledDays(), 'minimum_worked_after_period_days' => $hp_obj->getMinimumWorkedAfterPeriodDays(), 'minimum_worked_after_days' => $hp_obj->getMinimumWorkedAfterDays(), 'worked_after_scheduled_days' => $hp_obj->getWorkedAfterScheduledDays(), 'average_time_days' => $hp_obj->getAverageTimeDays(), 'average_days' => $hp_obj->getAverageDays(), 'average_time_worked_days' => $hp_obj->getAverageTimeWorkedDays(), 'force_over_time_policy' => $hp_obj->getForceOverTimePolicy(), 'include_over_time' => $hp_obj->getIncludeOverTime(), 'include_paid_absence_time' => $hp_obj->getIncludePaidAbsenceTime(), 'minimum_time' => $hp_obj->getMinimumTime(), 'maximum_time' => $hp_obj->getMaximumTime(), 'round_interval_policy_id' => $hp_obj->getRoundIntervalPolicyID(), 'absence_policy_id' => $hp_obj->getAbsencePolicyID(), 'recurring_holiday_ids' => $hp_obj->getRecurringHoliday(), 'created_date' => $hp_obj->getCreatedDate(), 'created_by' => $hp_obj->getCreatedBy(), 'updated_date' => $hp_obj->getUpdatedDate(), 'updated_by' => $hp_obj->getUpdatedBy(), 'deleted_date' => $hp_obj->getDeletedDate(), 'deleted_by' => $hp_obj->getDeletedBy());
         }
     } elseif ($action != 'submit') {
         //Defaults
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:EditHolidayPolicy.php

示例11: MessageListFactory

         //Redirect
     }
     if (isset($object_type_id) and isset($object_id)) {
         if (!isset($parent_id)) {
             $parent_id = 0;
         }
         $mf->setObjectType($object_type_id);
         $mf->setObject($object_id);
         $mf->setParent($parent_id);
         $mf->setPriority();
         $mf->setStatus('UNREAD');
         $mf->setSubject($message_data['subject']);
         $mf->setBody($message_data['body']);
         if ($mf->isValid()) {
             $mf->Save();
             Redirect::Page(URLBuilder::getURL(array('template' => $template, 'close' => 1, 'object_type_id' => $object_type_id, 'object_id' => $object_id), 'EmbeddedMessageList.php'));
             break;
         }
     }
 default:
     if (isset($object_type_id) and isset($object_id)) {
         $mlf = new MessageListFactory();
         $mlf->getByObjectTypeAndObject($object_type_id, $object_id);
         $i = 0;
         foreach ($mlf as $message) {
             //Get user info
             $ulf = new UserListFactory();
             $messages[] = array('id' => $message->getId(), 'parent_id' => $message->getParent(), 'object_type' => $message->getObjectType(), 'object_id' => $message->getObject(), 'priority' => $message->getPriority(), 'status' => $message->getStatus(), 'subject' => $message->getSubject(), 'body' => $message->getBody(), 'created_date' => $message->getCreatedDate(), 'created_by' => $message->getCreatedBy(), 'created_by_full_name' => $ulf->getById($message->getCreatedBy())->getCurrent()->getFullName(), 'updated_date' => $message->getUpdatedDate(), 'updated_by' => $message->getUpdatedBy(), 'deleted_date' => $message->getDeletedDate(), 'deleted_by' => $message->getDeletedBy());
             //Mark own messages as read.
             if ($message->getCreatedBy() != $current_user->getId()) {
                 $mlf_b = new MessageListFactory();
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:EmbeddedMessageList.php

示例12: unset

             } else {
                 //Delete level
                 if ($hierarchy_level_id > 0) {
                     $hlf->setID($hierarchy_level_id);
                     $hlf->setDeleted(TRUE);
                     $hlf->Save();
                 } else {
                     unset($hierarchy_level_data[$hierarchy_level_id]);
                 }
             }
         }
     }
     if ($redirect == 0 and $hcf->isValid()) {
         $hcf->Save(TRUE, TRUE);
         $hcf->CommitTransaction();
         Redirect::Page(URLBuilder::getURL(array(), 'HierarchyControlList.php'));
         break;
     }
     $hcf->FailTransaction();
 case 'delete_level':
     if (count($ids) > 0) {
         foreach ($ids as $hl_id) {
             if ($hl_id > 0) {
                 Debug::Text('Deleting level Row ID: ' . $hl_id, __FILE__, __LINE__, __METHOD__, 10);
                 $hllf = TTnew('HierarchyLevelListFactory');
                 $hllf->getById($hl_id);
                 if ($hllf->getRecordCount() == 1) {
                     foreach ($hllf as $hl_obj) {
                         $hl_obj->setDeleted(TRUE);
                         if ($hl_obj->isValid()) {
                             $hl_obj->Save();
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:EditHierarchyControl.php

示例13: foreach

         $plf->getByCompanyIdAndId($current_company->getID(), $ids);
         if ($plf->getRecordCount() > 0) {
             foreach ($plf as $p_obj) {
                 $p_obj->setDeleted(TRUE);
                 $p_obj->setEnableCalcTotalTime(TRUE);
                 $p_obj->setEnableCalcSystemTotalTime(TRUE);
                 $p_obj->setEnableCalcWeeklySystemTotalTime(TRUE);
                 $p_obj->setEnableCalcUserDateTotal(TRUE);
                 $p_obj->setEnableCalcException(TRUE);
                 $p_obj->Save();
             }
         }
         //$plf->FailTransaction();
         $plf->CommitTransaction();
     }
     Redirect::Page(URLBuilder::getURL(array('saved_search_id' => $saved_search_id, 'sort_column' => $sort_column, 'sort_order' => $sort_order, 'page' => $page), 'PunchList.php'));
     break;
 case 'search_form_delete':
 case 'search_form_update':
 case 'search_form_save':
 case 'search_form_clear':
 case 'search_form_search':
     Debug::Text('Action: ' . $action, __FILE__, __LINE__, __METHOD__, 10);
     $saved_search_id = UserGenericDataFactory::searchFormDataHandler($action, $filter_data, URLBuilder::getURL(NULL, 'PunchList.php'));
 default:
     BreadCrumb::setCrumb($title);
     extract(UserGenericDataFactory::getSearchFormData($saved_search_id, $sort_column));
     Debug::Text('Sort Column: ' . $sort_column, __FILE__, __LINE__, __METHOD__, 10);
     Debug::Text('Saved Search ID: ' . $saved_search_id, __FILE__, __LINE__, __METHOD__, 10);
     $sort_array = NULL;
     if ($sort_column != '') {
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:PunchList.php

示例14: TTnew

$off = TTnew('OtherFieldFactory');
$action = Misc::findSubmitButton();
switch ($action) {
    case 'submit':
        Debug::Text('Submit!', __FILE__, __LINE__, __METHOD__, 10);
        $off->setId($data['id']);
        $off->setCompany($current_company->getId());
        $off->setType($data['type_id']);
        $off->setOtherID1($data['other_id1']);
        $off->setOtherID2($data['other_id2']);
        $off->setOtherID3($data['other_id3']);
        $off->setOtherID4($data['other_id4']);
        $off->setOtherID5($data['other_id5']);
        if ($off->isValid()) {
            $off->Save();
            Redirect::Page(URLBuilder::getURL(array('type_id' => $data['type_id']), 'OtherFieldList.php'));
            break;
        }
    default:
        if (isset($id)) {
            BreadCrumb::setCrumb($title);
            $oflf = TTnew('OtherFieldListFactory');
            //$uwlf->GetByUserIdAndCompanyId($current_user->getId(), $current_company->getId() );
            $oflf->getById($id);
            foreach ($oflf as $obj) {
                $data = array('id' => $obj->getId(), 'company_id' => $obj->getCompany(), 'type_id' => $obj->getType(), 'other_id1' => $obj->getOtherID1(), 'other_id2' => $obj->getOtherID2(), 'other_id3' => $obj->getOtherID3(), 'other_id4' => $obj->getOtherID4(), 'other_id5' => $obj->getOtherID5(), 'created_date' => $obj->getCreatedDate(), 'created_by' => $obj->getCreatedBy(), 'updated_date' => $obj->getUpdatedDate(), 'updated_by' => $obj->getUpdatedBy(), 'deleted_date' => $obj->getDeletedDate(), 'deleted_by' => $obj->getDeletedBy());
            }
        }
        //Select box options;
        //$jif = TTnew( 'JobItemFactory' );
        $data['type_options'] = $off->getOptions('type');
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:EditOtherField.php

示例15: TTnew

     if (strtolower($action) == 'delete') {
         $delete = TRUE;
     } else {
         $delete = FALSE;
     }
     $otplf = TTnew('OverTimePolicyListFactory');
     foreach ($ids as $id) {
         $otplf->getByIdAndCompanyId($id, $current_company->getId());
         foreach ($otplf as $otp_obj) {
             $otp_obj->setDeleted($delete);
             if ($otp_obj->isValid()) {
                 $otp_obj->Save();
             }
         }
     }
     Redirect::Page(URLBuilder::getURL(NULL, 'OverTimePolicyList.php'));
     break;
 default:
     $otplf = TTnew('OverTimePolicyListFactory');
     $otplf->getByCompanyId($current_company->getId());
     $pager = new Pager($otplf);
     $type_options = $otplf->getOptions('type');
     $show_no_policy_group_notice = FALSE;
     foreach ($otplf as $otp_obj) {
         if ((int) $otp_obj->getColumn('assigned_policy_groups') == 0) {
             $show_no_policy_group_notice = TRUE;
         }
         $policies[] = array('id' => $otp_obj->getId(), 'name' => $otp_obj->getName(), 'type_id' => $otp_obj->getType(), 'type' => $type_options[$otp_obj->getType()], 'trigger_time' => $otp_obj->getTriggerTime(), 'assigned_policy_groups' => (int) $otp_obj->getColumn('assigned_policy_groups'), 'deleted' => $otp_obj->getDeleted());
     }
     $smarty->assign_by_ref('policies', $policies);
     $smarty->assign_by_ref('show_no_policy_group_notice', $show_no_policy_group_notice);
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:OverTimePolicyList.php


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