PHP is running as: <?php echo InstallUtilities::whoami(); ?> <br /> <?php if (!function_exists("socket_create")) { echo '<b>Warning</b>: PHP socket extension is not enabled. NewMagellan will not work quite right'; } ?> <br /> <table id="install" border=0 cellspacing=0 cellpadding=4> <?php $register_id_is_mapped = false; $store_id_is_mapped = false; if (is_array(CoreLocal::get('LaneMap'))) { $my_ips = MiscLib::getAllIPs(); $map = CoreLocal::get('LaneMap'); foreach ($my_ips as $ip) { if (!isset($map[$ip])) { continue; } if (!is_array($map[$ip])) { echo '<tr><td colspan="3">Error: invalid entry for ' . $ip . '</td></tr>'; } elseif (!isset($map[$ip]['register_id'])) { echo '<tr><td colspan="3">Error: missing register_id for ' . $ip . '</td></tr>'; } elseif (!isset($map[$ip]['store_id'])) { echo '<tr><td colspan="3">Error: missing store_id for ' . $ip . '</td></tr>'; } else { if (CoreLocal::get('store_id') === '') { // no store_id set. assign based on IP CoreLocal::set('store_id', $map[$ip]['store_id']);
/** Initialize system default values in session. Variables defined here should always exist but won't be reset to these values on a regular basis. */ public static function systemInit() { /** @var standalone indicates whether the server database is available. - 0 => server is available - 1 => server is not available */ CoreLocal::set("standalone", 0); /** @var currentid localtemptrans.trans_id for current cursor position */ CoreLocal::set("currentid", 1); /** @var currenttopid localtemptrans.trans_id for the first item currently shown on screen */ CoreLocal::set("currenttopid", 1); /** @var training Lane is in training mode - 0 => not in training mode - 1 => in training mode */ CoreLocal::set("training", 0); /** @var SNR Scale Not Ready. Set a non-zero value (normally a UPC) to be entered when the scale settles on a weight */ CoreLocal::set("SNR", 0); /** @var weight Currently scale weight (as float) */ CoreLocal::set("weight", 0); /** @var scale Scale has a valid weight - 0 => scale error or settling - 1 => scale settled on weight */ CoreLocal::set("scale", 1); /** @var plainmsg Lines of text to display on main POS screen (pos2.php) that are not part of a transaction. Used for things like messages after signing on or finishing/canceling/suspending a transaction */ CoreLocal::set("plainmsg", ""); /** Load lane and store numbers from LaneMap array if present */ if (is_array(CoreLocal::get('LaneMap'))) { $my_ips = MiscLib::getAllIPs(); foreach ($my_ips as $ip) { if (!isset($map[$ip])) { continue; } if (isset($map[$ip]['register_id']) && isset($map[$ip]['store_id'])) { CoreLocal::set('laneno', $map[$ip]['register_id']); CoreLocal::set('store_id', $map[$ip]['store_id']); } // use first matching IP break; } } }