Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
condition_server_variable_edit_fns.inc
1 <?php
17 require_once SQ_CORE_PACKAGE_PATH.'/system/conditions/condition/condition_edit_fns.inc';
18 require_once SQ_ATTRIBUTES_PATH.'/selection/selection.inc';
19 
33 {
34 
35 
41  function __construct()
42  {
43  parent::__construct();
44 
45  }//end constructor
46 
47 
59  public static function paintEditInterface(Array $condition_data, Backend_Outputter $o, $prefix, $write_access)
60  {
61  ?>
62  <table style="width: auto" class="no-borders">
63  <tr>
64  <td><?php echo translate('server_variable'); ?>: </td>
65  <td>
66  <?php
67  if ($write_access) {
68  text_box($prefix.'[server_variable]', array_get_index($condition_data, 'server_variable', ''), 30);
69  } else {
70  echo array_get_index($condition_data, 'server_variable', '');
71  }
72  ?>
73  </td>
74  </tr>
75  <tr>
76  <td><?php echo translate('pattern'); ?>: </td>
77  <td>
78  <?php
79  if ($write_access) {
80  text_box($prefix.'[server_variable_match]', array_get_index($condition_data, 'server_variable_match'), 30);
81  } else {
82  echo array_get_index($condition_data, 'server_variable_match', '');
83  }
84  ?>
85  </td>
86  </tr>
87  </table>
88  <?php echo translate('condition_server_variable_is_regular_expression_enabled'); ?>
89  <?php
90 
91  }//end paintEditInterface()
92 
93 
103  public static function processEditInterface(Backend_Outputter $o, $prefix)
104  {
105  $results = Array(
106  'server_variable' => $_POST[$prefix]['server_variable'],
107  'server_variable_match' => $_POST[$prefix]['server_variable_match'],
108  );
109  return $results;
110 
111  }//end processEditInterface()
112 
113 
114 }//end class
115 
116 ?>