Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
sharepoint_connector_edit_fns.inc
1 <?php
18 require_once SQ_INCLUDE_PATH.'/asset_edit/asset_edit_fns.inc';
19 
32 {
33 
34 
39  function __construct()
40  {
41  parent::__construct();
42 
43  }//end constructor
44 
45 
56  function paintTestConnection(&$asset, &$o, $prefix)
57  {
58  $wa = $asset->writeAccess('attributes');
59  $o->openField('Connection Status');
60  require_once SQ_PACKAGES_PATH.'/sharepoint/lib/sharepoint_common.inc';
61  $connection = Array (
62  'url' => $asset->attr('url'),
63  'authentication' => Array (
64  'login' => $asset->attr('username'),
65  'password' => $asset->attr('password'),
66  ),
67  );
68 
69  $valid = FALSE;
70  if (!empty($connection['url'])) {
72  }//end if
73 
74  if ($valid) {
75  echo '<span style="color:green;font-weight:bold">Connected</span>';
76  } else {
77  echo '<span style="color:red;font-weight:bold">Not Connected</span>';
78  }//end if
79  $o->closeField();
80 
81  return $wa;
82 
83  }//end paintTestConnection()
84 
85 
96  function processTestConnection(&$asset, &$o, $prefix)
97  {
98  return FALSE;
99  }//end processTestConnection()
100 
101 }//end class
102 ?>