• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP URLBuilder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: testUrlBuilderCycleShard

 public function testUrlBuilderCycleShard()
 {
     // generate a url for the number of domains in use ensure they're cycled through...
     $domains = array("jackangers.imgix.net", "jackangers2.imgix.net", "jackangers3.imgix.net");
     $ub = new URLBuilder($domains, false, "", ShardStrategy::CRC, false);
     $ub->setShardStrategy(ShardStrategy::CYCLE);
     for ($i = 0; $i < 100; $i++) {
         $used = array();
         foreach ($domains as $domain) {
             $url = $ub->createURL("chester.png");
             $curDomain = parse_url($url)["host"];
             $this->assertFalse(in_array($curDomain, $used));
             $used[] = $curDomain;
         }
     }
 }
开发者ID:prawee,项目名称:imgix-php,代码行数:16,代码来源:UrlBuilderTest.php


示例2: smarty_function_URLBuilder

/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */
function smarty_function_URLBuilder($params, &$smarty)
{
    $values = $params['values'];
    $script = $params['script'];
    $merge = strtolower(trim($params['merge']));
    if ($merge == 'false') {
        $merge = FALSE;
    } else {
        $merge = TRUE;
    }
    /*
        if ( empty($script) ) {
            $smarty->trigger_error("URLBuilder: missing 'script' parameter");
        }
    */
    if (!empty($values)) {
        $values_arr = explode(",", $values);
        $url_builder_arr = array();
        foreach ($values_arr as $value_pair) {
            $split_pairs = explode("=", $value_pair);
            $url_builder_arr[$split_pairs[0]] = $split_pairs[1];
        }
        $retval = URLBuilder::getURL($url_builder_arr, $script, $merge);
    } else {
        $retval = URLBuilder::getURL(NULL, $script);
    }
    //Debug::Text('URL: '. $retval, __FILE__, __LINE__, __METHOD__, 10);
    return $retval;
}
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:34,代码来源:function.urlbuilder.php


示例3: mainTreeRender

 private function mainTreeRender(Tree &$tree, $selectedKey)
 {
     $li = new Li();
     $mainDiv = new Div();
     $mainDiv->addStyleClasses(["expand", "text_non_select", "tree_text_node", "input_hover"]);
     $table = new Table();
     $tr = new Tr();
     $nodeIcon = new Td();
     $nodeText = new Td();
     $nodeText->addStyleClass("tree_text");
     $nodeSearchCount = new Td();
     $nodeSearchCount->addStyleClass("tree_search_count");
     if (count($tree->childrens) > 0) {
         $nodeIcon->addStyleClasses(["tree_btn"]);
         $icon = new Img();
         $icon->addAttribute("style", "top: 2px; position: relative; margin: 0 5px;");
         $icon->addAttribute("src", $this->treeLevel <= $this->DEFAULT_TREE_LEVEL_TO_SHOW || $tree->show ? "images/arrow90.png" : "images/arrow00.png");
         $nodeIcon->addChild($icon);
     } else {
         $nodeIcon->addStyleClass("tree_empty");
     }
     $link = new A();
     $link->addAttribute("href", URLBuilder::getCatalogLinkForTree($tree->key));
     $link->addChild($tree->value);
     $link->addStyleClass("input_hover");
     $nodeSelected = new Div();
     $nodeSelected->addStyleClass($tree->key == $selectedKey ? 'selected' : 'tree_empty');
     $link->addChild($nodeSelected);
     $nodeText->addChild($link);
     return $li->addChild($mainDiv->addChild($table->addChild($tr->addChildList([$nodeIcon, $nodeText, $nodeSearchCount]))));
 }
开发者ID:gingerP,项目名称:shop,代码行数:31,代码来源:TreeView.php


示例4: getLink

 public function getLink($pageNumber, $num)
 {
     $mainTag = new A();
     $mainTag->addStyleClasses(["link_style", "cursor_pointer", "text_non_select", "f-15", "input_hover"]);
     $mainTag->addAttribute("href", URLBuilder::getCatalogLinkNumeric($pageNumber, $num));
     $mainTag->addChild($pageNumber);
     return $mainTag;
 }
