Skip to content

Commit

Permalink
Add project files.
Browse files Browse the repository at this point in the history
  • Loading branch information
TomKatom committed Oct 14, 2020
1 parent cec5ca9 commit 3232f25
Show file tree
Hide file tree
Showing 46 changed files with 3,436 additions and 0 deletions.
124 changes: 124 additions & 0 deletions App_Code/MyAdoHelper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
using System.Data;
using System.Data.OleDb;
using System.Web;

namespace com.KatomBook
{
public class MyAdoHelper
{
public static OleDbConnection ConnectToDb(string fileName)
{
string path = HttpContext.Current.Server.MapPath("App_Data/").Replace("api", ""); //מיקום מסד בפורוייקט
path += fileName;
//string path = HttpContext.Current.Server.MapPath("App_Data/" + fileName);//מאתר את מיקום מסד הנתונים מהשורש ועד התקייה בה ממוקם המסד
string connString =
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path; //נתוני ההתחברות הכוללים מיקום וסוג המסד
OleDbConnection conn = new OleDbConnection(connString);
return conn;
}

/// <summary>
/// To Execute update / insert / delete queries
/// הפעולה מקבלת שם קובץ ומשפט לביצוע ומבצעת את הפעולה על המסד
/// </summary>

public static void DoQuery(string sql) //הפעולה מקבלת שם מסד נתונים ומחרוזת מחיקה/ הוספה/ עדכון
//ומבצעת את הפקודה על המסד הפיזי
{
string fileName = "KatomBook_DB.mdb";
OleDbConnection conn = ConnectToDb(fileName);
conn.Open();
OleDbCommand com = new OleDbCommand(sql, conn);
com.ExecuteNonQuery();
com.Dispose();
conn.Close();

}


/// <summary>
/// To Execute update / insert / delete queries
/// הפעולה מקבלת שם קובץ ומשפט לביצוע ומחזירה את מספר השורות שהושפעו מביצוע הפעולה
/// </summary>
public int RowsAffected(string fileName, string sql) //הפעולה מקבלת מסלול מסד נתונים ופקודת עדכון
//ומבצעת את הפקודה על המסד הפיזי
{

OleDbConnection conn = ConnectToDb(fileName);
conn.Open();
OleDbCommand com = new OleDbCommand(sql, conn);
int rowsA = com.ExecuteNonQuery();
conn.Close();
return rowsA;
}

/// <summary>
/// הפעולה מקבלת שם קובץ ומשפט לחיפוש ערך - מחזירה אמת אם הערך נמצא ושקר אחרת
/// </summary>
public static bool
IsExist(string sql) //הפעולה מקבלת שם קובץ ומשפט בחירת נתון ומחזירה אמת אם הנתונים קיימים ושקר אחרת
{
string fileName = "KatomBook_DB.mdb";
OleDbConnection conn = ConnectToDb(fileName);
conn.Open();
OleDbCommand com = new OleDbCommand(sql, conn);
OleDbDataReader data = com.ExecuteReader();
bool found;
found = (bool) data.Read(); // אם יש נתונים לקריאה יושם אמת אחרת שקר - הערך קיים במסד הנתונים
conn.Close();
return found;

}
//רועי

public static DataTable ExecuteDataTable(string sql)
{
string fileName = "KatomBook_DB.mdb";
OleDbConnection conn = ConnectToDb(fileName);
conn.Open();
OleDbDataAdapter tableAdapter = new OleDbDataAdapter(sql, conn);
DataTable dt = new DataTable();
tableAdapter.Fill(dt);
conn.Close();
return dt;
}


public void ExecuteNonQuery(string fileName, string sql)
{
OleDbConnection conn = ConnectToDb(fileName);
conn.Open();
OleDbCommand command = new OleDbCommand(sql, conn);
command.ExecuteNonQuery();
conn.Close();
}

public static string
printDataTable(string fileName,
string sql) //הפעולה מקבלת שם קובץ ומשפט בחירת נתון ומחזירה אמת אם הנתונים קיימים ושקר אחרת
{


DataTable dt = ExecuteDataTable(sql);

string printStr = "<table border='1'>";

foreach (DataRow row in dt.Rows)
{
printStr += "<tr>";
foreach (object myItemArray in row.ItemArray)
{

printStr += "<td>" + myItemArray.ToString() + "</td>";
}

printStr += "</tr>";
}

printStr += "</table>";

return printStr;
}

}
}
Binary file added App_Data/KatomBook_DB.mdb
Binary file not shown.
4 changes: 4 additions & 0 deletions CSS/admin.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

