Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00036 require_once "include/inc.header.php";
00037
00038
00039 unset($id);
00040
00041 $ilCtrl->setTargetScript("adm_object.php");
00042
00043
00044
00045 if ($_GET["obj_id"] != "")
00046 {
00047 $call_by_reference = false;
00048 $id = $_GET["obj_id"];
00049 }
00050 else
00051 {
00052 $call_by_reference = true;
00053 $id = $_GET["ref_id"];
00054 }
00055
00056
00057 if (!isset($_GET["ref_id"]))
00058 {
00059 $ilias->raiseError("No valid ID given! Action aborted",$this->ilias->error_obj->MESSAGE);
00060 }
00061
00062 if (!isset($_GET["type"]))
00063 {
00064 if ($call_by_reference)
00065 {
00066 $obj = $ilias->obj_factory->getInstanceByRefId($_GET["ref_id"]);
00067 }
00068 else
00069 {
00070 $obj = $ilias->obj_factory->getInstanceByObjId($_GET["obj_id"]);
00071 }
00072
00073 $_GET["type"] = $obj->getType();
00074 }
00075
00076
00077 if ($_GET["cmd"] == "gateway" or $_GET["cmd"] == "post")
00078 {
00079
00080 @$cmd = key($_POST["cmd"]);
00081 }
00082 else
00083 {
00084 $cmd = $_GET["cmd"];
00085 }
00086
00087 if (empty($cmd))
00088 {
00089 $cmd = $_GET["cmd"] = $objDefinition->getFirstProperty($_GET["type"]);
00090 }
00091
00092 if ($_GET["cmd"] == "post")
00093 {
00094 $cmd = key($_POST["cmd"]);
00095 unset($_GET["cmd"]);
00096 }
00097
00098
00099 if ($_POST["new_type"] && (($cmd == "create") || ($cmd == "import") || ($cmd == "save")))
00100 {
00101 $obj_type = $_POST["new_type"];
00102 }
00103 elseif ($_GET["new_type"])
00104 {
00105 $obj_type = $_GET["new_type"];
00106 }
00107 else
00108 {
00109 $obj_type = $_GET["type"];
00110 }
00111
00112
00113 $method = $cmd."Object";
00114 $class_name = $objDefinition->getClassName($obj_type);
00115 $module = $objDefinition->getModule($obj_type);
00116 $module_dir = ($module == "")
00117 ? ""
00118 : $module."/";
00119
00120 $class_constr = "ilObj".$class_name."GUI";
00121 require_once("./".$module_dir."classes/class.ilObj".$class_name."GUI.php");
00122 $ilCtrl->getCallStructure(strtolower("ilObj".$class_name."GUI"));
00123
00124 $obj = new $class_constr($data, $id, $call_by_reference);
00125 $obj->$method();
00126 $tpl->show();
00127 ?>