B6
html-------------------------------
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Pocetna.aspx.cs" Inherits="WebApplication1.Pocetna" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="izgled.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
        <h1>Uspeh ucenika</h1>
        <div class="nav">
            <ul>
                <a href="Pocetna.aspx"><li>Pocetna</li></a>
                <a href="Grafika.aspx"><li>Grafika</li></a>
                <a href="Autor.aspx"><li>Autor</li></a>
            </ul>
            </div>
        <asp:GridView ID="GridView1" runat="server">
        </asp:GridView>
    </form>
</body>
</html>
---------------------------css
body {
    background-color: white;
}

* {
    margin: 0;
    padding: 0;
}

h1 {
    background-color: cornflowerblue;
    color: white;
    padding-left: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.nav {
    text-decoration: none;
    list-style-type: none;
    width: 100%;
    height: 40px;
    background-color: dimgray;
}

ul {
    text-decoration: none;
    list-style-type: none;
}

li {
    text-decoration: none;
    list-style-type: none;
    color: white;
    float: left;
    padding: 10px 30px 10px 30px;
}

    li:hover {
        background-color: lightgray;
        color: white;
    }

.futer {
    position: fixed;
    width: 100%;
    height: 40px;
    text-align: center;
    background-color: gray;
    color: darkgray;
    bottom: 0px;
    left: 0px;
}

-------------------------------------c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
namespace WebApplication1
{
    public partial class Pocetna : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            SqlConnection con = new SqlConnection(@"Data Source=DESKTOP-8O361E7;Initial Catalog=Skola;Integrated Security=True");
            con.Open();
            SqlCommand komanda = new SqlCommand("select * from Uspeh order by ProsOcena", con);
            SqlDataAdapter adapter = new SqlDataAdapter(komanda);
            DataTable dt = new DataTable();
            adapter.Fill(dt);
            GridView1.DataSource = dt;
            GridView1.DataBind();
            con.Close();
        }
    }
}
------------------------------drugaC#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
namespace WebApplication1
{
    public partial class Grafika : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            SqlConnection con = new SqlConnection(@"Data Source=DESKTOP-8O361E7;Initial Catalog=Skola;Integrated Security=True");
            con.Open();
            SqlCommand komanda = new SqlCommand("select Razred,ProsOcena from Uspeh", con);
            SqlDataAdapter adapter = new SqlDataAdapter(komanda);
            DataTable dt = new DataTable();
            adapter.Fill(dt);
            Chart1.DataSource = dt;
            Chart1.Series[0].XValueMember = "Razred";
            Chart1.Series[0].YValueMembers = "ProsOcena";
            Chart1.DataBind();
            con.Close();
        }
    }
}

B6

B7
-------------------------SAMO C$
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Xml;
namespace WebApplication1
{
    public partial class Pregled : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            DataSet ds = new DataSet();
            ds.ReadXml(@"C:\Users\Nidzo\Desktop\MATURA SANJA GLAVNO\MOJE WEB\B7-Biblioteka NEMAM\WebApplication1\WebApplication1\biblioteka.xml");
            DataView dv = new DataView(ds.Tables[0]);
            dv.Sort = "citano DESC";
            GridView1.DataSource = dv;
            GridView1.DataBind();
        }
    }
}

B7

B8
------------------html
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Pocetna.aspx.cs" Inherits="WebApplication1.Pocetna" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="izgled.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server"> 
        <h1>Knjiga utisaka</h1>
        <div class="nav">
                <ul>
                    <a href="Pocetna.aspx"><li>Pocetna</li></a>
                    <a href="Autor.aspx"><li>O Autoru</li></a>
                    <a href="Uputstvo.aspx"><li>Uputstvo</li></a>
                </ul>
        </div>

        <p>
            <br />
&nbsp;&nbsp;&nbsp; Ime:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        </p>
        <p>
            &nbsp;</p>
        <p>
&nbsp;&nbsp;&nbsp; Email:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
&nbsp;
        </p>
        <p>
            &nbsp;</p>
        <p>
&nbsp;&nbsp;&nbsp;&nbsp; Komentar:
            <asp:TextBox ID="TextBox3" runat="server" Height="159px" Width="190px"></asp:TextBox>
        </p>
        <p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        </p>

    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Dodaj komentar" />

    </form>
</body>
</html>
-------------------------------css
body {
    background-color:white;
}
*{
    margin:0;
    padding:0;
}
h1{
    background-color:cornflowerblue;
    color:white;
    padding-left:10px;
    padding-top:10px;
    padding-bottom:10px;
}
.nav{
    text-decoration:none;
    list-style-type:none;
    width:100%;
    height:40px;
    background-color:dimgray;
}
ul {
    text-decoration: none;
    list-style-type: none;
}
li {
    text-decoration: none;
    list-style-type: none;
    color: white;
    float: left;
    padding: 10px 30px 10px 30px;
}
li:hover{
    background-color:lightgray;
    color:white;
}
---------------------------------------cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
namespace WebApplication1
{
    public partial class Pocetna : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            SqlConnection con = new SqlConnection(@"Data Source=DESKTOP-8O361E7;Initial Catalog=B8;Integrated Security=True");
            con.Open();
            SqlCommand naredba = new SqlCommand("insert into utisak values(@p1,@p2,@p3,GETDATE())", con);
            naredba.Parameters.AddWithValue("@p1", TextBox1.Text);
            naredba.Parameters.AddWithValue("@p2", TextBox2.Text);
            naredba.Parameters.AddWithValue("@p3", TextBox3.Text);
            naredba.ExecuteNonQuery();
            con.Close();
        }
    }
}

B8

B9
html-----------------------------------------------
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication3.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="StyleSheet1.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
        <div class="content">
    <div class="title">
        CD Katalog
    </div>
    <ul class="menu">
        <a href="WebForm1.aspx"><li style="margin-left:-20px">Katalog </li></a>
        <a href="WebForm2.aspx"><li>Korisnicko uputstvo </li></a>
    </ul>
        <br />
&nbsp;&nbsp;&nbsp;
        Izvodjac:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <br />
        <br />
&nbsp;&nbsp;&nbsp; Naziv albuma:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
        <br />
        <br />
        &nbsp;&nbsp;&nbsp; Zanr:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:DropDownList ID="DropDownList1" runat="server" Height="22px" style="margin-left: 0px" Width="125px">
            <asp:ListItem>-- izaberi zanr --</asp:ListItem>
        </asp:DropDownList>
        <br />
        <br />
&nbsp;&nbsp;&nbsp; Godina izdanja:&nbsp;&nbsp;&nbsp;
        <asp:DropDownList ID="DropDownList2" runat="server" Width="127px" Height="22px">
            <asp:ListItem>-- izaberi godinu --</asp:ListItem>
        </asp:DropDownList>
        <br />
        <br />
&nbsp;&nbsp;&nbsp; Izdavacka kuca:&nbsp;&nbsp;
        <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
        <br />
        <br />
&nbsp;<asp:Table CssClass="tabela" ID="Table1" runat="server" BorderStyle="Solid" Width="100%" BorderWidth="1px" GridLines="Both">
                <asp:TableRow runat="server">
                    <asp:TableCell runat="server">Izodjac</asp:TableCell>
                    <asp:TableCell runat="server">Naziv albuma</asp:TableCell>
                    <asp:TableCell runat="server">Zanr</asp:TableCell>
                    <asp:TableCell runat="server">Godina izdanja</asp:TableCell>
                    <asp:TableCell runat="server">Izdavacka kuca</asp:TableCell>
                    <asp:TableCell runat="server">Slika omota</asp:TableCell>
                </asp:TableRow>
        </asp:Table>
        <br>
        &nbsp;&nbsp;&nbsp; <asp:Button ID="Button1" runat="server" Text="Trazi" OnClick="Button1_Click" />
        <br>
        <br>
            </div>
        <div class="footer">
            © Klub kolekcionar
        </div>
    </form>
