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


PHP History::storeHistoryNew方法代码示例

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


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

示例1: add

 /**
  * Adds a company to the database and returns its company ID.
  *
  * @param string Name
  * @param string Address line
  * @param string City
  * @param string State
  * @param string Zip code
  * @param string Phone 1
  * @param string Phone 2
  * @param string Url
  * @param string Key technologies
  * @param boolean Is company hot
  * @param string Company notes
  * @param integer Entered-by user
  * @param integer Owner user
  * @return new Company ID, or -1 on failure.
  */
 public function add($name, $address, $city, $state, $zip, $phone1, $phone2, $faxNumber, $url, $keyTechnologies, $isHot, $notes, $enteredBy, $owner)
 {
     $sql = sprintf("INSERT INTO company (\n                name,\n                address,\n                city,\n                state,\n                zip,\n                phone1,\n                phone2,\n                fax_number,\n                url,\n                key_technologies,\n                is_hot,\n                notes,\n                entered_by,\n                owner,\n                site_id,\n                date_created,\n                date_modified\n            )\n            VALUES (\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                NOW(),\n                NOW()\n            )", $this->_db->makeQueryString($name), $this->_db->makeQueryString($address), $this->_db->makeQueryString($city), $this->_db->makeQueryString($state), $this->_db->makeQueryString($zip), $this->_db->makeQueryString($phone1), $this->_db->makeQueryString($phone2), $this->_db->makeQueryString($faxNumber), $this->_db->makeQueryString($url), $this->_db->makeQueryString($keyTechnologies), $isHot ? '1' : '0', $this->_db->makeQueryString($notes), $this->_db->makeQueryInteger($enteredBy), $this->_db->makeQueryInteger($owner), $this->_siteID);
     $queryResult = $this->_db->query($sql);
     if (!$queryResult) {
         return -1;
     }
     $companyID = $this->_db->getLastInsertID();
     $history = new History($this->_siteID);
     $history->storeHistoryNew(DATA_ITEM_COMPANY, $companyID);
     return $companyID;
 }
开发者ID:rankinp,项目名称:OpenCATS,代码行数:30,代码来源:Companies.php

示例2: add

 /**
  * Adds a contact to the database and returns its contact ID.
  *
  * @param integer company ID
  * @param string first name
  * @param string last name
  * @param string title
  * @param string department
  * @param string e-mail address 1
  * @param string e-mail address 2
  * @param string work phone number
  * @param string cell phone number
  * @param string other phone number
  * @param string address line
  * @param string city
  * @param string state
  * @param string zip code
  * @param boolean is hot
  * @param string contact notes
  * @param integer entered-by user
  * @param integer owner user
  * @return new contact ID, or -1 on failure.
  */
 public function add($companyID, $firstName, $lastName, $title, $department, $reportsTo, $email1, $email2, $phoneWork, $phoneCell, $phoneOther, $address, $city, $state, $zip, $isHot, $notes, $enteredBy, $owner)
 {
     /* Get the department ID of the selected department. */
     $departmentID = $this->getDepartmentIDByName($department, $companyID, $this->_db);
     $sql = sprintf("INSERT INTO contact (\n                company_id,\n                first_name,\n                last_name,\n                title,\n                company_department_id,\n                reports_to,\n                email1,\n                email2,\n                phone_work,\n                phone_cell,\n                phone_other,\n                address,\n                city,\n                state,\n                zip,\n                is_hot,\n                left_company,\n                notes,\n                entered_by,\n                owner,\n                site_id,\n                date_created,\n                date_modified\n            )\n            VALUES (\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                0,\n                %s,\n                %s,\n                %s,\n                %s,\n                NOW(),\n                NOW()\n            )", $this->_db->makeQueryInteger($companyID), $this->_db->makeQueryString($firstName), $this->_db->makeQueryString($lastName), $this->_db->makeQueryString($title), $this->_db->makeQueryInteger($departmentID), $this->_db->makeQueryInteger($reportsTo), $this->_db->makeQueryString($email1), $this->_db->makeQueryString($email2), $this->_db->makeQueryString($phoneWork), $this->_db->makeQueryString($phoneCell), $this->_db->makeQueryString($phoneOther), $this->_db->makeQueryString($address), $this->_db->makeQueryString($city), $this->_db->makeQueryString($state), $this->_db->makeQueryString($zip), $isHot ? '1' : '0', $this->_db->makeQueryString($notes), $this->_db->makeQueryInteger($enteredBy), $this->_db->makeQueryInteger($owner), $this->_siteID);
     $queryResult = $this->_db->query($sql);
     if (!$queryResult) {
         return -1;
     }
     $contactID = $this->_db->getLastInsertID();
     $history = new History($this->_siteID);
     $history->storeHistoryNew(DATA_ITEM_CONTACT, $contactID);
     return $contactID;
 }
