/** * Draw the selectlist with already selected values in it. */ function drawSelectedValues() { global $lang; $out = " <td class=\"".$this->style."\" valign=\"top\" width=\"".$this->iwidth."\">\n"; $out.= $this->headright."<br>"; $out.= " <select name=\"".$this->name."sel\" size=\"$this->rows\"".' onDblClick="moveSelectedOptions(document.' . $this->formname . '.'.$this->name.'sel, document.' . $this->formname . '.'.$this->name.'); saveSelectValues(document.'.$this->formname.'.'.$this->name.'sel, document.'.$this->formname.'.'.$this->name.'selection);"'." style=\"width:$this->iwidth px;\" $this->params multiple>\n"; $vals = array(); for ($i = 0; $i < count($this->selectedValues); $i++) { $out.= " <option value=\"" . $this->selectedValues[$i][1] . "\">" . $this->selectedValues[$i][0] . "</option>\n"; $vals[] = $this->selectedValues[$i][1]; } $out.= " </select><br><br>\n"; $out.= buttonLink($lang->get("comb_none", "Clear All"), 'javascript:moveAllOptions(document.' . $this->formname . '.'.$this->name.'sel, document.' . $this->formname . '.'.$this->name.'); saveSelectValues(document.'.$this->formname.'.'.$this->name.'sel, document.'.$this->formname.'.'.$this->name.'selection);'); $out.= " <br/><br/></td>\n"; $out.= ' <input type="hidden" name="'.$this->name.'selection" value="'.implode(',', $vals).'">'; return $out; }
/** * Draws the HTML for this Input. */ function draw() { global $lang; echo "<td colspan=\"" . $this->colspan . "\" class=\"" . $this->css . "\">"; echo '<table width="100%" cellpadding="2" cellspacing="3" border="0">'; // Draw Selectbox with non-selected values echo '<tr><td class="bcopy">'; echo $this->headlines["head1"] . "<br>"; echo '<select name="notselvals" id="notselvals" style="width:250px;" size="8">'; // populate the list for ($i = 0; $i < count($this->outlist1); $i++) { echo '<option value="' . $this->outlist1[$i][1] . '">' . $this->outlist1[$i][0] . '</option>'; } echo '</select>'; echo '</td><td valign="middle">'; // Draw Add button... echo ' <a href="#" class="navelement" onClick="moveSelectedOptions(document.' . $this->formname . '.notselvals, document.' . $this->formname . '.selvals); return false;">' . drawImage("right.gif"). '</a><br><br>'; echo ' <a href="#" class="navelement" onClick="moveSelectedOptions(document.' . $this->formname . '.selvals, document.' . $this->formname . '.notselvals); inlistProps(document.' . $this->formname . '); saveData(document.' . $this->formname . '); return false;">' . drawImage("left.gif"). '</a>'; echo '</td>'; // Draw Selectbox with selected values echo '<td width="50%" class="bcopy" valign="top">'; echo $this->headlines["head1_selected"] . "<br>"; echo '<select name="selvals" id="selvals" style="width:250px;" size="8" onChange="inlistProps(document.' . $this->formname . ');">'; // populate the list for ($i = 0; $i < count($this->inlist1); $i++) { echo '<option value="' . $this->inlist1[$i][1] . '">' . $this->inlist1[$i][0] . '</option>'; } echo '</select>'; echo '</td></tr>'; // Draw Roles echo '<tr><td colspan="2"> </td>'; echo '<td class="bcopy"><div id="aclprop">'; echo $this->headlines["head2_selected"] . "<br>"; echo '<select name="props" id="props" style="width:250px;" size="8" multiple disabled onChange="saveProps(document.' . $this->formname . ');">'; // populate the list for ($i = 1; $i < count($this->values2); $i++) { echo '<option value="' . $this->values2[$i][1] . '">' . $this->values2[$i][0] . '</option>'; } echo '</select>'; echo '<br>' . $lang->get("selmultiple", "Hold down the CTRL-Key to select multiple items!"); echo "<br><br>"; echo buttonLink($lang->get("comb_all", "Select All"), "javascript:selectAllOptions(document." . $this->formname . ".props); javascript: saveProps(document." . $this->formname . "); javascript: saveData(document." . $this->formname . ");"); echo " "; echo buttonLink($lang->get("comb_none", "Clear All"), "javascript:unselectAllOptions(document." . $this->formname . ".props); javascript: saveProps(document." . $this->formname . "); javascript: saveData(document." . $this->formname . ");"); echo '</div>'; echo '</td></tr>'; // Draw Remove button... echo '<tr><td>'; retain("selval", ""); retain("configdata", $this->configdata); echo '</td><td class="bcopy"> </td></tr>'; echo '</table>'; echo "</td>"; echo $this->draw_javascript(); return $this->colspan; }
function draw() { global $lang, $c, $sid, $aclf; echo '<td colspan="' . $this->cells . '">'; echo '<table cellpadding="0" cellspacing="0" height="140" border="0" width="190">'; echo '<tr>'; echo '<td width="190" height="1">' . drawSpacer(190, 1). '</td>'; echo '</tr>'; echo '<tr>'; echo '<td class="headbox">'; echo '<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td>'; echo '<b>'.$this->name.'</b> ('.$this->module_name.')'; echo '</td><td align="right"><b>'; // draw Links depending on $linkset $ref = createPGNRef($this->module_id, $this->fkid); $preview = ""; if ($ref != null) { if ($ref->management_table == "pgn_image") $ref_array = $ref->draw("ALL"); } // draw information on the content echo '</b>'; echo '</td></tr></table>'; echo '</td></tr>'; echo '<tr><td class="standardlight">'; if (stristr($this->linkset, "LIB") || stristr($this->linkset, "EDIT")) { if ($aclf->checkAccessToFunction("EDIT_OBJECT") || $aclf->checkAccessToFunction("OBJECT_PROPS")) echo buttonLink($lang->get("edit"), $c["docroot"] . "modules/content/object_edit.php?go=update&sid=$sid&oid=" . $this->oid). " "; } if (stristr($this->linkset, "LIB") || stristr($this->linkset, "LAUNCH")) { if ($aclf->checkAccessToFunction("OBJECT_LAUNCH")) echo buttonLink($lang->get("launch", "Launch"), "?action=launch&sid=$sid&oid=" . $this->oid). " "; } if (stristr($this->linkset, "LIB") || stristr($this->linkset, "DELETE")) { if ($aclf->checkAccessToFunction("DELETE_OBJECT")) echo buttonLink($lang->get("Delete"), "?action=delobject&sid=$sid&oid=" . $this->oid). " "; } if (stristr($this->linkset, "SELECT")) { echo drawSpacer("10", "1"); if ($aclf->checkAccessToFunction("EDIT_CL_CONTENT")) { global $sname; if ($sname != "0" && $sname!="") { $jsAction="javascript:window.opener.document.getElementById('".$sname."').value='".$this->oid."';window.opener.document.getElementById('disp_".$sname."').innerHTML='".$lang->get("prev_avail", "You selected an object. A preview will be available after saving.")."';window.close();"; } else { $jsAction = "javascript:getImage('" . $ref_array["path"] . "');ok();"; } echo buttonLink($lang->get("select", "Select"), "$jsAction"). " "; } } echo '</td></tr>'; echo '<tr>'; echo '<td valign="top" align="center" class="standardlight">'; echo $ref->preview(); echo '</td></tr>'; echo '<tr><td valign="top" class="standardlight">'; echo '<b>'.$lang->get("ackey", 'Access Key'). ":</b> "; echo "[".$this->accesskey."]"; echo "</td>"; echo "</tr>"; echo '<tr><td class="line">'.drawSpacer(1,1).'</td></tr>'; echo "</table>"; br(); echo "</td>"; unset($ref); return 1; }