</body>
</html>----------------------------------css
body {
    padding:0;
    margin:0;
    font-family:Tahoma;
}

.title {
    font-variant:small-caps;
    font-family:Arial;
    background-color:#1959c2;
    color:white;
    padding:15px;
    font-size:30px;
    font-weight:bold;
}

.menu {
    margin:0px;
    background-color:#263d5e;
    list-style:none;
    height:35px;
    padding-top:5px;
    margin-left:-5px;
}

.menu li {
    background-color:#2d4a73;
    border:solid 1px #8d95a1;
    padding:5px;
    float:left;
    color:white;
    padding-left:20px;
    padding-right:20px;
}

.menu li:hover {
    background-color:#4b7bbf;
    border:solid 1px white;
}

.menu a {
    color:white;
    text-decoration:none;
}

.footer {
    text-align:center;
    background-color:lightgray;
    color:gray;
    width:100%;
    padding-top:10px;
    padding-bottom:10px;
}

.content {
    min-height: 100vh; /ne radi 100% mora 100vh/
}

.tabela {
    margin-left:20px;
}

.tabela img {
    width:150px;
}
----------------------------------------------cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;

namespace WebApplication3
{
    public partial class WebForm1 : System.Web.UI.Page
    {
      

        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack == false)
            {
                StreamReader reader = new StreamReader(@"C:\Users\Nidzo\Desktop\MATURA SANJA GLAVNO\STRICEVICKA SREDA\B9\WebApplication3\TextFile1.txt");
                string linija;

                TableRow headerRow = Table1.Rows[0];
                Table1.Rows.Clear();
                Table1.Rows.Add(headerRow);

                while ((linija = reader.ReadLine()) != null)
                {
                     

                    string izvodjac = linija.Split('|')[0].Trim();
                    string naziv = linija.Split('|')[1].Trim();
                    string zanr = linija.Split('|')[2].Trim();
                    string godina = linija.Split('|')[3].Trim();
                    string kuca = linija.Split('|')[4].Trim();
                    string slika = linija.Split('|')[5].Trim();

                    if (DropDownList1.Items.FindByText(zanr) == null)
                    {
                        DropDownList1.Items.Add(zanr);
                    }
                    if (DropDownList2.Items.FindByText(godina) == null)
                    {
                        DropDownList2.Items.Add(godina);
                    }

                    TableRow noviRed = new TableRow();
                    TableCell celija1 = new TableCell();
                    celija1.Text = izvodjac;
                    noviRed.Cells.Add(celija1);

                    TableCell celija2 = new TableCell();
                    celija2.Text = naziv;
                    noviRed.Cells.Add(celija2);

                    TableCell celija3 = new TableCell();
                    celija3.Text = zanr;
                    noviRed.Cells.Add(celija3);

                    TableCell celija4 = new TableCell();
                    celija4.Text = godina;
                    noviRed.Cells.Add(celija4);

                    TableCell celija5 = new TableCell();
                    celija5.Text = kuca;
                    noviRed.Cells.Add(celija5);

                    TableCell celija6 = new TableCell();
                    celija6.Text = "<img src='" + slika + "' />";
                    noviRed.Cells.Add(celija6);

                    Table1.Rows.Add(noviRed);
                }

                reader.Close();
            }
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            StreamReader reader = new StreamReader(@"C:\Users\Nidzo\Desktop\MATURA SANJA GLAVNO\STRICEVICKA SREDA\B9\WebApplication3\TextFile1.txt");
            string linija;

            TableRow headerRow = Table1.Rows[0];
            Table1.Rows.Clear();
            Table1.Rows.Add(headerRow);

            while ((linija = reader.ReadLine()) != null)
            {
                string izvodjac = linija.Split('|')[0].Trim();
                string naziv = linija.Split('|')[1].Trim();
                string zanr = linija.Split('|')[2].Trim();
                string godina = linija.Split('|')[3].Trim();
                string kuca = linija.Split('|')[4].Trim();
                string slika = linija.Split('|')[5].Trim();

                if (izvodjac.StartsWith(TextBox1.Text) &&
                    naziv.StartsWith(TextBox2.Text) &&
                    (DropDownList1.SelectedIndex == 0 || zanr == DropDownList1.SelectedItem.Text) &&
                    (DropDownList2.SelectedIndex == 0 || godina == DropDownList2.SelectedItem.Text) &&
                    kuca.StartsWith(TextBox3.Text))
                {
                    TableRow noviRed = new TableRow();
                    TableCell celija1 = new TableCell();
                    celija1.Text = izvodjac;
                    noviRed.Cells.Add(celija1);

                    TableCell celija2 = new TableCell();
                    celija2.Text = naziv;
                    noviRed.Cells.Add(celija2);

                    TableCell celija3 = new TableCell();
                    celija3.Text = zanr;
                    noviRed.Cells.Add(celija3);

                    TableCell celija4 = new TableCell();
                    celija4.Text = godina;
                    noviRed.Cells.Add(celija4);

                    TableCell celija5 = new TableCell();
                    celija5.Text = kuca;
                    noviRed.Cells.Add(celija5);

                    TableCell celija6 = new TableCell();
                    celija6.Text = "<img src='" + slika + "' />";
                    noviRed.Cells.Add(celija6);

                    Table1.Rows.Add(noviRed);
                }
            }
            reader.Close();
        }
    }      
}

B9

B10
html------------------------------------
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Recnik.aspx.cs" Inherits="WebApplication1.Recnik" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="izgled.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
         <h1>Elektronski recnik</h1>
        <div class="nav">
                <ul>
                    <a href="Recnik.aspx"><li>Recnik</li></a>
                    <a href="DodavanjeNovih.aspx"><li>Dodavanje novih reci</li></a>
                    <a href="Uputstvo.aspx"><li>Uputstvo</li></a>
                </ul>
        </div>
         <p>
             &nbsp;</p>
         <p>
&nbsp;&nbsp;&nbsp;&nbsp; Smer:&nbsp;&nbsp;&nbsp;
             <asp:DropDownList ID="DropDownList1" runat="server">
                 <asp:ListItem>Srpsko-Engleski</asp:ListItem>
                 <asp:ListItem>Englesko-Srpski</asp:ListItem>
             </asp:DropDownList>
         </p>
         <p>
             &nbsp;</p>
         <p>
&nbsp;&nbsp;&nbsp;&nbsp; Engleska rec:&nbsp;&nbsp;&nbsp;
             <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
         </p>
         <p>
             &nbsp;</p>
         <p>
&nbsp;&nbsp;&nbsp;&nbsp; Srpska rec:&nbsp;&nbsp;&nbsp;
             <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
         </p>
         <p>
             &nbsp;</p>
         <p>
             &nbsp;&nbsp;&nbsp; Opis:&nbsp; &nbsp;<asp:TextBox ID="TextBox3" runat="server" Height="143px" Width="230px"></asp:TextBox>
         </p>
         <p>
             &nbsp;</p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
         <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Prevedi" />
        
    </form><div class="futer">Copyright Osnovna skola "Sonja Marinkovic"</div>
