コード例 #1
0
    public function createPaketTableCustomer()
    {
        $paket = new Paket();
        $arrPaket = $paket->getWhere("paket_active = 1");
        $syarat = new PaketSyarat();
        $arrSyarat = $syarat->getWhere("syarat_active = 1");
        ?>
        <style>
            body{
                background-color: #24e0ba;
            }
            label {
                /* display: inline-block; */
                /* max-width: 100%; */
                margin-bottom: 0px;
                /* font-weight: 700; */
            }
        </style>
        <div class="pricing-container">
            <div class="pricing-switcher">
                <p class="fieldset">
                    <input type="radio" name="duration-1" value="monthly" id="monthly-1" checked>
                    <label for="monthly-1">Monthly</label>
                    <input type="radio" name="duration-1" value="yearly" id="yearly-1">
                    <label for="yearly-1">Yearly</label>
                    <span class="switch"></span>
                </p>
            </div>
            <ul class="pricing-list bounce-invert">
                <?php 
        foreach ($arrPaket as $num => $pak) {
            ?>
                <li <?php 
            if ($num == 1) {
                echo 'class="exclusive"';
            }
            ?>
>
                    <ul class="pricing-wrapper">
                        <li data-type="monthly" class="is-visible">
                            <header class="pricing-header">
                                <h2><?php 
            echo $pak->paket_name;
            ?>
</h2>
                                <div class="price">
                                    <span class="currency">IDR</span>
                                    <span class="value"><?php 
            echo idrK($pak->paket_price);
            ?>
</span>
                                    <span class="duration">mo</span>
                                </div>
                            </header>
                            <div class="pricing-body">
                                <ul class="pricing-features">
                                    <?php 
            foreach ($arrSyarat as $sya) {
                $mm = new PaketMatrix();
                $mmid = $pak->paket_id . "_" . $sya->syarat_id;
                $mm->getByID($mmid);
                $val = $mm->ps_isi;
                if ($sya->syarat_rumus == "bool") {
                    if ($val == "1") {
                        ?>
                        <li><?php 
                        echo $sya->syarat_name;
                        ?>
</li>
                        <?php 
                    } else {
                        ?>
                        <li>-</li>
                    <?php 
                    }
                } else {
                    $exp = explode(",", $sya->syarat_rumus);
                    $jenis = $exp[0];
                    $check = $exp[1];
                    if ($val == "") {
                        $val = 0;
                    }
                    if ($jenis == "int" && $check == "=") {
                        //                        echo $val;
                        if ($val > 0) {
                            ?>
                            <li><em><?php 
                            echo $val;
                            ?>
</em> <?php 
                            echo $sya->syarat_name;
                            ?>
</li>
                            <?php 
                        }
                    }
                }
                ?>

                                    <?php 
            }
            ?>
<!--                                    <li><em>1</em> Template Style</li>-->
<!--                                    <li><em>25</em> Products Loaded</li>-->
<!--                                    <li><em>1</em> Image per Product</li>-->
<!--                                    <li><em>Unlimited</em> Bandwidth</li>-->
<!--                                    <li><em>24/7</em> Support</li>-->
                                </ul>
                            </div>
                            <footer class="pricing-footer">
                                <a class="select" href="#">Sign Up</a>
                            </footer>
                        </li>
                        <li data-type="yearly" class="is-hidden">
                            <header class="pricing-header">
                                <h2>Basic</h2>
                                <div class="price">
                                    <span class="currency">IDR</span>
                                    <span class="value"><?php 
            echo idrK($pak->paket_price * 12);
            ?>
</span>
                                    <span class="duration">yr</span>
                                </div>
                            </header>
                            <div class="pricing-body">
                                <ul class="pricing-features">
                                    <?php 
            foreach ($arrSyarat as $sya) {
                $mm = new PaketMatrix();
                $mmid = $pak->paket_id . "_" . $sya->syarat_id;
                $mm->getByID($mmid);
                $val = $mm->ps_isi;
                if ($sya->syarat_rumus == "bool") {
                    if ($val == "1") {
                        ?>
                                                <li><?php 
                        echo $sya->syarat_name;
                        ?>
</li>
                                            <?php 
                    } else {
                        ?>
                                                <li>-</li>
                                            <?php 
                    }
                } else {
                    $exp = explode(",", $sya->syarat_rumus);
                    $jenis = $exp[0];
                    $check = $exp[1];
                    if ($val == "") {
                        $val = 0;
                    }
                    if ($jenis == "int" && $check == "=") {
                        //                        echo $val;
                        if ($val > 0) {
                            ?>
                                                    <li><em><?php 
                            echo $val;
                            ?>
</em> <?php 
                            echo $sya->syarat_name;
                            ?>
</li>
                                                <?php 
                        }
                    }
                }
                ?>

                                    <?php 
            }
            ?>
                                </ul>
                            </div>
                            <footer class="pricing-footer">
                                <a class="select" href="#">Sign Up</a>
                            </footer>
                        </li>
                    </ul>
                </li>
            <?php 
        }
        ?>

            </ul>
        </div>

        <style>
            ul,li{
                margin: 0;
                padding: 0;
                border: 0;
                font-size: 100%;
                font: inherit;
                vertical-align: baseline;
            }
            /* HTML5 display-role reset for older browsers */
            article, aside, details, figcaption, figure,
            footer, header, hgroup, menu, nav, section, main {
                display: block;
            }
            body {
                line-height: 1;
            }
            ol, ul {
                list-style: none;
            }
            blockquote, q {
                quotes: none;
            }
            blockquote:before, blockquote:after,
            q:before, q:after {
                content: '';
                content: none;
            }
            table {
                border-collapse: collapse;
                border-spacing: 0;
            }
            *,
            *::after,
            *::before {
                -webkit-box-sizing: border-box;
                -moz-box-sizing: border-box;
                box-sizing: border-box;
            }

            html {
                font-size: 62.5%;
            }

            html * {
                -webkit-font-smoothing: antialiased;
                -moz-osx-font-smoothing: grayscale;
            }

            body {
                font-size: 1.6rem;
                font-family: "Open Sans", sans-serif;
                color: #2d3d4f;
                background-color: #1bbc9d;
            }

            a {
                text-decoration: none;
            }

        </style>
    <?php 
    }
