Ejemplo n.º 1
0
        public ActionResult Words(Input data)
        {
            Words wrd = new Words();

            wrd.word = Lines.Replace((data.text.Trim()));
            Scansion scn = new Scansion();

            return(PartialView("_WordsLookup", scn.wordCode(wrd)));
        }
Ejemplo n.º 2
0
        public ActionResult Words(Input data)
        {
            string          urlReferrer = "#@$@#%@$^$@#!@@#!";
            MySqlConnection myConn      = new MySqlConnection(TaqtiController.connectionString);
            MySqlCommand    cmd         = new MySqlCommand(TaqtiController.connectionString);

            cmd             = myConn.CreateCommand();
            cmd.CommandText = "select max(id) as id from iplog;";
            myConn.Open();
            MySqlDataReader dataReader = cmd.ExecuteReader();
            int             id3        = 0;

            while (dataReader.Read())
            {
                id3 = dataReader.GetInt32(0);
            }
            myConn.Close();

            try
            {
                urlReferrer = Request.UrlReferrer.ToString();
            }
            catch
            {
            }

            MySqlConnection myConn2 = new MySqlConnection(TaqtiController.connectionString);
            MySqlCommand    cmd2    = new MySqlCommand(TaqtiController.connectionString);

            myConn2.Open();

            cmd2             = myConn2.CreateCommand();
            cmd2.CommandText = "INSERT into iplog(ID,ip,date,data,referrer) VALUES (@id,@ip,@date,@data,@referrer)";
            cmd2.Parameters.AddWithValue("@id", id3 + 1);
            cmd2.Parameters.AddWithValue("@ip", (string)Request.UserHostAddress);
            cmd2.Parameters.AddWithValue("@date", DateTime.Now);
            cmd2.Parameters.AddWithValue("@data", data.text);
            cmd2.Parameters.AddWithValue("@referrer", urlReferrer);
            cmd2.ExecuteNonQuery();
            myConn2.Close();

            if (isValid())
            {
                Words wrd = new Words();
                wrd.word = Lines.Replace((data.text.Trim()));
                Scansion scn  = new Scansion();
                Words    word = new Words();
                word = scn.wordCode(wrd);
                List <string> str = new List <string>();
                for (int i = 0; i < word.code.Count; i++)
                {
                    str.Add(Meters.Rukn(word.code[i]));
                }
                word.taqti = str;
                return(PartialView("_PartialWords", word));
            }
            else
            {
                return(View());
            }
        }
Ejemplo n.º 3
0
        public ActionResult Words(Input data)
        {
            string urlReferrer = "#@$@#%@$^$@#!@@#!";
            MySqlConnection myConn = new MySqlConnection(TaqtiController.connectionString);
            MySqlCommand cmd = new MySqlCommand(TaqtiController.connectionString);
            cmd = myConn.CreateCommand();
            cmd.CommandText = "select max(id) as id from iplog;";
            myConn.Open();
            MySqlDataReader dataReader = cmd.ExecuteReader();
            int id3 = 0;
            while (dataReader.Read())
            {
                id3 = dataReader.GetInt32(0);

            }
            myConn.Close();

            try
            {
                urlReferrer = Request.UrlReferrer.ToString();
            }
            catch
            {

            }

            MySqlConnection myConn2 = new MySqlConnection(TaqtiController.connectionString);
            MySqlCommand cmd2 = new MySqlCommand(TaqtiController.connectionString);
            myConn2.Open();

            cmd2 = myConn2.CreateCommand();
            cmd2.CommandText = "INSERT into iplog(ID,ip,date,data,referrer) VALUES (@id,@ip,@date,@data,@referrer)";
            cmd2.Parameters.AddWithValue("@id", id3 + 1);
            cmd2.Parameters.AddWithValue("@ip", (string)Request.UserHostAddress);
            cmd2.Parameters.AddWithValue("@date", DateTime.Now);
            cmd2.Parameters.AddWithValue("@data", data.text);
            cmd2.Parameters.AddWithValue("@referrer", urlReferrer);
            cmd2.ExecuteNonQuery();
            myConn2.Close();

            if (isValid())
            {

                Words wrd = new Words();
                wrd.word = Lines.Replace((data.text.Trim()));
                Scansion scn = new Scansion();
                Words word = new Words();
                word = scn.wordCode(wrd);
                List<string> str = new List<string>();
                for (int i = 0; i < word.code.Count; i++)
                {
                    str.Add(Meters.Rukn(word.code[i]));
                }
                word.taqti = str;
                return PartialView("_PartialWords", word);
            }
            else
            {
                return View();
            }
        }
Ejemplo n.º 4
0
        public ActionResult Words(Input data)
        {

            Words wrd = new Words();
            wrd.word = Lines.Replace((data.text.Trim()));
            Scansion scn = new Scansion();
            return PartialView("_WordsLookup", scn.wordCode(wrd));
        }