PHP Classes

File: lib/userPostFunc.php

Recommend this page to a friend!
  Classes of Fabio Pintore   FormE   lib/userPostFunc.php   Download  
File: lib/userPostFunc.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: FormE
Build form and manage MySQL table records with XML
Author: By
Last change:
Date: 7 years ago
Size: 953 bytes
 

Contents

Class file image Download
<?php

// ----------------------------------------------------------------------------------------------------------
Function AnagModPost($aFieldData, $resJSON){
// ----------------------------------------------------------------------------------------------------------
   
$aRetVal = Array();
   
    if (
ip2long($aFieldData["IPStart"]["Value"]) > ip2long($aFieldData["IPEnd"]["Value"]) ) {
           
$resJSON['Err']['Status'] = true;
           
$resJSON['Err']['DESCR'] .= "Range IP non valido !<br/>";
           
$resJSON['Err']['FIELD'][] = "_inp1_frmAnagrafica_IPStart";
           
$resJSON['Err']['FIELD'][] = "_inp1_frmAnagrafica_IPEnd";
    }else{

       
$aFieldData["ANAIp"]=Array("Name"=>"ANAIp", "Value"=>$aFieldData["IPStart"]["Value"]."-".$aFieldData["IPEnd"]["Value"], "Prototype"=>"");
       
        unset(
$aFieldData["IPStart"]);
        unset(
$aFieldData["IPEnd"]);
    }
   
   
$aRetVal = Array("Field"=>$aFieldData, "jSON"=>$resJSON);
   
    return (
$aRetVal);

}


?>