Jump to content

IamMarvin1a

Members
  • Content count

    5
  • Joined

  • Last visited

Community Reputation

0 Neutral

About IamMarvin1a

  • Rank
    Newbie
  • Birthday 05/25/1985

Contact Methods

  • Website URL
    https://www.linkedin.com/in/mark-alvin-camarillo261a
  • Skype
    programmermarvin26

Profile Information

  • Gender
    Male
  • Location
    B8 L9 Bernabe Compd., Pulanglupa I, Las Pinas City
  • Interests
    Web Development, Software Development, Many Sports

Previous Fields

  • Languages
    English, FIlipino
  1. Open Source Code for Hotel Reservation Calendar

    Hi Dodra. I visited the link you gave. The website has an application for calendar reservation system. I already seen many of this kind in Wordpress Plugin website available for free version. However what I need is a simple calendar with Start Date and End Date selection just like this url: http://iammarvin261.x10host.com/wphottel1a/single-bed-2/
  2. Hello. Right now I am looking for an open source code for hotel online reservation calendar with check-in(start date) - check-out(end date) selection. It may be a PHP code, JavaScript, JQuery or any relate javascript library which do not need to use javascript server like node.js Please visit the url for a example calendar selection: http://iammarvin261.x10host.com/wphottel1a/single-bed-2/ I will use the source code to change/remodel my current check-in/checkout reservation form. Can you help me easily find the source code on your CP Reservation Calendar on your php plugin files.
  3. Help me with Using JQuery AJAX code

    Thanks justsomeguy A good information about using PHP SUPERGLOBALS $_SERVER[‘HTTP_REFERER’]; and PHP Session code $_SESSION[“session_name”]; I will now use PHP Session code $_SESSION[“session_name”];
  4. Help me with Using JQuery AJAX code

    Hi to all. Sorry for late reply. It took me 4 days to choose how block unauthorized access to my WordPress php plugin file using JQUERY AJAX. I tried to to use wordpress is_user_logged_in() function but you can only use this function if the php file is included on WordPress plugin main php file. I decided to choose PHP SUPERGLOBALS $_SERVER[‘HTTP_REFERER’]; over PHP Session code $_SESSION[“session_name”]; I will add sample code: /** javascript JQuery AJAX code of my php file which can copy/get through a browser by any user */ $(document).ready(function(){ $.post("/wp-content/plugins/SLMS/UserRecord.php", { saveUserBtn: "Save", FName: fname, LName: lname, UNumber: unumber, address: address, contact: contact, email: email }, function(data, status){ document.getElementById('userr-page-notice').innerHTML = data; if(data.includes("New record saved.")) { document.getElementById("userRecord").reset(); } }); }); /** Here is the code to my other php file that contains database access and saving data to database */ <?php if($_SERVER['HTTP_REFERER'] == "https://iammarviin26.000webhostapp.com/user-record/") { if(isset($_POST['saveUserBtn']) and $_SERVER['REQUEST_METHOD'] == "POST") { insertRecord(); /** insertRecord(); echo "working" ; */ } elseif(isset($_POST['searchUNBtn']) and $_SERVER['REQUEST_METHOD'] == "POST") { searchUNRecord(); /** searchUNRecord(); echo $_POST['searchUN']; echo "Success";*/ } elseif(isset($_POST['updateUserBtn']) and $_SERVER['REQUEST_METHOD'] == "POST") { updateRecord(); /** updateRecord(); echo $_POST['ID']; echo "Update Status";*/ } } /** Other php code/script that contains database credentials/sql script */ /** While using PHP SUPERGLOBALS $_SERVER['HTTP_REFERER']; any users cannot access my php file without the correct http referrer and actively login to my web application. */ ?> In case you cannot use wordpress is_user_logged_in() you can use SUPERGLOBALS $_SERVER[‘HTTP_REFERER’]; or PHP Session code $_SESSION[“session_name”]; Any suggestion or comment Thanks
  5. Help me with Using JQuery AJAX code

    Hello. I made a WordPress plugin with a JQuery-AJAX/JSON code in a php file like this: $(document).ready(function(){ $.post(“/wp-content/plugins/SLMS/UserRecord.php”, { saveUserBtn: “Save”, FName: fname, LName: lname, UNumber: unumber, address: address, contact: contact, email: email }, function(data, status){ document.getElementById(‘userr-page-notice’).innerHTML = data; if(data.includes(“New record saved.”)) { document.getElementById(“userRecord”).reset(); } }); }); /** end of code */ I also notice that any user can view my javascript code with their own browser. I also noticed that any user/unauthorized user can copy these JQuery-AJAX/JSON code and pass/save/modify data to MySQL database using the link to my php file. I will also write the code for my php file: if(isset($_POST[‘saveUserBtn’]) and $_SERVER[‘REQUEST_METHOD’] == “POST”) { insertRecord(); } elseif(isset($_POST[‘searchUNBtn’]) and $_SERVER[‘REQUEST_METHOD’] == “POST”) { searchUNRecord(); } elseif(isset($_POST[‘updateUserBtn’]) and $_SERVER[‘REQUEST_METHOD’] == “POST”) { updateRecord(); } /** codes to access MYSQL Database */ /** end of code */ I notice that many developers also used these kind of JQuery-AJAX/JSON codes. I want to know what is the code to block unauthorized users to access/pass data to my php file when unauthorized users use JQuery/JSON code. I will also mention “web host cpanel File Permission” to see if this web server configuration can help.
×