本文整理汇总了PHP中Xtempl::assignbyref方法的典型用法代码示例。如果您正苦于以下问题:PHP Xtempl::assignbyref方法的具体用法?PHP Xtempl::assignbyref怎么用?PHP Xtempl::assignbyref使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Xtempl
的用法示例。
在下文中一共展示了Xtempl::assignbyref方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: AdvancedSearchControl
if ($mode == SEARCH_SIMPLE) {
$searchControlBuilder = new AdvancedSearchControl($searchControllerId, $strTableName, $pageObject->searchClauseObj, $pageObject);
// add button events if exist
$pageObject->addButtonHandlers();
$includes .= "<script language=\"JavaScript\" src=\"include/loadfirst.js\"></script>\r\n";
//$includes.="<script language=\"JavaScript\" src=\"include/customlabels.js\"></script>\r\n";
$includes .= "<script type=\"text/javascript\" src=\"include/lang/" . getLangFileName(mlang_getcurrentlang()) . ".js\"></script>";
// if not simple, this div already exist on page
if (!isMobile()) {
$includes .= "<div id=\"search_suggest\" class=\"search_suggest\"></div>";
}
// search panel radio button assign
$searchRadio = $searchControlBuilder->getSearchRadio();
$xt->assign_section("all_checkbox_label", $searchRadio['all_checkbox_label'][0], $searchRadio['all_checkbox_label'][1]);
$xt->assign_section("any_checkbox_label", $searchRadio['any_checkbox_label'][0], $searchRadio['any_checkbox_label'][1]);
$xt->assignbyref("all_checkbox", $searchRadio['all_checkbox']);
$xt->assignbyref("any_checkbox", $searchRadio['any_checkbox']);
// search fields data
if ($pageObject->pSet->getLookupTable("id")) {
$pageObject->settingsMap["globalSettings"]['shortTNames'][$pageObject->pSet->getLookupTable("id")] = GetTableURL($pageObject->pSet->getLookupTable("id"));
}
$pageObject->fillFieldToolTips("id");
$srchFields = $pageObject->searchClauseObj->getSearchCtrlParams("id");
$firstFieldParams = array();
if (count($srchFields)) {
$firstFieldParams = $srchFields[0];
} else {
$firstFieldParams['fName'] = "id";
$firstFieldParams['eType'] = '';
$firstFieldParams['value1'] = '';
$firstFieldParams['opt'] = '';
示例2: array
if ($all) {
$page["pageno"] = $pageindex;
}
$pages[] = $page;
}
for ($i = 0; $i < count($pages); $i++) {
if ($i < count($pages) - 1) {
$pages[$i]["begin"] = "<div name=page class=printpage>";
} else {
$pages[$i]["begin"] = "<div name=page>";
}
$pages[$i]["end"] = "</div>";
}
$page = array();
$page["data"] =& $pages;
$xt->assignbyref("page", $page);
// display master table info
$mastertable = $_SESSION[$strTableName . "_mastertable"];
$masterkeys = array();
if ($mastertable == "pad.pad_daftar") {
// include proper masterprint.php code
include "include/pad_pad_daftar_masterprint.php";
$masterkeys[] = @$_SESSION[$strTableName . "_masterkey1"];
$params = array("detailtable" => "pad.pad_daftar_hist", "keys" => $masterkeys);
$master = array();
$master["func"] = "DisplayMasterTableInfo_pad_pad_daftar";
$master["params"] = $params;
$xt->assignbyref("showmasterfile", $master);
$xt->assign("mastertable_block", true);
$layout = new TLayout("masterprint", "RoundedGreen", "MobileGreen");
$layout->blocks["bare"] = array();
示例3: array
$parameters["validate"] = $pageObject->pSet->getValidation($fName);
}
$control[$gfName] = array();
AssignFunction($control[$gfName], "xt_buildeditcontrol", $parameters);
$controls = array('controls' => array());
$controls["controls"]['id'] = $id;
$controls["controls"]['mode'] = "add";
$controls["controls"]['ctrlInd'] = 0;
$controls["controls"]['suggest'] = $parameters["suggest"];
$controls["controls"]['fieldName'] = $fName;
$xt->assign($gfName . "_label", true);
if (isEnableSection508()) {
$xt->assign_section($gfName . "_label", "<label for=\"" . $pageObject->getInputElementId($fName) . "\">", "</label>");
}
$xt->assign($gfName . "_fieldblock", true);
$xt->assignbyref($gfName . "_editcontrol", $control[$gfName]);
// category control field
$strCategoryControl = $pageObject->getMainLookupFieldNameForDependant($fName);
if ($strCategoryControl !== "" && in_array($strCategoryControl, $regFields)) {
$vals = array($fName => @$values[$fName], $strCategoryControl => @$values[$strCategoryControl]);
} else {
$vals = array($fName => @$values[$fName]);
}
$preload = $pageObject->fillPreload($fName, $vals);
if ($preload !== false) {
$controls["controls"]['preloadData'] = $preload;
}
$pageObject->fillControlsMap($controls);
if ($pageObject->pSet->getEditFormat($fName) == 'Time') {
$pageObject->fillTimePickSettings($fName, @$values[$fName]);
}
示例4: foreach
}
}
if ($rpt_array['miscellaneous']['type'] == "outline" && in_array(fldname($fld), $aGroupFields))
$arr_group_fields["data"][] = $fld;
}
foreach ($arr_page_order_fields["data"] as $key => $value){
$arr_page_order_fields["data"][$key]["fieldId"] = $key + 1;
}
$align_summary = array();
foreach ($arr_not_group_fields as $key => $value){
$arr_not_group_fields[$key]['fieldId4'] = $key + 1;
}
$align_summary["data"] = $arr_not_group_fields;
if ($rpt_array['miscellaneous']['type'] != "outline")
$xt->assignbyref("page_order_fields", $arr_page_order_fields);
else {
foreach ($arr_group_fields["data"] as $key => $value){
$arr_group_fields["data"][$key]["fieldId"] = $key + 1;
}
$xt->assignbyref("group_page_order_fields", $arr_group_fields);
$xt->assignbyref("page_order_fields", $align_summary);
}
$xt->assignbyref("not_group_fields", $align_summary);
$arr_group_field_colors = array();
for ($i = 0; $i < count($rpt_array['group_fields']) - 1; $i++){
$iteration = $i + 1;
$color1 = $rpt_array['group_fields'][$i]['color1'];
$color2 = $rpt_array['group_fields'][$i]['color2'];
$arr_group_field_colors["data"][] = array("iteration" => $iteration, "color1" => $color1, "color2" => $color2);
示例5: AdvancedSearchControl
}
// add constants and files for simple view
if ($mode == SEARCH_SIMPLE) {
$searchControlBuilder = new AdvancedSearchControl($searchControllerId, $strTableName, $pageObject->searchClauseObj, $pageObject);
// add button events if exist
$pageObject->addButtonHandlers();
$includes .= "<script language=\"JavaScript\" src=\"include/loadfirst.js\"></script>\r\n";
//$includes.="<script language=\"JavaScript\" src=\"include/customlabels.js\"></script>\r\n";
$includes .= "<script type=\"text/javascript\" src=\"include/lang/" . getLangFileName(mlang_getcurrentlang()) . ".js\"></script>";
// if not simple, this div already exist on page
$includes .= "<div id=\"search_suggest\" class=\"search_suggest\"></div>";
// search panel radio button assign
$searchRadio = $searchControlBuilder->getSearchRadio();
$xt->assign_section("all_checkbox_label", $searchRadio['all_checkbox_label'][0], $searchRadio['all_checkbox_label'][1]);
$xt->assign_section("any_checkbox_label", $searchRadio['any_checkbox_label'][0], $searchRadio['any_checkbox_label'][1]);
$xt->assignbyref("all_checkbox", $searchRadio['all_checkbox']);
$xt->assignbyref("any_checkbox", $searchRadio['any_checkbox']);
// search fields data
if (GetLookupTable("Units", $strTableName)) {
$pageObject->settingsMap["globalSettings"]['shortTNames'][GetLookupTable("Units", $strTableName)] = GetTableURL(GetLookupTable("Units", $strTableName));
}
$pageObject->fillFieldToolTips("Units");
$srchFields = $pageObject->searchClauseObj->getSearchCtrlParams("Units");
$firstFieldParams = array();
if (count($srchFields)) {
$firstFieldParams = $srchFields[0];
} else {
$firstFieldParams['fName'] = "Units";
$firstFieldParams['eType'] = '';
$firstFieldParams['value1'] = '';
$firstFieldParams['opt'] = '';
示例6: ShowHideControls
$options .= '<option value="'.$arr_opt["type"].'" '.(($opt==$arr_opt["type"])?"selected":"").'>'.$arr_opt["label"].'</option>';
}
$searchtype = '<select id="SearchOption" name="asearchopt_'.$gname.'_1" size="1" onchange="return ShowHideControls();">';
$searchtype .= $options;
$searchtype .= '</select>';
$arr_page_order_fields["data"][$key]["searchtype"] = $searchtype;
}
foreach($arr_unset as $idx=>$val)
{
unset($arr_page_order_fields["data"][$val]);
}
$xt->assignbyref("page_order_fields", $arr_page_order_fields);
$body=array();
$body["begin"]=$includes;
$jscode.="ShowHideControls();";
$body["end"]='<script type="text/javascript">'.$jscode.'</script>';
$xt->assignbyref("body",$body);
$contents_block=array();
$contents_block["begin"]='<form method="POST" ';
if(postvalue('rname'))
{
$crossAttr="";
if(postvalue("axis_x")<>"")
$crossAttr = "&axis_x=".postvalue("axis_x")."&axis_y=".postvalue("axis_y")."&field=".postvalue("field")."&group_func=".postvalue("group_func");
$contents_block["begin"].='action="'.GetTableLink("dreport").'?rname='.runner_htmlspecialchars(rawurlencode(postvalue("rname"))).$crossAttr.'" ';
示例7: 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("Readings_import.htm");
?>
示例8: elseif
$controls["controls"]['mode'] = "add";
} else {
if ($inlineadd == ADD_ONTHEFLY || $inlineadd == ADD_POPUP) {
if (!$detailKeys || !in_array($fName, $detailKeys) || $fName == postvalue("category")) {
$control[$gfName]["params"]["mode"] = "inline_add";
}
$controls["controls"]['mode'] = "inline_add";
} else {
if (!$detailKeys || !in_array($fName, $detailKeys) || $fName == postvalue("category")) {
$control[$gfName]["params"]["mode"] = "add";
}
$controls["controls"]['mode'] = "add";
}
}
if (!$detailKeys || !in_array($fName, $detailKeys)) {
$xt->assignbyref($gfName . "_editcontrol", $control[$gfName]);
} elseif ($detailKeys && in_array($fName, $detailKeys)) {
$controls["controls"]['value'] = @$defvalues[$fName];
}
// category control field
$strCategoryControl = $pageObject->isDependOnField($fName);
if ($strCategoryControl !== false && in_array($strCategoryControl, $addFields)) {
$vals = array($fName => @$defvalues[$fName], $strCategoryControl => @$defvalues[$strCategoryControl]);
} else {
$vals = array($fName => @$defvalues[$fName]);
}
$preload = $pageObject->fillPreload($fName, $vals);
if ($preload !== false) {
$controls["controls"]['preloadData'] = $preload;
if (!@$defvalues[$fName] && count($preload["vals"]) > 0) {
$defvalues[$fName] = $preload["vals"][0];
示例9: AdvancedSearchControl
$searchControlBuilder = new AdvancedSearchControl($searchControllerId, $strTableName, $pageObject->searchClauseObj, $pageObject);
// add button events if exist
$pageObject->addButtonHandlers();
$includes .= GetBaseScriptsForPage(false);
// if not simple, this div already exist on page
if (!isMobile())
$includes.="<div id=\"search_suggest\" class=\"search_suggest\"></div>";
// search panel radio button assign
$searchRadio = $searchControlBuilder->getSearchRadio();
$xt->assign_section("all_checkbox_label", $searchRadio['all_checkbox_label'][0], $searchRadio['all_checkbox_label'][1]);
$xt->assign_section("any_checkbox_label", $searchRadio['any_checkbox_label'][0], $searchRadio['any_checkbox_label'][1]);
$xt->assignbyref("all_checkbox",$searchRadio['all_checkbox']);
$xt->assignbyref("any_checkbox",$searchRadio['any_checkbox']);
// search fields data
if($pageObject->pSet->getLookupTable("id"))
$pageObject->settingsMap["globalSettings"]['shortTNames'][$pageObject->pSet->getLookupTable("id")] = GetTableURL($pageObject->pSet->getLookupTable("id"));
$pageObject->fillFieldToolTips("id");
$srchFields = $pageObject->searchClauseObj->getSearchCtrlParams("id");
$firstFieldParams = array();
if (count($srchFields))
{
$firstFieldParams = $srchFields[0];
}