Beispiel #1
0
/************************************************************************/
/* AChecker                                                             */
/************************************************************************/
/* Copyright (c) 2008 - 2011                                            */
/* Inclusive Design Institute                                           */
/*                                                                      */
/* This program is free software. You can redistribute it and/or        */
/* modify it under the terms of the GNU General Public License          */
/* as published by the Free Software Foundation.                        */
/************************************************************************/
// $Id$
define('AC_INCLUDE_PATH', '../include/');
require AC_INCLUDE_PATH . 'vitals.inc.php';
require_once AC_INCLUDE_PATH . 'classes/DAO/MyownPatchesDAO.class.php';
require_once AC_INCLUDE_PATH . 'classes/DAO/MyownPatchesDependentDAO.class.php';
require_once AC_INCLUDE_PATH . 'classes/DAO/MyownPatchesFilesDAO.class.php';
if (!isset($_REQUEST["myown_patch_id"])) {
    $msg->addError('NO_ITEM_SELECTED');
    exit;
}
$myown_patch_id = intval($_REQUEST["myown_patch_id"]);
$myownPatchesDAO = new MyownPatchesDAO();
$myownPatchesDependentDAO = new MyownPatchesDependentDAO();
$myownPatchesFilesDAO = new MyownPatchesFilesDAO();
// URL called by form action
$savant->assign('url', dirname($_SERVER['PHP_SELF']) . "/patch_creator.php?myown_patch_id=" . $myown_patch_id);
$savant->assign('patch_row', $myownPatchesDAO->getByID($myown_patch_id));
$savant->assign('dependent_rows', $myownPatchesDependentDAO->getByPatchID($myown_patch_id));
$savant->assign('file_rows', $myownPatchesFilesDAO->getByPatchID($myown_patch_id));
$savant->display('updater/patch_create_edit.tmpl.php');
Beispiel #2
0
/************************************************************************/
/* AContent                                                             */
/************************************************************************/
/* Copyright (c) 2010                                                   */
/* Inclusive Design Institute                                           */
/*                                                                      */
/* This program is free software. You can redistribute it and/or        */
/* modify it under the terms of the GNU General Public License          */
/* as published by the Free Software Foundation.                        */
/************************************************************************/
define('TR_INCLUDE_PATH', '../include/');
require TR_INCLUDE_PATH . 'vitals.inc.php';
require_once TR_INCLUDE_PATH . 'classes/DAO/MyownPatchesDAO.class.php';
require_once TR_INCLUDE_PATH . 'classes/DAO/MyownPatchesDependentDAO.class.php';
require_once TR_INCLUDE_PATH . 'classes/DAO/MyownPatchesFilesDAO.class.php';
$myownPatchesDAO = new MyownPatchesDAO();
if (isset($_POST['submit_no'])) {
    $msg->addFeedback('CANCELLED');
    header('Location: myown_patches.php');
    exit;
} else {
    if (isset($_POST['submit_yes'])) {
        /* delete has been confirmed, delete this category */
        $myown_patch_id = intval($_POST['myown_patch_id']);
        $myownPatchesDependentDAO = new MyownPatchesDependentDAO();
        $myownPatchesFilesDAO = new MyownPatchesFilesDAO();
        $myownPatchesDAO->Delete($myown_patch_id);
        $myownPatchesDependentDAO->DeleteByPatchID($myown_patch_id);
        $myownPatchesFilesDAO->DeleteByPatchID($myown_patch_id);
        $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
        header('Location: myown_patches.php');
Beispiel #3
0
/************************************************************************/
/* AContent                                                             */
/************************************************************************/
/* Copyright (c) 2010                                                   */
/* Inclusive Design Institute                                           */
/*                                                                      */
/* This program is free software. You can redistribute it and/or        */
/* modify it under the terms of the GNU General Public License          */
/* as published by the Free Software Foundation.                        */
/************************************************************************/
define('TR_INCLUDE_PATH', '../include/');
require TR_INCLUDE_PATH . 'vitals.inc.php';
require_once TR_INCLUDE_PATH . 'classes/DAO/MyownPatchesDAO.class.php';
if (isset($_POST['remove'], $_POST['myown_patch_id'])) {
    header('Location: patch_delete.php?myown_patch_id=' . $_POST['myown_patch_id']);
    exit;
} else {
    if (isset($_POST['edit'], $_POST['myown_patch_id'])) {
        header('Location: patch_edit.php?myown_patch_id=' . $_POST['myown_patch_id']);
        exit;
    } else {
        if (!empty($_POST) && !isset($_POST['myown_patch_id'])) {
            $msg->addError('NO_ITEM_SELECTED');
        }
    }
}
$myownPatchesDAO = new MyownPatchesDAO();
$patch_rows = $myownPatchesDAO->getAll();
$savant->assign('patch_rows', $patch_rows);
$savant->display('updater/myown_patches.tmpl.php');
<?php

/************************************************************************/
/* AContent                                                             */
/************************************************************************/
/* Copyright (c) 2010                                                   */
/* Inclusive Design Institute                                           */
/*                                                                      */
/* This program is free software. You can redistribute it and/or        */
/* modify it under the terms of the GNU General Public License          */
/* as published by the Free Software Foundation.                        */
/************************************************************************/
define('TR_INCLUDE_PATH', '../include/');
include TR_INCLUDE_PATH . 'vitals.inc.php';
include_once TR_INCLUDE_PATH . 'classes/DAO/MyownPatchesDAO.class.php';
if (isset($_POST['field'])) {
    $myownPatchesDAO = new MyownPatchesDAO();
    // Format of $_POST['field']: [fieldName]|[user_id]
    $pieces = explode('-', $_POST['field']);
    $status = $myownPatchesDAO->UpdateField($pieces[1], $pieces[0], $_POST['value']);
    if (is_array($status)) {
        $rtn['status'] = 'fail';
        foreach ($status as $err) {
            $rtn['error'][] = $err;
        }
    } else {
        $rtn['status'] = 'success';
        $rtn['success'][] = _AT('TR_FEEDBACK_ACTION_COMPLETED_SUCCESSFULLY');
    }
    echo json_encode($rtn);
}