HEX
Server: Apache/2.4.46 (Ubuntu)
System: Linux localhost 5.11.0-49-generic #55-Ubuntu SMP Wed Jan 12 17:36:34 UTC 2022 x86_64
User: root (0)
PHP: 7.4.16
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/company_app/company/add.php
<?php 
if (session_status() == PHP_SESSION_NONE) {
    session_start();
 }
require '../include/functions.php'; 
if(!isset($_SESSION["email"]))
{
   header('Location: '.getParentDir().'/index.html');
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Add company | API</title>

    <?php include '../include/head.php'; ?>
   
</head>

<body>
    <div id="wrapper">
        <!-- Navigation -->
        <?php include '../include/sidenav.php'; ?>
        <div id="page-wrapper">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-12">
                        <h2 class="page-header">Campany Add</h2>
                    </div>
                    <!-- /.col-lg-12 -->
                </div>
                <!-- /.row -->
                <div class="row">
                    <div class="col-lg-6">
                    <form role="form" method="post" action="<?php echo getParentDir();?>/include/functions.php?option=add_company">
                        <div class="form-group">
                            <label>Company ID</label>
                            <input class="form-control" placeholder="Enter Company ID" name="company_id" value="<?php echo generateRandomNumber(16); ?>" onkeypress='return formats(this,event)' onkeyup="return numberValidation(event)" required>
                            <p class="help-block">Ex: 0000-0000-0000-0000</p>
                        </div>
                        <div class="form-group">
                            <label>Company Name</label>
                            <input class="form-control" placeholder="Enter Company Name" name="company_name" required>
                            <p class="help-block">Ex: xyz</p>
                        </div>
                        <div class="form-group">
                            <label>Salesforce API End URL</label>
                            <input class="form-control" placeholder="Enter API End URL" name="end_url" required>
                            <p class="help-block">Ex: https://login.salesforce.com</p>
                        </div>
                        <br/>
                        <button type="submit" class="btn btn-primary">Submit Button</button>                        
                    </form>
                    <?php
                    
                    ?>
                    </div>
                    <!-- /.col-lg-12 -->
                </div>
                <!-- /.row -->                 
            </div>
            <!-- /.container-fluid -->
        </div>
        <!-- /#page-wrapper -->
    </div>
    <!-- /#wrapper -->    
    <?php include '../include/footer.php'; ?>
    <script>
      function formats(ele,e){
        if(ele.value.length<19){
          ele.value= ele.value.replace(/\W/gi, '').replace(/(.{4})/g, '$1 ');
          return true;
        }else{
          return false;
        }
      }
      
      function numberValidation(e){
        e.target.value = e.target.value.replace(/[^\d ]/g,'');
        return false;
      }
    </script>
</body>
</html>