本文整理汇总了PHP中Config::getFolderView方法的典型用法代码示例。如果您正苦于以下问题:PHP Config::getFolderView方法的具体用法?PHP Config::getFolderView怎么用?PHP Config::getFolderView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Config
的用法示例。
在下文中一共展示了Config::getFolderView方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($door = "")
{
//iniciando a config básico, a menos que exita outro config, este vai ser o que vai ficar valendo
$domain = Navigation::getURIDomain();
if ($door) {
//use em $door ":8080" por exemplo
$domain = str_replace($door, "", $domain);
}
include "configs/" . $domain . "/config.php";
//se não foi passado algum locale na url apos o nome do site faz um redirect passando o locale padrão
$folders_array = Navigation::getURI(Config::getAliasFolder(), Navigation::URI_RETURN_TYPE_ARRAY);
$locale = Config::getLocale();
Translation::setLocale($locale);
//inicia e pega resultado da controller
$this->HttpResult = $this->getControllerResult();
//agora verifica que tipo de retorno esperado e chama a view, se for o caso
$ignore_name = Config::getAliasFolder();
if (Config::getLocale()) {
$ignore_name .= "/" . Config::getLocale();
}
//url com trata com regras de rota
$url = explode("/", Config::rewriteUrl(Navigation::getURI($ignore_name, Navigation::URI_RETURN_TYPE_STRING)));
$retornoDaView = self::searchFile($url, Config::getFolderView());
if ($retornoDaView->success) {
//echo Debug::li("retornoDaView:".$retornoDaView->urlToInclude);
$this->view = $retornoDaView->urlToInclude;
} else {
$this->view = Config::getFolderView() . "/index.php";
}
}
示例2: __construct
public function __construct()
{
//iniciando a config básico, a menos que exita outro config, este vai ser o que vai ficar valendo
include "configs/" . str_replace(":8888", "", Navigation::getURIDomain()) . "/config.php";
//se não foi passado algum locale na url apos o nome do site faz um redirect passando o locale padrão
//echo Debug::li(Config::getAliasFolder());
$folders_array = Navigation::getURI(Config::getAliasFolder(), Navigation::URI_RETURN_TYPE_ARRAY);
//echo Debug::li(Config::getRootApplication());
//$folders_array = Navigation::getURI(Config::getAliasFolder(), Navigation::URI_RETURN_TYPE_ARRAY);
$locale = Config::getLocale();
Translation::setLocale($locale);
//inicia e pega resultado da controller
$this->HttpResult = $this->getControllerResult();
//agora verifica que tipo de retorno esperado e chama a view, se for o caso
$ignore_name = Config::getAliasFolder();
if (Config::getLocale()) {
$ignore_name .= "/" . Config::getLocale();
}
//url com trata com regras de rota
$url = explode("/", Config::rewriteUrl(Navigation::getURI($ignore_name, Navigation::URI_RETURN_TYPE_STRING)));
$retornoDaView = self::searchFile($url, Config::getFolderView());
//Navigation::searchFileOrFolder(Config::getRootApplication()."/".Config::getLocale(), Config::getFolderView(), Navigation::SEARCH_FILE_MODE_FILE);
//echo Debug::li("retornoDaView");
//Debug::print_r($retornoDaView);
if ($retornoDaView->success) {
//echo Debug::li("retornoDaView:".$retornoDaView->urlToInclude);
$this->view = $retornoDaView->urlToInclude;
} else {
$this->view = Config::getFolderView() . "/index.php";
}
//exit();
//Debug::print_r("[SEARCH_FILE_MODE_CLASS_AND_METHOD]:".Navigation::searchFileOrFolder(Config::FOLDER_ROOT_APPLICATION, "view/democrart/", Navigation::SEARCH_FILE_MODE_CLASS_AND_METHOD, "", TRUE));
}
示例3: generate
/**
* @param $captcha_code
* @return exibição de imagem
* @desc é necessário passar o codigo gerado pela classe NakedEncrypt
*/
static function generate($captcha_code)
{
// Seleciona uma imagem que está na pasta bg/ com o nome 0.jpg à 9.jpg,
// está imagem que vai ser o fundo da nossa imagem de segurança.
$backgoundImage = Config::getFolderView("captcha/naked/");
$backgoundImage .= rand(0, 9);
$backgoundImage .= ".jpg";
//posicionamento de horizontal
$x = 10;
//posicionamento de vertical
$y = 0;
// Separo o codigo de dois em dois numeros e transformo em caracter para formar a string do captcha
for ($i = 1; $i < strlen($captcha_code) / 3; $i++) {
$char = chr($captcha_code[$i] . $captcha_code[$i + 1]);
// Gera um fontSize para a fonte de 3 à 5.
$fontSize = rand(3, 5);
// Seleciona as color RGB, menos muito clara, pois o fundo é branco, por isso de 0 à 200.
$sel_colorR = rand(0, 200);
$sel_colorG = rand(0, 200);
$sel_colorB = rand(0, 200);
// Joga os caracteres em um determinado lugar da imagem, x e y, sendo x sempre ele mais ele, pra não perder a ordem.
// Nome que começa em 10 e termina em 30, pois temos 6 caracteres, e nossa imagem tem 180px,
// por isso que vai ser de 30 em 30. e 10 para não ficar um caractere em cima do outro.
$x += rand(10, 30);
// o Y vai de 0 a 30, não a 50, pois pode colortar pois nossa imagem é de 50 px de altura.
$y = rand(0, 30);
// Aqui crio a color de cada caractere, RGB.
$color = imagecolorallocate($image, $sel_colorR, $sel_colorG, $sel_colorB);
// desenho o lugar dos caracteres de acolordo com as posições x e y.
imagestring($image, $fontSize, $x, $y, $char, $color);
}
// Cria a imagem.
return $image = imagecreatefromjpeg($backgoundImage);
}
示例4: __construct
public function __construct($arrayRestFolder = NULL)
{
if ($arrayRestFolder != NULL) {
$this->arrayVariable = Navigation::getVariableArraySlug($arrayRestFolder);
$this->arrayRestFolder = $arrayRestFolder;
//por padrão ele popula as infos que ele possui com o que veio na restFolder, pode ser resetado utilizando resetInfoPost
$this->infoPost = new FileInfoPostVO($this->arrayVariable);
}
$this->defaultFolderForNewFiles = Config::getFolderView() . "/upload/file/";
$this->moduleName = "facil_file";
}
示例5: init
public function init()
{
$returnResult = parent::init();
//$ContentVO->toStdClass(Config::getLocale());
$SelectData = new ContentSelectView($this->arrayContentsVO);
$SelectData->setGoToLocation(array("value" => "admin/menu_top"));
$SelectData->gerate();
$SelectData->setMassiveAttr('visible', FALSE, array('Name', 'Hat', 'Description', 'Content', 'Author', 'TemplateUrl', 'Slug', 'KeyWords', 'Date', 'DateIn', 'DateOut', 'Order'));
$SelectData = $SelectData->getFormData();
$HttpContentResult = $returnResult->getHttpContentResult();
$HttpContentResult->selectData = $SelectData;
$returnResult->setHttpContentResult($HttpContentResult);
$HttpResult = $returnResult;
//para o botao de inserir
$HttpContentResult->url_insert = Config::getRootPath("admin/menu_top/insert/");
include Config::getFolderView('admin/content/select.php');
exit;
//print_r($returnResult);exit();
return $returnResult;
}
示例6: init
public function init()
{
if ($this->sub == "blog") {
$returnResult = parent::init("id", " DESC ");
} else {
$returnResult = parent::init();
}
//blog é id 36
//$ContentVO->toStdClass(Config::getLocale());
//Debug::print_r($this->arrayRestFolder[1]);exit();
$SelectData = new ContentSelectView($this->arrayContentsVO);
$SelectData->setGoToLocation(array("value" => "admin/page"));
$SelectData->gerate();
$SelectData->setMassiveAttr('visible', FALSE, array('Name', 'Hat', 'Description', 'Content', 'Author', 'TemplateUrl', 'KeyWords', 'Date', 'DateIn', 'DateOut', 'Order'));
$SelectData->title["label"] = "Titulo:";
$SelectData->slug["label"] = "Url:";
$SelectData->slug["type"] = "url_local";
//faz com que mostre a config::getRootPatc + url
$SelectData = $SelectData->getFormData();
$HttpContentResult = $returnResult->getHttpContentResult();
$HttpContentResult->selectData = $SelectData;
$returnResult->setHttpContentResult($HttpContentResult);
$HttpResult = $returnResult;
$HttpContentResult->sub = $this->sub;
//para o botao de inserir
$HttpContentResult->url_insert = Config::getRootPath("admin/page/insert/{$this->sub}");
$content_sub = Config::getFolderView("admin/content/{$this->sub}/select.php");
if (file_exists($content_sub)) {
include $content_sub;
exit;
}
include Config::getFolderView('admin/content/select.php');
exit;
//print_r($returnResult);exit();
return $returnResult;
}
示例7: isset
<?php
$HttpContentResult = $HttpResult->getHttpContentResult();
$id = isset($HttpContentResult->vo->id) ? $HttpContentResult->vo->id : "";
//print_r($HttpContentResult->vo);
include Config::getFolderView('/backend/head.php');
?>
<body class="bodygrey">
<?php
include Config::getFolderView('/backend/nav.php');
include Config::getFolderView('/backend/info/nav-detail.php');
?>
<div class="maincontent">
<a href="<?php
echo Config::getRootPath('backend/info/gallery/upload/type.' . $HttpContentResult->gallery_type . '/id.' . $HttpContentResult->vo->id);
?>
" class="iconlink" id="upload" style="margin-top:15px; margin-left: 15px;"><img src="<?php
echo Config::getAsset('backend/assets/images/icons/small/black/video.png');
?>
" class="mgright5" alt=""> <span>Upload</span></a>
<div class="left">
<div id="gallery" class="gallery">
<ul class="submenu">
<li class="current"><a href="#gridview">Grid View</a></li>
<li><a href="#listview">List View</a></li>
</ul>
<br />
<div id="gridview" class="thumbview">
<?php
示例8: __construct
<?php
include_once "library/facil3/core/modules/category/dao/CategoryDAO.class.php";
include_once Config::FOLDER_APPLICATION . "modules/content/dao/ContentSiteDAO.class.php";
include_once "library/facil3/core/controller/interface/HTTPControllerInterface.class.php";
include_once Config::getFolderView("/content_module/HttpContentModule.class.php");
include_once "library/facil3/core/modules/file/dao/FileDAO.class.php";
include_once "library/facil3/navigation/http/HttpResult.class.php";
include_once DataHandler::removeDobleBars(Config::getFolderView() . "/HttpRoot.class.php");
/**
* @author Renato Miawaki
* @desc Controller central, se nenhuma outra controller for encontrada, esta controller é iniciada
* init é chamada caso nenhum metodo que combine com a requisição seja encontrada
*/
class Produtos
{
private $arrayRestFolder = array();
private $arrayVariable = array();
private $DAO;
public function __construct($arrayRestFolder)
{
Config::getConection();
$this->DAO = CategoryDAO::getInstance();
if ($arrayRestFolder != NULL) {
$this->arrayRestFolder = $arrayRestFolder;
$this->arrayVariable = Navigation::getVariableArraySlug($this->arrayRestFolder);
//$this->MenuController = new MenuController($this->arrayVariable);
}
}
/**
* para listagem de produtos
示例9: function
active = 0;
}
$.ajax({
url: ROOT_URL+'backend/info_segmento/update_active/id.'+id+"/active."+active+"/",
dataType: 'json',
data: { },
success: function(data){
//alert("salvo");
}
});
}
</script>
<body class="bodygrey">
<?php
include Config::getFolderView('/backend/nav.php');
include Config::getFolderView('/backend/info_estrutura/nav-in.php');
?>
<div class="maincontent">
<div class="left">
<table cellpadding="0" cellspacing="0" border="0" class="dyntable" id="example">
<thead>
<tr>
<th class="head0" width="5%">ID</th>
<th class="head1" width="35%">Página</th>
<th class="head0" width="35%">Slug</th>
<th class="head1" width="15%"></th>
<th class="head0" width="10%">Ações</th>
</tr>
</thead>
<colgroup>
示例10: cliente
/**
*
* Para acessar isso aqui seria a url: pdf_download/produto/id.N/
*/
public function cliente($id = false)
{
if ($id == FALSE) {
$id = DataHandler::forceInt(DataHandler::getValueByArrayIndex($this->arrayVariable, "id"));
}
if ($id > 0) {
$ContentSiteVO = new ContentSiteVO();
$ReturnResult_vo = $ContentSiteVO->setId($id, TRUE);
if ($ReturnResult_vo->success) {
$stdProduct = $ContentSiteVO->toStdClass();
$stdProduct->array_gallery = $ContentSiteVO->getImages(NULL, "gallery", true);
$stdProduct->array_tagged = $ContentSiteVO->getImages(NULL, "tagged", true);
$html_start = "<html><body>";
$html_end = "</body></html>";
$detail_page = file_get_contents(Config::getFolderView("/PdfDownload/detail.tpl"));
$image_page = file_get_contents(Config::getFolderView("/PdfDownload/image.tpl"));
$dimension_page = file_get_contents(Config::getFolderView("/PdfDownload/dimension.tpl"));
$tpl_img_path = "view/site/";
//Config::getAsset() ;
$recover_logo = $stdProduct->hat == 1 ? '<img style=" margin-top: 4px; margin-left: 5px; " src="' . $tpl_img_path . '/PdfDownload/recover_logo.png" />' : "";
$stdProduct->description = utf8_decode($stdProduct->description);
$stdProduct->title = utf8_decode($stdProduct->title);
$stdProduct->content = utf8_decode($stdProduct->content);
$common_tpl_data = array("###IMG_TPL_PATH###", "###content###", "###title###", "###PRODUCT_URI###", "###recover_logo###");
$common_data = array($tpl_img_path, $stdProduct->content, $stdProduct->title, Config::getRootPath('produto/id.' . $stdProduct->id . '/' . $stdProduct->slug), $recover_logo);
$detail_page = str_replace($common_tpl_data, $common_data, $detail_page);
$image_page = str_replace($common_tpl_data, $common_data, $image_page);
$dimension_page = str_replace($common_tpl_data, $common_data, $dimension_page);
$detail_page = str_replace("###description###", $stdProduct->description, $detail_page);
$html = $html_start . $detail_page;
foreach ($stdProduct->array_gallery as $image) {
$w = 600;
$h = 550;
$img_url = "image/get_image/image_id." . $image->id . "/max_width.{$w}/max_height.{$h}/";
// Debug::print_r( $img_url ) ;
// $tmp = file_get_contents( $img_url ) ;
// unset( $tmp ) ;
// $new_page = str_replace( "###IMAGE_SRC###" , Config::getRootPath( "image/get_image/image_id." . $image->id . "/max_width.600/max_height.525/" ) , $image_page ) ;
// $new_page = str_replace( "###IMAGE_SRC###" , $image->url , $image_page ) ;
$img_name = preg_replace("/\\.jpg\$/", "", $image->url);
// $sys_img = $img_name . "_w{$w}_h{$h}_m_no_crop.jpg" ;
$sys_img = $img_name . "_w{$w}_h{$h}_m_cache_crop.jpg";
// Debug::print_r($sys_img ) ;
// var_dump( file_exists($sys_img) ) ;
// die;
$new_page = str_replace("###IMAGE_SRC###", $sys_img, $image_page);
// Debug::print_r( $image ) ; die;
$html .= $new_page;
// break;
}
$html .= $html_end;
// echo $html ; die;
$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->render();
//$dompdf->stream( "upload/pdf/" . $stdProduct->id . "/" . $stdProduct->slug . ".pdf") ;
$file = $stdProduct->slug . ".pdf";
$path = "upload/pdf/" . $stdProduct->id . "/";
if (!dir($path)) {
mkdir($path, 0777, true);
}
$html_file = "print.html";
$html = str_replace("src=\"", "src=\"" . Config::getRootPath(), $html);
$fp = fopen($path . $html_file, "w");
fwrite($fp, $html);
fclose($fp);
$pdfoutput = $dompdf->output();
// $filename = $output;
$fp = fopen($path . $file, "w");
fwrite($fp, $pdfoutput);
fclose($fp);
return true;
} else {
//não achou um produto com esse id
return false;
Navigation::redirect("");
}
} else {
return false;
//não mandou o id, vai pra listagem ((!?) TODO: ver se é isso mesmo)
Navigation::redirect("clientes");
}
}
示例11: __construct
<?php
include_once "library/facil3/navigation/http/HttpResult.class.php";
include_once "library/facil3/core/controller/interface/HTTPControllerInterface.class.php";
include_once DataHandler::removeDobleBars(Config::getFolderView() . "/client/account/PurchaseInfo.class.php");
include_once "library/facil3/core/acl/UserClient.php";
include_once "library/e_commerce/modules/coupon/dao/CouponDAO.class.php";
include_once "library/e_commerce/modules/coupon/vo/CouponVO.class.php";
include_once "library/e_commerce/modules/purchase/dao/PurchaseOrderDAO.class.php";
include_once "library/e_commerce/modules/money_history/MoneyHistory.class.php";
include_once 'view/democrart/client/account/MoneyHistoryInfo.class.php';
include_once 'library/democrart/modules/partner/dao/PartnerDAO.class.php';
include_once Config::FOLDER_APPLICATION . "controller/admin/default/Content.php";
include_once "library/facil3/core/modules/category/dao/CategoryDAO.class.php";
include_once Config::FOLDER_APPLICATION . "modules/content/vo/ContentSiteVO.class.php";
include_once "library/facil3/core/dao/LinkDAO.class.php";
class Account implements HTTPControllerInterface
{
private $arrayRestFolder = array();
private $arrayVariable = array();
private $DAO;
public function __construct($arrayRestFolder = NULL)
{
if (!UserClient::isAlive()) {
Navigation::redirect("client/login");
exit;
}
$id_user = UserClient::getId();
$PartnerDAO = PartnerDAO::getInstance();
$ReturnPartnerDAO = $PartnerDAO->selectById($id_user);
if ($ReturnPartnerDAO->success && count($ReturnPartnerDAO->result) > 0) {
示例12: isset
<?php
$HttpContentResult = $HttpResult->getHttpContentResult();
//de onde veio o usuário $to
$to = isset($HttpContentResult->to) ? $HttpContentResult->to : "";
include Config::getFolderView('/backend/head.php');
?>
<body style="background:#fff;">
<div class="loginlogo">
<img src="images/logo.png" alt="Logo" />
</div><!--loginlogo-->
<div class="notification notifyError loginNotify">Invalid username or password. (Type anything)</div>
<?php
//Retorna o erro do login
if ($HttpContentResult->returnResult != NULL) {
if (!$HttpContentResult->returnResult->success) {
?>
<div class="notification notifyError loginNotify" style="display:block;">
<?php
echo $HttpContentResult->returnResult->message;
?>
</div>
<?php
}
}
?>
<form id="loginform" action="<?php
echo Config::getRootPath('backend/login/check/to/' . $to);
示例13:
<?php
include Config::getFolderView('/backend/head.php');
?>
<body class="bodygrey">
<?php
include Config::getFolderView('/backend/nav.php');
include Config::getFolderView('/backend/product/nav-in.php');
?>
<div class="maincontent">
<form action="<?php
echo Config::getRootPath('backend/product/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>
示例14: isset
<?php
$HttpContentResult = $HttpResult->getHttpContentResult();
$id = isset($HttpContentResult->vo->id) ? $HttpContentResult->vo->id : "";
$name = isset($HttpContentResult->vo->id) ? $HttpContentResult->vo->name : "";
?>
<?php
include Config::getFolderView('/backend/head.php');
?>
<body class="bodygrey">
<?php
include Config::getFolderView('/backend/nav.php');
include Config::getFolderView('/backend/category/nav-in.php');
?>
<div class="maincontent">
<form action="<?php
echo Config::getRootPath('backend/category/commit/id.' . $id);
?>
" method="post">
<div class="form_default">
<?php
if (isset($HttpContentResult->array_category)) {
if ($HttpContentResult->array_category != NULL) {
?>
<p>
<label for="category_id">Superior</label>
<select name="category_id">
<?php
示例15: lembrarSenha
public function lembrarSenha()
{
$ReturnResultVO = new ReturnResultVO();
$email = DataHandler::getValueByArrayIndex($_GET, "email");
$DAO = UserDAO::getInstance();
$ResultData = $DAO->select(UserDAO::RETURN_STD_OBJECT, $id = NULL, $active = NULL, $user_type_id = NULL, $login = NULL, $password = NULL, $email = $email);
$ReturnResultVO->success = $ResultData->success;
if ($ResultData->success) {
if (count($ResultData->result) > 0) {
$userStd = $ResultData->result[0];
//Debug::print_r($userStd);
//======
$smtp = new Smtp(Config::SYSTEM_MAIL_SMTP, 587);
$smtp->user = Config::SYSTEM_MAIL_LOGIN;
$smtp->pass = Config::SYSTEM_MAIL_PASSWORD;
ob_start();
$smtp->debug = true;
$from = Config::SYSTEM_MAIL_FROM;
$to = $VO->getEmail();
$subject = "Teto lembrar senha";
$mensagem = file_get_contents(Config::getFolderView("/templates/email_para_lembrar_senha.html"));
$mensagem = str_replace("###login", $userStd->login, $mensagem);
$mensagem = str_replace("###senha", $userStd->password, $mensagem);
$smtp->Send($to, $from, $subject, $mensagem, "text/html");
ob_end_clean();
}
}
echo $ReturnResultVO->toJson();
exit;
}