Beispiel #1
0
 public Backup(WebDaD.Toolkit.Database.Database db, string dataFolder, string backupFolder, string appname)
 {
     this.db = db;
     this.dataFolder = dataFolder;
     this.backupFolder = backupFolder;
     this.appname = appname;
 }
Beispiel #2
0
 public License(WebDaD.Toolkit.Database.Database db, string tablename, string public_key, string private_key)
 {
     this.id = "";
     this.db = db;
     this.tablename = tablename;
     this.publickey_file = public_key;
     this.privatekey_file = private_key;
     enc = new RSAEncryption();
     enc.LoadPrivateFromXml(private_key);
     enc.LoadPublicFromXml(public_key);
 }
Beispiel #3
0
 public Template(WebDaD.Toolkit.Database.Database db, string basePath)
 {
     this.db = db;
     this.name = "";
     this.beforeContent = "";
     this.afterContent = "";
     this.textBefore = "|";
     this.header = " | | ";
     this.footer = " | | ";
     this.empty = true;
     this.basePath = basePath + Path.DirectorySeparatorChar + NiceID + Path.DirectorySeparatorChar;
 }
Beispiel #4
0
 public Update(string apppath,string appname, double version,WebDaD.Toolkit.Database.Database db, string updatePath = "http://toolkit.webdad.eu/")
 {
     this.apppath = apppath;
     this.appname = appname;
     this.webappname = appname.ToLower().Replace(" ", "_");
     this.version = version;
     this.updatePath = updatePath;
     this.db = db;
     this.checkPath = updatePath + "index.php?app="+webappname+"&cmd=update";
     this.recentVersion = getRecentVersion();
     if (this.recentVersion == 0.0) { this.serverReachable = false; }
     else this.serverReachable = true;
 }
Beispiel #5
0
 public Template(WebDaD.Toolkit.Database.Database db, string id, string basePath)
 {
     this.db = db;
     WebDaD.Toolkit.Database.Result d = this.db.getRow(Template.table, new string[] { "id", "name", "beforeContent", "afterContent", "textBefore", "header", "footer" }, "`id`='" + id + "'", "", 1);
     this.id = d.FirstRow["id"];
     this.name = d.FirstRow["name"];
     this.beforeContent = d.FirstRow["beforeContent"];
     this.afterContent = d.FirstRow["afterContent"];
     this.textBefore = d.FirstRow["textBefore"];
     this.header = d.FirstRow["header"];
     this.footer = d.FirstRow["footer"];
     this.empty = false;
     this.basePath = basePath + Path.DirectorySeparatorChar + NiceID + Path.DirectorySeparatorChar;
 }
Beispiel #6
0
        public static Dictionary<string, string> getTemplates(WebDaD.Toolkit.Database.Database db)
        {
            WebDaD.Toolkit.Database.Result d = db.getRow(Template.table, new string[] { "id", "name" }, "", "");

            Dictionary<string, string> r = new Dictionary<string, string>();

            r.Add("0", "Keines");

            foreach (WebDaD.Toolkit.Database.Row item in d.Rows)
            {
                r.Add(item.Cells["id"], item.Cells["name"]);
            }

            if (d.RowCount > 0) return r;
            else return null;
        }
Beispiel #7
0
 internal static IEnumerable<ComboBoxItem> GetApplications(WebDaD.Toolkit.Database.Database db)
 {
     throw new NotImplementedException();
 }