29 function submit_withpar(height,width,name,[id],url) {
30 subwindow(height,width,name,url+\'&[id]=\'+[id]);
34 var
$jsmaincall =
'submit_withpar([height],[width],\'[name]\',\'[id]\',\'[url]\')';
37 <form name="[name]" method="POST" action="[url]">
39 <input type="hidden" name="[name]" value="[val]"> [ENDBLOCK PAR]
45 var p = self.opener.document.forms.[name];
46 var lf = self.document.[name];
48 if( lf.[name] ) { p.[name].value = lf.[name].value; } [ENDBLOCK PAR]
51 if( lf.[name] ) { p.[name].value = lf.[name].options[lf.[name].selectedIndex].value; } [ENDBLOCK SEL]
58 function __construct($name, $width = 100, $height = 100, $mainurl =
"", $suburl =
"")
61 $this->width = $width;
62 $this->height = $height;
63 $this->mainurl = $mainurl;
64 $this->suburl = $suburl;
69 $this->param = array_merge($array, $this->param);
74 $this->param[$key][
"val"] = $val;
75 $this->param[$key][
"typ"] =
$type;
85 $lay =
new Layout(
"", null, $this->mainform);
89 foreach ($this->param as $k => $v) {
90 $tab[
$c][
"name"] = $k;
91 $tab[
$c][
"val"] = $v[
"val"];
94 $lay->SetBlockData(
"PAR", $tab);
95 $lay->Set(
"url", $this->mainurl);
96 $lay->Set(
"name", $this->
name);
102 $lay =
new Layout(
"", null, $this->mainjs);
103 $lay->Set(
"formname", $this->
name);
104 $lay->Set(
"id", $this->key);
105 return ($lay->gen());
110 $lay =
new Layout(
"", null, $this->subjs);
114 foreach ($this->param as $k => $v) {
115 if ($v[
"typ"] ==
"sel") {
117 $tabsel[$isel][
"name"] = $k;
120 $tab[
$c][
"name"] = $k;
124 $lay->SetBlockData(
"SEL", $tabsel);
126 $lay->SetBlockData(
"SEL", NULL);
129 $lay->SetBlockData(
"PAR", $tab);
131 $lay->SetBlockData(
"PAR", NULL);
133 $lay->Set(
"name", $this->
name);
134 return ($lay->gen());
139 $lay =
new Layout(
"",
"", $this->jsmaincall);
140 $lay->Set(
"url", $this->suburl);
141 $lay->Set(
"width", $this->width);
142 $lay->Set(
"height", $this->height);
143 $lay->Set(
"name", $this->
name);
144 return ($lay->gen());
149 $lay =
new Layout(
"",
"", $this->jsmaincall);
151 $lay->Set(
"url", $this->suburl);
152 $lay->Set(
"width", $this->width);
153 $lay->Set(
"height", $this->height);
154 $lay->Set(
"name", $this->
name);
155 return ($lay->gen());
Layout is a template generator.
print $fam getTitle() $fam name