开发者ID:gingerP,项目名称:shop,代码行数:8,代码来源:CatalogLink.php


示例5: getPaginationLinks

 public function getPaginationLinks($pageNumber, $num, $totalCount, $topBottom)
 {
     $mainTag = new Div();
     $catalogLink = new CatalogLink();
     $dots = false;
     $topBottomStyle = $topBottom == 'bottom' ? 'link_next_prev_bottom' : '';
     if ($totalCount != 0) {
         $amountPages = ceil($totalCount / $num);
         if ($pageNumber > 0 && $pageNumber <= $amountPages) {
             $mainTag->addStyleClasses(["pagination_bar", "right_top_bar", $topBottomStyle]);
             $brokerTag = new Div();
             $mainTag->addChild($brokerTag);
             $tagCenterContainer = new Span();
             if ($pageNumber != 1) {
                 $tagPrevious = new A();
                 $tagPrevious->addStyleClasses(["f-16", "text_non_select", "link_style", "link_next_prev", "input_hover", "prev_link"]);
                 $tagPrevious->addAttribute("href", URLBuilder::getCatalogLinkPrev($pageNumber, $num));
                 $text = new Div();
                 $text->addStyleClass("text");
                 $text->addChild("назад");
                 $arrow = new Div();
                 $arrow->addStyleClass("arrow");
                 $tagCenterContainer->addChild($tagPrevious->addChildList([$arrow, $text]));
             }
             $brokerTag->addChild($tagCenterContainer);
             $tagCenterContainer->addStyleClasses(["numeric_links", "f-15"]);
             for ($currentRenderPage = 1; $currentRenderPage <= $amountPages; $currentRenderPage++) {
                 if ($currentRenderPage < 2 || $currentRenderPage > $pageNumber - $this->linksGroupCount && $currentRenderPage < $pageNumber + $this->linksGroupCount || $currentRenderPage > $amountPages - 1) {
                     $dots = false;
                     if ($currentRenderPage != $pageNumber) {
                         $tagCenterContainer->addChild($catalogLink->getLink($currentRenderPage, $num));
                     } else {
                         $emptyLinkView = $catalogLink->getEmptyLink($pageNumber);
                         $emptyLinkView->addStyleClass("f-16");
                         $tagCenterContainer->addChild($emptyLinkView);
                     }
                 } else {
                     if (!$dots) {
                         $dots = true;
                         $tagCenterContainer->addChild($catalogLink->get3dots());
                     }
                 }
             }
             if ($pageNumber != $amountPages) {
                 $tagNext = new A();
                 $tagNext->addStyleClasses(["f-16", "text_non_select", "link_style", "input_hover", "link_next_prev", "next_link"]);
                 $tagNext->addAttribute("href", URLBuilder::getCatalogLinkNext($pageNumber, $num));
                 $text = new Div();
                 $text->addStyleClass("text");
                 $text->addChild("вперед");
                 $arrow = new Div();
                 $arrow->addStyleClass("arrow");
                 $tagCenterContainer->addChild($tagNext->addChildList([$text, $arrow]));
             }
         }
     }
     return $mainTag;
 }
开发者ID:gingerP,项目名称:shop,代码行数:58,代码来源:CatalogLinks.php


示例6: smarty_function_EmbeddedDocumentAttachmentList

/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */
function smarty_function_EmbeddedDocumentAttachmentList($params, &$smarty)
{
    $object_type_id = $params['object_type_id'];
    $object_id = $params['object_id'];
    $height = $params['height'];
    if (empty($height)) {
        $height = 75;
    }
    $url = URLBuilder::getURL(array('object_type_id' => $object_type_id, 'object_id' => $object_id), Environment::getBaseURL() . '/document/EmbeddedDocumentAttachmentList.php');
    $retval = '<iframe style="width:100%; height:' . $height . 'px; border: 5px" id="DocumentAttachmentFactory" name="DocumentAttachmentFactory" src="' . $url . '"></iframe>';
    return $retval;
}
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:17,代码来源:function.embeddeddocumentattachmentlist.php


