本文整理汇总了PHP中Config::getRootPath方法的典型用法代码示例。如果您正苦于以下问题:PHP Config::getRootPath方法的具体用法?PHP Config::getRootPath怎么用?PHP Config::getRootPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Config
的用法示例。
在下文中一共展示了Config::getRootPath方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createFormData
private function createFormData($ReturnResultVO = NULL)
{
//adiciona o content na url de envio do formulario
if ($this->content_id > 0) {
$this->my_action .= "/id.{$this->content_id}/";
}
$formData = new ContentFormView($this->ContentSiteVO, Config::getRootPath($this->my_action));
$ImageFormView = new ImageFormView();
$ImageFormView->setFormLabel("Selecionar Imagem");
$ImageFormView->setQuantity(0);
// $ImageFormView->setDescription(array('label'=>Translation::text('Link'), 'visible'=>false, 'type'=>'simpleText'));
$FileFormView = new FileFormView();
$FileFormView->setFormLabel("Selecionar Arquivo");
$FileFormView->setQuantity(0);
// $formData->setPersonalInput(array("name"=>"destaque[]","label"=>"Mostrar na Home?", "options"=>array((object) array("name"=>"Palestrantes", "id"=>"33"), (object) array("name"=>"Outros Palestrantes", "id"=>"34"))));
//trocando o rótulo para Content
// $formData->setContent(array("label"=>"Descrição:"));
//trocando o rótulo para Title
$formData->setTitle(array("label" => "Titulo:"));
$formData->setHat(array("label" => "Url:"));
$formData->setCategory(array("visible" => FALSE, "name" => "category[]", "selected" => array($this->category_id)));
$formData->setImage($ImageFormView);
$formData->setFile($FileFormView);
$formData->setMassiveAttr('visible', FALSE, array('Name', 'Description', 'Content', 'Author', 'TemplateUrl', 'Slug', 'KeyWords', 'Date', 'DateIn', 'DateOut'));
$formData->setActive(array("value" => "1", "visible" => FALSE));
$this->my_redirect = "admin/menu_top/select/";
parent::edit($formData, TRUE, NULL, $this->my_redirect, NULL, $ReturnResultVO);
}
示例2: getZipedFiles
/**
* envie por post uma array de ids de files, só os ids
* file/get_ziped_files
*/
public function getZipedFiles()
{
if (!UserClient::getId() > 0) {
//nao tem permissao
Navigation::redirect("405");
exit;
}
$array_file_ids = DataHandler::getValueByArrayIndex($_POST, "file_id");
//Debug::print_r($_REQUEST);
$array_file_vo = array();
if (is_array($array_file_ids)) {
foreach ($array_file_ids as $id) {
$FileVO = new FileVO();
$Result = $FileVO->setId($id, TRUE);
if ($Result->success == TRUE) {
$array_file_vo[] = $FileVO;
}
}
} else {
//erro, não é uma array, verifica se pelo menos é 1 único id
$id = DataHandler::forceInt($array_file_ids);
if ($id > 0) {
//é um id único
$FileVO = new FileVO();
$Result = $FileVO->setId($id, TRUE);
if ($Result->success == TRUE) {
$array_file_vo[] = $FileVO;
}
} else {
//erro mesmo, esse dado é zoado, estoura excessão
throw new Exception("No ids sended", 404);
exit;
}
}
//a pasta zip precisa existir
DataHandler::createFolderIfNotExist("upload/zip/");
//verifica o nome do arquivo baseado nos ids enviados conforme regra inventada agora
$zip_name = "upload/zip/" . md5(implode("|", $array_file_ids));
DataHandler::createFolderIfNotExist($zip_name);
$zip_name = $zip_name . "/teto.zip";
if (!file_exists($zip_name)) {
//echo Debug::li($zip_name);exit();
$Zip = new ZipArchive();
$Zip->open($zip_name, ZipArchive::CREATE);
foreach ($array_file_vo as $FileVO) {
$url = $FileVO->getUrl();
$array = explode("/", $url);
$file = $array[count($array) - 1];
$Zip->addFile($url, $file);
}
$Zip->close();
}
header("Location: " . Config::getRootPath($zip_name));
exit;
}
示例3: showCategory
function showCategory($categoryStd, $level)
{
$level0 = $level == 0 ? $categoryStd->name : "";
$level1 = $level == 1 ? $categoryStd->name : "";
$level2 = $level == 2 ? $categoryStd->name : "";
$return = "<tr class=\"gradeX\">";
$return .= "<td class=\"con0\">" . $level0 . "</td>";
$return .= "<td class=\"con1\">" . $level1 . "</td>";
$return .= "<td class=\"con0\">" . $level2 . "</td>";
$return .= "<td class=\"center con1\">\n \t<a href=\"" . Config::getRootPath("backend/category/edit/level.{$level}/id." . $categoryStd->id) . "\" class=\"iconlink2\"><img src=\"" . Config::getAsset('backend/assets/images/icons/small/black/edit.png') . "\" alt=\"\"></a>\n \t<a href=\"" . Config::getRootPath("backend/category/delete/id." . $categoryStd->id) . "\" class=\"iconlink2\"><img src=\"" . Config::getAsset('backend/assets/images/icons/small/black/close.png') . "\" alt=\"\"></a> \t\n \t</td>\n \t";
return $return;
}
示例4: edit
public function edit()
{
//busca o primeiro content vinculada com essa categoria
if ($this->category_id > 0) {
$CategoryVO = new CategoryVO();
$CategoryVO->setId($this->category_id, TRUE);
$array_content = $CategoryVO->getLinks("content", 1);
//se tiver mais de um link
if (count($array_content) > 0) {
//pega o primeiro pois aqui só importa 1.
$LinkVO = $array_content[0];
if (FALSE) {
//ajuda aptana
$LinkVO = new LinkVO();
}
//echo Debug::li("tem content vinculada com id:".$LinkVO->getLinkedTableId());
//inicia a ContentEncVO
$this->ContentEncVO->setId($LinkVO->getLinkedTableId(), TRUE);
}
}
//criar o formView
$formData = new ContentFormView($this->ContentEncVO, Config::getRootPath($this->my_action));
//trocando o rótulo para Content
$formData->setContent(array("label" => "Edite o texto:"));
$ImageFormView = new ImageFormView();
$ImageFormView->setFormLabel("Inserir Imagem");
//quando ta em outro idioma que não o padrao, não pode ter imagem
$ImageFormView->setQuantity(0);
$FileFormView = new FileFormView();
$FileFormView->setFormLabel("Inserir Arquivo");
$FileFormView->setQuantity(0);
if ($this->ContentEncVO->getId() > 0) {
//se tiver id significa que o content já foi adicionado alguma vez, então deixa queto
} else {
//seta o id dessa categoria caso não tenha nenhum content vinculado, pois essa categoria só admite 1 content
$formData->setCategory(array("selected" => array($this->category_id)));
}
$formData->setImage($ImageFormView);
$formData->setFile($FileFormView);
$formData->setMassiveAttr('visible', FALSE, array('Name', 'Title', 'Hat', 'Description', 'Author', 'TemplateUrl', 'Slug', 'KeyWords', 'Date', 'DateIn', 'DateOut', 'Order'));
$formData->setSlug(array("value" => "entre_em_contato", "visible" => FALSE));
$formData->setActive(array("value" => "1", "visible" => FALSE));
parent::edit($formData, TRUE, NULL, $this->my_redirect);
}
示例5: createFormData
private function createFormData($ReturnResultVO = NULL)
{
//busca o primeiro content vinculada com essa categoria
if ($this->category_id > 0) {
$CategoryVO = new CategoryVO();
$CategoryVO->setId($this->category_id, TRUE);
$array_content = $CategoryVO->getLinks("content", 1);
//se tiver mais de um link
if (count($array_content) > 0) {
//pega o primeiro pois aqui só importa 1.
$LinkVO = $array_content[0];
if (FALSE) {
//ajuda aptana
$LinkVO = new LinkVO();
}
//echo Debug::li("tem content vinculada com id:".$LinkVO->getLinkedTableId());
//inicia a ContentForumVO
$this->ContentSiteVO->setId($LinkVO->getLinkedTableId(), TRUE);
}
} else {
if ($this->content_id > 0) {
$this->my_action .= "/id.{$this->content_id}/";
}
}
$formData = new ContentFormView($this->ContentSiteVO, Config::getRootPath($this->my_action));
$ImageFormView = new ImageFormView();
$ImageFormView->setFormLabel("Selecionar Foto");
$ImageFormView->setQuantity(0);
// $ImageFormView->setDescription(array('label'=>Translation::text('Link'), 'visible'=>false, 'type'=>'simpleText'));
$FileFormView = new FileFormView();
$FileFormView->setFormLabel("Selecionar Arquivo");
$FileFormView->setQuantity(0);
// $formData->setPersonalInput(array("name"=>"destaque[]","label"=>"Mostrar em qual Menu?", "options"=>array((object) array("name"=>"Menu Topo", "id"=>"2"), (object) array("name"=>"Menu Rodapé", "id"=>"3"))));
//trocando o rótulo para Content
$formData->setDescription(array("label" => "Edite a coluna da Esquerda:", 'type' => 'htmlText'));
$formData->setContent(array("label" => "Edite a coluna da Direita:"));
$formData->setCategory(array("visible" => FALSE, "name" => "category[]", "selected" => array($this->category_id)));
$formData->setImage($ImageFormView);
$formData->setFile($FileFormView);
$formData->setMassiveAttr('visible', FALSE, array('Name', 'Title', 'Hat', 'Author', 'TemplateUrl', 'Slug', 'KeyWords', 'Date', 'DateIn', 'DateOut', 'Order'));
$formData->setActive(array("value" => "1", "visible" => FALSE));
$this->my_redirect = "admin/contact/edit/";
parent::edit($formData, TRUE, NULL, $this->my_redirect, NULL, $ReturnResultVO);
}
示例6: getContent
protected function getContent($id, $width = "400", $height = "400")
{
//pega a CategoryVO
$ContentVO = new ContentSiteVO();
$ContentVO->setId($id, TRUE);
$images = $ContentVO->getImages();
$stdResult = new stdClass();
$stdResult->title = $ContentVO->getTitle();
$stdResult->content = $ContentVO->getContent();
$stdResult->image_url = array();
if (count($images) > 0) {
foreach ($images as $image) {
$url = Config::getRootPath("/image/get_image/image_id." . $image->id . "/max_width.{$width}/max_height.{$height}/crop.1/");
//é o link
$stdResult->image_url[] = $url;
}
}
return $stdResult;
}
示例7:
However, the FileUpload user interface waits for CSS transition events in several callbacks,
if a "fade" class is present. These CSS transitions are defined by the Bootstrap CSS.
If it is not included, either remove the "fade" class from the upload/download templates,
or define your own "fade" class with CSS transitions.
-->
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css">
<link rel="stylesheet" href="http://blueimp.github.com/Bootstrap-Image-Gallery/bootstrap-image-gallery.min.css">
<link rel="stylesheet" href="<?php
echo Config::getAsset('backend/assets/upload/jquery.fileupload-ui.css');
?>
">
</head>
<body style="overflow:hidden;">
<br>
<form id="fileupload" action="<?php
echo Config::getRootPath('backend/equipe/commit_gallery/type.' . $HttpContentResult->gallery_type . '/id.' . $HttpContentResult->vo->id);
?>
" method="POST" enctype="multipart/form-data">
<?php
//Debug::print_r($HttpContentResult->vo->categories_dad);
foreach ($HttpContentResult->vo->categories_dad as $cat) {
?>
<input type="hidden" value="<?php
echo $cat;
?>
" name="category[]" />
<?php
}
?>
<div class="row">
<div class="span16 fileupload-buttonbar">
示例8: getHtml
function getHtml($templateItemSelecionado = "<li class=\"atual\">php[item]</li>", $templateItem = "<li><a href=\"php[link]\">php[item]</a></li>", $templateAnteriorAtivo = "<li class=\"ativo\"><a href=\"php[link]\"><</a></li>", $templateAnteriorInativo = "<li class=\"inativo\">anterior</li>", $templateProximoAtivo = "<li class=\"ativo\"><a href=\"php[link]\">></a></li>", $templateProximoInativo = "<li class=\"inativo\">próximo</li>", $templateSeparador = " ", $templatePaginacao = "<ul class=\"paginacao\"> \r\n\t\t\t\t\t\t\t\t\tphp[primeiro]\r\n\t\t\t\t\t\t\t\t\tphp[anterior]\r\n\t\t\t\t\t\t\t\t\tphp[paginacao]\r\n\t\t\t\t\t\t\t\t\tphp[proximo]\r\n\t\t\t\t\t\t\t\t\tphp[ultimo]\r\n\t\t\t\t\t\t\t\t\t</ul>", $linkAtual = "", $returnCleanIfDontNeedPages = TRUE, $templatePrimeiro = "<li class=\"ativo\"><a href=\"php[link]\"><<</a></li>", $templateUltimo = "<li class=\"ativo\"><a href=\"php[link]\">>></a></li>")
{
//devolve string
/*
public $paginaAtual_int;
public $limitePaginacao_int;
public $quantidadePorPagina_int;\
public $quantTotalResultados_int;
*/
// para uso do fácil
$paginaAtual = $this->paginaAtual_int;
$templateItemSelecionado = $templateItemSelecionado;
$templateItem = $templateItem;
$templateAnteriorAtivo = $templateAnteriorAtivo;
$templateAnteriorInativo = $templateAnteriorInativo;
$templateProximoAtivo = $templateProximoAtivo;
$templateProximoInativo = $templateProximoInativo;
$templateSeparador = $templateSeparador;
$templatePaginacao = $templatePaginacao;
$templateUltimo = $templateUltimo;
$templatePrimeiro = $templatePrimeiro;
$result = $templatePaginacao;
$quantTotalPagina = ceil($this->quantTotalResultados_int / $this->quantidadePorPagina_int);
$pagFinal = $quantTotalPagina;
$metadePaginacao = floor($this->limitePaginacao_int / 2);
$paginaInicial = 1;
if ($this->limitePaginacao_int > 0) {
// faz o calculo se tiver limite
if ($quantTotalPagina > $this->limitePaginacao_int) {
$paginaInicial = $this->paginaAtual_int - $metadePaginacao;
if ($paginaInicial < 1) {
$paginaInicial = 1;
}
}
}
if ($this->limitePaginacao_int > 0) {
//só faz o calculo se tiver limite
$paginaFinal = $paginaInicial + $this->limitePaginacao_int;
} else {
$paginaFinal = $quantTotalPagina;
}
//verificando se a página final não está acima da quantidade de resultados
if ($paginaFinal > $quantTotalPagina) {
$paginaFinal = $quantTotalPagina;
}
// montando o link do a href=''
if (empty($linkAtual)) {
$linkAtual = Config::getRootPath(DataHandler::removeDobleBars(str_replace(Config::getRootApplication(), "", $_SERVER["REQUEST_URI"])));
}
if ($returnCleanIfDontNeedPages && $this->quantTotalResultados_int <= $this->quantidadePorPagina_int) {
//se não precisar de paginação, e for enviado que quando isso acontecer retornar vazio, lá vai o vazio
return "";
}
$primeira = str_replace("/pag.{$paginaAtual}", "/pag.1", $linkAtual);
if ($paginaAtual > 1) {
$ultima = str_replace("/pag.{$paginaAtual}", "/pag." . $paginaFinal, $linkAtual);
} else {
$ultima = $linkAtual . "/pag." . $pagFinal;
}
//exit();
if (strpos($linkAtual, "/pag.{$paginaAtual}")) {
//entra aqui se existe a tag de página no padrao com a página atual setada
$anterior = str_replace("/pag.{$paginaAtual}", "/pag." . ($this->paginaAtual_int - 1), $linkAtual);
$proximo = str_replace("/pag.{$paginaAtual}", "/pag." . ($this->paginaAtual_int + 1), $linkAtual);
} else {
if (strpos($linkAtual, "/pag.")) {
//entra aqui se tiver em alguma página setada
$anterior = @ereg_replace("pag\\.[0-9]+", "pag." . ($this->paginaAtual_int - 1), $linkAtual);
$proximo = @ereg_replace("pag\\.[0-9]+", "pag." . ($this->paginaAtual_int + 1), $linkAtual);
} else {
//entra aqui se nunca foi setada nenhuma página
$anterior = $linkAtual . "/pag." . ($this->paginaAtual_int - 1);
$proximo = $linkAtual . "/pag." . ($this->paginaAtual_int + 1);
}
}
$anterior = str_replace("http://", "", $anterior);
$proximo = str_replace("http://", "", $proximo);
$primeira = str_replace("http://", "", $primeira);
$ultima = str_replace("http://", "", $ultima);
$anterior = str_replace("//", "/", $anterior);
$proximo = str_replace("//", "/", $proximo);
$primeira = str_replace("//", "/", $primeira);
$ultima = str_replace("//", "/", $ultima);
$anterior = "http://" . $anterior;
$proximo = "http://" . $proximo;
$primeira = "http://" . $primeira;
$ultima = "http://" . $ultima;
$temp_primeira = str_replace("php[link]", $primeira, $templatePrimeiro);
$temp_ultima = str_replace("php[link]", $ultima, $templateUltimo);
//definindo qual template usar para o botao anterior
$temp_anterior = "";
if ($this->paginaAtual_int > 1) {
//existe uma página proxima a esta
$temp_anterior = $templateAnteriorAtivo;
//echo Debug::li($temp_anterior);
$temp_anterior = str_replace("php[link]", $anterior, $temp_anterior);
//echo Debug::li($temp_anterior);
//exit();
} else {
$temp_anterior = $templateAnteriorInativo;
//.........这里部分代码省略.........
示例9: sendToFriend
public function sendToFriend()
{
$returnResult = new HttpResult();
$retornoDaPaginaHTML = new HttpRoot();
$returnResult->setHttpContentResult($retornoDaPaginaHTML);
if (!isset($_POST["action"])) {
$protuct_id = DataHandler::forceInt(DataHandler::getValueByArrayIndex($this->arrayVariable, "id"));
$retornoDaPaginaHTML->form_action = Config::getRootPath("produto/send_to_friend");
$retornoDaPaginaHTML->view = "form";
$retornoDaPaginaHTML->product_id = $protuct_id;
} else {
$postData = (object) $_POST;
$ContentSiteVO = new ContentSiteVO();
$ReturnResult_vo = $ContentSiteVO->setId($postData->id, TRUE);
if ($ReturnResult_vo->success) {
$stdProduct = $ContentSiteVO->toStdClass();
$stdProduct->array_gallery = $ContentSiteVO->getImages(NULL, "gallery", true);
// Debug::print_r($stdProduct); die;
$template = file_get_contents(Config::getFolderView("/templates/email_produto.php"));
$tpl_img_path = Config::getRootPath(Config::getFolderView());
$recover_logo = $stdProduct->hat == 1 ? '<img style="" src="' . $tpl_img_path . '/assets/images/recover-min.png" />' : "";
$first_image = sprintf("<img width='400px' src='%s' />", Config::getRootPath($stdProduct->array_gallery[0]->url));
$replace_from = array("###PRODUCT_URI###", "###IMG_PATH###", "###TITLE###", "###HAT###", "###CONTENT###", "###IMG###", "###SENDER_NAME###", "###SENDER_EMAIL###", "###RECEIVER_NAME###", "###RECEIVER_MAIL###", "###RECEIVER_MESSAGE###");
$replace_to = array(Config::getRootPath('produto/id.' . $stdProduct->id . '/' . $stdProduct->slug), $tpl_img_path, utf8_decode($stdProduct->title), $recover_logo, $stdProduct->content, $first_image, $postData->sender_name, $postData->sender_email, $postData->receiver_name, $postData->receiver_email, $postData->receiver_message);
$template = str_replace($replace_from, $replace_to, $template);
// var_dump( $stdProduct , $postData ) ;
// echo $template ; die;
$host = Config::SYSTEM_MAIL_SMTP;
$mail = Config::SYSTEM_MAIL_LOGIN;
$senha = Config::SYSTEM_MAIL_PASSWORD;
// var_dump( $host , $mail , $senha ) ; die ;
ob_start();
$smtp = new Smtp($host, 587);
$smtp->user = $mail;
$smtp->pass = $senha;
$smtp->debug = true;
// $from = "'" . $postData->sender_name . "' <" . Config::SYSTEM_MAIL_FROM . ">" ;
// $to = "'" . $postData->sender_name . "' <" . $postData->receiver_mail . ">" ;
$from = Config::SYSTEM_MAIL_FROM;
$to = $postData->receiver_email;
$subject = "Indicação de produto";
$msg = $template;
$retornoDaPaginaHTML->sucess = $smtp->Send($to, $from, $subject, $msg, "text/html") ? true : false;
ob_end_clean();
//var_dump( $send ) ;
}
$retornoDaPaginaHTML->view = "result";
}
return $returnResult;
}
示例10: foreach
$printed_fields = 0;
foreach ($HttpContentResult->arrayVariable->array_image as $image) {
// print_r($image);
$imagePath = Config::getRootPath("image/get_image/image_id.{$image->id}/max_width.150/max_heigth.150");
// $delete_URL = Config::getRootPath("image/get_image/id.{$image->id}/max_width.150/max_heigth.150");
$data = $model;
preg_match_all("/###VALUE_([a-zA-Z_]+)###/", $model, $out);
for ($i = 0; $i < sizeof($out[0]); $i++) {
$attr = strtolower($out[1][$i]);
$data = str_replace($out[0][$i], $image->{$attr}, $data);
}
$data = str_replace("###IMAGE_TAG###", "<img src='{$imagePath}' />", $data);
$data = str_replace("###DELETE_TAG###", "<a class='delete btn' href='image_{$image->id}'>" . Translation::text('delete') . "</a>", $data);
// print_r($formView->getShowImageUrl());
if ($formView->getShowImageUrl()) {
$data = str_replace("###IMAGE_URL###", "<spam class='url'><b>Url da imagem:</b>" . Config::getRootPath("image/get_image/natural_size.true/direct_show.1/image_id." . $image->id), $data) . "</spam>";
} else {
$data = str_replace("###IMAGE_URL###", "", $data);
}
echo $data;
$printed_fields++;
/// die;
}
$model = preg_replace('/###([a-zA-Z_]+)###/', '', $model);
for ($i = $printed_fields; $i < $quantity; $i++) {
echo $model;
}
echo "</div>";
if ($multi_fields) {
echo "<input class='add_more_input btn' id='add_more_images' type='button' name='" . Translation::text('Add more') . "' value='" . Translation::text("add more") . " '/>";
}
示例11:
<?php
include Config::getFolderView('/backend/head.php');
?>
<body class="bodygrey">
<?php
include Config::getFolderView('/backend/nav.php');
include Config::getFolderView('/backend/client/nav-in.php');
?>
<div class="maincontent">
<form action="<?php
echo Config::getRootPath('backend/client/family/commit/');
?>
" method="post">
<div class="form_default">
<p>
<label for="name">Familia</label>
<input type="text" name="title" class="sf" value="" />
</p>
<p>
<button>Adicionar</button>
</p>
</div><!--form-->
</form>
</div>
</body>
</html>
示例12: foreach
<colgroup>
<col class="con0" />
<col class="con1" />
<col class="con0" />
<col class="con1" />
</colgroup>
<tbody>
<?php
if (isset($HttpContentResult->arrayContentsVO)) {
foreach ($HttpContentResult->arrayContentsVO as $row) {
$img_array = $row->getImages(NULL, "tagged");
$img_tag = "";
if (count($img_array) > 0) {
$img = $img_array[0];
//Debug::print_r($img);
$url = Config::getRootPath("image/get_image/image_id." . $img->id . "/max_width.30/max_height.30/crop.1/");
$img_tag = "<img src=\"{$url}\" />";
}
//verifica se está checado
$checked = in_array($row->id, $HttpContentResult->vo->products_links) ? " checked=checked " : " ";
?>
<tr class="gradeA">
<td><input <?php
echo $checked;
?>
onclick="toogleSelect(this)" id="check_<?php
echo $HttpContentResult->vo->id;
?>
_<?php
echo $row->id;
示例13: show
public function show($_return = FALSE)
{
$url_config = Config::getRootPath("config");
$head = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n";
$head .= '<html xmlns="http://www.w3.org/1999/xhtml">' . "\n";
$head .= '<head>' . "\n";
$head .= '<meta http-equiv="X-UA-Compatible" content="IE=edge" >' . "\n";
$head .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />' . "\n";
$head .= '<meta name="description" content="' . $this->description . '" />' . "\n";
$head .= '<meta name="keywords" content="' . $this->keywords . '" />' . "\n";
$head .= '<title>' . $this->title . '</title>' . "\n";
$head .= '<link rel="shortcut icon" type="image/x-icon" href="' . Config::getImagePath("favicon.ico") . '" />';
$head .= "\n<script type=\"text/javascript\" >";
//pega as variaveis do config php e deixa visivel para js em contexto global
$head .= "var ROOT_PATH = '" . Config::getRootPath() . "';";
$head .= "var NEXT_URL = '" . Config::getNextUrl() . "';";
$head .= "var LAST_URL = '" . Config::getLastUrl() . "';";
$head .= "var LOCALE = '" . Config::getLocale() . "';";
$head .= "</script>\n";
$head .= '<link rel="apple-touch-icon" href="' . Config::getImagePath("icon-ipad.jpg") . '" />';
foreach ($this->css as $slug => $data) {
$file_path = $slug . '.css';
$uri_path = Config::getAsset('assets/css/' . $file_path);
$sys_path = Config::getFolderView('assets/css/' . $file_path);
if (!file_exists($sys_path)) {
$file_path = strpos('.css', $data->path) === FALSE ? $data->path . '.css' : $data->path;
$uri_path = Config::getAsset('assets/' . $file_path);
$sys_path = Config::getFolderView('assets/' . $file_path);
if (!file_exists($sys_path)) {
var_dump($slug, '---', $data, $file_path);
echo "<!-- arquivo CSS {$uri_path} não encontrado (tentando no file_system : {$sys_path} )-->\n";
exit;
continue;
}
}
if ($data->ieOnly) {
$head .= "\n<!--[if IE]>";
}
$head .= "\n<link type=\"text/css\" media=\"" . $data->media . "\" rel=\"stylesheet\" href=\"" . $uri_path . "\" />";
if ($data->ieOnly) {
$head .= "\n<![endif]-->";
}
}
foreach ($this->js as $slug => $path) {
$file_path = $slug . '.js';
$uri_path = Config::getAsset('assets/js/' . $file_path);
$sys_path = Config::getFolderView('assets/js/' . $file_path);
if (!file_exists($sys_path)) {
$file_path = strpos('.js', $path) === FALSE ? $path . '.js' : $path;
$uri_path = Config::getAsset('assets/' . $file_path);
$sys_path = Config::getFolderView('assets/' . $file_path);
if (!file_exists($sys_path)) {
echo "<!-- arquivo JS {$uri_path} não encontrado (tentando no file_system : {$sys_path} )-->\n";
continue;
}
}
$head .= "\n<script type=\"text/javascript\" src=\"" . $uri_path . "\"></script>";
}
$head .= "\n</head>";
if ($_return) {
return $head;
}
echo $head;
}
示例14:
controls: {
cut: { visible: true },
copy: { visible: true },
paste: { visible: true }
}
});
});
</script>
<body class="bodygrey">
<?php
include Config::getFolderView('/backend/nav.php');
include Config::getFolderView('/backend/info_estrutura/nav-detail.php');
?>
<div class="maincontent">
<form action="<?php
echo Config::getRootPath('backend/info_estrutura/commit/id.' . $id);
?>
" method="post">
<div class="form_default">
<?php
//Debug::print_r($HttpContentResult->vo->categories_dad);
foreach ($HttpContentResult->vo->categories_dad as $cat) {
?>
<input type="hidden" value="<?php
echo $cat;
?>
" name="category[]" />
<?php
}
?>
示例15:
" />
<script type="text/javascript"><?php
include Config::getFolderView('/assets/js/home.php');
?>
</script>
</head>
<body>
<div id="content">
<div id="header">
<ul>
<li style="margin-left:60px;"><a href="<?php
echo Config::getRootPath('produtos');
?>
">Produtos</a></li>
<li><a href="<?php
echo Config::getRootPath('clientes');
?>
">clientes</a></li>
</ul>
<div id="line"></div>
</div>
<div id="products">
<?php
foreach ($HttpContentResult->produtos as $produto) {
?>
<div class="products" id="products-<?php
echo $i;
?>
">
<?php
Debug::print_r($produto);