-
Posts
483 -
Joined
-
Last visited
-
Days Won
1
Everything posted by sagnik
-
Here is my code: <?php session_start(); require_once "E:/home/wn/public_html/mobile/global/header.php"; if(!isset($_SESSION['wn-reg_client']) || $_SESSION['wn-reg_client'] != "first_start" || $_SESSION['wn-reg_client'] != $_SERVER['REMOTE_ADDR']){ $_SESSION['wn-reg_client']="first_start"; } ?> <link rel="stylesheet" href="<?=$public_mGlobal;?>layouts/wn-registration_page.css" type="text/css"> <link rel="stylesheet" href="<?=$public_mGlobal;?>layouts/progress-wizard.min.css" type="text/css"> <div data-role="page" data-title="Register :: Whatsnew" data-theme="<?=$theme;?>" id="registration_page" data-dom-cache="false"> <?php require $mInc."pages/common/header.php";?> <?php require $mInc."pages/common/panels.php";?> <div role="main" class="ui-content"> <div class="wn-section" id="wn-register"> <form method="post"> <div class="wn-registration_fixed_heading"> <div class="wn-section_heading" id="wnrHeader">Register</div> <ul class="progress-indicator"> </ul> </div> <?php if(isset($_SESSION['wn-reg_client']) && $_SESSION['wn-reg_client'] == "first_start" && !isset($_GET['client']) && !isset($_GET['validate']) || empty($_GET['client']) && empty($_GET['validate'])){ ?> <div class="wn-section" id="wn-register_emailSection"> <div class="wn-section_body"> <div id="wn-step1_section1" align="center" style="font-size:60px !important;"> <fieldset data-role="controlgroup" data-type="horizontal" data-mini="true" class="wn-at_input"> <legend>Choose Account Type:</legend> <input type="radio" name="atype" id="at_g" value="1" style="width:20px;"> <label for="at_g">General</label> <input type="radio" name="atype" id="at_m" value="2" style="width:20px;"> <label for="at_m">Merchant</label> </fieldset> <br><br> </div> <div class="wn-loader_modal"><div class="wn-loader"></div></div> <div id="wn-step1_section2"> <hr/> <label for="email">Email ID:</label> <input type="text" name="email" id="email" value="" data-clear-btn="true" placeholder="youremailaddress@domain.com"> </div> <div id="wn-step1_section2Actions"> <!--<a id="wn-step1_prevBtn" class="ui-block-a ui-btn ui-btn-raised clr-primary" style="padding-top:10px; padding-bottom:10px;">Previous</a>--> <a id="wn-step1_nextBtn" class="ui-btn ui-btn-raised clr-primary" style="padding-top:10px; padding-bottom:10px;">Next</a> </div> </div> </div> <div id="wn-step1_msg" class="success"></div> <?php } elseif(isset($_SESSION['wn-reg_client']) && isset($_SESSION['wn-reg_step2_token']) && isset($_GET['client']) && isset($_GET['token']) && isset($_GET['validate']) && $_SESSION['wn-reg_client'] == $_SERVER['REMOTE_ADDR'] && $_SESSION['wn-reg_step2_token'] == $_GET['token'] || !empty($_GET['client']) && !empty($_GET['validate'])){ ?> <div class="wn-loader"></div> <div id="wn-reg_step2_msg"></div> <div class="wn-section" id="wn-register_loginSection"> <div class="wn-section_body"> <label for="un">Username:</label> <input type="text" name="un" id="un" value="" data-clear-btn="true" placeholder="Enter your desired username here"> <label for="unCheckBtn"></label> <input type="button" id="unCheckBtn" value="Check Availablity" data-clear-btn="true" placeholder=""> <label for="pwd">Password:</label> <input type="password" name="pwd" id="pwd" value="" data-clear-btn="true" placeholder="Enter your desired password here"> <div id="wn-step2_actions" class="ui-grid-a"> <a id="wn-step2_prevBtn" class="ui-block-a ui-btn ui-btn-raised clr-primary" style="padding-top:10px; padding-bottom:10px;">Previous</a> <a id="wn-step2_nextBtn" class="ui-block-b ui-btn ui-btn-raised clr-primary" style="padding-top:10px; padding-bottom:10px;">Next</a> </div> </div> </div> <div class="wn-section" id="wn-register_piSection"> <div class="wn-section_body"> <label for="fn">First name:</label> <input type="text" name="fn" id="fn" value="" data-clear-btn="true" placeholder="Enter your first name here"> <label for="ln">Last name:</label> <input type="text" name="ln" id="ln" value="" data-clear-btn="true" placeholder="Enter your last name here"> <fieldset data-role="controlgroup" data-type="horizontal" data-mini="true" id="sex"> <legend>Gender:</legend> <input type="radio" name="sex" id="sex_m" value="Male"> <label for="sex_m">Male</label> <input type="radio" name="sex" id="sex_f" value="Female"> <label for="sex_f">Female</label> <input type="radio" name="sex" id="sex_n" value="Not Specified"> <label for="sex_n">Not Specified</label> </fieldset> <fieldset data-role="controlgroup" data-type="horizontal" id="dob"> <legend>Date Of Birth:</legend> <?php require_once $mInc."pages/addons/ymd.php"; ?> </fieldset> <fieldset data-role="controlgroup" id="d1"> <legend>Declarations:</legend> <input type="checkbox" name="tos_checkbox" id="tos_checkbox" value="1"/> <label for="tos_checkbox">I've read and agree with the <a href="<?=$wni->getSiteConfig("tos_url");?>?refid=8">Terms & Conditions</a></label> <input type="checkbox" name="privacy_checkbox" id="privacy_checkbox" value="1"/> <label for="privacy_checkbox">I've read and accept the <a href="<?=$wni->getSiteConfig("privacy_url");?>?refid=8">Privacy Policy</a></label> </fieldset> <div class="ui-grid-a"> <a id="wn-step3_prevBtn" class="ui-block-a ui-btn ui-btn-raised clr-primary" style="padding-top:10px; padding-bottom:10px;">Previous</a> <a id="wn-step3_nextBtn" class="ui-block-b ui-btn ui-btn-raised clr-primary" style="padding-top:10px; padding-bottom:10px;">Register</a> </div> </div> </div> <div class="wn-section" id="wn-register_mdSection"> <div class="wn-section_body"> <label for="bl"><green>*</green> Business Logo:</label> <input type="file" name="bl" id="bn" data-clear-btn="true" placeholder="Select your business logo (If any)"> <label for="bn"><red>*</red> Business name:</label> <input type="text" name="bn" id="bn" data-clear-btn="true" placeholder="Enter your business name here"> <fieldset data-role="controlgroup" data-type="horizontal"> <legend><red>*</red> Date Founded/Established:</legend> <?php require $mInc."pages/addons/ymd.php";?> </fieldset> <label for="ba1"><red>*</red> Address Line-1:</label> <input type="text" name="ba1" id="ba1" data-clear-btn="true" placeholder="Enter the 1st address line, where your business is located"> <label for="ba2"><green>*</green> Address Line-2:</label> <input type="text" name="ba2" id="ba2" data-clear-btn="true" placeholder="Enter the 2nd address line, where your business is located (if any)"> <label for="bas"><red>*</red> Street:</label> <input type="text" name="bas" id="bas" data-clear-btn="true" placeholder="Enter the name of street, where your business is located"> <label for="bal"><green>*</green> Locality:</label> <input type="text" name="bal" id="bal" data-clear-btn="true" placeholder="Enter the locality of your business address (if any)"> <label for="baz"><red>*</red> Postal/ZIP Code:</label> <input type="number" name="baz" id="baz" data-clear-btn="true" placeholder="Enter the postal/zip code of your business address"> <label for=""><red>*</red> :</label> <fieldset data-role="controlgroup"> <legend></legend> <select name="bac" id="bac"><?php require $mInc."pages/addons/countries.php"; ?></select> <select name="bas" id="bas"></select> <select name="bap" id="bap"></select> </fieldset> <label for="be1"><red>*</red> Business E-mail:</label> <input type="email" name="be1" id="be1" data-clear-btn="true" placeholder="Enter your business email address"> <label for="be2"><green>*</green> Additional Business E-mail:</label> <input type="email" name="be2" id="be2" data-clear-btn="true" placeholder="Enter your additional business email address (if any)"> <label for="btp1"><red>*</red> Business Telephone Number:</label> <input type="number" name="btp1" id="btp1" data-clear-btn="true" placeholder="Enter your business telephone number"> <label for="btp2"><green>*</green> Additional Business Telephone Number:</label> <input type="number" name="btp2" id="btp2" data-clear-btn="true" placeholder="Enter your additional business telephone number (if any)"> <label for="bfn"><green>*</green> Business Fax Number:</label> <input type="number" name="bfn" id="bfn" data-clear-btn="true" placeholder="Enter your business fax number (if any)"> <fieldset data-role="controlgroup"> <legend>Declarations:</legend> <input type="checkbox" name="tos_checkbox" id="tcb" value="1"> <label for="tcb">I've read and agree with the <a href="<?=$wni->getSiteConfig("tos_url");?>?refid=8">Terms & Conditions</a></label> <input type="checkbox" name="privacy_checkbox" id="pcb" value="1"> <label for="pcb">I've read and accept the <a href="<?=$wni->getSiteConfig("privacy_url");?>?refid=8">Privacy Policy</a></label> </fieldset> <div class="ui-grid-a"> <a id="wn-step4_prevBtn" class="ui-block-a ui-btn ui-btn-raised clr-primary">Previous</a> <a id="wn-step4_nextBtn" class="ui-block-b ui-btn ui-btn-raised clr-primary">Next</a> </div> </div> </div> <?php } ?> </form> </div> </div> <?php require $mInc."pages/common/footer.php";?> </div> <script> function base64_encode(s){ var ret = null; $.ajax({ method: "POST", url: "<?=$public_mAjax;?>/core/string_processor.php", data: {do: "encode_base64", string: s}, async: false, success: function(d){ if(d != null){ ret=d; } else { ret="Failed"; } }, error: function(xhr){ notify("error","Something went wrong! Please try again. ("+xhr.status+xhr.statusText,false+")"); } }); return ret; } function getRegType(){ var url1="<?=$public_mAjax;?>accounts/general_account_helper.php"; var ret = null; $.ajax({ method: "POST", url: url1, data: {do: "get_type"}, async: false, success: function(d){ if(d==1 || d==2){ ret=d; } else { ret="Failed"; } }, error: function(xhr){ notify("error","Something went wrong! Please try again. ("+xhr.status+xhr.statusText,false+")"); } }); return ret; } $(document).ready(function(){ var url1="<?=$public_mAjax;?>accounts/general_account_helper.php"; $("#email").blur(function(e){ var ve = base64_encode($("#email").val()); if(getRegType()==1){ $("#wn-step1_msg").html('Thank you for completing Step-1 of Whatsnew General Account Registration. You have to complete all four steps to complete your registration. we have sent the validation link to your email. Please check your e-mail and click the link in the email to proceed to the next step.<br>Please note, the email you recieve from us will be <b>accounts@whatsnew.cf</b> and the subject must be named <b>Whatsnew Accounts</b> If you didn\'t recieve an email from us, please <a href="<?=$public_mRoot;?>accounts/resend.php?f=validation_email&validate='+ve+'&type=1&&do=resend&refid=8&next=2" data-ajax="false">click here</a> to resend the verification email.'); } else if(getRegType()==2){ $("#wn-step1_msg").html('Thank you for completing Step-1 of Whatsnew Merchant Account Registration. You have to complete all four steps to complete your registration. we have sent the validation link to your email. Please check your e-mail and click the link in the email to proceed to the next step.<br>Please note, the email you recieve from us will be <b>accounts@whatsnew.cf</b> and the subject must be named <b>Whatsnew Accounts</b> If you didn\'t recieve an email from us, please <a href="<?=$public_mRoot;?>accounts/resend.php?f=validation_email&validate='+ve+'&type=2&do=resend&refid=8&next=2" data-ajax="false">click here</a> to resend the verification email.'); } else { } }); var at=null; $("#wn-step1_section2").hide(); $("#wn-step1_section2Actions").hide(); $("#wn-step1_msg").hide(); $("#wn-register_emailSection .wn-section_body .wn-loader_modal").hide(); $(".wn-at_input input").click(function(){ $("#wn-register_emailSection .wn-section_body .wn-loader_modal").fadeIn(); $.ajax({ method: "POST", url: url1, data: {do: "set_type",value: $(this).val()}, success: function(d){ if(d=="done"){ $.ajax({ method: "POST", url: url1, data: {do: "get_type"}, success: function(r){ if(r==1){ at=1; $(".wn-registration_fixed_heading .progress-indicator").html('<li class="active" id="step1"><span class="bubble"></span>Step 1. <br><small>Account Type</small></li><li id="step2"><span class="bubble"></span>Step 2. <br><small>Login Details</small></li><li id="step3"><span class="bubble"></span>Step 3. <br><small>Personal Details</small></li>'); $("#wn-step1_section2Actions").show(); $("#wn-step1_section2").show(); } else if(r==2){ at=2; $(".wn-registration_fixed_heading .progress-indicator").html('<li class="active" id="step1"><span class="bubble"></span>Step 1. <br><small>Account Type</small></li><li id="step2"><span class="bubble"></span>Step 2. <br><small>Personal Details</small></li><li id="step3"><span class="bubble"></span>Step 3 <br><small>Business Details</small></li><li id="step4"><span class="bubble"></span>Step 4. <br><small>Business Verification Details</small></li>'); $("#wn-step1_section2Actions").show(); $("#wn-step1_section2").show(); } else { notify("error",r); } }, error: function(xhr,status,response){ notify("error","Internal Error: <b>"+xhr.status+" "+xhr.statusText+"</b> Please contact administrator"); }, complete: function(){ $("#wn-register_emailSection .wn-section_body .wn-loader_modal").fadeOut(); } }); } else { notify("error",d); } }, error: function(xhr,status,response){ notify("error","Internal Error: <b>"+xhr.status+" "+xhr.statusText+"</b> Please contact administrator"); }, complete: function(){ //$("#wn-register_emailSection .wn-section_body .wn-loader_modal").fadeOut(); } }); }); /****************************STEP-1******************************/ $("#wn-step1_nextBtn").click(function(){ $("#wn-register_emailSection .wn-section_body .wn-loader_modal").fadeIn(); $.ajax({ method: "POST", url: url1, data: {do: "validate",value: $("#email").val(), type: "email"}, success: function(d){ if(d=="passed"){ /*$("#wn-register_emailSection").animate({left: '-=100vw'}, 3000); $("#wn-register_loginSection").animate({left: '-=100vw'}, 3000); setTimeout(function(){ $("#wn-register_emailSection").hide(); },3000);*/ $("#wn-register_emailSection").animate({left: '-=100vw'}, 3000); setTimeout(function(){ $("#wn-step1_msg").show(); $("#wn-register_emailSection").hide(); },3000); } else { notify("error",d); } }, error: function(xhr,status,response){ notify("error","Internal Error: <b>"+xhr.status+" "+xhr.statusText+"</b> Please contact administrator"); }, complete: function(){ $("#wn-register_emailSection .wn-section_body .wn-loader_modal").fadeOut(); } }); }); }); </script> <?php if(!empty($_GET['client']) && !empty($_GET['validate']) && !empty($_GET['token'])){ ?> <script> /***************STEP-1 PROCESSING************/ $(document).ready(function(){ var url1a="<?=$public_mAjax;?>accounts/general_account_helper.php"; var url1b="<?=$public_mAjax;?>accounts/general_account_registration.php"; var url2a="<?=$public_mAjax;?>accounts/merchant_account_helper.php"; var url2b="<?=$public_mAjax;?>accounts/merchant_account_registration.php"; //$("#wn-register_piSection").css({left: '0vw'}); //$("#wn-register_mdSection").css({left: '0vw'}); $("#wn-register_loginSection").hide(); $("#wn-register_piSection").hide(); $("#wn-register_mdSection").hide(); $("#wn-reg_step2_msg").fadeOut(); $(".wn-loader").fadeIn(); setTimeout(function(){ if(getRegType()==1){ $.ajax({ method: "POST", url: url1b, data: {do: "process_step1", validate: "<?=$_GET['validate'];?>", client: "<?=$_GET['client'];?>", token: "<?=$_GET['token'];?>"}, success: function(d){ if(d=="passed"){ at=1; $(".wn-registration_fixed_heading .progress-indicator").html('<li class="completed" id="step1"><span class="bubble"></span>Step 1. <br><small>Account Type</small></li><li id="step2" class="active"><span class="bubble"></span>Step 2. <br><small>Login Details</small></li><li id="step3"><span class="bubble"></span>Step 3. <br><small>Personal Details</small></li>'); //$("#wn-step1_msg").html('Thank you for completing Step-1 of Whatsnew General Account Registration. You have to complete all four steps to complete your registration. we have sent the validation link to your email. Please check your e-mail and click the link in the email to proceed to the next step.<br>Please note, the email you recieve from us will be <b>accounts@whatsnew.cf</b> and the subject must be named <b>Whatsnew Accounts</b> If you didn\'t recieve an email from us, please <a href="accounts/resend.php?f=email&client=<?=base64_encode($_SERVER['REMOTE_IP_ADDRESS']);?>&refid=8&next=2">click here</a> to resend the verification email.'); $("#wn-register_loginSection").fadeIn(); } else { $(".wn-loader").fadeOut(); $("#wn-reg_step2_msg").addClass("error"); $("#wn-reg_step2_msg").html(r); $("#wn-reg_step2_msg").fadeIn(); notify("error",r); } }, error: function(xhr){ notify("error","Internal Error: <b>"+xhr.status+" "+xhr.statusText+"</b> Please contact administrator"); }, complete: function(){ $(".wn-loader").fadeOut(); } }); } else if(getRegType()==2) { $.ajax({ method: "POST", url: url2b, data: {do: "process_step1", validate: "<?=$_GET['validate'];?>", client: "<?=$_GET['client'];?>", token: "<?=$_GET['token'];?>"}, success: function(d){ if(d=="passed"){ at=2; $(".wn-registration_fixed_heading .progress-indicator").html('<li class="completed" id="step1"><span class="bubble"></span>Step 1. <br><small>Account Type</small></li><li id="step2" class="active"><span class="bubble"></span>Step 2. <br><small>Personal Details</small></li><li id="step3"><span class="bubble"></span>Step 3. <br><small>Business Details</small></li><li id="step4"><span class="bubble"></span>Step 4. <br><small>Business Verification Details</small></li>'); //$("#wn-step1_msg").html('Thank you for completing Step-1 of Whatsnew Merchant Account Registration. You have to complete all four steps to complete your registration. we have sent the validation link to your email. Please check your e-mail and click the link in the email to proceed to the next step.<br>Please note, the email you recieve from us will be <b>accounts@whatsnew.cf</b> and the subject must be named <b>Whatsnew Accounts</b> If you didn\'t recieve an email from us, please <a href="accounts/resend.php?f=email&client=<?=base64_encode($_SERVER['REMOTE_IP_ADDRESS']);?>&refid=8&next=2">click here</a> to resend the verification email.'); $("#wn-step3_nextBtn").text("Next"); $("#wn-register_piSection").fadeIn(); } else { $(".wn-loader").fadeOut(); $("#wn-reg_step2_msg").addClass("error"); $("#wn-reg_step2_msg").html(d); $("#wn-reg_step2_msg").fadeIn(); notify("error",d); } }, error: function(xhr){ notify("error","Internal Error: <b>"+xhr.status+" "+xhr.statusText+"</b> Please contact administrator"); }, complete: function(){ $(".wn-loader").fadeOut(); } }); } else { notify("error","Unable to get Registration Type! Please contact the Administrator."); } },2000); }); </script> <?php } ?> <script> $(document).ready(function(){ //var url1="<?=$public_mAjax;?>accounts/general_account_helper.php"; var url1="<?=$public_mAjax;?>accounts/general_account_registration.php"; var url2="<?=$public_mAjax;?>accounts/merchant_account_registration.php"; $("#wn-register_mdSection").css({left: '100vw'}); var t=<?=$_SESSION['wn-reg_type'];?>; if(t==1){ } else if(t==2){ $("#wn-step3_nextBtn").addClass("ui-disabled"); var fe=null le=null, se=null, de=null, d1=null, d2=null; $("#fn").blur(function(){ if($(this).val){ if($(this).val().length >= 2 && $(this).val().length <= 48){ var fnr=new RegExp('^([A-Z]{1})([a-z]*)?(\.)?( [a-zA-Z]*)?(\.?)$'); if(fnr.test($(this).val())){ fe=true; } else { fe=false; notify("error","Invalid First Name! First name can contain only a-z(any caps) and a single dot(.) and must start with Uppercase Character and end with Lowercase character or a single dot(.)."); } } else { fe=false; notify("error","Invalid First Name Length! The length of first name must be between 2 & 48 characters."); } } else { fe=false; notify("error","First Name Empty! First name cannot be left empty. Please enter atleast your first initial."); } //validateStep2(); }); $("#ln").blur(function(){ if($(this).val != null){ if($(this).val().length >= 2 && $(this).val().length <= 48){ var lnr=new RegExp('^([A-Z]{1})([a-z]*)?(\.)?( [a-zA-Z]*)?(\.?)$'); if(lnr.test($(this).val())){ le=true; } else { le=false; notify("error","Invalid Last Name! last name can contain only a-z(any caps) and a single dot(.) and must start with Uppercase Character and end with Lowercase character or a single dot(.)."); } } else { le=false; notify("error","Invalid Last Name Length! The length of last name must be between 2 & 48 characters."); } } else { le=false; notify("error","Last Name Empty! Last name cannot be left empty. Please enter atleast your last initial."); } //validateStep2(); }); $("#sex input").click(function(){ if($(this).prop("checked") == true){ se=true; } else { se=false; notify("error","Gender Not Selected! Please select your gender."); } //validateStep2(); }); $("#dob #date").change(function(){ if($("#dob #year option:selected").val().length==4 && $("#dob #month option:selected").val().length==2 && $("#dob #date option:selected").val().length==2){ de=true; } else { de=false; notify("error","Date Of Birth Not Selected! Please select your date of birth."); } //validateStep2(); }); $("#d1 #tos_checkbox").change(function(){ if($(this).prop("checked")){ d1=true; } else { d1=false; } //validateStep2(); }); $("#d1 #privacy_checkbox").change(function(){ if($(this).prop("checked")){ d2=true; } else { d2=false; } //validateStep2(); }); $("#fn, #ln, #dob select, #d1 #tos_checkbox, #d1 #privacy_checkbox").change(function(){ if(fe && le && se && de && d1 && d2){ $("#wn-step3_nextBtn").removeClass("ui-disabled"); } else { $("#wn-step3_nextBtn").addClass("ui-disabled"); } }); $("#sex input").click(function(){ if(fe && le && se && de && d1 && d2){ $("#wn-step3_nextBtn").removeClass("ui-disabled"); } else { $("#wn-step3_nextBtn").addClass("ui-disabled"); } }); $("#wn-step3_nextBtn").click(function(){ var dob=$("#dob #date:option:selected").val()+"-"+$("#dob #month:option:selected").val()+"-"+$("#dob #year:option:selected").val(); /****HERE IS THE PROBLEM *****$.ajax is not sending/retrieving data****/ $.ajax({ type: "POST", url: url2, dataType: "html", data: {do: "process_step2",validate: "<?=$_GET['validate'];?>", client: "<?=$_GET['client'];?>", token: "<?=$_GET['token'];?>" ,fname: $("#fn").val(),lname: $("#ln").val(),sex: $("#sex input:checked").val(),dob: dob}, success: function(d){ if(d=="passed"){ $("#wn-register_piSection").animate({left: '-=100vw'}, 3000); $("#wn-register_mdSection").animate({left: '-=100vw'}, 3000); setTimeout(function(){ $("#wn-register_piSection").hide(); },3000); } else { notify("error",d,true,20); } }, error: function(response,status,xhr){ notify("error","Internal Error: <b>"+xhr.status+" "+xhr.statusText+"</b>. Please contact administrator"); } }); }); } else { notify("error","Unable to get Registration Type! Please contact the Administrator."); } }); </script> <script> $(document).ready(function(){ $("#bac").change(function(){ var cid=$(this).attr("cid"); $.ajax({ method: "POST", url: "<?=$public_mAjax;?>cscdl.php", data: {cid: cid}, success: function(d){ $("#bas").html(d); }, error: function(response,status,xhr){ notify("error","Internal Error: <b>"+xhr.status+" "+xhr.statusText+"</b>. Please contact administrator"); } }); }); $("#bas").on('change',function(){ var cid=$(this).attr("cid"); var sid=$(this).attr("sid"); $.ajax({ method: "POST", url: "<?=$public_mAjax;?>cscdl.php", data: {cid: cid, sid: sid}, success: function(d){ $("#bap").html(d); }, error: function(response,status,xhr){ notify("error","Internal Error: <b>"+xhr.status+" "+xhr.statusText+"</b>. Please contact administrator"); } }); }); }); </script> <?php require_once $mGlobal."footer.php";?> Please help me to debug the code as soon as possible.
-
Here is my IPs: 64.233.173.145, 64.233.173.146, 64.233.173.147 My IP is alternating within the ips listed above. And I still can't login in cPanel.
-
No, I've a static IP which my ISP provides. But I think my mobile device/Router changes the IP. But I can login and use cPanel as long as I want in my pc without any IP Change issues.
-
Hello David, you want HelioHost to implement the same authentication that Google uses. I don't know much about Google, but I think, Google doesn't check user's external IP changes. And if you want HelioHost to implement an email verification for every external IP changes, then you know how many times you have to verify your email! Check this link, www.heliohost.org/ip.php If you visit the url, the IP doesn't change. I don't know why. But if you visit www.whatsmyip.com, you will see that, the your IP is keep changing. If you find any solution, please let me know.
-
I've a problem with my code. I want to fetch rows from mysql by category. I've 3 tables (categories,subcategories & childcategories). If the code works properly, it will look like, HOW IT WILL LOOK IN HTML OUTPUT: IF 1ST ROW IS A CHILD OF CATEGORIES & 2ND ROW OF CATEGORIES DOESN'T HAVE ANY CHILD ELEMENTS: - item-1 - item-1a - item-2 IF ANY OF CATEGORIES DOESN'T HAVE ANY CHILD ELEMENTS: - item-1 - item-2 HOW IT LOOKS IN PHPMYADMIN: table:categories table:subcategories table:childcategories HERE IS THE CODES: panels.php <?php $db2 = $wnd->getDatabase("listings"); $wn = new WhatsNew($db2); foreach ($wn->getCategories() as $key => $cat) { if ($cat['subcats'] > 0) { if ($cat['childcats'] > 0) { echo '<div data-role="collapsible" data-inset="false" data-collapsed-icon="plus" data-expanded-icon="minus" data-iconpos="right" id="' . $cat['id'] . '">'; if ($cat['status'] == '2') { echo "<h3>" . $wn->getItemIcon($cat['cid'], "W_TAG-MAINCAT") . "<font color='grey'>{$cat['name']}</font></h3>"; } else { echo "<h3>" . $wn->getItemIcon($cat['cid'], "W_TAG-MAINCAT") . "{$cat['name']}</h3>"; } foreach ($wn->getSubCategories($cat['cid']) as $key => $subcat) { if ($subcat['childcats'] > 0) { echo '<div data-role="collapsibleset" data-theme="<?=$theme;?>" data-content-theme="<?=$content_theme;?>" data-inset="false" data-corners="false" style="padding:0px;margin-top:-10px;">'; echo '<div data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-d" data-iconpos="right" data-inset="false">'; if ($subcat['status'] == '2') { echo "<h1 style='color:grey;'>" . $wn->getItemIcon($cat['cid'], $subcat['scid'], "W_TAG-SUBCAT") . "{$subcat['name']}</h1>"; } else { echo "<h1><a style='text-decoration:inherit;color:inherit;' href='#" . $subcat['scid'] . "'>" . $wn->getItemIcon($cat['cid'], $subcat['scid'], "W_TAG-SUBCAT") . "{$subcat['name']}</a></h1>"; } echo "<ul data-role='listview'>"; foreach ($wn->getChildCategories($cat['cid'], $subcat['scid']) as $key => $childcat) { if ($childcat['status'] == '2') { echo "<li style='color:grey;'>" . $wn->getItemIcon($cat['cid'], $subcat['scid'], $childcat['ccid'], "W_TAG-CHILDCAT") . "{$childcat['name']}</li>"; } else { echo "<li><a href='products.php?cid=" . $cat['cid'] . "&scid=" . $subcat['scid'] . "&ccid=" . $childcat['ccid'] . "'>" . $wn->getItemIcon($cat['cid'], $subcat['scid'], $childcat['ccid'], "W_TAG-CHILDCAT") . "{$childcat['name']}</a></li>"; } } echo "</ul>"; echo "</div></div>"; } else { echo "<ul data-role='listview'>"; if ($subcat['status'] == '2') { echo "<li style='color:grey;'>" . $wn->getItemIcon($cat['cid'], $subcat['scid'], "W_TAG-SUBCAT") . "{$subcat['name']}</li>"; } else { echo "<li style='margin:-8px;margin-top:-5px;padding-right:8px;padding-top:0px;padding-bottom:4px;'><a href='products.php?cid=" . $cat['cid'] . "&scid=" . $subcat['scid'] . "'>" . $wn->getItemIcon($cat['cid'], $subcat['scid'], "W_TAG-SUBCAT") . "{$subcat['name']}</a></li>"; } echo "</ul>"; } } echo "</div>"; } else { echo '<div data-role="collapsible" data-corners="false" data-inset="false" data-collapsed-icon="carat-d" data-expanded-icon="carat-d" data-iconpos="right" id="' . $cat['id'] . '">'; if ($cat['status'] == '2') { echo "<h3>" . $wn->getItemIcon($cat['cid'], "W_TAG-MAINCAT") . "<font color='grey'>{$cat['name']}</font></h3>"; } else { echo "<h3>" . $wn->getItemIcon($cat['cid'], "W_TAG-MAINCAT") . "{$cat['name']}</h3>"; } echo "<ul data-role='listview'>"; foreach ($wn->getSubCategories($cat['cid']) as $key => $subcat) { if ($subcat['status'] == '2') { echo "<li>" . $wn->getItemIcon($cat['cid'], $subcat['scid']) . "{$subcat['name']}</li>"; } else { echo "<li><a href='products.php?cid=" . $cat['cid'] . "&scid=" . $subcat['scid'] . "'>" . $wn->getItemIcon($cat['cid'], $subcat['scid'], "W_TAG-SUBCAT") . "{$subcat['name']}</a></li>"; } } echo "</ul> </div>"; } } else { echo "<ul data-role='listview'>"; if ($cat['status'] == '2') { echo "<li style='color:grey;'>" . $wn->getItemIcon($cat['cid'], "W_TAG-MAINCAT") . "{$cat['name']}</li>"; } else { echo "<li><a href='products.php?cid=" . $cat['cid'] . "'>" . $wn->getItemIcon($cat['cid'], "W_TAG-MAINCAT") . "{$cat['name']}</a></li>"; } echo "</ul>"; } } ?> WhatsNew.base.php <?php function getCatType(){ $args=func_get_args(); $cid=$args[0]; $scid=$args[1]; $ccid=$args[2]; $ccid=$args[3]; $ret=array(); if(empty($cid) && empty($ccid) && empty($scid) || !is_numeric($cid) && !is_numeric($ccid) && !is_numeric($scid)){ $ret['query_name']="Categories"; $ret['query_table']="categories"; } elseif((!empty($cid) && is_numeric($cid)) && (empty($ccid) && empty($scid) || !is_numeric($ccid) && !is_numeric($scid))){ $ret['query_name']="Categories"; $ret['query_table']="categories"; $ret['query_table_condition']="cid='$cid'"; } elseif((!empty($cid) && !empty($scid) && is_numeric($cid) && is_numeric($scid)) && (empty($ccid) && !is_numeric($ccid))){ $ret['name']="Categories"; $ret['table']="Categories"; $ret['query_name']="Sub-categories"; $ret['query_table']="subcategories"; $ret['query_table_condition']="cid='$cid' AND scid='$scid'"; } elseif(!empty($cid) && !empty($scid) && !empty($ccid) && is_numeric($cid) && is_numeric($scid) && is_numeric($ccid)){ $ret['name']="Sub-categories"; $ret['table']="subcategories"; $ret['query_name']="Child-categories"; $ret['query_table']="childcategories"; $ret['query_table_condition']="cid='$cid' AND scid='$scid' AND ccid='$ccid'"; } elseif(!empty($cid) && !empty($scid) && !empty($ccid) && !empty($pid) && is_numeric($cid) && is_numeric($scid) && is_numeric($ccid) && is_numeric($pid)){ $ret['name']="Child-categories"; $ret['table']="childcategories"; $ret['query_name']="Products"; $ret['query_table']="products"; $ret['query_table_condition']="cid='$cid' AND scid='$scid' AND ccid='$ccid' AND pid='$pid'"; } return $ret; } function getOidParams($param=array()){ $return=array(); foreach($param as $key){ if(is_numeric($key)){ if(strlen($key)==10){ $return['cid']=$key; } if(strlen($key)==8){ $return['scid']=$key; } if(strlen($key)==6){ $return['ccid']=$key; } if(strlen($key)==4){ $return['pid']=$key; } } } return $return; } function isIconHidden(){ $args=func_get_args(); $cid=$args[0]; $scid=$args[1]; $ccid=$args[2]; if($q=db_query("SELECT showicon FROM $this->getCatType($cid,$scid,$ccid)['table'] WHERE $this->getCatType($cid,$scid,$ccid)['query_table_condition']",$this->db)){ if(db_num_rows($q)>0){ $r=db_fetch_array($q); return $r['showicon']; } } } function getItemIcon(){ $args=func_get_args(); $param=array($args[0],$args[1],$args[2],$args[3]); $tbl=$this->getCatType($this->getOidParams($param)['cid'],$this->getOidParams($param)['scid'],$this->getOidParams($param)['ccid'],$this->getOidParams($param)['pid'])['query_table']; $tbl_cond=$this->getCatType($this->getOidParams($param)['cid'],$this->getOidParams($param)['scid'],$this->getOidParams($param)['ccid'],$this->getOidParams($param)['pid'])['query_table_condition']; if($q=db_query("SELECT icon,icon_mime FROM $tbl WHERE $tbl_cond",$this->db)){ if(db_num_rows($q)>0){ $r=db_fetch_array($q); if($r['showicon']==0){ return ""; } elseif($r['showicon']==1){ if(in_array("W_TAG-MAINCAT",$param)){ $ret="<div style='float:left;;'><img src='".bin2file($r['icon'],$r['icon_mime'])."' width='24' height='24'/></div>"; } elseif(in_array("W_TAG-SUBCAT",$param)){ $ret="<div style='float:left;'><img src='".bin2file($r['icon'],$r['icon_mime'])."' width='24' height='24'/></div>"; } elseif(in_array("W_TAG-CHILDCAT",$param)){ $ret="<div style='float:left;margin-left:10px;'><img src='".bin2file($r['icon'],$r['icon_mime'])."' width='24' height='24'/></div>"; } elseif(in_array("W_TAG-PRODUCTCAT",$param)){ $ret="<div style='float:left;margin-left:15px;'><img src='".bin2file($r['icon'],$r['icon_mime'])."' width='24' height='24'/></div>"; } else { $ret=bin2file($r['icon'],$r['icon_mime']); } return $ret; } } } else { echo error("Unable to query database! {$this->hcMsg}"); } } function getSubCategoriesCount($cid){ $sccq=db_query("SELECT scid FROM subcategories WHERE cid='$cid' AND status != '1' ORDER BY name ASC",$this->db); if($sccq){ if(db_num_rows($sccq)>0){ $sccr=db_fetch_array($sccq); $result=array("subcategories"=>array("scid"=>$sccr['scid'],"count"=>db_num_rows($sccq))); } else { $result=array("scid"=>"NULL","count"=>"0"); } return $result; } else { echo error("Unable to query database! {$this->hcMsg}"); } } //END FUNCTION: getSubCategoryCounts() function getChildCategoriesCount($cid,$scid){ $cccq=db_query("SELECT ccid FROM childcategories WHERE cid='$cid' AND scid='$scid' AND status != '1' ORDER BY name ASC",$this->db); $result=array(); if($cccq){ if(db_num_rows($cccq)>0){ $cccr=db_fetch_array($sccq); $result=array("childcategories"=>array("ccid"=>$cccr['ccid'],"count"=>db_num_rows($cccq))); } else { $result=array("ccid"=>"NULL","count"=>"0"); } return $result; } else { echo error("Unable to query database! {$this->hcMsg}"); } } //END FUNCTION: getChildCategoryCounts() function getProductsCount(){ $args=func_get_args(); $cid=$args[0]; $scid=$args[1]; $ccid=$args[2]; if(!empty($cid) && !empty($scid) && !empty($ccid) && is_numeric($cid) && is_numeric($scid) && is_numeric($ccid)){ $pcq=db_query("SELECT pid FROM products WHERE cid='$cid' AND scid='$scid' AND ccid='$scid' AND status != '1' ORDER BY name ASC",$this->db); } elseif((!empty($cid) && !empty($scid) && is_numeric($cid) && is_numeric($scid)) && (empty($ccid) && !is_numeric($ccid))){ $pcq=db_query("SELECT pid FROM products WHERE cid='$cid' AND scid='$scid' AND ccid='' AND status != '1' ORDER BY name ASC",$this->db); } elseif((!empty($cid) && is_numeric($cid)) && (empty($ccid) && empty($scid) || !is_numeric($ccid) && !is_numeric($scid))){ $pcq=db_query("SELECT pid FROM products WHERE cid='$cid' AND scid='' AND ccid='' AND status != '1' ORDER BY name ASC",$this->db); } if($pcq){ if(db_num_rows($pcq)>0){ return db_num_rows($pcq); } else { echo error("No products found in any categories!"); } } else { echo error("Unable to query database! {$this->hcMsg}"); } } //END FUNCTION: getProductsCount() function getCategories(){ $cq1=db_query("SELECT * FROM categories WHERE status != '1' ORDER BY name ASC",$this->db); if($cq1){ if(db_num_rows($cq1)>0){ $result=array(); while($cr1=db_fetch_array($cq1)){ foreach($cr1 as $key => $subArr){ unset($cr1['icon']); unset($cr1['icon_mime']); unset($cr1[2]); unset($cr1[3]); } $cr1["subcats"]=$this->getSubCategoriesCount($cr1['cid'])['count']; $cr1["childcats"]=$this->getChildCategoriesCount($cr1['cid'],$this->getSubCategoriesCount($cr1['cid'])['scid'])['count']; array_push($result,$cr1); } return $result; } else { echo error("No categories found!"); } } else { echo error("Unable to query database! {$this->hcMsg}"); } } //END FUNCTION: getCategories() function getSubCategories($cid){ $scq1=db_query("SELECT * FROM subcategories WHERE cid='$cid' AND status != '1' ORDER BY name ASC",$this->db); if($scq1){ if(db_num_rows($scq1)>0){ $result = array(); while($scr1=db_fetch_array($scq1)){ foreach($scr1 as $key => $subArr){ unset($scr1['icon']); unset($scr1['icon_mime']); unset($scr1[2]); unset($scr1[3]); } if($ccq=db_query("SELECT ccid FROM childcategories WHERE cid='$cid' AND scid='".$scr1['scid']."' AND status != '1' ORDER BY name ASC",$this->db)){ if(db_num_rows($ccq)>0){ while($ccr=db_fetch_array($ccq)){ $scr1["childcats"]=db_num_rows($ccq); } } else { $scr1["childcats"]="0"; } } else { $scr1["childcats"]="0"; } array_push($result,$scr1); } return $result; } else { echo error("No sub-categories found!"); } } else { echo error("Unable to query database! {$this->hcMsg}"); } } //END FUNCTION: getSubCategories() function getChildCategories($cid,$scid){ $ccq1=db_query("SELECT * FROM childcategories WHERE cid='$cid' AND scid='$scid' AND status != '1' ORDER BY name ASC",$this->db); if($ccq1){ if(db_num_rows($ccq1)>0){ $result = array(); while($ccr1=db_fetch_array($ccq1)){ foreach($ccr1 as $key => $subArr){ unset($ccr1['icon']); unset($ccr1['icon_mime']); unset($ccr1[2]); unset($ccr1[3]); } array_push($result,$ccr1); } return $result; } else { echo error("No child-categories found!"); } } else { echo error("Unable to query database! {$this->hcMsg}"); } } //END FUNCTION: getChildCategories() ?>
-
I've a problem with my code. I want to fetch rows from mysql by category. I've 3 tables (categories,subcategories & childcategories). If the code works properly, it will look like, HOW IT WILL LOOK IN HTML OUTPUT: IF 1ST ROW IS A CHILD OF CATEGORIES & 2ND ROW OF CATEGORIES DOESN'T HAVE ANY CHILD ELEMENTS: - item-1 - item-1a - item-2 IF ANY OF CATEGORIES DOESN'T HAVE ANY CHILD ELEMENTS: - item-1 - item-2 HOW IT LOOKS IN PHPMYADMIN: table:categories table:subcategories table:childcategories HERE IS THE CODES: panels.php <?php $db2 = $wnd->getDatabase("listings"); $wn = new WhatsNew($db2); foreach ($wn->getCategories() as $key => $cat) { if ($cat['subcats'] > 0) { if ($cat['childcats'] > 0) { echo '<div data-role="collapsible" data-inset="false" data-collapsed-icon="plus" data-expanded-icon="minus" data-iconpos="right" id="' . $cat['id'] . '">'; if ($cat['status'] == '2') { echo "<h3>" . $wn->getItemIcon($cat['cid'], "W_TAG-MAINCAT") . "<font color='grey'>{$cat['name']}</font></h3>"; } else { echo "<h3>" . $wn->getItemIcon($cat['cid'], "W_TAG-MAINCAT") . "{$cat['name']}</h3>"; } foreach ($wn->getSubCategories($cat['cid']) as $key => $subcat) { if ($subcat['childcats'] > 0) { echo '<div data-role="collapsibleset" data-theme="<?=$theme;?>" data-content-theme="<?=$content_theme;?>" data-inset="false" data-corners="false" style="padding:0px;margin-top:-10px;">'; echo '<div data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-d" data-iconpos="right" data-inset="false">'; if ($subcat['status'] == '2') { echo "<h1 style='color:grey;'>" . $wn->getItemIcon($cat['cid'], $subcat['scid'], "W_TAG-SUBCAT") . "{$subcat['name']}</h1>"; } else { echo "<h1><a style='text-decoration:inherit;color:inherit;' href='#" . $subcat['scid'] . "'>" . $wn->getItemIcon($cat['cid'], $subcat['scid'], "W_TAG-SUBCAT") . "{$subcat['name']}</a></h1>"; } echo "<ul data-role='listview'>"; foreach ($wn->getChildCategories($cat['cid'], $subcat['scid']) as $key => $childcat) { if ($childcat['status'] == '2') { echo "<li style='color:grey;'>" . $wn->getItemIcon($cat['cid'], $subcat['scid'], $childcat['ccid'], "W_TAG-CHILDCAT") . "{$childcat['name']}</li>"; } else { echo "<li><a href='products.php?cid=" . $cat['cid'] . "&scid=" . $subcat['scid'] . "&ccid=" . $childcat['ccid'] . "'>" . $wn->getItemIcon($cat['cid'], $subcat['scid'], $childcat['ccid'], "W_TAG-CHILDCAT") . "{$childcat['name']}</a></li>"; } } echo "</ul>"; echo "</div></div>"; } else { echo "<ul data-role='listview'>"; if ($subcat['status'] == '2') { echo "<li style='color:grey;'>" . $wn->getItemIcon($cat['cid'], $subcat['scid'], "W_TAG-SUBCAT") . "{$subcat['name']}</li>"; } else { echo "<li style='margin:-8px;margin-top:-5px;padding-right:8px;padding-top:0px;padding-bottom:4px;'><a href='products.php?cid=" . $cat['cid'] . "&scid=" . $subcat['scid'] . "'>" . $wn->getItemIcon($cat['cid'], $subcat['scid'], "W_TAG-SUBCAT") . "{$subcat['name']}</a></li>"; } echo "</ul>"; } } echo "</div>"; } else { echo '<div data-role="collapsible" data-corners="false" data-inset="false" data-collapsed-icon="carat-d" data-expanded-icon="carat-d" data-iconpos="right" id="' . $cat['id'] . '">'; if ($cat['status'] == '2') { echo "<h3>" . $wn->getItemIcon($cat['cid'], "W_TAG-MAINCAT") . "<font color='grey'>{$cat['name']}</font></h3>"; } else { echo "<h3>" . $wn->getItemIcon($cat['cid'], "W_TAG-MAINCAT") . "{$cat['name']}</h3>"; } echo "<ul data-role='listview'>"; foreach ($wn->getSubCategories($cat['cid']) as $key => $subcat) { if ($subcat['status'] == '2') { echo "<li>" . $wn->getItemIcon($cat['cid'], $subcat['scid']) . "{$subcat['name']}</li>"; } else { echo "<li><a href='products.php?cid=" . $cat['cid'] . "&scid=" . $subcat['scid'] . "'>" . $wn->getItemIcon($cat['cid'], $subcat['scid'], "W_TAG-SUBCAT") . "{$subcat['name']}</a></li>"; } } echo "</ul> </div>"; } } else { echo "<ul data-role='listview'>"; if ($cat['status'] == '2') { echo "<li style='color:grey;'>" . $wn->getItemIcon($cat['cid'], "W_TAG-MAINCAT") . "{$cat['name']}</li>"; } else { echo "<li><a href='products.php?cid=" . $cat['cid'] . "'>" . $wn->getItemIcon($cat['cid'], "W_TAG-MAINCAT") . "{$cat['name']}</a></li>"; } echo "</ul>"; } } ?> WhatsNew.base.php <?php function getCatType(){ $args=func_get_args(); $cid=$args[0]; $scid=$args[1]; $ccid=$args[2]; $ccid=$args[3]; $ret=array(); if(empty($cid) && empty($ccid) && empty($scid) || !is_numeric($cid) && !is_numeric($ccid) && !is_numeric($scid)){ $ret['query_name']="Categories"; $ret['query_table']="categories"; } elseif((!empty($cid) && is_numeric($cid)) && (empty($ccid) && empty($scid) || !is_numeric($ccid) && !is_numeric($scid))){ $ret['query_name']="Categories"; $ret['query_table']="categories"; $ret['query_table_condition']="cid='$cid'"; } elseif((!empty($cid) && !empty($scid) && is_numeric($cid) && is_numeric($scid)) && (empty($ccid) && !is_numeric($ccid))){ $ret['name']="Categories"; $ret['table']="Categories"; $ret['query_name']="Sub-categories"; $ret['query_table']="subcategories"; $ret['query_table_condition']="cid='$cid' AND scid='$scid'"; } elseif(!empty($cid) && !empty($scid) && !empty($ccid) && is_numeric($cid) && is_numeric($scid) && is_numeric($ccid)){ $ret['name']="Sub-categories"; $ret['table']="subcategories"; $ret['query_name']="Child-categories"; $ret['query_table']="childcategories"; $ret['query_table_condition']="cid='$cid' AND scid='$scid' AND ccid='$ccid'"; } elseif(!empty($cid) && !empty($scid) && !empty($ccid) && !empty($pid) && is_numeric($cid) && is_numeric($scid) && is_numeric($ccid) && is_numeric($pid)){ $ret['name']="Child-categories"; $ret['table']="childcategories"; $ret['query_name']="Products"; $ret['query_table']="products"; $ret['query_table_condition']="cid='$cid' AND scid='$scid' AND ccid='$ccid' AND pid='$pid'"; } return $ret; } function getOidParams($param=array()){ $return=array(); foreach($param as $key){ if(is_numeric($key)){ if(strlen($key)==10){ $return['cid']=$key; } if(strlen($key)==8){ $return['scid']=$key; } if(strlen($key)==6){ $return['ccid']=$key; } if(strlen($key)==4){ $return['pid']=$key; } } } return $return; } function isIconHidden(){ $args=func_get_args(); $cid=$args[0]; $scid=$args[1]; $ccid=$args[2]; if($q=db_query("SELECT showicon FROM $this->getCatType($cid,$scid,$ccid)['table'] WHERE $this->getCatType($cid,$scid,$ccid)['query_table_condition']",$this->db)){ if(db_num_rows($q)>0){ $r=db_fetch_array($q); return $r['showicon']; } } } function getItemIcon(){ $args=func_get_args(); $param=array($args[0],$args[1],$args[2],$args[3]); $tbl=$this->getCatType($this->getOidParams($param)['cid'],$this->getOidParams($param)['scid'],$this->getOidParams($param)['ccid'],$this->getOidParams($param)['pid'])['query_table']; $tbl_cond=$this->getCatType($this->getOidParams($param)['cid'],$this->getOidParams($param)['scid'],$this->getOidParams($param)['ccid'],$this->getOidParams($param)['pid'])['query_table_condition']; if($q=db_query("SELECT icon,icon_mime FROM $tbl WHERE $tbl_cond",$this->db)){ if(db_num_rows($q)>0){ $r=db_fetch_array($q); if($r['showicon']==0){ return ""; } elseif($r['showicon']==1){ if(in_array("W_TAG-MAINCAT",$param)){ $ret="<div style='float:left;;'><img src='".bin2file($r['icon'],$r['icon_mime'])."' width='24' height='24'/></div>"; } elseif(in_array("W_TAG-SUBCAT",$param)){ $ret="<div style='float:left;'><img src='".bin2file($r['icon'],$r['icon_mime'])."' width='24' height='24'/></div>"; } elseif(in_array("W_TAG-CHILDCAT",$param)){ $ret="<div style='float:left;margin-left:10px;'><img src='".bin2file($r['icon'],$r['icon_mime'])."' width='24' height='24'/></div>"; } elseif(in_array("W_TAG-PRODUCTCAT",$param)){ $ret="<div style='float:left;margin-left:15px;'><img src='".bin2file($r['icon'],$r['icon_mime'])."' width='24' height='24'/></div>"; } else { $ret=bin2file($r['icon'],$r['icon_mime']); } return $ret; } } } else { echo error("Unable to query database! {$this->hcMsg}"); } } function getSubCategoriesCount($cid){ $sccq=db_query("SELECT scid FROM subcategories WHERE cid='$cid' AND status != '1' ORDER BY name ASC",$this->db); if($sccq){ if(db_num_rows($sccq)>0){ $sccr=db_fetch_array($sccq); $result=array("subcategories"=>array("scid"=>$sccr['scid'],"count"=>db_num_rows($sccq))); } else { $result=array("scid"=>"NULL","count"=>"0"); } return $result; } else { echo error("Unable to query database! {$this->hcMsg}"); } } //END FUNCTION: getSubCategoryCounts() function getChildCategoriesCount($cid,$scid){ $cccq=db_query("SELECT ccid FROM childcategories WHERE cid='$cid' AND scid='$scid' AND status != '1' ORDER BY name ASC",$this->db); $result=array(); if($cccq){ if(db_num_rows($cccq)>0){ $cccr=db_fetch_array($sccq); $result=array("childcategories"=>array("ccid"=>$cccr['ccid'],"count"=>db_num_rows($cccq))); } else { $result=array("ccid"=>"NULL","count"=>"0"); } return $result; } else { echo error("Unable to query database! {$this->hcMsg}"); } } //END FUNCTION: getChildCategoryCounts() function getProductsCount(){ $args=func_get_args(); $cid=$args[0]; $scid=$args[1]; $ccid=$args[2]; if(!empty($cid) && !empty($scid) && !empty($ccid) && is_numeric($cid) && is_numeric($scid) && is_numeric($ccid)){ $pcq=db_query("SELECT pid FROM products WHERE cid='$cid' AND scid='$scid' AND ccid='$scid' AND status != '1' ORDER BY name ASC",$this->db); } elseif((!empty($cid) && !empty($scid) && is_numeric($cid) && is_numeric($scid)) && (empty($ccid) && !is_numeric($ccid))){ $pcq=db_query("SELECT pid FROM products WHERE cid='$cid' AND scid='$scid' AND ccid='' AND status != '1' ORDER BY name ASC",$this->db); } elseif((!empty($cid) && is_numeric($cid)) && (empty($ccid) && empty($scid) || !is_numeric($ccid) && !is_numeric($scid))){ $pcq=db_query("SELECT pid FROM products WHERE cid='$cid' AND scid='' AND ccid='' AND status != '1' ORDER BY name ASC",$this->db); } if($pcq){ if(db_num_rows($pcq)>0){ return db_num_rows($pcq); } else { echo error("No products found in any categories!"); } } else { echo error("Unable to query database! {$this->hcMsg}"); } } //END FUNCTION: getProductsCount() function getCategories(){ $cq1=db_query("SELECT * FROM categories WHERE status != '1' ORDER BY name ASC",$this->db); if($cq1){ if(db_num_rows($cq1)>0){ $result=array(); while($cr1=db_fetch_array($cq1)){ foreach($cr1 as $key => $subArr){ unset($cr1['icon']); unset($cr1['icon_mime']); unset($cr1[2]); unset($cr1[3]); } $cr1["subcats"]=$this->getSubCategoriesCount($cr1['cid'])['count']; $cr1["childcats"]=$this->getChildCategoriesCount($cr1['cid'],$this->getSubCategoriesCount($cr1['cid'])['scid'])['count']; array_push($result,$cr1); } return $result; } else { echo error("No categories found!"); } } else { echo error("Unable to query database! {$this->hcMsg}"); } } //END FUNCTION: getCategories() function getSubCategories($cid){ $scq1=db_query("SELECT * FROM subcategories WHERE cid='$cid' AND status != '1' ORDER BY name ASC",$this->db); if($scq1){ if(db_num_rows($scq1)>0){ $result = array(); while($scr1=db_fetch_array($scq1)){ foreach($scr1 as $key => $subArr){ unset($scr1['icon']); unset($scr1['icon_mime']); unset($scr1[2]); unset($scr1[3]); } if($ccq=db_query("SELECT ccid FROM childcategories WHERE cid='$cid' AND scid='".$scr1['scid']."' AND status != '1' ORDER BY name ASC",$this->db)){ if(db_num_rows($ccq)>0){ while($ccr=db_fetch_array($ccq)){ $scr1["childcats"]=db_num_rows($ccq); } } else { $scr1["childcats"]="0"; } } else { $scr1["childcats"]="0"; } array_push($result,$scr1); } return $result; } else { echo error("No sub-categories found!"); } } else { echo error("Unable to query database! {$this->hcMsg}"); } } //END FUNCTION: getSubCategories() function getChildCategories($cid,$scid){ $ccq1=db_query("SELECT * FROM childcategories WHERE cid='$cid' AND scid='$scid' AND status != '1' ORDER BY name ASC",$this->db); if($ccq1){ if(db_num_rows($ccq1)>0){ $result = array(); while($ccr1=db_fetch_array($ccq1)){ foreach($ccr1 as $key => $subArr){ unset($ccr1['icon']); unset($ccr1['icon_mime']); unset($ccr1[2]); unset($ccr1[3]); } array_push($result,$ccr1); } return $result; } else { echo error("No child-categories found!"); } } else { echo error("Unable to query database! {$this->hcMsg}"); } } //END FUNCTION: getChildCategories() ?>
-
Thank you very much for your help sir. Let's see if I can find any settings about Google proxy.
-
No. When I visit "whatsmyip.org" from my pc, it's showing the External IP which was assigned to/by my ISP. And when I'm doing the same from my mobile, it's showing a completely different IP which was assigned by Google I think. Here is what I see from my mobile:
-
My device doesn't allow to turn on WiFi, Hotspot & Mobile Data in Airplane Mode. And I always turn off Mobile Data when I turn on WiFi.
-
Ok thanks sir. And one more thing, I'm able to access the cPanel without any problems from my pc. The problem is occurring only if I try to access cPanel from my mobile. Both devices connected to the internet through same WiFi network, then why I'm able to access cPanel from PC but not from my mobile?
-
Sir, I've just visited the site you have mentioned, in there my IP is not changing but in whatsmyip.org my IP keeps changing. Well I'm using VPNEasy in android as you suggested to use a proxy.
-
How can I use a proxy? I've just checked my Internet configuration and found that I've a static IP assigned by my ISP. I think my router changing it's IP. My router assigns a IP, but when I'm visiting "whatsmyip.org" it's giving an IP completely different. And a hostname "google-proxy-64-233-173-146.google.com".
-
My ISP does not provides a static IP to individuals. I'm using VPNEasy in android with Google Chrome it's doesn't work. It always changing the last digit of IP.
-
Everytime I'm trying to login, I'm getting "Your IP address has changed". I'm connected via a Wi-Fi networkabd NY IP constantly changing. I think I can't get a static IP so I've used a VPN but it's also keeps changing it's last digit of IP. What can I do to prevent this?
-
Thanks sir, it's working now.
-
No sir, it's not working. I've already checked on my mobile and now I've just checked in my pc, both are not working.
-
I've not tried yet. Let me check.
-
I'm unable to access the cPanel of Tommy. I'm getting "Connection timeout" error everytime I'm trying to login.
-
I'm not sure, but you can use PayPal. Because I've done the same via PayPal. The domain was made by my friend and I've asked Krydos sir to change the email to my email and he did that.
-
Sir I've sent the details with PM
-
Sir, I've just made a transaction of 2$ and recieved the Tommy invitation. And I want to change the email as the donation was made from my friend.
-
Yeah, PayPal is allowing to link bank account. When read, I came to know that, it will be used for withdrawal only. I can't do any payments through it.
-
Not sure about Skrill but PayPal is not accepting my card.