/[libdata]/trunk/admin/include/forms.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/admin/include/forms.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 41 by dpavlin, Fri Dec 5 18:34:18 2003 UTC revision 42 by dpavlin, Thu Mar 4 22:43:50 2004 UTC
# Line 113  function formAssignResFeature($con, $res Line 113  function formAssignResFeature($con, $res
113                  rf.feature_id = f.feature_id ORDER BY feature";                  rf.feature_id = f.feature_id ORDER BY feature";
114    
115          // Fetch the current selections          // Fetch the current selections
116          $rs = mysql_query($sql, $con);          $rs = xx_query($sql, $con);
117          while ($row = mysql_fetch_array ($rs)) {          while ($row = xx_fetch_array ($rs)) {
118                  $feature = $row["feature"];                  $feature = $row["feature"];
119                  $feature_id = $row["feature_id"];                  $feature_id = $row["feature_id"];
120                  printf("<option value = \"%s\">%s</option>", $feature_id, $feature);                  printf("<option value = \"%s\">%s</option>", $feature_id, $feature);
# Line 194  function formAssignResLoc($con, $resourc Line 194  function formAssignResLoc($con, $resourc
194                  rl.location_id = l.location_id ORDER BY location";                  rl.location_id = l.location_id ORDER BY location";
195    
196          // Fetch the values          // Fetch the values
197          $rs = mysql_query($sql, $con);          $rs = xx_query($sql, $con);
198          while ($row = mysql_fetch_array ($rs)) {          while ($row = xx_fetch_array ($rs)) {
199                  $location = $row["location"];                  $location = $row["location"];
200                  $location_id = $row["location_id"];                  $location_id = $row["location_id"];
201                  printf("<option value = \"%s\">%s</option>", $location_id, $location);                  printf("<option value = \"%s\">%s</option>", $location_id, $location);
# Line 275  function formAssignResMastersubject($con Line 275  function formAssignResMastersubject($con
275                  rm.mastersubject_id = m.mastersubject_id ORDER BY mastersubject";                  rm.mastersubject_id = m.mastersubject_id ORDER BY mastersubject";
276    
277          // Fetch the values          // Fetch the values
278          $rs = mysql_query($sql, $con);          $rs = xx_query($sql, $con);
279          while ($row = mysql_fetch_array ($rs)) {          while ($row = xx_fetch_array ($rs)) {
280                  $mastersubject = $row["mastersubject"];                  $mastersubject = $row["mastersubject"];
281                  $mastersubject_id = $row["mastersubject_id"];                  $mastersubject_id = $row["mastersubject_id"];
282                  printf("<option value = \"%s\">%s</option>", $mastersubject_id, $mastersubject);                  printf("<option value = \"%s\">%s</option>", $mastersubject_id, $mastersubject);
# Line 358  function formAssignServLoc($con, $servic Line 358  function formAssignServLoc($con, $servic
358                  sl.location_id = l.location_id ORDER BY location";                  sl.location_id = l.location_id ORDER BY location";
359                    
360          // Fetch the values          // Fetch the values
361          $rs = mysql_query($sql, $con);          $rs = xx_query($sql, $con);
362          while ($row = mysql_fetch_array ($rs)) {          while ($row = xx_fetch_array ($rs)) {
363                  $location = $row["location"];                  $location = $row["location"];
364                  $location_id = $row["location_id"];                  $location_id = $row["location_id"];
365                  printf("<option value = \"%s\">%s</option>", $location_id, $location);                  printf("<option value = \"%s\">%s</option>", $location_id, $location);
# Line 441  function formAssignServServtype($con, $s Line 441  function formAssignServServtype($con, $s
441                  st.servicetype_id = t.servicetype_id ORDER BY servicetype";                  st.servicetype_id = t.servicetype_id ORDER BY servicetype";
442                    
443          // Fetch the values          // Fetch the values
444          $rs = mysql_query($sql, $con);          $rs = xx_query($sql, $con);
445          while ($row = mysql_fetch_array ($rs)) {          while ($row = xx_fetch_array ($rs)) {
446                  $servicetype = $row["servicetype"];                  $servicetype = $row["servicetype"];
447                  $servicetype_id = $row["servicetype_id"];                  $servicetype_id = $row["servicetype_id"];
448                  printf("<option value = \"%s\">%s</option>", $servicetype_id, $servicetype);                  printf("<option value = \"%s\">%s</option>", $servicetype_id, $servicetype);
# Line 525  function formAssignSubCoursesub($con, $s Line 525  function formAssignSubCoursesub($con, $s
525                  sc.coursesub_id = c.coursesub_id ORDER BY coursesub_descr";                  sc.coursesub_id = c.coursesub_id ORDER BY coursesub_descr";
526                    
527          // Fetch the values          // Fetch the values
528          $rs = mysql_query($sql, $con);          $rs = xx_query($sql, $con);
529          while ($row = mysql_fetch_array ($rs)) {          while ($row = xx_fetch_array ($rs)) {
530                  $coursesub = $row["coursesub"];                  $coursesub = $row["coursesub"];
531                  $coursesub_id = $row["coursesub_id"];                  $coursesub_id = $row["coursesub_id"];
532                  $coursesub_descr = $row["coursesub_descr"];                  $coursesub_descr = $row["coursesub_descr"];
# Line 614  function formAssignSubLoc($con, $subject Line 614  function formAssignSubLoc($con, $subject
614                  sl.location_id = l.location_id ORDER BY location";                  sl.location_id = l.location_id ORDER BY location";
615                    
616          // Fetch the values          // Fetch the values
617          $rs = mysql_query($sql, $con);          $rs = xx_query($sql, $con);
618          while ($row = mysql_fetch_array ($rs)) {          while ($row = xx_fetch_array ($rs)) {
619                  $location = $row["location"];                  $location = $row["location"];
620                  $location_id = $row["location_id"];                  $location_id = $row["location_id"];
621                  printf("<option value = \"%s\">%s</option>", $location_id, $location);                  printf("<option value = \"%s\">%s</option>", $location_id, $location);
# Line 697  function formAssignSubMaster($con, $subj Line 697  function formAssignSubMaster($con, $subj
697                  sm.mastersubject_id = m.mastersubject_id ORDER BY mastersubject";                  sm.mastersubject_id = m.mastersubject_id ORDER BY mastersubject";
698                    
699          // Fetch the values          // Fetch the values
700          $rs = mysql_query($sql, $con);          $rs = xx_query($sql, $con);
701          while ($row = mysql_fetch_array ($rs)) {          while ($row = xx_fetch_array ($rs)) {
702                  $mastersubject = $row["mastersubject"];                  $mastersubject = $row["mastersubject"];
703                  $mastersubject_id = $row["mastersubject_id"];                  $mastersubject_id = $row["mastersubject_id"];
704                  printf("<option value = \"%s\">%s</option>", $mastersubject_id, $mastersubject);                  printf("<option value = \"%s\">%s</option>", $mastersubject_id, $mastersubject);
# Line 778  function formAssignSubOtherSub($con, $su Line 778  function formAssignSubOtherSub($con, $su
778                  ORDER BY s.subject";                  ORDER BY s.subject";
779                    
780          // Fetch the values          // Fetch the values
781          $rs = mysql_query($sql, $con);          $rs = xx_query($sql, $con);
782          while ($row = mysql_fetch_array ($rs)) {          while ($row = xx_fetch_array ($rs)) {
783                  $othersub = $row["subject"];                  $othersub = $row["subject"];
784                  $othersub_id = $row["othersub_id"];                  $othersub_id = $row["othersub_id"];
785                                    
# Line 860  function formAssignSubPage($con, $subjec Line 860  function formAssignSubPage($con, $subjec
860                  ORDER BY p.page_title";                  ORDER BY p.page_title";
861                    
862          // Fetch the values          // Fetch the values
863          $rs = mysql_query($sql, $con);          $rs = xx_query($sql, $con);
864          while ($row = mysql_fetch_array ($rs)) {          while ($row = xx_fetch_array ($rs)) {
865                  $page_title = $row["page_title"];                  $page_title = $row["page_title"];
866                  $page_id = $row["page_id"];                  $page_id = $row["page_id"];
867                                    
# Line 947  function formAssignSubStaff($con, $subje Line 947  function formAssignSubStaff($con, $subje
947                  st.staff_id = t.staff_id ORDER BY last_name, first_name";                  st.staff_id = t.staff_id ORDER BY last_name, first_name";
948    
949          // Fetch the values          // Fetch the values
950          $rs = mysql_query($sql, $con);          $rs = xx_query($sql, $con);
951          while ($row = mysql_fetch_array ($rs)) {          while ($row = xx_fetch_array ($rs)) {
952                  $first_name = $row["first_name"];                  $first_name = $row["first_name"];
953                  $last_name = $row["last_name"];                  $last_name = $row["last_name"];
954                  $staff_id = $row["staff_id"];                  $staff_id = $row["staff_id"];
# Line 1030  function formCoursesub($con, $coursesub_ Line 1030  function formCoursesub($con, $coursesub_
1030                  // If the user is editing an existing record, fetch previous values                  // If the user is editing an existing record, fetch previous values
1031                  if ($coursesub_id > 0 && $exists == 1) {                  if ($coursesub_id > 0 && $exists == 1) {
1032                          $sql = "SELECT * FROM coursesub WHERE coursesub_id = " . $coursesub_id;                          $sql = "SELECT * FROM coursesub WHERE coursesub_id = " . $coursesub_id;
1033                          $rs = mysql_query($sql, $con);                          $rs = xx_query($sql, $con);
1034                          $row = mysql_fetch_array ($rs);                          $row = xx_fetch_array ($rs);
1035    
1036                          // Fetch existing values                          // Fetch existing values
1037                          $coursesub_id = $row["coursesub_id"];                          $coursesub_id = $row["coursesub_id"];
# Line 1159  function formEditSingleField($con, $disp Line 1159  function formEditSingleField($con, $disp
1159                          . " = "                          . " = "
1160                          . $key_id;                          . $key_id;
1161                    
1162                  $rs = mysql_query($sql, $con);                  $rs = xx_query($sql, $con);
1163                  $row = mysql_fetch_array($rs);                  $row = xx_fetch_array($rs);
1164                  $oldValue = Trim($row[$display_field]);                  $oldValue = Trim($row[$display_field]);
1165    
1166                  // Table definition                  // Table definition
# Line 1229  function formFaculty($con, $faculty_id){ Line 1229  function formFaculty($con, $faculty_id){
1229                          WHERE                          WHERE
1230                          faculty_id = " . $faculty_id;                          faculty_id = " . $faculty_id;
1231    
1232                  $rs = mysql_query($sql, $con);                  $rs = xx_query($sql, $con);
1233                  $row = mysql_fetch_array($rs);                  $row = xx_fetch_array($rs);
1234                                    
1235                  // Fetch results                  // Fetch results
1236                  $faculty_firstname = Trim($row["faculty_firstname"]);                  $faculty_firstname = Trim($row["faculty_firstname"]);
# Line 1335  function formFeature($con, $key_id) { Line 1335  function formFeature($con, $key_id) {
1335                    
1336                  // Fetch existing values                          // Fetch existing values        
1337                  $sql = "SELECT * FROM feature WHERE feature_id = " . $key_id;                  $sql = "SELECT * FROM feature WHERE feature_id = " . $key_id;
1338                  $rs = mysql_query($sql, $con);                  $rs = xx_query($sql, $con);
1339                  $row = mysql_fetch_array ($rs);                  $row = xx_fetch_array ($rs);
1340                  $feature_id = $row["feature_id"];                  $feature_id = $row["feature_id"];
1341                  $feature = $row["feature"];                  $feature = $row["feature"];
1342                  $image_path = $row["image_path"];                  $image_path = $row["image_path"];
# Line 1449  function formInfotype($con, $key_id) { Line 1449  function formInfotype($con, $key_id) {
1449    
1450                  // Fetch existing values                          // Fetch existing values        
1451                  $sql = "SELECT * from infotype where infotype_id = " . $key_id;                  $sql = "SELECT * from infotype where infotype_id = " . $key_id;
1452                  $rs = mysql_query($sql, $con);                  $rs = xx_query($sql, $con);
1453                  $row = mysql_fetch_array ($rs);                  $row = xx_fetch_array ($rs);
1454                  $infotype_id = $row["infotype_id"];                  $infotype_id = $row["infotype_id"];
1455                  $infotype = $row["infotype"];                  $infotype = $row["infotype"];
1456                  $masterinfotype_id = $row["masterinfotype_id"];                  $masterinfotype_id = $row["masterinfotype_id"];
# Line 1577  function formLocation($con, $key_id) { Line 1577  function formLocation($con, $key_id) {
1577    
1578                  // Fetch existing values                  // Fetch existing values
1579                  $sql = "SELECT * from location where location_id = " . $key_id;                  $sql = "SELECT * from location where location_id = " . $key_id;
1580                  $rs = mysql_query($sql, $con);                  $rs = xx_query($sql, $con);
1581                  $row = mysql_fetch_array ($rs);                  $row = xx_fetch_array ($rs);
1582                  $location_id = $row["location_id"];                  $location_id = $row["location_id"];
1583                  $location = $row["location"];                  $location = $row["location"];
1584                  $location_descr = $row["location_descr"];                  $location_descr = $row["location_descr"];
# Line 1853  function formResource($con, $key_id, $ma Line 1853  function formResource($con, $key_id, $ma
1853                  if ($key_id > 0 && $exists == 1) {                  if ($key_id > 0 && $exists == 1) {
1854                                    
1855                          $sql = "SELECT * from resource where resource_id = " . $key_id;                          $sql = "SELECT * from resource where resource_id = " . $key_id;
1856                          $rs = mysql_query($sql, $con);                          $rs = xx_query($sql, $con);
1857                          $row = mysql_fetch_array ($rs);                          $row = xx_fetch_array ($rs);
1858    
1859                          // Fetch existing values                          // Fetch existing values
1860                          $resource_id = $row["resource_id"];                          $resource_id = $row["resource_id"];
# Line 2171  function formService($con, $key_id) { Line 2171  function formService($con, $key_id) {
2171    
2172                  // Fetch existing values                  // Fetch existing values
2173                  $sql = "SELECT * from service where service_id = " . $key_id;                  $sql = "SELECT * from service where service_id = " . $key_id;
2174                  $rs = mysql_query($sql, $con);                  $rs = xx_query($sql, $con);
2175                  $row = mysql_fetch_array ($rs);                  $row = xx_fetch_array ($rs);
2176                  $service_id = $row["service_id"];                  $service_id = $row["service_id"];
2177                  $service = $row["service"];                  $service = $row["service"];
2178                  $serviceURL = $row["serviceURL"];                  $serviceURL = $row["serviceURL"];
# Line 2367  function formStyle($con, $key_id) { Line 2367  function formStyle($con, $key_id) {
2367                    
2368                  // Fetch existing values                          // Fetch existing values        
2369                  $sql = "SELECT * from style where style_id = " . $key_id;                  $sql = "SELECT * from style where style_id = " . $key_id;
2370                  $rs = mysql_query($sql, $con);                  $rs = xx_query($sql, $con);
2371                  $row = mysql_fetch_array ($rs);                  $row = xx_fetch_array ($rs);
2372                  $style_id = $row["style_id"];                  $style_id = $row["style_id"];
2373                  $style_title = $row["style_title"];                  $style_title = $row["style_title"];
2374                  $header_file = $row["header_file"];                  $header_file = $row["header_file"];
# Line 2486  function formSubject($con, $key_id) { Line 2486  function formSubject($con, $key_id) {
2486                    
2487                  // If the user is editing an existing record, fetch previous values                  // If the user is editing an existing record, fetch previous values
2488                  $sql = "SELECT * from subject where subject_id = " . $key_id;                  $sql = "SELECT * from subject where subject_id = " . $key_id;
2489                  $rs = mysql_query($sql, $con);                  $rs = xx_query($sql, $con);
2490                  $row = mysql_fetch_array ($rs);                  $row = xx_fetch_array ($rs);
2491    
2492                  // Fetch existing values                  // Fetch existing values
2493                  $subject_id = $row["subject_id"];                  $subject_id = $row["subject_id"];
# Line 2650  function formAssignLibunitStaff($con, $l Line 2650  function formAssignLibunitStaff($con, $l
2650                  ORDER BY last_name, first_name";                  ORDER BY last_name, first_name";
2651    
2652          // Fetch the values          // Fetch the values
2653          $rs = mysql_query($sql, $con);          $rs = xx_query($sql, $con);
2654          while ($row = mysql_fetch_array ($rs)) {          while ($row = xx_fetch_array ($rs)) {
2655                  $first_name = $row["first_name"];                  $first_name = $row["first_name"];
2656                  $last_name = $row["last_name"];                  $last_name = $row["last_name"];
2657                  $staff_id = $row["staff_id"];                  $staff_id = $row["staff_id"];
# Line 2734  function formAssignStaffLibunit($con, $s Line 2734  function formAssignStaffLibunit($con, $s
2734                  ORDER BY l.libunit";                  ORDER BY l.libunit";
2735                    
2736          // Fetch the values          // Fetch the values
2737          $rs = mysql_query($sql, $con);          $rs = xx_query($sql, $con);
2738          while ($row = mysql_fetch_array ($rs)) {          while ($row = xx_fetch_array ($rs)) {
2739                  $libunit = $row["libunit"];                  $libunit = $row["libunit"];
2740                  $libunit_id = $row["libunit_id"];                  $libunit_id = $row["libunit_id"];
2741                  printf("<option value = \"%s\">%s</option>", $libunit_id, $libunit);                  printf("<option value = \"%s\">%s</option>", $libunit_id, $libunit);
# Line 2817  function formAssignStaffSub($con, $staff Line 2817  function formAssignStaffSub($con, $staff
2817                  ORDER BY s.subject";                  ORDER BY s.subject";
2818                    
2819          // Fetch the values          // Fetch the values
2820          $rs = mysql_query($sql, $con);          $rs = xx_query($sql, $con);
2821          while ($row = mysql_fetch_array ($rs)) {          while ($row = xx_fetch_array ($rs)) {
2822                  $subject = $row["subject"];                  $subject = $row["subject"];
2823                  $subject_id = $row["subject_id"];                  $subject_id = $row["subject_id"];
2824                  printf("<option value = \"%s\">%s</option>\n", $subject_id, $subject);                  printf("<option value = \"%s\">%s</option>\n", $subject_id, $subject);
# Line 2863  function formLibunit($con, $key_id){ Line 2863  function formLibunit($con, $key_id){
2863                          WHERE                          WHERE
2864                          libunit_id = " . $libunit_id;                          libunit_id = " . $libunit_id;
2865    
2866                  $rs = mysql_query($sql, $con);                  $rs = xx_query($sql, $con);
2867                  $row = mysql_fetch_array($rs);                  $row = xx_fetch_array($rs);
2868                                    
2869                  // Fetch values                  // Fetch values
2870                  $libunit = Trim($row["libunit"]);                  $libunit = Trim($row["libunit"]);
# Line 3014  function formPassword($con, $staff_id){ Line 3014  function formPassword($con, $staff_id){
3014                  FROM staff s                  FROM staff s
3015                  WHERE s.password IS NOT NULL and staff_id = " . $staff_id;                  WHERE s.password IS NOT NULL and staff_id = " . $staff_id;
3016    
3017          $rs = mysql_query($sql, $con);          $rs = xx_query($sql, $con);
3018          $row = mysql_fetch_array($rs);          $row = xx_fetch_array($rs);
3019    
3020          // Fetch values          // Fetch values
3021          $pass_set = Trim($row["pass_set"]);          $pass_set = Trim($row["pass_set"]);
# Line 3095  function formStaff($con, $staff_id){ Line 3095  function formStaff($con, $staff_id){
3095                          s.stafftitle_id = t.stafftitle_id AND                          s.stafftitle_id = t.stafftitle_id AND
3096                          staff_id=" . $staff_id;                          staff_id=" . $staff_id;
3097    
3098                  $rs = mysql_query($sql, $con);                  $rs = xx_query($sql, $con);
3099                  $row = mysql_fetch_array($rs);                  $row = xx_fetch_array($rs);
3100                                    
3101                  // Fetch results                  // Fetch results
3102                  $first_name = Trim($row["first_name"]);                  $first_name = Trim($row["first_name"]);

Legend:
Removed from v.41  
changed lines
  Added in v.42

  ViewVC Help
Powered by ViewVC 1.1.26