17 require_once SQ_INCLUDE_PATH.
'/asset_edit/asset_edit_fns.inc';
57 $version_selected = ($asset->attr(
'version') !=
'none');
58 $location = $asset->attr(
'location');
59 $location_entered = !empty($location);
61 if ($version_selected && $location_entered) {
62 $ipb =& $asset->getIpbConn();
63 if (!is_null($ipb) && $ipb->isConnected()) {
64 echo
'<span style="color: green"><b>'.translate(
'ipb_connected').
'</b></span>';
66 echo
'<span style="color: red"><b>'.translate(
'ipb_unable_to_connect').
'</b></span>';
69 echo
'<span style="color: red"><b>'.translate(
'ipb_setup_note').
'</b></span>';
105 $ipb =& $asset->getIpbConn();
107 if (!is_null($ipb) && $ipb->isConnected()) {
108 $url = $ipb->getIpbURL();
110 $o->openSection(translate(
'warning'));
111 $o->openField(translate(
'url'));
112 echo translate(
'ipb_site_url_not_set');
117 <script language=
"JavaScript">
118 window.location=
"<?php echo $ipb->getIpbURL(); ?>";
123 $o->openSection(translate(
'warning'));
124 $o->openField(translate(
'connection'));
125 echo translate(
'failed');
163 $wa = $asset->writeAccess(
'attributes');
164 $location = $asset->attr(
'location');
166 $o->openField(
'Location');
167 text_box($prefix.
'_location', $location,
'100',
'100');
168 echo
'<br />The full path of Invision Power Board';
171 $o->openField(
'Location');
172 if (empty($location)) {
196 $wa = $asset->writeAccess(
'attributes');
199 $location = trim($_POST[$prefix.
'_location']);
200 if (!empty($location)) {
202 if ($asset->attr(
'version') ==
'3_0_2') {
203 $needed_files = Array(
205 '/ips_kernel/classDbMysql.php',
206 '/admin/sources/base/ipsRegistry.php',
209 $needed_files = Array(
211 '/ips_kernel/class_db_mysql.php',
212 '/ips_kernel/class_converge.php',
216 if (is_dir($location)) {
217 foreach ($needed_files as $file) {
218 if (!is_file($location.$file)) {
219 trigger_localised_error(
'IPB0002', E_USER_WARNING, $location.$file);
220 $asset->setAttrValue(
'location',
'');
224 $asset->setAttrValue(
'location', $location);
227 trigger_localised_error(
'IPB0001', E_USER_WARNING, $location);