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


PHP Check::Data方法代码示例

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


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

示例1: setData

 private function setData()
 {
     $this->Data = array_map('strip_tags', $this->Data);
     $this->Data = array_map('trim', $this->Data);
     $this->Data['category_name'] = Check::Name($this->Data['category_title']);
     $this->Data['category_date'] = Check::Data($this->Data['category_date']);
     $this->Data['category_parent'] = $this->Data['category_parent'] == 'null' ? null : $this->Data['category_parent'];
 }
开发者ID:jairophp,项目名称:projetoSoftware,代码行数:8,代码来源:AdminCategory.class.php

示例2: Data

 public static function Data($Data)
 {
     self::$Format = explode(' ', $Data);
     self::$Data = explode('/', self::$Format[0]);
     if (empty(self::$Format[1])) {
         self::$Format[1] = date('H:i:s');
     }
     self::$Data = self::$Data[2] . '-' . self::$Data[1] . '-' . self::$Data[0] . ' ' . self::$Format[1];
     return self::$Data;
 }
开发者ID:victorborgaco,项目名称:projetoSoftware,代码行数:10,代码来源:Check.php

示例3: Image

 public static function Image($ImageUrl, $ImageDesc, $ImageW = NULL, $ImageH = NULL)
 {
     self::$Data = 'uploads/' . $ImageUrl;
     if (file_exists(self::$Data) && !is_dir(self::$Data)) {
         $patch = HOME;
         $imagem = self::$Data;
         return "<img src=\"{$patch}/tim.php?src={$patch}/{$imagem}&w={$ImageW}&h={$ImageH}\" alt=\"{$ImageDesc}\" title=\"{$ImageDesc}\"/>";
     } else {
         return FALSE;
     }
 }
开发者ID:BrunoDuarte,项目名称:WS_PHP_ADMIN,代码行数:11,代码来源:Check.class.php

示例4: setDados

 /**
  * ****************************************
  * *********** PRIVATES *******************
  * ****************************************
  */
 private function setDados($Data)
 {
     if (in_array('', $Data)) {
         $this->Result = false;
         $this->Error = ["<b>Erro de insersão:</b> Para efetuar esta ação, preencha todos os campos!", WS_ALERT];
     } else {
         $this->Data = $Data;
         $this->Data = array_map("trim", $this->Data);
         $this->Data = array_map("strip_tags", $this->Data);
         $this->Data['setor_date'] = Check::Data($this->Data['setor_date']);
         return true;
     }
 }
开发者ID:adrianosilvareis,项目名称:intranet,代码行数:18,代码来源:AdminSetor.class.php

示例5: setData

 private function setData()
 {
     $Cover = $this->Data['post_cover'];
     $Content = $this->Data['post_content'];
     unset($this->Data['post_cover'], $this->Data['post_content']);
     $this->Data = array_map('strip_tags', $this->Data);
     $this->Data = array_map('trim', $this->Data);
     $this->Data['post_name'] = Check::Name($this->Data['post_title']);
     $this->Data['post_date'] = Check::Data($this->Data['post_date']);
     $this->Data['post_type'] = 'post';
     $this->Data['post_cover'] = $Cover;
     $this->Data['post_content'] = $Content;
     $this->Data['post_cat_parent'] = $this->getCatParent();
 }
开发者ID:BrunoDuarte,项目名称:WS_PHP,代码行数:14,代码来源:AdminPost.class.php

示例6: getStringLog

 private function getStringLog()
 {
     $orderBy = ' ORDER BY ';
     $fields = [];
     $order = [];
     $i = 0;
     $this->Sentence = "SELECT created_date, action, user_id, answer, ip FROM " . DB_LOGS . " WHERE ";
     if ($this->UserId != null) {
         $fields[$i] = "user_id IN (" . implode(", ", $this->UserId) . ")";
         $order[$i++] = "user_id ASC";
     }
     if ($this->StartDate != '') {
         $fields[$i] = "created_date BETWEEN '" . substr(Check::Data($this->StartDate), 0, 10) . "'";
         if ($this->EndDate != '') {
             $fields[$i] .= " AND '" . substr(Check::Data($this->EndDate), 0, 10) . "'";
         } else {
             $fields[$i] .= " AND CURRENT_DATE()";
         }
         $order[$i] = "created_date DESC";
         $i++;
     } elseif ($this->StartDate == '' && $this->EndDate != '') {
         $fields[$i] = "created_date BETWEEN '2014-01-01'";
         $fields[$i] .= " AND '" . substr(Check::Data($this->EndDate), 0, 10) . "'";
         $order[$i] = "created_date DESC";
         $i++;
     }
     if ($this->Action == 'l') {
         $fields[$i++] = "action LIKE '%' :action1 '%' OR action LIKE '%' :action2 '%'";
     } elseif ($this->Action != 't') {
         $fields[$i++] = "action LIKE '%' :action '%'";
     }
     if ($this->Answer == 'Sucesso') {
         $fields[$i] = "answer LIKE '%' 'Sucesso' '%'";
     } elseif ($this->Answer == 'Erro') {
         $fields[$i] = "answer LIKE '%' 'Erro' '%'";
     }
     if (count($order) > 0) {
         $this->Sentence .= implode(' AND ', $fields) . $orderBy . implode(', ', $order);
     } else {
         $this->Sentence .= implode(' AND ', $fields);
     }
     if ($i == 0) {
         $this->Sentence = str_replace(" WHERE ", "", $this->Sentence);
     }
 }