</body>
</html>
-------------------------css
body {
    background-color: white;
}

* {
    margin: 0;
    padding: 0;
}

h1 {
    background-color: cornflowerblue;
    color: white;
    padding-left: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.nav {
    text-decoration: none;
    list-style-type: none;
    width: 100%;
    height: 40px;
    background-color: dimgray;
}

ul {
    text-decoration: none;
    list-style-type: none;
}

li {
    text-decoration: none;
    list-style-type: none;
    color: white;
    float: left;
    padding: 10px 30px 10px 30px;
}

    li:hover {
        background-color: lightgray;
        color: white;
    }

.futer{
    position:fixed;
    width:100%;
    height:40px;
    text-align:center;
    background-color:gray;
    color:darkgray;
    bottom:0px;
    left:0px;
}
---------------------------------cS
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
namespace WebApplication1
{
    public partial class Recnik : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            DropDownList1.AutoPostBack = true;
        }

        protected void Button1_Click(object sender, EventArgs e)
        {

            SqlConnection con = new SqlConnection(@"Data Source=DESKTOP-8O361E7;Initial Catalog=b10;Integrated Security=True");
            con.Open();
            SqlCommand komanda = new SqlCommand("select * from recnik", con);
            SqlDataReader reader = komanda.ExecuteReader();
            while (reader.Read())
            {
                if (DropDownList1.SelectedItem.Value == "Englesko-Srpski")
                {
                    if (reader[1].ToString() == TextBox1.Text)
                    {
                        TextBox2.Text = reader[2].ToString();
                        TextBox3.Text = reader[3].ToString();
                    }
                }
                else if (DropDownList1.SelectedItem.Value == "Srpsko-Engleski")
                {
                    if (reader[2].ToString() == TextBox2.Text)
                    {
                        TextBox1.Text = reader[1].ToString();
                        TextBox3.Text = reader[3].ToString();
                    }
                }
            }
            con.Close();
        }
    }
}
--------------------------------------cs druga
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
namespace WebApplication1
{
    public partial class DodavanjeNovih : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            SqlConnection con = new SqlConnection(@"Data Source=DESKTOP-8O361E7;Initial Catalog=b10;Integrated Security=True");
            con.Open();
            SqlCommand komanda = new SqlCommand("insert into recnik values(@p1,@p2,@p3)", con);
            komanda.Parameters.AddWithValue("@p1", TextBox1.Text);
            komanda.Parameters.AddWithValue("@p2", TextBox2.Text);
            komanda.Parameters.AddWithValue("@p3", TextBox3.Text);
            komanda.ExecuteNonQuery();
            con.Close();
            TextBox1.Text = "";
            TextBox2.Text = "";
            TextBox3.Text = "";
        }
    }
}

B10

