/** * Получение инстанции для работы с базой данных * @return joosDatabaseMysqli - объект базы данных */ public static function instance() { // отметка получения инстенции базы данных JDEBUG ? joosDebug::inc('joosDatabaseMysqli::instance()') : null; if (self::$instance === NULL) { $db_config = joosConfig::get('db'); $database = new self($db_config['host'], $db_config['user'], $db_config['password'], $db_config['name']); if ($database->_error_num) { $error_message = $database->_error_msg; joosPages::error_database($error_message); } self::$instance = $database; } return self::$instance; }
<?php } ?> <div class="content"> <?php echo joosDocument::body(); ?> </div> <hr> <footer> <p>© Company 2012</p> </footer> </div> <div id="modal-output"></div> <?php joosDocument::instance()->add_js_file(JPATH_SITE . '/media/js/jquery.js', array('first' => true)); if (joosConfig::get('debug_template')) { joosDocument::instance()->add_js_file(JTEMPLATE_LIVE . '/js/lib/less-1.3.0.min.js'); } joosDocument::instance()->add_js_file(JTEMPLATE_LIVE . '/js/plugins/bootstrap/bootstrap-transition.js')->add_js_file(JTEMPLATE_LIVE . '/js/plugins/bootstrap/bootstrap-alert.js')->add_js_file(JTEMPLATE_LIVE . '/js/plugins/bootstrap/bootstrap-modal.js')->add_js_file(JTEMPLATE_LIVE . '/js/plugins/bootstrap/bootstrap-dropdown.js')->add_js_file(JTEMPLATE_LIVE . '/js/plugins/bootstrap/bootstrap-scrollspy.js')->add_js_file(JTEMPLATE_LIVE . '/js/plugins/bootstrap/bootstrap-tab.js')->add_js_file(JTEMPLATE_LIVE . '/js/plugins/bootstrap/bootstrap-tooltip.js')->add_js_file(JTEMPLATE_LIVE . '/js/plugins/bootstrap/bootstrap-popover.js')->add_js_file(JTEMPLATE_LIVE . '/js/plugins/bootstrap/bootstrap-button.js')->add_js_file(JTEMPLATE_LIVE . '/js/plugins/bootstrap/bootstrap-collapse.js')->add_js_file(JTEMPLATE_LIVE . '/js/plugins/bootstrap/bootstrap-carousel.js')->add_js_file(JTEMPLATE_LIVE . '/js/plugins/bootstrap/bootstrap-typeahead.js')->add_js_file(JTEMPLATE_LIVE . '/js/plugins/bootstrap/bootstrap-typeahead.js')->add_js_file(JTEMPLATE_LIVE . '/js/plugins/bootstrap/bootstrap-datepicker.js')->add_js_file(JTEMPLATE_LIVE . '/js/plugins/jquery.plugins/jquery.noty.js')->add_js_file(JTEMPLATE_LIVE . '/js/app.js'); echo joosDocument::javascript(); ?> </body> </html>
public function order_down_icon2($id, $order) { if ($order == 0) { $img = 'downarrow.png'; $show = true; } elseif ($order < 0) { $img = 'downarrow.png'; $show = true; } else { $img = 'downarrow.png'; $show = true; } if ($show) { $output = '<a href="#ordering" onClick="listItemTask(\'cb' . $id . '\',\'orderdown\')" title="' . _NAV_ORDER_DOWN . '">'; $output .= '<img src="' . joosConfig::get('admin_icons_path') . $img . '" width="12" height="12" border="0" alt="' . _NAV_ORDER_DOWN . '" title="' . _NAV_ORDER_DOWN . '" /></a>'; return $output; } else { return ' '; } }
/** * Простой синглетон для единого коннекта к базе данных * * @return joosDatabasePDO Объект соединений с базой */ public static function instance() { //объект создается однажды if (self::$instance === NULL) { $db = joosConfig::get('db'); joosDatabasePDO::$instance = new joosDatabasePDO($db['host'], $db['user'], $db['password'], $db['name'], $db['charset'], $db['prefix']); } return joosDatabasePDO::$instance; }
public static function render(joosModel $obj, array $element_param, $key, $value, stdClass $values, $option) { return '<img src="' . joosConfig::get('admin_icons_path') . '/cursor_drag_arrow.png" alt="' . 'Переместить' . '" />'; }