Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var APPLICATION_ID = 'APPLICATION_ID',
- SECRET_KEY = 'SECRET_KEY',
- VERSION = 'v1'; //default application version;
- Backendless.initApp(APPLICATION_ID, SECRET_KEY, VERSION);
- var user = new Backendless.User();
- user.email="barken1@gmail.com";
- user.password="123456";
- Backendless.UserService.login(user.email,user.password,true);
- function Contact(args){
- args = args || {};
- this.aUserName=args.userName || "";
- this.bPhone=args.Phone || "";
- this.cOther_Phone=args.Other_Phone || "";
- this.dArea=args.Area || "";
- this.eJob=args.Job || "";
- this.fPlatform=args.Platform || "";
- this.gMessage=args.Message || "";
- }
- function saveNewContact(userName,Phone,Other_Phone,Area,Job,Platform,Message){
- console.log("preparing data");
- var contactObject = new Contact();
- contactObject.aUserName=userName;
- contactObject.bPhone=Phone;
- contactObject.cOther_Phone=Other_Phone;
- contactObject.dArea=Area;
- contactObject.eJob=Job;
- contactObject.fPlatform=Platform;
- contactObject.gMessage=Message;
- var savedContact = Backendless.Persistence.of(Contact).save(contactObject);
- console.log("New contact was saved !!!");}
- //------------------------------------------------------//
- function General(args){
- args = args || {};
- this.name=args.name || "";
- this.phone=args.phone || "";
- this.cell=args.cell || "";
- this.year=args.year || "";
- this.city=args.city || "";
- this.armyD=args.armyD || "";
- this.Email=args.Email || "";
- }
- var GeneralItem = new General({
- name:"שם",
- phone:"טלפון",
- cell:"פלאפון",
- year:"שנת לידה",
- city:"עיר מגורים",
- armyD:"דרגה צבאית",
- Email:"מייל"
- });
- //------------------------------------------------------//
- function Extract(args){
- args = args || {};
- this.description=args.description || "";
- }
- var ExtractItem = new Extract({
- description:"פירוט"
- });
- //------------------------------------------------------//
- function Army(args){
- args = args || {};
- this.ribbon=args.ribbon || "";
- this.armyD=args.armyD || "";
- this.description=args.description || "";
- }
- var ArmyItem = new Army({
- ribbon:"שנה",
- armyD:"דרגה",
- description:"פירוט"
- });
- //------------------------------------------------------//
- function Education(args){
- args = args || {};
- this.ribbon=args.ribbon || "";
- this.yearS=args.yearS || "";
- this.yearE=args.yearE || "";
- this.institue=args.institue || "";
- this.program=args.program || "";
- this.description=args.description || "";
- }
- var EducationItem = new Education({
- ribbon:"סוג",
- yearS:"שנת התחלה",
- yearE:"שנת סיום",
- institue:"שם מוסד",
- program:"לימודים",
- description:"פירוט"
- });
- //------------------------------------------------------//
- function Languages(args){
- args = args || {};
- this.ribbon=args.ribbon || "";
- this.Language=args.Language || "";
- this.description=args.description || "";
- }
- var LanguagesItem = new Languages({
- ribbon:"דיבור/תכנות",
- Language:"שפה",
- description:"פירוט"
- });
- //------------------------------------------------------//
- function Difference(args){
- args = args || {};
- this.description=args.description || "";
- }
- var DifferenceItem = new Difference({
- description:"פירוט"
- });
- //------------------------------------------------------//
- //var savedContact = Backendless.Persistence.of(General).save(GeneralItem);
- //var savedContact = Backendless.Persistence.of(Extract).save(ExtractItem);
- //var savedContact = Backendless.Persistence.of(Army).save(ArmyItem);
- //var savedContact = Backendless.Persistence.of(Education).save(EducationItem);
- //var savedContact = Backendless.Persistence.of(Languages).save(LanguagesItem);
- //var savedContact = Backendless.Persistence.of(Difference).save(DifferenceItem);
- //-------------------תצוגה----------------------------//
- function showGeneral(){
- var res="";
- for (var counter=0;counter<GeneralItem.length;counter+=1){
- res+="<dd>"+GeneralItem.name+"</dd>";
- res+="<dd>"+GeneralItem.phone+"</dd>";
- res+="<dd>"+GeneralItem.cell+"</dd>";
- res+="<dd>"+GeneralItem.year+"</dd>";
- res+="<dd>"+GeneralItem.city+"</dd>";
- res+="<dd>"+GeneralItem.armyD+"</dd>";
- res+="<dd>"+GeneralItem.Email+"</dd>";
- }
- res_General.innerHTML=res;
- }
- function showExtract(){
- var res="";
- for (var counter=0;counter<ExtractItem.length;counter+=1){
- res+="<dd>"+ExtractItem.description+"</dd>";
- }
- }
- function showArmy(){
- var res="";
- for (var counter=0;counter<ArmyItem.length;counter+=1){
- res+="<ribbon>"+ArmyItem.ribbon+"</ribbon>";
- res+="<u>"+ArmyItem.armyD+"</u>";
- res+="<dd>"+ArmyItem.description+"</dd>";
- }
- }
- function showEducation(){
- var res="";
- for (var counter=0;counter<EducationItem.length;counter+=1){
- res+="<ribbon>"+EducationItem.ribbon+"</ribbon>";
- res+="<u>"+EducationItem.yearS+"-";
- res+=EducationItem.yearE+"</u>";
- res+="<dd>"+EducationItem.institue+"</dd>";
- res+="<dd>"+EducationItem.program+"</dd>";
- res+="<dd>"+EducationItem.description+"</dd>";
- }
- }
- function showLanguages(){
- var res="";
- for (var counter=0;counter<LanguagesItem.length;counter+=1){
- res+="<ribbon>"+LanguagesItem.ribbon+"</ribbon>";
- res+="<u>"+LanguagesItem.Language+"</u>";
- res+="<dd>"+LanguagesItem.description+"</dd>";
- }
- }
- function showDifference(){
- var res="";
- for (var counter=0;counter<DifferenceItem.length;counter+=1){
- res+="<dd>"+DifferenceItem.description+"</dd>";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement