当前位置: 首页>>代码示例>>PHP>>正文


PHP template::get方法代码示例

本文整理汇总了PHP中template::get方法的典型用法代码示例。如果您正苦于以下问题:PHP template::get方法的具体用法?PHP template::get怎么用?PHP template::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在template的用法示例。


在下文中一共展示了template::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: template

 function login_form($message = "")
 {
     $tpl = new template("templates/");
     $tpl->load("login.html");
     $tpl->set_block("form");
     $tpl->set_variable("AppTitle", traducir_cadena("AppTitle"));
     $tpl->set_variable("AdminModule", traducir_cadena("AdminModule"));
     $tpl->set_variable("Institute", traducir_cadena("Institute"));
     $tpl->set_variable("WelcomeAdmin", traducir_cadena("WelcomeAdmin"));
     $tpl->set_variable("message", traducir_cadena($message));
     $tpl->set_variable("user", traducir_cadena("user"));
     $tpl->set_variable("password", traducir_cadena("password"));
     $tpl->parse_block("form");
     return $tpl->get();
 }
开发者ID:pelao88,项目名称:evaluaciones,代码行数:15,代码来源:login.php

示例2: ModificarExtrasTemplate

function ModificarExtrasTemplate($id, $comentario, $paginas)
{
    $oTemplate = new template();
    if (!$oTemplate->Load($id)) {
        error(__FILE__ . __LINE__, "W: no pudo mostrareditar '{$id}'");
        return false;
    }
    $nombreoriginal = $oTemplate->get("Nombre");
    $oTemplate->set("Comentario", $comentario, FORCE);
    $oTemplate->set("Paginas", $paginas, FORCE);
    if ($oTemplate->Save()) {
        if (isVerbose()) {
            echo gas("aviso", _("Datos extra cambiados"));
        }
        $_SESSION["Template_{$nombreoriginal}"] = false;
        //invalida copia de sesion de template
    } else {
        echo gas("problema", _("No se puede cambiar dato"));
    }
}
开发者ID:klich3,项目名称:gPOS,代码行数:20,代码来源:modtemplates.php

示例3: template

 function login_form($message = "", $clave_examen = "")
 {
     $tpl = new template("templates/");
     $tpl->load("form.html");
     $tpl->set_block("form");
     $tpl->set_variable("AppTitle", traducir_cadena("AppTitle"));
     $tpl->set_variable("ExamModule", traducir_cadena("ExamModule"));
     $tpl->set_variable("Institute", traducir_cadena("Institute"));
     $tpl->set_variable("WelcomeExam", traducir_cadena("WelcomeExam"));
     $tpl->set_variable("Instructions", traducir_cadena("Instructions"));
     $tpl->set_variable("message", $message);
     $tpl->set_variable("txtsessionid", traducir_cadena("txtsessionid"));
     $sessionid = rand();
     $tpl->set_variable("randval", $sessionid);
     $tpl->set_variable("txtstudentid", traducir_cadena("txtstudentid"));
     $tpl->set_variable("txtidexamen", $clave_examen);
     $tpl->set_variable("txtquestionpaperid", traducir_cadena("txtquestionpaperid"));
     $tpl->set_variable("txtsubmit", traducir_cadena("txtsubmit"));
     $tpl->set_variable("txtreset", traducir_cadena("txtreset"));
     $tpl->set_variable("password", traducir_cadena("password"));
     $tpl->parse_block("form");
     return $tpl->get();
 }
开发者ID:pelao88,项目名称:evaluaciones,代码行数:23,代码来源:model_exam.php

示例4: makeElementView

	function makeElementView($value) {
		GLOBAL $parser;
		$this->init(&$parser,$value);
		
		$file_size = (file_exists($this->full_name))?formatFileSize(filesize($this->full_name)):'';
		$file_link = HTTP_ROOT.FILE_PATH.$this->file['path'].$this->id.'_'.$this->original_name;
		
		if ($file_size!='') {
			$tpl = new template(TPL_PATH);
			$tpl_name=$parser->getSystemTemplate('type/file');
			$tpl->loadTemplatefile($tpl_name,true,true);
			$tpl->parseVariable(array(
				'file_name'	=> $this->original_name,
				'id'		=> $this->id,
				'link'		=> $file_link,
				'size'		=> $file_size,
				'data_name'	=> $this->file_name		
			),'view');
			$view = $tpl->get();
		}
		
		if ($parser->buffer=='dynamic_view') {
			if (file_exists($this->full_name)) {
				return $view;
			} else {
				return ' ';	
			}
		}		
		
		$to_parse='FILE_'.strtoupper($this->file_name);
		
		$return[$to_parse] = $file_link;
		$return[$to_parse.'_NAME'] = $this->original_name;
		$return[$to_parse.'_SRC'] = $file_link;
		$return[$to_parse.'_SIZE'] = $file_size;
		$return[$this->field_name] = $view;
		return $return;
	}
开发者ID:naffis,项目名称:rejectmail-php,代码行数:38,代码来源:file.type.php

示例5: template