开发者ID:PublicityPort,项目名称:OpenCATS,代码行数:37,代码来源:Contacts.php

示例3: add

 /**
  * Adds a candidate to the database and returns its candidate ID.
  *
  * @param string First name.
  * @param string Middle name / initial.
  * @param string Last name.
  * @param string Primary e-mail address.
  * @param string Secondary e-mail address.
  * @param string Home phone number.
  * @param string Mobile phone number.
  * @param string Work phone number.
  * @param string Address (can be multiple lines).
  * @param string City.
  * @param string State / province.
  * @param string Postal code.
  * @param string Source where this candidate was found.
  * @param string Key skills.
  * @param string Date available.
  * @param string Current employer.
  * @param boolean Is this candidate willing to relocate?
  * @param string Current pay rate / salary.
  * @param string Desired pay rate / salary.
  * @param string Misc. candidate notes.
  * @param string Candidate's personal web site.
  * @param integer Entered-by user ID.
  * @param integer Owner user ID.
  * @param string EEO gender, or '' to not specify.
  * @param string EEO gender, or '' to not specify.
  * @param string EEO veteran status, or '' to not specify.
  * @param string EEO disability status, or '' to not specify.
  * @param boolean Skip creating a history entry?
  * @return integer Candidate ID of new candidate, or -1 on failure.
  */
 public function add($firstName, $middleName, $lastName, $email1, $email2, $phoneHome, $phoneCell, $phoneWork, $address, $city, $state, $zip, $source, $keySkills, $dateAvailable, $currentEmployer, $canRelocate, $currentPay, $desiredPay, $notes, $webSite, $bestTimeToCall, $enteredBy, $owner, $gender = '', $race = '', $veteran = '', $disability = '', $skipHistory = false)
 {
     $sql = sprintf("INSERT INTO candidate (\n                first_name,\n                middle_name,\n                last_name,\n                email1,\n                email2,\n                phone_home,\n                phone_cell,\n                phone_work,\n                address,\n                city,\n                state,\n                zip,\n                source,\n                key_skills,\n                date_available,\n                current_employer,\n                can_relocate,\n                current_pay,\n                desired_pay,\n                notes,\n                web_site,\n                best_time_to_call,\n                entered_by,\n                is_hot,\n                owner,\n                site_id,\n                date_created,\n                date_modified,\n                eeo_ethnic_type_id,\n                eeo_veteran_type_id,\n                eeo_disability_status,\n                eeo_gender\n            )\n            VALUES (\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                0,\n                %s,\n                %s,\n                NOW(),\n                NOW(),\n                %s,\n                %s,\n                %s,\n                %s\n            )", $this->_db->makeQueryString($firstName), $this->_db->makeQueryString($middleName), $this->_db->makeQueryString($lastName), $this->_db->makeQueryString($email1), $this->_db->makeQueryString($email2), $this->_db->makeQueryString($phoneHome), $this->_db->makeQueryString($phoneCell), $this->_db->makeQueryString($phoneWork), $this->_db->makeQueryString($address), $this->_db->makeQueryString($city), $this->_db->makeQueryString($state), $this->_db->makeQueryString($zip), $this->_db->makeQueryString($source), $this->_db->makeQueryString($keySkills), $this->_db->makeQueryStringOrNULL($dateAvailable), $this->_db->makeQueryString($currentEmployer), $canRelocate ? '1' : '0', $this->_db->makeQueryString($currentPay), $this->_db->makeQueryString($desiredPay), $this->_db->makeQueryString($notes), $this->_db->makeQueryString($webSite), $this->_db->makeQueryString($bestTimeToCall), $this->_db->makeQueryInteger($enteredBy), $this->_db->makeQueryInteger($owner), $this->_siteID, $this->_db->makeQueryInteger($race), $this->_db->makeQueryInteger($veteran), $this->_db->makeQueryString($disability), $this->_db->makeQueryString($gender));
     $queryResult = $this->_db->query($sql);
     if (!$queryResult) {
         return -1;
     }
     $candidateID = $this->_db->getLastInsertID();
     if (!$skipHistory) {
         $history = new History($this->_siteID);
         $history->storeHistoryNew(DATA_ITEM_CANDIDATE, $candidateID);
     }
     return $candidateID;
 }