B12
html--------------------------------------
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Pocetna.aspx.cs" Inherits="WebApplication1.Pocetna" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="izgled.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
        <h1>Rezervacija autobuskih karata</h1>
        <div class="nav">
            <ul>
                <a href="Pocetna.aspx"><li>Pocetna</li></a>
                <a href="Autor.aspx"><li>O Autoru</li></a>
                <a href="Uputstvo.aspx"><li>Uputstvo</li>
            </ul>
            <p>
                &nbsp;</p>
            <p>
                </a>&nbsp;&nbsp; Prikaz sedista autobusa:</p>
            <p>
                &nbsp;</p>
            <p>
                &nbsp;</p>
            <p>
                <asp:Button ID="Button2" runat="server" Height="100px" Text="2" Width="100px" BackColor="#33CC33" OnClick="Button2_Click" />
                <asp:Button ID="Button3" runat="server" Height="100px" Text="3" Width="100px" BackColor="#33CC33" OnClick="Button3_Click"/>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="Button4" runat="server" Height="100px" Text="4" Width="100px" BackColor="#33CC33" OnClick="Button4_Click"/>
                <asp:Button ID="Button5" runat="server" Height="100px" Text="5" Width="100px" BackColor="#33CC33" OnClick="Button5_Click"/>
            </p>
            <p>
                <asp:Button ID="Button6" runat="server" Height="100px" Text="6" Width="100px" BackColor="#33CC33" OnClick="Button6_Click"/>
                <asp:Button ID="Button7" runat="server" Height="100px" Text="7" Width="100px" BackColor="#33CC33" OnClick="Button7_Click"/>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="Button8" runat="server" Height="100px" Text="8" Width="100px" BackColor="#33CC33" OnClick="Button8_Click"/>
                <asp:Button ID="Button9" runat="server" Height="100px" Text="9" Width="100px" BackColor="#33CC33" OnClick="Button9_Click"/>
            </p>
            <p>
                <asp:Button ID="Button10" runat="server" Height="100px" Text="10" Width="100px" BackColor="#33CC33" OnClick="Button10_Click"/>
                <asp:Button ID="Button11" runat="server" Height="100px" Text="11" Width="100px" BackColor="#33CC33" OnClick="Button11_Click"/>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="Button12" runat="server" Height="100px" Text="12" Width="100px" BackColor="#33CC33" OnClick="Button12_Click"/>
                <asp:Button ID="Button13" runat="server" Height="100px" Text="13" Width="100px" BackColor="#33CC33" OnClick="Button13_Click"/>
            </p>
            <p>
                <asp:Button ID="Button14" runat="server" Height="100px" Text="14" Width="100px" BackColor="#33CC33" OnClick="Button14_Click"/>
                <asp:Button ID="Button15" runat="server" Height="100px" Text="15" Width="100px" BackColor="#33CC33" OnClick="Button15_Click"/>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="Button16" runat="server" Height="100px" Text="16" Width="100px" BackColor="#33CC33" OnClick="Button16_Click"/>
                <asp:Button ID="Button17" runat="server" Height="100px" Text="17" Width="100px" BackColor="#33CC33" OnClick="Button17_Click"/>
            </p>
            <p>
                <asp:Button ID="Button18" runat="server" Height="100px" Text="18" Width="100px" BackColor="#33CC33" OnClick="Button18_Click"/>
                <asp:Button ID="Button19" runat="server" Height="100px" Text="19" Width="100px" BackColor="#33CC33" OnClick="Button19_Click"/>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="Button20" runat="server" Height="100px" Text="20" Width="100px" BackColor="#33CC33" OnClick="Button20_Click"/>
                <asp:Button ID="Button21" runat="server" Height="100px" Text="21" Width="100px" BackColor="#33CC33" OnClick="Button21_Click"/>
            </p>
            <p>
                <asp:Button ID="Button22" runat="server" Height="100px" Text="22" Width="100px" BackColor="#33CC33" OnClick="Button22_Click"/>
                <asp:Button ID="Button23" runat="server" Height="100px" Text="23" Width="100px" BackColor="#33CC33" OnClick="Button23_Click"/>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="Button24" runat="server" Height="100px" Text="24" Width="100px" BackColor="#33CC33" OnClick="Button24_Click"/>
                <asp:Button ID="Button25" runat="server" Height="100px" Text="25" Width="100px" BackColor="#33CC33" OnClick="Button25_Click"/>
            </p>
            <p>
                <asp:Button ID="Button26" runat="server" Height="100px" Text="26" Width="100px" BackColor="#33CC33" OnClick="Button26_Click"/>
                <asp:Button ID="Button27" runat="server" Height="100px" Text="27" Width="100px" BackColor="#33CC33" OnClick="Button27_Click"/>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="Button28" runat="server" Height="100px" Text="28" Width="100px" BackColor="#33CC33" OnClick="Button28_Click"/>
                <asp:Button ID="Button29" runat="server" Height="100px" Text="29" Width="100px" BackColor="#33CC33" OnClick="Button29_Click"/>
            </p>
            <p>
                <asp:Button ID="Button30" runat="server" Height="100px" Text="30" Width="100px" BackColor="#33CC33" OnClick="Button30_Click"/>
                <asp:Button ID="Button31" runat="server" Height="100px" Text="31" Width="100px" BackColor="#33CC33" OnClick="Button31_Click"/>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="Button32" runat="server" Height="100px" Text="32" Width="100px" BackColor="#33CC33" OnClick="Button32_Click"/>
                <asp:Button ID="Button33" runat="server" Height="100px" Text="33" Width="100px" BackColor="#33CC33" OnClick="Button33_Click"/>
            </p>
            <p>
                <asp:Button ID="Button34" runat="server" Height="100px" Text="34" Width="100px" BackColor="#33CC33" OnClick="Button34_Click"/>
                <asp:Button ID="Button35" runat="server" Height="100px" Text="35" Width="100px" BackColor="#33CC33" OnClick="Button35_Click"/>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="Button36" runat="server" Height="100px" Text="36" Width="100px" BackColor="#33CC33" OnClick="Button36_Click"/>
                <asp:Button ID="Button37" runat="server" Height="100px" Text="37" Width="100px" BackColor="#33CC33" OnClick="Button37_Click"/>
            </p>
            <p>
                <asp:Button ID="Button38" runat="server" Height="100px" Text="38" Width="100px" BackColor="#33CC33" OnClick="Button38_Click"/>
                <asp:Button ID="Button39" runat="server" Height="100px" Text="39" Width="100px" BackColor="#33CC33" OnClick="Button39_Click"/>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="Button40" runat="server" Height="100px" Text="40" Width="100px" BackColor="#33CC33" OnClick="Button40_Click"/>
                <asp:Button ID="Button41" runat="server" Height="100px" Text="41" Width="100px" BackColor="#33CC33" OnClick="Button41_Click"/>
            </p>
            <p>
                <asp:Button ID="Button42" runat="server" Height="100px" Text="42" Width="100px" BackColor="#33CC33" OnClick="Button42_Click"/>
                <asp:Button ID="Button43" runat="server" Height="100px" Text="43" Width="100px" BackColor="#33CC33" OnClick="Button43_Click"/>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="Button44" runat="server" Height="100px" Text="44" Width="100px" BackColor="#33CC33" OnClick="Button44_Click"/>
                <asp:Button ID="Button45" runat="server" Height="100px" Text="45" Width="100px" BackColor="#33CC33" OnClick="Button45_Click"/>
            </p>
            <p>
                <asp:Button ID="Button46" runat="server" Height="100px" Text="46" Width="100px" BackColor="#33CC33" OnClick="Button46_Click"/>
                <asp:Button ID="Button47" runat="server" Height="100px" Text="47" Width="100px" BackColor="#33CC33" OnClick="Button47_Click"/>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                <asp:Button ID="Button48" runat="server" Height="100px" Text="48" Width="100px" BackColor="#33CC33" OnClick="Button48_Click"/>
                <asp:Button ID="Button49" runat="server" Height="100px" Text="49" Width="100px" BackColor="#33CC33" OnClick="Button49_Click"/>
            </p>
            <p>
                <asp:Button ID="Button50" runat="server" Height="100px" Text="50" Width="100px" BackColor="#33CC33" OnClick="Button50_Click"/>
                <asp:Button ID="Button51" runat="server" Height="100px" Text="51" Width="100px" BackColor="#33CC33" OnClick="Button51_Click"/>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                <asp:Button ID="Button52" runat="server" Height="100px" Text="52" Width="100px" BackColor="#33CC33" OnClick="Button52_Click"/>
                <asp:Button ID="Button53" runat="server" Height="100px" Text="53" Width="100px" BackColor="#33CC33" OnClick="Button53_Click"/>
            </p>
            <p>
                &nbsp;</p>
            <p>
                &nbsp;&nbsp;&nbsp; Broj sedista:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
            </p>
            <p>
                &nbsp;</p>
            <p>
                &nbsp;&nbsp;&nbsp; Ime i prezime:&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                &nbsp; </p>
            <p>
                &nbsp;</p>
            <p>
                &nbsp;&nbsp;&nbsp; E-mail:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
            </p>
            <p>
                &nbsp;</p>
            <p>
            <asp:Button ID="Button1" runat="server" Height="44px" Text="posalji" Width="105px" OnClick="Button1_Click" />
            </p>
        </div>
        
        <p>
            &nbsp;</p>
        
    </form>
</body>
</html>
----------------------------------css
body {
    background-color: white;
}

* {
    margin: 0;
    padding: 0;
}

