ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilDBGenerator.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4
13class ilDBGenerator
14{
15
19 protected $target_encoding = 'UTF-8';
23 protected $whitelist = array();
27 protected $blacklist = array();
31 protected $tables = array();
35 protected $filter = array();
36
37
41 public function __construct()
42 {
43 global $ilDB;
44
45 $this->manager = $ilDB->loadModule(ilDBConstants::MODULE_MANAGER);
46 $this->reverse = $ilDB->loadModule(ilDBConstants::MODULE_REVERSE);
47 $this->il_db = $ilDB;
48 include_once("./Services/Database/classes/class.ilDBAnalyzer.php");
49 $this->analyzer = new ilDBAnalyzer();
50
51 $this->allowed_attributes = $ilDB->getAllowedAttributes();
52 }
53
58 public static function lookupAbstractedTables()
59 {
60 global $ilDB;
61
62 $query = "SELECT DISTINCT(table_name) FROM abstraction_progress ";
63 $res = $ilDB->query($query);
64 $names = array();
65 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
66 $names[] = $row->table_name;
67 }
68
69 // tables that have been already created in an abstracted
70 // way or tables that have been renamed after being abstracted
71 // (see db_update script)
72 $abs_tables = array_merge($names, array(
73 'acc_access_key',
74 'acc_user_access_key',
75 'ldap_rg_mapping',
76 'page_anchor',
77 'qpl_question_orderinghorizontal',
78 'qpl_question_fileupload',
79 'chat_smilies',
80 'style_color',
81 'style_template_class',
82 'style_template',
83 'page_style_usage',
84 'style_setting',
85 'page_editor_settings',
86 'mep_data',
87 'license_data',
88 'loginname_history',
89 'mep_item',
90 'qpl_a_cloze',
91 'qpl_a_imagemap',
92 'qpl_a_matching',
93 'qpl_num_range',
94 'qpl_qst_cloze',
95 'qpl_qst_essay',
96 'qpl_qst_fileupload',
97 'qpl_qst_flash',
98 'qpl_qst_horder',
99 'qpl_qst_imagemap',
100 'qpl_qst_javaapplet',
101 'qpl_qst_matching',
102 'qpl_qst_mc',
103 'qpl_qst_numeric',
104 'qpl_qst_ordering',
105 'qpl_qst_sc',
106 'qpl_qst_textsubset',
107 'qpl_qst_type',
108 'qpl_sol_sug',
109 'udf_text',
110 'udf_clob',
111 'xmlnestedsettmp',
112 'cache_text',
113 'cache_clob',
114 'qpl_a_errortext',
115 'qpl_qst_errortext',
116 'tst_rnd_cpy',
117 'tst_rnd_qpl_title',
118 'qpl_a_mdef',
119 ));
120
121 return $abs_tables;
122 }
123
124
145 public function setTargetEncoding($a_encoding)
146 {
147 $this->target_encoding = $a_encoding;
148 }
149
150
156 public function getTargetEncoding()
157 {
158 return $this->target_encoding;
159 }
160
161
168 public function setBlackList($a_blacklist)
169 {
170 $this->blacklist = $a_blacklist;
171 }
172
173
179 public function getBlackList()
180 {
181 return $this->blacklist;
182 }
183
184
192 public function setWhiteList($a_whitelist)
193 {
194 $this->whitelist = $a_whitelist;
195 }
196
197
203 public function getWhiteList()
204 {
205 return $this->whitelist;
206 }
207
208
213 public function setFilter($a_filter, $a_value)
214 {
215 $this->filter[$a_filter] = $a_value;
216 }
217
218
222 public function getTables()
223 {
224 $r = $this->manager->listTables();
225 $this->tables = $r;
226
227 return $this->tables;
228 }
229
230
234 public function checkProcessing($a_table)
235 {
236 // check black list
237 if (in_array($a_table, $this->blacklist)) {
238 return false;
239 }
240
241 // check white list
242 if (count($this->whitelist) > 0 && !in_array($a_table, $this->whitelist)) {
243 return false;
244 }
245
246 return true;
247 }
248
249
250 protected function openFile($a_path)
251 {
252 if (1) {
253 $file = fopen($a_path, "w");
254 $start .= "\t" . 'global $ilDB;' . "\n\n";
255 fwrite($file, $start);
256
257 return $file;
258 }
259
260 $file = fopen($a_path, "w");
261 $start = '<?php' . "\n" . 'function setupILIASDatabase()' . "\n{\n";
262 $start .= "\t" . 'global $ilDB;' . "\n\n";
263 fwrite($file, $start);
264
265 return $file;
266 }
267
268
269 protected function closeFile($fp)
270 {
271 if (1) {
272 #fwrite ($fp, $end);
273 fclose($fp);
274
275 return;
276 }
277
278 $end = "\n}\n?>\n";
279 fwrite($fp, $end);
280 fclose($fp);
281 }
282
283
289 public function buildDBGenerationScript($a_filename = "")
290 {
291 if (@is_dir($a_filename)) {
292 $isDirectory = true;
293 $path = $a_filename;
294 } else {
295 $isDirectory = false;
296 $path = '';
297 }
298
299 $file = "";
300 if ($a_filename != "" and !$isDirectory) {
301 $file = fopen($a_filename, "w");
302
303 $start = '<?php' . "\n" . 'function setupILIASDatabase()' . "\n{\n";
304 $start .= "\t" . 'global $ilDB;' . "\n\n";
305 fwrite($file, $start);
306 } elseif ($isDirectory) {
307 ;
308 } else {
309 echo "<pre>";
310 }
311
312 $this->getTables();
313
314 foreach ($this->tables as $table) {
315 if ($this->checkProcessing($table)) {
316 if ($a_filename != "") {
317 flush();
318 }
319
320 if ($isDirectory) {
321 $file = $this->openFile($path . '/' . $table);
322 }
323
324 // create table statement
325 $this->buildCreateTableStatement($table, $file);
326
327 // primary key
328 $this->buildAddPrimaryKeyStatement($table, $file);
329
330 // indices
331 $this->buildAddIndexStatements($table, $file);
332
333 // constraints (currently unique keys)
334 $this->buildAddUniqueConstraintStatements($table, $file);
335
336 // auto increment sequence
337 $this->buildCreateSequenceStatement($table, $file);
338
339 if (in_array($table, array('usr_session_stats', 'usr_session_raw', 'il_plugin'))) {
340 continue;
341 }
342
343 // inserts
344 if ($isDirectory) {
345 $this->buildInsertStatement($table, $path);
346 #$this->buildInsertStatementsXML($table,$path);
347 } else {
348 $this->buildInsertStatements($table, $file);
349 }
350
351 if ($isDirectory) {
352 $this->closeFile($file);
353 }
354 } else {
355 if ($a_filename != "") {
356 echo "<br><b>missing: " . $table . "</b>";
357 flush();
358 }
359 }
360 }
361
362 // sequence(s) without table (of same name)
363 $this->buildSingularSequenceStatement($file);
364
365 if ($a_filename == "") {
366 echo "</pre>";
367 } elseif (!$isDirectory) {
368 $end = "\n}\n?>\n";
369 $ok = fwrite($file, $end);
370 var_dump($ok);
371 fclose($file);
372 }
373 }
374
375
382 public function buildCreateTableStatement($a_table, $a_file = "")
383 {
384 $fields = $this->analyzer->getFieldInformation($a_table, true);
385 $this->fields = $fields;
386 $create_st = "\n\n//\n// " . $a_table . "\n//\n";
387 $create_st .= '$fields = array (' . "\n";
388 $f_sep = "";
389 foreach ($fields as $f => $def) {
390 $create_st .= "\t" . $f_sep . '"' . $f . '" => array (' . "\n";
391 $f_sep = ",";
392 $a_sep = "";
393 foreach ($def as $k => $v) {
394 if ($k != "nativetype" && $k != "alt_types" && $k != "autoincrement" && !is_null($v)) {
395 switch ($k) {
396 case "notnull":
397 case "unsigned":
398 case "fixed":
399 $v = $v ? "true" : "false";
400 break;
401
402 case "default":
403 case "type":
404 $v = '"' . $v . '"';
405 break;
406
407 default:
408 break;
409 }
410 $create_st .= "\t\t" . $a_sep . '"' . $k . '" => ' . $v . "\n";
411 $a_sep = ",";
412 }
413 }
414 $create_st .= "\t" . ')' . "\n";
415 }
416 $create_st .= ');' . "\n";
417 $create_st .= '$ilDB->createTable("' . $a_table . '", $fields);' . "\n";
418
419 if ($a_file == "") {
420 echo $create_st;
421 } else {
422 fwrite($a_file, $create_st);
423 }
424 }
425
426
433 public function buildAddPrimaryKeyStatement($a_table, $a_file = "")
434 {
435 $pk = $this->analyzer->getPrimaryKeyInformation($a_table);
436
437 if (is_array($pk["fields"]) && count($pk["fields"]) > 0) {
438 $pk_st = "\n" . '$pk_fields = array(';
439 $sep = "";
440 foreach ($pk["fields"] as $f => $pos) {
441 $pk_st .= $sep . '"' . $f . '"';
442 $sep = ",";
443 }
444 $pk_st .= ");\n";
445 $pk_st .= '$ilDB->addPrimaryKey("' . $a_table . '", $pk_fields);' . "\n";
446
447 if ($a_file == "") {
448 echo $pk_st;
449 } else {
450 fwrite($a_file, $pk_st);
451 }
452 }
453 }
454
455
462 public function buildAddIndexStatements($a_table, $a_file = "")
463 {
464 $ind = $this->analyzer->getIndicesInformation($a_table, true);
465
466 if (is_array($ind)) {
467 foreach ($ind as $i) {
468 if ($i["fulltext"]) {
469 $ft = ", true";
470 } else {
471 $ft = ", false";
472 }
473 $in_st = "\n" . '$in_fields = array(';
474 $sep = "";
475 foreach ($i["fields"] as $f => $pos) {
476 $in_st .= $sep . '"' . $f . '"';
477 $sep = ",";
478 }
479 $in_st .= ");\n";
480 $in_st .= '$ilDB->addIndex("' . $a_table . '", $in_fields, "' . $i["name"] . '"' . $ft . ');' . "\n";
481
482 if ($a_file == "") {
483 echo $in_st;
484 } else {
485 fwrite($a_file, $in_st);
486 }
487 }
488 }
489 }
490
491
498 public function buildAddUniqueConstraintStatements($a_table, $a_file = "")
499 {
500 $con = $this->analyzer->getConstraintsInformation($a_table, true);
501
502 if (is_array($con)) {
503 foreach ($con as $i) {
504 $in_st = "\n" . '$in_fields = array(';
505 $sep = "";
506 foreach ($i["fields"] as $f => $pos) {
507 $in_st .= $sep . '"' . $f . '"';
508 $sep = ",";
509 }
510 $in_st .= ");\n";
511 $in_st .= '$ilDB->addUniqueConstraint("' . $a_table . '", $in_fields, "' . $i["name"] . '");' . "\n";
512
513 if ($a_file == "") {
514 echo $in_st;
515 } else {
516 fwrite($a_file, $in_st);
517 }
518 }
519 }
520 }
521
522
529 public function buildCreateSequenceStatement($a_table, $a_file = "")
530 {
531 $seq = $this->analyzer->hasSequence($a_table);
532 if ($seq !== false) {
533 $seq_st = "\n" . '$ilDB->createSequence("' . $a_table . '", ' . (int) $seq . ');' . "\n";
534
535 if ($a_file == "") {
536 echo $seq_st;
537 } else {
538 fwrite($a_file, $seq_st);
539 }
540 }
541 }
542
543
549 public function buildSingularSequenceStatement($a_file = "")
550 {
551 $r = $this->manager->listSequences();
552
553 foreach ($r as $seq) {
554 if (!in_array($seq, $this->tables)) {
555 // 12570
556 if ($seq == "sahs_sc13_seq") {
557 continue;
558 }
559
560 $create_st = "\n" . '$ilDB->createSequence("' . $seq . '");' . "\n";
561
562 if ($a_file == "") {
563 echo $create_st;
564 } else {
565 fwrite($a_file, $create_st);
566 }
567 }
568 }
569 }
570
571
579 public function buildInsertStatement($a_table, $a_basedir)
580 {
581 global $ilLog;
582
583 $ilLog->write('Starting export of:' . $a_table);
584
585 $set = $this->il_db->query("SELECT * FROM " . $this->il_db->quoteIdentifier($a_table));
586 $row = 0;
587
588 umask(0000);
589 mkdir($a_basedir . '/' . $a_table . '_inserts', fileperms($a_basedir));
590
591 $filenum = 1;
592 while ($rec = $this->il_db->fetchAssoc($set)) {
593 $values = array();
594 foreach ($rec as $f => $v) {
595 if ($this->fields[$f]['type'] == 'text' and $this->fields[$f]['length'] >= 1000) {
596 $v = $this->shortenText($a_table, $f, $v, $this->fields[$f]['length']);
597 }
598
599 $values[$f] = array(
600 $this->fields[$f]['type'],
601 $v,
602 );
603 }
604
605 $rows[$a_table][$row++] = $values;
606
607 if ($row >= 1000) {
608 $ilLog->write('Writing insert statements after 1000 lines...');
609 $fp = fopen($a_basedir . '/' . $a_table . '_inserts/' . $filenum++ . '.data', 'w');
610 fwrite($fp, serialize((array) $rows));
611 fclose($fp);
612
613 $row = 0;
614 unset($rows);
615 }
616 }
617 if ($rows) {
618 $fp = fopen($a_basedir . '/' . $a_table . '_inserts/' . $filenum++ . '.data', 'w');
619 fwrite($fp, serialize((array) $rows) . "\n");
620 fclose($fp);
621 }
622
623 $ilLog->write('Finished export of: ' . $a_table);
624 if (function_exists('memory_get_usage')) {
625 $ilLog->write('Memory usage: ' . memory_get_usage(true));
626 }
627
628 return true;
629 }
630
631
638 public function buildInsertStatementsXML($a_table, $a_basedir)
639 {
640 global $ilLog;
641
642 include_once './Services/Xml/classes/class.ilXmlWriter.php';
643 $w = new ilXmlWriter();
644 $w->xmlStartTag('Table', array( 'name' => $a_table ));
645
646 $set = $this->il_db->query("SELECT * FROM " . $this->il_db->quoteIdentifier($a_table));
647 $ins_st = "";
648 $first = true;
649 while ($rec = $this->il_db->fetchAssoc($set)) {
650 #$ilLog->write('Num: '.$num++);
651 $w->xmlStartTag('Row');
652
653 $fields = array();
654 $types = array();
655 $values = array();
656 foreach ($rec as $f => $v) {
657 if ($this->fields[$f]['type'] == 'text' and $this->fields[$f]['length'] >= 1000) {
658 $v = $this->shortenText($a_table, $f, $v, $this->fields[$f]['length']);
659 }
660
661 $w->xmlElement('Value', array(
662 'name' => $f,
663 'type' => $this->fields[$f]['type'],
664 ), $v);
665 }
666
667 $w->xmlEndTag('Row');
668 }
669 $w->xmlEndTag('Table');
670
671 $w->xmlDumpFile($a_basedir . '/' . $a_table . '.xml', false);
672 }
673
674
681 public function buildInsertStatements($a_table, $a_file = "")
682 {
683 if ($a_table == "lng_data") {
684 return;
685 }
686
687 $set = $this->il_db->query("SELECT * FROM " . $this->il_db->quoteIdentifier($a_table));
688 $ins_st = "";
689 $first = true;
690 while ($rec = $this->il_db->fetchAssoc($set)) {
691 $fields = array();
692 $types = array();
693 $values = array();
694 $i_str = array();
695 foreach ($rec as $f => $v) {
696 $fields[] = $f;
697 $types[] = '"' . $this->fields[$f]["type"] . '"';
698 $v = str_replace('\\', '\\\\', $v);
699 $values[] = "'" . str_replace("'", "\'", $v) . "'";
700 $i_str[] = "'" . $f . "' => array('" . $this->fields[$f]["type"] . "', '" . str_replace("'", "\'", $v) . "')";
701 }
702 $fields_str = "(" . implode($fields, ",") . ")";
703 $types_str = "array(" . implode($types, ",") . ")";
704 $values_str = "array(" . implode($values, ",") . ")";
705 $ins_st = "\n" . '$ilDB->insert("' . $a_table . '", array(' . "\n";
706 $ins_st .= implode($i_str, ", ") . "));\n";
707 //$ins_st.= "\t".$fields_str."\n";
708 //$ins_st.= "\t".'VALUES '."(%s".str_repeat(",%s", count($fields) - 1).')"'.",\n";
709 //$ins_st.= "\t".$types_str.','.$values_str.');'."\n";
710
711 if ($a_file == "") {
712 echo $ins_st;
713 } else {
714 fwrite($a_file, $ins_st);
715 }
716 $ins_st = "";
717 }
718 }
719
720
726 public function getHTMLOverview($a_filename = "")
727 {
728 $tpl = new ilTemplate("tpl.db_overview.html", true, true, "Services/Database");
729
730 $this->getTables();
731 $cnt = 1;
732 foreach ($this->tables as $table) {
733 if ($this->checkProcessing($table)) {
734 // create table statement
735 if ($this->addTableToOverview($table, $tpl, $cnt)) {
736 $cnt++;
737 }
738 }
739 }
740
741 $tpl->setVariable("TXT_TITLE", "ILIAS Abstract DB Tables (" . ILIAS_VERSION . ")");
742
743 if ($a_filename == "") {
744 echo $tpl->get();
745 }
746 }
747
748
752 public function addTableToOverview($a_table, $a_tpl, $a_cnt)
753 {
754 $fields = $this->analyzer->getFieldInformation($a_table);
755 $indices = $this->analyzer->getIndicesInformation($a_table);
756 $constraints = $this->analyzer->getConstraintsInformation($a_table);
757 $pk = $this->analyzer->getPrimaryKeyInformation($a_table);
758 $auto = $this->analyzer->getAutoIncrementField($a_table);
759 $has_sequence = $this->analyzer->hasSequence($a_table);
760
761 // table filter
762 if (isset($this->filter["has_sequence"])) {
763 if ((!$has_sequence && $auto == "" && $this->filter["has_sequence"])
764 || (($has_sequence || $auto != "") && !$this->filter["has_sequence"])
765 ) {
766 return false;
767 }
768 }
769
770 // indices
771 $indices_output = false;
772 if (is_array($indices) && count($indices) > 0 && !$this->filter["skip_indices"]) {
773 foreach ($indices as $index => $def) {
774 $f2 = array();
775 foreach ($def["fields"] as $f => $pos) {
776 $f2[] = $f;
777 }
778 $a_tpl->setCurrentBlock("index");
779 $a_tpl->setVariable("VAL_INDEX", $def["name"]);
780 $a_tpl->setVariable("VAL_FIELDS", implode($f2, ", "));
781 $a_tpl->parseCurrentBlock();
782 $indices_output = true;
783 }
784 $a_tpl->setCurrentBlock("index_table");
785 $a_tpl->parseCurrentBlock();
786 }
787
788 // constraints
789 $constraints_output = false;
790 if (is_array($constraints) && count($constraints) > 0 && !$this->filter["skip_constraints"]) {
791 foreach ($constraints as $index => $def) {
792 $f2 = array();
793 foreach ($def["fields"] as $f => $pos) {
794 $f2[] = $f;
795 }
796 $a_tpl->setCurrentBlock("constraint");
797 $a_tpl->setVariable("VAL_CONSTRAINT", $def["name"]);
798 $a_tpl->setVariable("VAL_CTYPE", $def["type"]);
799 $a_tpl->setVariable("VAL_CFIELDS", implode($f2, ", "));
800 $a_tpl->parseCurrentBlock();
801 $constraints_output = true;
802 }
803 $a_tpl->setCurrentBlock("constraint_table");
804 $a_tpl->parseCurrentBlock();
805 }
806
807 // fields
808 $fields_output = false;
809 foreach ($fields as $field => $def) {
810 // field filter
811 if (isset($this->filter["alt_types"])) {
812 if (($def["alt_types"] == "" && $this->filter["alt_types"])
813 || ($def["alt_types"] != "" && !$this->filter["alt_types"])
814 ) {
815 continue;
816 }
817 }
818 if (isset($this->filter["type"])) {
819 if ($def["type"] != $this->filter["type"]) {
820 continue;
821 }
822 }
823 if (isset($this->filter["nativetype"])) {
824 if ($def["nativetype"] != $this->filter["nativetype"]) {
825 continue;
826 }
827 }
828 if (isset($this->filter["unsigned"])) {
829 if ($def["unsigned"] != $this->filter["unsigned"]) {
830 continue;
831 }
832 }
833
834 $a_tpl->setCurrentBlock("field");
835 if (empty($pk["fields"][$field])) {
836 $a_tpl->setVariable("VAL_FIELD", strtolower($field));
837 } else {
838 $a_tpl->setVariable("VAL_FIELD", "<u>" . strtolower($field) . "</u>");
839 }
840 $a_tpl->setVariable("VAL_TYPE", $def["type"]);
841 $a_tpl->setVariable("VAL_LENGTH", (!is_null($def["length"])) ? $def["length"] : "&nbsp;");
842
843 if (strtolower($def["default"]) == "current_timestamp") {
844 //$def["default"] = "0000-00-00 00:00:00";
845 unset($def["default"]);
846 }
847
848 $a_tpl->setVariable("VAL_DEFAULT", (!is_null($def["default"])) ? $def["default"] : "&nbsp;");
849 $a_tpl->setVariable("VAL_NOT_NULL", (!is_null($def["notnull"])) ? (($def["notnull"]) ? "true" : "false") : "&nbsp;");
850 $a_tpl->setVariable("VAL_FIXED", (!is_null($def["fixed"])) ? (($def["fixed"]) ? "true" : "false") : "&nbsp;");
851 $a_tpl->setVariable("VAL_UNSIGNED", (!is_null($def["unsigned"])) ? (($def["unsigned"]) ? "true" : "false") : "&nbsp;");
852 $a_tpl->setVariable("VAL_ALTERNATIVE_TYPES", ($def["alt_types"] != "") ? $def["alt_types"] : "&nbsp;");
853 $a_tpl->setVariable("VAL_NATIVETYPE", ($def["nativetype"] != "") ? $def["nativetype"] : "&nbsp;");
854 $a_tpl->parseCurrentBlock();
855 $fields_output = true;
856 }
857
858 if ($fields_output) {
859 $a_tpl->setCurrentBlock("field_table");
860 $a_tpl->parseCurrentBlock();
861 }
862
863 // table information
864 if ($indices_output || $fields_output || $constraints_output) {
865 $a_tpl->setCurrentBlock("table");
866 $a_tpl->setVariable("TXT_TABLE_NAME", strtolower($a_table));
867 if ($has_sequence || $auto != "") {
868 $a_tpl->setVariable("TXT_SEQUENCE", "Has Sequence");
869 } else {
870 $a_tpl->setVariable("TXT_SEQUENCE", "No Sequence");
871 }
872 $a_tpl->setVariable("VAL_CNT", (int) $a_cnt);
873 $a_tpl->parseCurrentBlock();
874
875 return true;
876 }
877
878 return false;
879 }
880
881
891 protected function shortenText($table, $field, $a_value, $a_size)
892 {
893 global $ilLog;
894
895 if ($this->getTargetEncoding() == 'UTF-8') {
896 return $a_value;
897 }
898 // Convert to target encoding
899 $shortened = mb_convert_encoding($a_value, $this->getTargetEncoding(), 'UTF-8');
900 // Shorten
901 include_once './Services/Utilities/classes/class.ilStr.php';
902 $shortened = ilStr::shortenText($shortened, 0, $a_size, $this->getTargetEncoding());
903 // Convert back to UTF-8
904 $shortened = mb_convert_encoding($shortened, 'UTF-8', $this->getTargetEncoding());
905
906 if (strlen($a_value) != strlen($shortened)) {
907 $ilLog->write('Table : ' . $table);
908 $ilLog->write('Field : ' . $field);
909 $ilLog->write('Type : ' . $this->fields[$field]['type']);
910 $ilLog->write('Length : ' . $this->fields[$field]['length']);
911 $ilLog->write('Before : ' . $a_value);
912 $ilLog->write('Shortened : ' . $shortened);
913 $ilLog->write('Strlen Before: ' . strlen($a_value));
914 $ilLog->write('Strlen After : ' . strlen($shortened));
915 }
916
917 return $shortened;
918 }
919}
memory_get_usage(true)/1024/1024)
$tpl
Definition: ilias.php:10
An exception for terminatinating execution or to throw for unit testing.
This class gives all kind of DB information using the MDB2 manager and reverse module.
static shortenText($a_string, $a_start_pos, $a_num_bytes, $a_encoding='UTF-8')
Shorten text to the given number of bytes.
special template class to simplify handling of ITX/PEAR
XML writer class.
$def
Definition: croninfo.php:21
$i
Definition: disco.tpl.php:19
$w
$r
Definition: example_031.php:79
const ILIAS_VERSION
$index
Definition: metadata.php:60
$end
Definition: saml1-acs.php:18
$query
if(empty($password)) $table
Definition: pwgen.php:24
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file
foreach($_POST as $key=> $value) $res
global $ilDB
$errors fields
Definition: imgupload.php:51
$rows
Definition: xhr_table.php:10