Exemplo n.º 1
0
 * 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 MMC; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
require "modules/network/includes/network.inc.php";
if (isset($_POST["bconfirm"])) {
    $subnet = $_POST["subnet"];
    $host = $_POST["host"];
    delHost($subnet, $host);
    $result = _T("The host has been deleted.");
    if (isset($_POST["updatedns"]) & isset($_POST["zone"])) {
        delRecord($_POST["zone"], $host);
        $result .= " " . _T("The DNS record has been deleted.");
    }
    if (!isXMLRPCError()) {
        new NotifyWidgetSuccess($result);
    }
    header("Location: main.php?module=network&submod=network&action=subnetmembers&subnet={$subnet}");
    exit;
} else {
    $subnet = urldecode($_GET["subnet"]);
    $host = urldecode($_GET["host"]);
    $askupdatedns = False;
    $domain = "";
    $options = getSubnetOptions(getSubnet($subnet));
    if (isset($options["primarydomainname"])) {
        /*
Exemplo n.º 2
0
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * MMC is distributed in the hope that it will be useful,
 * 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 MMC; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
if (isset($_POST["bconfirm"])) {
    $host = $_POST["host"];
    $zone = $_POST["zone"];
    delRecord($zone, $host);
    if (!isXMLRPCError()) {
        new NotifyWidgetSuccess(_T("The record has been deleted."));
    }
    header("Location: main.php?module=network&submod=network&action=zonemembers&zone={$zone}");
    exit;
} else {
    $host = urldecode($_GET["host"]);
    $zone = urldecode($_GET["zone"]);
    $rr = getResourceRecord($zone, $host);
    $f = new PopupForm(_T("Delete a DNS record"));
    $f->addText(sprintf(_T("You will delete the %s record"), "<strong>{$host}</strong>"));
    /* If the deleted record is a A record, CNAME may be linked to it */
    if (isset($rr[0][1]["aRecord"])) {
        $cnames = getCNAMEs($zone, $host);
        if (!empty($cnames)) {
Exemplo n.º 3
0
                $stat = 'gagal_hapus_transaksi';
            } else {
                // checking detail jenis transaksi (penerimaan siswa --> delete keu_peneirmaansiswa)
                $sr = 'SELECT 
								kt.kategoritransaksi,
								jt.kode
							FROM keu_detjenistransaksi dj
								JOIN keu_jenistransaksi jt on jt.replid = dj.jenistransaksi
								JOIN keu_kategoritransaksi kt on kt.replid = dj.kategoritransaksi
							WHERE dj.replid =' . $detjenistransaksi;
                // pr($sr);
                $er = mysql_query($sr);
                $rr = mysql_fetch_assoc($er);
                // delete tb penerimaan siswa
                if ($rr['kategoritransaksi'] == 'siswa' && $rr['kode'] == 'in') {
                    $del = delRecord('keu_penerimaansiswa', array('replid' => $idref));
                    $stat = !$del ? 'gagal_hapus_penerimaan_siswa' : 'sukses';
                } else {
                    $stat = 'sukses';
                }
            }
            $out = json_encode(array('status' => $stat));
            break;
            // delete ---------------------------------------------------------------------
            // ambiledit ------------------------------------------------------------------
        // delete ---------------------------------------------------------------------
        // ambiledit ------------------------------------------------------------------
        case 'ambiledit':
            switch ($_POST['subaksi']) {
                // case 'out_come';
                case 'out':
Exemplo n.º 4
0
            }
            $out = json_encode(array('status' => $stat, 'idpembayaran' => $idPenerimaanSiswa));
            break;
            // add / edit -----------------------------------------------------------------
            // delete ---------------------------------------------------------------------
        // add / edit -----------------------------------------------------------------
        // delete ---------------------------------------------------------------------
        case 'hapus':
            $detjenistransaksi = getDetJenisTransaksi('in', 'siswa');
            $d = mysql_fetch_assoc(mysql_query('SELECT * from ' . $tb . ' where replid=' . $_POST['replid']));
            $s = 'DELETE from ' . $tb . ' WHERE replid=' . $_POST['replid'];
            $e = mysql_query($s);
            if (!$e) {
                $stat = 'gagal_hapus_penerimaansiswa';
            } else {
                $del = delRecord('keu_transaksi', array('idref' => $_POST['replid'], 'detjenistransaksi' => $detjenistransaksi));
                // pr($del);
                $stat = !$del ? 'gagal_hapus_transaksi' : 'sukses';
            }
            $out = json_encode(array('status' => $stat, 'terhapus' => $mnu));
            break;
            // delete ---------------------------------------------------------------------
        // delete ---------------------------------------------------------------------
        case 'invoiceView':
            $s = 'SELECT
						d.nama departemen,
						concat(ta.tahunajaran," - ",ta.tahunajaran+1)tahunajaran,
						s.namasiswa,
						s.nis,
						s.nisn,
						s.nopendaftaran,