Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
condition_user_agent_edit_fns.inc
1 <?php
17 require_once SQ_CORE_PACKAGE_PATH.'/system/conditions/condition/condition_edit_fns.inc';
18 
32 {
33 
34 
40  function __construct()
41  {
42  parent::__construct();
43 
44  }//end constructor
45 
46 
58  public static function paintEditInterface(Array $condition_data, Backend_Outputter $o, $prefix, $write_access)
59  {
60  ?>
61  <table style="width: auto" border="0" class="no-borders">
62  <tr>
63  <td><?php echo translate('user_agent_pattern'); ?>: </td>
64  <td>
65  <?php
66  if ($write_access) {
67  text_box($prefix.'[compare]', array_get_index($condition_data, 'user_agent', ''), 30);
68  } else {
69  echo array_get_index($condition_data, 'user_agent', '');
70  }
71  ?>
72  </td>
73  </tr>
74  </table>
75  <?php echo translate('condition_user_agent_is_regular_expression_enabled'); ?>
76  <?php
77 
78  }//end paintEditInterface()
79 
80 
90  public static function processEditInterface(Backend_Outputter $o, $prefix)
91  {
92  // construct and return data required by this condition
93  // as found in the post data, array required consists of
94  // 'match' and 'condition_data'
95  $results = Array(
96  'user_agent' => $_POST[$prefix]['compare'],
97  );
98 
99  return $results;
100 
101  }//end processEditInterface()
102 
103 
104 }//end class
105 
106 ?>