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


PHP Check::RegForm方法代码示例

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


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

示例1: EditNews

 function EditNews(&$smarty, $idde, $form)
 {
     unset($form[idde]);
     $tabela = $smarty->cfg['prefix'] . 'news';
     $form = Check::RegForm($form);
     if (is_numeric($idde)) {
         if (is_array($_FILES)) {
             foreach ($_FILES as $nome => $file) {
                 if ($file['tmp_name'] == '') {
                     continue;
                 }
                 $result = $this->SqlSelect("SELECT {$nome},{$nome}_thb FROM {$tabela} WHERE ID_NEWS = '{$idde}'");
                 $item = mysql_fetch_array($result, MYSQL_ASSOC);
                 unlink(realpath(NOTICIAS_DIR_IMG . '/' . $item[$nome]));
                 unlink(realpath(NOTICIAS_DIR_IMG . THUMBNAIL_DIR_IMG . '/' . $item[$nome . '_thb']));
                 $arquivo = new Arquivo();
                 $arquivo->SetOrigem($file['tmp_name']);
                 $arquivo->SetDestino(NOTICIAS_DIR_IMG);
                 $arquivo->SetPropriedades($file);
                 if ($arquivo->error) {
                     return $smarty->getFinishError($arquivo->error);
                 }
                 if ($arquivo->SetMimetype($arquivo->prop['filename'], array('jpg', 'jepg', 'gif', 'png'), $file['type']) == true) {
                     return $smarty->getFinishError('ERROR_017');
                 }
                 if ($arquivo->UploadFile() == true) {
                     return $smarty->getFinishError('ERROR_021');
                 }
                 $thb[$nome] = $arquivo->Thumbnail(NOTICIAS_THB_SIZE);
                 $arquivo->FileLogs($nome);
                 $form[$nome] = $arquivo->filelog[$nome]['filename'];
                 $form[$nome . '_thb'] = $thb[$nome]['thb_name'];
             }
         }
         $sql = $this->SqlUpdate($tabela, $form, "ID_NEWS = '{$idde}'");
         $request = $this->SqlSelect($sql);
         if ($request != 1) {
             return $request;
         }
     }
 }
开发者ID:renatoinnocenti,项目名称:ModulosZend,代码行数:41,代码来源:lib.Noticias.php

示例2: geraLngFile

 function geraLngFile($f)
 {
     $form = Check::RegForm($f);
     foreach ($form as $chave => $valor) {
         if ($chave == 'modulosload') {
             $modulo = $valor;
         } elseif ($chave == 'lng_files') {
             $lng = $valor;
         } elseif ($chave == 'configprincipal') {
             $princ = $valor;
         } elseif ($chave == 'novachave') {
             $novachave = $valor;
         } elseif ($chave == 'novovalor') {
             $novovalor = $valor;
         } else {
             $conteudo .= trim($chave . " = '" . $valor) . "'\n";
         }
     }
     $conteudo .= trim($novachave . " = '" . $novovalor) . "'\n";
     return $conteudo;
 }
开发者ID:renatoinnocenti,项目名称:ModulosZend,代码行数:21,代码来源:lib.Traducao.php

示例3: editadmpage

 function editadmpage(&$smarty, &$form)
 {
     $tabela = $smarty->cfg['prefix'] . $this->tab1;
     $tabela2 = $smarty->cfg['prefix'] . $this->tab2;
     $idde = $form['idde'];
     if ($form['action'] == 'redit') {
         $form = Check::RegForm($form);
         unset($form['idde']);
         if ($form['page_madmin'] == false) {
             $form['page_madmin'] = '0';
         }
         if ($form['page_mindex'] == false) {
             $form['page_mindex'] = '0';
         }
         if ($form['page_msindex'] == false) {
             $form['page_msindex'] = NULL;
         }
         $sql = $this->SqlUpdate($tabela, $form, "ID_PAGE = '{$idde}'");
         $result = $this->SqlSelect($sql);
     }
     $result = $this->SqlSelect("SELECT * FROM {$tabela} WHERE ID_PAGE = '{$idde}'");
     $page = mysql_fetch_array($result, MYSQL_ASSOC);
     foreach ($page as $chave => $valor) {
         $this->{$chave} = $valor;
     }
     $smarty->assign('nivel_ids', range(0, 6));
     $smarty->assign('nivel_names', array($smarty->get_config_vars('nivel_0'), $smarty->get_config_vars('nivel_1'), $smarty->get_config_vars('nivel_2'), $smarty->get_config_vars('nivel_3'), $smarty->get_config_vars('nivel_4'), $smarty->get_config_vars('nivel_5'), $smarty->get_config_vars('nivel_6')));
     $smarty->assign('nivel_id', $this->page_nivel);
     $chk['page_madmin'] = $this->page_madmin == 1 ? 'checked="checked"' : '0';
     $chk['page_mindex'] = $this->page_mindex == 1 ? 'checked="checked"' : '0';
     $smarty->assign('act_msindex', $this->page_msindex);
     $smarty->assign('tpl', $this->page_tpl);
     $smarty->assign($chk);
 }
开发者ID:renatoinnocenti,项目名称:ModulosZend,代码行数:34,代码来源:lib.Menu.php

示例4: CheckForm

function CheckForm($Json, $id)
{
    global $smarty;
    $_POST = SetPostJson($id, $Json);
    $error = $smarty->SetPages();
    if ($error == true) {
        return $error;
    }
    $error = $smarty->LoadModulos();
    if ($error == true) {
        return $error;
    }
    $ck = new Check('POST');
    $ck->CheckForm();
    if (count($ck->error) > 0) {
        return $errors = $smarty->getError($ck->error);
    } else {
        if (function_exists($smarty->actualpage["page_fnc"])) {
            $ck->form = $ck->RegForm($ck->form);
            $out = ereg_replace("\\'", "'", $smarty->actualpage['page_fnc']($smarty, $ck->form));
            return ereg_replace("(\r\n|\n|\r|\t)", "", $out);
        } else {
            return $smarty->get_config_vars('ERROR_003') . $smarty->actualpage["page_fnc"];
        }
    }
}
开发者ID:renatoinnocenti,项目名称:ModulosZend,代码行数:26,代码来源:lib.Sajax.php


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