Beispiel #1
0
<?php

define('DarkCoreCMS', TRUE);
include 'config.php';
include 'functions/global_functions.php';
if (isset($_POST['deletecomm'])) {
    remove_comment($_POST['newsid'], $_POST['commid']);
    header('Location: ../');
} else {
    header('Location: ../');
}
Beispiel #2
0
			<div class="row">
				<div class="col-sm-6 col-sm-offset-3">
					<input type="submit" name="login-submit" id="login-submit" tabindex="4" class="form-control btn btn-login" value="Save">
				</div>
			</div>
		</div>
	</form>

<?php 
} else {
    if ($_GET['action'] == "deletecomment") {
        if (!isset($_GET['id'])) {
            die("Must specify id for this action");
        }
        $commentId = intval($_GET['id']);
        if (isset($_GET['artistId'])) {
            $artistId = intval($_GET['artistId']);
            $redirect_page = "artists.php?action=details&id=" . $artistId;
        } else {
            if (isset($_GET['performanceId'])) {
                $performanceId = intval($_GET['performanceId']);
                $redirect_page = "performance.php?action=details&id=" . $performanceId;
            } else {
                $redirect_page = 'artists.php?action=list';
            }
        }
        $ret = remove_comment($commentId);
        // Check error code on delete?
        header('Location: ' . $redirect_page, true);
    }
}
<?php

switch ($requestCode) {
    case OPCODE::SERVICE_REMOVE_ACCESSPOINT_REQUEST:
        //        if (!isset($json->{'AccessPointId'}))
        //            echo_invalid_param($json);
        //echo ">>";
        remove_accesspoint($json);
        break;
    case OPCODE::SERVICE_REMOVE_COMMENT_REQUEST:
        //        if (!isset($json->{'CommentId'}))
        //            echo_invalid_param($json);
        remove_comment($json);
        break;
    case OPCODE::SERVICE_REMOVE_COPROMOTION_REQUEST:
        //        if (!isset($json->{'CoPromotionId'}))
        //            echo_invalid_param($json);
        remove_co_promotion($json);
        break;
    case OPCODE::SERVICE_REMOVE_PROMOTION_REQUEST:
        //        if (!isset($json->{'ShopPromotionId'}))
        //            echo_invalid_param($json);
        remove_promotion($json);
        break;
    case OPCODE::SERVICE_REMOVE_PICTURE_REQUEST:
        //        if (!isset($json->{'PictureId'}))
        //            echo_invalid_param($json);
        remove_picture($json);
        break;
    case OPCODE::SERVICE_REMOVE_SHOP_REQUEST:
        //         if (!isset($json->{'ShopId'}))