开发者ID:claytongf,项目名称:patr,代码行数:45,代码来源:AdminReportLog.class.php

示例7: ExeCreateCardapio

 /**
  * <b>Cria Cardápio:</b> Cria o esqueleto do cardápio com a data desejada para edição das informaçoes posteriores
  * @param array $Data - Atribuitivo
  * @param INT $userId = id do usuário que está criando o registro
  */
 public function ExeCreateCardapio(array $Data, $userId)
 {
     $this->Data = $Data;
     $this->UserId = $userId;
     if (!empty($this->Data['cardapio_dia'])) {
         $readCardapio = new Read();
         $readCardapio->FullRead("SELECT id FROM " . DB_NUTRICAO_CARDAPIO_DIA . " WHERE cardapio_dia = :dia", "dia=" . substr(Check::Data($this->Data['cardapio_dia']), 0, 10));
         if (!$readCardapio->getResult()) {
             $this->Data['cardapio_dia'] = substr(Check::Data($this->Data['cardapio_dia']), 0, 10);
             $this->setCreateDate();
             $this->setCreatedBy();
             $this->Create(DB_NUTRICAO_CARDAPIO_DIA);
         } else {
             $this->Result = false;
             $this->Error = ["Erro ao criar cardápio. Cardápio já existe.", TW_ERROR];
         }
     } else {
         $this->Result = false;
         $this->Error = ["Erro ao criar cardápio. Verifique se preencheu corretamente.", TW_ERROR];
     }
 }
开发者ID:claytongf,项目名称:patr,代码行数:26,代码来源:AdminCardapio.class.php

示例8: getStringFull

 private function getStringFull()
 {
     $orderBy = ' ORDER BY ';
     $fields = [];
     $order = [];
     $i = 0;
     $this->Sentence = "SELECT t1.*, t2.visitante_nome FROM " . DB_VISITAS . " t1 INNER JOIN " . DB_VISITANTES . " t2 ON (t1.visitante_id = t2.visitante_id) WHERE ";
     if ($this->UserId != null) {
         $fields[$i] = "t1.visitante_id IN (" . implode(", ", $this->UserId) . ")";
         $order[$i++] = "t2.visitante_nome ASC";
     }
     if ($this->StartDate != '') {
         $fields[$i] = "t1.visita_data_entrada BETWEEN '" . substr(Check::Data($this->StartDate), 0, 10) . "'";
         if ($this->EndDate != '') {
             $fields[$i] .= " AND '" . substr(Check::Data($this->EndDate), 0, 10) . "'";
         } else {
             $fields[$i] .= " AND CURRENT_DATE()";
         }
         $order[$i] = "t1.visita_data_entrada DESC";
         $i++;
     } elseif ($this->StartDate == '' && $this->EndDate != '') {
         $fields[$i] = "t1.visita_data_entrada BETWEEN '2014-01-01'";
         $fields[$i] .= " AND '" . substr(Check::Data($this->EndDate), 0, 10) . "'";
         $order[$i] = "t1.visita_data_entrada DESC";
         $i++;
     }
     if (count($order) > 0) {
         $this->Sentence .= implode(' AND ', $fields) . $orderBy . implode(', ', $order);
     } else {
         $this->Sentence .= implode(' AND ', $fields);
     }
 }
开发者ID:claytongf,项目名称:patr,代码行数:32,代码来源:AdminReportVisitas.class.php

示例9: Image

 /**
  * <b>Imagem Upload:</b> Ao executar este HELPER, ele automaticamente verifica a existencia da imagem na pasta
  * uploads. Se existir retorna a imagem redimensionada!
  * @return HTML = imagem redimencionada!
  */
 public static function Image($ImageUrl, $ImageDesc, $ImageW = null, $ImageH = null)
 {
     self::$Data = $ImageUrl;
     if (file_exists(self::$Data) && !is_dir(self::$Data)) {
         $patch = HOME;
         $imagem = self::$Data;
         return "<img src=\"{$patch}/tim.php?src={$patch}/{$imagem}&w={$ImageW}&h={$ImageH}\" alt=\"{$ImageDesc}\" title=\"{$ImageDesc}\" class='img-thumbnail'/>";
     } else {
         return false;
     }
 }