示例7: smarty_function_EmbeddedMessageList

/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */
function smarty_function_EmbeddedMessageList($params, &$smarty)
{
    $object_type_id = $params['object_type_id'];
    $object_id = $params['object_id'];
    $height = $params['height'];
    if (empty($height)) {
        $height = 250;
    }
    //urlbuilder script="../message/EmbeddedMessageList.php" values="object_type_id=10,object_id=$default_schedule_control_id" merge="FALSE"}
    $url = URLBuilder::getURL(array('object_type_id' => $object_type_id, 'object_id' => $object_id), Environment::getBaseURL() . '/message/EmbeddedMessageList.php');
    //$retval = '<iframe style="width:100%; height:'.$height.'px; border: 0px" id="MessageFactory" name="MessageFactory" src="'.$url.'#form_start"></iframe>';
    $retval = '<iframe style="width:100%; height:' . $height . 'px; border: 5px" id="MessageFactory" name="MessageFactory" src="' . $url . '"></iframe>';
    return $retval;
}
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:19,代码来源:function.embeddedmessagelist.php


示例8: bottomTreeRender

 private function bottomTreeRender(Tree &$tree, $isRoot)
 {
     $children = count($tree->childrens);
     $span = new Li();
     $mainDiv = new Div();
     $span->addStyleClass($isRoot);
     /*if ($children == 0) {*/
     $mainDiv = new A();
     $span->addChild($mainDiv);
     $mainDiv->addStyleClasses(["f-17", "cursor_pointer", "bottom_tree_hover", "label"]);
     $mainDiv->addAttribute(TagLabels::HREF, URLBuilder::getCatalogLinkForTree($tree->key));
     /*} else {
           $span->addChild($mainDiv);
           $mainDiv->addStyleClasses(["f-17", "label"]);
       }*/
     $mainDiv->addChild($tree->value);
     return $span;
 }
开发者ID:gingerP,项目名称:shop,代码行数:18,代码来源:BottomPanel.php


示例9: renderCheckBoxes

 private function renderCheckBoxes()
 {
     $checkFiz = 'chekbox_check';
     $onclickFiz = "onclick=\"window.location='" . URLBuilder::storeModeFiz(YesNoType::YES) . "'\"";
     $checkUr = 'chekbox_check';
     $onclickUr = "onclick=\"window.location='" . URLBuilder::storeModeUr(YesNoType::YES) . "'\"";
     if (!array_key_exists(Labels::CHECK_UR, $_GET) && array_key_exists(Labels::CHECK_FIZ, $_GET)) {
         $onclickFiz = '';
         $checkUr = '';
     } elseif (array_key_exists(Labels::CHECK_UR, $_GET) && !array_key_exists(Labels::CHECK_FIZ, $_GET)) {
         $onclickUr = '';
         $checkFiz = '';
     } elseif (array_key_exists(Labels::CHECK_UR, $_GET) && array_key_exists(Labels::CHECK_FIZ, $_GET)) {
         $onclickFiz = "onclick=\"window.location='" . URLBuilder::storeModeFiz(YesNoType::NO) . "'\"";
         $onclickUr = "onclick=\"window.location='" . URLBuilder::storeModeUr(YesNoType::NO) . "'\"";
     }
     echo "\r\n            <div class='float_left chekbox_control font_arial'>\r\n                <div id='" . Labels::CHECK_UR . "' class='chekbox float_left cursor_pointer " . $checkUr . "' " . $onclickUr . "></div>\r\n                <div class='chekbox_label'>" . Labels::STORE_MODE_UR . "</div>\r\n            </div>\r\n            <div class='float_left chekbox_control font_arial'>\r\n                <div id='" . Labels::CHECK_FIZ . "' class='chekbox float_left cursor_pointer " . $checkFiz . "' " . $onclickFiz . "></div>\r\n                <div class='chekbox_label'>" . Labels::STORE_MODE_FIZ . "</div>\r\n            </div>\r\n        ";
 }
开发者ID:gingerP,项目名称:shop,代码行数:18,代码来源:StoreMode.php


示例10: smarty_function_LayerMessageList

/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */
function smarty_function_LayerMessageList($params, &$smarty)
{
    $object_type_id = $params['object_type_id'];
    $object_id = $params['object_id'];
    $height = $params['height'];
    if ($object_type_id == '') {
        return FALSE;
    }
    if ($object_id == '') {
        return FALSE;
    }
    if (empty($height)) {
        $height = 335;
    }
    $url = URLBuilder::getURL(array('template' => 1, 'object_type_id' => $object_type_id, 'object_id' => $object_id), Environment::getBaseURL() . '/message/EmbeddedMessageList.php');
    $retval = '
<div id="MessageFactoryLayer" style="background:#000000;visibility:hidden; position: absolute; left: 5000px; top: 130px; width: 90%; height:' . $height . 'px">
<div id="rowContent">
  <div id="titleTab"><div class="textTitle"><span class="textTitleSub">Messages</span></div></div>
</div>
<div id="rowContentInner">
	<div id="contentBoxTwoEdit">
			<table class="tblList">
				<tr>
					<td>
    ';
    $retval .= '<iframe style="width:100%; height:' . $height . 'px; border: 5px" id="LayerMessageFactoryFrame" name="LayerMessageFactoryFrame" src="' . $url . '"></iframe>';
    $retval .= '
					</td>
				</tr>
			</table>
	</div>
</div>
</div>
';
    return $retval;
}
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:42,代码来源:function.layermessagelist.php


示例11: array

 case 'submit':
     //Debug::setVerbosity(11);
     Debug::Text('Submit!', __FILE__, __LINE__, __METHOD__, 10);
     $fail_transaction = FALSE;
     if (TTDate::getDayDifference($data['start_date_stamp'], $data['end_date_stamp']) > 31) {
         Debug::Text('Date Range Exceeds 31 days, truncating', __FILE__, __LINE__, __METHOD__, 10);
         $sf->Validator->isTrue('date_stamp', FALSE, TTi18n::getText('Date range exceeds the maximum of 31 days'));
     }
     if (!(isset($filter_user_id) and is_array($filter_user_id) and count($filter_user_id) > 0)) {
         $sf->Validator->isTrue('user_id', FALSE, TTi18n::getText('Please select at least one employee'));
     }
     if (!($data['start_full_time_stamp'] != '' and $data['end_full_time_stamp'] != '' and $data['start_full_time_stamp'] >= time() - 86400 * 365 and $data['end_full_time_stamp'] <= time() + 86400 * 365)) {
         $sf->Validator->isTrue('date_stamp', FALSE, TTi18n::getText('Start or End dates are invalid'));
     }
     if ($sf->Validator->isValid()) {
         Redirect::Page(URLBuilder::getURL(array('action' => 'add_mass_schedule', 'filter_user_id' => $filter_user_id, 'data' => $data), '../progress_bar/ProgressBarControl.php'));
     }
 default:
     if ($action != 'submit' and !is_array($data)) {
         Debug::Text(' ID was NOT passed: ' . $id, __FILE__, __LINE__, __METHOD__, 10);
         $user_id = NULL;
         $user_date_id = NULL;
         $user_full_name = NULL;
         $user_default_branch = NULL;
         $user_default_department = NULL;
         $pay_period_is_locked = FALSE;
         $time_stamp = $start_date_stamp = $end_date_stamp = TTDate::getBeginDayEpoch(TTDate::getTime()) + 3600 * 12;
         //Noon
         $data = array('start_date_stamp' => $start_date_stamp, 'end_date_stamp' => $end_date_stamp, 'start_time' => strtotime('08:00 AM'), 'parsed_start_time' => strtotime('08:00 AM'), 'end_time' => strtotime('05:00 PM'), 'parsed_end_time' => strtotime('05:00 PM'), 'total_time' => 3600 * 9, 'branch_id' => $user_default_branch, 'department_id' => $user_default_department, 'dow' => array(1 => TRUE, 2 => TRUE, 3 => TRUE, 4 => TRUE, 5 => TRUE));
     }
     //var_dump($data);
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:AddMassSchedule.php


