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


PHP Companies::getLocationArray方法代码示例

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


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

示例1: SecureAJAXInterface

 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific language governing rights and limitations
 * under the License.
 *
 * The Original Code is "CATS Standard Edition".
 *
 * The Initial Developer of the Original Code is Cognizo Technologies, Inc.
 * Portions created by the Initial Developer are Copyright (C) 2005 - 2007
 * (or from the year in which this file was created to the year 2007) by
 * Cognizo Technologies, Inc. All Rights Reserved.
 *
 *
 * $Id: getCompanyLocation.php 2359 2007-04-21 22:49:17Z will $
 */
include_once './lib/Companies.php';
$interface = new SecureAJAXInterface();
if (!$interface->isRequiredIDValid('companyID', false)) {
    $interface->outputXMLErrorPage(-1, 'Invalid company ID.');
    die;
}
$siteID = $interface->getSiteID();
$companyID = $_REQUEST['companyID'];
/* Get an array of the company's location data. */
$companies = new Companies($siteID);
$locationArray = $companies->getLocationArray($companyID);
if (empty($locationArray)) {
    $interface->outputXMLErrorPage(-2, 'No location data.');
    die;
}
/* Send back the XML data. */
$interface->outputXMLPage("<data>\n" . "    <errorcode>0</errorcode>\n" . "    <errormessage></errormessage>\n" . "    <address>" . $locationArray['address'] . "</address>\n" . "    <city>" . $locationArray['city'] . "</city>\n" . "    <state>" . $locationArray['state'] . "</state>\n" . "    <zip>" . $locationArray['zip'] . "</zip>\n" . "</data>\n");
开发者ID:PublicityPort,项目名称:OpenCATS,代码行数:31,代码来源:getCompanyLocation.php

示例2: add

 private function add()
 {
     $users = new Users($this->_siteID);
     $usersRS = $users->getSelectList();
     $companies = new Companies($this->_siteID);
     $companiesRS = $companies->getSelectList();
     $jobOrders = new JobOrders($this->_siteID);
     /* Do we have any companies yet? */
     if (empty($companiesRS)) {
         $noCompanies = true;
     } else {
         $noCompanies = false;
     }
     if (!$this->isRequiredIDValid('selected_company_id', $_GET)) {
         $selectedCompanyID = false;
     } else {
         $selectedCompanyID = $_GET['selected_company_id'];
     }
     if ($_SESSION['CATS']->isHrMode()) {
         $companies = new Companies($this->_siteID);
         $selectedCompanyID = $companies->getDefaultCompany();
     }
     /* Do we have a selected_company_id? */
     if ($selectedCompanyID === false) {
         $selectedCompanyContacts = array();
         $selectedCompanyLocation = array();
         $selectedDepartmentsString = '';
         $defaultCompanyID = $companies->getDefaultCompany();
         if ($defaultCompanyID !== false) {
             $defaultCompanyRS = $companies->get($defaultCompanyID);
         } else {
             $defaultCompanyRS = array();
         }
         $companyRS = array();
     } else {
         $selectedCompanyContacts = $companies->getContactsArray($selectedCompanyID);
         $selectedCompanyLocation = $companies->getLocationArray($selectedCompanyID);
         $departmentsRS = $companies->getDepartments($selectedCompanyID);
         $selectedDepartmentsString = ListEditor::getStringFromList($departmentsRS, 'name');
         $defaultCompanyID = false;
         $defaultCompanyRS = array();
         $companyRS = $companies->get($selectedCompanyID);
     }
     /* Should we prepopulate the blank JO with the contents of another JO? */
     if (isset($_GET['typeOfAdd']) && $this->isRequiredIDValid('jobOrderID', $_GET) && $_GET['typeOfAdd'] == 'existing') {
         $jobOrderID = $_GET['jobOrderID'];
         $jobOrderSourceRS = $jobOrders->get($jobOrderID);
         $jobOrderSourceExtraFields = $jobOrders->extraFields->getValuesForEdit($jobOrderID);
         $this->_template->assign('jobOrderSourceRS', $jobOrderSourceRS);
         $this->_template->assign('jobOrderSourceExtraFields', $jobOrderSourceExtraFields);
     } else {
         $this->_template->assign('jobOrderSourceRS', false);
         $this->_template->assign('jobOrderSourceExtraFields', false);
     }
     /* Get extra fields. */
     $extraFieldRS = $jobOrders->extraFields->getValuesForAdd();
     /* Get questionnaires to attach (if public) */
     $questionnaire = new Questionnaire($this->_siteID);
     $questionnaires = $questionnaire->getAll(false);
     $careerPortalSettings = new CareerPortalSettings($this->_siteID);
     $careerPortalSettingsRS = $careerPortalSettings->getAll();
     $careerPortalEnabled = intval($careerPortalSettingsRS['enabled']) ? true : false;
     $this->_template->assign('careerPortalEnabled', $careerPortalEnabled);
     $this->_template->assign('questionnaires', $questionnaires);
     $this->_template->assign('extraFieldRS', $extraFieldRS);
     $this->_template->assign('defaultCompanyID', $defaultCompanyID);
     $this->_template->assign('defaultCompanyRS', $defaultCompanyRS);
     $this->_template->assign('active', $this);
     $this->_template->assign('subActive', 'Add Job Order');
     $this->_template->assign('usersRS', $usersRS);
     $this->_template->assign('userID', $this->_userID);
     $this->_template->assign('companiesRS', $companiesRS);
     $this->_template->assign('companyRS', $companyRS);
     $this->_template->assign('noCompanies', $noCompanies);
     $this->_template->assign('selectedCompanyID', $selectedCompanyID);
     $this->_template->assign('selectedCompanyContacts', $selectedCompanyContacts);
     $this->_template->assign('selectedCompanyLocation', $selectedCompanyLocation);
     $this->_template->assign('selectedDepartmentsString', $selectedDepartmentsString);
     $this->_template->assign('isHrMode', $_SESSION['CATS']->isHrMode());
     $this->_template->assign('sessionCookie', $_SESSION['CATS']->getCookie());
     if (!eval(Hooks::get('JO_ADD'))) {
         return;
     }
     $this->_template->display('./modules/joborders/Add.tpl');
 }
开发者ID:PublicityPort,项目名称:OpenCATS,代码行数:85,代码来源:JobOrdersUI.php


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