-
Notifications
You must be signed in to change notification settings - Fork 0
/
addpost.php
102 lines (97 loc) · 5.34 KB
/
addpost.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php
//////////////////////////////////////////////////////////////////////////////////////////////////////
//// This is a file for the Smart TS3 Panel made by UAEpro, BlackBird and eSport Team. ////
//// If you get this files without UAEpro permission you might be in serious problems. ////
//// This file or files content owned by eSport.ae and no one can use it without eSport.ae Owner. ////
//// If you have access to this file send email to [email protected] ////
//////////////////////////////////////////////////////////////////////////////////////////////////////
?>
<script type="text/javascript">
function showPosts() {
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
} else {
// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
document.getElementById("blackbird").innerHTML = xmlhttp.responseText;
}
}
xmlhttp.open("POST","./Posts/Posts.php",true);
xmlhttp.send();
}
setInterval(function () {showPosts()}, 1000);
function addPost(){
var x = document.getElementsByName("optionsRadiosInline");
for (i = 0; i < x.length; i++) {
if(x[i].checked == true){
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","./Posts/add.php?" + "type=" + x[i].value + "&msg=" + document.getElementsByName("Msg")[0].value,true);
xmlhttp.send();
document.getElementsByName("Msg")[0].value = "";
x[i].checked = false;
x[0].checked = true;
break;
}
}
}
</script>
<div id="page-wrapper">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">أضافة آخر الاحداث</h1>
</div>
<!-- /.col-lg-12 -->
</div>
<!-- /.row -->
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-bell fa-fw"></i> آخر التطورات والتغريدات
</div>
<!-- /.panel-heading -->
<div class="panel-body">
<div id="blackbird" class="list-group">
</div>
<!-- /.list-group -->
<form action='' method='post' border='0' id="form1">
<div class="form-group">
<label>الرجاء اختيار الايقونة</label>
<label class="radio-inline">
<input name="optionsRadiosInline" id="optionsRadiosInline1" value="fa fa-twitter fa-fw" checked="" type="radio"> <i class="fa fa-twitter fa-fw"></i>
</label>
<label class="radio-inline">
<input name="optionsRadiosInline" id="optionsRadiosInline2" value="fa fa-tasks fa-fw" type="radio"> <i class="fa fa-tasks fa-fw"></i>
</label>
<label class="radio-inline">
<input name="optionsRadiosInline" id="optionsRadiosInline3" value="fa fa-upload fa-fw" type="radio"> <i class="fa fa-upload fa-fw"></i>
</label>
<label class="radio-inline">
<input name="optionsRadiosInline" id="optionsRadiosInline3" value="fa fa-bolt fa-fw" type="radio"> <i class="fa fa-bolt fa-fw"></i>
</label>
<label class="radio-inline">
<input name="optionsRadiosInline" id="optionsRadiosInline3" value="fa fa-warning fa-fw" type="radio"> <i class="fa fa-warning fa-fw"></i>
</label>
<label class="radio-inline">
<input name="optionsRadiosInline" id="optionsRadiosInline3" value="fa fa-money fa-fw" type="radio"> <i class="fa fa-money fa-fw"></i>
</label><br>
<label>ما هو الجديد ؟</label>
<input class="form-control" name="Msg">
<input type='button' value='Submit' id="submit" onclick="addPost()" class="btn btn-default" />
</div>
</form>
</div>
<!-- /.panel-body -->
</div>
<!-- /.panel .chat-panel -->
</div>
<!-- /.col-lg-4 -->
</div>
<!-- /.row -->
</div>
<!-- /#page-wrapper -->
<!-- Morris Charts JavaScript -->