示例12: 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


示例13: str_replace

require_once Environment::getBasePath() . 'includes/Interface.inc.php';
require_once Environment::getBasePath() . 'classes/misc/arr_multisort.class.php';
//Debug::setVerbosity(11);
if (!$permission->Check('schedule', 'enabled') or !($permission->Check('schedule', 'view') or $permission->Check('schedule', 'view_own') or $permission->Check('schedule', 'view_child'))) {
    $permission->Redirect(FALSE);
    //Redirect
}
$smarty->assign('title', TTi18n::gettext($title = 'My Schedule'));
// See index.php
//BreadCrumb::setCrumb($title);
BreadCrumb::setCrumb($title, str_replace('ViewScheduleWeek.php', 'ViewSchedule.php', $_SERVER['REQUEST_URI']));
/*
 * Get FORM variables
 */
extract(FormVariables::GetVariables(array('do', 'page', 'sort_column', 'sort_order', 'filter_data')));
URLBuilder::setURL($_SERVER['SCRIPT_NAME'], array('sort_column' => $sort_column, 'sort_order' => $sort_order, 'page' => $page));
if (isset($filter_data['start_date']) and $filter_data['start_date'] != '') {
    $filter_data['start_date'] = TTDate::parseDateTime($filter_data['start_date']);
} else {
    $filter_data['start_date'] = time();
}
if (!isset($filter_data['show_days']) or isset($filter_data['show_days']) and $filter_data['show_days'] == '') {
    $filter_data['show_days'] = 1;
}
$filter_data['show_days'] = $filter_data['show_days'] * 7;
//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());
if ($permission->Check('schedule', 'view') == FALSE) {
    if ($permission->Check('schedule', 'view_child') == FALSE) {
        $permission_children_ids = array();
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:ViewScheduleWeek.php


示例14: 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


示例15: TTnew

     }
     if ($ppsf->isValid()) {
         //Pay Period schedule has to be saved before users can be assigned to it, so
         //do it this way.
         $ppsf->Save(FALSE);
         $ppsf->setEnableInitialPayPeriods(FALSE);
         if (isset($pay_period_schedule_data['user_ids'])) {
             $ppsf->setUser($pay_period_schedule_data['user_ids']);
         } else {
             $ppsf->setUser(array());
         }
         if ($ppsf->isValid()) {
             $ppsf->Save(TRUE);
             //$ppsf->FailTransaction();
             $ppsf->CommitTransaction();
             Redirect::Page(URLBuilder::getURL(NULL, 'PayPeriodScheduleList.php'));
             break;
         }
     }
     $ppsf->FailTransaction();
 default:
     if (isset($id)) {
         BreadCrumb::setCrumb($title);
         $ppslf = TTnew('PayPeriodScheduleListFactory');
         $ppslf->GetByIdAndCompanyId($id, $current_company->getId());
         foreach ($ppslf as $pay_period_schedule) {
             //Debug::Arr($station,'Department', __FILE__, __LINE__, __METHOD__,10);
             $pay_period_schedule_data = array('id' => $pay_period_schedule->getId(), 'company_id' => $pay_period_schedule->getCompany(), 'name' => $pay_period_schedule->getName(), 'description' => $pay_period_schedule->getDescription(), 'type' => $pay_period_schedule->getType(), 'start_week_day_id' => $pay_period_schedule->getStartWeekDay(), 'start_day_of_week' => $pay_period_schedule->getStartDayOfWeek(), 'transaction_date' => $pay_period_schedule->getTransactionDate(), 'primary_day_of_month' => $pay_period_schedule->getPrimaryDayOfMonth(), 'secondary_day_of_month' => $pay_period_schedule->getSecondaryDayOfMonth(), 'primary_transaction_day_of_month' => $pay_period_schedule->getPrimaryTransactionDayOfMonth(), 'secondary_transaction_day_of_month' => $pay_period_schedule->getSecondaryTransactionDayOfMonth(), 'transaction_date_bd' => $pay_period_schedule->getTransactionDateBusinessDay(), 'anchor_date' => $pay_period_schedule->getAnchorDate(), 'annual_pay_periods' => $pay_period_schedule->getAnnualPayPeriods(), 'day_start_time' => $pay_period_schedule->getDayStartTime(), 'time_zone' => $pay_period_schedule->getTimeZone(), 'new_day_trigger_time' => $pay_period_schedule->getNewDayTriggerTime(), 'maximum_shift_time' => $pay_period_schedule->getMaximumShiftTime(), 'shift_assigned_day_id' => $pay_period_schedule->getShiftAssignedDay(), 'timesheet_verify_type_id' => $pay_period_schedule->getTimeSheetVerifyType(), 'timesheet_verify_before_end_date' => $pay_period_schedule->getTimeSheetVerifyBeforeEndDate(), 'timesheet_verify_before_transaction_date' => $pay_period_schedule->getTimeSheetVerifyBeforeTransactionDate(), 'timesheet_verify_notice_before_transaction_date' => $pay_period_schedule->getTimeSheetVerifyNoticeBeforeTransactionDate(), 'timesheet_verify_notice_email' => $pay_period_schedule->getTimeSheetVerifyNoticeEmail(), 'user_ids' => $pay_period_schedule->getUser(), 'deleted' => $pay_period_schedule->getDeleted(), 'created_date' => $pay_period_schedule->getCreatedDate(), 'created_by' => $pay_period_schedule->getCreatedBy(), 'updated_date' => $pay_period_schedule->getUpdatedDate(), 'updated_by' => $pay_period_schedule->getUpdatedBy(), 'deleted_date' => $pay_period_schedule->getDeletedDate(), 'deleted_by' => $pay_period_schedule->getDeletedBy());
         }
     } elseif ($action != 'submit') {
         $pay_period_schedule_data = array('anchor_date' => TTDate::getBeginMonthEpoch(time()), 'day_start_time' => 0, 'new_day_trigger_time' => 3600 * 4, 'maximum_shift_time' => 3600 * 16, 'time_zone' => $current_user_prefs->getTimeZone(), 'type' => 20, 'timesheet_verify_type_id' => 10, 'timesheet_verify_before_end_date' => 0, 'timesheet_verify_before_transaction_date' => 0, 'annual_pay_periods' => 0);
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:EditPayPeriodSchedule.php


示例16: TTnew

             $cdf->setIncludePayStubEntryAccount(array());
         }
         if (isset($data['exclude_pay_stub_entry_account_ids'])) {
             $cdf->setExcludePayStubEntryAccount($data['exclude_pay_stub_entry_account_ids']);
         } else {
             $cdf->setExcludePayStubEntryAccount(array());
         }
         if (isset($data['user_ids'])) {
             $cdf->setUser($data['user_ids']);
         } else {
             $cdf->setUser(array());
         }
         if ($cdf->isValid()) {
             $cdf->Save(TRUE);
             $cdf->CommitTransaction();
             Redirect::Page(URLBuilder::getURL(NULL, 'CompanyDeductionList.php'));
             break;
         }
     }
 default:
     if (isset($id)) {
         BreadCrumb::setCrumb($title);
         $cdlf = TTnew('CompanyDeductionListFactory');
         $cdlf->getByCompanyIdAndId($current_company->getId(), $id);
         foreach ($cdlf as $cd_obj) {
             //Debug::Arr($station,'Department', __FILE__, __LINE__, __METHOD__,10);
             $data = array('id' => $cd_obj->getId(), 'company_id' => $cd_obj->getCompany(), 'status_id' => $cd_obj->getStatus(), 'type_id' => $cd_obj->getType(), 'name' => $cd_obj->getName(), 'start_date' => $cd_obj->getStartDate(), 'end_date' => $cd_obj->getEndDate(), 'minimum_length_of_service' => $cd_obj->getMinimumLengthOfService(), 'minimum_length_of_service_unit_id' => $cd_obj->getMinimumLengthOfServiceUnit(), 'maximum_length_of_service' => $cd_obj->getMaximumLengthOfService(), 'maximum_length_of_service_unit_id' => $cd_obj->getMaximumLengthOfServiceUnit(), 'minimum_user_age' => $cd_obj->getMinimumUserAge(), 'maximum_user_age' => $cd_obj->getMaximumUserAge(), 'calculation_id' => $cd_obj->getCalculation(), 'calculation_order' => $cd_obj->getCalculationOrder(), 'country' => $cd_obj->getCountry(), 'province' => $cd_obj->getProvince(), 'district' => $cd_obj->getDistrict(), 'company_value1' => $cd_obj->getCompanyValue1(), 'company_value2' => $cd_obj->getCompanyValue2(), 'user_value1' => $cd_obj->getUserValue1(), 'user_value2' => $cd_obj->getUserValue2(), 'user_value3' => $cd_obj->getUserValue3(), 'user_value4' => $cd_obj->getUserValue4(), 'user_value5' => $cd_obj->getUserValue5(), 'user_value6' => $cd_obj->getUserValue6(), 'user_value7' => $cd_obj->getUserValue7(), 'user_value8' => $cd_obj->getUserValue8(), 'user_value9' => $cd_obj->getUserValue9(), 'user_value10' => $cd_obj->getUserValue10(), 'lock_user_value1' => $cd_obj->getLockUserValue1(), 'lock_user_value2' => $cd_obj->getLockUserValue2(), 'lock_user_value3' => $cd_obj->getLockUserValue3(), 'lock_user_value4' => $cd_obj->getLockUserValue4(), 'lock_user_value5' => $cd_obj->getLockUserValue5(), 'lock_user_value6' => $cd_obj->getLockUserValue6(), 'lock_user_value7' => $cd_obj->getLockUserValue7(), 'lock_user_value8' => $cd_obj->getLockUserValue8(), 'lock_user_value9' => $cd_obj->getLockUserValue9(), 'lock_user_value10' => $cd_obj->getLockUserValue10(), 'pay_stub_entry_account_id' => $cd_obj->getPayStubEntryAccount(), 'include_pay_stub_entry_account_ids' => $cd_obj->getIncludePayStubEntryAccount(), 'exclude_pay_stub_entry_account_ids' => $cd_obj->getExcludePayStubEntryAccount(), 'include_account_amount_type_id' => $cd_obj->getIncludeAccountAmountType(), 'exclude_account_amount_type_id' => $cd_obj->getExcludeAccountAmountType(), 'user_ids' => $cd_obj->getUser(), 'created_date' => $cd_obj->getCreatedDate(), 'created_by' => $cd_obj->getCreatedBy(), 'updated_date' => $cd_obj->getUpdatedDate(), 'updated_by' => $cd_obj->getUpdatedBy(), 'deleted_date' => $cd_obj->getDeletedDate(), 'deleted_by' => $cd_obj->getDeletedBy());
         }
     } elseif ($action != 'submit') {
         $data = array('country' => 0, 'province' => 0, 'district' => 0, 'user_value1' => 0, 'user_value2' => 0, 'user_value3' => 0, 'user_value4' => 0, 'user_value5' => 0, 'user_value6' => 0, 'user_value7' => 0, 'user_value8' => 0, 'user_value9' => 0, 'user_value10' => 0, 'minimum_length_of_service' => 0, 'maximum_length_of_service' => 0, 'minimum_user_age' => 0, 'maximum_user_age' => 0, 'calculation_order' => 100);
     }
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:EditCompanyDeduction.php


