function makenew() { //clear all remaining session session_regenerate_id(); ZAppFeature::clearSession(); header("Location:" . _SPPATH . "apps/make"); die; }
public static function page() { $zp = new ZAppFeature(); $details = ZAppFeature::loadDetails(); ?> <section id="details"> <h2 class="header_besar">Insert the details of your App <abbr class="required" title="required">*</abbr></h2> <hr class="garisbatas"> <div class="form-group"> <label for="contact_pname">App Name</label> <?php TextLimiter::inputText("text", "app_name", "app_name", "App Name", $details['app_name'], 15, 7, "my_app_icon_text"); ?> </div> <div class="form-group"> <label for="app_icon_img">App Icon</label> <?php $bannerModalID = "app_icon_img_cropper"; ?> <div class="previewImg"> <img style="cursor:pointer;" data-toggle="modal" data-target="#<?php echo $bannerModalID; ?> " id="<?php echo $bannerModalID; ?> _prev" src="<?php echo $details['app_icon']; ?> "> </div> <?php global $modalReg; $modalReg->regCropper($bannerModalID, "App Icon", "app_icon", $details['app_icon'], "1300:1300", array($bannerModalID . "_prev", 'my_app_icon_img_src')); ?> <input type="hidden" id="app_icon" value="<?php echo $details['app_icon']; ?> "> </div> <div class="form-group"> <label for="app_des_short">App Short Description</label> <?php TextLimiter::inputTextAreaBiasa("text", "app_des_short", "app_des_short", "App Short Description", $details['app_des_short'], 100, 10); ?> </div> <div class="form-group"> <label for="contact_pname">App Long Description</label> <?php TextLimiter::inputTextAreaBiasa("text", "app_des_long", "app_des_long", "App Long Description", $details['app_des_long'], 2000, 10); ?> </div> <div class="form-group"> <label for="contact_pname">App Feature Graphics</label> <?php $bannerModalID = "app_feat_cropper"; ?> <div class="previewImg"> <img style="cursor:pointer;" data-toggle="modal" data-target="#<?php echo $bannerModalID; ?> " id="<?php echo $bannerModalID; ?> _prev" src="<?php echo $details['app_feature_img']; ?> "> </div> <?php global $modalReg; $modalReg->regCropper($bannerModalID, "App Feature Graphics", "app_feature_img", $details['app_feature_img'], "3000:1300", array($bannerModalID . "_prev")); ?> <input type="hidden" id="app_feature_img" value="<?php echo $details['app_feature_img']; ?> "> </div> <div style="text-align: center; margin-top: 20px;"> <button id="savedetails" style="width: 50%;" class="btn btn-danger btn-lg">Next</button> </div> <script> $('#savedetails').click(function(){ saveAppDetails(1); }); function saveAppDetails(mode){ var app_name = $('#app_name').val(); var app_icon = $('#app_icon').val(); var app_des_short = $('#app_des_short').val(); var app_des_long = $('#app_des_long').val(); var app_feature_img = $('#app_feature_img').val(); //save the data to sessions $.post('<?php echo _SPPATH; ?> FeatureSessionLayer/saveDetails',{ app_name : app_name, app_icon : app_icon, app_des_short : app_des_short, app_des_long : app_des_long, app_feature_img : app_feature_img },function(data){ console.log(data); if(data){ // console.log('success'); //save JSON $.get('<?php echo _SPPATH; ?> FeatureSessionLayer/createJSON?id=<?php echo $_GET['id']; ?> ',function(data){ console.log(data); if(mode == 1){ $.get('<?php echo _SPPATH; ?> FeatureSessionLayer/saveIntoApp?id=<?php echo $_GET['id']; ?> ',function(data){ document.location = '<?php echo _SPPATH; ?> PaymentWeb/pay?app_id='+data.id; },'json'); } }); } }); } </script> </section> <?php }
public static function page() { $selectedFeature = ZAppFeature::selectedFeature(); $homePage = $selectedFeature[0]; $arrChildren = ZAppFeature::getChildren(); // pr($arrChildren); $arrObj = array(); foreach ($arrChildren as $child) { $obj = new $child(); //kalo tidak aktif continue if (!$obj->feat_active) { continue; } if (!isset($arrObj[$obj->feat_rank_tampil])) { $arrObj[$obj->feat_rank_tampil] = $obj; } else { $arrObj[] = $obj; } } ksort($arrObj); ?> <div style="margin-left: -50px"> <div class="nexus"> <div id="loadingmobile"> <div style="float: left;"> <img src="<?php echo _SPPATH; ?> images/androidspinner2.gif"> </div> <div style="float: left; margin-left: 15px;"> loading.. </div> <div class="clearfix"></div> </div> <div id="app_desktop" style="display: none;"> <?php $details = ZAppFeature::loadDetails(); ?> <div id="my_app_icon"> <div id="my_app_icon_img"> <img id="my_app_icon_img_src" src="<?php echo $details['app_icon']; ?> "> </div> <div id="my_app_icon_text"><?php echo $details['app_name']; ?> </div> </div> <style> #my_app_icon{ width: 50px; margin-left: 15px; margin-top: 105px; text-align: center; } #my_app_icon_img{ width: 40px; height: 40px; /* background-image: url(*/<?php //=_SPPATH; ?> /*images/noimage2.png);*/ /* background-repeat: no-repeat;*/ /* background-size: 100% auto;*/ border-radius: 2px; margin-left: 5px; overflow: hidden; } #my_app_icon_img_src{ width: 40px; height: 40px; } #my_app_icon_text{ font-size: 11px; margin-top: 5px; color: white; } </style> </div> <div class="menubatterei"></div> <div id="splash_screen" style=" display: none; z-index: 2000;"></div> <div class="isiapp" id="isiapp"> <?php // print isi apps here foreach ($arrObj as $obj) { ?> <div class="mpage" id="m_<?php echo $obj->feat_id; ?> " style="display: none;"> <?php echo $obj->appPage(); ?> </div> <?php } ?> <div class="mpage" id="m_more" style="display: none;"> <div class="mheader" id="mheader_more"> <div class="mheadertext" id="mheadertext_more">More</div> </div> <div class="mcontent" id="mcontent_more"> <?php $jumlahSelected = count($selectedFeature); $cnt = 0; //manage tab here foreach ($selectedFeature as $sel) { foreach ($arrObj as $obj) { if ($obj->feat_id == $sel) { $cnt++; if ($cnt > 5) { $valuesNya = FeatureSessionLayer::load($obj->feat_id); $labelname = isset($valuesNya[$obj->feat_id . '_labelname']) ? $valuesNya[$obj->feat_id . '_labelname'] : $obj->feat_name; ?> <div onclick="manageView('<?php echo $obj->feat_id; ?> ');" id="list_<?php echo $obj->feat_id; ?> " class="listview"> <!-- <i class="--><?php //=$obj->feat_tab_icon; ?> <!--"></i> --> <div class="sim_maskColor" style="float:left;-webkit-mask-box-image: url(<?php echo $obj->icon_path . $obj->feat_tab_icon; ?> );"></div> <span id="tabname_<?php echo $obj->feat_id; ?> "><?php echo $labelname; ?> </span> </div> <?php } } } } ?> </div> </div> </div> <style> .listview{ padding: 5px; border-bottom: 1px solid #dedede; padding-left: 10px; cursor: pointer; } .mtab{ float: left; width: 54px; height: 40x; line-height: 40x; text-align: center; color: white; cursor: pointer; } .mtab-img{ line-height: 20px; } .mtab-text{ line-height: 20px; font-size: 10px; } .mtab-selected{ background-color: rgba(255,255,255,0.3); } .mtab-selected-black{ background-color: rgba(0,0,0,0.3) !important; } </style> <div class="mfooter" id="mfooter"> <?php $jumlahSelected = count($selectedFeature); $cnt = 0; //manage tab here foreach ($selectedFeature as $sel) { foreach ($arrObj as $obj) { if ($jumlahSelected > 5) { if ($cnt > 3) { break; } } if ($obj->feat_id == $sel) { $cnt++; $valuesNya = FeatureSessionLayer::load($obj->feat_id); $labelname = isset($valuesNya[$obj->feat_id . '_labelname']) ? $valuesNya[$obj->feat_id . '_labelname'] : $obj->feat_name; // echo $obj->feat_id." ".$cnt; ?> <div onclick="manageView('<?php echo $obj->feat_id; ?> ');" class="mtab <?php if ($cnt == 1) { ?> mtab-selected<?php } ?> " id="tab_<?php echo $obj->feat_id; ?> "> <div class="mtab-img"> <!-- <i class="--><?php //=$obj->feat_tab_icon; ?> <!--"></i>--> <div class="sim_maskColor" style="-webkit-mask-box-image: url(<?php echo $obj->icon_path . $obj->feat_tab_icon; ?> );"></div> </div> <div class="mtab-text" id="tabname_<?php echo $obj->feat_id; ?> " ><?php echo $labelname; ?> </div> </div> <script> inTabs.push('<?php echo $obj->feat_id; ?> '); </script> <?php } } } $pembagi = $jumlahSelected; if ($jumlahSelected > 5) { $pembagi = 5; } $tabwidth = floor(271 / $pembagi); if ($jumlahSelected > 5) { ?> <div class="mtab" onclick="showMore();" id="tab_more"> <div class="mtab-img"> <div class="sim_maskColor" style="-webkit-mask-box-image: url(<?php echo $obj->icon_path; ?> ic_more.png);"></div> </div> <div class="mtab-text">more</div> </div> <?php } ?> <style> .mtab{ width: <?php echo $tabwidth; ?> px; } </style> </div> </div> </div> <script> function showMore(){ manageView('more'); } function updateShowMore(arr){ console.log('updateShowmore'); console.log(arr); var more = ''; for(var x=0;x<arr.length;x++){ var attr = arr[x]; more += '<div onclick="manageView(\''+attr+'\');" id="list_'+attr+'" class="listview">'; more += '<div class="sim_maskColor" style="float:left;-webkit-mask-box-image: url('+arrFeats[attr].icon_path+arrFeats[attr].feat_tab_icon+');"></div> <span id="tabname_'+attr+'">'+ arrFeats[attr].label_name+'</span>'; // more += 'xxs<i class="'+arrFeats[attr].feat_tab_icon+'"></i> <span id="tabname_'+attr+'">'+ arrFeats[attr].label_name+'</span>'; more += '</div>'; } $('#mcontent_more').html(more); } </script> <style> .header_besar{ font-family: "Helvetica Neue Light", "Arial", sans-serif; font-size: 19px; } #your_business_fields label{ font-family: "Helvetica Neue Light", "Arial", sans-serif; padding-top: 10px; padding-bottom: 5px; } .feature_list_heading_information{ padding-bottom: 10px; font-family: "Helvetica Neue Light", "Arial", sans-serif; margin-top: -10px; font-size: 13px; } .feat{ /*float: left;*/ width: 60px; height: 100px; cursor: pointer; /*margin-right: 13px;*/ /*margin-left: 13px;*/ } .feat-img{ background-color: #dedede; width: 60px; height: 60px; border-radius: 60px; text-align: center; font-size: 30px; margin-top: 12px; /*padding: 5px;*/ color: #999; /*border: 1px solid #dedede;*/ } .feat-img-icon{ width: 30px; height: 30px; margin-left: 15px; margin-top: 15px; position: absolute; } .feat-selected .feat-img{ background-color: #73879C; color: white; } .feat-text{ font-size: 12px; padding-top: 5px; font-family: "Helvetica Neue Light", "Arial", sans-serif; text-align: center; color: #555555; } .begin{ /*margin-top: 28px;*/ /*padding-right: 20px;*/ /*padding-left: 20px;*/ } .navbar-default{ background-color: rgba(255,255,255,0.5); } .nexus{ width: 422px; height: 612px; background: url(<?php echo _SPPATH; ?> images/nexus5.png); background-size: 422px 612px; background-repeat: no-repeat; font-family: 'Roboto', sans-serif; } .menubatterei{ /*background-color: blue;*/ width: 271px; height: 16px; position: relative; top: 57px; left: 75px; overflow: hidden; background: url(<?php echo _SPPATH; ?> images/atasbar.png); background-size: 271px 16px; background-repeat: no-repeat; /*display: none;*/ } #mslogantext{ font-size: 13px; } .isiapp{ background-color: white; position: relative; top: 57px; left: 75px; width: 271px; height: 425px; /*overflow-x: auto;*/ overflow: hidden; /*display: none;*/ } #splash_screen{ top: 57px; left: 75px; width: 271px; height: 466px; overflow: hidden; position: relative; } #app_desktop{ top: 57px; left: 75px; width: 271px; height: 482px; overflow: hidden; position: relative; background-image: url('<?php echo _SPPATH; ?> images/emptyandroid.jpg'); background-repeat: no-repeat; background-size: 100% auto; z-index: 1005; } #mfooter{ width: 271px; height: 41px; line-height: 41px; background-color: black; position: relative; top: 57px; left: 75px; overflow: hidden; /*display: none;*/ } #loadingmobile{ position: absolute; width: 150px; padding: 15px; margin-left:130px; margin-top: 240px; z-index: 1008; background-color: #FFFFFF; border: 1px solid #dedede; } #loadingmobile img{ /*width: 100%;*/ height: 30px; } #loadingmobile div{ line-height: 30px; } .hiddenform::-webkit-scrollbar { width: 2px; } .hiddenform::-webkit-scrollbar-button { width: 2px; height:5px; } .hiddenform::-webkit-scrollbar-track { background:#eee; border: thin solid lightgray; box-shadow: 0px 0px 3px #dfdfdf inset; border-radius:10px; } .hiddenform::-webkit-scrollbar-thumb { background:#999; border: thin solid gray; border-radius:10px; } .hiddenform::-webkit-scrollbar-thumb:hover { background:#7d7d7d; } #mcontent_more{ background-color: #222222; color: white; } </style> <style> .mcontent{ width: 271px; height: 385px; overflow-x: hidden; overflow-y: auto; background-color: white; } .mcontent::-webkit-scrollbar { width: 2px; } .mcontent::-webkit-scrollbar-button { width: 2px; height:5px; } .mcontent::-webkit-scrollbar-track { background:#eee; border: thin solid lightgray; box-shadow: 0px 0px 3px #dfdfdf inset; border-radius:10px; } .mcontent::-webkit-scrollbar-thumb { background:#999; border: thin solid gray; border-radius:10px; } .mcontent::-webkit-scrollbar-thumb:hover { background:#7d7d7d; } .mheader { width: 100%; height: 40px; line-height: 40px; background-color: #000000; color: white; overflow: hidden; } .mheadertext{ padding-left: 10px; font-size: 14px; font-family: 'Roboto', sans-serif; } </style> <script> var homePage = '<?php echo $homePage; ?> '; var listOfFeat = [<?php echo explode(",", $selectedFeature); ?> ]; $( document ).ready(function() { // console.log(homePage); // Handler for .ready() called. $(".mpage").hide(); $('#m_'+homePage).show(); // listOfFeat.push("mobile"); updateSelectedAppAndSimulator(); }); function closeBlur(){ $('.list_item_form').hide(); $('.bgblur').hide(); } </script> <?php }
public function formCustom() { $sel = ZAppFeature::selectedFeature(); $valuesNya = FeatureSessionLayer::load($this->feat_id); $contact_pname = isset($valuesNya[$this->feat_id . '_pname']) ? $valuesNya[$this->feat_id . '_pname'] : "Inbox"; ?> <h1 class="header_besar" style="padding: 0; margin: 0; text-align: center; margin-top: 10px; margin-bottom: 10px;"><?php echo $this->feat_name; ?> </h1> <p style="color: #666666; font-size: 12px;">Please complete one or more fields below. <em>All fields are optional.</em></p> <script> //do not change the function name function info_save_<?php echo $this->feat_id; ?> (){ //get all data from inputs var contact_pname = $('#<?php echo $this->feat_id; ?> _pname').val(); //label_name : mandatory var label_name = $('#<?php echo $this->feat_id; ?> _labelname').val(); //save the data to sessions $.post('<?php echo _SPPATH; ?> FeatureSessionLayer/save?id=<?php echo $this->feat_id; ?> ',{ <?php echo $this->feat_id; ?> _labelname : label_name, <?php echo $this->feat_id; ?> _pname : contact_pname },function(data){ console.log(data); if(data){ $(".hiddenform").hide(); //update Selected App dan Layout di Simulator updateSelectedAppAndSimulator(); } }); } </script> <?php }
public function formCustom() { $sel = ZAppFeature::selectedFeature(); $valuesNya = FeatureSessionLayer::load($this->feat_id); $deal_array = isset($valuesNya[$this->arrayID]) ? $valuesNya[$this->arrayID] : array(); global $modalReg; $modalReg->addAboveBGBlur(array("FeatArticle", "addForm")); //harus dioverwrite ?> <h1 class="header_besar" style="padding: 0; margin: 0; text-align: center; margin-top: 10px; margin-bottom: 10px;"> <?php echo $this->feat_name; ?> </h1> <div id="notfound_<?php echo $this->feat_id; ?> _button" class="deal_not_found" <?php if (count($deal_array) > 0) { ?> style="display: none;"<?php } ?> > <h3 style="text-align: center; padding: 30px; color: #bbbbbb;">Oops, sorry no <?php echo $this->feat_name; ?> was found...</h3> </div> <div <?php if (count($deal_array) < 1) { ?> style="display: none;"<?php } ?> class="wadahform_deal_button" id="wadahform_<?php echo $this->feat_id; ?> _button"> <script> $(function() { $("#<?php echo $this->feat_id; ?> _sortable").sortable({ stop: function(event, ui) { var idsInOrder = $("#<?php echo $this->feat_id; ?> _sortable").sortable("toArray"); console.log(idsInOrder); $.post("<?php echo _SPPATH; ?> FeatureSessionLayer/setArrayOrder?id=<?php echo $this->feat_id; ?> &arrayID=<?php echo $this->arrayID; ?> ",{ ids : idsInOrder.join() },function(data){ console.log(data); update_<?php echo $this->feat_id; ?> _Simulator(data); },'json'); } }); $( "#<?php echo $this->feat_id; ?> _sortable" ).disableSelection(); }); </script> <style> .arraylist_sortable { list-style-type: none; margin: 0; padding: 0; width: 100%; } .arraylist_sortable li { background-color: #ffffff; padding: 5px; margin: 5px; } .arraylist_action{text-align: right;} .arraylist_action i{cursor: pointer;} .arraylist_action i.glyphicon-pencil{color: #008000;} .arraylist_action i.glyphicon-remove{color: #ff0000;} </style> <ul id="<?php echo $this->feat_id; ?> _sortable" class="arraylist_sortable"> <?php foreach ($deal_array as $num => $deal) { ?> <li class="ui-state-default" id="<?php echo $this->feat_id; ?> _arr_<?php echo $num; ?> "> <div class="arraylist_item" > <div class="col-md-7 arraylist_name"><?php echo $deal[$this->feat_id . '_name']; ?> </div> <div class="col-md-5 arraylist_action"> <i onclick="edit_<?php echo $this->feat_id; ?> ('<?php echo $num; ?> ');" class="glyphicon glyphicon-pencil"></i> <i onclick="delete_<?php echo $this->feat_id; ?> ('<?php echo $num; ?> ');" class="glyphicon glyphicon-remove"></i> </div> <div class="clearfix"></div> </div> </li> <?php } ?> </ul> <div class="clearfix"></div> </div> <div style="text-align: center; margin-top: 30px;"> <button onclick="createDeal_<?php echo $this->feat_id; ?> ();" class="btn btn-success btn-lg">Create New <?php echo $this->feat_name; ?> </button> </div> <script> function createDeal_<?php echo $this->feat_id; ?> (){ // console.log("createdeal"); $('.bgblur').show(); $('#<?php echo $this->feat_id; ?> _kosong').show(); //reset value deal_kosong $('#<?php echo $this->feat_id; ?> _id').val('-1'); $('#<?php echo $this->feat_id; ?> _name').val('Name'); $('#<?php echo $this->feat_id; ?> _des').val('Description'); $('#<?php echo $this->feat_id; ?> _pic').val("<?php echo _BPATH; ?> images/run.jpg"); //images $('#<?php echo $this->feat_id; ?> _logo_prev').attr("src",$('#<?php echo $this->feat_id; ?> _pic').val()); $('#sim_<?php echo $this->feat_id; ?> _pic').attr("src",$('#<?php echo $this->feat_id; ?> _pic').val()); //texts $('#sim_<?php echo $this->feat_id; ?> _title').html($('#<?php echo $this->feat_id; ?> _name').val()); $('#sim_<?php echo $this->feat_id; ?> _des').html($('#<?php echo $this->feat_id; ?> _des').val()); $('#image2crop<?php echo $this->feat_id; ?> _logo').attr("src",$('#<?php echo $this->feat_id; ?> _pic').val()); } </script> <script> //penyimpanan dataActual var data_<?php echo $this->feat_id; ?> = <?php echo json_encode($deal_array); ?> ; var data_<?php echo $this->feat_id; ?> _justUpdated = -1; function info_save_<?php echo $this->feat_id; ?> (){ //get all data from inputs // var deal_pic = $('#deal_pic').val(); // var deal_des = $('#deal_des').val(); // var deal_name = $('#deal_name').val(); //harus selalu ada ini.. var contact_pname = $('#<?php echo $this->feat_id; ?> _pname').val(); var label_name = $('#<?php echo $this->feat_id; ?> _labelname').val(); //save the data to sessions $.post('<?php echo _SPPATH; ?> FeatureSessionLayer/save?id=<?php echo $this->feat_id; ?> ',{ <?php echo $this->feat_id; ?> _labelname : label_name, // <?php echo $this->feat_id; ?> _name : <?php echo $this->feat_id; ?> _name, // <?php echo $this->feat_id; ?> _des : <?php echo $this->feat_id; ?> _des, // deal_pic : deal_pic, <?php echo $this->feat_id; ?> _pname : contact_pname },function(data){ console.log(data); if(data){ $(".hiddenform").hide(); //update Selected App dan Layout di Simulator updateSelectedAppAndSimulator(); } }); } function edit_<?php echo $this->feat_id; ?> (num){ $('.bgblur').show(); $('#<?php echo $this->feat_id; ?> _kosong').show(); var data = data_<?php echo $this->feat_id; ?> ; for(var x=0;x<data.length;x++) { var attr = data[x]; if(x==num){ //masukan ke #dealkosong $('#<?php echo $this->feat_id; ?> _id').val(x); $('#<?php echo $this->feat_id; ?> _name').val(attr['<?php echo $this->feat_id; ?> _name']); $('#<?php echo $this->feat_id; ?> _des').val(attr['<?php echo $this->feat_id; ?> _des']); $('#<?php echo $this->feat_id; ?> _pic').val(attr['<?php echo $this->feat_id; ?> _pic']); //images $('#<?php echo $this->feat_id; ?> _logo_prev').attr("src",attr['<?php echo $this->feat_id; ?> _pic']); $('#sim_<?php echo $this->feat_id; ?> _pic').attr("src",attr['<?php echo $this->feat_id; ?> _pic']); //texts $('#sim_<?php echo $this->feat_id; ?> _title').html(attr['<?php echo $this->feat_id; ?> _name']); $('#sim_<?php echo $this->feat_id; ?> _des').html(attr['<?php echo $this->feat_id; ?> _des']); //image2crop+id $('#image2crop<?php echo $this->feat_id; ?> _logo').attr("src",attr['<?php echo $this->feat_id; ?> _pic']); data_<?php echo $this->feat_id; ?> _justUpdated = x; } } } function delete_<?php echo $this->feat_id; ?> (num){ if(confirm("Are you sure you want to delete this Item?")) $.post("<?php echo _SPPATH; ?> FeatureSessionLayer/removeArrayItem?id=<?php echo $this->feat_id; ?> &arrayID=<?php echo $this->arrayID; ?> ",{ pos : num },function(data){ update_<?php echo $this->feat_id; ?> _Simulator(data); },'json'); } </script> <?php }
function saveIntoApp() { $app = new AppAccount(); if (isset($_GET['id']) && $_GET['id'] > 0) { $id = addslashes($_GET['id']); $app->getByID($id); $app->load = 1; if ($app->app_client_id != Account::getMyID()) { die("Owner's ID Mismatch"); } } $detail = ZAppFeature::loadDetails(); $app->app_client_id = Account::getMyID(); $app->app_name = $detail['app_name']; $app->app_create_date = leap_mysqldate(); $app->app_api_access_key = Efiwebsetting::getData('GCM_ACCESS_KEY'); $app->app_token = md5(leap_mysqldate()); $app->app_icon = $detail['app_icon']; $app->app_shortdes = $detail['app_des_short']; $app->app_feat = $detail['app_feature_img']; $app->app_fulldes = $detail['app_des_long']; if (isset($_GET['id']) && $_GET['id'] > 0) { $app->save(); $appID = $app->app_id; } else { $app->app_keywords = session_id(); $app->app_active = 0; $appID = $app->save(); if ($appID) { $app2acc = new App2Acc(); $app2acc->ac_admin_id = Account::getMyID(); $app2acc->ac_app_id = $appID; $appID2 = $app2acc->save(); } } $json['id'] = $appID; echo json_encode($json); // echo $appID; die; }
public function formCustom() { $sel = ZAppFeature::selectedFeature(); $valuesNya = FeatureSessionLayer::load($this->feat_id); // $info_bname = isset($valuesNya['info_bname'])?$valuesNya['info_bname']:"Business Name"; $info_slogan = isset($valuesNya['info_slogan']) ? $valuesNya['info_slogan'] : "slogan"; // $info_profilepic = isset($valuesNya['info_profilepic'])?$valuesNya['info_profilepic']:_BPATH."images/noimage.jpg"; $info_banner = isset($valuesNya['info_banner']) ? $valuesNya['info_banner'] : _BPATH . "images/iphone.jpg"; // $info_phone = $valuesNya['info_phone']; // $info_email = $valuesNya['info_email']; // $info_website = $valuesNya['info_website']; // $info_address = $valuesNya['info_address']; // $info_additional = $valuesNya['info_additional']; ?> <h1 class="header_besar" style="padding: 0; margin: 0; text-align: center; margin-top: 10px; margin-bottom: 10px;">Info</h1> <p style="color: #666666; font-size: 12px;">Please complete one or more fields below. <em>All fields are optional.</em></p> <div class="form-group"> <label for="info_slogan">What is your slogan? </label> <input type="text" class="form-control" id="info_slogan" placeholder="Slogan" value="<?php echo $info_slogan; ?> "> </div> <div class="form-group"> <?php $bannerModalID = "logoID"; ?> <!-- <div class="col-md-3" style="margin-left: -15px;">--> <!-- <label for="info_profilepic">Profile picture </label>--> <!-- <div class="previewImg">--> <!-- <img style="cursor:pointer;" data-toggle="modal" data-target="#--><?php //=$bannerModalID; ?> <!--" id="--><?php //=$bannerModalID; ?> <!--_prev" src="--><?php //=$info_profilepic; ?> <!--">--> <!-- </div>--> <!-- </div>--> <?php global $modalReg; $modalReg->regCropper("bannID", "Banner", "info_banner", $info_banner, "542:400", array("mbannerImg", "bannID_prev")); // $modalReg->regCropper("logoID","Profile Picture","info_profilepic",$info_profilepic,"400:400",array("mlogoImg","logoID_prev")); ?> <?php $bannerModalID = "bannID"; ?> <!-- <div class="col-md-6" >--> <label for="info_banner" >Main Banner </label> <div class="previewImg"> <img style="cursor:pointer;" data-toggle="modal" data-target="#<?php echo $bannerModalID; ?> " id="<?php echo $bannerModalID; ?> _prev" src="<?php echo $info_banner; ?> "> </div> <!-- </div>--> <div class="clearfix"></div> <input type="hidden" id="info_banner" name="info_banner" value="<?php echo $info_banner; ?> " > <input type="hidden" id="info_profilepic" name="info_profilepic" value="<?php echo $info_profilepic; ?> " > </div> <div class="form-group"> <?php //load from fields foreach ($this->fields as $field_name => $details) { // $field[$field_name] = isset($valuesNya[$field_name])?$valuesNya[$field_name]:$details['default_value']; ?> <label for="<?php echo $this->feat_id; ?> _<?php echo $field_name; ?> "><?php echo $details['form_question']; ?> <?php if ($details['optional']) { ?> <span class="optional">Optional</span><?php } ?> </label> <?php if ($details['type'] == "text") { TextLimiter::inputText("text", $this->feat_id . "_" . $field_name, $this->feat_id . "_" . $field_name, $details['placeholder'], $field[$field_name], $details['limit_max'], $details['limit_min'], "sim_" . $this->feat_id . "_" . $field_name . " .mlist-text"); } else { TextLimiter::inputTextArea("text", $this->feat_id . "_" . $field_name, $this->feat_id . "_" . $field_name, $details['placeholder'], $field[$field_name], $details['limit_max'], $details['limit_min'], "sim_" . $this->feat_id . "_" . $field_name . "_text"); } ?> <script> $("#<?php echo $this->feat_id; ?> _<?php echo $field_name; ?> ").keyup(function(){ var name = "<?php echo "sim_" . $this->feat_id . "_" . $field_name; ?> "; var slc = $("#<?php echo $this->feat_id; ?> _<?php echo $field_name; ?> ").val(); autoUpdateOnKeyup(name,slc); }); </script> <?php } ?> <label for="info_phone">Your phone number <span class="optional">Optional</span></label> <?php TextLimiter::inputText("text", "info_phone", "info_phone", "Page Name", $info_phone, 15, 5, "ninfo_phone .mlist-text"); ?> <!-- <input type="text" class="form-control" id="info_phone" placeholder="Phone Number" value="--><?php //=$info_phone; ?> <!--" >--> </div> <!-- <div class="form-group">--> <!-- <label for="info_email">Your email address <span class="optional">Optional</span></label>--> <!-- <input type="email" class="form-control" id="info_email" placeholder="Email Address" value="--><?php //=$info_email; ?> <!--" >--> <!-- </div>--> <!----> <!-- <div class="form-group">--> <!-- <label for="info_website">Your website URL <span class="optional">Optional</span></label>--> <!-- <input type="url" class="form-control" id="info_website" placeholder="Website URL" value="--><?php //=$info_website; ?> <!--" >--> <!-- </div>--> <!----> <!-- <div class="form-group">--> <!-- <label for="info_address">Your address <span class="optional">Optional</span></label>--> <!-- <textarea id="info_address" class="form-control" rows="4" maxlength="800" placeholder="Address">--><?php //=$info_address; ?> <!--</textarea>--> <!----> <!-- </div>--> <!----> <!-- <div class="form-group">--> <!-- <label for="info_additional">Additional information <span class="optional">Optional</span></label>--> <!-- <textarea id="info_additional" class="form-control" rows="10" maxlength="800" placeholder="Example: Opening Hours">--><?php //=$info_additional; ?> <!--</textarea>--> <!----> <!-- </div>--> <script> function info_save_<?php echo $this->feat_id; ?> (){ //get all data from inputs // var info_bname = $('#info_bname').val(); var info_slogan = $('#info_slogan').val(); // var info_phone = $('#info_phone').val(); // var info_email = $('#info_email').val(); // var info_website = $('#info_website').val(); // var info_address = $('#info_address').val(); // var info_additional = $('#info_additional').val(); var info_banner = $('#info_banner').val(); // var info_profilepic = $('#info_profilepic').val(); <?php //load from fields foreach ($this->fields as $field_name => $details) { $field[$field_name] = isset($valuesNya[$field_name]) ? $valuesNya[$field_name] : $details['default_value']; if ($details['type'] == "text") { ?> var vr_<?php echo $this->feat_id; ?> _<?php echo $field_name; ?> = $('#<?php echo $this->feat_id; ?> _<?php echo $field_name; ?> ').val(); <?php } else { ?> var vr_<?php echo $this->feat_id; ?> _<?php echo $field_name; ?> = $('#<?php echo $this->feat_id; ?> _<?php echo $field_name; ?> ').html(); <?php } $imp[] = $field_name . ": vr_" . $this->feat_id . "_" . $field_name; } ?> var label_name = $('#<?php echo $this->feat_id; ?> _labelname').val(); //harus selalu ada ini.. var contact_pname = $('#<?php echo $this->feat_id; ?> _pname').val(); // var label_name = $('#<?php //=$this->feat_id; ?> //_labelname').val(); //save the data to sessions $.post('<?php echo _SPPATH; ?> FeatureSessionLayer/save?id=<?php echo $this->feat_id; ?> ',{ <?php echo $this->feat_id; ?> _labelname : label_name, <?php echo $this->feat_id; ?> _pname : contact_pname, // info_bname : info_bname, // info_slogan : info_slogan, // info_phone : info_phone, // info_email : info_email, // info_website : info_website, // info_address : info_address, // info_additional : info_additional, info_banner : info_banner // info_profilepic : info_profilepic <?php if (count($imp) > 0) { echo ","; echo implode(",", $imp); } ?> },function(data){ console.log(data); if(data){ $(".hiddenform").hide(); //update Selected App dan Layout di Simulator updateSelectedAppAndSimulator(); } }); } </script> <script> // $("#info_bname").keyup(function(){ // // console.log("in1"); // var slc = $("#info_bname").val(); // $("#mheadertext_<?php //=$this->feat_id; ?> //").html(slc); // console.log("in2"); // }); // $("#info_slogan").keyup(function(){ // // console.log("in1"); // var slc = $("#info_slogan").val(); // $("#mslogantext").html(slc); // console.log("in2"); // }); // // $("#info_phone").keyup(function(){ // var name = "ninfo_phone"; // var slc = $("#info_phone").val(); // // autoUpdateOnKeyup(name,slc); // //// if(slc.length == 0){ //// $("#" + name).remove(); //// } //// else { //// if ($("#" + name).length == 0) { //// //it doesn't exist //// var texthtml = '<div id="' + name + '" class="mlist-item">' + //// '<i class="glyphicon glyphicon-phone-alt"></i> <div class="mlist-text">' + slc + '</div>' + //// '<div class="clearfix"></div></div>'; //// //// $("#mlist").append(texthtml); //// } else { //// $("#" + name + " div.mlist-text").html(slc); //// } //// } // }); // // $("#info_email").keyup(function(){ // var name = "ninfo_email"; // var slc = $("#info_email").val(); // // autoUpdateOnKeyup(name,slc); // }); // // $("#info_website").keyup(function(){ // var name = "ninfo_website"; // var slc = $("#info_website").val(); // // autoUpdateOnKeyup(name,slc); // }); // // $("#info_address").keyup(function(){ // var name = "ninfo_address"; // var slc = $("#info_address").val(); // // autoUpdateOnKeyup(name,slc); // }); // // $("#info_additional").keyup(function(){ // var name = "ninfo_additional"; // var slc = $("#info_additional").val(); // // autoUpdateOnKeyup(name,slc); // // }); function autoUpdateOnKeyup(name,slc){ if(slc.length == 0){ $("#" + name).hide(); } else { $("#" + name).show(); $("#"+name+" .mlist-text").html(slc); } } </script> <style> .optional{ font-size: 12px; color: #666666; } .mlist-item .clearfix{ padding: 0; margin: 0; } .mlist-text{ white-space: pre-wrap; } .previewImg{ height: 80px; overflow: hidden; } .previewImg img{ height: 100%; } </style> <?php }
public function formCustom() { $sel = ZAppFeature::selectedFeature(); $valuesNya = FeatureSessionLayer::load($this->feat_id); $contact_pslogan = isset($valuesNya['social_id']) ? $valuesNya['social_id'] : ""; ?> <h1 class="header_besar" style="padding: 0; margin: 0; text-align: center; margin-top: 10px; margin-bottom: 10px;"><?php echo $this->feat_name; ?> </h1> <p style="color: #666666; font-size: 12px;">Please complete one or more fields below. <em>All fields are optional.</em></p> <div class="form-group"> <label for="info_slogan">Your <?php echo $this->socialID; ?> </label> <?php TextLimiter::inputText("text", $this->feat_id . "_social_id", $this->feat_id . "_social_id", "", $contact_pslogan, 100, 0); ?> </div> <div style="padding-top: 10px; text-align: right;"> <button id="load_button_<?php echo $this->feat_id; ?> " class="btn btn-default">Load <?php echo $this->feat_name; ?> </button> </div> <script> //do not change the function name function info_save_<?php echo $this->feat_id; ?> (){ //get all data from inputs var contact_pname = $('#<?php echo $this->feat_id; ?> _pname').val(); var contact_pslogan = $('#<?php echo $this->feat_id; ?> _social_id').val(); //label_name : mandatory var label_name = $('#<?php echo $this->feat_id; ?> _labelname').val(); //save the data to sessions $.post('<?php echo _SPPATH; ?> FeatureSessionLayer/save?id=<?php echo $this->feat_id; ?> ',{ <?php echo $this->feat_id; ?> _labelname : label_name, social_id : contact_pslogan, <?php echo $this->feat_id; ?> _pname : contact_pname },function(data){ console.log(data); if(data){ $(".hiddenform").hide(); //update Selected App dan Layout di Simulator updateSelectedAppAndSimulator(); //update loadSocial_<?php echo $this->feat_id; ?> (contact_pslogan); } }); } $('#load_button_<?php echo $this->feat_id; ?> ').click(function(){ var contact_pslogan = $('#<?php echo $this->feat_id; ?> _social_id').val(); if(contact_pslogan!='') loadSocial_<?php echo $this->feat_id; ?> (contact_pslogan); else{ alert('Please insert SocialMedia ID'); } }); </script> <?php $this->socialJSLoader(); ?> <style> #<?php echo $this->feat_id . "_des"; ?> { white-space:pre-wrap !important; } </style> <?php }
function finishing() { die('not used'); //cek apakah sudah bayar atau blom..kalau sudah bayar...header saja location success ... //update success dan redirect .... ZAppFeature::clearSession(); $id = addslashes($_GET['id']); ?> <div class="container attop" > <div class="col-md-8 col-md-offset-2"> <div style="text-align: center; padding: 20px;"> <a href="<?php echo _SPPATH; ?> "> <img src="<?php echo _SPPATH; ?> images/appear-icontext.png" style="max-width: 300px;"> </a> </div> <div style="text-align: center;"> <h1>Create the App for your Business</h1> <p>Let's upload your Appear App to Google Play.<br> so that your loyal customers can find you right away.</p> <a class="btn btn-danger btn-lg" href="<?php echo _SPPATH; ?> PaymentWeb/pay?app_id=<?php echo $id; ?> ">checkout now</a> <hr> If your App is for social, spiritual, education or religion Organizations <br><br> <a class="btn btn-default btn-sm" href="<?php echo _SPPATH; ?> MyApp/free?id=<?php echo $id; ?> ">activate Appear for FREE</a> <hr> <h5>Download Appear Capsule to <a href="<?php echo _SPPATH; ?> preview?id=<?php echo $id; ?> ">preview your App</a> on mobile phones OR <a href="<?php echo _SPPATH; ?> mydashboard">go to dashboard</a> </h5> </div> </div> </div> <?php }
public function formCustom() { $sel = ZAppFeature::selectedFeature(); $valuesNya = FeatureSessionLayer::load($this->feat_id); $loyalty_des = isset($valuesNya['loyalty_des']) ? $valuesNya['loyalty_des'] : ""; $contact_pslogan = isset($valuesNya["loyalty_offer"]) ? $valuesNya['loyalty_offer'] : ""; $loyalty_pin = isset($valuesNya['loyalty_pin']) ? $valuesNya['loyalty_pin'] : ""; $loyalty_nr = isset($valuesNya['loyalty_nr']) ? $valuesNya['loyalty_nr'] : 6; ?> <h1 class="header_besar" style="padding: 0; margin: 0; text-align: center; margin-top: 10px; margin-bottom: 10px;"><?php echo $this->feat_name; ?> </h1> <div class="form-group"> <label for="loyalty_offer">Offer</label> <?php TextLimiter::inputTextArea("text", "loyalty_offer", "loyalty_offer", "buy 6th coffee get 1 free", $contact_pslogan, 500, 0, "sim_loyalty_offer"); ?> </div> <div class="form-group"> <label for="loyalty_nr">Number of Stamps</label> <select class="form-control" id="loyalty_nr"> <?php for ($x = 2; $x <= 12; $x++) { ?> <option <?php if ($x == $loyalty_nr) { echo "selected"; } ?> value="<?php echo $x; ?> "><?php echo $x; ?> </option> <?php } ?> </select> <script> $('#loyalty_nr').change(function(){ var slc = parseInt($('#loyalty_nr').val()); var txt = ''; for(var x=1;x<=slc;x++){ txt += '<div class="loyalty_stamp">'; txt += x; txt += '</div>'; } $('#sim_jumlah_loyalty').html(txt); }); </script> </div> <div class="form-group"> <label for="loyalty_des">Description</label> <?php TextLimiter::inputTextArea("text", "loyalty_des", "loyalty_des", "Bisa diambil kapan saja", $loyalty_des, 500, 0, "sim_loyalty_description"); ?> </div> <div class="form-group"> <label for="loyalty_pin">PIN</label> <?php TextLimiter::inputText("text", "loyalty_pin", "loyalty_pin", "4 digit PIN", $loyalty_pin, 4, 4); ?> </div> <script> //do not change the function name function info_save_<?php echo $this->feat_id; ?> (){ //get all data from inputs var contact_pname = $('#<?php echo $this->feat_id; ?> _pname').val(); var loyalty_offer = $('#loyalty_offer').html(); var loyalty_des = $('#loyalty_des').html(); var loyalty_pin = $('#loyalty_pin').val(); var loyalty_nr = $('#loyalty_nr').val(); //label_name : mandatory var label_name = $('#<?php echo $this->feat_id; ?> _labelname').val(); //save the data to sessions $.post('<?php echo _SPPATH; ?> FeatureSessionLayer/save?id=<?php echo $this->feat_id; ?> ',{ <?php echo $this->feat_id; ?> _labelname : label_name, loyalty_offer : loyalty_offer, loyalty_des:loyalty_des, loyalty_pin : loyalty_pin, loyalty_nr : loyalty_nr, <?php echo $this->feat_id; ?> _pname : contact_pname },function(data){ console.log(data); if(data){ $(".hiddenform").hide(); //update Selected App dan Layout di Simulator updateSelectedAppAndSimulator(); } }); } </script> <?php }
public function formCustom() { $sel = ZAppFeature::selectedFeature(); $valuesNya = FeatureSessionLayer::load($this->feat_id); $contact_pname = isset($valuesNya[$this->feat_id . '_pname']) ? $valuesNya[$this->feat_id . '_pname'] : $this->feat_name; $contact_pslogan = isset($valuesNya[$this->feat_id . '_pslogan']) ? $valuesNya[$this->feat_id . '_pslogan'] : "description"; ?> <h1 class="header_besar" style="padding: 0; margin: 0; text-align: center; margin-top: 10px; margin-bottom: 10px;"><?php echo $this->feat_name; ?> </h1> <p style="color: #666666; font-size: 12px;">Please complete one or more fields below. <em>All fields are optional.</em></p> <div class="form-group"> <label for="info_slogan">Page Content</label> <?php TextLimiter::inputTextArea("text", $this->feat_id . "_pslogan", $this->feat_id . "_pslogan", "Description", $contact_pslogan, 5000, 0, $this->feat_id . "_des"); ?> </div> <script> //do not change the function name function info_save_<?php echo $this->feat_id; ?> (){ //get all data from inputs var contact_pname = $('#<?php echo $this->feat_id; ?> _pname').val(); var contact_pslogan = $('#<?php echo $this->feat_id; ?> _pslogan').html(); //label_name : mandatory var label_name = $('#<?php echo $this->feat_id; ?> _labelname').val(); //save the data to sessions $.post('<?php echo _SPPATH; ?> FeatureSessionLayer/save?id=<?php echo $this->feat_id; ?> ',{ <?php echo $this->feat_id; ?> _labelname : label_name, <?php echo $this->feat_id; ?> _pslogan : contact_pslogan, <?php echo $this->feat_id; ?> _pname : contact_pname },function(data){ console.log(data); if(data){ $(".hiddenform").hide(); //update Selected App dan Layout di Simulator updateSelectedAppAndSimulator(); } }); } </script> <style> #<?php echo $this->feat_id . "_des"; ?> { white-space:pre-wrap !important; } </style> <?php }
public function formCustom() { $sel = ZAppFeature::selectedFeature(); $valuesNya = FeatureSessionLayer::load($this->feat_id); $contact_pname = isset($valuesNya[$this->feat_id . '_pname']) ? $valuesNya[$this->feat_id . '_pname'] : "Page Name"; $contact_pslogan = isset($valuesNya[$this->feat_id . '_pslogan']) ? $valuesNya[$this->feat_id . '_pslogan'] : ""; ?> <h1 class="header_besar" style="padding: 0; margin: 0; text-align: center; margin-top: 10px; margin-bottom: 10px;"><?php echo $this->feat_name; ?> </h1> <div class="form-group"> <label for="info_slogan">Please enter a starting point of your Location</label> <br><small>e.g can be your city, kecamatan or kelurahan.</small> <?php TextLimiter::inputText("text", $this->feat_id . "_pslogan", $this->feat_id . "_pslogan", "e.g Jakarta/Pondok Indah/Ciputat/Kelapa Gading", $contact_pslogan, 150, 0); ?> </div> <div style="text-align: center; margin-top: 30px;"> <button onclick="addAddress2Map();" class="btn btn-success btn-lg">Adjust Map</button> <br><small>You can drag the red marker <i class="glyphicon glyphicon-map-marker"></i> to your business position </small> </div> <script> //do not change the function name function info_save_<?php echo $this->feat_id; ?> (){ //get all data from inputs var contact_pname = $('#<?php echo $this->feat_id; ?> _pname').val(); var contact_pslogan = $('#<?php echo $this->feat_id; ?> _pslogan').val(); //label_name : mandatory var label_name = $('#<?php echo $this->feat_id; ?> _labelname').val(); //save the data to sessions $.post('<?php echo _SPPATH; ?> FeatureSessionLayer/save?id=<?php echo $this->feat_id; ?> ',{ <?php echo $this->feat_id; ?> _labelname : label_name, <?php echo $this->feat_id; ?> _pslogan : contact_pslogan, <?php echo $this->feat_id; ?> _pname : contact_pname },function(data){ console.log(data); if(data){ $(".hiddenform").hide(); //update Selected App dan Layout di Simulator updateSelectedAppAndSimulator(); } }); } </script> <?php }
public static function page() { ?> <section id="themes"> <?php $zp = new ZAppFeature(); $colors = ZAppFeature::loadColor(); if (!isset($colors['bg_img']) || $colors['bg_img'] == "") { $colors['bg_img'] = $zp->feat_noimage; } ?> <h2 class="header_besar">Which colors and themes do you want in your app? <abbr class="required" title="required">*</abbr></h2> <div class="form-group"> <label for="splash_img">Splash Image</label> <div class="clearfix"></div> <?php $bannerModalID = "splash_cropper"; ?> <div style="float: left;"> <div class="previewImg"> <img style="cursor:pointer;" data-toggle="modal" data-target="#<?php echo $bannerModalID; ?> " id="<?php echo $bannerModalID; ?> _prev" src="<?php echo $colors['splash_img']; ?> "> </div> </div> <div style="float: left; line-height: 80px; margin-left: 20px;"> <button onclick="onSuccessSplash();" class="btn btn-default">demo</button> </div> <?php global $modalReg; $modalReg->regCropper($bannerModalID, "Splash Image", "splash_img", $colors['splash_img'], "736:1300", array($bannerModalID . "_prev"), "onSuccessSplash();"); ?> <input type="hidden" id="splash_img" value="<?php echo $colors['splash_img']; ?> "> <div class="clearfix"></div> </div> <div class="form-group"> <label for="panel_color">Panel Color</label> <div class="input-group panel_color_con"> <input type="text" id="panel_color" value="<?php echo $colors['panel_color']; ?> " class="form-control" /> <span class="input-group-addon"><i style="background-color: <?php echo $colors['panel_color']; ?> ;"></i></span> </div> </div> <div class="form-group"> <label for="text_color">Text Color</label> <div class="input-group text_color_con"> <input type="text" id="text_color" value="<?php echo $colors['text_color']; ?> " class="form-control" /> <span class="input-group-addon"><i style="background-color: <?php echo $colors['text_color']; ?> ;"></i></span> </div> </div> <div class="form-group"> <label for="bg_color">Background Color</label> <div class="input-group bg_color_con"> <input type="text" id="bg_color" value="<?php echo $colors['bg_color']; ?> " class="form-control" /> <span class="input-group-addon"><i style="background-color: <?php echo $colors['bg_color']; ?> ;"></i></span> </div> </div> <div class="form-group"> <label for="bg_img">Background Image</label> <div class="clearfix"></div> <?php $bannerModalID = "bg_img_cropper"; ?> <div style="float: left;"> <div class="previewImg"> <img style="cursor:pointer;" data-toggle="modal" data-target="#<?php echo $bannerModalID; ?> " id="<?php echo $bannerModalID; ?> _prev" src="<?php echo $colors['bg_img']; ?> "> </div> </div> <div style="float: left; line-height: 80px; margin-left: 20px;"> <button id="removeBGImg" class="btn btn-default">remove background image</button> </div> <?php global $modalReg; $modalReg->regCropper($bannerModalID, "Background Image", "bg_img", $colors['bg_img'], "736:1300", array($bannerModalID . "_prev"), "onSuccessBG();"); ?> <input type="hidden" id="bg_img" value="<?php echo $colors['bg_img']; ?> "> <div class="clearfix"></div> </div> <script> function onSuccessSplash(){ var slc = $('#splash_img').val(); //do splash $('#splash_screen').css('background-image','url('+slc+'?t='+ $.now()+')'); $('#splash_screen').fadeIn('slow').delay(1000).fadeOut(); $('#isiapp').hide().delay(2000).fadeIn('slow'); $('#mfooter').hide().delay(2000).fadeIn('slow'); } function onSuccessBG(){ // console.log('masuk ke bg_img change'); var slc = $('#bg_img').val(); $('div.mcontent').css('background-image','url('+slc+'?t='+ $.now()+')'); } function updatePanelColor(slc){ $('div.mheadertext').css("background-color",slc); $('div#mfooter').css("background-color",slc); } function updateTextColor(slc){ $('div.mheadertext').css("color",slc); // console.log('updateTextColor 2'); $('.mtab-text').css("color",slc); // console.log('updateTextColor 3'); $('div.sim_maskColor').css("background-color",slc); // console.log('updateTextColor 4'); $('.listview span').css("color",slc); // console.log('updateTextColor 5'); } function updateBGColor(slc){ $('div.mcontent').css("background-color",slc); } $('#removeBGImg').click(function(){ $('#bg_img').val('<?php echo $zp->feat_noimage; ?> '); $('#bg_img_cropper_prev').attr("src","<?php echo $zp->feat_noimage; ?> "); $('div.mcontent').css('background-image','none'); $('#app_desktop').hide(); }); $(function(){ $('.panel_color_con').colorpicker().on('changeColor.colorpicker', function(event){ var slc = event.color.toHex(); updatePanelColor(slc); }); $('.text_color_con').colorpicker().on('changeColor.colorpicker', function(event){ var slc = event.color.toHex(); updateTextColor(slc); }); $('.bg_color_con').colorpicker().on('changeColor.colorpicker', function(event){ var slc = event.color.toHex(); updateBGColor(slc); }); $('#savecolors').click(function(){ $('.nav-pills a[href="#page_details"]').tab('show'); }) }); function saveColors(){ // console.log('in saveColors'); var panel_color = $('#panel_color').val(); var text_color = $('#text_color').val(); var bg_color = $('#bg_color').val(); var bg_img = $('#bg_img').val(); var splash_img = $('#splash_img').val(); //save the data to sessions $.post('<?php echo _SPPATH; ?> FeatureSessionLayer/saveColor',{ panel_color : panel_color, text_color : text_color, bg_color : bg_color, bg_img : bg_img, splash_img : splash_img },function(data){ console.log(data); if(data){ // console.log('success'); } }); } </script> <div style="text-align: center; margin-top: 20px;"> <button id="savecolors" style="width: 50%;" class="btn btn-danger btn-lg">Next</button> </div> <?php $colors = ZAppFeature::loadColor(); foreach ($colors as $key => $val) { if ($key == "panel_color") { ?> <script> $(document).ready(function(){ updatePanelColor('<?php echo $val; ?> '); }); </script> <?php } if ($key == "text_color") { ?> <style> .sim_maskColor{ background-color: <?php echo $val; ?> ; } .mtab-text{ color: <?php echo $val; ?> ; } .listview span{ color: <?php echo $val; ?> ; } </style> <script> $(document).ready(function(){ updateTextColor('<?php echo $val; ?> '); }); </script> <?php } if ($key == "bg_color") { ?> <script> $(document).ready(function(){ updateBGColor('<?php echo $val; ?> '); }); </script> <?php } if ($key == "bg_img") { if ($val != $zp->feat_noimage) { ?> <script> $(document).ready(function(){ onSuccessBG(); }); </script> <?php } } } ?> <style> div.mcontent{ background-repeat: no-repeat; /*background-attachment: fixed;*/ /*background-position: center;*/ background-size: 100% auto; } #splash_screen{ background-repeat: no-repeat; background-size: 100% auto; } </style> </section> <?php }
public function formCustom() { $sel = ZAppFeature::selectedFeature(); $valuesNya = FeatureSessionLayer::load($this->feat_id); $info_slogan = isset($valuesNya['info_slogan']) ? $valuesNya['info_slogan'] : "slogan"; $info_banner = isset($valuesNya['info_banner']) ? $valuesNya['info_banner'] : $this->feat_noimage; ?> <h1 class="header_besar" style="padding: 0; margin: 0; text-align: center; margin-top: 10px; margin-bottom: 10px;">Info</h1> <p style="color: #666666; font-size: 12px;">Please complete one or more fields below. <em>All fields are optional.</em></p> <div class="form-group"> <label for="info_slogan">What is your slogan? </label> <?php TextLimiter::inputText("text", "info_slogan", "info_slogan", "slogan", $info_slogan, 30, 1, "mslogantext"); ?> <!-- <input type="text" class="form-control" id="info_slogan" placeholder="Slogan" value="--><?php //=$info_slogan; ?> <!--">--> </div> <div class="form-group"> <?php global $modalReg; $modalReg->regCropper("bannID", "Banner", "info_banner", $info_banner, "542:400", array("mbannerImg", "bannID_prev")); ?> <?php $bannerModalID = "bannID"; ?> <label for="info_banner" >Main Banner </label> <div class="previewImg"> <img style="cursor:pointer;" data-toggle="modal" data-target="#<?php echo $bannerModalID; ?> " id="<?php echo $bannerModalID; ?> _prev" src="<?php echo $info_banner; ?> "> </div> <div class="clearfix"></div> <input type="hidden" id="info_banner" name="info_banner" value="<?php echo $info_banner; ?> " > </div> <?php //load from fields foreach ($this->fields as $field_name => $details) { $field[$field_name] = isset($valuesNya[$field_name]) ? $valuesNya[$field_name] : $details['default_value']; ?> <div class="form-group"> <label for="<?php echo $this->feat_id; ?> _<?php echo $field_name; ?> "><?php echo $details['form_question']; ?> <?php if ($details['optional']) { ?> <span class="optional">Optional</span><?php } ?> </label> <?php if ($details['type'] == "text") { TextLimiter::inputText("text", $this->feat_id . "_" . $field_name, $this->feat_id . "_" . $field_name, $details['placeholder'], $field[$field_name], $details['limit_max'], $details['limit_min'], "sim_" . $this->feat_id . "_" . $field_name . "_text"); } elseif ($details['type'] == "rte") { TextLimiter::inputTextArea("text", $this->feat_id . "_" . $field_name, $this->feat_id . "_" . $field_name, $details['placeholder'], $field[$field_name], $details['limit_max'], $details['limit_min'], "sim_" . $this->feat_id . "_" . $field_name . "_text"); } else { TextLimiter::inputTextAreaBiasa("text", $this->feat_id . "_" . $field_name, $this->feat_id . "_" . $field_name, $details['placeholder'], $field[$field_name], $details['limit_max'], $details['limit_min'], "sim_" . $this->feat_id . "_" . $field_name . "_text"); } ?> <script> $("#<?php echo $this->feat_id; ?> _<?php echo $field_name; ?> ").keyup(function(){ var name = "sim_<?php echo $this->feat_id . "_" . $field_name; ?> "; <?php if ($details['type'] == "rte") { ?> var slc = $("#<?php echo $this->feat_id; ?> _<?php echo $field_name; ?> ").html(); <?php } else { ?> var slc = $("#<?php echo $this->feat_id; ?> _<?php echo $field_name; ?> ").val(); <?php } ?> autoUpdateOnKeyup(name,slc); }); </script> </div> <?php } ?> <script> function info_save_<?php echo $this->feat_id; ?> (){ //get all data from inputs var info_slogan = $('#info_slogan').val(); var info_banner = $('#info_banner').val(); <?php //load from fields foreach ($this->fields as $field_name => $details) { $field[$field_name] = isset($valuesNya[$field_name]) ? $valuesNya[$field_name] : $details['default_value']; if ($details['type'] == "text") { ?> var vr_<?php echo $this->feat_id; ?> _<?php echo $field_name; ?> = $('#<?php echo $this->feat_id; ?> _<?php echo $field_name; ?> ').val(); <?php } elseif ($details['type'] == "rte") { ?> var vr_<?php echo $this->feat_id; ?> _<?php echo $field_name; ?> = $('#<?php echo $this->feat_id; ?> _<?php echo $field_name; ?> ').html(); <?php } else { ?> var vr_<?php echo $this->feat_id; ?> _<?php echo $field_name; ?> = $('#<?php echo $this->feat_id; ?> _<?php echo $field_name; ?> ').val(); <?php } $imp[] = $field_name . ": vr_" . $this->feat_id . "_" . $field_name; } ?> var label_name = $('#<?php echo $this->feat_id; ?> _labelname').val(); //harus selalu ada ini.. var contact_pname = $('#<?php echo $this->feat_id; ?> _pname').val(); //save the data to sessions $.post('<?php echo _SPPATH; ?> FeatureSessionLayer/save?id=<?php echo $this->feat_id; ?> ',{ <?php echo $this->feat_id; ?> _labelname : label_name, <?php echo $this->feat_id; ?> _pname : contact_pname, info_slogan : info_slogan, info_banner : info_banner <?php if (count($imp) > 0) { echo ","; echo implode(",", $imp); } ?> },function(data){ console.log(data); if(data){ $(".hiddenform").hide(); //update Selected App dan Layout di Simulator updateSelectedAppAndSimulator(); } }); } </script> <script> function autoUpdateOnKeyup(name,slc){ if(slc.length == 0){ $("#" + name).hide(); } else { $("#" + name).show(); $("#"+name+"_text").html(slc); } } </script> <style> .optional{ font-size: 12px; color: #666666; } .mlist-item .clearfix{ padding: 0; margin: 0; } .mlist-text{ white-space: pre-wrap; } .previewImg{ height: 80px; overflow: hidden; } .previewImg img{ height: 100%; } </style> <?php }
function make() { $selectedFeature = ZAppFeature::selectedFeature(); $homePage = $selectedFeature[0]; ?> <div id="navigator" > <a href="<?php echo _SPPATH; ?> myapps">back to myapps</a> <span class="glyphicon glyphicon-backward"></span> </div> <div class="monly" > <div class="alert alert-danger" role="alert" style="margin: 15px;"> Please edit using desktop to benefit using App Simulator. </div> </div> <div class="bgblur" style="display: none;"></div> <div class="attop container" > <div class="col-md-6 col-md-offset-1" > <div class="begin"> <!-- class="nav nav-pills nav-wizard" --> <ul class="nav nav-tabs"> <li class="active" > <a href="#page_feat" data-toggle="tab"><span class="glyphicon glyphicon-th"></span> Features</a> </li> <li > <a href="#page_themes" data-toggle="tab"><span class="glyphicon glyphicon-tint"></span> Themes</a> </li> <li > <a href="#page_details" data-toggle="tab"><span class="glyphicon glyphicon-phone"></span> Details</a> </li> </ul> <div class="tab-content"> <div role="tabpanel" class="tab-pane fade in active" id="page_feat"> <?php AppPageFeat::page(); ?> </div> <div role="tabpanel" class="tab-pane fade" id="page_themes"> <?php AppTheme::page(); ?> </div> <div role="tabpanel" class="tab-pane fade" id="page_details"> <?php AppDetails::page(); ?> </div> </div> <script> // handle on tab move $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { console.log(e.target); // newly activated tab console.log(e.relatedTarget); // previous active tab var dari = $(e.relatedTarget).attr('href'); var dest = $(e.target).attr('href'); console.log(dest); if(dest == "#page_details"){ $('#app_desktop').show(); $('#isiapp').hide(); $('#mfooter').hide(); $('.menubatterei').hide(); }else{ $('#app_desktop').hide(); $('#isiapp').show(); $('#mfooter').show(); $('.menubatterei').show(); } if(dari == "#page_themes"){ //save saveColors(); } if(dari == "#page_details"){ //save saveAppDetails(0); } }); </script> </div> <div class="clearfix" style="padding-bottom: 28px;"></div> </div> <div class="col-md-5 donly"> <?php AppSimulator::page(); ?> </div> <div class="clearfix"></div> </div> <!-- above BGBlur --> <?php // pr($_SESSION['ZAppFeature']); // pr($_SESSION['FeatureSessionLayer']); global $modalReg; $modalReg->printAboveBGBlur(); }
public static function page() { $selectedFeature = ZAppFeature::selectedFeature(); // pr($selectedFeature); $homePage = $selectedFeature[0]; $arrChildren = ZAppFeature::getChildren(); // pr($arrChildren); $arrObj = array(); foreach ($arrChildren as $child) { $obj = new $child(); //kalo tidak aktif continue if (!$obj->feat_active) { continue; } if (!isset($arrObj[$obj->feat_rank_tampil])) { $arrObj[$obj->feat_rank_tampil] = $obj; } else { $arrObj[] = $obj; } } ksort($arrObj); // pr($arrObj); ?> <style> .sim_textColor{ color: white; } .sim_maskColor{ /*background-color: white;*/ width: 15px; height: 15px; margin: auto; margin-top: 5px; } .bgblur{ position: fixed; width: 100%; height: 100%; top:0px; left: 0px; background-color: rgba(0,0,0,0.8); z-index: 1031; } .list_item_form{ position: fixed; top: 50%; left: 50%; width: auto; height: auto; -webkit-transform: translateX(-50%) translateY(-50%); -moz-transform: translateX(-50%) translateY(-50%); -ms-transform: translateX(-50%) translateY(-50%); -o-transform: translateX(-50%) translateY(-50%); transform: translateX(-50%) translateY(-50%); z-index: 1032; background-color: white; border-radius: 3px; max-height: 90%; overflow: auto; } .list_item_form::-webkit-scrollbar { width: 2px; } .list_item_form::-webkit-scrollbar-button { width: 2px; height:5px; } .list_item_form::-webkit-scrollbar-track { background:#eee; border: thin solid lightgray; box-shadow: 0px 0px 3px #dfdfdf inset; border-radius:10px; } .list_item_form::-webkit-scrollbar-thumb { background:#999; border: thin solid gray; border-radius:10px; } .list_item_form::-webkit-scrollbar-thumb:hover { background:#7d7d7d; } </style> <script> var inTabs = []; var selectedTab = '<?php echo $selectedFeature[0]; ?> '; var arrFeats = {}; function removeAppFeature(id){ $.post("<?php echo _SPPATH; ?> FeatureSessionLayer/removeFeat",{id:id},function(data){ console.log('kiriman feature '); console.log(data); // alert(data); $(".hiddenform").hide(); selectedTab = data[0]; $(".mpage").hide(); $('#m_'+selectedTab).show(); // manageView(data[0]); updateSelectedAppAndSimulator(); if(data.length <2){ $('.jumlahwarning').show(); } $("#wadahbutton_"+id+"_1").hide(); $("#wadahbutton_"+id+"_2").show(); },'json'); } function updateSelectedAppAndSimulator(){ $('.jumlahwarning').hide(); console.log("selectedTab : "+selectedTab); //update warna selected $.get("<?php echo _SPPATH; ?> FeatureSessionLayer/getSelectedFeat",function(data){ console.log("feats"); console.log(data); var jumlahSelected = data.length; var sisaNya = []; var tabs = ''; $(".feat").removeClass("feat-selected"); for(var x=0;x<data.length;x++){ var attr = data[x]; //update iconss $("#icon_"+data[x]).addClass("feat-selected"); // console.log("update "+data[x]); if(jumlahSelected>5) { if(x>3){ sisaNya.push(data[x]); }else{ //update tabss tabs += '<div onclick="manageView(\''+data[x]+'\');" class="mtab '; if(data[x] == selectedTab) tabs += 'mtab-selected'; tabs += '" id="tab_'+data[x]+'">'; tabs += '<div class="mtab-img">' + '<div class="sim_maskColor" style="-webkit-mask-box-image: url('+arrFeats[attr].icon_path+arrFeats[attr].feat_tab_icon+');"></div>' + '</div>'; // tabs += '<div class="mtab-img"><i class="'+arrFeats[attr].feat_tab_icon+'"></i></div>'; tabs += '<div class="mtab-text" id="tabname_'+data[x]+'">'+arrFeats[attr].label_name+'</div></div>'; } }else{ //update tabss tabs += '<div onclick="manageView(\''+data[x]+'\');" class="mtab '; if(data[x] == selectedTab) tabs += 'mtab-selected'; tabs += '" id="tab_'+data[x]+'">'; tabs += '<div class="mtab-img">' + '<div class="sim_maskColor" style="-webkit-mask-box-image: url('+arrFeats[attr].icon_path+arrFeats[attr].feat_tab_icon+');"></div>' + '</div>'; tabs += '<div class="mtab-text" id="tabname_'+data[x]+'">'+arrFeats[attr].label_name+'</div></div>'; } // console.log("update tabs"+tabs); //backend inTabs = []; inTabs.push(data[x]); $("#wadahbutton_"+data[x]+"_1").show(); $("#wadahbutton_"+data[x]+"_2").hide(); } //dari jumlah kita tentukan width var pembagi = jumlahSelected; if(jumlahSelected>5){ pembagi = 5; } var tabwidth = Math.floor(271/pembagi); if(jumlahSelected>5){ //update tabss tabs += '<div class="mtab '; if(data[x] == selectedTab) tabs += 'mtab-selected'; tabs += '" onclick="showMore();" id="tab_more">'; tabs += '<div class="mtab-img">' + '<div class="sim_maskColor" style="-webkit-mask-box-image: url('+arrFeats[attr].icon_path+'ic_more.png'+');"></div>' + '</div>'; // tabs += '<div class="mtab-img"><i class="glyphicon glyphicon-option-horizontal"></i></div>'; tabs += '<div class="mtab-text">more</div></div>'; //update isi dari showMore updateShowMore(sisaNya); } tabs += '<style>.mtab{width: '+tabwidth+'px;} </style>'; $("#mfooter").html(tabs); },'json'); } </script> <style> .closer{ cursor: pointer; /*float: right;*/ width: 10px; height: 10px; } </style> <?php foreach ($arrObj as $obj) { $valuesNya = FeatureSessionLayer::load($obj->feat_id); $labelname = isset($valuesNya[$obj->feat_id . '_labelname']) ? $valuesNya[$obj->feat_id . '_labelname'] : $obj->feat_name; ?> <div class="hiddenform" id="form_<?php echo $obj->feat_id; ?> " style="display: none;"> <div class="closer" onclick="$('#form_<?php echo $obj->feat_id; ?> ').hide();$('#feature').show();">x</div> <?php $obj->formPembuatan(); ?> </div> <script> //sekalian kita buat object javascriptnya untuk masing2 object spy accesible terus nantinya var obj_<?php echo $obj->feat_id; ?> = { feat_id : "<?php echo $obj->feat_id; ?> ", feat_name : "<?php echo $obj->feat_name; ?> ", feat_icon : "<?php echo $obj->feat_icon; ?> ", feat_tab_icon : "<?php echo $obj->feat_tab_icon; ?> ", label_name : "<?php echo $labelname; ?> ", icon_path : "<?php echo $obj->icon_path; ?> " // getInfo: function () { // return this.color + ' ' + this.type + ' apple'; // } } arrFeats.<?php echo $obj->feat_id; ?> = obj_<?php echo $obj->feat_id; ?> ; </script> <?php } ?> <section id="feature"> <h2 class="header_besar">Which features do you want in your app? </h2> <div class="feature_list_heading_information"> <p style="color: #a2a2a2;">Please choose one or more.</p> </div> <div class="alert alert-warning jumlahwarning" style="display: none;"> <strong>Warning!</strong> Minimum one feature must be selected. </div> <script> $(function() { // $( "#sortable" ).sortable(); $("#sortable").sortable({ stop: function(event, ui) { var idsInOrder = $("#sortable").sortable("toArray"); console.log(idsInOrder); $.post("<?php echo _SPPATH; ?> FeatureSessionLayer/updateFeatOrder",{ ids : idsInOrder.join() },function(data){ console.log(data); updateSelectedAppAndSimulator(); },'json'); // var data = ""; // // $("#sortable li").each(function(i, el){ // var p = $(el).text().toLowerCase().replace(" ", "_"); // data += p+"="+$(el).index()+","; // }); // console.log(data); // // $("form > [name='new_order']").val(data.slice(0, -1)); // $("form").submit(); } }); $( "#sortable" ).disableSelection(); }); </script> <style> #sortable { list-style-type: none; margin: 0; padding: 0; width: 100%; } #sortable li { margin: 3px 3px 3px 0; padding: 1px; float: left; width: 85px; height: 100px; text-align: center; } </style> <ul id="sortable"> <?php foreach ($selectedFeature as $sel) { foreach ($arrObj as $obj) { if ($obj->feat_id == $sel) { // pr($sel); ?> <li id="li___<?php echo $obj->feat_id; ?> " > <div class="feat <?php if (in_array($obj->feat_id, $selectedFeature)) { echo "feat-selected"; } ?> " onclick="manageView('<?php echo $obj->feat_id; ?> ');" id="icon_<?php echo $obj->feat_id; ?> "> <div class="feat-img"> <div class="feat-img-icon"></div> <!-- <img class="feat_icon" src="--><?php //=$obj->icon_path.$obj->feat_icon; ?> <!--">--> <!-- <i class="--><?php //=$obj->feat_icon; ?> <!--"></i>--> </div> <div class="feat-text" id="featname_<?php echo $obj->feat_id; ?> "> <?php echo $obj->feat_name; ?> </div> </div> </li> <style> #icon_<?php echo $obj->feat_id; ?> .feat-img-icon{ background-color: white; -webkit-mask-box-image: url(<?php echo $obj->icon_path . $obj->feat_icon; ?> ); } </style> <?php } } } ?> <?php foreach ($arrObj as $obj) { if (!in_array($obj->feat_id, $selectedFeature)) { ?> <li id="li___<?php echo $obj->feat_id; ?> " > <div class="feat <?php if (in_array($obj->feat_id, $selectedFeature)) { echo "feat-selected"; } ?> " onclick="manageView('<?php echo $obj->feat_id; ?> ');" id="icon_<?php echo $obj->feat_id; ?> "> <div class="feat-img"> <div class="feat-img-icon"></div> <!-- <img class="feat_icon" src="--><?php //=$obj->icon_path.$obj->feat_icon; ?> <!--">--> <!-- <i class="--><?php //=$obj->feat_icon; ?> <!--"></i>--> </div> <div class="feat-text" id="featname_<?php echo $obj->feat_id; ?> "> <?php echo $obj->feat_name; ?> </div> </div> </li> <style> #icon_<?php echo $obj->feat_id; ?> .feat-img-icon{ background-color: white; -webkit-mask-box-image: url(<?php echo $obj->icon_path . $obj->feat_icon; ?> ); } </style> <?php } } ?> </ul> <div class="clearfix"></div> <div style="text-align: center; margin-top: 20px;"> <button id="nextpage1" style="width: 50%;" class="btn btn-danger btn-lg">Next</button> </div> <script> $('#nextpage1').click(function(){ $('.nav-pills a[href="#page_themes"]').tab('show'); }); //$(this).toggleClass('feat-selected'); function manageView(id){ $( "#loadingmobile" ).show().fadeOut( 300 ); $('#feature').hide(); $('.hiddenform').hide(); $('#form_'+id).show(); //dulunya toggle $(".mtab").removeClass("mtab-selected"); selectedTab = id; $("#tab_"+id).addClass("mtab-selected"); /* if(jQuery.inArray( id, inTabs )>-1){ selectedTab = id; $("#tab_"+id).addClass("mtab-selected"); }*/ $(".mpage").hide(); //showloading bentar $('#m_'+id).show(); if(id == "map"){ kerjakanMap(); } } </script> </section> <?php }
static function getMyApps() { $acc = Account::getAccountObject(); ?> <style> @media (max-width: 768px) { .monly { display: initial; } .donly { display: none; } .col-lg-1, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-md-1, .col-md-10, .col-md-11, .col-md-12, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-sm-1, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-xs-1, .col-xs-10, .col-xs-11, .col-xs-12, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9 { padding-left: 0px; padding-right: 0px; } .container { padding-right: 0px; padding-left: 0px; } .attop{ /*padding-top: 50px;*/ } #session{ margin-left: 15px; margin-right: 15px; } } @media (min-width: 768px) { .monly { display: none; } .donly { display: initial; } #attratas{ margin-top: 30px; } #agentbanner{ padding-right: 0px; } .stats{ /*min-height: 250px;*/ } .stats_text{ /*padding-top: 30px;*/ } .stats_number_big{ /*font-size: 40px;*/ } .stats_money{ font-weight: bold; /*font-size: 30px;*/ } .col-lg-1, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-md-1, .col-md-10, .col-md-11, .col-md-12, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-sm-1, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-xs-1, .col-xs-10, .col-xs-11, .col-xs-12, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9 { padding-left: 0px; padding-right: 0px; } } </style> <div class="container attop" > <div class="col-md-12"> <div class="appear_logo_pages"> <a href="<?php echo _SPPATH; ?> "> <img src="<?php echo _SPPATH; ?> images/appear-apps.png" > </a> </div> <div id="attratas"> <button id="list" onclick="$('#list').hide();$('#icons').show();$('#app_icons').hide();$('#app_lists').show();" class="btn btn-success btn-abu" style="margin: 0px;display: none;"><i class="glyphicon glyphicon-th-list"></i></button> <button id="icons" onclick="$('#list').show();$('#icons').hide();$('#app_icons').show();$('#app_lists').hide();" class="btn btn-success btn-abu" style="margin: 0px;"><i class="glyphicon glyphicon-th"></i></button> <button onclick="document.location='<?php echo _SPPATH; ?> mydashboard';" class="btn btn-success btn-abu" style="margin: 0px;">Dashboard</button> <button onclick="document.location='<?php echo _SPPATH; ?> apps/makenew';" class="btn btn-success btn-abu" style="margin: 0px;">Create New Apps</button> </div> <?php if (ZAppFeature::checkRemainingSession()) { $link = _SPPATH . "apps/make"; if ($_SESSION['ZAppFeature']['app_id'] > 0) { $link = _SPPATH . "apps/make?id=" . $_SESSION['ZAppFeature']['app_id']; } ?> <div id="session" class="alert alert-warning" role="alert" > You have unsaved edit Sessions. Click <a href="<?php echo $link; ?> ">here</a> to continue work on your app </div> <?php } ?> <?php if (in_array("master_admin", Account::getMyRoles())) { $acc = new AppAccount(); $apps = $acc->getAll(); //http://localhost:8888/appear/PushHome/home?st=Balance } else { $acc = new App2Acc(); //AND app_active = 1 $apps = $acc->getWhereFromMultipleTable("ac_admin_id = '" . Account::getMyID() . "' AND ac_app_id = app_id ", array("AppAccount")); } if (count($apps) > 0) { ?> <div id="app_icons" style="display: none;"> <?php foreach ($apps as $num => $ap) { ?> <div class="col-md-3 col-sm-12 col-xs-12 myapp"> <div id="detail_<?php echo $num; ?> " class="app_detail" style="display: none;" onclick="openDetails('<?php echo $num; ?> ');"> <div style="padding: 20px;"> <h3><?php echo $ap->app_name; ?> </h3> <?php $paket = new Paket(); if ($ap->app_paket_id > 0) { $paket->getByID($ap->app_paket_id); echo '<div class="app_paket">' . $paket->paket_name . '</div>'; } ?> <?php $status = $ap->app_active; echo '<div class="app_status">'; if ($status == 0) { echo "Not active"; } if ($status == 1) { if ($ap->app_type == 1) { echo "pending approval"; } else { echo "App is being created"; } } if ($status == 2) { echo "Up and running"; } echo "</div>"; ?> <?php if ($ap->app_active > 0 && $ap->app_type == 0) { echo '<div class="app_contract">contract ends : ' . date("d-m-Y", strtotime($ap->app_contract_end)); if ($ap->app_active == 2) { if ($ap->app_paket_id > 1) { ?> <br> <a href="<?php echo _SPPATH; ?> PaymentWeb/extend?app_id=<?php echo $ap->app_id; ?> ">extend</a> <?php } elseif ($ap->app_paket_id == 1) { //check if tinggal sebulan $diff = dateDifference(date("Y-m-d", strtotime($ap->app_contract_end)), date("Y-m-d"), "%a"); // echo "<br>".$diff; if ($diff <= 30) { ?> <br> <a href="<?php echo _SPPATH; ?> PaymentWeb/extend_paket_1?app_id=<?php echo $ap->app_id; ?> ">extend</a> <?php } } } echo '</div>'; } ?> <?php if ($ap->app_active == 2) { if ($ap->app_paket_id == 1 || $ap->app_paket_id == 2) { ?> <a href='<?php echo _SPPATH; ?> PaymentWeb/upgrade?app_id=<?php echo $ap->app_id; ?> ' class="btn btn-success">Upgrade</a> <?php } ?> <a href='<?php echo _SPPATH; ?> pushnotif?app_id=<?php echo $ap->app_id; ?> ' class="btn btn-success btn-abu">Push Notifications</a> <br> <?php } else { if ($ap->app_active == 0) { ?> <!-- <a href='--><?php //=_SPPATH; ?> <!--MyApp/appView?id=--><?php //=$ap->app_id; ?> <!--' class="btn btn-danger">Payment</a>--> <a href='<?php echo _SPPATH; ?> PaymentWeb/pay?app_id=<?php echo $ap->app_id; ?> ' class="btn btn-danger">Payment</a> <a href='<?php echo _SPPATH; ?> delete_app?app_id=<?php echo $ap->app_id; ?> ' onclick="return confirm('This will delete this App?')" class="btn btn-success btn-abu">Delete</a> <?php } } ?> <a href='<?php echo _SPPATH; ?> apps/edit?id=<?php echo $ap->app_id; ?> ' class="btn btn-success btn-abu">Edit</a> <a href='<?php echo _SPPATH; ?> preview?id=<?php echo $ap->app_id; ?> ' class="btn btn-success btn-abu">Preview</a> <a href='<?php echo _SPPATH; ?> uploads/json/<?php echo $ap->app_keywords; ?> .json' target="_blank" class="btn btn-success btn-abu">JSON</a> </div> </div> <div id="app_<?php echo $num; ?> " class="app_icon" onclick="openDetails('<?php echo $num; ?> ');"> <img width="100%" src="<?php echo $ap->app_icon; ?> "> <div style="display:none;position: absolute; background-color: rgba(0,0,0,0.5); border-radius: 0px; text-align: center; font-size: 18px; padding: 10px; margin-top: -53px; margin-left:10px; z-index:1; color: #ffffff;"> <?php echo $ap->app_name; ?> </div> </div> </div> <?php } ?> <script> function openDetails(n){ $('#detail_'+n).fadeToggle( "slow", "linear" ); console.log($('#app_'+n).width()); $('#detail_'+n).css("width",$('#app_'+n).width()+'px'); $('#detail_'+n).css("height",$('#app_'+n).height()+'px'); } </script> <style> .app_detail{ position: absolute; background-color: rgba(0,0,0,0.8); width: 100px; height: 200px; color: #ffffff; text-align: center; z-index: 10; } .myapp{ cursor: pointer; } .app_contract{ font-style: italic; font-size: 12px; } .myapp a{ color: #B2DFDB; text-decoration: underline; } .myapp a.btn{ text-decoration: none; margin: 5px; color: #ffffff; } .entry{ padding: 5px; background-color: #F7F7F7; margin: 5px; } .entry a.btn{ text-decoration: none; margin: 2px; color: #ffffff; } </style> </div> <div class="clearfix"></div> <div id="app_lists" > <?php foreach ($apps as $num => $ap) { // $paket = new Paket(); // $paket->getByID($ap->app_paket_id); ?> <div class=" col-md-6 col-sm-12 col-xs-12"> <div class="entry"> <div class="col-md-6 col-sm-6 col-xs-6"> <img width="100%" src="<?php echo $ap->app_icon; ?> "> </div> <div class="col-md-6 col-sm-6 col-xs-6" style="text-align: center;"> <h3><?php echo $ap->app_name; ?> </h3> <?php $paket = new Paket(); if ($ap->app_paket_id > 0) { $paket->getByID($ap->app_paket_id); echo '<div class="app_paket">' . $paket->paket_name . '</div>'; } ?> <?php $status = $ap->app_active; echo '<div class="app_status">'; if ($status == 0) { echo "Not active"; } if ($status == 1) { if ($ap->app_type == 1) { echo "pending approval"; } else { echo "App is being created"; } } if ($status == 2) { echo "Up and running"; } echo "</div>"; ?> <?php if ($ap->app_active > 0 && $ap->app_type == 0) { echo '<div class="app_contract">contract ends : ' . date("d-m-Y", strtotime($ap->app_contract_end)); if ($ap->app_active == 2) { if ($ap->app_paket_id > 1) { ?> <br> <a href="<?php echo _SPPATH; ?> PaymentWeb/extend?app_id=<?php echo $ap->app_id; ?> ">extend</a> <?php } elseif ($ap->app_paket_id == 1) { //check if tinggal sebulan $diff = dateDifference(date("Y-m-d", strtotime($ap->app_contract_end)), date("Y-m-d"), "%a"); // echo "<br>".$diff; if ($diff <= 30) { ?> <br> <a href="<?php echo _SPPATH; ?> PaymentWeb/extend_paket_1?app_id=<?php echo $ap->app_id; ?> ">extend</a> <?php } } } echo '</div>'; } ?> <?php if ($ap->app_active == 2) { if ($ap->app_paket_id == 1 || $ap->app_paket_id == 2) { ?> <a href='<?php echo _SPPATH; ?> PaymentWeb/upgrade?app_id=<?php echo $ap->app_id; ?> ' class="btn btn-success">Upgrade</a> <?php } ?> <a href='<?php echo _SPPATH; ?> pushnotif?app_id=<?php echo $ap->app_id; ?> ' class="btn btn-success btn-abu">Push Notifications</a> <br> <?php } else { if ($ap->app_active == 0) { ?> <!-- <a href='--><?php //=_SPPATH; ?> <!--MyApp/appView?id=--><?php //=$ap->app_id; ?> <!--' class="btn btn-danger">Payment</a>--> <a href='<?php echo _SPPATH; ?> PaymentWeb/pay?app_id=<?php echo $ap->app_id; ?> ' class="btn btn-danger">Payment</a> <a href='<?php echo _SPPATH; ?> delete_app?app_id=<?php echo $ap->app_id; ?> ' onclick="return confirm('This will delete this App?')" class="btn btn-success btn-abu">Delete</a> <?php } } ?> <a href='<?php echo _SPPATH; ?> apps/edit?id=<?php echo $ap->app_id; ?> ' class="btn btn-success btn-abu">Edit</a> <a href='<?php echo _SPPATH; ?> preview?id=<?php echo $ap->app_id; ?> ' class="btn btn-success btn-abu">Preview</a> <a href='<?php echo _SPPATH; ?> uploads/json/<?php echo $ap->app_keywords; ?> .json' target="_blank" class="btn btn-success btn-abu">JSON</a> </div> <div class="clearfix"></div> </div> </div> <?php } ?> </div> <style> .table{ background-color: white; } </style> <div id="app_table" class="table-responsive" style="margin-top: 20px; display: none;"> <table class="table table-striped table-bordered"> <thead> <tr> <th> No. </th> <th>App</th> <th>Action</th> <th>Paket</th> <th>Expired Date</th> <th>Status</th> </tr> </thead> <tbody> <?php foreach ($apps as $num => $ap) { // $paket = new Paket(); // $paket->getByID($ap->app_paket_id); ?> <tr> <td><?php echo $num + 1; ?> </td> <td style="text-align: center;"> <div class="foto100"> <img width="100px" src="<?php echo $ap->app_icon; ?> "> </div> <?php echo $ap->app_name; ?> </td> <td> <!-- <a href='--><?php //=_SPPATH; ?> <!--MyApp/appView?id=--><?php //=$ap->app_id; ?> <!--' class="btn btn-info">Edit</a>--> <?php if ($ap->app_active == 2) { if ($ap->app_paket_id == 1 || $ap->app_paket_id == 2) { ?> <a href='<?php echo _SPPATH; ?> PaymentWeb/upgrade?app_id=<?php echo $ap->app_id; ?> ' class="btn btn-success">Upgrade</a> <?php } ?> <a href='<?php echo _SPPATH; ?> pushnotif?app_id=<?php echo $ap->app_id; ?> ' class="btn btn-success">Push Notifications</a> <br> <?php } else { if ($ap->app_active == 0) { ?> <!-- <a href='--><?php //=_SPPATH; ?> <!--MyApp/appView?id=--><?php //=$ap->app_id; ?> <!--' class="btn btn-danger">Payment</a>--> <a href='<?php echo _SPPATH; ?> PaymentWeb/pay?app_id=<?php echo $ap->app_id; ?> ' class="btn btn-danger">Payment</a> <a href='<?php echo _SPPATH; ?> delete_app?app_id=<?php echo $ap->app_id; ?> ' onclick="return confirm('This will delete this App?')" class="btn btn-danger">Delete</a> <?php } } ?> <a href='<?php echo _SPPATH; ?> apps/edit?id=<?php echo $ap->app_id; ?> ' class="btn btn-danger">Edit</a> <a href='<?php echo _SPPATH; ?> preview?id=<?php echo $ap->app_id; ?> ' class="btn btn-danger">Preview</a> <a href='<?php echo _SPPATH; ?> uploads/json/<?php echo $ap->app_keywords; ?> .json' target="_blank" class="btn btn-danger">JSON</a> </td> <td> <?php $paket = new Paket(); if ($ap->app_paket_id > 0) { $paket->getByID($ap->app_paket_id); echo $paket->paket_name; } ?> </td> <td> <?php if ($ap->app_active > 0) { echo date("d-m-Y", strtotime($ap->app_contract_end)); if ($ap->app_active == 2) { if ($ap->app_paket_id > 1) { ?> <br> <a class="btn btn-default" href="<?php echo _SPPATH; ?> PaymentWeb/extend?app_id=<?php echo $ap->app_id; ?> ">extend</a> <?php } elseif ($ap->app_paket_id == 1) { //check if tinggal sebulan $diff = dateDifference(date("Y-m-d", strtotime($ap->app_contract_end)), date("Y-m-d"), "%a"); // echo "<br>".$diff; if ($diff <= 30) { ?> <br> <a class="btn btn-default" href="<?php echo _SPPATH; ?> PaymentWeb/extend_paket_1?app_id=<?php echo $ap->app_id; ?> ">extend</a> <?php } } } } ?> </td> <td><?php $status = $ap->app_active; if ($status == 0) { echo "Your App is not active"; } if ($status == 1) { echo "Your App is being created.<br>For Android App, it will take up to 2 working days.<br>For iOS, it will take up to 3 weeks."; } if ($status == 2) { echo "Your App is up and running"; } ?> </td> </tr> <?php } ?> </tbody> </table> </div> </div> <div class="clearfix" style="margin-bottom: 100px;"></div> </div> <?php } else { header("Location:" . _SPPATH . "apps/make"); exit; } }