Skip to content
This repository was archived by the owner on Nov 17, 2017. It is now read-only.

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
daymickcorr committed Oct 25, 2017
1 parent a1379ee commit a32b69b
Show file tree
Hide file tree
Showing 4 changed files with 151 additions and 4 deletions.
43 changes: 41 additions & 2 deletions CatSelection.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,43 @@
<?php
require_once '';
session_start();
require_once 'Buisness/dbconfig.php';
require_once 'Buisness/Category.cls.php';
require_once 'Buisness/Subcategory.cls.php';
$interfaceLanguage= $_SESSION["language"];

?>
$category = new Category();
$categories = $category->getAll($connectionId);

$subCategory = new Subcategory();
$subCategories = $subCategory->getAll($connectionId);

foreach ($categories as $element){
if($element->getFk_lan_id() == $interfaceLanguage){
echo "<div class='category'>";
echo "<hr/>";
echo "<b>";
echo "<div style='text-align:center;'>";
echo $element->getCat_description();
echo "</div>";
echo "</b>";
echo "<hr/>";
echo "<ul>";
foreach ($subCategories as $subElement){
if($subElement->getFk_category_id() == $element->getPk_category_id()){
echo "<div class='subCategory'>";
echo "<li>";
echo "<a href='PostAd.php?subCategory=".$subElement->getPk_subCat_id()."'>".$subElement->getSubCat_description()."</a>";
echo "</li>";
echo "<br/>";
echo "</div>";
}
}
echo "</ul>";
echo "</div>";
}
else{
//echo "not good language";
}
}
?>
<link rel="stylesheet" type="text/css" href="css/index.css">
100 changes: 99 additions & 1 deletion PostAd.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@
echo "Please login first";
}

if(isset($_GET["subCategory"])){
$subCat = $_GET["subCategory"];
}
?>

<link rel="stylesheet" type="text/css" href="css/PostAd.css">

<table>
<tr>
<td>Title</td>
Expand All @@ -25,7 +30,100 @@
</td>
</tr>
<tr>
<td></td>
<td>Price</td>
<td><td>
</tr>
<tr>
<td>Ad Type</td>
<td >
<div class="payement">
<table>
<th>
<tr>
<td>Free</td>
</tr>
<tr>
<td>Duration <br/><hr/><br/> 10 Days</td>
</tr>
<tr>
<td>0$</td>
</tr>
<tr>
<td>0 Images</td>
</tr>
<tr>
<td><input type="button" onclick="" value="Select"></td>
</tr>
</th>
</table>
</div>
<div class="payement">
<table>
<th>
<tr>
<td>Standard</td>
</tr>
<tr>
<td>Duration <br/><hr/><br/> 90 Days</td>
</tr>
<tr>
<td>5$</td>
</tr>
<tr>
<td>1 Image</td>
</tr>
<tr>
<td><input type="button" onclick="" value="Select"></td>
</tr>
</th>
</table>
</div>
<div class="payement">
<table>
<th>
<tr>
<td>Paid</td>
</tr>
<tr>
<td>Duration <br/><hr/><br/> 120 Days</td>
</tr>
<tr>
<td>8$</td>
</tr>
<tr>
<td>5 Images</td>
</tr>
<tr>
<td><input type="button" onclick="" value="Select"></td>
</tr>
</th>
</table>
</div>
<div class="payement">
<table>
<th>
<tr>
<td>Premium</td>
</tr>
<tr>
<td>Duration <br/><hr/><br/> 180 Days</td>
</tr>
<tr>
<td>12$</td>
</tr>
<tr>
<td>10 Images</td>
</tr>
<tr>
<td><input type="button" onclick="" value="Select"></td>
</tr>
</th>
</table>
</div>
<td>
</tr>
<tr>
<td>Images</td>
<td><input type="file" name="images"><td>
</tr>
</table>
10 changes: 10 additions & 0 deletions css/PostAd.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.payement{
float: left;
margin-left: 5px;
min-width: 150px;
}

.payement table{
width: 100%;
text-align:center;
}
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<br/>
<a href="Register.php">Register</a>
<a href="Login.php">Login</a>
<a href="PostAd.php">Post Ad</a>
<a href="CatSelection.php">Post Ad</a>


</div>
Expand Down

0 comments on commit a32b69b

Please sign in to comment.