コード例 #2
0
    function newApp()
    {
        ?>
        <style>
            .helper{
                font-size: 12px;
                padding-top: 5px;
                color:#999999;
            }
            .foto100{
                width: 100px;
                height: 100px;
                overflow: hidden;
            }
            .foto100 img{
                height: 100px;
            }
            .err{
                display: none;
            }
        </style>
        <div class="container attop" >



        <div class="col-md-8 col-md-offset-2">
            <small><a href="<?php 
        echo _SPPATH;
        ?>
mydashboard">back to dashboard</a> </small>
            <div id="resultajax" style="display: none;"></div>
<!--            <h1 class="hype">Form Pendaftaran App</h1>-->
            <form class="form-horizontal" role="form" id="formaddapp">
                <hr>
                <h2 class="hype">Application Descriptions</h2>
                <hr>
                <div class="form-group">
                    <label class="control-label col-sm-4" for="apptitle">Application Title:
                        <div class="helper">max 30 chars</div>
                    </label>
                    <div class="col-sm-8">
                        <input name="apptitle" type="text" class="form-control" id="apptitle" placeholder="Enter Application Title">
                        <div class="err"></div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-sm-4" for="appshort">Short Description:
                        <div class="helper">max 80 chars</div>
                    </label>
                    <div class="col-sm-8">
                        <input type="text" name="appshort" class="form-control" id="appshort" placeholder="Enter Short Description">
                        <div class="err"></div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-sm-4" for="appfull">Full Description:
                        <div class="helper">max 4000 chars</div>
                    </label>
                    <div class="col-sm-8">
                        <textarea name="appfull" class="form-control" id="appfull" rows="5"></textarea>
                        <div class="err"></div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-sm-4" for="appkey">Keywords:
                        <div class="helper">comma separated</div>
                    </label>
                    <div class="col-sm-8">
                        <input type="text" name="appkey" class="form-control" id="appkey" placeholder="Enter Keywords">
                        <div class="err"></div>
                    </div>
                </div>
                <hr>
                <h2 class="hype">Application Icons and Images</h2>
                <hr>
                <div class="form-group">
                    <label class="control-label col-sm-4" for="appicon">Icon:
                        <div class="helper">1024x1024 (32bit PNG)</div>
                    </label>
                    <div class="col-sm-8">
                        <?php 
        $foto = new \Leap\View\InputFoto("appicon", "appicon", "");
        $foto->p();
        ?>

<!--                        <input type="file" name="appicon" class="form-control" id="appicon" placeholder="Enter Keywords">-->
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-sm-4" for="appfeat">Feature Graphics:
                        <div class="helper">1024w x 500h (JPG/24bit PNG)</div>
                    </label>
                    <div class="col-sm-8">
                        <?php 
        $foto = new \Leap\View\InputFoto("appfeat", "appfeat", "");
        $foto->p();
        ?>

                    </div>
                </div>
                <hr>
                <h2 class="hype">Pricing</h2>
                <hr>
                <div class="form-group">
                    <label class="control-label col-sm-4" for="appfeat">Package:
                        <div class="helper">learn more about package <a target="_blank" href="<?php 
        echo _SPPATH;
        ?>
pricing">here</a> </div>
                    </label>
                    <div class="col-sm-8">
                        <select name="apppaket" id="apppaket" class="form-control">
                        <?php 
        $paket = new Paket();
        $arrPaket = $paket->getWhere("paket_active = 1 ORDER BY paket_price ASC");
        foreach ($arrPaket as $num => $paket) {
            ?>
                          <option <?php 
            if ($paket->paket_recommended) {
                echo "selected";
            }
            ?>
  value="<?php 
            echo $paket->paket_id;
            ?>
"><?php 
            echo $paket->paket_name;
            ?>
 - Rp.<?php 
            echo idrK($paket->paket_price * 12);
            ?>
/year</option>
                        <?php 
        }
        ?>
                        </select>
                        <div class="err"></div>
                    </div>
                </div>
                <hr>

                <div class="form-group">
                    <div class="col-sm-8 col-sm-offset-2">
                        <button type="submit" style="width: 100%;" class="btn btn-lg btn-success">Submit</button>
                        <a href="<?php 
        echo _SPPATH;
        ?>
mydashboard" style="width: 100%; margin-top: 10px;" class="btn btn-lg btn-default">Cancel</a>
                    </div>
                </div>
            </form>

            <script>
                $( "#formaddapp" ).submit(function( event ) {

                    $(".err").hide();

//                        alert("benar semua1");
                        var $form = $(this);
                        var url = "<?php 
        echo _SPPATH;
        ?>
MyApp/appReg";

                        $(".err").hide();

                        // Send the data using post
                        var posting = $.post(url, $form.serialize(), function (data) {
                            console.log(data);
                            if (data.bool) {
                                //kalau success masuk ke check your email....
                                document.location = "<?php 
        echo _SPPATH;
        ?>
PaymentWeb/payfor?app_id="+data.app_id;
                            }
                            else {
                                if(data.all!="") {
                                    $("#resultajax").show();
                                    $("#resultajax").html(data.all);
                                }
                                var obj = data.err;
                                var tim = data.timeId;
                                //console.log( obj );
                                for (var property in obj) {
                                    if (obj.hasOwnProperty(property)) {
                                        $( "#"+property ).css( "border-color", "red");
                                        $( "#"+property ).next(".err").css( "color", "red").show().empty().append(obj[property]).fadeIn('slow');
                                    }
                                }
                            }
                        }, 'json');




                    event.preventDefault();
                });
            </script>

<!--            Application Descriptions-->
<!--            Application Title : 30 chars-->
<!--            Short Desc : 80 chars-->
<!--            Full Desc : 4000 chars-->
<!--            Keywords : comma separated (for more accurate search result)-->
<!--            Contoh : The Body Shop; Body Butter; Soap; Skin;-->
<!---->
<!--            Images-->
<!--            App Icon : 1024x1024 (32bit PNG)-->
<!--            Feature Graphic : 1024w x 500h (JPG/24bit PNG)-->
        </div>
    <?php 
    }