function PW_ForgotPage1() { // KFD 11/13/06. Heavily modified for new system, threw out // the older code entirely, now that all apps have a users // table built into them. $eml = trim(gp('txt_email')); $seml = SQLFC(strtolower($eml)); $heml = hx($eml); $ueml = urlencode($eml); //$leml= MakeUserId(strtolower($eml)); $db2 = scDBConn_Push('usermaint'); $sq = "Select skey,user_id,member_password,email FROM users " . " where LOWER(email)={$seml}"; $member = SQL_AllRows($sq); // Nothing of any kind is a bummer, we can't do anything if (count($member) == 0) { ErrorAdd('There are no active accounts with that email address'); } else { $leml = MakeUserID($eml); $member = $member[0]; // If we know who they are, send a password and allow them to change it $user_pwkey = md5($member['member_password'] . $leml . time()); //$ref=$_SERVER['HTTP_REFERER']; $http = httpWebSite() . "/"; $row = array('skey' => $member['skey'], 'user_pwkey' => $user_pwkey); $UID = $member['user_id']; $PWD = $member['member_password']; // KFD 12/21/06. Done for medinfo originally. If UID looks like // the email, send the email instead $emailUID = $member['email']; $table_dd = DD_Tableref('users'); SQLX_Update($table_dd, $row); $emailuser_id = OptionGet('EMAIL_USERID', 'N') == 'Y' ? $emailUID : $leml; $text_email = "\nYour username and password are: {$emailuser_id} and {$PWD}.\n \nIf you would like to change your password, click here:\n<{$http}?gp_page=x_password&gpp=2&eml={$ueml}&hash={$user_pwkey}>\n"; scDBConn_Pop(); //echo $text_email; EmailSend($eml, 'System Access Request', $text_email); ?> <b>Email Has Been Sent</b>. An email has been sent to you with information needed to access the system. <?php gpSet('gpp', 'X'); } }
//================================================================== /* Now create the first group of color event signaller */ echo ha() . '<img ' . createComIcon($root_path, 'qbar_' . $event['yellow'] . '_yellow.gif', '0') . ' name="yellow" ' . he() . '<img ' . createComIcon($root_path, 'qbar_' . $event['black'] . '_black.gif', '0') . ' name="black" ' . he() . '<img ' . createComIcon($root_path, 'qbar_' . $event['blue_pale'] . '_blue_pale.gif', '0') . ' name="blue_pale" ' . he() . '<img ' . createComIcon($root_path, 'qbar_' . $event['brown'] . '_brown.gif', '0') . ' name="brown" ' . he() . '<img ' . createComIcon($root_path, 'qbar_' . $event['pink'] . '_pink.gif', '0') . ' name="pink" ' . he() . '<img ' . createComIcon($root_path, 'qbar_' . $event['yellow_pale'] . '_yellow_pale.gif', '0') . ' name="yellow_pale" ' . he() . '<img ' . createComIcon($root_path, 'qbar_' . $event['red'] . '_red.gif', '0') . ' name="red" ' . he() . '<img ' . createComIcon($root_path, 'qbar_' . $event['green_pale'] . '_green_pale.gif', '0') . ' name="green_pale" ' . he() . '<img ' . createComIcon($root_path, 'qbar_' . $event['violet'] . '_violet.gif', '0') . ' name="violet" ' . he() . '<img ' . createComIcon($root_path, 'qbar_' . $event['blue'] . '_blue.gif', '0') . ' name="blue" ' . he() . '<img ' . createComIcon($root_path, 'qbar_' . $event['biege'] . '_biege.gif', '0') . ' name="biege" ' . hx() . '<img ' . createComIcon($root_path, 'qbar_trans.gif', '0') . '>' . ha() . '<img ' . createComIcon($root_path, 'qbar_' . $event['orange'] . '_orange.gif', '0') . ' name="orange" ' . hx() . '<img ' . createComIcon($root_path, 'qbar_trans.gif', '0') . '><img ' . createComIcon($root_path, 'qbar_trans.gif', '0') . '><img ' . createComIcon($root_path, 'qbar_trans.gif', '0') . '>'; /* Create the maroon bars */ // echo ha().'<img // '.createComIcon($root_path,'qbar_'.$event['maroon'].'_maroon.gif','0').' alt="Maroon" name="maroon'.'" '.mx(); /* Create the green bars */ /* Note $h is used here as counter */ for ($h = 1; $h < 8; $h++) { echo ha() . '<img ' . createComIcon($root_path, 'qbar_' . $event['rose_' . $h] . '_green.gif', '0') . ' alt="' . $LDFullDayName[$h] . '" name="green_' . $h . '" ' . gx(); } echo '<img ' . createComIcon($root_path, 'qbar_trans.gif', '0') . '>'; /* Create the rose bars*/
//while ($kount++ < 30) { echo "<br>"; } } # ======================================================== # Get some cookie stuff taken care of before header # ======================================================== $template = $mainframe->getTemplate(); $app = $GLOBALS['AG']['application']; if (gpExists('p2c')) { $color = gp('p2c'); setCookie($app . "_color", hx($color), strtotime("+5 years", time())); } else { $color = a($_REQUEST, $app . "_color", 'blue'); } if (gpExists('p2s')) { $size = gp('p2s'); setCookie($app . "_size", hx($size), strtotime("+5 years", time())); } else { $size = a($_REQUEST, $app . "_size", '1024'); } ?> <!DOCTYPE html> <html lang="en"> <head> <?php cssInclude("clib/bootstrap-wysiwyg/bootstrap-wysihtml5.css"); cssInclude("templates/{$template}/bootstrap/css/bootstrap.min.css"); cssInclude("templates/{$template}/bootstrap/css/bootstrap-responsive.min.css"); cssInclude("templates/{$template}/bootstrap/datepicker/css/datepicker.css"); cssInclude("clib/bootstrap-wysiwyg/wysiwyg-color.css"); include 'androHTMLHead.php'; ?>
/** * @deprecated */ function ahColFromACol(&$acol) { // Link to the subarray and assign any defaults $acol['html_element'] = 'input'; $acol['html_right'] = ''; $acol['html_inner'] = ''; $acol['text-align'] = 'left'; $acol['hparms'] = array('class' => 'x3' . $acol['mode'], 'type' => 'text', 'name' => '--NAME--', 'nameprefix' => '--NAME-PREFIX--', 'id' => '--ID--', 'tabindex' => '--TABINDEX--', 'tooltip' => ArraySafe($acol, 'tooltip', ''), 'value' => '--NAME----VALUE--', 'x_value_original' => $acol['mode'] == 'ins' ? '' : '--NAME----VALUE--', 'x_class_suffix' => '', 'x_error' => '0', 'x_class_base' => $acol['mode'], 'x_mode' => $acol['mode'], 'x_no_clear' => ArraySafe($acol, 'noclear', 'N'), 'x_ctl_prv' => ArraySafe($acol, 'ctl_prv', ''), 'x_ctl_nxt' => ArraySafe($acol, 'ctl_nxt', ''), 'x_value_focus' => '', 'x_type_id' => $acol['type_id']); if ($acol['type_id'] == 'date') { $acol['hparms']['data-date'] = '--NAME----VALUE--'; $acol['hparms']['class'] = 'datepicker'; $acol['hparms']['data-date-format'] = 'mm/dd/yyyy'; } $TOOLTIPS = OptionGet('TOOLTIPS', 'N'); switch ($TOOLTIPS) { case 'NONE': $acol['hparms']['title'] = ''; $acol['hparms']['tooltip'] = ''; case 'JQUERY_ALSO': $acol['hparms']['title'] = $acol['hparms']['tooltip']; break; case 'JQUERY_ONLY': $acol['hparms']['title'] = $acol['hparms']['tooltip']; unset($acol['hparms']['tooltip']); } // For read-onlies, add another class if (!$acol['writable']) { //$acol['hparms']['class']='x3ro'; $acol['hparms']['readonly'] = 'readonly'; } // A size correction $acol['size'] = min($acol['size'], 24); // KFD 10/22/07. For PROMAT application originally if (ArraySafe($acol, 'pk_change') == 'Y') { $acol['html_right'] .= " " . "<a href=\"javascript:void(0)\"" . 'onclick="ob(\'--NAME--\').readOnly=false;ob(\'--NAME--\').focus()">' . 'change</a>'; } // ------------------------------------ // Big deal #1, decisions based on type // ------------------------------------ switch ($acol['type_id']) { case 'date': // We might put a date button off to the right, // if it is writable /* if($acol['writable']) { $acol['html_right'] .=" " ."<img src='clib/dhtmlgoodies_calendar_images/calendar1.gif' value='Cal' onclick=\"displayCalendar(ob('--NAME--'),'mm/dd/yyyy',this,true)\">"; }*/ $acol['hparams']['data-date-format'] = 'yyyy-mm-dd'; $acol['hparms']['size'] = $acol['size']; if (isset($acol['maxlength'])) { $acol['hparms']['maxlength'] = $acol['maxlength']; } break; case 'time': $acol['html_element'] = 'select'; $hinner = ''; $xmin = $acol['value_min']; $xmax = $acol['value_max'] ? $acol['value_max'] : 1425; for ($x = $xmin; $x <= $xmax; $x += 15) { $hinner .= "\n<option value=\"{$x}\">" . hTime($x) . "</option>"; } if ($acol['mode'] == 'search') { $hinner = "\n<option value=\"\"></option>" . $hinner; } $acol['html_inner'] = $hinner; break; case 'cbool': // DO 3-7-2008 Added if statement so that when column level security is present // changes to field can be "disabled" if (!$acol['writable']) { $acol['html_element'] = 'input'; } else { $acol['html_element'] = 'select'; $prefix = $acol['mode'] == 'search' ? '<option value=""></option>' : ''; $acol['html_inner'] = $prefix . "\n<option --SELECTED-Y-- value='Y'>Y</option>" . "<option --SELECTED-N-- value='N'>N</option>"; } break; case 'gender': // DO 3-7-2008 Added if statement so that when column level security is present // changes to field can be "disabled" if (!$acol['writable']) { $acol['html_element'] = 'input'; } else { $acol['html_element'] = 'select'; $prefix = $acol['mode'] == 'search' ? '<option value=""></option>' : ''; $acol['html_inner'] = $prefix . "\n<option value='M'>M</option>" . "<option value='F'>F</option>"; } break; case 'text': $acol['html_element'] = 'textarea'; $acol['hparms']['rows'] = $acol['uirows'] == 0 ? 4 : $acol['uirows']; $acol['hparms']['cols'] = $acol['uicols'] == 0 ? 40 : $acol['uicols']; $acol['html_inner'] = '--NAME----VALUE--'; $acol['value'] = ''; break; case 'numb': case 'int': case 'money': if ($acol['type_id'] != 'int') { $acol['hparms']['size'] = 12; } else { $acol['hparms']['size'] = $acol['size']; } $acol['text-align'] = 'right'; break; case 'mime-h-f': case 'mime-h': // Do nothing, it all gets done later. // Do nothing, it all gets done later. default: $acol['hparms']['size'] = $acol['size']; if (isset($acol['maxlength'])) { $acol['hparms']['maxlength'] = $acol['maxlength']; } } // ------------------------------------ // Big deal GLEPH, value_min & value_max // ------------------------------------ if (a($acol, 'value_min', '') != '' && a($acol, 'value_max', '') != '') { if ($acol['type_id'] != 'time') { $acol['html_element'] = 'select'; $acol['hparms']['size'] = 1; $hinner = ''; $xmin = a($acol, 'value_min'); $xmax = a($acol, 'value_max'); // DJO 4-18-08 Add empty row during lookup mode if ($acol['mode'] == 'search') { $hinner .= "\n<option value=\"\"></option>"; } for ($x = $xmin; $x <= $xmax; $x++) { $hinner .= "\n<option value=\"{$x}\">" . $x . "</option>"; } $acol['html_inner'] = $hinner; $acol['hparms']['style'] = 'text-align:left'; } } // ------------------------------------ // Big deal B), foreign keys // ------------------------------------ if ($acol['table_id_fko'] != '' && $acol['type_id'] != 'date') { // Says we want an info button next to it if ($acol['mode'] != 'search') { $acol['html_right'] .= "<span class=\"help-inline\"><a tabindex=999 href=\"javascript:Info2('" . $acol['table_id_fko'] . "'" . ",'--NAME--')\">Info</a></span>"; } if ($acol['writable']) { // if numeric, set this back $acol['text-align'] = 'left'; if ($acol['fkdisplay'] != 'dynamic') { // HTML SELECT Branch $acol['html_element'] = 'SELECT'; $acol['html_inner'] = '--NAME----HINNER--'; if (array_key_exists('size', $acol['hparms'])) { unset($acol['hparms']['size']); } if (array_key_exists('maxlength', $acol['hparms'])) { unset($acol['hparms']['maxlength']); } // KFD 10/8/07 compound foreign keys. If its the first, // put in a snippet to pull the next $fkpks = explode(',', $acol['fk_pks']); if (count($fkpks) > 1) { if (trim($acol['column_id']) == trim($fkpks[0])) { $tfko = $acol['table_id_fko']; $pk1 = $fkpks[0]; $pk2 = $fkpks[1]; $acol['snippets']['onblur'][] = "fetchSELECT('{$tfko}',this,'{$pk1}',this.value,'{$pk2}',obv('x2t_{$pk2}'))"; } } } else { // The core code just says do a dropdown $table_id_fko = $acol['table_id_fko']; $fkparms = 'gp_dropdown=' . $table_id_fko; if ($acol['writable']) { //$col['input']='select'; if (vgfGet('adlversion', 2) == 1) { $acol['snippets']['onkeyup'][] = "ajax_showOptions(this,'{$fkparms}',event)"; } else { $acol['snippets']['onkeyup'][] = "androSelect_onKeyUp(this,'{$fkparms}',event)"; $acol['snippets']['onkeydown'][] = "androSelect_onKeyDown(event)"; } } $acol['hparms']['autocomplete'] = 'off'; } } } // ------------------------------------ // Big deal IV. change detection // ------------------------------------ // Any item in update mode needs to get a snippet // KFD 8/8/07, JS_KEYSTROKE, see next section, all snippets // for regular events are unconditional, the Js // library routine decides what to do $acol['snippets']['onkeyup'][] = 'inputOnKeyUp(event,this)'; // ------------------------------------ // Big deal Epsilon, focus/unfocus // ------------------------------------ // KFD 8/8/07, JS_KEYSTROKE. // Call to javascript routines that will decide // what to do, don't decide here $acol['snippets']['onfocus'][] = 'inputOnFocus(this)'; $acol['snippets']['onblur'][] = 'inputOnBlur(this)'; //if($acol['writable']) { // $acol['snippets']['onfocus'][]='focusColor(this,true)'; // $acol['snippets']['onblur'][] ='focusColor(this,false)'; //} // ------------------------------------ // Big deal #6 execute lookup on ENTER // ------------------------------------ if ($acol['mode'] == 'search') { $acol['snippets']['onkeypress'][] = "doButton(event,13,'but_lookup')"; } // ------------------------------------ // 2nd Big deal, execute FETCHes // ------------------------------------ if (count(ArraySafe($acol, 'fetches', array())) > 0) { $fetches = $acol['fetches']; foreach ($fetches as $fetch) { $acol['snippets']['onchange'][] = "ajaxFetch(" . "'" . $fetch['table_id_par'] . "'" . ",'--NAME-PREFIX--'" . ",'" . $fetch['commapklist'] . "'" . ",'" . $fetch['commafklist'] . "'" . ",'" . $fetch['controls'] . "'" . ",'" . $fetch['columns'] . "'" . ",this)"; } } // ------------------------------------ // Does this field force recalc? // ------------------------------------ if ($acol['calcs']) { // KFD 8/8/07 JS_KEYSTROKES, this will be done on server by // calling back to the server when a value changes. //$acol['snippets']['onkeyup'][]="calcRow()"; $acol['hparms']['autocomplete'] = 'off'; } // ------------------------------------ // Big deal OMEGA, rendering the element // ------------------------------------ $hparms = ''; foreach ($acol['hparms'] as $parm => $value) { $hparms .= $parm . '="' . (($acol['type_id'] == 'mime-h' || $acol['type_id'] == 'mime-h-f') && $parm == 'value' ? $value : hx($value)) . '"'; } if ($acol['text-align'] == 'right') { $hparms .= ' style="text-align: right"'; } $hcode = ''; if (isset($acol['snippets'])) { foreach ($acol['snippets'] as $event => $list) { $hcode .= $event . '="' . implode(';', $list) . '"'; } } // WE HAD A DISABLED HERE, BUT THEN IT WOULD NOT POST! $acol['html'] = "<" . $acol['html_element'] . ' ' . $hparms . ($acol['writable'] ? '' : ' READONLY ') . $hcode . '>' . $acol['html_inner'] . '</' . $acol['html_element'] . '>'; }
function main() { // ------------------------------------------------ // Branch out to ajax handling functions if (gpExists('fwajax')) { return $this->FWAjax(); } // ...early return // ------------------------------------------------ // Public sites can turn off table maintenance pages if (vgfGet('suppress_maintenance', false)) { return; } vgfset('maintenance', true); # KFD 2/17/09 Sourceforge 2546056 # If we are in default main code branch, and # there is no data dictionary, the user has # called a bad page. if (!isset($this->table['projections'])) { ?> <h1>Bad Page Request</h1> <p>There is no page <?php echo hx(gp('gp_page')); ?> <?php return; } // If a "fk jump", retrieve skey and make it look // like an edit call. if (gp('gp_pk') != '') { $pkval = gp("gp_pk"); $pkcol = $this->table["pks"]; $pktyp = $this->table['flat'][$pkcol]["type_id"]; $table_id = $this->table["table_id"]; // KFD 10/26/06, used to be $table_id $sq = "SELECT skey FROM " . $this->view_id . " WHERE " . $pkcol . " = " . SQL_Format($pktyp, $pkval); gpSet('gp_skey', SQL_OneValue('skey', $sq)); gpSet('gp_mode', 'upd'); } // If we were invoked by a child table, don't do this if (is_null($this->table_obj_child)) { // KFD 10/26/06, keep as $table_id Hidden('gp_page', $this->table_id); // always return to same page Hidden('gp_mode', ''); Hidden('gp_skey', ''); Hidden('gp_action', ''); Hidden('gp_save', ''); hidden('gp_copy', ''); } // Work out what to do if mode is blank. Might mean // upd, might mean browse. $mode = gp('gp_mode'); $skey = gp('gp_skey'); if ($mode == '') { $mode = $this->MainCheckForMover(); if ($mode == '') { $mode = $skey == '' ? 'browse' : 'upd'; gpSet('gp_mode', $mode); } } $this->mode = $mode; // KFD 8/13/07, Experimental COPY ability if (gp('gp_action') == 'copy') { $mode = 'ins'; gpSet('gp_mode', 'ins'); } switch ($mode) { case 'search': $this->PageSubtitle .= " (Lookup Mode)"; break; case 'ins': $this->PageSubtitle .= " (New Entry)"; break; } // ---------------------------------------------- // Generate the main HTML elements if ($mode == 'browse') { $this->hBrowse(); } elseif ($mode == 'mover') { $this->hMover(); } else { $this->hBoxes($mode); } if ($mode != "mover") { $this->hButtonBar($mode); } $this->hLinks($mode); $this->hExtra($mode); // Now if this is a child table in a 1:M, it will not actually // output its own stuff, it will invoke its parent, so let's // buffer the output if ($this->table_id_parent != '') { ob_start(); } // Echo out the HTML $this->ehMain(); // Put this out at end, after all HTML has been output if ($mode == "search") { //$controls=vgfGet('gpControls'); $controls = ContextGet('OldRow'); $hScript = ''; foreach ($controls as $key => $info) { $hScript .= "\nob('x2t_{$key}').value='';"; } jqDocReady("function clearBoxes() { \n" . $hScript . "}\n\n"); } // Again, if this is a child table in a 1:M, capture the output and // make it the responsibility of the parent if ($this->table_id_parent != '') { $this->h['Complete'] = ob_get_clean(); // Wipe out and replace all gp variables, fool the parent object $OldRow = ContextGet('OldRow', array()); $gpsave = aFromGP('gp_'); gpUnsetPrefix('gp_'); $dd = ContextGet('drilldown', array()); $dd1 = array_pop($dd); gpSet('gp_skey', $dd1['skey']); // Now invoke the parent object, tell it about us $object = objPage($this->table_id_parent); $object->table_obj_child = $this; $object->main(); // Replace the wiped out gp variables gpUnsetPrefix('gp_'); gpSetFromArray('gp_', $gpsave); ContextSet('OldRow', $OldRow); // Force the menu to come from the parent vgaSet('menu_selected', $this->table_id_parent); } }
function profile_conventional() { # KFD 2/17/09 Sourceforge 2546056. The dispatching system # sends page requests here by default. This is # where we have to work out if there is a bad # page request. if (!isset($this->dd['table_id'])) { ?> <h1>No Page By That Name</h1> <p>There is no page <b><?php echo hx(gp('x6page')); ?> </b>. <?php return; } # KFD 2/9/09, new feature for Jeff/wholdist. If "table_id_par" # was passed in, load a certain row from the parent # table into the bulletin board. Specifically this # is so the table can act like a child table # w/respect to loading FETCH and FETCHDEF values. # Maybe we'll do more with it later. $tid_par = gp('table_id_par', ''); if ($tid_par != '') { $ddpar = ddTable($tid_par); $pks = explode(',', $ddpar['pks']); $aWhere = array(); foreach ($pks as $pk) { $type_id = $ddpar['flat'][$pk]['type_id']; if (($pkval = gp('pre_' . $pk)) != '') { $aWhere[] = $pk . '=' . SQL_Format($type_id, $pkval); } } $sql = 'select * from ' . ddView($tid_par) . ' where ' . implode('AND', $aWhere); $row = sql_oneRow($sql); x6Script("x6bb.fwSet('dbRow_{$tid_par}'," . json_encode($row) . ')'); } # Grab the data dictionary for this table $dd = $this->dd; $table_id = $this->dd['table_id']; # KFD 4/15/09 Sourceforge 2765788, handle no kids gracefully, # work out how many kids there are to display $kidCount = 0; foreach ($dd['fk_children'] as $child => $info) { if (trim(arr($info, 'x6display', '')) != 'none') { $kidCount++; } } # Create the top level div as a table controller $top = new androHTMLTableController($table_id); $top->addClass('fadein'); # Various heights. Assume all borders are the same and get # only one. $hinside = x6cssDefine('insideheight'); $hh1 = x6cssHeight('h1'); $htabs = x6cssHeight('.ui-tabs-nav li'); $hborder = x6cssRuleSize('ui-tabs-panel', 'border-top'); $pad0 = x6cssDefine('pad0'); $hlh = x6CssDefine('lh0'); # $hpane1 is the outer, it is what is left after removing # h1, one row of tabs, and padding at bottom. # KFD 4/15/09 Sourceforge 2765788, if no kids, correct height if ($kidCount == 0) { $htabs = 0; } $hpane1 = $hinside - $hh1 - $htabs - $pad0 * 2; # $hchild is the height of the empty nested tab # pane, hardcoded at pad0. This is where the child # tables are initially displayed -- at the bottom of the # detail pane. They are initially slid all of the way down, # that is why their height is only pad0. $hempty = $pad0; # $hdetail is the height of the detail pane inside of the # detail tab. It is the $hpane1 less another tab (the # nested one), and $hempty, and a double padding $hdetail = $hpane1 - $htabs - $hempty - $pad0 * 2; # Begin with title and tabs $top->h('h1', $dd['description']); if (method_exists($this, 'insert_belowh1')) { $this->insert_belowh1($top); } $options = array('x6profile' => 'conventional', 'x6table' => $table_id); $tabs = $top->addTabs('tabs_' . $table_id, $hpane1, $options); $lookup = $tabs->addTab('Lookup'); $detail = $tabs->addTab('Detail', true); # Make a generic grid, which will show all uisearch # columns, and add a row of lookup inputs to it. # Enclose it in a div that gives some padding on top # and bottom. Divide up the left-right free space to # put 1/3 on the left and the remaining on the right. $divgrid = $lookup->h('div'); $grid = $divgrid->addGrid($hpane1 - $hlh * 2, $table_id, true, true); $grid->hp['x6profile'] = 'conventional'; $gridWidth = $this->gridGeneric($grid, $dd); # Work out the available free width after making the grid $wAvail = x6cssDefine('insidewidth') - 2 - x6cssDefine('pad0') * 2 - $gridWidth; $divgrid->hp['style'] = "padding-left: " . intval($wAvail / 3) . "px;\n padding-top: " . x6CSSDefine('lh0') . "px;"; # tell the browse tab object to focus when it is selected $lookup->hp['x6objectFocusId'] = $grid->hp['id']; # This is kind of a hack for forcing exact matches when # a maintenance screen is invoked with pre-set parameters if (gp('x6exactPre') == 1) { $grid->hp['x6exactPre'] = 1; } # We are making # the assumption that there will *always* be child tables # because otherwise the programmer would have selected # a different profile. # $divDetail = $detail->addDetail($dd['table_id'], true, $hdetail, $tid_par); $divDetail->addCustomButtons($this->customButtons()); $divDetail->ap['xTabSelector'] = $tabs->ul->hp['id']; $divDetail->ap['xTabIndex'] = 1; $divDetail->ap['x6profile'] = 'conventional'; $detail->hp['x6objectFocusId'] = $divDetail->hp['id']; # KFD 5/27/09 Google #21 Allow user to override the detail if (method_exists($this, $table_id . '_detail')) { $method = $table_id . '_detail'; $this->{$method}($divDetail); } # The div kids is a tabbar of child tables. Notice that we # put nothing into them. They are loaded dynamically when # the user picks them. $options = array('x6slideUp' => $divDetail->hp['id'], 'x6slideUpInner' => $divDetail->innerId, 'x6parentTable' => $table_id, 'x6profile' => 'kids', 'x6table' => $table_id, 'styles' => array('overflow' => 'hidden')); # KFD 4/15/09 Sourcefroge 2765788 no kids handle gracefully if ($kidCount > 0) { $tabKids = $detail->addTabs('kids_' . $table_id, $hempty, $options); $tabKids->ul->hp['xOffset'] = 2; $tab = $tabKids->addTab("Hide"); $idx = 0; foreach ($dd['fk_children'] as $child => $info) { # KFD 1/2/09. If x6display is 'none', skip it if (trim(arr($info, 'x6display', '')) == 'none') { continue; } $tc = $top->addTableController($child); $tc->hp['x6tablepar'] = $table_id; $tab = $tabKids->addTab($info['description']); $tab->ap['x6tablePar'] = $table_id; $tab->ap['x6table'] = $child; if ($info['x6childwrites'] == 'detail') { # Create the basic detail $modal = new androHTMLDetail($child, true, 700, $table_id); # KFD 5/27/09 Google #21 Allow user to override if (method_exists($this, $child . '_detail')) { $method = $child . '_detail'; $this->{$method}($modal); } # Now see if we need to add buttons if (file_exists(fsDirtop() . "application/x6{$child}.php")) { include_once fsDirtop() . "application/x6{$child}.php"; $childClass = 'x6' . $child; $objChild = new $childClass(); $custom = $objChild->customButtons(); $modal->addCustomButtons($custom); } # Tell framework to add it to the output. addModal($modal); } } # And then loop through extra tabs foreach ($this->appTabs as $child => $caption) { $top->addTableController($child); $tab = $tabKids->addTab($caption); $tab->hp['x6tablePar'] = $table_id; $tab->hp['x6table'] = $child; } } # tell the screen to start out by focusing on # the browse jqDocReady("x6events.fireEvent('objectFocus','{$grid->hp['id']}')"); # KFD 3/20/09 Sourceforge 2697962 # index_hidden calls this now #$this->hldOut($top); $top->render(); }