Lines Matching refs:this

176         $this->TYPES[1]=getMyLang('type_string');
177 $this->TYPES[2]=getMyLang('type_number');
178 $this->TYPES[3]=getMyLang('type_date');
179 $this->TYPES[4]=getMyLang('type_internal_link');
180 $this->TYPES[5]=getMyLang('type_external_link');
182 $this->COLUMNS['name'][1] ='name';
183 $this->COLUMNS['name'][2] ='label';
184 $this->COLUMNS['name'][3] ='mandatory';
185 $this->COLUMNS['name'][4] ='unique';
186 $this->COLUMNS['name'][5] ='type';
187 $this->COLUMNS['name'][6] ='visible';
188 $this->COLUMNS['mandatory'][1] =1;
189 $this->COLUMNS['mandatory'][2] =1;
190 $this->COLUMNS['mandatory'][3] =1;
191 $this->COLUMNS['mandatory'][4] =1;
192 $this->COLUMNS['mandatory'][5] =1;
193 $this->COLUMNS['mandatory'][6] =1;
194 $this->COLUMNS['unique'][1] =1;
195 $this->COLUMNS['unique'][2] =1;
196 $this->COLUMNS['unique'][3] =2;
197 $this->COLUMNS['unique'][4] =2;
198 $this->COLUMNS['unique'][5] =2;
199 $this->COLUMNS['unique'][6] =2;
200 $this->COLUMNS['type'][1] =1;
201 $this->COLUMNS['type'][2] =1;
202 $this->COLUMNS['type'][3] =102;
203 $this->COLUMNS['type'][4] =102;
204 $this->COLUMNS['type'][5] =999;
205 $this->COLUMNS['type'][6] =102;
206 $this->COLUMNS['visible'][1] =1;
207 $this->COLUMNS['visible'][2] =1;
208 $this->COLUMNS['visible'][3] =1;
209 $this->COLUMNS['visible'][4] =1;
210 $this->COLUMNS['visible'][5] =1;
211 $this->COLUMNS['visible'][6] =1;
214 $this->COLUMNS['label'][$i] = getMyLang('column_label',$i);
216 $this->imagesFolder=DOKU_BASE.'lib/plugins/'.$dbName.'/images/';
218 $this->baseFolder = DOKU_INC.'data/pages/'.$dbName.'/';
219 $this->URL = DOKU_URL.'doku.php?idx='.$dbName;
222 $directoryName = $this->baseFolder.$this->DICTIONARY_FOLDER;
225 mkdir("$this->baseFolder",0777);
227 mkdir("$this->baseFolder$this->DICTIONARY_FOLDER",0777);
232 if ($handle = opendir($this->baseFolder)) {
234 if ($file != "." && $file != ".." && $file != $this->DICTIONARY_FOLDER) {
236 $this->tableNames[$counter] = substr($file,3);
250 $ret = $this->baseFolder;
254 $ret .= $id."-".$this->tableNames[$p_id]."/";
283 $this->columnTypeList[$i] = $environment->TYPES[$i];
290 $this->lookupTitles[$lookupCount] = getMyLang('lookup',$lookupCount,1);
291 $this->columnTypeList[$environment->LOOKUP_OFFSET+$lookupCount]
294 …$this->lookupOptions[$lookupCount][$optionCount-1] = getMyLang('lookup',$lookupCount,$optionCount);
304 $this->columnTypeList[$environment->REFERENCE_OFFSET+$counter]
368 $lookups = $this->lookupTitles;;
402 $this->exist = false;
412 $this->messageList[] = $p_message;
413 $this->exist = true;
438 foreach($this->messageList as $message) {
461 $this->indent=0;
472 $this->messageList[] = $this->tab().$p_message;
473 $display->debug_output($this->tab().$p_message);
483 $this->indent++;
484 $this->add("<--- Start of ". $p_message."-->");
494 $this->add("<--- End of ". $p_message."-->");
495 $this->indent--;
506 for ($i=0;$i<$this->indent;$i++)
519 foreach($this->messageList as $message)
559 $this->id = $p_id;
560 $this->name = $p_name;
561 $this->label = $p_label;
562 $this->mandatory = $p_mandatory;
563 $this->unique = $p_unique;
564 $this->type = $p_type;
566 if ($this->mandatory == $environment->YES) $this->allowNoSelection=false;
567 else $this->allowNoSelection=true;
569 $this->visible = $p_visible;
570 if ($this->visible == $environment->YES) $this->isVisible = true;
571 else $this->isVisible = false;
587 $auditTrail->add_header('Column - display_for_change column = '.$this->name);
588 $name = "values".$this->id;
591 $value = $this->fromDatabase($value);
594 else $noSelectionAllowed = $this->allowNoSelection; // true if not mandatory
596 if ($this->type==$environment->TYPE_LOOKUP) {
600 elseif ($this->type==$environment->TYPE_STRING
601 || $this->type==$environment->TYPE_NUMBER
602 || $this->type==$environment->TYPE_DATE
603 || $this->type==$environment->TYPE_INTERNAL_LINK
604 || $this->type==$environment->TYPE_EXTERNAL_LINK) {
610 … elseif ($this->type>$environment->LOOKUP_OFFSET && $this->type<$environment->REFERENCE_OFFSET) {
612 $list=$session->lookupOptions[$this->type - $environment->LOOKUP_OFFSET];
613 $ret .= $this->drop_down($name,$list,$noSelectionAllowed,$value);
615 elseif ($this->type>$environment->REFERENCE_OFFSET) {
617 $referenceTable = new Table($this->type - $environment->REFERENCE_OFFSET,"data");
637 …$ret .= $this->drop_down($name,$sortedListOfValues,$noSelectionAllowed,$value,$sortedListOfPointer…
671 if ($this->type == $environment->TYPE_INTERNAL_LINK
672 || $this->type == $environment->TYPE_EXTERNAL_LINK) {
673 $messages->add($this->label.getMyLang('err_dat_missing_pipe').$value);
677 if ($this->type != $environment->TYPE_INTERNAL_LINK
678 && $this->type != $environment->TYPE_EXTERNAL_LINK) {
679 $messages->add($this->label.getMyLang('err_dat_extra_pipe').$value);
684 if ($this->type == $environment->TYPE_INTERNAL_LINK) {
688 if ($this->type == $environment->TYPE_EXTERNAL_LINK) {
704 if ($this->type == $environment->TYPE_INTERNAL_LINK
705 || $this->type == $environment->TYPE_EXTERNAL_LINK) {
727 if ($this->type == $environment->TYPE_NUMBER
728 || $this->type > $environment->NUMBER_OF_BASIC_TYPES) {
730 $messages->add($this->label.getMyLang('err_dat_typ_num').$value);
734 if ($this->type == $environment->TYPE_DATE) {
742 $messages->add($this->label.getMyLang('err_dat_typ_dat').$value);
746 if ($this->type == $environment->TYPE_INTERNAL_LINK) {
751 $messages->add($this->label.getMyLang('err_dat_typ_int').$value);
755 if ($this->type == $environment->TYPE_EXTERNAL_LINK) {
760 $messages->add($this->label.getMyLang('err_dat_typ_ext').$value);
764 if ($this->mandatory==$environment->YES) {
766 $messages->add($this->label.getMyLang('err_dat_typ_man'));
783 if ($this->type==$environment->TYPE_STRING
784 ||$this->type==$environment->TYPE_NUMBER)
787 elseif ($this->type==$environment->TYPE_DATE) {
799 elseif ($this->type==$environment->TYPE_INTERNAL_LINK) {
810 elseif ($this->type==$environment->TYPE_EXTERNAL_LINK) {
820 elseif ($this->type == $environment->TYPE_LOOKUP) {
824 … elseif ($this->type>$environment->LOOKUP_OFFSET && $this->type<$environment->REFERENCE_OFFSET) {
825 $list=$session->lookupOptions[$this->type - $environment->LOOKUP_OFFSET];
830 elseif ($this->type>$environment->REFERENCE_OFFSET) {
832 $referenceTable = new Table($this->type - $environment->REFERENCE_OFFSET,"data");
923 $this->displayId = $p_id;
924 $this->id= abs($p_id);
926 if (abs($this->id)>count($environment->tableNames)) {
930 $display->debug_output ("creating table with id=".$this->id);
931 $this->name = $environment->tableNames[abs($p_id)];
933 $this->isAdmin=true;
936 $this->isAdmin=false;
940 if ($this->isAdmin) {
942 $this->columnObjs[$i] = new Column($i
953 $this->columnObjs = $this->get_columns();
956 if ($this->columnObjs[1]->type==$environment->TYPE_NUMBER
957 && $this->columnObjs[1]->unique==$environment->YES) {
958 $auditTrail->add($this->name." is a reference table ");
959 $this->possibleReference = true;
961 $auditTrail->add($this->name." is not a reference table ");
962 $this->possibleReference = false;
966 $this->name = $environment->DICTIONARY_FOLDER;
967 $this->displayId = 0;
968 $this->id=0;
982 $this->id=$tableId;
983 $this->isAdmin=false;
989 $file = new File($this,"data");
991 $file = new File($this,"definition");
1010 $this->get_all();
1012 $currentRecord =$this->get($p_id);
1049 if (!$this->populated) $this->get_all();
1052 foreach ($this->recordObjs as $record) {
1067 if ($this->columnObjs[$counter]->unique == $environment->YES) {
1069 …$messages->add('****** '.$this->columnObjs[$counter]->label." : ".getMyLang('err_dup_val') .' ****…
1094 $definitionFile = new File($this, "definition");
1129 $display->debug_output("In filter recCounter= ".count($this->recordObjs));
1132 for ($colCounter=1; $colCounter<=count($this->columnObjs);$colCounter++) {
1134 $type = $this->columnObjs[$colCounter]->type;
1159 for( $recCounter=1; $recCounter<=count($this->recordObjs); $recCounter++) {
1161 $recordObj = $this->recordObjs[$sortedList[$recCounter]];
1166 for ($colCounter=1;$colCounter<=count($this->columnObjs);$colCounter++) {
1167 $type = $this->columnObjs[$colCounter]->type;
1238 $auditTrail->add_header('get_all for table '.$this->name);
1239 $this->populated = true;
1240 $dataFile = new File($this,"data");
1243 $display->debug_output( "The contents of the table ".$this->name."=". $dataFile->buf);
1246 $this->recordObjs[$recCounter] = new Record($this,$recCounter,$rowObj->fields);
1248 $auditTrail->add_footer('get_all for table '.$this->name);
1260 $display->debug_output("Getting record with id=".$p_id." from table ".$this->name);
1261 return $this->recordObjs[$p_id];
1273 if ($this->isUnique($p_values)) {
1274 $dataFile = new File($this,"data");
1288 $display->debug_output("table:update : record ".$p_id." in table ".$this->name);
1289 $dataFile = new File($this,"data");
1300 $dataFile = new File($this,"data");
1323 $this->Table($id);
1324 $this->get_all();
1326 foreach ($this->recordObjs as $rec) {
1327 $this->list[$rec->values[1]] = $rec->values[2];
1339 return $this->list;
1366 $this->tableObj = $p_tableObj;
1367 $this->values = $p_values;
1368 if (count($p_values) < count($this->tableObj->columnObjs))
1369 … for ($counter=count($p_values)+1; $counter<=count($this->tableObj->columnObjs);$counter++)
1370 $this->values[$counter]='';
1371 $this->id=$p_recordId;
1398 $this->CR= chr(13);
1400 $this->file_maker($p_tableObjOrName, $type);
1403 … $this->name = $environment->baseFolder.$environment->DICTIONARY_FOLDER.'/'.$p_tableObjOrName;
1423 $this->name = 'definition.txt';
1425 $this->name = $dbFolder."definition.txt";
1429 $this->name = $dbFolder."definition.txt";
1431 $this->name = $dbFolder."data.txt";
1433 $display->debug_output( "The file name = ".$this->name);
1444 $handle = fopen($this->name,"w");
1446 $messages->add("Unable to open the file ".$this->name." when attempting to create it");
1458 if ($this->exists())
1459 unlink($this->name);
1469 if (file_exists($this->name))
1487 if (!$this->exists()) {
1488 $messages->add('Unable to open the file '.$this->name.' when attempting to read');
1490 $handle = fopen($this->name,"r");
1491 $display->debug_output( "<br>read_buffer opening ".$this->name);
1495 if (filesize($this->name) > 0 )
1496 $buf = fread($handle,filesize($this->name));
1499 $this->buf = $buf;
1501 $rows = explode($this->CR,$buf);
1505 if (ord(substr($row,0,1)) == $this->ASCILF)
1509 $this->rowObjs[$counter] = new Row($row);
1525 if ($this->exists()) {
1526 $handle = fopen($this->name,"a");
1528 $handle = fopen($this->name,"w");
1531 $messages->add('Unable to open the file '.$this->name.' when attempting to write');
1543 if (fwrite ($handle,$buf.$this->CR) === FALSE)
1544 $messages->add('Error writing to the file '.$this->name);
1557 $this->read_buffer();
1558 $handle = fopen($this->name,"w");
1560 $messages->add("Unable to open the file ".$this->name." when attempting to delete");
1563 fwrite($handle,$this->rowObjs[$counter]->raw.$this->CR);
1567 for ($counter=$p_id+1;$counter<=count($this->rowObjs);$counter++)
1568 fwrite($handle,$this->rowObjs[$counter]->raw.$this->CR);
1584 $display->debug_output( "file:update updating rec ".$p_id."in ".$this->name);
1585 $this->read_buffer();
1586 $display->debug_output( "first line = ".$this->rowObjs[1]->raw);
1587 $handle = fopen($this->name,"w");
1589 $messages->add("Unable to open the file ".$this->name." when attempting to update");
1592 fwrite($handle,$this->rowObjs[$counter]->raw.$this->CR);
1601 fwrite($handle,$this->CR);
1603 for ($counter=$p_id+1;$counter<=count($this->rowObjs);$counter++)
1604 fwrite($handle,$this->rowObjs[$counter]->raw.$this->CR);
1630 $this->raw = $row;
1635 $this->fields[$counter] = $element;
1661 $this->IDX ='<input type="hidden" name="id" value="start" />';
1662 $this->IDX .='<input type="hidden" name="idx" value="'.$dbName.'"
1678 $this->output ('<div class="level2">');
1680 $this->output ('<h1>'.$tab->name.'</h1>');
1684 $this->output ('<h2>'.getMyLang('prompt_cre').' '.$title.'</h2>');
1688 $this->output ('<div class="level3">');
1690 $this->output ($this->form_start());
1691 $this->output ('<table border=1>');
1695 $this->output ('<tr>');
1696 $this->output ('<th>');
1697 $this->output ($column->label);
1698 $this->output ('</th>');
1699 $this->output ('<td>');
1702 … if (is_array($values)) $this->output($column->display_for_change($values[$counter],'create'));
1704 $this->output($column->display_for_change('','create'));
1705 $this->output ('</td>');
1706 $this->output ('</tr>');
1708 $this->output ('</table>');
1709 …$this->output ('<span style="white-space: nowrap;">'); // This form seems to behave differently fr…
1710 … $this->output($this->button('insertAction',getMyLang('btn_cre_cre') ,false, $tab->displayId));
1711 $this->output ($this->form_end());
1713 $this->output($this->button('home',getMyLang('btn_home') ,true));
1715 $this->output($this->button('listall',getMyLang('btn_back') ,true, $tab->displayId));
1716 $this->output ('</span>');
1717 $this->output('</div>');
1718 $this->output ('</div>');
1735 $this->output ('<div class="level2">');
1737 $this->output ('<h1>'.$tableObj->name.'</h1>');
1741 $this->output ('<h2>'.getMyLang('prompt_edt').' '.$title.'</h2>');
1746 $this->output ('<div class="level3">');
1748 $this->output ($this->form_start());
1750 $this->output( "<table border=1>");
1753 $this->output('<tr>');
1754 $this->output('<th>');
1755 $this->output($columnObjs[$counter]->label);
1756 $this->output ('</th>');
1757 $this->output ('<td>');
1759 $this->output($column->display_for_change($values[$counter],'update'));
1761 $this->output($column->display_for_change($p_recordObj->values[$counter],'update'));
1762 $this->output('</td>');
1763 $this->output('</tr>');
1765 $this->output('</table>');
1770 $this->output($column->display_original($counter, $p_recordObj->values[$counter]));
1773 …$this->output($this->button('updateAction',getMyLang('btn_edt_upd'),false, $tableObj->displayId,$p…
1774 $this->output($this->form_end());
1776 $this->output($this->button('home',getMyLang('btn_home') ,true));
1778 $this->output($this->button('listall',getMyLang('btn_back') ,true, $tableObj->displayId));
1780 $this->output('</div>');
1781 $this->output('</div>');
1796 $this->output ('<div class="level2">');
1798 $this->output ('<h1>'.$tableObj->name.'</h1>');
1802 $this->output ('<h2>'.getMyLang('prompt_del_rec').'</h2>');
1807 $this->output ('<div class="level3">');
1808 $this->output ($this->form_start());
1809 $this->output( "<table border=1>");
1812 $this->output('<tr>');
1813 $this->output('<th>');
1814 $this->output($columnObjs[$counter]->label);
1815 $this->output('</th>');
1816 $this->output('<td>');
1818 $this->output($columnObjs[$counter]->display($p_recordObj->values[$counter]));
1819 $this->output('</td>');
1820 $this->output('</tr>');
1826 $this->output($column->display_original($counter, $p_recordObj->values[$counter]));
1829 $this->output('</table>');
1830 $this->output($this->button('deleteAction',getMyLang('btn_del_cnf'),false,
1832 $this->output ($this->form_end());
1834 $this->output($this->button('home',getMyLang('btn_home') ,true));
1836 $this->output($this->button('listall',getMyLang('btn_back') ,true, $tableObj->displayId));
1837 $this->output('</div>');
1838 $this->output ('</div>');
1854 $this->output ('<div class="level2">');
1856 $this->output ('<h1>'.$tab->name.'</h1>');
1858 $this->output($this->button('home',getMyLang('btn_home') ,true));
1862 $this->output($this->button('insertForm',$prompt,true, $tab->displayId));
1865 … $this->output($this->button('admin',getMyLang('btn_adm_tab_str'),true, $tab->displayId));
1867 $this->output($this->button('listall',getMyLang('btn_lst_tab_cnt') ,true, $tab->id));
1871 $this->output ($this->form_start());
1872 $this->output ('<table class="inline">');
1874 $this->output ('<thead>');
1875 $this->output ('<tr>');
1877 $this->output ('<th align=center>');
1878 $this->output (getMyLang('rad_lst_no_srt'));
1883 $this->output ($toGo);
1884 $this->output ('</th>');
1888 $this->output ("<th>");
1890 $this->output ($column->label);
1895 $this->output ($toGo);
1896 $this->output ('</th>');
1899 $this->output ('</tr>');
1901 $this->output ('<tr>');
1904 $this->output ('<td class="rightalign">');
1905 …$this->output($this->iconButton('list','search.png', getMyLang('btn_lst_srch_srt'), $tab->displayI…
1906 $this->output ('</td>');
1910 $this->output ('<td>');
1911 $this->output ($column->display_for_change('','search'));
1912 $this->output ('</td>');
1915 $this->output ('</tr>');
1916 $this->output ('</thead>');
1918 $this->output ('<tbody>');
1931 $this->output ("<tr>");
1933 $this->output ('<td>');
1935 …$this->output($this->iconButton('updateForm','edit.png',getMyLang('btn_lst_edt'), $tab->displayId,…
1938 …$this->output($this->iconButton('deleteForm','delete.png',getMyLang('btn_lst_del'), $tab->displayI…
1940 $this->output ('</td>');
1946 $this->output ('<td>');
1947 $this->output ($tab->columnObjs[$fieldCounter]->display($value));
1948 $this->output ('</td>');
1951 $this->output ("</tr>");
1954 $this->output ('</tbody>');
1955 $this->output ('</table>');
1956 $this->output ($this->form_end());
1958 $this->output ('</div>');
1971 $this->output ('<h1>'.getMyLang('ttl_cre_tab').'</h1>');
1973 $this->output ('<table>');
1974 $this->output ($this->form_start());
1975 $this->output('<tr>');
1976 $this->output('<td>');
1977 $this->output(getMyLang('prompt_ent_tab_name'));
1978 $this->output('</td>');
1979 $this->output('<td>');
1980 $this->output('<input type="text" name="tableName" size=30 />');
1981 $this->output('</td>');
1982 $this->output('</tr>');
1983 $this->output('</table>');
1984 $this->output($this->button('createTable',getMyLang('btn_cre_new_tab'),false));
1985 $this->output($this->form_end());
1987 $this->output($this->button('home',getMyLang('btn_home') ,true));
2018 if ($withTopAndTail) $ret .= $this->form_start();
2019 $ret .= $this->IDX;
2025 if ($withTopAndTail) $ret .= $this->form_end();
2048 $ret .= $this->IDX;
2077 if (substr($p_string,0,3)=='</t') $this->currentSteps--;
2081 ptln( $p_string, $this->currentSteps*$INCREMENT);
2083 if (substr($p_string,0,2)=='<t') $this->currentSteps++;
2095 if ($this->debug) {
2130 $this->id = $id;
2131 $this->name = $name;
2177 $this->sortedList[$counter] = $testObj->id;