本文整理汇总了PHP中Contract::retrieve方法的典型用法代码示例。如果您正苦于以下问题:PHP Contract::retrieve方法的具体用法?PHP Contract::retrieve怎么用?PHP Contract::retrieve使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Contract
的用法示例。
在下文中一共展示了Contract::retrieve方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Contract
<?php
require_once 'modules/AOS_PDF_Templates/clsMsDocGenerator.php';
require_once 'modules/AOS_PDF_Templates/PDF_Lib/mpdf.php';
require_once 'modules/AOS_PDF_Templates/templateParser.php';
require_once 'modules/AOS_PDF_Templates/sendEmail.php';
require_once 'modules/AOS_PDF_Templates/AOS_PDF_Templates.php';
global $mod_strings;
$module_type = $_REQUEST['module'];
$module = new Contract();
$module_type_file = strtoupper(ltrim(rtrim($module_type, 's'), ''));
$module_type_low = strtolower($module_type);
$module->retrieve($_REQUEST['contractid']);
$task = $_REQUEST['task'];
$doc = new clsMsDocGenerator();
$contractvalue = array();
$sql = "SELECT * FROM contract_values WHERE contract_value_id ='" . $module->id . "'and deleted = 0";
$res = $module->db->query($sql);
while ($row = $module->db->fetchByAssoc($res)) {
$contractvalue[$row['id']] = $row['contract_value_id'];
}
$contract_condition = array();
$sql1 = "SELECT * FROM contract_conditions WHERE contract_condition_id ='" . $module->id . "' AND deleted = 0";
$res1 = $module->db->query($sql1);
while ($row1 = $module->db->fetchByAssoc($res1)) {
$contract_condition[$row1['id']] = $row1['contract_condition_id'];
}
$transport_contract = array();
$sql2 = "SELECT * FROM transportcontracts WHERE contract_id='" . $this->id . "' AND deleted =0";
$res2 = $module->db->query($sql2);
while ($row2 = $module->db->fetchByAssoc($res2)) {
示例2: die
<?php
if (!defined('sugarEntry') || !sugarEntry) {
die('Not A Valid Entry Point');
}
require_once 'modules/Contracts/Contract.php';
require_once 'include/formbase.php';
require_once 'modules/ContractConditions/ContractCondition.php';
require_once 'modules/ContractValues/ContractValue.php';
require_once 'modules/TransportContracts/TransportContracts.php';
require_once 'modules/FITs/CustomerRating.php';
include "config.php";
global $sugar_config;
$focus = new Contract();
$focus->retrieve($_POST['record']);
if (!$focus->ACLAccess('Save')) {
ACLController::displayNoAccess(true);
sugar_cleanup(true);
}
if (!empty($_POST['assigned_user_id']) && $focus->assigned_user_id != $_POST['assigned_user_id'] && $_POST['assigned_user_id'] != $current_user->id) {
$check_notify = TRUE;
} else {
$check_notify = FALSE;
}
foreach ($focus->column_fields as $field) {
if (isset($_POST[$field])) {
$value = $_POST[$field];
switch ($field) {
case 'template_ddown_c':
$value = implode("^,^", $_POST[$field]);
break;
示例3: ContractLiquidate
*******************************************************************/
require_once 'modules/AOS_PDF_Templates/clsMsDocGenerator.php';
require_once 'modules/AOS_PDF_Templates/PDF_Lib/mpdf.php';
require_once 'modules/AOS_PDF_Templates/templateParser.php';
require_once 'modules/AOS_PDF_Templates/sendEmail.php';
require_once 'modules/AOS_PDF_Templates/AOS_PDF_Templates.php';
global $mod_strings;
$module_type = $_REQUEST['module'];
$module = new ContractLiquidate();
$module_type_file = strtoupper(ltrim(rtrim($module_type, 's'), ''));
$module_type_low = strtolower($module_type);
$module->retrieve($_REQUEST['contractid']);
//Lay thong tin cua hop dong goc
$contract = new Contract();
$contract->retrieve($module->contract_id);
//End
//Lay thong tin cua made tour
$madetour = new GroupProgram();
$madetour->retrieve($contract->groupprogr4251rograms_ida);
//End
//Lay thong tin cua tour
$tour = new Tour();
$tour->retrieve($madetour->tour_id);
//End
$task = $_REQUEST['task'];
$doc = new clsMsDocGenerator();
$contractliquidatevalue = array();
$sql = "SELECT * FROM contractliquidatevalues WHERE contract_liquidate_id ='" . $module->id . "'and deleted = 0";
$res = $module->db->query($sql);
while ($row = $module->db->fetchByAssoc($res)) {
示例4: array
$sql1 = "SELECT * FROM contract_conditions WHERE contract_condition_id ='" . $module->id . "' AND deleted = 0";
$res1 = $module->db->query($sql1);
while ($row1 = $module->db->fetchByAssoc($res1)) {
$contract_condition[$row1['id']] = $row1['contract_condition_id'];
}
$transport_contract = array();
$sql2 = "SELECT * FROM transportcontracts WHERE contract_id='" . $this->id . "' AND deleted =0";
$res2 = $module->db->query($sql2);
while ($row2 = $module->db->fetchByAssoc($res2)) {
$transport_contract[$row2['id']] = $row2['contract_id'];
}
$doc->setFontFamily("Time New Roman");
$template = new AOS_PDF_Templates();
$template->retrieve($_REQUEST['templateID']);
$contract = new Contract();
$contract->retrieve($module->contracts_2225ntracts_ida);
$object_arr = array();
$object_arr[$module_type] = $module->id;
$object_arr['Contracts'] = $contract->id;
$search = array('@<script[^>]*?>.*?</script>@si', '@<[\\/\\!]*?[^<>]*?>@si', '@([\\r\\n])[\\s]+@', '@&(quot|#34);@i', '@&(amp|#38);@i', '@&(lt|#60);@i', '@&(gt|#62);@i', '@&(nbsp|#160);@i', '@&(iexcl|#161);@i', '@&#(\\d+);@e', '@<address[^>]*?>@si');
$replace = array('', '', '\\1', '"', '&', '<', '>', ' ', chr(161), 'chr(\\1)', '<br>');
$header = preg_replace($search, $replace, $template->pdfheader);
$footer = preg_replace($search, $replace, $template->pdffooter);
$text = preg_replace($search, $replace, $template->description);
$text = preg_replace('/\\{DATE\\s+(.*?)\\}/e', "date('\\1')", $text);
$printable = str_replace("\r\n", "<br />", $text);
global $sugar_config;
$firstValue = '';
$firstNum = 0;
$lastValue = '';
$lastNum = 0;
示例5: display
function display()
{
global $sugar_config, $mod_strings, $app_strings;
$focus = new ContractLiquidate();
$db = DBManagerFactory::getInstance();
// ONLY LOAD A RECORD IF A RECORD ID IS GIVEN;
// A RECORD ID IS NOT GIVEN WHEN VIEWING IN LAYOUT EDITOR
$record = isset($_GET["record"]) ? htmlspecialchars($_GET["record"]) : '';
$focus->retrieve($record);
$template = file_get_contents('modules/ContractLiquidate/tpls/export.tpl');
//$sql = "select * from tours where id ='".$record."' and deleted = 0";
$contract = new Contract();
$contract->retrieve($focus->contract_id);
$template = str_replace("{DAY}", $focus->day, $template);
$template = str_replace("{MONTH}", $focus->month, $template);
$template = str_replace("{YEAR}", $focus->year, $template);
$template = str_replace("{position_a}", translate('position_dom', '', $contract->position_a), $template);
$template = str_replace("{position_b}", translate('position_dom', '', $contract->position_b), $template);
$template = str_replace("{address_a}", $contract->address_a, $template);
$template = str_replace("{phone_a}", $contract->phone_a, $template);
$template = str_replace("{fax_a}", $contract->fax_a, $template);
$template = str_replace("{mst_bena}", $contract->mst_bena, $template);
$template = str_replace("{BENB}", $contract->parent_name, $template);
$template = str_replace("{address_b}", $contract->address_b, $template);
$template = str_replace("{phone_b}", $contract->phone_b, $template);
$template = str_replace("{fax_b}", $contract->fax_b, $template);
$template = str_replace("{mst_benb}", $contract->mst_benb, $template);
$template = str_replace("{TONGCONG_CONTRACT_KEHOACH}", format_number($focus->tongcong_contract_kehoach), $template);
$template = str_replace("{TONGCONG_CONTRACT_THUCTE}", format_number($focus->tongcong_contract_thucte), $template);
$template = str_replace("{TONGCONG_TANG_KEHOACH}", format_number($focus->tongcong_tang_kehoach), $template);
$template = str_replace("{TONGCONG_TANG_THUCTE}", format_number($focus->tongcong_tang_thucte), $template);
$template = str_replace("{TONGCONG_GIAM_KEHOACH}", format_number($focus->tongcong_giam_kehoach), $template);
$template = str_replace("{TONGCONG_GIAM_THUCTE}", format_number($focus->tongcong_giam_thucte), $template);
$template = str_replace("{TONGTIEN_KEHOACH}", format_number($focus->tongtien_kehoach), $template);
$template = str_replace("{TONGTIEN_THUCTE}", format_number($focus->tongtien_thucte), $template);
$template = str_replace("{TIENTHANHTOAN}", format_number($focus->tienthanhtoan), $template);
$template = str_replace("{TIENCONLAI}", format_number($focus->tienconlai), $template);
$template = str_replace("{TIENTRALAI}", format_number($focus->tientralai), $template);
$template = str_replace("{GIATRIHOPDONG}", $focus->giatrihopdong_detail(), $template);
$template = str_replace("{PHATSINHTANG}", $focus->phatsinhtang_detail(), $template);
$template = str_replace("{PHATSINHGIAM}", $focus->phatsinhgiam_detail(), $template);
$template = str_replace("{BANGCHU}", $focus->bangchu, $template);
$template = str_replace("{DAIDIENBENA}", $contract->daidienbena, $template);
$template = str_replace("{DAIDIENBENB}", $contract->daidienbenb, $template);
$template = str_replace("{LBL_TITLE_THANH_LY}", $mod_strings['LBL_TITLE_THANH_LY'], $template);
$template = str_replace("{LBL_BEN_A}", $mod_strings['LBL_BEN_A'], $template);
$template = str_replace("{LBL_COM_NAME}", $mod_strings['LBL_COM_NAME'], $template);
$template = str_replace("{LBL_BEN_A_NAME}", $mod_strings['LBL_BEN_A_NAME'], $template);
$template = str_replace("{LBL_POSITION}", $mod_strings['LBL_POSITION'], $template);
$template = str_replace("{LBL_ADDRESS}", $mod_strings['LBL_ADDRESS'], $template);
$template = str_replace("{LBL_PHONE}", $mod_strings['LBL_PHONE'], $template);
$template = str_replace("{LBL_FAX}", $mod_strings['LBL_FAX'], $template);
$template = str_replace("{LBL_TAX}", $mod_strings['LBL_TAX'], $template);
$template = str_replace("{LBL_BEN_B}", $mod_strings['LBL_BEN_B'], $template);
$template = str_replace("{LBL_BEN_B_NAME}", $mod_strings['LBL_BEN_B_NAME'], $template);
$template = str_replace("{LBL_NOIDUNG_THANH_LY}", $mod_strings['LBL_NOIDUNG_THANH_LY'], $template);
$template = str_replace("{LBL_NOIDUNG}", $mod_strings['LBL_NOIDUNG'], $template);
$template = str_replace("{LBL_KEHOACH}", $mod_strings['LBL_KEHOACH'], $template);
$template = str_replace("{LBL_THUCTE}", $mod_strings['LBL_THUCTE'], $template);
$template = str_replace("{LBL_DONGIA}", $mod_strings['LBL_DONGIA'], $template);
$template = str_replace("{LBL_SL}", $mod_strings['LBL_SL'], $template);
$template = str_replace("{LBL_THANHTIEN}", $mod_strings['LBL_THANHTIEN'], $template);
$template = str_replace("{LBL_TONGGIATRIHD}", $mod_strings['LBL_TONGGIATRIHD'], $template);
$template = str_replace("{LBL_TONGCONG}", $mod_strings['LBL_TONGCONG'], $template);
$template = str_replace("{LBL_CHIPHIPHATSINHTANG}", $mod_strings['LBL_CHIPHIPHATSINHTANG'], $template);
$template = str_replace("{LBL_CHIPHIPHATSINHGIAM}", $mod_strings['LBL_CHIPHIPHATSINHGIAM'], $template);
$template = str_replace("{LBL_TONGTRIGIATOUR}", $mod_strings['LBL_TONGTRIGIATOUR'], $template);
$template = str_replace("{LBL_BENBTHANHTOANBENA}", $mod_strings['LBL_BENBTHANHTOANBENA'], $template);
$template = str_replace("{LBL_BENBNOBENA}", $mod_strings['LBL_BENBNOBENA'], $template);
$template = str_replace("{LBL_BENANOBENB}", $mod_strings['LBL_BENANOBENB'], $template);
$template = str_replace("{LBL_BANGCHU}", $mod_strings['LBL_BANGCHU'], $template);
$template = str_replace("{LBL_THONGTINCHUNG}", $mod_strings['LBL_THONGTINCHUNG'], $template);
$template = str_replace("{LBL_DAIDIENBENA}", $mod_strings['LBL_DAIDIENBENA'], $template);
$template = str_replace("{LBL_DAIDIENBENB}", $mod_strings['LBL_DAIDIENBENB'], $template);
$size = strlen($template);
$filename = $focus->number . ".doc";
ob_end_clean();
header("Cache-Control: private");
header("Content-Type: application/force-download;");
header("Content-Disposition:attachment; filename=\"{$filename}\"");
header("Content-length:{$size}");
echo $template;
ob_flush();
}