/** * Show access denied page */ public function hookAccessDenied() { flash('event.404', FALSE); $this->request(); $tpl = new Template('Access/templates/denied'); $tpl->show(); }
/** * Default dispatcher * * @param string $action * @param string $subaction */ public function index($type = NULL) { $q = $this->input->get('q'); page_header($q ? t('Search results for «%s»', $q) : t('Search')); $tpl = new Template('Search/templates/form'); $tpl->action = l('/search/') . $type; $q && ($tpl->value = $q); $tpl->show('info'); new Menu_Tabs(array('name' => 'search', 'elements' => array('posts' => array('label' => t('Посты'), 'link' => l('/search' . ($q ? '?q=' . $q : '')), 'active' => check_route('search$')), 'blogs' => array('label' => t('Блоги'), 'link' => l('/search/blogs' . ($q ? '?q=' . $q : '')), 'active' => check_route('search/blogs')), 'users' => array('label' => t('Пользователи'), 'link' => l('/search/users' . ($q ? '?q=' . $q : '')), 'active' => check_route('search/users')), 'comments' => array('label' => t('Комментарии'), 'link' => l('/search/comments' . ($q ? '?q=' . $q : '')), 'active' => check_route('search/comments'))))); if (!$q) { return event('empty'); } switch ($type) { case 'blogs': new Blog_List(array('name' => 'search.blogs', 'like' => array(array('name', $q, 'both'), array('login', $q, 'both'), array('body', $q, 'both')))); break; case 'users': new User_List(array('name' => 'search.users', 'where' => array('login !=' => ''), 'like' => array(array('name', $q, 'both'), array('login', $q, 'both')))); break; case 'comments': new Comments_List(array('name' => 'search.comments', 'where' => array('published' => 1), 'like' => array(array('body', $q, 'both')), 'per_page' => config('User.comments.per_page', 10), 'flat' => TRUE)); break; default: new Post_List(array('name' => 'search.posts', 'where' => array('published' => 1), 'like' => array(array('name', $q, 'both'), array('body', $q, 'both')))); } }
/** * Hook post comments */ public function hookPostComments($after) { if ($after->object()->allow_comments) { if (access('images.upload')) { $tpl = new Template('Image/templates/upload'); $tpl->show('after'); js($this->folder . '/js/markitup.js'); } } }
public function getFile($nameFile, $vars) { //echo ": ",$nameFile, ': ',var_dump($vars); require_once 'include/Template.php'; $FileTemplate = new Template(); $FileTemplate->setTemplate($nameFile); if (count($vars) > 0) { $FileTemplate->setvars($vars); } return $FileTemplate->show(); }
/** * Default dispatcher * * @param string $action * @param string $subaction */ public function index($action = '') { $this->router->getSegments(0) != 'install' && redirect('/install/'); switch ($action) { case 'requirements': $tpl = new Template('install.requirements'); $tpl->show(); break; default: case 'welcome': $tpl = new Template('install.welcome'); $tpl->show(); } }
public static function get($value_DGFSrtfg5, $data_kGdfgdf = null) { $name_fgdfgdf = str_replace('.', '/', $value_DGFSrtfg5); if (!is_null($data_kGdfgdf)) { foreach ($data_kGdfgdf as $key => $value2) { ${$key} = $value2; } } // ob_start(); // start output buffering //get File // $name_fgdfgdf = str_replace('.', '/', $value_DGFSrtfg5); // $link1 = '../app/views/' . $name_fgdfgdf . '.php'; $link2 = '../app/views/' . $name_fgdfgdf . '.tpl.php'; $link3 = ''; // $tpl = false; // if (file_exists($link1)) { $link3 = $link1; $tpl = false; } else { if (file_exists($link2)) { $link3 = $link2; $tpl = true; } else { $link3 = $name_fgdfgdf; $tpl = false; } } // //Show the output if ($tpl) { self::$showed = "tpl"; Template::show($link3, $data_kGdfgdf); } else { self::$showed = "smpl"; include $link3; } // $returned_value = ob_get_contents(); // get contents from the buffer ob_end_clean(); // return $returned_value; }
public function index($action = NULL) { switch ($action) { case 'file': $tpl = new Template('Upload.file'); $tpl->show(); break; case 'image': $image = new Upload_Image('file', array('preset' => 'post', 'path' => UPLOADS . DS . 'posts' . DS . date('Y/m/d'))); if ($result = $image->upload()) { exit(HTML::img($result)); } break; default: append('content', HTML::a(Url::gear('upload') . '/file?iframe', t('Upload'), array('rel' => 'modal', 'class' => 'button'))); } }
//$tpl->UCID = $res; $uc = new UnidadeConsumidora($res); $tpl->UCRGI = $uc->get('rgi'); $tpl->UCCHAVE = sha1($uc->get('id')); $tpl->UCNOME = $uc->getNome(); $tpl->UCEND = $uc->getEndereco(); $tpl->UCCID = $uc->getCidadeNome(); $tpl->UCSIGLA = $uc->get('uo')->getSigla(); $tpl->EMPRESA = $uc->get('empresa')->getNome(); $tpl->STATUS = $uc->getAtivoText(); $totalAno = $uc->somaValorNotas($anoAtual); $tpl->CONSANO = tratarValor($totalAno['SUM(consumo)'], false); $tpl->VALANO = tratarValor($totalAno['SUM(valor)'], true); $consAnoTotal[$x] += $totalAno['SUM(consumo)']; $pagoAnoTotal[$x] += $totalAno['SUM(valor)']; $ucqtd++; $tpl->block("EACH_UC"); } $tpl->UCQTD = $ucqtd; //$tpl->TIPO_NOME .= " " . $ucqtd; $tpl->SOMACONSANO = tratarValor($consAnoTotal[$x]); $tpl->SOMAPAGOANO = tratarValor($pagoAnoTotal[$x], true); $x++; $tpl->block("EACH_TIPO"); } } $fim = execucao(); $tempo = number_format($fim - $inicio, 6); $tpl->EXECTIME = "Tempo de Execução: <b>" . $tempo . "</b> segundos"; $tpl->show();
$tpl->block("BLOCK_CAMPOOCULTO"); //Resposta $tpl->CAMPOOCULTO_NOME = "r"; $tpl->CAMPOOCULTO_VALOR = "{$resposta}"; $tpl->block("BLOCK_CAMPOOCULTO"); //E-mail md5 $tpl->CAMPOOCULTO_NOME = "e"; $tpl->CAMPOOCULTO_VALOR = "{$emailmd5}"; $tpl->block("BLOCK_CAMPOOCULTO"); $tpl->show(); //BOTÕES DO FINAL DO FORMULÁRIO $tpl2 = new Template("templates/botoes1.html"); $tpl2->block("BLOCK_LINHAHORIZONTAL_EMCIMA"); //Salvar $tpl2->block("BLOCK_BOTAOPADRAO_SUBMIT"); $tpl2->block("BLOCK_BOTAOPADRAO_CONTINUAR"); $tpl2->block("BLOCK_BOTAOPADRAO"); $tpl->block("BLOCK_CONTEUDO"); $tpl2->block("BLOCK_COLUNA"); $tpl2->block("BLOCK_LINHA"); $tpl2->block("BLOCK_BOTOES"); $tpl2->show(); } else { echo 'Por favor, não tente recuperar a senha através métodos não padrões!'; } ?> </div> </div> </body>
/** * Панель управления меню * * @param type $action */ public function admin_action($action = NULL, $subaction = NULL, $param = NULL) { $this->theme->hookAdminMenu(); $this->hookAdminMenu(); if (!$action) { $menus = menu(); $menus->order('position', 'ASC'); if ($result = $menus->findAll()) { jqueryui(); $tpl = new Template('Menu/Db/templates/list'); $tpl->menus = $result; $tpl->show(); } else { return event('empty'); } } else { Menu_Db::template('Menu/templates/simple', t('Простой список')); Menu_Db::template('Bootstrap/templates/tabs', t('Табы Bootstrap')); Menu_Db::template('Bootstrap/templates/pills', t('Пилюли Bootstrap')); $form = new Form('Menu/forms/menu'); $form->template->setValues(Menu_Db::$templates); $menu = new Menu_Db(); if ($action == 'create') { $menu->object()->options = new Core_ArrayObject(array('template' => 'Bootstrap/templates/navbar', 'multiple' => 0, 'title' => 0)); $form->remove('delete'); } else { $menu->id = $action; if ($menu->find()) { $form->object($menu); $form->template->setValue($menu->object()->options->template); $form->multiple->setValue($menu->object()->options->multiple); $form->title->setValue($menu->object()->options->title); } else { return event('empty'); } } if ($result = $form->result()) { if ($result->delete && $menu->delete()) { flash_success(t('Меню «%s» удалено!', $menu->name)); redirect(l('/admin/theme/menu')); } $menu->object()->options->template = $result->template; $menu->object()->options->multiple = $result->multiple; $menu->object()->options->title = $result->title; $menu->object()->name = $result->name; $menu->object()->machine_name = $result->machine_name; if ($menu->save()) { flash_success($action == 'create' ? t('Меню «%s» создано успешно!', $menu->name) : t('Меню «%s» было успешно отредактировано!', $menu->name), '', 'growl'); redirect(l('/admin/theme/menu')); } } $form->show(); } }
$tpl8->USUARIO_GRUPO = $permissao_nome; } //Caixa Abrir Encerrar e Vendas if ($usuario_grupo == 4) { if ($usuario_caixa_operacao == "") { $tpl8->block("BLOCK_CAIXA_ABRIR"); } else { $tpl8->ENCERRARCAIXA = "{$usuario_caixa_operacao}"; $tpl8->block("BLOCK_CAIXA_ENCERRAR"); $tpl8->block("BLOCK_VENDAS"); $tpl8->NUMEROOPERACAO = "{$usuario_caixa_operacao}"; $tpl8->block("BLOCK_CAIXA_FLUXO"); } } //Troca Unidade //Pega todos os quisoque que o usuario é supervisor ou caixa $sql = "select distinct qui_codigo\nfrom quiosques \njoin quiosques_supervisores on quisup_quiosque=qui_codigo\nwhere quisup_supervisor={$usuario_codigo}\nUNION\nselect distinct cai_quiosque\nfrom caixas_operadores\njoin caixas on cai_codigo=caiope_caixa\nwhere caiope_operador={$usuario_codigo}"; $query = mysql_query($sql); if (!$query) { die("Erro: " . mysql_error()); } $qtdquiosques = mysql_num_rows($query); if ($usuario_grupo == 1 || $usuario_grupo == 2 || $usuario_grupo == 3 && $qtdquiosques > 1 || $usuario_grupo == 4 && $qtdquiosques > 1) { $tpl8->QUIOSQUE_COD = ""; $tpl8->COOPERATIVA_COD = ""; $tpl8->block("BLOCK_TROCA_QUIOSQUE"); } //Contato $tpl8->block("BLOCK_SUPORTE"); $tpl8->show();
while ($dados = mysql_fetch_assoc($query)) { $taxa = $dados["quitax_taxa"]; $taxaref = $dados["quitax_valor"]; $taxavalor = $valorbruto * $taxaref / 100; $sql5 = "\n INSERT INTO\n acertos_taxas (\n acetax_acerto,\n acetax_taxa,\n acetax_referencia,\n acetax_valor\n )\n VALUES (\n '{$ultimo}',\n '{$taxa}',\n '{$taxaref}',\n '{$taxavalor}'\n )"; $query5 = mysql_query($sql5); if (!$query5) { die("Erro5:" . mysql_error()); } } //Atribuir como acertado os produtos vendidos $sql8 = "\nUPDATE\n saidas_produtos \n join produtos on (saipro_produto=pro_codigo)\n join produtos_tipo on (pro_tipocontagem=protip_codigo) \n join entradas on (saipro_lote=ent_codigo)\n join saidas on (sai_codigo=saipro_saida)\nSET \n saipro_acertado='{$ultimo}'\nWHERE \n saipro_acertado=0 and\n ent_fornecedor={$fornecedor} and\n sai_datacadastro BETWEEN '{$datade}' AND '{$dataate}' and\n ent_quiosque={$usuario_quiosque} and\n ent_tiponegociacao=1 and\n sai_tipo=1 and\n sai_status=1\n"; $query8 = mysql_query($sql8); if (!$query8) { die("Erro8:" . mysql_error()); } $tpl6 = new Template("templates/notificacao.html"); $tpl6->ICONES = $icones; $tpl6->block("BLOCK_CONFIRMAR"); //$tpl6->block("BLOCK_CADASTRADO"); $tpl6->MOTIVO = "O acerto foi registrado com sucesso!"; $tpl6->LINK = "acertos_cadastrar3.php?codigo={$ultimo}&operacao=imprimir"; $tpl6->block("BLOCK_MOTIVO"); $tpl6->PERGUNTA = "Deseja imprimir o relatórios do acerto?"; $tpl6->block("BLOCK_PERGUNTA"); $tpl6->NAO_LINK = "acertos.php"; $tpl6->LINK_TARGET = "_blank"; $tpl6->block("BLOCK_BOTAO_NAO_LINK"); $tpl6->block("BLOCK_BOTAO_SIMNAO"); $tpl6->show(); include "rodape.php";
$tpl4->block("BLOCK_BOTOES"); $tpl4->show(); } if ($botaofechar == 1) { $tpl4 = new Template("templates/botoes1.html"); //Botão Fechar $tpl4->block("BLOCK_LINHAHORIZONTAL_EMCIMA"); $tpl4->block("BLOCK_COLUNA_LINK_FECHAR"); $tpl4->COLUNA_LINK_ARQUIVO = ""; $tpl4->block("BLOCK_COLUNA_LINK"); $tpl4->block("BLOCK_BOTAOPADRAO_SIMPLES"); $tpl4->block("BLOCK_BOTAOPADRAO_FECHAR"); $tpl4->block("BLOCK_BOTAOPADRAO_AUTOFOCO"); $tpl4->block("BLOCK_BOTAOPADRAO"); $tpl->block("BLOCK_CONTEUDO"); $tpl4->block("BLOCK_COLUNA"); $tpl4->block("BLOCK_LINHA"); $tpl4->block("BLOCK_BOTOES"); $tpl4->show(); } ?> <!--sai_totalbruto, sai_descontopercentual, sai_descontovalor, sai_totalcomdesconto, sai_valorecebido, sai_troco, sai_trocodevolvido, sai_descontoforcado, sai_acrescimoforcado, sai_totalliquido,-->
function _display_results(SearchResult $result, $result_header = '') { $proj_count = $result->project_count(); $proj_plural = $proj_count == 1 ? '' : 's'; $task_count = $result->task_count(); $task_plural = $task_count == 1 ? '' : 's'; $project_results = new Template('results'); $result_header = $result_header == '' ? $result->name() : $result_header; $project_results->set('result_header', $result_header, 'project_header', $proj_count . ' Project' . $proj_plural, 'project_results', $result->projects(), 'task_header', $task_count . ' Task' . $task_plural, 'task_results', $result->tasks()); $project_results->show(); }
{ if (!isset($_SESSION['RDLACore']['credential'])) { $_SESSION['RDLACore']['credential'] = "visitor"; } return $_SESSION['RDLACore']['credential']; } //Load Configuration Environnement if ($_SERVER["SERVER_NAME"] == 'localhost') { $env = "dev"; } else { $env = "prod"; } $config = new Config($env); //Detect loading module if (!empty($_GET['p'])) { $module = htmlspecialchars($_GET['p']); } else { $module = 'index'; } // Start session for user credential session_start(); // Show Module try { $page = new Template($module); if ($env == "dev") { $page->appendBody(DevToolBar::show($module)); } echo $page->show(); } catch (Exception $e) { echo "<span style='color:#900;font-weight:bold;'>Error:</span> " . $e->getMessage(); }
/** * Страница управления сниппетами */ public function admin_action() { $this->hookAdminMenu(); $snippet = new Code_Snippet(); $snippet->order('id', 'DESC'); if ($q = $this->input->get('q')) { $snippet->like('name', $q)->or_like('code', $q); } template('Search/templates/form', array('action' => ''))->show(); $pager = new Pager(array('count' => $snippet->countAll(), 'per_page' => 20, 'base' => l('/admin/code'))); if ($snippets = $snippet->findAll()) { $tpl = new Template('Code/templates/list'); $tpl->snippets = $snippets; $tpl->show(); $pager->show(); } else { event('empty'); } }
$tpl_lista->TEXTO = "R\$ " . number_format($faltadetroco_total, 2, ',', '.'); $tpl_lista->COLUNA_ALINHAMENTO = "right"; $tpl_lista->block("BLOCK_TEXTO_CLASSE_EXTRA"); $tpl_lista->block("BLOCK_COLUNA_PADRAO"); $tpl_lista->block("BLOCK_TEXTO"); $tpl_lista->block("BLOCK_CONTEUDO"); $tpl_lista->block("BLOCK_COLUNA"); //Liquido $tpl_lista->COLUNA_COLSPAN = ""; $tpl_lista->TEXTO = "R\$ " . number_format($liquido_total, 2, ',', '.'); $tpl_lista->COLUNA_ALINHAMENTO = "right"; $tpl_lista->block("BLOCK_COLUNA_PADRAO"); $tpl_lista->block("BLOCK_TEXTO"); $tpl_lista->block("BLOCK_CONTEUDO"); $tpl_lista->block("BLOCK_COLUNA"); $tpl_lista->COLUNA_COLSPAN = "3"; $tpl_lista->TEXTO = ""; $tpl_lista->COLUNA_ALINHAMENTO = ""; $tpl_lista->block("BLOCK_COLUNA_PADRAO"); $tpl_lista->block("BLOCK_TEXTO"); $tpl_lista->block("BLOCK_CONTEUDO"); $tpl_lista->block("BLOCK_COLUNA"); } $tpl_lista->LINHA_CLASSE = "tab_cabecalho"; $tpl_lista->block("BLOCK_LINHA_DINAMICA"); $tpl_lista->block("BLOCK_LINHA"); } $tpl_lista->block("BLOCK_CORPO"); $tpl_lista->block("BLOCK_LISTAGEM"); $tpl_lista->show(); include "rel_baixo.php";
/** * Show a swagmap. */ function showmap($filename) { $this->requireLogin(); $t = new Template(__DIR__ . "/../templates/swagmap.php"); $t->set("baseUrl", RewriteUtil::getBaseUrl()); $t->set("mapUrl", RewriteUtil::getBaseUrl() . "/main/getmap?filename=" . urlencode($filename)); $t->set("actorEmail", $this->getCurrentEmail()); if (isset($this->config["useProxy"]) && $this->config["useProxy"]) { $t->set("xapiEndpoint", RewriteUtil::getBaseUrl() . "xapiproxy"); } else { $t->set("xapiEndpoint", $this->config["xapiEndpoint"]); } $t->set("xapiUsername", $this->config["xapiUsername"]); $t->set("xapiPassword", $this->config["xapiPassword"]); $t->show(); }
<?php //Setting up important stuff require_once 'template.class.php'; define('TEMPLATES_PATH', 'templates'); define('PARTIALS_PATH', 'templates/partials'); //Instanciate new object $template = new Template(TEMPLATES_PATH . '/test.tpl.html'); //Assign values $template->assign('title', 'Userinfo'); $template->assign('text', 'This is how dynamic data could look with out templating system.'); //Use a partial $template->renderPartial('table_here', PARTIALS_PATH . '/table.part.html', array('username' => 'winfreak', 'age' => 18)); //Showing content $template->show();
/** * Производит анализ и выполнение действий, переданных в URI */ public function run() { if (Router::isAdmin() && !Auth::getInstance()->hasAccess(1)) { throw new Exception(lang('access_denied', __CLASS__)); } MySQL::setOnPage(Config::get('OnPage')); $this->route = Router::getPath(); if (count($this->route) == 0) { $this->index = true; } $this->folder = Router::isAdmin() ? '/admin/' : '/public/'; if (!Router::isAdmin() && Router::getDefaultModule() == 'Page') { Page_Handler::findPage($this); } foreach ($this->route as $key => $path) { $path = ucfirst(mb_strtolower($path)); if (is_dir(CORE_ROOT . 'controller' . $this->folder . $this->pathToController . $path) && $path != '') { $this->pathToController .= $path . '/'; } if (is_file(CORE_ROOT . 'controller' . $this->folder . $this->pathToController . $path . '.php')) { $this->controller = $path; $this->pathToView .= $path . '/'; unset($this->route[$key]); } if (is_file(CORE_ROOT . 'view' . $this->folder . $this->pathToView . '_footer.phtml') && is_file(CORE_ROOT . 'view' . $this->folder . $this->pathToView . '_header.phtml')) { $this->pathToTemplate = $this->pathToView; } if (is_file(CORE_ROOT . 'view' . $this->folder . $this->pathToView . mb_strtolower($path) . '.phtml')) { $this->action = mb_strtolower($path); unset($this->route[$key]); } } if ($this->controller == '') { $this->controller = Router::isAdmin() ? 'Page' : Router::getDefaultModule(); $this->pathToView = $this->controller . '/'; } if ($this->action == '') { if ($this->controller == 'Page' && !$this->index && !Router::isAdmin() && Page_Handler::getPageID() == 0) { $this->action = 'page404'; } else { $this->action = 'index'; } } $this->route = array_values($this->route); if (!is_file(CORE_ROOT . 'controller' . $this->folder . $this->pathToController . $this->controller . '.php')) { throw new Exception(lang('error_controller_not_found', __CLASS__)); } include CORE_ROOT . 'class/Controller/AbstractController.php'; if (Router::isAdmin()) { include CORE_ROOT . 'class/Controller/AdminController.php'; } else { include CORE_ROOT . 'class/Controller/PublicController.php'; } include CORE_ROOT . 'controller' . $this->folder . $this->pathToController . $this->controller . '.php'; $this->controller .= 'Controller'; $oController = new $this->controller($this); $oController->{$this->action}(); if (!is_file(CORE_ROOT . 'view' . $this->folder . $this->pathToView . $this->action . '.phtml')) { throw new Exception(lang('error_view_not_found', __CLASS__) . ':<br />' . 'view' . $this->folder . $this->pathToView . $this->action . '.phtml'); } $oTemplate = new Template($this); $oTemplate->load($oController); $oTemplate->show(); }
/** * Default dispatcher * * @param string $action * @param string $subaction */ public function index($action = '') { template('Install/templates/header')->show('info'); new Menu_Tabs(array('name' => 'install', 'render' => 'content', 'elements' => array(array('label' => t('1. Начало'), 'link' => '', 'active' => check_route('install$')), array('label' => t('2. Проверка'), 'link' => '', 'active' => check_route('check$')), array('label' => t('3. Настройки'), 'link' => '', 'active' => check_route('site$')), array('label' => t('4. Завершение'), 'link' => '', 'active' => check_route('finish$'))))); switch ($action) { case 'check': $tpl = new Template('Install/templates/check'); $tpl->show(); break; case 'site': append('content', '<p class="alert alert-info">' . t('Определите базовые настройки сайта.') . '</p>'); $form = new Form('Install/forms/site'); if ($result = $form->result()) { $site = new Config(SITE . DS . 'site' . EXT); $config = new Config(SITE . DS . 'config' . EXT); $config->site->name = $result->sitename; $site->key or $site->key = md5(md5(time()) + time() + $site->site->name); $result->port or $result->port = 3306; $site->database = array('driver' => config('database.driver'), 'host' => $result->host, 'base' => $result->base, 'user' => $result->user, 'pass' => $result->pass, 'port' => $result->port, 'prefix' => $result->prefix); $db = Db::factory('temp', $site->database); if (!$db->connect()) { if ($result->create_db && $db->connect(FALSE)) { $db->query("CREATE DATABASE `{$site->database->base}` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;\n CREATE USER '{$site->database->user}'@'{$site->database->host}' IDENTIFIED BY '{$site->database->pass}';\n GRANT ALL ON `{$site->database->base}`.* TO '{$site->database->user}'@'localhost';\n FLUSH PRIVILEGES;"); } $db->connect(); } if ($db->is_connected) { $site->store(TRUE); $config->store(TRUE); if ($db->import($this->dir . DS . 'cogear.sql', $site->database->prefix)) { redirect(l('/install/finish')); } } else { error(t("Не удалось установить подключение к базе данных."), '', 'content'); } } else { $form->save->label = t('Попробуйте снова'); } $form->show(); break; case 'finish': $tpl = new Template('Install/templates/finish'); $tpl->show(); break; case 'done': // $site = new Config(SITE . DS . 'site' . EXT); // $site->store(TRUE); flash_success(t('Ваш сайт успешно настроен! <p> Данные для входа – логин <b>admin</b> и пароль <b>password</b>.'), '', 'info'); $this->disable(); redirect(); break; default: case 'welcome': $tpl = new Template('Install/templates/welcome'); $tpl->show(); } }
<?php include 'Template.php'; $tpl = new Template(); $tpl->show('member');
<?php //--------------------------FICOU NO ESTOQUE ------------------------------------- $tpl3 = new Template("templates/lista1.html"); //TÃtulo $tpl3_tit = new Template("templates/tituloemlinha_1.html"); $tpl3_tit->LISTA_TITULO = "FICOU NO ESTOQUE"; $tpl3_tit->block("BLOCK_TITULO"); $tpl3_tit->show(); //Ficou no estoque - Listagem - Cabeçalho $tpl3->CABECALHO_COLUNA_TAMANHO = ""; $tpl3->CABECALHO_COLUNA_COLSPAN = "2"; $tpl3->CABECALHO_COLUNA_NOME = "PRODUTO"; $tpl3->block(BLOCK_LISTA_CABECALHO); $tpl3->CABECALHO_COLUNA_TAMANHO = "150px"; $tpl3->CABECALHO_COLUNA_COLSPAN = "2"; $tpl3->CABECALHO_COLUNA_NOME = "QUANTIDADE"; $tpl3->block(BLOCK_LISTA_CABECALHO); $tpl3->CABECALHO_COLUNA_TAMANHO = "150px"; $tpl3->CABECALHO_COLUNA_COLSPAN = ""; $tpl3->CABECALHO_COLUNA_NOME = "VAL. UNI."; $tpl3->block(BLOCK_LISTA_CABECALHO); $tpl3->CABECALHO_COLUNA_TAMANHO = "150px"; $tpl3->CABECALHO_COLUNA_COLSPAN = ""; $tpl3->CABECALHO_COLUNA_NOME = "VALOR TOTAL"; $tpl3->block(BLOCK_LISTA_CABECALHO); $tpl3->CABECALHO_COLUNA_TAMANHO = ""; $tpl3->CABECALHO_COLUNA_COLSPAN = ""; $tpl3->CABECALHO_COLUNA_NOME = "LOTE"; $tpl3->block(BLOCK_LISTA_CABECALHO); $tpl3->CABECALHO_COLUNA_TAMANHO = "";
/** * Показывает главную страницу панели управления */ public function dashboard_action() { $panels = new Core_ArrayObject(); $panels->system = new Core_ArrayObject(array('span' => '6', 'title' => t('О системе'), 'content' => template('Admin/templates/dashboard/system')->render())); $panels->news = new Core_ArrayObject(array('span' => '6', 'title' => t('Новости проекта'), 'content' => template('Admin/templates/dashboard/news')->caching(3600)->render())); event('admin.dashboard.panels', $panels); $tpl = new Template('Admin/templates/dashboard'); $tpl->panels = $panels; $tpl->show(); }
if ($nome == $nome2) { $linhatot = 1; } else { $linhatot = 0; } if ($linhas > $linhatot) { $tpl_notificacao = new Template("templates/notificacao.html"); $tpl_notificacao->ICONES = $icones; $tpl_notificacao->MOTIVO_COMPLEMENTO = "nome"; $tpl_notificacao->DESTINO = "cidades.php"; $tpl_notificacao->block("BLOCK_ERRO"); $tpl_notificacao->block("BLOCK_NAOEDITADO"); $tpl_notificacao->block("BLOCK_MOTIVO_JAEXISTE"); $tpl_notificacao->block("BLOCK_BOTAO_VOLTAR"); $tpl_notificacao->show(); } else { $sql = "\n UPDATE\n cidades\n SET\n cid_nome='{$nome}',\n\tcid_estado='{$estado}'\t\n WHERE\n cid_codigo = '{$codigo}'\n "; if (!mysql_query($sql)) { die("Erro: " . mysql_error()); } $tpl_notificacao = new Template("templates/notificacao.html"); $tpl_notificacao->ICONES = $icones; $tpl_notificacao->MOTIVO_COMPLEMENTO = ""; $tpl_notificacao->DESTINO = "cidades.php"; $tpl_notificacao->block("BLOCK_CONFIRMAR"); $tpl_notificacao->block("BLOCK_EDITADO"); $tpl_notificacao->block("BLOCK_BOTAO"); $tpl_notificacao->show(); } } include "rodape.php";
} $html .= $tpl->assign($row, array('song.NAME' => $ga->cut_string($arr[$i]['name'], 27, true), 'song.SINGER' => $ga->cut_string($arr[$i]['singer'], 27, true), 'song.ID' => $arr[$i]['id'], 'song.KAT' => $arr[$i]['kat'], 'song.CAT' => $arr[$i]['cat'], 'song.KBS' => $arr[$i]['kbs'], 'song.TYPE' => $arr[$i]['type'], 'song.RATE' => $arr[$i]['rate'], 'song.CLASS' => $class, 'song.NUM' => $i, 'server' => URL_SERVER)); } # Phân Trang if ($ga->page > 1) { $prev = $ga->page - 1; $pre = '<a href="javascript:void(0);" onclick="loadAjax(\'' . $ga->keyword . '\',\'' . $prev . '\',\'' . $_POST['by'] . '\',\'' . $ga->total . '\');"><img src="theme/img/prev.png" style="border:0px solid;"></a>'; } if ($ga->page < $ga->result) { $next = $ga->page + 1; $ne = '<a href="javascript:void(0);" onclick="loadAjax(\'' . $ga->keyword . '\',\'' . $next . '\',\'' . $_POST['by'] . '\',\'' . $ga->total . '\');"><img src="theme/img/next.png" style="border:0px solid;"></a>'; } $main = $tpl->assign($main, array('ga_pre' => $pre, 'ga_next' => $ne, 'ga_page' => $ga->page, 'ga_result' => $ga->result, 'ga_total' => $ga->total, 'ga_keyword' => $_POST['keyword'])); # Buff Theme $main = $tpl->assign_blocks($main, array('list' => $html)); $tpl->show($main); } } else { if ($_POST['by'] == '4' && $_POST['keyword']) { if ($ga->Album()) { $arr = $ga->arr; $main = $tpl->get('theme/list_album'); $row = $tpl->get_block($main, 'list_row', 1); $html = ""; for ($i = 1; $i <= count($arr) - 4; $i++) { $html .= $tpl->assign($row, array('song.NAME' => $ga->cut_string($arr[$i]['name'], 27, true), 'song.ID' => $arr[$i]['id'], 'song.IMG' => $arr[$i]['img'], 'song.NUM' => $i)); } # Phân Trang if ($ga->page > 1) { $prev = $ga->page - 1; $pre = '<a href="javascript:void(0);" onclick="loadAjax(\'' . $ga->keyword . '\',\'' . $prev . '\',\'' . $_POST['by'] . '\',\'' . $ga->total . '\');"><img src="theme/img/prev.png" style="border:0px solid;"></a>';
/** * Show admin page */ public function admin_action($action = 'list') { $this->hookAdminMenu(); switch ($action) { case 'settings': $form = new Form(array('#name' => 'user.admin.settings', 'title' => array('label' => icon('user') . ' ' . t('Настройки регистрации')), 'registration' => array('type' => 'checkbox', 'value' => config('user.register.active'), 'label' => t('Регистрация разрешена')), 'verification' => array('type' => 'checkbox', 'value' => config('user.register.verification'), 'label' => t('Подтверждение регистрации по электронной почте')), 'save' => array())); if ($result = $form->result()) { $this->set('user.register.active', $result->registration); $this->set('user.register.verification', $result->verification); flash_success('Настройки сохранены!'); reload(); } $form->show(); break; default: $q = $this->input->get('q'); $tpl = new Template('Search/templates/form'); $tpl->action = l('/admin/users/'); $q && ($tpl->value = $q); $tpl->show('info'); Db_ORM::skipClear(); $list = new User_List(array('name' => 'admin.users', 'base' => l('/admin/user/'), 'per_page' => config('Admin.user.per_page', 20), 'render' => FALSE)); $fields = $list->getFields(); $list->setFields($fields); $list->show(); } }
// fclose($fp); $image = $http->get_string_between($html, 1, 0, '<meta property="og:image" content="', '"'); $xml = $http->get_string_between($html, 1, 0, 'xmlURL=', '&textad'); if ($xml == '' || $xml == null || $xml == ' ') { $title = 'Thông Báo'; $keyword = '.'; } else { ///lay link .mp3 $http->clear(); $http->setTarget($xml); $http->setReferrer("http://mp3.zing.vn"); $http->execute(); $html = $http->result; $url = $http->get_string_between($html, 1, 0, '<source><![CDATA[', ']]></source>'); $name = $http->get_string_between($html, 1, 0, '<title><![CDATA[ ', ']]></title>'); $singer = $http->get_string_between($html, 1, 0, '<performer><![CDATA[', ']]></performer>'); /// $title = $name . '-' . $singer; $keyword = $singer; } $index = 'index'; $description = $title . ' download tải nhạc chờ bài hát ' . $title . ' lossless Ca Khúc : ' . $title; $keywords = $title . ' Việt Nam, nhac cho, nhac chuong, lyrics, loi bai hat'; $link = URL_SERVER . '/bai-hat/' . $id; include "header.php"; //include "top_album.php"; $html_album_hot = file_get_contents("top_album.php"); $htmls = $tpl->get('theme/play_song'); $array = array('song.URL' => $url, 'song.NAME' => $name, 'song.ID' => $id, 'song.SINGER' => $singer, 'html.album_hot' => $html_album_hot); $tpl->show($tpl->assign($htmls, $array)); }
$tpl1->CAMPO_TAMANHO = ""; if ($tipo_contagem == 1) { //ser for por por 'unidade' $qtd_etiquetas = $qtd; } else { $qtd_etiquetas = 1; } $tpl1->CAMPO_VALOR = $qtd_etiquetas; $tpl1->CAMPO_QTD_CARACTERES = ""; $tpl1->block("BLOCK_CAMPO_OBRIGATORIO"); $tpl1->block("BLOCK_CAMPO_NORMAL"); $tpl1->block("BLOCK_CAMPO"); $tpl1->block("BLOCK_CONTEUDO"); $tpl1->block("BLOCK_ITEM"); //Botão Gerar $tpl1->BOTAO_TIPO = "submit"; $tpl1->BOTAO_VALOR = "GERAR"; $tpl1->BOTAO_NOME = "GERAR"; $tpl1->BOTAO_FOCO = "autofocus"; $tpl1->block("BLOCK_BOTAO1_SEMLINK"); $tpl1->block("BLOCK_BOTAO1"); $tpl1->CAMPOOCULTO_NOME = "lote"; $tpl1->CAMPOOCULTO_VALOR = "{$lote}"; $tpl1->block("BLOCK_CAMPOSOCULTOS"); $tpl1->CAMPOOCULTO_NOME = "numero"; $tpl1->CAMPOOCULTO_VALOR = "{$numero}"; $tpl1->block("BLOCK_CAMPOSOCULTOS"); $tpl1->block("BLOCK_BOTAO_VOLTAR"); $tpl1->block("BLOCK_BOTOES"); $tpl1->show(); //include "rodape2.php";
$emails = $_POST['subsc']; if ($send->sendNewsLitter($emails, $templ)) { echo "Send Succcessfuly"; } else { echo "Unabl to Send"; } } ?> <form method="POST"> <div style="width:20%; float: left;"> Message Title : <input type="text" name="title"><br><br> <h3>Choice Template</h3> <?php foreach ($temp->show() as $template) { ?> <label><input type="radio" value="<?php echo $template; ?> " name="tempName"> <?php echo $template; ?> </label><br> <?php } ?> <br><br> <a href="?page=CreateTemp">Create New Template</a> </div> <div style="width: 75%; float: left; border-left: 2px solid #333; height: 300px; overflow-y: scroll;">