'; echo ''; echo ''; echo 'ChurchMapped: The social network that aspires to do better U+276'; echo ' '; echo ' '; echo ' '; echo ' '; echo ''; echo ''; echo ''; echo ''; echo ''; echo ' '; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ' '; echo ''; echo ' '; echo ''; #We use this section for the OpenSearchDescription. OpenSearcDescription allows browsers to search websites that have a search functionality. It is supported by a number of leading browsers such as Chrome, Safari, etc. Our OpenSearchDescription file is called churchmapped-opensearchdescription.xml. We place this at the root of the website. Note that when referring to it down below in the tag, be sure to include the absolute URL. echo ''; echo ''; echo '
'; echo ''; #Don't forget to add website to here. #We will add this once a page is created for this: '
Get the ChurchMapped Extension for your browser here.
'; # This section governs the loginArea. if(!isset($_SESSION['sessionCHURCHMAPPEDUSERID']) || $_SESSION['sessionCHURCHMAPPEDUSERID'] == NULL || $_SESSION['sessionTYPEOFUSER'] == NULL || !isset($_SESSION['sessionTYPEOFUSER']) || $_SESSION['sessionTYPEOFUSER'] == NULL){ #If the user is determined as not being logged in, we show this. Otherwise we communicate to the user their name, which we can obtain by first determine the kind of account it is. If it is a PERSONAL account, we make a select query against the ChurchMapped ID in the table users_on_churchmapped and then try to find the column titled first_name_of_user_on_churchmapped and surname_of_user_on_churchmapped (both separated by a space) and then display this. If it is a BUSINESS account, we make a select query against the ChuirchMapped ID in the table echo '
'; #We use the method POST for the log in area. echo '
'; echo ''; echo ''; echo ''; echo '
'; echo '
'; #This area governs the type of the account (be it PERSONAL or BUSINESS) for the user. It is given the name typeOfAccount. We need to only display this dynamically. echo '
'; echo ''; #This is for a user on a PERSONAL account. echo ''; #This is for a user on a BUSINESS account. echo 'Or register for a Personal or Business account here'; #We suggest to the user the possibility of registering for a personal account or business account here. On the local server, the address to go here is churchmapped-registration-personal.php and churchmapped-registration-business.php respectively. On the production server, the address to go here is https: // www. churchmapped.com /churchmapped-registration-personal.html and https : // churchmapped-registration-business.html respectively. echo '
'; echo '
'; #This ends the section for the loginArea. }elseif(isset($_SESSION['sessionCHURCHMAPPEDUSERID']) && $_SESSION['sessionTYPEOFUSER'] == "PERSONAL"){ #If the user is determined as having a PERSONAL account, we use this area to look up the user in the table users_on_churchmapped and select the columns first_name_of_user_on_churchmapped and surname_of_user_on_churchmapped with a space and display their name. $queryToSelectPersonalUserData = 'SELECT personal_user_details_on_churchmapped_id, salutation_of_user_on_churchmapped, first_name_of_user_on_churchmapped, surname_of_user_on_churchmapped FROM churchma_USERS_ON_CHURCHMAPPED.user_details_on_churchmapped WHERE personal_user_details_on_churchmapped_id=' . (int)$_SESSION['sessionCHURCHMAPPEDUSERID']; # We have to transform the ChurchMapped ID session variable into an integer for cybersecurity reasons (i.e. to prevent SQL injection attacks through session hijacking). $resultOfQueryToSelectPersonalUserData = mysqli_query($conn, $queryToSelectPersonalUserData); while($row = mysqli_fetch_array($resultOfQueryToSelectPersonalUserData, MYSQLI_ASSOC)){ #In this while(){} loop, we finally obtain the name. echo '
Hello,' . ' ' . $row['first_name_of_user_on_churchmapped'] . ' ' . $row['surname_of_user_on_churchmapped'] .'
' . ' ' . '
'; #Be sure to add CSS styling. Also be sure to add a link so the user can be taken to their profile page. Also add a log out button. When the user clicks this part, it should open up a modal box that displays the following: # Your profile # Your returns and orders # Help # Settings # Log out } #We use this area to create a modal box for the PERSONAL user when their name is clicked. echo '
'; #This is for the background surrounding the modal box. echo '
'; #This is for the content within the modal box for the PERSONAL user itself. echo '×'; #This is the close button. #When the user opens the modal box, we want it to show the following information: Your profile (this should direct them to their profile where they can post things), Your returns and orders, Help, Settings and Log out echo '
Your profile
'; #This links to the profile area of the user. The profile area shows information of churches. echo '
Your returns and orders
'; #This links to the returns and orders page. On the local server, the URL for this is \ChurchMappedWebsite\checkout\returnsandorders.php. On the production server, this is located at https: // www.churchmapped.com / checkout/returnsandorders.html echo '
Help
'; #This links to the Help page. On the local server, the link to this is \ChurchMappedWebsite\en\help\personal\help-personal.php. On the production server, the link to this is https : // www.churchmapped.com/en/help/personal/help-personal.html. Note that for the Business area, this link is different. echo '
Settings
'; #This links to the Settings page. On the local server, the link to this is settings.php. On the production server, the link to this is https : // www.churchmapped.com/settings.html echo '
Log out
'; #This logs the user out of the page. On the local server, this is index.php?logout=yes. On the production server, this is https: // www.churchmapped.com/index.html?logout=yes. The parameter logout=yes allows the user to log out. echo '
'; echo '
'; }elseif(isset($_SESSION['sessionCHURCHMAPPEDUSERID']) && $_SESSION['sessionTYPEOFUSER'] == "BUSINESS"){ #If the user is determined as having a BUSINESS account, we use this area to look up the user in the table business_user_details_on_churchmapped. $queryToSelectBusinessUserData = 'SELECT business_churchmapped_user_id, business_official_name, business_trading_name, business_handle_on_churchmapped FROM churchma_USERS_ON_CHURCHMAPPED.business_user_details_on_churchmapped WHERE business_churchmapped_user_id=' . (int)$_SESSION['sessionCHURCHMAPPEDUSERID']; #We have to transform the ChurchMapped ID session variable into an integer for cybersecurity reasons (i.e. to prevent SQL injection attacks through session hijacking). $resultOfQueryToSelectBusinessUserData = mysqli_query($conn, $queryToSelectBusinessUserData); while($row = mysqli_fetch_array($resultOfQueryToSelectBusinessUserData, MYSQLI_ASSOC)){ #In this while(){} loop, we finally obtain the business name. echo '
Hello,' . ' ' . $row['business_official_name'] . '
' . ' ' . '
'; #Be sure to add CSS styling. Also be sure to add a link so the user can be taken to their profile page. Also add a log out button. When the user clicks this part, it should open up a modal box that displays the following: # Your profile # Your returns and orders # ChurchMapped Merchant Panel # Help # Settings # Log out } # We use this area to create a modal box for the BUSINESS user when their name is clicked. Unlike the PERSONAL user, this has the additional link of the ChurchMapped Admin Panel area. echo '
'; #This is for the background surrounding the modal box. echo '
'; #This is for the content within the modal box for the BUSINESS user itself. echo '×'; #This is the close button. #When the user opens the modal box, we want it to show the following information: Your profile (this should direct them to their profile where they can post things), Your returns and orders, ChurchMapped Merchant Panel, Help, Settings and Log out. The business area is distinct from the PERSONAL area due to the inclusion of the ChurchMapped Panel area. echo '
Your profile
'; #This links to the profile area of the user. The profile area shows information of churches. echo '
Your returns and orders
'; #This links to the returns and orders page. On the local server, the URL for this is \ChurchMappedWebsite\checkout\returnsandorders.php. On the production server, this is located at https: // www.churchmapped.com / checkout/returnsandorders.html echo '
ChurchMapped Merchant Panel
'; echo '
Help
'; #This links to the Help page. On the local server, the link to this is \ChurchMappedWebsite\en\help\personal\help-personal.php. On the production server, the link to this is https : // www.churchmapped.com/en/help/business/help-business.html. Note that for the Business area, this link is different. echo '
Settings
'; #This links to the Settings page. On the local server, the link to this is settings.php. On the production server, the link to this is https : // www.churchmapped.com/settings.html echo '
Log out
'; #This logs the user out of the page. On the local server, this is index.php?logout=yes. On the production server, this is https: // www.churchmapped.com/index.html?logout=yes. The parameter logout=yes allows the user to log out. echo '
'; echo '
'; } #Use this to display data echo '
Be the first to know about what is going on at a church near you. Begin by typing below:'; echo '
do this} .The stored procedures in the database correspond to the country in question if we have completed churches for them. For example, for the Republic of Ireland, the stored procedure is SELECTRANDOMCATHEDRALINREPUBLICOFIRELAND(). $resultOfQueryToGetPlaceHolderText = mysqli_query($conn, $queryToGetPlaceHolderText); while($row = mysqli_fetch_array($resultOfQueryToGetPlaceHolderText, MYSQLI_ASSOC)) { echo 'placeholder="For example, you can ask about the' . str_replace(array("Roman Catholic", "Roman Metropolitan", "Ukrainian"), "", $row['list_of_churches_name_english']) . '""' ;} echo '>
'; mysqli_next_result($conn); #It is important to call this to ensure consistent behaviour with regards to stored procedures. echo ''; echo ''; echo '
Visit the ChurchMapped Marketplace to both buy and sell amazing products and services
'; #We show the user to the ChurchMapped Marketplace echo '

'; echo '


ChurchMapped® Is Also Available Over At:
Eucharist SymbolTwitter '; echo 'Twitter logoEucharist Symbol YouTube '; echo 'YouTube logo'; echo ' Eucharist Symbol Facebook Facebook logo'; echo '

Get information about your church or a church that intrigues you, wherever you go, on our app! Coming Soon!

Google Play'; echo 'Apple Store'; echo ' Amazon AppStore'; echo '

'; #We place all JavaScript at the end because of a behaviour in JavaScript known as browser-blocking. echo ' '; echo ''; #This script attempts to get the latitude and longitude of the user which can be used to provide more personalised information. # index.php, together with a small number of other exceptions, do not include the script jscontrollerforchurchmappedadverts.js because it is inappropriate to show this on the home page. However, it is shown on other pages. echo ''; ?>