예제 #1
0
<?php

/**
 * Developed by Jay Gaha
 * http://jaygaha.com.np
 */
$type = isset($_GET['type']) ? $_GET['type'] : 0;
$id = isset($_GET['id']) ? (int) $_GET['id'] : 0;
include 'includes/inc.php';
include "../master_admin/includes/classes/class.music_properties.php";
include "../master_admin/includes/classes/class.socialmedia.php";
$properties = new Music_Properties();
$social = new Social_Media();
$validType = array('company', 'artist');
if (!in_array($type, $validType) || $id == 0) {
    header("Location: home.php");
}
$data['type'] = $type;
$data['id'] = $id;
$data['rows'] = $properties->get_all_rows('social');
$data['exsocial'] = $social->get_all_rows($type, $id);
// echo "<pre>"; print_r($data);exit;
layout('form_social', $data);
예제 #2
0
<?php

/**
 * Developed by Jay Gaha
 * http://jaygaha.com.np
 */
include 'includes/inc.php';
include "includes/classes/class.music_properties.php";
$properties = new Music_Properties();
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
    $del_id = isset($_GET['del_id']) ? $_GET['del_id'] : 0;
    $id = isset($_GET['id']) ? $_GET['id'] : 0;
    $currentId = $del_id > 0 ? $del_id : $id;
    $checkRow = $properties->get_row($currentId);
    if (is_array($checkRow)) {
        $data['row'] = $checkRow;
        $data['image'] = checkImagexists('../../uploads/', $checkRow['mp_type'] . '_' . $checkRow['mp_id']);
        //delete command
        if ($del_id) {
            $deleteRow = $properties->delete_row($del_id, $checkRow['mp_type']);
            //delete from artist properties
            $properties->delete_rows_properties($del_id);
            if ($data['image']) {
                unlink('../../uploads/' . $checkRow['mp_type'] . '_' . $checkRow['mp_id'] . '.jpg');
            }
            header('Location: ' . $checkRow['mp_type'] . '.php');
        }
    }
}
$data['rows'] = $properties->get_all_rows('genre');
$data['categories'] = $properties->get_all_rows('category');
예제 #3
0
<?php

/**
 * Developed by Jay Gaha
 * http://jaygaha.com.np
 */
include 'includes/inc.php';
include "includes/classes/class.artist.php";
include "includes/classes/class.music_properties.php";
$artist = new Artist();
$properties = new Music_Properties();
$data['rows'] = $artist->get_all_rows();
$data['categoryListing'] = $properties->get_all_rows('category');
$data['artistListing'] = $artist->getArtistProfileListing();
layout('profile', $data);
예제 #4
0
<?php

/**
 * Developed by Jay Gaha
 * http://jaygaha.com.np
 */
include "includes/functions.php";
include "includes/classes/class.music_properties.php";
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $arrData = array();
    $properties = new Music_Properties();
    if (empty($_POST['id'])) {
        $arrData['mp_name'] = addslashes(ucwords($_POST['txtfield']));
        $arrData['mp_type'] = addslashes($_POST['mp_type']);
        $arrData['parent_id'] = isset($_POST['selCat']) ? $_POST['selCat'] : 0;
        $insert = $properties->add($arrData);
        // echo "<pre>"; print_r($insert);exit;
        if ($insert) {
            if (isset($_FILES)) {
                $createImg = saveResizeImage($_FILES['category_image'], $insert, $_POST['mp_type']);
            }
            $_SESSION['insert_' . $_POST['mp_type']] = 'insert';
        } else {
            $_SESSION['insert_' . $_POST['mp_type']] = 'insert_faild';
        }
    } else {
        $arrData['mp_id'] = addslashes($_POST['id']);
        $arrData['mp_name'] = addslashes(ucwords($_POST['txtfield']));
        $arrData['parent_id'] = isset($_POST['selCat']) ? $_POST['selCat'] : 0;
        $update = $properties->edit($arrData);
        if ($update || isset($_FILES)) {
예제 #5
0
<?php

/**
 * Developed by Jay Gaha
 * http://jaygaha.com.np
 */
include 'includes/inc.php';
include "includes/classes/class.music_properties.php";
$properties = new Music_Properties();
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
    $del_id = isset($_GET['del_id']) ? $_GET['del_id'] : 0;
    $id = isset($_GET['id']) ? $_GET['id'] : 0;
    $currentId = $del_id > 0 ? $del_id : $id;
    $checkRow = $properties->get_row($currentId);
    if (is_array($checkRow)) {
        $data['row'] = $checkRow;
        //delete command
        if ($del_id) {
            $deleteRow = $properties->delete_row($del_id, $checkRow['mp_type']);
            //delete from artist properties
            $properties->delete_rows_social($del_id);
            header('Location: ' . $checkRow['mp_type'] . '.php');
        }
    }
}
$data['rows'] = $properties->get_all_rows('social');
layout('social', $data);