public function draw() { $this->currentPage->uniforma(); $gui = new GUI(); $gui->init($this->currentPage); $gui->draw($this->currentPage->data["template"]); }
$GLOBALS['smarty']->debugging = false; //Initialize language $GLOBALS['language'] = Language::getInstance(); //Initialize hooks $GLOBALS['hooks'] = HookLoader::getInstance(); //Initialize SEO $GLOBALS['seo'] = SEO::getInstance(); if (isset($_GET['seo_path']) && !empty($_GET['seo_path'])) { $_GET['seo_path'] = preg_replace('/(\\/\\~[a-z0-9]{1,}\\/)/', '', $_GET['seo_path']); // Remove /~username/ from seo_path $GLOBALS['seo']->getItem($_GET['seo_path']); } //Initialize SSL $GLOBALS['ssl'] = SSL::getInstance(); //Initialize GUI $GLOBALS['gui'] = GUI::getInstance(); //Initialize Taxes $GLOBALS['tax'] = Tax::getInstance(); //Initialize catalogue $GLOBALS['catalogue'] = Catalogue::getInstance(); //Initialize cubecart $GLOBALS['cubecart'] = Cubecart::getInstance(); //Initialize user $GLOBALS['user'] = User::getInstance(); //Initialize cart $GLOBALS['cart'] = Cart::getInstance(); // Set store timezone - default to UTC date_default_timezone_set($GLOBALS['config']->get('config', 'time_zone') ? $GLOBALS['config']->get('config', 'time_zone') : 'UTC'); if ($GLOBALS['config']->get('config', 'recaptcha') && !$GLOBALS['session']->get('confirmed', 'recaptcha')) { $recaptcha['error'] = null; $recaptcha['confirmed'] = false;
public function paintGUI() { $gm = new GUIContainer("Correcto", $this->ABMCorrecto['mensaje']); $ui = new GUI("Titulo"); $ui->addComponent(GUIAreas::CONTENT, $gm); $ui->draw(); }
/** * Setup the instance (singleton) * * @param bool * @return GUI */ public static function getInstance($admin = false) { if (!self::$_instance instanceof self) { self::$_instance = new self($admin); } return self::$_instance; }
$GLOBALS['session'] = Session::getInstance(); //Check security token Sanitize::checkToken(); // Initialize Smarty $GLOBALS['smarty'] = new Smarty(); $GLOBALS['smarty']->muteExpectedErrors(); $GLOBALS['smarty']->error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING; $GLOBALS['smarty']->compile_dir = CC_SKIN_CACHE_DIR; $GLOBALS['smarty']->config_dir = CC_SKIN_CACHE_DIR; $GLOBALS['smarty']->cache_dir = CC_SKIN_CACHE_DIR; //Initialize language $GLOBALS['language'] = Language::getInstance(); //Initialize hooks $GLOBALS['hooks'] = HookLoader::getInstance(); //Initialize GUI $GLOBALS['gui'] = GUI::getInstance(true); //Initialize SSL $GLOBALS['ssl'] = SSL::getInstance(); //Initialize SEO $GLOBALS['seo'] = SEO::getInstance(); //Setup language template $GLOBALS['language']->setTemplate(); //Initialize Catalogue $GLOBALS['catalogue'] = Catalogue::getInstance(); // Define the default timezone $tz = $GLOBALS['config']->get('config', 'time_zone'); date_default_timezone_set(!empty($tz) ? $tz : 'UTC'); $GLOBALS['main'] = ACP::getInstance(); $lang = $GLOBALS['language']->getLanguageStrings(); $global_template_file['session_true'] = 'main.php'; $global_template_file['session_false'] = 'login.php';
/** * Display a wizard where they can enter a new view */ function doWizardCreate($msg = '') { global $data, $misc; global $lang; $tables = $data->getTables(true); $misc->printTrail('schema'); $misc->printTitle($lang['strcreateviewwiz'], 'pg.view.create'); $misc->printMsg($msg); echo "<form action=\"views.php\" method=\"post\">\n"; echo "<table>\n"; echo "<tr><th class=\"data\">{$lang['strtables']}</th></tr>"; echo "<tr>\n<td class=\"data1\">\n"; $arrTables = array(); while (!$tables->EOF) { $arrTmp = array(); $arrTmp['schemaname'] = $tables->fields['nspname']; $arrTmp['tablename'] = $tables->fields['relname']; $arrTables[$tables->fields['nspname'] . '.' . $tables->fields['relname']] = serialize($arrTmp); $tables->moveNext(); } echo GUI::printCombo($arrTables, 'formTables[]', false, '', true); echo "</td>\n</tr>\n"; echo "</table>\n"; echo "<p><input type=\"hidden\" name=\"action\" value=\"set_params_create\" />\n"; echo $misc->form; echo "<input type=\"submit\" value=\"{$lang['strnext']}\" />\n"; echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" /></p>\n"; echo "</form>\n"; }
/** * Create a screen for migrating (copying) layers * * @return string */ public static function createMigrationScreen() { $result = ""; $layers = DML::getLayers(); $layers = array_combine($layers, $layers); $result .= sprintf("<form accept-charset=\"utf-8\" method=\"POST\" action=\"%s?action=migrate\">\n", $_SERVER["PHP_SELF"]); $result .= sprintf("<p>Copy from %s to %s <button type=\"submit\">Copy</button></p>\n", GUI::createSelect("from", $layers), GUI::createSelect("to", $layers)); $result .= sprintf("<p>Warning: copying contents will overwrite any old data in the destination layer</p>\n"); $result .= "</form>\n"; return $result; }
public function paintGUI() { $ui = new GUI("Alta de usuario | DJMe"); $ui->addComponent(GUIAreas::CONTENT, $this->getFormAlta()); $ui->draw(); }
*/ /** * PorPOISe Dashboard authorization check * * @package PorPOISe * @subpackage Dashboard */ /* start session */ session_start(); /* generate session key */ $_sessionKey = md5(__FILE__); /* check for login attempt */ if (!empty($_REQUEST["username"])) { if (DML::validCredentials($_REQUEST["username"], $_REQUEST["password"])) { $_SESSION[$_sessionKey]["loggedIn"] = TRUE; } else { $_SESSION[$_sessionKey]["loggedIn"] = FALSE; GUI::printError("Invalid username or password"); } } /* check for logout attempt */ if (!empty($_REQUEST["logout"]) && $_REQUEST["logout"]) { $_SESSION[$_sessionKey]["loggedIn"] = FALSE; } /* check for logged in status */ if (empty($_SESSION[$_sessionKey]["loggedIn"]) || !$_SESSION[$_sessionKey]["loggedIn"]) { /* not logged in */ GUI::printMessage("%s", GUI::createLoginScreen()); exit; } /* logged in, fall through to rest of site */
public function paintGUI() { $ui = new GUI("Modificacion de usuario | DJMe"); $ui->addComponent(GUIAreas::CONTENT, $this->formulario); $ui->draw(); }
// Бесконечность; set_time_limit(0); // Подключение основных функций; include $_SERVER['DOCUMENT_ROOT'] . '/systems/content.php'; // Подключение к базе данных; include $_SERVER['DOCUMENT_ROOT'] . '/systems/connect.php'; // Создание объекта MySQL; $db_shop = new MySQL(); $db_shop->connect($db_shop_host, $db_shop_name, $db_shop_user, $db_shop_password); // Подключаем основной GUI класс; include $_SERVER['DOCUMENT_ROOT'] . '/gui_classes.php'; // Ищем в базе магазин нужный для обновления данных о магазине; $sql = "SELECT * FROM `shops_updates` WHERE `status` = 1"; $temp_update_array = $db_shop->all($sql); // В зависимости от типа загуржаемых данных, мы будем по разному вести сбор данных для загрузки или обновления товаров; $gui = new GUI(); foreach ($temp_update_array as $updates_array) { // ID магазина; $shop_id = $updates_array['shop_id']; // Тип загрузки; $file_type = $updates_array['file_type']; // JSON URL; $data_url = $updates_array['data_url']; // Префикс перед ссылкой на изображение; $image_url_prefix = $updates_array['image_url_prefix']; // Комиссия к товарам по умолчанияю; $goods_comission = $updates_array['comission']; // Минимальное количество для импорта товара; $goods_min_count = $updates_array['min_count']; // Установить маркер АКЦИЯ?; $goods_discount = $updates_array['auto_discount'];
<?php require_once $_SERVER["DOCUMENT_ROOT"] . '/djme/config/config.php'; require_once VIEW_PATH . "/GUI.php"; require_once VIEW_PATH . "/GUIRegistro.php"; require_once VIEW_PATH . "/GUIMainToolbar.php"; $toolbar = new GUIMainToolBar("Main Toolbar"); $ui = new GUI("DJMe"); $ui->addComponent(GUIAreas::CONTENT, $toolbar); $ui->addScript("jquery.js"); $ui->addScript("jqueryui/js/jquery-ui.js"); $ui->addScript("index.js"); $ui->draw();
/** * Compute base path * * @param mixed $location location to append * * @return string */ public static function path($location = null) { if (is_null(self::$path)) { self::$path = preg_replace('`^(https?://)?([^/]+)/`', '/', Config::get('application_url')); } if (is_array($location)) { return array_map(function ($l) { return GUI::path($l); }, $location); } if ($location && substr($location, -1) != '/' && substr($location, 0, 1) != '?') { $location .= (strpos($location, '?') ? '&' : '?') . 'v=' . Utilities::runningInstanceUID(); } return self::$path . $location; }
public function paintGUI() { global $config; $ui = new GUI("Administración Usuarios | SJMap"); $ui->setUbicacion("Inicio > Administracion usuarios"); $gm = $this->HTMLTabla; $ui->addComponent(GUIAreas::CONTENT, $gm); $ui->addScript('/jquery.js'); $ui->addScript("jqueryui/js/jquery-ui.js"); $ui->addScript("jquery.validate.min.js"); $ui->addCss('/smoothness/jquery-ui-1.8.20.custom.css'); $ui->addScript("jquery.dataTables.min.js"); $ui->addCss("/tableStyle.css"); $ui->addScript("/filterTable.js"); $ui->draw(); }
/** * Process a template (catch displayed content) * * @param string $id template id * @param array $vars template variables * * @return string parsed template content */ public static function process($id, $vars = array()) { // Are we asked to not output context related html comments ? $addctx = true; if (substr($id, 0, 1) == '!') { $addctx = false; $id = substr($id, 1); } // Resolve template file path $path = self::resolve($id); return (new Event('template_process', $id, $path, $vars, $addctx))->trigger(function ($id, $path, $vars, $addctx) { // Lambda renderer to isolate context $renderer = function ($_path, $_vars) { foreach ($_vars as $_k => $_v) { if (substr($_k, 0, 1) != '_') { ${$_k} = $_v; } } include $_path; }; // Render $exception = null; ob_start(); try { $renderer($path, $vars); } catch (Exception $e) { $exception = $e; } $content = ob_get_clean(); // Translation syntax $content = preg_replace_callback('`\\{(loc|tr|translate):([^}]+)\\}`', function ($m) { return (string) Lang::translate($m[2]); }, $content); // Config syntax $content = preg_replace_callback('`\\{(cfg|conf|config):([^}]+)\\}`', function ($m) { return Config::get($m[2]); }, $content); // Image syntax $content = preg_replace_callback('`\\{(img|image):([^}]+)\\}`', function ($m) { return GUI::path('images/' . $m[2]); }, $content); // Path syntax $content = preg_replace_callback('`\\{(path):([^}]*)\\}`', function ($m) { return GUI::path($m[2]); }, $content); // URL syntax $content = preg_replace_callback('`\\{(url):([^}]*)\\}`', function ($m) { return preg_replace('`^(https?://)?([^/]+)/`', '/', Config::get('application_url')) . $m[2]; }, $content); // Add context as a html comment if required if ($addctx) { $content = "\n" . '<!-- template:' . $id . ' start -->' . "\n" . $content . "\n" . '<!-- template:' . $id . ' end -->' . "\n"; } // If rendering threw rethrow if ($exception) { throw $exception; } return $content; }); }
badRequest(); } switch ($_REQUEST["action"]) { case "newAction": if (empty($_REQUEST["index"])) { badRequest(); } $index = $_REQUEST["index"]; if (!is_numeric($index)) { badRequest(); } if (empty($_REQUEST["layerAction"]) || strtolower($_REQUEST["layerAction"]) != 'true') { $layerAction = FALSE; } else { $layerAction = true; } printf("%s", GUI::createActionSubtable($index, new POIAction(), $layerAction)); exit; case "newAnimation": if (empty($_REQUEST["index"])) { badRequest(); } $index = $_REQUEST["index"]; if (!is_numeric($index)) { badRequest(); } printf("%s", GUI::createAnimationSubtable($index, "", new Animation())); exit; default: badRequest(); }
/** * Displays a screen where one can enter a details of a new FTS dictionary */ function doCreateDict($msg = '') { global $data, $misc; global $lang; include_once './classes/Gui.php'; $server_info = $misc->getServerInfo(); if (!isset($_POST['formName'])) { $_POST['formName'] = ''; } if (!isset($_POST['formIsTemplate'])) { $_POST['formIsTemplate'] = false; } if (!isset($_POST['formTemplate'])) { $_POST['formTemplate'] = ''; } if (!isset($_POST['formLexize'])) { $_POST['formLexize'] = ''; } if (!isset($_POST['formInit'])) { $_POST['formInit'] = ''; } if (!isset($_POST['formOption'])) { $_POST['formOption'] = ''; } if (!isset($_POST['formComment'])) { $_POST['formComment'] = ''; } // Fetch all FTS dictionaries from the database $ftstpls = $data->getFtsDictionaryTemplates(); $misc->printTrail('schema'); // TODO: create doc links $misc->printTitle($lang['strftscreatedict'], 'pg.ftsdict.create'); $misc->printMsg($msg); echo "<form action=\"fulltext.php\" method=\"post\">\n"; echo "<table>\n"; echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strname']}</th>\n"; echo "\t\t<td class=\"data1\"><input name=\"formName\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"", htmlspecialchars($_POST['formName']), "\" /> ", "<input type=\"checkbox\" name=\"formIsTemplate\" id=\"formIsTemplate\"", $_POST['formIsTemplate'] ? ' checked="checked" ' : '', " />\n", "<label for=\"formIsTemplate\">{$lang['strftscreatedicttemplate']}</label></td>\n\t</tr>\n"; // Template echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strftstemplate']}</th>\n"; echo "\t\t<td class=\"data1\">"; $tpls = array(); $tplsel = ''; while (!$ftstpls->EOF) { $data->fieldClean($ftstpls->fields['schema']); $data->fieldClean($ftstpls->fields['name']); $tplname = $ftstpls->fields['schema'] . '.' . $ftstpls->fields['name']; $tpls[$tplname] = serialize(array('name' => $ftstpls->fields['name'], 'schema' => $ftstpls->fields['schema'])); if ($_POST['formTemplate'] == $tpls[$tplname]) { $tplsel = htmlspecialchars($tpls[$tplname]); } $ftstpls->moveNext(); } echo GUI::printCombo($tpls, 'formTemplate', true, $tplsel, false); echo "\n\t\t</td>\n\t</tr>\n"; // TODO: what about maxlengths? // Lexize echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strftslexize']}</th>\n"; echo "\t\t<td class=\"data1\"><input name=\"formLexize\" size=\"32\" maxlength=\"1000\" value=\"", htmlspecialchars($_POST['formLexize']), "\" ", isset($_POST['formIsTemplate']) ? '' : ' disabled="disabled" ', "/></td>\n\t</tr>\n"; // Init echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strftsinit']}</th>\n"; echo "\t\t<td class=\"data1\"><input name=\"formInit\" size=\"32\" maxlength=\"1000\" value=\"", htmlspecialchars($_POST['formInit']), "\"", @$_POST['formIsTemplate'] ? '' : ' disabled="disabled" ', "/></td>\n\t</tr>\n"; // Option echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strftsoptionsvalues']}</th>\n"; echo "\t\t<td class=\"data1\"><input name=\"formOption\" size=\"32\" maxlength=\"1000\" value=\"", htmlspecialchars($_POST['formOption']), "\" /></td>\n\t</tr>\n"; // Comment echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strcomment']}</th>\n"; echo "\t\t<td class=\"data1\"><textarea name=\"formComment\" rows=\"3\" cols=\"32\">", htmlspecialchars($_POST['formComment']), "</textarea></td>\n\t</tr>\n"; echo "</table>\n"; echo "<p>\n"; echo "<input type=\"hidden\" name=\"action\" value=\"createdict\" />\n"; echo "<input type=\"hidden\" name=\"database\" value=\"", htmlspecialchars($_REQUEST['database']), "\" />\n"; echo $misc->form; echo "<input type=\"submit\" name=\"create\" value=\"{$lang['strcreate']}\" />\n"; echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />\n"; echo "</p>\n"; echo "</form>\n", "<script type=\"text/javascript\">\t\t\t\t\n\t\t\t\tfunction templateOpts() {\n\t\t\t\t\tisTpl = document.getElementsByName('formIsTemplate')[0].checked;\n\t\t\t\t\tdocument.getElementsByName('formTemplate')[0].disabled = isTpl;\n\t\t\t\t\tdocument.getElementsByName('formOption')[0].disabled = isTpl;\n\t\t\t\t\tdocument.getElementsByName('formLexize')[0].disabled = !isTpl;\n\t\t\t\t\tdocument.getElementsByName('formInit')[0].disabled = !isTpl;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdocument.getElementsByName('formIsTemplate')[0].onchange = templateOpts;\n\n\t\t\t\ttemplateOpts();\n\t\t\t</script>\n"; }
/** * Dsiplay a screen where user can create a table from an existing one. * We don't have to check if pg supports schema cause create table like * is available under pg 7.4+ which has schema. */ function doCreateLike($confirm, $msg = '') { global $data, $misc, $lang; if (!$confirm) { include_once './classes/Gui.php'; if (!isset($_REQUEST['name'])) { $_REQUEST['name'] = ''; } if (!isset($_REQUEST['like'])) { $_REQUEST['like'] = ''; } if (!isset($_REQUEST['tablespace'])) { $_REQUEST['tablespace'] = ''; } $misc->printTrail('schema'); $misc->printTitle($lang['strcreatetable'], 'pg.table.create'); $misc->printMsg($msg); $tbltmp = $data->getTables(true); $tbltmp = $tbltmp->getArray(); $tables = array(); $tblsel = ''; foreach ($tbltmp as $a) { $data->fieldClean($a['nspname']); $data->fieldClean($a['relname']); $tables["\"{$a['nspname']}\".\"{$a['relname']}\""] = serialize(array('schema' => $a['nspname'], 'table' => $a['relname'])); if ($_REQUEST['like'] == $tables["\"{$a['nspname']}\".\"{$a['relname']}\""]) { $tblsel = htmlspecialchars($tables["\"{$a['nspname']}\".\"{$a['relname']}\""]); } } unset($tbltmp); echo "<form action=\"tables.php\" method=\"post\">\n"; echo "<table>\n\t<tr>\n\t\t<th class=\"data left required\">{$lang['strname']}</th>\n"; echo "\t\t<td class=\"data\"><input name=\"name\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"", htmlspecialchars($_REQUEST['name']), "\" /></td>\n\t</tr>\n"; echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strcreatetablelikeparent']}</th>\n"; echo "\t\t<td class=\"data\">"; echo GUI::printCombo($tables, 'like', true, $tblsel, false); echo "</td>\n\t</tr>\n"; if ($data->hasTablespaces()) { $tblsp_ = $data->getTablespaces(); if ($tblsp_->recordCount() > 0) { $tblsp_ = $tblsp_->getArray(); $tblsp = array(); foreach ($tblsp_ as $a) { $tblsp[$a['spcname']] = $a['spcname']; } echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strtablespace']}</th>\n"; echo "\t\t<td class=\"data\">"; echo GUI::printCombo($tblsp, 'tablespace', true, $_REQUEST['tablespace'], false); echo "</td>\n\t</tr>\n"; } } echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['stroptions']}</th>\n\t\t<td class=\"data\">"; echo "<label for=\"withdefaults\"><input type=\"checkbox\" id=\"withdefaults\" name=\"withdefaults\"", isset($_REQUEST['withdefaults']) ? ' checked="checked"' : '', "/>{$lang['strcreatelikewithdefaults']}</label>"; if ($data->hasCreateTableLikeWithConstraints()) { echo "<br /><label for=\"withconstraints\"><input type=\"checkbox\" id=\"withconstraints\" name=\"withconstraints\"", isset($_REQUEST['withconstraints']) ? ' checked="checked"' : '', "/>{$lang['strcreatelikewithconstraints']}</label>"; } if ($data->hasCreateTableLikeWithIndexes()) { echo "<br /><label for=\"withindexes\"><input type=\"checkbox\" id=\"withindexes\" name=\"withindexes\"", isset($_REQUEST['withindexes']) ? ' checked="checked"' : '', "/>{$lang['strcreatelikewithindexes']}</label>"; } echo "</td>\n\t</tr>\n"; echo "</table>"; echo "<input type=\"hidden\" name=\"action\" value=\"confcreatelike\" />\n"; echo $misc->form; echo "<p><input type=\"submit\" value=\"{$lang['strcreate']}\" />\n"; echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" /></p>\n"; echo "</form>\n"; } else { global $_reload_browser; if (trim($_REQUEST['name']) == '') { doCreateLike(false, $lang['strtableneedsname']); return; } if (trim($_REQUEST['like']) == '') { doCreateLike(false, $lang['strtablelikeneedslike']); return; } if (!isset($_REQUEST['tablespace'])) { $_REQUEST['tablespace'] = ''; } $status = $data->createTableLike($_REQUEST['name'], unserialize($_REQUEST['like']), isset($_REQUEST['withdefaults']), isset($_REQUEST['withconstraints']), isset($_REQUEST['withindexes']), $_REQUEST['tablespace']); if ($status == 0) { $_reload_browser = true; doDefault($lang['strtablecreated']); } else { doCreateLike(false, $lang['strtablecreatedbad']); return; } } }
data-user-uid="<?php echo Utilities::userUID(); ?> " data-lang-uid="<?php echo Lang::getCodeStackUID(); ?> " > <header> <nav class="top-bar" data-topbar=""> <ul class="title-area"> <li class="name"> <a href="{cfg:application_url}" title="{tr:home_page}"> <?php GUI::includeLogo(); ?> </a> </li> <li class="toggle-topbar menu-icon"> <a href="#"> <span title="{tr:dropdown_menu}">{tr:menu}</span> </a> </li> </ul> <menu class="top-bar-section"> <ul class="right"> <?php Template::display('menu');