$table->addRow()->addCell(lang::get('php_version'))->addCell(phpversion());
$table->addRow()->addCell(lang::get('mysql_version'))->addCell($sql->get('VERSION()'));
echo $table->show();
?>
        </div>
    </div>
    
    <div class="col-lg-4">
        <div class="panel panel-default">
            <div class="panel-heading">
            	<h3 class="panel-title"><?php 
echo lang::get('template');
?>
</h3>
            </div>
			<?php 
$template = new template(dyn::get('template'));
$table = table::factory(['class' => ['table', 'table-spriped', 'table-hover']]);
$table->addSection('tbody');
$table->addRow()->addCell(lang::get('name'))->addCell($template->get('name'));
$table->addRow()->addCell(lang::get('author'))->addCell($template->get('author'));
$table->addRow()->addCell(lang::get('version'))->addCell($template->get('version'));
$table->addRow()->addCell('<a href="' . $template->get('supportlink') . '" class="btn btn-sm btn-default btn-block" target="_blank">' . lang::get('support_visit') . '</a>', ['colspan' => 2]);
echo $table->show();
?>
        </div>
    </div>
        
    <div class="clearfix"></div>

</div>
开发者ID:pasterntt,项目名称:dynao-CMS,代码行数:31,代码来源:settings.main.php

示例6: calendar

 /**
  * make cp menu1
  *
  * @param array $menu
  * @return void
  */
 function calendar($script, $year, $month, $day)
 {
     $tpl = new template(TPL_PATH);
     $tpl->loadTemplatefile('def/calendar', true, true);
     $tpl->setVariable(array('SCRIPT' => $script, 'YEAR' => $year, 'MONTH' => $month - 1, 'DAY' => $day));
     $tpl->parseCurrentBlock();
     return $tpl->get();
 }
开发者ID:naffis,项目名称:rejectmail-php,代码行数:14,代码来源:cp.class.php

示例7: template

	function __makeListboxViewElement($list,$value) {
		GLOBAL $parser;
		
		$tpl = new template(TPL_PATH);
		$tpl->loadTemplateFile($parser->getSystemTemplate('type/listbox'));
		
		if (isset($list) and is_array($list)) {
				$values = preg_split("/[<>]/", $value, -1, PREG_SPLIT_NO_EMPTY);
				foreach ($values as $key => $value) {
					$values[$key] = $list[$value];
				}
				if (empty($values)) {
					$tpl->touchBlock('view_empty');
				}
				else {
					$cnt = 0;
					foreach ($list as $name) {
						$cnt++;
						if (in_array($name, $values)) {
							$tpl->setCurrentBlock('yes');
							$tpl->setVariable(array(
								'YES'	=> ''
							));
						} else {
							$tpl->setCurrentBlock('no');
							$tpl->setVariable('NO', '');
							
						}
						$tpl->setVariable(array(
							'NAME'	=> $name
						));
						$tpl->parseCurrentBlock();
							
						if ($cnt != count($list)) $tpl->touchBlock('view_separator');

						$tpl->setCurrentBlock('view_row');
						$tpl->setVariable(array(
							'ROW'	=> $name
						));
						$tpl->parseCurrentBlock();
					}
					$tpl->setCurrentBlock('view');
					$tpl->parseCurrentBlock();
				}
			}
		return trim($tpl->get());
	}
开发者ID:naffis,项目名称:rejectmail-php,代码行数:47,代码来源:listbox.type.php

示例8: coordinates

<DOCTYPE html>
<html>
  <head>
  </head>
  <body>
  
    
    <pre>
<?php 
echo template::get('status');
?>
<BR/>
<?php 
//$this->createField();
echo template::get('matrix');
?>

    </pre>
    
    <form name="input" action="?start/setShoot" method="post">
      Enter coordinates (row, col), e.g. A5 <input size="5" name="coord" autocomplete="off" autofocus="" type="input">
      <input type="submit"> <a href="?start/newGame">Restart</a>
    </form>


  <body>
<html>
开发者ID:apichlinski,项目名称:battleships,代码行数:27,代码来源:layout.php

示例9: getRaw

 function getRaw($vars = array())
 {
     if (!$this->is) {
         trigger_error('Seite existiert nicht!');
         return;
     }
     $modPath = sysPATH . $this->vs['module'] . '/';
     // dont use the getter;
     $Cont = $this;
     $res = is_file($modPath . 'control.php') ? include $modPath . 'control.php' : null;
     if (is_file($modPath . 'index.php')) {
         $T = new template($res);
         $T->assign('vars', $vars);
         $T->assign('Cont', $this);
         $str = $T->get($modPath . 'index.php');
         qg::fire('cms::parseTemplate', array('Cont' => $Cont, 'string' => &$str));
     } else {
         $str = '<div>' . ($this->edit ? L('Das Modul ist nicht existiert nicht!') : '') . '</div>';
     }
     is_file($modPath . 'pub/main.js') && html::addJsFile($this->modUrl . 'pub/main.js');
     is_file($modPath . 'pub/main.css') && html::addCSSFile($this->modUrl . 'pub/main.css');
     return $str;
 }
开发者ID:nuxodin,项目名称:shwups-cms-v4,代码行数:23,代码来源:Page.class.php

