00001 <?php
00002
00005
00018 ini_set("display_errors",
00019 "Off");
00020
00021 ini_set("memory_limit", "64M");
00022
00023
00024
00025 include_once("../../framework/db.php");
00026
00027
00028 include_once("../../framework/Conneg.php");
00029
00030
00031 include_once("../../framework/WebService.php");
00032
00033 include_once("../../framework/ProcessorXML.php");
00034
00035 include_once("DatasetCreate.php");
00036 include_once("../../auth/validator/AuthValidator.php");
00037 include_once("../../auth/registrar/access/AuthRegistrarAccess.php");
00038 include_once("../../auth/lister/AuthLister.php");
00039
00040 include_once("../../framework/Logger.php");
00041
00042
00043
00044 $uri = "";
00045
00046 if(isset($_POST['uri']))
00047 {
00048 $uri = $_POST['uri'];
00049 }
00050
00051
00052 $title = "";
00053
00054 if(isset($_POST['title']))
00055 {
00056 $title = $_POST['title'];
00057 }
00058
00059
00060 $description = "";
00061
00062 if(isset($_POST['description']))
00063 {
00064 $description = $_POST['description'];
00065 }
00066
00067
00068 $creator = "";
00069
00070 if(isset($_POST['creator']))
00071 {
00072 $creator = $_POST['creator'];
00073 }
00074
00075 $mtime = microtime();
00076 $mtime = explode(' ', $mtime);
00077 $mtime = $mtime[1] + $mtime[0];
00078 $starttime = $mtime;
00079
00080 $start_datetime = date("Y-m-d h:i:s");
00081
00082 $requester_ip = "0.0.0.0";
00083
00084 if(isset($_SERVER['REMOTE_ADDR']))
00085 {
00086 $requester_ip = $_SERVER['REMOTE_ADDR'];
00087 }
00088
00089 $parameters = "";
00090
00091 if(isset($_SERVER['REQUEST_URI']))
00092 {
00093 $parameters = $_SERVER['REQUEST_URI'];
00094
00095 $pos = strpos($parameters, "?");
00096
00097 if($pos !== FALSE)
00098 {
00099 $parameters = substr($parameters, $pos, strlen($parameters) - $pos);
00100 }
00101 }
00102 elseif(isset($_SERVER['PHP_SELF']))
00103 {
00104 $parameters = $_SERVER['PHP_SELF'];
00105 }
00106
00107 $ws_dc = new DatasetCreate($uri, $title, $description, $creator, $requester_ip);
00108
00109 $ws_dc->ws_conneg($_SERVER['HTTP_ACCEPT'], $_SERVER['HTTP_ACCEPT_CHARSET'], $_SERVER['HTTP_ACCEPT_ENCODING'],
00110 $_SERVER['HTTP_ACCEPT_LANGUAGE']);
00111
00112 $ws_dc->process();
00113
00114 $ws_dc->ws_respond($ws_dc->ws_serialize());
00115
00116 $mtime = microtime();
00117 $mtime = explode(" ", $mtime);
00118 $mtime = $mtime[1] + $mtime[0];
00119 $endtime = $mtime;
00120 $totaltime = ($endtime - $starttime);
00121
00122 $logger = new Logger("dataset_create", $requester_ip,
00123 "?uri=" . $uri . "&title=" . substr($title, 0, 64) . "&description=" . substr($description, 0, 64) . "&creator="
00124 . $creator . "&requester_ip=$requester_ip", $_SERVER['HTTP_ACCEPT'], $start_datetime, $totaltime,
00125 $ws_dc->pipeline_getResponseHeaderStatus(), $_SERVER['HTTP_USER_AGENT']);
00126
00127
00129
00130 ?>