grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026deprecated($deprecatedMessage); } else { trigger_error($deprecatedMessage, E_USER_DEPRECATED); } self::__construct(); } /* * This function creates the html and uses the args parameter to call the class file * ideally, you would want to call the displayScriptTags() function, * followed by the displayDefinitionScript(); * and lastly call the display function */ public function display() { /* valid entries for expected arguments array are as follow: * args['left_header'] = value of left table header * args['mid_header'] = value of middle table header * args['right_header'] = value of right table header * args['left_data'] = array to use in left data. * args['mid_data'] = array to use in middle data. * args['right_data'] =array to use in right data. * args['title'] = title (if any) to be used. * args['classname'] = name to be used as class. This helps when defining multiple templates on one screen. * args['left_div_name'] = Name to be used for left div (should be unique) * args['mid_div_name'] = Name to be used for middle div (should be unique) * args['right_div_name'] = Name to be used for right div (should be unique) * args['gridcount'] = Number of grids to show. Acceptable Values are 'one','two' and 'three' * The string is converted to numeric values, so you could also set these directly * The values are Zero Based, so to display one column, set to '0' * To display two columns set to '1', to display three columns set to '2'. * $this->args['return_array']= if this is set to true, then 'display()' function returns html and javascript * in array format. This will allow granular control of html so that you can * separate the tables and customize the grid */ //convert values for gridcount in case they are in string form if ($this->args['gridcount'] == 'one') { $this->args['gridcount'] = 0; } elseif ($this->args['gridcount'] == 'two') { $this->args['gridcount'] = 1; } elseif ( $this->args['gridcount'] == 'three') { $this->args['gridcount'] = 2; } if (!isset($this->args['classname']) || empty($this->args['classname'])) { $this->args['classname'] = 'DragDropGrid'; } $json = getJSONobj(); //use Json to encode the arrays of data, for passing to javascript. //we will always display at least one column, so set left column $this->args['left_data'][] = array(' ', ' '); $data0_enc = $json->encode($this->args['left_data']); $left_div_name = $this->args['left_div_name']; //if count is set to 1, then we are displaying two columns, set the 2 column variables if ($this->args['gridcount']==1) { $this->args['right_data'][] = array(' ', ' '); $data1_enc = $json->encode($this->args['right_data']); $right_div_name = $this->args['right_div_name']; } //if count is set to 2, then we are displaying three columns, set the 3 column variables if ($this->args['gridcount']==2) { $this->args['mid_data'][] = array(' ', ' '); $data1_enc = $json->encode($this->args['mid_data']); $mid_div_name = $this->args['mid_div_name']; $this->args['right_data'][] = array(' ', ' '); $data2_enc = $json->encode($this->args['right_data']); $right_div_name = $this->args['right_div_name']; } $html_str_arr = array(); //create the table, with the divs that will get populated. Populate both the string and array version $html_str = "