Skip to content

Commit e84b477

Browse files
committed
corresponding with filling up the styles, attributes and elements including icons.
1 parent c6ce2ea commit e84b477

14 files changed

+1590
-163
lines changed

Link to send_verification.php

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/var/www/html/ACES_OPEN_SOURCE/backend/send_verification.php

Link to sign_in.php

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/var/www/html/ACES_OPEN_SOURCE/backend/sign_in.php

attribute/get_attribute.php

+13-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,19 @@ function get_all_raw_attr(){
4545
require "../the_connector/connect_area.php";
4646

4747
$result = "<ul>";
48-
$stmt = $connect->prepare("SELECT `attr_id`, `user_id`, `attr_name`, `type`, `attr_default`, `attr_values`, `addon`, `description`, `likes`, `property`, `date_time` FROM `attributes`");
48+
$display_type = isset($_GET["display_by"]) ? ($_GET["display_by"]) : "";
49+
if($display_type == "like"){
50+
$stmt = $connect->prepare("SELECT `attr_id`, `user_id`, `attr_name`, `type`, `attr_default`, `attr_values`, `addon`, `description`, `likes`, `property`, `date_time` FROM `attributes` ORDER BY `likes` DESC ");
51+
} else if($display_type == "date-new"){
52+
$stmt = $connect->prepare("SELECT `attr_id`, `user_id`, `attr_name`, `type`, `attr_default`, `attr_values`, `addon`, `description`, `likes`, `property`, `date_time` FROM `attributes` ORDER BY `date_time` DESC ");
53+
} else if($display_type == "date-old"){
54+
$stmt = $connect->prepare("SELECT `attr_id`, `user_id`, `attr_name`, `type`, `attr_default`, `attr_values`, `addon`, `description`, `likes`, `property`, `date_time` FROM `attributes` ORDER BY `date_time` ASC ");
55+
}
56+
else{
57+
$stmt = $connect->prepare("SELECT `attr_id`, `user_id`, `attr_name`, `type`, `attr_default`, `attr_values`, `addon`, `description`, `likes`, `property`, `date_time` FROM `attributes`");
58+
}
59+
60+
//$stmt = $connect->prepare("SELECT `attr_id`, `user_id`, `attr_name`, `type`, `attr_default`, `attr_values`, `addon`, `description`, `likes`, `property`, `date_time` FROM `attributes`");
4961
$stmt->execute();
5062
$stmt->bind_result($attr_id, $user_id, $attr_name, $type, $attr_default, $attr_values, $addon, $description, $likes, $property, $date_time );
5163

attribute/insert_attribute.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@
88
//include "../publicity/mailer.php";
99
session_start();
1010
$array = ["status"=>"false", "msg"=>"No possible connection"];
11-
if( isset($_POST["attr_name"]) and isset($_POST["description"]) and isset($_POST["type"]) ){
11+
$output = "";
12+
if( isset($_POST["attr_name"]) and isset($_POST["description"]) and isset($_POST["type"]) and isset($_POST["applicable"]) ){
1213
$user_id = isset($_POST["userid"]) ? cleaner_4_DB($_POST["userid"]) : 0; //check if id was sent from POST
1314
$user_id = isset($_SESSION["userid"]) ? cleaner_4_DB($_SESSION["userid"]) : 0; // session should override POST else 0 as default
1415
$attr_name = cleaner_4_DB($_POST["attr_name"]);
1516
$type = cleaner_4_DB($_POST["type"]);
1617
$description = cleaner_4_DB($_POST["description"]);
17-
1818
$attr_default = isset($_POST["attr_default"]) ? cleaner_4_DB($_POST["attr_default"]) : "";
1919
$attr_values = isset($_POST["attr_values"]) ? cleaner_4_DB($_POST["attr_values"]) : "";
20+
$applicable = isset($_POST["applicable"]) ? cleaner_4_representation($_POST["applicable"]) : "";
2021
$addon = isset($_POST["addon"]) ? cleaner_4_DB($_POST["addon"]) : "";
2122
$likes = isset($_POST["likes"]) ? cleaner_4_DB($_POST["likes"]) : 0; //check if id was sent from POST
22-
$property = isset($_SESSION["property"]) ? cleaner_4_DB($_SESSION["property"]) : ""; // session should override POST else 0 as default
23-
23+
$property = isset($_SESSION["property"]) ? cleaner_4_DB($_SESSION["property"]) : ""; //
2424
$date_time = date('Y-m-d H:i:s');
2525
$output = isset($_POST["output"]) ? cleaner_4_DB($_POST["output"]) : "text";
2626

@@ -30,9 +30,9 @@
3030
$array = ["status"=>"false", "msg"=>"This CSS attr already exist. If you feel you have better description to add to this attr Do well to reach out to 'OPEN_SOURCE_IMPROVEMENT' via email: [email protected] or [email protected] "];
3131
}else if($tag_already < 1 AND $attr_name != "" ){
3232

33-
$inserter = $connect->prepare("INSERT INTO `attributes` (`attr_id`, `user_id`, `attr_name`, `type`, `attr_default`, `attr_values`, `addon`, `description`, `likes`, `property`, `date_time`) VALUES (NULL, ?, ?, ?, ?, ?, ?, ?, ?, ?, CURRENT_TIMESTAMP);");
33+
$inserter = $connect->prepare("INSERT INTO `attributes` (`attr_id`, `user_id`, `attr_name`, `type`, `attr_default`, `attr_values`, `addon`, `description`, `applicable`, `likes`, `property`, `date_time`) VALUES (NULL, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, CURRENT_TIMESTAMP);");
3434

35-
$inserter->bind_param("issssssis", $user_id, $attr_name, $type, $attr_default, $attr_values, $addon, $description, $likes, $property );
35+
$inserter->bind_param("isssssssis", $user_id, $attr_name, $type, $attr_default, $attr_values, $addon, $description, $applicable, $likes, $property );
3636
$inserter->execute();
3737

3838
if (!$inserter){

color/get_color.php

-128
This file was deleted.

colors/get_color.php

+122
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,126 @@
33

44
//will contain code to select from this table and more SQL Actions
55

6+
7+
echo '<style>
8+
.the_color_main_side{
9+
background-color: transparent;
10+
max-width: 95%;
11+
min-width: 60%;
12+
text-align: center;
13+
padding: 7px;
14+
}
15+
16+
.the_color_main_side .display_board{
17+
height: 230px;
18+
width: 230px;
19+
background-color: #000;
20+
padding: 12px;
21+
}
22+
23+
.the_color_main_side label{
24+
display: block;
25+
padding: 7px;
26+
}
27+
28+
.color_input{
29+
display: inline;
30+
color: darkblue;
31+
width: 65%;
32+
padding: 2px;
33+
background-color: darkgoldenrod;
34+
/* background: red; /* For browsers that do not support gradients
35+
background: -webkit-linear-gradient(-90deg, red, yellow);
36+
background: -o-linear-gradient(-90deg, red, yellow);
37+
background: -moz-linear-gradient(-90deg, red, yellow);
38+
background: linear-gradient(-90deg, red, yellow);*/
39+
40+
41+
background: red; /* For browsers that do not support gradients */
42+
/* For Safari 5.1 to 6.0 */
43+
background: -webkit-linear-gradient(left,red,orange,yellow,green,blue,indigo,violet);
44+
/* For Opera 11.1 to 12.0 */
45+
background: -o-linear-gradient(left,red,orange,yellow,green,blue,indigo,violet);
46+
/* For Fx 3.6 to 15 */
47+
background: -moz-linear-gradient(left,red,orange,yellow,green,blue,indigo,violet);
48+
/* Standard syntax */
49+
background: linear-gradient(to right, red,orange,yellow,green,blue,indigo,violet);
50+
}
51+
52+
.color_side_range{
53+
width: 15%;
54+
padding: 4px;
55+
display: inline;
56+
}
57+
58+
.the_add_colors{
59+
padding: 12px;
60+
border-radius: 3px;
61+
}
62+
63+
.the_angle_inputter, .type_inputter_side{
64+
padding: 12px;
65+
border-radius: 12px;
66+
width: 80%;
67+
}
68+
69+
.type_inputter_side option{
70+
padding: 12px;
71+
border-radius: 12px;
72+
}
73+
</style>
74+
<div class="the_color_main_side">
75+
<center>
76+
<div class="display_board" id="the_color_displayer">
77+
78+
</div>
79+
</center>
80+
81+
<div class="the_input_section" id="the_color_Selection_boxes">
82+
<input type="hidden" value="1" id="already_existing_color_box"/>
83+
<label>
84+
RawFeed
85+
<input onchange="make_colorsBox_go()" class="the_checker_color" id="get_only_raw" type="checkbox"/>
86+
</label>
87+
88+
<label class="color_section">
89+
<span class="input_text_side">Color:</span>
90+
<input class="color_input" id="color_input_00" onchange="change_color_displayer(event)" type="color" placeholder="colors picker"/>
91+
<input class="color_side_range" id="color_side_range_00" value="0" type="text"/>
92+
</label>
93+
94+
<label class="color_section">
95+
<span class="input_text_side">Color:</span>
96+
<input class="color_input" id="color_input_11" onchange="change_color_displayer(event)" type="color" value="testing" placeholder="colors picker"/>
97+
<input class="color_side_range" id="color_side_range_11" value="0" type="text"/>
98+
</label>
99+
</div>
100+
<br/>
101+
<button onclick="add_colors_selector()" class="the_add_colors">Add Colors</button>
102+
<br/>
103+
<hr/>
104+
105+
<div class="the_input_setters">
106+
<label>
107+
Repeat
108+
<input id="the_chief_master_repeat" class="the_checker_color" type="checkbox"/>
109+
</label>
110+
111+
<label>
112+
Angle
113+
<input class="the_angle_inputter" id="colors_angle_getter" type="text" value="-90deg" placeholder="Enter an angle of inclination. LOL"/>
114+
</label>
115+
<label>
116+
Type
117+
<select class="type_inputter_side" id="type_color_getter">
118+
<option value="linear">Linear</option>
119+
<option value="radial">Radial</option>
120+
</select>
121+
</label>
122+
<br/><br/>
123+
124+
<button onclick="apply_the_color(event)" class="the_add_colors">Apply</button>
125+
</div>
126+
</div>';
127+
6128
?>

elements/get_element.php

+22-6
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ function get_elem_by_name($connect, $tag_name){
3838
function get_all_elem(){
3939
require "../the_connector/connect_area.php";
4040
$result = array();
41-
$stmt = $connect->prepare("SELECT `tag_id`, `user_id`, `tag_name`, `tag_type`, `tag_example`, `tag_description`, `default_style`, `addon`, `date_time` FROM `elements`");
41+
$stmt = $connect->prepare("SELECT `tag_id`, `user_id`, `tag_name`, `tag_type`, `tag_example`, `tag_description`, `default_style`, `likes`, `addon`, `date_time` FROM `elements`");
4242
$stmt->execute();
43-
$stmt->bind_result($elem_id, $user_id, $elem_name, $type, $elem_example, $description, $elem_default, $addon, $date_time );
43+
$stmt->bind_result($elem_id, $user_id, $elem_name, $type, $elem_example, $description, $elem_default, $likes, $addon, $date_time );
4444

4545
if(!$stmt){
4646
$result = array("status"=>"false", "msg"=>"Could not get the coins symbols.");
@@ -59,16 +59,32 @@ function get_all_raw_elem(){
5959
require "../the_connector/connect_area.php";
6060

6161
$result = "";
62-
63-
$stmt = $connect->prepare("SELECT `tag_id`, `user_id`, `tag_name`, `tag_type`, `tag_example`, `tag_description`, `default_style`, `addon`, `date_time` FROM `elements`");
62+
$display_type = isset($_GET["display_by"]) ? ($_GET["display_by"]) : "";
63+
if($display_type == "like"){
64+
$stmt = $connect->prepare("SELECT `tag_id`, `user_id`, `tag_name`, `tag_type`, `tag_example`, `tag_description`, `default_style`, `likes`, `addon`, `date_time` FROM `elements` ORDER BY `likes` DESC ");
65+
} else if($display_type == "date-new"){
66+
$stmt = $connect->prepare("SELECT `tag_id`, `user_id`, `tag_name`, `tag_type`, `tag_example`, `tag_description`, `default_style`, `likes`, `addon`, `date_time` FROM `elements` ORDER BY `date_time` DESC ");
67+
} else if($display_type == "date-old"){
68+
$stmt = $connect->prepare("SELECT `tag_id`, `user_id`, `tag_name`, `tag_type`, `tag_example`, `tag_description`, `default_style`, `likes`, `addon`, `date_time` FROM `elements` ORDER BY `date_time` ASC ");
69+
}
70+
else{
71+
$stmt = $connect->prepare("SELECT `tag_id`, `user_id`, `tag_name`, `tag_type`, `tag_example`, `tag_description`, `default_style`, `likes`, `addon`, `date_time` FROM `elements`");
72+
}
73+
74+
//$stmt = $connect->prepare("SELECT `tag_id`, `user_id`, `tag_name`, `tag_type`, `tag_example`, `tag_description`, `default_style`, `likes`, `addon`, `date_time` FROM `elements`");
6475
$stmt->execute();
65-
$stmt->bind_result($elem_id, $user_id, $elem_name, $type, $elem_example, $description, $elem_default, $addon, $date_time );
76+
$stmt->bind_result($elem_id, $user_id, $elem_name, $type, $elem_example, $description, $elem_default, $likes, $addon, $date_time );
6677

6778
if(!$stmt){
6879
$result = array("status"=>"false", "msg"=>"Could not get the coins symbols.");
6980
}elseif($stmt){
7081
while ($stmt->fetch()) {
71-
$result .= '<span ondragstart="elem_drag(event, \''.$elem_name.'\')" draggable="true" class="the_bottom_elems" onclick="add_element_2_dashboard(\''.$elem_name.'\')">'.$elem_name.'</span>';
82+
if($type == "inline"){
83+
$result .= '<span ondragstart="elem_drag(event, \''.$elem_name.'\')" draggable="true" class="the_bottom_elems" onclick="add_element_2_dashboard(\''.$elem_name.'\')">'.$elem_name.'</span>';
84+
}else{
85+
$result .= '<span ondragstart="elem_drag(event, \''.$elem_name.'\')" draggable="true" class="the_bottom_elems_block" onclick="add_element_2_dashboard(\''.$elem_name.'\')">'.$elem_name.'</span>';
86+
}
87+
7288
#array_push($result, array( "id"=>$elem_id, "user_id"=>$user_id, "elem_name"=>$elem_name, "type"=>$type, "elem_default"=>$elem_default, "elem_values"=>$elem_values, "addon"=>$addon, "description"=>$description, "likes"=>$likes, "property"=>$property, "date_time"=>$date_time) );
7389
}
7490
}

elements/insert_elements.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
//include "../publicity/mailer.php";
99
session_start();
1010
$array = ["status"=>"false", "msg"=>"No possible connection"];
11+
$output = "";
1112
if( isset($_POST["element_description"]) and isset($_POST["element_name"])){
1213
$elem = cleaner_4_DB($_POST["element_name"]);
1314
$tag_type = isset($_POST["tag_type"]) ? cleaner_4_DB($_POST["tag_type"]) : "";
@@ -19,6 +20,7 @@
1920
$tag_description = cleaner_4_DB($_POST["element_description"]);
2021
$default_style = isset($_POST["tag_type"]) ? cleaner_4_DB($_POST["tag_type"]) : "";
2122
$addon = isset($_POST["addon"]) ? cleaner_4_DB($_POST["addon"]) : "";
23+
$likes = 0;
2224
$output = isset($_POST["output"]) ? cleaner_4_DB($_POST["output"]) : "text";
2325
$date_time = date('Y-m-d H:i:s');
2426

@@ -28,9 +30,9 @@
2830
$array = ["status"=>"false", "msg"=>"This HTML_TAG already exist. If you feel you have better description to add to this HTML TAG, Do well to reach out to 'OPEN_SOURCE_IMPROVEMENT' via email: [email protected] or [email protected] "];
2931
}else if($tag_already < 1 AND $elem != "" ){
3032

31-
$inserter = $connect->prepare("INSERT INTO `elements` (`tag_id`, `user_id`, `tag_name`, `tag_type`, `tag_example`, `tag_description`, `default_style`, `addon`, `date_time`) VALUES (NULL, ?, ?, ?, ?, ?, ?, ?, CURRENT_TIMESTAMP);");
33+
$inserter = $connect->prepare("INSERT INTO `elements` (`tag_id`, `user_id`, `tag_name`, `tag_type`, `tag_example`, `tag_description`, `default_style`, `likes`, `addon`, `date_time`) VALUES (NULL, ?, ?, ?, ?, ?, ?, ?, ?, CURRENT_TIMESTAMP);");
3234

33-
$inserter->bind_param("issssss", $user_id, $elem, $tag_type, $tag_example, $tag_description, $default_style, $addon );
35+
$inserter->bind_param("issssiss", $user_id, $elem, $tag_type, $tag_example, $tag_description, $default_style, $likes, $addon );
3436
$inserter->execute();
3537

3638
if (!$inserter){

0 commit comments

Comments
 (0)