h1 {
    background-color: cornflowerblue;
    color: white;
    padding-left: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.nav {
    text-decoration: none;
    list-style-type: none;
    width: 100%;
    height: 40px;
    background-color: dimgray;
}

ul {
    text-decoration: none;
    list-style-type: none;
}

li {
    text-decoration: none;
    list-style-type: none;
    color: white;
    float: left;
    padding: 10px 30px 10px 30px;
}

    li:hover {
        background-color: lightgray;
        color: white;
    }

.futer {
    position: fixed;
    width: 100%;
    height: 40px;
    text-align: center;
    background-color: gray;
    color: darkgray;
    bottom: 0px;
    left: 0px;
}
------------------------------------cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
using System.Drawing;
namespace WebApplication1
{
    public partial class Pocetna : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            TextBox1.Enabled = false;
            SqlConnection con = new SqlConnection(@"Data Source=DESKTOP-8O361E7;Initial Catalog=b12;Integrated Security=True");
            con.Open();
            SqlCommand komanda = new SqlCommand("select * from redVoznje", con);
            SqlDataReader reader = komanda.ExecuteReader();
            while(reader.Read())
            {
                if (Convert.ToInt32(reader[1]) == 1)
                {
                    if (Convert.ToInt32(reader[2]) == 1)
                    {
                        Button1.BackColor = Color.Red;
                    }
                }
                if (Convert.ToInt32(reader[1]) == 2)
                {
                    if (Convert.ToInt32(reader[2]) == 1)
                    {
                        Button2.BackColor = Color.Red;
                    }
                }




 protected void Button1_Click(object sender, EventArgs e)
 {
     SqlConnection con = new SqlConnection(@"Data Source=DESKTOP-8O361E7;Initial Catalog=b12;Integrated Security=True");
     con.Open();
     SqlCommand komanda = new SqlCommand("insert into redVoznje values(@p1,1)", con);
     komanda.Parameters.AddWithValue("@p1", TextBox1.Text);
     komanda.ExecuteNonQuery();
     con.Close();
     Page_Load(this, null);
 }

 protected void Button2_Click(object sender, EventArgs e)
 {
     TextBox1.Text = Button2.Text;
 }

 protected void Button3_Click(object sender, EventArgs e)
 {
     TextBox1.Text = Button3.Text;

 }

 protected void Button4_Click(object sender, EventArgs e)
 {
     TextBox1.Text = Button4.Text;

 }

B12

B17
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="WebApplication1.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="StyleSheet1.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
    <div class="strip">
        <p class="header1">Zadatak 8</p><p class="header2">Veb prodavinca</p>
    </div>
     <img src="Slike/webshop.jpg" class="logo"><h1 class="title">Web prodavnica</h1>
        <hr></hr>
        Parametri za pretragu:<br><br>
         &nbsp;
         Proizvodjac:&nbsp;
        <asp:DropDownList ID="DropDownList1" runat="server" Width="103px">
            <asp:ListItem>-- Izaberi -- </asp:ListItem>
        </asp:DropDownList>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Kamera:&nbsp;&nbsp;
        <asp:DropDownList ID="DropDownList2" runat="server" Width="103px">
            <asp:ListItem>-- Izaberi -- </asp:ListItem>
        </asp:DropDownList>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ekran:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:DropDownList ID="DropDownList3" runat="server" Width="103px">
            <asp:ListItem>-- Izaberi -- </asp:ListItem>
        </asp:DropDownList>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="Button1" runat="server" Text="Trazi" Width="103px" OnClick="Button1_Click" />
        <br />
        <br />
         &nbsp;
         RAM:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:DropDownList ID="DropDownList4" runat="server" Width="103px">
            <asp:ListItem>-- Izaberi -- </asp:ListItem>
        </asp:DropDownList>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dual SIM:
        <asp:DropDownList ID="DropDownList5" runat="server" Width="103px">
            <asp:ListItem>-- Izaberi -- </asp:ListItem>
            <asp:ListItem>Da</asp:ListItem>
            <asp:ListItem>Ne</asp:ListItem>
        </asp:DropDownList>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Procesor:&nbsp;&nbsp;
        <asp:DropDownList ID="DropDownList6" runat="server" Width="103px">
            <asp:ListItem>-- Izaberi -- </asp:ListItem>
        </asp:DropDownList>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <hr></hr>
        <asp:Table ID="Table1" runat="server" GridLines="Both" Width="100%">
            <asp:TableRow runat="server" BackColor="Navy" BorderColor="Gray" ForeColor="White" HorizontalAlign="Center">
                <asp:TableCell runat="server"></asp:TableCell>
                <asp:TableCell runat="server">Karakteristike</asp:TableCell>
                <asp:TableCell runat="server">Cena</asp:TableCell>
            </asp:TableRow>
        </asp:Table>
    </form>
    <div class="footer">
    Elektrotehnička Škola "Nikola Tesla" Niš <div class="links"><a href="KorisnickoUpu">Uputstvo</a> <a href="" style="margin-left:20px">O Autoru</a></div>
    </div>
</body>

</html>

--- CSS 

body {
    font-family:Tahoma;
}

.strip {
    background-color:navy;
    color:white;
    padding-top:20px;
    padding-bottom:20px;
    margin-bottom:10px;
    margin-left:-8px;
    margin-right:-8px;
    margin-top:-8px;
}

p {
    display:inline;
    padding:20px;
}

.header2 {
    border-left:1px solid white;
}

img {
    width:150px;
}

.logo {
    width:150px;
    position:absolute;
}

.title {
    margin-top:40px;
    text-align:center;
    vertical-align:central;
    color:navy;
    margin-bottom:40px;
}

hr {
    height:3px;
    color:gray;
    background-color:gray;
}

.footer {
    background-color:navy;
    position: relative;
    bottom:0;
    margin-left:-8px;
    margin-right:-8px;
    color: white;
    margin-top:100px;
    padding:10px;
    margin-bottom:-8px;
}

.links {
    position:absolute;
    right:20px;
    bottom:10px;
}

.footer a {
    color:white;
    display:inline;
}


---CODE

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;

namespace WebApplication1
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack == false)
            {
                StreamReader reader = new StreamReader(Server.MapPath("~") + "Parametri.txt");
                string linija;

                TableRow headerRow = Table1.Rows[0];
                Table1.Rows.Clear();
                Table1.Rows.Add(headerRow);

                while ((linija = reader.ReadLine()) != null)
                {
                    TableRow noviRed = new TableRow();
                    TableCell celija1 = new TableCell();
                    celija1.Text = "<img src=" + linija.Substring(92, 120 - 92).Trim() + ">";
                    noviRed.Cells.Add(celija1);

                    TableCell celija2 = new TableCell();
                    string naziv = linija.Substring(6, 30 - 6);
                    string proizvodjac = linija.Substring(31, 50 - 31);
                    string ram = linija.Substring(51, 55 - 51);
                    string procesor = linija.Substring(56, 70 - 56);
                    string ekran = linija.Substring(81, 90 - 81);
                    string kamera = linija.Substring(71, 80 - 71);

                    if (DropDownList1.Items.FindByText(proizvodjac) == null)
                    {
                        DropDownList1.Items.Add(proizvodjac);
                    }
                    if (DropDownList2.Items.FindByText(kamera) == null)
                    {
                        DropDownList2.Items.Add(kamera);
                    }
                    if (DropDownList3.Items.FindByText(ekran) == null)
                    {
                        DropDownList3.Items.Add(ekran);
                    }
                    if (DropDownList4.Items.FindByText(ram) == null)
                    {
                        DropDownList4.Items.Add(ram);
                    }
                    if (DropDownList6.Items.FindByText(procesor) == null)
                    {
                        DropDownList6.Items.Add(procesor);
                    }

                    celija2.Text = "<h3>" + naziv + "</h3><br>Proizvodjac: " + proizvodjac + "<br>RAM: " + ram + "<br>Procesor: " + procesor + "<br>Ekran: " + ekran + "<br>Kamera: " + kamera;
                    noviRed.Cells.Add(celija2);

                    TableCell celija3 = new TableCell();
                    celija3.Text = linija.Substring(118, 5) + " RSD";
                    noviRed.Cells.Add(celija3);

                    noviRed.VerticalAlign = VerticalAlign.Middle;
                    Table1.Rows.Add(noviRed);
                }
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            StreamReader reader = new StreamReader(Server.MapPath("~") + "Parametri.txt");
            string linija;

                TableRow headerRow = Table1.Rows[0];
                Table1.Rows.Clear();
                Table1.Rows.Add(headerRow);

                while ((linija = reader.ReadLine()) != null)
                {
                    TableRow noviRed = new TableRow();
                    TableCell celija1 = new TableCell();
                    celija1.Text = "<img src=" + linija.Substring(92, 120 - 93).Trim() + ">";
                    noviRed.Cells.Add(celija1);

                    TableCell celija2 = new TableCell();
                    string naziv = linija.Substring(6, 30 - 6);
                    string proizvodjac = linija.Substring(31, 50 - 31);
                    string ram = linija.Substring(51, 55 - 51);
                    string procesor = linija.Substring(56, 70 - 56);
                    string ekran = linija.Substring(81, 90 - 81);
                    string kamera = linija.Substring(71, 80 - 71);

                    if (DropDownList1.Items.FindByText(proizvodjac) == null)
                    {
                        DropDownList1.Items.Add(proizvodjac);
                    }
                    if (DropDownList2.Items.FindByText(kamera) == null)
                    {
                        DropDownList2.Items.Add(kamera);
                    }
                    if (DropDownList3.Items.FindByText(ekran) == null)
                    {
                        DropDownList3.Items.Add(ekran);
                    }
                    if (DropDownList4.Items.FindByText(ram) == null)
                    {
                        DropDownList4.Items.Add(ram);
                    }
                    if (DropDownList6.Items.FindByText(procesor) == null)
                    {
                        DropDownList6.Items.Add(procesor);
                    }

                    celija2.Text = "<h3>" + naziv + "</h3><br>Proizvodjac: " + proizvodjac + "<br>RAM: " + ram + "<br>Procesor: " + procesor + "<br>Ekran: " + ekran + "<br>Kamera: " + kamera;
                    noviRed.Cells.Add(celija2);

                    TableCell celija3 = new TableCell();
                    celija3.Text = linija.Substring(118, 5) + " RSD";
                    noviRed.Cells.Add(celija3);

                    noviRed.VerticalAlign = VerticalAlign.Middle;

                    if(proizvodjac == DropDownList1.SelectedValue.ToString() && 
                        kamera == DropDownList2.SelectedValue.ToString() && 
                        ekran == DropDownList3.SelectedValue.ToString() && 
                        ram == DropDownList4.SelectedValue.ToString() &&
                        procesor == DropDownList6.SelectedValue.ToString())
                    {
                        Table1.Rows.Add(noviRed);
                    }
            }
        }
    }
}

