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


PHP validator::validateform方法代码示例

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


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

示例1:

 $folder->setIsVisible($isVisible);
 $folder->setIsEnable($isEnable);
 $folder->setStationType($stationType);
 $visible = $folder->getIsVisible() == 1 ? "checked" : "";
 $enable = $folder->getIsEnable() == 1 ? "checked" : "";
 $m2MSiteChecked = $isM2MSite ? "checked" : "";
 $messageText = "";
 $div = "";
 if ($locationSeq == "0") {
     $messageText = "- Please select location<br>";
 }
 $messageText .= validator::validateform("Folder Name", $folderName, 256, false);
 if ($isM2MSite) {
     $siteCodeDisable = '';
     $siteCode = $_POST["siteCode"];
     $messageText .= validator::validateform("Site Code", $siteCode, 100, false);
 }
 if ($messageText == "") {
     $seq = $FDS->folerExistWithLocation($locationSeq, $folderName);
     if ($seq != "") {
         if ($folderSeq != $seq) {
             $messageText = "Folder Name already exists under this location . Please choose another folder name or location.";
         }
     }
 }
 try {
     if (!$isM2MSite) {
         if (!file_exists("../../Repository/" . $locationName)) {
             $messageText = "Parent Location does not exists";
         }
         if ($folderSeq == "" && $messageText == "") {
开发者ID:munishsethi777,项目名称:eliveui,代码行数:31,代码来源:createFolder.php

示例2:

 }
 $user->setEmailId($emailId);
 $user->setIsActive($active);
 $user->setSeq($seq);
 //------------------------validations---------------------------------
 $messageText = "";
 $div = "";
 $messageText = validator::validateform("User Name", $username, 56, false);
 if ($locationSeq == 0) {
     $messageText .= "- Please Select Location<br>";
 }
 $messageText .= validator::validateform("Password", $Password, 56, false);
 // if($Password != $conPassword){
 //  $messageText .= "- Confirm Password should match with Password.";
 // }
 $messageText .= validator::validateform("Email Id", $emailId, 256, false);
 //same user name validation
 if ($messageText == "") {
     $userseq = $UDS->isExist($username);
     if ($userseq != "" && $seq != $userseq) {
         $messageText = "User with this username already exists. Please choose another user name.";
     }
 }
 //------------------------------************----------------------------------
 //------------------------Show Validation or save object---------------------------------
 if ($messageText != null && $messageText != "") {
     $div = "         <div class='ui-widget'>\n                       <div  class='ui-state-error ui-corner-all' style='padding: 0 .7em;'>\n                               <p><span class='ui-icon ui-icon-alert' style='float: left; margin-right: .3em;'></span>\n                               <strong>Error during save user details :</strong> <br/>" . $messageText . "</p>\n                       </div></div>";
 } else {
     //Creating User Object
     //set current date
     $user->setDateOfRegistration(Date("Y/m/d"));
开发者ID:munishsethi777,项目名称:eliveui,代码行数:31,代码来源:CreateUserForm.php

示例3: strtolower

 $location->setLocationName($locationName);
 $isPrivateStr = $_POST["isPrivate"];
 $isPrivate = $isPrivateStr == "on" ? 1 : 0;
 $hasCreateDir = $hasCreateDirStr == "on" ? 1 : 0;
 $location->setIsPrivate($isPrivate);
 if ($locationName != "") {
     $folderName = strtolower($locationName);
     $folderName = str_replace(" ", "_", $folderName);
 }
 $location->setLocationFolder($folderName);
 $location->setSeq($locationSeq);
 $location->setLocationDetails($details);
 $location->setHasDirectory($hasCreateDir);
 $messageText = "";
 $div = "";
 $messageText = validator::validateform("Location Name", $locationName, 256, false);
 //if($messageText != null && $messageText != ""){
 //          $messageText = $messageText . "<br/>". validator::validateform("Location Details",$details,500,false);
 //    }else{
 //      $messageText =   validator::validateform("Loation Details",$details,500,false);
 //    }
 if ($messageText == "") {
     $seq = $LDS->isExist($locationName);
     if ($seq != "") {
         if ($locationSeq != $seq) {
             $messageText = "Location is saved with same Location Name . please choose another Location name";
         }
     }
 }
 if ($messageText != null && $messageText != "") {
     $div = "         <div class='ui-widget'>\n                       <div  class='ui-state-error ui-corner-all' style='padding: 0 .7em;'> \n                               <p><span class='ui-icon ui-icon-alert' style='float: left; margin-right: .3em;'></span> \n                               <strong>Error during save Location :</strong> <br/>" . $messageText . "</p>\n                       </div></div>";
开发者ID:munishsethi777,项目名称:eliveui,代码行数:31,代码来源:CreateLocation.php

示例4: header

<?php

require_once $ConstantsArray['dbServerUrl'] . "DataStoreMgr/UserDataStore.php";
require_once $ConstantsArray['dbServerUrl'] . "FormValidator//validator.php";
require_once $ConstantsArray['dbServerUrl'] . "Utils//StringUtils.php";
$div = "";
$message = "";
if ($_POST["submit"] != "") {
    $username = $_POST['username'];
    $password = $_POST['userpassword'];
    $message = validator::validateform("User Name", $username, 56, false);
    if ($messageText != null && $messageText != "") {
        $messageText = $messageText . "<br/>" . validator::validateform("Password", $password, 56, false);
    } else {
        $messageText = validator::validateform("Password", $password, 56, false);
    }
    if ($messageText == "") {
        $UDS = UserDataStore::getInstance();
        $user = $UDS->FindByUserName($username);
        if ($user != null && $user != "") {
            if ($user->getDecodedPassword() == $password) {
                session_start();
                $_SESSION["userlogged"] = $user;
                if (isset($_SESSION['httpUrl'])) {
                    header("Location:" . $_SESSION['httpUrl']);
                } else {
                    header("Location:cpcbMap.php");
                }
            } else {
                $messageText = "Invalid User Name or Password";
            }
开发者ID:munishsethi777,项目名称:eliveui,代码行数:31,代码来源:indexbhoomi.php

示例5:

 require_once $ConstantsArray['dbServerUrl'] . "DataStoreMgr//UserDataStore.php";
 require_once $ConstantsArray['dbServerUrl'] . "FormValidator//validator.php";
 $user = $_SESSION["userlogged"];
 $oldPassword = $user->getDecodedPassword();
 $UDS = UserDataStore::getInstance();
 $div = "";
 $messageText = validator::validateform("Earlier Password", $earlierPassword, 256, false);
 if ($messageText != null && $messageText != "") {
     $messageText = $messageText . "<br/>" . validator::validateform("New Password", $newPassword, 256, false);
 } else {
     $messageText = validator::validateform("New Password", $newPassword, 256, false);
 }
 if ($messageText != null && $messageText != "") {
     $messageText = $messageText . "<br/>" . validator::validateform("Confirm Password", $confirmNewPassword, 256, false);
 } else {
     $messageText = validator::validateform("Confirm New Password", $confirmNewPassword, 256, false);
 }
 if ($messageText == "") {
     if ($newPassword != $confirmNewPassword) {
         $messageText = "-New password and confirm password does not match";
     }
     if ($oldPassword != $earlierPassword) {
         if ($messageText != null && $messageText != "") {
             $messageText = $messageText . "<br/>" . "-Earlier Password does not match with the one in the database";
         } else {
             $messageText = "-Earlier Password does not match with the one in the database";
         }
     }
 }
 if ($messageText != null && $messageText != "") {
     $div = StringUtils::getMessage("Change Passowrd", $messageText, true);
开发者ID:munishsethi777,项目名称:eliveui,代码行数:31,代码来源:ChangeUserPassword.php

示例6: Configuration

<?php

$msg = "";
$emailMsg = "";
require_once "configuration.php";
require_once 'IConstants.inc';
require_once $ConstantsArray['dbServerUrl'] . "FormValidator//validator.php";
$configuration = new Configuration();
if ($_POST["submit"] != "") {
    $conEmail = $_POST["conEmailId"];
    $email = $_POST["emailId"];
    $msg = validator::validateform("Email Id", $email, 256, false);
    if ($msg == "") {
        if ($email != $conEmail) {
            $msg = "Email id does not match with confirm email id";
        }
    }
    if ($msg != null && $msg != "") {
        $div = "         <div class='ui-widget'>\n                       <div  class='ui-state-error ui-corner-all' style='padding: 0 .7em;'> \n                               <p><span class='ui-icon ui-icon-alert' style='float: left; margin-right: .3em;'></span> \n                               <strong>Error during change email id :</strong> <br/>" . $msg . "</p>\n                       </div></div>";
    } else {
        $configuration->saveConfig($configuration->adminEmailId, $email);
        $msg = "Email id updated successfully";
        $div = "<div class='ui-widget'>\n                       <div  class='ui-state-default ui-corner-all' style='padding: 0 .7em;'> \n                               <p><span class='ui-icon ui-icon-alert' style='float: left; margin-right: .3em;'></span> \n                               <strong>Message:</strong>&nbsp;" . $msg . "</p> \n                       </div></div>";
    }
} else {
    $h = $configuration->getConfiguration($configuration->adminEmailId);
    $email = $h["configvalue"];
    $conEmail = $email;
}
?>
 
开发者ID:munishsethi777,项目名称:eliveui,代码行数:30,代码来源:changeEmailId.php

示例7: array_push

         $chConfigObj->setPrescribedLimit($prescribedLimit);
         if (!empty($chseq)) {
             $channlConfigs[intval($chseq)] = $chConfigObj;
         } else {
             array_push($channlConfigs, $chConfigObj);
         }
         if (!empty($chNo)) {
             if (!in_array($chNo, $chNoArr)) {
                 array_push($chNoArr, $chNo);
             } else {
                 array_push($dupNoChArr, $chNo);
             }
         }
         $errMsg .= validator::validateNumeric("Row No. {$count} - Channel Number", $chNo, 11, false);
         $errMsg .= validator::validateform("Row No. {$count} - Channel Name", $chName, 255, false);
         $errMsg .= validator::validateform("Row No. {$count} - Channel Unit", $chUnit, 10, false);
         $count++;
     }
     if (count($dupNoChArr) > 0) {
         $errMsg .= "Duplicate Channel Number(s) :- " . implode(",", $dupNoChArr);
     }
 }
 if (!empty($errMsg)) {
     $div = " <div class='ui-widget'>\n                   <div  class='ui-state-error ui-corner-all' style='padding: 0 .7em;'>\n                           <p><span class='ui-icon ui-icon-alert' style='float: left; margin-right: .3em;'></span>\n                           <strong>Error during Edit Meta</strong> <br/>" . $errMsg . "</p>\n                   </div></div>";
 } else {
     $CDS->saveList($channlConfigs);
     $folderSeq = intval($_POST["selectedFolderSeq"]);
     $channlConfigs = $CDS->FindByFolder($selSeq);
     $msg = "Parameters Updated Successfully.";
     $div = "<div class='ui-widget'>\n                           <div  class='ui-state-default ui-corner-all' style='padding: 0 .7em;'>\n                                   <p><span class='ui-icon ui-icon-alert' style='float: left; margin-right: .3em;'></span>\n                                   <strong>Message:</strong>&nbsp;" . $msg . "</p>\n                           </div></div>";
 }
开发者ID:munishsethi777,项目名称:eliveui,代码行数:31,代码来源:editParameter.php

示例8: HighValueRule

    $highValueRule->setParameter($parameter);
    $highValueRule->setHighValue($highValue);
    $highValueRule->setFrequency($frequency);
    $highValueRule->setStationType($folder->getStationType());
    $highValueRule->setIsActive($active);
    $highValueRule->setLastRuleHitFileDataSeq($lastRuleHitFileDataSeq);
    $highValueRule->setRuleHits(0);
    //------------------------validations---------------------------------
    $messageText = "";
    $div = "";
    if ($folderSeq == 0) {
        $messageText .= "- Station is Required<br>";
    }
    $messageText .= validator::validateform("Parameter", $parameter, 256, false);
    $messageText .= validator::validateform("Highest Value", $highValue, 256, false);
    $messageText .= validator::validateform("Frequency", $frequency, 256, false);
    //------------------------------************----------------------------------
    //------------------------Show Validation or save object---------------------------------
    if ($messageText != null && $messageText != "") {
        $div = "         <div class='ui-widget'>\n                       <div  class='ui-state-error ui-corner-all' style='padding: 0 .7em;'> \n                               <p><span class='ui-icon ui-icon-alert' style='float: left; margin-right: .3em;'></span> \n                               <strong>Error during save user details :</strong> <br/>" . $messageText . "</p>\n                       </div></div>";
    } else {
        $HVRDS->Save($highValueRule);
        $messageText = "High Value Rule Saved Successfully";
        $div = "<div class='ui-widget'>\n                       <div  class='ui-state-default ui-corner-all' style='padding: 0 .7em;'> \n                               <p><span class='ui-icon ui-icon-alert' style='float: left; margin-right: .3em;'></span> \n                               <strong>Message:</strong>&nbsp;" . $messageText . "</p> \n                       </div></div>";
        $highValueRule = new HighValueRule();
    }
    header('Location: showHighValueRules.php');
    //------------------------------************----------------------------------
}
?>
开发者ID:munishsethi777,项目名称:eliveui,代码行数:30,代码来源:CreateHighValueRuleForm.php

示例9:

$user = $_SESSION["userlogged"];
$fullName = $user->getFullName();
$emailId = $user->getEmailId();
if ($_POST["submit"] != "") {
    $fullName = $_POST["fullName"];
    $emailId = $_POST["emailId"];
    require_once 'IConstants.inc';
    require_once $ConstantsArray['dbServerUrl'] . "Utils//StringUtils.php";
    require_once $ConstantsArray['dbServerUrl'] . "DataStoreMgr//UserDataStore.php";
    require_once $ConstantsArray['dbServerUrl'] . "FormValidator//validator.php";
    $UDS = UserDataStore::getInstance();
    $messageText = validator::validateform("Full Name", $fullName, 100, true);
    if ($messageText != null && $messageText != "") {
        $messageText = $messageText . "<br/>" . validator::validateform("Email Id", $emailId, 200, false);
    } else {
        $messageText = validator::validateform("Email Id", $emailId, 200, false);
    }
    if ($messageText != null && $messageText != "") {
        $div = StringUtils::getMessage("Update Profile", $messageText, true);
    } else {
        $user->setFullName($fullName);
        $user->setEmailId($emailId);
        $UDS->Save($user);
        $messageText = "Profile updated successfully";
        $div = StringUtils::getMessage("", $messageText, false);
    }
}
?>


 
开发者ID:munishsethi777,项目名称:eliveui,代码行数:28,代码来源:updateProfile.php


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