开发者ID:adrianosilvareis,项目名称:intranet,代码行数:16,代码来源:Check.class.php

示例10:

<!DOCTYPE html>
<html lang="pt-br">
    <head>
        <meta charset="UTF-8">
        <title>WS PHP - Helpers :: Manipulação e Validação</title>
    </head>
    <body>
        <?php 
require './_app/Config.inc.php';
//$check = new Check();
//var_dump($check);
$Email = 'bruno.gmail.com';
if (Check::Email($Email)) {
    echo 'Válido!<hr>';
} else {
    echo 'Inválido!<hr>';
}
$Name = 'Estamos aprendendo PHP. Veja você como é!';
echo Check::Name($Name) . '<hr>';
$Data = '21/12/2015 20:36:10';
echo Check::Data($Data) . '<hr>';
?>
    </body>
</html>
开发者ID:BrunoDuarte,项目名称:WS_PHP_ADMIN,代码行数:24,代码来源:01-manipulacao-e-validacao.php

示例11: setData

 private function setData()
 {
     if ($this->Data['visita_data_entrada'] !== '') {
         $updateData['visita_data_entrada'] = Check::Data($this->Data['visita_data_entrada'] . ' ' . $this->Data['visita_hora_entrada']);
     }
     if ($this->Data['visita_data_saida'] !== '') {
         $updateData['visita_data_saida'] = Check::Data($this->Data['visita_data_saida'] . ' ' . $this->Data['visita_hora_saida']);
     }
     unset($this->Data['visita_data_entrada']);
     unset($this->Data['visita_hora_entrada']);
     unset($this->Data['visita_data_saida']);
     unset($this->Data['visita_hora_saida']);
     $read = new Read();
     $read->ExeRead(DB_VISITAS, "WHERE visitante_id = :id ORDER BY id DESC LIMIT 1", "id={$this->VisitanteId}");
     if (isset($updateData)) {
         $update = new Update();
         $update->ExeUpdate(DB_VISITAS, $updateData, "WHERE id = :id", "id={$read->getResult()[0]['id']}");
     }
 }
开发者ID:claytongf,项目名称:patr,代码行数:19,代码来源:AdminVisitante.class.php

示例12: setData

 private function setData()
 {
     $cover = !empty($this->Data['user_cover']) ? $this->Data['user_cover'] : NULL;
     unset($this->Data['user_cover']);
     $this->Data = array_map('strip_tags', $this->Data);
     $this->Data = array_map('trim', $this->Data);
     $this->Data['user_birthday'] = Check::Data($this->Data['user_birthday']);
     $this->Data['user_cover'] = !empty($cover) ? $cover : NULL;
     if (!Check::Email($this->Data['user_email'])) {
         $this->Error = ['<b>Oppss, email Inválido</b>, por favor preencha corretamente o campo.', WS_ALERT];
         $this->Data['user_email'] = null;
         $this->Result = null;
     }
     //        $this->Data['user_level'] = 5;
     $this->Data['user_status'] = 1;
     $this->Data['user_registration'] = date('Y-m-d H:i:s', time());
     $this->Data['user_lastupdate'] = date('Y-m-d H:i:s', time());
     if (!empty($this->Data['user_password'])) {
         $this->Data['user_password'] = md5($this->Data['user_password']);
     } else {
         unset($this->Data['user_password']);
     }
 }
开发者ID:adrianosilvareis,项目名称:intranet,代码行数:23,代码来源:AdminUsers.class.php