B17

B21
html-----------------------------------
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="pocetna.aspx.cs" Inherits="WebApplication1.pocetna" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="izgled.css" rel="stylesheet" />
</head>
<body>
    <script src="skripta.js"></script>
    <form id="form1" runat="server">
        <div class="nav">
            <ul>
                <li class="prvi">
                    Zadatak 21
                </li>
                <li>
                    Sortiranje tabele
                </li>
            </ul>

            <br />
            
        </div>
        <h1>SORTIRANJE TABELE</h1>
        <hr class="linija"/>
        <table id="Tabela" border="1">
                <tr>
                <th onclick="sortTable(0)"><a href="#">Rbr</a></th>
                <th onclick="sortTable(1)"><a href="#">Ime</a></th>
                <th onclick="sortTable(2)"><a href="#">Prezime</a></th>
                </tr>
                <tr>
                <td>1.</td>
                <td>Pera</td>
                <td>Mikic</td>
                </tr>
                <tr>
                <td>2.</td>
                <td>Mika</td>
                <td>Zikic</td>
                </tr>
                <tr>
                <td>3.</td>
                <td>Zika</td>
                <td>Peric</td>
                </tr>
        </table>
        <div class="futer">
            <ul>
                <li>Elektrotehnicka skola "Nikola Tesla" Nis</li>
                <a href="uputstvo.aspx"><li class="desni">Uputstvo</li></a>
                <a href="autor.aspx"><li class="desni">O Autoru</li></a>
            </ul>   
        </div>
    </form>
    
</body>
</html>

