本文整理汇总了PHP中Xtempl::display方法的典型用法代码示例。如果您正苦于以下问题:PHP Xtempl::display方法的具体用法?PHP Xtempl::display怎么用?PHP Xtempl::display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Xtempl
的用法示例。
在下文中一共展示了Xtempl::display方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DisplayMasterTableInfo_pad_pad_jenis_pajak
//.........这里部分代码省略.........
global $conn, $strTableName;
$xt = new Xtempl();
$oldTableName = $strTableName;
$strTableName = "pad.pad_jenis_pajak";
//$strSQL = "SELECT id, usaha_id, nama, rekening_id, rekening_kd_sub, rekdenda_id, masapajak, jatuhtempo, multiple, jalan_kelas_id, tmt, enabled, created, create_uid, updated, update_uid FROM \"pad\".pad_jenis_pajak ";
$cipherer = new RunnerCipherer($strTableName);
$settings = new ProjectSettings($strTableName, PAGE_PRINT);
$masterQuery = $settings->getSQLQuery();
$viewControls = new ViewControlsContainer($settings, PAGE_PRINT);
$where = "";
global $pageObject, $page_styles, $page_layouts, $page_layout_names, $container_styles;
$layout = new TLayout("masterprint", "RoundedGreen", "MobileGreen");
$layout->blocks["bare"] = array();
$layout->containers["0"] = array();
$layout->containers["0"][] = array("name" => "masterprintheader", "block" => "", "substyle" => 1);
$layout->skins["0"] = "empty";
$layout->blocks["bare"][] = "0";
$layout->containers["mastergrid"] = array();
$layout->containers["mastergrid"][] = array("name" => "masterprintfields", "block" => "", "substyle" => 1);
$layout->skins["mastergrid"] = "grid";
$layout->blocks["bare"][] = "mastergrid";
$page_layouts["pad_pad_jenis_pajak_masterprint"] = $layout;
$showKeys = "";
if ($detailtable == "pad.pad_spt") {
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[1 - 1];
$xt->assign('showKeys', $showKeys);
}
if ($detailtable == "pad.pad_tarif_pajak") {
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[1 - 1];
$where .= " and ";
$showKeys .= " , ";
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[2 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[2 - 1];
$xt->assign('showKeys', $showKeys);
}
if ($detailtable == "pad.pad_terima_line") {
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[1 - 1];
$xt->assign('showKeys', $showKeys);
}
if (!$where) {
$strTableName = $oldTableName;
return;
}
$str = SecuritySQL("Export");
if (strlen($str)) {
$where .= " and " . $str;
}
$strWhere = whereAdd($masterQuery->m_where->toSql($masterQuery), $where);
if (strlen($strWhere)) {
$strWhere = " where " . $strWhere . " ";
}
$strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
// $strSQL=AddWhere($strSQL,$where);
LogInfo($strSQL);
$rs = db_query($strSQL, $conn);
$data = $cipherer->DecryptFetchedArray($rs);
if (!$data) {
$strTableName = $oldTableName;
return;
}
$keylink = "";
$keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
// id -
$xt->assign("id_mastervalue", $viewControls->showDBValue("id", $data, $keylink));
// usaha_id -
$xt->assign("usaha_id_mastervalue", $viewControls->showDBValue("usaha_id", $data, $keylink));
// nama -
$xt->assign("nama_mastervalue", $viewControls->showDBValue("nama", $data, $keylink));
// rekening_id -
$xt->assign("rekening_id_mastervalue", $viewControls->showDBValue("rekening_id", $data, $keylink));
// rekening_kd_sub -
$xt->assign("rekening_kd_sub_mastervalue", $viewControls->showDBValue("rekening_kd_sub", $data, $keylink));
// rekdenda_id -
$xt->assign("rekdenda_id_mastervalue", $viewControls->showDBValue("rekdenda_id", $data, $keylink));
// masapajak -
$xt->assign("masapajak_mastervalue", $viewControls->showDBValue("masapajak", $data, $keylink));
// jatuhtempo -
$xt->assign("jatuhtempo_mastervalue", $viewControls->showDBValue("jatuhtempo", $data, $keylink));
// multiple -
$xt->assign("multiple_mastervalue", $viewControls->showDBValue("multiple", $data, $keylink));
// jalan_kelas_id -
$xt->assign("jalan_kelas_id_mastervalue", $viewControls->showDBValue("jalan_kelas_id", $data, $keylink));
// tmt - Short Date
$xt->assign("tmt_mastervalue", $viewControls->showDBValue("tmt", $data, $keylink));
// enabled -
$xt->assign("enabled_mastervalue", $viewControls->showDBValue("enabled", $data, $keylink));
// created - Short Date
$xt->assign("created_mastervalue", $viewControls->showDBValue("created", $data, $keylink));
// create_uid -
$xt->assign("create_uid_mastervalue", $viewControls->showDBValue("create_uid", $data, $keylink));
// updated - Short Date
$xt->assign("updated_mastervalue", $viewControls->showDBValue("updated", $data, $keylink));
// update_uid -
$xt->assign("update_uid_mastervalue", $viewControls->showDBValue("update_uid", $data, $keylink));
$xt->display("pad_pad_jenis_pajak_masterprint.htm");
$strTableName = $oldTableName;
}
示例2: importMore
// add button events if exist
$pageObject->addButtonHandlers();
$pageObject->body["begin"] .= "<script type=\"text/javascript\" src=\"include/loadfirst.js\"></script>\r\n";
$pageObject->body["begin"] .= "<script>\r\n";
$pageObject->body["begin"] .= "function importMore(id)\r\n";
$pageObject->body["begin"] .= "{\r\n";
$pageObject->body["begin"] .= "\tif(\$('#importDebugInfoTable'+id).css('display')=='none')\r\n";
$pageObject->body["begin"] .= "\t\t\$('#importDebugInfoTable'+id).show();\r\n";
$pageObject->body["begin"] .= "\telse\r\n";
$pageObject->body["begin"] .= "\t\t\$('#importDebugInfoTable'+id).hide();\r\n";
$pageObject->body["begin"] .= "}\r\n";
$pageObject->body["begin"] .= "</script>\r\n";
$pageObject->body["begin"] .= "<script type=\"text/javascript\" src=\"include/lang/" . getLangFileName(mlang_getcurrentlang()) . ".js\"></script>";
$pageObject->fillSetCntrlMaps();
$pageObject->body['end'] .= '<script>';
$pageObject->body['end'] .= "window.controlsMap = " . my_json_encode($pageObject->controlsHTMLMap) . ";";
$pageObject->body['end'] .= "window.settings = " . my_json_encode($pageObject->jsSettings) . ";";
$pageObject->body['end'] .= '</script>';
$pageObject->body["end"] .= "<script language=\"JavaScript\" src=\"include/runnerJS/RunnerAll.js\"></script>\r\n";
$pageObject->addCommonJs();
$pageObject->body["end"] .= "<script>" . $pageObject->PrepareJS() . "</script>";
$xt->assignbyref("body", $pageObject->body);
$xt->assign("importfile_attrs", "id=\"file_ImportFileName" . $pageObject->id . "\" name=\"file_ImportFileName" . $pageObject->id . "\"");
$xt->assign("backtolist_attrs", "id=\"backButton" . $pageObject->id . "\"");
$xt->assign("importlink_attrs", "id=\"saveButton" . $pageObject->id . "\"");
$xt->assign("error_message", $error_message);
$xt->display("Customers_import.htm");
?>
示例3: runner_error_handler
function runner_error_handler($errno, $errstr, $errfile, $errline)
{
global $strLastSQL;
if ($errno == 2048) {
return 0;
}
if ($errno == 8192) {
if ($errstr == "Assigning the return value of new by reference is deprecated") {
return 0;
}
if (strpos($errstr, "set_magic_quotes_runtime")) {
return 0;
}
}
if ($errno == 2 && strpos($errstr, "has been disabled for security reasons")) {
return 0;
}
if ($errno == 2 && strpos($errstr, "Data is not in a recognized format")) {
return 0;
}
if ($errno == 8 && !strncmp($errstr, "Undefined index", 15)) {
return 0;
}
if (strpos($errstr, "It is not safe to rely on the system's timezone settings.")) {
return 0;
}
if (strpos($errstr, "fopen(") === 0) {
return 0;
}
// show error htm
if (!class_exists("Xtempl")) {
require_once getabspath("include/xtempl.php");
}
$xt = new Xtempl();
$xt->assign('errno', $errno);
$xt->assign('errstr', $errstr);
$url = $_SERVER["SERVER_NAME"] . $_SERVER["SCRIPT_NAME"];
if (array_key_exists("QUERY_STRING", $_SERVER)) {
$url .= "?" . htmlspecialchars($_SERVER["QUERY_STRING"]);
}
$xt->assign('url', $url);
$xt->assign('errfile', $errfile);
$xt->assign('errline', $errline);
$sqlStr = isset($strLastSQL) ? htmlspecialchars(substr($strLastSQL, 0, 1024)) : '';
$xt->assign('sqlStr', $sqlStr);
$debugInfoArr = parse_backtrace($errfile, $errline);
$xt->assign_loopsection('debugRow', $debugInfoArr);
$xt->display('error.htm');
exit(0);
}
示例4: ExportToExcel_old
$xt->assign("range_block", true);
}
$xt->assign("exportlink_attrs", 'id="saveButton' . $pageObject->id . '"');
$pageObject->body["begin"] .= "<script type=\"text/javascript\" src=\"include/loadfirst.js\"></script>\r\n";
$pageObject->body["begin"] .= "<script type=\"text/javascript\" src=\"include/lang/" . getLangFileName(mlang_getcurrentlang()) . ".js\"></script>";
$pageObject->fillSetCntrlMaps();
$pageObject->body['end'] .= '<script>';
$pageObject->body['end'] .= "window.controlsMap = " . my_json_encode($pageObject->controlsHTMLMap) . ";";
$pageObject->body['end'] .= "window.viewControlsMap = " . my_json_encode($pageObject->viewControlsHTMLMap) . ";";
$pageObject->body['end'] .= "window.settings = " . my_json_encode($pageObject->jsSettings) . ";";
$pageObject->body['end'] .= '</script>';
$pageObject->body["end"] .= "<script language=\"JavaScript\" src=\"include/runnerJS/RunnerAll.js\"></script>\r\n";
$pageObject->addCommonJs();
$pageObject->body["end"] .= "<script>" . $pageObject->PrepareJS() . "</script>";
$xt->assignbyref("body", $pageObject->body);
$xt->display("pad_pad_reklame_kelas_jalan_export.htm");
function ExportToExcel_old($cipherer)
{
global $cCharset;
header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: attachment;Filename=pad_pad_reklame_kelas_jalan.xls");
echo "<html>";
echo "<html xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:x=\"urn:schemas-microsoft-com:office:excel\" xmlns=\"http://www.w3.org/TR/REC-html40\">";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=" . $cCharset . "\">";
echo "<body>";
echo "<table border=1>";
WriteTableData($cipherer);
echo "</table>";
echo "</body>";
echo "</html>";
}
示例5: DisplayMasterTableInfo_pad_pad_kelurahan
//.........这里部分代码省略.........
$settings = new ProjectSettings($strTableName, PAGE_LIST);
$cipherer = new RunnerCipherer($strTableName);
$masterQuery = $settings->getSQLQuery();
$viewControls = new ViewControlsContainer($settings, PAGE_LIST);
$where = "";
$mKeys = array();
$showKeys = "";
global $page_styles, $page_layouts, $page_layout_names, $container_styles;
$layout = new TLayout("masterlist", "RoundedGreen", "MobileGreen");
$layout->blocks["bare"] = array();
$layout->containers["0"] = array();
$layout->containers["0"][] = array("name" => "masterlistheader", "block" => "", "substyle" => 1);
$layout->skins["0"] = "empty";
$layout->blocks["bare"][] = "0";
$layout->containers["mastergrid"] = array();
$layout->containers["mastergrid"][] = array("name" => "masterlistfields", "block" => "", "substyle" => 1);
$layout->skins["mastergrid"] = "grid";
$layout->blocks["bare"][] = "mastergrid";
$page_layouts["pad_pad_kelurahan_masterlist"] = $layout;
if ($detailtable == "pad.pad_customer_usaha") {
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[1 - 1];
$xt->assign('showKeys', $showKeys);
}
if ($detailtable == "pad.pad_customer") {
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[1 - 1];
$xt->assign('showKeys', $showKeys);
}
if ($detailtable == "pad.pad_daftar") {
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[1 - 1];
$where .= " and ";
$showKeys .= " , ";
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[2 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[2 - 1];
$xt->assign('showKeys', $showKeys);
}
if (!$where) {
$strTableName = $oldTableName;
return;
}
$str = SecuritySQL("Search");
if (strlen($str)) {
$where .= " and " . $str;
}
$strWhere = whereAdd($masterQuery->WhereToSql(), $where);
if (strlen($strWhere)) {
$strWhere = " where " . $strWhere . " ";
}
$strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
// $strSQL = AddWhere($strSQL,$where);
LogInfo($strSQL);
$rs = db_query($strSQL, $conn);
$data = $cipherer->DecryptFetchedArray($rs);
if (!$data) {
$strTableName = $oldTableName;
return;
}
$keylink = "";
$keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
// id -
$value = "";
$xt->assign("id_mastervalue", $viewControls->showDBValue("id", $data, $keylink));
// kecamatan_id -
$value = "";
$xt->assign("kecamatan_id_mastervalue", $viewControls->showDBValue("kecamatan_id", $data, $keylink));
// kode -
$value = "";
$xt->assign("kode_mastervalue", $viewControls->showDBValue("kode", $data, $keylink));
// nama -
$value = "";
$xt->assign("nama_mastervalue", $viewControls->showDBValue("nama", $data, $keylink));
// tmt - Short Date
$value = "";
$xt->assign("tmt_mastervalue", $viewControls->showDBValue("tmt", $data, $keylink));
// enabled -
$value = "";
$xt->assign("enabled_mastervalue", $viewControls->showDBValue("enabled", $data, $keylink));
// created - Short Date
$value = "";
$xt->assign("created_mastervalue", $viewControls->showDBValue("created", $data, $keylink));
// create_uid -
$value = "";
$xt->assign("create_uid_mastervalue", $viewControls->showDBValue("create_uid", $data, $keylink));
// updated - Short Date
$value = "";
$xt->assign("updated_mastervalue", $viewControls->showDBValue("updated", $data, $keylink));
// update_uid -
$value = "";
$xt->assign("update_uid_mastervalue", $viewControls->showDBValue("update_uid", $data, $keylink));
$viewControls->addControlsJSAndCSS();
$detailPageObj->viewControlsMap['mViewControlsMap'] = $viewControls->viewControlsMap;
$layout = GetPageLayout("pad_pad_kelurahan", 'masterlist');
if ($layout) {
$xt->assign("pageattrs", 'class="' . $layout->style . " page-" . $layout->name . '"');
}
$xt->display("pad_pad_kelurahan_masterlist.htm");
$strTableName = $oldTableName;
}
示例6: ProcessLargeText
$row["Father_Name_value"] = $value;
// Address -
$value = "";
$value = ProcessLargeText(GetData($data, "Address", ""), "field=Address" . $keylink, "", MODE_PRINT);
$row["Address_value"] = $value;
// Contact -
$value = "";
$value = ProcessLargeText(GetData($data, "Contact", ""), "field=Contact" . $keylink, "", MODE_PRINT);
$row["Contact_value"] = $value;
// Location -
$value = "";
$value = DisplayLookupWizard("Location", $data["Location"], $data, $keylink, MODE_PRINT);
$row["Location_value"] = $value;
// Customer Type -
$value = "";
$value = DisplayLookupWizard("Customer Type", $data["Customer Type"], $data, $keylink, MODE_PRINT);
$row["Customer_Type_value"] = $value;
$rowinfo[] = $row;
}
$xt->assign_loopsection("details_row", $rowinfo);
} else {
}
$xt->display("Customers_detailspreview.htm");
if ($mode != "inline") {
echo "counterSeparator" . postvalue("counter");
$layout = GetPageLayout(GoodFieldName($strTableName), 'detailspreview');
if ($layout) {
$rtl = $xt->getReadingOrder() == 'RTL' ? 'RTL' : '';
echo "counterSeparator" . "styles/" . $layout->style . "/style" . $rtl . "counterSeparator" . "pagestyles/" . $layout->name . $rtl . "counterSeparator" . $layout->style . " page-" . $layout->name;
}
}
示例7: ProcessLargeText
$row["PF_Yellow_value"] = $value;
// Peak Power -
$value = "";
$value = ProcessLargeText(GetData($data, "Peak Power", ""), "field=Peak+Power" . $keylink, "", MODE_PRINT);
$row["Peak_Power_value"] = $value;
// Date Time - Short Date
$value = "";
$value = ProcessLargeText(GetData($data, "Date Time", "Short Date"), "field=Date+Time" . $keylink, "", MODE_PRINT);
$row["Date_Time_value"] = $value;
// IsSync - Checkbox
$value = "";
$value = GetData($data, "IsSync", "Checkbox");
$row["IsSync_value"] = $value;
// Currunt Readings -
$value = "";
$value = ProcessLargeText(GetData($data, "Currunt Readings", ""), "field=Currunt+Readings" . $keylink, "", MODE_PRINT);
$row["Currunt_Readings_value"] = $value;
$rowinfo[] = $row;
}
$xt->assign_loopsection("details_row", $rowinfo);
} else {
}
$xt->display("Readings_detailspreview.htm");
if ($mode != "inline") {
echo "counterSeparator" . postvalue("counter");
$layout = GetPageLayout(GoodFieldName($strTableName), 'detailspreview');
if ($layout) {
$rtl = $xt->getReadingOrder() == 'RTL' ? 'RTL' : '';
echo "counterSeparator" . "styles/" . $layout->style . "/style" . $rtl . "counterSeparator" . "pagestyles/" . $layout->name . $rtl . "counterSeparator" . $layout->style . " page-" . $layout->name;
}
}
示例8: DisplayMasterTableInfo_LU_Anomaly_Type
function DisplayMasterTableInfo_LU_Anomaly_Type($params)
{
$detailtable = $params["detailtable"];
$keys = $params["keys"];
global $conn, $strTableName;
$xt = new Xtempl();
$oldTableName = $strTableName;
$strTableName = "dbo.LU_Anomaly Type";
//$strSQL = "SELECT Code, [Tamper Type] FROM dbo.[LU_Anomaly Type]";
$sqlHead = "SELECT Code, [Tamper Type]";
$sqlFrom = "FROM dbo.[LU_Anomaly Type]";
$sqlWhere = "";
$sqlTail = "";
$where = "";
global $page_styles, $page_layouts, $page_layout_names, $container_styles;
$layout = new TLayout("masterprint", "BoldOrange", "MobileOrange");
$layout->blocks["bare"] = array();
$layout->containers["0"] = array();
$layout->containers["0"][] = array("name" => "masterprintheader", "block" => "", "substyle" => 1);
$layout->skins["0"] = "empty";
$layout->blocks["bare"][] = "0";
$layout->containers["mastergrid"] = array();
$layout->containers["mastergrid"][] = array("name" => "masterprintfields", "block" => "", "substyle" => 1);
$layout->skins["mastergrid"] = "grid";
$layout->blocks["bare"][] = "mastergrid";
$page_layouts["LU_Anomaly_Type_masterprint"] = $layout;
if ($detailtable == "dbo.Anomalies") {
$where .= GetFullFieldName("Code") . "=" . make_db_value("Code", $keys[1 - 1]);
}
if (!$where) {
$strTableName = $oldTableName;
return;
}
$str = SecuritySQL("Export");
if (strlen($str)) {
$where .= " and " . $str;
}
$strWhere = whereAdd($sqlWhere, $where);
if (strlen($strWhere)) {
$strWhere = " where " . $strWhere . " ";
}
$strSQL = $sqlHead . ' ' . $sqlFrom . $strWhere . $sqlTail;
// $strSQL=AddWhere($strSQL,$where);
LogInfo($strSQL);
$rs = db_query($strSQL, $conn);
$data = db_fetch_array($rs);
if (!$data) {
$strTableName = $oldTableName;
return;
}
$keylink = "";
$keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["Code"]));
// Code -
$value = "";
$value = ProcessLargeText(GetData($data, "Code", ""), "field=Code" . $keylink, "", MODE_PRINT);
$xt->assign("Code_mastervalue", $value);
// Tamper Type -
$value = "";
$value = ProcessLargeText(GetData($data, "Tamper Type", ""), "field=Tamper+Type" . $keylink, "", MODE_PRINT);
$xt->assign("Tamper_Type_mastervalue", $value);
$xt->display("LU_Anomaly_Type_masterprint.htm");
$strTableName = $oldTableName;
}
示例9: DisplayMasterTableInfo_Customers
function DisplayMasterTableInfo_Customers($params)
{
$detailtable = $params["detailtable"];
$keys = $params["keys"];
global $conn, $strTableName;
$xt = new Xtempl();
$oldTableName = $strTableName;
$strTableName = "dbo.Customers";
//$strSQL = "SELECT ID, Name, [Father Name], Address, Contact, Location, [Customer Type] FROM dbo.Customers";
$sqlHead = "SELECT ID, Name, [Father Name], Address, Contact, Location, [Customer Type]";
$sqlFrom = "FROM dbo.Customers";
$sqlWhere = "";
$sqlTail = "";
$where = "";
$mKeys = array();
$showKeys = "";
global $page_styles, $page_layouts, $page_layout_names, $container_styles;
$layout = new TLayout("masterlist", "BoldOrange", "MobileOrange");
$layout->blocks["bare"] = array();
$layout->containers["0"] = array();
$layout->containers["0"][] = array("name" => "masterlistheader", "block" => "", "substyle" => 1);
$layout->skins["0"] = "empty";
$layout->blocks["bare"][] = "0";
$layout->containers["mastergrid"] = array();
$layout->containers["mastergrid"][] = array("name" => "masterlistfields", "block" => "", "substyle" => 1);
$layout->skins["mastergrid"] = "grid";
$layout->blocks["bare"][] = "mastergrid";
$page_layouts["Customers_masterlist"] = $layout;
if ($detailtable == "dbo.Customer Module Assignment") {
$where .= GetFullFieldName("ID") . "=" . make_db_value("ID", $keys[1 - 1]);
$showKeys .= " " . GetFieldLabel("dbo_Customers", "ID") . ": " . $keys[1 - 1];
$xt->assign('showKeys', $showKeys);
}
if (!$where) {
$strTableName = $oldTableName;
return;
}
$str = SecuritySQL("Search");
if (strlen($str)) {
$where .= " and " . $str;
}
$strWhere = whereAdd($sqlWhere, $where);
if (strlen($strWhere)) {
$strWhere = " where " . $strWhere . " ";
}
$strSQL = $sqlHead . ' ' . $sqlFrom . $strWhere . $sqlTail;
// $strSQL=AddWhere($strSQL,$where);
LogInfo($strSQL);
$rs = db_query($strSQL, $conn);
$data = db_fetch_array($rs);
if (!$data) {
$strTableName = $oldTableName;
return;
}
$keylink = "";
$keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["ID"]));
// ID -
$value = "";
$value = ProcessLargeText(GetData($data, "ID", ""), "field=ID" . $keylink);
$xt->assign("ID_mastervalue", $value);
// Name -
$value = "";
$value = ProcessLargeText(GetData($data, "Name", ""), "field=Name" . $keylink);
$xt->assign("Name_mastervalue", $value);
// Father Name -
$value = "";
$value = ProcessLargeText(GetData($data, "Father Name", ""), "field=Father+Name" . $keylink);
$xt->assign("Father_Name_mastervalue", $value);
// Address -
$value = "";
$value = ProcessLargeText(GetData($data, "Address", ""), "field=Address" . $keylink);
$xt->assign("Address_mastervalue", $value);
// Contact -
$value = "";
$value = ProcessLargeText(GetData($data, "Contact", ""), "field=Contact" . $keylink);
$xt->assign("Contact_mastervalue", $value);
// Location -
$value = "";
$value = DisplayLookupWizard("Location", $data["Location"], $data, $keylink, MODE_LIST);
$xt->assign("Location_mastervalue", $value);
// Customer Type -
$value = "";
$value = DisplayLookupWizard("Customer Type", $data["Customer Type"], $data, $keylink, MODE_LIST);
$xt->assign("Customer_Type_mastervalue", $value);
$xt->display("Customers_masterlist.htm");
$strTableName = $oldTableName;
}
示例10: ExportToWord
$xt->assign("rangeheader_block", true);
$xt->assign("range_block", true);
}
$xt->assign("exportlink_attrs", 'id="saveButton' . $pageObject->id . '"');
$pageObject->body["begin"] .= "<script type=\"text/javascript\" src=\"include/loadfirst.js\"></script>\r\n";
$pageObject->body["begin"] .= "<script type=\"text/javascript\" src=\"include/lang/" . getLangFileName(mlang_getcurrentlang()) . ".js\"></script>";
$pageObject->fillSetCntrlMaps();
$pageObject->body['end'] .= '<script>';
$pageObject->body['end'] .= "window.controlsMap = " . my_json_encode($pageObject->controlsHTMLMap) . ";";
$pageObject->body['end'] .= "window.settings = " . my_json_encode($pageObject->jsSettings) . ";";
$pageObject->body['end'] .= '</script>';
$pageObject->body["end"] .= "<script language=\"JavaScript\" src=\"include/runnerJS/RunnerAll.js\"></script>\r\n";
$pageObject->addCommonJs();
$pageObject->body["end"] .= "<script>" . $pageObject->PrepareJS() . "</script>";
$xt->assignbyref("body", $pageObject->body);
$xt->display("User_Roles_export.htm");
function ExportToWord()
{
global $cCharset;
header("Content-Type: application/vnd.ms-word");
header("Content-Disposition: attachment;Filename=User_Roles.doc");
echo "<html>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=" . $cCharset . "\">";
echo "<body>";
echo "<table border=1>";
WriteTableData();
echo "</table>";
echo "</body>";
echo "</html>";
}
function ExportToXML()
示例11: GetTemplateName
$xt->assign("admin_sql", $create_butt);
}
else
$xt->assign("admin_sql",false);
if(count($arr_tables_db) || count($arr_tables_project) || count($arr_tables_custom))
{
$create_butt="<a id=\"report_createbtn\" class=\"rnr-button\" onmouseover=\"this.focus();\" name=\"report_createbtn\" wtype=\"report\" href=\"#\">"."Create Report"."</a>";
$create_butt.="<a id=\"chart_createbtn\" class=\"rnr-button\" onmouseover=\"this.focus();\" name=\"chart_createbtn\" wtype=\"chart\" href=\"#\">"."Create chart"."</a>";
$xt->assign("create_report_chart", $create_butt);
}
else
{
if($wr_is_standalone && !isWRAdmin())
$xt->assign("create_report_chart", "<b>"."You do not have permissions to create reports and charts. Contact administrator in this regard."."</b>");
}
if($_SESSION["UserID"]=="Guest" && $wr_is_standalone)
$xt->assign("create_report_chart", "<b>"."You do not have permissions to create reports and charts. Contact administrator in this regard."."</b>");
$xt->assign("wr_pagestylepath", $wr_pagestylepath);
$xt->assign("shared_reports", $shared_reports);
$xt->assign("private_reports", $private_reports);
$xt->assign("shared_charts", $shared_charts);
$xt->assign("private_charts", $private_charts);
$templatefile = GetTemplateName("", "webreport");
$xt->display($templatefile);
?>
示例12: importMore
$pageObject->addButtonHandlers();
$pageObject->body["begin"] .= "<script type=\"text/javascript\" src=\"include/loadfirst.js\"></script>\r\n";
$pageObject->body["begin"] .= "<script>\r\n";
$pageObject->body["begin"] .= "function importMore(id)\r\n";
$pageObject->body["begin"] .= "{\r\n";
$pageObject->body["begin"] .= "\tif(\$('#importDebugInfoTable'+id).css('display')=='none')\r\n";
$pageObject->body["begin"] .= "\t\t\$('#importDebugInfoTable'+id).show();\r\n";
$pageObject->body["begin"] .= "\telse\r\n";
$pageObject->body["begin"] .= "\t\t\$('#importDebugInfoTable'+id).hide();\r\n";
$pageObject->body["begin"] .= "}\r\n";
$pageObject->body["begin"] .= "</script>\r\n";
$pageObject->body["begin"] .= "<script type=\"text/javascript\" src=\"include/lang/" . getLangFileName(mlang_getcurrentlang()) . ".js\"></script>";
$pageObject->fillSetCntrlMaps();
$pageObject->body['end'] .= '<script>';
$pageObject->body['end'] .= "window.controlsMap = " . my_json_encode($pageObject->controlsHTMLMap) . ";";
$pageObject->body['end'] .= "window.viewControlsMap = " . my_json_encode($pageObject->viewControlsHTMLMap) . ";";
$pageObject->body['end'] .= "window.settings = " . my_json_encode($pageObject->jsSettings) . ";";
$pageObject->body['end'] .= '</script>';
$pageObject->body["end"] .= "<script language=\"JavaScript\" src=\"include/runnerJS/RunnerAll.js\"></script>\r\n";
$pageObject->addCommonJs();
$pageObject->body["end"] .= "<script>" . $pageObject->PrepareJS() . "</script>";
$xt->assignbyref("body", $pageObject->body);
$xt->assign("importfile_attrs", "id=\"file_ImportFileName" . $pageObject->id . "\" name=\"file_ImportFileName" . $pageObject->id . "\"");
$xt->assign("backtolist_attrs", "id=\"backButton" . $pageObject->id . "\"");
$xt->assign("importlink_attrs", "id=\"saveButton" . $pageObject->id . "\"");
$xt->assign("error_message", $error_message);
$xt->display("public_tmp_bank_2013_import.htm");
?>
示例13: DisplayMasterTableInfo_app_users
//.........这里部分代码省略.........
global $conn, $strTableName;
$xt = new Xtempl();
$oldTableName = $strTableName;
$strTableName = "app.users";
//$strSQL = "SELECT userid, nama, created, disabled, passwd, id, kd_kantor, kd_kanwil, kd_tp, kd_kanwil_bank, kd_kppbb_bank, kd_bank_tunggal, kd_bank_persepsi, nip, jabatan, handphone, create_uid, update_uid, updated, last_login, is_login, is_logout, last_ip FROM app.users ";
$cipherer = new RunnerCipherer($strTableName);
$settings = new ProjectSettings($strTableName, PAGE_PRINT);
$masterQuery = $settings->getSQLQuery();
$viewControls = new ViewControlsContainer($settings, PAGE_PRINT);
$where = "";
global $pageObject, $page_styles, $page_layouts, $page_layout_names, $container_styles;
$layout = new TLayout("masterprint", "RoundedGreen", "MobileGreen");
$layout->blocks["bare"] = array();
$layout->containers["0"] = array();
$layout->containers["0"][] = array("name" => "masterprintheader", "block" => "", "substyle" => 1);
$layout->skins["0"] = "empty";
$layout->blocks["bare"][] = "0";
$layout->containers["mastergrid"] = array();
$layout->containers["mastergrid"][] = array("name" => "masterprintfields", "block" => "", "substyle" => 1);
$layout->skins["mastergrid"] = "grid";
$layout->blocks["bare"][] = "mastergrid";
$page_layouts["app_users_masterprint"] = $layout;
$showKeys = "";
if ($detailtable == "app.user_groups") {
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[1 - 1];
$xt->assign('showKeys', $showKeys);
}
if (!$where) {
$strTableName = $oldTableName;
return;
}
$str = SecuritySQL("Export");
if (strlen($str)) {
$where .= " and " . $str;
}
$strWhere = whereAdd($masterQuery->m_where->toSql($masterQuery), $where);
if (strlen($strWhere)) {
$strWhere = " where " . $strWhere . " ";
}
$strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
// $strSQL=AddWhere($strSQL,$where);
LogInfo($strSQL);
$rs = db_query($strSQL, $conn);
$data = $cipherer->DecryptFetchedArray($rs);
if (!$data) {
$strTableName = $oldTableName;
return;
}
$keylink = "";
$keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
// userid -
$xt->assign("userid_mastervalue", $viewControls->showDBValue("userid", $data, $keylink));
// nama -
$xt->assign("nama_mastervalue", $viewControls->showDBValue("nama", $data, $keylink));
// created - Short Date
$xt->assign("created_mastervalue", $viewControls->showDBValue("created", $data, $keylink));
// disabled -
$xt->assign("disabled_mastervalue", $viewControls->showDBValue("disabled", $data, $keylink));
// passwd -
$xt->assign("passwd_mastervalue", $viewControls->showDBValue("passwd", $data, $keylink));
// id -
$xt->assign("id_mastervalue", $viewControls->showDBValue("id", $data, $keylink));
// kd_kantor -
$xt->assign("kd_kantor_mastervalue", $viewControls->showDBValue("kd_kantor", $data, $keylink));
// kd_kanwil -
$xt->assign("kd_kanwil_mastervalue", $viewControls->showDBValue("kd_kanwil", $data, $keylink));
// kd_tp -
$xt->assign("kd_tp_mastervalue", $viewControls->showDBValue("kd_tp", $data, $keylink));
// kd_kanwil_bank -
$xt->assign("kd_kanwil_bank_mastervalue", $viewControls->showDBValue("kd_kanwil_bank", $data, $keylink));
// kd_kppbb_bank -
$xt->assign("kd_kppbb_bank_mastervalue", $viewControls->showDBValue("kd_kppbb_bank", $data, $keylink));
// kd_bank_tunggal -
$xt->assign("kd_bank_tunggal_mastervalue", $viewControls->showDBValue("kd_bank_tunggal", $data, $keylink));
// kd_bank_persepsi -
$xt->assign("kd_bank_persepsi_mastervalue", $viewControls->showDBValue("kd_bank_persepsi", $data, $keylink));
// nip -
$xt->assign("nip_mastervalue", $viewControls->showDBValue("nip", $data, $keylink));
// jabatan -
$xt->assign("jabatan_mastervalue", $viewControls->showDBValue("jabatan", $data, $keylink));
// handphone -
$xt->assign("handphone_mastervalue", $viewControls->showDBValue("handphone", $data, $keylink));
// create_uid -
$xt->assign("create_uid_mastervalue", $viewControls->showDBValue("create_uid", $data, $keylink));
// update_uid -
$xt->assign("update_uid_mastervalue", $viewControls->showDBValue("update_uid", $data, $keylink));
// updated - Short Date
$xt->assign("updated_mastervalue", $viewControls->showDBValue("updated", $data, $keylink));
// last_login - Short Date
$xt->assign("last_login_mastervalue", $viewControls->showDBValue("last_login", $data, $keylink));
// is_login -
$xt->assign("is_login_mastervalue", $viewControls->showDBValue("is_login", $data, $keylink));
// is_logout -
$xt->assign("is_logout_mastervalue", $viewControls->showDBValue("is_logout", $data, $keylink));
// last_ip -
$xt->assign("last_ip_mastervalue", $viewControls->showDBValue("last_ip", $data, $keylink));
$xt->display("app_users_masterprint.htm");
$strTableName = $oldTableName;
}
示例14: DisplayMasterTableInfo_Module
function DisplayMasterTableInfo_Module($params)
{
$detailtable = $params["detailtable"];
$keys = $params["keys"];
global $conn, $strTableName;
$xt = new Xtempl();
$oldTableName = $strTableName;
$strTableName = "dbo.Module";
//$strSQL = "SELECT ID, [Module Type], [Module Status], [Module Condition], [Serial Num], [Entry Date] FROM dbo.[Module]";
$sqlHead = "SELECT ID, [Module Type], [Module Status], [Module Condition], [Serial Num], [Entry Date]";
$sqlFrom = "FROM dbo.[Module]";
$sqlWhere = "";
$sqlTail = "";
$where = "";
global $page_styles, $page_layouts, $page_layout_names, $container_styles;
$layout = new TLayout("masterprint", "BoldOrange", "MobileOrange");
$layout->blocks["bare"] = array();
$layout->containers["0"] = array();
$layout->containers["0"][] = array("name" => "masterprintheader", "block" => "", "substyle" => 1);
$layout->skins["0"] = "empty";
$layout->blocks["bare"][] = "0";
$layout->containers["mastergrid"] = array();
$layout->containers["mastergrid"][] = array("name" => "masterprintfields", "block" => "", "substyle" => 1);
$layout->skins["mastergrid"] = "grid";
$layout->blocks["bare"][] = "mastergrid";
$page_layouts["Module_masterprint"] = $layout;
if ($detailtable == "dbo.Anomalies") {
$where .= GetFullFieldName("ID") . "=" . make_db_value("ID", $keys[1 - 1]);
}
if ($detailtable == "dbo.Customer Module Assignment") {
$where .= GetFullFieldName("ID") . "=" . make_db_value("ID", $keys[1 - 1]);
}
if ($detailtable == "dbo.Readings") {
$where .= GetFullFieldName("ID") . "=" . make_db_value("ID", $keys[1 - 1]);
}
if (!$where) {
$strTableName = $oldTableName;
return;
}
$str = SecuritySQL("Export");
if (strlen($str)) {
$where .= " and " . $str;
}
$strWhere = whereAdd($sqlWhere, $where);
if (strlen($strWhere)) {
$strWhere = " where " . $strWhere . " ";
}
$strSQL = $sqlHead . ' ' . $sqlFrom . $strWhere . $sqlTail;
// $strSQL=AddWhere($strSQL,$where);
LogInfo($strSQL);
$rs = db_query($strSQL, $conn);
$data = db_fetch_array($rs);
if (!$data) {
$strTableName = $oldTableName;
return;
}
$keylink = "";
$keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["ID"]));
// ID -
$value = "";
$value = ProcessLargeText(GetData($data, "ID", ""), "field=ID" . $keylink, "", MODE_PRINT);
$xt->assign("ID_mastervalue", $value);
// Module Type -
$value = "";
$value = DisplayLookupWizard("Module Type", $data["Module Type"], $data, $keylink, MODE_PRINT);
$xt->assign("Module_Type_mastervalue", $value);
// Module Status -
$value = "";
$value = DisplayLookupWizard("Module Status", $data["Module Status"], $data, $keylink, MODE_PRINT);
$xt->assign("Module_Status_mastervalue", $value);
// Module Condition -
$value = "";
$value = DisplayLookupWizard("Module Condition", $data["Module Condition"], $data, $keylink, MODE_PRINT);
$xt->assign("Module_Condition_mastervalue", $value);
// Serial Num -
$value = "";
$value = ProcessLargeText(GetData($data, "Serial Num", ""), "field=Serial+Num" . $keylink, "", MODE_PRINT);
$xt->assign("Serial_Num_mastervalue", $value);
// Entry Date - Short Date
$value = "";
$value = ProcessLargeText(GetData($data, "Entry Date", "Short Date"), "field=Entry+Date" . $keylink, "", MODE_PRINT);
$xt->assign("Entry_Date_mastervalue", $value);
$xt->display("Module_masterprint.htm");
$strTableName = $oldTableName;
}
示例15: DisplayMasterTableInfo_pad_pad_sspd
//.........这里部分代码省略.........
//$strSQL = "SELECT id, tahun, sspdno, sspdtgl, sspdjam, invoice_id, keterangan, bulan_telat, hitung_bunga, denda, bunga, jml_bayar, sisa, jenis_bayar, printed, tp_id, is_validated, is_valid, enabled, created, create_uid, updated, update_uid, petugas_id, pejabat_id FROM \"pad\".pad_sspd ";
$cipherer = new RunnerCipherer($strTableName);
$settings = new ProjectSettings($strTableName, PAGE_PRINT);
$masterQuery = $settings->getSQLQuery();
$viewControls = new ViewControlsContainer($settings, PAGE_PRINT);
$where = "";
global $pageObject, $page_styles, $page_layouts, $page_layout_names, $container_styles;
$layout = new TLayout("masterprint", "RoundedGreen", "MobileGreen");
$layout->blocks["bare"] = array();
$layout->containers["0"] = array();
$layout->containers["0"][] = array("name" => "masterprintheader", "block" => "", "substyle" => 1);
$layout->skins["0"] = "empty";
$layout->blocks["bare"][] = "0";
$layout->containers["mastergrid"] = array();
$layout->containers["mastergrid"][] = array("name" => "masterprintfields", "block" => "", "substyle" => 1);
$layout->skins["mastergrid"] = "grid";
$layout->blocks["bare"][] = "mastergrid";
$page_layouts["pad_pad_sspd_masterprint"] = $layout;
$showKeys = "";
if ($detailtable == "public.pad_payment") {
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[1 - 1];
$xt->assign('showKeys', $showKeys);
}
if (!$where) {
$strTableName = $oldTableName;
return;
}
$str = SecuritySQL("Export");
if (strlen($str)) {
$where .= " and " . $str;
}
$strWhere = whereAdd($masterQuery->m_where->toSql($masterQuery), $where);
if (strlen($strWhere)) {
$strWhere = " where " . $strWhere . " ";
}
$strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
// $strSQL=AddWhere($strSQL,$where);
LogInfo($strSQL);
$rs = db_query($strSQL, $conn);
$data = $cipherer->DecryptFetchedArray($rs);
if (!$data) {
$strTableName = $oldTableName;
return;
}
$keylink = "";
$keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
// id -
$xt->assign("id_mastervalue", $viewControls->showDBValue("id", $data, $keylink));
// tahun -
$xt->assign("tahun_mastervalue", $viewControls->showDBValue("tahun", $data, $keylink));
// sspdno -
$xt->assign("sspdno_mastervalue", $viewControls->showDBValue("sspdno", $data, $keylink));
// sspdtgl - Short Date
$xt->assign("sspdtgl_mastervalue", $viewControls->showDBValue("sspdtgl", $data, $keylink));
// sspdjam - Time
$xt->assign("sspdjam_mastervalue", $viewControls->showDBValue("sspdjam", $data, $keylink));
// invoice_id -
$xt->assign("invoice_id_mastervalue", $viewControls->showDBValue("invoice_id", $data, $keylink));
// keterangan -
$xt->assign("keterangan_mastervalue", $viewControls->showDBValue("keterangan", $data, $keylink));
// bulan_telat -
$xt->assign("bulan_telat_mastervalue", $viewControls->showDBValue("bulan_telat", $data, $keylink));
// hitung_bunga -
$xt->assign("hitung_bunga_mastervalue", $viewControls->showDBValue("hitung_bunga", $data, $keylink));
// denda - Number
$xt->assign("denda_mastervalue", $viewControls->showDBValue("denda", $data, $keylink));
// bunga - Number
$xt->assign("bunga_mastervalue", $viewControls->showDBValue("bunga", $data, $keylink));
// jml_bayar -
$xt->assign("jml_bayar_mastervalue", $viewControls->showDBValue("jml_bayar", $data, $keylink));
// sisa - Number
$xt->assign("sisa_mastervalue", $viewControls->showDBValue("sisa", $data, $keylink));
// jenis_bayar -
$xt->assign("jenis_bayar_mastervalue", $viewControls->showDBValue("jenis_bayar", $data, $keylink));
// printed -
$xt->assign("printed_mastervalue", $viewControls->showDBValue("printed", $data, $keylink));
// tp_id -
$xt->assign("tp_id_mastervalue", $viewControls->showDBValue("tp_id", $data, $keylink));
// is_validated -
$xt->assign("is_validated_mastervalue", $viewControls->showDBValue("is_validated", $data, $keylink));
// is_valid -
$xt->assign("is_valid_mastervalue", $viewControls->showDBValue("is_valid", $data, $keylink));
// enabled -
$xt->assign("enabled_mastervalue", $viewControls->showDBValue("enabled", $data, $keylink));
// created - Short Date
$xt->assign("created_mastervalue", $viewControls->showDBValue("created", $data, $keylink));
// create_uid -
$xt->assign("create_uid_mastervalue", $viewControls->showDBValue("create_uid", $data, $keylink));
// updated - Short Date
$xt->assign("updated_mastervalue", $viewControls->showDBValue("updated", $data, $keylink));
// update_uid -
$xt->assign("update_uid_mastervalue", $viewControls->showDBValue("update_uid", $data, $keylink));
// petugas_id -
$xt->assign("petugas_id_mastervalue", $viewControls->showDBValue("petugas_id", $data, $keylink));
// pejabat_id -
$xt->assign("pejabat_id_mastervalue", $viewControls->showDBValue("pejabat_id", $data, $keylink));
$xt->display("pad_pad_sspd_masterprint.htm");
$strTableName = $oldTableName;
}