public static function getInstance() { if (empty(self::$instance)) { self::$instance = new Ipc_Focus(); } return self::$instance; }
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ require_once "../bootstrap/bootstrap.php"; page_access_level(Filter_Roles::TRANSLATOR_LEVEL); $database_config_user = Database_Config_User::getInstance(); $database_config_bible = Database_Config_Bible::getInstance(); $database_bibles = Database_Bibles::getInstance(); $ipc_focus = Ipc_Focus::getInstance(); @($switchbook = $_GET['switchbook']); @($switchchapter = $_GET['switchchapter']); @($switchverse = $_GET['switchverse']); if (isset($switchbook) && isset($switchchapter)) { $switchbook = Filter_Numeric::integer_in_string($switchbook); $switchchapter = Filter_Numeric::integer_in_string($switchchapter); $verse = 1; if (!isset($switchverse)) { $switchverse = 1; } $ipc_focus->set($switchbook, $switchchapter, $switchverse); Navigation_Passage::recordHistory($switchbook, $switchchapter, $switchverse); } $header = new Assets_Header(Locale_Translate::_("Edit")); $header->setNavigator();
public static function goForward() { $database_navigation = Database_Navigation::getInstance(); $session_logic = Session_Logic::getInstance(); $user = $session_logic->currentUser(); $passage = $database_navigation->getNext($user); if ($passage) { $ipc_focus = Ipc_Focus::getInstance(); $ipc_focus->set($passage[0], $passage[1], $passage[2]); } }