示例13: getStringFull

 private function getStringFull()
 {
     $orderBy = ' ORDER BY ';
     $groupBy = " GROUP BY t1.prod_name, t3.reg_action ";
     $fields = [];
     $order = [];
     $i = 0;
     $this->Sentence = "SELECT t1.prod_name, t1.prod_unidade, t3.reg_quantidade, t2.cat_name, t3.reg_action, t3.reg_data, t3.reg_motivo, t3.reg_descricao FROM " . DB_PRODUTOS . " t1 INNER JOIN " . DB_PRODUTOS_CATEGORIAS . " t2 ON (t1.prod_categoria = t2.cat_id) INNER JOIN " . DB_PRODUTOS_REGISTRO . " t3 ON (t1.prod_id = t3.prod_id) WHERE ";
     $this->SumSentence = "SELECT t1.prod_name, t1.prod_quantidade, t1.prod_unidade, t2.cat_name, SUM(t3.reg_quantidade) AS soma, t3.reg_action FROM " . DB_PRODUTOS . " t1 INNER JOIN " . DB_PRODUTOS_CATEGORIAS . " t2 ON (t1.prod_categoria = t2.cat_id) INNER JOIN " . DB_PRODUTOS_REGISTRO . " t3 ON (t1.prod_id = t3.prod_id) WHERE ";
     if ($this->Action === 'u') {
         $fields[$i++] = "t3.reg_action = 'remove'";
     } elseif ($this->Action === 'r') {
         $fields[$i++] = "t3.reg_action = 'add'";
     }
     if ($this->ProdId != null) {
         $fields[$i++] = "t1.prod_id IN (" . implode(", ", $this->ProdId) . ")";
     }
     if ($this->CatId != null) {
         $fields[$i++] = "t2.cat_id IN (" . implode(", ", $this->CatId) . ")";
     }
     if ($this->StartDate != '') {
         $fields[$i] = "t3.reg_data BETWEEN '" . substr(Check::Data($this->StartDate), 0, 10) . "'";
         if ($this->EndDate != '') {
             $fields[$i] .= " AND '" . substr(Check::Data($this->EndDate), 0, 10) . "'";
         } else {
             $fields[$i] .= " AND CURRENT_DATE()";
         }
         $order[$i] = "t3.reg_data DESC";
         $i++;
     } elseif ($this->StartDate == '' && $this->EndDate != '') {
         $fields[$i] = "t3.reg_data BETWEEN '2014-01-01'";
         $fields[$i] .= " AND '" . substr(Check::Data($this->EndDate), 0, 10) . "'";
         $order[$i] = "t3.reg_data DESC";
         $i++;
     }
     if (count($order) > 0) {
         $this->Sentence .= implode(' AND ', $fields) . $orderBy . implode(', ', $order);
         $this->SumSentence .= implode(' AND ', $fields) . $groupBy . $orderBy . implode(', ', $order);
     } else {
         $this->Sentence .= implode(' AND ', $fields);
         $this->SumSentence .= implode(' AND ', $fields) . $groupBy;
     }
     if ($this->StartDate == '' and $this->EndDate == '' and $this->ProdId === null and $this->Action !== 'u' and $this->Action !== 'r' and $this->CatId === null) {
         $this->Sentence = str_replace(" WHERE ", "", $this->Sentence);
         $this->SumSentence = str_replace(" WHERE ", "", $this->SumSentence);
     }
 }
开发者ID:claytongf,项目名称:patr,代码行数:47,代码来源:AdminReportEstoque.class.php

示例14: Upload

 $Upload = new Upload();
 $Upload->File($file);
 $filename = DOCUMENT_ROOT . NAME . "/uploads/" . $Upload->getResult();
 if (file_exists($filename)) {
     $FileRead = fopen($filename, "r");
     $Read = new Controle('sft_particular');
     $Read->truncate();
     $Erros = [];
     while (!feof($FileRead)) {
         $file = fgets($FileRead);
         $Linha = !empty($file) ? explode(";", utf8_encode($file)) : null;
         if (is_array($Linha) && count($Linha) == 12) {
             $Erro = null;
             $Objeto = array();
             $Objeto['part_os'] = $Linha[0];
             $Objeto['part_date'] = Check::Data($Linha[1]);
             $Objeto['part_nm_paciente'] = $Linha[4];
             $Objeto['part_vl_liquido'] = Check::toFloat($Linha[9]);
             $Objeto['part_vl_pago'] = Check::toFloat($Linha[10]);
             $Objeto['part_vl_debito'] = Check::toFloat($Linha[11]);
             $Linha[2] = $Linha[2] == '0' ? "418 - Sistema" : $Linha[2];
             $findUser = explode(" - ", $Linha[2])[1];
             $atendente = FindUser($findUser);
             $findCode = explode('-', $Linha[0])[0];
             $unidade = FindCod($findCode);
             if (!$atendente) {
                 $Erro = true;
                 $Objeto['error'] = 'Não encontrado atendente: ' . $findUser;
                 $Erros[] = $Objeto;
             } else {
                 $Objeto['aten_id'] = $atendente;
开发者ID:adrianosilvareis,项目名称:intranet,代码行数:31,代码来源:uploadparticular.api.php

示例15: CheckImage

 public static function CheckImage($ImageUrl, $ImageDesc, $ImageW = null, $ImageH = null)
 {
     // Caminho da Imagem
     self::$Data = $ImageUrl;
     // Verifica se a imagem existe e retorna ela redimensionada
     if (file_exists(self::$Data) && !is_dir(self::$Data)) {
         $patch = BASE;
         $image = self::$Data;
         return "<img src=\"{$patch}/tim.php?src={$patch}/{$image}&w={$ImageW}&h={$ImageH}\" alt=\"{$ImageDesc}\" title=\"{$ImageDesc}\"/>";
     } else {
         return false;
     }
 }
开发者ID:WillianMonteiro,项目名称:_app,代码行数:13,代码来源:Check.class.php


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