<?php

require $_SERVER["DOCUMENT_ROOT"] . '/vendor/autoload.php';
use SMS\App\Modules\RegisterGeneral\Controller\RegisterGeneralController as RegisterGeneral;
$rs = new RegisterGeneral();
$id = $_POST["id"];
$value = str_replace("-", " ", $_POST["value"]);
$newvalue = $_POST["newvalue"];
$table = $_POST["table"];
$v = $rs->valueUpdate($id, $value, $newvalue, $table);
print_r($v);
//print_r(array($id, $value, $newvalue));
Exemple #2
0
<?php

require $_SERVER["DOCUMENT_ROOT"] . '/vendor/autoload.php';
use SMS\App\Modules\RegisterGeneral\Controller\RegisterGeneralController as RegisterGeneral;
$rs = new RegisterGeneral();
$postdata = $_POST["data"];
$data = array();
foreach ($postdata as $key => $value) {
    foreach ($value as $key => $val) {
        $data[] = array($val, false);
    }
}
$b = $rs->insertNewGeneral($data, $_POST["table"]);
Exemple #3
0
<?php

require $_SERVER["DOCUMENT_ROOT"] . '/vendor/autoload.php';
use SMS\App\Modules\RegisterGeneral\Controller\RegisterGeneralController as RegisterGeneral;
$table = $_GET["table"];
$view = new RegisterGeneral();
$fields = $view->getTableFields($table);
$generals = $view->getGenerals($table);
?>
<section class="content">
  <div class="row">
    <div class="col-xs-12">
        <div class="box">
        <div class="box-header">
          <h3 class="box-title">You Can Use The Search Form To Filter Data On This Page</h3>
        </div><!-- /.box-header -->
        <div class="box-body">
          <table id="example1" class="table table-bordered table-striped">
            <thead>
              <tr>
                <?php 
foreach ($fields as $field) {
    $name = $field["Name"];
    echo "<th>{$name}</th>";
}
?>
              </tr>
            </thead>
            <tbody>
              <?php 
foreach ($generals as $general) {
Exemple #4
0
<?php

require $_SERVER["DOCUMENT_ROOT"] . '/vendor/autoload.php';
use SMS\App\Modules\RegisterGeneral\Controller\RegisterGeneralController as RegisterGeneral;
$rs = new RegisterGeneral();
print_r($rs->getTableFields("Religion"));
Exemple #5
0
<?php

require $_SERVER["DOCUMENT_ROOT"] . '/vendor/autoload.php';
use SMS\App\Modules\RegisterGeneral\Controller\RegisterGeneralController as RegisterGeneral;
$table = $_GET["table"];
$view = new RegisterGeneral();
$fields = $view->getTableFields($table);
echo "<input type='hidden' value='{$table}' id='THISGENERALTABLENAME' />";
?>
  <div class="box box-default">
    <div class="box-header with-border">
      <h3 class="box-title">General Registration Form <small>Use The Slider Below To Change The Size Of The Form To Suit You</small></h3>
      <input class="bar" type="range" id="rangeinput" value="4" min="2" max="12"/>
      <div class="box-tools pull-right">
        <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
        <button class="btn btn-box-tool" data-widget="remove"><i class="fa fa-remove"></i></button>
      </div>
    </div><!-- /.box-header -->
    <form id="GeneralForm">
    <div class="box-body">
      <div class="row">
        <?php 
foreach ($fields as $field) {
    $name = $field["Name"];
    $type = $field["Type"];
    echo "<div class='col-md-12 FORMSIZE'><div class='form-group'><label>{$name}</label>";
    $inputtype = $view->predictInputType($field);
    echo "<input type='{$type}' class='form-control NEWGENERALFIELD' style='width:100%;' data-id='{$name}' name='{$name}'/>";
    echo "</div></div>";
}
?>