示例17: TTnew

     } else {
         $delete = FALSE;
     }
     $aplf = TTnew('AccrualPolicyListFactory');
     foreach ($ids as $id) {
         $aplf->getByIdAndCompanyId($id, $current_company->getId());
         $aplf->StartTransaction();
         foreach ($aplf as $ap_obj) {
             $ap_obj->setDeleted($delete);
             if ($ap_obj->isValid()) {
                 $ap_obj->Save();
             }
         }
         $aplf->CommitTransaction();
     }
     Redirect::Page(URLBuilder::getURL(NULL, 'AccrualPolicyList.php'));
     break;
 default:
     $aplf = TTnew('AccrualPolicyListFactory');
     $aplf->getByCompanyId($current_company->getId());
     $pager = new Pager($aplf);
     $type_options = $aplf->getOptions('type');
     $show_no_policy_group_notice = FALSE;
     foreach ($aplf as $ap_obj) {
         if ((int) $ap_obj->getColumn('assigned_policy_groups') == 0) {
             $show_no_policy_group_notice = TRUE;
         }
         $policies[] = array('id' => $ap_obj->getId(), 'name' => $ap_obj->getName(), 'type_id' => $ap_obj->getType(), 'type' => $type_options[$ap_obj->getType()], 'assigned_policy_groups' => (int) $ap_obj->getColumn('assigned_policy_groups'), 'deleted' => $ap_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,代码来源:AccrualPolicyList.php


示例18: unset

                 } else {
                     //Delete week
                     if ($week_row_id > 0) {
                         $rstf->setID($week_row_id);
                         $rstf->setDeleted(TRUE);
                         $rstf->Save();
                     } else {
                         unset($week_row[$week_row_id]);
                     }
                 }
             }
         }
         if ($redirect == 0) {
             $rstcf->CommitTransaction();
             //$rstcf->FailTransaction();
             Redirect::Page(URLBuilder::getURL(NULL, 'RecurringScheduleTemplateControlList.php'));
             break;
         }
     }
     $rstcf->FailTransaction();
 case 'delete':
     if (count($ids) > 0) {
         foreach ($ids as $rst_id) {
             if ($rst_id > 0) {
                 Debug::Text('Deleting Week Row ID: ' . $rst_id, __FILE__, __LINE__, __METHOD__, 10);
                 $rstlf = TTnew('RecurringScheduleTemplateListFactory');
                 $rstlf->getById($rst_id);
                 if ($rstlf->getRecordCount() == 1) {
                     foreach ($rstlf as $rst_obj) {
                         $rst_obj->setDeleted(TRUE);
                         if ($rst_obj->isValid()) {
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:EditRecurringScheduleTemplate.php


示例19: unset

     } else {
         $utf->setSocialSecurityExempt(FALSE);
     }
     if (isset($tax_data['ui_exempt'])) {
         $utf->setUIExempt($tax_data['ui_exempt']);
     } else {
         $utf->setUIExempt(FALSE);
     }
     if (isset($tax_data['medicare_exempt'])) {
         $utf->setMedicareExempt($tax_data['medicare_exempt']);
     } else {
         $utf->setMedicareExempt(FALSE);
     }
     if ($utf->isValid()) {
         $utf->Save();
         Redirect::Page(URLBuilder::getURL(array('user_id' => $tax_data['user_id'], 'data_saved' => TRUE), 'EditUserTax.php'));
         //Redirect::Page( URLBuilder::getURL( NULL , 'UserList.php') );
         break;
     }
 default:
     if (isset($user_id) and $action != 'submit') {
         unset($tax_data);
         BreadCrumb::setCrumb($title);
         Debug::Text('User ID: ' . $user_id, __FILE__, __LINE__, __METHOD__, 10);
         $ulf = new UserListFactory();
         $ulf->getByIdAndCompanyId($user_id, $current_company->getId());
         if ($ulf->getRecordCount() > 0) {
             $user_obj = $ulf->getCurrent();
         }
         $utlf = new UserTaxListFactory();
         //$uwlf->GetByUserIdAndCompanyId($current_user->getId(), $current_company->getId() );
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:EditUserTax.php


示例20: 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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP URLHelper类代码示例发布时间:2022-05-23
下一篇:
PHP URL类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap