forked from ittyjose/a3k-Registration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy of online reg
1 lines (1 loc) · 2.94 KB
/
Copy of online reg
1
{"files":[{"id":"b54c1fca-0e81-4a7d-910c-b12455a43aeb","name":"Code","type":"server_js","source":"function doPost (e) {\nvar params \u003d JSON.stringify(e);\n var myObj \u003d JSON.parse(params);\n var ss \u003d SpreadsheetApp.openByUrl(\n \u0027Link to Online Registration Excel Sheet\u0027);\n var gen\u003dss.getSheets()[0];\n gen.appendRow([myObj.parameter.name,myObj.parameter.college,myObj.parameter.email,myObj.parameter.mobile]);\n for (var y \u003d 0; y \u003c myObj.parameter.no; y++) {\n var sheet \u003d ss.getSheetByName(myObj.parameters.eventid[y]);\n\n sheet.appendRow([myObj.parameter.name,myObj.parameter.college,myObj.parameter.email,myObj.parameter.mobile]);\n }\n var sheets \u003d ss.getSheets()[34];\n var startRow \u003d 1; \n var numRows \u003d 35; \n var dataRange \u003d sheets.getRange(startRow, 1, numRows, 2)\n var data \u003d dataRange.getValues();\n var emailAddress\u003dmyObj.parameter.email;\n var message\u003d\"Dear \"+myObj.parameter.name+\", \\n\\n\";\n for (var j \u003d 0; j \u003c myObj.parameter.no; j++){\n for (var k \u003d 0; k \u003c 35; k++){\n if(data[k][0]\u003d\u003dmyObj.parameters.eventid[j])\n {\n message+\u003d data[k][1]+\"\\n\\n\\n\";\n }\n }\n}\n message+\u003d\"\\n \\t \\t Thanks \u0026 Regards, \\n \\t \\t A3K TEAM :)\" ;\n var subject \u003d \"Welcome to A3k Your instructions As Follows\";\n MailApp.sendEmail(emailAddress, subject, message);\n var cal\u003dCalendarApp.getEventSeriesById(\"Google Calender id\");\n cal.addGuest(myObj.parameter.email);\n var t \u003d HtmlService.createTemplateFromFile(\u0027final\u0027);\n t.data\u003dJSON.stringify(myObj.parameters);\n return t.evaluate();\n}"},{"id":"1786644e-5bb8-4968-b67e-8b32260bb3bb","name":"final","type":"html","source":"\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n\u003cbase target\u003d\"_top\"\u003e\n\u003cstyle\u003e\n* {\n font-family: \u0027Open Sans\u0027, sans-serif;\n background-color: black;\n color: white;\n}\nbody {\n margin: 0;\n height: 100vh;\n}\n.container {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n}\n.copyright {\n align-item: flex-end;\n}\n\n\u003c/style\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\u003cdiv class\u003d\"container\"\u003e\n\u003ch1 class\u003d\"title\"\u003eThank You for Registering with us.\u003c/h1\u003e\n\u003cimg src\u003d\"https://chart.googleapis.com/chart?cht\u003dqr\u0026chs\u003d300x300\u0026chl\u003d\u003c?\u003d data ?\u003e\" alt\u003d\"QR code Failed\"\u003e\n \u003cp\u003eShow this QR code at the Registration desk for Hassle Free Registration.\u003c/p\u003e\n \u003cp\u003eRajagiri School of Engineering and Technology\u003c/p\u003e\n \u003cp\u003eMarch 17,18\u003c/p\u003e\n \u003ch1\u003eBE THERE.\u003c/h1\u003e\n \u003cspan class\u003d\"copyright\"\u003e© Abhiyanthriki 2017\u003c/span\u003e\n \u003c/div\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n\n\n\n"}]}