示例10: header

     } else {
         header("content-type: image/jpeg");
         imageJpeg($im, NULL, 90);
     }
     exit;
     break;
     if (me() <= 0 || getS('user', 'u_email') != ownStaGramAdmin) {
         jump2();
     }
     if (isset($_POST["saveuser"]) && $_POST["saveuser"] == 1) {
         $own->setUserData(-1, $_POST['FORM']);
         header("location: index.php?action=users");
         exit;
     }
     $tplContent->setVariable("view", "edit");
     $html = $tplContent->get('tpl.users.php');
     break;
 case 'users':
     if (me() <= 0 || getS('user', 'u_email') != ownStaGramAdmin) {
         jump2();
     }
     if (isset($_GET['id']) && (int) $_GET["id"] > 0) {
         if (isset($_POST["saveuser"]) && $_POST["saveuser"] == 1) {
             $own->setUserData((int) $_GET["id"], $_POST['FORM']);
             header("location: index.php?action=users");
             exit;
         }
         $edit = $own->getUserData((int) $_GET["id"]);
         $tplContent->setVariable("view", "edit");
         $tplContent->setVariable($edit);
     } else {
开发者ID:Co0olCat,项目名称:ownstagram,代码行数:31,代码来源:index.php

示例11: includeTpl

 function includeTpl($tplName, $data = array(), $modul = NULL)
 {
     if ($modul == NULL) {
         $modul = $this->modulName;
     }
     $tpl = new template();
     $tpl->modulName = $modul;
     foreach ($data as $key => $value) {
         $tpl->setVariable($key, $value);
     }
     return $tpl->get($tplName);
 }
开发者ID:Co0olCat,项目名称:ownstagram,代码行数:12,代码来源:class.template.php

示例12: function

<?php

namespace qg;

qg::on('action', function () {
    if (!isset($_GET['file']) || strpos(appRequestUri, 'editor') !== 0) {
        return;
    }
    $file = urldecode($_GET['file']);
    if (!isset($_SESSION['fileEditor']['allow'][$file]) && !Usr()->superuser) {
        echo 'no access';
        exit;
    }
    !is_dir(dirname($file)) && mkdir(dirname($file));
    !is_file($file) && touch($file);
    if ($ask = G()->ASK) {
        $done = 0;
        if (isset($ask['save']) && is_file($file)) {
            copy($file, appPATH . 'cache/tmp/pri/fileEditorBackup_' . urlencode($file) . '_' . date('dmYhi'));
            if (file_put_contents($file, $ask['save']) && is_writable($file)) {
                $done = 1;
            }
        }
        Answer($done);
    }
    /* neu */
    $T = new template(array('file' => $file));
    echo $T->get(sysPATH . 'fileEditor/view/codemirror.php');
    exit;
});
开发者ID:nuxodin,项目名称:shwups-cms-v4,代码行数:30,代码来源:qg.php

示例13: template

 function __destruct()
 {
     $str = ob_get_clean();
     if ($this->template) {
         $tpl = new template();
         $tpl->assign('content', $str);
         $str = $tpl->get($this->template);
     }
     qg_flush($str);
 }
开发者ID:atifzaidi,项目名称:shwups-cms,代码行数:10,代码来源:divers.php

示例14: getRaw

 function getRaw($vars = array())
 {
     if (!$this->is) {
         trigger_error('Seite existiert nicht!');
         return;
     }
     $Cont = $this;
     $res = is_file($this->modPath . 'control.php') ? include $this->modPath . 'control.php' : null;
     if (is_file($this->modPath . 'index.php')) {
         $T = new template($res);
         $T->assign('vars', $vars);
         $T->assign('Cont', $this);
         $str = $T->get($this->modPath . 'index.php');
     } else {
         $str = '<div>' . ($Cont->edit ? L('Das Modul ist nicht existiert nicht!') : '') . '</div>';
     }
     if (is_file($this->modPath . 'pub/main.js')) {
         html::addJsFile($this->modUrl . 'pub/main.js');
     }
     if (is_file($this->modPath . 'pub/main.css')) {
         html::addCSSFile($this->modUrl . 'pub/main.css');
     }
     return $str;
 }
开发者ID:atifzaidi,项目名称:shwups-cms,代码行数:24,代码来源:Page.class.php

示例15: makePaging

 /**
  * @return string
  * @desc make paging
  */
 function makePaging()
 {
     global $app;
     // check paging
     if ($app->paging === false) {
         return '';
     }
     $tpl = new template(TPL_PATH);
     if (!isset($app->paging['template'])) {
         $tpl_name = $this->getSystemTemplate('paging' . $app->paging['type']);
     } else {
         $tpl_name = $app->paging['template'];
     }
     $tpl->loadTemplatefile($tpl_name);
     //$app->load('paging1','inc');
     include SYS_ROOT . INIT_PATH . INC_PATH . 'paging' . $app->paging['type'] . '.inc.php';
     return $tpl->get();
     $app->clearPaging();
 }
开发者ID:naffis,项目名称:rejectmail-php,代码行数:23,代码来源:parser.class.php


注:本文中的template::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。