public function inputProduct()
    {
        $myapp_id = AppAccount::getAppID();
        if ($myapp_id == "" || $myapp_id < 1) {
            die("Not valid App ID");
        }
        $cam = new MCampaignModel();
        $arrCam = $cam->getWhere("camp_app_id = '{$myapp_id}' ");
        $prod = new MProdModel();
        $arrProd = $prod->getWhere("prod_app_id = '{$myapp_id}' ");
        $_SESSION['arrProd'] = $arrProd;
        ?>
        <div class="input-group">

            <span class="input-group-addon" id="basic-addon1">Select Campaign :</span>
            <select class="form-control" onchange="getMatrix();" id="camp_select">
                <option value=""></option>
                <?php 
        foreach ($arrCam as $c) {
            ?>
                    <option value="<?php 
            echo $c->camp_id;
            ?>
"><?php 
            echo $c->camp_name;
            ?>
</option>
                <?php 
        }
        ?>
            </select>
        </div><!-- /input-group -->



        <div id="camp_matrix" style="padding-top: 20px;">

        </div>

        <script>
            function getMatrix(){
                var slc = $("#camp_select").val();
                if(slc!="")
                    $("#camp_matrix").load("<?php 
        echo _SPPATH;
        ?>
MCampApp/getMatrix?cid="+slc);
            }
        </script>
        <style>
            .productcamp{
                background-color: #dedede;
                margin: 5px;
                padding: 5px;
            }

        </style>
        <?php 
        //pr($arrProd);
    }
 static function getHome()
 {
     /*
     * Carousel, ratio 16:10
     Campaigns, ratio 16:10
     Categories
     category id, name, image
     Drawer
     Login, Wishlist, Payment, Transactions, Logout - Static
     About Us, Contact Us - Dynamic
     Nembak ke URL
     Additional pages dynamic, semua masuk ke sebelum logout
     Application Settings
     Actionbar Color - Hex code “#dedede"
     Actionbar Icon Color - Black / White
     Search Product
     */
     //check ada POST ga ?
     $app_id = addslashes($_POST['app_id']);
     //ambil main banner
     $camp = new MCampaignModel();
     //TODO masih harus dilimit sesuai paket yg dibeli
     $arrCarousel = $camp->getWhere("camp_app_id = '{$app_id}' AND camp_active = 1 AND camp_type = 'carousel' AND camp_begin <= CURDATE() AND camp_end >= CURDATE() ORDER BY camp_begin DESC ");
     //TODO masih harus dilimit sesuai paket yg dibeli
     $arrBanner = $camp->getWhere("camp_app_id = '{$app_id}' AND camp_active = 1 AND camp_type = 'campaign' AND camp_begin <= CURDATE() AND camp_end >= CURDATE() ORDER BY camp_begin DESC ");
     $cat = new MProdCat();
     $arrCat = $cat->getWhere("cat_app_id = '{$app_id}' AND cat_parent_id = 0 ORDER BY cat_name ASC");
     $json['status_code'] = 1;
     $json['status_message'] = "OK";
     $json['results']['carousel'] = APIFilter::filter($arrCarousel);
     $json['results']['campaign'] = APIFilter::filter($arrBanner);
     $json['results']['maincategories'] = APIFilter::filter($arrCat);
     $json['results']['drawer'] = array();
     $json['results']['setting'] = array();
     echo json_encode($json);
     die;
 }