Changeset 8241 for trunk/MagicSoft/Mars/datacenter/db/builddatasets.php
- Timestamp:
- 01/11/07 12:04:11 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/db/builddatasets.php
r8201 r8241 422 422 printf("1000000000"); 423 423 printf("'>\n"); 424 printf("<img id='allbutton' src='../minus.png' alt='-' onclick='showhide(\"all\")'> <b>Menu</b>\n");425 printf(" <img id='infobutton' src='../plus.png' 426 printf(" <img id='statbutton' src='../plus.png' 427 printf(" <img id='calbutton' src='../plus.png' 428 printf(" <img id='starbutton' src='../plus.png' 429 printf(" <img id=' rangesbutton' src='../plus.png' alt='+' onClick='showhide(\"ranges\")'> Ranges \n");430 printf(" <img id=' limitsbutton' src='../plus.png' alt='+' onClick='showhide(\"limits\")'> Limits \n");424 printf("<img id='allbutton' src='../minus.png' alt='-' onclick='showhide(\"all\")'> <b>Menu</b> \n"); 425 printf(" <img id='infobutton' src='../plus.png' alt='+' onClick='showhide(\"info\");showhide(\"info2\")'> SequInfo \n"); 426 printf(" <img id='statbutton' src='../plus.png' alt='+' onClick='showhide(\"stat\");showhide(\"fail\")'> StatusInfo \n"); 427 printf(" <img id='calbutton' src='../plus.png' alt='+' onClick='showhide(\"cal\")'> CalInfo \n"); 428 printf(" <img id='starbutton' src='../plus.png' alt='+' onClick='showhide(\"star\")'> StarInfo \n"); 429 printf(" <img id='limitsbutton' src='../plus.png' alt='+' onClick='showhide(\"limits\")'> Limits \n"); 430 printf(" <img id='rangesbutton' src='../plus.png' alt='+' onClick='showhide(\"ranges\")'> Ranges \n"); 431 431 432 432 printf(" <div id='all' style='display:block'>"); … … 475 475 printf("<input name='comment' type='hidden' value='%s'>\n", $_POST["comment"]); 476 476 printf("<input name='obsmode' type='hidden' value='%s'>\n", $_POST["fObservationModeKEY"]); 477 printf("<input name='username' type='hidden' value='%s'>\n", $_POST["fUserKEY"]); 477 478 printf("</form>\n"); 478 479 printf("</center>\n"); … … 697 698 $numerr=$numerr+1; 698 699 } 700 if (empty($_POST["fUserKEY"])) 701 { 702 printf("<li style='color:%s'>%s: You have to choose your username.", 703 $color["ERROR"], "ERROR"); 704 $numerr=$numerr+1; 705 } 699 706 if (empty($_POST["name"])) 700 707 { … … 715 722 printf("SequencesOn: %s<br>", $sequon); 716 723 printf("SequencesOff: %s<br>", $sequoff); 717 $insquery[0]="INSERT DataSets SET fDataSetNumber=" . $dataset ;724 $insquery[0]="INSERT DataSets SET fDataSetNumber=" . $dataset . ", fUserKEY=" . $_POST["fUserKEY"]; 718 725 $insquery[0].=", fComment='" . $_POST["comment"] . "', fObservationModeKEY=" . $_POST["fObservationModeKEY"]; 719 726 $insquery[0].=", fDataSetName='" . $_POST["name"] . "', fSourceKEY= " . $realsourcekey; … … 768 775 if (empty($_POST["fObservationModeKEY"]) && !empty($_GET["obsmode"])) 769 776 $_POST["fObservationModeKEY"]=$_GET["obsmode"]; 777 if (empty($_POST["fUserKEY"]) && !empty($_GET["username"])) 778 $_POST["fUserKEY"]=$_GET["username"]; 770 779 printf("Name: <input name='name' type='text' size='20' maxlength='20' value='%s'><br>\n", $_POST["name"]); 771 780 printf("Comment: <input name='comment' type='text' size='50' maxlength='255' value='%s'><br>\n", $_POST["comment"]); … … 782 791 { 783 792 if (!empty($_POST["fObservationModeKEY"]) && $_POST["fObservationModeKEY"]==$row[0]) 793 printf("<option value='%s' selected>%s</option>\n", $row[0], $row[1]); 794 else 795 printf("<option value='%s'>%s</option>\n", $row[0], $row[1]); 796 } 797 printf("</select><br>\n"); 798 mysql_free_result($result); 799 800 $query = "SELECT fUserKEY, fUserName FROM User ORDER BY fUserKEY"; 801 $result = mysql_query($query); 802 if (!$result) 803 printf("-N/A-"); 804 805 $numrows = mysql_num_rows($result); 806 807 printf("UserName <select name='fUserKEY' size='1' class='Width'>\n"); 808 while ($row = mysql_fetch_row($result)) 809 { 810 if (!empty($_POST["fUserKEY"]) && $_POST["fUserKEY"]==$row[0]) 784 811 printf("<option value='%s' selected>%s</option>\n", $row[0], $row[1]); 785 812 else … … 864 891 $siteuser="dcdb"; 865 892 866 if (!isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER']!=$siteuser)893 if (!isset($_SERVER['PHP_AUTH_USER']) || crypt($_SERVER['PHP_AUTH_PW'], $sitepw)!=$sitepw || $_SERVER['PHP_AUTH_USER']!=$siteuser) 867 894 { 868 895 header('WWW-Authenticate: Basic realm="My Realm"'); … … 876 903 // echo "<p>You entered {$_SERVER['PHP_AUTH_PW']} as your password.</p>"; 877 904 // printf("pw: %s", crypt($_SERVER['PHP_AUTH_PW'])); 905 878 906 if (crypt($_SERVER['PHP_AUTH_PW'], $sitepw)!=$sitepw || $_SERVER['PHP_AUTH_USER']!=$siteuser) 879 907 {
Note:
See TracChangeset
for help on using the changeset viewer.