} if ($cf->isValid()) { $cf->Save(); //$cf->FailTransaction(); $cf->CommitTransaction(); if ($permission->Check('company', 'edit')) { Redirect::Page(URLBuilder::getURL(NULL, 'CompanyList.php')); } else { Redirect::Page(URLBuilder::getURL(NULL, '../index.php')); } break; } $cf->FailTransaction(); default: if (isset($id)) { BreadCrumb::setCrumb($title); $clf = new CompanyListFactory(); if ($permission->Check('company', 'edit')) { $clf->GetByID($id); } else { $id = $current_company->getId(); $clf->GetByID($id); } foreach ($clf as $company) { //Debug::Arr($company,'Company', __FILE__, __LINE__, __METHOD__,10); $company_data = array('id' => $company->getId(), 'parent' => $company->getParent(), 'status' => $company->getStatus(), 'product_edition' => $company->getProductEdition(), 'name' => $company->getName(), 'short_name' => $company->getShortName(), 'business_number' => $company->getBusinessNumber(), 'originator_id' => $company->getOriginatorID(), 'data_center_id' => $company->getDataCenterID(), 'address1' => $company->getAddress1(), 'address2' => $company->getAddress2(), 'city' => $company->getCity(), 'province' => $company->getProvince(), 'country' => $company->getCountry(), 'postal_code' => $company->getPostalCode(), 'work_phone' => $company->getWorkPhone(), 'fax_phone' => $company->getFaxPhone(), 'admin_contact' => $company->getAdminContact(), 'billing_contact' => $company->getBillingContact(), 'support_contact' => $company->getSupportContact(), 'logo_file_name' => $company->getLogoFileName(NULL, FALSE), 'enable_second_last_name' => $company->getEnableSecondLastName(), 'created_date' => $company->getCreatedDate(), 'created_by' => $company->getCreatedBy(), 'updated_date' => $company->getUpdatedDate(), 'updated_by' => $company->getUpdatedBy(), 'deleted_date' => $company->getDeletedDate(), 'deleted_by' => $company->getDeletedBy()); } } //Select box options; $company_data['status_options'] = $cf->getOptions('status'); $company_data['country_options'] = $cf->getOptions('country');
* $Revision: 7487 $ * $Id: ViewScheduleWeek.php 7487 2012-08-15 22:35:09Z ipso $ * $Date: 2012-08-15 15:35:09 -0700 (Wed, 15 Aug 2012) $ */ require_once '../../includes/global.inc.php'; 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.