public function DispAddEdit($val, &$form) { $tmp_int = (int) $val; $tmp_value = array(); $tmp_i = 1; for ($tmp_i = 1; $tmp_i != 0 && $tmp_int != 0; $tmp_i *= 2) { if ($tmp_int & $tmp_i) { $tmp_value[] = $tmp_i; $tmp_int -= $tmp_i; } } if ($form->FG_DEBUG > 1) { echo "TmpVal: {$val} <br>"; } if ($form->FG_DEBUG > 2) { echo "TmpValues:" . print_r($tmp_value, true) . "<br>\n"; } gen_Combo($form->prefix . $this->fieldname, $tmp_value, $this->field_values, true); ?> <div class="descr"><?php echo $this->editDescr; ?> </div> <?php }
public function DispAddEdit($val, &$form) { gen_Combo($form->prefix . $this->fieldname, $val, $this->field_values); ?> <div class="descr"><?php echo $this->editDescr; ?> </div> <?php }
public function DispAddEdit($val, &$form) { if (!$this->field_values) { $this->prepare($form->a2billing->DBHandle()); } gen_Combo($form->prefix . $this->fieldname, $val, $this->field_values); ?> <div class="descr"><?php echo $this->editDescr; ?> </div> <?php }
protected function DispForm(array &$qrow, &$form, $active) { $DBHandle = $form->a2billing->DBHandle(); $presentname = $this->presenttable . '.' . $this->presentname; $presentid = $this->presenttable . '.' . $this->presentid; $assocleft = $this->assoctable . '.' . $this->assocleft; $assocright = $this->assoctable . '.' . $this->assocright; if ($active) { ?> <input type="hidden" name="<?php echo $form->prefix . $this->fieldname . '_action'; ?> " value=""> <?php } $QUERY = str_dbparams($DBHandle, "SELECT {$presentid}, {$presentname} FROM {$this->presenttable}, {$this->assoctable} " . "WHERE {$assocleft}= %1 AND {$assocright} = {$presentid} ; ", array($qrow[$this->localkey])); $res = $DBHandle->Execute($QUERY); if (!$res) { if ($form->FG_DEBUG) { ?> Query failed: <?php echo htmlspecialchars($QUERY); ?> <br> Error: <?php echo $DBHandle->ErrorMsg(); ?> <br> <?php } echo _("No data found!"); } else { ?> <table class="FormRR2t1"> <thead> <tr><td><?php echo $this->fieldtitle; ?> </td><?php if ($active) { ?> <td><?php echo _("Action"); ?> </td></tr><?php } ?> </thead> <tbody> <?php while ($row = $res->fetchRow()) { ?> <tr><td><?php echo htmlspecialchars($row[$this->presentname]); ?> </td><?php if ($active) { ?> <td><a onClick="formRR2delete('<?php echo $form->prefix . $this->fieldname; ?> ','<?php echo $form->prefix . $this->fieldname . '_action'; ?> ','<?php echo $form->prefix . $this->fieldname . '_del'; ?> ','<?php echo $row[$this->presentid]; ?> ')" > <img src="./Images/icon-del.png" alt="<?php echo _("Remove this"); ?> " /></a></td> <?php } ?> </tr> <?php } ?> </tbody> </table> <?php if ($active) { ?> <input type="hidden" name="<?php echo $form->prefix . $this->fieldname . '_del'; ?> " value=""> <?php } } if (!$active) { return; } // Now, find those refs NOT already in the list! $QUERY = str_dbparams($DBHandle, "SELECT {$presentid}, {$presentname} FROM {$this->presenttable} " . "WHERE {$presentid} NOT IN (SELECT {$assocright} FROM {$this->assoctable} WHERE {$assocleft}= %1); ", array($qrow[$this->localkey])); $res = $DBHandle->Execute($QUERY); if (!$res) { if ($form->FG_DEBUG) { ?> Query failed: <?php echo htmlspecialchars($QUERY); ?> <br> Error: <?php echo $DBHandle->ErrorMsg(); ?> <br> <?php } echo _("No additional data found!"); } else { $add_combos = array(array('', _("Select one to add.."))); while ($row = $res->fetchRow()) { $add_combos[] = array($row[$this->presentid], $row[$this->presentname]); } gen_Combo($form->prefix . $this->fieldname . '_add', '', $add_combos); ?> <a onClick="formRR2add('<?php echo $form->prefix . $this->fieldname; ?> ','<?php echo $form->prefix . $this->fieldname . '_action'; ?> ')"><img src="./Images/btn_Add_94x20.png" alt="<?php echo _("Add this"); ?> " /></a> <?php } ?> <div class="descr"><?php echo $this->editDescr; ?> </div><?php }
public function dispAddbox($scol, $sparams, $svalue, $DBHandle) { // Now, find those refs NOT already in the list! $QUERY = "SELECT {$refkey}, {$refname} FROM {$this->reftable} " . "WHERE {$refid} IS NULL;"; $res = $DBHandle->Execute($QUERY); if (!$res) { if ($this->debug_st) { ?> Query failed: <?php echo htmlspecialchars($QUERY); ?> <br> Error: <?php echo $DBHanlde->ErrorMsg(); ?> <br> <?php } echo _("No additional data found!"); } else { $add_combos = array(array('', _("Select one to add.."))); while ($row = $res->fetchRow()) { $add_combos[] = $row; } gen_Combo($this->fieldname . '_add', '', $add_combos); ?> <a onClick="formRRadd('<?php echo $this->fieldname; ?> ','<?php echo $this->fieldname . '_action'; ?> ')"><img src="../Images/btn_Add_94x20.png" alt="<?php echo _("Add this"); ?> " /></a> <?php } }
<tr> <td align="left" valign="top" class="bgcolor_004"> <font class="fontstyle_003"> <?php echo gettext("AGENT"); ?> </font> </td> <td class="bgcolor_005" align="left"> <table width="100%" border="0" cellspacing="0" cellpadding="0"><tr> <td class="fontstyle_searchoptions"> <?php echo _("Select an agent"); ?> : <?php gen_Combo("choose_agent", $choose_agent, $list_agent); ?> </td> </tr></table></td> </tr> <tr> <td class="bgcolor_004" align="left" > <font class="fontstyle_003" > <?php echo gettext("CALLEDNUMBER"); ?> </font> </td> <td class="bgcolor_005" align="left" >