示例#1
0
        public static ArrayList GetWebBookMarks(string serverPath,string clientID, MySqlWrapper dbConn)
        {
            ArrayList webBookmarks = new ArrayList();
            try
            {
                string sql = "select bookmark_title,bookmark_url from ctool_bookmark where bookmark_ownerid = " + clientID;
                ArrayList recordset = dbConn.Execute(sql);
                foreach(ArrayList record in recordset)
                {
                    WebBookMark entry = new WebBookMark((string)record[0],(string)record[1]);
                    webBookmarks.Add(entry);
                }

                sql = "select bookmark_title,bookmark_url from ctool_bookmark,ctool_bmtouser where bookmark_id = bmtouser_bookmark_id AND bmtouser_mid = " + clientID;
                recordset = dbConn.Execute(sql);
                foreach(ArrayList record in recordset)
                {
                    WebBookMark entry = new WebBookMark((string)record[0],(string)record[1]);
                    webBookmarks.Add(entry);
                }

            }
            catch(Exception ee)
            {
            //	MessageBox.Show(ee.Message);
            }
            return webBookmarks;
        }
示例#2
0
 public WebEvaluations(MySqlWrapper dbConn)
 {
     dbCon = dbConn;
 }
示例#3
0
        public static ArrayList GetWebPresentations(string serverPath,string clientID, MySqlWrapper dbConn)
        {
            ArrayList WebPresentations = new ArrayList();
            try
            {
                string sql = "select presentation_title,Concat(presentation_id,presentation_url) from ctool_presentation where presentation_ownerid = " + clientID;
                ArrayList recordset = dbConn.Execute(sql);
                foreach(ArrayList record in recordset)
                {
                    WebPresentationEntry entry = new WebPresentationEntry((string)record[0],serverPath + record[1]);
                    WebPresentations.Add(entry);
                }

                sql = "select presentation_title,Concat(presentation_id,presentation_url),pretouser_presentation_id from ctool_presentation,ctool_pretouser WHERE presentation_id = pretouser_presentation_id  AND pretouser_mid = " + clientID;

                recordset = dbConn.Execute(sql);
                foreach(ArrayList record in recordset)
                {
                    WebPresentationEntry entry = new WebPresentationEntry((string)record[0],serverPath + record[1]);
                    WebPresentations.Add(entry);
                }

            }
            catch(Exception ee)
            {
            //		MessageBox.Show(ee.Message);
            }
            return WebPresentations;
        }
示例#4
0
 public WebPolls(MySqlWrapper dbConn)
 {
     dbCon = dbConn;
 }
示例#5
0
        public static ArrayList GetWebFiles(string serverPath,string clientId,MySqlWrapper dbConn)
        {
            ArrayList WebFiles = new ArrayList();
            try
            {
                string sql = "select Concat(uploads_id,uploads_url) as FilePath,uploads_title from ctool_uploads where uploads_ownerid= " + clientId;
                ArrayList recordset = dbConn.Execute(sql);
                foreach(ArrayList record in recordset)
                {
                    WebUploadedFiles file = new WebUploadedFiles((string)record[1],serverPath + record[0]);
                    WebFiles.Add(file);
                }

                sql = "select Concat(uploads_id,uploads_url) as FilePath,uploads_title from ctool_uploads,ctool_uploadstouser where uploads_id = uploadstouser_uploads_id AND uploadstouser_mid = " + clientId;
                recordset = dbConn.Execute(sql);
                foreach(ArrayList record in recordset)
                {
                    WebUploadedFiles file = new WebUploadedFiles((string)record[1],serverPath + record[0]);
                    WebFiles.Add(file);
                }

            }
            catch(Exception ee)
            {
            //				MessageBox.Show("We Integration " + ee.Message);
            }
            return WebFiles;
        }
示例#6
0
        /// <summary>
        /// this Constructor do the following things
        /// 1-Set Configurations
        /// 2-Connect to db
        /// 3-Start Logging Thread
        /// 4-Start thFlushMemory Thread
        /// </summary>
        public ConferenceServer()
        {
            /*
             * loading configuration files
             * */
            getConfig();
            dbCon=new MySqlWrapper();
            dbCon.Connect(databaseServer,databaseUsername,databasePassword);
            dbCon.SelectDB("ctool");
            staticServerInstance = this;
            #if TESTING
            Console.Write(databaseServer + " " + databaseUsername + " "+ databasePassword);
            #endif

            //			insertFlowThread = new Thread(new ThreadStart(insertFlowMessages));
            //			insertFlowThread.Name = "insertFlowThread Thread : ConferenceServer()";
            //			insertFlowThread.Start();
            //
            // thread free all extra resorces after specific time   Kamran
            Thread thFlushMemory = new Thread(new ThreadStart(overallFlushMemory)); //per2
            thFlushMemory.Name = "overallFlushMemory Thread : ConferenceServer";//per2
            thFlushMemory.Start();//per2
        }