----------------------------------css
body {
    color:white;
}
*{
    margin:0;
    padding:0;
}
.nav{
    width:100%;
    height:50px;
    background-color:royalblue;
    
}
ul{
    list-style-type:none;
    text-decoration:none;
}
li{
    float:left;
    color:white;
    padding:15px;
}
.prvi{
    border-right:1px solid white;
    height:100%;
}
h1{
    text-align:center;
    margin-top:20px;
    margin-bottom:20px;
    color:black;
    font-size:2em;
}
.linija{
    background-color:gray;
    outline-style:groove;
    width:100%;
    height:2px;

}
#Tabela{
    border:1px solid black;
    border-collapse:collapse;
    color:black;
   
    margin:auto;
    margin-top:10px;
    width:30%;
}
th {
    align-content: center;
    text-align: center;
    vertical-align: auto;
    background-color:lightgray;
}
.futer{
    width:100%;
    height:50px;
    bottom:0;
    left:0;
    position:fixed;
    background-color:royalblue;
}
.desni{
    float:right;
}
------------------------------js
function sortTable(n)
{
    var tabela = document.getElementById('tabela');
    var rows, zamena = true, brojac = 0, smer = "asc";
    if (zamena) {
        rows = tabela.rows;
        zamena = false;

        for (var i = 1; i < table.rows; i++) {
            var x = rows[i].getElementsByTagName('td')[n];
            var y = rows[i + 1].getElementsByTagName('td')[n];

            if (smer === "asc" && x.innerHTML.toLowerCase() > y.innerHTML.toLowerCase() || (smer === "desc" && x.innerHTML.toLowerCase() < y.innerHTML.toLowerCase()))
            {
                rows[i].parentNode.insertBefore(rows[i + 1], rows[i])
                zamena = true;
                brojac++;
                break;
            }

            
        }
        if (brojac === 0 && smer === "asc")
        {
            zamena = true;
            smer = "desc";
        }
    }
}B12
html--------------------------------------
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Pocetna.aspx.cs" Inherits="WebApplication1.Pocetna" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="izgled.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
        <h1>Rezervacija autobuskih karata</h1>
        <div class="nav">
            <ul>
                <a href="Pocetna.aspx"><li>Pocetna</li></a>
                <a href="Autor.aspx"><li>O Autoru</li></a>
                <a href="Uputstvo.aspx"><li>Uputstvo</li>
            </ul>
            <p>
                 </p>
            <p>
                </a>   Prikaz sedista autobusa:</p>
            <p>
                 </p>
            <p>
                 </p>
            <p>
                <asp:Button ID="Button2" runat="server" Height="100px" Text="2" Width="100px" BackColor="#33CC33" OnClick="Button2_Click" />
                <asp:Button ID="Button3" runat="server" Height="100px" Text="3" Width="100px" BackColor="#33CC33" OnClick="Button3_Click"/>
                          
                <asp:Button ID="Button4" runat="server" Height="100px" Text="4" Width="100px" BackColor="#33CC33" OnClick="Button4_Click"/>
                <asp:Button ID="Button5" runat="server" Height="100px" Text="5" Width="100px" BackColor="#33CC33" OnClick="Button5_Click"/>
            </p>
            <p>
                <asp:Button ID="Button6" runat="server" Height="100px" Text="6" Width="100px" BackColor="#33CC33" OnClick="Button6_Click"/>
                <asp:Button ID="Button7" runat="server" Height="100px" Text="7" Width="100px" BackColor="#33CC33" OnClick="Button7_Click"/>
                          
                <asp:Button ID="Button8" runat="server" Height="100px" Text="8" Width="100px" BackColor="#33CC33" OnClick="Button8_Click"/>
                <asp:Button ID="Button9" runat="server" Height="100px" Text="9" Width="100px" BackColor="#33CC33" OnClick="Button9_Click"/>
            </p>
            <p>
                <asp:Button ID="Button10" runat="server" Height="100px" Text="10" Width="100px" BackColor="#33CC33" OnClick="Button10_Click"/>
                <asp:Button ID="Button11" runat="server" Height="100px" Text="11" Width="100px" BackColor="#33CC33" OnClick="Button11_Click"/>
                          
                <asp:Button ID="Button12" runat="server" Height="100px" Text="12" Width="100px" BackColor="#33CC33" OnClick="Button12_Click"/>
                <asp:Button ID="Button13" runat="server" Height="100px" Text="13" Width="100px" BackColor="#33CC33" OnClick="Button13_Click"/>
            </p>
            <p>
                <asp:Button ID="Button14" runat="server" Height="100px" Text="14" Width="100px" BackColor="#33CC33" OnClick="Button14_Click"/>
                <asp:Button ID="Button15" runat="server" Height="100px" Text="15" Width="100px" BackColor="#33CC33" OnClick="Button15_Click"/>
                              
                <asp:Button ID="Button16" runat="server" Height="100px" Text="16" Width="100px" BackColor="#33CC33" OnClick="Button16_Click"/>
                <asp:Button ID="Button17" runat="server" Height="100px" Text="17" Width="100px" BackColor="#33CC33" OnClick="Button17_Click"/>
            </p>
            <p>
                <asp:Button ID="Button18" runat="server" Height="100px" Text="18" Width="100px" BackColor="#33CC33" OnClick="Button18_Click"/>
                <asp:Button ID="Button19" runat="server" Height="100px" Text="19" Width="100px" BackColor="#33CC33" OnClick="Button19_Click"/>
                              
                <asp:Button ID="Button20" runat="server" Height="100px" Text="20" Width="100px" BackColor="#33CC33" OnClick="Button20_Click"/>
                <asp:Button ID="Button21" runat="server" Height="100px" Text="21" Width="100px" BackColor="#33CC33" OnClick="Button21_Click"/>
            </p>
            <p>
                <asp:Button ID="Button22" runat="server" Height="100px" Text="22" Width="100px" BackColor="#33CC33" OnClick="Button22_Click"/>
                <asp:Button ID="Button23" runat="server" Height="100px" Text="23" Width="100px" BackColor="#33CC33" OnClick="Button23_Click"/>
                              
                <asp:Button ID="Button24" runat="server" Height="100px" Text="24" Width="100px" BackColor="#33CC33" OnClick="Button24_Click"/>
                <asp:Button ID="Button25" runat="server" Height="100px" Text="25" Width="100px" BackColor="#33CC33" OnClick="Button25_Click"/>
            </p>
            <p>
                <asp:Button ID="Button26" runat="server" Height="100px" Text="26" Width="100px" BackColor="#33CC33" OnClick="Button26_Click"/>
                <asp:Button ID="Button27" runat="server" Height="100px" Text="27" Width="100px" BackColor="#33CC33" OnClick="Button27_Click"/>
                              
                <asp:Button ID="Button28" runat="server" Height="100px" Text="28" Width="100px" BackColor="#33CC33" OnClick="Button28_Click"/>
                <asp:Button ID="Button29" runat="server" Height="100px" Text="29" Width="100px" BackColor="#33CC33" OnClick="Button29_Click"/>
            </p>
            <p>
                <asp:Button ID="Button30" runat="server" Height="100px" Text="30" Width="100px" BackColor="#33CC33" OnClick="Button30_Click"/>
                <asp:Button ID="Button31" runat="server" Height="100px" Text="31" Width="100px" BackColor="#33CC33" OnClick="Button31_Click"/>
                              
                <asp:Button ID="Button32" runat="server" Height="100px" Text="32" Width="100px" BackColor="#33CC33" OnClick="Button32_Click"/>
                <asp:Button ID="Button33" runat="server" Height="100px" Text="33" Width="100px" BackColor="#33CC33" OnClick="Button33_Click"/>
            </p>
            <p>
                <asp:Button ID="Button34" runat="server" Height="100px" Text="34" Width="100px" BackColor="#33CC33" OnClick="Button34_Click"/>
                <asp:Button ID="Button35" runat="server" Height="100px" Text="35" Width="100px" BackColor="#33CC33" OnClick="Button35_Click"/>
                              
                <asp:Button ID="Button36" runat="server" Height="100px" Text="36" Width="100px" BackColor="#33CC33" OnClick="Button36_Click"/>
                <asp:Button ID="Button37" runat="server" Height="100px" Text="37" Width="100px" BackColor="#33CC33" OnClick="Button37_Click"/>
            </p>
            <p>
                <asp:Button ID="Button38" runat="server" Height="100px" Text="38" Width="100px" BackColor="#33CC33" OnClick="Button38_Click"/>
                <asp:Button ID="Button39" runat="server" Height="100px" Text="39" Width="100px" BackColor="#33CC33" OnClick="Button39_Click"/>
                              
                <asp:Button ID="Button40" runat="server" Height="100px" Text="40" Width="100px" BackColor="#33CC33" OnClick="Button40_Click"/>
                <asp:Button ID="Button41" runat="server" Height="100px" Text="41" Width="100px" BackColor="#33CC33" OnClick="Button41_Click"/>
            </p>
            <p>
                <asp:Button ID="Button42" runat="server" Height="100px" Text="42" Width="100px" BackColor="#33CC33" OnClick="Button42_Click"/>
                <asp:Button ID="Button43" runat="server" Height="100px" Text="43" Width="100px" BackColor="#33CC33" OnClick="Button43_Click"/>
                              
                <asp:Button ID="Button44" runat="server" Height="100px" Text="44" Width="100px" BackColor="#33CC33" OnClick="Button44_Click"/>
                <asp:Button ID="Button45" runat="server" Height="100px" Text="45" Width="100px" BackColor="#33CC33" OnClick="Button45_Click"/>
            </p>
            <p>
                <asp:Button ID="Button46" runat="server" Height="100px" Text="46" Width="100px" BackColor="#33CC33" OnClick="Button46_Click"/>
                <asp:Button ID="Button47" runat="server" Height="100px" Text="47" Width="100px" BackColor="#33CC33" OnClick="Button47_Click"/>
                              

                <asp:Button ID="Button48" runat="server" Height="100px" Text="48" Width="100px" BackColor="#33CC33" OnClick="Button48_Click"/>
                <asp:Button ID="Button49" runat="server" Height="100px" Text="49" Width="100px" BackColor="#33CC33" OnClick="Button49_Click"/>
            </p>
            <p>
                <asp:Button ID="Button50" runat="server" Height="100px" Text="50" Width="100px" BackColor="#33CC33" OnClick="Button50_Click"/>
                <asp:Button ID="Button51" runat="server" Height="100px" Text="51" Width="100px" BackColor="#33CC33" OnClick="Button51_Click"/>
                              

                <asp:Button ID="Button52" runat="server" Height="100px" Text="52" Width="100px" BackColor="#33CC33" OnClick="Button52_Click"/>
                <asp:Button ID="Button53" runat="server" Height="100px" Text="53" Width="100px" BackColor="#33CC33" OnClick="Button53_Click"/>
            </p>
            <p>
                 </p>
            <p>
                    Broj sedista:         <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
            </p>
            <p>
                 </p>
            <p>
                    Ime i prezime:      <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                  </p>
            <p>
                 </p>
            <p>
                    E-mail:                
                <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
            </p>
            <p>
                 </p>
            <p>
            <asp:Button ID="Button1" runat="server" Height="44px" Text="posalji" Width="105px" OnClick="Button1_Click" />
            </p>
        </div>
        
        <p>
             </p>
        
    </form>
</body>
</html>
----------------------------------css
body {
    background-color: white;
}

* {
    margin: 0;
    padding: 0;
}

