Пример #1
0
switch ($formAction) {
    # frmConfig
    case "frmConfig,insert":
        $dbo->dbTable = "_cfg";
        $dbo->insertRec();
        $_POST['id_cfg'] = $dbo->insertedID;
        include "edit.php";
        break;
    case "frmConfig,edit":
        $dbo->dbTable = "_cfg";
        $dbo->updateRec("id_cfg=" . $_POST["id_cfg"]);
        include "edit.php";
        break;
    case "frmConfig,delete":
        $dbo->dbTable = "_cfg";
        $dbo->deleteRec("id_cfg=" . $_POST["id_cfg"]);
        $dbo->sql = "SELECT id_cfg_device FROM _cfg_device WHERE id_cfg=" . $_POST["id_cfg"];
        $dbo->getRec();
        $devices = $dbo->dbData;
        $dbo->dbTable = "_cfg_device_interface";
        foreach ($devices as $record => $cols) {
            $dbo->deleteRec("id_cfg_cdevice=" . $cols[0]);
        }
        $dbo->dbTable = "_cfg_device";
        $dbo->deleteRec("id_cfg=" . $_POST["id_cfg"]);
        include "index.php";
        break;
        # frmDevice
    # frmDevice
    case "frmDevice,insert":
        $dbo->dbTable = "_cfg_device";
Пример #2
0
if (isset($_POST["con_password"]) && $_POST["con_password"] != "") {
    $_POST["con_password"] = encrypt($_POST["con_password"]);
}
switch ($formAction) {
    /* ********************************************************************** */
    case "dbcon,insert":
        /* ********************************************************************** */
        $dbo->dbTable = "_con";
        $dbo->insertRec();
        $id_con = $dbo->insertedID;
        $_POST["id_con"] = $id_con;
        include "edit.php";
        break;
        /* ********************************************************************** */
    /* ********************************************************************** */
    case "dbcon,update":
        /* ********************************************************************** */
        $dbo->dbTable = "_con";
        $dbo->updateRec("id_con=" . $_POST["id_con"]);
        include "edit.php";
        break;
        /* ********************************************************************** */
    /* ********************************************************************** */
    case "dbcon,delete":
        /* ********************************************************************** */
        $dbo->dbTable = "_con";
        $dbo->deleteRec("id_con=" . $_POST["id_con"]);
        include "index.php";
        break;
}
include "_error/status.php";
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
require_once "_lib/php/auth.php";
$_POST["tm_timesheet_approvedBy"] = $id_cust_contact_derived;
$arc = new ArcDb();
$arc->dbType = $globalDBTP;
$arc->dbSchema = $globalDB;
$arc->dbConStr = $globalDBCON;
$arc->dbTable = "_tm_timesheet";
switch ($_POST["edit"]) {
    case 1:
        $arc->updateRec("id_tm_timesheet=" . $_POST["id_tm_timesheet"]);
        break;
    case 2:
        $arc->deleteRec("id_tm_timesheet=" . $_POST["id_tm_timesheet"]);
        break;
    default:
        break;
}
?>
<div class="cList" id="list16">
<?php 
include "list.php";
?>
</div>
Пример #4
0
            case 0:
                echo $_POST["id_srv_board_alt"];
                if ($_POST["id_srv_board_alt"] != "") {
                    $gdbo->dbTable = "_srv_board";
                    $gdbo->sql = "update _srv set id_srv_board=" . $_POST["id_srv_board_alt"] . " WHERE id_srv_board=" . $id_srv_board;
                    $gdbo->execQuery();
                }
                break;
            case 1:
                $service = new ArcDb();
                $service->dbConStr = $globalDBCON;
                $service->dbType = $globalDBTP;
                $service->dbSchema = $globalDB;
                $service->dbTable = "_srv";
                $service->deleteRec("id_srv_board=" . $id_srv_board);
                break;
            default:
                break;
        }
        $service = new ArcDb();
        $service->dbConStr = $globalDBCON;
        $service->dbType = $globalDBTP;
        $service->dbSchema = $globalDB;
        $service->dbTable = "_srv_board";
        $service->deleteRec("id_srv_board=" . $id_srv_board);
        require "index.php";
        break;
}
?>
<script type="text/javascript">clearPop();</script>