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

PHP Company类代码示例

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

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



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

示例1: loadCompany

function loadCompany($jsonObject)
{
    $id = $jsonObject->id;
    // name
    $request = "SELECT * FROM company WHERE id = {$id}";
    $result = mysql_query($request);
    $row = mysql_fetch_object($result);
    $name = $row->name;
    // departments
    $departments = array();
    $request = "SELECT * FROM department WHERE cid = {$id} AND did IS NULL";
    $result = mysql_query($request);
    $count = mysql_num_rows($result);
    while ($row = mysql_fetch_object($result)) {
        $departments[] = $row->name;
    }
    // total
    $request = "SELECT * FROM employee";
    $result = mysql_query($request);
    $total = 0;
    while ($row = mysql_fetch_object($result)) {
        $total += $row->salary;
    }
    // create company object
    $company = new Company();
    $company->setDepartments($departments);
    $company->setName($name);
    $company->setTotal($total);
    // return company object
    return $company;
}
开发者ID:nuzil,项目名称:101repo,代码行数:31,代码来源:companyServer.php


示例2: addRelatedCompany

 public function addRelatedCompany(Company $rCompany)
 {
     if ($this->data['partIVA'] != '' && $this->data['partIVA'] != 0 && $rCompany->getRawData('partIVA') != '' && $rCompany->getRawData('partIVA') !== 0) {
         $this->db->query('INSERT IGNORE INTO `company_to_company` (`or_partIVA`,`dest_partIVA`,`titolo`) 
         VALUES("' . addslashes($this->data['partIVA']) . '","' . addslashes($rCompany->getRawData('partIVA')) . '","' . addslashes($rCompany->getRawData('titolo')) . '")', \Zend\Db\Adapter\Adapter::QUERY_MODE_EXECUTE);
     }
 }
开发者ID:caiofior,项目名称:cercaziende,代码行数:7,代码来源:Company.php


示例3: work

 public function work()
 {
     $job = new Job();
     $job->getByUid($this->user->id);
     if ($job->hasWorked()) {
         throw new Exception('you have already worked');
     }
     $company = new Company();
     $company->get($job->company);
     //check if is in the same region
     if ($this->user->region != $company->region) {
         throw new Exception("You are not in the same region as company");
     }
     //check if company has funds enough
     if ($company->money < $job->salary) {
         throw new Exception("The company doesn't have funds enough");
     }
     $worked = $job->work();
     //add extra data before return
     if ($worked) {
         $data = $this->parse($job);
         $data = array_merge($data, $worked);
         return $data;
     } else {
         return false;
     }
 }
开发者ID:AugustoAngeletti,项目名称:erepublik,代码行数:27,代码来源:job.php


示例4: updateCompany

 public function updateCompany(Company $company)
 {
     $result = $this->companyDao->get($company->getId());
     ResultHelper::whenEmpty($result, AppLabelUtil::$ERROR_COMPANY_NOT_FOUND, HttpStatusCode::badRequest());
     $company->setStatus($this->validateStatus($company->getStatus()));
     $this->companyDao->update($company);
 }
开发者ID:euBatham,项目名称:javacature,代码行数:7,代码来源:CompanyService.class.php


示例5: buildForm

 /**
  * Form builder
  *
  * @param FormBuilderInterface $builder
  * @param array $options
  *
  * @return null
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $this->company = $options['company'];
     if (null == $this->company) {
         $builder->add('company', EntityType::class, array('label' => 'Docgroupcomptable.company.label', 'class' => 'AcfDataBundle:Company', 'query_builder' => function (CompanyRepository $br) {
             return $br->createQueryBuilder('c')->orderBy('c.corporateName', 'ASC');
         }, 'choice_label' => 'corporateName', 'multiple' => false, 'by_reference' => true, 'required' => true));
         $builder->add('parent', EntityType::class, array('label' => 'Docgroupcomptable.parent.label', 'class' => 'AcfDataBundle:Docgroupcomptable', 'query_builder' => function (DocgroupcomptableRepository $dgr) {
             return $dgr->createQueryBuilder('d')->orderBy('d.pageUrlFull', 'ASC');
         }, 'choice_label' => 'pageUrlFull', 'multiple' => false, 'by_reference' => true, 'required' => false, 'placeholder' => 'Options.choose', 'empty_data' => null));
         $builder->add('clone', EntityType::class, array('label' => 'Docgroup.clone.label', 'class' => 'AcfDataBundle:Docgroupcomptable', 'query_builder' => function (DocgroupcomptableRepository $dgr) {
             return $dgr->createQueryBuilder('d')->orderBy('d.pageUrlFull', 'ASC');
         }, 'choice_label' => 'pageUrlFull', 'multiple' => false, 'by_reference' => true, 'required' => false, 'placeholder' => 'Options.choose', 'mapped' => false));
     } else {
         $companyId = $this->company->getId();
         $builder->add('company', EntityidType::class, array('label' => 'Docgroupcomptable.company.label', 'class' => 'AcfDataBundle:Company', 'query_builder' => function (CompanyRepository $br) use($companyId) {
             return $br->createQueryBuilder('c')->where('c.id = :id')->setParameter('id', $companyId)->orderBy('c.corporateName', 'ASC');
         }, 'choice_label' => 'id', 'multiple' => false, 'by_reference' => true, 'required' => true));
         $builder->add('parent', EntityType::class, array('label' => 'Docgroupcomptable.parent.label', 'class' => 'AcfDataBundle:Docgroupcomptable', 'query_builder' => function (DocgroupcomptableRepository $dgr) use($companyId) {
             return $dgr->createQueryBuilder('d')->join('d.company', 'c')->where('c.id = :id')->setParameter('id', $companyId)->orderBy('d.pageUrlFull', 'ASC');
         }, 'choice_label' => 'pageUrlFull', 'multiple' => false, 'by_reference' => true, 'required' => false, 'placeholder' => 'Options.choose', 'empty_data' => null));
         $builder->add('clone', EntityType::class, array('label' => 'Docgroup.clone.label', 'class' => 'AcfDataBundle:Docgroupcomptable', 'query_builder' => function (DocgroupcomptableRepository $dgr) use($companyId) {
             return $dgr->createQueryBuilder('d')->join('d.company', 'c')->where('c.id = :id')->setParameter('id', $companyId)->orderBy('d.pageUrlFull', 'ASC');
         }, 'choice_label' => 'pageUrlFull', 'multiple' => false, 'by_reference' => true, 'required' => false, 'placeholder' => 'Options.choose', 'mapped' => false));
     }
     $builder->add('label', TextType::class, array('label' => 'Docgroupcomptable.label.label'));
     $builder->add('otherInfos', TextareaType::class, array('label' => 'Docgroupcomptable.otherInfos.label', 'required' => false));
 }
开发者ID:sasedev,项目名称:acf-expert,代码行数:36,代码来源:NewTForm.php


示例6: buildForm

 /**
  * Form builder
  *
  * @param FormBuilderInterface $builder
  * @param array $options
  *
  * @return null
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $this->company = $options['company'];
     if (null == $this->company) {
         $builder->add('company', EntityType::class, array('label' => 'Address.company.label', 'class' => 'AcfDataBundle:Company', 'query_builder' => function (CompanyRepository $br) {
             return $br->createQueryBuilder('c')->orderBy('c.corporateName', 'ASC');
         }, 'choice_label' => 'corporateName', 'multiple' => false, 'by_reference' => true, 'required' => true));
     } else {
         $companyId = $this->company->getId();
         $builder->add('company', EntityidType::class, array('label' => 'Address.company.label', 'class' => 'AcfDataBundle:Company', 'query_builder' => function (CompanyRepository $br) use($companyId) {
             return $br->createQueryBuilder('c')->where('c.id = :id')->setParameter('id', $companyId)->orderBy('c.corporateName', 'ASC');
         }, 'choice_label' => 'id', 'multiple' => false, 'by_reference' => true, 'required' => true));
     }
     $builder->add('label', TextType::class, array('label' => 'Address.label.label'));
     $builder->add('streetNum', IntegerType::class, array('label' => 'Address.streetNum.label', 'scale' => 0, 'required' => false));
     $builder->add('address', TextareaType::class, array('label' => 'Address.address.label', 'required' => false));
     $builder->add('address2', TextareaType::class, array('label' => 'Address.address2.label', 'required' => false));
     $builder->add('town', TextType::class, array('label' => 'Address.town.label', 'required' => false));
     $builder->add('zipCode', TextType::class, array('label' => 'Address.zipCode.label', 'required' => false));
     $builder->add('country', CountryType::class, array('label' => 'Address.country.label', 'required' => false, 'placeholder' => 'Options.choose', 'empty_data' => null));
     $builder->add('email', EmailType::class, array('label' => 'Address.email.label', 'required' => false));
     $builder->add('phone', TextType::class, array('label' => 'Address.phone.label', 'required' => false));
     $builder->add('mobile', TextType::class, array('label' => 'Address.mobile.label', 'required' => false));
     $builder->add('fax', TextType::class, array('label' => 'Address.fax.label', 'required' => false));
     $builder->add('otherInfos', TextareaType::class, array('label' => 'Address.otherInfos.label', 'required' => false));
 }
开发者ID:sasedev,项目名称:acf-expert,代码行数:34,代码来源:NewTForm.php


示例7: getCompanyEmail

 static function getCompanyEmail($company_id)
 {
     // Get the email address for the company
     // Use the first Technical address that is not defined as name TICKET_SUPPORT
     //      TICKET_SUPPORT is defined in conf/config.php
     // If that does not exist, use the main address
     $config = Config::Instance();
     $contact = '';
     $company = new Company();
     $company->load($company_id);
     $party = $company->party;
     $sh = new SearchHandler(new PartyContactMethodCollection(new PartyContactMethod()), false);
     $sh->AddConstraint(new Constraint('type', '=', 'E'));
     $ticket_support = $config->get('TICKET_SUPPORT');
     if (!empty($ticket_support)) {
         $sh->AddConstraint(new Constraint('name', '!=', $ticket_support));
     }
     $party->addSearchHandler('contactmethods', $sh);
     $methods = $party->contactmethods;
     foreach ($methods as $method) {
         if ($method->technical == true) {
             // Technical contact favoured above all else
             $contact = $method->contact;
             break;
         }
         if ($method->main == true) {
             // If no contact yet found and this contact is the main contact, use this instead
             $contact = $method->contact;
         }
     }
     return $contact;
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:32,代码来源:Ticket.php


示例8: _new

 public function _new()
 {
     parent::_new();
     $this->setTemplateName('calls_new');
     $projects = $opportunities = $activities = null;
     if (isset($this->_data['person_id'])) {
         $person = new Person();
         $person->load($this->_data['person_id']);
         $this->_data['company_id'] = $person->company_id;
         $projects = $person->projects;
         $opportunities = $person->opportunities;
         $activities = $person->activities;
         $this->view->set('person', $person->fullname);
     }
     if (isset($this->_data['company_id'])) {
         $company = new Company();
         $company->load($this->_data['company_id']);
         $projects = DataObjectCollection::Merge($company->projects, $projects);
         $opportunities = DataObjectCollection::Merge($company->opportunities, $opportunities);
         $activities = DataObjectCollection::Merge($company->activities, $activities);
         $this->view->set('company', $company->name);
     }
     if (isset($this->_data['project_id'])) {
         $project = new Project();
         $project->load($this->_data['project_id']);
         $this->_data['company_id'] = $project->company_id;
     }
     $this->view->set('projects', $projects);
     $this->view->set('opportunities', $opportunities);
     $this->view->set('activities', $activities);
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:31,代码来源:LoggedcallsController.php


示例9: actionAddcompany

 public function actionAddcompany()
 {
     $companyModel = new Company();
     $userLoginModel = new UserLogin();
     $userProfileModel = new UserProfile();
     if (isset($_POST['Company'])) {
         $companyModel->attributes = $_POST['Company'];
         $userLoginModel->attributes = $_POST['UserLogin'];
         $userProfileModel->attributes = $_POST['UserProfile'];
         if ($companyModel->validate()) {
             if ($companyModel->save()) {
                 $userLoginModel->UserRoleID = 2;
                 // $userLoginModel->LoginEmail = '[email protected]';
                 $userLoginModel->UserPassword = md5($userLoginModel->UserPassword);
                 $userLoginModel->IsPasswordReset = 1;
                 $userLoginModel->IsActive = 1;
                 $userLoginModel->save();
                 $userProfileModel->UserLoginID = $userLoginModel->UserLoginID;
                 $userProfileModel->CompanyID = $companyModel->CompanyID;
                 // $userProfileModel->FirstName = 'Test';
                 // $userProfileModel->LastName = 'test';
                 $userProfileModel->AgreeToTerms = 0;
                 $userProfileModel->IsFacilitator = 0;
                 $userProfileModel->save();
                 $this->redirect(Yii::app()->createUrl('admin/setup', array('id' => $companyModel->CompanyID)));
             }
         }
     }
     $this->render('add-company', array('companyModel' => $companyModel, 'userLoginModel' => $userLoginModel, 'userProfileModel' => $userProfileModel));
 }
开发者ID:elephanthead,项目名称:itr,代码行数:30,代码来源:AdminController.php


示例10: createAndSaveMultipleCompanies

 public function createAndSaveMultipleCompanies($count)
 {
     for ($i = 65; $i <= 65 + $count - 1; $i++) {
         $company = new Company();
         $company->setName(sprintf($this->getCreatedCompanynamePattern(), chr($i)));
         $company->save();
     }
 }
开发者ID:rmhdev,项目名称:sfSesame,代码行数:8,代码来源:CompanyTestFunctional.class.php


示例11: getCompany

 function getCompany($companyID)
 {
     $company = new Company();
     if ($company->selectRecord($companyID)) {
         return $company;
     } else {
         return false;
     }
 }
开发者ID:armic,项目名称:erpts,代码行数:9,代码来源:NoticeOfAssessmentPrint.php


示例12: encoder_redirect_success

function encoder_redirect_success(Company $company)
{
    $Company_Name = $company->getCompanyName();
    $Company_Name_Amharic = $company->getCompanyNameAmharic();
    $dir = "VIEW/html/Encoder/Add_Company/Company_List.php?success=1&Company_Name={$Company_Name}&Company_Name_Amharic={$Company_Name_Amharic}";
    $url = BASE_URL . $dir;
    header("Location:{$url}");
    //redirect the encoder to the regions add place
    exit;
}
开发者ID:rogermule,项目名称:afalagi-web,代码行数:10,代码来源:Edit_Health_Institute.php


示例13: updateCompany

 function updateCompany($xmlStr)
 {
     if (!($domDoc = domxml_open_mem($xmlStr))) {
         return false;
     }
     $company = new Company();
     $company->parseDomDocument($domDoc);
     $ret = $company->updateRecord();
     return $ret;
 }
开发者ID:armic,项目名称:erpts,代码行数:10,代码来源:CompanyEncode.php


示例14: display

 function display()
 {
     Load::model('company');
     $Company = new Company();
     $param['income'] = $Company->get_income();
     $param['expense'] = $Company->get_expense();
     //$param['onhand'] = $this->get_cashonhand();
     //$param['aff_money'] = $this->get_affmoney();
     Load::view('business-status', $param);
 }
开发者ID:etuyco,项目名称:v2.inlight-marketing,代码行数:10,代码来源:bstatus.php


示例15: getCompanyDetails

 function getCompanyDetails($companyID)
 {
     $company = new Company();
     $company->selectRecord($companyID);
     if (!($domDoc = $company->getDomDocument())) {
         return false;
     } else {
         $xmlStr = $domDoc->dump_mem(true);
         return $xmlStr;
     }
 }
开发者ID:armic,项目名称:erpts,代码行数:11,代码来源:CompanyDetails.php


示例16: selectRecords

 function selectRecords($condition = " ORDER BY TRIM(Company.companyName) ASC LIMIT 0,10")
 {
     $this->setDB();
     $sql = sprintf("SELECT DISTINCT(OwnerCompany.companyID) as companyID" . " FROM OwnerCompany,Company " . " WHERE OwnerCompany.companyID = Company.companyID " . " %s;", $condition);
     $this->db->query($sql);
     while ($this->db->next_record()) {
         $company = new Company();
         $company->selectRecord($this->db->f("companyID"));
         $this->arrayList[] = $company;
     }
 }
开发者ID:armic,项目名称:erpts,代码行数:11,代码来源:OwnerCompanyList.php


示例17: company

 public function company()
 {
     $userid = self::get_user();
     $company = new Company($userid);
     $compdata = $company->currentcompany();
     while ($rowscomp = $compdata->fetch_object()) {
         $this->companydata[] = $rowscomp;
     }
     // echo "<pre>";
     // var_dump($this->companydata);exit;
 }
开发者ID:joshjim27,项目名称:jobsglobal,代码行数:11,代码来源:view.html.php


示例18: map

 public static function map(Company $company, array $properties)
 {
     if (array_key_exists('company_id', $properties)) {
         $company->setCompany_id((int) $properties['company_id']);
     }
     if (array_key_exists('company_img_url', $properties)) {
         $company->setCompany_img_url($properties['company_img_url']);
     }
     if (array_key_exists('company_name', $properties)) {
         $company->setCompany_name($properties['company_name']);
     }
 }
开发者ID:Wooddu,项目名称:MMNZ,代码行数:12,代码来源:companyMapper.php


示例19: Main

 function Main($referer = "")
 {
     if (!$referer || !isset($referer)) {
         $referer = "OwnerList.php";
     }
     $this->tpl->set_var("referer", $referer);
     switch ($this->formArray["formAction"]) {
         case "save" || "view" || "viewOnly":
             $this->tpl->set_var("referer", $referer);
             $CompanyDetails = new SoapObject(NCCBIZ . "CompanyDetails.php", "urn:Object");
             if (!($xmlStr = $CompanyDetails->getCompanyDetails($this->formArray["companyID"]))) {
                 $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
                 $this->tpl->set_var("TableBlock", "record not found");
             } else {
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
                     $this->tpl->set_var("TableBlock", "error xmlDoc");
                 } else {
                     $company = new Company();
                     $company->parseDomDocument($domDoc);
                     $this->formArray["companyID"] = $company->getCompanyID();
                     $this->formArray["companyName"] = $company->getCompanyName();
                     $this->formArray["tin"] = $company->getTin();
                     $this->formArray["telephone"] = $company->getTelephone();
                     $this->formArray["fax"] = $company->getFax();
                     $address = $company->addressArray[0];
                     if (is_a($address, Address)) {
                         $this->formArray["addressID"] = $address->getAddressID();
                         $this->formArray["number"] = $address->getNumber();
                         $this->formArray["street"] = $address->getStreet();
                         $this->formArray["barangay"] = $address->getBarangay();
                         $this->formArray["district"] = $address->getDistrict();
                         $this->formArray["municipalityCity"] = $address->getMunicipalitycity();
                         $this->formArray["province"] = $address->getProvince();
                     }
                     $this->formArray["email"] = $company->getEmail();
                     $this->formArray["website"] = $company->getWebsite();
                 }
             }
             if ($this->formArray["formAction"] == "viewOnly") {
                 $this->tpl->set_block("rptsTemplate", "ViewOnly", "ViewOnlyBlock");
                 $this->tpl->set_var("ViewOnlyBlock", "");
             }
             break;
         case "cancel":
             //header("location: CompanyList.php");
             exit;
             break;
         default:
             $this->tpl->set_block("rptsTemplate", "ACK", "ACKBlock");
             $this->tpl->set_var("ACKBlock", "");
     }
     //*/
     $this->setForm();
     $this->tpl->parse("templatePage", "rptsTemplate");
     $this->tpl->finish("templatePage");
     $this->tpl->p("templatePage");
 }
开发者ID:armic,项目名称:erpts,代码行数:58,代码来源:CompanyDetails.php


示例20: mapDtoToCompany

 public function mapDtoToCompany(CompanyDto $companyDto)
 {
     $company = new Company();
     $company->setId($companyDto->getId());
     $company->setName($companyDto->getName());
     $company->setContactName($companyDto->getContactName());
     $company->setEmail($companyDto->getEmail());
     $company->setPhoneNumber($companyDto->getPhoneNumber());
     $company->setRegion($companyDto->getRegion());
     $company->setWebsite($companyDto->getWebsite());
     $company->setStatus($companyDto->getStatus());
     return $company;
 }
开发者ID:euBatham,项目名称:javacature,代码行数:13,代码来源:CompanyMapper.class.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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