h1 {
    background-color: cornflowerblue;
    color: white;
    padding-left: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.nav {
    text-decoration: none;
    list-style-type: none;
    width: 100%;
    height: 40px;
    background-color: dimgray;
}

ul {
    text-decoration: none;
    list-style-type: none;
}

li {
    text-decoration: none;
    list-style-type: none;
    color: white;
    float: left;
    padding: 10px 30px 10px 30px;
}

    li:hover {
        background-color: lightgray;
        color: white;
    }

.futer {
    position: fixed;
    width: 100%;
    height: 40px;
    text-align: center;
    background-color: gray;
    color: darkgray;
    bottom: 0px;
    left: 0px;
}
------------------------------------cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
using System.Drawing;
namespace WebApplication1
{
    public partial class Pocetna : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            TextBox1.Enabled = false;
            SqlConnection con = new SqlConnection(@"Data Source=DESKTOP-8O361E7;Initial Catalog=b12;Integrated Security=True");
            con.Open();
            SqlCommand komanda = new SqlCommand("select * from redVoznje", con);
            SqlDataReader reader = komanda.ExecuteReader();
            while(reader.Read())
            {
                if (Convert.ToInt32(reader[1]) == 1)
                {
                    if (Convert.ToInt32(reader[2]) == 1)
                    {
                        Button1.BackColor = Color.Red;
                    }
                }
                if (Convert.ToInt32(reader[1]) == 2)
                {
                    if (Convert.ToInt32(reader[2]) == 1)
                    {
                        Button2.BackColor = Color.Red;
                    }
                }




 protected void Button1_Click(object sender, EventArgs e)
 {
     SqlConnection con = new SqlConnection(@"Data Source=DESKTOP-8O361E7;Initial Catalog=b12;Integrated Security=True");
     con.Open();
     SqlCommand komanda = new SqlCommand("insert into redVoznje values(@p1,1)", con);
     komanda.Parameters.AddWithValue("@p1", TextBox1.Text);
     komanda.ExecuteNonQuery();
     con.Close();
     Page_Load(this, null);
 }

 protected void Button2_Click(object sender, EventArgs e)
 {
     TextBox1.Text = Button2.Text;
 }

 protected void Button3_Click(object sender, EventArgs e)
 {
     TextBox1.Text = Button3.Text;

 }

 protected void Button4_Click(object sender, EventArgs e)
 {
     TextBox1.Text = Button4.Text;

 }

B21

B22
hyml-*------------------------------------
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="pocetna.aspx.cs" Inherits="WebApplication1.pocetna" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="izgled.css" rel="stylesheet" />
</head>
<body>
    <script src="skripta.js"></script>
    <form id="form1" runat="server">
        <div class="nav">
            <ul>
                <li class="prvi">
                    Zadatak 21
                </li>
                <li>
                    Sortiranje tabele
                </li>
            </ul>

            <br />
            
        </div>
        <h1>SORTIRANJE TABELE</h1>
        <hr class="linija"/>
       <table id="Tabela"> 
             <tr>
               <th>Rbr</th>
               <th>Ime</th>
               <th>Prezime</th>
               <th>Škola</th>
               <th>Poeni</th>
             </tr>  
             <tr>   
               <td>1.</td>  
               <td>Pera</td>  
               <td>Mikic</td>
               <td>OŠ “Vuk Karadžić”</td>
               <td>54</td>  
             </tr>
             <tr>
               <td>2.</td>
               <td>Mika</td>
               <td>Zikic</td>
               <td>OŠ “Ivo Andrić”</td>
               <td>42</td>
             </tr>
             <tr>
               <td>3.</td>
               <td>Mikla</td>
               <td>Jovic</td>
               <td>OŠ “Jovan Mikic”</td>
               <td>36</td>
             </tr>
             <tr>
               <td>4.</td>
               <td>Zika</td>
               <td>Mikic</td>
               <td>OŠ “Majsanski put”</td>
               <td>62</td>
             </tr>
             <tr>
               <td>5.</td>
               <td>Jovan</td>
               <td>Lulic</td>
               <td>OŠ “Jovan Jovanovic Zmaj”</td>
               <td>50</td>
             </tr>
             <tr>
               <td>6.</td>
               <td>Jelena</td>
               <td>Ivkovic</td>
               <td>OŠ “Ivo Andrić”</td>
               <td>39</td>
             </tr>
             <tr>
               <td>7.</td>
               <td>Goran</td>
               <td>Zigic</td>
               <td>OŠ “Majsanski put”</td>
               <td>51</td>
             </tr>

 </table> 
        <div class="buttons">

            <button type="button" onclick="sortTable(4)">Sortiraj</button>
             <button type="button" onclick="neparni()">neparni</button>
             <button type="button" onclick="polozili()">Polozili</button>
             <button type="button" onclick="pali()">Pali</button>
             <button type="button" onclick="palidelete()">Izdvoji oni koji su polozili</button>
        </div>
        <div class="futer">
            <ul>
                <li>Elektrotehnicka skola "Nikola Tesla" Nis</li>
                <a href="uputstvo.aspx"><li class="desni">Uputstvo</li></a>
                <a href="autor.aspx"><li class="desni">O Autoru</li></a>
            </ul>   
        </div>
    </form>
    
</body>
</html>
---------------------------------css
body {
    color: white;
}

* {
    margin: 0;
    padding: 0;
}

.nav {
    width: 100%;
    height: 50px;
    background-color: royalblue;
}

ul {
    list-style-type: none;
    text-decoration: none;
}

li {
    float: left;
    color: white;
    padding: 15px;
}

.prvi {
    border-right: 1px solid white;
    height: 100%;
}

h1 {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
    color: black;
    font-size: 2em;
}

.linija {
    background-color: gray;
    outline-style: groove;
    width: 100%;
    height: 2px;
}

#Tabela {
    border: 1px solid black;
    border-collapse: collapse;
    color: black;
    margin: auto;
    margin-top: 10px;
    width: 30%;
}
.buttons {
    margin: auto;
}
th {
    align-content: center;
    text-align: center;
    vertical-align: auto;
    background-color: lightgray;
}

.futer {
    width: 100%;
    height: 50px;
    bottom: 0;
    left: 0;
    position: fixed;
    background-color: royalblue;
}

.desni {
    float: right;
}
--------------------------js
function sortTable() {
    var table = document.getElementById("Tabela");
    var rows, zamena = true, ako=false;
        
    while (zamena) {
        zamena = false;
        rows = table.rows;
        for (var i = 1; i < rows.length - 1; i++) {
            
            var x = rows[i].getElementsByTagName("td")[4];
            var y = rows[i + 1].getElementsByTagName("td")[4];
            if (x.innerHTML.toLowerCase() < y.innerHTML.toLowerCase()) {
                ako = true;
                break;
            }
        }
        if (ako) {
            rows[i].parentNode.insertBefore(rows[i + 1], rows[i]);
            zamena = true;
        }
    }
}
////////////
function neparni() {
    var table = document.getElementById("Tabela");
    var rows = table.rows;

    for (var i = 1; i < rows.length; i++) { 

        if (parseInt(rows[i].getElementsByTagName("td")[0].innerHTML) % 2 == 1) { 
            rows[i].style.backgroundColor = "gray";
        } 
    }
}


function polozili() {
    var table = document.getElementById("Tabela");
    var rows = table.rows;

    for (i = 1; i < rows.length; i++) {
        

        if (parseInt(rows[i].getElementsByTagName("td")[4].innerHTML) >= 50) {
            rows[i].style.backgroundColor = "green";

        }
    }
}

function pali() {
    var table = document.getElementById("Tabela");
    var rows = table.rows;

    for (i = 1; i < rows.length; i++) {
      
        if(parseInt(rows[i].getElementsByTagName("td")[4].innerHTML) < 50) {
            rows[i].style.backgroundColor = "red";
        }
    }
}

function palidelete() {
    var table = document.getElementById("Tabela");
    var rows = table.rows;
    for (var i = rows.length - 1; i >= 1; i--) {

        if (parseInt(rows[i].getElementsByTagName("td")[4].innerHTML) < 50) {
            table.deleteRow(i);
        }
    }
}

B22

Made with Slides.com