开发者ID:PublicityPort,项目名称:OpenCATS,代码行数:47,代码来源:Candidates.php

示例4: add

 /**
  * Adds a job order to the database and returns its job order ID.
  *
  * @param string title
  * @param integer company ID
  * @param integer contact ID
  * @param string job description
  * @param string job order notes
  * @param string duration
  * @param string maximum rate
  * @param string job order type
  * @param boolean is job order hot
  * @param string (numeric) number of openings
  * @param string salary
  * @param string city
  * @param string state
  * @param string start date
  * @param integer entered-by user
  * @param integer recruiter user
  * @param integer owner user
  * @return new job order ID, or -1 on failure.
  */
 public function add($title, $companyID, $contactID, $description, $notes, $duration, $maxRate, $type, $isHot, $public, $openings, $companyJobID, $salary, $city, $state, $startDate, $enteredBy, $recruiter, $owner, $department, $questionnaire = false, $candidate_mapping = false, $ownertype = 0)
 {
     if (!empty($candidate_mapping)) {
         $candidate_mapping = json_encode($candidate_mapping);
     }
     $record = get_defined_vars();
     /* Get the department ID of the selected department. */
     // FIXME: Move this up to the UserInterface level. I don't like this
     //        tight coupling, and calling Contacts methods as static is
     //        bad.
     $objContacts = new Contacts($this->_siteID);
     $departmentID = $objContacts->getDepartmentIDByName($department, $companyID, $this->_db);
     $hook = _AuieoHook("joborders_add_before");
     if ($hook) {
         $hook($record);
     }
     // FIXME: Is the OrNULL usage below correct? Can these fields be NULL?
     $sql = sprintf("INSERT INTO joborder (\n                title,\n                client_job_id,\n                company_id,\n                contact_id,\n                description,\n                notes,\n                duration,\n                rate_max,\n                type,\n                is_hot,\n                public,\n                openings,\n                openings_available,\n                salary,\n                city,\n                state,\n                company_department_id,\n                start_date,\n                entered_by,\n                recruiter,\n                owner,\n                ownertype,\n                site_id,\n                date_created,\n                date_modified,\n                questionnaire_id,\n                candidate_mapping\n            )\n            VALUES (\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                %s,\n                NOW(),\n                NOW(),\n                %s,\n                %s\n            )", $this->_db->makeQueryString($title), $this->_db->makeQueryString($companyJobID), $this->_db->makeQueryInteger($companyID), $this->_db->makeQueryInteger($contactID), $this->_db->makeQueryString($description), $this->_db->makeQueryString($notes), $this->_db->makeQueryString($duration), $this->_db->makeQueryString($maxRate), $this->_db->makeQueryString($type), $isHot ? '1' : '0', $public ? '1' : '0', $this->_db->makeQueryInteger($openings), $this->_db->makeQueryInteger($openings), $this->_db->makeQueryString($salary), $this->_db->makeQueryString($city), $this->_db->makeQueryString($state), $this->_db->makeQueryInteger($departmentID), $this->_db->makeQueryStringOrNULL($startDate), $this->_db->makeQueryInteger($enteredBy), $this->_db->makeQueryInteger($recruiter), $this->_db->makeQueryInteger($owner), $this->_db->makeQueryInteger($ownertype), $this->_siteID, $questionnaire !== false ? $this->_db->makeQueryInteger($questionnaire) : 'NULL', $candidate_mapping !== false ? $this->_db->makeQueryString($candidate_mapping) : 'NULL');
     $queryResult = $this->_db->query($sql);
     if (!$queryResult) {
         return -1;
     }
     $jobOrderID = $this->_db->getLastInsertID();
     $hook = _AuieoHook("joborders_add_after");
     if ($hook) {
         $record["id"] = $jobOrderID;
         $hook($record);
     }
     /* Store history. */
     $history = new History($this->_siteID);
     $history->storeHistoryNew(DATA_ITEM_JOBORDER, $jobOrderID);
     return $jobOrderID;
 }
开发者ID:Hassanj343,项目名称:candidats,代码行数:55,代码来源:JobOrders.php


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