Show
Ignore:
Timestamp:
12/15/2004 04:14:49 PM (7 years ago)
Author:
vieyra
Message:

Added the new user interface, and file select_other.php as an example
Added pow() method to Units class
Added function db_get_plot_single_values() which basically does the same as db_get_plot_values, but for multiple queries
Added "free" plot type to plot.php to make it compatible with the previous interface
Units are assigned it db_get_plot_single_values() for the properties
Broken Materials Categories in select_other.php
Broken Materials Map Selection in select_other.php
I suggest a better Unit handling class, this one is good but is rapidly falling short for our purposes

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/matml/webselector/php/plot.php

    r121 r144  
    9696    $categorization=$categorizations[0]; 
    9797 
     98 
     99 
     100if(isset($_REQUEST["numvars"])){ 
     101  $numvars=$_REQUEST['numvars']; 
     102} 
     103 
     104$matstring = ""; 
     105$property_listx = array(); 
     106$property_listy = array(); 
     107for($i=1;$i<=4;$i++){ 
     108  if(isset($_REQUEST["propname".$i])){ 
     109    $propname[$i]=$_REQUEST['propname'.$i]; 
     110  } 
     111  if(isset($_REQUEST["xpow".$i])){ 
     112    $xpow[$i]=$_REQUEST['xpow'.$i]; 
     113  } 
     114  if(isset($_REQUEST["ypow".$i])){ 
     115    $ypow[$i]=$_REQUEST['ypow'.$i]; 
     116  } 
     117 
     118  if($xpow[$i] != 0){ 
     119    $property_listx["$propname[$i]"] = "$xpow[$i]"; 
     120  } 
     121  if($ypow[$i] != 0){ 
     122    $property_listy["$propname[$i]"] = "$ypow[$i]"; 
     123  } 
     124 
     125} 
     126// print_r($ypow); 
     127// echo "<br><br>"; 
     128// print_r($property_listx); 
     129// echo "<br><br>"; 
     130// print_r($property_listy); 
     131 
     132 
     133 
     134 
    98135//get the values from the database with these function 
    99 list($valuesX, $valuesY, $names, $xlabel, $ylabel, $categories) = db_get_plot_values($plottype, $log, $categorization); 
     136if($plottype == "free") 
     137     list($valuesX, $valuesY, $names, $xlabel, $ylabel, $categories) = db_get_plot_single_values($property_listx, $property_listy, $log, $categorization); 
     138     else 
     139     list($valuesX, $valuesY, $names, $xlabel, $ylabel, $categories) = db_get_plot_values($plottype, $log, $categorization); 
     140 
     141 
     142 
     143// print_r($valuesX); 
     144// echo "<br>"; 
     145// print_r($valuesY); 
     146 
     147// return; 
    100148 
    101149$number_mat = count($names);