Exemplo n.º 1
0
Arquivo: Exe.php Projeto: shiyake/PHP
        print_r(json_encode($result));
    }
}
if (!empty($_GET['cata_second_to_edit']) && !empty($_GET['name'])) {
    $cataObj = new Cores\Models\CataModel();
    $result = $cataObj->editSecondLevel($_GET['cata_second_to_edit'], $_GET['name']);
    print_r(json_encode($result));
}
if (!empty($_GET['edit_third_lvl_field']) && !empty($_GET['name'])) {
    $cataObj = new Cores\Models\CataModel();
    $result = $cataObj->modify($_GET['edit_third_lvl_field'], $_GET['name']);
    print_r(json_encode($result));
}
if (!empty($_GET['cata_rd_lve_del'])) {
    $cataObj = new Cores\Models\CataModel();
    print_r(json_encode($cataObj->delete($_GET['cata_rd_lve_del'])));
}
if (!empty($_GET['action']) && !empty($_GET['rid'])) {
    $rid = $_GET['rid'];
    switch ($_GET['action']) {
        case 'edit_comments_confirm':
            if (!empty($_GET['content'])) {
                $commentsObj = new Cores\Models\CommentsModel();
                $result = $commentsObj->modify($rid, $_GET['content']);
                echo $result;
            } else {
                echo -1;
            }
            break;
        default:
            break;
Exemplo n.º 2
0
Arquivo: cata.php Projeto: shiyake/PHP
<?php

$tips = '';
if (!empty($_POST['new_cata_name'])) {
    $cataObj = new Cores\Models\CataModel();
    $cataObj->add($_POST['new_cata_name']);
    $tips = success('添加成功');
}
if (!empty($_GET['cata_to_del'])) {
    $tips = confirm('<strong>警告!</strong>该操作不可恢复,您确定要执行该操作吗?', 'admin.php?v=' . $view . '&cata_to_del_confirm=' . $_GET['cata_to_del'], '确定删除');
}
if (!empty($_GET['cata_to_del_confirm'])) {
    $cataObj = new Cores\Models\CataModel();
    $cataObj->delete($_GET['cata_to_del_confirm']);
    $tips = success('删除成功');
}
if (!empty($_GET['cata_to_view'])) {
    // $tips=modal('test','test');
}
?>

        <!-- /. NAV SIDE  -->
        <div id="page-wrapper">
            <div id="page-inner">

                <div class="modal fade modal-view-cata" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
                  <div class="modal-dialog modal-lg">
                    <div class="modal-content">
                      <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title">查看详情</h4>