Beispiel #1
0
                        $alert_msg = "Input Incorrect!!!";
                        //$error_occured = true;
                    } else {
                        if (trim($Type) == "") {
                            $type = "Unknown";
                        }
                        if (trim($InterfaceDesc) == "") {
                            $InterfaceDesc = $remarks;
                        }
                        if (trim($remarks) == "") {
                            $remarks = $InterfaceDesc;
                        }
                        if (trim($relatedWord) == "") {
                            $relatedWord = $InterfaceName;
                        }
                        createnewRowinKeywords($InterfaceName, $Type, $InterfaceDesc, $SelectAppNames, $remarks, $FullForm, $relatedWord);
                    }
                } else {
                    updateRowInKeywords($keywordId, $Type, $InterfaceDesc, $SelectAppNames, $remarks, $FullForm, $relatedWord);
                }
                $error_occured = false;
                $alert_msg = "Information added successfully";
            }
        }
    }
    //echo "trying to add interface - code under construction";
}
//header("Location: index.php");
setcookie("msg", $alert_msg);
if ($error_occured) {
    $_POST['actionId'] = $actionType;
Beispiel #2
0
function createNewApplication($appName, $FullForm, $desc, $fileName)
{
    $appName = str_replace("'", "''", $appName);
    $FullForm = str_replace("'", "''", $FullForm);
    $desc = str_replace("'", "''", $desc);
    $query = "INSERT INTO `app_name`(`app_name`, `app_desc`, `app_intf_diagram`, `FULLFORM`) VALUES ('{$appName}','{$desc}','{$fileName}','{$FullForm}')";
    mysql_query($query) or die(mysql_error());
    mysql_query("commit");
    $appID = getAppIdForAppName($appName);
    createnewRowinKeywords($appName, "Application", $desc, $appID, $desc, $appName, $appName, $fileName);
    logRequest("App Add", $appName . " with Description=" . $desc . " and Fullform = " . $FullForm);
}