table, th, td {
border: 1px solid black;
}
4 changes: 4 additions & 0 deletions CSS/chat.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.friendBar{
padding-right:50px;
border: 1px solid #808080;
}
106 changes: 106 additions & 0 deletions CSS/forgotpassword.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
@import url(https://fonts.googleapis.com/css?family=Roboto:300);

.login-page {
width: 360px;
padding: 8% 0 0;
margin: auto;
}
.form {
position: relative;
z-index: 1;
background: #ffffff;
max-width: 360px;
margin: 0 auto 100px;
padding: 45px;
text-align: center;
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
}
.form input {
font-family: "Roboto", sans-serif;
outline: 0;
background: #f2f2f2;
width: 100%;
border: 0;
margin: 0 0 15px;
padding: 15px;
box-sizing: border-box;
font-size: 14px;
}
.form button {
font-family: "Roboto", sans-serif;
text-transform: uppercase;
outline: 0;
background: #ff6600;
width: 100%;
border: 0;
padding: 15px;
color: #ffffff;
font-size: 14px;
-webkit-transition: all 0.3 ease;
transition: all 0.3 ease;
cursor: pointer;
}
.form button:hover,
.form button:active,
.form button:focus {
background: #ffa31a;
}
.form .back {
margin: 15px 0 0;
color: #b3b3b3;
font-size: 12px;
}
.form .back a {
color: #ff6600;
text-decoration: none;
}
.container {
position: relative;
z-index: 1;
max-width: 300px;
margin: 0 auto;
}
.container:before,
.container:after {
content: "";
display: block;
clear: both;
}
.container .info {
margin: 50px auto;
text-align: center;
}
.container .info h1 {
margin: 0 0 15px;
padding: 0;
font-size: 36px;
font-weight: 300;
color: #1a1a1a;
}
.container .info span {
color: #4d4d4d;
font-size: 12px;
}
.container .info span a {
color: #000000;
text-decoration: none;
}
.container .info span .fa {
color: #ef3b3a;
}
.ui-widget-header,.ui-state-default, ui-button {
background:#b9cd6d;
border: 1px solid #b9cd6d;
color: #FFFFFF;
font-weight: bold;
}
body {
background: #ff6600; /* fallback for old browsers */
background: -webkit-linear-gradient(right, #ff6600, #ffa31a);
background: -moz-linear-gradient(right, #ff6600, #ffa31a);
background: -o-linear-gradient(right, #ff6600, #ffa31a);
background: linear-gradient(to left, #ff6600, #ffa31a);
font-family: "Roboto", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
17 changes: 17 additions & 0 deletions CSS/friendlist.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
body {
margin-top: 30px;
background: #FFB914;
}

.top {
text-align: center;
}

.shadow {
box-shadow: 0px 0px 5px 0px;
padding-top: 10px;
}

h2, a{
color: #fff;
}
89 changes: 89 additions & 0 deletions CSS/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@


.chat{
margin: 50px 50px;
}
.chat{
font-family: Palatino;
float:right;
}
body {
background: #fafafa;
color: #333333;
margin-top: 5rem;
}

h1, h2, h3, h4, h5, h6 {
color: #444444;
}

.bg-steel {
background-color: #5f788a;
}

.site-header .navbar-nav .nav-link {
color: #cbd5db;
}

.site-header .navbar-nav .nav-link:hover {
color: #ffffff;
}

.site-header .navbar-nav .nav-link.active {
font-weight: 500;
}

.content-section {
background: #ffffff;
padding: 10px 20px;
border: 1px solid #dddddd;
border-radius: 3px;
margin-bottom: 20px;
}

.article-title {
color: #444444;
}

a.article-title:hover {
color: #428bca;
text-decoration: none;
}

.article-content {
white-space: pre-line;
}

.article-img {
height: 65px;
width: 65px;
margin-right: 16px;
}

.article-metadata {
padding-bottom: 1px;
margin-bottom: 4px;
border-bottom: 1px solid #e3e3e3
}

.article-metadata a:hover {
color: #333;
text-decoration: none;
}

.article-svg {
width: 25px;
height: 25px;
vertical-align: middle;
}

.account-img {
height: 125px;
width: 125px;
margin-right: 20px;
margin-bottom: 16px;
}

.account-heading {
font-size: 2.5rem;
}
Loading

0 comments on commit 3232f25

Please sign in to comment.