Changeset 19097 for trunk/www/dch
- Timestamp:
- 07/30/18 19:58:21 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/dch/download.php
r19060 r19097 35 35 36 36 $times=array( 37 "timestamp" => "timestamp ",38 "unix" => "unix time",39 "mjd" => " MJD",37 "timestamp" => "timestamp [YYYY-MM-DD HH:MM:SS]", 38 "unix" => "unix-timestamp [seconds]", 39 "mjd" => "modified julian date [days]", 40 40 ); 41 41 … … 103 103 // get/define initial values 104 104 105 if (!empty($_GET["dch"])) 106 $dch=$_GET["dch"]; 105 if (!empty($_POST["start"])) 106 $start=$_POST["start"]; 107 108 if (!empty($_POST["stop"])) 109 $stop=$_POST["stop"]; 110 111 if (!empty($_POST["dch"])) 112 $dch=$_POST["dch"]; 107 113 else 108 114 $dch="novalue"; 109 115 110 if (!empty($_ GET["dust"]))111 $dust=$_ GET["dust"];116 if (!empty($_POST["dust"])) 117 $dust=$_POST["dust"]; 112 118 else 113 119 $dust="novalue"; 114 120 115 121 if (!empty($_GET["expert"])) 116 $expert=$_GET["expert"]; 122 $_POST["expert"]=$_GET["expert"]; 123 124 if (!empty($_POST["expert"])) 125 $expert=$_POST["expert"]; 117 126 else 118 127 $expert="no"; 119 128 120 if (!empty($_ GET["email"]))121 $email=$_ GET["email"];129 if (!empty($_POST["email"])) 130 $email=$_POST["email"]; 122 131 else 123 132 $email=""; 124 133 125 if (!empty($_ GET["light"]))126 $light=$_ GET["light"];134 if (!empty($_POST["light"])) 135 $light=$_POST["light"]; 127 136 else 128 137 $light="novalue"; 129 138 130 if (!empty($_ GET["source"]))131 $source=$_ GET["source"];139 if (!empty($_POST["source"])) 140 $source=$_POST["source"]; 132 141 else 133 142 $source=-1; 134 143 135 if (!empty($_ GET["timebin"]))136 $timebin=$_ GET["timebin"];144 if (!empty($_POST["timebin"])) 145 $timebin=$_POST["timebin"]; 137 146 else 138 147 $timebin="novalue"; 139 148 140 if (!empty($_ GET["time"]))141 $time=$_ GET["time"];149 if (!empty($_POST["time"])) 150 $time=$_POST["time"]; 142 151 else 143 152 $time="novalue"; 144 153 145 if (!empty($_ GET["table"]))146 $table=$_ GET["table"];154 if (!empty($_POST["table"])) 155 $table=$_POST["table"]; 147 156 else 148 157 $table="AnalysisResultsRunLP"; 149 158 150 if (!empty($_ GET["th"]))151 $th=$_ GET["th"];159 if (!empty($_POST["th"])) 160 $th=$_POST["th"]; 152 161 else 153 162 $th="novalue"; 154 163 155 if (!empty($_ GET["zd"]))156 $zd=$_ GET["zd"];164 if (!empty($_POST["zd"])) 165 $zd=$_POST["zd"]; 157 166 else 158 167 $zd="novalue"; … … 180 189 else 181 190 { 182 echo "<b>Using data from the FACT Quick Look Analysis, you agree to cite the ";183 echo "<a target='_blank' href='http://iopscience.iop.org/1748-0221/8/06/P06008'>FACT design paper</a>\n ";184 echo "and the <a target='_blank' href='https://fact-project.org/monitoring'>quick look analysis</a>.</b>\n";191 echo "<b>Using data from the FACT Quick Look Analysis, you agree to cite the FACT design paper (H. Anderhub et al. JINST 8 P6008) "; 192 // echo "<a target='_blank' href='http://iopscience.iop.org/1748-0221/8/06/P06008'>FACT design paper</a>\n "; 193 echo "and the quick look analysis (https://fact-project.org/monitoring).</b>\n"; 185 194 echo "<br><br>\n \n "; 186 195 echo "<u>References:</u>\n"; … … 201 210 202 211 //echo "<hr>\n"; 203 echo "<form name='formular' action='download.php' METHOD=' GET'>\n";204 205 //$query="SELECT fSourceKey, fSourceName, (SELECT COUNT(*) FROM ".$_ GET["table"]." LEFT JOIN RunInfo USING(fNight, fRunID) WHERE fRunTypeKey=1 AND RunInfo.fSourceKey=Source.fSourceKey) AS num FROM Source WHERE fSourceTypeKey=1";212 echo "<form name='formular' action='download.php' METHOD='POST'>\n"; 213 214 //$query="SELECT fSourceKey, fSourceName, (SELECT COUNT(*) FROM ".$_POST["table"]." LEFT JOIN RunInfo USING(fNight, fRunID) WHERE fRunTypeKey=1 AND RunInfo.fSourceKey=Source.fSourceKey) AS num FROM Source WHERE fSourceTypeKey=1"; 206 215 $query="SELECT fSourceKey, fSourceName, COUNT(*) AS num FROM RunInfo LEFT JOIN Source USING(fSourceKey) WHERE fSourceTypeKey=1 AND fRunTypeKey=1 GROUP BY fSourceKey ORDER BY num DESC"; 207 216 //echo $query."<br>"; … … 213 222 mysql_free_result($result); 214 223 215 //$query="SELECT Min(fNight), Max(fNight) FROM ".$_ GET["table"];224 //$query="SELECT Min(fNight), Max(fNight) FROM ".$_POST["table"]; 216 225 $query="SELECT Min(fNight), Max(fNight) FROM RunInfo"; 217 226 //echo $query."<br>"; … … 239 248 print_popup("Please provide an email address."); 240 249 241 242 if (strpos($email, "@")!= false && $source>0) 250 if (empty($_POST["emailcopy"])) 251 print_popup("Please agree that a copy of the email is stored."); 252 253 254 if (strpos($email, "@")!= false && $source>0 && !empty($_POST["emailcopy"])) 243 255 { 244 256 //echo "<h2>Sending data...</h2>\n"; … … 249 261 $sent=shell_exec("/users/fact/SW.automatic.processing/DataCheck/Tools/get_data.sh ".$start." ".$stop." ".$source." ".$timebin." ".$email." ".$table." ".$time." ".$expert." ".$dch." ".$zd." ".$th." ".$light." ".$dust); 250 262 echo $sent; 251 // use other return information 252 } 253 263 if (!empty($_POST["newsletter"])) 264 { 265 $query_interested="SELECT * FROM memberlist.interested WHERE email='".$email."'"; 266 $result_interested=mysql_query($query_interested); 267 //echo "num rows: ".mysql_num_rows($result_interested)."<br>\n"; 268 //while ($row = mysql_fetch_row($result_interested)) 269 // echo $row[0]." ".$row[1]." ".$row[2]." ".$row[3]."<br>\n"; 270 if (mysql_num_rows($result_interested)>0) 271 $query_interested="UPDATE "; 272 else 273 $query_interested="INSERT "; 274 $query_interested.=" memberlist.interested SET date=NOW(), email='".$email."'"; 275 if (mysql_num_rows($result_interested)>0) 276 $query_interested.=" WHERE email='".$email."'"; 277 //echo $query_interested; 278 mysql_free_result($result_interested); 279 $result_interested=mysql_query($query_interested); 280 if ($maintenance) 281 echo "num affected rows: ".mysql_affected_rows()."<br>\n"; 282 } 283 } 284 285 //#DFE6FA #CDD7F4 286 echo "<br>\n<div style='background-color: #DFE6FA; padding-left: 20px; padding-right: 20px; padding-top: 1px; padding-bottom: 10px; border: 3px solid #394979; border-radius: 20px'>\n"; 254 287 echo "<h2>Select here the settings for your data sample:</h2>\n"; 255 288 … … 267 300 printf("<option value='%s'>%s</option>\n", $key, $sourcename); 268 301 } 269 echo "</select> \n";302 echo "</select><sup>*</sup>\n"; 270 303 271 304 // Time Format … … 282 315 printf("<option value='%s'>%s</option>\n", $key, $name); 283 316 } 284 echo "</select> \n ";317 echo "</select><sup>*</sup>\n "; 285 318 286 319 // Binning … … 299 332 printf("<option value='%s'>%s</option>\n", $key, $name); 300 333 } 301 echo "</select> \n";334 echo "</select><sup>*</sup>\n"; 302 335 echo "<br>\n"; 303 336 … … 404 437 405 438 echo "Provide your email address to receive the data: \n"; 406 printf("<input name='email' type='text' size='20' maxlength='50' value='%s'>\n<br>\n", $email); 407 408 echo "Clicking on the button, you agree to the data usage policy: \n"; 409 echo "<input class='Width' type='button' value='Send data by Email' onClick='submit()'><br>\n"; 410 439 printf("<input name='email' type='text' size='20' maxlength='50' value='%s'><sup>*</sup>\n<br>\n", $email); 440 441 if (empty($_POST["emailcopy"])) 442 echo "<input type='checkbox' name='emailcopy'><sup>*</sup> I agree that a copy of the email is stored for the statistical evaluation of data requests.<br>\n"; 443 else 444 echo "<input type='checkbox' name='emailcopy' checked><sup>*</sup> I agree that a copy of the email is stored for the statistical evaluation of data requests.<br>\n"; 445 if (empty($_POST["newsletter"])) 446 echo "<input type='checkbox' name='newsletter'> I would like to receive updates on the data and agree that my email address is stored for this purpose.<br><br>\n"; 447 else 448 echo "<input type='checkbox' name='newsletter' checked> I would like to receive updates on the data and agree that my email address is stored for this purpose.<br><br>\n"; 449 450 echo "Clicking on the button, you agree to the data usage policy: <br><br>\n"; 451 //echo "Clicking on the button, you agree to the data usage policy and that a copy of my email is stored: <br><br>\n"; 452 echo "<input type='button' style='width: 250px; height: 40px; font-size: 22px; ' value='Send data by Email' onClick='submit()'><br>\n"; 453 //border: 3px solid #394979; border-radius: 10px 454 echo "<sup>*</sup> required<br>\n"; 411 455 412 456 413 457 echo "</form>\n"; 458 echo "</div>\n"; 459 //echo " * required<br>\n"; 414 460 415 461 echo "<h2>Remarks:</h2> "; … … 419 465 { 420 466 echo "<ul>\n"; 421 echo "<li>The correction formula to correct the excess rate for the effects of zd and threshold arenot yet final.</li>\n";467 echo "<li>The correction formula to correct the excess rate for the effects of zd and threshold is not yet final.</li>\n"; 422 468 echo "<li>The CU conversion is currently only valid for QLA and until summer 2016.</li>\n"; 423 469 echo "<li>The data quality selection based on the artificial trigger rate R750 might not work for all data (effect of lidar).</li>\n"; … … 450 496 451 497 echo "<h2>Contact</h2>"; 452 echo " Daniela Dorner <i>dorner<at>astro.uni-wuerzburg.de</i><br>";498 echo "<i>qla<at>fact-project.org</i><br>"; 453 499 //echo "You acknowledge these regulations by clicking on the 'Show' button.</b></big> <br><br><br>"; 454 500
Note:
See TracChangeset
for help on using the changeset viewer.